-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update scripts * testing script * update permission * update working-directory * Raised quality bar * improved performance * update script * update error code * Raised the bar * Update conditional * Fixed type error * Update beta * cdn autodesk * cdn autodesk comments * comments canvas * html comments * matterport comments * threejs comments * cdn matterport * cdn mouse * cdn real time * cdn three * video cdn * cdn wio * Update CDN Projects * update version * update type * Added Form Elements to samples * Fixed project infos * Fixed type check * Improved read-me links
- Loading branch information
0 parents
commit fe18df3
Showing
15 changed files
with
2,813 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
// These tasks will run in order when initializing your CodeSandbox project. | ||
"setupTasks": [ | ||
{ | ||
"name": "Install Dependencies", | ||
"command": "yarn install" | ||
} | ||
], | ||
// These tasks can be run from CodeSandbox. Running one will open a log in the app. | ||
"tasks": { | ||
"start": { | ||
"name": "start", | ||
"command": "yarn start", | ||
"runAtStart": true, | ||
"preview": { | ||
"port": 5173 | ||
} | ||
}, | ||
"build": { | ||
"name": "build", | ||
"command": "yarn build", | ||
"runAtStart": false | ||
}, | ||
"preview": { | ||
"name": "preview", | ||
"command": "yarn preview", | ||
"runAtStart": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"title": "Sample Room for Mouse Pointers (React/TS)", | ||
"description": "The Real-time Mouse Pointers feature enables real-time tracking of participants' cursor movements, allowing seamless collaboration within the same room. This is part of the SuperViz SDK.", | ||
"iconUrl": "https://superviz.com/wp-content/uploads/2022/10/superviz-1-80x80.png", | ||
"tags": [ | ||
"react", | ||
"javascript", | ||
"typescript", | ||
"superviz", | ||
"real-time", | ||
"collaboration" | ||
], | ||
"published": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
VITE_DEVELOPER_KEY= | ||
VITE_MATTERPORT_KEY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
dist | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>SuperViz SDK</title> | ||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.jsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "superviz-forms-editor-react-js", | ||
"version": "1.0.0", | ||
"description": "This is a sample project for the Forms Editor, based on react (js), for more information, go to docs.superviz.com", | ||
"type": "module", | ||
"scripts": { | ||
"start": "vite", | ||
"dev": "vite", | ||
"build": "vite build", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"@superviz/react-sdk": "1.7.0", | ||
"uuid": "^9.0.1" | ||
}, | ||
"devDependencies": { | ||
"@vitejs/plugin-react": "^4.2.0", | ||
"vite": "^5.0.0" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Sample for Forms Editor (React/JavaScript) | ||
|
||
### SuperViz SDK | ||
|
||
This project hosts samples for SuperViz SDK. To find out more about the SDK itself, please visit [the documentation](https://docs.superviz.com/). | ||
|
||
The SDK documentation has extensive sections about [getting started](https://docs.superviz.com/getting-started/quickstart), setting up the SDK, as well as the process of acquiring the required developer key. | ||
|
||
## Build and run the samples | ||
|
||
You can run this sample with npm: | ||
|
||
```bash | ||
npm install | ||
npm start | ||
``` | ||
|
||
or with Yarn: | ||
|
||
```bash | ||
yarn install | ||
yarn start | ||
``` | ||
|
||
Just make sure that you have the required developer keys in the `.env` file. For that copy the `.env.example` file to `.env` and fill in the values. | ||
|
||
You will need Developer Key keys to run the samples on your machines, you therefore should [follow the instructions on these pages](https://docs.superviz.com/getting-started/setting-account) before continuing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { FormElements, SuperVizRoomProvider } from "@superviz/react-sdk"; | ||
import { sampleInfo } from "./projectInfo"; | ||
|
||
const DEVELOPER_KEY = import.meta.env.VITE_DEVELOPER_KEY; | ||
const groupId = sampleInfo.id; | ||
const groupName = sampleInfo.name; | ||
const participant = Math.floor(Math.random() * 100); | ||
|
||
function App() { | ||
return ( | ||
<SuperVizRoomProvider | ||
developerKey={DEVELOPER_KEY} | ||
group={{ | ||
id: groupId, | ||
name: groupName, | ||
}} | ||
participant={{ | ||
id: participant.toString(), | ||
name: "John " + participant, | ||
}} | ||
roomId={groupId} | ||
> | ||
<div className="formelements"> | ||
<h1>Generic Form</h1> | ||
<label> | ||
Name: <br /> | ||
<input type='text' id='name' name='name' /> | ||
</label> | ||
<label> | ||
Email: <br /> | ||
<input type='email' id='email' name='email' /> | ||
</label> | ||
<label> | ||
What is your kind of pet? | ||
<div className='radio-option'> | ||
<span> | ||
<input type='radio' name='pet' value='cat' id='cat' /> Cat | ||
</span> | ||
<span> | ||
<input type='radio' name='pet' value='dog' id='dog' /> Dog | ||
</span> | ||
<span> | ||
<input type='radio' name='pet' value='fish' id='fish' /> Fish | ||
</span> | ||
</div> | ||
</label> | ||
</div> | ||
<FormElements fields={['name', 'email', 'dog', 'cat', 'fish']} /> | ||
</SuperVizRoomProvider> | ||
); | ||
} | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
body { | ||
margin: 0; | ||
min-height: 100vh; | ||
} | ||
|
||
#root { | ||
background: #e9e5ef; | ||
margin: 0; | ||
height: 100%; | ||
} | ||
|
||
.formelements { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
height: 100%; | ||
background: #c9c4d1; | ||
border-radius: 6px; | ||
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1); | ||
padding: 1rem 1.5rem; | ||
align-items: center; | ||
justify-content: center; | ||
color: #333; | ||
} | ||
|
||
.formelements h1 { | ||
margin: 0; | ||
} | ||
|
||
.formelements input { | ||
padding: 0.5rem; | ||
margin: 0.5rem 0 0; | ||
border-radius: 6px; | ||
width: 320px; | ||
} | ||
|
||
.formelements input[type='radio'] { | ||
width: auto; | ||
} | ||
|
||
.formelements .radio-option { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
width: 340px; | ||
margin-top: 0.5rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom/client"; | ||
import App from "./App"; | ||
import "./index.css"; | ||
|
||
ReactDOM.createRoot(document.getElementById("root")).render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const sampleInfo = { id: 'superviz-forms-editor-react-js', name: 'Forms Editor (React/JavaScript)' }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { defineConfig } from 'vite' | ||
import react from '@vitejs/plugin-react' | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [react()], | ||
}) |
Oops, something went wrong.