@bendyline/squisq 1.5.2 → 2.0.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 (263) 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-VWUFZ6ZG.js → chunk-3E5F2XMR.js} +2 -29
  6. package/dist/chunk-3E5F2XMR.js.map +1 -0
  7. package/dist/chunk-4X3JQXNM.js +35 -0
  8. package/dist/chunk-4X3JQXNM.js.map +1 -0
  9. package/dist/{chunk-P3K7NLHF.js → chunk-5DKBFXPY.js} +31 -121
  10. package/dist/chunk-5DKBFXPY.js.map +1 -0
  11. package/dist/{chunk-DLXZMS5K.js → chunk-5J4HKRJF.js} +51 -3
  12. package/dist/chunk-5J4HKRJF.js.map +1 -0
  13. package/dist/chunk-5UYI3RJB.js +2503 -0
  14. package/dist/chunk-5UYI3RJB.js.map +1 -0
  15. package/dist/{chunk-BEQODJWV.js → chunk-66QO7XFB.js} +11 -291
  16. package/dist/chunk-66QO7XFB.js.map +1 -0
  17. package/dist/{chunk-KKNUBQ6Y.js → chunk-6PJRB2CF.js} +156 -91
  18. package/dist/chunk-6PJRB2CF.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-FVJUUTEM.js +74 -0
  22. package/dist/chunk-FVJUUTEM.js.map +1 -0
  23. package/dist/{chunk-5TYS5V3G.js → chunk-GF3BVNLU.js} +4127 -3538
  24. package/dist/chunk-GF3BVNLU.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-LYNJEOAC.js} +10 -73
  30. package/dist/chunk-LYNJEOAC.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-T5UK6YOB.js → chunk-QTSJOY54.js} +60 -17
  36. package/dist/chunk-QTSJOY54.js.map +1 -0
  37. package/dist/chunk-QVANWDPH.js +2358 -0
  38. package/dist/chunk-QVANWDPH.js.map +1 -0
  39. package/dist/{chunk-GPLTCSXO.js → chunk-R2GC6RLD.js} +7 -7
  40. package/dist/chunk-R2GC6RLD.js.map +1 -0
  41. package/dist/chunk-R2YZTCLO.js +292 -0
  42. package/dist/chunk-R2YZTCLO.js.map +1 -0
  43. package/dist/chunk-S7A5D7ZJ.js +174 -0
  44. package/dist/chunk-S7A5D7ZJ.js.map +1 -0
  45. package/dist/chunk-T3TI7GSZ.js +884 -0
  46. package/dist/chunk-T3TI7GSZ.js.map +1 -0
  47. package/dist/{chunk-LTN6I7QW.js → chunk-TUWMK62B.js} +55 -4
  48. package/dist/chunk-TUWMK62B.js.map +1 -0
  49. package/dist/{chunk-IMSCRLLV.js → chunk-VR7UPJ7C.js} +35 -25
  50. package/dist/chunk-VR7UPJ7C.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__/dataTable.test.ts +25 -15
  98. package/src/__tests__/diagramBlock.test.ts +3 -3
  99. package/src/__tests__/diagramText.test.ts +26 -0
  100. package/src/__tests__/docToMarkdownMedia.test.ts +83 -0
  101. package/src/__tests__/drawingBlock.test.ts +3 -3
  102. package/src/__tests__/fixtures/asciiDiagramBattle.ts +512 -0
  103. package/src/__tests__/fixtures/asciiDiagrams.ts +287 -0
  104. package/src/__tests__/fixtures/asciiTimelines.ts +35 -0
  105. package/src/__tests__/fixtures/treeviewFixtures.ts +243 -0
  106. package/src/__tests__/getLayers.test.ts +32 -18
  107. package/src/__tests__/getLayersFallback.test.ts +8 -8
  108. package/src/__tests__/imageEditVersions.test.ts +2 -0
  109. package/src/__tests__/jsonForm.pointer.test.ts +47 -1
  110. package/src/__tests__/layoutBlock.test.ts +3 -3
  111. package/src/__tests__/majorApiTypes.test.ts +18 -0
  112. package/src/__tests__/markdown.test.ts +41 -0
  113. package/src/__tests__/matchFontFamily.test.ts +114 -0
  114. package/src/__tests__/materializeBlockLayers.test.ts +135 -0
  115. package/src/__tests__/materializeTestUtils.ts +17 -0
  116. package/src/__tests__/narrationAlign.test.ts +150 -0
  117. package/src/__tests__/narrationFeatures.test.ts +71 -0
  118. package/src/__tests__/narrationNuclei.test.ts +45 -0
  119. package/src/__tests__/narrationPacing.test.ts +189 -0
  120. package/src/__tests__/narrationScript.test.ts +149 -0
  121. package/src/__tests__/narrationSessionRepro.test.ts +62 -0
  122. package/src/__tests__/narrationSidecar.test.ts +88 -0
  123. package/src/__tests__/narrationSyllables.test.ts +65 -0
  124. package/src/__tests__/narrationTestSignals.ts +167 -0
  125. package/src/__tests__/narrationVad.test.ts +66 -0
  126. package/src/__tests__/resolveDocTheme.test.ts +16 -2
  127. package/src/__tests__/rootExports.test.ts +18 -0
  128. package/src/__tests__/scopedContentContainer.test.ts +20 -0
  129. package/src/__tests__/shapeGeometry.test.ts +12 -0
  130. package/src/__tests__/templateAnnotationParse.test.ts +10 -0
  131. package/src/__tests__/templateInputs.test.ts +69 -0
  132. package/src/__tests__/templateMetadata.test.ts +2 -1
  133. package/src/__tests__/templates.test.ts +143 -17
  134. package/src/__tests__/themeCompile.test.ts +49 -22
  135. package/src/__tests__/transformProvenance.test.ts +160 -0
  136. package/src/__tests__/transformV2.test.ts +40 -14
  137. package/src/__tests__/treeviewBattle.test.ts +76 -0
  138. package/src/__tests__/treeviewDetect.test.ts +168 -0
  139. package/src/__tests__/treeviewParse.test.ts +118 -0
  140. package/src/__tests__/treeviewPipeline.test.ts +183 -0
  141. package/src/__tests__/treeviewRender.test.ts +91 -0
  142. package/src/__tests__/versions.test.ts +44 -0
  143. package/src/doc/applyNarrationTiming.ts +244 -0
  144. package/src/doc/asciiDiagram/chars.ts +210 -0
  145. package/src/doc/asciiDiagram/detect.ts +175 -0
  146. package/src/doc/asciiDiagram/index.ts +38 -0
  147. package/src/doc/asciiDiagram/mapping.ts +225 -0
  148. package/src/doc/asciiDiagram/parse.ts +1095 -0
  149. package/src/doc/asciiDiagram/render.ts +963 -0
  150. package/src/doc/asciiDiagram/repair.ts +400 -0
  151. package/src/doc/asciiDiagram/types.ts +65 -0
  152. package/src/doc/asciiTimeline/detect.ts +138 -0
  153. package/src/doc/asciiTimeline/index.ts +26 -0
  154. package/src/doc/asciiTimeline/mapping.ts +43 -0
  155. package/src/doc/asciiTimeline/parse.ts +870 -0
  156. package/src/doc/asciiTimeline/render.ts +427 -0
  157. package/src/doc/asciiTimeline/types.ts +73 -0
  158. package/src/doc/asciiTimeline/wrappedFlow.ts +427 -0
  159. package/src/doc/audioMapping.ts +60 -46
  160. package/src/doc/customTemplatesFrontmatter.ts +0 -41
  161. package/src/doc/docToMarkdown.ts +70 -2
  162. package/src/doc/index.ts +76 -4
  163. package/src/doc/markdownToDoc.ts +135 -1
  164. package/src/doc/materializeBlockLayers.ts +304 -0
  165. package/src/doc/mediaAnnotations.ts +20 -0
  166. package/src/doc/resolveDocTheme.ts +8 -7
  167. package/src/doc/templateInputs.ts +185 -2
  168. package/src/doc/templates/__tests__/customTemplateRegistry.test.ts +22 -8
  169. package/src/doc/templates/diagramBlock.ts +237 -38
  170. package/src/doc/templates/fallbackBlock.ts +1 -1
  171. package/src/doc/templates/index.ts +134 -279
  172. package/src/doc/templates/inputDescriptors.ts +20 -1
  173. package/src/doc/templates/metadata.ts +10 -0
  174. package/src/doc/templates/persistentLayers.ts +12 -126
  175. package/src/doc/templates/registry.ts +88 -0
  176. package/src/doc/templates/templateNames.ts +22 -0
  177. package/src/doc/templates/timelineBlock.ts +613 -0
  178. package/src/doc/templates/treeBlock.ts +131 -0
  179. package/src/doc/treeview/chars.ts +72 -0
  180. package/src/doc/treeview/detect.ts +145 -0
  181. package/src/doc/treeview/index.ts +30 -0
  182. package/src/doc/treeview/mapping.ts +95 -0
  183. package/src/doc/treeview/parse.ts +201 -0
  184. package/src/doc/treeview/render.ts +41 -0
  185. package/src/doc/treeview/types.ts +43 -0
  186. package/src/doc/utils/applyRenderStyle.ts +2 -9
  187. package/src/doc/utils/diagramText.ts +78 -0
  188. package/src/doc/utils/shapeGeometry.ts +67 -5
  189. package/src/doc/validate.ts +1 -1
  190. package/src/generate/templateMapper.ts +7 -0
  191. package/src/imageEdit/export.ts +6 -5
  192. package/src/imageEdit/versionPaths.ts +13 -26
  193. package/src/imageEdit/versions.ts +21 -100
  194. package/src/index.ts +1 -0
  195. package/src/internal/immutable.ts +58 -0
  196. package/src/jsonForm/index.ts +9 -1
  197. package/src/jsonForm/pointer.ts +68 -23
  198. package/src/markdown/attrTokens.ts +7 -5
  199. package/src/markdown/index.ts +1 -0
  200. package/src/markdown/stringify.ts +4 -9
  201. package/src/markdown/utils.ts +36 -14
  202. package/src/narration/align.ts +514 -0
  203. package/src/narration/features.ts +231 -0
  204. package/src/narration/index.ts +86 -0
  205. package/src/narration/nuclei.ts +118 -0
  206. package/src/narration/pacing.ts +211 -0
  207. package/src/narration/script.ts +239 -0
  208. package/src/narration/session.ts +100 -0
  209. package/src/narration/sidecar.ts +187 -0
  210. package/src/narration/syllables.ts +85 -0
  211. package/src/narration/trace.ts +50 -0
  212. package/src/narration/types.ts +299 -0
  213. package/src/narration/vad.ts +131 -0
  214. package/src/recommend/numberHighlight.ts +25 -0
  215. package/src/recommend/templates.ts +108 -12
  216. package/src/schemas/BlockTemplates.ts +156 -7
  217. package/src/schemas/Doc.ts +72 -9
  218. package/src/schemas/Media.ts +12 -2
  219. package/src/schemas/Theme.ts +45 -25
  220. package/src/schemas/Viewport.ts +2 -2
  221. package/src/schemas/fontStacks.ts +79 -0
  222. package/src/schemas/themeCompile.ts +15 -0
  223. package/src/schemas/themeConstants.ts +2 -0
  224. package/src/schemas/themeLibrary.ts +25 -19
  225. package/src/schemas/themeValidator.ts +1 -1
  226. package/src/spatial/Geohash.ts +0 -3
  227. package/src/storage/ContentContainer.ts +17 -9
  228. package/src/storage/ScopedContentContainer.ts +45 -15
  229. package/src/transform/applyTransform.ts +5 -5
  230. package/src/transform/index.ts +3 -1
  231. package/src/transform/registry.ts +169 -49
  232. package/src/transform/templateSelector.ts +21 -2
  233. package/src/transform/timingAllocator.ts +152 -21
  234. package/src/transform/types.ts +14 -1
  235. package/src/versions/gitignore.ts +34 -0
  236. package/src/versions/index.ts +2 -0
  237. package/src/versions/operations.ts +18 -104
  238. package/src/versions/paths.ts +13 -28
  239. package/src/versions/snapshotStore.ts +202 -0
  240. package/src/versions/types.ts +3 -1
  241. package/dist/chunk-5TYS5V3G.js.map +0 -1
  242. package/dist/chunk-A4O7GIWE.js.map +0 -1
  243. package/dist/chunk-BEQODJWV.js.map +0 -1
  244. package/dist/chunk-DLXZMS5K.js.map +0 -1
  245. package/dist/chunk-GPLTCSXO.js.map +0 -1
  246. package/dist/chunk-HWVFJAAH.js.map +0 -1
  247. package/dist/chunk-IMSCRLLV.js.map +0 -1
  248. package/dist/chunk-JELIRVDP.js +0 -24
  249. package/dist/chunk-JELIRVDP.js.map +0 -1
  250. package/dist/chunk-KKNUBQ6Y.js.map +0 -1
  251. package/dist/chunk-LDQ2HJIX.js.map +0 -1
  252. package/dist/chunk-LTN6I7QW.js.map +0 -1
  253. package/dist/chunk-P3K7NLHF.js.map +0 -1
  254. package/dist/chunk-T5UK6YOB.js.map +0 -1
  255. package/dist/chunk-UY7KGQ5R.js +0 -192
  256. package/dist/chunk-UY7KGQ5R.js.map +0 -1
  257. package/dist/chunk-VLJJHDAC.js +0 -218
  258. package/dist/chunk-VLJJHDAC.js.map +0 -1
  259. package/dist/chunk-VWUFZ6ZG.js.map +0 -1
  260. package/dist/story/index.d.ts +0 -1801
  261. package/dist/story/index.js +0 -279
  262. package/src/doc/getLayers.ts +0 -195
  263. /package/dist/{story → narration}/index.js.map +0 -0
@@ -0,0 +1,82 @@
1
+ import {
2
+ DEFAULT_ALIGN_CONFIG,
3
+ DEFAULT_FEATURE_CONFIG,
4
+ DEFAULT_NUCLEI_CONFIG,
5
+ DEFAULT_PACING_CONFIG,
6
+ DEFAULT_VAD_CONFIG,
7
+ alignNarration,
8
+ bandpassRun,
9
+ createBandpass,
10
+ createFeatureState,
11
+ createNarrationSession,
12
+ createNucleiState,
13
+ createPacingState,
14
+ createVadState,
15
+ detectSyllableOnsets,
16
+ downsampleTrace,
17
+ extractFrameFeatures,
18
+ featureStep,
19
+ narrationSessionStep,
20
+ nucleiStep,
21
+ pacingStep,
22
+ reanchorPacing,
23
+ reanchorSession,
24
+ traceWordPosAt,
25
+ vadStep
26
+ } from "../chunk-T3TI7GSZ.js";
27
+ import {
28
+ buildNarrationScript,
29
+ buildNarrationTimingJson,
30
+ estimateSyllables,
31
+ expectedSyllablesAt,
32
+ parseNarrationTimingJson,
33
+ wordIndexAtChar,
34
+ wordIndexAtTime,
35
+ wordPosAtExpectedSyllables
36
+ } from "../chunk-GF3BVNLU.js";
37
+ import "../chunk-TUWMK62B.js";
38
+ import "../chunk-5UYI3RJB.js";
39
+ import "../chunk-6PJRB2CF.js";
40
+ import "../chunk-5J4HKRJF.js";
41
+ import "../chunk-R2YZTCLO.js";
42
+ import "../chunk-AMIR72JP.js";
43
+ import "../chunk-QE7TWGVT.js";
44
+ import "../chunk-4X3JQXNM.js";
45
+ import "../chunk-3E5F2XMR.js";
46
+ import "../chunk-V543AI2F.js";
47
+ import "../chunk-FVTQSNR7.js";
48
+ export {
49
+ DEFAULT_ALIGN_CONFIG,
50
+ DEFAULT_FEATURE_CONFIG,
51
+ DEFAULT_NUCLEI_CONFIG,
52
+ DEFAULT_PACING_CONFIG,
53
+ DEFAULT_VAD_CONFIG,
54
+ alignNarration,
55
+ bandpassRun,
56
+ buildNarrationScript,
57
+ buildNarrationTimingJson,
58
+ createBandpass,
59
+ createFeatureState,
60
+ createNarrationSession,
61
+ createNucleiState,
62
+ createPacingState,
63
+ createVadState,
64
+ detectSyllableOnsets,
65
+ downsampleTrace,
66
+ estimateSyllables,
67
+ expectedSyllablesAt,
68
+ extractFrameFeatures,
69
+ featureStep,
70
+ narrationSessionStep,
71
+ nucleiStep,
72
+ pacingStep,
73
+ parseNarrationTimingJson,
74
+ reanchorPacing,
75
+ reanchorSession,
76
+ traceWordPosAt,
77
+ vadStep,
78
+ wordIndexAtChar,
79
+ wordIndexAtTime,
80
+ wordPosAtExpectedSyllables
81
+ };
82
+ //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { M as MarkdownBlockNode } from '../types-DlAZ7MW4.js';
1
+ import { M as MarkdownBlockNode } from '../types-BwMPl2CB.js';
2
2
 
3
3
  /**
4
4
  * Block template recommendations.
@@ -20,6 +20,20 @@ interface BlockContentProfile {
20
20
  hasDate: boolean;
21
21
  hasNumberHighlight: boolean;
22
22
  wordCount: number;
23
+ /**
24
+ * True when the body is dominated by exactly one code fence whose content
25
+ * is an ASCII box-and-line diagram (see `doc/asciiDiagram/detect.ts`).
26
+ * Optional so externally-constructed profiles keep compiling.
27
+ */
28
+ hasAsciiDiagram?: boolean;
29
+ /** True when a dominant code fence is an authored marker+axis timeline. */
30
+ hasTimeline?: boolean;
31
+ /**
32
+ * True when the body is dominated by exactly one code fence whose content
33
+ * is an ASCII file-tree / outline (see `doc/treeview/detect.ts`). Mutually
34
+ * exclusive with `hasAsciiDiagram`.
35
+ */
36
+ hasTree?: boolean;
23
37
  }
24
38
  interface RecommendationResult {
25
39
  recommended: string[];
@@ -2,8 +2,8 @@ import "../chunk-ZLQKNOZQ.js";
2
2
  import {
3
3
  profileBlockContents,
4
4
  recommendTemplatesForBlock
5
- } from "../chunk-UY7KGQ5R.js";
6
- import "../chunk-HWVFJAAH.js";
5
+ } from "../chunk-5UYI3RJB.js";
6
+ import "../chunk-AMIR72JP.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 { 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
- 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-CehcJhzz.js';
2
+ import { aC as Theme, aE as ThemeColorScheme, v as DeepPartial, aH as ThemeSeedColors, aD as ThemeColorPalette, N as FontFamilyKind, M as FontFamily } from '../Doc-ylqWKDc_.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 DiagramEdgeAnchor, z as DiagramTemplateEdge, E as DiagramTemplateNode, F as Doc, G as DocBlock, H as DocDiagnostic, I as DrawingBlockInput, J as FRONTMATTER_CUSTOM_TEMPLATES_KEY, K as FRONTMATTER_CUSTOM_THEMES_KEY, L as FactCardInput, O as FullBleedQuoteInput, P as GradientBackgroundConfig, Q as ImageBackgroundConfig, R as ImageLayer, S as ImageTreatment, T as ImageWithCaptionInput, U as LIGHT_SURFACE, V as Layer, W as LayerRepeat, X as LayoutHints, Y as LeftFeatureInput, Z as LinearGradient, _ as ListBlockInput, $ as MapBlockInput, a0 as MapLayer, a1 as MapMarker, a2 as MapTileStyle, a3 as MarkerStyle, a4 as MediaClip, a5 as PathLayer, a6 as PatternBackgroundConfig, a7 as PersistentLayer, a8 as PersistentLayerConfig, a9 as PersistentLayerTemplate, aa as PersistentLayerTemplateConfig, ab as PersistentLayerTemplateType, ac as PhotoGridInput, ad as Position, ae as ProgressIndicatorConfig, af as PullQuoteInput, ag as QuoteBlockInput, ah as RawLayersInput, ai as RenderStyle, aj as RightFeatureInput, ak as ScheduledClip, al as SectionHeaderInput, am as ShapeFilter, an as ShapeLayer, ao as ShapePattern, ap as SolidBackgroundConfig, aq as StartBlockConfig, ar as StatHighlightInput, as as SurfaceScheme, at as THEME_SCHEMA_VERSION, au as TableLayer, av as TableLayerStyle, aw as TemplateBlock, ax as TemplateContext, ay as TemplateFunction, az as TemplateRegistry, aA as TextLayer, aB as TextStyle, aF as ThemeRegistry, aG as ThemeSchemaVersion, aI as ThemeStyle, aJ as ThemeTypography, aK as TimelineBlockInput, aL as TimelineTemplateEvent, aM as TimelineTemplateLink, aN as TimelineTemplateTrack, aO as TitleBlockInput, aP as TitleCaptionConfig, aQ as TreeBlockInput, aR as TreeLayer, aS as TreeLayerItem, aT as TreeLayerStyle, aU as TreeTemplateItem, aV as TwoColumnInput, aW as VIEWPORT_PRESETS, aX as VideoLayer, aY as VideoPullQuoteInput, aZ as VideoWithCaptionInput, a_ as ViewportConfig, a$ as ViewportOrientation, b0 as ViewportPreset, b1 as VignetteConfig, b2 as applySurface, b3 as calculateDuration, b4 as calculateFontScale, b5 as createTemplateContext, b6 as createTheme, b7 as createThemeRegistry, b8 as getAspectRatioString, b9 as getBlockAtTime, ba as getCaptionAtTime, bb as getDocPlaybackDuration, bc as getLayoutHints, bd as getSafeTextBounds, be as getSegmentAtTime, bf as getTwoColumnPositions, bg as getViewport, bh as getViewportOrientation, bi as isPersistentLayerTemplate, bj as isTemplateBlock, bk as layoutScaledFontSize, bl as resolveMediaSchedule, bm as scaledFontSize } from '../Doc-ylqWKDc_.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-BwMPl2CB.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-RjVgLpUi.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-FuyGtt6o.js';
7
+ export { E as EditorLayerMeta, I as ImageEditCanvas, a as ImageEditDoc, b as ImageEditLayer, c as ImageEditLayerKind, d as ImageEditMeta } from '../ImageEditDoc-D828IXJ1.js';
8
8
 
9
9
  /**
10
10
  * Theme Validator
@@ -55,6 +55,14 @@ declare const STARTER_THEME: Theme;
55
55
  declare function deriveColorPalette(seeds: ThemeSeedColors, partialColors?: Partial<ThemeColorPalette>, opts?: {
56
56
  contrast?: 'subtle' | 'balanced' | 'high';
57
57
  }): ThemeColorPalette;
58
+ /**
59
+ * Expand one accent color into a full `{bg, text, accent}` color scheme via
60
+ * the OKLCh scale — dark saturated bg, light readable text, the picked accent.
61
+ * Falls back to a neutral scheme when the input isn't a valid hex. Shared by
62
+ * the editor's accent list and file-import theme inference so both derive
63
+ * identical schemes from the same accent.
64
+ */
65
+ declare function accentToColorScheme(accent: string): ThemeColorScheme;
58
66
  /** Map a contrast preset to numeric spread used by `deriveColorPalette`. */
59
67
  type ContrastPreset = 'subtle' | 'balanced' | 'high';
60
68
  interface CompileOptions {
@@ -141,6 +149,20 @@ declare function fontStack(id: string): FontFamily;
141
149
  declare function buildGoogleFontsUrl(families: Array<FontFamily | undefined>): string | null;
142
150
  /** Default fallback families exposed for tools that need them. */
143
151
  declare const FONT_FALLBACKS: Record<FontFamilyKind, string>;
152
+ /**
153
+ * Guess the structured fallback bucket for an arbitrary typeface name.
154
+ * Deliberately never guesses `system-ui` — a wrong serif/sans guess is
155
+ * recoverable in the customizer; `system-ui` erases the signal entirely.
156
+ */
157
+ declare function guessFontFallback(name: string): 'serif' | 'sans-serif' | 'monospace' | 'system-ui';
158
+ /**
159
+ * Map an arbitrary typeface name (e.g. from an imported office document's
160
+ * fontScheme) to a `FontFamily`: a curated `{ stackId }` when the name
161
+ * matches a known stack, else `{ custom }` preserving the original name
162
+ * (original casing, quotes stripped) with a heuristic fallback bucket.
163
+ * Empty/blank names resolve to the system sans stack.
164
+ */
165
+ declare function matchFontFamily(name: string): FontFamily;
144
166
 
145
167
  /**
146
168
  * Color Utilities
@@ -205,4 +227,4 @@ declare function deriveScale(seedHex: string, spread?: number): {
205
227
  darker2: string;
206
228
  };
207
229
 
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 };
230
+ export { AVAILABLE_FONT_STACKS, type CompileOptions, type ContrastPreset, DeepPartial, FONT_FALLBACKS, FontFamily, FontFamilyKind, type FontStack, STARTER_THEME, Theme, ThemeColorPalette, ThemeColorScheme, ThemeSeedColors, type ValidationError, type ValidationResult, accentToColorScheme, assertTheme, buildGoogleFontsUrl, compileTheme, contrastRatio, deriveColorPalette, deriveScale, fontStack, getFontStack, guessFontFallback, hexHueDegrees, isHex, matchFontFamily, oklchDarken, oklchLighten, oklchSetChroma, parseTheme, pickContrastingText, relativeLuminance, resolveFontFamily, serializeTheme, validateTheme, withAlpha };
@@ -1,16 +1,19 @@
1
1
  import {
2
2
  STARTER_THEME,
3
+ accentToColorScheme,
3
4
  calculateDuration,
4
5
  compileTheme,
5
6
  deriveColorPalette,
6
7
  getBlockAtTime,
7
8
  getCaptionAtTime,
8
- getDocPlaybackDuration,
9
9
  getSegmentAtTime,
10
10
  parseTheme,
11
- resolveMediaSchedule,
12
11
  serializeTheme
13
- } from "../chunk-A4O7GIWE.js";
12
+ } from "../chunk-LYNJEOAC.js";
13
+ import {
14
+ getDocPlaybackDuration,
15
+ resolveMediaSchedule
16
+ } from "../chunk-FVJUUTEM.js";
14
17
  import {
15
18
  AVAILABLE_FONT_STACKS,
16
19
  DARK_SURFACE,
@@ -27,27 +30,26 @@ import {
27
30
  buildGoogleFontsUrl,
28
31
  contrastRatio,
29
32
  createTheme,
33
+ createThemeRegistry,
30
34
  deriveScale,
31
35
  fontStack,
32
36
  getAvailableThemes,
33
37
  getFontStack,
34
- getRegisteredThemes,
35
38
  getThemeSummaries,
39
+ guessFontFallback,
36
40
  hexHueDegrees,
37
41
  isHex,
38
- lookupRegisteredTheme,
42
+ matchFontFamily,
39
43
  oklchDarken,
40
44
  oklchLighten,
41
45
  oklchSetChroma,
42
46
  pickContrastingText,
43
- registerTheme,
44
47
  relativeLuminance,
45
48
  resolveFontFamily,
46
49
  resolveTheme,
47
- unregisterTheme,
48
50
  validateTheme,
49
51
  withAlpha
50
- } from "../chunk-KKNUBQ6Y.js";
52
+ } from "../chunk-6PJRB2CF.js";
51
53
  import {
52
54
  DEFAULT_DOC_FONT,
53
55
  DEFAULT_TITLE_FONT,
@@ -64,7 +66,7 @@ import {
64
66
  isTemplateBlock,
65
67
  scaledFontSize,
66
68
  scaledFontSize2
67
- } from "../chunk-DLXZMS5K.js";
69
+ } from "../chunk-5J4HKRJF.js";
68
70
  import {
69
71
  DEFAULT_TRANSITION_DURATION_SECONDS,
70
72
  TRANSITION_DIRECTIONS,
@@ -93,6 +95,7 @@ export {
93
95
  TRANSITION_DIRECTIONS,
94
96
  TRANSITION_TYPES,
95
97
  VIEWPORT_PRESETS,
98
+ accentToColorScheme,
96
99
  applySurface,
97
100
  assertTheme,
98
101
  buildGoogleFontsUrl,
@@ -102,6 +105,7 @@ export {
102
105
  contrastRatio,
103
106
  createTemplateContext,
104
107
  createTheme,
108
+ createThemeRegistry,
105
109
  deriveColorPalette,
106
110
  deriveScale,
107
111
  fontStack,
@@ -112,20 +116,20 @@ export {
112
116
  getDocPlaybackDuration,
113
117
  getFontStack,
114
118
  getLayoutHints,
115
- getRegisteredThemes,
116
119
  getSafeTextBounds,
117
120
  getSegmentAtTime,
118
121
  getThemeSummaries,
119
122
  getTwoColumnPositions,
120
123
  getViewport,
121
124
  getViewportOrientation,
125
+ guessFontFallback,
122
126
  hexHueDegrees,
123
127
  isHex,
124
128
  isPersistentLayerTemplate,
125
129
  isTemplateBlock,
126
130
  isTransitionType,
127
131
  scaledFontSize as layoutScaledFontSize,
128
- lookupRegisteredTheme,
132
+ matchFontFamily,
129
133
  normalizeTransitionDirection,
130
134
  normalizeTransitionType,
131
135
  oklchDarken,
@@ -133,7 +137,6 @@ export {
133
137
  oklchSetChroma,
134
138
  parseTheme,
135
139
  pickContrastingText,
136
- registerTheme,
137
140
  relativeLuminance,
138
141
  resolveBlockTransition,
139
142
  resolveFontFamily,
@@ -142,7 +145,6 @@ export {
142
145
  resolveTransitionDuration,
143
146
  scaledFontSize2 as scaledFontSize,
144
147
  serializeTheme,
145
- unregisterTheme,
146
148
  validateTheme,
147
149
  withAlpha
148
150
  };
@@ -39,7 +39,6 @@ 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
-
43
42
  /**
44
43
  * Encode latitude/longitude to a geohash string.
45
44
  * Uses the standard ngeohash library.
@@ -9,7 +9,7 @@ import {
9
9
  getGeohashPrefix,
10
10
  getNeighbors,
11
11
  haversineDistance
12
- } from "../chunk-Q3ROPT5H.js";
12
+ } from "../chunk-GZY66SDN.js";
13
13
  export {
14
14
  calculateBearing,
15
15
  decodeGeohash,
@@ -7,7 +7,7 @@ import {
7
7
  createMediaProviderFromContainer,
8
8
  findDocumentPath,
9
9
  scopeContainer
10
- } from "../chunk-IMSCRLLV.js";
10
+ } from "../chunk-VR7UPJ7C.js";
11
11
  export {
12
12
  LocalForageAdapter,
13
13
  LocalStorageAdapter,
@@ -1,4 +1,4 @@
1
- import { az as Theme } from './Doc-BBVGq1_9.js';
1
+ import { aC as Theme, aF as ThemeRegistry } from './Doc-ylqWKDc_.js';
2
2
 
3
3
  /**
4
4
  * Built-in Theme Library
@@ -11,27 +11,26 @@ import { az as Theme } from './Doc-BBVGq1_9.js';
11
11
  * ```ts
12
12
  * import { THEMES, resolveTheme } from '@bendyline/squisq/schemas';
13
13
  *
14
- * const theme = resolveTheme('minimalist'); // by id, with registry override
14
+ * const theme = resolveTheme('minimalist'); // built-in lookup by id
15
15
  * const theme = THEMES.documentary; // direct access to a built-in
16
16
  * ```
17
17
  */
18
18
 
19
19
  /** All built-in themes, keyed by id. */
20
- declare const THEMES: Record<string, Theme>;
20
+ declare const THEMES: Readonly<Record<string, Theme>>;
21
21
  /** The default theme id. */
22
22
  declare const DEFAULT_THEME_ID = "standard";
23
23
  /** The default theme (standard — safe system fonts, no external dependencies). */
24
24
  declare const DEFAULT_THEME: Theme;
25
25
  /**
26
- * Resolve a theme by id. Custom themes registered via `registerTheme()`
27
- * take precedence over built-ins; otherwise built-ins are searched and
28
- * the default theme is returned for unknown ids.
26
+ * Resolve a theme by id. When a caller-owned registry is supplied its themes
27
+ * take precedence over built-ins; unknown ids fall back to the default.
29
28
  */
30
- declare function resolveTheme(id: string | undefined): Theme;
31
- /** Get all built-in theme ids. */
32
- declare function getAvailableThemes(): string[];
33
- /** Get a summary of all built-in themes (id + name + description) for theme pickers. */
34
- declare function getThemeSummaries(): Array<{
29
+ declare function resolveTheme(id: string | undefined, registry?: ThemeRegistry): Theme;
30
+ /** Get built-in ids plus ids from an optional caller-owned registry. */
31
+ declare function getAvailableThemes(registry?: ThemeRegistry): string[];
32
+ /** Get summaries for built-ins plus an optional caller-owned registry. */
33
+ declare function getThemeSummaries(registry?: ThemeRegistry): Array<{
35
34
  id: string;
36
35
  name: string;
37
36
  description?: string;
@@ -1,14 +1,16 @@
1
1
  import "../chunk-DNJKBAI7.js";
2
+ import {
3
+ estimateNarrationTime,
4
+ estimateReadingTime
5
+ } from "../chunk-4X3JQXNM.js";
2
6
  import {
3
7
  DEFAULT_WORDS_PER_SECOND,
4
8
  calculatePrefixDuration,
5
9
  countSpokenWords,
6
10
  estimateNarrationDuration,
7
- estimateNarrationTime,
8
- estimateReadingTime,
9
11
  estimateSpokenWordCount,
10
12
  estimateTimeFromText
11
- } from "../chunk-VWUFZ6ZG.js";
13
+ } from "../chunk-3E5F2XMR.js";
12
14
  export {
13
15
  DEFAULT_WORDS_PER_SECOND,
14
16
  calculatePrefixDuration,
@@ -1,6 +1,6 @@
1
- import { m as ColorScheme, y as Doc, B as Block } from '../Doc-BBVGq1_9.js';
1
+ import { m as ColorScheme, F as Doc, B as Block } from '../Doc-ylqWKDc_.js';
2
2
  import { d as ExtractionType, E as ExtractedElement, b as ExtractionOptions } from '../contentExtractor-BNfVJV2U.js';
3
- import '../types-DlAZ7MW4.js';
3
+ import '../types-BwMPl2CB.js';
4
4
 
5
5
  /**
6
6
  * Transform Types
@@ -10,7 +10,7 @@ import '../types-DlAZ7MW4.js';
10
10
  * presentation. Transforms are read-only on the input and deterministic.
11
11
  */
12
12
 
13
- /** Identifier for a registered transform style. */
13
+ /** Identifier for a built-in or caller-registered transform style. */
14
14
  type TransformStyleId = string;
15
15
  /** Summary info for UI dropdowns (mirrors getThemeSummaries pattern). */
16
16
  interface TransformStyleSummary {
@@ -80,6 +80,15 @@ interface TransformStyleConfig {
80
80
  slidesPerMinute?: number;
81
81
  };
82
82
  }
83
+ /** Built-in id or a call-scoped declarative style definition. */
84
+ type TransformStyleInput = TransformStyleId | TransformStyleConfig;
85
+ /** Explicit caller-owned registry for custom transform styles. */
86
+ interface TransformStyleRegistry {
87
+ register(style: TransformStyleConfig): void;
88
+ unregister(id: string): boolean;
89
+ get(id: string): TransformStyleConfig | undefined;
90
+ list(): TransformStyleConfig[];
91
+ }
83
92
  /** Image metadata for image interleaving. */
84
93
  interface TransformImage {
85
94
  /** Image source path or URL. */
@@ -101,6 +110,8 @@ interface TransformOptions {
101
110
  themeId?: string;
102
111
  /** Override specific style config values. */
103
112
  overrides?: Partial<TransformStyleConfig>;
113
+ /** Caller-owned registry used when `style` is an id. */
114
+ registry?: TransformStyleRegistry;
104
115
  }
105
116
  /** Result of applying a transform. */
106
117
  interface TransformResult {
@@ -129,40 +140,40 @@ interface TransformResult {
129
140
  * optimized for visual presentation.
130
141
  *
131
142
  * @param doc - The source Doc (not mutated).
132
- * @param styleId - Registered transform style id (e.g. 'documentary', 'magazine').
133
- * @param options - Optional seed, images, theme override.
143
+ * @param style - Built-in/registry id or a call-scoped declarative style.
144
+ * @param options - Optional seed, images, theme override, and explicit registry.
134
145
  * @returns TransformResult with the new Doc and stats.
135
146
  */
136
- declare function applyTransform(doc: Doc, styleId: TransformStyleId, options?: TransformOptions): TransformResult;
147
+ declare function applyTransform(doc: Doc, style: TransformStyleInput, options?: TransformOptions): TransformResult;
137
148
 
138
149
  /**
139
150
  * Transform Style Registry
140
151
  *
141
- * Central registry of built-in transform styles plus a dynamic
142
- * registration API. Follows the same pattern as themeLibrary.ts /
143
- * `registerTheme` — registered styles take precedence over built-ins,
144
- * unknown ids fall back to the default.
152
+ * Immutable built-in lookup plus explicit caller-owned custom registries.
153
+ * There is deliberately no process-global mutable registry.
145
154
  */
146
155
 
147
156
  /** Default style used when no id is provided. */
148
157
  declare const DEFAULT_TRANSFORM_STYLE_ID = "documentary";
149
158
  /**
150
- * Register (or replace) a custom transform style at runtime. Hosts use
151
- * this the same way they use `registerTheme` to add product-specific
152
- * styles without forking the registry.
159
+ * Create a caller-owned registry. Custom styles are validated, cloned, and
160
+ * deeply frozen at registration time. Built-in resolution remains in the
161
+ * top-level helpers, separate from the registry's caller-owned state.
153
162
  */
154
- declare function registerTransformStyle(style: TransformStyleConfig): void;
155
- /** Remove a previously registered custom style. */
156
- declare function unregisterTransformStyle(id: string): void;
163
+ declare function createTransformStyleRegistry(initialStyles?: readonly TransformStyleConfig[]): TransformStyleRegistry;
157
164
  /**
158
- * Resolve a transform style by id. Registered styles win over built-ins;
159
- * aliases are honored; unknown ids fall back to the default style.
165
+ * Resolve a built-in id, explicit-registry id, or call-scoped style config.
166
+ * Unknown ids fall back to the default style.
160
167
  */
161
- declare function resolveTransformStyle(id: string): TransformStyleConfig;
162
- /** Get all known style ids (built-ins plus registered). */
163
- declare function getTransformStyleIds(): string[];
164
- /** Get summary info for all styles (for UI dropdowns). */
165
- declare function getTransformStyleSummaries(): TransformStyleSummary[];
168
+ declare function resolveTransformStyle(style: TransformStyleInput, registry?: TransformStyleRegistry): TransformStyleConfig;
169
+ /** Get built-in ids plus ids from an optional caller-owned registry. */
170
+ declare function getTransformStyleIds(registry?: TransformStyleRegistry): string[];
171
+ /** Get summaries for built-ins plus an optional caller-owned registry. */
172
+ declare function getTransformStyleSummaries(registry?: TransformStyleRegistry): {
173
+ id: string;
174
+ name: string;
175
+ description: string;
176
+ }[];
166
177
 
167
178
  /**
168
179
  * Block Analyzer
@@ -210,4 +221,4 @@ declare function extractDocImages(blocks: Block[]): TransformImage[];
210
221
  */
211
222
  declare function analyzeBlocks(blocks: Block[], options?: ExtractionOptions): AnalyzedBlock[];
212
223
 
213
- export { type AnalyzedBlock, type BlockImage, DEFAULT_TRANSFORM_STYLE_ID, type TransformImage, type TransformOptions, type TransformResult, type TransformStyleConfig, type TransformStyleId, type TransformStyleSummary, analyzeBlocks, applyTransform, extractDocImages, getTransformStyleIds, getTransformStyleSummaries, registerTransformStyle, resolveTransformStyle, unregisterTransformStyle };
224
+ export { type AnalyzedBlock, type BlockImage, DEFAULT_TRANSFORM_STYLE_ID, type TransformImage, type TransformOptions, type TransformResult, type TransformStyleConfig, type TransformStyleId, type TransformStyleInput, type TransformStyleRegistry, type TransformStyleSummary, analyzeBlocks, applyTransform, createTransformStyleRegistry, extractDocImages, getTransformStyleIds, getTransformStyleSummaries, resolveTransformStyle };
@@ -2,26 +2,25 @@ import {
2
2
  DEFAULT_TRANSFORM_STYLE_ID,
3
3
  analyzeBlocks,
4
4
  applyTransform,
5
+ createTransformStyleRegistry,
5
6
  extractDocImages,
6
7
  getTransformStyleIds,
7
8
  getTransformStyleSummaries,
8
- registerTransformStyle,
9
- resolveTransformStyle,
10
- unregisterTransformStyle
11
- } from "../chunk-LDQ2HJIX.js";
12
- import "../chunk-TQWLI6S2.js";
9
+ resolveTransformStyle
10
+ } from "../chunk-PXLVXTLW.js";
11
+ import "../chunk-Q7LROV2H.js";
12
+ import "../chunk-5J4HKRJF.js";
13
+ import "../chunk-AMIR72JP.js";
14
+ import "../chunk-3E5F2XMR.js";
13
15
  import "../chunk-FVTQSNR7.js";
14
- import "../chunk-DLXZMS5K.js";
15
- import "../chunk-HWVFJAAH.js";
16
16
  export {
17
17
  DEFAULT_TRANSFORM_STYLE_ID,
18
18
  analyzeBlocks,
19
19
  applyTransform,
20
+ createTransformStyleRegistry,
20
21
  extractDocImages,
21
22
  getTransformStyleIds,
22
23
  getTransformStyleSummaries,
23
- registerTransformStyle,
24
- resolveTransformStyle,
25
- unregisterTransformStyle
24
+ resolveTransformStyle
26
25
  };
27
26
  //# sourceMappingURL=index.js.map
@@ -642,4 +642,4 @@ interface StringifyOptions {
642
642
  setext?: boolean;
643
643
  }
644
644
 
645
- export { type TransitionType as $, type MarkdownLinkDefinition as A, type MarkdownLinkReference as B, type MarkdownList as C, DEFAULT_TRANSITION_DURATION_SECONDS as D, type MarkdownListItem as E, type MarkdownMathBlock as F, type MarkdownMention as G, type HeadingAttributes as H, type MarkdownNode as I, type MarkdownParagraph as J, type MarkdownPoint as K, type MarkdownSourcePosition as L, type MarkdownBlockNode as M, type MarkdownStrikethrough as N, type MarkdownStrong as O, type MarkdownTable as P, type MarkdownTableCell as Q, type MarkdownTableRow as R, type MarkdownText as S, type MarkdownTextDirective as T, type MarkdownThematicBreak as U, type ParseOptions as V, type StringifyOptions as W, TRANSITION_DIRECTIONS as X, TRANSITION_TYPES as Y, type Transition as Z, type TransitionDirection as _, type HeadingTemplateAnnotation as a, isTransitionType as a0, normalizeTransitionDirection as a1, normalizeTransitionType as a2, resolveBlockTransition as a3, resolveTransitionDuration as a4, type HtmlComment as b, type HtmlElement as c, type HtmlNode as d, type HtmlText as e, type MarkdownBlockquote as f, type MarkdownBreak as g, type MarkdownCodeBlock as h, type MarkdownContainerDirective as i, type MarkdownDefinitionDescription as j, type MarkdownDefinitionList as k, type MarkdownDefinitionTerm as l, type MarkdownDocument as m, type MarkdownEmphasis as n, type MarkdownFootnoteDefinition as o, type MarkdownFootnoteReference as p, type MarkdownHeading as q, type MarkdownHtmlBlock as r, type MarkdownImage as s, type MarkdownImageReference as t, type MarkdownInlineCode as u, type MarkdownInlineHtml as v, type MarkdownInlineMath as w, type MarkdownInlineNode as x, type MarkdownLeafDirective as y, type MarkdownLink as z };
645
+ export { type TransitionType as $, type MarkdownLinkDefinition as A, type MarkdownLinkReference as B, type MarkdownList as C, DEFAULT_TRANSITION_DURATION_SECONDS as D, type MarkdownListItem as E, type MarkdownMathBlock as F, type MarkdownMention as G, type HeadingAttributes as H, type MarkdownNode as I, type MarkdownParagraph as J, type MarkdownPoint as K, type MarkdownSourcePosition as L, type MarkdownBlockNode as M, type MarkdownStrikethrough as N, type MarkdownStrong as O, type MarkdownTable as P, type MarkdownTableCell as Q, type MarkdownTableRow as R, type MarkdownText as S, type MarkdownTextDirective as T, type MarkdownThematicBreak as U, type ParseOptions as V, type StringifyOptions as W, TRANSITION_DIRECTIONS as X, TRANSITION_TYPES as Y, type Transition as Z, type TransitionDirection as _, type HeadingTemplateAnnotation as a, isTransitionType as a0, normalizeTransitionDirection as a1, normalizeTransitionType as a2, resolveBlockTransition as a3, resolveTransitionDuration as a4, type BlockConnection as a5, type HtmlComment as b, type HtmlElement as c, type HtmlNode as d, type HtmlText as e, type MarkdownBlockquote as f, type MarkdownBreak as g, type MarkdownCodeBlock as h, type MarkdownContainerDirective as i, type MarkdownDefinitionDescription as j, type MarkdownDefinitionList as k, type MarkdownDefinitionTerm as l, type MarkdownDocument as m, type MarkdownEmphasis as n, type MarkdownFootnoteDefinition as o, type MarkdownFootnoteReference as p, type MarkdownHeading as q, type MarkdownHtmlBlock as r, type MarkdownImage as s, type MarkdownImageReference as t, type MarkdownInlineCode as u, type MarkdownInlineHtml as v, type MarkdownInlineMath as w, type MarkdownInlineNode as x, type MarkdownLeafDirective as y, type MarkdownLink as z };
@@ -5,7 +5,9 @@
5
5
  * the document inside the same {@link ContentContainer}. They live under
6
6
  * `.versions/<docBasename>.<sortableTimestamp>.md`. The container is the
7
7
  * unit of persistence — when the host serializes the container to a ZIP,
8
- * a real folder, or anywhere else, the version snapshots ride along.
8
+ * a real folder, or anywhere else, the version snapshots ride along. When
9
+ * snapshots are retained, a container-root `.gitignore` rule excludes the
10
+ * `.versions/` folder from Git.
9
11
  */
10
12
  /**
11
13
  * A single version snapshot record.
@@ -1,4 +1,4 @@
1
- import { C as CoalesceOptions, V as Version, P as PrunePolicy, R as RevertOptions, S as SaveVersionOptions, a as SaveVersionResult } from '../types-D98li1gV.js';
1
+ import { C as CoalesceOptions, V as Version, P as PrunePolicy, R as RevertOptions, S as SaveVersionOptions, a as SaveVersionResult } from '../types-C4kiRn_k.js';
2
2
  import { C as ContentContainer } from '../ContentContainer-BXUlIf18.js';
3
3
 
4
4
  /**
@@ -103,6 +103,7 @@ declare const VERSION_TIMESTAMP_PATTERN: RegExp;
103
103
  * The optional numeric suffix (`-2`, `-3`, ...) is appended only when two
104
104
  * snapshots collide on the same UTC second.
105
105
  */
106
+
106
107
  /** Subfolder (inside the ContentContainer) that holds version snapshots. */
107
108
  declare const VERSIONS_PREFIX = ".versions/";
108
109
  /**
@@ -10,12 +10,12 @@ import {
10
10
  readVersion,
11
11
  revertToVersion,
12
12
  saveVersion
13
- } from "../chunk-VLJJHDAC.js";
13
+ } from "../chunk-JOQYPRDZ.js";
14
14
  import {
15
15
  VERSION_TIMESTAMP_PATTERN,
16
16
  formatVersionTimestamp,
17
17
  parseVersionTimestamp
18
- } from "../chunk-JELIRVDP.js";
18
+ } from "../chunk-S7A5D7ZJ.js";
19
19
  export {
20
20
  DocumentVersionManager,
21
21
  VERSIONS_PREFIX,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bendyline/squisq",
3
- "version": "1.5.2",
3
+ "version": "2.0.0",
4
4
  "description": "Headless utilities for doc/block rendering, spatial math, Markdown, and storage",
5
5
  "license": "MIT",
6
6
  "author": "Bendyline",
@@ -46,11 +46,6 @@
46
46
  "import": "./dist/spatial/index.js",
47
47
  "default": "./dist/spatial/index.js"
48
48
  },
49
- "./story": {
50
- "types": "./dist/story/index.d.ts",
51
- "import": "./dist/story/index.js",
52
- "default": "./dist/story/index.js"
53
- },
54
49
  "./doc": {
55
50
  "types": "./dist/doc/index.d.ts",
56
51
  "import": "./dist/doc/index.js",
@@ -115,6 +110,11 @@
115
110
  "types": "./dist/recommend/index.d.ts",
116
111
  "import": "./dist/recommend/index.js",
117
112
  "default": "./dist/recommend/index.js"
113
+ },
114
+ "./narration": {
115
+ "types": "./dist/narration/index.d.ts",
116
+ "import": "./dist/narration/index.js",
117
+ "default": "./dist/narration/index.js"
118
118
  }
119
119
  },
120
120
  "scripts": {