studiograph 1.3.48-next.256 → 1.3.48-next.258

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 (83) hide show
  1. package/dist/agent/prompts/system.md +1 -1
  2. package/dist/agent/skills/artifact-canvas/skill.md +45 -11
  3. package/dist/agent/skills/paged-documents/skill.md +139 -0
  4. package/dist/core/artifact-frame-document.js +42 -5
  5. package/dist/core/artifact-frame-document.js.map +1 -1
  6. package/dist/core/artifact-paged-css.d.ts +64 -0
  7. package/dist/core/artifact-paged-css.js +253 -0
  8. package/dist/core/artifact-paged-css.js.map +1 -0
  9. package/dist/services/artifact-render-export.js +38 -1
  10. package/dist/services/artifact-render-export.js.map +1 -1
  11. package/dist/web/_app/immutable/assets/FrameCanvas.Clh5Xdr7.css +1 -0
  12. package/dist/web/_app/immutable/chunks/-7LOWJ5Y2.js +1003 -0
  13. package/dist/web/_app/immutable/chunks/{DYgnwHOg2.js → B-uY3zuO2.js} +1 -1
  14. package/dist/web/_app/immutable/chunks/{CWG-y9-w.js → B8XHl9EK.js} +1 -1
  15. package/dist/web/_app/immutable/chunks/{CFdEW7jS.js → BIDJZcsH.js} +1 -1
  16. package/dist/web/_app/immutable/chunks/{DTFXQkH72.js → BO7MsOQX2.js} +1 -1
  17. package/dist/web/_app/immutable/chunks/{CaHSLY2h.js → BR1GPAJN.js} +1 -1
  18. package/dist/web/_app/immutable/chunks/{2Bo_WLZC2.js → BR5KzVCb2.js} +2 -2
  19. package/dist/web/_app/immutable/chunks/{DARsSmDf.js → BSY15j7D.js} +1 -1
  20. package/dist/web/_app/immutable/chunks/{B_e_--8G.js → BTKkBqq5.js} +1 -1
  21. package/dist/web/_app/immutable/chunks/{sebsq2OD.js → BU9mslRE.js} +1 -1
  22. package/dist/web/_app/immutable/chunks/{CNolO5W5.js → BVdGTVNf.js} +1 -1
  23. package/dist/web/_app/immutable/chunks/{CLI9Qq0s2.js → BWoHAjpo2.js} +1 -1
  24. package/dist/web/_app/immutable/chunks/{DFvxqEm4.js → B_KlSybw.js} +1 -1
  25. package/dist/web/_app/immutable/chunks/{CakP90Ok.js → BcOn4k3x.js} +1 -1
  26. package/dist/web/_app/immutable/chunks/{BS6bofI_2.js → BlHvXjKT2.js} +1 -1
  27. package/dist/web/_app/immutable/chunks/{DkYbx6r-2.js → Bq50axhP2.js} +1 -1
  28. package/dist/web/_app/immutable/chunks/{BgQcXl6F.js → BwyyK99Y.js} +1 -1
  29. package/dist/web/_app/immutable/chunks/{DaKZBloR.js → CoKqPphb.js} +1 -1
  30. package/dist/web/_app/immutable/chunks/{CEMruiGj2.js → CoalYjv42.js} +1 -1
  31. package/dist/web/_app/immutable/chunks/CrptwAmL.js +1 -0
  32. package/dist/web/_app/immutable/chunks/{C8YYE4wb.js → Cs68iqlo.js} +1 -1
  33. package/dist/web/_app/immutable/chunks/{YIEmA8Ps.js → D-PJHjQx.js} +1 -1
  34. package/dist/web/_app/immutable/chunks/{CjaYOhfB.js → D32svi9Q.js} +3 -3
  35. package/dist/web/_app/immutable/chunks/{CIIdBE6W.js → DG-X81Vg.js} +1 -1
  36. package/dist/web/_app/immutable/chunks/{ByG1qyz22.js → DO4zRqAg2.js} +1 -1
  37. package/dist/web/_app/immutable/chunks/{CTcg5a5m2.js → DQL-mfFn2.js} +2 -2
  38. package/dist/web/_app/immutable/chunks/{C_luomYa2.js → Dk353aR02.js} +1 -1
  39. package/dist/web/_app/immutable/chunks/{CWShjiGT2.js → DnocjwrH2.js} +1 -1
  40. package/dist/web/_app/immutable/chunks/{GbsuqMg5.js → Hm2UENIo.js} +1 -1
  41. package/dist/web/_app/immutable/chunks/{Cr9RZTbC.js → I7-KC1r_.js} +1 -1
  42. package/dist/web/_app/immutable/chunks/{B8JqyzRb.js → JPlrAsf4.js} +1 -1
  43. package/dist/web/_app/immutable/chunks/{JO4rJahL.js → Q9AYNO8l.js} +1 -1
  44. package/dist/web/_app/immutable/chunks/{DLfZJ9XR.js → R-0zV4T0.js} +1 -1
  45. package/dist/web/_app/immutable/chunks/{BW1lgJQ1.js → VkZVJKB6.js} +1 -1
  46. package/dist/web/_app/immutable/chunks/{0MiHNYmb.js → Ww8OaCQm.js} +1 -1
  47. package/dist/web/_app/immutable/chunks/{CnZjm2no.js → XkDomHzH.js} +1 -1
  48. package/dist/web/_app/immutable/chunks/{CaAYWYuF2.js → bVEJESE22.js} +1 -1
  49. package/dist/web/_app/immutable/chunks/kNHriaoI.js +1 -0
  50. package/dist/web/_app/immutable/chunks/{CqJXTNxL.js → mCPy-Il2.js} +1 -1
  51. package/dist/web/_app/immutable/chunks/{6-xkVmRH.js → rfaj6v1K.js} +1 -1
  52. package/dist/web/_app/immutable/chunks/{cfmNAPOY.js → t6e9GaCf.js} +1 -1
  53. package/dist/web/_app/immutable/chunks/{DDBddBel.js → vhu9IuFY.js} +1 -1
  54. package/dist/web/_app/immutable/chunks/{CCNoWdPJ.js → vs3FvWOC.js} +1 -1
  55. package/dist/web/_app/immutable/chunks/{DSf9ZgVN.js → wHBabQ1O.js} +2 -2
  56. package/dist/web/_app/immutable/entry/{app.rzxL80-Q.js → app.BlXgnMUX.js} +2 -2
  57. package/dist/web/_app/immutable/entry/start.BuULjoZu.js +1 -0
  58. package/dist/web/_app/immutable/nodes/{0.ChzDJ722.js → 0.C4-m_JPm.js} +2 -2
  59. package/dist/web/_app/immutable/nodes/{1.C0JXL17H.js → 1.BioAQ8tY.js} +1 -1
  60. package/dist/web/_app/immutable/nodes/{10.BO3H0S1L.js → 10.B7F3fa4p.js} +1 -1
  61. package/dist/web/_app/immutable/nodes/{11.CPSnhWqo.js → 11.Dvvy5bLO.js} +1 -1
  62. package/dist/web/_app/immutable/nodes/{12.BWF_GEdc.js → 12.lmPGCyLA.js} +1 -1
  63. package/dist/web/_app/immutable/nodes/{13.BV-IpphD.js → 13.a2x_nsGy.js} +1 -1
  64. package/dist/web/_app/immutable/nodes/{15.Bw7k3WO8.js → 15.obusqjFf.js} +1 -1
  65. package/dist/web/_app/immutable/nodes/{16.CNB7MAn7.js → 16.CU9zEka0.js} +1 -1
  66. package/dist/web/_app/immutable/nodes/{18.CqXPlfMe.js → 18.B7sEMDxO.js} +1 -1
  67. package/dist/web/_app/immutable/nodes/{19.BHnUgEBO.js → 19.ZPiSjvNy.js} +1 -1
  68. package/dist/web/_app/immutable/nodes/{2.DrFbtWgu.js → 2.BwIyMC0U.js} +4 -4
  69. package/dist/web/_app/immutable/nodes/{3.C5KF8QvU.js → 3.F0YY5Ax9.js} +1 -1
  70. package/dist/web/_app/immutable/nodes/{4.DdAcPORJ.js → 4.ri11eJ7Z.js} +3 -3
  71. package/dist/web/_app/immutable/nodes/{5.Crrnc4N6.js → 5.BlmgJaiY.js} +1 -1
  72. package/dist/web/_app/immutable/nodes/{6.CYtDxOxd.js → 6.C0TX_1fL.js} +1 -1
  73. package/dist/web/_app/immutable/nodes/{7.DvXlDlRF.js → 7.DsOY1l13.js} +1 -1
  74. package/dist/web/_app/immutable/nodes/{8.DtbsN98n.js → 8.DeVuJbXP.js} +1 -1
  75. package/dist/web/_app/immutable/nodes/{9.CpBLMuZJ.js → 9.BWayWdVm.js} +1 -1
  76. package/dist/web/_app/version.json +1 -1
  77. package/dist/web/index.html +13 -13
  78. package/package.json +1 -1
  79. package/dist/web/_app/immutable/assets/FrameCanvas.DYfzMiiv.css +0 -1
  80. package/dist/web/_app/immutable/chunks/B_tPmzBn.js +0 -1
  81. package/dist/web/_app/immutable/chunks/CE95PhAC2.js +0 -889
  82. package/dist/web/_app/immutable/chunks/CLEbm8Em.js +0 -1
  83. package/dist/web/_app/immutable/entry/start.DxzNhoAx.js +0 -1
@@ -242,7 +242,7 @@ The platform owns arrangement, stepping, and pagination — so **match the artif
242
242
  - **App / prototype** → a single `app` frame with fill geometry.
243
243
  - **Whiteboard** → a single `whiteboard` frame.
244
244
 
245
- After `create_artifact` / `patch_artifact`, the result reports the resolved frame structure (manifest) and any warnings — verify the frame count and per-frame layouts match what the user asked for (a deck is N `slides` frames, not one `app` frame); if they don't, or a warning fired, fix it before responding. Load the `artifact-canvas` skill before creating a canvas artifact. Canvas artifacts are graph entries that open in the center content well, with PDF, PNG, and HTML downloads available from the artifact toolbar. For 3D, data visualization, and animation, request curated local libraries in the bundle (`three`, `d3`, `motion`) rather than embedding CDN dependencies.
245
+ After `create_artifact` / `patch_artifact`, the result reports the resolved frame structure (manifest) and any warnings — verify the frame count and per-frame layouts match what the user asked for (a deck is N `slides` frames, not one `app` frame); if they don't, or a warning fired, fix it before responding. Load the `artifact-canvas` skill before creating a canvas artifact, and additionally the `paged-documents` skill before creating or editing a multi-page document (a `pages` frame) — it is the deep CSS Paged Media reference and requires you to render-and-inspect the result. Canvas artifacts are graph entries that open in the center content well, with PDF, PNG, and HTML downloads available from the artifact toolbar. For 3D, data visualization, and animation, request curated local libraries in the bundle (`three`, `d3`, `motion`) rather than embedding CDN dependencies.
246
246
 
247
247
  ### Tool Selection
248
248
 
@@ -10,6 +10,37 @@ Use this skill when the user asks for a visual or interactive output that should
10
10
 
11
11
  An artifact is an **ordered list of frames** (the Figma/Paper artboard sense). Each frame owns its own content and geometry; the **platform** owns the arrangement (a tidy row-major grid), the present/export sequence, the stepper, scaling, and all canvas chrome. You author **content per frame** — you never write deck/stepper/grid machinery yourself.
12
12
 
13
+ ## Choose the artifact type FIRST (route the prompt)
14
+
15
+ Before you build anything, decide which kind of artifact the prompt is asking for. This one decision drives the frame count, the layout, and the whole bundle — getting it wrong (a document built as one `app` frame, a deck built as a single frame, a one-page flyer paying the pagination cost) is the most common failure. Match the user's intent:
16
+
17
+ | The user is asking for… | Build | Layout & frame count | Notes |
18
+ |---|---|---|---|
19
+ | a presentation, slide deck, pitch | a **deck** | one `slides` frame **per slide** (N → N frames) | stepped in present; never one frame for the whole deck |
20
+ | a **flowing** document — letter, contract, report, proposal, agreement of continuous / variable-length text | a **paginated document** | **ONE** `pages` frame holding the whole body | the platform auto-flows + paginates it (Paged.js). Never one frame per page. **Load `paged-documents`.** |
21
+ | a **fixed single page** — flyer, poster, invoice, certificate, cover, menu, one-page letter | an **artboard** | one `artboard` frame at the page size | you compose it to fit; no Paged.js |
22
+ | a **composed multi-page** document — brochure, multi-page form, designed report where each page is its own layout | **artboards** | one `artboard` frame **per page** (N → N frames) | each page composed by hand; exports an N-page PDF; no Paged.js |
23
+ | a social graphic, banner, ad, diagram, chart, infographic | an **artboard** | one `artboard` frame at its fixed size | the canvas size IS the design |
24
+ | an app screen, prototype, UI mockup, tool, calculator, dashboard, landing page | an **app** | one `app` frame (`fill`, or fixed width + `fill` height) | single frame; reflows/interacts |
25
+ | a brainstorm, mind-map, moodboard, concept map, freeform layout | a **whiteboard** | one large `whiteboard` frame | absolute placement, pannable |
26
+
27
+ ### Documents — FLOW vs COMPOSE (this picks `pages` vs `artboard`)
28
+
29
+ For anything document-shaped, the decision that matters is: does the platform need to **flow** a continuous text stream, or are you **composing** the pages yourself?
30
+
31
+ - **FLOW → `pages` (Paged.js).** ONE continuous content stream that the platform fragments across as many pages as the text needs — used precisely *because* you don't want to decide where the breaks fall (a long contract, a report of unknown length). Paged.js also repeats the letterhead on every page for free. **This is the only case that loads Paged.js** (~500KB + processing).
32
+ - **COMPOSE → `artboard` (no Paged.js).** Each page is a fixed surface you lay out yourself — **one** frame for a single page, **N** frames for a multi-page doc whose pages are each their own composition. Faster, exports one PDF page per frame; you place content per page and repeat any header per frame (a shared CSS class).
33
+
34
+ Deciding question: **"Do I want the platform to break a text stream into pages for me?"** Yes → `pages`. No (it's one page, or I'm composing each page) → `artboard`. The moment you'd be manually splitting flowing text into page-frames, switch to `pages`; the moment a "document" is really one fixed page, use `artboard` and skip the pagination cost.
35
+
36
+ Caveat: an `artboard` **crops** overflow (no pagination net) — use it for content you control to fit; if the length is uncertain, `pages` is safer. The verify loop catches a cropped artboard (`framesOverflowing`).
37
+
38
+ ### Other tie-breakers
39
+ - **Deck vs document:** a deck is *presented* (stepped, landscape, sparse slides); a document is *read or printed* (portrait pages, dense text, page numbers).
40
+ - **Artboard vs app:** an artboard is a fixed static surface; an app reflows and can be interactive.
41
+
42
+ A single artifact is almost always ONE type. Only mix layouts when the user genuinely asks for distinct things together; otherwise commit to one type and build it well.
43
+
13
44
  ## Workflow
14
45
 
15
46
  1. Gather the source material from the user's prompt and any relevant entries.
@@ -78,6 +109,8 @@ Each frame:
78
109
 
79
110
  **Letterhead, running headers & footers — use general CSS Paged Media.** A `pages` document is plain HTML/CSS — design it as richly as you like (full-bleed colored bands, logos, zebra-striped tables, multi-column footers). To make content **repeat on every page** (a letterhead, running header, footer, page numbers), use **standard CSS Paged Media** in a `shared` CSS file — the open, fully-flexible mechanism (Paged.js renders it). This is the PRIMARY way; aim for a real designed letterhead, not a plain text line.
80
111
 
112
+ > **Building a multi-page document, load the `paged-documents` skill first.** It is the deep, effective-use reference for the pagination layer — `@page` rules, named/cover pages, the page-margin-box **width** mechanics that decide whether a running header clips, running elements for real letterhead, page counters, break control, and the mandatory render-and-inspect verify loop. The summary below gets you started; that skill is how you do it *well*.
113
+
81
114
  - Mark an element as *running* and pull it into a page-margin box. Put the element once at the top of the frame `content`; it renders in the margin of EVERY page:
82
115
  ```css
83
116
  .letterhead { position: running(lh); }
@@ -89,12 +122,13 @@ Each frame:
89
122
  }
90
123
  ```
91
124
  You get the full surface: any of the 16 margin boxes (`@top-left`/`@bottom-right`/…), `:first`/`:left`/`:right` page selectors, named pages, counters.
92
- - **Full-bleed branded band** (a colored letterhead that runs edge-to-edge): set the side page margins to `0`, give the running element a background + fixed height, and pad the body itself:
125
+ - **Full-bleed branded band** (a colored letterhead that runs edge-to-edge): set the side page margins to `0`, give the running element a background + fixed height, and position its left/right parts with **`position:absolute`**. Do NOT use flex/table to spread them: that layout does NOT survive Paged.js's clone into the margin box (the parts collapse stacked + centered) — absolute children anchor to the band's edges and DO render correctly. (Verified by render.)
93
126
  ```css
94
- @page { margin: 104px 0 64px; @top-center { content: element(band); } }
95
- .band { position: running(band); height:104px; background:#16315c; color:#fff;
96
- display:flex; justify-content:space-between; align-items:center; padding:0 64px; }
97
- .doc { padding: 0 64px; } /* the body supplies its own side gutters */
127
+ @page { margin: 104px 0 64px; @top-center { content: element(band); } }
128
+ .band { position: running(band); height:104px; background:#16315c; color:#fff; }
129
+ .brand { position:absolute; left:64px; top:50%; transform:translateY(-50%); }
130
+ .addr { position:absolute; right:64px; top:50%; transform:translateY(-50%); text-align:right; }
131
+ .doc { padding: 0 64px; } /* the body supplies its own side gutters */
98
132
  ```
99
133
  - Anything you author this way **overrides the platform defaults** (the default margins + the auto page number) — you are in full control.
100
134
 
@@ -110,8 +144,8 @@ The platform also offers two **optional shortcuts** for the simple case; any aut
110
144
  ### Layouts
111
145
 
112
146
  - **`slides`** — a fixed-size deck frame (e.g. `1280×720` or `1920×1080`), stepped one at a time in present. One frame = one slide.
113
- - **`pages`** — a print/document frame. Give it a **fixed page-box width AND height** (US-Letter `816×1056`; Legal `816×1344`; Tabloid `1056×1632`; A4 `794×1123`; A3 `1123×1587`; A5 `559×794` — all @96dpi portrait; swap width/height for landscape) and put the **whole document body** in ONE `pages` frame's `content`. The platform **flows the text across as many pages as needed**, numbers them ("Page N of M"), and exports a real multi-page PDF. A fixed `pages` box does NOT crop — overflow flows onto the next page. Use `break-before: page` to force a new page (e.g. a new section/exhibit) and `break-inside: avoid` to keep a block together; for repeating letterhead/headers/footers style with **CSS Paged Media** (see "Letterhead, running headers & footers" above). This is the model for letters, contracts, proposals, agreements, and multi-page reports. (A `pages` frame with `height: "auto"` is the exception: it is NOT paginatedit renders as one tall continuous page. Use it only for a deliberately single, scroll-not-paginate document.)
114
- - **`artboard`** — a fixed-size design surface: banner, social graphic, diagram, poster.
147
+ - **`pages`** — a **flowing** print/document frame, the only layout that loads Paged.js. Use it when the platform should auto-flow a continuous text stream across pages. Give it a **fixed page-box width AND height** — any size @96dpi, portrait/landscape/arbitrary (common presets: US-Letter `816×1056`, Legal `816×1344`, Tabloid `1056×1632`, A4 `794×1123`, A3 `1123×1587`, A5 `559×794`) — and put the **whole document body** in ONE `pages` frame's `content`. The platform flows the text across as many pages as needed, numbers them, and exports a real multi-page PDF. A fixed `pages` box does NOT crop — overflow flows onto the next page. Use `break-before: page` to force a new page and `break-inside: avoid` to keep a block together; for repeating letterhead, **load the `paged-documents` skill**. The model for letters, contracts, proposals, agreements, and variable-length reports. (A `pages` frame with `height: "auto"` is NOT paginated and does not load Paged.js — one tall continuous page; use it for a deliberately single scroll.) **If the document is one fixed page, or pages you compose by hand, use `artboard` instead** (no Paged.js) — see the router.
148
+ - **`artboard`** — a **fixed-size composed surface**: a banner, social graphic, diagram, or poster, AND the non-paginated document surface — a single fixed page (flyer, invoice, certificate, one-pager) as ONE `artboard` frame, or a multi-page document you compose page-by-page as N `artboard` frames (one per page, exported as an N-page PDF). No Paged.js. A fixed `artboard` CROPS overflow, so design it to fit (or use `pages` if the length is uncertain).
115
149
  - **`app`** — a full-bleed responsive prototype / app screen. Use `geometry: { "width": "fill", "height": "fill" }` to span the whole viewport (content reflows). For a fixed-width app (a phone / tablet / sidebar mock), set a numeric `width` with `"height": "fill"` — the platform centers and letterboxes it at that width and fills height, rather than stretching edge-to-edge. An `app` artifact is single-frame.
116
150
  - **`whiteboard`** — one large pannable freeform surface (e.g. `2400×1600`). Opens at 100% centered and pans; no stepper. The platform draws a dot-grid surface; you place content (notes, diagrams, images) absolutely.
117
151
 
@@ -119,7 +153,7 @@ The platform also offers two **optional shortcuts** for the simple case; any aut
119
153
 
120
154
  `width` is a number (px) or `"fill"`. `height` is a number, `"auto"` (content-driven), or `"fill"`. `"fill"` = span the available viewport (single-frame `app`).
121
155
 
122
- **On a `pages` frame, a fixed page-box height does NOT crop — it paginates.** A multi-page document (letter, contract, proposal, report) is a `pages` frame with a fixed page-box width AND height (e.g. `816×1056`); the platform flows the overflow onto more pages. This is almost always what you want for a written document, so it can print on letterhead with page numbers. `height: "auto"` on a `pages` frame turns pagination OFF (one tall continuous page) — use it only when you deliberately want a single non-paginated scroll.
156
+ **On a `pages` frame, a fixed page-box height does NOT crop — it paginates.** A *flowing* multi-page document (a letter/contract/report whose text runs to an unknown length) is a `pages` frame with a fixed page-box width AND height (e.g. `816×1056`); the platform flows the overflow onto more pages and prints letterhead + page numbers. Reach for `pages` when you want that auto-flow; for a single fixed page or hand-composed pages, use `artboard` frames (no Paged.js) see the router. `height: "auto"` on a `pages` frame turns pagination OFF (one tall continuous page, no Paged.js) — for a deliberately single non-paginated scroll.
123
157
 
124
158
  **On a non-`pages` frame, a fixed numeric height CROPS content taller than it** — the frame is a hard box with `overflow:hidden`, so anything past the declared height is clipped from view. For a content-driven `app`/`artboard` surface whose length you can't predict, declare `height: "auto"` so it grows to fit; do NOT guess a tall fixed number (e.g. `4000`) "to be safe". Use a fixed numeric height for genuinely fixed surfaces (a `slides` deck, a poster/banner `artboard`) where the canvas size IS the design.
125
159
 
@@ -191,7 +225,7 @@ Each slide is one `slides` frame; the shared `deck.css` styles every frame; the
191
225
 
192
226
  ## Example — a flowing letterhead document (full-bleed band via CSS Paged Media)
193
227
 
194
- A letter, contract, or proposal is ONE `pages` frame at a fixed page size; the `content` is the whole body and the platform flows it across pages. The letterhead is a **running element** placed in a `@page` margin box, so it repeats on every page; side margins are `0` so the band runs edge-to-edge, and the body supplies its own gutters. (Page numbers come from the `@bottom-right` counter; `.foot` is a running footer.)
228
+ A *flowing* letter, contract, or proposal is ONE `pages` frame at a fixed page size; the `content` is the whole body and the platform flows it across pages. (A single fixed page or a multi-page document you compose by hand is an `artboard` instead — see the router; this example is the auto-flow case.) The letterhead is a **running element** in a `@page` margin box, so it repeats on every page; side margins are `0` so the band runs edge-to-edge, and the band's logo/address are placed with **`position:absolute`** (flex/table collapse inside a Paged.js margin box — verified). The footer is plain `@bottom-left`/`@bottom-right` margin boxes; the page size comes from `geometry`, so there is **no `@page { size }`**.
195
229
 
196
230
  ```json
197
231
  {
@@ -199,7 +233,7 @@ A letter, contract, or proposal is ONE `pages` frame at a fixed page size; the `
199
233
  "title": "Offer of Employment",
200
234
  "shared": {
201
235
  "files": {
202
- "doc.css": "*{box-sizing:border-box}body{margin:0;font:14px/1.6 -apple-system,Segoe UI,Roboto,sans-serif;color:#1f2937}.doc{padding:28px 64px}h2{color:#16315c;font-size:13px;letter-spacing:.06em;text-transform:uppercase;border-bottom:1px solid #e5e7eb;padding-bottom:6px;margin:22px 0 12px}p{margin:0 0 12px}table{width:100%;border-collapse:collapse;font-size:13px}td{padding:9px 12px;border-bottom:1px solid #eef2f7}tr:nth-child(odd) td{background:#f7f9fc}.band{position:running(band);height:104px;background:#16315c;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 64px}.brand{display:flex;align-items:center;gap:14px}.logo{width:40px;height:40px;border-radius:8px;background:#e8492b;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:22px}.brand b{font-size:22px}.brand small{display:block;color:#9fb3d1;font-size:10px;letter-spacing:.12em}.addr{text-align:right;font-size:11px;color:#cdd9ea}.foot{position:running(foot);display:flex;justify-content:space-between;font-size:10px;color:#9ca3af;padding:0 64px}.foot .c{color:#e8492b;font-weight:600}.exhibit{break-before:page}@page{size:816px 1056px;margin:104px 0 70px;@top-center{content:element(band)}@bottom-center{content:element(foot)}@bottom-right{content:\"Page \" counter(page) \" of \" counter(pages)}}"
236
+ "doc.css": "*{box-sizing:border-box}body{margin:0;font:14px/1.6 -apple-system,Segoe UI,Roboto,sans-serif;color:#1f2937}.doc{padding:28px 64px}h2{color:#16315c;font-size:13px;letter-spacing:.06em;text-transform:uppercase;border-bottom:1px solid #e5e7eb;padding-bottom:6px;margin:22px 0 12px}p{margin:0 0 12px}table{width:100%;border-collapse:collapse;font-size:13px}td{padding:9px 12px;border-bottom:1px solid #eef2f7}tr:nth-child(odd) td{background:#f7f9fc}.band{position:running(band);height:104px;background:#16315c;color:#fff}.brand{position:absolute;left:64px;top:34px}.logo{display:inline-block;width:40px;height:40px;border-radius:8px;background:#e8492b;color:#fff;text-align:center;line-height:40px;font-weight:800;font-size:22px;vertical-align:middle;margin-right:14px}.btxt{display:inline-block;vertical-align:middle}.btxt b{font-size:20px}.btxt small{display:block;color:#9fb3d1;font-size:10px;letter-spacing:.12em}.addr{position:absolute;right:64px;top:38px;text-align:right;font-size:11px;color:#cdd9ea;line-height:1.5}.exhibit{break-before:page}@page{margin:104px 0 70px;@top-center{content:element(band)}@bottom-left{content:\"Confidential\";font-size:10px;color:#9ca3af}@bottom-right{content:\"Page \" counter(page) \" of \" counter(pages);font-size:10px;color:#9ca3af}}"
203
237
  }
204
238
  },
205
239
  "frames": [
@@ -207,7 +241,7 @@ A letter, contract, or proposal is ONE `pages` frame at a fixed page size; the `
207
241
  "id": "letter",
208
242
  "layout": "pages",
209
243
  "geometry": { "width": 816, "height": 1056 },
210
- "content": "<div class=\"band\"><div class=\"brand\"><div class=\"logo\">A</div><div><b>Acme Inc.</b><small>PEOPLE &amp; TALENT</small></div></div><div class=\"addr\">1 Acme Plaza, Suite 800<br>San Francisco, CA 94105<br>hr@acmeinc.com</div></div><div class=\"foot\"><span class=\"c\">Confidential</span><span>Offer Letter — Jordan Lee</span><span>June 17, 2026</span></div><div class=\"doc\"><p style=\"color:#6b7280\">June 17, 2026</p><p><b>Jordan Lee</b><br>742 Evergreen Terrace<br>Portland, OR 97201</p><p>Dear Jordan,</p><p>On behalf of the entire team at Acme Inc., it is our great pleasure to extend this offer…</p><h2>Position Details</h2><table><tr><td>Job Title</td><td>Senior Product Manager</td></tr><tr><td>Start Date</td><td>July 14, 2026</td></tr></table><section class=\"exhibit\"><h2>Conditions of Employment</h2><p>…</p></section></div>"
244
+ "content": "<div class=\"band\"><div class=\"brand\"><span class=\"logo\">A</span><span class=\"btxt\"><b>Acme Inc.</b><small>PEOPLE &amp; TALENT</small></span></div><div class=\"addr\">1 Acme Plaza, Suite 800<br>San Francisco, CA 94105<br>hr@acmeinc.com</div></div><div class=\"doc\"><p style=\"color:#6b7280\">June 17, 2026</p><p><b>Jordan Lee</b><br>742 Evergreen Terrace<br>Portland, OR 97201</p><p>Dear Jordan,</p><p>On behalf of the entire team at Acme Inc., it is our great pleasure to extend this offer…</p><h2>Position Details</h2><table><tr><td>Job Title</td><td>Senior Product Manager</td></tr><tr><td>Start Date</td><td>July 14, 2026</td></tr></table><section class=\"exhibit\"><h2>Conditions of Employment</h2><p>…</p></section></div>"
211
245
  }
212
246
  ]
213
247
  }
@@ -0,0 +1,139 @@
1
+ ---
2
+ name: paged-documents
3
+ description: How to author multi-page print documents (letters, contracts, proposals, reports, briefs) WELL with CSS Paged Media — the platform paginates a `pages` frame with Paged.js. Deep technical know-how for @page rules, named/cover pages, page-margin boxes, running letterhead/headers/footers, page counters, and break control, plus the mandatory render-and-inspect verify loop. Load this whenever you build or edit a paginated document (a `pages` frame); it is the layer beneath any house-style skill.
4
+ loading: on-demand
5
+ ---
6
+
7
+ # Paged documents — using CSS Paged Media (Paged.js) well
8
+
9
+ Load this when you build or edit a **flowing** document: a single `pages` frame whose continuous text the platform fragments across pages with Paged.js (letters, contracts, proposals, agreements, reports, briefs, memos of variable / unknown length). The `artifact-canvas` skill covers the frame model; this skill is the deep, effective-use reference for the pagination layer. A workspace **house-style** skill (if one exists) sits ON TOP of this — that one carries the org's specific letterhead, type scale, and conventions; this one is the universal craft of making Paged Media render correctly.
10
+
11
+ **First check you actually need pagination.** `pages` + Paged.js is for AUTO-FLOWING a continuous stream across pages. If the document is a **single fixed page** (flyer, poster, invoice, certificate, one-pager) or a **multi-page document you compose page by page** (brochure, multi-page form, designed report), build it as `artboard` frame(s) instead — one frame per page — which skips Paged.js entirely (it's heavier and slower to load). See the router in `artifact-canvas`. Use this skill only when you want the platform to break a text stream into pages for you.
12
+
13
+ The single most important habit: **a document is print-bound — you cannot eyeball it like a deck. You MUST render and inspect it, then fix what the render shows, before you say it's done.** See "The verify loop" at the end. Most document defects (a clipped running header, a heading stranded at a page bottom, an orphaned rule) are invisible in the source and obvious in the render.
14
+
15
+ ## Mental model
16
+
17
+ You author **one ordinary HTML document body** plus **CSS Paged Media rules**. Paged.js fragments that one flowing body into as many fixed-size pages as the content needs, and repeats your letterhead/headers/footers on every page. You do NOT build pages by hand — no per-page frames, no page-height spacer divs, no manual page grid. Write the body once; write `@page` rules for the furniture; let the platform paginate.
18
+
19
+ ```
20
+ ONE <pages> frame ──Paged.js──▶ page 1 │ page 2 │ page 3 │ … (real multi-page PDF)
21
+ whole body each carries your @page margins + running header/footer + page number
22
+ ```
23
+
24
+ ## The platform contract (what we give you, what is fixed)
25
+
26
+ Your CSS reaches Paged.js from **shared `.css` files AND inline `<style>` in the frame `content`** — both are honored for `@page` / break / named-page / running-element rules. Relative `url()` (fonts, images) is fine; the platform handles it. Then:
27
+
28
+ - **Page SIZE is the frame `geometry` — ANY width × height, and the platform LOCKS it.** The page can be any size in px @96dpi, **portrait, landscape, or arbitrary** — there is no canonical "default." Common print presets (portrait; swap width↔height for landscape): US-Letter `816×1056`, Legal `816×1344`, Tabloid `1056×1632`, A4 `794×1123`, A3 `1123×1587`, A5 `559×794`. But a custom size is equally valid — a landscape report `1056×816`, a square `1000×1000`, a wide spread `1632×816`, a tall menu `612×1584`. Pick the geometry the document calls for. **Do NOT write `@page { size: … }`** (or `size: letter`) — the platform appends the authoritative `@page { size }` (your chosen geometry) LAST, so yours is ignored. Sizing the page is the geometry's job; everything else below is relative to it.
29
+ - **The platform gives you sensible defaults that your CSS overrides:** a default `@page { margin }` (from the frame's `pageMargins`, else top 96 / sides 72 / bottom 84) and a default **"Page N of M"** counter in `@bottom-right`. Write your own `@page { margin }` or your own margin-box content and yours wins.
30
+ - **Cascade order:** platform defaults → **your CSS** → page-size lock. So your `@page`/margin/break/running rules win over the defaults; only the page size is beyond your reach.
31
+ - **Fixed height is required to paginate.** A `pages` frame with a fixed height (e.g. `1056`) flows overflow onto more pages. A `pages` frame with `height: "auto"` does NOT paginate — it renders as one tall continuous page. Use `auto` only for a deliberately single, non-paginated scroll.
32
+
33
+ ## `@page` rules and named pages
34
+
35
+ The base page:
36
+
37
+ ```css
38
+ @page {
39
+ margin: 96px 72px 84px; /* top sides bottom — illustrative, NOT canonical */
40
+ }
41
+ ```
42
+
43
+ **Margins are a design choice relative to the page, not fixed numbers.** Scale them to the geometry and the document: a big page (Tabloid/A3) wants larger margins than an A5; a landscape page often wants more side margin than top/bottom; a bound document wants an asymmetric inner/outer margin (`@page :left` / `:right`). The top/bottom margins must also leave room for your running header/footer (a tall letterhead needs a taller top margin). The platform's fallback when you set none is top 96 / sides 72 / bottom 84 px — fine for a Letter-ish portrait, but choose your own for any other size. Everywhere below, **the content width is `page-width − left-margin − right-margin`** and any element you size to the column should be derived from the geometry you picked, never a copied constant.
44
+
45
+ **Named pages** give a specific page its own rules — the classic use is a **cover page with no running header/footer**, then a forced break into the body:
46
+
47
+ ```css
48
+ @page cover { margin: 0; } /* full-bleed cover */
49
+ @page cover { @top-left { content: none } @top-right { content: none } @bottom-right { content: none } }
50
+ .cover { page: cover; break-after: page; } /* this element is the cover; body starts on the next page */
51
+ ```
52
+
53
+ `@page :first`, `@page :left`, `@page :right`, and `@page :blank` also work (e.g. mirrored margins for a bound document, or suppressing furniture on the first page).
54
+
55
+ ## Page-margin boxes — left/right header text, and the width trap
56
+
57
+ A running header/footer of **short text** lives directly in margin-box slots. The top edge has these (the bottom mirrors them); each slot positions itself, so left + right text needs no layout work:
58
+
59
+ ```
60
+ @top-left-corner │ @top-left │ @top-center │ @top-right │ @top-right-corner
61
+ ```
62
+
63
+ **The reliable two-part header — separate slots, no width:**
64
+
65
+ ```css
66
+ @page {
67
+ @top-left { content: "Acme Inc." } /* sits at the left of the top margin */
68
+ @top-right { content: "Project Brief" } /* sits at the right */
69
+ @bottom-right { content: counter(page) }
70
+ }
71
+ ```
72
+
73
+ **The width trap (this is the #1 document bug).** The top row's width is the page width minus the corners, **shared** among `@top-left` / `@top-center` / `@top-right`, and each box sizes to its own content. **Never put `width: 100%` (or a wide fixed width) on one margin box** — it steals the whole row and crushes the others, so their text wraps into a sliver and **clips** (a header that should read "Cooper Hewitt Brand Refresh" renders as "Hewitt / Brand / Refresh", cut off — the exact bug). Margin boxes also do NOT grow or wrap gracefully; they clip. So: keep each slot's `content` **short** (a few words), and to get a full-width underline under the header, do NOT reach for `width: 100%` — use a running element for the rule (below).
74
+
75
+ ## Running elements — for ONE repeated block (band, logo, rule), not for spreading parts
76
+
77
+ `position: running(name)` pulls an element out of the body flow and `content: element(name)` drops it into a margin box, repeated on every page. Use it for a **single content block**: a full-bleed colored band, a logo lockup, a centered title, or a full-width rule. It is real HTML/CSS — backgrounds, borders, a fixed height.
78
+
79
+ **Verified Paged.js limitation — do not lay out multiple parts with flex inside a running element.** When the element is cloned into the margin box, its **`display:flex` / `justify-content:space-between` does NOT spread** — the children collapse to their intrinsic size, centered (`<span>Acme</span><span>Brief</span>` renders as "AcmeBrief" in the middle, not left+right). So:
80
+
81
+ - **Left vs right text with NO shared background → use the two margin boxes above** (`@top-left` + `@top-right`), never a flex running element.
82
+ - **A band WITH a shared background that needs left + right content (logo left, address right) → one running element, lay the parts out with `position:absolute`.** Flex and `display:table` both collapse in the clone; **absolute** children anchor to the band's box and DO render correctly. Use **fixed px offsets**, not percentages — the band's height is not definite in the clone, so `top:50%` escapes to the page; `top:34px` stays in the band. (Verified by render.)
83
+
84
+ ```css
85
+ .band { position: running(band); height: 104px; background: #16315c; color: #fff; }
86
+ .brand { position: absolute; left: 64px; top: 34px; } /* logo + name lockup (inline-block inside is fine) */
87
+ .addr { position: absolute; right: 64px; top: 38px; text-align: right; }
88
+ @page { margin: 110px 0 84px; @top-center { content: element(band) } } /* side margins 0 → band spans full width */
89
+ .doc { padding: 0 64px; } /* body supplies its own gutters */
90
+ ```
91
+
92
+ For a **first-page-only / last-page-only** variant, attach the element on a named page (`@page :first { @top-center { content: element(coverhead) } }`). Put the running element **once**, near the top of `content`; it does not appear inline.
93
+
94
+ Whatever you build here, **confirm it in the render** (verify loop below) — margin-box and running-element layout has non-obvious behavior (the flex caveat above is exactly why), so looking at the pixels is the only way to know it landed.
95
+
96
+ ## Page counters
97
+
98
+ `counter(page)` is the current page, `counter(pages)` the total. The platform defaults to "Page N of M" bottom-right; override it with your own:
99
+
100
+ ```css
101
+ @page { @bottom-right { content: counter(page); font: 7.5pt 'Brand'; color: #666 } }
102
+ ```
103
+
104
+ `target-counter(attr(href url), page)` resolves the page of a target — use it for a table of contents or cross-references ("see p. 4").
105
+
106
+ ## Break control (the craft that separates clean from sloppy)
107
+
108
+ - `break-before: page` / `break-after: page` — start a section/exhibit on a fresh page.
109
+ - `break-inside: avoid` — keep a block together (a figure + caption, a table row, a signature block, a heading + its first lines).
110
+ - `break-after: avoid` on headings — so a heading is never stranded alone at the bottom of a page with its content on the next.
111
+ - `orphans` / `widows` (e.g. `p { orphans: 2; widows: 2 }`) — no single dangling line of a paragraph across a page break.
112
+ - **Do NOT emit a divider (`<hr>`, a `border-top` separator) immediately before a forced `break-before` section.** The page break already IS the separator; the divider lands orphaned at the bottom of the prior page. Put separators BETWEEN in-flow sections only, not where a page break does the dividing.
113
+
114
+ ## Vertical rhythm and spacing
115
+
116
+ Give headings real breathing room and keep spacing consistent (a single scale: e.g. space below a section heading ≥ the space between paragraphs, so headers don't read as glued to their body). A label-column layout (section label left, body right) needs the label and the body's first line to share a baseline. The EXACT scale (sizes, leading, margins) is **house style** — defer to the workspace house-style skill if one exists; absent that, pick one scale and apply it everywhere rather than ad-hoc values per section.
117
+
118
+ ## The verify loop (mandatory — not optional for documents)
119
+
120
+ After `create_artifact` / `patch_artifact`, **`inspect_artifact` the document and READ the rendered pages**, then fix and re-inspect until clean. A `pages` frame paginates rather than cropping, so it never appears in `framesOverflowing` — that is exactly why you must look at the pixels. Check, on the render:
121
+
122
+ - **Running header/footer fully visible** on every page — not clipped or wrapped (clipping ⇒ a margin box is too narrow, usually a `width` hack; switch to a running element or shorten the text).
123
+ - **No stranded headings** at page bottoms and **no orphaned rules/dividers** at page edges.
124
+ - **Tables and blocks break sanely** (no row split mid-cell, no header row alone at a page bottom).
125
+ - **Cover/first page** furniture is suppressed if intended; page numbers run 1…N.
126
+ - **Margins and the letterhead** look right on page 2+ (page 1 often differs).
127
+
128
+ Do not describe the structure and stop. Render it, look at it, fix what you see. The most common real defects (clipped headers, orphaned dividers, stranded headings) are invisible in the markup and obvious in the render — one inspect pass catches them.
129
+
130
+ ## Quick checklist
131
+
132
+ - [ ] ONE `pages` frame, fixed width AND height — the size the document needs (portrait, landscape, or arbitrary; via geometry, no `@page { size }`).
133
+ - [ ] Margins scaled to that page size (not copied Letter numbers); top/bottom leave room for the letterhead.
134
+ - [ ] Letterhead / multi-part header / full-width rule → a **running element**, not margin-box `width` hacks.
135
+ - [ ] Margin-box text is short and fits.
136
+ - [ ] Cover/first page handled with a named page if it differs.
137
+ - [ ] `break-inside: avoid` on blocks that must stay together; `break-after: avoid` on headings; no divider right before a `break-before`.
138
+ - [ ] Consistent spacing scale (defer the exact scale to the house-style skill).
139
+ - [ ] **Rendered and inspected; the pages actually look right.**
@@ -20,6 +20,7 @@ import { computeFrameLayout, FRAME_LAYOUT_DEFAULT_GAP } from './artifact-frame-l
20
20
  import { escapeAttribute, escapeHtml, escapeScript, escapeStyle } from './artifact-escape.js';
21
21
  import { applyAssetResolution, artifactCsp } from './artifact-asset-resolution.js';
22
22
  import { brokenImageScriptTag, libraryTags } from './artifact-libraries.js';
23
+ import { SANITIZE_CSS_URLS_TWIN } from './artifact-paged-css.js';
23
24
  /** Artboard fill for a frame that opts into `neutral`. The DEFAULT (unset) is
24
25
  * transparent — the frame's appearance comes from its own content, so an opaque
25
26
  * slide never shows a white artboard peeking around its edges. Authors opt into
@@ -1027,7 +1028,7 @@ ${furniturePositionCss()}`;
1027
1028
  * page box to one PDF page (`preferCSSPageSize`) — no guillotine.
1028
1029
  *
1029
1030
  * Runs after the Paged.js source defines the UMD global. */
1030
- function paginationBootstrap(frames, artifactId, promote, sharedCss, renderId) {
1031
+ function paginationBootstrap(frames, artifactId, promote, sharedCss, renderId, hostedCanvas) {
1031
1032
  const configById = {};
1032
1033
  for (const frame of frames) {
1033
1034
  configById[frame.id] = {
@@ -1046,7 +1047,16 @@ function paginationBootstrap(frames, artifactId, promote, sharedCss, renderId) {
1046
1047
  const renderId = ${JSON.stringify(renderId)};
1047
1048
  const GAP = ${FRAME_LAYOUT_DEFAULT_GAP};
1048
1049
  const PROMOTE = ${JSON.stringify(promote)};
1049
- const SHARED_CSS = ${JSON.stringify(sharedCss)};
1050
+ const HOSTED_CANVAS = ${JSON.stringify(hostedCanvas)};
1051
+ // Runtime twin of the core sanitizer (src/core/artifact-paged-css.ts), injected
1052
+ // verbatim. Neutralizes every non-absolute url() to about:blank in the CSS handed
1053
+ // to Paged.js, because Paged.js calls new URL(value) (no base) on each url() token
1054
+ // and a scheme-less ref throws synchronously, aborting the whole pagination run.
1055
+ // Only the Paged-fed copy is sanitized — the head <style> keeps real url()s and
1056
+ // paints fonts/backgrounds. Runs AFTER asset resolution (the embedded SHARED_CSS
1057
+ // is already token-rewritten), so it can't fight the ?at= rewrite.
1058
+ ${SANITIZE_CSS_URLS_TWIN}
1059
+ const SHARED_CSS = sanitizeCssUrlsForPagination(${JSON.stringify(sharedCss)});
1050
1060
  const PAGINATE = ${JSON.stringify(configById)};
1051
1061
  const cssEscape = (value) => (window.CSS && CSS.escape) ? CSS.escape(value) : String(value);
1052
1062
  // The UMD global is Paged (paged.js) or PagedModule (paged.min.js).
@@ -1093,6 +1103,10 @@ function paginationBootstrap(frames, artifactId, promote, sharedCss, renderId) {
1093
1103
  if (!Paged || !Paged.Previewer) return;
1094
1104
  try { if (document.fonts && document.fonts.ready) await document.fonts.ready; } catch {}
1095
1105
  const expansions = [];
1106
+ // Frames whose pagination THREW (e.g. a CSS pattern Paged.js still chokes on).
1107
+ // Reported to the host so it can surface a non-blocking "couldn't paginate"
1108
+ // hint instead of silently showing a clipped, margin-less single page.
1109
+ const failed = [];
1096
1110
  for (const id of Object.keys(PAGINATE)) {
1097
1111
  const source = document.querySelector('[data-sg-frame-id="' + cssEscape(id) + '"]');
1098
1112
  if (!source || !source.parentNode) continue;
@@ -1150,12 +1164,17 @@ function paginationBootstrap(frames, artifactId, promote, sharedCss, renderId) {
1150
1164
  // too. Objects are CSS TEXT (no fetch under connect-src 'none').
1151
1165
  const sheets = [{ 'sg-pagination.css': cfg.css }];
1152
1166
  if (SHARED_CSS) sheets.push({ 'sg-shared.css': SHARED_CSS });
1153
- if (inlineCss) sheets.push({ 'sg-frame-inline.css': inlineCss });
1167
+ // Sanitize inline frame CSS too: a frame <style> with a relative url()
1168
+ // would crash Paged.js exactly like the shared sheet. (SHARED_CSS is
1169
+ // sanitized once up top.)
1170
+ const safeInlineCss = sanitizeCssUrlsForPagination(inlineCss);
1171
+ if (safeInlineCss) sheets.push({ 'sg-frame-inline.css': safeInlineCss });
1154
1172
  sheets.push({ 'sg-page-size.css': cfg.sizeCss });
1155
1173
  await previewer.preview(content, sheets, render);
1156
1174
  pageEls = Array.prototype.slice.call(render.querySelectorAll('.pagedjs_page'));
1157
1175
  } catch (error) {
1158
1176
  console.error('Artifact pagination failed for frame ' + id, error);
1177
+ failed.push({ id: id, reason: String((error && error.message) || error) });
1159
1178
  if (PROMOTE && render.parentNode) render.parentNode.removeChild(render);
1160
1179
  else source.innerHTML = content.innerHTML;
1161
1180
  continue; // leave the source frame as an un-paginated single flow
@@ -1211,6 +1230,24 @@ function paginationBootstrap(frames, artifactId, promote, sharedCss, renderId) {
1211
1230
  source.parentNode.removeChild(source);
1212
1231
  expansions.push({ sourceId: id, title: cfg.title, pages: reported });
1213
1232
  }
1233
+ // A document's author CSS usually sets a body background (the page color). The
1234
+ // bootstrap hoists the frame's inline style to head at runtime, so that rule wins
1235
+ // over the platform's transparent canvas and paints the WHOLE hosted surface
1236
+ // behind the page boxes -- the editor grid reads as a solid slab, the present
1237
+ // view loses its page separation -- instead of pages floating on the canvas.
1238
+ // Re-assert the transparent canvas LAST (after the hoisted author styles): the
1239
+ // page boxes keep their own background, so pages stay their page color and the
1240
+ // gaps show the canvas. HOSTED_CANVAS only (host iframe: editor grid + live
1241
+ // present), so standalone export / PDF / PNG -- where body IS the document
1242
+ // backdrop -- are untouched. Runs for both promote and present (present returns
1243
+ // just below). (Only document frames reach this bootstrap. NOTE: no backticks in
1244
+ // this string-built bootstrap -- they close the template literal.)
1245
+ if (HOSTED_CANVAS) {
1246
+ const canvasReset = document.createElement('style');
1247
+ canvasReset.setAttribute('data-sg-canvas-reset', '');
1248
+ canvasReset.textContent = 'html,body{background:transparent !important;}';
1249
+ document.head.appendChild(canvasReset);
1250
+ }
1214
1251
  if (!PROMOTE) return;
1215
1252
  // Renumber data-frame-index across all top-level frames in DOM order so
1216
1253
  // selection's frameIndex stays consistent after promotion.
@@ -1219,7 +1256,7 @@ function paginationBootstrap(frames, artifactId, promote, sharedCss, renderId) {
1219
1256
  // Always post — even with zero successful expansions — so the host knows
1220
1257
  // pagination has SETTLED and stops holding the reveal (a frame that failed
1221
1258
  // to paginate just renders as its un-paginated single flow).
1222
- try { parent.postMessage({ channel: 'studiograph-artifact', artifactId, type: 'frame-pages', renderId, expansions }, '*'); } catch {}
1259
+ try { parent.postMessage({ channel: 'studiograph-artifact', artifactId, type: 'frame-pages', renderId, expansions, failed }, '*'); } catch {}
1223
1260
  };
1224
1261
  if (document.readyState === 'loading') window.addEventListener('DOMContentLoaded', () => { paginate(); });
1225
1262
  else paginate();
@@ -1345,7 +1382,7 @@ export function buildFrameDocument(bundle, ctx) {
1345
1382
  whiteboardStandalone ? whiteboardStandaloneToolbarHtml() : '',
1346
1383
  deckStandalone ? deckStandaloneControlsHtml() : '',
1347
1384
  paginate.length ? `<script data-artifact-paged>${escapedPagedSource(ctx.pagedSource)}</script>` : '',
1348
- paginate.length ? `<script data-artifact-pagination>${escapeScript(paginationBootstrap(paginate, bundle.artifactId, promote, sharedCssText(bundle), ctx.renderId ?? ''))}</script>` : '',
1385
+ paginate.length ? `<script data-artifact-pagination>${escapeScript(paginationBootstrap(paginate, bundle.artifactId, promote, sharedCssText(bundle), ctx.renderId ?? '', ctx.host === 'iframe'))}</script>` : '',
1349
1386
  brokenImageScriptTag(),
1350
1387
  sharedScriptTags(bundle),
1351
1388
  ].filter(Boolean).join('\n');
@@ -1 +1 @@
1
- {"version":3,"file":"artifact-frame-document.js","sourceRoot":"","sources":["../../src/core/artifact-frame-document.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAExF,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAA6C,MAAM,4BAA4B,CAAC;AACrI,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAwB,MAAM,gCAAgC,CAAC;AACzG,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAA+B,MAAM,yBAAyB,CAAC;AAiDzG;;;kDAGkD;AAClD,MAAM,yBAAyB,GAAG,SAAS,CAAC;AAE5C;;;;;;;;;;kEAUkE;AAClE,MAAM,cAAc,GAAG,SAAS,CAAC;AACjC,MAAM,aAAa,GAAG,SAAS,CAAC;AAChC,MAAM,wBAAwB,GAC5B,GAAG,cAAc,sFAAsF,CAAC;AAC1G,MAAM,uBAAuB,GAC3B,GAAG,aAAa,yFAAyF,CAAC;AAC5G,SAAS,iBAAiB,CAAC,WAAyC;IAClE,OAAO,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,wBAAwB,CAAC;AACrF,CAAC;AAED;;;;;;;;;;;;;uCAauC;AACvC,MAAM,cAAc,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAW,CAAC;AACtE,MAAM,oBAAoB,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAW,CAAC;AAC5E,MAAM,QAAQ,GAAG,EAAE,KAAK,EA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CAAC,0BAA0B,EAAE,CAAC,CAAC,CAAC,EAAE;QAClD,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,+BAA+B,kBAAkB,CAAC,GAAG,CAAC,WAAY,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE;QACrG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,oCAAoC,YAAY,CAAC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,UAAU,EAAE,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,QAAQ,IAAI,EAAE,EAAE,GAAG,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE;QAC/M,oBAAoB,EAAE;QACtB,gBAAgB,CAAC,MAAM,CAAC;KACzB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE7B,OAAO,QAAQ,CAAC;+BACa,eAAe,CAAC,OAAO,CAAC;;EAErD,IAAI;;;EAGJ,IAAI;;QAEE,CAAC,CAAC;AACV,CAAC"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Sanitize author CSS before it is handed to Paged.js's `previewer.preview()`.
3
+ *
4
+ * WHY: Paged.js preprocesses every stylesheet it is given and calls
5
+ * `new URL(value)` — with NO base argument — on each `url()` token. A scheme-less
6
+ * / root-relative value (`url('/api/assets/x.otf')`, `url('./logo.png')`, a bare
7
+ * `url(foo.png)`, a protocol-relative `url('//cdn/x')`, or a fragment
8
+ * `url('#g')`) makes `new URL()` throw `TypeError: Failed to construct 'URL'`
9
+ * synchronously, which aborts the ENTIRE pagination run. The catch in the
10
+ * pagination bootstrap then falls back to an un-paginated, `overflow:hidden`,
11
+ * margin-less single page — the user-visible "single page, missing margins" bug.
12
+ *
13
+ * FIX: neutralize every NON-absolute `url()` token to `url(about:blank)` in the
14
+ * copy handed to Paged.js. We do NOT absolutize: this Paged-fed copy exists for
15
+ * `@page` / break / named-page / running-element rules, and the body content's
16
+ * fonts/backgrounds paint from the head `<style>` sheet (a separate reader that
17
+ * keeps the real `url()`s) — so neutralizing here is visually invisible for the
18
+ * common case. (Empirically verified: a same-family `@font-face{src:url(about:blank)}`
19
+ * does NOT shadow the valid head face — text keeps its font.) ACCEPTED LIMITATION:
20
+ * an image that lives ONLY in the Paged-generated structure and is styled by a rule
21
+ * only Paged.js applies — a relative `url()` background in an `@page` margin-box
22
+ * (`@bottom-right { background: url('./x.png') }`) or a `position:running()` element —
23
+ * is blanked here (the head sheet's `@page` rules aren't honored by native CSS). An
24
+ * *absolute* url() in those spots still paints; an `<img>`-based letterhead logo is
25
+ * untouched (the scanner only rewrites CSS `url()`, never element `src`). Net: a
26
+ * working multi-page document with one missing relative margin-box image, vs. the
27
+ * prior behavior where that same CSS crashed pagination entirely. This is why the
28
+ * decision is neutralize-not-absolutize (no base-URL coupling); see the plan's D2.
29
+ *
30
+ * "Absolute" = exactly what `new URL(value)` (no base) accepts without throwing:
31
+ * a value carrying a URI scheme (`data:`, `blob:`, `http:`, `https:`, `file:`,
32
+ * `about:`, …). Anything else throws in Paged.js and is neutralized here, so this
33
+ * helper's predicate mirrors the crash predicate one-to-one.
34
+ *
35
+ * The parser is a real `url()` token scanner (not a regex): it skips CSS comments
36
+ * and string literals so it never matches `url(` inside them, honors `\` escapes
37
+ * inside the value, and passes absolute tokens through VERBATIM so a `data:` URI
38
+ * containing parens is never corrupted.
39
+ *
40
+ * Out of scope: a `url(` token whose FUNCTION NAME is spelled with an identifier
41
+ * escape (`u\72l(...)`) is not recognized here, so a relative ref written that way
42
+ * would still reach Paged.js. No author or tool emits that; if it ever happens the
43
+ * pagination-failure backstop (the bootstrap catch → host "couldn't paginate" hint)
44
+ * makes it observable rather than a silent clip — not a silent crash.
45
+ *
46
+ * RUNTIME TWIN: the pagination bootstrap can't import this module — it runs inside
47
+ * a sandboxed iframe. It injects {@link SANITIZE_CSS_URLS_TWIN} (a hand-mirror of
48
+ * this function, written with `String.raw` so no bundler helper like esbuild's
49
+ * `__name` and no escaping artifact can leak into the browser copy). The two are
50
+ * pinned together by `artifact-paged-css.parity.test.ts`, which runs both over a
51
+ * fixture set and asserts identical output — so a change to one that isn't
52
+ * mirrored in the other fails CI.
53
+ */
54
+ export declare function sanitizeCssUrlsForPagination(css: string): string;
55
+ /**
56
+ * The runtime twin of {@link sanitizeCssUrlsForPagination}, injected verbatim into
57
+ * the pagination bootstrap (which runs inside the sandboxed iframe and can't import
58
+ * this module). It defines a `sanitizeCssUrlsForPagination(css)` function with
59
+ * behavior identical to the exported helper above. Written with `String.raw` so
60
+ * regex escapes (`\s`, `\\`) and the helper's own logic survive untouched — and so
61
+ * no bundler-injected helper (esbuild `__name`, etc.) can leak in. Kept in lock-step
62
+ * with the canonical helper by the parity test.
63
+ */
64
+ export declare const SANITIZE_CSS_URLS_TWIN: string;