frameos-editor 2026.7.3 → 2026.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,8 +2,12 @@
2
2
 
3
3
  The [FrameOS](https://frameos.net) visual scene editor — the same node-graph editor the FrameOS
4
4
  backend ships — as an embeddable static bundle. No backend needed: the app catalog and app sources
5
- are embedded at build time, scenes go in and come back out as JSON over `postMessage`. JS app
6
- sources can be viewed and edited in the built-in Monaco editor.
5
+ are embedded at build time, scenes go in and come back out as JSON over `postMessage`. The editor
6
+ carries the full scene workspace: the node diagram plus side panels for scene settings, state
7
+ variables, the app catalog, events and raw scene JSON; app sources open in a Monaco editor modal.
8
+ When the [`frameos-wasm`](https://www.npmjs.com/package/frameos-wasm) package's assets are served
9
+ next to the bundle (at `./frameos-wasm/` relative to `dist/`), the Preview panel runs the edited
10
+ scenes live through the FrameOS WebAssembly runtime — canvas, scene state and runtime logs included.
7
11
 
8
12
  The package version always equals the FrameOS release it was built from.
9
13
 
@@ -36,7 +40,10 @@ editor.destroy()
36
40
 
37
41
  Parent → editor:
38
42
 
39
- - `{type: 'frameos-editor:init', scenes, sceneId?, mode?, width?, height?, interval?}`
43
+ - `{type: 'frameos-editor:init', scenes, sceneId?, mode?, width?, height?, interval?, theme?, previewProxyUrl?, description?}` —
44
+ `theme` is `'light' | 'dark'`; `previewProxyUrl` is an optional same-origin endpoint the in-editor wasm live
45
+ preview routes CORS-blocked HTTP requests through; `description` is the embedding page's description of the
46
+ scene, shown in the Scene settings panel
40
47
  - `{type: 'frameos-editor:get-scenes'}` — replies with a `:scenes` message
41
48
  - `{type: 'frameos-editor:select-scene', sceneId}`
42
49
 
@@ -45,6 +52,9 @@ Editor → parent:
45
52
  - `{type: 'frameos-editor:ready'}` — once listening (the helper auto-sends `init` on this)
46
53
  - `{type: 'frameos-editor:scenes', scenes}` — after every edit (debounced) and as the
47
54
  `:get-scenes` reply
55
+ - `{type: 'frameos-editor:save-screenshot', dataUrl, sceneId}` — the Preview panel captured a frame;
56
+ reply with `{type: 'frameos-editor:screenshot-saved', ok, error?, fallbackDownload?}` to store it
57
+ yourself, or stay silent and the editor downloads the PNG locally after a short timeout
48
58
 
49
59
  ## Demo
50
60
 
package/dist/index.html CHANGED
@@ -8,13 +8,19 @@
8
8
  // Serve this directory anywhere; asset URLs resolve relative to it.
9
9
  window.FRAMEOS_APP_CONFIG = { ingress_path: new URL('.', location.href).pathname.replace(/\/$/, '') }
10
10
  window.ESBUILD_LOAD_CHUNKS = function () {}
11
+ window.FRAMEOS_EMBEDDED_NO_BACKEND = true
12
+ // Default theme before the bundle loads; the embedding page can
13
+ // override it via the init message's `theme`.
14
+ const theme = window.matchMedia?.('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
15
+ document.documentElement.dataset.frameosTheme = theme
16
+ document.documentElement.style.colorScheme = theme
11
17
  </script>
12
- <link rel="stylesheet" href="./static/editor.css" />
18
+ <link rel="stylesheet" href="./static/editor-H74LRON2.css" />
13
19
  </head>
14
20
  <body>
15
21
  <div id="root"></div>
16
22
  <div id="modal" style="position: absolute; z-index: 10"></div>
17
23
  <div id="popper" style="position: absolute; z-index: 80"></div>
18
- <script type="module" src="./static/editor.js"></script>
24
+ <script type="module" src="./static/editor-VD5PEDR3.js"></script>
19
25
  </body>
20
26
  </html>