@drawnagency/primitives 0.1.118 → 0.1.119

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 (258) hide show
  1. package/dist/{chunk-O37AV27P.js → chunk-5JYHTHVR.js} +28 -0
  2. package/dist/{chunk-W72BPGR3.js → chunk-BZKHHUIN.js} +44 -8
  3. package/dist/{chunk-CEFFP3CH.js → chunk-G6O3TYPJ.js} +297 -83
  4. package/dist/{chunk-4NSOKEA7.js → chunk-HFHM4MNK.js} +12 -7
  5. package/dist/{chunk-RIITGTV3.js → chunk-LQHBC7C6.js} +37 -2
  6. package/dist/{chunk-VY3IFGE3.js → chunk-QAMAIDXZ.js} +1 -1
  7. package/dist/{chunk-HRX3XJBU.js → chunk-RIN2QCYJ.js} +9 -11
  8. package/dist/{chunk-ZOTRHHUB.js → chunk-UNFPATDE.js} +8 -10
  9. package/dist/{chunk-ERLIL4RU.js → chunk-YKKGVSJH.js} +35 -37
  10. package/dist/{chunk-67P34WNW.js → chunk-ZKVQMIMJ.js} +3 -20
  11. package/dist/collab/rebase.js +4 -5
  12. package/dist/components/chat/ChatComposer.d.ts +0 -4
  13. package/dist/components/chat/ChatComposer.d.ts.map +1 -1
  14. package/dist/components/chat/ChatPanel.d.ts +2 -3
  15. package/dist/components/chat/ChatPanel.d.ts.map +1 -1
  16. package/dist/components/chat/markdown.d.ts +2 -3
  17. package/dist/components/chat/markdown.d.ts.map +1 -1
  18. package/dist/components/editor/PagesModal.d.ts +0 -2
  19. package/dist/components/editor/PagesModal.d.ts.map +1 -1
  20. package/dist/components/editor/index.js +15 -19
  21. package/dist/components/primitives/index.js +11 -15
  22. package/dist/components/sections/brand-guide.js +10 -13
  23. package/dist/components/sections/register-schemas.js +16 -21
  24. package/dist/components/sections/register.js +16 -21
  25. package/dist/components/shell/AudienceChips.d.ts +1 -3
  26. package/dist/components/shell/AudienceChips.d.ts.map +1 -1
  27. package/dist/components/shell/EditorShell.d.ts +0 -34
  28. package/dist/components/shell/EditorShell.d.ts.map +1 -1
  29. package/dist/components/shell/SiteSettingsModal.d.ts.map +1 -1
  30. package/dist/hooks/useSortableNavRow.d.ts +1 -1
  31. package/dist/hooks/useSortableRow.d.ts +1 -1
  32. package/dist/index.js +83 -90
  33. package/dist/lib/index-ops.js +5 -6
  34. package/dist/lib/index.js +27 -32
  35. package/dist/lib/pages.d.ts +0 -2
  36. package/dist/lib/pages.d.ts.map +1 -1
  37. package/dist/lib/sidecars.js +2 -2
  38. package/dist/lib/site-validation.js +13 -14
  39. package/dist/lib/storage-tier.js +4 -4
  40. package/dist/schemas/index.js +42 -45
  41. package/dist/schemas/site-config.d.ts +1 -277
  42. package/dist/schemas/site-config.d.ts.map +1 -1
  43. package/package.json +2 -42
  44. package/src/components/chat/ChatComposer.tsx +0 -4
  45. package/src/components/chat/ChatPanel.tsx +2 -3
  46. package/src/components/chat/markdown.ts +2 -3
  47. package/src/components/editor/PagesModal.tsx +1 -15
  48. package/src/components/editor/StatusIndicator.tsx +4 -4
  49. package/src/components/shell/AudienceChips.tsx +1 -3
  50. package/src/components/shell/EditorShell.tsx +5 -113
  51. package/src/components/shell/SiteSettingsModal.tsx +0 -11
  52. package/src/lib/pages.ts +0 -22
  53. package/src/schemas/index.ts +0 -4
  54. package/src/schemas/site-config.ts +4 -32
  55. package/dist/chunk-4TZJZU2T.js +0 -92
  56. package/dist/chunk-DIMDRBFK.js +0 -11
  57. package/dist/chunk-FV7JQRCN.js +0 -94
  58. package/dist/chunk-IIDKW7AV.js +0 -41
  59. package/dist/chunk-JCDZAFX2.js +0 -224
  60. package/dist/chunk-MM7KZS5C.js +0 -30
  61. package/dist/chunk-QQ3S3P5P.js +0 -38
  62. package/dist/chunk-TEOAKGZA.js +0 -784
  63. package/dist/chunk-VAYZJKVR.js +0 -209
  64. package/dist/components/shell/DocInspector.d.ts +0 -18
  65. package/dist/components/shell/DocInspector.d.ts.map +0 -1
  66. package/dist/components/shell/DocumentEditorOverlay.d.ts +0 -29
  67. package/dist/components/shell/DocumentEditorOverlay.d.ts.map +0 -1
  68. package/dist/components/shell/DocumentPresentOverlay.d.ts +0 -30
  69. package/dist/components/shell/DocumentPresentOverlay.d.ts.map +0 -1
  70. package/dist/components/shell/SiteSettingsDecks.d.ts +0 -13
  71. package/dist/components/shell/SiteSettingsDecks.d.ts.map +0 -1
  72. package/dist/deck/DeckComponentView.d.ts +0 -13
  73. package/dist/deck/DeckComponentView.d.ts.map +0 -1
  74. package/dist/deck/DeckPlayer.d.ts +0 -26
  75. package/dist/deck/DeckPlayer.d.ts.map +0 -1
  76. package/dist/deck/DeckSlideView.d.ts +0 -17
  77. package/dist/deck/DeckSlideView.d.ts.map +0 -1
  78. package/dist/deck/DeckStage.d.ts +0 -16
  79. package/dist/deck/DeckStage.d.ts.map +0 -1
  80. package/dist/deck/components/DeckImage.d.ts +0 -14
  81. package/dist/deck/components/DeckImage.d.ts.map +0 -1
  82. package/dist/deck/components/DeckImageGrid.d.ts +0 -27
  83. package/dist/deck/components/DeckImageGrid.d.ts.map +0 -1
  84. package/dist/deck/components/DeckRichText.d.ts +0 -22
  85. package/dist/deck/components/DeckRichText.d.ts.map +0 -1
  86. package/dist/deck/components/DeckVideo.d.ts +0 -15
  87. package/dist/deck/components/DeckVideo.d.ts.map +0 -1
  88. package/dist/deck/editing.d.ts +0 -50
  89. package/dist/deck/editing.d.ts.map +0 -1
  90. package/dist/deck/flip.d.ts +0 -11
  91. package/dist/deck/flip.d.ts.map +0 -1
  92. package/dist/deck/index.d.ts +0 -24
  93. package/dist/deck/index.d.ts.map +0 -1
  94. package/dist/deck/index.js +0 -51
  95. package/dist/deck/layouts/CenteredTextLayout.d.ts +0 -12
  96. package/dist/deck/layouts/CenteredTextLayout.d.ts.map +0 -1
  97. package/dist/deck/layouts/ColumnSplitLayout.d.ts +0 -14
  98. package/dist/deck/layouts/ColumnSplitLayout.d.ts.map +0 -1
  99. package/dist/deck/layouts/FullBleedImageLayout.d.ts +0 -14
  100. package/dist/deck/layouts/FullBleedImageLayout.d.ts.map +0 -1
  101. package/dist/deck/media.d.ts +0 -33
  102. package/dist/deck/media.d.ts.map +0 -1
  103. package/dist/deck/tokens.d.ts +0 -22
  104. package/dist/deck/tokens.d.ts.map +0 -1
  105. package/dist/deck/useStageScale.d.ts +0 -10
  106. package/dist/deck/useStageScale.d.ts.map +0 -1
  107. package/dist/deck-builder/DeckBuilderApp.d.ts +0 -30
  108. package/dist/deck-builder/DeckBuilderApp.d.ts.map +0 -1
  109. package/dist/deck-builder/DeckBuilderTopBar.d.ts +0 -24
  110. package/dist/deck-builder/DeckBuilderTopBar.d.ts.map +0 -1
  111. package/dist/deck-builder/DeckChatPanel.d.ts +0 -45
  112. package/dist/deck-builder/DeckChatPanel.d.ts.map +0 -1
  113. package/dist/deck-builder/DeckEditor.d.ts +0 -37
  114. package/dist/deck-builder/DeckEditor.d.ts.map +0 -1
  115. package/dist/deck-builder/DeckLibrary.d.ts +0 -22
  116. package/dist/deck-builder/DeckLibrary.d.ts.map +0 -1
  117. package/dist/deck-builder/DeckSlideSurface.d.ts +0 -31
  118. package/dist/deck-builder/DeckSlideSurface.d.ts.map +0 -1
  119. package/dist/deck-builder/deck-api.d.ts +0 -76
  120. package/dist/deck-builder/deck-api.d.ts.map +0 -1
  121. package/dist/deck-builder/deck-chat-client.d.ts +0 -44
  122. package/dist/deck-builder/deck-chat-client.d.ts.map +0 -1
  123. package/dist/deck-builder/deck-chat-history.d.ts +0 -10
  124. package/dist/deck-builder/deck-chat-history.d.ts.map +0 -1
  125. package/dist/deck-builder/index.d.ts +0 -13
  126. package/dist/deck-builder/index.d.ts.map +0 -1
  127. package/dist/deck-builder/index.js +0 -1498
  128. package/dist/deck-builder/starter-deck.d.ts +0 -23
  129. package/dist/deck-builder/starter-deck.d.ts.map +0 -1
  130. package/dist/deck-builder/types.d.ts +0 -29
  131. package/dist/deck-builder/types.d.ts.map +0 -1
  132. package/dist/deck-builder/useSortableSlide.d.ts +0 -29
  133. package/dist/deck-builder/useSortableSlide.d.ts.map +0 -1
  134. package/dist/document/assets/fonts/albra-grotesk-bold.woff +0 -0
  135. package/dist/document/assets/fonts/albra-grotesk-regular.woff +0 -0
  136. package/dist/document/assets/fonts/kapra-neue-expanded-medium.woff +0 -0
  137. package/dist/document/assets/fonts/kapra-neue-expanded-regular.woff +0 -0
  138. package/dist/document/components/DocCoverPage.d.ts +0 -11
  139. package/dist/document/components/DocCoverPage.d.ts.map +0 -1
  140. package/dist/document/components/DocPage.d.ts +0 -10
  141. package/dist/document/components/DocPage.d.ts.map +0 -1
  142. package/dist/document/components/DocRail.d.ts +0 -28
  143. package/dist/document/components/DocRail.d.ts.map +0 -1
  144. package/dist/document/components/DocSectionPage.d.ts +0 -12
  145. package/dist/document/components/DocSectionPage.d.ts.map +0 -1
  146. package/dist/document/components/DocViewer.d.ts +0 -21
  147. package/dist/document/components/DocViewer.d.ts.map +0 -1
  148. package/dist/document/components/Wordmark.d.ts +0 -4
  149. package/dist/document/components/Wordmark.d.ts.map +0 -1
  150. package/dist/document/components/measure.d.ts +0 -7
  151. package/dist/document/components/measure.d.ts.map +0 -1
  152. package/dist/document/components/useDocPages.d.ts +0 -12
  153. package/dist/document/components/useDocPages.d.ts.map +0 -1
  154. package/dist/document/engine/blocks.d.ts +0 -2
  155. package/dist/document/engine/blocks.d.ts.map +0 -1
  156. package/dist/document/engine/harvest.d.ts +0 -3
  157. package/dist/document/engine/harvest.d.ts.map +0 -1
  158. package/dist/document/engine/masonry.d.ts +0 -26
  159. package/dist/document/engine/masonry.d.ts.map +0 -1
  160. package/dist/document/engine/paginate.d.ts +0 -43
  161. package/dist/document/engine/paginate.d.ts.map +0 -1
  162. package/dist/document/engine/settings.d.ts +0 -91
  163. package/dist/document/engine/settings.d.ts.map +0 -1
  164. package/dist/document/engine/types.d.ts +0 -44
  165. package/dist/document/engine/types.d.ts.map +0 -1
  166. package/dist/document/index.d.ts +0 -13
  167. package/dist/document/index.d.ts.map +0 -1
  168. package/dist/document/index.js +0 -1030
  169. package/dist/document/styles/document.css +0 -217
  170. package/dist/lib/deck-access.d.ts +0 -86
  171. package/dist/lib/deck-access.d.ts.map +0 -1
  172. package/dist/lib/deck-access.js +0 -58
  173. package/dist/lib/deck-dexie.d.ts +0 -88
  174. package/dist/lib/deck-dexie.d.ts.map +0 -1
  175. package/dist/lib/deck-dexie.js +0 -22
  176. package/dist/lib/deck-edit.d.ts +0 -67
  177. package/dist/lib/deck-edit.d.ts.map +0 -1
  178. package/dist/lib/deck-media-assets.d.ts +0 -27
  179. package/dist/lib/deck-media-assets.d.ts.map +0 -1
  180. package/dist/lib/deck-media-assets.js +0 -25
  181. package/dist/lib/deck-media-refs.d.ts +0 -35
  182. package/dist/lib/deck-media-refs.d.ts.map +0 -1
  183. package/dist/lib/deck-media-refs.js +0 -36
  184. package/dist/lib/deck-tool.d.ts +0 -25
  185. package/dist/lib/deck-tool.d.ts.map +0 -1
  186. package/dist/lib/deck-tool.js +0 -58
  187. package/dist/lib/document-input.d.ts +0 -25
  188. package/dist/lib/document-input.d.ts.map +0 -1
  189. package/dist/schemas/deck-meta.d.ts +0 -85
  190. package/dist/schemas/deck-meta.d.ts.map +0 -1
  191. package/dist/schemas/deck-meta.js +0 -64
  192. package/dist/schemas/deck.d.ts +0 -954
  193. package/dist/schemas/deck.d.ts.map +0 -1
  194. package/dist/schemas/deck.js +0 -65
  195. package/src/components/shell/DocInspector.tsx +0 -314
  196. package/src/components/shell/DocumentEditorOverlay.tsx +0 -179
  197. package/src/components/shell/DocumentPresentOverlay.tsx +0 -87
  198. package/src/components/shell/SiteSettingsDecks.tsx +0 -41
  199. package/src/deck/DeckComponentView.tsx +0 -28
  200. package/src/deck/DeckPlayer.tsx +0 -166
  201. package/src/deck/DeckSlideView.tsx +0 -38
  202. package/src/deck/DeckStage.tsx +0 -39
  203. package/src/deck/components/DeckImage.tsx +0 -38
  204. package/src/deck/components/DeckImageGrid.tsx +0 -254
  205. package/src/deck/components/DeckRichText.tsx +0 -111
  206. package/src/deck/components/DeckVideo.tsx +0 -81
  207. package/src/deck/editing.tsx +0 -201
  208. package/src/deck/flip.ts +0 -70
  209. package/src/deck/index.ts +0 -30
  210. package/src/deck/layouts/CenteredTextLayout.tsx +0 -29
  211. package/src/deck/layouts/ColumnSplitLayout.tsx +0 -69
  212. package/src/deck/layouts/FullBleedImageLayout.tsx +0 -58
  213. package/src/deck/media.tsx +0 -46
  214. package/src/deck/tokens.ts +0 -57
  215. package/src/deck/useStageScale.ts +0 -44
  216. package/src/deck-builder/DeckBuilderApp.tsx +0 -572
  217. package/src/deck-builder/DeckBuilderTopBar.tsx +0 -62
  218. package/src/deck-builder/DeckChatPanel.tsx +0 -334
  219. package/src/deck-builder/DeckEditor.tsx +0 -258
  220. package/src/deck-builder/DeckLibrary.tsx +0 -195
  221. package/src/deck-builder/DeckSlideSurface.tsx +0 -55
  222. package/src/deck-builder/deck-api.ts +0 -177
  223. package/src/deck-builder/deck-chat-client.ts +0 -129
  224. package/src/deck-builder/deck-chat-history.ts +0 -62
  225. package/src/deck-builder/index.ts +0 -12
  226. package/src/deck-builder/starter-deck.ts +0 -86
  227. package/src/deck-builder/types.ts +0 -24
  228. package/src/deck-builder/useSortableSlide.ts +0 -102
  229. package/src/document/assets/fonts/albra-grotesk-bold.woff +0 -0
  230. package/src/document/assets/fonts/albra-grotesk-regular.woff +0 -0
  231. package/src/document/assets/fonts/kapra-neue-expanded-medium.woff +0 -0
  232. package/src/document/assets/fonts/kapra-neue-expanded-regular.woff +0 -0
  233. package/src/document/components/DocCoverPage.tsx +0 -45
  234. package/src/document/components/DocPage.tsx +0 -40
  235. package/src/document/components/DocRail.tsx +0 -189
  236. package/src/document/components/DocSectionPage.tsx +0 -48
  237. package/src/document/components/DocViewer.tsx +0 -313
  238. package/src/document/components/Wordmark.tsx +0 -18
  239. package/src/document/components/measure.tsx +0 -133
  240. package/src/document/components/useDocPages.ts +0 -95
  241. package/src/document/engine/blocks.ts +0 -116
  242. package/src/document/engine/harvest.ts +0 -95
  243. package/src/document/engine/masonry.ts +0 -158
  244. package/src/document/engine/paginate.ts +0 -232
  245. package/src/document/engine/settings.ts +0 -125
  246. package/src/document/engine/types.ts +0 -64
  247. package/src/document/index.ts +0 -18
  248. package/src/document/styles/document.css +0 -217
  249. package/src/lib/deck-access.ts +0 -132
  250. package/src/lib/deck-dexie.ts +0 -190
  251. package/src/lib/deck-edit.ts +0 -196
  252. package/src/lib/deck-media-assets.ts +0 -57
  253. package/src/lib/deck-media-refs.ts +0 -67
  254. package/src/lib/deck-tool.ts +0 -95
  255. package/src/lib/document-input.ts +0 -57
  256. package/src/schemas/deck-meta.ts +0 -88
  257. package/src/schemas/deck.ts +0 -478
  258. package/dist/{chunk-DJABADOO.js → chunk-AJ2QOAZI.js} +3 -3
@@ -1,209 +0,0 @@
1
- // src/schemas/deck.ts
2
- import { z } from "zod";
3
- var DECK_STAGE_WIDTH = 1600;
4
- var DECK_STAGE_HEIGHT = 900;
5
- var DECK_SCHEMA_VERSION = 1;
6
- var DECK_MAX_SLIDES = 40;
7
- var DeckIdSchema = z.string().max(64, "must be 64 characters or fewer \u2014 a deck id is also a directory name").regex(/^[a-z0-9][a-z0-9-]*$/, "must be lowercase letters, digits and hyphens, starting with a letter or digit");
8
- var DECK_LAYOUT_TYPES = ["centeredText", "fullBleedImage", "columnSplit"];
9
- var DECK_COMPONENT_TYPES = ["richText", "image", "imageGrid", "video"];
10
- var DECK_MEDIA_KINDS = ["portal"];
11
- var DECK_SURFACES = ["base", "brand"];
12
- var DECK_OVERLAY_PLACEMENTS = ["sideLeft", "sideRight", "bottomBand"];
13
- var DECK_SPLIT_RATIOS = ["1-2", "2-1"];
14
- function vocabularyError(kind, types, field = "type") {
15
- return `unknown ${kind} ${field} \u2014 the deck runtime provides: ${types.map((t) => `"${t}"`).join(", ")}`;
16
- }
17
- var PortalMediaRefSchema = z.object({
18
- kind: z.literal("portal"),
19
- // Same charset as a deck id, for the same reason and one more: a media id
20
- // becomes a key into a plain object at resolve time, and `"__proto__"` parses
21
- // as a perfectly good string. Constrain it here rather than relying on every
22
- // resolver to be careful.
23
- id: z.string().max(120, "must be 120 characters or fewer").regex(/^[a-z0-9][a-z0-9-]*$/, "must be lowercase letters, digits and hyphens, starting with a letter or digit").describe("Media id from the portal's media library \u2014 the manifest key, not a filename, path or URL.")
24
- });
25
- var DeckMediaRefSchema = z.discriminatedUnion("kind", [PortalMediaRefSchema], {
26
- error: vocabularyError("media reference", DECK_MEDIA_KINDS, "kind")
27
- });
28
- var PARAGRAPH_MAX = 400;
29
- var BULLET_MAX = 160;
30
- var MAX_SPANS = 12;
31
- var DeckTextSpanSchema = z.strictObject({
32
- text: z.string().min(1).max(PARAGRAPH_MAX).describe("The span's literal text. Never HTML or markdown \u2014 the marks below are the only formatting there is."),
33
- bold: z.boolean().optional().describe("Renders the span at full ink weight. For the one phrase in a line that carries it."),
34
- italic: z.boolean().optional().describe("Renders the span italic. For titles of works and genuine emphasis, not decoration.")
35
- });
36
- function inlineText(maxChars) {
37
- return z.union([z.string().min(1).max(maxChars), z.array(DeckTextSpanSchema).min(1).max(MAX_SPANS)], {
38
- error: "must be plain text, or an array of { text, bold?, italic? } spans \u2014 deck rich text is structured, never HTML or markdown"
39
- });
40
- }
41
- function inlineLength(value) {
42
- return typeof value === "string" ? value.length : value.reduce((total, span) => total + span.text.length, 0);
43
- }
44
- var DeckRichTextSchema = z.object({
45
- type: z.literal("richText"),
46
- kicker: z.string().min(1).max(60).optional().describe("Short label above the heading, e.g. a campaign or section name. Rendered small, tracked and in the brand accent."),
47
- heading: z.string().min(1).max(120).optional().describe("The slide's primary line. Keep it to a phrase \u2014 it renders at display size on the 16:9 stage."),
48
- subheading: z.string().min(1).max(200).optional().describe("Secondary line under the heading. Optional; omit rather than repeating the heading."),
49
- paragraphs: z.array(inlineText(PARAGRAPH_MAX)).max(3).optional().describe(
50
- `Body copy, one entry per paragraph. Each is either a plain string or an array of { text, bold?, italic? } spans \u2014 use spans only where a phrase genuinely needs a mark. Never HTML or markdown; ${PARAGRAPH_MAX} characters per paragraph.`
51
- ),
52
- bullets: z.array(inlineText(BULLET_MAX)).max(6).optional().describe(
53
- `Short bullet lines, plain strings or span arrays like paragraphs. Prefer six or fewer so they stay legible at presentation size; ${BULLET_MAX} characters per line.`
54
- )
55
- }).superRefine((value, ctx) => {
56
- const hasContent = value.kicker !== void 0 || value.heading !== void 0 || value.subheading !== void 0 || (value.paragraphs?.length ?? 0) > 0 || (value.bullets?.length ?? 0) > 0;
57
- if (!hasContent) {
58
- ctx.addIssue({
59
- code: "custom",
60
- message: "a richText component needs at least one of kicker, heading, subheading, paragraphs or bullets"
61
- });
62
- }
63
- const capLines = (lines, max, field) => {
64
- lines?.forEach((line, i) => {
65
- const length = inlineLength(line);
66
- if (length > max) {
67
- ctx.addIssue({
68
- code: "custom",
69
- path: [field, i],
70
- message: `spans total ${length} characters \u2014 keep a ${field === "bullets" ? "bullet" : "paragraph"} to ${max} or fewer`
71
- });
72
- }
73
- });
74
- };
75
- capLines(value.paragraphs, PARAGRAPH_MAX, "paragraphs");
76
- capLines(value.bullets, BULLET_MAX, "bullets");
77
- });
78
- var DeckImageSchema = z.object({
79
- type: z.literal("image"),
80
- media: DeckMediaRefSchema.describe("The image to show. It fills its slot and is cropped to fit."),
81
- caption: z.string().min(1).max(120).optional().describe("Caption printed on a solid brand block along the image's bottom edge. Omit rather than restating the slide.")
82
- });
83
- var DeckImageGridItemSchema = z.object({
84
- media: DeckMediaRefSchema.describe("The tile's image."),
85
- caption: z.string().min(1).max(80).optional().describe("Shown on the tile on hover, and while the tile is expanded. A few words, not a sentence.")
86
- });
87
- var DeckImageGridSchema = z.object({
88
- type: z.literal("imageGrid"),
89
- items: z.array(DeckImageGridItemSchema).min(2, "an image grid needs at least two images \u2014 use the image component for one").max(12, "an image grid holds at most twelve images \u2014 past that a tile is too small to read at presentation size").describe(
90
- "The tiles, in order of importance. Two to twelve. They pack into masonry columns at their own aspect ratios \u2014 nothing is cropped and nothing is resized to match its neighbours \u2014 and the columns clip at the bottom of the slot if the stack runs past it, so put the frames that must be seen first."
91
- )
92
- });
93
- var DeckVideoSchema = z.object({
94
- type: z.literal("video"),
95
- media: DeckMediaRefSchema.describe("The video to play. Must reference portal-hosted media \u2014 a deck cannot embed an external player."),
96
- title: z.string().min(1).max(120).optional().describe("Label on a brand block across the bottom of the poster, before playback starts.")
97
- });
98
- var DeckComponentSchema = z.discriminatedUnion(
99
- "type",
100
- [DeckRichTextSchema, DeckImageSchema, DeckImageGridSchema, DeckVideoSchema],
101
- { error: vocabularyError("deck component", DECK_COMPONENT_TYPES) }
102
- );
103
- var CenteredTextLayoutSchema = z.object({
104
- type: z.literal("centeredText"),
105
- background: z.enum(DECK_SURFACES).default("base").describe("`base` puts the slide on the site's surface color; `brand` fills it with the brand primary and flips the ink."),
106
- content: DeckComponentSchema.describe("The single Deck Component this Layout centers.")
107
- });
108
- var DeckOverlayPanelSchema = z.object({
109
- placement: z.enum(DECK_OVERLAY_PLACEMENTS).default("sideLeft").describe(
110
- "`sideLeft`/`sideRight` put the panel in a full-height column over that edge of the image; `bottomBand` runs it full width across the bottom. Pick the side the image is emptiest on."
111
- ),
112
- content: DeckRichTextSchema.describe("The panel's text. It sits on the brand color, so keep it short \u2014 a kicker and a line or two.")
113
- });
114
- var FullBleedImageLayoutSchema = z.object({
115
- type: z.literal("fullBleedImage"),
116
- media: DeckMediaRefSchema.describe("The image filling the whole 16:9 stage. It is cropped to fit, so choose one that survives a wide crop."),
117
- overlay: DeckOverlayPanelSchema.optional().describe("Optional text panel over the image. Omit it for a slide that is purely the picture.")
118
- });
119
- var ColumnSplitLayoutSchema = z.object({
120
- type: z.literal("columnSplit"),
121
- ratio: z.enum(DECK_SPLIT_RATIOS).default("1-2").describe("`1-2` gives the left column a third of the stage and the right two thirds; `2-1` is the reverse. Give the media the larger side."),
122
- left: DeckComponentSchema.describe("The left column's Deck Component."),
123
- right: DeckComponentSchema.describe("The right column's Deck Component.")
124
- });
125
- var DeckLayoutSchema = z.discriminatedUnion(
126
- "type",
127
- [CenteredTextLayoutSchema, FullBleedImageLayoutSchema, ColumnSplitLayoutSchema],
128
- { error: vocabularyError("layout", DECK_LAYOUT_TYPES) }
129
- );
130
- var DeckSlideSchema = z.object({
131
- id: DeckIdSchema.describe("Stable slide id, unique within the deck. Reused across edits so revisions stay diffable."),
132
- title: z.string().min(1).max(80).optional().describe("Short label for the slide, used by the builder filmstrip and by slide-navigation labels. Not rendered on the stage."),
133
- layout: DeckLayoutSchema.describe("The full-slide arrangement. A slide must use exactly one Layout.")
134
- });
135
- var DeckSchema = z.object({
136
- schemaVersion: z.literal(DECK_SCHEMA_VERSION).describe(`Deck schema version. Always ${DECK_SCHEMA_VERSION}.`),
137
- id: DeckIdSchema.describe("Stable deck id \u2014 also the directory name on the decks branch."),
138
- title: z.string().min(1).max(120).describe("The deck's name, shown in the builder and in the deck's chrome."),
139
- slides: z.array(DeckSlideSchema).min(1, "a deck needs at least one slide").max(
140
- DECK_MAX_SLIDES,
141
- `a deck is capped at ${DECK_MAX_SLIDES} slides \u2014 split a longer story into several decks`
142
- ).describe(
143
- `Slides in presentation order, at most ${DECK_MAX_SLIDES}. The whole deck is re-emitted on every authoring turn and re-committed on every publish, so the cap bounds both the model's output and the size of a stored deck.`
144
- )
145
- }).superRefine((deck, ctx) => {
146
- const seen = /* @__PURE__ */ new Set();
147
- deck.slides.forEach((slide, i) => {
148
- if (seen.has(slide.id)) {
149
- ctx.addIssue({
150
- code: "custom",
151
- path: ["slides", i, "id"],
152
- message: `duplicate slide id "${slide.id}" \u2014 slide ids must be unique within a deck`
153
- });
154
- }
155
- seen.add(slide.id);
156
- });
157
- });
158
- function formatPath(path) {
159
- return path.reduce((acc, key) => {
160
- if (typeof key === "number") return `${acc}[${key}]`;
161
- return acc === "" ? String(key) : `${acc}.${String(key)}`;
162
- }, "");
163
- }
164
- function formatDeckIssues(error) {
165
- return error.issues.map((issue) => {
166
- const path = formatPath(issue.path);
167
- return path === "" ? issue.message : `${path}: ${issue.message}`;
168
- });
169
- }
170
- function parseDeck(input) {
171
- const result = DeckSchema.safeParse(input);
172
- return result.success ? { ok: true, deck: result.data } : { ok: false, errors: formatDeckIssues(result.error) };
173
- }
174
- function serializeDeck(deck) {
175
- return JSON.stringify(deck, null, 2) + "\n";
176
- }
177
-
178
- export {
179
- DECK_STAGE_WIDTH,
180
- DECK_STAGE_HEIGHT,
181
- DECK_SCHEMA_VERSION,
182
- DECK_MAX_SLIDES,
183
- DeckIdSchema,
184
- DECK_LAYOUT_TYPES,
185
- DECK_COMPONENT_TYPES,
186
- DECK_MEDIA_KINDS,
187
- DECK_SURFACES,
188
- DECK_OVERLAY_PLACEMENTS,
189
- DECK_SPLIT_RATIOS,
190
- PortalMediaRefSchema,
191
- DeckMediaRefSchema,
192
- DeckTextSpanSchema,
193
- DeckRichTextSchema,
194
- DeckImageSchema,
195
- DeckImageGridItemSchema,
196
- DeckImageGridSchema,
197
- DeckVideoSchema,
198
- DeckComponentSchema,
199
- CenteredTextLayoutSchema,
200
- DeckOverlayPanelSchema,
201
- FullBleedImageLayoutSchema,
202
- ColumnSplitLayoutSchema,
203
- DeckLayoutSchema,
204
- DeckSlideSchema,
205
- DeckSchema,
206
- formatDeckIssues,
207
- parseDeck,
208
- serializeDeck
209
- };
@@ -1,18 +0,0 @@
1
- import { type DocumentOptions } from "../../document";
2
- export interface DocInspectorProps {
3
- document: DocumentOptions;
4
- selection: {
5
- kind: "cover";
6
- } | {
7
- kind: "chunk";
8
- chunkId: string;
9
- title: string;
10
- depth?: number;
11
- };
12
- warnings: string[];
13
- onUpdateCover: (patch: Partial<DocumentOptions["cover"]>) => void;
14
- onUpdateMeta: (patch: Partial<DocumentOptions["meta"]>) => void;
15
- onUpdateSection: (chunkId: string, patch: Record<string, unknown>) => void;
16
- }
17
- export declare function DocInspector({ document: doc, selection, warnings, onUpdateCover, onUpdateMeta, onUpdateSection, }: DocInspectorProps): import("react/jsx-runtime").JSX.Element;
18
- //# sourceMappingURL=DocInspector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DocInspector.d.ts","sourceRoot":"","sources":["../../../src/components/shell/DocInspector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAYnE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,eAAe,CAAC;IAC1B,SAAS,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjG,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,KAAK,IAAI,CAAC;IAClE,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,KAAK,IAAI,CAAC;IAEhE,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CAC5E;AAwCD,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EAAE,GAAG,EACb,SAAS,EACT,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,eAAe,GAChB,EAAE,iBAAiB,2CAkBnB"}
@@ -1,29 +0,0 @@
1
- import type { Page } from "../../schemas/site-config";
2
- import type { MediaManifest } from "../../media/types";
3
- import type { LoadedSection } from "../../lib/loader";
4
- import { type DocumentOptions } from "../../document";
5
- import "../../document/styles/document.css";
6
- export interface DocumentEditorOverlayProps {
7
- /** The active page — its `document` block must be enabled for the FAB to mount. */
8
- page: Page;
9
- /**
10
- * The page's draft sections, in `page.order` order. The overlay drops
11
- * archived ones itself — /present renders only live sections, so a chunk the
12
- * published document will never show must not influence the proofed layout.
13
- */
14
- sections: LoadedSection[];
15
- manifest: MediaManifest;
16
- /** Wired by the shell to `setPageDocument` + the local-changes dirty flag. */
17
- onUpdateDocument: (patch: Partial<DocumentOptions>) => void;
18
- onClose: () => void;
19
- }
20
- /**
21
- * Full-viewport editing surface: DocViewer (edit mode, ghosts + selection) on
22
- * the left, DocInspector (settings for the current selection) on the right.
23
- *
24
- * The engine input is rebuilt from the live draft (page + in-memory sections +
25
- * manifest) on every prop change, so unsaved edits repaginate immediately —
26
- * the pagination hook's stale-heights guard absorbs the shape changes.
27
- */
28
- export declare function DocumentEditorOverlay({ page, sections, manifest, onUpdateDocument, onClose, }: DocumentEditorOverlayProps): import("react/jsx-runtime").JSX.Element;
29
- //# sourceMappingURL=DocumentEditorOverlay.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DocumentEditorOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/shell/DocumentEditorOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAOL,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AASxB,OAAO,oCAAoC,CAAC;AAE5C,MAAM,WAAW,0BAA0B;IACzC,mFAAmF;IACnF,IAAI,EAAE,IAAI,CAAC;IACX;;;;OAIG;IACH,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,QAAQ,EAAE,aAAa,CAAC;IACxB,8EAA8E;IAC9E,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IAC5D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,OAAO,GACR,EAAE,0BAA0B,2CA8H5B"}
@@ -1,30 +0,0 @@
1
- import type { Page } from "../../schemas/site-config";
2
- import type { MediaManifest } from "../../media/types";
3
- import type { LoadedSection } from "../../lib/loader";
4
- import "../../document/styles/document.css";
5
- export interface DocumentPresentOverlayProps {
6
- /** The active page — its `document` block supplies cover/meta/section settings. */
7
- page: Page;
8
- /**
9
- * The sections currently on the canvas (already page-ordered and filtered to
10
- * the branch being previewed). The shell derives these from the same
11
- * `computeDisplaySections` call the history/branch canvas renders.
12
- */
13
- sections: LoadedSection[];
14
- manifest: MediaManifest;
15
- onClose: () => void;
16
- }
17
- /**
18
- * Read-only, full-viewport document PRESENTATION of the content currently being
19
- * viewed — used when the shell is previewing a non-draft version (the published
20
- * branch). It is `DocViewer` in `present` mode: no inspector, no update path.
21
- *
22
- * Product decision (Drew): history/branch views are the record — we present them
23
- * but never open the editor over them. Document SETTINGS come from the current
24
- * draft's `page.document`; the previewed branch's own document index is not
25
- * carried in the shell's `viewSections`, so cover/meta/exclusions here reflect
26
- * the draft, not the historical commit. This is an accepted approximation: we
27
- * are rendering historical *content* with the draft's presentation settings.
28
- */
29
- export declare function DocumentPresentOverlay({ page, sections, manifest, onClose, }: DocumentPresentOverlayProps): import("react/jsx-runtime").JSX.Element;
30
- //# sourceMappingURL=DocumentPresentOverlay.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DocumentPresentOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/shell/DocumentPresentOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMtD,OAAO,oCAAoC,CAAC;AAE5C,MAAM,WAAW,2BAA2B;IAC1C,mFAAmF;IACnF,IAAI,EAAE,IAAI,CAAC;IACX;;;;OAIG;IACH,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,QAAQ,EAAE,aAAa,CAAC;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,GACR,EAAE,2BAA2B,2CA6C7B"}
@@ -1,13 +0,0 @@
1
- import type { SiteConfig } from "../../schemas/site-config";
2
- import type { Audience } from "../../auth/types";
3
- interface Props {
4
- siteConfig: SiteConfig;
5
- onSiteConfigChange: (config: SiteConfig) => void;
6
- audiences: Audience[];
7
- }
8
- /** Deck Builder settings. One control today — the creation opt-in — because
9
- * that is the only `deckBuilder` key that exists; public sharing (#37) is the
10
- * next one and belongs on this tab. */
11
- export declare function SiteSettingsDecks({ siteConfig, onSiteConfigChange, audiences }: Props): import("react/jsx-runtime").JSX.Element;
12
- export {};
13
- //# sourceMappingURL=SiteSettingsDecks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SiteSettingsDecks.d.ts","sourceRoot":"","sources":["../../../src/components/shell/SiteSettingsDecks.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,UAAU,KAAK;IACb,UAAU,EAAE,UAAU,CAAC;IACvB,kBAAkB,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IACjD,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED;;wCAEwC;AACxC,wBAAgB,iBAAiB,CAAC,EAAE,UAAU,EAAE,kBAAkB,EAAE,SAAS,EAAE,EAAE,KAAK,2CA2BrF"}
@@ -1,13 +0,0 @@
1
- import type { DeckTextSlot } from "../lib/deck-edit";
2
- import type { DeckComponent } from "../schemas/deck";
3
- interface Props {
4
- component: DeckComponent;
5
- /** The Layout slot this component fills — carried only so text leaves can
6
- * address themselves for inline editing (#39). Optional: a caller that omits
7
- * it gets the read-only render. */
8
- slot?: DeckTextSlot;
9
- }
10
- /** Dispatches a Deck Component onto its runtime implementation. */
11
- export declare function DeckComponentView({ component, slot }: Props): import("react/jsx-runtime").JSX.Element;
12
- export {};
13
- //# sourceMappingURL=DeckComponentView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeckComponentView.d.ts","sourceRoot":"","sources":["../../src/deck/DeckComponentView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAMrD,UAAU,KAAK;IACb,SAAS,EAAE,aAAa,CAAC;IACzB;;wCAEoC;IACpC,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,mEAAmE;AACnE,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,KAAK,2CAW3D"}
@@ -1,26 +0,0 @@
1
- import type { Deck, DeckMediaAsset, DeckMediaResolver } from "../schemas/deck";
2
- interface Props {
3
- deck: Deck;
4
- /** Slide to open on. Out-of-range values clamp into the deck. */
5
- initialSlide?: number;
6
- /** Window-level arrow/space/Home/End navigation. Off for thumbnails. */
7
- keyboard?: boolean;
8
- /** Turns media references into bytes. The Deck Builder injects the real one. */
9
- resolveMedia?: DeckMediaResolver;
10
- /**
11
- * Pre-resolved portal media, keyed by media id. The serializable form of the
12
- * same seam, for callers that cross an Astro island boundary — a function
13
- * prop cannot survive that trip. Ignored when `resolveMedia` is given.
14
- */
15
- mediaAssets?: Record<string, DeckMediaAsset>;
16
- className?: string;
17
- }
18
- /**
19
- * The deck runtime's presentation surface: one 16:9 stage plus slide
20
- * navigation. Deliberately self-contained — the Deck Builder, the in-portal
21
- * deck view and the Public Link view all mount this same component, so slide
22
- * state lives here rather than in any one of those shells.
23
- */
24
- export declare function DeckPlayer({ deck, initialSlide, keyboard, resolveMedia, mediaAssets, className }: Props): import("react/jsx-runtime").JSX.Element;
25
- export {};
26
- //# sourceMappingURL=DeckPlayer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeckPlayer.d.ts","sourceRoot":"","sources":["../../src/deck/DeckPlayer.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAK/E,UAAU,KAAK;IACb,IAAI,EAAE,IAAI,CAAC;IACX,iEAAiE;IACjE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gFAAgF;IAChF,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA6BD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,YAAgB,EAAE,QAAe,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,KAAK,2CA2GlH"}
@@ -1,17 +0,0 @@
1
- import type { DeckSlide } from "../schemas/deck";
2
- interface Props {
3
- slide: DeckSlide;
4
- }
5
- /**
6
- * Dispatches a slide onto its Layout. One slide uses exactly one Layout.
7
- *
8
- * Keyed by slide id, and that key is load-bearing rather than a lint nicety:
9
- * two slides sharing a Layout shape reconcile onto the SAME component
10
- * instances, so an expanded image-grid tile or a playing video on slide 1 was
11
- * inherited by slide 2 the moment you pressed the arrow key. The key forces the
12
- * subtree to remount, which is the only thing that makes a slide's interaction
13
- * state belong to that slide.
14
- */
15
- export declare function DeckSlideView({ slide }: Props): import("react/jsx-runtime").JSX.Element;
16
- export {};
17
- //# sourceMappingURL=DeckSlideView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeckSlideView.d.ts","sourceRoot":"","sources":["../../src/deck/DeckSlideView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAKjD,UAAU,KAAK;IACb,KAAK,EAAE,SAAS,CAAC;CAClB;AAcD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,2CAM7C"}
@@ -1,16 +0,0 @@
1
- import { type ReactNode } from "react";
2
- interface Props {
3
- children: ReactNode;
4
- /** Applied to the fit box, which is what the stage is scaled to fill. */
5
- className?: string;
6
- }
7
- /**
8
- * The 16:9 stage: a fixed logical canvas centered in — and scaled to fit — its
9
- * container, so slide contents are authored in px against one coordinate system
10
- * regardless of the viewport. Scaling by transform (rather than by a font-size
11
- * cascade) keeps every measurement, including line breaks, identical at every
12
- * size, which is what makes a screenshared deck look the same as its preview.
13
- */
14
- export declare function DeckStage({ children, className }: Props): import("react/jsx-runtime").JSX.Element;
15
- export {};
16
- //# sourceMappingURL=DeckStage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeckStage.d.ts","sourceRoot":"","sources":["../../src/deck/DeckStage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAK/C,UAAU,KAAK;IACb,QAAQ,EAAE,SAAS,CAAC;IACpB,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,KAAK,2CAoBvD"}
@@ -1,14 +0,0 @@
1
- import type { DeckImage as DeckImageContent } from "../../schemas/deck";
2
- interface Props {
3
- content: DeckImageContent;
4
- }
5
- /**
6
- * Deck Component — image.
7
- *
8
- * Fills its slot and crops. The caption is a solid brand block sitting on the
9
- * image's bottom edge rather than a gradient scrim: a scrim needs a literal
10
- * color to darken toward, and legibility here comes from the block.
11
- */
12
- export declare function DeckImage({ content }: Props): import("react/jsx-runtime").JSX.Element;
13
- export {};
14
- //# sourceMappingURL=DeckImage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeckImage.d.ts","sourceRoot":"","sources":["../../../src/deck/components/DeckImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAIxE,UAAU,KAAK;IACb,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,EAAE,KAAK,2CAsB3C"}
@@ -1,27 +0,0 @@
1
- import type { DeckImageGrid as DeckImageGridContent } from "../../schemas/deck";
2
- interface Props {
3
- content: DeckImageGridContent;
4
- }
5
- /**
6
- * Greedy shortest-column packing: each tile joins whichever column is currently
7
- * least tall, ties going left. With uniform aspect ratios that degenerates to
8
- * round-robin, which is what makes the simple cases look deliberate.
9
- */
10
- export declare function packMasonry(ratios: number[], columns: number): number[][];
11
- /**
12
- * Deck Component — image grid, and the runtime's signature interaction.
13
- *
14
- * Masonry columns: every image keeps its own aspect ratio, the column width
15
- * decides its height, and a stack that runs past the bottom of the slot is
16
- * clipped there. That clip is the point — on a fixed 16:9 stage a collage that
17
- * runs off the bottom edge reads better than one that crops every frame to a
18
- * uniform cell, and nothing may spill past the slot onto the rest of the slide.
19
- *
20
- * Hover lifts a tile; activating it expands that tile to fill the whole grid
21
- * region as a lightbox contained inside the slide (never a full-screen overlay
22
- * — the deck stays the deck). Activating again, the close affordance, or Escape
23
- * returns it. Tiles are real buttons, so keyboard activation is the browser's.
24
- */
25
- export declare function DeckImageGrid({ content }: Props): import("react/jsx-runtime").JSX.Element;
26
- export {};
27
- //# sourceMappingURL=DeckImageGrid.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeckImageGrid.d.ts","sourceRoot":"","sources":["../../../src/deck/components/DeckImageGrid.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,IAAI,oBAAoB,EAAqC,MAAM,oBAAoB,CAAC;AAKnH,UAAU,KAAK;IACb,OAAO,EAAE,oBAAoB,CAAC;CAC/B;AAqBD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,CAYzE;AAKD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE,KAAK,2CA0G/C"}
@@ -1,22 +0,0 @@
1
- import type { DeckTextSlot } from "../../lib/deck-edit";
2
- import type { DeckRichText as DeckRichTextContent } from "../../schemas/deck";
3
- interface Props {
4
- content: DeckRichTextContent;
5
- /**
6
- * Which slot of the enclosing Layout this component fills. Supplied only so a
7
- * text leaf can address itself for inline editing (#39); absent means "no
8
- * edit seam here", which is the read-only default every viewer surface gets.
9
- */
10
- slot?: DeckTextSlot;
11
- }
12
- /**
13
- * Deck Component — rich text.
14
- *
15
- * Every size is px against the 1600x900 stage; every color, family and radius
16
- * is a token (`--deck-*` are set by the enclosing Layout, see ./tokens.ts).
17
- * Fields are typographic roles, not markup: the schema carries plain strings
18
- * and marked spans, so nothing here interpolates HTML.
19
- */
20
- export declare function DeckRichText({ content, slot }: Props): import("react/jsx-runtime").JSX.Element;
21
- export {};
22
- //# sourceMappingURL=DeckRichText.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeckRichText.d.ts","sourceRoot":"","sources":["../../../src/deck/components/DeckRichText.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAkB,YAAY,IAAI,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9F,UAAU,KAAK;IACb,OAAO,EAAE,mBAAmB,CAAC;IAC7B;;;;OAIG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AA8BD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,KAAK,2CA2DpD"}
@@ -1,15 +0,0 @@
1
- import type { DeckVideo as DeckVideoContent } from "../../schemas/deck";
2
- interface Props {
3
- content: DeckVideoContent;
4
- }
5
- /**
6
- * Deck Component — video.
7
- *
8
- * Two states: a poster with a play affordance, and playback with the browser's
9
- * own controls. Nothing custom drives the media element once it is playing —
10
- * a presenter needs scrubbing and volume, and native controls are the ones
11
- * their keyboard already knows.
12
- */
13
- export declare function DeckVideo({ content }: Props): import("react/jsx-runtime").JSX.Element;
14
- export {};
15
- //# sourceMappingURL=DeckVideo.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeckVideo.d.ts","sourceRoot":"","sources":["../../../src/deck/components/DeckVideo.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAIxE,UAAU,KAAK;IACb,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,EAAE,KAAK,2CA8D3C"}
@@ -1,50 +0,0 @@
1
- import { type ReactNode } from "react";
2
- import type { DeckTextPath } from "../lib/deck-edit";
3
- /**
4
- * The runtime's inline-editing seam (#39).
5
- *
6
- * Editing happens INSIDE the real renderer rather than in an overlay that
7
- * imitates it, which is the only way "renders identically on blur" is true
8
- * rather than approximately true — the element the author types into is the
9
- * element the deck ships with.
10
- *
11
- * The seam is a context that defaults to null, so every read-only surface — a
12
- * filmstrip thumbnail, an in-portal deck view, the Public Link route — renders
13
- * exactly the markup it rendered before this file existed, with no affordance
14
- * and no listeners. Providing the context is an explicit act, performed in one
15
- * place (`DeckSlideSurface`).
16
- */
17
- export interface DeckTextEditor {
18
- /** Commit a leaf edit. The provider owns validation and staging. */
19
- onEditText: (path: DeckTextPath, text: string) => void;
20
- /**
21
- * Locked while a chat turn is in flight: a turn rewrites the WHOLE deck
22
- * (ADR 0001), so an edit committed mid-stream would be written over by the
23
- * turn's own `putDeckDraft` with nothing anywhere saying so.
24
- */
25
- disabled?: boolean;
26
- }
27
- export declare function DeckTextEditProvider({ editor, children }: {
28
- editor: DeckTextEditor | null;
29
- children: ReactNode;
30
- }): import("react/jsx-runtime").JSX.Element;
31
- export declare function useDeckTextEditor(): DeckTextEditor | null;
32
- interface EditableTextProps {
33
- /** Absent when the enclosing component was rendered without a slot — i.e. by
34
- * a surface that never carries an edit seam. Renders inert. */
35
- path?: DeckTextPath;
36
- /** The leaf's current text. Always a plain string; that is the schema's shape. */
37
- children: string;
38
- }
39
- /**
40
- * One editable text leaf, or plain text when there is no editor.
41
- *
42
- * The two states are DIFFERENT ELEMENTS on purpose. React does not manage the
43
- * text of a `contentEditable` node it has no children for, so the field can be
44
- * written to freely while it is open, and swapping back to a React-rendered
45
- * span on commit is what makes the committed value the one that renders — no
46
- * reconciliation against a DOM the author mutated behind React's back.
47
- */
48
- export declare function EditableText({ path, children }: EditableTextProps): import("react/jsx-runtime").JSX.Element;
49
- export {};
50
- //# sourceMappingURL=editing.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editing.d.ts","sourceRoot":"","sources":["../../src/deck/editing.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,cAAc;IAC7B,oEAAoE;IACpE,UAAU,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAID,wBAAgB,oBAAoB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;IAAE,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAEhH;AAED,wBAAgB,iBAAiB,IAAI,cAAc,GAAG,IAAI,CAEzD;AAED,UAAU,iBAAiB;IACzB;oEACgE;IAChE,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,kFAAkF;IAClF,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAyDjE"}
@@ -1,11 +0,0 @@
1
- /**
2
- * FLIP for the image grid's expand/collapse.
3
- *
4
- * The grid changes layout via React state, so the "First" rects have to be
5
- * taken in the event handler (before `setState`) and the invert applied in a
6
- * layout effect (after the DOM has moved, before paint).
7
- */
8
- export type TileRects = Map<Element, DOMRect>;
9
- export declare function captureTileRects(grid: HTMLElement): TileRects;
10
- export declare function playTileFlip(grid: HTMLElement, before: TileRects): void;
11
- //# sourceMappingURL=flip.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flip.d.ts","sourceRoot":"","sources":["../../src/deck/flip.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAE9C,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,GAAG,SAAS,CAI7D;AAaD,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAwCvE"}
@@ -1,24 +0,0 @@
1
- /**
2
- * The deck runtime — a sealed subtree, like ./document.
3
- *
4
- * NOT re-exported from the primitives root barrel, and deliberately not a
5
- * section type: nothing on an ordinary viewer page may pull this graph in.
6
- * Only deck surfaces (the Deck Builder, in-portal deck views, the Public Link
7
- * route) import from here.
8
- */
9
- export { DeckPlayer } from "./DeckPlayer";
10
- export { DeckStage } from "./DeckStage";
11
- export { DeckSlideView } from "./DeckSlideView";
12
- export { DeckComponentView } from "./DeckComponentView";
13
- export { CenteredTextLayout } from "./layouts/CenteredTextLayout";
14
- export { ColumnSplitLayout } from "./layouts/ColumnSplitLayout";
15
- export { FullBleedImageLayout } from "./layouts/FullBleedImageLayout";
16
- export { DeckRichText } from "./components/DeckRichText";
17
- export { DeckImage } from "./components/DeckImage";
18
- export { DeckImageGrid } from "./components/DeckImageGrid";
19
- export { DeckVideo } from "./components/DeckVideo";
20
- export { DeckMediaProvider, DeckMissingMedia, useDeckMedia, useDeckMediaResolver, type DeckMediaAsset, type DeckMediaResolver, } from "./media";
21
- export { DeckTextEditProvider, EditableText, type DeckTextEditor } from "./editing";
22
- export { useStageScale } from "./useStageScale";
23
- export { deckAlign, surfaceInk, DECK_ELEVATION, SURFACE_BACKGROUND, type DeckSurface } from "./tokens";
24
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/deck/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,KAAK,cAAc,EACnB,KAAK,iBAAiB,GACvB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,EAAE,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC"}