diff --git a/packages/serpenta/package-lock.json b/packages/serpenta/package-lock.json index 090c919..ba9c118 100644 --- a/packages/serpenta/package-lock.json +++ b/packages/serpenta/package-lock.json @@ -32,7 +32,6 @@ "svelte": "^4.2.7", "svelte-check": "^3.6.0", "tailwindcss": "3.4.3", - "tsdoc-markdown": "^0.6.0", "typescript": "^5.0.0", "typescript-eslint": "^8.0.0", "vite": "^5.0.11", @@ -4678,18 +4677,6 @@ "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", "dev": true }, - "node_modules/tsdoc-markdown": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tsdoc-markdown/-/tsdoc-markdown-0.6.0.tgz", - "integrity": "sha512-5Xbdm+g+96fwEv8LCLs5c4iGkcrieKutvjiA7Edh3jVXmnOjT+h6l8FjJZPw/FTXsWWN9f5ZMdRIQkiHJ9UPMw==", - "dev": true, - "bin": { - "tsdoc": "bin/index.js" - }, - "peerDependencies": { - "typescript": "^5" - } - }, "node_modules/tslib": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", diff --git a/packages/serpenta/package.json b/packages/serpenta/package.json index 2f6d653..ecd02ad 100644 --- a/packages/serpenta/package.json +++ b/packages/serpenta/package.json @@ -69,7 +69,6 @@ "svelte": "^4.2.7", "svelte-check": "^3.6.0", "tailwindcss": "3.4.3", - "tsdoc-markdown": "^0.6.0", "typescript": "^5.0.0", "typescript-eslint": "^8.0.0", "vite": "^5.0.11", diff --git a/packages/serpenta/src/lib/appShell/SerpentaConfig.ts b/packages/serpenta/src/lib/appShell/SerpentaConfig.ts index 5e8bcb3..0333fdc 100644 --- a/packages/serpenta/src/lib/appShell/SerpentaConfig.ts +++ b/packages/serpenta/src/lib/appShell/SerpentaConfig.ts @@ -19,27 +19,23 @@ export interface SerpentaConfig { latest_timestamp?: Writable; generic_command_name?: string; - stores?: { - fsm_name?: string; - }; + fsm_store_name?: string; } export interface FinalizedContext { appWindow: any; pod_name: string; - grand_data_distributor: DataDistributor; + data_distributor: DataDistributor; window_engine: WindowEngine; command_invocation: CommandInvocation; grand_charter: Writable>; - big_error: Writable; + error_status: Writable; latest_timestamp: Writable; - generic_command_name: string; - stores: { - fsm_name: string; - }; + pod_command_name: string; + fsm_store_name: string; } export function defineConfig(config: SerpentaConfig): FinalizedContext { @@ -47,18 +43,16 @@ export function defineConfig(config: SerpentaConfig): FinalizedContext { appWindow: config.appWindow, pod_name: config.pod_name, - grand_data_distributor: config.grand_data_distributor, + data_distributor: config.grand_data_distributor, window_engine: config.window_engine, command_invocation: config.command_invocation, grand_charter: config.grand_charter || writable(new Map()), - big_error: config.big_error || writable(ErrorStatus.SAFE), + error_status: config.big_error || writable(ErrorStatus.SAFE), latest_timestamp: config.latest_timestamp || writable(0), - generic_command_name: config.generic_command_name || "send_command", - stores: { - fsm_name: config.stores?.fsm_name || "FSMState" - } + pod_command_name: config.generic_command_name || "send_command", + fsm_store_name: config.fsm_store_name || "FSMState" }; } diff --git a/packages/serpenta/src/lib/appShell/SerpentaShell.svelte b/packages/serpenta/src/lib/appShell/SerpentaShell.svelte index f99510a..63a4d9d 100644 --- a/packages/serpenta/src/lib/appShell/SerpentaShell.svelte +++ b/packages/serpenta/src/lib/appShell/SerpentaShell.svelte @@ -1,5 +1,4 @@ diff --git a/packages/serpenta/src/lib/components/control/TauriCommandButton.svelte b/packages/serpenta/src/lib/components/control/BackendCommandButton.svelte similarity index 100% rename from packages/serpenta/src/lib/components/control/TauriCommandButton.svelte rename to packages/serpenta/src/lib/components/control/BackendCommandButton.svelte diff --git a/packages/serpenta/src/lib/components/control/CommandButton.svelte b/packages/serpenta/src/lib/components/control/PodCommandButton.svelte similarity index 90% rename from packages/serpenta/src/lib/components/control/CommandButton.svelte rename to packages/serpenta/src/lib/components/control/PodCommandButton.svelte index d41ac1d..d5fcf9f 100644 --- a/packages/serpenta/src/lib/components/control/CommandButton.svelte +++ b/packages/serpenta/src/lib/components/control/PodCommandButton.svelte @@ -13,7 +13,7 @@ const commandInvoker = context.command_invocation; let send = async () => { - await commandInvoker.invokeCommand(context.generic_command_name, { cmdName: cmd, val }) + await commandInvoker.invokeCommand(context.pod_command_name, { cmdName: cmd, val }) .then(returned => { console.log(`Command ${cmd} sent with val: ${val}`); successCallback(returned); diff --git a/packages/serpenta/src/lib/components/data/Store.svelte b/packages/serpenta/src/lib/components/data/Store.svelte index c2f583e..0d0f2d8 100644 --- a/packages/serpenta/src/lib/components/data/Store.svelte +++ b/packages/serpenta/src/lib/components/data/Store.svelte @@ -4,7 +4,7 @@ const context = getSerpentaContext(); const latestTimestamp = context.latest_timestamp; - const gdd: DataDistributor = context.grand_data_distributor; + const gdd: DataDistributor = context.data_distributor; const STALE_DATA_TICKS = 10_000; export let datatype: string; diff --git a/packages/serpenta/src/lib/components/graphic/FSM.svelte b/packages/serpenta/src/lib/components/graphic/FSM.svelte index 4682848..6c1ce1f 100644 --- a/packages/serpenta/src/lib/components/graphic/FSM.svelte +++ b/packages/serpenta/src/lib/components/graphic/FSM.svelte @@ -2,7 +2,7 @@ import { onDestroy, onMount } from "svelte"; import { getSerpentaContext } from "$lib"; - const gdd = getSerpentaContext().grand_data_distributor; + const gdd = getSerpentaContext().data_distributor; let boot_state: SVGGElement; let est_con_state: SVGGElement; diff --git a/packages/serpenta/src/lib/components/page/BottomBar.svelte b/packages/serpenta/src/lib/components/page/BottomBar.svelte index bb642b9..a92194a 100644 --- a/packages/serpenta/src/lib/components/page/BottomBar.svelte +++ b/packages/serpenta/src/lib/components/page/BottomBar.svelte @@ -4,9 +4,9 @@ import type { Writable } from "svelte/store"; const context = getSerpentaContext(); - const gdd: DataDistributor = context.grand_data_distributor; - const bigErrorStatus: Writable = context.big_error; - const fsmStateName: string = context.stores.fsm_name; + const gdd: DataDistributor = context.data_distributor; + const bigErrorStatus: Writable = context.error_status; + const fsmStateName: string = context.fsm_store_name.fsm_name; const podName: string = context.pod_name; let time = new Date().toLocaleTimeString([], { diff --git a/packages/serpenta/src/lib/index.ts b/packages/serpenta/src/lib/index.ts index 806b37b..71ff258 100644 --- a/packages/serpenta/src/lib/index.ts +++ b/packages/serpenta/src/lib/index.ts @@ -1,6 +1,6 @@ // Reexport your entry components here -import CommandButton from "$lib/components/control/CommandButton.svelte"; -import TauriCommandButton from "$lib/components/control/TauriCommandButton.svelte"; +import CommandButton from "$lib/components/control/PodCommandButton.svelte"; +import TauriCommandButton from "$lib/components/control/BackendCommandButton.svelte"; import ToggleCommandButton from "$lib/components/control/ToggleCommandButton.svelte"; import Status from "$lib/components/data/Status.svelte"; import Battery from "$lib/components/graphic/Battery.svelte";