@bendyline/squisq 2.11.8 → 2.11.10

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 (31) hide show
  1. package/dist/{Doc-CynsGqL4.d.ts → Doc-BWtfp7dT.d.ts} +218 -3
  2. package/dist/{ImageEditDoc-BVZe_5y4.d.ts → ImageEditDoc-CYRQK8so.d.ts} +1 -1
  3. package/dist/{chunk-YNO6JV36.js → chunk-2SRF5III.js} +4 -4
  4. package/dist/{chunk-VU4T74LI.js → chunk-7WN7DDMI.js} +1 -1
  5. package/dist/{chunk-5FBI3ZW4.js → chunk-BVQZCKXN.js} +2 -2
  6. package/dist/{chunk-JM2QARY2.js → chunk-CPQCZUBW.js} +311 -19
  7. package/dist/{chunk-JJO6JFNZ.js → chunk-HVJ6VFDX.js} +2 -2
  8. package/dist/{chunk-Y4D6TDZT.js → chunk-PFH3WV6J.js} +145 -3
  9. package/dist/{chunk-ZEONJCP3.js → chunk-PWCIJHZH.js} +1 -1
  10. package/dist/{chunk-KFZOCWPK.js → chunk-RV5OOBSV.js} +2 -2
  11. package/dist/{chunk-RMCUZDW5.js → chunk-TYW5VMNP.js} +366 -111
  12. package/dist/doc/index.d.ts +108 -7
  13. package/dist/doc/index.js +31 -5
  14. package/dist/fence/index.d.ts +1 -1
  15. package/dist/generate/index.d.ts +1 -1
  16. package/dist/imageEdit/index.d.ts +3 -3
  17. package/dist/index.d.ts +5 -5
  18. package/dist/index.js +49 -9
  19. package/dist/jsonForm/index.d.ts +1 -1
  20. package/dist/jsonForm/index.js +4 -4
  21. package/dist/{materializePageSection-CAJoa8fh.d.ts → materializePageSection-Db7pABI0.d.ts} +6 -3
  22. package/dist/mediaEdit/index.d.ts +2 -2
  23. package/dist/narration/index.d.ts +1 -1
  24. package/dist/narration/index.js +4 -4
  25. package/dist/schemas/index.d.ts +4 -4
  26. package/dist/schemas/index.js +17 -3
  27. package/dist/{themeLibrary-z7t3x5CU.d.ts → themeLibrary-Bphz1CRp.d.ts} +1 -1
  28. package/dist/timing/index.d.ts +1 -1
  29. package/dist/transform/index.d.ts +2 -2
  30. package/dist/transform/index.js +3 -3
  31. package/package.json +1 -1
@@ -525,6 +525,118 @@ declare function getSafeTextBounds(orientation: ViewportOrientation): {
525
525
  bottom: string;
526
526
  };
527
527
 
528
+ /**
529
+ * Motion Profiles
530
+ *
531
+ * A motion profile is the one knob that decides how much a document moves:
532
+ * whether chart bars grow or simply fade in, whether a headline statistic
533
+ * counts up, whether diagram edges draw themselves, how photo-grid tiles
534
+ * arrive, and which entrance text layers use. Templates never branch on a
535
+ * profile name; they call the helpers in `doc/utils/themeUtils.ts`
536
+ * (`motionEntrance`, `getMotionProfile`) and read the resolved profile off
537
+ * `TemplateContext.motion`.
538
+ *
539
+ * Three built-in profiles ship:
540
+ *
541
+ * - `calm` — exactly the output squisq produced before motion profiles
542
+ * existed. Templates receive their own fallback animations
543
+ * unchanged, so `calm` is byte-identical to "no profile".
544
+ * - `documentary` — measured build-ins: fade-up entrances, charts grow over
545
+ * ~1 s, statistics count up, diagrams draw on.
546
+ * - `vibrant` — the same vocabulary, snappier and with a little overshoot.
547
+ *
548
+ * Precedence (highest first) — see {@link resolveMotionForDoc}:
549
+ * explicit override (player prop / CLI `--motion`) → `Doc.motion` →
550
+ * frontmatter `squisq-motion` → `theme.renderStyle.motionProfile` → `calm`.
551
+ *
552
+ * Every effect a profile enables is a CSS keyframe animation (seekable by the
553
+ * offline renderer through the Web Animations API) or a pure function of the
554
+ * block clock (count-up), so exported frames are deterministic.
555
+ *
556
+ * Related files:
557
+ * - `schemas/Doc.ts` — `Animation` / `AnimationType` vocabulary, `Doc.motion`
558
+ * - `schemas/Theme.ts` — `RenderStyle.motionProfile`
559
+ * - `doc/utils/themeUtils.ts` — template-facing helpers
560
+ * - `doc/utils/countUp.ts` — the pure count-up formatter
561
+ * - `doc/templates/*` — templates that opt in (chart, statHighlight,
562
+ * comparisonBar, diagram, timeline, photoGrid, cover, …)
563
+ */
564
+
565
+ /** Names of the built-in motion profiles. */
566
+ type MotionProfileName = 'calm' | 'documentary' | 'vibrant';
567
+ /** Frontmatter key that selects a document's motion profile. */
568
+ declare const FRONTMATTER_MOTION_KEY = "squisq-motion";
569
+ /**
570
+ * Entrance a profile applies to text layers that opt in through
571
+ * `motionEntrance()`. Templates keep their authored delays and staggers;
572
+ * `delayScale` compresses or stretches them as a whole.
573
+ */
574
+ interface MotionEntrance {
575
+ type: 'fadeIn' | 'fadeInUp' | 'zoomIn' | 'grow';
576
+ /** Seconds. */
577
+ duration: number;
578
+ /** CSS easing. */
579
+ easing?: string;
580
+ /** Multiplier on template-authored delays (1 keeps the authored stagger). */
581
+ delayScale: number;
582
+ }
583
+ /** The resolved set of motion decisions templates read. */
584
+ interface MotionProfile {
585
+ name: MotionProfileName;
586
+ /** Entrance for text and caption layers that opt in. */
587
+ textEntrance: MotionEntrance;
588
+ /** Chart marks grow (bars/columns), draw on (lines) or sweep out (pies) instead of fading. */
589
+ chartGrowth: boolean;
590
+ /** Seconds a chart's growth takes. */
591
+ chartGrowthDuration: number;
592
+ /** Headline numbers (statHighlight, comparisonBar) count up from zero. */
593
+ countUp: boolean;
594
+ /** Seconds a count-up takes. */
595
+ countUpDuration: number;
596
+ /** Diagram nodes pop in and edges draw on; timeline tracks and stems draw on. */
597
+ diagramBuild: boolean;
598
+ /** Seconds between photo-grid tiles revealing; `0` keeps the plain fade. */
599
+ photoGridStagger: number;
600
+ /** Cover title reveals word by word. Off by default — covers double as posters. */
601
+ coverWordReveal: boolean;
602
+ }
603
+ /**
604
+ * What a document, a theme or a caller may specify: a profile name, or a
605
+ * named profile with field overrides (`{ profile: 'documentary', countUp: false }`).
606
+ */
607
+ type MotionSpec = MotionProfileName | (Partial<Omit<MotionProfile, 'name' | 'textEntrance'>> & {
608
+ profile?: MotionProfileName;
609
+ textEntrance?: Partial<MotionEntrance>;
610
+ }) | MotionProfile;
611
+ /** The built-in profiles. `calm` reproduces pre-profile output exactly. */
612
+ declare const MOTION_PROFILES: Readonly<Record<MotionProfileName, MotionProfile>>;
613
+ /** Type guard for a built-in profile name. */
614
+ declare function isMotionProfileName(value: unknown): value is MotionProfileName;
615
+ /**
616
+ * Resolve a spec to a complete profile. An unknown name or a malformed spec
617
+ * falls back to `fallback` (default `calm`) rather than throwing: motion is
618
+ * decorative and must never stop a document from rendering.
619
+ */
620
+ declare function resolveMotionProfile(spec: MotionSpec | null | undefined, fallback?: MotionProfileName): MotionProfile;
621
+ /**
622
+ * Read the motion spec a markdown document carries in its frontmatter
623
+ * (`squisq-motion: vibrant`, or an object with overrides). Returns
624
+ * `undefined` when absent or unusable.
625
+ */
626
+ declare function readFrontmatterMotion(frontmatter: Record<string, unknown> | undefined): MotionSpec | undefined;
627
+ /**
628
+ * Resolve the effective motion profile for a document.
629
+ *
630
+ * Precedence: `explicit` (a player prop or CLI flag) → `doc.motion` →
631
+ * frontmatter `squisq-motion` → `theme.renderStyle.motionProfile` → `calm`.
632
+ * A doc-level spec may be a partial override; its base profile is the
633
+ * theme's when it names none.
634
+ */
635
+ declare function resolveMotionForDoc(doc: {
636
+ motion?: MotionSpec;
637
+ frontmatter?: Record<string, unknown>;
638
+ } | null | undefined, theme?: Pick<Theme, 'renderStyle'> | null, explicit?: MotionSpec | null): MotionProfile;
639
+
528
640
  /**
529
641
  * Block Templates Schema
530
642
  *
@@ -1381,11 +1493,26 @@ interface TemplateContext {
1381
1493
  * their typed `input` parameters instead.
1382
1494
  */
1383
1495
  block?: Block;
1496
+ /**
1497
+ * Resolved motion profile (chart growth, count-ups, diagram build-ins,
1498
+ * text entrances). Templates read it through `getMotionProfile()` /
1499
+ * `motionEntrance()`; absent means `calm`.
1500
+ */
1501
+ motion?: MotionProfile;
1502
+ }
1503
+ /** Extra inputs to {@link createTemplateContext}. */
1504
+ interface CreateTemplateContextOptions {
1505
+ /**
1506
+ * Motion spec for the document. Resolved against the theme's
1507
+ * `renderStyle.motionProfile`; when omitted the theme's profile (or
1508
+ * `calm`) applies.
1509
+ */
1510
+ motion?: MotionSpec | null;
1384
1511
  }
1385
1512
  /**
1386
1513
  * Create a template context with viewport-derived values.
1387
1514
  */
1388
- declare function createTemplateContext(theme: Theme, blockIndex: number, totalBlocks: number, viewport?: ViewportConfig): TemplateContext;
1515
+ declare function createTemplateContext(theme: Theme, blockIndex: number, totalBlocks: number, viewport?: ViewportConfig, options?: CreateTemplateContextOptions): TemplateContext;
1389
1516
  /**
1390
1517
  * Calculate a scaled font size for the given context.
1391
1518
  * Use this in templates to ensure text scales appropriately.
@@ -1581,6 +1708,17 @@ interface ProgressIndicatorConfig {
1581
1708
  */
1582
1709
  declare const PAGE_SECTION_KINDS: readonly ["hero", "banner", "stat-band", "quote-band", "feature-split", "media-figure", "gallery", "callout", "card-grid", "item-list", "timeline-rail", "table-section", "canvas-embed", "prose", "footer"];
1583
1710
  type PageSectionKind = (typeof PAGE_SECTION_KINDS)[number];
1711
+ /**
1712
+ * How a page rendition reads. `page` (the default) is the art-directed
1713
+ * scrolling site: a centered cover hero, display type, section bands, and
1714
+ * content-aware templates. `document` is the working-document register for
1715
+ * reports, notes, and previews: a left-aligned masthead, one heading scale
1716
+ * that follows the markdown hierarchy whatever section carries it, one flat
1717
+ * surface, and markdown structure kept as written — auto-picked templates
1718
+ * render as prose, while authored `{[template]}` annotations still apply.
1719
+ */
1720
+ declare const PAGE_VARIANTS: readonly ["page", "document"];
1721
+ type PageVariant = (typeof PAGE_VARIANTS)[number];
1584
1722
  /** Relative visual weight of a section within the page. */
1585
1723
  type PageEmphasis = 'lead' | 'strong' | 'standard' | 'quiet';
1586
1724
  /** Which background treatment a section sits on. */
@@ -1873,6 +2011,13 @@ interface RenderStyle {
1873
2011
  defaultImageAnimation?: AnimationType;
1874
2012
  /** Whether to apply Ken Burns ambient motion to images by default */
1875
2013
  ambientMotion?: boolean;
2014
+ /**
2015
+ * Motion profile documents inherit from this theme (`calm` when unset).
2016
+ * Decides whether charts grow, statistics count up, diagrams build in and
2017
+ * how text enters. Documents override it with `squisq-motion` / `Doc.motion`;
2018
+ * see `schemas/Motion.ts`.
2019
+ */
2020
+ motionProfile?: MotionProfileName;
1876
2021
  /** Default block-to-block transition */
1877
2022
  defaultTransition?: {
1878
2023
  type: TransitionType;
@@ -2207,6 +2352,15 @@ interface Doc {
2207
2352
  * When omitted, the renderer uses the default theme ('documentary').
2208
2353
  */
2209
2354
  themeId?: string;
2355
+ /**
2356
+ * Motion profile for this document — a built-in name (`calm`,
2357
+ * `documentary`, `vibrant`) or a named profile with overrides. Decides how
2358
+ * much templates move (chart growth, count-ups, diagram build-ins, …).
2359
+ * Populated from the frontmatter key `squisq-motion`; resolved at render
2360
+ * time by `resolveMotionForDoc()`, which falls back to the theme's
2361
+ * `renderStyle.motionProfile` and finally to `calm`.
2362
+ */
2363
+ motion?: MotionSpec;
2210
2364
  /** Optional metadata */
2211
2365
  meta?: {
2212
2366
  generatedAt?: string;
@@ -2939,11 +3093,72 @@ interface Animation {
2939
3093
  direction?: 'in' | 'out';
2940
3094
  /** For pan animations: pan direction */
2941
3095
  panDirection?: 'left' | 'right' | 'up' | 'down';
3096
+ /**
3097
+ * For `grow`: the edge (or centre) the layer scales out from — a bar grows
3098
+ * from its `left`, a column from its `bottom`, a node from its `center`.
3099
+ * For `slideIn` / `reveal`: the edge the layer enters from or is uncovered
3100
+ * from. Defaults to `center` for grow and `left` otherwise.
3101
+ */
3102
+ origin?: MotionOrigin;
3103
+ /** For `reveal`: a directional wipe (default) or an iris opening from the centre. */
3104
+ shape?: 'wipe' | 'iris';
3105
+ /** For `wordReveal`: seconds between successive words (default 0.08). */
3106
+ stagger?: number;
3107
+ /**
3108
+ * For `wordReveal`: explicit per-word start offsets (seconds from block
3109
+ * start), e.g. aligned to narration. Overrides `stagger`; words past the
3110
+ * end of the list continue at the last interval.
3111
+ */
3112
+ wordTimes?: number[];
3113
+ /**
3114
+ * For `countUp`: the number to count and how to print it. When omitted the
3115
+ * renderer parses the layer's text (`"73%"` → count to 73 with a `%` suffix).
3116
+ */
3117
+ count?: CountUpSpec;
3118
+ /** For `tween`: the state the layer starts in. Unset fields keep the rest state. */
3119
+ fromState?: MotionState;
3120
+ /** For `tween`: the state the layer ends in (default: rest). */
3121
+ toState?: MotionState;
3122
+ }
3123
+ /** Edge or centre a motion originates from. */
3124
+ type MotionOrigin = 'center' | 'left' | 'right' | 'top' | 'bottom';
3125
+ /** A transform/opacity state for `tween` animations. */
3126
+ interface MotionState {
3127
+ /** Uniform scale (1 = rest). */
3128
+ scale?: number;
3129
+ /** Horizontal offset in pixels. */
3130
+ x?: number;
3131
+ /** Vertical offset in pixels. */
3132
+ y?: number;
3133
+ /** Opacity 0–1. */
3134
+ opacity?: number;
3135
+ /** Rotation in degrees. */
3136
+ rotate?: number;
3137
+ }
3138
+ /** How a `countUp` layer counts and formats its number. */
3139
+ interface CountUpSpec {
3140
+ /** Starting value (default 0). */
3141
+ from?: number;
3142
+ /** Final value. */
3143
+ to: number;
3144
+ /** Decimal places to print (default 0). */
3145
+ decimals?: number;
3146
+ /** Print thousands separators (default false). */
3147
+ grouping?: boolean;
3148
+ /** Text before the number, e.g. `$`. */
3149
+ prefix?: string;
3150
+ /** Text after the number, e.g. `%` or ` km`. */
3151
+ suffix?: string;
2942
3152
  }
2943
3153
  /**
2944
3154
  * Available animation types.
3155
+ *
3156
+ * The first group is the original vocabulary. The second group arrived with
3157
+ * motion profiles (`schemas/Motion.ts`); every one of them is a CSS keyframe
3158
+ * animation the offline renderer can seek, except `countUp`, which the text
3159
+ * layer derives from the block clock.
2945
3160
  */
2946
- type AnimationType = 'none' | 'fadeIn' | 'fadeOut' | 'slowZoom' | 'zoomIn' | 'zoomOut' | 'panLeft' | 'panRight' | 'typewriter';
3161
+ type AnimationType = 'none' | 'fadeIn' | 'fadeOut' | 'slowZoom' | 'zoomIn' | 'zoomOut' | 'panLeft' | 'panRight' | 'typewriter' | 'fadeInUp' | 'slideIn' | 'wordReveal' | 'countUp' | 'drawOn' | 'grow' | 'reveal' | 'drift' | 'tween';
2947
3162
  /**
2948
3163
  * Audio track configuration.
2949
3164
  * Articles have multiple MP3 segments (intro + sections).
@@ -3054,4 +3269,4 @@ declare function getBlockAtTime(blocks: Block[], time: number): Block | null;
3054
3269
  */
3055
3270
  declare function getCaptionAtTime(captions: CaptionTrack | undefined, time: number): CaptionPhrase | null;
3056
3271
 
3057
- export { type ImageLayer as $, type AccentImage as A, type BarChartInput as B, type CaptionPhrase as C, DARK_SURFACE as D, DEFAULT_DOC_FONT as E, DEFAULT_TITLE_FONT as F, type DataTableInput as G, type DateEventInput as H, type DeepPartial as I, type DefinitionCardInput as J, type DiagramBlockInput as K, type DiagramEdgeAnchor as L, type DiagramTemplateEdge as M, type DiagramTemplateNode as N, type Doc as O, type DocBlock as P, type DocDiagnostic as Q, type DonutChartInput as R, type DrawingBlockInput as S, FRONTMATTER_CUSTOM_TEMPLATES_KEY as T, FRONTMATTER_CUSTOM_THEMES_KEY as U, type FactCardInput as V, type FontFamily as W, type FontFamilyKind as X, type FullBleedQuoteInput as Y, type GradientBackgroundConfig as Z, type ImageBackgroundConfig as _, type AccentPosition as a, type RenderStyle as a$, type ImageTreatment as a0, type ImageWithCaptionInput as a1, LIGHT_SURFACE as a2, type Layer as a3, type LayerRepeat as a4, type LayoutHints as a5, type LeftFeatureInput as a6, type LineChartInput as a7, type LinearGradient as a8, type ListBlockInput as a9, PAGE_SECTION_KINDS as aA, PAGE_SECTION_SPACINGS as aB, PAGE_SHADOWS as aC, type PageAccentRotation as aD, type PageBackground as aE, type PageDesignFamily as aF, type PageEmphasis as aG, type PageHeadingTreatment as aH, type PageSectionKind as aI, type PageSectionOverride as aJ, type PageTokens as aK, type PathLayer as aL, type PatternBackgroundConfig as aM, type PersistentLayer as aN, type PersistentLayerConfig as aO, type PersistentLayerTemplate as aP, type PersistentLayerTemplateConfig as aQ, type PersistentLayerTemplateType as aR, type PhotoGridInput as aS, type PieChartInput as aT, type PipStyle as aU, type Position as aV, type ProgressIndicatorConfig as aW, type PromotedBodyAnnotation as aX, type PullQuoteInput as aY, type QuoteBlockInput as aZ, type RawLayersInput as a_, type MapBlockInput as aa, type MapLayer as ab, type MapMarker as ac, type MapTileStyle as ad, type MarkerStyle as ae, type MediaClip as af, type MediaCrop as ag, type MediaCut as ah, type MediaEdits as ai, type MediaScheduleOptions as aj, type MermaidLayer as ak, PAGE_ACCENT_STRATEGIES as al, PAGE_BACKGROUNDS as am, PAGE_BACKGROUND_RHYTHMS as an, PAGE_DESIGN_FAMILIES as ao, PAGE_DIVIDERS as ap, PAGE_EMPHASES as aq, PAGE_EYEBROWS as ar, PAGE_HEADING_CASES as as, PAGE_HEADING_SCALES as at, PAGE_HEADING_UNDERLINES as au, PAGE_HERO_STYLES as av, PAGE_IMAGE_FRAMINGS as aw, PAGE_NUMERAL_STYLES as ax, PAGE_PATTERNS as ay, PAGE_QUOTE_MARKS as az, type AmbientGradientConfig as b, getCaptionAtTime as b$, type RightFeatureInput as b0, type ScatterChartInput as b1, type ScheduledClip as b2, type SectionHeaderInput as b3, type ShapeFilter as b4, type ShapeLayer as b5, type ShapePattern as b6, type SolidBackgroundConfig as b7, type StartBlockConfig as b8, type StatHighlightInput as b9, type TreeBlockInput as bA, type TreeLayer as bB, type TreeLayerItem as bC, type TreeLayerStyle as bD, type TreeTemplateItem as bE, type TwoColumnInput as bF, VIEWPORT_PRESETS as bG, type VideoLayer as bH, type VideoPipPosition as bI, type VideoPipShape as bJ, type VideoPipSize as bK, type VideoPlacement as bL, type VideoPresentation as bM, type VideoPullQuoteInput as bN, type VideoWithCaptionInput as bO, type ViewportConfig as bP, type ViewportOrientation as bQ, type ViewportPreset as bR, type VignetteConfig as bS, applySurface as bT, calculateDuration as bU, calculateFontScale as bV, createTemplateContext as bW, createTheme as bX, createThemeRegistry as bY, getAspectRatioString as bZ, getBlockAtTime as b_, type SurfaceScheme as ba, THEME_SCHEMA_VERSION as bb, type TableLayer as bc, type TableLayerStyle as bd, type TemplateBlock as be, type TemplateContext as bf, type TemplateFunction as bg, type TemplateRegistry as bh, type TextLayer as bi, type TextStyle as bj, type Theme as bk, type ThemeColorPalette as bl, type ThemeColorScheme as bm, type ThemePageStyle as bn, type ThemeRegistry as bo, type ThemeSchemaVersion as bp, type ThemeSeedColors as bq, type ThemeStyle as br, type ThemeTypography as bs, type TimelineBlockInput as bt, type TimelineTemplateEvent as bu, type TimelineTemplateLink as bv, type TimelineTemplateTrack as bw, type TitleBlockInput as bx, type TitleCaptionConfig as by, type TranscriptBlockInput as bz, type Animation as c, getDocPlaybackDuration as c0, getLayoutHints as c1, getSafeTextBounds as c2, getSegmentAtTime as c3, getTwoColumnPositions as c4, getViewport as c5, getViewportOrientation as c6, isCustomTemplateDefinition as c7, isPersistentLayerTemplate as c8, isTemplateBlock as c9, serializeMediaCuts as cA, serializeMediaEdits as cB, serializeMediaFx as cC, scaledFontSize$1 as ca, resolveMediaSchedule as cb, scaledFontSize as cc, scheduleMediaClip as cd, validateCustomTemplateDefinition as ce, type MediaFxOpId as cf, type MediaFxChain as cg, MEDIA_EDIT_PARAMS as ch, MEDIA_FX_ORDER as ci, MEDIA_FX_SPECS as cj, type MediaEditParamKey as ck, type MediaEditParamValues as cl, type MediaFxOp as cm, formatMediaNumber as cn, hasRenderableFx as co, mediaEditHtmlAttribute as cp, mediaEditValuesFromAttributes as cq, mediaEditValuesFromParams as cr, mediaRenderKey as cs, normalizeMediaCrop as ct, normalizeMediaCuts as cu, parseMediaCrop as cv, parseMediaCuts as cw, parseMediaEdits as cx, parseMediaFx as cy, serializeMediaCrop as cz, type AnimationType as d, type AreaChartInput as e, type AudioBookmark as f, type AudioSegment as g, type AudioTimingData as h, type AudioTrack as i, type BigTextInput as j, type Block as k, type BlockConnection as l, type BorderStyle as m, type CaptionTrack as n, type CaptionWord as o, type ChartBaseFields as p, type ChartTemplateInput as q, type ColorScheme as r, type ColumnChartInput as s, type ComparisonBarInput as t, type ContentBlockInput as u, type CornerBrandingConfig as v, type CustomTemplateDefinition as w, type CustomTemplateLayer as x, type CustomTemplateValidationError as y, type CustomTemplateValidationResult as z };
3272
+ export { type FullBleedQuoteInput as $, type AccentImage as A, type BarChartInput as B, type CaptionPhrase as C, type CustomTemplateValidationError as D, type CustomTemplateValidationResult as E, DARK_SURFACE as F, DEFAULT_DOC_FONT as G, DEFAULT_TITLE_FONT as H, type DataTableInput as I, type DateEventInput as J, type DeepPartial as K, type DefinitionCardInput as L, type DiagramBlockInput as M, type DiagramEdgeAnchor as N, type DiagramTemplateEdge as O, type DiagramTemplateNode as P, type Doc as Q, type DocBlock as R, type DocDiagnostic as S, type DonutChartInput as T, type DrawingBlockInput as U, FRONTMATTER_CUSTOM_TEMPLATES_KEY as V, FRONTMATTER_CUSTOM_THEMES_KEY as W, FRONTMATTER_MOTION_KEY as X, type FactCardInput as Y, type FontFamily as Z, type FontFamilyKind as _, type AccentPosition as a, type PersistentLayerTemplate as a$, type GradientBackgroundConfig as a0, type ImageBackgroundConfig as a1, type ImageLayer as a2, type ImageTreatment as a3, type ImageWithCaptionInput as a4, LIGHT_SURFACE as a5, type Layer as a6, type LayerRepeat as a7, type LayoutHints as a8, type LeftFeatureInput as a9, PAGE_EMPHASES as aA, PAGE_EYEBROWS as aB, PAGE_HEADING_CASES as aC, PAGE_HEADING_SCALES as aD, PAGE_HEADING_UNDERLINES as aE, PAGE_HERO_STYLES as aF, PAGE_IMAGE_FRAMINGS as aG, PAGE_NUMERAL_STYLES as aH, PAGE_PATTERNS as aI, PAGE_QUOTE_MARKS as aJ, PAGE_SECTION_KINDS as aK, PAGE_SECTION_SPACINGS as aL, PAGE_SHADOWS as aM, PAGE_VARIANTS as aN, type PageAccentRotation as aO, type PageBackground as aP, type PageDesignFamily as aQ, type PageEmphasis as aR, type PageHeadingTreatment as aS, type PageSectionKind as aT, type PageSectionOverride as aU, type PageTokens as aV, type PageVariant as aW, type PathLayer as aX, type PatternBackgroundConfig as aY, type PersistentLayer as aZ, type PersistentLayerConfig as a_, type LineChartInput as aa, type LinearGradient as ab, type ListBlockInput as ac, MOTION_PROFILES as ad, type MapBlockInput as ae, type MapLayer as af, type MapMarker as ag, type MapTileStyle as ah, type MarkerStyle as ai, type MediaClip as aj, type MediaCrop as ak, type MediaCut as al, type MediaEdits as am, type MediaScheduleOptions as an, type MermaidLayer as ao, type MotionEntrance as ap, type MotionOrigin as aq, type MotionProfile as ar, type MotionProfileName as as, type MotionSpec as at, type MotionState as au, PAGE_ACCENT_STRATEGIES as av, PAGE_BACKGROUNDS as aw, PAGE_BACKGROUND_RHYTHMS as ax, PAGE_DESIGN_FAMILIES as ay, PAGE_DIVIDERS as az, type AmbientGradientConfig as b, type ViewportConfig as b$, type PersistentLayerTemplateConfig as b0, type PersistentLayerTemplateType as b1, type PhotoGridInput as b2, type PieChartInput as b3, type PipStyle as b4, type Position as b5, type ProgressIndicatorConfig as b6, type PromotedBodyAnnotation as b7, type PullQuoteInput as b8, type QuoteBlockInput as b9, type ThemeRegistry as bA, type ThemeSchemaVersion as bB, type ThemeSeedColors as bC, type ThemeStyle as bD, type ThemeTypography as bE, type TimelineBlockInput as bF, type TimelineTemplateEvent as bG, type TimelineTemplateLink as bH, type TimelineTemplateTrack as bI, type TitleBlockInput as bJ, type TitleCaptionConfig as bK, type TranscriptBlockInput as bL, type TreeBlockInput as bM, type TreeLayer as bN, type TreeLayerItem as bO, type TreeLayerStyle as bP, type TreeTemplateItem as bQ, type TwoColumnInput as bR, VIEWPORT_PRESETS as bS, type VideoLayer as bT, type VideoPipPosition as bU, type VideoPipShape as bV, type VideoPipSize as bW, type VideoPlacement as bX, type VideoPresentation as bY, type VideoPullQuoteInput as bZ, type VideoWithCaptionInput as b_, type RawLayersInput as ba, type RenderStyle as bb, type RightFeatureInput as bc, type ScatterChartInput as bd, type ScheduledClip as be, type SectionHeaderInput as bf, type ShapeFilter as bg, type ShapeLayer as bh, type ShapePattern as bi, type SolidBackgroundConfig as bj, type StartBlockConfig as bk, type StatHighlightInput as bl, type SurfaceScheme as bm, THEME_SCHEMA_VERSION as bn, type TableLayer as bo, type TableLayerStyle as bp, type TemplateBlock as bq, type TemplateContext as br, type TemplateFunction as bs, type TemplateRegistry as bt, type TextLayer as bu, type TextStyle as bv, type Theme as bw, type ThemeColorPalette as bx, type ThemeColorScheme as by, type ThemePageStyle as bz, type Animation as c, type ViewportOrientation as c0, type ViewportPreset as c1, type VignetteConfig as c2, applySurface as c3, calculateDuration as c4, calculateFontScale as c5, createTemplateContext as c6, createTheme as c7, createThemeRegistry as c8, getAspectRatioString as c9, type MediaEditParamKey as cA, type MediaEditParamValues as cB, type MediaFxOp as cC, formatMediaNumber as cD, hasRenderableFx as cE, mediaEditHtmlAttribute as cF, mediaEditValuesFromAttributes as cG, mediaEditValuesFromParams as cH, mediaRenderKey as cI, normalizeMediaCrop as cJ, normalizeMediaCuts as cK, parseMediaCrop as cL, parseMediaCuts as cM, parseMediaEdits as cN, parseMediaFx as cO, serializeMediaCrop as cP, serializeMediaCuts as cQ, serializeMediaEdits as cR, serializeMediaFx as cS, getBlockAtTime as ca, getCaptionAtTime as cb, getDocPlaybackDuration as cc, getLayoutHints as cd, getSafeTextBounds as ce, getSegmentAtTime as cf, getTwoColumnPositions as cg, getViewport as ch, getViewportOrientation as ci, isCustomTemplateDefinition as cj, isMotionProfileName as ck, isPersistentLayerTemplate as cl, isTemplateBlock as cm, scaledFontSize$1 as cn, readFrontmatterMotion as co, resolveMediaSchedule as cp, resolveMotionForDoc as cq, resolveMotionProfile as cr, scaledFontSize as cs, scheduleMediaClip as ct, validateCustomTemplateDefinition as cu, type MediaFxOpId as cv, type MediaFxChain as cw, MEDIA_EDIT_PARAMS as cx, MEDIA_FX_ORDER as cy, MEDIA_FX_SPECS as cz, type AnimationType as d, type AreaChartInput as e, type AudioBookmark as f, type AudioSegment as g, type AudioTimingData as h, type AudioTrack as i, type BigTextInput as j, type Block as k, type BlockConnection as l, type BorderStyle as m, type CaptionTrack as n, type CaptionWord as o, type ChartBaseFields as p, type ChartTemplateInput as q, type ColorScheme as r, type ColumnChartInput as s, type ComparisonBarInput as t, type ContentBlockInput as u, type CornerBrandingConfig as v, type CountUpSpec as w, type CreateTemplateContextOptions as x, type CustomTemplateDefinition as y, type CustomTemplateLayer as z };
@@ -1,4 +1,4 @@
1
- import { $ as ImageLayer, bi as TextLayer, b5 as ShapeLayer, aL as PathLayer } from './Doc-CynsGqL4.js';
1
+ import { a2 as ImageLayer, bu as TextLayer, bh as ShapeLayer, aX as PathLayer } from './Doc-BWtfp7dT.js';
2
2
 
3
3
  /**
4
4
  * ImageEditDoc — JSON document describing a layered, editable image.
@@ -109,10 +109,10 @@ function companionAudio(entry, clip, processed) {
109
109
  return companion;
110
110
  }
111
111
  function baseTimelineEnd(doc) {
112
- const blockEnd = flatten(doc.blocks).reduce(
113
- (max, b) => Math.max(max, b.startTime + b.duration),
114
- 0
115
- );
112
+ const blockEnd = flatten(doc.blocks).reduce((max, b) => {
113
+ const end = b.startTime + b.duration;
114
+ return Number.isFinite(end) ? Math.max(max, end) : max;
115
+ }, 0);
116
116
  return Math.max(doc.duration ?? 0, blockEnd);
117
117
  }
118
118
  function resolveMediaSchedule(doc, opts) {
@@ -2,7 +2,7 @@ import {
2
2
  DEFAULT_THEME,
3
3
  applySurface,
4
4
  resolveFontFamily
5
- } from "./chunk-Y4D6TDZT.js";
5
+ } from "./chunk-PFH3WV6J.js";
6
6
 
7
7
  // src/jsonForm/chooseControl.ts
8
8
  var ENUM_SEGMENTED_LIMIT = 4;
@@ -7,10 +7,10 @@ import {
7
7
  buildNarrationScript,
8
8
  expectedSyllablesAt,
9
9
  wordPosAtExpectedSyllables
10
- } from "./chunk-ZEONJCP3.js";
10
+ } from "./chunk-PWCIJHZH.js";
11
11
  import {
12
12
  flattenRenderableBlocks
13
- } from "./chunk-RMCUZDW5.js";
13
+ } from "./chunk-TYW5VMNP.js";
14
14
 
15
15
  // src/narration/types.ts
16
16
  var DEFAULT_FEATURE_CONFIG = Object.freeze({