Skip to content

The VS Code of video editing, built for agents.

TypeScript

Refactor JSX version handling and remove unused hook

konstantin-paulusf1282fb3ad12
diff --git a/apps/desktop/src/projects.ts b/apps/desktop/src/projects.ts
index 7b690c7b..f7734a61 100644
--- a/apps/desktop/src/projects.ts
+++ b/apps/desktop/src/projects.ts
@@ -470,7 +470,7 @@ function packageName(name: string): string {
}
// Types only: the editor supplies the runtime when it mounts the project.
-const JSX_VERSION = "^0.1.0";
+const JSX_VERSION = () => `^${app.getVersion()}`;
const SOLID_VERSION = "^1.9.10";
/**
@@ -509,7 +509,7 @@ const packageJson = (name: string, displayName: string): PackageJson => ({
main: "index.tsx",
scripts: { ...SCRIPTS },
devDependencies: {
- "@diffusionstudio/jsx": JSX_VERSION,
+ "@diffusionstudio/jsx": JSX_VERSION(),
"solid-js": SOLID_VERSION,
},
});
diff --git a/apps/web/src/engine/hooks/use-running.ts b/apps/web/src/engine/hooks/use-running.ts
deleted file mode 100644
index 57e22fd9..00000000
--- a/apps/web/src/engine/hooks/use-running.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import { createSignal, onCleanup, type Accessor } from 'solid-js';
-
-import { useEngineContext } from '../context';
-
-/** Reactive read of whether the engine's tick loop is running. */
-export function useRunning(): Accessor<boolean> {
- const engine = useEngineContext();
- const [running, setRunning] = createSignal(engine.running);
-
- onCleanup(engine.onRunningChange(setRunning));
-
- return running;
-}