@bendyline/squisq 2.13.14 → 2.13.16

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 (43) hide show
  1. package/dist/{Doc-BhvotZx_.d.ts → Doc-DLfTam0R.d.ts} +82 -6
  2. package/dist/{ImageEditDoc-D8hYio6b.d.ts → ImageEditDoc-DdSHb6sj.d.ts} +1 -1
  3. package/dist/{chunk-YQQWE4HG.js → chunk-33CAD575.js} +200 -262
  4. package/dist/{chunk-L7QZORLB.js → chunk-37RLFDIT.js} +11 -4
  5. package/dist/chunk-4R3YZTPX.js +42 -0
  6. package/dist/{chunk-DBVCSVNV.js → chunk-A4ZFYGU6.js} +13 -38
  7. package/dist/{chunk-CTT4XAGO.js → chunk-BG2OYBGC.js} +2534 -737
  8. package/dist/{chunk-2SRF5III.js → chunk-BVL3F64S.js} +1 -1
  9. package/dist/chunk-C7DKMO4H.js +88 -0
  10. package/dist/{chunk-SGNWO7OF.js → chunk-MA7XUCSQ.js} +517 -30
  11. package/dist/{chunk-JSGIWW35.js → chunk-MTIR5PWF.js} +1 -1
  12. package/dist/{chunk-C4SB3NN4.js → chunk-NBDF6SQ5.js} +22 -2
  13. package/dist/chunk-TOPEP5B7.js +515 -0
  14. package/dist/{chunk-OIQ2GO2O.js → chunk-TXN23SG2.js} +1 -1
  15. package/dist/{chunk-7MS26OXD.js → chunk-UDPPWYYM.js} +6 -0
  16. package/dist/{chunk-J2G6EOEJ.js → chunk-XY5Z23C4.js} +75 -16
  17. package/dist/{chunk-5DFFVW75.js → chunk-Z73DG6IL.js} +1 -1
  18. package/dist/doc/index.d.ts +412 -26
  19. package/dist/doc/index.js +66 -11
  20. package/dist/fence/index.d.ts +1 -1
  21. package/dist/generate/index.d.ts +1 -1
  22. package/dist/imageEdit/index.d.ts +3 -3
  23. package/dist/index.d.ts +9 -9
  24. package/dist/index.js +147 -29
  25. package/dist/jsonForm/index.d.ts +1 -1
  26. package/dist/jsonForm/index.js +5 -4
  27. package/dist/markdown/index.js +3 -3
  28. package/dist/{materializePageSection-CWxou4mX.d.ts → materializePageSection-HIoRYiZu.d.ts} +121 -8
  29. package/dist/mediaEdit/index.d.ts +154 -3
  30. package/dist/mediaEdit/index.js +241 -2
  31. package/dist/narration/index.d.ts +1 -1
  32. package/dist/narration/index.js +7 -5
  33. package/dist/recommend/index.d.ts +129 -2
  34. package/dist/recommend/index.js +13 -4
  35. package/dist/schemas/index.d.ts +26 -7
  36. package/dist/schemas/index.js +14 -8
  37. package/dist/{themeLibrary-BIYE6aLw.d.ts → themeLibrary-B2K-aAOy.d.ts} +1 -1
  38. package/dist/timing/index.d.ts +66 -2
  39. package/dist/timing/index.js +12 -0
  40. package/dist/transform/index.d.ts +173 -16
  41. package/dist/transform/index.js +58 -17
  42. package/package.json +1 -1
  43. package/dist/chunk-FCB6JLWB.js +0 -125
@@ -31,7 +31,7 @@ import {
31
31
  traceWordPosAt,
32
32
  transcriptWordKeys,
33
33
  vadStep
34
- } from "../chunk-OIQ2GO2O.js";
34
+ } from "../chunk-TXN23SG2.js";
35
35
  import "../chunk-NEWNNLWN.js";
36
36
  import {
37
37
  buildNarrationTimingJson,
@@ -45,12 +45,14 @@ import {
45
45
  wordIndexAtChar,
46
46
  wordIndexAtTime,
47
47
  wordPosAtExpectedSyllables
48
- } from "../chunk-CTT4XAGO.js";
49
- import "../chunk-SGNWO7OF.js";
48
+ } from "../chunk-BG2OYBGC.js";
49
+ import "../chunk-MA7XUCSQ.js";
50
50
  import "../chunk-FUBMT6SJ.js";
51
51
  import "../chunk-JNUNNQ74.js";
52
- import "../chunk-L7QZORLB.js";
53
- import "../chunk-7MS26OXD.js";
52
+ import "../chunk-4R3YZTPX.js";
53
+ import "../chunk-MTIR5PWF.js";
54
+ import "../chunk-37RLFDIT.js";
55
+ import "../chunk-UDPPWYYM.js";
54
56
  import "../chunk-L3KSFLTP.js";
55
57
  import "../chunk-P53Z4RYC.js";
56
58
  import "../chunk-GHOPHGOK.js";
@@ -1,5 +1,97 @@
1
1
  import { M as MarkdownBlockNode } from '../types-Zk8qYuaT.js';
2
2
 
3
+ /**
4
+ * List shapes — what a list is a picture of.
5
+ *
6
+ * A bulleted list says only "here are some things". Its heading and its
7
+ * items usually say more: that the things happen in order, come round again,
8
+ * sit inside one another, narrow from many to few, stand against each other,
9
+ * or are numbers. `classifyListShape` reads those signals and names the
10
+ * relationship and the template that draws it, so a plain Markdown list can
11
+ * become a process, a cycle, concentric layers, a pyramid, a funnel, a Venn
12
+ * diagram, a row of key numbers — or stay a list when nothing says otherwise.
13
+ *
14
+ * It is deliberately a reader of evidence, not a guesser: a `strong` result
15
+ * rests on something the author wrote (a numbered list, dates in order, a
16
+ * heading that says "cycle", items written `Label: detail`) and is safe to
17
+ * apply automatically; a `weak` one is only worth offering as a suggestion.
18
+ * A drawing that misstates the relationship is worse than a list, so an
19
+ * ordering the items do not make clear (is the first layer the core or the
20
+ * crust?) is never applied automatically.
21
+ *
22
+ * Used by `markdownToDoc`'s automatic templates, the editor's template
23
+ * recommendations, and hosts that plan slides from their own outlines.
24
+ * Pure text in, plain data out.
25
+ *
26
+ * Related: `recommend/templates.ts`, `doc/templates/conceptItems.ts`,
27
+ * `doc/templates/conceptBlocks.ts`, `doc/templates/conceptShapes.ts`.
28
+ */
29
+ /** The relationship a list's items have to one another. */
30
+ type ListShape = 'figures' | 'timeline' | 'sequence' | 'cycle' | 'nested' | 'hierarchy' | 'funnel' | 'contrast' | 'overlap' | 'matrix' | 'hub' | 'parallel' | 'plain';
31
+ interface ListShapeInput {
32
+ /** The heading over the list. */
33
+ heading?: string;
34
+ /** The items as text; write a nested item as `Label: detail`. */
35
+ items: readonly string[];
36
+ /** Whether the list was numbered. */
37
+ ordered?: boolean;
38
+ /** Prose that introduces the list, when there is some. */
39
+ intro?: string;
40
+ }
41
+ interface ListShapeResult {
42
+ shape: ListShape;
43
+ /** The template that draws the shape. */
44
+ template: string;
45
+ /**
46
+ * `strong`: the author's own words or structure say so; apply it.
47
+ * `weak`: plausible; offer it, but leave the choice to a person.
48
+ */
49
+ confidence: 'strong' | 'weak';
50
+ /** Inputs the template needs beyond the items (a reversed order, `versus`). */
51
+ inputs?: Record<string, unknown>;
52
+ /** What the classification rests on, for a tooltip or a log. */
53
+ reason: string;
54
+ }
55
+ /**
56
+ * Name the relationship among a list's items and the template that draws it.
57
+ * A list no concept template can hold (one item, more than six, or items the
58
+ * length of paragraphs) is `plain`.
59
+ */
60
+ declare function classifyListShape(input: ListShapeInput): ListShapeResult;
61
+ /** What says whether a relationship holds: the heading, the prose, the items. */
62
+ interface ShapeEvidence {
63
+ /** The heading over the ideas. */
64
+ heading?: string;
65
+ /** The prose the ideas summarize or sit under. */
66
+ passage?: string;
67
+ /** The ideas as they would be drawn. */
68
+ items: readonly string[];
69
+ /** A matrix's axis names; naming both says what its panels are placed on. */
70
+ axes?: readonly [x?: string, y?: string];
71
+ }
72
+ /**
73
+ * Whether the source says its ideas have the relationship `template` draws.
74
+ *
75
+ * `classifyListShape` chooses a drawing for a list; this is the other
76
+ * direction, for an author (a model, usually) that has already chosen one.
77
+ * Cards, a process, a hub and key numbers claim little beyond what their
78
+ * items say, so they always pass. The shapes that assert how the ideas
79
+ * relate need the source to say so, in the heading, the prose or the items:
80
+ *
81
+ * - `cycle`: it comes round again ("cycle", "loop", "the cycle repeats");
82
+ * - `layers`: the parts are nested ("layers", "anatomy", a core and a crust);
83
+ * - `pyramid`: there is a hierarchy ("hierarchy", "tiers", a top and a base);
84
+ * - `funnel`: the stages narrow ("funnel", "conversion"), or their figures shrink;
85
+ * - `venn`: the two share something ("both", "in common", "overlap");
86
+ * - `matrix`: two named axes, or a source that calls it a matrix.
87
+ *
88
+ * A drawing that misstates the relationship is worse than cards, so a caller
89
+ * that gets `false` should draw the ideas as cards (or a process) instead.
90
+ */
91
+ declare function shapeIsStated(template: string, evidence: ShapeEvidence): boolean;
92
+ /** What to draw instead when the source does not state a shape: the same ideas, claiming less. */
93
+ declare function unstatedShapeFallback(template: string): 'cards' | 'process' | undefined;
94
+
3
95
  /**
4
96
  * Block template recommendations.
5
97
  *
@@ -40,6 +132,17 @@ interface BlockContentProfile {
40
132
  * exclusive with `hasAsciiDiagram`.
41
133
  */
42
134
  hasTree?: boolean;
135
+ /**
136
+ * What the body's list is a picture of — a process, a cycle, key numbers…
137
+ * (see `classifyListShape`). Set when the body is one list of two to six
138
+ * items; a `strong` shape picks its template automatically.
139
+ */
140
+ listShape?: ListShapeResult;
141
+ }
142
+ /** What `profileBlockContents` may know beyond the body itself. */
143
+ interface ProfileBlockOptions {
144
+ /** The heading over the body: "The water cycle" says more than its bullets do. */
145
+ heading?: string;
43
146
  }
44
147
  interface RecommendationResult {
45
148
  recommended: string[];
@@ -49,7 +152,31 @@ interface RecommendationResult {
49
152
  * Walk a slice of block nodes and summarize what kinds of content it
50
153
  * contains. Cheap to run — no markdown parsing, just AST traversal.
51
154
  */
52
- declare function profileBlockContents(nodes: MarkdownBlockNode[]): BlockContentProfile;
155
+ declare function profileBlockContents(nodes: MarkdownBlockNode[], options?: ProfileBlockOptions): BlockContentProfile;
156
+ /** How `pickAutoTemplate` chooses. */
157
+ interface AutoTemplateOptions {
158
+ /**
159
+ * Draw a list as what it is a picture of (a process, a cycle, key
160
+ * numbers…) when its shape is clear. `false` keeps every list a `list`.
161
+ * Default true.
162
+ */
163
+ concepts?: boolean;
164
+ }
165
+ /**
166
+ * Deterministic single-template choice for an unannotated heading block,
167
+ * from strong content signals only. Returns `undefined` when no signal is
168
+ * decisive — the caller keeps its structural default (`sectionHeader`).
169
+ *
170
+ * Precedence favors the most specific/structured content: a table beats
171
+ * a video beats an image beats a blockquote beats a stat-looking line. `blockIndex`
172
+ * alternates left/right feature composition for single-image blocks so a
173
+ * run of image sections doesn't stack the same layout.
174
+ *
175
+ * Used by `markdownToDoc`'s auto template picking (see its `autoTemplates`
176
+ * option); the multi-candidate `recommendTemplatesForBlock` below serves
177
+ * the editor's template-picker UI instead.
178
+ */
179
+ declare function pickAutoTemplate(profile: BlockContentProfile, blockIndex?: number, options?: AutoTemplateOptions): string | undefined;
53
180
  /**
54
181
  * Split a flat list of template names into a "Recommended" bucket
55
182
  * (matches the active block's content profile) and a "rest" bucket
@@ -59,4 +186,4 @@ declare function profileBlockContents(nodes: MarkdownBlockNode[]): BlockContentP
59
186
  */
60
187
  declare function recommendTemplatesForBlock(profile: BlockContentProfile, allNames: readonly string[]): RecommendationResult;
61
188
 
62
- export { type BlockContentProfile, type RecommendationResult, profileBlockContents, recommendTemplatesForBlock };
189
+ export { type AutoTemplateOptions, type BlockContentProfile, type ListShape, type ListShapeInput, type ListShapeResult, type ProfileBlockOptions, type RecommendationResult, type ShapeEvidence, classifyListShape, pickAutoTemplate, profileBlockContents, recommendTemplatesForBlock, shapeIsStated, unstatedShapeFallback };
@@ -1,11 +1,20 @@
1
1
  import {
2
+ classifyListShape,
3
+ pickAutoTemplate,
2
4
  profileBlockContents,
3
- recommendTemplatesForBlock
4
- } from "../chunk-SGNWO7OF.js";
5
- import "../chunk-L7QZORLB.js";
5
+ recommendTemplatesForBlock,
6
+ shapeIsStated,
7
+ unstatedShapeFallback
8
+ } from "../chunk-MA7XUCSQ.js";
9
+ import "../chunk-4R3YZTPX.js";
10
+ import "../chunk-37RLFDIT.js";
6
11
  import "../chunk-L3KSFLTP.js";
7
12
  import "../chunk-P53Z4RYC.js";
8
13
  export {
14
+ classifyListShape,
15
+ pickAutoTemplate,
9
16
  profileBlockContents,
10
- recommendTemplatesForBlock
17
+ recommendTemplatesForBlock,
18
+ shapeIsStated,
19
+ unstatedShapeFallback
11
20
  };
@@ -1,10 +1,10 @@
1
1
  export { B as BUILD_EFFECTS, a as BUILD_MODES, b as BUILD_PARAM_KEYS, c as BUILD_PREVIOUS, d as BuildAdvance, e as BuildCursor, f as BuildSpec, g as BuildStep, h as BuildTiming, i as DEFAULT_TRANSITION_DURATION_SECONDS, aa as TRANSITION_DIRECTIONS, ab as TRANSITION_TYPES, ac as Transition, ad as TransitionDirection, ae as TransitionType, ah as buildSpecParams, ai as isTransitionType, aj as normalizeTransitionDirection, ak as normalizeTransitionType, al as parseBuildSpec, am as recordBuildAdvance, an as resolveBlockTransition, ap as resolveTransitionDuration } from '../types-Zk8qYuaT.js';
2
2
  export { B as BoundingBox, C as Coordinates } from '../Types-sh2VRxfo.js';
3
- import { T as Doc, bH as Theme, bK as ThemePageStyle, bJ as ThemeColorScheme, N as DeepPartial, bN as ThemeSeedColors, bI as ThemeColorPalette, a1 as FontFamilyKind, a0 as FontFamily } from '../Doc-BhvotZx_.js';
4
- export { A as AccentImage, a as AccentPosition, b as AmbientGradientConfig, c as Animation, d as AnimationType, e as AreaChartInput, f as AudioBookmark, g as AudioSegment, h as AudioTimingData, i as AudioTrack, B as BarChartInput, j as BigTextInput, k as Block, l as BlockConnection, m as BorderStyle, n as BottomFeatureInput, C as CaptionPhrase, o as CaptionTrack, p as CaptionWord, q as CardsBlockInput, r as ChartBaseFields, s as ChartTemplateInput, t as ColorScheme, u as ColumnChartInput, v as ComparisonBarInput, w as ContentBlockInput, x as CornerBrandingConfig, y as CountUpSpec, z as CreateTemplateContextOptions, D as CustomTemplateDefinition, E as CustomTemplateLayer, F as CustomTemplateValidationError, G as CustomTemplateValidationResult, H as CycleBlockInput, I as DARK_SURFACE, J as DEFAULT_DOC_FONT, K as DEFAULT_TITLE_FONT, L as DataTableInput, M as DateEventInput, O as DefinitionCardInput, P as DiagramBlockInput, Q as DiagramEdgeAnchor, R as DiagramTemplateEdge, S as DiagramTemplateNode, U as DocBlock, V as DocDiagnostic, W as DonutChartInput, X as DrawingBlockInput, Y as FRONTMATTER_CUSTOM_TEMPLATES_KEY, Z as FRONTMATTER_CUSTOM_THEMES_KEY, _ as FRONTMATTER_MOTION_KEY, $ as FactCardInput, a2 as FullBleedQuoteInput, a3 as GradientBackgroundConfig, a4 as ImageBackgroundConfig, a5 as ImageLayer, a6 as ImageTreatment, a7 as ImageWithCaptionInput, a8 as LIGHT_SURFACE, a9 as Layer, aa as LayerRepeat, ab as LayersBlockInput, ac as LayoutHints, ad as LeftFeatureInput, ae as LineChartInput, af as LinearGradient, ag as ListBlockInput, ah as MOTION_PROFILES, ai as MapBlockInput, aj as MapLayer, ak as MapMarker, al as MapTileStyle, am as MarkerStyle, an as MediaClip, ao as MediaCrop, ap as MediaCut, aq as MediaEdits, ar as MediaOnlyInput, as as MediaScheduleOptions, at as MermaidLayer, au as MotionEntrance, av as MotionOrigin, aw as MotionProfile, ax as MotionProfileName, ay as MotionSpec, az as MotionState, aA as PAGE_ACCENT_STRATEGIES, aB as PAGE_BACKGROUNDS, aC as PAGE_BACKGROUND_RHYTHMS, aD as PAGE_DESIGN_FAMILIES, aE as PAGE_DIVIDERS, aF as PAGE_EMPHASES, aG as PAGE_EYEBROWS, aH as PAGE_HEADING_CASES, aI as PAGE_HEADING_SCALES, aJ as PAGE_HEADING_UNDERLINES, aK as PAGE_HERO_STYLES, aL as PAGE_IMAGE_FRAMINGS, aM as PAGE_NUMERAL_STYLES, aN as PAGE_PATTERNS, aO as PAGE_QUOTE_MARKS, aP as PAGE_SECTION_KINDS, aQ as PAGE_SECTION_SPACINGS, aR as PAGE_SHADOWS, aS as PAGE_VARIANTS, aT as PageAccentRotation, aU as PageBackground, aV as PageDesignFamily, aW as PageEmphasis, aX as PageHeadingTreatment, aY as PageSectionKind, aZ as PageSectionOverride, a_ as PageTokens, a$ as PageVariant, b0 as PathLayer, b1 as PatternBackgroundConfig, b2 as PersistentLayer, b3 as PersistentLayerConfig, b4 as PersistentLayerTemplate, b5 as PersistentLayerTemplateConfig, b6 as PersistentLayerTemplateType, b7 as PhotoGridInput, b8 as PieChartInput, b9 as PipStyle, ba as Position, bb as PresentationSlideMark, bc as ProcessBlockInput, bd as ProgressIndicatorConfig, be as PromotedBodyAnnotation, bf as PullQuoteInput, bg as QuoteBlockInput, bh as RawLayersInput, bi as RenderStyle, bj as RightFeatureInput, bk as ScatterChartInput, bl as ScheduledClip, bm as SectionHeaderInput, bn as ShapeFilter, bo as ShapeLayer, bp as ShapePattern, bq as SolidBackgroundConfig, br as StartBlockConfig, bs as StatHighlightInput, bt as SurfaceScheme, bu as SvgLayer, bv as THEME_SCHEMA_VERSION, bw as TableLayer, bx as TableLayerStyle, by as TemplateBlock, bz as TemplateContext, bA as TemplateFunction, bB as TemplateRegistry, bC as TextFlow, bD as TextLayer, bE as TextParagraph, bF as TextParagraphList, bG as TextStyle, bL as ThemeRegistry, bM as ThemeSchemaVersion, bO as ThemeStyle, bP as ThemeTypography, bQ as TimelineBlockInput, bR as TimelineTemplateEvent, bS as TimelineTemplateLink, bT as TimelineTemplateTrack, bU as TitleBlockInput, bV as TitleCaptionConfig, bW as TopFeatureInput, bX as TranscriptBlockInput, bY as TreeBlockInput, bZ as TreeLayer, b_ as TreeLayerItem, b$ as TreeLayerStyle, c0 as TreeTemplateItem, c1 as TwoColumnInput, c2 as VIEWPORT_PRESETS, c3 as VideoEmbedLayer, c4 as VideoLayer, c5 as VideoPipPosition, c6 as VideoPipShape, c7 as VideoPipSize, c8 as VideoPlacement, c9 as VideoPresentation, ca as VideoPullQuoteInput, cb as VideoWithCaptionInput, cc as ViewportConfig, cd as ViewportOrientation, ce as ViewportPreset, cf as VignetteConfig, cg as applySurface, ch as calculateDuration, ci as calculateFontScale, cj as createTemplateContext, ck as createTheme, cl as createThemeRegistry, cm as getAspectRatioString, cn as getBlockAtTime, co as getCaptionAtTime, cp as getDocPlaybackDuration, cq as getLayoutHints, cr as getSafeTextBounds, cs as getSegmentAtTime, ct as getTwoColumnPositions, cu as getViewport, cv as getViewportOrientation, cw as isCustomTemplateDefinition, cx as isMotionProfileName, cy as isPersistentLayerTemplate, cz as isTemplateBlock, cA as layoutScaledFontSize, cB as readFrontmatterMotion, cC as resolveMediaSchedule, cD as resolveMotionForDoc, cE as resolveMotionProfile, cF as scaledFontSize, cG as scheduleMediaClip, cH as validateCustomTemplateDefinition } from '../Doc-BhvotZx_.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-BIYE6aLw.js';
3
+ import { U as Doc, bN as Theme, bQ as ThemePageStyle, bP as ThemeColorScheme, N as DeepPartial, bT as ThemeSeedColors, bO as ThemeColorPalette, a2 as FontFamilyKind, a1 as FontFamily } from '../Doc-DLfTam0R.js';
4
+ export { A as AccentImage, a as AccentPosition, b as AmbientGradientConfig, c as Animation, d as AnimationType, e as AreaChartInput, f as AudioBookmark, g as AudioSegment, h as AudioTimingData, i as AudioTrack, B as BarChartInput, j as BigTextInput, k as Block, l as BlockConnection, m as BorderStyle, n as BottomFeatureInput, C as CaptionPhrase, o as CaptionTrack, p as CaptionWord, q as CardsBlockInput, r as ChartBaseFields, s as ChartTemplateInput, t as ColorScheme, u as ColumnChartInput, v as ComparisonBarInput, w as ContentBlockInput, x as CornerBrandingConfig, y as CountUpSpec, z as CreateTemplateContextOptions, D as CustomTemplateDefinition, E as CustomTemplateLayer, F as CustomTemplateValidationError, G as CustomTemplateValidationResult, H as CycleBlockInput, I as DARK_SURFACE, J as DEFAULT_DOC_FONT, K as DEFAULT_TITLE_FONT, L as DataTableInput, M as DateEventInput, O as DefinitionCardInput, P as DiagramBlockInput, Q as DiagramEdgeAnchor, R as DiagramTemplateEdge, S as DiagramTemplateNode, T as DiagramTemplateNodeInput, V as DocBlock, W as DocDiagnostic, X as DonutChartInput, Y as DrawingBlockInput, Z as FRONTMATTER_CUSTOM_TEMPLATES_KEY, _ as FRONTMATTER_CUSTOM_THEMES_KEY, $ as FRONTMATTER_MOTION_KEY, a0 as FactCardInput, a3 as FullBleedQuoteInput, a4 as FunnelBlockInput, a5 as GradientBackgroundConfig, a6 as HubBlockInput, a7 as ImageBackgroundConfig, a8 as ImageLayer, a9 as ImageTreatment, aa as ImageWithCaptionInput, ab as LIGHT_SURFACE, ac as Layer, ad as LayerRepeat, ae as LayersBlockInput, af as LayoutHints, ag as LeftFeatureInput, ah as LineChartInput, ai as LinearGradient, aj as ListBlockInput, ak as MOTION_PROFILES, al as MapBlockInput, am as MapLayer, an as MapMarker, ao as MapTileStyle, ap as MarkerStyle, aq as MatrixBlockInput, ar as MediaClip, as as MediaCrop, at as MediaCut, au as MediaEdits, av as MediaOnlyInput, aw as MediaScheduleOptions, ax as MermaidLayer, ay as MotionEntrance, az as MotionOrigin, aA as MotionProfile, aB as MotionProfileName, aC as MotionSpec, aD as MotionState, aE as PAGE_ACCENT_STRATEGIES, aF as PAGE_BACKGROUNDS, aG as PAGE_BACKGROUND_RHYTHMS, aH as PAGE_DESIGN_FAMILIES, aI as PAGE_DIVIDERS, aJ as PAGE_EMPHASES, aK as PAGE_EYEBROWS, aL as PAGE_HEADING_CASES, aM as PAGE_HEADING_SCALES, aN as PAGE_HEADING_UNDERLINES, aO as PAGE_HERO_STYLES, aP as PAGE_IMAGE_FRAMINGS, aQ as PAGE_NUMERAL_STYLES, aR as PAGE_PATTERNS, aS as PAGE_QUOTE_MARKS, aT as PAGE_SECTION_KINDS, aU as PAGE_SECTION_SPACINGS, aV as PAGE_SHADOWS, aW as PAGE_VARIANTS, aX as PageAccentRotation, aY as PageBackground, aZ as PageDesignFamily, a_ as PageEmphasis, a$ as PageHeadingTreatment, b0 as PageSectionKind, b1 as PageSectionOverride, b2 as PageTokens, b3 as PageVariant, b4 as PathLayer, b5 as PatternBackgroundConfig, b6 as PersistentLayer, b7 as PersistentLayerConfig, b8 as PersistentLayerTemplate, b9 as PersistentLayerTemplateConfig, ba as PersistentLayerTemplateType, bb as PhotoGridInput, bc as PieChartInput, bd as PipStyle, be as Position, bf as PresentationSlideMark, bg as ProcessBlockInput, bh as ProgressIndicatorConfig, bi as PromotedBodyAnnotation, bj as PullQuoteInput, bk as PyramidBlockInput, bl as QuoteBlockInput, bm as RawLayersInput, bn as RenderStyle, bo as RightFeatureInput, bp as ScatterChartInput, bq as ScheduledClip, br as SectionHeaderInput, bs as ShapeFilter, bt as ShapeLayer, bu as ShapePattern, bv as SolidBackgroundConfig, bw as StartBlockConfig, bx as StatHighlightInput, by as StatsBlockInput, bz as SurfaceScheme, bA as SvgLayer, bB as THEME_SCHEMA_VERSION, bC as TableLayer, bD as TableLayerStyle, bE as TemplateBlock, bF as TemplateContext, bG as TemplateFunction, bH as TemplateRegistry, bI as TextFlow, bJ as TextLayer, bK as TextParagraph, bL as TextParagraphList, bM as TextStyle, bR as ThemeRegistry, bS as ThemeSchemaVersion, bU as ThemeStyle, bV as ThemeTypography, bW as TimelineBlockInput, bX as TimelineTemplateEvent, bY as TimelineTemplateLink, bZ as TimelineTemplateTrack, b_ as TitleBlockInput, b$ as TitleCaptionConfig, c0 as TopFeatureInput, c1 as TranscriptBlockInput, c2 as TreeBlockInput, c3 as TreeLayer, c4 as TreeLayerItem, c5 as TreeLayerStyle, c6 as TreeTemplateItem, c7 as TwoColumnInput, c8 as VIEWPORT_PRESETS, c9 as VennBlockInput, ca as VideoEmbedLayer, cb as VideoLayer, cc as VideoPipPosition, cd as VideoPipShape, ce as VideoPipSize, cf as VideoPlacement, cg as VideoPresentation, ch as VideoPullQuoteInput, ci as VideoWithCaptionInput, cj as ViewportConfig, ck as ViewportOrientation, cl as ViewportPreset, cm as VignetteConfig, cn as applySurface, co as calculateDuration, cp as calculateFontScale, cq as createTemplateContext, cr as createTheme, cs as createThemeRegistry, ct as getAspectRatioString, cu as getBlockAtTime, cv as getCaptionAtTime, cw as getDocPlaybackDuration, cx as getLayoutHints, cy as getSafeTextBounds, cz as getSegmentAtTime, cA as getTwoColumnPositions, cB as getViewport, cC as getViewportOrientation, cD as isCustomTemplateDefinition, cE as isMotionProfileName, cF as isPersistentLayerTemplate, cG as isTemplateBlock, cH as layoutScaledFontSize, cI as readFrontmatterMotion, cJ as resolveMediaSchedule, cK as resolveMotionForDoc, cL as resolveMotionProfile, cM as scaledFontSize, cN as scheduleMediaClip, cO as taskMarker, cP as validateCustomTemplateDefinition } from '../Doc-DLfTam0R.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-B2K-aAOy.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-D8hYio6b.js';
7
+ export { E as EditorLayerMeta, I as ImageEditCanvas, a as ImageEditDoc, b as ImageEditLayer, c as ImageEditLayerKind, d as ImageEditMeta } from '../ImageEditDoc-DdSHb6sj.js';
8
8
 
9
9
  /**
10
10
  * Runtime validation for the canonical {@link Doc} JSON shape.
@@ -299,15 +299,34 @@ declare function deriveScale(seedHex: string, spread?: number): {
299
299
  };
300
300
 
301
301
  /**
302
- * Translate a Squisq Theme into Mermaid's `themeVariables` vocabulary.
302
+ * Translate a Squisq Theme into Mermaid's theming vocabulary: `themeVariables`,
303
+ * plus the little `themeCSS` that covers what the variables cannot express.
303
304
  *
304
305
  * This module deliberately has no Mermaid dependency. Both the editor and
305
- * read-only React renderers use the returned plain object immediately before
306
+ * read-only React renderers use the returned plain values immediately before
306
307
  * their queued Mermaid render, keeping the two surfaces visually identical.
307
308
  */
308
309
 
309
310
  type MermaidThemeVariables = Record<string, string | number | boolean>;
310
311
  /** Build complete, contrast-aware Mermaid theme variables from a Squisq theme. */
311
312
  declare function buildMermaidThemeVariables(theme: Theme): MermaidThemeVariables;
313
+ /**
314
+ * Build the CSS Mermaid needs beyond its theme variables, for the config's
315
+ * `themeCSS`. Pass it wherever `buildMermaidThemeVariables` is passed.
316
+ *
317
+ * Flowcharts, ER, block and requirement diagrams have one text color for every
318
+ * label, `nodeTextColor`, and it is chosen to read on the node fill. An edge
319
+ * label, or the caption beside an icon or image node, sits on the page
320
+ * (`edgeLabelBackground`), where that color can be the page's own: white on
321
+ * white in the Standard theme. Mermaid has no variable for it, so those labels
322
+ * are given the page's text color here.
323
+ *
324
+ * The rules name only the elements Mermaid's own rule colors (`span` for an
325
+ * HTML label, `text` for an SVG one) and carry no `!important`. A color the
326
+ * author sets (`linkStyle 0 color:red`) is written inline on those elements
327
+ * and still wins, and so does a host stylesheet that retints the labels for
328
+ * its own surface.
329
+ */
330
+ declare function buildMermaidThemeCss(theme: Theme): string;
312
331
 
313
- export { AVAILABLE_FONT_STACKS, type CompileOptions, type ContrastPreset, DeepPartial, Doc, type DocSchemaIssue, FONT_FALLBACKS, FontFamily, FontFamilyKind, type FontStack, type MermaidThemeVariables, type PipStyleVars, STARTER_THEME, Theme, ThemeColorPalette, ThemeColorScheme, ThemePageStyle, ThemeSeedColors, type ValidationError, type ValidationResult, accentToColorScheme, assertDocSchema, assertTheme, buildGoogleFontsUrl, buildMermaidThemeVariables, compileTheme, contrastRatio, defaultPageStyle, deriveColorPalette, deriveScale, fontStack, getFontStack, guessFontFallback, hexHueDegrees, isHex, matchFontFamily, oklchDarken, oklchLighten, oklchSetChroma, parseTheme, pickContrastingText, pipStyleVars, relativeLuminance, resolveFontFamily, serializeTheme, validateDocSchema, validateTheme, withAlpha };
332
+ export { AVAILABLE_FONT_STACKS, type CompileOptions, type ContrastPreset, DeepPartial, Doc, type DocSchemaIssue, FONT_FALLBACKS, FontFamily, FontFamilyKind, type FontStack, type MermaidThemeVariables, type PipStyleVars, STARTER_THEME, Theme, ThemeColorPalette, ThemeColorScheme, ThemePageStyle, ThemeSeedColors, type ValidationError, type ValidationResult, accentToColorScheme, assertDocSchema, assertTheme, buildGoogleFontsUrl, buildMermaidThemeCss, buildMermaidThemeVariables, compileTheme, contrastRatio, defaultPageStyle, deriveColorPalette, deriveScale, fontStack, getFontStack, guessFontFallback, hexHueDegrees, isHex, matchFontFamily, oklchDarken, oklchLighten, oklchSetChroma, parseTheme, pickContrastingText, pipStyleVars, relativeLuminance, resolveFontFamily, serializeTheme, validateDocSchema, validateTheme, withAlpha };
@@ -2,24 +2,21 @@ import {
2
2
  STARTER_THEME,
3
3
  accentToColorScheme,
4
4
  assertDocSchema,
5
+ buildMermaidThemeCss,
5
6
  buildMermaidThemeVariables,
6
- calculateDuration,
7
7
  compileTheme,
8
8
  deriveColorPalette,
9
- getBlockAtTime,
10
- getCaptionAtTime,
11
- getSegmentAtTime,
12
9
  parseTheme,
13
10
  pipStyleVars,
14
11
  serializeTheme,
15
12
  validateDocSchema
16
- } from "../chunk-DBVCSVNV.js";
13
+ } from "../chunk-A4ZFYGU6.js";
17
14
  import {
18
15
  defaultPageStyle,
19
16
  getDocPlaybackDuration,
20
17
  resolveMediaSchedule,
21
18
  scheduleMediaClip
22
- } from "../chunk-2SRF5III.js";
19
+ } from "../chunk-BVL3F64S.js";
23
20
  import {
24
21
  AVAILABLE_FONT_STACKS,
25
22
  DARK_SURFACE,
@@ -98,8 +95,15 @@ import {
98
95
  validateTheme,
99
96
  withAlpha
100
97
  } from "../chunk-JNUNNQ74.js";
101
- import "../chunk-JSGIWW35.js";
102
- import "../chunk-L7QZORLB.js";
98
+ import {
99
+ calculateDuration,
100
+ getBlockAtTime,
101
+ getCaptionAtTime,
102
+ getSegmentAtTime,
103
+ taskMarker
104
+ } from "../chunk-4R3YZTPX.js";
105
+ import "../chunk-MTIR5PWF.js";
106
+ import "../chunk-37RLFDIT.js";
103
107
  import {
104
108
  BUILD_EFFECTS,
105
109
  BUILD_MODES,
@@ -165,6 +169,7 @@ export {
165
169
  assertDocSchema,
166
170
  assertTheme,
167
171
  buildGoogleFontsUrl,
172
+ buildMermaidThemeCss,
168
173
  buildMermaidThemeVariables,
169
174
  buildSpecParams,
170
175
  calculateDuration,
@@ -223,6 +228,7 @@ export {
223
228
  scaledFontSize2 as scaledFontSize,
224
229
  scheduleMediaClip,
225
230
  serializeTheme,
231
+ taskMarker,
226
232
  validateCustomTemplateDefinition,
227
233
  validateDocSchema,
228
234
  validateTheme,
@@ -1,4 +1,4 @@
1
- import { bH as Theme, bL as ThemeRegistry } from './Doc-BhvotZx_.js';
1
+ import { bN as Theme, bR as ThemeRegistry } from './Doc-DLfTam0R.js';
2
2
 
3
3
  /**
4
4
  * Built-in Theme Library
@@ -1,4 +1,4 @@
1
- import { g as AudioSegment, h as AudioTimingData, o as CaptionTrack } from '../Doc-BhvotZx_.js';
1
+ import { g as AudioSegment, h as AudioTimingData, o as CaptionTrack, U as Doc, k as Block } from '../Doc-DLfTam0R.js';
2
2
  import '../types-Zk8qYuaT.js';
3
3
 
4
4
  /**
@@ -139,6 +139,70 @@ interface BuildCaptionTrackOptions {
139
139
  }
140
140
  declare function buildCaptionTrack(sources: CaptionSegmentSource[], options?: BuildCaptionTrackOptions): CaptionTrack;
141
141
 
142
+ /**
143
+ * Caption and chapter files — a doc's timing as text other players read.
144
+ *
145
+ * A rendered video burns its captions into the picture, which is right for a
146
+ * silent autoplay feed and wrong for everything else: a viewer cannot turn
147
+ * them off, a platform cannot translate or index them, and a screen reader
148
+ * cannot read them. These writers turn the same `CaptionTrack` the player
149
+ * shows into the two sidecar formats every video host accepts, SubRip (`.srt`)
150
+ * and WebVTT (`.vtt`), and a doc's sections into a chapter list.
151
+ *
152
+ * All three are pure functions of the doc's own times, so a host that
153
+ * post-processes the audio (a pre-roll, a trimmed take) passes an `offset`
154
+ * rather than rewriting cues. A cue never runs past the start of the next
155
+ * one, and cues with no words, or that end before they start, are left out.
156
+ *
157
+ * Related: `timing/captions.ts` (`buildCaptionTrack`), `schemas/Doc.ts`
158
+ * (`CaptionTrack`), the CLI's `video --captions`.
159
+ */
160
+
161
+ interface CaptionFileOptions {
162
+ /** Seconds added to every time, for a video that starts before the doc does (a cover pre-roll). */
163
+ offset?: number;
164
+ }
165
+ /** A caption track as a SubRip (`.srt`) file; empty when it has no cues. */
166
+ declare function formatCaptionsSrt(track: Pick<CaptionTrack, 'phrases'> | undefined, options?: CaptionFileOptions): string;
167
+ /**
168
+ * A caption track as a WebVTT (`.vtt`) file. The header is always written,
169
+ * so a track without cues is still a valid file.
170
+ */
171
+ declare function formatCaptionsVtt(track: Pick<CaptionTrack, 'phrases'> | undefined, options?: CaptionFileOptions): string;
172
+ /** One chapter of a doc: where a section starts, and what it is called. */
173
+ interface DocChapter {
174
+ /** Seconds from the start of the video. */
175
+ startTime: number;
176
+ title: string;
177
+ }
178
+ interface DocChapterOptions extends CaptionFileOptions {
179
+ /**
180
+ * The shortest a chapter may be, in seconds (default 10). A section that
181
+ * starts sooner after the one before it is folded into it: players and
182
+ * platforms ignore chapter lists with very short entries.
183
+ */
184
+ minDuration?: number;
185
+ }
186
+ /**
187
+ * A doc's chapters: its titled blocks, in time order, from the blocks as a
188
+ * player schedules them (pass the doc after `resolveAudioMapping`, or the
189
+ * blocks `expandDocBlocks` returns). Consecutive blocks with one title — a
190
+ * section shown over several slides — are one chapter. The first chapter
191
+ * starts at zero, as chapter lists must.
192
+ */
193
+ declare function docChapters(doc: Pick<Doc, 'blocks'> | readonly Block[], options?: DocChapterOptions): DocChapter[];
194
+ /**
195
+ * Chapters as an FFmpeg metadata file (`ffmpeg -i video.mp4 -i chapters.txt
196
+ * -map_metadata 1 -codec copy out.mp4`), which is how a chapter list is
197
+ * written into an MP4. `duration` closes the last chapter.
198
+ */
199
+ declare function formatChaptersFfmetadata(chapters: readonly DocChapter[], duration: number): string;
200
+ /**
201
+ * Chapters as the timestamp list video platforms read from a description
202
+ * ("0:00 Introduction"). Hours appear only when the video runs past one.
203
+ */
204
+ declare function formatChaptersText(chapters: readonly DocChapter[]): string;
205
+
142
206
  /**
143
207
  * Word timings: when narration speaks a given place in its script.
144
208
  *
@@ -195,4 +259,4 @@ declare function phraseOffset(timeline: WordTimeline, phrase: string, from?: num
195
259
  */
196
260
  declare function phraseStartTime(timeline: WordTimeline, phrase: string, options?: PhraseTimeOptions): number | null;
197
261
 
198
- export { type BuildCaptionTrackOptions, type CaptionSegmentSource, DEFAULT_WORDS_PER_SECOND, type NarrationTimeEstimate, type NarrationTimeOptions, type PhraseTimeOptions, type ReadingTimeEstimate, type ReadingTimeOptions, type WordMark, type WordSnap, type WordTimeline, buildCaptionTrack, calculatePrefixDuration, countSpokenWords, estimateNarrationDuration, estimateNarrationTime, estimateReadingTime, estimateSpokenWordCount, estimateTimeFromText, phraseOffset, phraseStartTime, wordTimeAt };
262
+ export { type BuildCaptionTrackOptions, type CaptionFileOptions, type CaptionSegmentSource, DEFAULT_WORDS_PER_SECOND, type DocChapter, type DocChapterOptions, type NarrationTimeEstimate, type NarrationTimeOptions, type PhraseTimeOptions, type ReadingTimeEstimate, type ReadingTimeOptions, type WordMark, type WordSnap, type WordTimeline, buildCaptionTrack, calculatePrefixDuration, countSpokenWords, docChapters, estimateNarrationDuration, estimateNarrationTime, estimateReadingTime, estimateSpokenWordCount, estimateTimeFromText, formatCaptionsSrt, formatCaptionsVtt, formatChaptersFfmetadata, formatChaptersText, phraseOffset, phraseStartTime, wordTimeAt };
@@ -1,3 +1,10 @@
1
+ import {
2
+ docChapters,
3
+ formatCaptionsSrt,
4
+ formatCaptionsVtt,
5
+ formatChaptersFfmetadata,
6
+ formatChaptersText
7
+ } from "../chunk-C7DKMO4H.js";
1
8
  import {
2
9
  buildCaptionTrack
3
10
  } from "../chunk-5HWYSUXS.js";
@@ -21,11 +28,16 @@ export {
21
28
  buildCaptionTrack,
22
29
  calculatePrefixDuration,
23
30
  countSpokenWords,
31
+ docChapters,
24
32
  estimateNarrationDuration,
25
33
  estimateNarrationTime,
26
34
  estimateReadingTime,
27
35
  estimateSpokenWordCount,
28
36
  estimateTimeFromText,
37
+ formatCaptionsSrt,
38
+ formatCaptionsVtt,
39
+ formatChaptersFfmetadata,
40
+ formatChaptersText,
29
41
  phraseOffset,
30
42
  phraseStartTime,
31
43
  wordTimeAt