@bendyline/squisq 1.5.0 → 1.5.1

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 (124) hide show
  1. package/README.md +14 -1
  2. package/dist/{ContentContainer-DNx460y8.d.ts → ContentContainer-BXUlIf18.d.ts} +6 -2
  3. package/dist/{Doc-BsMkmzH8.d.ts → Doc-BBVGq1_9.d.ts} +94 -15
  4. package/dist/{ImageEditDoc-DvoeHMP9.d.ts → ImageEditDoc-FuyGtt6o.d.ts} +1 -1
  5. package/dist/{chunk-KZNXZ5SM.js → chunk-6ATE2PSM.js} +18 -7
  6. package/dist/chunk-6ATE2PSM.js.map +1 -0
  7. package/dist/{chunk-7MQGNR76.js → chunk-A4O7GIWE.js} +2 -27
  8. package/dist/chunk-A4O7GIWE.js.map +1 -0
  9. package/dist/chunk-ET53IIEP.js +1 -0
  10. package/dist/chunk-ET53IIEP.js.map +1 -0
  11. package/dist/{chunk-OKJOQXK4.js → chunk-HWVFJAAH.js} +38 -2
  12. package/dist/chunk-HWVFJAAH.js.map +1 -0
  13. package/dist/{chunk-2TMAWB4Y.js → chunk-IMSCRLLV.js} +1 -1
  14. package/dist/chunk-IMSCRLLV.js.map +1 -0
  15. package/dist/{chunk-4AKUQPEE.js → chunk-KKNUBQ6Y.js} +1 -1
  16. package/dist/chunk-KKNUBQ6Y.js.map +1 -0
  17. package/dist/{chunk-TVSGLUID.js → chunk-LDQ2HJIX.js} +3 -3
  18. package/dist/{chunk-4ZFRZBU2.js → chunk-LH7I6SH7.js} +777 -151
  19. package/dist/chunk-LH7I6SH7.js.map +1 -0
  20. package/dist/{chunk-K32VJONL.js → chunk-T5UK6YOB.js} +41 -2
  21. package/dist/chunk-T5UK6YOB.js.map +1 -0
  22. package/dist/{chunk-OH43RPTP.js → chunk-TEEEILMP.js} +12 -2
  23. package/dist/chunk-TEEEILMP.js.map +1 -0
  24. package/dist/{chunk-FR2RBTKO.js → chunk-TQWLI6S2.js} +93 -27
  25. package/dist/chunk-TQWLI6S2.js.map +1 -0
  26. package/dist/{chunk-LRCV7N7F.js → chunk-UY7KGQ5R.js} +2 -2
  27. package/dist/{chunk-3E5F2XMR.js → chunk-VWUFZ6ZG.js} +29 -2
  28. package/dist/chunk-VWUFZ6ZG.js.map +1 -0
  29. package/dist/doc/index.d.ts +4 -4
  30. package/dist/doc/index.js +16 -7
  31. package/dist/generate/index.d.ts +2 -80
  32. package/dist/generate/index.js +2 -7
  33. package/dist/imageEdit/index.d.ts +4 -4
  34. package/dist/index.d.ts +8 -8
  35. package/dist/index.js +32 -23
  36. package/dist/jsonForm/index.d.ts +42 -1
  37. package/dist/jsonForm/index.js +9 -1
  38. package/dist/markdown/index.d.ts +18 -2
  39. package/dist/markdown/index.js +5 -3
  40. package/dist/recommend/index.js +2 -2
  41. package/dist/schemas/index.d.ts +4 -4
  42. package/dist/schemas/index.js +3 -5
  43. package/dist/storage/index.d.ts +2 -2
  44. package/dist/storage/index.js +1 -1
  45. package/dist/story/index.d.ts +125 -11
  46. package/dist/story/index.js +16 -7
  47. package/dist/{themeLibrary-DQQKuRMx.d.ts → themeLibrary-CehcJhzz.d.ts} +1 -1
  48. package/dist/timing/index.js +3 -5
  49. package/dist/transform/index.d.ts +2 -2
  50. package/dist/transform/index.js +3 -3
  51. package/dist/versions/index.d.ts +1 -1
  52. package/package.json +1 -1
  53. package/src/__tests__/contentExtractor.test.ts +60 -0
  54. package/src/__tests__/coverBlock.test.ts +46 -1
  55. package/src/__tests__/customTemplateSample.test.ts +63 -2
  56. package/src/__tests__/customTemplatesFrontmatter.test.ts +31 -0
  57. package/src/__tests__/customThemesFrontmatter.test.ts +27 -0
  58. package/src/__tests__/inputDescriptors.test.ts +162 -0
  59. package/src/__tests__/jsonForm.tokens.test.ts +84 -0
  60. package/src/__tests__/markdown.test.ts +64 -0
  61. package/src/__tests__/markdownSanitize.test.ts +15 -0
  62. package/src/__tests__/markdownToDoc.test.ts +168 -0
  63. package/src/__tests__/mediaAnnotations.test.ts +27 -0
  64. package/src/__tests__/structuredData.test.ts +73 -3
  65. package/src/__tests__/templateMetadata.test.ts +11 -1
  66. package/src/__tests__/templates.test.ts +112 -0
  67. package/src/__tests__/validateDoc.test.ts +160 -0
  68. package/src/doc/annotationBlocks.ts +117 -0
  69. package/src/doc/customTemplatesFrontmatter.ts +7 -1
  70. package/src/doc/customThemesFrontmatter.ts +6 -1
  71. package/src/doc/docToMarkdown.ts +31 -1
  72. package/src/doc/getLayers.ts +11 -2
  73. package/src/doc/index.ts +12 -0
  74. package/src/doc/markdownToDoc.ts +80 -3
  75. package/src/doc/mediaAnnotations.ts +15 -33
  76. package/src/doc/standaloneAnnotation.ts +58 -0
  77. package/src/doc/structuredData.ts +92 -21
  78. package/src/doc/templates/__tests__/customTemplate.test.ts +21 -2
  79. package/src/doc/templates/comparisonBar.ts +8 -1
  80. package/src/doc/templates/coverBlock.ts +29 -2
  81. package/src/doc/templates/customTemplate.ts +10 -4
  82. package/src/doc/templates/factCard.ts +4 -2
  83. package/src/doc/templates/imageWithCaption.ts +10 -8
  84. package/src/doc/templates/index.ts +12 -2
  85. package/src/doc/templates/inputDescriptors.ts +432 -0
  86. package/src/doc/templates/photoGrid.ts +16 -39
  87. package/src/doc/templates/tokens/__tests__/resolveTokens.test.ts +267 -1
  88. package/src/doc/templates/tokens/resolveTokens.ts +0 -0
  89. package/src/doc/templates/videoWithCaption.ts +15 -14
  90. package/src/doc/utils/nearest.ts +59 -0
  91. package/src/doc/validate.ts +153 -54
  92. package/src/generate/contentExtractor.ts +148 -35
  93. package/src/generate/index.ts +0 -3
  94. package/src/jsonForm/index.ts +2 -0
  95. package/src/jsonForm/tokens.ts +78 -0
  96. package/src/markdown/annotationCoercion.ts +1 -1
  97. package/src/markdown/attrTokens.ts +19 -0
  98. package/src/markdown/index.ts +2 -1
  99. package/src/markdown/sanitize.ts +22 -2
  100. package/src/markdown/stringify.ts +12 -3
  101. package/src/markdown/utils.ts +62 -1
  102. package/src/schemas/CustomTemplates.ts +56 -4
  103. package/src/schemas/Doc.ts +39 -41
  104. package/src/schemas/themeCompile.ts +1 -1
  105. package/src/storage/ContentContainer.ts +6 -2
  106. package/src/transform/types.ts +1 -1
  107. package/dist/chunk-2TMAWB4Y.js.map +0 -1
  108. package/dist/chunk-3E5F2XMR.js.map +0 -1
  109. package/dist/chunk-4AKUQPEE.js.map +0 -1
  110. package/dist/chunk-4X3JQXNM.js +0 -35
  111. package/dist/chunk-4X3JQXNM.js.map +0 -1
  112. package/dist/chunk-4ZFRZBU2.js.map +0 -1
  113. package/dist/chunk-7MQGNR76.js.map +0 -1
  114. package/dist/chunk-FBKP5CAO.js +0 -145
  115. package/dist/chunk-FBKP5CAO.js.map +0 -1
  116. package/dist/chunk-FR2RBTKO.js.map +0 -1
  117. package/dist/chunk-K32VJONL.js.map +0 -1
  118. package/dist/chunk-KZNXZ5SM.js.map +0 -1
  119. package/dist/chunk-OH43RPTP.js.map +0 -1
  120. package/dist/chunk-OKJOQXK4.js.map +0 -1
  121. package/src/__tests__/slideshowGenerator.test.ts +0 -128
  122. package/src/generate/slideshowGenerator.ts +0 -280
  123. /package/dist/{chunk-TVSGLUID.js.map → chunk-LDQ2HJIX.js.map} +0 -0
  124. /package/dist/{chunk-LRCV7N7F.js.map → chunk-UY7KGQ5R.js.map} +0 -0
package/dist/index.js CHANGED
@@ -1,7 +1,5 @@
1
1
  import "./chunk-ZLQKNOZQ.js";
2
- import {
3
- generateSlideshow
4
- } from "./chunk-FBKP5CAO.js";
2
+ import "./chunk-ET53IIEP.js";
5
3
  import {
6
4
  DEFAULT_TRANSFORM_STYLE_ID,
7
5
  analyzeBlocks,
@@ -12,12 +10,12 @@ import {
12
10
  registerTransformStyle,
13
11
  resolveTransformStyle,
14
12
  unregisterTransformStyle
15
- } from "./chunk-TVSGLUID.js";
13
+ } from "./chunk-LDQ2HJIX.js";
16
14
  import {
17
15
  extractContent,
18
16
  mapElementToBlock,
19
17
  stripMarkdown
20
- } from "./chunk-FR2RBTKO.js";
18
+ } from "./chunk-TQWLI6S2.js";
21
19
  import {
22
20
  DocumentVersionManager,
23
21
  VERSIONS_PREFIX,
@@ -33,6 +31,7 @@ import {
33
31
  } from "./chunk-VLJJHDAC.js";
34
32
  import {
35
33
  arrayItemKind,
34
+ buildJsonFormTokens,
36
35
  chooseControl,
37
36
  evaluateWhen,
38
37
  getByPointer,
@@ -40,10 +39,11 @@ import {
40
39
  pointerSegments,
41
40
  primaryType,
42
41
  resolveFlag,
42
+ resolveJsonFormTheme,
43
43
  resolveRef,
44
44
  setByPointer,
45
45
  toPointer
46
- } from "./chunk-K32VJONL.js";
46
+ } from "./chunk-T5UK6YOB.js";
47
47
  import {
48
48
  IMAGE_EDIT_ASSETS_PREFIX,
49
49
  IMAGE_EDIT_DEFAULT_BASENAME,
@@ -95,9 +95,8 @@ import {
95
95
  getSegmentAtTime,
96
96
  parseTheme,
97
97
  resolveMediaSchedule,
98
- serializeTheme,
99
- validateDoc
100
- } from "./chunk-7MQGNR76.js";
98
+ serializeTheme
99
+ } from "./chunk-A4O7GIWE.js";
101
100
  import {
102
101
  calculateBearing,
103
102
  decodeGeohash,
@@ -111,14 +110,17 @@ import {
111
110
  haversineDistance
112
111
  } from "./chunk-Q3ROPT5H.js";
113
112
  import {
113
+ BASE_INPUT_DESCRIPTORS,
114
114
  CONTAINER_TEMPLATES,
115
115
  DEFAULT_LAYOUT,
116
116
  SHAPE_NAMES,
117
117
  TEMPLATE_ALIASES,
118
+ TEMPLATE_INPUT_DESCRIPTORS,
118
119
  TEMPLATE_METADATA,
119
120
  adjustY,
120
121
  applyRenderStyleToLayers,
121
122
  buildRegistry,
123
+ coerceTemplateParams,
122
124
  comparisonBar,
123
125
  computeDiagramLayout,
124
126
  computeDrawingLayout,
@@ -174,6 +176,7 @@ import {
174
176
  isShapeName,
175
177
  layoutBlock,
176
178
  leftFeature,
179
+ lintTemplateParams,
177
180
  listBlock,
178
181
  mapBlock,
179
182
  markdownToDoc,
@@ -185,6 +188,7 @@ import {
185
188
  quoteBlock,
186
189
  readCustomTemplatesFromFrontmatter,
187
190
  readCustomThemesFromFrontmatter,
191
+ replaceDataFence,
188
192
  resolveAudioMapping,
189
193
  resolveColorScheme,
190
194
  resolvePersistentLayers,
@@ -212,11 +216,11 @@ import {
212
216
  wrapWithPersistentLayers,
213
217
  writeCustomTemplatesToFrontmatter,
214
218
  writeCustomThemesToFrontmatter
215
- } from "./chunk-4ZFRZBU2.js";
219
+ } from "./chunk-LH7I6SH7.js";
216
220
  import {
217
221
  profileBlockContents,
218
222
  recommendTemplatesForBlock
219
- } from "./chunk-LRCV7N7F.js";
223
+ } from "./chunk-UY7KGQ5R.js";
220
224
  import "./chunk-V543AI2F.js";
221
225
  import {
222
226
  SeededRandom,
@@ -267,7 +271,7 @@ import {
267
271
  unregisterTheme,
268
272
  validateTheme,
269
273
  withAlpha
270
- } from "./chunk-4AKUQPEE.js";
274
+ } from "./chunk-KKNUBQ6Y.js";
271
275
  import {
272
276
  DEFAULT_DOC_FONT,
273
277
  DEFAULT_TITLE_FONT,
@@ -294,12 +298,12 @@ import {
294
298
  createMediaProviderFromContainer,
295
299
  findDocumentPath,
296
300
  scopeContainer
297
- } from "./chunk-2TMAWB4Y.js";
301
+ } from "./chunk-IMSCRLLV.js";
298
302
  import {
299
303
  sanitizeHtmlNodes,
300
304
  sanitizeUrl,
301
305
  stringifyMarkdown
302
- } from "./chunk-KZNXZ5SM.js";
306
+ } from "./chunk-6ATE2PSM.js";
303
307
  import {
304
308
  BLOCK_META_KEY_DESCRIPTORS,
305
309
  KNOWN_BLOCK_META_KEYS,
@@ -316,12 +320,13 @@ import {
316
320
  toMdast,
317
321
  tokenizeAttrTokens,
318
322
  unquoteAttrValue
319
- } from "./chunk-OH43RPTP.js";
323
+ } from "./chunk-TEEEILMP.js";
320
324
  import {
321
325
  countNodes,
322
326
  createDocument,
323
327
  extractPlainText,
324
328
  findNodesByType,
329
+ formatBlockScalar,
325
330
  getChildren,
326
331
  inferDocumentTitle,
327
332
  parseFrontmatter,
@@ -331,7 +336,7 @@ import {
331
336
  setFrontmatterValues,
332
337
  stringifyHtmlNodes,
333
338
  walkMarkdownTree
334
- } from "./chunk-OKJOQXK4.js";
339
+ } from "./chunk-HWVFJAAH.js";
335
340
  import {
336
341
  ICONS,
337
342
  canonicalIconToken,
@@ -351,20 +356,19 @@ import {
351
356
  resolveTransitionDuration
352
357
  } from "./chunk-QE7TWGVT.js";
353
358
  import "./chunk-DNJKBAI7.js";
354
- import {
355
- estimateNarrationTime,
356
- estimateReadingTime
357
- } from "./chunk-4X3JQXNM.js";
358
359
  import {
359
360
  DEFAULT_WORDS_PER_SECOND,
360
361
  calculatePrefixDuration,
361
362
  countSpokenWords,
362
363
  estimateNarrationDuration,
364
+ estimateNarrationTime,
365
+ estimateReadingTime,
363
366
  estimateSpokenWordCount,
364
367
  estimateTimeFromText
365
- } from "./chunk-3E5F2XMR.js";
368
+ } from "./chunk-VWUFZ6ZG.js";
366
369
  export {
367
370
  AVAILABLE_FONT_STACKS,
371
+ BASE_INPUT_DESCRIPTORS,
368
372
  BLOCK_META_KEY_DESCRIPTORS,
369
373
  CONTAINER_TEMPLATES,
370
374
  DARK_SURFACE,
@@ -398,6 +402,7 @@ export {
398
402
  ScopedContentContainer,
399
403
  SeededRandom,
400
404
  TEMPLATE_ALIASES,
405
+ TEMPLATE_INPUT_DESCRIPTORS,
401
406
  TEMPLATE_METADATA,
402
407
  THEMES,
403
408
  THEME_SCHEMA_VERSION,
@@ -416,6 +421,7 @@ export {
416
421
  assertTheme,
417
422
  buildGoogleFontsUrl,
418
423
  buildImageEditVersionPath,
424
+ buildJsonFormTokens,
419
425
  buildRegistry,
420
426
  buildSvgString,
421
427
  buildVersionPath,
@@ -429,6 +435,7 @@ export {
429
435
  clipPoint,
430
436
  coalesceImageEditVersions,
431
437
  coalesceVersions,
438
+ coerceTemplateParams,
432
439
  comparisonBar,
433
440
  compileTheme,
434
441
  computeDiagramLayout,
@@ -489,10 +496,10 @@ export {
489
496
  flattenBlocks,
490
497
  flattenRenderableBlocks,
491
498
  fontStack,
499
+ formatBlockScalar,
492
500
  formatVersionTimestamp,
493
501
  fromMdast,
494
502
  fullBleedQuote,
495
- generateSlideshow,
496
503
  geohashOverlapsBounds,
497
504
  geohashToHierarchicalPath,
498
505
  getAccentLayout,
@@ -554,6 +561,7 @@ export {
554
561
  scaledFontSize as layoutScaledFontSize,
555
562
  leftFeature,
556
563
  lineStyleDasharray,
564
+ lintTemplateParams,
557
565
  listBlock,
558
566
  listImageEditVersions,
559
567
  listVersions,
@@ -607,12 +615,14 @@ export {
607
615
  relativeLuminance,
608
616
  removeLayer,
609
617
  reorderLayer,
618
+ replaceDataFence,
610
619
  resolveAudioMapping,
611
620
  resolveBlockTransition,
612
621
  resolveColorScheme,
613
622
  resolveFlag,
614
623
  resolveFontFamily,
615
624
  resolveIcon,
625
+ resolveJsonFormTheme,
616
626
  resolveMediaSchedule,
617
627
  resolvePersistentLayers,
618
628
  resolveRef,
@@ -665,7 +675,6 @@ export {
665
675
  unregisterTheme,
666
676
  unregisterTransformStyle,
667
677
  updateLayer,
668
- validateDoc,
669
678
  validateMarkdownDoc,
670
679
  validateMarkdownSource,
671
680
  validateTheme,
@@ -1,3 +1,6 @@
1
+ import { az as Theme, ap as SurfaceScheme } from '../Doc-BBVGq1_9.js';
2
+ import '../types-DlAZ7MW4.js';
3
+
1
4
  /**
2
5
  * JSON Form types — Squisq's hint vocabulary layered on JSON Schema.
3
6
  *
@@ -188,4 +191,42 @@ interface InferSchemaOptions {
188
191
  }
189
192
  declare function inferSchema(sample: unknown, options?: InferSchemaOptions): SquisqAnnotatedSchema;
190
193
 
191
- export { type ControlKind, type InferSchemaOptions, type JsonFormValidationError, type JsonFormValidator, type SquisqAnnotatedSchema, type SquisqHints, type SquisqWhen, arrayItemKind, chooseControl, evaluateWhen, getByPointer, inferSchema, pointerSegments, primaryType, resolveFlag, resolveRef, setByPointer, toPointer };
194
+ /**
195
+ * Pure CSS-custom-property builder shared by `<JsonView>` (read-only, in
196
+ * `@bendyline/squisq-react`) and `<JsonEditor>` (editable, in
197
+ * `@bendyline/squisq-editor-react`).
198
+ *
199
+ * Both components derive an identical token bag from a Theme + resolved
200
+ * Surface; they differ only in the CSS-var prefix (`--squisq-json` vs
201
+ * `--squisq-jsonform`) so the viewer and editor can coexist on one page.
202
+ * This function is the single source of that derivation. It is pure and
203
+ * framework-free: it performs no `window` / `matchMedia` access — the
204
+ * surface must already be resolved to a concrete `SurfaceScheme` (or left
205
+ * `undefined` to skip surface application) by the calling React hook.
206
+ */
207
+
208
+ interface BuildJsonFormTokensOptions {
209
+ /**
210
+ * CSS-var prefix WITHOUT the trailing dash, e.g. `--squisq-json` or
211
+ * `--squisq-jsonform`. Each token key is `${prefix}-${name}`.
212
+ */
213
+ prefix: string;
214
+ }
215
+ /**
216
+ * Build the CSS custom-property map for a JSON form/view surface.
217
+ *
218
+ * @param theme The theme to render with (falls back to `DEFAULT_THEME`).
219
+ * @param surface Already-resolved concrete surface, or `undefined` to leave
220
+ * the theme un-surfaced. (The `'auto'` → concrete resolution
221
+ * is the React hook's job, so this stays pure.)
222
+ * @param options `{ prefix }` — the CSS-var namespace.
223
+ */
224
+ declare function buildJsonFormTokens(theme: Theme | undefined, surface: SurfaceScheme | undefined, options: BuildJsonFormTokensOptions): Record<string, string>;
225
+ /**
226
+ * Resolve the effective theme after surface application — the companion to
227
+ * `buildJsonFormTokens` for callers that also need the `Theme` object (both
228
+ * hooks return it alongside the style bag).
229
+ */
230
+ declare function resolveJsonFormTheme(theme: Theme | undefined, surface: SurfaceScheme | undefined): Theme;
231
+
232
+ export { type BuildJsonFormTokensOptions, type ControlKind, type InferSchemaOptions, type JsonFormValidationError, type JsonFormValidator, type SquisqAnnotatedSchema, type SquisqHints, type SquisqWhen, arrayItemKind, buildJsonFormTokens, chooseControl, evaluateWhen, getByPointer, inferSchema, pointerSegments, primaryType, resolveFlag, resolveJsonFormTheme, resolveRef, setByPointer, toPointer };
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  arrayItemKind,
3
+ buildJsonFormTokens,
3
4
  chooseControl,
4
5
  evaluateWhen,
5
6
  getByPointer,
@@ -7,12 +8,18 @@ import {
7
8
  pointerSegments,
8
9
  primaryType,
9
10
  resolveFlag,
11
+ resolveJsonFormTheme,
10
12
  resolveRef,
11
13
  setByPointer,
12
14
  toPointer
13
- } from "../chunk-K32VJONL.js";
15
+ } from "../chunk-T5UK6YOB.js";
16
+ import "../chunk-A4O7GIWE.js";
17
+ import "../chunk-KKNUBQ6Y.js";
18
+ import "../chunk-DLXZMS5K.js";
19
+ import "../chunk-QE7TWGVT.js";
14
20
  export {
15
21
  arrayItemKind,
22
+ buildJsonFormTokens,
16
23
  chooseControl,
17
24
  evaluateWhen,
18
25
  getByPointer,
@@ -20,6 +27,7 @@ export {
20
27
  pointerSegments,
21
28
  primaryType,
22
29
  resolveFlag,
30
+ resolveJsonFormTheme,
23
31
  resolveRef,
24
32
  setByPointer,
25
33
  toPointer
@@ -339,6 +339,14 @@ declare function stringifyHtmlNodes(nodes: HtmlNode[]): string;
339
339
 
340
340
  type HtmlPolicy = 'strip' | 'sanitize' | 'trusted';
341
341
  type UrlKind = 'link' | 'media';
342
+ interface SanitizeUrlOptions {
343
+ /**
344
+ * Extra lowercase schemes allowed for `kind: 'link'` — the host-app escape
345
+ * hatch for custom link protocols it intercepts itself (e.g. an app-internal
346
+ * navigation scheme). Executable schemes are refused regardless.
347
+ */
348
+ extraLinkSchemes?: readonly string[];
349
+ }
342
350
  /**
343
351
  * Sanitize a URL for a rendered link or media attribute.
344
352
  *
@@ -347,7 +355,7 @@ type UrlKind = 'link' | 'media';
347
355
  * `blob:` and image/audio/video `data:` URLs because Squisq uses both for
348
356
  * browser-local media previews and self-contained exports.
349
357
  */
350
- declare function sanitizeUrl(url: string | null | undefined, kind?: UrlKind): string | null;
358
+ declare function sanitizeUrl(url: string | null | undefined, kind?: UrlKind, options?: SanitizeUrlOptions): string | null;
351
359
  /**
352
360
  * Return a sanitized copy of an HtmlNode tree. The original parsed tree is left
353
361
  * untouched so markdown stringify can still preserve source fidelity.
@@ -426,6 +434,14 @@ declare function countNodes(node: MarkdownNode): number;
426
434
  * @returns A record of string keys to parsed values, or null
427
435
  */
428
436
  declare function parseFrontmatter(yaml: string): Record<string, unknown> | null;
437
+ /**
438
+ * Format a multi-line string as a YAML literal block scalar body, i.e.
439
+ * `|-` followed by each source line indented two spaces. Paired with
440
+ * {@link parseFrontmatter}'s block-scalar reader so multi-line frontmatter
441
+ * values (e.g. pretty-printed JSON payloads) round-trip. Blank lines stay
442
+ * blank (no trailing whitespace) so the output diffs cleanly.
443
+ */
444
+ declare function formatBlockScalar(value: string): string;
429
445
  /**
430
446
  * Update a markdown source string's YAML frontmatter block, applying the
431
447
  * given key/value updates. A `null` or `undefined` value removes the key.
@@ -483,4 +499,4 @@ declare function readFrontmatterThemeId(frontmatter: Record<string, unknown> | u
483
499
  */
484
500
  declare function plainTextFromInlineHtml(html: string): string;
485
501
 
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 };
502
+ export { BLOCK_META_KEY_DESCRIPTORS, type BlockMetaKeyDescriptor, HeadingAttributes, HtmlNode, type HtmlPolicy, KNOWN_BLOCK_META_KEYS, type KnownBlockMetaKey, MarkdownDocument, MarkdownNode, ParseOptions, type SanitizeUrlOptions, StringifyOptions, type TrailingAnnotationMatch, type UrlKind, countNodes, createDocument, extractPlainText, findNodesByType, formatBlockScalar, 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 };
@@ -2,7 +2,7 @@ import {
2
2
  sanitizeHtmlNodes,
3
3
  sanitizeUrl,
4
4
  stringifyMarkdown
5
- } from "../chunk-KZNXZ5SM.js";
5
+ } from "../chunk-6ATE2PSM.js";
6
6
  import {
7
7
  BLOCK_META_KEY_DESCRIPTORS,
8
8
  KNOWN_BLOCK_META_KEYS,
@@ -19,12 +19,13 @@ import {
19
19
  toMdast,
20
20
  tokenizeAttrTokens,
21
21
  unquoteAttrValue
22
- } from "../chunk-OH43RPTP.js";
22
+ } from "../chunk-TEEEILMP.js";
23
23
  import {
24
24
  countNodes,
25
25
  createDocument,
26
26
  extractPlainText,
27
27
  findNodesByType,
28
+ formatBlockScalar,
28
29
  getChildren,
29
30
  inferDocumentTitle,
30
31
  parseFrontmatter,
@@ -34,7 +35,7 @@ import {
34
35
  setFrontmatterValues,
35
36
  stringifyHtmlNodes,
36
37
  walkMarkdownTree
37
- } from "../chunk-OKJOQXK4.js";
38
+ } from "../chunk-HWVFJAAH.js";
38
39
  import "../chunk-DBS6RIFL.js";
39
40
  import "../chunk-QE7TWGVT.js";
40
41
  export {
@@ -44,6 +45,7 @@ export {
44
45
  createDocument,
45
46
  extractPlainText,
46
47
  findNodesByType,
48
+ formatBlockScalar,
47
49
  fromMdast,
48
50
  getChildren,
49
51
  inferDocumentTitle,
@@ -2,8 +2,8 @@ import "../chunk-ZLQKNOZQ.js";
2
2
  import {
3
3
  profileBlockContents,
4
4
  recommendTemplatesForBlock
5
- } from "../chunk-LRCV7N7F.js";
6
- import "../chunk-OKJOQXK4.js";
5
+ } from "../chunk-UY7KGQ5R.js";
6
+ import "../chunk-HWVFJAAH.js";
7
7
  export {
8
8
  profileBlockContents,
9
9
  recommendTemplatesForBlock
@@ -1,10 +1,10 @@
1
1
  export { B as BoundingBox, C as Coordinates } from '../Types-sh2VRxfo.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';
2
+ import { az as Theme, v as DeepPartial, aD as ThemeSeedColors, aA as ThemeColorPalette, K as FontFamilyKind, J as FontFamily } from '../Doc-BBVGq1_9.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, q as CustomTemplateLayer, D as DARK_SURFACE, r as DEFAULT_DOC_FONT, s as DEFAULT_TITLE_FONT, t as DataTableInput, u as DateEventInput, w as DefinitionCardInput, x as DiagramBlockInput, y as Doc, z as DocBlock, E as DocDiagnostic, F as DrawingBlockInput, G as FRONTMATTER_CUSTOM_TEMPLATES_KEY, H as FRONTMATTER_CUSTOM_THEMES_KEY, I as FactCardInput, L as FullBleedQuoteInput, M as GradientBackgroundConfig, N as ImageBackgroundConfig, O as ImageLayer, P as ImageTreatment, Q as ImageWithCaptionInput, R as LIGHT_SURFACE, S as Layer, T as LayerRepeat, U as LayoutHints, V as LeftFeatureInput, W as LinearGradient, X as ListBlockInput, Y as MapBlockInput, Z as MapLayer, _ as MapMarker, $ as MapTileStyle, a0 as MarkerStyle, a1 as MediaClip, a2 as PathLayer, a3 as PatternBackgroundConfig, a4 as PersistentLayer, a5 as PersistentLayerConfig, a6 as PersistentLayerTemplate, a7 as PersistentLayerTemplateConfig, a8 as PersistentLayerTemplateType, a9 as PhotoGridInput, aa as Position, ab as ProgressIndicatorConfig, ac as PullQuoteInput, ad as QuoteBlockInput, ae as RawLayersInput, af as RenderStyle, ag as RightFeatureInput, ah as ScheduledClip, ai as SectionHeaderInput, aj as ShapeFilter, ak as ShapeLayer, al as ShapePattern, am as SolidBackgroundConfig, an as StartBlockConfig, ao as StatHighlightInput, ap as SurfaceScheme, aq as THEME_SCHEMA_VERSION, ar as TableLayer, as as TableLayerStyle, at as TemplateBlock, au as TemplateContext, av as TemplateFunction, aw as TemplateRegistry, ax as TextLayer, ay as TextStyle, aB as ThemeColorScheme, aC as ThemeSchemaVersion, aE as ThemeStyle, aF as ThemeTypography, aG as TitleBlockInput, aH as TitleCaptionConfig, aI as TwoColumnInput, aJ as VIEWPORT_PRESETS, aK as VideoLayer, aL as VideoPullQuoteInput, aM as VideoWithCaptionInput, aN as ViewportConfig, aO as ViewportOrientation, aP as ViewportPreset, aQ as VignetteConfig, aR as applySurface, aS as calculateDuration, aT as calculateFontScale, aU as createTemplateContext, aV as createTheme, aW as getAspectRatioString, aX as getBlockAtTime, aY as getCaptionAtTime, aZ as getDocPlaybackDuration, a_ as getLayoutHints, a$ as getRegisteredThemes, b0 as getSafeTextBounds, b1 as getSegmentAtTime, b2 as getTwoColumnPositions, b3 as getViewport, b4 as getViewportOrientation, b5 as isPersistentLayerTemplate, b6 as isTemplateBlock, b7 as layoutScaledFontSize, b8 as lookupRegisteredTheme, b9 as registerTheme, ba as resolveMediaSchedule, bb as scaledFontSize, bc as unregisterTheme } from '../Doc-BBVGq1_9.js';
4
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
+ export { D as DEFAULT_THEME, a as DEFAULT_THEME_ID, T as THEMES, g as getAvailableThemes, b as getThemeSummaries, r as resolveTheme } from '../themeLibrary-CehcJhzz.js';
6
6
  export { M as MediaEntry, a as MediaProvider } from '../MediaProvider-wpSe21B3.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';
7
+ export { E as EditorLayerMeta, I as ImageEditCanvas, a as ImageEditDoc, b as ImageEditLayer, c as ImageEditLayerKind, d as ImageEditMeta } from '../ImageEditDoc-FuyGtt6o.js';
8
8
 
9
9
  /**
10
10
  * Theme Validator
@@ -9,9 +9,8 @@ import {
9
9
  getSegmentAtTime,
10
10
  parseTheme,
11
11
  resolveMediaSchedule,
12
- serializeTheme,
13
- validateDoc
14
- } from "../chunk-7MQGNR76.js";
12
+ serializeTheme
13
+ } from "../chunk-A4O7GIWE.js";
15
14
  import {
16
15
  AVAILABLE_FONT_STACKS,
17
16
  DARK_SURFACE,
@@ -48,7 +47,7 @@ import {
48
47
  unregisterTheme,
49
48
  validateTheme,
50
49
  withAlpha
51
- } from "../chunk-4AKUQPEE.js";
50
+ } from "../chunk-KKNUBQ6Y.js";
52
51
  import {
53
52
  DEFAULT_DOC_FONT,
54
53
  DEFAULT_TITLE_FONT,
@@ -144,7 +143,6 @@ export {
144
143
  scaledFontSize2 as scaledFontSize,
145
144
  serializeTheme,
146
145
  unregisterTheme,
147
- validateDoc,
148
146
  validateTheme,
149
147
  withAlpha
150
148
  };
@@ -1,5 +1,5 @@
1
- import { C as ContentContainer, a as ContentEntry } from '../ContentContainer-DNx460y8.js';
2
- export { M as MemoryContentContainer, f as findDocumentPath } from '../ContentContainer-DNx460y8.js';
1
+ import { C as ContentContainer, a as ContentEntry } from '../ContentContainer-BXUlIf18.js';
2
+ export { M as MemoryContentContainer, f as findDocumentPath } from '../ContentContainer-BXUlIf18.js';
3
3
  import { a as MediaProvider } from '../MediaProvider-wpSe21B3.js';
4
4
 
5
5
  /**
@@ -7,7 +7,7 @@ import {
7
7
  createMediaProviderFromContainer,
8
8
  findDocumentPath,
9
9
  scopeContainer
10
- } from "../chunk-2TMAWB4Y.js";
10
+ } from "../chunk-IMSCRLLV.js";
11
11
  export {
12
12
  LocalForageAdapter,
13
13
  LocalStorageAdapter,