@marver-design/marver 0.17.0 → 0.19.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 (48) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/README.md +3 -1
  3. package/dist/bake-kaf5kGZ7.mjs +747 -0
  4. package/dist/{build-D_g53Bp2.mjs → build-7ed5H2vT.mjs} +215 -13
  5. package/dist/cli.mjs +19 -11
  6. package/dist/{comments-oYcZ3cE-.mjs → comments-ClVgfQib.mjs} +1 -1
  7. package/dist/{daemon-Bbh_jmui.mjs → daemon-DbHvLQUL.mjs} +1 -1
  8. package/dist/{dev-LnIISva5.mjs → dev-D3mP2x27.mjs} +205 -10
  9. package/dist/{init-B7YhcN2o.mjs → init-BQYCS3EU.mjs} +2 -2
  10. package/dist/{manifest-CaslQIAO.mjs → manifest-B01PSyDc.mjs} +34 -7
  11. package/dist/{marver-id-gate-D6By7XHj.mjs → marver-id-gate-B_idGdHm.mjs} +1 -1
  12. package/dist/{plugin-D2msH1cj.mjs → plugin-DI-7NAnx.mjs} +108 -29
  13. package/dist/{poster-BEjUcQP3.mjs → poster-DNh6N27C.mjs} +1 -1
  14. package/dist/publish-bakes-Dp-ZFk3d.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-BzQ0PXKH.mjs → shot-BFEuYbaz.mjs} +1 -1
  18. package/dist/{shot-DlmTO8AF.mjs → shot-DMDvDbeP.mjs} +14 -7
  19. package/dist/{work-lzC-lPY0.mjs → work-0YopuMt9.mjs} +1 -1
  20. package/docs/publish.md +27 -5
  21. package/docs/sticky-notes.md +43 -0
  22. package/package.json +2 -1
  23. package/src/client/content/diagram.tsx +27 -1
  24. package/src/client/content/index.tsx +2 -2
  25. package/src/client/content/md.ts +48 -0
  26. package/src/client/frame-host/bridge.js +4 -9
  27. package/src/client/frame-host/main.tsx +20 -6
  28. package/src/client/shell/App.tsx +14 -63
  29. package/src/client/shell/Comments.tsx +77 -14
  30. package/src/client/shell/Play.tsx +6 -3
  31. package/src/client/shell/canvas/Canvas.tsx +12 -3
  32. package/src/client/shell/canvas/FrameNode.tsx +99 -89
  33. package/src/client/shell/canvas/Sticky.tsx +284 -0
  34. package/src/client/shell/canvas/admission.ts +70 -0
  35. package/src/client/shell/canvas/sleep.ts +194 -0
  36. package/src/client/shell/goto.ts +72 -0
  37. package/src/client/shell/notes.ts +151 -0
  38. package/src/client/shell/store.ts +36 -18
  39. package/src/client/shell/styles.css +92 -25
  40. package/src/client/shell/tidy.ts +20 -2
  41. package/src/shared/sleep-rule.ts +41 -0
  42. package/templates/AGENTS-embedded.md +15 -0
  43. package/templates/AGENTS-studio.md +15 -0
  44. package/templates/instructions/craft.md +9 -0
  45. package/templates/instructions/publish.md +62 -9
  46. package/templates/instructions/shape.md +62 -0
  47. package/src/client/frame-host/serialize.ts +0 -195
  48. package/src/client/shell/canvas/snapshots.ts +0 -233
package/CHANGELOG.md CHANGED
@@ -2,6 +2,102 @@
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.19.0 - 2026-09-08
6
+
7
+ ### Added
8
+
9
+ - **Sticky notes.** A markdown file beside a frame (`cart.note.md` next to `cart.tsx`, `.jsx` or
10
+ `.html`) or a scene (`_note.md` in the scene directory) renders as a yellow note left of the
11
+ frame on the canvas - the scene's on the scene's first frame of the board, above the frame's
12
+ own. Markdown with the Md block's rules (`goto:` links jump to a frame, images from
13
+ `design/assets/`, raw HTML inert) and ` ```mermaid ` fences drawn hand-drawn. Comments pin on a
14
+ note's elements as on a frame's; a folded note parks its pins on its tab. Tidy keeps room for
15
+ notes. Every viewer folds a note at its corner and hides all with `N`; the choice stays in the
16
+ browser, never in the board file. Published and shared canvases carry the notes, their images
17
+ copied like any Md image. An edit to a note file updates the sticky in place; the frame is never
18
+ reloaded. Every diagram family wears the note's look - flowchart, sequence, state, class, ER,
19
+ pie, mindmap, timeline, gantt, journey, quadrant, git graph, block: hand-sketched boxes, one
20
+ yellow palette, handwriting labels (the Diagram block in content frames keeps its own theme).
21
+
22
+ ### Changed
23
+
24
+ - The manifest carries `note` on frames and scenes; the dev watcher regenerates it when a note
25
+ file changes.
26
+ - The agent contract (`design/AGENTS.md`, refreshed by `npx marver init`) and
27
+ `instructions/shape.md` teach sticky notes: what one is, when to write one, what it supports
28
+ (markdown, tables, `goto:` links, images, hand-drawn mermaid) and how it works.
29
+ - Markdown in content frames: text inside a raw `<script>`/`<style>` block is now escaped like
30
+ every other text, and the rendered HTML passes a tag and attribute allowlist before insertion.
31
+ Diagram source is judged after decoding escapes; image shapes and directives are refused.
32
+
33
+ ## 0.18.0 - 2026-09-07
34
+
35
+ ### Changed
36
+
37
+ - **Hi-fi frames at rest sleep in place.** A frame on the canvas is one live document, awake
38
+ or asleep - the DOM-snapshot "lean" cover of earlier releases is gone. At rest, its CSS
39
+ animations pause and every `backdrop-filter` element (the glass that made a 4-frame hi-fi
40
+ board checkerboard at 20-70 % zoom) wears a static texture of its own filtered backdrop,
41
+ computed and certified pixel by pixel by the dev server in headless Chrome, under
42
+ `backdrop-filter: none` and a static `filter` (the containing block stays, the compositor
43
+ layer goes: a sleeping frame is one layer to raster, not thirty). Interact mode wakes the
44
+ frame by removing one `<style>`; laser, comment pins and selection work on the sleeping
45
+ document as it is. Nothing is copied, so nothing can shift at the transition: measured on
46
+ real frames in a window at 200 % zoom, 29 pixels of 5.2 million differ from the live paint
47
+ by more than 8 levels, none by more than 32. During a pan or a zoom the presented frames
48
+ stay whole where the live board leaves the frame body blank. The one residual: at a zoom
49
+ that puts a glass element on fractional device pixels, Chrome resamples the live effect
50
+ layer and paints the sleeping element at its true position, so its edge rows can differ by
51
+ up to 32 levels at the wake.
52
+ Markdown, image, slide and lo-fi frames have nothing to compile and never ask the server.
53
+ - Theme flips and resizes wake the frame first and sleep it again once it has settled at the
54
+ new theme or size; an edit (HMR) or a reload does the same under a new source generation, so
55
+ a texture can never outlive the source it describes.
56
+
57
+ - **Boards open in seconds, not minutes.** A board of 128 lo-fi frames went from 77-95 s to
58
+ under 8 s to fully ready, and its first frames show within the first second. Three causes,
59
+ three fixes: every frame evaluated the WHOLE prebundled icon package its scene imported one
60
+ icon from (`@phosphor-icons/react`: 3000 icons, 6.5 MB of JavaScript, ~400 ms per frame,
61
+ the entire boot of a lo-fi frame) - the dev server now unrolls icon barrel imports in design
62
+ sources to the per-icon modules the installed package's own barrel names (phosphor, lucide),
63
+ one line for one line;
64
+ all frames booted at once on one main thread and finished together, so nothing showed until
65
+ the last was done - frames are now admitted a few at a time, nearest the centre of the view
66
+ first; and the 10 s ready watchdog fired on every frame of a big board and renavigated it, so
67
+ every frame loaded twice - it now counts from admission. A frame reports ready when React
68
+ has committed, not when it was asked to render.
69
+
70
+ ### Added
71
+
72
+ - **Published canvases rest under the same certified glass.** `marver build` compiles every
73
+ published node's textures, in every theme, against the site it just built, and ships them with
74
+ it (`__mv/bakes/`); the static shell reads one index. A shared hi-fi board now pans and zooms
75
+ like the dev canvas (measured: 36-59 flat blocks per presented frame at worst, from 1139-1417).
76
+ Needs Chrome on the build machine; without one the build ships without textures and says so.
77
+ `--no-textures` / `MARVER_NO_TEXTURES=1` skip the compile.
78
+ - **Published glass was flat.** The CSS transform of a build kept only `-webkit-backdrop-filter`
79
+ on a rule that declared both, and Chromium then computed `backdrop-filter: none`: the sidebar
80
+ and header of every published hi-fi frame lost their blur. The build now puts the standard
81
+ declaration back beside the prefixed one.
82
+ - **Chrome in a build container.** A root build on Linux (a Dockerfile, Railway) gets
83
+ `--no-sandbox` and `--disable-dev-shm-usage` from marver itself; `MARVER_CHROME` still names
84
+ a browser marver does not find. The publish guides carry a Dockerfile with Chromium.
85
+ - **Published HTML frames never reported ready.** The build shipped the frame bridge without the
86
+ module it imports, so in a published canvas an HTML frame stayed "still loading" and neither
87
+ slept nor took laser or comments. Both files ship now.
88
+ - `POST /__mv/api/bakes` (owner-gated) compiles frames in batch; textures are cached on disk
89
+ under `design/.local/bakes/<generation>/` and served immutable. Identical asks share one
90
+ compile; a compile the source outran is dropped; two dev servers on one project keep their
91
+ own generations.
92
+
93
+ ### Caveats
94
+
95
+ - Only the dev canvas compiles (it needs Chrome): published canvases sleep with the animation
96
+ pause alone, their glass live as before.
97
+ - Glass inside glass, a glass element with a blend mode, and any frame whose paint at rest is
98
+ not a function of its URL (random data at boot, a clock) stay live - the compiler refuses
99
+ what it cannot certify, and `?awake=1` on the canvas URL keeps every frame live for comparison.
100
+
5
101
  ## 0.17.0 - 2026-09-04
6
102
 
7
103
  ### Added
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  Screens, prototypes, specs, and now slide decks - all real code, all on one canvas, all shareable with people who sign in as themselves.
10
10
 
11
- [marver.design](https://marver.design) · [Slides](docs/slides.md) · [Live Jam](docs/live-jam.md) · [Deploying a canvas](docs/publish.md) · [Sharing](docs/sharing.md) · [Changelog](CHANGELOG.md) · [Contributing](CONTRIBUTING.md) · [Issues](https://github.com/TNEP4/marver/issues)
11
+ [marver.design](https://marver.design) · [Slides](docs/slides.md) · [Sticky notes](docs/sticky-notes.md) · [Live Jam](docs/live-jam.md) · [Deploying a canvas](docs/publish.md) · [Sharing](docs/sharing.md) · [Changelog](CHANGELOG.md) · [Contributing](CONTRIBUTING.md) · [Issues](https://github.com/TNEP4/marver/issues)
12
12
 
13
13
  ## Quickstart
14
14
 
@@ -45,6 +45,8 @@ 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
+ - **Sticky notes.** A markdown file beside a frame (`cart.note.md`) or a scene (`_note.md`) becomes a yellow note left of the frame on the canvas - what it is for, how two variations differ, an open question. Markdown, `goto:` links to frames, hand-drawn Mermaid; readers comment on a note's text like on a frame's, fold it to its corner, hide them all with `n`. Published canvases carry them.
49
+ - **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
50
  - **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
51
  - **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
52