From d62573d4ff348ea5c21d41c87df833d9f05abdac Mon Sep 17 00:00:00 2001 From: KamyaPA Date: Tue, 28 Nov 2023 08:39:14 +0100 Subject: [PATCH 01/13] CodeJar setup but not scaling --- package.json | 2 ++ src/lib/components/canvas/Canvas.svelte | 15 ++++++++++ src/lib/components/canvas/CanvasNav.svelte | 29 ++++++++++++++++++ src/lib/components/editor/Editor.svelte | 34 ++++++++++++++++++++++ src/routes/+page.svelte | 9 ++++-- yarn.lock | 10 +++++++ 6 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 src/lib/components/canvas/Canvas.svelte create mode 100644 src/lib/components/canvas/CanvasNav.svelte create mode 100644 src/lib/components/editor/Editor.svelte diff --git a/package.json b/package.json index e2e4750e..fd4ea8fe 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,8 @@ "dependencies": { "@floating-ui/dom": "^1.5.3", "@tauri-apps/api": "^1.5.1", + "codejar": "^4.2.0", + "highlight.js": "^11.9.0", "svelte-google-materialdesign-icons": "^0.8.2", "zod": "^3.22.4" } diff --git a/src/lib/components/canvas/Canvas.svelte b/src/lib/components/canvas/Canvas.svelte new file mode 100644 index 00000000..9c0cd0be --- /dev/null +++ b/src/lib/components/canvas/Canvas.svelte @@ -0,0 +1,15 @@ + + + +{#if editor} + +{:else} + +{/if} + + diff --git a/src/lib/components/canvas/CanvasNav.svelte b/src/lib/components/canvas/CanvasNav.svelte new file mode 100644 index 00000000..64f498d3 --- /dev/null +++ b/src/lib/components/canvas/CanvasNav.svelte @@ -0,0 +1,29 @@ + + +
+
+ + +
+
+ + diff --git a/src/lib/components/editor/Editor.svelte b/src/lib/components/editor/Editor.svelte new file mode 100644 index 00000000..cba6f3f7 --- /dev/null +++ b/src/lib/components/editor/Editor.svelte @@ -0,0 +1,34 @@ + + +
+ + diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index decf72cb..46b7f661 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -4,13 +4,14 @@ import TopBar from "$lib/components/topBar/TopBar.svelte"; import SidePanel from "$lib/components/sidePanel/SidePanel.svelte"; import { SidePanelEnum } from "$lib/components/sidePanel/SidePanelEnum"; - import SvgView from "$lib/components/svg-view/SvgView.svelte"; import Console from "$lib/components/console/Console.svelte"; import ProjectNav from "$lib/components/project/ProjectNav.svelte"; import GlobalDeclaration from "$lib/components/project/globalDeclaration/GlobalDeclaration.svelte"; import Queries from "$lib/components/query/Queries.svelte"; import QueryNav from "$lib/components/query/QueryNav.svelte"; import ProjectItems from "$lib/components/project/ProjectItems.svelte"; + import Canvas from "$lib/components/canvas/Canvas.svelte"; + import CanvasNav from "$lib/components/canvas/CanvasNav.svelte"; @@ -31,8 +32,10 @@
- - + +
diff --git a/yarn.lock b/yarn.lock index b1552253..9bb12b94 100644 --- a/yarn.lock +++ b/yarn.lock @@ -672,6 +672,11 @@ code-red@^1.0.3: estree-walker "^3.0.3" periscopic "^3.1.0" +codejar@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/codejar/-/codejar-4.2.0.tgz#ad72aa63f794a16900a1b079eaf44acae84460ca" + integrity sha512-U8OZe+2B400W5nSSbXxaoboBN5i1hxWdBZJ9kcTy0DBuc4muwkPE/ph/MGX4yooIE8hztfNLPNU1CbcNYch69A== + color-convert@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" @@ -1094,6 +1099,11 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +highlight.js@^11.9.0: + version "11.9.0" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-11.9.0.tgz#04ab9ee43b52a41a047432c8103e2158a1b8b5b0" + integrity sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw== + ignore@^5.2.0, ignore@^5.2.4: version "5.2.4" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" From c738f1da9896c9e02fcd690d67e63ebe027bab52 Mon Sep 17 00:00:00 2001 From: DenFlyvendeGed Date: Tue, 28 Nov 2023 13:12:46 +0100 Subject: [PATCH 02/13] scrollbars --- src/lib/components/editor/Editor.svelte | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/components/editor/Editor.svelte b/src/lib/components/editor/Editor.svelte index cba6f3f7..be52a876 100644 --- a/src/lib/components/editor/Editor.svelte +++ b/src/lib/components/editor/Editor.svelte @@ -14,7 +14,7 @@ onMount(async () => { let { CodeJar } = await import("codejar"); let node = document.createElement("div"); - node.style.maxHeight= "80vh"; + node.className = "editor-text"; CodeJar(node, ((n : HTMLElement) => { let code = n.textContent as string; code = hljs.highlight(code, {language : "ecdar"}).value; @@ -30,5 +30,11 @@ #editor { width: 100%; height: 100%; + max-width: 80vw; + overflow: hidden; + } + :global(.editor-text){ + height: 100%; + text-wrap: nowrap !important; } From 9a5d459f0a877e12746878a17c078b97e73caa83 Mon Sep 17 00:00:00 2001 From: KamyaPA Date: Wed, 6 Dec 2023 10:48:31 +0100 Subject: [PATCH 03/13] Working linenumbers chrome is a bit wack but working --- src/lib/GlobalCssProperties.json | 12 +++ .../styling/ZodSchemas/CSSVariables.ts | 1 + src/lib/components/canvas/Canvas.svelte | 3 - src/lib/components/editor/Editor.svelte | 94 +++++++++++++++---- 4 files changed, 88 insertions(+), 22 deletions(-) diff --git a/src/lib/GlobalCssProperties.json b/src/lib/GlobalCssProperties.json index e4dd4c84..2103e357 100644 --- a/src/lib/GlobalCssProperties.json +++ b/src/lib/GlobalCssProperties.json @@ -92,6 +92,12 @@ 0.3362745098, 0.39901960784, 0.43823529411 + ], + "--editor-keyword-color": [ + "display-p3", + 0.52549019608, + 0.58823529411, + 0.98823529412 ] }, "fontSize": { @@ -184,6 +190,12 @@ 0.13490196078, 0.14666666666, 0.17019607843 + ], + "--editor-keyword-color": [ + "display-p3", + 0.52549019608, + 0.58823529411, + 0.98823529412 ] } }, diff --git a/src/lib/classes/styling/ZodSchemas/CSSVariables.ts b/src/lib/classes/styling/ZodSchemas/CSSVariables.ts index e4b8bcb4..2cb7a387 100644 --- a/src/lib/classes/styling/ZodSchemas/CSSVariables.ts +++ b/src/lib/classes/styling/ZodSchemas/CSSVariables.ts @@ -31,6 +31,7 @@ export const ColorVariables = z "--sidebar-text-color": ColorAttribute, "--sidebar-element-color": ColorAttribute, "--sidebar-element-hover-color": ColorAttribute, + "--editor-keyword-color": ColorAttribute, }) .strict(); diff --git a/src/lib/components/canvas/Canvas.svelte b/src/lib/components/canvas/Canvas.svelte index 9c0cd0be..987b8fea 100644 --- a/src/lib/components/canvas/Canvas.svelte +++ b/src/lib/components/canvas/Canvas.svelte @@ -5,11 +5,8 @@ let editor: boolean = true; - {#if editor} {:else} {/if} - - diff --git a/src/lib/components/editor/Editor.svelte b/src/lib/components/editor/Editor.svelte index be52a876..45e59a33 100644 --- a/src/lib/components/editor/Editor.svelte +++ b/src/lib/components/editor/Editor.svelte @@ -3,23 +3,58 @@ import { default as hljs } from "highlight.js"; let editor: HTMLElement; - hljs.registerLanguage("ecdar", _ => { + hljs.registerLanguage("ecdar", () => { return { - case_insensitive : false, - keywords : "clock", - contains : [], - } + case_insensitive: false, + keywords: "clock", + contains: [], + }; }); + function createLineNr(i: number) { + let num = document.createElement("div"); + num.innerHTML = String(i); + num.classList.add("editor-linenum"); + return num; + } + onMount(async () => { let { CodeJar } = await import("codejar"); let node = document.createElement("div"); - node.className = "editor-text"; - CodeJar(node, ((n : HTMLElement) => { + node.style.float = "right"; + node.style.width = + "calc(100% - var(--editor-lineno-width) - var(--editor-lineno-margin-right))"; + node.classList.add("editor-text"); + + let linenr = document.createElement("div"); + linenr.style.display = "flex"; + linenr.style.flexDirection = "column"; + linenr.style.justifyContent = "start"; + linenr.style.float = "left"; + linenr.style.width = "var(--editor-lineno-width)"; + + function updateLines(text: string) { + linenr.innerHTML = ""; + if (!text.includes("\n")) { + linenr.appendChild(createLineNr(1)); + return; + } + linenr.appendChild(createLineNr(1)); + let lines = 1; + for (let i = 0; i <= text.length; i++) + if (text[i] == "\n") linenr.appendChild(createLineNr(++lines)); + } + + updateLines(""); + CodeJar(node, (n: HTMLElement) => { let code = n.textContent as string; - code = hljs.highlight(code, {language : "ecdar"}).value; + updateLines(code); + code = hljs.highlight(code, { language: "ecdar" }).value; n.innerHTML = code; - })); + }); + + node.style.overflowY = "visible"; + editor.appendChild(linenr); editor.appendChild(node); }); @@ -27,14 +62,35 @@
From 1522446468a2a02428a2cc5f1f18222c2bc9221e Mon Sep 17 00:00:00 2001 From: KamyaPA Date: Wed, 6 Dec 2023 11:14:44 +0100 Subject: [PATCH 04/13] fixed chrome and webkit --- src/lib/components/editor/Editor.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/components/editor/Editor.svelte b/src/lib/components/editor/Editor.svelte index 45e59a33..06350433 100644 --- a/src/lib/components/editor/Editor.svelte +++ b/src/lib/components/editor/Editor.svelte @@ -39,6 +39,11 @@ linenr.appendChild(createLineNr(1)); return; } + // Fixes line numbers in chrome and webkit + let substr = text.substring(text.length - 2); + if (substr == "\n\n") { + text = text.substring(0, text.length - 2) + '\n'; + } linenr.appendChild(createLineNr(1)); let lines = 1; for (let i = 0; i <= text.length; i++) From 494914b2f9959e5541f0db4f3e00621e67e940bd Mon Sep 17 00:00:00 2001 From: KamyaPA Date: Wed, 6 Dec 2023 11:46:55 +0100 Subject: [PATCH 05/13] new fix --- src/lib/components/editor/Editor.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/components/editor/Editor.svelte b/src/lib/components/editor/Editor.svelte index 06350433..2fc553e0 100644 --- a/src/lib/components/editor/Editor.svelte +++ b/src/lib/components/editor/Editor.svelte @@ -40,9 +40,9 @@ return; } // Fixes line numbers in chrome and webkit - let substr = text.substring(text.length - 2); - if (substr == "\n\n") { - text = text.substring(0, text.length - 2) + '\n'; + let substr = text.substring(text.length - 1); + if (substr == "\n") { + text = text.substring(0, text.length - 1); } linenr.appendChild(createLineNr(1)); let lines = 1; From 4f8ad12989280987a77304e77ead8ed89b48d168 Mon Sep 17 00:00:00 2001 From: KamyaPA Date: Wed, 6 Dec 2023 13:16:31 +0100 Subject: [PATCH 06/13] added modes --- src/lib/components/canvas/Canvas.svelte | 10 ++++++-- src/lib/components/canvas/CanvasNav.svelte | 26 ++++++++++++++++++-- src/lib/components/canvas/state.ts | 28 ++++++++++++++++++++++ 3 files changed, 60 insertions(+), 4 deletions(-) create mode 100644 src/lib/components/canvas/state.ts diff --git a/src/lib/components/canvas/Canvas.svelte b/src/lib/components/canvas/Canvas.svelte index 987b8fea..c26935e2 100644 --- a/src/lib/components/canvas/Canvas.svelte +++ b/src/lib/components/canvas/Canvas.svelte @@ -1,11 +1,17 @@ -{#if editor} +{#if mode === CanvasModes.Editor} {:else} diff --git a/src/lib/components/canvas/CanvasNav.svelte b/src/lib/components/canvas/CanvasNav.svelte index 64f498d3..31715b13 100644 --- a/src/lib/components/canvas/CanvasNav.svelte +++ b/src/lib/components/canvas/CanvasNav.svelte @@ -1,12 +1,34 @@
- - + {#if (supports !== CanvasSupports.OnlyEditor || supports === CanvasSupports.Both) && mode !== CanvasModes.Draw} + { + canvasModes.update(() => CanvasModes.Draw); + + }}/> + {/if} + {#if (supports !== CanvasSupports.OnlyDraw || supports === CanvasSupports.Both) && mode !== CanvasModes.Editor} + { + canvasModes.update(() => CanvasModes.Editor); + }} /> + {/if}
diff --git a/src/lib/components/canvas/state.ts b/src/lib/components/canvas/state.ts new file mode 100644 index 00000000..38f852c2 --- /dev/null +++ b/src/lib/components/canvas/state.ts @@ -0,0 +1,28 @@ +import { writable } from "svelte/store" + +export enum CanvasModes { + Draw, + Editor +} + +export enum CanvasSupports { + OnlyDraw, + OnlyEditor, + Both +} + +export const canvasSupports = writable(CanvasSupports.OnlyEditor); +export const canvasModes = writable(CanvasModes.Editor); + +canvasSupports.subscribe((newSupports) => { + canvasModes.update((currentMode) => { + if(newSupports == CanvasSupports.OnlyEditor && currentMode == CanvasModes.Draw) + return CanvasModes.Editor; + else if(newSupports == CanvasSupports.OnlyDraw && currentMode == CanvasModes.Editor) + return CanvasModes.Draw; + else + return currentMode; + }) +}) + + From 1165e643177482a7f2d23011338ec29653d38243 Mon Sep 17 00:00:00 2001 From: KamyaPA Date: Wed, 6 Dec 2023 13:23:11 +0100 Subject: [PATCH 07/13] missed some conflicts --- package.json | 3 - src/routes/+page.svelte | 16 --- yarn.lock | 258 ++++++++++++++++++++-------------------- 3 files changed, 128 insertions(+), 149 deletions(-) diff --git a/package.json b/package.json index d699c8f2..a671d0d0 100644 --- a/package.json +++ b/package.json @@ -47,12 +47,9 @@ "@protobuf-ts/grpcweb-transport": "^2.9.1", "@protobuf-ts/runtime": "^2.9.1", "@tauri-apps/api": "^1.5.1", -<<<<<<< HEAD "codejar": "^4.2.0", "highlight.js": "^11.9.0", -======= "idb-keyval": "^6.2.1", ->>>>>>> main "svelte-google-materialdesign-icons": "^0.8.2", "zod": "^3.22.4" } diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 3800c1d3..7a72ede6 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -4,27 +4,21 @@ import TopBar from "$lib/components/topBar/TopBar.svelte"; import SidePanel from "$lib/components/sidePanel/SidePanel.svelte"; import { SidePanelEnum } from "$lib/components/sidePanel/SidePanelEnum"; -<<<<<<< HEAD -======= import SvgView from "$lib/components/svgView/SvgView.svelte"; ->>>>>>> main import Console from "$lib/components/console/Console.svelte"; import ProjectNav from "$lib/components/project/ProjectNav.svelte"; import GlobalDeclaration from "$lib/components/project/globalDeclaration/GlobalDeclaration.svelte"; import Queries from "$lib/components/query/Queries.svelte"; import QueryNav from "$lib/components/query/QueryNav.svelte"; import ProjectItems from "$lib/components/project/ProjectItems.svelte"; -<<<<<<< HEAD import Canvas from "$lib/components/canvas/Canvas.svelte"; import CanvasNav from "$lib/components/canvas/CanvasNav.svelte"; -======= import Settings from "$lib/components/settings/SettingsView.svelte"; let showSettings: boolean = false; function toggleSettings() { showSettings = !showSettings; } ->>>>>>> main @@ -45,20 +39,10 @@
-<<<<<<< HEAD -======= - - - {#if showSettings} - - {:else} - - {/if} ->>>>>>> main
diff --git a/yarn.lock b/yarn.lock index e701a1b9..48f1e6b1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -247,10 +247,10 @@ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== -"@eslint/eslintrc@^2.1.3": - version "2.1.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.3.tgz#797470a75fe0fbd5a53350ee715e85e87baff22d" - integrity sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA== +"@eslint/eslintrc@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" + integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -262,10 +262,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.54.0": - version "8.54.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.54.0.tgz#4fab9a2ff7860082c304f750e94acd644cf984cf" - integrity sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ== +"@eslint/js@8.55.0": + version "8.55.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.55.0.tgz#b721d52060f369aa259cf97392403cb9ce892ec6" + integrity sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA== "@fastify/busboy@^2.0.0": version "2.1.0" @@ -273,9 +273,9 @@ integrity sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA== "@floating-ui/core@^1.4.2": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.5.0.tgz#5c05c60d5ae2d05101c3021c1a2a350ddc027f8c" - integrity sha512-kK1h4m36DQ0UHGj5Ah4db7R0rHemTqqO0QLvUqi1/mUUp3LuAWbWxdxSIf/XsnH9VS6rRVPLJCncjRzUvyCLXg== + version "1.5.2" + resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.5.2.tgz#53a0f7a98c550e63134d504f26804f6b83dbc071" + integrity sha512-Ii3MrfY/GAIN3OhXNzpCKaLxHQfJF9qvwq/kEJYdqDxeIHa01K8sldugal6TmeeXl+WMvhv9cnVzUTaFFJF09A== dependencies: "@floating-ui/utils" "^0.1.3" @@ -379,53 +379,53 @@ playwright "1.40.1" "@polka/url@^1.0.0-next.20": - version "1.0.0-next.23" - resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.23.tgz#498e41218ab3b6a1419c735e5c6ae2c5ed609b6c" - integrity sha512-C16M+IYz0rgRhWZdCmK+h58JMv8vijAA61gmz2rspCSwKwzBebpdcsiUmwrtJRdphuY30i6BSLEOP8ppbNLyLg== + version "1.0.0-next.24" + resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.24.tgz#58601079e11784d20f82d0585865bb42305c4df3" + integrity sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ== "@protobuf-ts/grpcweb-transport@^2.9.1": - version "2.9.1" - resolved "https://registry.yarnpkg.com/@protobuf-ts/grpcweb-transport/-/grpcweb-transport-2.9.1.tgz#523647acbf98de54b291a57e770e3127820ba879" - integrity sha512-42bvBX312qhPlosMNTZE9XI+lt58ISM5vEJKv/wOx2Fu70J0TdlLa4Bjz8xcuRlv4Pq1CA+94DC1IgNxNRsQdg== + version "2.9.2" + resolved "https://registry.yarnpkg.com/@protobuf-ts/grpcweb-transport/-/grpcweb-transport-2.9.2.tgz#9ee8650ad789c55fe8c8e4bd8aa471e2e4f45611" + integrity sha512-RW5Dy25OtkfVDM8WXcXRji3AvZQIRnERU/+gALk87Q4vlJdT7YesmKFEJpGN29SfxKO9GFid7Ax4mSRriUzW4A== dependencies: - "@protobuf-ts/runtime" "^2.9.1" - "@protobuf-ts/runtime-rpc" "^2.9.1" + "@protobuf-ts/runtime" "^2.9.2" + "@protobuf-ts/runtime-rpc" "^2.9.2" -"@protobuf-ts/plugin-framework@^2.9.1": - version "2.9.1" - resolved "https://registry.yarnpkg.com/@protobuf-ts/plugin-framework/-/plugin-framework-2.9.1.tgz#b8a6b29386d34d54588230a620385534cff629fc" - integrity sha512-/4sHdsXjp6KKkbpcCLUHpMfdYsCaqqQHRAwoxVzHmltsotw06B/K9HglZtkQx0IpLO4eeF3vNr3n7qzjD3e2zA== +"@protobuf-ts/plugin-framework@^2.9.2": + version "2.9.2" + resolved "https://registry.yarnpkg.com/@protobuf-ts/plugin-framework/-/plugin-framework-2.9.2.tgz#15c153ec196e177b4de42e5e0d2fec7025cc994e" + integrity sha512-8KwGKb+1vNb1zk34J7G5eFpJEQ0QJKD3J83+IRN16BtP+9umHnR3Zgl8uYUYa9bU2U1FaUFtL0vPEHFj5oWrNw== dependencies: - "@protobuf-ts/runtime" "^2.9.1" + "@protobuf-ts/runtime" "^2.9.2" typescript "^3.9" "@protobuf-ts/plugin@^2.9.1": - version "2.9.1" - resolved "https://registry.yarnpkg.com/@protobuf-ts/plugin/-/plugin-2.9.1.tgz#46d043fd0e64cfd3afa1b8b207f81c2594fc0cd9" - integrity sha512-svkFSyFgTtaLdDFPGvd6cTu8qK5Nul5RizDCTcv0xWRzcPWtMiqbuCLKCv6E9gdpnAs3MPeQTnSABB2+NhfWBg== - dependencies: - "@protobuf-ts/plugin-framework" "^2.9.1" - "@protobuf-ts/protoc" "^2.9.1" - "@protobuf-ts/runtime" "^2.9.1" - "@protobuf-ts/runtime-rpc" "^2.9.1" + version "2.9.2" + resolved "https://registry.yarnpkg.com/@protobuf-ts/plugin/-/plugin-2.9.2.tgz#8d2b6e0843f0dd7c1d71b908ae617652bca04487" + integrity sha512-p2nBvqQOPdiwEHiqFJTQcOo27tFZG6s8qk0310KoWLvgES64l1HRT2sC9YcQQa+Evm7SrrcSBoAUlAwYJOKYBA== + dependencies: + "@protobuf-ts/plugin-framework" "^2.9.2" + "@protobuf-ts/protoc" "^2.9.2" + "@protobuf-ts/runtime" "^2.9.2" + "@protobuf-ts/runtime-rpc" "^2.9.2" typescript "^3.9" -"@protobuf-ts/protoc@^2.9.1": - version "2.9.1" - resolved "https://registry.yarnpkg.com/@protobuf-ts/protoc/-/protoc-2.9.1.tgz#558f6d6e3f97af60e20a13fa01a17989078447db" - integrity sha512-/q2iVDwVDijfZlFZnnm3W6ALbybNskNSww88TfYBaJH49PuQMqhcXUPRu28UouJr9sc/Lr5k6t0TB9Nff3UIsA== +"@protobuf-ts/protoc@^2.9.2": + version "2.9.2" + resolved "https://registry.yarnpkg.com/@protobuf-ts/protoc/-/protoc-2.9.2.tgz#c5807862229be897bcf017d47ed6351b49b13fb4" + integrity sha512-36oEEzCGhYH9FAeAH9Lj5CTf15Mx1uZnC7c0g/CEJ22plwy6HJp5swHWCouFrdLOy05OlKy5coU0scCkuvotBQ== -"@protobuf-ts/runtime-rpc@^2.9.1": - version "2.9.1" - resolved "https://registry.yarnpkg.com/@protobuf-ts/runtime-rpc/-/runtime-rpc-2.9.1.tgz#6a1c8f189005de5dc6bce7a18751ef3fe304c8eb" - integrity sha512-pzO20J6s07LTWcj8hKAXh/dAacU5HIVir6SANKXXH8G0pn0VIIB4FFECq5Hbv25/8PQoOGZ7iApq/DMHaSjGhg== +"@protobuf-ts/runtime-rpc@^2.9.2": + version "2.9.2" + resolved "https://registry.yarnpkg.com/@protobuf-ts/runtime-rpc/-/runtime-rpc-2.9.2.tgz#21997b5e8674a293475ba7d5d01899e7f02adfbe" + integrity sha512-5NKxpIuL4DMckJMDOUqCH8KnHNIosqAzOwf9ooO+UjJIGTk268FvYYe5u0V1/bXByJgPU/nHC9+S4Pm6LKTTjg== dependencies: - "@protobuf-ts/runtime" "^2.9.1" + "@protobuf-ts/runtime" "^2.9.2" -"@protobuf-ts/runtime@^2.9.1": - version "2.9.1" - resolved "https://registry.yarnpkg.com/@protobuf-ts/runtime/-/runtime-2.9.1.tgz#faec7653ca9c01ced49b0ee01818d46b4b3cf2ac" - integrity sha512-ZTc8b+pQ6bwxZa3qg9/IO/M/brRkvr0tic9cSGgAsDByfPrtatT2300wTIRLDk8X9WTW1tT+FhyqmcrbMHTeww== +"@protobuf-ts/runtime@^2.9.1", "@protobuf-ts/runtime@^2.9.2": + version "2.9.2" + resolved "https://registry.yarnpkg.com/@protobuf-ts/runtime/-/runtime-2.9.2.tgz#398807484fffd8c30fdb840b381b9bee39da3449" + integrity sha512-0XeRY+5+j2ZrhY3osjUqz6Y8TVpgdO8h5OjKV+qXEpyjniiP+AVo06W7xZxfvsdBrtB7A3BvP5w1Cja7VYNGjw== "@rollup/rollup-android-arm-eabi@4.6.1": version "4.6.1" @@ -498,9 +498,9 @@ integrity sha512-VUqTfXsxYGugCpMqQv1U0LIdbR3S5nBkMMDmpjGVJyM6Q2jHVMFtdWJCkeHMySc6mZxJ+0eZK3T7IgmUCDrcUQ== "@sveltejs/kit@^1.26.0": - version "1.27.6" - resolved "https://registry.yarnpkg.com/@sveltejs/kit/-/kit-1.27.6.tgz#2feea84413205422887e01326d979edd9a982dff" - integrity sha512-GsjTkMbKzXdbeRg0tk8S7HNShQ4879ftRr0ZHaZfjbig1xQwG57Bvcm9U9/mpLJtCapLbLWUnygKrgcLISLC8A== + version "1.27.7" + resolved "https://registry.yarnpkg.com/@sveltejs/kit/-/kit-1.27.7.tgz#9d31f4d9057a5460cc071088d61d2b599b360469" + integrity sha512-AzXYDoYt42clCBwLF9GTHsXyg2DFR31Ncyt8yxu8Aw4tgB433V+w+hcr1RTfAN9zKW2J2PY9FMQ8FoX/4Vw8CA== dependencies: "@sveltejs/vite-plugin-svelte" "^2.5.0" "@types/cookie" "^0.5.1" @@ -589,9 +589,9 @@ integrity sha512-iJt33IQnVRkqeqC7PzBHPTC6fDlRNRW8vjrgqtScAhrmMwe8c4Eo7+fUGTa+XdWrpEgpyKWMYmi2dIwMAYRzPw== "@types/node@*": - version "20.10.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.1.tgz#d2c96f356c3125fedc983d74c424910c3767141c" - integrity sha512-T2qwhjWwGH81vUEx4EXmBKsTJRXFXNZTL4v0gi01+zyBmCwzE6TyHszqX01m+QHTEq+EZNo13NeJIdEqf+Myrg== + version "20.10.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.3.tgz#4900adcc7fc189d5af5bb41da8f543cea6962030" + integrity sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg== dependencies: undici-types "~5.26.4" @@ -606,15 +606,15 @@ integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== "@typescript-eslint/eslint-plugin@^6.8.0": - version "6.13.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.13.1.tgz#f98bd887bf95551203c917e734d113bf8d527a0c" - integrity sha512-5bQDGkXaxD46bPvQt08BUz9YSaO4S0fB1LB5JHQuXTfkGPI3+UUeS387C/e9jRie5GqT8u5kFTrMvAjtX4O5kA== + version "6.13.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.13.2.tgz#2e03506c5362a65e43cb132c37c9ce2d3cb51470" + integrity sha512-3+9OGAWHhk4O1LlcwLBONbdXsAhLjyCFogJY/cWy2lxdVJ2JrcTF2pTGMaLl2AE7U1l31n8Py4a8bx5DLf/0dQ== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.13.1" - "@typescript-eslint/type-utils" "6.13.1" - "@typescript-eslint/utils" "6.13.1" - "@typescript-eslint/visitor-keys" "6.13.1" + "@typescript-eslint/scope-manager" "6.13.2" + "@typescript-eslint/type-utils" "6.13.2" + "@typescript-eslint/utils" "6.13.2" + "@typescript-eslint/visitor-keys" "6.13.2" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" @@ -623,71 +623,71 @@ ts-api-utils "^1.0.1" "@typescript-eslint/parser@^6.8.0": - version "6.13.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.13.1.tgz#29d6d4e5fab4669e58bc15f6904b67da65567487" - integrity sha512-fs2XOhWCzRhqMmQf0eicLa/CWSaYss2feXsy7xBD/pLyWke/jCIVc2s1ikEAtSW7ina1HNhv7kONoEfVNEcdDQ== - dependencies: - "@typescript-eslint/scope-manager" "6.13.1" - "@typescript-eslint/types" "6.13.1" - "@typescript-eslint/typescript-estree" "6.13.1" - "@typescript-eslint/visitor-keys" "6.13.1" + version "6.13.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.13.2.tgz#390b79cc9a57a5f904d197a201cc4b6bc4f9afb9" + integrity sha512-MUkcC+7Wt/QOGeVlM8aGGJZy1XV5YKjTpq9jK6r6/iLsGXhBVaGP5N0UYvFsu9BFlSpwY9kMretzdBH01rkRXg== + dependencies: + "@typescript-eslint/scope-manager" "6.13.2" + "@typescript-eslint/types" "6.13.2" + "@typescript-eslint/typescript-estree" "6.13.2" + "@typescript-eslint/visitor-keys" "6.13.2" debug "^4.3.4" -"@typescript-eslint/scope-manager@6.13.1": - version "6.13.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.13.1.tgz#58c7c37c6a957d3d9f59bc4f64c2888e0cac1d70" - integrity sha512-BW0kJ7ceiKi56GbT2KKzZzN+nDxzQK2DS6x0PiSMPjciPgd/JRQGMibyaN2cPt2cAvuoH0oNvn2fwonHI+4QUQ== +"@typescript-eslint/scope-manager@6.13.2": + version "6.13.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.13.2.tgz#5fa4e4adace028dafac212c770640b94e7b61052" + integrity sha512-CXQA0xo7z6x13FeDYCgBkjWzNqzBn8RXaE3QVQVIUm74fWJLkJkaHmHdKStrxQllGh6Q4eUGyNpMe0b1hMkXFA== dependencies: - "@typescript-eslint/types" "6.13.1" - "@typescript-eslint/visitor-keys" "6.13.1" + "@typescript-eslint/types" "6.13.2" + "@typescript-eslint/visitor-keys" "6.13.2" -"@typescript-eslint/type-utils@6.13.1": - version "6.13.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.13.1.tgz#e6e5885e387841cae9c38fc0638fd8b7561973d6" - integrity sha512-A2qPlgpxx2v//3meMqQyB1qqTg1h1dJvzca7TugM3Yc2USDY+fsRBiojAEo92HO7f5hW5mjAUF6qobOPzlBCBQ== +"@typescript-eslint/type-utils@6.13.2": + version "6.13.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.13.2.tgz#ebec2da14a6bb7122e0fd31eea72a382c39c6102" + integrity sha512-Qr6ssS1GFongzH2qfnWKkAQmMUyZSyOr0W54nZNU1MDfo+U4Mv3XveeLZzadc/yq8iYhQZHYT+eoXJqnACM1tw== dependencies: - "@typescript-eslint/typescript-estree" "6.13.1" - "@typescript-eslint/utils" "6.13.1" + "@typescript-eslint/typescript-estree" "6.13.2" + "@typescript-eslint/utils" "6.13.2" debug "^4.3.4" ts-api-utils "^1.0.1" -"@typescript-eslint/types@6.13.1": - version "6.13.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.13.1.tgz#b56f26130e7eb8fa1e429c75fb969cae6ad7bb5c" - integrity sha512-gjeEskSmiEKKFIbnhDXUyiqVma1gRCQNbVZ1C8q7Zjcxh3WZMbzWVfGE9rHfWd1msQtPS0BVD9Jz9jded44eKg== +"@typescript-eslint/types@6.13.2": + version "6.13.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.13.2.tgz#c044aac24c2f6cefb8e921e397acad5417dd0ae6" + integrity sha512-7sxbQ+EMRubQc3wTfTsycgYpSujyVbI1xw+3UMRUcrhSy+pN09y/lWzeKDbvhoqcRbHdc+APLs/PWYi/cisLPg== -"@typescript-eslint/typescript-estree@6.13.1": - version "6.13.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.13.1.tgz#d01dda78d2487434d1c503853fa00291c566efa4" - integrity sha512-sBLQsvOC0Q7LGcUHO5qpG1HxRgePbT6wwqOiGLpR8uOJvPJbfs0mW3jPA3ujsDvfiVwVlWUDESNXv44KtINkUQ== +"@typescript-eslint/typescript-estree@6.13.2": + version "6.13.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.13.2.tgz#ae556ee154c1acf025b48d37c3ef95a1d55da258" + integrity sha512-SuD8YLQv6WHnOEtKv8D6HZUzOub855cfPnPMKvdM/Bh1plv1f7Q/0iFUDLKKlxHcEstQnaUU4QZskgQq74t+3w== dependencies: - "@typescript-eslint/types" "6.13.1" - "@typescript-eslint/visitor-keys" "6.13.1" + "@typescript-eslint/types" "6.13.2" + "@typescript-eslint/visitor-keys" "6.13.2" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/utils@6.13.1": - version "6.13.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.13.1.tgz#925b3a2453a71ada914ae329b7bb7e7d96634b2f" - integrity sha512-ouPn/zVoan92JgAegesTXDB/oUp6BP1v8WpfYcqh649ejNc9Qv+B4FF2Ff626kO1xg0wWwwG48lAJ4JuesgdOw== +"@typescript-eslint/utils@6.13.2": + version "6.13.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.13.2.tgz#8eb89e53adc6d703a879b131e528807245486f89" + integrity sha512-b9Ptq4eAZUym4idijCRzl61oPCwwREcfDI8xGk751Vhzig5fFZR9CyzDz4Sp/nxSLBYxUPyh4QdIDqWykFhNmQ== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.12" "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.13.1" - "@typescript-eslint/types" "6.13.1" - "@typescript-eslint/typescript-estree" "6.13.1" + "@typescript-eslint/scope-manager" "6.13.2" + "@typescript-eslint/types" "6.13.2" + "@typescript-eslint/typescript-estree" "6.13.2" semver "^7.5.4" -"@typescript-eslint/visitor-keys@6.13.1": - version "6.13.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.13.1.tgz#c4b692dcc23a4fc60685b718f10fde789d65a540" - integrity sha512-NDhQUy2tg6XGNBGDRm1XybOHSia8mcXmlbKWoQP+nm1BIIMxa55shyJfZkHpEBN62KNPLrocSM2PdPcaLgDKMQ== +"@typescript-eslint/visitor-keys@6.13.2": + version "6.13.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.13.2.tgz#e0a4a80cf842bb08e6127b903284166ac4a5594c" + integrity sha512-OGznFs0eAQXJsp+xSd6k/O1UbFi/K/L7WjqeRoFE7vadjAF9y0uppXhYNQNEqygjou782maGClOoZwPqF0Drlw== dependencies: - "@typescript-eslint/types" "6.13.1" + "@typescript-eslint/types" "6.13.2" eslint-visitor-keys "^3.4.1" "@ungap/structured-clone@^1.2.0": @@ -744,9 +744,9 @@ acorn-jsx@^5.3.2: integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn-walk@^8.2.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.0.tgz#2097665af50fd0cf7a2dfccd2b9368964e66540f" - integrity sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA== + version "8.3.1" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.1.tgz#2f10f5b69329d90ae18c58bf1fa8fccd8b959a43" + integrity sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw== acorn@^8.10.0, acorn@^8.9.0: version "8.11.2" @@ -1095,9 +1095,9 @@ eslint-compat-utils@^0.1.2: integrity sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg== eslint-config-prettier@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz#eb25485946dd0c66cd216a46232dc05451518d1f" - integrity sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw== + version "9.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f" + integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== eslint-plugin-svelte@^2.34.0: version "2.35.1" @@ -1131,14 +1131,14 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4 integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== eslint@^8.51.0: - version "8.54.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.54.0.tgz#588e0dd4388af91a2e8fa37ea64924074c783537" - integrity sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA== + version "8.55.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.55.0.tgz#078cb7b847d66f2c254ea1794fa395bf8e7e03f8" + integrity sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.3" - "@eslint/js" "8.54.0" + "@eslint/eslintrc" "^2.1.4" + "@eslint/js" "8.55.0" "@humanwhocodes/config-array" "^0.11.13" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" @@ -1387,17 +1387,15 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -<<<<<<< HEAD highlight.js@^11.9.0: version "11.9.0" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-11.9.0.tgz#04ab9ee43b52a41a047432c8103e2158a1b8b5b0" integrity sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw== -======= + idb-keyval@^6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/idb-keyval/-/idb-keyval-6.2.1.tgz#94516d625346d16f56f3b33855da11bfded2db33" integrity sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg== ->>>>>>> main ignore@^5.2.0, ignore@^5.2.4: version "5.3.0" @@ -1654,7 +1652,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -nanoid@^3.3.6: +nanoid@^3.3.7: version "3.3.7" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== @@ -1814,12 +1812,12 @@ postcss-selector-parser@^6.0.11: cssesc "^3.0.0" util-deprecate "^1.0.2" -postcss@^8.4.27, postcss@^8.4.29, postcss@^8.4.31, postcss@^8.4.5: - version "8.4.31" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.31.tgz#92b451050a9f914da6755af352bdc0192508656d" - integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ== +postcss@^8.4.27, postcss@^8.4.29, postcss@^8.4.32, postcss@^8.4.5: + version "8.4.32" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.32.tgz#1dac6ac51ab19adb21b8b34fd2d93a86440ef6c9" + integrity sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw== dependencies: - nanoid "^3.3.6" + nanoid "^3.3.7" picocolors "^1.0.0" source-map-js "^1.0.2" @@ -2007,9 +2005,9 @@ stackback@0.0.2: integrity sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw== std-env@^3.3.3: - version "3.5.0" - resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.5.0.tgz#83010c9e29bd99bf6f605df87c19012d82d63b97" - integrity sha512-JGUEaALvL0Mf6JCfYnJOTcobY+Nc7sG/TemDRBqCA0wEr4DER7zDchaaixTlmOxAjG1uRJmX82EQcxwTQTkqVA== + version "3.6.0" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.6.0.tgz#94807562bddc68fa90f2e02c5fd5b6865bb4e98e" + integrity sha512-aFZ19IgVmhdB2uX599ve2kE6BIE3YMnQ6Gp6BURhW/oIzpXGKr878TQfAQZn1+i0Flcc/UKUy1gOlcfaUBCryg== strip-ansi@^6.0.1: version "6.0.1" @@ -2233,20 +2231,20 @@ vite-node@0.34.6: vite "^3.0.0 || ^4.0.0 || ^5.0.0-0" "vite@^3.0.0 || ^4.0.0 || ^5.0.0-0", "vite@^3.1.0 || ^4.0.0 || ^5.0.0-0": - version "5.0.4" - resolved "https://registry.yarnpkg.com/vite/-/vite-5.0.4.tgz#d984d2aaa8bac30f1ca9b9eea9b97e052f88c307" - integrity sha512-RzAr8LSvM8lmhB4tQ5OPcBhpjOZRZjuxv9zO5UcxeoY2bd3kP3Ticd40Qma9/BqZ8JS96Ll/jeBX9u+LJZrhVg== + version "5.0.6" + resolved "https://registry.yarnpkg.com/vite/-/vite-5.0.6.tgz#f9e13503a4c5ccd67312c67803dec921f3bdea7c" + integrity sha512-MD3joyAEBtV7QZPl2JVVUai6zHms3YOmLR+BpMzLlX2Yzjfcc4gTgNi09d/Rua3F4EtC8zdwPU8eQYyib4vVMQ== dependencies: esbuild "^0.19.3" - postcss "^8.4.31" + postcss "^8.4.32" rollup "^4.2.0" optionalDependencies: fsevents "~2.3.3" vite@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/vite/-/vite-4.5.0.tgz#ec406295b4167ac3bc23e26f9c8ff559287cff26" - integrity sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw== + version "4.5.1" + resolved "https://registry.yarnpkg.com/vite/-/vite-4.5.1.tgz#3370986e1ed5dbabbf35a6c2e1fb1e18555b968a" + integrity sha512-AXXFaAJ8yebyqzoNB9fu2pHoo/nWX+xZlaRwoeYUxEqBO+Zj4msE5G+BhGBll9lYEKv9Hfks52PAF2X7qDYXQA== dependencies: esbuild "^0.18.10" postcss "^8.4.27" From 8ec44c93326abbdccd214586eb29771bccb4c87d Mon Sep 17 00:00:00 2001 From: KamyaPA Date: Thu, 7 Dec 2023 12:37:03 +0100 Subject: [PATCH 08/13] fixed editor --- src/lib/GlobalCssProperties.json | 6 +++ .../styling/ZodSchemas/CSSVariables.ts | 1 + src/lib/components/canvas/Canvas.svelte | 16 ++---- src/lib/components/canvas/CanvasNav.svelte | 42 ++++++++++----- src/lib/components/canvas/state.ts | 46 ++++++++++++---- src/lib/components/editor/Editor.svelte | 54 ++++++++++++++----- src/lib/components/editor/state.ts | 17 ++++++ .../GlobalDeclaration.svelte | 6 ++- .../components/settings/SettingsView.svelte | 6 +-- src/lib/components/settings/state.ts | 3 ++ src/lib/components/svgView/SvgView.svelte | 3 ++ src/lib/components/topBar/TopBar.svelte | 6 +-- src/lib/globalState/activeProject.ts | 24 ++++++--- src/routes/+page.svelte | 12 ++--- 14 files changed, 170 insertions(+), 72 deletions(-) create mode 100644 src/lib/components/editor/state.ts create mode 100644 src/lib/components/settings/state.ts diff --git a/src/lib/GlobalCssProperties.json b/src/lib/GlobalCssProperties.json index 5e2be57a..27ec1b0b 100644 --- a/src/lib/GlobalCssProperties.json +++ b/src/lib/GlobalCssProperties.json @@ -101,6 +101,12 @@ 0.58823529411, 0.98823529412 ], + "--editor-comment-color": [ + "display-p3", + 0.52549019608, + 0.52549019608, + 0.52549019608 + ], "--settings-danger-button-color": ["srgb", 0.498, 0.0902, 0.0549], "--settings-safe-button-color": ["srgb", 0.3255, 0.498, 0.2667] }, diff --git a/src/lib/classes/styling/ZodSchemas/CSSVariables.ts b/src/lib/classes/styling/ZodSchemas/CSSVariables.ts index 1aa276d1..bfda0ae8 100644 --- a/src/lib/classes/styling/ZodSchemas/CSSVariables.ts +++ b/src/lib/classes/styling/ZodSchemas/CSSVariables.ts @@ -35,6 +35,7 @@ export const ColorVariables = z "--sidebar-element-color": ColorAttribute, "--sidebar-element-hover-color": ColorAttribute, "--editor-keyword-color": ColorAttribute, + "--editor-comment-color": ColorAttribute, "--settings-danger-button-color": ColorAttribute, "--settings-safe-button-color": ColorAttribute, }) diff --git a/src/lib/components/canvas/Canvas.svelte b/src/lib/components/canvas/Canvas.svelte index c26935e2..91d3c239 100644 --- a/src/lib/components/canvas/Canvas.svelte +++ b/src/lib/components/canvas/Canvas.svelte @@ -1,18 +1,8 @@ -{#if mode === CanvasModes.Editor} - -{:else} - -{/if} + + diff --git a/src/lib/components/canvas/CanvasNav.svelte b/src/lib/components/canvas/CanvasNav.svelte index 31715b13..1ed002f6 100644 --- a/src/lib/components/canvas/CanvasNav.svelte +++ b/src/lib/components/canvas/CanvasNav.svelte @@ -2,32 +2,46 @@ import { Draw, Code } from "svelte-google-materialdesign-icons"; import SvgButton from "../buttons/SvgButton.svelte"; - import { CanvasModes, CanvasSupports, canvasModes, canvasSupports} from "./state"; + import { + CanvasModes, + CanvasSupports, + canvasModes, + canvasSupports, + } from "./state"; - let supports = CanvasSupports.OnlyEditor; + let supports = CanvasSupports.OnlyEditor; let mode = CanvasModes.Editor; - canvasModes.subscribe( (newMode) => { + canvasModes.subscribe((newMode) => { mode = newMode; - }) + }); - canvasSupports.subscribe( (newSupports) => { + canvasSupports.subscribe((newSupports) => { supports = newSupports; });
- {#if (supports !== CanvasSupports.OnlyEditor || supports === CanvasSupports.Both) && mode !== CanvasModes.Draw} - { - canvasModes.update(() => CanvasModes.Draw); - - }}/> + {#if supports === CanvasSupports.Both && mode !== CanvasModes.Draw} + { + canvasModes.set(CanvasModes.Draw); + }} + /> {/if} - {#if (supports !== CanvasSupports.OnlyDraw || supports === CanvasSupports.Both) && mode !== CanvasModes.Editor} - { - canvasModes.update(() => CanvasModes.Editor); - }} /> + {#if supports === CanvasSupports.Both && mode !== CanvasModes.Editor} + { + canvasModes.set(CanvasModes.Editor); + }} + /> {/if}
diff --git a/src/lib/components/canvas/state.ts b/src/lib/components/canvas/state.ts index 38f852c2..ff940457 100644 --- a/src/lib/components/canvas/state.ts +++ b/src/lib/components/canvas/state.ts @@ -1,14 +1,17 @@ -import { writable } from "svelte/store" +import { Component, GlobalDeclarations, System } from "$lib/classes/automaton"; +import { activeView } from "$lib/globalState/activeProject"; +import { writable } from "svelte/store"; +import { editor } from "$lib/components/editor/state"; export enum CanvasModes { Draw, - Editor + Editor, } export enum CanvasSupports { OnlyDraw, OnlyEditor, - Both + Both, } export const canvasSupports = writable(CanvasSupports.OnlyEditor); @@ -16,13 +19,36 @@ export const canvasModes = writable(CanvasModes.Editor); canvasSupports.subscribe((newSupports) => { canvasModes.update((currentMode) => { - if(newSupports == CanvasSupports.OnlyEditor && currentMode == CanvasModes.Draw) + if ( + newSupports == CanvasSupports.OnlyEditor && + currentMode == CanvasModes.Draw + ) return CanvasModes.Editor; - else if(newSupports == CanvasSupports.OnlyDraw && currentMode == CanvasModes.Editor) + else if ( + newSupports == CanvasSupports.OnlyDraw && + currentMode == CanvasModes.Editor + ) return CanvasModes.Draw; - else - return currentMode; - }) -}) - + else return currentMode; + }); +}); +activeView.subscribe((view) => { + if (view instanceof Component) { + canvasSupports.set(CanvasSupports.Both); + editor.change.set(view.declarations); + editor.push.set((code: string) => { + view.declarations = code; + }); + } else if (view instanceof System) { + canvasSupports.set(CanvasSupports.OnlyDraw); + } else if (view instanceof GlobalDeclarations) { + canvasSupports.set(CanvasSupports.OnlyEditor); + editor.change.set(view.declarations); + editor.push.set((code: string) => { + view.declarations = code; + }); + } else { + canvasSupports.set(CanvasSupports.OnlyEditor); + } +}); diff --git a/src/lib/components/editor/Editor.svelte b/src/lib/components/editor/Editor.svelte index 2fc553e0..7e9948b4 100644 --- a/src/lib/components/editor/Editor.svelte +++ b/src/lib/components/editor/Editor.svelte @@ -1,13 +1,16 @@ -
+