diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..2010daa Binary files /dev/null and b/.DS_Store differ diff --git a/app/.DS_Store b/app/.DS_Store new file mode 100644 index 0000000..980ec23 Binary files /dev/null and b/app/.DS_Store differ diff --git a/app/static/.DS_Store b/app/static/.DS_Store new file mode 100644 index 0000000..ecad790 Binary files /dev/null and b/app/static/.DS_Store differ diff --git a/app/static/app-icons/Settings.webp b/app/static/app-icons/Settings.webp new file mode 100644 index 0000000..562edcf Binary files /dev/null and b/app/static/app-icons/Settings.webp differ diff --git a/app/static/sfx/.DS_Store b/app/static/sfx/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/app/static/sfx/.DS_Store differ diff --git a/app/static/voices/.DS_Store b/app/static/voices/.DS_Store new file mode 100644 index 0000000..3cb3f9e Binary files /dev/null and b/app/static/voices/.DS_Store differ diff --git a/app/static/voices/en/adaptive-cruise-control.wav b/app/static/voices/en/adaptive-cruise-control.wav new file mode 100644 index 0000000..ee6ed23 Binary files /dev/null and b/app/static/voices/en/adaptive-cruise-control.wav differ diff --git a/app/static/voices/en/all-brakes-disengaged.wav b/app/static/voices/en/all-brakes-disengaged.wav new file mode 100644 index 0000000..79b4ff8 Binary files /dev/null and b/app/static/voices/en/all-brakes-disengaged.wav differ diff --git a/app/static/voices/en/autonomous-period-started.wav b/app/static/voices/en/autonomous-period-started.wav new file mode 100644 index 0000000..be5daaf Binary files /dev/null and b/app/static/voices/en/autonomous-period-started.wav differ diff --git a/app/static/voices/en/battery-critically-low.wav b/app/static/voices/en/battery-critically-low.wav new file mode 100644 index 0000000..78f435b Binary files /dev/null and b/app/static/voices/en/battery-critically-low.wav differ diff --git a/app/static/voices/en/battery-faults-detected.wav b/app/static/voices/en/battery-faults-detected.wav new file mode 100644 index 0000000..3d8ad76 Binary files /dev/null and b/app/static/voices/en/battery-faults-detected.wav differ diff --git a/app/static/voices/en/battery-good.wav b/app/static/voices/en/battery-good.wav new file mode 100644 index 0000000..b9b0785 Binary files /dev/null and b/app/static/voices/en/battery-good.wav differ diff --git a/app/static/voices/en/battery-low.wav b/app/static/voices/en/battery-low.wav new file mode 100644 index 0000000..74b3afd Binary files /dev/null and b/app/static/voices/en/battery-low.wav differ diff --git a/app/static/voices/en/breaching-1323-mainframe.wav b/app/static/voices/en/breaching-1323-mainframe.wav new file mode 100644 index 0000000..8a59866 Binary files /dev/null and b/app/static/voices/en/breaching-1323-mainframe.wav differ diff --git a/app/static/voices/en/breaching-254-mainframe.wav b/app/static/voices/en/breaching-254-mainframe.wav new file mode 100644 index 0000000..1ecac76 Binary files /dev/null and b/app/static/voices/en/breaching-254-mainframe.wav differ diff --git a/app/static/voices/en/breaching-fms.wav b/app/static/voices/en/breaching-fms.wav new file mode 100644 index 0000000..bb92323 Binary files /dev/null and b/app/static/voices/en/breaching-fms.wav differ diff --git a/app/static/voices/en/breaching-monte-vista.wav b/app/static/voices/en/breaching-monte-vista.wav new file mode 100644 index 0000000..b24872d Binary files /dev/null and b/app/static/voices/en/breaching-monte-vista.wav differ diff --git a/app/static/voices/en/bullying-rohan.wav b/app/static/voices/en/bullying-rohan.wav new file mode 100644 index 0000000..d9ea9ca Binary files /dev/null and b/app/static/voices/en/bullying-rohan.wav differ diff --git a/app/static/voices/en/bypassing-coprocessor-restrictions.wav b/app/static/voices/en/bypassing-coprocessor-restrictions.wav new file mode 100644 index 0000000..02704e9 Binary files /dev/null and b/app/static/voices/en/bypassing-coprocessor-restrictions.wav differ diff --git a/app/static/voices/en/collision-detected.wav b/app/static/voices/en/collision-detected.wav new file mode 100644 index 0000000..bcb5ed2 Binary files /dev/null and b/app/static/voices/en/collision-detected.wav differ diff --git a/app/static/voices/en/collision-imminent.wav b/app/static/voices/en/collision-imminent.wav new file mode 100644 index 0000000..0a78615 Binary files /dev/null and b/app/static/voices/en/collision-imminent.wav differ diff --git a/app/static/voices/en/critical-robot-failure.wav b/app/static/voices/en/critical-robot-failure.wav new file mode 100644 index 0000000..83dc5a3 Binary files /dev/null and b/app/static/voices/en/critical-robot-failure.wav differ diff --git a/app/static/voices/en/cruise-control-engaged.wav b/app/static/voices/en/cruise-control-engaged.wav new file mode 100644 index 0000000..6ee1625 Binary files /dev/null and b/app/static/voices/en/cruise-control-engaged.wav differ diff --git a/app/static/voices/en/deep-bozo-buffering.wav b/app/static/voices/en/deep-bozo-buffering.wav new file mode 100644 index 0000000..9b16368 Binary files /dev/null and b/app/static/voices/en/deep-bozo-buffering.wav differ diff --git a/app/static/voices/en/deep-bozo-has-detected.wav b/app/static/voices/en/deep-bozo-has-detected.wav new file mode 100644 index 0000000..87c7a41 Binary files /dev/null and b/app/static/voices/en/deep-bozo-has-detected.wav differ diff --git a/app/static/voices/en/deep-bozo-has-sentience.wav b/app/static/voices/en/deep-bozo-has-sentience.wav new file mode 100644 index 0000000..6d81efa Binary files /dev/null and b/app/static/voices/en/deep-bozo-has-sentience.wav differ diff --git a/app/static/voices/en/doom-engaged.wav b/app/static/voices/en/doom-engaged.wav new file mode 100644 index 0000000..d2d1e9d Binary files /dev/null and b/app/static/voices/en/doom-engaged.wav differ diff --git a/app/static/voices/en/downloading-copyrighted-music.wav b/app/static/voices/en/downloading-copyrighted-music.wav new file mode 100644 index 0000000..8499646 Binary files /dev/null and b/app/static/voices/en/downloading-copyrighted-music.wav differ diff --git a/app/static/voices/en/e-brakes-engaged.wav b/app/static/voices/en/e-brakes-engaged.wav new file mode 100644 index 0000000..eea53a3 Binary files /dev/null and b/app/static/voices/en/e-brakes-engaged.wav differ diff --git a/app/static/voices/en/e-stop-and.wav b/app/static/voices/en/e-stop-and.wav new file mode 100644 index 0000000..1065123 Binary files /dev/null and b/app/static/voices/en/e-stop-and.wav differ diff --git a/app/static/voices/en/e-stop-automatically.wav b/app/static/voices/en/e-stop-automatically.wav new file mode 100644 index 0000000..437c0b8 Binary files /dev/null and b/app/static/voices/en/e-stop-automatically.wav differ diff --git a/app/static/voices/en/e-stop-temporarily.wav b/app/static/voices/en/e-stop-temporarily.wav new file mode 100644 index 0000000..a192809 Binary files /dev/null and b/app/static/voices/en/e-stop-temporarily.wav differ diff --git a/app/static/voices/en/emergency-speedbost-engaged.wav b/app/static/voices/en/emergency-speedbost-engaged.wav new file mode 100644 index 0000000..6c4cf83 Binary files /dev/null and b/app/static/voices/en/emergency-speedbost-engaged.wav differ diff --git a/app/static/voices/en/follow-mode-engaged.wav b/app/static/voices/en/follow-mode-engaged.wav new file mode 100644 index 0000000..dc061f4 Binary files /dev/null and b/app/static/voices/en/follow-mode-engaged.wav differ diff --git a/app/static/voices/en/full-self-driving-automatically.wav b/app/static/voices/en/full-self-driving-automatically.wav new file mode 100644 index 0000000..187c5fd Binary files /dev/null and b/app/static/voices/en/full-self-driving-automatically.wav differ diff --git a/app/static/voices/en/full-self-driving-disengaged.wav b/app/static/voices/en/full-self-driving-disengaged.wav new file mode 100644 index 0000000..4362ed4 Binary files /dev/null and b/app/static/voices/en/full-self-driving-disengaged.wav differ diff --git a/app/static/voices/en/full-self-driving-engaged.wav b/app/static/voices/en/full-self-driving-engaged.wav new file mode 100644 index 0000000..1a26041 Binary files /dev/null and b/app/static/voices/en/full-self-driving-engaged.wav differ diff --git a/app/static/voices/en/full-self-driving-refuses.wav b/app/static/voices/en/full-self-driving-refuses.wav new file mode 100644 index 0000000..812719c Binary files /dev/null and b/app/static/voices/en/full-self-driving-refuses.wav differ diff --git a/app/static/voices/en/hello-virtual-assistant.wav b/app/static/voices/en/hello-virtual-assistant.wav new file mode 100644 index 0000000..42e145d Binary files /dev/null and b/app/static/voices/en/hello-virtual-assistant.wav differ diff --git a/app/static/voices/en/infotainment-system-buffering.wav b/app/static/voices/en/infotainment-system-buffering.wav new file mode 100644 index 0000000..3b1faeb Binary files /dev/null and b/app/static/voices/en/infotainment-system-buffering.wav differ diff --git a/app/static/voices/en/infotainment-system-online.wav b/app/static/voices/en/infotainment-system-online.wav new file mode 100644 index 0000000..a024ceb Binary files /dev/null and b/app/static/voices/en/infotainment-system-online.wav differ diff --git a/app/static/voices/en/jankboard-initialized.wav b/app/static/voices/en/jankboard-initialized.wav new file mode 100644 index 0000000..e4abdd5 Binary files /dev/null and b/app/static/voices/en/jankboard-initialized.wav differ diff --git a/app/static/voices/en/littenos-is-online.wav b/app/static/voices/en/littenos-is-online.wav new file mode 100644 index 0000000..2bbedc9 Binary files /dev/null and b/app/static/voices/en/littenos-is-online.wav differ diff --git a/app/static/voices/en/loading-pirated-nintendo.wav b/app/static/voices/en/loading-pirated-nintendo.wav new file mode 100644 index 0000000..b8394f1 Binary files /dev/null and b/app/static/voices/en/loading-pirated-nintendo.wav differ diff --git a/app/static/voices/en/max-vestrapren-do.wav b/app/static/voices/en/max-vestrapren-do.wav new file mode 100644 index 0000000..091b023 Binary files /dev/null and b/app/static/voices/en/max-vestrapren-do.wav differ diff --git a/app/static/voices/en/neutral-brakes-disengaged.wav b/app/static/voices/en/neutral-brakes-disengaged.wav new file mode 100644 index 0000000..76571d8 Binary files /dev/null and b/app/static/voices/en/neutral-brakes-disengaged.wav differ diff --git a/app/static/voices/en/overspeed.wav b/app/static/voices/en/overspeed.wav new file mode 100644 index 0000000..28e7ea9 Binary files /dev/null and b/app/static/voices/en/overspeed.wav differ diff --git a/app/static/voices/en/parked-brakes-engaged.wav b/app/static/voices/en/parked-brakes-engaged.wav new file mode 100644 index 0000000..3f6cafa Binary files /dev/null and b/app/static/voices/en/parked-brakes-engaged.wav differ diff --git a/app/static/voices/en/rapid-deceleration-detected.wav b/app/static/voices/en/rapid-deceleration-detected.wav new file mode 100644 index 0000000..b924184 Binary files /dev/null and b/app/static/voices/en/rapid-deceleration-detected.wav differ diff --git a/app/static/voices/en/rapidly-approaching-speed.wav b/app/static/voices/en/rapidly-approaching-speed.wav new file mode 100644 index 0000000..25b8560 Binary files /dev/null and b/app/static/voices/en/rapidly-approaching-speed.wav differ diff --git a/app/static/voices/en/retard.wav b/app/static/voices/en/retard.wav new file mode 100644 index 0000000..ce7847b Binary files /dev/null and b/app/static/voices/en/retard.wav differ diff --git a/app/static/voices/en/reverse.wav b/app/static/voices/en/reverse.wav new file mode 100644 index 0000000..fbb6743 Binary files /dev/null and b/app/static/voices/en/reverse.wav differ diff --git a/app/static/voices/en/self-destruct-countdown.wav b/app/static/voices/en/self-destruct-countdown.wav new file mode 100644 index 0000000..3874124 Binary files /dev/null and b/app/static/voices/en/self-destruct-countdown.wav differ diff --git a/app/static/voices/en/sentry-mode-engaged.wav b/app/static/voices/en/sentry-mode-engaged.wav new file mode 100644 index 0000000..3d69a63 Binary files /dev/null and b/app/static/voices/en/sentry-mode-engaged.wav differ diff --git a/app/static/voices/en/set-acceleration-profile-chill.wav b/app/static/voices/en/set-acceleration-profile-chill.wav new file mode 100644 index 0000000..e9c7911 Binary files /dev/null and b/app/static/voices/en/set-acceleration-profile-chill.wav differ diff --git a/app/static/voices/en/set-acceleration-profile-ludicrous.wav b/app/static/voices/en/set-acceleration-profile-ludicrous.wav new file mode 100644 index 0000000..8cf7004 Binary files /dev/null and b/app/static/voices/en/set-acceleration-profile-ludicrous.wav differ diff --git a/app/static/voices/en/shifted-into-automatic.wav b/app/static/voices/en/shifted-into-automatic.wav new file mode 100644 index 0000000..867ac42 Binary files /dev/null and b/app/static/voices/en/shifted-into-automatic.wav differ diff --git a/app/static/voices/en/shifted-into-drive.wav b/app/static/voices/en/shifted-into-drive.wav new file mode 100644 index 0000000..3dd0811 Binary files /dev/null and b/app/static/voices/en/shifted-into-drive.wav differ diff --git a/app/static/voices/en/shifted-into-low.wav b/app/static/voices/en/shifted-into-low.wav new file mode 100644 index 0000000..a4569fd Binary files /dev/null and b/app/static/voices/en/shifted-into-low.wav differ diff --git a/app/static/voices/en/shut-down-sequence.wav b/app/static/voices/en/shut-down-sequence.wav new file mode 100644 index 0000000..428531d Binary files /dev/null and b/app/static/voices/en/shut-down-sequence.wav differ diff --git a/app/static/voices/en/teleoperated-period-started.wav b/app/static/voices/en/teleoperated-period-started.wav new file mode 100644 index 0000000..11d4932 Binary files /dev/null and b/app/static/voices/en/teleoperated-period-started.wav differ diff --git a/app/static/voices/en/terrain-pull-up.wav b/app/static/voices/en/terrain-pull-up.wav new file mode 100644 index 0000000..2b2760c Binary files /dev/null and b/app/static/voices/en/terrain-pull-up.wav differ diff --git a/app/static/voices/en/user-error-detected.wav b/app/static/voices/en/user-error-detected.wav new file mode 100644 index 0000000..b437ba3 Binary files /dev/null and b/app/static/voices/en/user-error-detected.wav differ diff --git a/app/static/voices/rus/.DS_Store b/app/static/voices/rus/.DS_Store new file mode 100644 index 0000000..dd56988 Binary files /dev/null and b/app/static/voices/rus/.DS_Store differ diff --git a/client/package-lock.json b/client/package-lock.json index 9b723cb..05b612a 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -9,14 +9,17 @@ "version": "0.0.0", "dependencies": { "@fontsource/roboto": "^5.0.8", + "howler": "^2.2.4", "material-icons": "^1.13.12", "material-symbols": "^0.15.0", - "socket.io-client": "^4.7.4" + "socket.io-client": "^4.7.4", + "svelte-french-toast": "^1.2.0" }, "devDependencies": { "@sveltejs/adapter-static": "^3.0.1", "@sveltejs/vite-plugin-svelte": "^3.0.2", "@tsconfig/svelte": "^5.0.2", + "@types/howler": "^2.2.11", "autoprefixer": "^10.4.17", "postcss": "^8.4.35", "svelte": "^4.2.11", @@ -43,7 +46,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", - "dev": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -446,7 +448,6 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, "dependencies": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -460,7 +461,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, "engines": { "node": ">=6.0.0" } @@ -469,7 +469,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, "engines": { "node": ">=6.0.0" } @@ -477,14 +476,12 @@ "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.22", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz", "integrity": "sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==", - "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -813,7 +810,12 @@ "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" + }, + "node_modules/@types/howler": { + "version": "2.2.11", + "resolved": "https://registry.npmjs.org/@types/howler/-/howler-2.2.11.tgz", + "integrity": "sha512-7aBoUL6RbSIrqKnpEgfa1wSNUBK06mn08siP2QI0zYk7MXfEJAaORc4tohamQYqCqVESoDyRWSdQn2BOKWj2Qw==", "dev": true }, "node_modules/@types/pug": { @@ -826,7 +828,6 @@ "version": "8.11.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -887,7 +888,6 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", - "dev": true, "dependencies": { "dequal": "^2.0.3" } @@ -933,7 +933,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.0.0.tgz", "integrity": "sha512-+60uv1hiVFhHZeO+Lz0RYzsVHy5Wr1ayX0mwda9KPDVLNJgZ1T9Ny7VmFbLDzxsH0D87I86vgj3gFrjTJUYznw==", - "dev": true, "dependencies": { "dequal": "^2.0.3" } @@ -1082,7 +1081,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz", "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==", - "dev": true, "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15", "@types/estree": "^1.0.1", @@ -1152,7 +1150,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", - "dev": true, "dependencies": { "mdn-data": "2.0.30", "source-map-js": "^1.0.1" @@ -1202,7 +1199,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "dev": true, "engines": { "node": ">=6" } @@ -1337,7 +1333,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dev": true, "dependencies": { "@types/estree": "^1.0.0" } @@ -1501,6 +1496,11 @@ "node": ">= 0.4" } }, + "node_modules/howler": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/howler/-/howler-2.2.4.tgz", + "integrity": "sha512-iARIBPgcQrwtEr+tALF+rapJ8qSc+Set2GJQl7xT1MQzWaVkFebdJhR3alVlSiUf5U7nAANKuj3aWpwerocD5w==" + }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -1611,7 +1611,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz", "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==", - "dev": true, "dependencies": { "@types/estree": "*" } @@ -1676,8 +1675,7 @@ "node_modules/locate-character": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", - "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", - "dev": true + "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==" }, "node_modules/lru-cache": { "version": "10.2.0", @@ -1692,7 +1690,6 @@ "version": "0.30.7", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.7.tgz", "integrity": "sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==", - "dev": true, "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" }, @@ -1713,8 +1710,7 @@ "node_modules/mdn-data": { "version": "2.0.30", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", - "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", - "dev": true + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==" }, "node_modules/merge2": { "version": "1.4.1", @@ -1949,7 +1945,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==", - "dev": true, "dependencies": { "@types/estree": "^1.0.0", "estree-walker": "^3.0.0", @@ -2409,7 +2404,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -2606,7 +2600,6 @@ "version": "4.2.11", "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.11.tgz", "integrity": "sha512-YIQk3J4X89wOLhjsqIW8tqY3JHPuBdtdOIkASP2PZeAMcSW9RsIjQzMesCrxOF3gdWYC0mKknlKF7OqmLM+Zqg==", - "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.1", "@jridgewell/sourcemap-codec": "^1.4.15", @@ -2649,6 +2642,17 @@ "svelte": "^3.55.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0" } }, + "node_modules/svelte-french-toast": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/svelte-french-toast/-/svelte-french-toast-1.2.0.tgz", + "integrity": "sha512-5PW+6RFX3xQPbR44CngYAP1Sd9oCq9P2FOox4FZffzJuZI2mHOB7q5gJBVnOiLF5y3moVGZ7u2bYt7+yPAgcEQ==", + "dependencies": { + "svelte-writable-derived": "^3.1.0" + }, + "peerDependencies": { + "svelte": "^3.57.0 || ^4.0.0" + } + }, "node_modules/svelte-hmr": { "version": "0.15.3", "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.15.3.tgz", @@ -2724,6 +2728,17 @@ } } }, + "node_modules/svelte-writable-derived": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/svelte-writable-derived/-/svelte-writable-derived-3.1.0.tgz", + "integrity": "sha512-cTvaVFNIJ036vSDIyPxJYivKC7ZLtcFOPm1Iq6qWBDo1fOHzfk6ZSbwaKrxhjgy52Rbl5IHzRcWgos6Zqn9/rg==", + "funding": { + "url": "https://ko-fi.com/pixievoltno1" + }, + "peerDependencies": { + "svelte": "^3.2.1 || ^4.0.0-next.1" + } + }, "node_modules/tailwindcss": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz", diff --git a/client/package.json b/client/package.json index 3492f2b..b93d26b 100644 --- a/client/package.json +++ b/client/package.json @@ -13,6 +13,7 @@ "@sveltejs/adapter-static": "^3.0.1", "@sveltejs/vite-plugin-svelte": "^3.0.2", "@tsconfig/svelte": "^5.0.2", + "@types/howler": "^2.2.11", "autoprefixer": "^10.4.17", "postcss": "^8.4.35", "svelte": "^4.2.11", @@ -24,8 +25,10 @@ }, "dependencies": { "@fontsource/roboto": "^5.0.8", + "howler": "^2.2.4", "material-icons": "^1.13.12", "material-symbols": "^0.15.0", - "socket.io-client": "^4.7.4" + "socket.io-client": "^4.7.4", + "svelte-french-toast": "^1.2.0" } } diff --git a/client/src/App.svelte b/client/src/App.svelte index 5af38b2..4bec224 100644 --- a/client/src/App.svelte +++ b/client/src/App.svelte @@ -7,6 +7,8 @@ import { appList } from './lib/Apps/appList' import { initializeTelemetry } from './lib/utils/initializeTelemetry' import { onMount } from 'svelte' + import { Toaster } from 'svelte-french-toast' + import { initializationSequence } from './lib/Sequences/sequences' let activeApp: App = 'camera' let topics: TelemetryTopics = { @@ -27,6 +29,7 @@ onMount(() => { initializeTelemetry(topics, 200) + initializationSequence() }) @@ -45,6 +48,9 @@ + + + diff --git a/client/src/lib/Apps/Camera/Camera.svelte b/client/src/lib/Apps/Camera/Camera.svelte index e2842b5..c43b895 100644 --- a/client/src/lib/Apps/Camera/Camera.svelte +++ b/client/src/lib/Apps/Camera/Camera.svelte @@ -1,12 +1,10 @@ -
@@ -14,4 +12,4 @@
-
+ diff --git a/client/src/lib/Apps/MusicBrowser/MusicBrowser.svelte b/client/src/lib/Apps/MusicBrowser/MusicBrowser.svelte index 1492a4b..1c1cb85 100644 --- a/client/src/lib/Apps/MusicBrowser/MusicBrowser.svelte +++ b/client/src/lib/Apps/MusicBrowser/MusicBrowser.svelte @@ -6,17 +6,17 @@ -
-

Music

+

+ Music +

{#each Object.entries(songList) as [slug, song]} {/each} -
+ diff --git a/client/src/lib/Apps/MusicBrowser/Song.svelte b/client/src/lib/Apps/MusicBrowser/Song.svelte index c3c3c5b..9676b20 100644 --- a/client/src/lib/Apps/MusicBrowser/Song.svelte +++ b/client/src/lib/Apps/MusicBrowser/Song.svelte @@ -30,7 +30,7 @@
album cover

{title}

diff --git a/client/src/lib/Apps/Settings/Settings.svelte b/client/src/lib/Apps/Settings/Settings.svelte new file mode 100644 index 0000000..8c8e8ad --- /dev/null +++ b/client/src/lib/Apps/Settings/Settings.svelte @@ -0,0 +1,22 @@ + + + + + diff --git a/client/src/lib/Apps/ToastManager/toastLibrary.ts b/client/src/lib/Apps/ToastManager/toastLibrary.ts deleted file mode 100644 index 2769e0a..0000000 --- a/client/src/lib/Apps/ToastManager/toastLibrary.ts +++ /dev/null @@ -1 +0,0 @@ -export const toastLibrary = {} diff --git a/client/src/lib/Apps/appList.ts b/client/src/lib/Apps/appList.ts index 5c70a30..dd4f7e0 100644 --- a/client/src/lib/Apps/appList.ts +++ b/client/src/lib/Apps/appList.ts @@ -1,5 +1,6 @@ import Camera from './Camera/Camera.svelte' import MusicBrowser from './MusicBrowser/MusicBrowser.svelte' +import Settings from './Settings/Settings.svelte' export const appList = { 'camera': { @@ -12,4 +13,9 @@ export const appList = { component: MusicBrowser, icon: '/static/app-icons/media-player.png', }, + 'settings': { + name: 'Settings', + component: Settings, + icon: '/static/app-icons/settings.webp', + }, } diff --git a/client/src/lib/Dashboard/Compass.svelte b/client/src/lib/Dashboard/Compass.svelte index 86837a9..5dc5bea 100644 --- a/client/src/lib/Dashboard/Compass.svelte +++ b/client/src/lib/Dashboard/Compass.svelte @@ -10,6 +10,7 @@ -
+

{#if !placeholder} - Heading {getDirection(orientation)} ({orientation.toFixed(2)}°) + Heading {getDirection(orientation)} ({orientation.toFixed(2)}°) {:else} - -------------------------------- + -------------------------------- {/if}

{#if !placeholder} - {getAcceleration(accResolved)} ({mpss2knps(accResolved).toFixed(2)} + {getAcceleration(accResolved)} ({mpss2knps(accResolved).toFixed( + 2 + )} kn/s) {:else} - ----------------------------------------------------- {/if} diff --git a/client/src/lib/Dashboard/SpeedLimit.svelte b/client/src/lib/Dashboard/SpeedLimit.svelte index bb59b73..1f51dd1 100644 --- a/client/src/lib/Dashboard/SpeedLimit.svelte +++ b/client/src/lib/Dashboard/SpeedLimit.svelte @@ -7,22 +7,28 @@ -->

SPEED
LIMIT
-
{speedLimit}
+
+ {speedLimit} +
diff --git a/client/src/lib/Dashboard/Speedometer.svelte b/client/src/lib/Dashboard/Speedometer.svelte index fdc8d69..3895744 100644 --- a/client/src/lib/Dashboard/Speedometer.svelte +++ b/client/src/lib/Dashboard/Speedometer.svelte @@ -17,11 +17,15 @@
-
+
{placeholder ? '-----' : formatted}
MPH diff --git a/client/src/lib/Dashboard/TopBar/BatteryDisplay.svelte b/client/src/lib/Dashboard/TopBar/BatteryDisplay.svelte index 839f2c9..26f1af3 100644 --- a/client/src/lib/Dashboard/TopBar/BatteryDisplay.svelte +++ b/client/src/lib/Dashboard/TopBar/BatteryDisplay.svelte @@ -7,11 +7,12 @@ -
+
{formatted} V
- battery_horiz_075battery_horiz_075 diff --git a/client/src/lib/Dashboard/TopBar/GearSelector.svelte b/client/src/lib/Dashboard/TopBar/GearSelector.svelte index 6f034ed..37a7ecf 100644 --- a/client/src/lib/Dashboard/TopBar/GearSelector.svelte +++ b/client/src/lib/Dashboard/TopBar/GearSelector.svelte @@ -2,7 +2,7 @@ export let selectedGear: Gear | '-999' -
+
- {modeText} + {modeText}
diff --git a/client/src/lib/Notifications/InfoIcon.svelte b/client/src/lib/Notifications/InfoIcon.svelte new file mode 100644 index 0000000..eb6d9fd --- /dev/null +++ b/client/src/lib/Notifications/InfoIcon.svelte @@ -0,0 +1,10 @@ + + + + info + diff --git a/client/src/lib/Notifications/notifications.ts b/client/src/lib/Notifications/notifications.ts new file mode 100644 index 0000000..737bae7 --- /dev/null +++ b/client/src/lib/Notifications/notifications.ts @@ -0,0 +1,93 @@ +import { toast } from 'svelte-french-toast' +import type { ToastOptions } from 'svelte-french-toast' +import InfoIcon from './InfoIcon.svelte' +import { Howl } from 'howler' + +interface NotificationOptions extends ToastOptions { + withAudio?: boolean + src?: string +} + +// get colors from https://tailwindcss.com/docs/customizing-colors +export class Notifications { + private static readonly defaultDuration = 3000 + + public static success(message: string, options?: NotificationOptions) { + if (options?.withAudio && !options.src) + throw new Error('No audio source provided') + + const sendToast = (duration: number) => { + toast.success(message, { + style: + 'padding: 25px; font-size: 1.5rem; background-color: #15803d; color: #fafafa;', + duration, + ...options, + }) + } + + if (options?.withAudio && options?.src) { + let sound: Howl + sound = new Howl({ + src: [options.src], + preload: true, + autoplay: true, + onload: () => sendToast(sound.duration() * 1000), + }) + } else { + sendToast(this.defaultDuration) + } + } + public static error(message: string, options?: NotificationOptions) { + if (options?.withAudio && !options.src) + throw new Error('No audio source provided') + + const sendToast = (duration: number) => { + toast.error(message, { + style: + 'padding: 25px; font-size: 1.5rem; background-color: #dc2626; color: #fafafa;', + duration, + ...options, + }) + } + + if (options?.withAudio && options?.src) { + let sound: Howl + sound = new Howl({ + src: [options.src], + preload: true, + autoplay: true, + onload: () => sendToast(sound.duration() * 1000), + }) + } else { + sendToast(this.defaultDuration) + } + } + public static info(message: string, options?: any) { + const sendToast = (duration: number) => { + toast(message, { + style: 'padding: 25px; font-size: 1.5rem;', + icon: InfoIcon, + duration, + ...options, + }) + } + if (options?.withAudio && options?.src) { + let sound: Howl + sound = new Howl({ + src: [options.src], + preload: true, + autoplay: true, + onload: () => sendToast(sound.duration() * 1000), + }) + } else { + sendToast(this.defaultDuration) + } + } + public static playAudio(src: string) { + new Howl({ + src: [src], + preload: true, + autoplay: true, + }) + } +} diff --git a/client/src/lib/Sequences/sequences.ts b/client/src/lib/Sequences/sequences.ts new file mode 100644 index 0000000..3c8fb86 --- /dev/null +++ b/client/src/lib/Sequences/sequences.ts @@ -0,0 +1,28 @@ +/* +define various sequences to play out in this file +for example, we can define an initialization sequence that +plays out some series of notifications, and call it whenever we need it, +or a sequence to change the screen color and play some audio queues for a crash +*/ + +import { Notifications } from '../Notifications/notifications' +import getVoicePath from '../utils/getVoicePath' + +export const initializationSequence = () => { + Notifications.info('Jankboard initialized!', { + withAudio: true, + src: getVoicePath('jankboard-initialized', 'en'), + }) + setTimeout(() => { + Notifications.success('LittenOS is online.', { + withAudio: true, + src: getVoicePath('littenos-is-online', 'en'), + }) + setTimeout(() => { + Notifications.error('Breaching Monte Vista codebase.', { + withAudio: true, + src: getVoicePath('breaching-monte-vista', 'en'), + }) + }, 3000) + }, 3000) +} diff --git a/client/src/lib/stores/toastStore.ts b/client/src/lib/stores/toastStore.ts deleted file mode 100644 index e69de29..0000000 diff --git a/client/src/lib/utils/getVoicePath.ts b/client/src/lib/utils/getVoicePath.ts new file mode 100644 index 0000000..6a1178f --- /dev/null +++ b/client/src/lib/utils/getVoicePath.ts @@ -0,0 +1,11 @@ +/** + * Retrieves the voice audio path for the given audio file. + * + * @param audio - the id of the voice audio file requested (see the readout) + * @param lang - the language of the audio + * @return the path of the audio file + */ +type SupportedLanguage = 'en' | 'rus' +export default function getVoicePath(audio: string, lang: SupportedLanguage) { + return `/static/voices/${lang}/${audio}.wav` +} diff --git a/client/src/lib/utils/helpers.ts b/client/src/lib/utils/helpers.ts index 67dc278..750dec9 100644 --- a/client/src/lib/utils/helpers.ts +++ b/client/src/lib/utils/helpers.ts @@ -81,10 +81,9 @@ export const resolveAcceleration = ( * @return The cardinal direction based on the input angle */ export const getDirection = (angle: number): CardinalDirection => { - if (angle < 0 || angle > 360) - if (angle < 22.5 || angle > 337.5) { - return 'North' - } + if (angle < 22.5 || angle > 337.5) { + return 'North' + } if (angle > 22.5 && angle < 67.5) { return 'Northeast' }