@bendyline/squisq 2.11.5 → 2.11.6
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/chunk-44BJ42GT.js +165 -0
- package/dist/chunk-764WHWKM.js +332 -0
- package/dist/{chunk-XV4SF2N5.js → chunk-BUJ5RV2P.js} +1 -1
- package/dist/{chunk-67L6WRJN.js → chunk-GHOPHGOK.js} +28 -1
- package/dist/{chunk-NUS5YAI5.js → chunk-GRGLZF4A.js} +13 -12
- package/dist/{chunk-ZSU5DJLX.js → chunk-J2IPSQKP.js} +104 -4
- package/dist/{chunk-NKNMGIIN.js → chunk-SVN7T6BK.js} +0 -3
- package/dist/{chunk-2P44EZLI.js → chunk-UUI35INI.js} +4 -2
- package/dist/{chunk-DQRELU4S.js → chunk-VU4T74LI.js} +1 -1
- package/dist/{chunk-AIB5WEK2.js → chunk-WAGJK36Q.js} +17 -344
- package/dist/{chunk-RXYKU6EX.js → chunk-Y4D6TDZT.js} +212 -3
- package/dist/chunk-ZP5F7LUH.js +223 -0
- package/dist/doc/index.js +8 -10
- package/dist/generate/index.d.ts +61 -1
- package/dist/generate/index.js +14 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +56 -38
- package/dist/jsonForm/index.js +3 -4
- package/dist/narration/index.js +5 -6
- package/dist/schemas/index.js +17 -19
- package/dist/timing/index.d.ts +29 -1
- package/dist/timing/index.js +6 -4
- package/dist/transform/index.d.ts +63 -2
- package/dist/transform/index.js +17 -6
- package/package.json +1 -1
- package/dist/chunk-BAOV476U.js +0 -214
- package/dist/chunk-XOFT65EX.js +0 -34
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
recordSlideShown,
|
|
28
28
|
traceWordPosAt,
|
|
29
29
|
vadStep
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-UUI35INI.js";
|
|
31
31
|
import {
|
|
32
32
|
fenceRendererLangs
|
|
33
33
|
} from "./chunk-PGI7HSWE.js";
|
|
@@ -47,21 +47,30 @@ import {
|
|
|
47
47
|
readProofingSettings,
|
|
48
48
|
resolveProofDialect
|
|
49
49
|
} from "./chunk-B3AK7SLZ.js";
|
|
50
|
+
import {
|
|
51
|
+
calculateKeywordAffinity,
|
|
52
|
+
extractKeywords,
|
|
53
|
+
matchByKeywordAffinity,
|
|
54
|
+
selectSafeZoneClips,
|
|
55
|
+
selectTranscriptClips
|
|
56
|
+
} from "./chunk-ZP5F7LUH.js";
|
|
50
57
|
import {
|
|
51
58
|
DEFAULT_TRANSFORM_STYLE_ID,
|
|
59
|
+
allocateTiming,
|
|
52
60
|
analyzeBlocks,
|
|
53
61
|
applyTransform,
|
|
54
62
|
createTransformStyleRegistry,
|
|
55
63
|
extractDocImages,
|
|
56
64
|
getTransformStyleIds,
|
|
57
65
|
getTransformStyleSummaries,
|
|
58
|
-
resolveTransformStyle
|
|
59
|
-
|
|
66
|
+
resolveTransformStyle,
|
|
67
|
+
transformNarratedSegment
|
|
68
|
+
} from "./chunk-J2IPSQKP.js";
|
|
60
69
|
import {
|
|
61
70
|
extractContent,
|
|
62
71
|
mapElementToBlock,
|
|
63
72
|
stripMarkdown
|
|
64
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-SVN7T6BK.js";
|
|
65
74
|
import {
|
|
66
75
|
DATA_BACKUP_PREFIX,
|
|
67
76
|
DocumentVersionManager,
|
|
@@ -94,7 +103,7 @@ import {
|
|
|
94
103
|
resolveRef,
|
|
95
104
|
setByPointer,
|
|
96
105
|
toPointer
|
|
97
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-VU4T74LI.js";
|
|
98
107
|
import {
|
|
99
108
|
IMAGE_EDIT_ASSETS_PREFIX,
|
|
100
109
|
IMAGE_EDIT_DEFAULT_BASENAME,
|
|
@@ -142,7 +151,7 @@ import {
|
|
|
142
151
|
pipStyleVars,
|
|
143
152
|
serializeTheme,
|
|
144
153
|
validateDocSchema
|
|
145
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-BUJ5RV2P.js";
|
|
146
155
|
import {
|
|
147
156
|
calculateBearing,
|
|
148
157
|
decodeGeohash,
|
|
@@ -227,7 +236,17 @@ import {
|
|
|
227
236
|
validateMarkdownDoc,
|
|
228
237
|
validateMarkdownSource,
|
|
229
238
|
writeDashboardLayoutsToFrontmatter
|
|
230
|
-
} from "./chunk-
|
|
239
|
+
} from "./chunk-GRGLZF4A.js";
|
|
240
|
+
import {
|
|
241
|
+
buildNarrationScript,
|
|
242
|
+
buildNarrationTimingJson,
|
|
243
|
+
estimateSyllables,
|
|
244
|
+
expectedSyllablesAt,
|
|
245
|
+
parseNarrationTimingJson,
|
|
246
|
+
wordIndexAtChar,
|
|
247
|
+
wordIndexAtTime,
|
|
248
|
+
wordPosAtExpectedSyllables
|
|
249
|
+
} from "./chunk-764WHWKM.js";
|
|
231
250
|
import {
|
|
232
251
|
ASCII_CHAR_H,
|
|
233
252
|
ASCII_CHAR_W,
|
|
@@ -251,8 +270,6 @@ import {
|
|
|
251
270
|
asciiTimelineToTemplateData,
|
|
252
271
|
autoTemplatePreservesContent,
|
|
253
272
|
bigText,
|
|
254
|
-
buildNarrationScript,
|
|
255
|
-
buildNarrationTimingJson,
|
|
256
273
|
buildRegistry,
|
|
257
274
|
canvasToAsciiCell,
|
|
258
275
|
coerceTemplateParams,
|
|
@@ -270,11 +287,9 @@ import {
|
|
|
270
287
|
deriveTemplateInputs,
|
|
271
288
|
diagramBlock,
|
|
272
289
|
drawingBlock,
|
|
273
|
-
estimateSyllables,
|
|
274
290
|
expandCoverBlock,
|
|
275
291
|
expandDocBlocks,
|
|
276
292
|
expandPersistentLayers,
|
|
277
|
-
expectedSyllablesAt,
|
|
278
293
|
extractBlockquoteText,
|
|
279
294
|
extractBodyPlainText,
|
|
280
295
|
extractEmbeddedVideos,
|
|
@@ -319,7 +334,6 @@ import {
|
|
|
319
334
|
materializeBlockLayers,
|
|
320
335
|
normalizeShapeKind,
|
|
321
336
|
parseDataFence,
|
|
322
|
-
parseNarrationTimingJson,
|
|
323
337
|
parseYamlSubset,
|
|
324
338
|
photoGrid,
|
|
325
339
|
pullQuote,
|
|
@@ -351,13 +365,10 @@ import {
|
|
|
351
365
|
twoColumn,
|
|
352
366
|
videoPullQuote,
|
|
353
367
|
videoWithCaption,
|
|
354
|
-
wordIndexAtChar,
|
|
355
|
-
wordIndexAtTime,
|
|
356
|
-
wordPosAtExpectedSyllables,
|
|
357
368
|
wrapWithPersistentLayers,
|
|
358
369
|
writeCustomTemplatesToFrontmatter,
|
|
359
370
|
writeCustomThemesToFrontmatter
|
|
360
|
-
} from "./chunk-
|
|
371
|
+
} from "./chunk-WAGJK36Q.js";
|
|
361
372
|
import {
|
|
362
373
|
PATH_SHAPE_KINDS,
|
|
363
374
|
anchorPoint,
|
|
@@ -411,8 +422,10 @@ import {
|
|
|
411
422
|
import {
|
|
412
423
|
AVAILABLE_FONT_STACKS,
|
|
413
424
|
DARK_SURFACE,
|
|
425
|
+
DEFAULT_DOC_FONT,
|
|
414
426
|
DEFAULT_THEME,
|
|
415
427
|
DEFAULT_THEME_ID,
|
|
428
|
+
DEFAULT_TITLE_FONT,
|
|
416
429
|
FONT_FALLBACKS,
|
|
417
430
|
FRONTMATTER_CUSTOM_TEMPLATES_KEY,
|
|
418
431
|
FRONTMATTER_CUSTOM_THEMES_KEY,
|
|
@@ -437,21 +450,32 @@ import {
|
|
|
437
450
|
PAGE_SHADOWS,
|
|
438
451
|
THEMES,
|
|
439
452
|
THEME_SCHEMA_VERSION,
|
|
453
|
+
VIEWPORT_PRESETS,
|
|
440
454
|
applySurface,
|
|
441
455
|
assertTheme,
|
|
442
456
|
buildGoogleFontsUrl,
|
|
457
|
+
calculateFontScale,
|
|
443
458
|
contrastRatio,
|
|
459
|
+
createTemplateContext,
|
|
444
460
|
createTheme,
|
|
445
461
|
createThemeRegistry,
|
|
446
462
|
deriveScale,
|
|
447
463
|
fontStack,
|
|
464
|
+
getAspectRatioString,
|
|
448
465
|
getAvailableThemes,
|
|
449
466
|
getFontStack,
|
|
467
|
+
getLayoutHints,
|
|
468
|
+
getSafeTextBounds,
|
|
450
469
|
getThemeSummaries,
|
|
470
|
+
getTwoColumnPositions,
|
|
471
|
+
getViewport,
|
|
472
|
+
getViewportOrientation,
|
|
451
473
|
guessFontFallback,
|
|
452
474
|
hexHueDegrees,
|
|
453
475
|
isCustomTemplateDefinition,
|
|
454
476
|
isHex,
|
|
477
|
+
isPersistentLayerTemplate,
|
|
478
|
+
isTemplateBlock,
|
|
455
479
|
matchFontFamily,
|
|
456
480
|
oklchDarken,
|
|
457
481
|
oklchLighten,
|
|
@@ -460,27 +484,12 @@ import {
|
|
|
460
484
|
relativeLuminance,
|
|
461
485
|
resolveFontFamily,
|
|
462
486
|
resolveTheme,
|
|
487
|
+
scaledFontSize,
|
|
488
|
+
scaledFontSize2,
|
|
463
489
|
validateCustomTemplateDefinition,
|
|
464
490
|
validateTheme,
|
|
465
491
|
withAlpha
|
|
466
|
-
} from "./chunk-
|
|
467
|
-
import {
|
|
468
|
-
DEFAULT_DOC_FONT,
|
|
469
|
-
DEFAULT_TITLE_FONT,
|
|
470
|
-
VIEWPORT_PRESETS,
|
|
471
|
-
calculateFontScale,
|
|
472
|
-
createTemplateContext,
|
|
473
|
-
getAspectRatioString,
|
|
474
|
-
getLayoutHints,
|
|
475
|
-
getSafeTextBounds,
|
|
476
|
-
getTwoColumnPositions,
|
|
477
|
-
getViewport,
|
|
478
|
-
getViewportOrientation,
|
|
479
|
-
isPersistentLayerTemplate,
|
|
480
|
-
isTemplateBlock,
|
|
481
|
-
scaledFontSize,
|
|
482
|
-
scaledFontSize2
|
|
483
|
-
} from "./chunk-BAOV476U.js";
|
|
492
|
+
} from "./chunk-Y4D6TDZT.js";
|
|
484
493
|
import {
|
|
485
494
|
LocalForageAdapter,
|
|
486
495
|
LocalStorageAdapter,
|
|
@@ -576,17 +585,18 @@ import {
|
|
|
576
585
|
resolveTransitionDuration
|
|
577
586
|
} from "./chunk-4VOD55SX.js";
|
|
578
587
|
import {
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
} from "./chunk-XOFT65EX.js";
|
|
588
|
+
buildCaptionTrack
|
|
589
|
+
} from "./chunk-44BJ42GT.js";
|
|
582
590
|
import {
|
|
583
591
|
DEFAULT_WORDS_PER_SECOND,
|
|
584
592
|
calculatePrefixDuration,
|
|
585
593
|
countSpokenWords,
|
|
586
594
|
estimateNarrationDuration,
|
|
595
|
+
estimateNarrationTime,
|
|
596
|
+
estimateReadingTime,
|
|
587
597
|
estimateSpokenWordCount,
|
|
588
598
|
estimateTimeFromText
|
|
589
|
-
} from "./chunk-
|
|
599
|
+
} from "./chunk-GHOPHGOK.js";
|
|
590
600
|
import {
|
|
591
601
|
SeededRandom,
|
|
592
602
|
hashString
|
|
@@ -706,6 +716,7 @@ export {
|
|
|
706
716
|
adjustY,
|
|
707
717
|
advanceCoverage,
|
|
708
718
|
alignNarration,
|
|
719
|
+
allocateTiming,
|
|
709
720
|
analyzeBlocks,
|
|
710
721
|
anchorPoint,
|
|
711
722
|
appendPointer,
|
|
@@ -729,6 +740,7 @@ export {
|
|
|
729
740
|
bigText,
|
|
730
741
|
blankProtectedSpans,
|
|
731
742
|
buildAdvanceTimingJson,
|
|
743
|
+
buildCaptionTrack,
|
|
732
744
|
buildDashboardCellChrome,
|
|
733
745
|
buildDataBackupPath,
|
|
734
746
|
buildGoogleFontsUrl,
|
|
@@ -747,6 +759,7 @@ export {
|
|
|
747
759
|
calculateBearing,
|
|
748
760
|
calculateDuration,
|
|
749
761
|
calculateFontScale,
|
|
762
|
+
calculateKeywordAffinity,
|
|
750
763
|
calculatePrefixDuration,
|
|
751
764
|
canonicalIconToken,
|
|
752
765
|
canvasToAsciiCell,
|
|
@@ -833,6 +846,7 @@ export {
|
|
|
833
846
|
extractFirstImage,
|
|
834
847
|
extractFrameFeatures,
|
|
835
848
|
extractImages,
|
|
849
|
+
extractKeywords,
|
|
836
850
|
extractListItems,
|
|
837
851
|
extractPlainText,
|
|
838
852
|
extractRichListItems,
|
|
@@ -951,6 +965,7 @@ export {
|
|
|
951
965
|
markdownBlockSeparatorLines,
|
|
952
966
|
markdownToDoc,
|
|
953
967
|
markerPath,
|
|
968
|
+
matchByKeywordAffinity,
|
|
954
969
|
matchFontFamily,
|
|
955
970
|
matchTrailingPandocAttr,
|
|
956
971
|
matchTrailingTemplateAnnotation,
|
|
@@ -1064,6 +1079,8 @@ export {
|
|
|
1064
1079
|
scoreTextSimilarity,
|
|
1065
1080
|
sectionExtractors,
|
|
1066
1081
|
sectionHeader,
|
|
1082
|
+
selectSafeZoneClips,
|
|
1083
|
+
selectTranscriptClips,
|
|
1067
1084
|
serializePandocAttributes,
|
|
1068
1085
|
serializeTheme,
|
|
1069
1086
|
setByPointer,
|
|
@@ -1098,6 +1115,7 @@ export {
|
|
|
1098
1115
|
tokenizeAttrTokens,
|
|
1099
1116
|
touch,
|
|
1100
1117
|
traceWordPosAt,
|
|
1118
|
+
transformNarratedSegment,
|
|
1101
1119
|
transposeCells,
|
|
1102
1120
|
treeBlock,
|
|
1103
1121
|
treeFromMarkdownList,
|
package/dist/jsonForm/index.js
CHANGED
|
@@ -15,11 +15,10 @@ import {
|
|
|
15
15
|
resolveRef,
|
|
16
16
|
setByPointer,
|
|
17
17
|
toPointer
|
|
18
|
-
} from "../chunk-
|
|
19
|
-
import "../chunk-
|
|
18
|
+
} from "../chunk-VU4T74LI.js";
|
|
19
|
+
import "../chunk-BUJ5RV2P.js";
|
|
20
20
|
import "../chunk-GAZKTT4R.js";
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-BAOV476U.js";
|
|
21
|
+
import "../chunk-Y4D6TDZT.js";
|
|
23
22
|
import "../chunk-4VOD55SX.js";
|
|
24
23
|
export {
|
|
25
24
|
appendPointer,
|
package/dist/narration/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
recordSlideShown,
|
|
28
28
|
traceWordPosAt,
|
|
29
29
|
vadStep
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-UUI35INI.js";
|
|
31
31
|
import {
|
|
32
32
|
buildNarrationScript,
|
|
33
33
|
buildNarrationTimingJson,
|
|
@@ -37,16 +37,15 @@ import {
|
|
|
37
37
|
wordIndexAtChar,
|
|
38
38
|
wordIndexAtTime,
|
|
39
39
|
wordPosAtExpectedSyllables
|
|
40
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-764WHWKM.js";
|
|
41
|
+
import "../chunk-WAGJK36Q.js";
|
|
41
42
|
import "../chunk-PUS54YU6.js";
|
|
42
43
|
import "../chunk-C3NAY5YP.js";
|
|
43
|
-
import "../chunk-
|
|
44
|
-
import "../chunk-BAOV476U.js";
|
|
44
|
+
import "../chunk-Y4D6TDZT.js";
|
|
45
45
|
import "../chunk-TMOHAFYE.js";
|
|
46
46
|
import "../chunk-X7BNDUNI.js";
|
|
47
47
|
import "../chunk-4VOD55SX.js";
|
|
48
|
-
import "../chunk-
|
|
49
|
-
import "../chunk-67L6WRJN.js";
|
|
48
|
+
import "../chunk-GHOPHGOK.js";
|
|
50
49
|
import "../chunk-XRW6P7IF.js";
|
|
51
50
|
export {
|
|
52
51
|
DEFAULT_ALIGN_CONFIG,
|
package/dist/schemas/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
pipStyleVars,
|
|
14
14
|
serializeTheme,
|
|
15
15
|
validateDocSchema
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-BUJ5RV2P.js";
|
|
17
17
|
import {
|
|
18
18
|
defaultPageStyle,
|
|
19
19
|
getDocPlaybackDuration,
|
|
@@ -22,8 +22,10 @@ import {
|
|
|
22
22
|
import {
|
|
23
23
|
AVAILABLE_FONT_STACKS,
|
|
24
24
|
DARK_SURFACE,
|
|
25
|
+
DEFAULT_DOC_FONT,
|
|
25
26
|
DEFAULT_THEME,
|
|
26
27
|
DEFAULT_THEME_ID,
|
|
28
|
+
DEFAULT_TITLE_FONT,
|
|
27
29
|
FONT_FALLBACKS,
|
|
28
30
|
FRONTMATTER_CUSTOM_TEMPLATES_KEY,
|
|
29
31
|
FRONTMATTER_CUSTOM_THEMES_KEY,
|
|
@@ -48,21 +50,32 @@ import {
|
|
|
48
50
|
PAGE_SHADOWS,
|
|
49
51
|
THEMES,
|
|
50
52
|
THEME_SCHEMA_VERSION,
|
|
53
|
+
VIEWPORT_PRESETS,
|
|
51
54
|
applySurface,
|
|
52
55
|
assertTheme,
|
|
53
56
|
buildGoogleFontsUrl,
|
|
57
|
+
calculateFontScale,
|
|
54
58
|
contrastRatio,
|
|
59
|
+
createTemplateContext,
|
|
55
60
|
createTheme,
|
|
56
61
|
createThemeRegistry,
|
|
57
62
|
deriveScale,
|
|
58
63
|
fontStack,
|
|
64
|
+
getAspectRatioString,
|
|
59
65
|
getAvailableThemes,
|
|
60
66
|
getFontStack,
|
|
67
|
+
getLayoutHints,
|
|
68
|
+
getSafeTextBounds,
|
|
61
69
|
getThemeSummaries,
|
|
70
|
+
getTwoColumnPositions,
|
|
71
|
+
getViewport,
|
|
72
|
+
getViewportOrientation,
|
|
62
73
|
guessFontFallback,
|
|
63
74
|
hexHueDegrees,
|
|
64
75
|
isCustomTemplateDefinition,
|
|
65
76
|
isHex,
|
|
77
|
+
isPersistentLayerTemplate,
|
|
78
|
+
isTemplateBlock,
|
|
66
79
|
matchFontFamily,
|
|
67
80
|
oklchDarken,
|
|
68
81
|
oklchLighten,
|
|
@@ -71,27 +84,12 @@ import {
|
|
|
71
84
|
relativeLuminance,
|
|
72
85
|
resolveFontFamily,
|
|
73
86
|
resolveTheme,
|
|
87
|
+
scaledFontSize,
|
|
88
|
+
scaledFontSize2,
|
|
74
89
|
validateCustomTemplateDefinition,
|
|
75
90
|
validateTheme,
|
|
76
91
|
withAlpha
|
|
77
|
-
} from "../chunk-
|
|
78
|
-
import {
|
|
79
|
-
DEFAULT_DOC_FONT,
|
|
80
|
-
DEFAULT_TITLE_FONT,
|
|
81
|
-
VIEWPORT_PRESETS,
|
|
82
|
-
calculateFontScale,
|
|
83
|
-
createTemplateContext,
|
|
84
|
-
getAspectRatioString,
|
|
85
|
-
getLayoutHints,
|
|
86
|
-
getSafeTextBounds,
|
|
87
|
-
getTwoColumnPositions,
|
|
88
|
-
getViewport,
|
|
89
|
-
getViewportOrientation,
|
|
90
|
-
isPersistentLayerTemplate,
|
|
91
|
-
isTemplateBlock,
|
|
92
|
-
scaledFontSize,
|
|
93
|
-
scaledFontSize2
|
|
94
|
-
} from "../chunk-BAOV476U.js";
|
|
92
|
+
} from "../chunk-Y4D6TDZT.js";
|
|
95
93
|
import {
|
|
96
94
|
DEFAULT_TRANSITION_DURATION_SECONDS,
|
|
97
95
|
TRANSITION_DIRECTIONS,
|
package/dist/timing/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { g as AudioSegment, h as AudioTimingData, n as CaptionTrack } from '../Doc-BkxT7G80.js';
|
|
2
|
+
import '../types-Be6sBUBx.js';
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* Narration timing estimation.
|
|
3
6
|
*
|
|
@@ -105,4 +108,29 @@ interface NarrationTimeOptions {
|
|
|
105
108
|
*/
|
|
106
109
|
declare function estimateNarrationTime(text: string, options?: NarrationTimeOptions): NarrationTimeEstimate;
|
|
107
110
|
|
|
108
|
-
|
|
111
|
+
/**
|
|
112
|
+
* Caption Track Construction
|
|
113
|
+
*
|
|
114
|
+
* Converts narration segment text and optional word/bookmark timing into the
|
|
115
|
+
* canonical Doc CaptionTrack. Hosts retain responsibility for mapping their
|
|
116
|
+
* domain model and timing sidecars into CaptionSegmentSource records.
|
|
117
|
+
*/
|
|
118
|
+
|
|
119
|
+
interface CaptionSegmentSource {
|
|
120
|
+
segment: AudioSegment;
|
|
121
|
+
text?: string | null;
|
|
122
|
+
spokenPrefix?: string;
|
|
123
|
+
timing?: AudioTimingData | null;
|
|
124
|
+
}
|
|
125
|
+
interface BuildCaptionTrackOptions {
|
|
126
|
+
version?: number;
|
|
127
|
+
generatedAt?: string;
|
|
128
|
+
targetWordsPerPhrase?: number;
|
|
129
|
+
minPhraseDuration?: number;
|
|
130
|
+
maxPhraseDuration?: number;
|
|
131
|
+
wordsPerSecond?: number;
|
|
132
|
+
closePhraseGaps?: boolean;
|
|
133
|
+
}
|
|
134
|
+
declare function buildCaptionTrack(sources: CaptionSegmentSource[], options?: BuildCaptionTrackOptions): CaptionTrack;
|
|
135
|
+
|
|
136
|
+
export { type BuildCaptionTrackOptions, type CaptionSegmentSource, DEFAULT_WORDS_PER_SECOND, type NarrationTimeEstimate, type NarrationTimeOptions, type ReadingTimeEstimate, type ReadingTimeOptions, buildCaptionTrack, calculatePrefixDuration, countSpokenWords, estimateNarrationDuration, estimateNarrationTime, estimateReadingTime, estimateSpokenWordCount, estimateTimeFromText };
|
package/dist/timing/index.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "../chunk-XOFT65EX.js";
|
|
2
|
+
buildCaptionTrack
|
|
3
|
+
} from "../chunk-44BJ42GT.js";
|
|
5
4
|
import {
|
|
6
5
|
DEFAULT_WORDS_PER_SECOND,
|
|
7
6
|
calculatePrefixDuration,
|
|
8
7
|
countSpokenWords,
|
|
9
8
|
estimateNarrationDuration,
|
|
9
|
+
estimateNarrationTime,
|
|
10
|
+
estimateReadingTime,
|
|
10
11
|
estimateSpokenWordCount,
|
|
11
12
|
estimateTimeFromText
|
|
12
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-GHOPHGOK.js";
|
|
13
14
|
export {
|
|
14
15
|
DEFAULT_WORDS_PER_SECOND,
|
|
16
|
+
buildCaptionTrack,
|
|
15
17
|
calculatePrefixDuration,
|
|
16
18
|
countSpokenWords,
|
|
17
19
|
estimateNarrationDuration,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { O as Doc, r as ColorScheme, k as Block, bb as TemplateBlock } from '../Doc-BkxT7G80.js';
|
|
2
2
|
import { i as PageTransformHints } from '../materializePageSection-Dp2aHFbc.js';
|
|
3
3
|
import { d as ExtractionType, E as ExtractedElement, b as ExtractionOptions } from '../contentExtractor-BNfVJV2U.js';
|
|
4
4
|
import '../types-Be6sBUBx.js';
|
|
@@ -145,6 +145,67 @@ interface TransformResult {
|
|
|
145
145
|
*/
|
|
146
146
|
declare function applyTransform(doc: Doc, style: TransformStyleInput, options?: TransformOptions): TransformResult;
|
|
147
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Narrated Segment Transformation
|
|
150
|
+
*
|
|
151
|
+
* Converts a narrated text segment and its media into a timed Doc using the
|
|
152
|
+
* canonical squisq transform pipeline. This is the reusable bridge for hosts
|
|
153
|
+
* that generate one visual sequence per narration segment.
|
|
154
|
+
*/
|
|
155
|
+
|
|
156
|
+
interface NarratedSegmentVideo {
|
|
157
|
+
src: string;
|
|
158
|
+
posterSrc?: string;
|
|
159
|
+
alt?: string;
|
|
160
|
+
clipStart: number;
|
|
161
|
+
clipEnd: number;
|
|
162
|
+
sourceDuration?: number;
|
|
163
|
+
credit?: string;
|
|
164
|
+
license?: string;
|
|
165
|
+
}
|
|
166
|
+
interface NarratedSegmentInput {
|
|
167
|
+
articleId: string;
|
|
168
|
+
segmentId: string;
|
|
169
|
+
title: string;
|
|
170
|
+
text: string;
|
|
171
|
+
duration: number;
|
|
172
|
+
audioSrc: string;
|
|
173
|
+
audioName?: string;
|
|
174
|
+
images?: TransformImage[];
|
|
175
|
+
videos?: NarratedSegmentVideo[];
|
|
176
|
+
includeTitleBlock?: boolean;
|
|
177
|
+
}
|
|
178
|
+
interface NarratedSegmentTransformOptions extends Pick<TransformOptions, 'themeId' | 'registry'> {
|
|
179
|
+
style?: TransformStyleInput;
|
|
180
|
+
seed?: number;
|
|
181
|
+
minConfidence?: number;
|
|
182
|
+
slidesPerMinute?: number;
|
|
183
|
+
}
|
|
184
|
+
interface NarratedSegmentResult extends TransformResult {
|
|
185
|
+
seed: number;
|
|
186
|
+
}
|
|
187
|
+
declare function transformNarratedSegment(input: NarratedSegmentInput, options?: NarratedSegmentTransformOptions): NarratedSegmentResult;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Timing Allocator
|
|
191
|
+
*
|
|
192
|
+
* Distributes timing (startTime, duration) across transformed blocks.
|
|
193
|
+
* When the source Doc has audio, blocks are fitted to the overall duration.
|
|
194
|
+
* When no audio is present, uses reading-time estimation.
|
|
195
|
+
*/
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Allocate startTime and duration across a mixed array of blocks and
|
|
199
|
+
* template blocks. Template blocks get timing assigned; existing blocks
|
|
200
|
+
* retain their original timing when possible.
|
|
201
|
+
*
|
|
202
|
+
* @param blocks - The output from templateSelector (mixed Block | TemplateBlock).
|
|
203
|
+
* @param totalDuration - The Doc's total duration (from audio or estimation).
|
|
204
|
+
* @returns A new array of Blocks with consistent timing. Template blocks
|
|
205
|
+
* are returned as Blocks (with startTime/duration set, layers empty).
|
|
206
|
+
*/
|
|
207
|
+
declare function allocateTiming(blocks: Array<Block | TemplateBlock>, totalDuration: number): Block[];
|
|
208
|
+
|
|
148
209
|
/**
|
|
149
210
|
* Transform Style Registry
|
|
150
211
|
*
|
|
@@ -220,4 +281,4 @@ declare function extractDocImages(blocks: Block[]): TransformImage[];
|
|
|
220
281
|
*/
|
|
221
282
|
declare function analyzeBlocks(blocks: Block[], options?: ExtractionOptions): AnalyzedBlock[];
|
|
222
283
|
|
|
223
|
-
export { type AnalyzedBlock, type BlockImage, DEFAULT_TRANSFORM_STYLE_ID, type TransformImage, type TransformOptions, type TransformResult, type TransformStyleConfig, type TransformStyleId, type TransformStyleInput, type TransformStyleRegistry, type TransformStyleSummary, analyzeBlocks, applyTransform, createTransformStyleRegistry, extractDocImages, getTransformStyleIds, getTransformStyleSummaries, resolveTransformStyle };
|
|
284
|
+
export { type AnalyzedBlock, type BlockImage, DEFAULT_TRANSFORM_STYLE_ID, type NarratedSegmentInput, type NarratedSegmentResult, type NarratedSegmentTransformOptions, type NarratedSegmentVideo, type TransformImage, type TransformOptions, type TransformResult, type TransformStyleConfig, type TransformStyleId, type TransformStyleInput, type TransformStyleRegistry, type TransformStyleSummary, allocateTiming, analyzeBlocks, applyTransform, createTransformStyleRegistry, extractDocImages, getTransformStyleIds, getTransformStyleSummaries, resolveTransformStyle, transformNarratedSegment };
|
package/dist/transform/index.js
CHANGED
|
@@ -1,25 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_TRANSFORM_STYLE_ID,
|
|
3
|
+
allocateTiming,
|
|
3
4
|
analyzeBlocks,
|
|
4
5
|
applyTransform,
|
|
5
6
|
createTransformStyleRegistry,
|
|
6
7
|
extractDocImages,
|
|
7
8
|
getTransformStyleIds,
|
|
8
9
|
getTransformStyleSummaries,
|
|
9
|
-
resolveTransformStyle
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import "../chunk-
|
|
10
|
+
resolveTransformStyle,
|
|
11
|
+
transformNarratedSegment
|
|
12
|
+
} from "../chunk-J2IPSQKP.js";
|
|
13
|
+
import "../chunk-SVN7T6BK.js";
|
|
14
|
+
import "../chunk-WAGJK36Q.js";
|
|
15
|
+
import "../chunk-PUS54YU6.js";
|
|
16
|
+
import "../chunk-C3NAY5YP.js";
|
|
17
|
+
import "../chunk-Y4D6TDZT.js";
|
|
18
|
+
import "../chunk-CW24CH7I.js";
|
|
19
|
+
import "../chunk-TMOHAFYE.js";
|
|
20
|
+
import "../chunk-7N4G32LG.js";
|
|
13
21
|
import "../chunk-X7BNDUNI.js";
|
|
14
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-4VOD55SX.js";
|
|
23
|
+
import "../chunk-GHOPHGOK.js";
|
|
15
24
|
import "../chunk-XRW6P7IF.js";
|
|
16
25
|
export {
|
|
17
26
|
DEFAULT_TRANSFORM_STYLE_ID,
|
|
27
|
+
allocateTiming,
|
|
18
28
|
analyzeBlocks,
|
|
19
29
|
applyTransform,
|
|
20
30
|
createTransformStyleRegistry,
|
|
21
31
|
extractDocImages,
|
|
22
32
|
getTransformStyleIds,
|
|
23
33
|
getTransformStyleSummaries,
|
|
24
|
-
resolveTransformStyle
|
|
34
|
+
resolveTransformStyle,
|
|
35
|
+
transformNarratedSegment
|
|
25
36
|
};
|