diff --git a/README.md b/README.md index 14c9f83..e29ccb9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +--- +title: Vision +--- + # SHIFTY - Vision A new and intuitive way of controlling intelligent devices developed from first principles for the event industry. diff --git a/package-lock.json b/package-lock.json index 0cbb78f..8db3ee4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,13 +17,14 @@ "fast-xml-parser": "^4.2.7", "fetch-cookie": "^2.1.0", "gdtf-types": "^1.0.0", + "github-markdown-css": "^5.2.0", "json-schema-to-typescript": "^13.0.2", "jszip": "^3.10.1", "three": "^0.155.0", "typescript-json-schema": "^0.60.0" }, "devDependencies": { - "@mxssfd/typedoc-theme": "^1.1.2", + "@mxssfd/typedoc-theme": "^1.1.3", "@playwright/test": "^1.28.1", "@sveltejs/adapter-auto": "^2.0.0", "@sveltejs/adapter-node": "^1.3.1", @@ -38,6 +39,7 @@ "eslint": "^8.28.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-svelte": "^2.30.0", + "mdsvex": "^0.11.0", "nodemon": "^3.0.1", "polka": "^0.5.2", "prettier": "^2.8.0", @@ -46,7 +48,7 @@ "svelte-check": "^3.4.3", "tslib": "^2.4.1", "tsx": "^3.12.7", - "typedoc": "^0.24.8", + "typedoc": "^0.25.1", "typescript": "^5.0.0", "vite": "^4.4.2", "vitest": "^0.32.2" @@ -401,15 +403,15 @@ "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==" }, "node_modules/@mxssfd/typedoc-theme": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@mxssfd/typedoc-theme/-/typedoc-theme-1.1.2.tgz", - "integrity": "sha512-Q/9Z+sff8ey92PaB7bnsGOfyNa85vTjyofO8EOH8KwEdfGnV4lGXwLFt4AUth7CCqYplqI9q4JxHNt869mlEcw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@mxssfd/typedoc-theme/-/typedoc-theme-1.1.3.tgz", + "integrity": "sha512-/yP5rqhvibMpzXpmw0YLLRCpoj3uVWWlwyJseZXzGxTfiA6/fd1uubUqNoQAi2U19atMDonq8mQc+hlVctrX4g==", "dev": true, "engines": { "node": ">= 14" }, "peerDependencies": { - "typedoc": "^0.24.8" + "typedoc": "^0.25.1" } }, "node_modules/@nodelib/fs.scandir": { @@ -985,6 +987,12 @@ "integrity": "sha512-XTpWPg/bsGt2oHRmNFfq6kjXDJgeX14pPVFq/PutOe83OFiwrSNP9pV0V2j5O+L/r2XiXRlOZPJtyaOAX5fCBQ==", "dev": true }, + "node_modules/@types/unist": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.7.tgz", + "integrity": "sha512-cputDpIbFgLUaGQn6Vqg3/YsJwxUwHLO13v3i5ouxT4lat0khip9AEWxtERujXV9wxIB1EyF97BSJFt6vpdI8g==", + "dev": true + }, "node_modules/@types/webxr": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/@types/webxr/-/webxr-0.5.4.tgz", @@ -2926,6 +2934,14 @@ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, + "node_modules/github-markdown-css": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/github-markdown-css/-/github-markdown-css-5.2.0.tgz", + "integrity": "sha512-hq5RaCInSUZ48bImOZpkppW2/MT44StRgsbsZ8YA4vJFwLKB/Vo3k7R2t+pUGqO+ThG0QDMi96TewV/B3vyItg==", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -3638,6 +3654,21 @@ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==" }, + "node_modules/mdsvex": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/mdsvex/-/mdsvex-0.11.0.tgz", + "integrity": "sha512-gJF1s0N2nCmdxcKn8HDn0LKrN8poStqAicp6bBcsKFd/zkUBGLP5e7vnxu+g0pjBbDFOscUyI1mtHz+YK2TCDw==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.3", + "prism-svelte": "^0.4.7", + "prismjs": "^1.17.1", + "vfile-message": "^2.0.4" + }, + "peerDependencies": { + "svelte": ">=3 <5" + } + }, "node_modules/memoizee": { "version": "0.4.15", "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", @@ -4363,6 +4394,21 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/prism-svelte": { + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/prism-svelte/-/prism-svelte-0.4.7.tgz", + "integrity": "sha512-yABh19CYbM24V7aS7TuPYRNMqthxwbvx6FF/Rw920YbyBWO3tnyPIqRMgHuSVsLmuHkkBS1Akyof463FVdkeDQ==", + "dev": true + }, + "node_modules/prismjs": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", + "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -5697,24 +5743,24 @@ } }, "node_modules/typedoc": { - "version": "0.24.8", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.24.8.tgz", - "integrity": "sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w==", + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.1.tgz", + "integrity": "sha512-c2ye3YUtGIadxN2O6YwPEXgrZcvhlZ6HlhWZ8jQRNzwLPn2ylhdGqdR8HbyDRyALP8J6lmSANILCkkIdNPFxqA==", "dev": true, "dependencies": { "lunr": "^2.3.9", "marked": "^4.3.0", - "minimatch": "^9.0.0", + "minimatch": "^9.0.3", "shiki": "^0.14.1" }, "bin": { "typedoc": "bin/typedoc" }, "engines": { - "node": ">= 14.14" + "node": ">= 16" }, "peerDependencies": { - "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x" + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x" } }, "node_modules/typedoc/node_modules/brace-expansion": { @@ -5819,6 +5865,19 @@ "node": ">=14.0" } }, + "node_modules/unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -5882,6 +5941,20 @@ "node": ">= 0.8" } }, + "node_modules/vfile-message": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", + "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/vite": { "version": "4.4.9", "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", diff --git a/package.json b/package.json index 9b0d372..6938c27 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "test:unit": "vitest" }, "devDependencies": { - "@mxssfd/typedoc-theme": "^1.1.2", + "@mxssfd/typedoc-theme": "^1.1.3", "@playwright/test": "^1.28.1", "@sveltejs/adapter-auto": "^2.0.0", "@sveltejs/adapter-node": "^1.3.1", @@ -41,6 +41,7 @@ "eslint": "^8.28.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-svelte": "^2.30.0", + "mdsvex": "^0.11.0", "nodemon": "^3.0.1", "polka": "^0.5.2", "prettier": "^2.8.0", @@ -49,7 +50,7 @@ "svelte-check": "^3.4.3", "tslib": "^2.4.1", "tsx": "^3.12.7", - "typedoc": "^0.24.8", + "typedoc": "^0.25.1", "typescript": "^5.0.0", "vite": "^4.4.2", "vitest": "^0.32.2" @@ -63,6 +64,7 @@ "fast-xml-parser": "^4.2.7", "fetch-cookie": "^2.1.0", "gdtf-types": "^1.0.0", + "github-markdown-css": "^5.2.0", "json-schema-to-typescript": "^13.0.2", "jszip": "^3.10.1", "three": "^0.155.0", diff --git a/src/routes/+page.md b/src/routes/+page.md new file mode 100644 index 0000000..d67bd1c --- /dev/null +++ b/src/routes/+page.md @@ -0,0 +1,5 @@ + + + diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte deleted file mode 100644 index ad2a101..0000000 --- a/src/routes/+page.svelte +++ /dev/null @@ -1,2 +0,0 @@ -

Welcome to SvelteKit

-

Visit /webSocketDemo to see if the WebSocket Server works

diff --git a/src/routes/md.css b/src/routes/md.css new file mode 100644 index 0000000..07869fe --- /dev/null +++ b/src/routes/md.css @@ -0,0 +1,3 @@ +body { + background-color: #0d1117; +} diff --git a/src/routes/md.svelte b/src/routes/md.svelte new file mode 100644 index 0000000..b73e8bd --- /dev/null +++ b/src/routes/md.svelte @@ -0,0 +1,31 @@ + + + + {title} | SHIFTY + + +
+ +
+ + diff --git a/src/routes/src/routes/visualizer/+page.md b/src/routes/src/routes/visualizer/+page.md new file mode 100644 index 0000000..6a62803 --- /dev/null +++ b/src/routes/src/routes/visualizer/+page.md @@ -0,0 +1,5 @@ + + + diff --git a/src/routes/src/routes/visualizer/remote/+page.md b/src/routes/src/routes/visualizer/remote/+page.md new file mode 100644 index 0000000..f012acf --- /dev/null +++ b/src/routes/src/routes/visualizer/remote/+page.md @@ -0,0 +1,5 @@ + + + diff --git a/src/routes/src/routes/webSocketDemo/+page.md b/src/routes/src/routes/webSocketDemo/+page.md new file mode 100644 index 0000000..e3caede --- /dev/null +++ b/src/routes/src/routes/webSocketDemo/+page.md @@ -0,0 +1,5 @@ + + + diff --git a/src/routes/visualizer/README.md b/src/routes/visualizer/README.md index 82421eb..930ab93 100644 --- a/src/routes/visualizer/README.md +++ b/src/routes/visualizer/README.md @@ -1,5 +1,11 @@ +--- +title: Visualizer +--- + # Visualizer This proof-of-concept shows an environment ([World](https://oshifty.github.io/vision/classes/World.html)) build with [three.js](https://threejs.org). Upon load it fetches a fixture model from GDTF Share and loads it into the environment to be visualized. The poc currently supports Pan / Tilt Attributes only and a very limited selection of fixtures but it can be extended easily in the future. It comes with a remote that is implemented over [here](/src/routes/visualizer/remote). +[dev server link](/visualizer) + ![Robe Robin Tetra X inside of the visualizer](./poc-tetrax.png) diff --git a/src/routes/visualizer/remote/README.md b/src/routes/visualizer/remote/README.md index 8ad23e7..9a3f112 100644 --- a/src/routes/visualizer/remote/README.md +++ b/src/routes/visualizer/remote/README.md @@ -1,5 +1,11 @@ +--- +title: Remote +--- + # Remote This poc shows how a minimum implementation of a remote could look like. For more information check out [Visualizer](/src/routes/visualizer). -![creenshot of the PoC](./poc-remote.png) +[dev server link](/visualizer/remote) + +![Screenshot of the PoC](./poc-remote.png) diff --git a/src/routes/webSocketDemo/README.md b/src/routes/webSocketDemo/README.md index 408f6d8..bf189b5 100644 --- a/src/routes/webSocketDemo/README.md +++ b/src/routes/webSocketDemo/README.md @@ -1,5 +1,11 @@ +--- +title: WebSocket Demo +--- + # WebSocket Demo This is a minimal example of establishing a WebSocket connection to the server the page is retrieved from. Using Socket.IO it inititates the connection in `polling` mode and then upgrades it to `websocket` or even `webtransport` when there will be support for it in the future. Upon connection the WebSocket Server greets the client with a warm and welcoming `Hello, World 👋` message in the terminal and states the connection status as `Connected`. + +[dev server link](/webSocketDemo) diff --git a/svelte.config.js b/svelte.config.js index 2214c60..724af39 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,11 +1,25 @@ import adapter from '@sveltejs/adapter-node'; import { vitePreprocess } from '@sveltejs/kit/vite'; +import { mdsvex } from 'mdsvex'; +import { join, resolve } from 'path'; +import { fileURLToPath } from 'url'; + +const dirname = resolve(fileURLToPath(import.meta.url), '../'); /** @type {import('@sveltejs/kit').Config} */ const config = { + extensions: ['.svelte', '.svx', '.md'], // Consult https://kit.svelte.dev/docs/integrations#preprocessors // for more information about preprocessors - preprocess: vitePreprocess(), + preprocess: [ + vitePreprocess({}), + mdsvex({ + extensions: ['.svx', '.md'], + layout: { + _: join(dirname, './src/routes/md.svelte') + } + }) + ], kit: { // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. diff --git a/tests/test.ts b/tests/test.ts index 5816be4..5b1d561 100644 --- a/tests/test.ts +++ b/tests/test.ts @@ -2,5 +2,5 @@ import { expect, test } from '@playwright/test'; test('index page has expected h1', async ({ page }) => { await page.goto('/'); - await expect(page.getByRole('heading', { name: 'Welcome to SvelteKit' })).toBeVisible(); + await expect(page.getByRole('heading', { name: 'SHIFTY - Vision' })).toBeVisible(); }); diff --git a/typedoc.json b/typedoc.json index 15f237b..cf40aed 100644 --- a/typedoc.json +++ b/typedoc.json @@ -5,6 +5,7 @@ "tsconfig": "tsconfig.docs.json", // "excludePrivate": true, "plugin": ["@mxssfd/typedoc-theme"], + "stripYamlFrontmatter": true, "theme": "my-theme", "name": "Home", "visibilityFilters": { diff --git a/vite.config.ts b/vite.config.ts index dd03cbe..72c0dfe 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -15,6 +15,9 @@ export default defineConfig({ server: { watch: { ignored: ['**/public/**'] + }, + fs: { + allow: ['./README.md'] } }, plugins: [sveltekit(), webSocketServer],