├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .github └── workflows │ ├── ci.yml │ └── gh-pages.yml ├── .gitignore ├── .husky └── commit-msg ├── .pnpmfile.cjs ├── .prettierignore ├── .prettierrc.json ├── .vscode └── settings.json ├── LICENSE ├── README.md ├── commitlint.config.js ├── cspell.json ├── package.json ├── packages ├── app-browser │ ├── package.json │ ├── playground.ts │ ├── src │ │ ├── browser.svelte │ │ ├── browser.svelte.d.ts │ │ ├── index.ts │ │ └── style.scss │ ├── tsconfig.json │ └── vite.config.ts ├── app-countdown │ ├── package.json │ ├── playground.ts │ ├── src │ │ ├── App.tsx │ │ ├── Clock │ │ │ ├── index.tsx │ │ │ └── style.scss │ │ ├── Countdown │ │ │ ├── index.tsx │ │ │ └── style.scss │ │ ├── TimeCell │ │ │ ├── index.tsx │ │ │ └── style.scss │ │ ├── index.tsx │ │ └── style.scss │ ├── tsconfig.json │ └── vite.config.ts ├── app-dice │ ├── README.md │ ├── package.json │ ├── playground.ts │ ├── src │ │ ├── index.ts │ │ ├── internal.ts │ │ ├── player.ts │ │ ├── style.scss │ │ └── svg.ts │ ├── tsconfig.json │ └── vite.config.ts ├── app-docs-viewer │ ├── README.md │ ├── package.json │ ├── playground.ts │ ├── src │ │ ├── DocsViewer │ │ │ ├── Footer │ │ │ │ ├── index.ts │ │ │ │ └── style.scss │ │ │ ├── Preview │ │ │ │ ├── index.ts │ │ │ │ └── style.scss │ │ │ ├── icons │ │ │ │ ├── arrow-left.svg │ │ │ │ ├── arrow-left.ts │ │ │ │ ├── arrow-right.svg │ │ │ │ ├── arrow-right.ts │ │ │ │ ├── pause.svg │ │ │ │ ├── pause.ts │ │ │ │ ├── play.svg │ │ │ │ ├── play.ts │ │ │ │ ├── save.ts │ │ │ │ ├── sidebar.svg │ │ │ │ ├── sidebar.ts │ │ │ │ └── spinner.ts │ │ │ ├── index.ts │ │ │ ├── style.scss │ │ │ ├── typings.ts │ │ │ └── variables.scss │ │ ├── DynamicDocsViewer │ │ │ ├── index.ts │ │ │ └── style.scss │ │ ├── PageRenderer │ │ │ ├── PageEl.ts │ │ │ ├── PageElManager.ts │ │ │ ├── index.ts │ │ │ └── style.scss │ │ ├── ScrollBar │ │ │ ├── index.ts │ │ │ └── style.scss │ │ ├── StaticDocsViewer │ │ │ ├── index.ts │ │ │ ├── stepper.ts │ │ │ └── style.scss │ │ ├── app-docs-viewer.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── style.scss │ │ └── utils │ │ │ └── helpers.ts │ ├── tsconfig.json │ └── vite.config.ts ├── app-embedded-page-sdk │ ├── README-zh.md │ ├── README.md │ ├── package.json │ ├── src │ │ ├── EmbeddedApp.ts │ │ ├── EmbeddedPageEvent.ts │ │ ├── Store │ │ │ └── Store.ts │ │ ├── index.ts │ │ └── utils.ts │ ├── tsconfig.json │ └── vite.config.ts ├── app-embedded-page │ ├── README-zh.md │ ├── README.md │ ├── package.json │ ├── playground.ts │ ├── src │ │ ├── index.ts │ │ ├── style.scss │ │ ├── types.ts │ │ └── utils.ts │ ├── tsconfig.json │ └── vite.config.ts ├── app-flowchart │ ├── package.json │ ├── playground.ts │ ├── src │ │ ├── flow │ │ │ ├── config-cmd.ts │ │ │ ├── config-keybinding.ts │ │ │ ├── config-menu.ts │ │ │ ├── config-toolbar.ts │ │ │ ├── constant.ts │ │ │ ├── flow-sync.ts │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ └── react-node │ │ │ │ ├── dnd-node.less │ │ │ │ └── dnd-node.tsx │ │ ├── index.tsx │ │ └── style.less │ ├── tsconfig.json │ └── vite.config.ts ├── app-geogebra │ ├── gen │ │ ├── api.rb │ │ ├── event.rb │ │ └── params.rb │ ├── package.json │ ├── playground.ts │ ├── src │ │ ├── ggb │ │ │ ├── index.ts │ │ │ └── live.ts │ │ ├── index.ts │ │ ├── style.scss │ │ ├── types │ │ │ ├── api.ts │ │ │ ├── entry.ts │ │ │ ├── index.ts │ │ │ └── params.ts │ │ └── utils.ts │ ├── tsconfig.json │ └── vite.config.ts ├── app-gomoku │ ├── README.md │ ├── package.json │ ├── playground.ts │ ├── src │ │ ├── components │ │ │ ├── App.tsx │ │ │ ├── Board.tsx │ │ │ ├── Login.tsx │ │ │ ├── Waiting.tsx │ │ │ ├── Winner.tsx │ │ │ ├── hooks.ts │ │ │ └── utils.ts │ │ ├── index.tsx │ │ ├── model.ts │ │ ├── stage.ts │ │ └── style.scss │ ├── tsconfig.json │ └── vite.config.ts ├── app-iframe-bridge │ ├── README-zh.md │ ├── README.md │ ├── package.json │ ├── playground.ts │ ├── src │ │ ├── hardcode.ts │ │ ├── index.ts │ │ ├── page.ts │ │ └── typings.ts │ ├── tsconfig.json │ └── vite.config.ts ├── app-mindmap │ ├── README.md │ ├── package.json │ ├── playground.ts │ ├── src │ │ ├── MindMap.ts │ │ ├── antv.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── internal.ts │ │ ├── model.ts │ │ ├── shim.d.ts │ │ └── style.scss │ ├── tsconfig.json │ └── vite.config.ts ├── app-monaco │ ├── .env.example │ ├── README.md │ ├── package.json │ ├── playground.ts │ ├── src │ │ ├── Decorations │ │ │ ├── CursorDecoration.ts │ │ │ ├── CursorDecorations.ts │ │ │ ├── SelectionDecorations.ts │ │ │ ├── StyleManager.ts │ │ │ └── index.ts │ │ ├── MonacoEditor.ts │ │ ├── Terminal.ts │ │ ├── compiler │ │ │ ├── judge0.ts │ │ │ └── typings.ts │ │ ├── constants.ts │ │ ├── global.d.ts │ │ ├── index.ts │ │ ├── style.scss │ │ ├── typings.ts │ │ └── y-monaco.ts │ ├── tsconfig.json │ └── vite.config.ts ├── app-paint │ ├── DEVELOP.md │ ├── package.json │ ├── playground.ts │ ├── src │ │ ├── bezier-q.ts │ │ ├── fit-curve-worker.ts │ │ ├── index.ts │ │ ├── paper.ts │ │ └── typings.ts │ ├── tsconfig.json │ └── vite.config.ts ├── app-plyr │ ├── Develop.md │ ├── README.md │ ├── package.json │ ├── playground.ts │ ├── src │ │ ├── index.ts │ │ ├── mime.ts │ │ ├── player.svelte │ │ ├── player.svelte.d.ts │ │ ├── sprites.svelte │ │ ├── style.scss │ │ ├── sync.ts │ │ └── utils.ts │ ├── tsconfig.json │ └── vite.config.ts ├── app-quill │ ├── README.md │ ├── package.json │ ├── playground.ts │ ├── src │ │ ├── QuillEditor.ts │ │ ├── index.ts │ │ ├── internal.ts │ │ ├── shim.d.ts │ │ └── style.scss │ ├── tsconfig.json │ └── vite.config.ts ├── app-selector │ ├── package.json │ ├── playground.ts │ ├── postcss.config.js │ ├── src │ │ ├── app.tsx │ │ ├── index.css │ │ ├── index.tsx │ │ ├── selecting.tsx │ │ ├── tailwind.css │ │ ├── teacher-waiting.tsx │ │ ├── use-count-up.tsx │ │ └── utils.ts │ ├── tailwind.config.js │ ├── tsconfig.json │ └── vite.config.ts ├── app-shared │ ├── package.json │ ├── src │ │ ├── ensure-attributes.ts │ │ ├── index.ts │ │ ├── logger.ts │ │ └── svelte │ │ │ ├── create-svelte-side-effect.ts │ │ │ └── index.ts │ └── tsconfig.json ├── app-slide │ ├── CHANGELOG.md │ ├── README-zh.md │ ├── README.md │ ├── package.json │ ├── playground.ts │ ├── src │ │ ├── Logger.ts │ │ ├── Refrigerator.ts │ │ ├── SlideViewer │ │ │ ├── footer.ts │ │ │ ├── index.ts │ │ │ ├── sidebar.ts │ │ │ ├── typings.ts │ │ │ └── utils.ts │ │ ├── connect.ts │ │ ├── constants.ts │ │ ├── fancy-scrollbar.scss │ │ ├── icons │ │ │ ├── arrow-left.ts │ │ │ ├── arrow-right.ts │ │ │ ├── index.ts │ │ │ ├── pause.ts │ │ │ ├── play.ts │ │ │ ├── save.ts │ │ │ ├── sidebar.ts │ │ │ └── spinner.ts │ │ ├── index.ts │ │ ├── preview.ts │ │ ├── style.scss │ │ ├── typings.ts │ │ └── utils.ts │ ├── tsconfig.json │ └── vite.config.ts ├── app-talkative │ ├── README.md │ ├── package.json │ ├── playground.ts │ ├── src │ │ ├── connect.ts │ │ ├── footer.ts │ │ ├── index.ts │ │ ├── renderer.ts │ │ ├── style.css │ │ └── utils.ts │ ├── tsconfig.json │ └── vite.config.ts ├── app-vote │ ├── package.json │ ├── playground.ts │ ├── src │ │ ├── icons │ │ │ ├── close.svg │ │ │ ├── pencil-off.svg │ │ │ ├── pencil.svg │ │ │ ├── plus.svg │ │ │ └── up.svg │ │ ├── index.ts │ │ ├── style.scss │ │ ├── vote.svelte │ │ └── vote.svelte.d.ts │ ├── tsconfig.json │ └── vite.config.ts ├── app-whiteboard │ ├── package.json │ ├── playground.ts │ ├── src │ │ └── index.ts │ ├── tsconfig.json │ └── vite.config.ts ├── create-app │ ├── create-netless-app │ │ ├── index.js │ │ ├── render.js │ │ └── template │ │ │ ├── typescript │ │ │ ├── package.json.ejs │ │ │ ├── playground.ts.ejs │ │ │ ├── src │ │ │ │ ├── index.ts.ejs │ │ │ │ └── style.css.ejs │ │ │ ├── tsconfig.json.ejs │ │ │ └── vite.config.ts.ejs │ │ │ └── vanilla │ │ │ ├── package.json.ejs │ │ │ ├── playground.js.ejs │ │ │ ├── src │ │ │ ├── index.js.ejs │ │ │ └── style.css.ejs │ │ │ └── vite.config.js.ejs │ ├── index.js │ ├── package.json │ └── standalone │ │ ├── README.md │ │ ├── index.js │ │ ├── scripts │ │ └── up.js │ │ └── template-vanilla │ │ ├── _gitignore │ │ ├── package.json │ │ ├── src │ │ ├── index.ts │ │ └── style.css │ │ ├── tsconfig.json │ │ └── vite.config.ts ├── playground │ ├── .env │ ├── .env.example │ ├── embed.html │ ├── index.html │ ├── package.json │ ├── preview-slide.html │ ├── public │ │ └── h5.html │ ├── src │ │ ├── app.svelte │ │ ├── apps.ts │ │ ├── clipboard.ts │ │ ├── common.ts │ │ ├── constants.ts │ │ ├── embed.ts │ │ ├── global.d.ts │ │ ├── icons │ │ │ ├── app.svg │ │ │ ├── category.svg │ │ │ ├── moon.svg │ │ │ └── sun.svg │ │ ├── loading.svelte │ │ ├── log.ts │ │ ├── main.ts │ │ ├── preview.ts │ │ ├── room.ts │ │ └── style.scss │ ├── tsconfig.json │ ├── typings.ts │ └── vite.config.ts └── typings │ ├── index.d.ts │ ├── index.js │ └── package.json ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── scripts └── create-vite-config.ts └── tsconfig.json /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | public/ 4 | /packages/create-app/ 5 | *.html 6 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | /** @type {import("eslint").Linter.Config} */ 2 | const config = { 3 | root: true, 4 | env: { 5 | browser: true, 6 | }, 7 | parser: "@typescript-eslint/parser", 8 | plugins: ["svelte3", "@typescript-eslint"], 9 | extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"], 10 | rules: { 11 | "@typescript-eslint/consistent-type-imports": "warn", 12 | "@typescript-eslint/no-empty-interface": "off", 13 | "@typescript-eslint/no-unused-vars": ["error", { ignoreRestSiblings: true }], 14 | "@typescript-eslint/no-namespace": "off", 15 | }, 16 | overrides: [ 17 | { 18 | files: ["*.svelte"], 19 | processor: "svelte3/svelte3", 20 | }, 21 | ], 22 | settings: { 23 | "svelte3/typescript": true, 24 | "svelte3/ignore-styles": ({ lang }) => { 25 | return lang === "scss"; 26 | }, 27 | }, 28 | }; 29 | 30 | // eslint-disable-next-line no-undef 31 | module.exports = config; 32 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Lint & Build 2 | 3 | on: 4 | - push 5 | - pull_request 6 | 7 | jobs: 8 | lint_and_build: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v3 12 | - uses: actions/cache@v3 13 | with: 14 | path: ~/.pnpm-store 15 | key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} 16 | restore-keys: | 17 | ${{ runner.os }}- 18 | - uses: pnpm/action-setup@v2.2.4 19 | with: 20 | version: latest 21 | run_install: true 22 | - run: pnpm lint 23 | - run: pnpm build-all:ci 24 | -------------------------------------------------------------------------------- /.github/workflows/gh-pages.yml: -------------------------------------------------------------------------------- 1 | name: GitHub Pages 2 | 3 | on: 4 | push: 5 | branches: 6 | - tio.run 7 | workflow_dispatch: 8 | 9 | jobs: 10 | deploy: 11 | runs-on: ubuntu-latest 12 | environment: github-pages 13 | env: 14 | VITE_APPID: ${{ secrets.VITE_APPID }} 15 | VITE_ROOM_UUID: ${{ secrets.VITE_ROOM_UUID }} 16 | VITE_ROOM_TOKEN: ${{ secrets.VITE_ROOM_TOKEN }} 17 | VITE_JUDGE0_KEY: ${{ secrets.VITE_JUDGE0_KEY }} 18 | steps: 19 | - uses: actions/checkout@v2 20 | - uses: actions/cache@v2 21 | with: 22 | path: ~/.pnpm-store 23 | key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} 24 | restore-keys: | 25 | ${{ runner.os }}- 26 | - uses: pnpm/action-setup@v2.2.4 27 | with: 28 | version: latest 29 | run_install: true 30 | - run: pnpm lint 31 | - run: pnpm build-all 32 | - run: pnpm -F playground build:ci 33 | - uses: peaceiris/actions-gh-pages@v3 34 | with: 35 | github_token: ${{ secrets.GITHUB_TOKEN }} 36 | publish_dir: ./packages/playground/dist 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | .eslintcache 4 | *.local 5 | .idea 6 | .DS_Store 7 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx --no -- commitlint --edit "" 5 | -------------------------------------------------------------------------------- /.pnpmfile.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 3 | module.exports = { 4 | hooks: { 5 | readPackage(pkg) { 6 | if (pkg.name === "rollup-plugin-peer-deps-external" && pkg.peerDependencies) { 7 | // vite manages rollup 8 | delete pkg.peerDependencies.rollup; 9 | } 10 | return pkg; 11 | }, 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | pnpm-lock.yaml 2 | packages/**/dist/ 3 | cspell.json 4 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "es5", 3 | "tabWidth": 2, 4 | "semi": true, 5 | "singleQuote": false, 6 | "endOfLine": "auto", 7 | "arrowParens": "avoid", 8 | "printWidth": 100 9 | } 10 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "prettier.enable": true, 3 | "eslint.enable": true, 4 | "editor.tabSize": 2, 5 | "editor.formatOnSave": true, 6 | "editor.defaultFormatter": "esbenp.prettier-vscode", 7 | "svelte.enable-ts-plugin": true, 8 | "editor.codeActionsOnSave": { 9 | "source.fixAll": true, 10 | "source.addMissingImports": true 11 | }, 12 | "eslint.validate": ["javascript", "javascriptreact", "html", "vue", "svelte"], 13 | "typescript.tsdk": "node_modules/typescript/lib", 14 | "[html]": { 15 | "editor.formatOnSave": true, 16 | "editor.defaultFormatter": "esbenp.prettier-vscode" 17 | }, 18 | "[css]": { 19 | "editor.formatOnSave": true, 20 | "editor.defaultFormatter": "esbenp.prettier-vscode" 21 | }, 22 | "[scss]": { 23 | "editor.formatOnSave": true, 24 | "editor.defaultFormatter": "esbenp.prettier-vscode" 25 | }, 26 | "[json]": { 27 | "editor.formatOnSave": true, 28 | "editor.defaultFormatter": "esbenp.prettier-vscode" 29 | }, 30 | "[javascript]": { 31 | "editor.formatOnSave": true, 32 | "editor.defaultFormatter": "esbenp.prettier-vscode" 33 | }, 34 | "[svelte]": { 35 | "editor.formatOnSave": true, 36 | "editor.defaultFormatter": "svelte.svelte-vscode" 37 | }, 38 | "[typescript]": { 39 | "editor.formatOnSave": true, 40 | "editor.defaultFormatter": "esbenp.prettier-vscode" 41 | }, 42 | "[typescriptreact]": { 43 | "editor.formatOnSave": true, 44 | "editor.defaultFormatter": "esbenp.prettier-vscode" 45 | }, 46 | "[markdown]": { 47 | "editor.formatOnSave": true, 48 | "editor.defaultFormatter": "esbenp.prettier-vscode" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 netless 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-var-requires */ 2 | /* eslint-env node */ 3 | 4 | const path = require("path"); 5 | const fs = require("fs"); 6 | 7 | module.exports = { 8 | extends: ["@commitlint/config-conventional"], 9 | rules: { 10 | "scope-enum": [ 11 | 2, 12 | "always", 13 | [ 14 | ...fs.readdirSync(path.join(__dirname, "packages")).map(name => name.replace(/^app-/, "")), 15 | "deployment", 16 | "env", 17 | "i18n", 18 | "version", 19 | "scripts", 20 | "readme", 21 | ], 22 | ], 23 | }, 24 | }; 25 | -------------------------------------------------------------------------------- /cspell.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "en", 3 | "words": [ 4 | "Akko", 5 | "allowfullscreen", 6 | "allowtransparency", 7 | "antd", 8 | "antv", 9 | "autoplay", 10 | "autorun", 11 | "Azkaban", 12 | "blockly", 13 | "canplay", 14 | "clsx", 15 | "courseware", 16 | "crossorigin", 17 | "displayer", 18 | "Emittery", 19 | "esbuild", 20 | "fittoscreen", 21 | "fontscssurl", 22 | "fullscreen", 23 | "geogebra", 24 | "Geos", 25 | "gomoku", 26 | "iife", 27 | "isequal", 28 | "katex", 29 | "lazyload", 30 | "listcontents", 31 | "Magix", 32 | "mindmap", 33 | "minheight", 34 | "minwidth", 35 | "mpegurl", 36 | "Multiuser", 37 | "Mutex", 38 | "NETLESSROOM", 39 | "Pagenum", 40 | "pannable", 41 | "plyr", 42 | "pnpm", 43 | "preact", 44 | "Quan", 45 | "randomcolor", 46 | "Replayable", 47 | "scroller", 48 | "Sider", 49 | "submenu", 50 | "submenus", 51 | "sveltejs", 52 | "Tele", 53 | "telebox", 54 | "tubeid", 55 | "ungroup", 56 | "unlisten", 57 | "userid", 58 | "vite", 59 | "Xcoord", 60 | "xflow", 61 | "xscale", 62 | "Ycoord", 63 | "youtu", 64 | "yscale", 65 | "Zcoord", 66 | "zscale" 67 | ], 68 | "flagWords": ["fuck", "bitch", "asshole", "bullshit", "crap", "suck", "wtf"], 69 | "dictionaries": [ 70 | "softwareTerms", 71 | "typescript", 72 | "node", 73 | "html", 74 | "css", 75 | "bash", 76 | "fonts", 77 | "filetypes", 78 | "npm", 79 | "en_US" 80 | ], 81 | "ignorePaths": [ 82 | "**/coverage/**", 83 | "**/node_modules/**", 84 | "**/dist/**", 85 | "packages/flat-components/build/**", 86 | "packages/flat-components/storybook-static/**", 87 | "desktop/main-app/release/**", 88 | "desktop/main-app/static/**", 89 | "cspell.json", 90 | "pnpm-lock.yaml", 91 | "CHANGELOG.md" 92 | ] 93 | } 94 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "netless-app-monorepo", 3 | "private": true, 4 | "devDependencies": { 5 | "@commitlint/cli": "^16.3.0", 6 | "@commitlint/config-conventional": "^16.2.4", 7 | "@hyrious/esbuild-plugin-svelte": "^0.1.7", 8 | "@netless/window-manager": "1.0.0-canary.69", 9 | "@sveltejs/vite-plugin-svelte": "2.0.2", 10 | "@tsconfig/svelte": "^3.0.0", 11 | "@types/randomcolor": "^0.5.6", 12 | "@types/rollup-plugin-peer-deps-external": "^2.2.1", 13 | "@typescript-eslint/eslint-plugin": "^5.46.0", 14 | "@typescript-eslint/parser": "^5.46.0", 15 | "autoprefixer": "^10.4.8", 16 | "cross-env": "^7.0.3", 17 | "esbuild": "^0.16.11", 18 | "eslint": "^8.29.0", 19 | "eslint-config-prettier": "^8.5.0", 20 | "eslint-plugin-svelte3": "^4.0.0", 21 | "husky": "^7.0.4", 22 | "postcss": "^8.4.14", 23 | "postcss-load-config": "^4.0.1", 24 | "prettier": "^2.8.1", 25 | "prettier-plugin-svelte": "^2.9.0", 26 | "rimraf": "^3.0.2", 27 | "rollup-plugin-exclude-dependencies-from-bundle": "^1.1.22", 28 | "rollup-plugin-peer-deps-external": "^2.2.4", 29 | "sass": "^1.53.0", 30 | "svelte": "^3.54.0", 31 | "tailwindcss": "^3.1.7", 32 | "typescript": "^4.9.4", 33 | "typings": "workspace:0.1.0", 34 | "vite": "^4.0.3", 35 | "white-web-sdk": "2.16.48" 36 | }, 37 | "scripts": { 38 | "create-app": "node ./packages/create-app", 39 | "prettier": "prettier --write .", 40 | "lint": "eslint --ext .ts,.tsx,.svelte . && prettier --check .", 41 | "preinstall": "npx only-allow pnpm", 42 | "build-all": "pnpm -r build", 43 | "build-all:dev": "pnpm -r build:dev", 44 | "build-all:ci": "pnpm --aggregate-output -r build:dev", 45 | "dev": "pnpm -F playground dev", 46 | "start": "pnpm -F playground dev" 47 | }, 48 | "pnpm": { 49 | "peerDependencyRules": { 50 | "ignoreMissing": [ 51 | "@babel/core", 52 | "@netless/window-manager", 53 | "react", 54 | "react-dom", 55 | "rollup", 56 | "vite" 57 | ] 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /packages/app-browser/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "@netless/app-browser", 4 | "version": "0.0.1", 5 | "main": "dist/main.js", 6 | "module": "dist/main.mjs", 7 | "types": "src/index.ts", 8 | "scripts": { 9 | "types": "cross-env NODE_ENV=production tsc --declaration --emitDeclarationOnly --outDir dist", 10 | "build": "vite build && npm run types", 11 | "build:dev": "vite build --mode development && npm run types", 12 | "cleanup": "rimraf ./dist" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/app-browser/playground.ts: -------------------------------------------------------------------------------- 1 | import type { PlaygroundConfig } from "../playground/typings"; 2 | import type { Attributes } from "./src"; 3 | 4 | const options: PlaygroundConfig = { 5 | kind: "Browser", 6 | src: () => import("./src"), 7 | options: { 8 | title: "Browser", 9 | }, 10 | attributes: { 11 | url: "https://example.org/", 12 | }, 13 | }; 14 | 15 | export default options; 16 | -------------------------------------------------------------------------------- /packages/app-browser/src/browser.svelte: -------------------------------------------------------------------------------- 1 | 20 | 21 |
22 |
23 | 28 | {status} 29 | 30 | ev.key === "Enter" && go()} 36 | /> 37 | 38 |
39 |