@bendyline/squisq 1.5.2 → 2.0.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 (268) hide show
  1. package/README.md +63 -10
  2. package/dist/{Doc-BBVGq1_9.d.ts → Doc-ylqWKDc_.d.ts} +248 -37
  3. package/dist/{ImageEditDoc-FuyGtt6o.d.ts → ImageEditDoc-D828IXJ1.d.ts} +1 -1
  4. package/dist/annotationCoercion-Dr_DY9Hx.d.ts +86 -0
  5. package/dist/{chunk-T5UK6YOB.js → chunk-2PWOO4ZE.js} +60 -17
  6. package/dist/chunk-2PWOO4ZE.js.map +1 -0
  7. package/dist/{chunk-VWUFZ6ZG.js → chunk-3E5F2XMR.js} +2 -29
  8. package/dist/chunk-3E5F2XMR.js.map +1 -0
  9. package/dist/chunk-4X3JQXNM.js +35 -0
  10. package/dist/chunk-4X3JQXNM.js.map +1 -0
  11. package/dist/{chunk-P3K7NLHF.js → chunk-5DKBFXPY.js} +31 -121
  12. package/dist/chunk-5DKBFXPY.js.map +1 -0
  13. package/dist/{chunk-DLXZMS5K.js → chunk-5J4HKRJF.js} +51 -3
  14. package/dist/chunk-5J4HKRJF.js.map +1 -0
  15. package/dist/chunk-5UYI3RJB.js +2503 -0
  16. package/dist/chunk-5UYI3RJB.js.map +1 -0
  17. package/dist/{chunk-BEQODJWV.js → chunk-66QO7XFB.js} +11 -291
  18. package/dist/chunk-66QO7XFB.js.map +1 -0
  19. package/dist/{chunk-HWVFJAAH.js → chunk-AMIR72JP.js} +28 -10
  20. package/dist/chunk-AMIR72JP.js.map +1 -0
  21. package/dist/chunk-CY2R2VPR.js +884 -0
  22. package/dist/chunk-CY2R2VPR.js.map +1 -0
  23. package/dist/chunk-FVJUUTEM.js +74 -0
  24. package/dist/chunk-FVJUUTEM.js.map +1 -0
  25. package/dist/{chunk-Q3ROPT5H.js → chunk-GZY66SDN.js} +1 -1
  26. package/dist/{chunk-Q3ROPT5H.js.map → chunk-GZY66SDN.js.map} +1 -1
  27. package/dist/chunk-JOQYPRDZ.js +127 -0
  28. package/dist/chunk-JOQYPRDZ.js.map +1 -0
  29. package/dist/{chunk-A4O7GIWE.js → chunk-MMPBOUK7.js} +10 -73
  30. package/dist/chunk-MMPBOUK7.js.map +1 -0
  31. package/dist/{chunk-LDQ2HJIX.js → chunk-PXLVXTLW.js} +252 -54
  32. package/dist/chunk-PXLVXTLW.js.map +1 -0
  33. package/dist/{chunk-TQWLI6S2.js → chunk-Q7LROV2H.js} +4 -2
  34. package/dist/{chunk-TQWLI6S2.js.map → chunk-Q7LROV2H.js.map} +1 -1
  35. package/dist/{chunk-GPLTCSXO.js → chunk-R2GC6RLD.js} +7 -7
  36. package/dist/chunk-R2GC6RLD.js.map +1 -0
  37. package/dist/chunk-R2YZTCLO.js +292 -0
  38. package/dist/chunk-R2YZTCLO.js.map +1 -0
  39. package/dist/chunk-S7A5D7ZJ.js +174 -0
  40. package/dist/chunk-S7A5D7ZJ.js.map +1 -0
  41. package/dist/chunk-TFJVXUHH.js +2358 -0
  42. package/dist/chunk-TFJVXUHH.js.map +1 -0
  43. package/dist/{chunk-LTN6I7QW.js → chunk-TUWMK62B.js} +55 -4
  44. package/dist/chunk-TUWMK62B.js.map +1 -0
  45. package/dist/{chunk-IMSCRLLV.js → chunk-VR7UPJ7C.js} +35 -25
  46. package/dist/chunk-VR7UPJ7C.js.map +1 -0
  47. package/dist/{chunk-KKNUBQ6Y.js → chunk-W4O2TX5I.js} +157 -92
  48. package/dist/chunk-W4O2TX5I.js.map +1 -0
  49. package/dist/{chunk-5TYS5V3G.js → chunk-X6DUONGT.js} +4204 -3560
  50. package/dist/chunk-X6DUONGT.js.map +1 -0
  51. package/dist/doc/index.d.ts +2334 -5
  52. package/dist/doc/index.js +127 -33
  53. package/dist/generate/index.d.ts +7 -2
  54. package/dist/generate/index.js +1 -1
  55. package/dist/imageEdit/index.d.ts +9 -6
  56. package/dist/imageEdit/index.js +3 -3
  57. package/dist/index.d.ts +12 -10
  58. package/dist/index.js +246 -80
  59. package/dist/jsonForm/index.d.ts +7 -3
  60. package/dist/jsonForm/index.js +9 -4
  61. package/dist/markdown/index.d.ts +6 -70
  62. package/dist/markdown/index.js +13 -9
  63. package/dist/narration/index.d.ts +618 -0
  64. package/dist/narration/index.js +82 -0
  65. package/dist/recommend/index.d.ts +15 -1
  66. package/dist/recommend/index.js +2 -2
  67. package/dist/schemas/index.d.ts +28 -6
  68. package/dist/schemas/index.js +15 -13
  69. package/dist/spatial/index.d.ts +0 -1
  70. package/dist/spatial/index.js +1 -1
  71. package/dist/storage/index.js +1 -1
  72. package/dist/{themeLibrary-CehcJhzz.d.ts → themeLibrary-RjVgLpUi.d.ts} +10 -11
  73. package/dist/timing/index.js +5 -3
  74. package/dist/transform/index.d.ts +35 -24
  75. package/dist/transform/index.js +9 -10
  76. package/dist/{types-DlAZ7MW4.d.ts → types-BwMPl2CB.d.ts} +1 -1
  77. package/dist/{types-D98li1gV.d.ts → types-C4kiRn_k.d.ts} +3 -1
  78. package/dist/versions/index.d.ts +2 -1
  79. package/dist/versions/index.js +2 -2
  80. package/package.json +6 -6
  81. package/src/__tests__/applyNarrationTiming.test.ts +190 -0
  82. package/src/__tests__/applyRenderStyle.test.ts +3 -3
  83. package/src/__tests__/asciiDiagramBattle.test.ts +246 -0
  84. package/src/__tests__/asciiDiagramDetect.test.ts +162 -0
  85. package/src/__tests__/asciiDiagramMapping.test.ts +38 -0
  86. package/src/__tests__/asciiDiagramParse.test.ts +233 -0
  87. package/src/__tests__/asciiDiagramPipeline.test.ts +273 -0
  88. package/src/__tests__/asciiDiagramRender.test.ts +162 -0
  89. package/src/__tests__/asciiDiagramRepair.test.ts +84 -0
  90. package/src/__tests__/asciiTimelineDetect.test.ts +157 -0
  91. package/src/__tests__/asciiTimelineParse.test.ts +205 -0
  92. package/src/__tests__/asciiTimelinePipeline.test.ts +349 -0
  93. package/src/__tests__/asciiTimelineRender.test.ts +376 -0
  94. package/src/__tests__/attrTokens.test.ts +5 -0
  95. package/src/__tests__/contentContainer.test.ts +43 -0
  96. package/src/__tests__/customTemplatesFrontmatter.test.ts +0 -15
  97. package/src/__tests__/customThemesFrontmatter.test.ts +1 -0
  98. package/src/__tests__/dataTable.test.ts +25 -15
  99. package/src/__tests__/diagramBlock.test.ts +3 -3
  100. package/src/__tests__/diagramText.test.ts +26 -0
  101. package/src/__tests__/docToMarkdownMedia.test.ts +83 -0
  102. package/src/__tests__/drawingBlock.test.ts +3 -3
  103. package/src/__tests__/fixtures/asciiDiagramBattle.ts +512 -0
  104. package/src/__tests__/fixtures/asciiDiagrams.ts +287 -0
  105. package/src/__tests__/fixtures/asciiTimelines.ts +35 -0
  106. package/src/__tests__/fixtures/treeviewFixtures.ts +243 -0
  107. package/src/__tests__/getLayers.test.ts +32 -18
  108. package/src/__tests__/getLayersFallback.test.ts +8 -8
  109. package/src/__tests__/imageEditVersions.test.ts +2 -0
  110. package/src/__tests__/jsonForm.pointer.test.ts +47 -1
  111. package/src/__tests__/layoutBlock.test.ts +3 -3
  112. package/src/__tests__/majorApiTypes.test.ts +18 -0
  113. package/src/__tests__/markdown.test.ts +54 -4
  114. package/src/__tests__/markdownSanitize.test.ts +7 -5
  115. package/src/__tests__/matchFontFamily.test.ts +114 -0
  116. package/src/__tests__/materializeBlockLayers.test.ts +135 -0
  117. package/src/__tests__/materializeTestUtils.ts +17 -0
  118. package/src/__tests__/narrationAlign.test.ts +150 -0
  119. package/src/__tests__/narrationFeatures.test.ts +71 -0
  120. package/src/__tests__/narrationNuclei.test.ts +45 -0
  121. package/src/__tests__/narrationPacing.test.ts +189 -0
  122. package/src/__tests__/narrationScript.test.ts +149 -0
  123. package/src/__tests__/narrationSessionRepro.test.ts +62 -0
  124. package/src/__tests__/narrationSidecar.test.ts +88 -0
  125. package/src/__tests__/narrationSyllables.test.ts +65 -0
  126. package/src/__tests__/narrationTestSignals.ts +167 -0
  127. package/src/__tests__/narrationVad.test.ts +66 -0
  128. package/src/__tests__/resolveDocTheme.test.ts +16 -2
  129. package/src/__tests__/rootExports.test.ts +18 -0
  130. package/src/__tests__/scopedContentContainer.test.ts +20 -0
  131. package/src/__tests__/shapeGeometry.test.ts +12 -0
  132. package/src/__tests__/templateAnnotationParse.test.ts +10 -0
  133. package/src/__tests__/templateInputs.test.ts +69 -0
  134. package/src/__tests__/templateMetadata.test.ts +2 -1
  135. package/src/__tests__/templates.test.ts +143 -17
  136. package/src/__tests__/themeCompile.test.ts +49 -22
  137. package/src/__tests__/transformProvenance.test.ts +160 -0
  138. package/src/__tests__/transformV2.test.ts +40 -14
  139. package/src/__tests__/treeviewBattle.test.ts +76 -0
  140. package/src/__tests__/treeviewDetect.test.ts +168 -0
  141. package/src/__tests__/treeviewParse.test.ts +118 -0
  142. package/src/__tests__/treeviewPipeline.test.ts +183 -0
  143. package/src/__tests__/treeviewRender.test.ts +91 -0
  144. package/src/__tests__/versions.test.ts +44 -0
  145. package/src/doc/applyNarrationTiming.ts +244 -0
  146. package/src/doc/asciiDiagram/chars.ts +210 -0
  147. package/src/doc/asciiDiagram/detect.ts +175 -0
  148. package/src/doc/asciiDiagram/index.ts +38 -0
  149. package/src/doc/asciiDiagram/mapping.ts +225 -0
  150. package/src/doc/asciiDiagram/parse.ts +1095 -0
  151. package/src/doc/asciiDiagram/render.ts +963 -0
  152. package/src/doc/asciiDiagram/repair.ts +400 -0
  153. package/src/doc/asciiDiagram/types.ts +65 -0
  154. package/src/doc/asciiTimeline/detect.ts +138 -0
  155. package/src/doc/asciiTimeline/index.ts +26 -0
  156. package/src/doc/asciiTimeline/mapping.ts +43 -0
  157. package/src/doc/asciiTimeline/parse.ts +870 -0
  158. package/src/doc/asciiTimeline/render.ts +427 -0
  159. package/src/doc/asciiTimeline/types.ts +73 -0
  160. package/src/doc/asciiTimeline/wrappedFlow.ts +427 -0
  161. package/src/doc/audioMapping.ts +60 -46
  162. package/src/doc/customTemplatesFrontmatter.ts +0 -41
  163. package/src/doc/docToMarkdown.ts +70 -2
  164. package/src/doc/index.ts +76 -4
  165. package/src/doc/markdownToDoc.ts +138 -2
  166. package/src/doc/materializeBlockLayers.ts +304 -0
  167. package/src/doc/mediaAnnotations.ts +20 -0
  168. package/src/doc/resolveDocTheme.ts +8 -7
  169. package/src/doc/templateInputs.ts +185 -2
  170. package/src/doc/templates/__tests__/customTemplateRegistry.test.ts +22 -8
  171. package/src/doc/templates/__tests__/listBlock.test.ts +64 -0
  172. package/src/doc/templates/diagramBlock.ts +237 -38
  173. package/src/doc/templates/fallbackBlock.ts +1 -1
  174. package/src/doc/templates/index.ts +134 -279
  175. package/src/doc/templates/inputDescriptors.ts +20 -1
  176. package/src/doc/templates/listBlock.ts +88 -30
  177. package/src/doc/templates/metadata.ts +10 -0
  178. package/src/doc/templates/persistentLayers.ts +12 -126
  179. package/src/doc/templates/registry.ts +88 -0
  180. package/src/doc/templates/templateNames.ts +22 -0
  181. package/src/doc/templates/timelineBlock.ts +613 -0
  182. package/src/doc/templates/treeBlock.ts +131 -0
  183. package/src/doc/treeview/chars.ts +72 -0
  184. package/src/doc/treeview/detect.ts +145 -0
  185. package/src/doc/treeview/index.ts +30 -0
  186. package/src/doc/treeview/mapping.ts +95 -0
  187. package/src/doc/treeview/parse.ts +201 -0
  188. package/src/doc/treeview/render.ts +41 -0
  189. package/src/doc/treeview/types.ts +43 -0
  190. package/src/doc/utils/applyRenderStyle.ts +2 -9
  191. package/src/doc/utils/diagramText.ts +78 -0
  192. package/src/doc/utils/shapeGeometry.ts +67 -5
  193. package/src/doc/validate.ts +1 -1
  194. package/src/generate/templateMapper.ts +7 -0
  195. package/src/imageEdit/export.ts +6 -5
  196. package/src/imageEdit/versionPaths.ts +13 -26
  197. package/src/imageEdit/versions.ts +21 -100
  198. package/src/index.ts +1 -0
  199. package/src/internal/immutable.ts +58 -0
  200. package/src/jsonForm/index.ts +9 -1
  201. package/src/jsonForm/pointer.ts +68 -23
  202. package/src/markdown/attrTokens.ts +7 -5
  203. package/src/markdown/index.ts +1 -0
  204. package/src/markdown/stringify.ts +4 -9
  205. package/src/markdown/utils.ts +36 -14
  206. package/src/narration/align.ts +514 -0
  207. package/src/narration/features.ts +231 -0
  208. package/src/narration/index.ts +86 -0
  209. package/src/narration/nuclei.ts +118 -0
  210. package/src/narration/pacing.ts +211 -0
  211. package/src/narration/script.ts +239 -0
  212. package/src/narration/session.ts +100 -0
  213. package/src/narration/sidecar.ts +187 -0
  214. package/src/narration/syllables.ts +85 -0
  215. package/src/narration/trace.ts +50 -0
  216. package/src/narration/types.ts +299 -0
  217. package/src/narration/vad.ts +131 -0
  218. package/src/recommend/numberHighlight.ts +25 -0
  219. package/src/recommend/templates.ts +108 -12
  220. package/src/schemas/BlockTemplates.ts +156 -7
  221. package/src/schemas/Doc.ts +72 -9
  222. package/src/schemas/Media.ts +12 -2
  223. package/src/schemas/Theme.ts +45 -25
  224. package/src/schemas/Viewport.ts +2 -2
  225. package/src/schemas/fontStacks.ts +79 -0
  226. package/src/schemas/themeCompile.ts +15 -0
  227. package/src/schemas/themeConstants.ts +2 -0
  228. package/src/schemas/themeLibrary.ts +25 -19
  229. package/src/schemas/themeValidator.ts +1 -1
  230. package/src/schemas/themes/gezellig.json +1 -1
  231. package/src/spatial/Geohash.ts +0 -3
  232. package/src/storage/ContentContainer.ts +17 -9
  233. package/src/storage/ScopedContentContainer.ts +45 -15
  234. package/src/transform/applyTransform.ts +5 -5
  235. package/src/transform/index.ts +3 -1
  236. package/src/transform/registry.ts +169 -49
  237. package/src/transform/templateSelector.ts +21 -2
  238. package/src/transform/timingAllocator.ts +152 -21
  239. package/src/transform/types.ts +14 -1
  240. package/src/versions/gitignore.ts +34 -0
  241. package/src/versions/index.ts +2 -0
  242. package/src/versions/operations.ts +18 -104
  243. package/src/versions/paths.ts +13 -28
  244. package/src/versions/snapshotStore.ts +202 -0
  245. package/src/versions/types.ts +3 -1
  246. package/dist/chunk-5TYS5V3G.js.map +0 -1
  247. package/dist/chunk-A4O7GIWE.js.map +0 -1
  248. package/dist/chunk-BEQODJWV.js.map +0 -1
  249. package/dist/chunk-DLXZMS5K.js.map +0 -1
  250. package/dist/chunk-GPLTCSXO.js.map +0 -1
  251. package/dist/chunk-HWVFJAAH.js.map +0 -1
  252. package/dist/chunk-IMSCRLLV.js.map +0 -1
  253. package/dist/chunk-JELIRVDP.js +0 -24
  254. package/dist/chunk-JELIRVDP.js.map +0 -1
  255. package/dist/chunk-KKNUBQ6Y.js.map +0 -1
  256. package/dist/chunk-LDQ2HJIX.js.map +0 -1
  257. package/dist/chunk-LTN6I7QW.js.map +0 -1
  258. package/dist/chunk-P3K7NLHF.js.map +0 -1
  259. package/dist/chunk-T5UK6YOB.js.map +0 -1
  260. package/dist/chunk-UY7KGQ5R.js +0 -192
  261. package/dist/chunk-UY7KGQ5R.js.map +0 -1
  262. package/dist/chunk-VLJJHDAC.js +0 -218
  263. package/dist/chunk-VLJJHDAC.js.map +0 -1
  264. package/dist/chunk-VWUFZ6ZG.js.map +0 -1
  265. package/dist/story/index.d.ts +0 -1801
  266. package/dist/story/index.js +0 -279
  267. package/src/doc/getLayers.ts +0 -195
  268. /package/dist/{story → narration}/index.js.map +0 -0
@@ -1,5 +1,5 @@
1
- import { az as Theme, ap as SurfaceScheme } from '../Doc-BBVGq1_9.js';
2
- import '../types-DlAZ7MW4.js';
1
+ import { aC as Theme, as as SurfaceScheme } from '../Doc-ylqWKDc_.js';
2
+ import '../types-BwMPl2CB.js';
3
3
 
4
4
  /**
5
5
  * JSON Form types — Squisq's hint vocabulary layered on JSON Schema.
@@ -159,8 +159,12 @@ declare function resolveFlag(flag: boolean | SquisqWhen | undefined, rootData: u
159
159
  * `/user/role`. `$ref` resolution is local-only (`#/$defs/Foo`).
160
160
  */
161
161
 
162
+ /** Escape one object-member name for use as an RFC 6901 pointer segment. */
163
+ declare function escapePointerSegment(segment: string): string;
162
164
  /** Normalize a path to a JSON Pointer string. Accepts both forms. */
163
165
  declare function toPointer(path: string): string;
166
+ /** Append one member name to a dotted path or validated JSON Pointer. */
167
+ declare function appendPointer(base: string, segment: string): string;
164
168
  /** Split a JSON Pointer into decoded segments. Empty string → []. */
165
169
  declare function pointerSegments(pointer: string): string[];
166
170
  /** Read a value from data by path (dotted or pointer). Returns undefined if missing. */
@@ -229,4 +233,4 @@ declare function buildJsonFormTokens(theme: Theme | undefined, surface: SurfaceS
229
233
  */
230
234
  declare function resolveJsonFormTheme(theme: Theme | undefined, surface: SurfaceScheme | undefined): Theme;
231
235
 
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 };
236
+ export { type BuildJsonFormTokensOptions, type ControlKind, type InferSchemaOptions, type JsonFormValidationError, type JsonFormValidator, type SquisqAnnotatedSchema, type SquisqHints, type SquisqWhen, appendPointer, arrayItemKind, buildJsonFormTokens, chooseControl, escapePointerSegment, evaluateWhen, getByPointer, inferSchema, pointerSegments, primaryType, resolveFlag, resolveJsonFormTheme, resolveRef, setByPointer, toPointer };
@@ -1,7 +1,9 @@
1
1
  import {
2
+ appendPointer,
2
3
  arrayItemKind,
3
4
  buildJsonFormTokens,
4
5
  chooseControl,
6
+ escapePointerSegment,
5
7
  evaluateWhen,
6
8
  getByPointer,
7
9
  inferSchema,
@@ -12,15 +14,18 @@ import {
12
14
  resolveRef,
13
15
  setByPointer,
14
16
  toPointer
15
- } from "../chunk-T5UK6YOB.js";
16
- import "../chunk-A4O7GIWE.js";
17
- import "../chunk-KKNUBQ6Y.js";
18
- import "../chunk-DLXZMS5K.js";
17
+ } from "../chunk-2PWOO4ZE.js";
18
+ import "../chunk-MMPBOUK7.js";
19
+ import "../chunk-FVJUUTEM.js";
20
+ import "../chunk-W4O2TX5I.js";
21
+ import "../chunk-5J4HKRJF.js";
19
22
  import "../chunk-QE7TWGVT.js";
20
23
  export {
24
+ appendPointer,
21
25
  arrayItemKind,
22
26
  buildJsonFormTokens,
23
27
  chooseControl,
28
+ escapePointerSegment,
24
29
  evaluateWhen,
25
30
  getByPointer,
26
31
  inferSchema,
@@ -1,5 +1,6 @@
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';
1
+ import { V as ParseOptions, m as MarkdownDocument, W as StringifyOptions, H as HeadingAttributes, d as HtmlNode, I as MarkdownNode } from '../types-BwMPl2CB.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-BwMPl2CB.js';
3
+ export { B as BLOCK_META_KEY_DESCRIPTORS, a as BlockMetaKeyDescriptor, K as KNOWN_BLOCK_META_KEYS, b as KnownBlockMetaKey, p as parseTimeSeconds } from '../annotationCoercion-Dr_DY9Hx.js';
3
4
 
4
5
  /**
5
6
  * Markdown → JSON Parser
@@ -244,73 +245,6 @@ declare function needsQuoting(value: string): boolean;
244
245
  */
245
246
  declare function quoteAttrValue(value: string): string;
246
247
 
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
-
314
248
  /**
315
249
  * HTML ↔ HtmlNode Conversion
316
250
  *
@@ -442,6 +376,8 @@ declare function parseFrontmatter(yaml: string): Record<string, unknown> | null;
442
376
  * blank (no trailing whitespace) so the output diffs cleanly.
443
377
  */
444
378
  declare function formatBlockScalar(value: string): string;
379
+ /** Quote a frontmatter scalar so it round-trips cleanly through `parseFrontmatter`. */
380
+ declare function formatFrontmatterValue(value: string | number | boolean): string;
445
381
  /**
446
382
  * Update a markdown source string's YAML frontmatter block, applying the
447
383
  * given key/value updates. A `null` or `undefined` value removes the key.
@@ -499,4 +435,4 @@ declare function readFrontmatterThemeId(frontmatter: Record<string, unknown> | u
499
435
  */
500
436
  declare function plainTextFromInlineHtml(html: string): string;
501
437
 
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 };
438
+ export { HeadingAttributes, HtmlNode, type HtmlPolicy, MarkdownDocument, MarkdownNode, ParseOptions, type SanitizeUrlOptions, StringifyOptions, type TrailingAnnotationMatch, type UrlKind, countNodes, createDocument, extractPlainText, findNodesByType, formatBlockScalar, formatFrontmatterValue, fromMdast, getChildren, inferDocumentTitle, matchTrailingPandocAttr, matchTrailingTemplateAnnotation, needsQuoting, parseFrontmatter, parseHtmlToNodes, parseMarkdown, parsePandocAttrTokens, plainTextFromInlineHtml, quoteAttrValue, readFrontmatterThemeId, sanitizeHtmlNodes, sanitizeUrl, serializePandocAttributes, setFrontmatterValues, splitKeyValueToken, stringifyHtmlNodes, stringifyMarkdown, toMdast, tokenizeAttrTokens, unquoteAttrValue, walkMarkdownTree };
@@ -2,30 +2,34 @@ import {
2
2
  sanitizeHtmlNodes,
3
3
  sanitizeUrl,
4
4
  stringifyMarkdown
5
- } from "../chunk-GPLTCSXO.js";
5
+ } from "../chunk-R2GC6RLD.js";
6
+ import {
7
+ fromMdast,
8
+ parseMarkdown,
9
+ parsePandocAttrTokens,
10
+ serializePandocAttributes,
11
+ toMdast
12
+ } from "../chunk-66QO7XFB.js";
6
13
  import {
7
14
  BLOCK_META_KEY_DESCRIPTORS,
8
15
  KNOWN_BLOCK_META_KEYS,
9
- fromMdast,
10
16
  matchTrailingPandocAttr,
11
17
  matchTrailingTemplateAnnotation,
12
18
  needsQuoting,
13
- parseMarkdown,
14
- parsePandocAttrTokens,
15
19
  parseTimeSeconds,
16
20
  quoteAttrValue,
17
- serializePandocAttributes,
18
21
  splitKeyValueToken,
19
- toMdast,
20
22
  tokenizeAttrTokens,
21
23
  unquoteAttrValue
22
- } from "../chunk-BEQODJWV.js";
24
+ } from "../chunk-R2YZTCLO.js";
25
+ import "../chunk-DBS6RIFL.js";
23
26
  import {
24
27
  countNodes,
25
28
  createDocument,
26
29
  extractPlainText,
27
30
  findNodesByType,
28
31
  formatBlockScalar,
32
+ formatFrontmatterValue,
29
33
  getChildren,
30
34
  inferDocumentTitle,
31
35
  parseFrontmatter,
@@ -35,8 +39,7 @@ import {
35
39
  setFrontmatterValues,
36
40
  stringifyHtmlNodes,
37
41
  walkMarkdownTree
38
- } from "../chunk-HWVFJAAH.js";
39
- import "../chunk-DBS6RIFL.js";
42
+ } from "../chunk-AMIR72JP.js";
40
43
  import "../chunk-QE7TWGVT.js";
41
44
  export {
42
45
  BLOCK_META_KEY_DESCRIPTORS,
@@ -46,6 +49,7 @@ export {
46
49
  extractPlainText,
47
50
  findNodesByType,
48
51
  formatBlockScalar,
52
+ formatFrontmatterValue,
49
53
  fromMdast,
50
54
  getChildren,
51
55
  inferDocumentTitle,