@marver-design/marver 0.16.1 → 0.18.0

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +93 -0
  2. package/README.md +3 -2
  3. package/dist/bake-jr38C_pX.mjs +747 -0
  4. package/dist/{build-B4yPgFNF.mjs → build-ER_7T6Cw.mjs} +179 -10
  5. package/dist/cli.mjs +21 -13
  6. package/dist/{comments-oYcZ3cE-.mjs → comments-ClVgfQib.mjs} +1 -1
  7. package/dist/{daemon-Bbh_jmui.mjs → daemon-CKhg0zuT.mjs} +1 -1
  8. package/dist/{dev-DH2W7Ffw.mjs → dev-BvLbY98O.mjs} +208 -9
  9. package/dist/{init-B7YhcN2o.mjs → init-BWbHqVng.mjs} +2 -2
  10. package/dist/{manifest-CaslQIAO.mjs → manifest-DAnEL8_a.mjs} +1 -1
  11. package/dist/{marver-id-gate-D6By7XHj.mjs → marver-id-gate-B_idGdHm.mjs} +1 -1
  12. package/dist/{plugin-BeBGu3gH.mjs → plugin-Cai5C1WV.mjs} +244 -47
  13. package/dist/{poster-CoyobbGW.mjs → poster-CIuz_PwH.mjs} +13 -5
  14. package/dist/publish-bakes-D0LhbQQ3.mjs +216 -0
  15. package/dist/{serve-Bcwfpvhl.mjs → serve-z5qtj_wJ.mjs} +3 -3
  16. package/dist/{share-Gqo_Ygqw.mjs → share--bdSc4G5.mjs} +1 -1
  17. package/dist/shot-BFEuYbaz.mjs +86 -0
  18. package/dist/shot-iicees2e.mjs +933 -0
  19. package/dist/{work-lzC-lPY0.mjs → work-0YopuMt9.mjs} +1 -1
  20. package/docs/live-jam.md +20 -8
  21. package/docs/publish.md +27 -5
  22. package/package.json +1 -1
  23. package/src/client/frame-host/bridge.js +4 -9
  24. package/src/client/frame-host/main.tsx +20 -6
  25. package/src/client/shell/App.tsx +7 -0
  26. package/src/client/shell/Comments.tsx +2 -2
  27. package/src/client/shell/canvas/Canvas.tsx +2 -2
  28. package/src/client/shell/canvas/FrameNode.tsx +82 -89
  29. package/src/client/shell/canvas/admission.ts +70 -0
  30. package/src/client/shell/canvas/sleep.ts +194 -0
  31. package/src/client/shell/store.ts +14 -0
  32. package/src/client/shell/styles.css +9 -25
  33. package/src/shared/sleep-rule.ts +41 -0
  34. package/templates/AGENTS-embedded.md +4 -1
  35. package/templates/AGENTS-studio.md +4 -1
  36. package/templates/instructions/craft.md +9 -0
  37. package/templates/instructions/jam.md +15 -3
  38. package/templates/instructions/publish.md +62 -9
  39. package/templates/instructions/shape.md +2 -1
  40. package/dist/shot-By1AItpD.mjs +0 -30
  41. package/dist/shot-z-d-zMzf.mjs +0 -528
  42. package/src/client/frame-host/serialize.ts +0 -195
  43. package/src/client/shell/canvas/snapshots.ts +0 -233
package/CHANGELOG.md CHANGED
@@ -2,6 +2,99 @@
2
2
 
3
3
  Notable changes to `@marver-design/marver`. Format follows [Keep a Changelog](https://keepachangelog.com); versions follow semver.
4
4
 
5
+ ## 0.18.0 - 2026-09-07
6
+
7
+ ### Changed
8
+
9
+ - **Hi-fi frames at rest sleep in place.** A frame on the canvas is one live document, awake
10
+ or asleep - the DOM-snapshot "lean" cover of earlier releases is gone. At rest, its CSS
11
+ animations pause and every `backdrop-filter` element (the glass that made a 4-frame hi-fi
12
+ board checkerboard at 20-70 % zoom) wears a static texture of its own filtered backdrop,
13
+ computed and certified pixel by pixel by the dev server in headless Chrome, under
14
+ `backdrop-filter: none` and a static `filter` (the containing block stays, the compositor
15
+ layer goes: a sleeping frame is one layer to raster, not thirty). Interact mode wakes the
16
+ frame by removing one `<style>`; laser, comment pins and selection work on the sleeping
17
+ document as it is. Nothing is copied, so nothing can shift at the transition: measured on
18
+ real frames in a window at 200 % zoom, 29 pixels of 5.2 million differ from the live paint
19
+ by more than 8 levels, none by more than 32. During a pan or a zoom the presented frames
20
+ stay whole where the live board leaves the frame body blank. The one residual: at a zoom
21
+ that puts a glass element on fractional device pixels, Chrome resamples the live effect
22
+ layer and paints the sleeping element at its true position, so its edge rows can differ by
23
+ up to 32 levels at the wake.
24
+ Markdown, image, slide and lo-fi frames have nothing to compile and never ask the server.
25
+ - Theme flips and resizes wake the frame first and sleep it again once it has settled at the
26
+ new theme or size; an edit (HMR) or a reload does the same under a new source generation, so
27
+ a texture can never outlive the source it describes.
28
+
29
+ - **Boards open in seconds, not minutes.** A board of 128 lo-fi frames went from 77-95 s to
30
+ under 8 s to fully ready, and its first frames show within the first second. Three causes,
31
+ three fixes: every frame evaluated the WHOLE prebundled icon package its scene imported one
32
+ icon from (`@phosphor-icons/react`: 3000 icons, 6.5 MB of JavaScript, ~400 ms per frame,
33
+ the entire boot of a lo-fi frame) - the dev server now unrolls icon barrel imports in design
34
+ sources to the per-icon modules the installed package's own barrel names (phosphor, lucide),
35
+ one line for one line;
36
+ all frames booted at once on one main thread and finished together, so nothing showed until
37
+ the last was done - frames are now admitted a few at a time, nearest the centre of the view
38
+ first; and the 10 s ready watchdog fired on every frame of a big board and renavigated it, so
39
+ every frame loaded twice - it now counts from admission. A frame reports ready when React
40
+ has committed, not when it was asked to render.
41
+
42
+ ### Added
43
+
44
+ - **Published canvases rest under the same certified glass.** `marver build` compiles every
45
+ published node's textures, in every theme, against the site it just built, and ships them with
46
+ it (`__mv/bakes/`); the static shell reads one index. A shared hi-fi board now pans and zooms
47
+ like the dev canvas (measured: 36-59 flat blocks per presented frame at worst, from 1139-1417).
48
+ Needs Chrome on the build machine; without one the build ships without textures and says so.
49
+ `--no-textures` / `MARVER_NO_TEXTURES=1` skip the compile.
50
+ - **Published glass was flat.** The CSS transform of a build kept only `-webkit-backdrop-filter`
51
+ on a rule that declared both, and Chromium then computed `backdrop-filter: none`: the sidebar
52
+ and header of every published hi-fi frame lost their blur. The build now puts the standard
53
+ declaration back beside the prefixed one.
54
+ - **Chrome in a build container.** A root build on Linux (a Dockerfile, Railway) gets
55
+ `--no-sandbox` and `--disable-dev-shm-usage` from marver itself; `MARVER_CHROME` still names
56
+ a browser marver does not find. The publish guides carry a Dockerfile with Chromium.
57
+ - **Published HTML frames never reported ready.** The build shipped the frame bridge without the
58
+ module it imports, so in a published canvas an HTML frame stayed "still loading" and neither
59
+ slept nor took laser or comments. Both files ship now.
60
+ - `POST /__mv/api/bakes` (owner-gated) compiles frames in batch; textures are cached on disk
61
+ under `design/.local/bakes/<generation>/` and served immutable. Identical asks share one
62
+ compile; a compile the source outran is dropped; two dev servers on one project keep their
63
+ own generations.
64
+
65
+ ### Caveats
66
+
67
+ - Only the dev canvas compiles (it needs Chrome): published canvases sleep with the animation
68
+ pause alone, their glass live as before.
69
+ - Glass inside glass, a glass element with a blend mode, and any frame whose paint at rest is
70
+ not a function of its URL (random data at boot, a clock) stay live - the compiler refuses
71
+ what it cannot certify, and `?awake=1` on the canvas URL keeps every frame live for comparison.
72
+
73
+ ## 0.17.0 - 2026-09-04
74
+
75
+ ### Added
76
+
77
+ - **Shots in batch.** `npx marver shot a b c`, `--scene <name>` or `--all` render many
78
+ frames as ONE operation: one headless browser, several frames at a time inside it
79
+ (`MARVER_SHOT_CONCURRENCY`, default up to 6 sized to the machine). `POST /api/shots`
80
+ and the jam inbox (`{"scene":...}`, `{"frames":[...]}`, `{"all":true}`) take the same
81
+ ask; every frame answers for itself (`results[]`, in the order asked). Measured on a
82
+ 31-frame canvas: 65 s of one-at-a-time calls becomes 8 s; a 5-frame scene, 10 s
83
+ becomes 2 s; a single shot, 2.1 s becomes 1.05 s.
84
+ - A capture that ran out of settle budget says so: `unsettled: true` and a note, instead
85
+ of a silently half-drawn PNG.
86
+
87
+ ### Fixed
88
+
89
+ - **A shot's Chrome could outlive the server** - Ctrl-C, a closed terminal or `kill -9`
90
+ mid-shot left a headless copy of the user's own Chrome running for ever, and on macOS
91
+ such a ghost can swallow every link the machine opens. The browser is now driven over
92
+ Chrome's debugging pipe, so it dies with the server however the server dies, and none
93
+ exists between shots. The first `marver dev` after upgrading kills the ghosts and
94
+ removes the profiles earlier versions left in the temp dir.
95
+ - Chrome starts and opens tabs several times faster: a stale `--disable-gpu` flag was
96
+ costing ~0.5 s per start and per tab.
97
+
5
98
  ## 0.16.1 - 2026-09-03
6
99
 
7
100
  ### Added
package/README.md CHANGED
@@ -45,6 +45,7 @@ Frames appear on the canvas the moment the files land. That's the loop.
45
45
  - **Prototype links.** `data-goto="scene/frame"` on any element links frames into a walkable prototype - across boards, too.
46
46
  - **Five ways to view a board.** The canvas (frames on a plane), the board (the same, tidy), **present** (`p`: a full-screen clickable walkthrough - `data-goto` navigates, arrows step, `[` / `]` cycle variants, laser, comments, theme and device pickers in the toolbar), **focus** (one frame as a document - the reading preset for specs), and **slides** (a deck). A published board names its landing view; a frame deep link opens straight into it.
47
47
  - **Content frames.** Specs, Mermaid diagrams, mood boards, and slides live on the same canvas as the screens - import `Doc`, `Md`, `Diagram`, `Img`, `Slide`, `Chart`, `Video` from `@marver-design/marver/content` and think a feature through before any pixels exist. Works in a repo with no app at all: idea first, design second.
48
+ - **Hi-fi at rest.** A frame at rest is its own live document, asleep: animations paused and every `backdrop-filter` element painted with a certified texture of its filtered backdrop (compiled by the dev server's headless Chrome), so a board of 30 glass screens pans like 30 statics and wakes pixel-identical on interact. Glass inside glass, blend modes and frames whose paint depends on random data or the clock stay live; `?awake=1` keeps every frame live for comparison.
48
49
  - **Charts and video in any frame.** `Chart` (Apache ECharts, SVG, still at rest) inherits the ink, typeface and accent of whatever frame it sits in - a Tailwind dashboard, a dark spec, a slide - sizes its type to the context and follows the layout on resize. `Video` is poster-first everywhere: click to play wherever the frame is live, `autoplay` for an ambient loop, `ratio` for vertical clips; omit the poster and marver renders one from the clip. A screen with a chart or a clip is still a screen.
49
50
  - **Copy as image.** Select a frame, press `i` - a 2x PNG of it lands on the clipboard, rendered by the same headless Chrome that serves `marver shot`; `⇧i` for 4x (a slide is 5120×2880). Paste into Slack, a doc, or a chat with your agent.
50
51
 
@@ -84,7 +85,7 @@ The trust boundary is hard: only comments written on the owner's machine trigger
84
85
 
85
86
  ## Working state
86
87
 
87
- The same glow, driven from the terminal. When your agent takes a request, it creates the frame files first, pins them on a board, and runs `npx marver work start <scene/frame ...>` - you see the work land on the canvas in seconds, watch it shimmer while subagents build in parallel, and see it settle on `work done`. Marks self-expire, so a crashed agent never leaves a frame glowing. And `npx marver shot <scene/frame> [--scale 4]` renders one frame headless to a PNG, so the agent can look at what it built before it says it is done - the same picture you get from the canvas's copy-as-image.
88
+ The same glow, driven from the terminal. When your agent takes a request, it creates the frame files first, pins them on a board, and runs `npx marver work start <scene/frame ...>` - you see the work land on the canvas in seconds, watch it shimmer while subagents build in parallel, and see it settle on `work done`. Marks self-expire, so a crashed agent never leaves a frame glowing. And `npx marver shot --scene <scene>` (or `<scene/frame ...>`, `--all`; `[--scale 4]`) renders frames headless to PNGs - a whole scene in one browser, several frames at a time - so the agent can look at what it built before it says it is done - the same picture you get from the canvas's copy-as-image.
88
89
 
89
90
  ## Commands
90
91
 
@@ -97,7 +98,7 @@ The same glow, driven from the terminal. When your agent takes a request, it cre
97
98
  | `npx marver share …` | The roster (owner): `add <who> [--role]` · `remove` · `block` / `unblock` · `general <mode>` · `list` · `requests` · `explain <who>` · `who` |
98
99
  | `npx marver comments …` | The agent's queue: `connect <url>` · `sync` · `list` · `reply` · `resolve` · `invite <email>` · `revoke <email>` |
99
100
  | `npx marver work …` | Working glow from the terminal: `start <scene/frame …>` · `done … \| --all` · `list` |
100
- | `npx marver shot <frame> [--scale 1-4]` | Render one frame headless and print the PNG path (needs `dev` running); 2x by default |
101
+ | `npx marver shot <frame ...> \| --scene <name> \| --all [--scale 1-4] [--json]` | Render frames headless and print the PNG paths (needs `dev` running); a scene is one browser, several frames at a time; 2x by default |
101
102
  | `npx marver boards [--json]` | The sidebar as the files say it is: folders, boards in reading order with their title, `order` and description, the landing board |
102
103
 
103
104
  ## Shortcuts