@bendyline/squisq 2.13.14 → 2.13.15
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.
- package/dist/{Doc-BhvotZx_.d.ts → Doc-C_Sh49ot.d.ts} +59 -6
- package/dist/{ImageEditDoc-D8hYio6b.d.ts → ImageEditDoc-Sqw3Tw-R.d.ts} +1 -1
- package/dist/{chunk-OIQ2GO2O.js → chunk-2CB37BOU.js} +1 -1
- package/dist/{chunk-CTT4XAGO.js → chunk-4HQ7QZKB.js} +2289 -630
- package/dist/chunk-C7DKMO4H.js +88 -0
- package/dist/{chunk-C4SB3NN4.js → chunk-DDJHIZED.js} +1 -1
- package/dist/{chunk-J2G6EOEJ.js → chunk-FYP7GNER.js} +72 -13
- package/dist/chunk-N3FQSUVT.js +515 -0
- package/dist/{chunk-SGNWO7OF.js → chunk-OFE5RZWW.js} +490 -24
- package/dist/{chunk-YQQWE4HG.js → chunk-OJCAKUHW.js} +192 -260
- package/dist/{chunk-7MS26OXD.js → chunk-UDPPWYYM.js} +6 -0
- package/dist/{chunk-5DFFVW75.js → chunk-Y34KYMAS.js} +1 -1
- package/dist/doc/index.d.ts +320 -22
- package/dist/doc/index.js +54 -8
- package/dist/fence/index.d.ts +1 -1
- package/dist/generate/index.d.ts +1 -1
- package/dist/imageEdit/index.d.ts +3 -3
- package/dist/index.d.ts +8 -8
- package/dist/index.js +125 -21
- package/dist/jsonForm/index.d.ts +1 -1
- package/dist/markdown/index.js +3 -3
- package/dist/{materializePageSection-CWxou4mX.d.ts → materializePageSection-Dmf-rf1b.d.ts} +121 -8
- package/dist/mediaEdit/index.d.ts +2 -2
- package/dist/narration/index.d.ts +1 -1
- package/dist/narration/index.js +4 -4
- package/dist/recommend/index.d.ts +129 -2
- package/dist/recommend/index.js +11 -3
- package/dist/schemas/index.d.ts +4 -4
- package/dist/{themeLibrary-BIYE6aLw.d.ts → themeLibrary-B4VLovhW.d.ts} +1 -1
- package/dist/timing/index.d.ts +66 -2
- package/dist/timing/index.js +12 -0
- package/dist/transform/index.d.ts +173 -16
- package/dist/transform/index.js +55 -16
- package/package.json +1 -1
- package/dist/chunk-FCB6JLWB.js +0 -125
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { at as MediaCut, U as Doc, ar as MediaClip, cP as MediaFxOpId, cQ as MediaFxChain } from '../Doc-C_Sh49ot.js';
|
|
2
|
+
export { cR as MEDIA_EDIT_PARAMS, cS as MEDIA_FX_ORDER, cT as MEDIA_FX_SPECS, as as MediaCrop, cU as MediaEditParamKey, cV as MediaEditParamValues, au as MediaEdits, cW as MediaFxOp, cX as formatMediaNumber, cY as hasRenderableFx, cZ as mediaEditHtmlAttribute, c_ as mediaEditValuesFromAttributes, c$ as mediaEditValuesFromParams, d0 as mediaRenderKey, d1 as normalizeMediaCrop, d2 as normalizeMediaCuts, d3 as parseMediaCrop, d4 as parseMediaCuts, d5 as parseMediaEdits, d6 as parseMediaFx, d7 as serializeMediaCrop, d8 as serializeMediaCuts, d9 as serializeMediaEdits, da as serializeMediaFx } from '../Doc-C_Sh49ot.js';
|
|
3
3
|
import '../types-Zk8qYuaT.js';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/narration/index.js
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
traceWordPosAt,
|
|
32
32
|
transcriptWordKeys,
|
|
33
33
|
vadStep
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-2CB37BOU.js";
|
|
35
35
|
import "../chunk-NEWNNLWN.js";
|
|
36
36
|
import {
|
|
37
37
|
buildNarrationTimingJson,
|
|
@@ -45,12 +45,12 @@ import {
|
|
|
45
45
|
wordIndexAtChar,
|
|
46
46
|
wordIndexAtTime,
|
|
47
47
|
wordPosAtExpectedSyllables
|
|
48
|
-
} from "../chunk-
|
|
49
|
-
import "../chunk-
|
|
48
|
+
} from "../chunk-4HQ7QZKB.js";
|
|
49
|
+
import "../chunk-OFE5RZWW.js";
|
|
50
50
|
import "../chunk-FUBMT6SJ.js";
|
|
51
51
|
import "../chunk-JNUNNQ74.js";
|
|
52
52
|
import "../chunk-L7QZORLB.js";
|
|
53
|
-
import "../chunk-
|
|
53
|
+
import "../chunk-UDPPWYYM.js";
|
|
54
54
|
import "../chunk-L3KSFLTP.js";
|
|
55
55
|
import "../chunk-P53Z4RYC.js";
|
|
56
56
|
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 };
|
package/dist/recommend/index.js
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
|
+
classifyListShape,
|
|
3
|
+
pickAutoTemplate,
|
|
2
4
|
profileBlockContents,
|
|
3
|
-
recommendTemplatesForBlock
|
|
4
|
-
|
|
5
|
+
recommendTemplatesForBlock,
|
|
6
|
+
shapeIsStated,
|
|
7
|
+
unstatedShapeFallback
|
|
8
|
+
} from "../chunk-OFE5RZWW.js";
|
|
5
9
|
import "../chunk-L7QZORLB.js";
|
|
6
10
|
import "../chunk-L3KSFLTP.js";
|
|
7
11
|
import "../chunk-P53Z4RYC.js";
|
|
8
12
|
export {
|
|
13
|
+
classifyListShape,
|
|
14
|
+
pickAutoTemplate,
|
|
9
15
|
profileBlockContents,
|
|
10
|
-
recommendTemplatesForBlock
|
|
16
|
+
recommendTemplatesForBlock,
|
|
17
|
+
shapeIsStated,
|
|
18
|
+
unstatedShapeFallback
|
|
11
19
|
};
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -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 {
|
|
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,
|
|
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-
|
|
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-C_Sh49ot.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 validateCustomTemplateDefinition } from '../Doc-C_Sh49ot.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-B4VLovhW.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-
|
|
7
|
+
export { E as EditorLayerMeta, I as ImageEditCanvas, a as ImageEditDoc, b as ImageEditLayer, c as ImageEditLayerKind, d as ImageEditMeta } from '../ImageEditDoc-Sqw3Tw-R.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Runtime validation for the canonical {@link Doc} JSON shape.
|
package/dist/timing/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as AudioSegment, h as AudioTimingData, o as CaptionTrack } from '../Doc-
|
|
1
|
+
import { g as AudioSegment, h as AudioTimingData, o as CaptionTrack, U as Doc, k as Block } from '../Doc-C_Sh49ot.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 };
|
package/dist/timing/index.js
CHANGED
|
@@ -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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export { A as AUTHORED_PRESENTATION_LAYOUT, P as PRESENTATION_KEY,
|
|
1
|
+
import { U as Doc, t as ColorScheme, k as Block, bE as TemplateBlock } from '../Doc-C_Sh49ot.js';
|
|
2
|
+
import { s as PageTransformHints, u as PresentationBeatExtras, w as PresentationLayout, v as PresentationBeatLayout, x as PresentationPlan, t as PresentationBeat, g as ConceptTemplateName } from '../materializePageSection-Dmf-rf1b.js';
|
|
3
|
+
export { A as AUTHORED_PRESENTATION_LAYOUT, b as CONCEPT_TEMPLATES, P as PRESENTATION_KEY, i as PRESENTATION_LAYOUTS, j as PRESENTATION_LIMITS, E as conceptTemplate, H as parsePresentationPlan, I as presentationBeatExtras, J as presentationLayoutFits, K as presentationLayoutNeeds, L as presentationLayoutProblem, N as presentationStat, Q as serializePresentationPlan } from '../materializePageSection-Dmf-rf1b.js';
|
|
4
4
|
import { d as ExtractionType, E as ExtractedElement, b as ExtractionOptions } from '../contentExtractor-BNfVJV2U.js';
|
|
5
5
|
import { f as BuildSpec, M as MarkdownBlockNode } from '../types-Zk8qYuaT.js';
|
|
6
6
|
|
|
@@ -327,6 +327,14 @@ declare const DYNAMIC_PRESENTATION_STYLE = "dynamic-slides";
|
|
|
327
327
|
/** A short, stable name for one slide's exact source passage. Saving it rather
|
|
328
328
|
* than the passage keeps the document text out of the hints. */
|
|
329
329
|
declare function presentationPassageKey(passage: string): string;
|
|
330
|
+
/** One slide's AI wording: a layout, a headline, points, and what the layout
|
|
331
|
+
* draws beyond them (a hub's centre, a matrix's axes). */
|
|
332
|
+
interface PresentationAiSuggestion extends PresentationBeatExtras {
|
|
333
|
+
source: string;
|
|
334
|
+
layout: PresentationLayout;
|
|
335
|
+
headline: string;
|
|
336
|
+
points: string[];
|
|
337
|
+
}
|
|
330
338
|
interface PresentationBlockHint {
|
|
331
339
|
build?: BuildSpec;
|
|
332
340
|
blockId: string;
|
|
@@ -337,12 +345,7 @@ interface PresentationBlockHint {
|
|
|
337
345
|
* Changing a passage, or how the section is split, shows its slide again. */
|
|
338
346
|
hidden?: string[];
|
|
339
347
|
/** Optional AI-authored display text, keyed to the exact passage it summarizes. */
|
|
340
|
-
ai?:
|
|
341
|
-
source: string;
|
|
342
|
-
layout: PresentationLayout;
|
|
343
|
-
headline: string;
|
|
344
|
-
points: string[];
|
|
345
|
-
}>;
|
|
348
|
+
ai?: PresentationAiSuggestion[];
|
|
346
349
|
/** Explicit user wording, applied only while this section's source still matches. */
|
|
347
350
|
wording?: {
|
|
348
351
|
source: string;
|
|
@@ -516,8 +519,165 @@ declare function statedRanges(source: string): StatedRange[];
|
|
|
516
519
|
declare function rangeEndOnly(value: string | number, source: string): StatedRange | undefined;
|
|
517
520
|
|
|
518
521
|
/**
|
|
519
|
-
*
|
|
520
|
-
*
|
|
522
|
+
* Presentation author — the protocol a model follows to word a deck's slides.
|
|
523
|
+
*
|
|
524
|
+
* Squisq plans a deck from prose on its own (`createPresentationPlan`). A
|
|
525
|
+
* host with a model can improve it: the model plans every slide's layout
|
|
526
|
+
* together (the storyboard), then words each slide (a layout, a headline and
|
|
527
|
+
* points). This module is everything about that exchange that is not
|
|
528
|
+
* transport, so every host asks the same questions and holds the answers to
|
|
529
|
+
* the same standard:
|
|
530
|
+
*
|
|
531
|
+
* - what the model is told ({@link presentationSlidePrompt},
|
|
532
|
+
* {@link presentationStoryboardPrompt}), rendered from the authoring guide,
|
|
533
|
+
* so a layout added to Squisq reaches every host's prompt;
|
|
534
|
+
* - what it is sent ({@link presentationSlideRequest},
|
|
535
|
+
* {@link presentationStoryboardRequest}) and the reply shape a host that can
|
|
536
|
+
* enforce structured output pins it to ({@link PRESENTATION_SLIDE_FORMAT},
|
|
537
|
+
* {@link PRESENTATION_STORYBOARD_FORMAT});
|
|
538
|
+
* - how a reply is read ({@link readPresentationSlideReply},
|
|
539
|
+
* {@link readPresentationStoryboardReply}): the fields, the plan's own
|
|
540
|
+
* limits, then faithfulness ({@link groundPresentationBeat}). A refused
|
|
541
|
+
* reply says why, in words a correction request can quote.
|
|
542
|
+
*
|
|
543
|
+
* The model chooses display wording and a layout, nothing else: source spans,
|
|
544
|
+
* order, media and timing stay the plan's. The host makes the calls (one for
|
|
545
|
+
* the storyboard, one per slide, a retry with {@link presentationCorrection})
|
|
546
|
+
* and keeps the automatic slide whenever a reply is refused.
|
|
547
|
+
*
|
|
548
|
+
* Related: `presentationPlanner.ts` (the automatic deck), `grounding.ts` (the
|
|
549
|
+
* fact checks), `recommend/listShape.ts` (whether a shape is stated),
|
|
550
|
+
* `doc/templates/authoringGuide.ts` (the layout guide and the craft).
|
|
551
|
+
*/
|
|
552
|
+
|
|
553
|
+
/** What a host needs to size its requests; none of it is enforced here. */
|
|
554
|
+
declare const PRESENTATION_AUTHOR_LIMITS: {
|
|
555
|
+
/** A passage longer than this keeps its automatic slide: it would not fit a small model. */
|
|
556
|
+
readonly passageCharacters: 2400;
|
|
557
|
+
/** A reply longer than this is not a slide. */
|
|
558
|
+
readonly replyCharacters: 6000;
|
|
559
|
+
/** Output tokens that hold any valid slide. */
|
|
560
|
+
readonly slideTokens: 550;
|
|
561
|
+
readonly temperature: 0.3;
|
|
562
|
+
/** A deck of at least this many slides to word is storyboarded first… */
|
|
563
|
+
readonly storyboardMinimum: 3;
|
|
564
|
+
/** …and one of more than this many is not: a small model cannot see it at once. */
|
|
565
|
+
readonly storyboardLimit: 16;
|
|
566
|
+
/** How much of each passage the storyboard sees: enough to recognize its shape. */
|
|
567
|
+
readonly storyboardGist: 240;
|
|
568
|
+
};
|
|
569
|
+
/** Output tokens that hold a storyboard of `slides` layouts. */
|
|
570
|
+
declare function presentationStoryboardTokens(slides: number): number;
|
|
571
|
+
/** A reply shape for hosts that can enforce structured output (a JSON schema). */
|
|
572
|
+
interface PresentationAuthorFormat {
|
|
573
|
+
name: string;
|
|
574
|
+
schema: Record<string, unknown>;
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* One slide's wording. Without enforcement some small models answer with a
|
|
578
|
+
* key per layout name; with it, a reply can only be these fields.
|
|
579
|
+
*/
|
|
580
|
+
declare const PRESENTATION_SLIDE_FORMAT: PresentationAuthorFormat;
|
|
581
|
+
declare const PRESENTATION_STORYBOARD_FORMAT: PresentationAuthorFormat;
|
|
582
|
+
/** The system prompt for wording one slide. */
|
|
583
|
+
declare function presentationSlidePrompt(): string;
|
|
584
|
+
/** The system prompt for planning every slide's layout together. */
|
|
585
|
+
declare function presentationStoryboardPrompt(): string;
|
|
586
|
+
/** Whether a passage addresses a model rather than a reader. */
|
|
587
|
+
declare function addressesAModel(passage: string): boolean;
|
|
588
|
+
/**
|
|
589
|
+
* The slides a model is asked about, by index. An authored section keeps its
|
|
590
|
+
* own block and a hidden slide is not shown; a passage too long for a small
|
|
591
|
+
* model, or one that addresses the model, keeps its automatic slide.
|
|
592
|
+
*/
|
|
593
|
+
declare function presentationSlidesToWord(plan: PresentationPlan): number[];
|
|
594
|
+
/** Whether a deck with these slides to word is storyboarded first. */
|
|
595
|
+
declare function presentationUsesStoryboard(asked: readonly number[]): boolean;
|
|
596
|
+
/** The user message that asks for a storyboard of the slides at `asked`. */
|
|
597
|
+
declare function presentationStoryboardRequest(plan: PresentationPlan, asked: readonly number[]): string;
|
|
598
|
+
/**
|
|
599
|
+
* The layout a storyboard reply plans for each asked slide. Empty when the
|
|
600
|
+
* reply does not name one layout per slide; a picture keeps its image slide,
|
|
601
|
+
* and no other slide becomes one.
|
|
602
|
+
*/
|
|
603
|
+
declare function readPresentationStoryboardReply(text: string, plan: PresentationPlan, asked: readonly number[]): Map<number, PresentationLayout>;
|
|
604
|
+
interface PresentationSlideContext {
|
|
605
|
+
/** The layout the storyboard planned for this slide. */
|
|
606
|
+
planned?: PresentationLayout;
|
|
607
|
+
/**
|
|
608
|
+
* Without a storyboard, the layouts of the slides just before (as they now
|
|
609
|
+
* stand), so the model can vary the deck.
|
|
610
|
+
*/
|
|
611
|
+
previous?: readonly string[];
|
|
612
|
+
/** Why the prior reply for this slide was refused (`presentationCorrection`). */
|
|
613
|
+
correction?: string;
|
|
614
|
+
}
|
|
615
|
+
/** The user message that asks for one slide's wording. */
|
|
616
|
+
declare function presentationSlideRequest(plan: PresentationPlan, index: number, context?: PresentationSlideContext): string;
|
|
617
|
+
/**
|
|
618
|
+
* What to tell the model after a refused reply: what was wrong, then the
|
|
619
|
+
* rules it bears on. A layout the passage cannot fill is answered by asking
|
|
620
|
+
* for another one, since the same layout would be refused again.
|
|
621
|
+
*/
|
|
622
|
+
declare function presentationCorrection(problem: string, kind?: PresentationRefusal): string;
|
|
623
|
+
/**
|
|
624
|
+
* The context for a second request after `read` was refused: the correction,
|
|
625
|
+
* and no planned layout when the planned one is what could not be filled
|
|
626
|
+
* (told to use it "unless the passage cannot fill it", a small model tries it again).
|
|
627
|
+
*/
|
|
628
|
+
declare function presentationRetryContext(context: PresentationSlideContext, read: PresentationSlideReply): PresentationSlideContext;
|
|
629
|
+
interface GroundedPresentationBeat {
|
|
630
|
+
/** The beat as it may be shown, or null when it cannot be shown at all. */
|
|
631
|
+
beat: PresentationBeat | null;
|
|
632
|
+
/** Why it cannot be shown: an invented number, words the passage does not use. */
|
|
633
|
+
problem?: string;
|
|
634
|
+
/** What was changed to keep it faithful (a shape the passage does not state, drawn as cards). */
|
|
635
|
+
notes: string[];
|
|
636
|
+
}
|
|
637
|
+
interface GroundPresentationBeatOptions {
|
|
638
|
+
/** The heading over the passage, which may state its shape ("The water cycle"). */
|
|
639
|
+
heading?: string;
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* Hold a model-worded slide to its passage. Points may condense the passage
|
|
643
|
+
* but not add to it; the headline may paraphrase freely but cannot invent a
|
|
644
|
+
* number; a key figure the passage gives only as one end of a range must show
|
|
645
|
+
* the whole range. Those refuse the slide.
|
|
646
|
+
*
|
|
647
|
+
* A layout that asserts a relationship the passage does not state (a cycle
|
|
648
|
+
* that never comes round, a pyramid without a hierarchy) is not refused: its
|
|
649
|
+
* wording is good, only its claim is not, so it is drawn as cards or a
|
|
650
|
+
* process instead. A hub centre or an axis name with words the source does
|
|
651
|
+
* not use is dropped the same way.
|
|
652
|
+
*/
|
|
653
|
+
declare function groundPresentationBeat(beat: PresentationBeat, passage: string, options?: GroundPresentationBeatOptions): GroundedPresentationBeat;
|
|
654
|
+
/**
|
|
655
|
+
* What was wrong with a refused reply: it was not the JSON asked for
|
|
656
|
+
* (`reply`), its layout cannot be filled from what it wrote (`layout`), or it
|
|
657
|
+
* says something the passage does not (`facts`).
|
|
658
|
+
*/
|
|
659
|
+
type PresentationRefusal = 'reply' | 'layout' | 'facts';
|
|
660
|
+
interface PresentationSlideReply {
|
|
661
|
+
/** The slide to show, or null when the automatic one is kept. */
|
|
662
|
+
beat: PresentationBeat | null;
|
|
663
|
+
/** Why the reply was refused, for a log and for `presentationCorrection`. */
|
|
664
|
+
problem?: string;
|
|
665
|
+
/** What kind of problem it was, which decides how to ask again. */
|
|
666
|
+
kind?: PresentationRefusal;
|
|
667
|
+
/** What was changed to keep an accepted slide faithful. */
|
|
668
|
+
notes: string[];
|
|
669
|
+
}
|
|
670
|
+
/**
|
|
671
|
+
* Read a model's reply for the slide at `index`. The reply is refused (the
|
|
672
|
+
* automatic slide stands) when it is not the JSON asked for, breaks the
|
|
673
|
+
* plan's limits, cannot fill its layout, or fails {@link groundPresentationBeat}.
|
|
674
|
+
*/
|
|
675
|
+
declare function readPresentationSlideReply(text: string, plan: PresentationPlan, index: number): PresentationSlideReply;
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* Concept reveals: a concept slide (`cards`, `process`, `cycle`, `layers`,
|
|
679
|
+
* `stats`, `pyramid`, `funnel`, `hub`, `venn`, `matrix`) that shows its ideas
|
|
680
|
+
* one at a time, each as the narration reaches it.
|
|
521
681
|
*
|
|
522
682
|
* Two steps, so any host with narration can use them: find where in the
|
|
523
683
|
* script each idea is spoken ({@link matchPointsToSentences}), then turn
|
|
@@ -535,10 +695,7 @@ declare function rangeEndOnly(value: string | number, source: string): StatedRan
|
|
|
535
695
|
* (`resolveBuildTimeline`), `transform/presentationCompiler.ts`.
|
|
536
696
|
*/
|
|
537
697
|
|
|
538
|
-
|
|
539
|
-
type ConceptTemplate = (typeof CONCEPT_TEMPLATES)[number];
|
|
540
|
-
/** The concept template a name denotes, or `undefined`. */
|
|
541
|
-
declare function conceptTemplate(template: string): ConceptTemplate | undefined;
|
|
698
|
+
type ConceptTemplate = ConceptTemplateName;
|
|
542
699
|
/**
|
|
543
700
|
* Where in `sourceText[start, end)` each point is spoken: the offset of the
|
|
544
701
|
* sentence it shares the most words with (at least two). Points must land
|
|
@@ -558,4 +715,4 @@ declare function conceptBuildSpec(): BuildSpec;
|
|
|
558
715
|
*/
|
|
559
716
|
declare function conceptRevealTiming(template: ConceptTemplate, items: readonly string[], itemTimes: readonly number[] | undefined, start: number, end: number): Pick<Block, 'build' | 'buildTiming'>;
|
|
560
717
|
|
|
561
|
-
export { type AnalyzedBlock, type BlockImage,
|
|
718
|
+
export { type AnalyzedBlock, type BlockImage, type ConceptTemplate, DEFAULT_TRANSFORM_STYLE_ID, DYNAMIC_PRESENTATION_STYLE, type GroundPresentationBeatOptions, type GroundedPresentationBeat, type NarratedSegmentInput, type NarratedSegmentResult, type NarratedSegmentTransformOptions, type NarratedSegmentVideo, PRESENTATION_AUTHOR_LIMITS, PRESENTATION_HINTS_KEY, PRESENTATION_SLIDE_FORMAT, PRESENTATION_STORYBOARD_FORMAT, type ParaphraseOptions, type PresentationAiSuggestion, type PresentationAuthorFormat, PresentationBeat, PresentationBeatExtras, PresentationBeatLayout, type PresentationBlockHint, type PresentationHints, PresentationLayout, type PresentationMediaItem, PresentationPlan, type PresentationRefusal, type PresentationSlideContext, type PresentationSlideReply, type StatedRange, type TransformImage, type TransformOptions, type TransformResult, type TransformStyleConfig, type TransformStyleId, type TransformStyleInput, type TransformStyleRegistry, type TransformStyleSummary, type VerbatimQuoteOptions, addressesAModel, allocateTiming, analyzeBlocks, applySavedPresentation, applyTransform, collectPresentationMedia, compilePresentationPlan, conceptBuildSpec, conceptRevealTiming, createPresentationPlan, createTransformStyleRegistry, defaultPresentationHints, distinctiveStems, extractDocImages, getTransformStyleIds, getTransformStyleSummaries, groundPresentationBeat, groundingSentences, isGroundedParaphrase, isVerbatimQuote, matchPointsToSentences, normalizeGroundingText, numbersIn, parsePresentationHints, presentationCorrection, presentationPassageKey, presentationRetryContext, presentationSections, presentationSlidePrompt, presentationSlideRequest, presentationSlidesToWord, presentationStoryboardPrompt, presentationStoryboardRequest, presentationStoryboardTokens, presentationUsesStoryboard, rangeEndOnly, readPresentationSlideReply, readPresentationStoryboardReply, resolveTransformStyle, restatesHeadline, serializePresentationHints, sourceNumbers, spelledNumbers, statedRanges, transformNarratedSegment, ungroundedNumber, usesDynamicPresentation };
|