@bendyline/squisq 1.4.1 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/dist/{Doc-BeSeH2iX.d.ts → Doc-BsMkmzH8.d.ts} +838 -268
  2. package/dist/{ImageEditDoc-BTIvw0oq.d.ts → ImageEditDoc-DvoeHMP9.d.ts} +11 -4
  3. package/dist/{chunk-ZTX4PFFT.js → chunk-2OIBZYKP.js} +75 -2
  4. package/dist/chunk-2OIBZYKP.js.map +1 -0
  5. package/dist/chunk-2UQOHYE2.js +45 -0
  6. package/dist/chunk-2UQOHYE2.js.map +1 -0
  7. package/dist/{chunk-B4EEON3N.js → chunk-4AKUQPEE.js} +536 -103
  8. package/dist/chunk-4AKUQPEE.js.map +1 -0
  9. package/dist/chunk-4ZFRZBU2.js +6582 -0
  10. package/dist/chunk-4ZFRZBU2.js.map +1 -0
  11. package/dist/{chunk-57CVQCFX.js → chunk-7MQGNR76.js} +79 -3
  12. package/dist/chunk-7MQGNR76.js.map +1 -0
  13. package/dist/{chunk-5WFRKURX.js → chunk-DLXZMS5K.js} +4 -2
  14. package/dist/chunk-DLXZMS5K.js.map +1 -0
  15. package/dist/{chunk-MYIH7FWD.js → chunk-FBKP5CAO.js} +1 -1
  16. package/dist/chunk-FBKP5CAO.js.map +1 -0
  17. package/dist/chunk-KZNXZ5SM.js +333 -0
  18. package/dist/chunk-KZNXZ5SM.js.map +1 -0
  19. package/dist/{chunk-WMOI7FN3.js → chunk-LRCV7N7F.js} +12 -2
  20. package/dist/{chunk-WMOI7FN3.js.map → chunk-LRCV7N7F.js.map} +1 -1
  21. package/dist/{chunk-3K5OG6KI.js → chunk-OH43RPTP.js} +403 -187
  22. package/dist/chunk-OH43RPTP.js.map +1 -0
  23. package/dist/{chunk-H3AXU4MJ.js → chunk-OKJOQXK4.js} +149 -2
  24. package/dist/chunk-OKJOQXK4.js.map +1 -0
  25. package/dist/chunk-PGGGKYWG.js +1 -0
  26. package/dist/chunk-PGGGKYWG.js.map +1 -0
  27. package/dist/{chunk-7UDSRZKG.js → chunk-Q3ROPT5H.js} +35 -14
  28. package/dist/chunk-Q3ROPT5H.js.map +1 -0
  29. package/dist/chunk-QE7TWGVT.js +178 -0
  30. package/dist/chunk-QE7TWGVT.js.map +1 -0
  31. package/dist/chunk-RUDYOTA6.js +345 -0
  32. package/dist/chunk-RUDYOTA6.js.map +1 -0
  33. package/dist/chunk-TVSGLUID.js +596 -0
  34. package/dist/chunk-TVSGLUID.js.map +1 -0
  35. package/dist/chunk-ZLQKNOZQ.js +1 -0
  36. package/dist/chunk-ZLQKNOZQ.js.map +1 -0
  37. package/dist/doc/index.d.ts +4 -4
  38. package/dist/doc/index.js +124 -6
  39. package/dist/generate/index.d.ts +9 -2
  40. package/dist/generate/index.js +1 -1
  41. package/dist/icons/index.d.ts +3 -26
  42. package/dist/icons/index.js +13 -0
  43. package/dist/icons/inlineIconMarker.d.ts +1 -0
  44. package/dist/icons/inlineIconMarker.js +15 -0
  45. package/dist/icons/inlineIconMarker.js.map +1 -0
  46. package/dist/imageEdit/index.d.ts +11 -5
  47. package/dist/imageEdit/index.js +4 -1
  48. package/dist/index.d.ts +11 -8
  49. package/dist/index.js +243 -24
  50. package/dist/inlineIconMarker-CiE8Hlvz.d.ts +59 -0
  51. package/dist/markdown/index.d.ts +212 -3
  52. package/dist/markdown/index.js +40 -7
  53. package/dist/recommend/index.d.ts +1 -1
  54. package/dist/recommend/index.js +3 -2
  55. package/dist/schemas/index.d.ts +28 -8
  56. package/dist/schemas/index.js +35 -5
  57. package/dist/spatial/index.d.ts +9 -4
  58. package/dist/spatial/index.js +1 -1
  59. package/dist/story/index.d.ts +906 -40
  60. package/dist/story/index.js +124 -6
  61. package/dist/{themeLibrary-BHjJ0Qx6.d.ts → themeLibrary-DQQKuRMx.d.ts} +1 -1
  62. package/dist/transform/index.d.ts +48 -10
  63. package/dist/transform/index.js +17 -481
  64. package/dist/transform/index.js.map +1 -1
  65. package/dist/{types-BdZkdJ3z.d.ts → types-DlAZ7MW4.d.ts} +115 -1
  66. package/package.json +6 -1
  67. package/src/__tests__/animationUtils.test.ts +40 -0
  68. package/src/__tests__/annotationCoercion.test.ts +243 -0
  69. package/src/__tests__/applyRenderStyle.test.ts +146 -0
  70. package/src/__tests__/atmosphereLayers.test.ts +108 -0
  71. package/src/__tests__/attrTokens.test.ts +162 -0
  72. package/src/__tests__/customTemplateSample.test.ts +83 -0
  73. package/src/__tests__/customTemplatesFrontmatter.test.ts +205 -0
  74. package/src/__tests__/customThemesFrontmatter.test.ts +118 -0
  75. package/src/__tests__/diagramBlock.test.ts +122 -0
  76. package/src/__tests__/diagramLayout.test.ts +134 -0
  77. package/src/__tests__/drawing.test.ts +109 -0
  78. package/src/__tests__/drawingBlock.test.ts +124 -0
  79. package/src/__tests__/drawingLayout.test.ts +171 -0
  80. package/src/__tests__/geohash.test.ts +6 -5
  81. package/src/__tests__/getLayers.test.ts +6 -2
  82. package/src/__tests__/getLayersFallback.test.ts +103 -0
  83. package/src/__tests__/imageEditExportSvg.test.ts +70 -0
  84. package/src/__tests__/imageEditVersions.test.ts +72 -0
  85. package/src/__tests__/inlineIconMarker.test.ts +36 -0
  86. package/src/__tests__/layoutBlock.test.ts +83 -0
  87. package/src/__tests__/layoutLayout.test.ts +169 -0
  88. package/src/__tests__/markdown.test.ts +23 -0
  89. package/src/__tests__/markdownSanitize.test.ts +64 -0
  90. package/src/__tests__/markdownToDoc.test.ts +223 -2
  91. package/src/__tests__/mediaAnnotations.test.ts +64 -0
  92. package/src/__tests__/mediaSchedule.test.ts +118 -0
  93. package/src/__tests__/pandocAttrParse.test.ts +187 -0
  94. package/src/__tests__/resolveDocTheme.test.ts +55 -0
  95. package/src/__tests__/rootExports.test.ts +43 -0
  96. package/src/__tests__/shapeGeometry.test.ts +89 -0
  97. package/src/__tests__/shapeVocabulary.test.ts +133 -0
  98. package/src/__tests__/structuredData.test.ts +179 -0
  99. package/src/__tests__/templateAnnotationParse.test.ts +108 -0
  100. package/src/__tests__/templateMetadata.test.ts +21 -0
  101. package/src/__tests__/templates.test.ts +145 -4
  102. package/src/__tests__/themeCompile.test.ts +42 -0
  103. package/src/__tests__/themeValidator.test.ts +6 -0
  104. package/src/__tests__/transformV2.test.ts +137 -0
  105. package/src/__tests__/transitionNormalize.test.ts +61 -0
  106. package/src/__tests__/validateDoc.test.ts +100 -0
  107. package/src/doc/customTemplatesFrontmatter.ts +308 -0
  108. package/src/doc/customThemesFrontmatter.ts +90 -0
  109. package/src/doc/docToMarkdown.ts +73 -4
  110. package/src/doc/getLayers.ts +40 -17
  111. package/src/doc/index.ts +35 -1
  112. package/src/doc/markdownToDoc.ts +333 -12
  113. package/src/doc/mediaAnnotations.ts +118 -0
  114. package/src/doc/resolveDocTheme.ts +55 -0
  115. package/src/doc/structuredData.ts +230 -0
  116. package/src/doc/templateInputs.ts +240 -0
  117. package/src/doc/templates/__tests__/customTemplate.test.ts +151 -0
  118. package/src/doc/templates/__tests__/customTemplateRegistry.test.ts +110 -0
  119. package/src/doc/templates/accentImage.ts +30 -6
  120. package/src/doc/templates/captionUtils.ts +23 -0
  121. package/src/doc/templates/comparisonBar.ts +26 -18
  122. package/src/doc/templates/coverBlock.ts +7 -4
  123. package/src/doc/templates/customTemplate.ts +45 -0
  124. package/src/doc/templates/dataTable.ts +37 -19
  125. package/src/doc/templates/dateEvent.ts +41 -20
  126. package/src/doc/templates/definitionCard.ts +26 -18
  127. package/src/doc/templates/diagramBlock.ts +204 -0
  128. package/src/doc/templates/diagramLayout.ts +159 -0
  129. package/src/doc/templates/drawingBlock.ts +325 -0
  130. package/src/doc/templates/drawingLayout.ts +539 -0
  131. package/src/doc/templates/factCard.ts +51 -25
  132. package/src/doc/templates/fallbackBlock.ts +123 -0
  133. package/src/doc/templates/featureBlock.ts +20 -13
  134. package/src/doc/templates/fullBleedQuote.ts +18 -8
  135. package/src/doc/templates/imageWithCaption.ts +22 -9
  136. package/src/doc/templates/index.ts +215 -46
  137. package/src/doc/templates/layoutBlock.ts +43 -0
  138. package/src/doc/templates/layoutLayout.ts +243 -0
  139. package/src/doc/templates/listBlock.ts +56 -30
  140. package/src/doc/templates/mapBlock.ts +15 -12
  141. package/src/doc/templates/metadata.ts +120 -0
  142. package/src/doc/templates/persistentLayers.ts +129 -11
  143. package/src/doc/templates/photoGrid.ts +23 -12
  144. package/src/doc/templates/pullQuote.ts +30 -12
  145. package/src/doc/templates/quoteBlock.ts +54 -29
  146. package/src/doc/templates/sectionHeader.ts +25 -11
  147. package/src/doc/templates/statHighlight.ts +39 -22
  148. package/src/doc/templates/titleBlock.ts +59 -21
  149. package/src/doc/templates/tokens/__tests__/resolveTokens.test.ts +221 -0
  150. package/src/doc/templates/tokens/resolveTokens.ts +0 -0
  151. package/src/doc/templates/twoColumn.ts +48 -30
  152. package/src/doc/templates/videoPullQuote.ts +22 -12
  153. package/src/doc/templates/videoWithCaption.ts +13 -8
  154. package/src/doc/utils/animationUtils.ts +267 -3
  155. package/src/doc/utils/applyRenderStyle.ts +113 -0
  156. package/src/doc/utils/imageTreatment.ts +70 -0
  157. package/src/doc/utils/shapeGeometry.ts +464 -0
  158. package/src/doc/utils/themeUtils.ts +75 -1
  159. package/src/doc/validate.ts +476 -0
  160. package/src/generate/slideshowGenerator.ts +7 -0
  161. package/src/icons/index.ts +8 -0
  162. package/src/icons/inlineIconMarker.ts +73 -0
  163. package/src/imageEdit/export.ts +85 -2
  164. package/src/imageEdit/index.ts +1 -0
  165. package/src/imageEdit/persistence.ts +51 -0
  166. package/src/index.ts +2 -0
  167. package/src/markdown/annotationCoercion.ts +295 -0
  168. package/src/markdown/attrTokens.ts +222 -0
  169. package/src/markdown/convert.ts +229 -26
  170. package/src/markdown/index.ts +36 -0
  171. package/src/markdown/sanitize.ts +298 -0
  172. package/src/markdown/stringify.ts +84 -3
  173. package/src/markdown/types.ts +66 -0
  174. package/src/markdown/utils.ts +49 -1
  175. package/src/recommend/templates.ts +24 -0
  176. package/src/schemas/BlockTemplates.ts +133 -4
  177. package/src/schemas/CustomTemplates.ts +74 -0
  178. package/src/schemas/Doc.ts +353 -29
  179. package/src/schemas/ImageEditDoc.ts +11 -4
  180. package/src/schemas/Media.ts +169 -0
  181. package/src/schemas/Theme.ts +23 -1
  182. package/src/schemas/Transitions.ts +224 -0
  183. package/src/schemas/colorUtils.ts +33 -0
  184. package/src/schemas/fontStacks.ts +5 -2
  185. package/src/schemas/index.ts +3 -0
  186. package/src/schemas/themeCompile.ts +23 -4
  187. package/src/schemas/themeValidator.ts +49 -11
  188. package/src/schemas/themes/cinematic.json +69 -12
  189. package/src/schemas/themes/documentary.json +58 -11
  190. package/src/schemas/themes/gezellig.json +60 -11
  191. package/src/schemas/themes/magazine.json +54 -9
  192. package/src/schemas/themes/morning-light.json +52 -9
  193. package/src/schemas/themes/standard-dark.json +48 -13
  194. package/src/schemas/themes/standard.json +44 -12
  195. package/src/schemas/themes/tech-dark.json +65 -12
  196. package/src/spatial/Geohash.ts +52 -21
  197. package/src/transform/applyTransform.ts +43 -4
  198. package/src/transform/index.ts +1 -0
  199. package/src/transform/registry.ts +44 -13
  200. package/src/transform/styles/dataDriven.ts +2 -1
  201. package/src/transform/styles/documentary.ts +2 -1
  202. package/src/transform/styles/magazine.ts +3 -1
  203. package/src/transform/styles/minimal.ts +2 -1
  204. package/src/transform/styles/narrative.ts +3 -1
  205. package/src/transform/templateSelector.ts +87 -11
  206. package/src/transform/types.ts +35 -2
  207. package/dist/chunk-3K5OG6KI.js.map +0 -1
  208. package/dist/chunk-57CVQCFX.js.map +0 -1
  209. package/dist/chunk-5WFRKURX.js.map +0 -1
  210. package/dist/chunk-7UDSRZKG.js.map +0 -1
  211. package/dist/chunk-B4EEON3N.js.map +0 -1
  212. package/dist/chunk-H3AXU4MJ.js.map +0 -1
  213. package/dist/chunk-KSWJR66U.js +0 -3706
  214. package/dist/chunk-KSWJR66U.js.map +0 -1
  215. package/dist/chunk-MYIH7FWD.js.map +0 -1
  216. package/dist/chunk-ZTX4PFFT.js.map +0 -1
@@ -0,0 +1,59 @@
1
+ /**
2
+ * iconData.ts — GENERATED FILE
3
+ *
4
+ * FontAwesome Free icon catalog. Run `node scripts/generate-icon-data.mjs`
5
+ * to regenerate after bumping @fortawesome/fontawesome-free.
6
+ *
7
+ * Entry count: 2141
8
+ * Generated: 2026-05-14T03:38:13.863Z
9
+ */
10
+ type IconFamily = 'brands' | 'solid' | 'regular';
11
+ interface IconEntry {
12
+ /** Icon name without the `fa-` prefix (e.g. `github`). */
13
+ name: string;
14
+ /** Family bucket — drives the `fa-brands` / `fa-solid` / `fa-regular` class. */
15
+ family: IconFamily;
16
+ /** Human display label (used by the picker tooltip). */
17
+ label: string;
18
+ /** Lowercase, space-joined search keywords. */
19
+ keywords: string;
20
+ /** FontAwesome Private-Use-Area codepoint as a hex string (e.g. `'f09b'`).
21
+ * Use `String.fromCodePoint(parseInt(unicode, 16))` to get the rendered
22
+ * glyph when the FA font is loaded. */
23
+ unicode: string;
24
+ }
25
+ declare const ICONS: IconEntry[];
26
+
27
+ /**
28
+ * Inline-icon markers for template text.
29
+ *
30
+ * Slide templates flatten rich markdown body content into strings before
31
+ * rendering. Inline icons need to survive that flattening step, so we encode
32
+ * them as sentinel-delimited text markers and let `TextLayer` turn them back
33
+ * into FontAwesome glyphs when rendering.
34
+ */
35
+
36
+ /** Encode a resolved icon (family + name) as an embeddable text marker. */
37
+ declare function iconMarker(family: IconFamily, name: string): string;
38
+ /** True when a string contains at least one encoded icon marker. */
39
+ declare function hasIconMarker(value: string): boolean;
40
+ /** Remove every icon marker, leaving a clean plain-text projection. */
41
+ declare function stripIconMarkers(value: string): string;
42
+ /** A run of a marker-bearing string: literal text or a resolved icon. */
43
+ type IconTextRun = {
44
+ type: 'text';
45
+ text: string;
46
+ } | {
47
+ type: 'icon';
48
+ family: IconFamily;
49
+ name: string;
50
+ };
51
+ /**
52
+ * Split a string into ordered text/icon runs. Text between markers is
53
+ * preserved verbatim, including whitespace; each marker becomes an icon run.
54
+ */
55
+ declare function splitIconMarkers(value: string): IconTextRun[];
56
+ /** FontAwesome CSS class for a resolved icon, e.g. `fa-solid fa-rocket`. */
57
+ declare function iconClass(family: IconFamily, name: string): string;
58
+
59
+ export { ICONS as I, type IconEntry as a, type IconFamily as b, type IconTextRun as c, iconMarker as d, stripIconMarkers as e, hasIconMarker as h, iconClass as i, splitIconMarkers as s };
@@ -1,5 +1,5 @@
1
- import { T as ParseOptions, l as MarkdownDocument, U as StringifyOptions, c as HtmlNode, F as MarkdownNode } from '../types-BdZkdJ3z.js';
2
- export { H as HeadingTemplateAnnotation, a as HtmlComment, b as HtmlElement, d as HtmlText, M as MarkdownBlockNode, e as MarkdownBlockquote, f as MarkdownBreak, g as MarkdownCodeBlock, h as MarkdownContainerDirective, i as MarkdownDefinitionDescription, j as MarkdownDefinitionList, k as MarkdownDefinitionTerm, m as MarkdownEmphasis, n as MarkdownFootnoteDefinition, o as MarkdownFootnoteReference, p as MarkdownHeading, q as MarkdownHtmlBlock, r as MarkdownImage, s as MarkdownImageReference, t as MarkdownInlineCode, u as MarkdownInlineHtml, v as MarkdownInlineMath, w as MarkdownInlineNode, x as MarkdownLeafDirective, y as MarkdownLink, z as MarkdownLinkDefinition, A as MarkdownLinkReference, B as MarkdownList, C as MarkdownListItem, D as MarkdownMathBlock, E as MarkdownMention, G as MarkdownParagraph, I as MarkdownPoint, J as MarkdownSourcePosition, K as MarkdownStrikethrough, L as MarkdownStrong, N as MarkdownTable, O as MarkdownTableCell, P as MarkdownTableRow, Q as MarkdownText, R as MarkdownTextDirective, S as MarkdownThematicBreak } from '../types-BdZkdJ3z.js';
1
+ import { V as ParseOptions, m as MarkdownDocument, W as StringifyOptions, H as HeadingAttributes, d as HtmlNode, I as MarkdownNode } from '../types-DlAZ7MW4.js';
2
+ export { a as HeadingTemplateAnnotation, b as HtmlComment, c as HtmlElement, e as HtmlText, M as MarkdownBlockNode, f as MarkdownBlockquote, g as MarkdownBreak, h as MarkdownCodeBlock, i as MarkdownContainerDirective, j as MarkdownDefinitionDescription, k as MarkdownDefinitionList, l as MarkdownDefinitionTerm, n as MarkdownEmphasis, o as MarkdownFootnoteDefinition, p as MarkdownFootnoteReference, q as MarkdownHeading, r as MarkdownHtmlBlock, s as MarkdownImage, t as MarkdownImageReference, u as MarkdownInlineCode, v as MarkdownInlineHtml, w as MarkdownInlineMath, x as MarkdownInlineNode, y as MarkdownLeafDirective, z as MarkdownLink, A as MarkdownLinkDefinition, B as MarkdownLinkReference, C as MarkdownList, E as MarkdownListItem, F as MarkdownMathBlock, G as MarkdownMention, J as MarkdownParagraph, K as MarkdownPoint, L as MarkdownSourcePosition, N as MarkdownStrikethrough, O as MarkdownStrong, P as MarkdownTable, Q as MarkdownTableCell, R as MarkdownTableRow, S as MarkdownText, T as MarkdownTextDirective, U as MarkdownThematicBreak } from '../types-DlAZ7MW4.js';
3
3
 
4
4
  /**
5
5
  * Markdown → JSON Parser
@@ -112,6 +112,29 @@ interface MdastNode {
112
112
  attributes?: Record<string, string>;
113
113
  data?: Record<string, unknown>;
114
114
  }
115
+ /**
116
+ * Parse the inner content of a Pandoc-style `{…}` block. Tokens are
117
+ * whitespace-separated, with quoted runs (single or double) treated as
118
+ * single tokens — tokenization is shared with the `{[…]}` template
119
+ * annotation parser via {@link tokenizeAttrTokens}.
120
+ *
121
+ * - `#id` → `attributes.id`
122
+ * - `.class` → push onto `attributes.classes`
123
+ * - `key=value` or `key="quoted value"` → `attributes.params[key] = value`
124
+ *
125
+ * Empty `{}` yields `{}` (preserved as an annotation marker for round-tripping).
126
+ * Duplicate ids and keys: last wins, silent.
127
+ */
128
+ declare function parsePandocAttrTokens(inner: string): HeadingAttributes;
129
+ /**
130
+ * Serialize a HeadingAttributes object back to a Pandoc `{#id .class key=value}` string.
131
+ * Returns null when the attributes object is entirely empty (nothing to emit).
132
+ *
133
+ * Canonical key order: `#id`, then `.classes` (in original order), then
134
+ * params in their original insertion order. Values are quoted via the
135
+ * shared {@link quoteAttrValue} rule (same as `{[…]}` serialization).
136
+ */
137
+ declare function serializePandocAttributes(attrs: HeadingAttributes): string | null;
115
138
  /**
116
139
  * Convert an mdast Root node to a MarkdownDocument.
117
140
  *
@@ -130,6 +153,164 @@ declare function fromMdast(root: MdastNode, options?: {
130
153
  */
131
154
  declare function toMdast(doc: MarkdownDocument): MdastNode;
132
155
 
156
+ /**
157
+ * Shared key=value attribute machinery for the two heading annotation forms:
158
+ * the squisq-native `{[templateName key=value …]}` template annotation and
159
+ * the Pandoc-style `{#id .class key=value}` attribute block.
160
+ *
161
+ * Both forms share one interior grammar — whitespace-separated tokens whose
162
+ * values may be quoted (double or single) to include spaces, brackets, or
163
+ * quote characters. This module is the single implementation of that
164
+ * grammar: one tokenizer, one value un/escaper, one quoting rule. The
165
+ * trailing-annotation recognizers live here too so the editor bridge
166
+ * (packages/editor-react/src/tiptapBridge.ts) stays in sync by importing
167
+ * them rather than copying regexes.
168
+ *
169
+ * Value syntax:
170
+ * - Unquoted: no whitespace, quotes, or `[ ] { }` (those would collide with
171
+ * the surrounding annotation delimiters), e.g. `columns=3`, `name=O'Brien`
172
+ * (a quote *inside* an unquoted value is literal).
173
+ * - Quoted: `key="value with spaces"` or `key='…'`. Inside a quoted run,
174
+ * `\` escapes the active quote character and itself; any other `\` is
175
+ * literal. Quoted values may contain `]` and `}`.
176
+ * - Serialization emits double quotes, switching to single quotes when the
177
+ * value contains a double quote (markdown character-escape resolution
178
+ * makes backslash-escaped quotes fragile in `.md` source, so picking the
179
+ * other quote character is preferred over escaping). A value containing
180
+ * BOTH quote characters falls back to double quotes with `\"` escapes —
181
+ * that survives the API path but is best avoided in markdown source.
182
+ */
183
+ /** Result of matching a trailing annotation against a text run. */
184
+ interface TrailingAnnotationMatch {
185
+ /** Interior of the brace block (between `{[`/`{` and `]}`/`}`), untrimmed. */
186
+ inner: string;
187
+ /** Offset of the match start (including leading whitespace) in the input. */
188
+ index: number;
189
+ }
190
+ /**
191
+ * Match a trailing `{[templateName key=value …]}` annotation. Quote-aware
192
+ * (values may contain `]` when quoted), with a legacy fallback so inputs
193
+ * the old `[^\]]+` grammar accepted still match.
194
+ */
195
+ declare function matchTrailingTemplateAnnotation(text: string): TrailingAnnotationMatch | null;
196
+ /**
197
+ * Match a trailing Pandoc `{#id .class key=value}` block. Quote-aware
198
+ * (values may contain `}` when quoted), with a legacy fallback.
199
+ */
200
+ declare function matchTrailingPandocAttr(text: string): TrailingAnnotationMatch | null;
201
+ /**
202
+ * Quote-aware whitespace tokenizer for the interior of either annotation
203
+ * form.
204
+ *
205
+ * A quote run starts only at the beginning of a token or immediately after
206
+ * `=` — a quote elsewhere (e.g. `name=O'Brien`) is a literal character.
207
+ * Inside a run, `\` escapes the active quote character and itself; the
208
+ * escape pair is preserved in the returned token (callers strip and
209
+ * unescape via {@link splitKeyValueToken} / {@link unquoteAttrValue}).
210
+ * An unbalanced opening quote is tolerated: the run extends to the end of
211
+ * the input.
212
+ */
213
+ declare function tokenizeAttrTokens(input: string): string[];
214
+ /**
215
+ * Strip surrounding quotes from a raw token value and unescape the active
216
+ * quote character and backslash. Values not wrapped in matching quotes are
217
+ * returned verbatim (including any interior quotes or backslashes).
218
+ */
219
+ declare function unquoteAttrValue(raw: string): string;
220
+ /**
221
+ * Split a `key=value` token into its parts, unquoting/unescaping the value.
222
+ * Returns null for tokens with no `=` past the first character (bare words,
223
+ * `#id`, `.class`, or a leading `=`).
224
+ */
225
+ declare function splitKeyValueToken(token: string): {
226
+ key: string;
227
+ value: string;
228
+ } | null;
229
+ /**
230
+ * Whether a value must be quoted to survive tokenization and the outer
231
+ * annotation regexes: any whitespace, quote character, bracket, or brace —
232
+ * or an empty value, which would otherwise serialize as a bare `key=`.
233
+ */
234
+ declare function needsQuoting(value: string): boolean;
235
+ /**
236
+ * Serialize an attribute value, quoting when {@link needsQuoting} says the
237
+ * bare form would not round-trip.
238
+ *
239
+ * Double quotes are canonical; a value containing a double quote (but no
240
+ * single quote) is single-quoted instead, because markdown resolves
241
+ * backslash escapes in text runs before our parser sees them — switching
242
+ * the quote character round-trips through `.md` source where `\"` would
243
+ * not. Backslashes and the active quote character are escaped.
244
+ */
245
+ declare function quoteAttrValue(value: string): string;
246
+
247
+ /**
248
+ * Heading-attribute value coercion.
249
+ *
250
+ * The Pandoc-style heading attribute block `{#id .class key=value}` parses
251
+ * to a flat `Record<string, string>` of `key → raw value`. This module
252
+ * coerces a known subset of keys to typed values (numbers, time-in-seconds,
253
+ * `BlockConnection[]`) so downstream consumers don't have to re-parse them.
254
+ *
255
+ * Unknown keys are returned in `metadata` as raw strings. Malformed known-key
256
+ * values are dropped from the typed result and reported via `warnings` (the
257
+ * raw string is preserved in `params` upstream for lossless round-tripping —
258
+ * coercion failures do not corrupt the source).
259
+ */
260
+
261
+ /**
262
+ * Registry of known block-meta keys and their coercion strategies.
263
+ *
264
+ * Adding a new typed key: add an entry here, add the typed field to
265
+ * `HeadingAttributes.blockMeta` in `types.ts`, and apply the coerced value
266
+ * in `markdownToDoc.ts`.
267
+ */
268
+ declare const KNOWN_BLOCK_META_KEYS: {
269
+ readonly x: "number";
270
+ readonly y: "number";
271
+ readonly startTime: "time";
272
+ readonly duration: "time";
273
+ readonly connectsTo: "connectionList";
274
+ readonly transition: "transition";
275
+ readonly transitionDuration: "time";
276
+ readonly transitionDirection: "transitionDirection";
277
+ };
278
+ type KnownBlockMetaKey = keyof typeof KNOWN_BLOCK_META_KEYS;
279
+ /**
280
+ * Editor-facing description of a known block-meta key: what it does, and
281
+ * either its closed set of valid values or a free-form format hint. This is
282
+ * the single source the markdown editor's `{[name key=value]}` attribute
283
+ * autocomplete reads from, so the suggestion list stays in lockstep with
284
+ * `KNOWN_BLOCK_META_KEYS` and the transition vocabulary rather than drifting
285
+ * in a hand-maintained copy. `values`/`valueHint` are mutually exclusive: a
286
+ * key has a closed enum (`values`) or a format hint (`valueHint`), not both.
287
+ */
288
+ interface BlockMetaKeyDescriptor {
289
+ key: KnownBlockMetaKey;
290
+ /** One-line description, shown as the completion item's detail. */
291
+ description: string;
292
+ /** Closed set of valid values, for keys backed by an enum. */
293
+ values?: readonly string[];
294
+ /** Format hint shown when the value is free-form (no closed set). */
295
+ valueHint?: string;
296
+ }
297
+ /**
298
+ * Ordered descriptors for every key in `KNOWN_BLOCK_META_KEYS`. Order is the
299
+ * suggestion display order: the transition family first (the most common
300
+ * authoring case), then timeline timing, then diagram geometry/links.
301
+ */
302
+ declare const BLOCK_META_KEY_DESCRIPTORS: readonly BlockMetaKeyDescriptor[];
303
+ /**
304
+ * Parse a time value to seconds. Accepts:
305
+ * - bare number: `5` → 5, `5.5` → 5.5
306
+ * - `mm:ss`: `01:30` → 90
307
+ * - `mm:ss.ms`: `01:30.500` → 90.5
308
+ * - `1500ms` → 1.5
309
+ *
310
+ * Returns null on malformed input.
311
+ */
312
+ declare function parseTimeSeconds(raw: string): number | null;
313
+
133
314
  /**
134
315
  * HTML ↔ HtmlNode Conversion
135
316
  *
@@ -156,6 +337,23 @@ declare function parseHtmlToNodes(html: string): HtmlNode[];
156
337
  */
157
338
  declare function stringifyHtmlNodes(nodes: HtmlNode[]): string;
158
339
 
340
+ type HtmlPolicy = 'strip' | 'sanitize' | 'trusted';
341
+ type UrlKind = 'link' | 'media';
342
+ /**
343
+ * Sanitize a URL for a rendered link or media attribute.
344
+ *
345
+ * Relative URLs are allowed. Absolute URLs are restricted to schemes that
346
+ * cannot execute script in a document context. Media URLs additionally allow
347
+ * `blob:` and image/audio/video `data:` URLs because Squisq uses both for
348
+ * browser-local media previews and self-contained exports.
349
+ */
350
+ declare function sanitizeUrl(url: string | null | undefined, kind?: UrlKind): string | null;
351
+ /**
352
+ * Return a sanitized copy of an HtmlNode tree. The original parsed tree is left
353
+ * untouched so markdown stringify can still preserve source fidelity.
354
+ */
355
+ declare function sanitizeHtmlNodes(nodes: HtmlNode[]): HtmlNode[];
356
+
159
357
  /**
160
358
  * Markdown Tree Utilities
161
359
  *
@@ -273,5 +471,16 @@ declare function inferDocumentTitle(doc: MarkdownDocument): string | undefined;
273
471
  * spelling later is a one-file change.
274
472
  */
275
473
  declare function readFrontmatterThemeId(frontmatter: Record<string, unknown> | undefined): string | undefined;
474
+ /**
475
+ * Project an inline-HTML string (as stored on `TextLayer.content.html`) down
476
+ * to plain text — the value mirrored into `content.text` for plain consumers
477
+ * (PDF/markdown export, search, accessibility) and the SVG `<text>` fallback.
478
+ *
479
+ * `<br>` and block-level tags (`p`, `div`, `h1`–`h6`, `li`, `blockquote`,
480
+ * `pre`) become line breaks so multi-line rich content reads sensibly. Entity
481
+ * decoding is handled by {@link parseHtmlToNodes} (parse5-backed), so this is
482
+ * more correct than a regex tag-stripper.
483
+ */
484
+ declare function plainTextFromInlineHtml(html: string): string;
276
485
 
277
- export { HtmlNode, MarkdownDocument, MarkdownNode, ParseOptions, StringifyOptions, countNodes, createDocument, extractPlainText, findNodesByType, fromMdast, getChildren, inferDocumentTitle, parseFrontmatter, parseHtmlToNodes, parseMarkdown, readFrontmatterThemeId, setFrontmatterValues, stringifyHtmlNodes, stringifyMarkdown, toMdast, walkMarkdownTree };
486
+ export { BLOCK_META_KEY_DESCRIPTORS, type BlockMetaKeyDescriptor, HeadingAttributes, HtmlNode, type HtmlPolicy, KNOWN_BLOCK_META_KEYS, type KnownBlockMetaKey, MarkdownDocument, MarkdownNode, ParseOptions, StringifyOptions, type TrailingAnnotationMatch, type UrlKind, countNodes, createDocument, extractPlainText, findNodesByType, fromMdast, getChildren, inferDocumentTitle, matchTrailingPandocAttr, matchTrailingTemplateAnnotation, needsQuoting, parseFrontmatter, parseHtmlToNodes, parseMarkdown, parsePandocAttrTokens, parseTimeSeconds, plainTextFromInlineHtml, quoteAttrValue, readFrontmatterThemeId, sanitizeHtmlNodes, sanitizeUrl, serializePandocAttributes, setFrontmatterValues, splitKeyValueToken, stringifyHtmlNodes, stringifyMarkdown, toMdast, tokenizeAttrTokens, unquoteAttrValue, walkMarkdownTree };
@@ -1,12 +1,25 @@
1
1
  import {
2
+ sanitizeHtmlNodes,
3
+ sanitizeUrl,
4
+ stringifyMarkdown
5
+ } from "../chunk-KZNXZ5SM.js";
6
+ import {
7
+ BLOCK_META_KEY_DESCRIPTORS,
8
+ KNOWN_BLOCK_META_KEYS,
2
9
  fromMdast,
3
- parseHtmlToNodes,
10
+ matchTrailingPandocAttr,
11
+ matchTrailingTemplateAnnotation,
12
+ needsQuoting,
4
13
  parseMarkdown,
5
- stringifyHtmlNodes,
6
- stringifyMarkdown,
7
- toMdast
8
- } from "../chunk-3K5OG6KI.js";
9
- import "../chunk-DBS6RIFL.js";
14
+ parsePandocAttrTokens,
15
+ parseTimeSeconds,
16
+ quoteAttrValue,
17
+ serializePandocAttributes,
18
+ splitKeyValueToken,
19
+ toMdast,
20
+ tokenizeAttrTokens,
21
+ unquoteAttrValue
22
+ } from "../chunk-OH43RPTP.js";
10
23
  import {
11
24
  countNodes,
12
25
  createDocument,
@@ -15,11 +28,18 @@ import {
15
28
  getChildren,
16
29
  inferDocumentTitle,
17
30
  parseFrontmatter,
31
+ parseHtmlToNodes,
32
+ plainTextFromInlineHtml,
18
33
  readFrontmatterThemeId,
19
34
  setFrontmatterValues,
35
+ stringifyHtmlNodes,
20
36
  walkMarkdownTree
21
- } from "../chunk-H3AXU4MJ.js";
37
+ } from "../chunk-OKJOQXK4.js";
38
+ import "../chunk-DBS6RIFL.js";
39
+ import "../chunk-QE7TWGVT.js";
22
40
  export {
41
+ BLOCK_META_KEY_DESCRIPTORS,
42
+ KNOWN_BLOCK_META_KEYS,
23
43
  countNodes,
24
44
  createDocument,
25
45
  extractPlainText,
@@ -27,14 +47,27 @@ export {
27
47
  fromMdast,
28
48
  getChildren,
29
49
  inferDocumentTitle,
50
+ matchTrailingPandocAttr,
51
+ matchTrailingTemplateAnnotation,
52
+ needsQuoting,
30
53
  parseFrontmatter,
31
54
  parseHtmlToNodes,
32
55
  parseMarkdown,
56
+ parsePandocAttrTokens,
57
+ parseTimeSeconds,
58
+ plainTextFromInlineHtml,
59
+ quoteAttrValue,
33
60
  readFrontmatterThemeId,
61
+ sanitizeHtmlNodes,
62
+ sanitizeUrl,
63
+ serializePandocAttributes,
34
64
  setFrontmatterValues,
65
+ splitKeyValueToken,
35
66
  stringifyHtmlNodes,
36
67
  stringifyMarkdown,
37
68
  toMdast,
69
+ tokenizeAttrTokens,
70
+ unquoteAttrValue,
38
71
  walkMarkdownTree
39
72
  };
40
73
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { M as MarkdownBlockNode } from '../types-BdZkdJ3z.js';
1
+ import { M as MarkdownBlockNode } from '../types-DlAZ7MW4.js';
2
2
 
3
3
  /**
4
4
  * Block template recommendations.
@@ -1,8 +1,9 @@
1
+ import "../chunk-ZLQKNOZQ.js";
1
2
  import {
2
3
  profileBlockContents,
3
4
  recommendTemplatesForBlock
4
- } from "../chunk-WMOI7FN3.js";
5
- import "../chunk-H3AXU4MJ.js";
5
+ } from "../chunk-LRCV7N7F.js";
6
+ import "../chunk-OKJOQXK4.js";
6
7
  export {
7
8
  profileBlockContents,
8
9
  recommendTemplatesForBlock
@@ -1,10 +1,10 @@
1
1
  export { B as BoundingBox, C as Coordinates } from '../Types-sh2VRxfo.js';
2
- import { af as Theme, q as DeepPartial, aj as ThemeSeedColors, ag as ThemeColorPalette, v as FontFamilyKind, u as FontFamily } from '../Doc-BeSeH2iX.js';
3
- export { A as AccentImage, a as AccentPosition, b as Animation, c as AnimationType, d as AudioBookmark, e as AudioSegment, f as AudioTimingData, g as AudioTrack, B as Block, C as CaptionPhrase, h as CaptionTrack, i as CaptionWord, j as ColorScheme, k as ComparisonBarInput, l as CornerBrandingConfig, D as DARK_SURFACE, m as DEFAULT_DOC_FONT, n as DEFAULT_TITLE_FONT, o as DataTableInput, p as DateEventInput, r as DefinitionCardInput, s as Doc, t as DocBlock, F as FactCardInput, w as FullBleedQuoteInput, G as GradientBackgroundConfig, I as ImageBackgroundConfig, x as ImageLayer, y as ImageWithCaptionInput, L as LIGHT_SURFACE, z as Layer, E as LayoutHints, H as LeftFeatureInput, J as ListBlockInput, M as MapBlockInput, K as MapLayer, N as MapMarker, O as MapTileStyle, P as PatternBackgroundConfig, Q as PersistentLayer, R as PersistentLayerConfig, S as PersistentLayerTemplate, T as PersistentLayerTemplateConfig, U as PersistentLayerTemplateType, V as PhotoGridInput, W as Position, X as ProgressIndicatorConfig, Y as PullQuoteInput, Z as QuoteBlockInput, _ as RenderStyle, $ as RightFeatureInput, a0 as SectionHeaderInput, a1 as ShapeLayer, a2 as SolidBackgroundConfig, a3 as StartBlockConfig, a4 as StatHighlightInput, a5 as SurfaceScheme, a6 as THEME_SCHEMA_VERSION, a7 as TableLayer, a8 as TableLayerStyle, a9 as TemplateBlock, aa as TemplateContext, ab as TemplateFunction, ac as TemplateRegistry, ad as TextLayer, ae as TextStyle, ah as ThemeColorScheme, ai as ThemeSchemaVersion, ak as ThemeStyle, al as ThemeTypography, am as TitleBlockInput, an as TitleCaptionConfig, ao as Transition, ap as TransitionType, aq as TwoColumnInput, ar as VIEWPORT_PRESETS, as as VideoLayer, at as VideoPullQuoteInput, au as VideoWithCaptionInput, av as ViewportConfig, aw as ViewportOrientation, ax as ViewportPreset, ay as applySurface, az as calculateDuration, aA as calculateFontScale, aB as createTemplateContext, aC as createTheme, aD as getAspectRatioString, aE as getBlockAtTime, aF as getCaptionAtTime, aG as getLayoutHints, aH as getRegisteredThemes, aI as getSafeTextBounds, aJ as getSegmentAtTime, aK as getTwoColumnPositions, aL as getViewport, aM as getViewportOrientation, aN as isPersistentLayerTemplate, aO as isTemplateBlock, aP as layoutScaledFontSize, aQ as lookupRegisteredTheme, aR as registerTheme, aS as scaledFontSize, aT as unregisterTheme, aU as validateDoc } from '../Doc-BeSeH2iX.js';
4
- export { D as DEFAULT_THEME, a as DEFAULT_THEME_ID, T as THEMES, g as getAvailableThemes, b as getThemeSummaries, r as resolveTheme } from '../themeLibrary-BHjJ0Qx6.js';
2
+ import { ax as Theme, u as DeepPartial, aB as ThemeSeedColors, ay as ThemeColorPalette, J as FontFamilyKind, I as FontFamily } from '../Doc-BsMkmzH8.js';
3
+ export { A as AccentImage, a as AccentPosition, b as AmbientGradientConfig, c as Animation, d as AnimationType, e as AudioBookmark, f as AudioSegment, g as AudioTimingData, h as AudioTrack, B as Block, i as BlockConnection, j as BorderStyle, C as CaptionPhrase, k as CaptionTrack, l as CaptionWord, m as ColorScheme, n as ComparisonBarInput, o as CornerBrandingConfig, p as CustomTemplateDefinition, D as DARK_SURFACE, q as DEFAULT_DOC_FONT, r as DEFAULT_TITLE_FONT, s as DataTableInput, t as DateEventInput, v as DefinitionCardInput, w as DiagramBlockInput, x as Doc, y as DocBlock, z as DocDiagnostic, E as DrawingBlockInput, F as FRONTMATTER_CUSTOM_TEMPLATES_KEY, G as FRONTMATTER_CUSTOM_THEMES_KEY, H as FactCardInput, K as FullBleedQuoteInput, L as GradientBackgroundConfig, M as ImageBackgroundConfig, N as ImageLayer, O as ImageTreatment, P as ImageWithCaptionInput, Q as LIGHT_SURFACE, R as Layer, S as LayoutHints, T as LeftFeatureInput, U as LinearGradient, V as ListBlockInput, W as MapBlockInput, X as MapLayer, Y as MapMarker, Z as MapTileStyle, _ as MarkerStyle, $ as MediaClip, a0 as PathLayer, a1 as PatternBackgroundConfig, a2 as PersistentLayer, a3 as PersistentLayerConfig, a4 as PersistentLayerTemplate, a5 as PersistentLayerTemplateConfig, a6 as PersistentLayerTemplateType, a7 as PhotoGridInput, a8 as Position, a9 as ProgressIndicatorConfig, aa as PullQuoteInput, ab as QuoteBlockInput, ac as RawLayersInput, ad as RenderStyle, ae as RightFeatureInput, af as ScheduledClip, ag as SectionHeaderInput, ah as ShapeFilter, ai as ShapeLayer, aj as ShapePattern, ak as SolidBackgroundConfig, al as StartBlockConfig, am as StatHighlightInput, an as SurfaceScheme, ao as THEME_SCHEMA_VERSION, ap as TableLayer, aq as TableLayerStyle, ar as TemplateBlock, as as TemplateContext, at as TemplateFunction, au as TemplateRegistry, av as TextLayer, aw as TextStyle, az as ThemeColorScheme, aA as ThemeSchemaVersion, aC as ThemeStyle, aD as ThemeTypography, aE as TitleBlockInput, aF as TitleCaptionConfig, aG as TwoColumnInput, aH as VIEWPORT_PRESETS, aI as VideoLayer, aJ as VideoPullQuoteInput, aK as VideoWithCaptionInput, aL as ViewportConfig, aM as ViewportOrientation, aN as ViewportPreset, aO as VignetteConfig, aP as applySurface, aQ as calculateDuration, aR as calculateFontScale, aS as createTemplateContext, aT as createTheme, aU as getAspectRatioString, aV as getBlockAtTime, aW as getCaptionAtTime, aX as getDocPlaybackDuration, aY as getLayoutHints, aZ as getRegisteredThemes, a_ as getSafeTextBounds, a$ as getSegmentAtTime, b0 as getTwoColumnPositions, b1 as getViewport, b2 as getViewportOrientation, b3 as isPersistentLayerTemplate, b4 as isTemplateBlock, b5 as layoutScaledFontSize, b6 as lookupRegisteredTheme, b7 as registerTheme, b8 as resolveMediaSchedule, b9 as scaledFontSize, ba as unregisterTheme, bb as validateDoc } from '../Doc-BsMkmzH8.js';
4
+ export { D as DEFAULT_TRANSITION_DURATION_SECONDS, X as TRANSITION_DIRECTIONS, Y as TRANSITION_TYPES, Z as Transition, _ as TransitionDirection, $ as TransitionType, a0 as isTransitionType, a1 as normalizeTransitionDirection, a2 as normalizeTransitionType, a3 as resolveBlockTransition, a4 as resolveTransitionDuration } from '../types-DlAZ7MW4.js';
5
+ export { D as DEFAULT_THEME, a as DEFAULT_THEME_ID, T as THEMES, g as getAvailableThemes, b as getThemeSummaries, r as resolveTheme } from '../themeLibrary-DQQKuRMx.js';
5
6
  export { M as MediaEntry, a as MediaProvider } from '../MediaProvider-wpSe21B3.js';
6
- export { E as EditorLayerMeta, I as ImageEditCanvas, a as ImageEditDoc, b as ImageEditLayer, c as ImageEditLayerKind, d as ImageEditMeta } from '../ImageEditDoc-BTIvw0oq.js';
7
- import '../types-BdZkdJ3z.js';
7
+ export { E as EditorLayerMeta, I as ImageEditCanvas, a as ImageEditDoc, b as ImageEditLayer, c as ImageEditLayerKind, d as ImageEditMeta } from '../ImageEditDoc-DvoeHMP9.js';
8
8
 
9
9
  /**
10
10
  * Theme Validator
@@ -60,11 +60,19 @@ type ContrastPreset = 'subtle' | 'balanced' | 'high';
60
60
  interface CompileOptions {
61
61
  /** Contrast level for OKLCh derivation (default 'balanced'). */
62
62
  contrast?: ContrastPreset;
63
+ /**
64
+ * Base theme to inherit from. When provided, the partial is deep-merged
65
+ * over this theme instead of the neutral `STARTER_THEME`, so the compiled
66
+ * theme inherits the base's render style, color schemes, typography, and
67
+ * persistent layers — and only the fields the user changed are overridden.
68
+ * The base's id is recorded on the result as `basedOn`.
69
+ */
70
+ base?: Theme;
63
71
  }
64
72
  /**
65
73
  * Compile a partial Theme into a complete one. Fills missing fields from
66
- * `STARTER_THEME`, derives missing color slots from `seedColors` (when
67
- * present), and validates the result.
74
+ * the base (`opts.base` when given, else `STARTER_THEME`), derives missing
75
+ * color slots from `seedColors` (when present), and validates the result.
68
76
  */
69
77
  declare function compileTheme(partial: DeepPartial<Theme>, opts?: CompileOptions): Theme;
70
78
  /**
@@ -164,6 +172,18 @@ declare function oklchSetChroma(hex: string, multiplier: number): string;
164
172
  * WCAG relative luminance of a hex color, returned as 0..1.
165
173
  */
166
174
  declare function relativeLuminance(hex: string): number;
175
+ /**
176
+ * Hue of a hex color in HSL degrees (0..360). Returns 0 for pure grays
177
+ * and on parse failure. Used by the duotone image treatment to aim its
178
+ * `hue-rotate()` at the theme's tint color.
179
+ */
180
+ declare function hexHueDegrees(hex: string): number;
181
+ /**
182
+ * Convert a hex color + alpha (0..1) to an `rgba()` string.
183
+ * Falls back to the input on parse failure (e.g. a value that is
184
+ * already an rgba()/gradient string).
185
+ */
186
+ declare function withAlpha(hex: string, alpha: number): string;
167
187
  /**
168
188
  * WCAG contrast ratio between two hex colors. Returns 1..21.
169
189
  */
@@ -185,4 +205,4 @@ declare function deriveScale(seedHex: string, spread?: number): {
185
205
  darker2: string;
186
206
  };
187
207
 
188
- export { AVAILABLE_FONT_STACKS, type CompileOptions, type ContrastPreset, DeepPartial, FONT_FALLBACKS, FontFamily, FontFamilyKind, type FontStack, STARTER_THEME, Theme, ThemeColorPalette, ThemeSeedColors, type ValidationError, type ValidationResult, assertTheme, buildGoogleFontsUrl, compileTheme, contrastRatio, deriveColorPalette, deriveScale, fontStack, getFontStack, isHex, oklchDarken, oklchLighten, oklchSetChroma, parseTheme, pickContrastingText, relativeLuminance, resolveFontFamily, serializeTheme, validateTheme };
208
+ export { AVAILABLE_FONT_STACKS, type CompileOptions, type ContrastPreset, DeepPartial, FONT_FALLBACKS, FontFamily, FontFamilyKind, type FontStack, STARTER_THEME, Theme, ThemeColorPalette, ThemeSeedColors, type ValidationError, type ValidationResult, assertTheme, buildGoogleFontsUrl, compileTheme, contrastRatio, deriveColorPalette, deriveScale, fontStack, getFontStack, hexHueDegrees, isHex, oklchDarken, oklchLighten, oklchSetChroma, parseTheme, pickContrastingText, relativeLuminance, resolveFontFamily, serializeTheme, validateTheme, withAlpha };
@@ -5,17 +5,21 @@ import {
5
5
  deriveColorPalette,
6
6
  getBlockAtTime,
7
7
  getCaptionAtTime,
8
+ getDocPlaybackDuration,
8
9
  getSegmentAtTime,
9
10
  parseTheme,
11
+ resolveMediaSchedule,
10
12
  serializeTheme,
11
13
  validateDoc
12
- } from "../chunk-57CVQCFX.js";
14
+ } from "../chunk-7MQGNR76.js";
13
15
  import {
14
16
  AVAILABLE_FONT_STACKS,
15
17
  DARK_SURFACE,
16
18
  DEFAULT_THEME,
17
19
  DEFAULT_THEME_ID,
18
20
  FONT_FALLBACKS,
21
+ FRONTMATTER_CUSTOM_TEMPLATES_KEY,
22
+ FRONTMATTER_CUSTOM_THEMES_KEY,
19
23
  LIGHT_SURFACE,
20
24
  THEMES,
21
25
  THEME_SCHEMA_VERSION,
@@ -30,6 +34,7 @@ import {
30
34
  getFontStack,
31
35
  getRegisteredThemes,
32
36
  getThemeSummaries,
37
+ hexHueDegrees,
33
38
  isHex,
34
39
  lookupRegisteredTheme,
35
40
  oklchDarken,
@@ -41,8 +46,9 @@ import {
41
46
  resolveFontFamily,
42
47
  resolveTheme,
43
48
  unregisterTheme,
44
- validateTheme
45
- } from "../chunk-B4EEON3N.js";
49
+ validateTheme,
50
+ withAlpha
51
+ } from "../chunk-4AKUQPEE.js";
46
52
  import {
47
53
  DEFAULT_DOC_FONT,
48
54
  DEFAULT_TITLE_FONT,
@@ -59,7 +65,17 @@ import {
59
65
  isTemplateBlock,
60
66
  scaledFontSize,
61
67
  scaledFontSize2
62
- } from "../chunk-5WFRKURX.js";
68
+ } from "../chunk-DLXZMS5K.js";
69
+ import {
70
+ DEFAULT_TRANSITION_DURATION_SECONDS,
71
+ TRANSITION_DIRECTIONS,
72
+ TRANSITION_TYPES,
73
+ isTransitionType,
74
+ normalizeTransitionDirection,
75
+ normalizeTransitionType,
76
+ resolveBlockTransition,
77
+ resolveTransitionDuration
78
+ } from "../chunk-QE7TWGVT.js";
63
79
  export {
64
80
  AVAILABLE_FONT_STACKS,
65
81
  DARK_SURFACE,
@@ -67,11 +83,16 @@ export {
67
83
  DEFAULT_THEME,
68
84
  DEFAULT_THEME_ID,
69
85
  DEFAULT_TITLE_FONT,
86
+ DEFAULT_TRANSITION_DURATION_SECONDS,
70
87
  FONT_FALLBACKS,
88
+ FRONTMATTER_CUSTOM_TEMPLATES_KEY,
89
+ FRONTMATTER_CUSTOM_THEMES_KEY,
71
90
  LIGHT_SURFACE,
72
91
  STARTER_THEME,
73
92
  THEMES,
74
93
  THEME_SCHEMA_VERSION,
94
+ TRANSITION_DIRECTIONS,
95
+ TRANSITION_TYPES,
75
96
  VIEWPORT_PRESETS,
76
97
  applySurface,
77
98
  assertTheme,
@@ -89,6 +110,7 @@ export {
89
110
  getAvailableThemes,
90
111
  getBlockAtTime,
91
112
  getCaptionAtTime,
113
+ getDocPlaybackDuration,
92
114
  getFontStack,
93
115
  getLayoutHints,
94
116
  getRegisteredThemes,
@@ -98,11 +120,15 @@ export {
98
120
  getTwoColumnPositions,
99
121
  getViewport,
100
122
  getViewportOrientation,
123
+ hexHueDegrees,
101
124
  isHex,
102
125
  isPersistentLayerTemplate,
103
126
  isTemplateBlock,
127
+ isTransitionType,
104
128
  scaledFontSize as layoutScaledFontSize,
105
129
  lookupRegisteredTheme,
130
+ normalizeTransitionDirection,
131
+ normalizeTransitionType,
106
132
  oklchDarken,
107
133
  oklchLighten,
108
134
  oklchSetChroma,
@@ -110,12 +136,16 @@ export {
110
136
  pickContrastingText,
111
137
  registerTheme,
112
138
  relativeLuminance,
139
+ resolveBlockTransition,
113
140
  resolveFontFamily,
141
+ resolveMediaSchedule,
114
142
  resolveTheme,
143
+ resolveTransitionDuration,
115
144
  scaledFontSize2 as scaledFontSize,
116
145
  serializeTheme,
117
146
  unregisterTheme,
118
147
  validateDoc,
119
- validateTheme
148
+ validateTheme,
149
+ withAlpha
120
150
  };
121
151
  //# sourceMappingURL=index.js.map
@@ -39,6 +39,7 @@ declare function calculateBearing(from: Coordinates, to: Coordinates): number;
39
39
  * - 5 chars: ~5km x 5km
40
40
  * - 6 chars: ~1.2km x 0.6km
41
41
  */
42
+
42
43
  /**
43
44
  * Encode latitude/longitude to a geohash string.
44
45
  * Uses the standard ngeohash library.
@@ -91,10 +92,14 @@ declare function getGeohashPrefix(geohash: string, precision: number): string;
91
92
  */
92
93
  declare function geohashToHierarchicalPath(geohash4: string): string;
93
94
  /**
94
- * Compute all geohash cells along the path between two geohash cells.
95
- * Interpolates lat/lng points between the centers of `from` and `to`,
96
- * encoding each to a geohash at the given precision, and returns the
97
- * deduplicated list of intermediate cells (excluding `from` and `to`).
95
+ * Compute all geohash cells along the great-circle path between two geohash cells.
96
+ * Samples points along the spherical arc from `from` to `to`, encoding each to a
97
+ * geohash at the given precision, and returns the deduplicated list of intermediate
98
+ * cells (excluding `from` and `to`).
99
+ *
100
+ * Uses spherical linear interpolation (SLERP) via 3D unit vectors, which correctly
101
+ * handles antimeridian crossings and polar paths — both of which flat lat/lng
102
+ * interpolation gets wrong.
98
103
  */
99
104
  declare function getGeohashPath(from: string, to: string, precision?: number): string[];
100
105
  /**
@@ -9,7 +9,7 @@ import {
9
9
  getGeohashPrefix,
10
10
  getNeighbors,
11
11
  haversineDistance
12
- } from "../chunk-7UDSRZKG.js";
12
+ } from "../chunk-Q3ROPT5H.js";
13
13
  export {
14
14
  calculateBearing,
15
15
  decodeGeohash,