@bendyline/squisq 2.11.16 → 2.11.18
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-Bd2kdzuy.d.ts → Doc-B6TYHYGc.d.ts} +41 -2
- package/dist/{ImageEditDoc-C3HOltpW.d.ts → ImageEditDoc-CN_3Ysj5.d.ts} +1 -1
- package/dist/chunk-3XEABCT3.js +114 -0
- package/dist/{chunk-WMXQDP2C.js → chunk-7IGKCHDP.js} +352 -17
- package/dist/{chunk-C3NAY5YP.js → chunk-A5QJJZ5S.js} +8 -5
- package/dist/{chunk-HVJ6VFDX.js → chunk-GB7OFYUK.js} +4 -0
- package/dist/{chunk-NC6LD6D3.js → chunk-J4ACZBO4.js} +50 -8
- package/dist/{chunk-ANH2OZ2M.js → chunk-LJZHC6GN.js} +146 -11
- package/dist/{chunk-IFJPPI63.js → chunk-NM747LUO.js} +829 -298
- package/dist/{chunk-GDHXT5Q7.js → chunk-PGWYC3S2.js} +2 -2
- package/dist/{chunk-X7BNDUNI.js → chunk-Q6ELOAOQ.js} +383 -1
- package/dist/{chunk-IRVXZUVU.js → chunk-RYO4QW6R.js} +2 -4
- package/dist/{chunk-TMOHAFYE.js → chunk-WSFXV5BT.js} +17 -0
- package/dist/doc/index.d.ts +35 -24
- package/dist/doc/index.js +13 -7
- 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 +7 -7
- package/dist/index.js +88 -34
- package/dist/jsonForm/index.d.ts +1 -1
- package/dist/jsonForm/index.js +1 -1
- package/dist/markdown/index.d.ts +170 -4
- package/dist/markdown/index.js +24 -4
- package/dist/{materializePageSection-FRv9whYy.d.ts → materializePageSection-IYXU3tDN.d.ts} +6 -1
- package/dist/mediaEdit/index.d.ts +2 -2
- package/dist/narration/index.d.ts +1 -1
- package/dist/narration/index.js +10 -9
- package/dist/recommend/index.js +2 -2
- package/dist/schemas/index.d.ts +4 -4
- package/dist/schemas/index.js +1 -1
- package/dist/{themeLibrary-BbF3EKWM.d.ts → themeLibrary-_46saKYO.d.ts} +1 -1
- package/dist/timing/index.d.ts +1 -1
- package/dist/transform/index.d.ts +84 -4
- package/dist/transform/index.js +38 -8
- package/package.json +1 -1
- package/dist/chunk-5W7F46OO.js +0 -337
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-RYO4QW6R.js";
|
|
31
31
|
import {
|
|
32
32
|
fenceRendererLangs
|
|
33
33
|
} from "./chunk-PGI7HSWE.js";
|
|
@@ -54,23 +54,6 @@ import {
|
|
|
54
54
|
selectSafeZoneClips,
|
|
55
55
|
selectTranscriptClips
|
|
56
56
|
} from "./chunk-ZP5F7LUH.js";
|
|
57
|
-
import {
|
|
58
|
-
DEFAULT_TRANSFORM_STYLE_ID,
|
|
59
|
-
allocateTiming,
|
|
60
|
-
analyzeBlocks,
|
|
61
|
-
applyTransform,
|
|
62
|
-
createTransformStyleRegistry,
|
|
63
|
-
extractDocImages,
|
|
64
|
-
getTransformStyleIds,
|
|
65
|
-
getTransformStyleSummaries,
|
|
66
|
-
resolveTransformStyle,
|
|
67
|
-
transformNarratedSegment
|
|
68
|
-
} from "./chunk-IFJPPI63.js";
|
|
69
|
-
import {
|
|
70
|
-
extractContent,
|
|
71
|
-
mapElementToBlock,
|
|
72
|
-
stripMarkdown
|
|
73
|
-
} from "./chunk-SVN7T6BK.js";
|
|
74
57
|
import {
|
|
75
58
|
DATA_BACKUP_PREFIX,
|
|
76
59
|
DocumentVersionManager,
|
|
@@ -154,7 +137,7 @@ import {
|
|
|
154
137
|
pipStyleVars,
|
|
155
138
|
serializeTheme,
|
|
156
139
|
validateDocSchema
|
|
157
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-GB7OFYUK.js";
|
|
158
141
|
import {
|
|
159
142
|
calculateBearing,
|
|
160
143
|
decodeGeohash,
|
|
@@ -246,18 +229,39 @@ import {
|
|
|
246
229
|
validateMarkdownSource,
|
|
247
230
|
wordRevealDelay,
|
|
248
231
|
writeDashboardLayoutsToFrontmatter
|
|
249
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-J4ACZBO4.js";
|
|
250
233
|
import {
|
|
251
|
-
buildNarrationScript,
|
|
252
234
|
buildNarrationTimingJson,
|
|
253
|
-
estimateSyllables,
|
|
254
|
-
expectedSyllablesAt,
|
|
255
235
|
parseNarrationTimingJson,
|
|
256
|
-
resolveNarrationTimingGenerator
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
236
|
+
resolveNarrationTimingGenerator
|
|
237
|
+
} from "./chunk-3XEABCT3.js";
|
|
238
|
+
import {
|
|
239
|
+
DEFAULT_TRANSFORM_STYLE_ID,
|
|
240
|
+
DYNAMIC_PRESENTATION_STYLE,
|
|
241
|
+
PRESENTATION_HINTS_KEY,
|
|
242
|
+
PRESENTATION_KEY,
|
|
243
|
+
PRESENTATION_LAYOUTS,
|
|
244
|
+
PRESENTATION_LIMITS,
|
|
245
|
+
allocateTiming,
|
|
246
|
+
analyzeBlocks,
|
|
247
|
+
applySavedPresentation,
|
|
248
|
+
applyTransform,
|
|
249
|
+
compilePresentationPlan,
|
|
250
|
+
createPresentationPlan,
|
|
251
|
+
createTransformStyleRegistry,
|
|
252
|
+
defaultPresentationHints,
|
|
253
|
+
extractDocImages,
|
|
254
|
+
getTransformStyleIds,
|
|
255
|
+
getTransformStyleSummaries,
|
|
256
|
+
parsePresentationHints,
|
|
257
|
+
parsePresentationPlan,
|
|
258
|
+
presentationSections,
|
|
259
|
+
resolveTransformStyle,
|
|
260
|
+
serializePresentationHints,
|
|
261
|
+
serializePresentationPlan,
|
|
262
|
+
transformNarratedSegment,
|
|
263
|
+
usesDynamicPresentation
|
|
264
|
+
} from "./chunk-NM747LUO.js";
|
|
261
265
|
import {
|
|
262
266
|
ASCII_CHAR_H,
|
|
263
267
|
ASCII_CHAR_W,
|
|
@@ -283,6 +287,7 @@ import {
|
|
|
283
287
|
asciiTimelineToTemplateData,
|
|
284
288
|
autoTemplatePreservesContent,
|
|
285
289
|
bigText,
|
|
290
|
+
buildNarrationScript,
|
|
286
291
|
buildRegistry,
|
|
287
292
|
canvasToAsciiCell,
|
|
288
293
|
coerceTemplateParams,
|
|
@@ -301,14 +306,17 @@ import {
|
|
|
301
306
|
deriveTemplateInputs,
|
|
302
307
|
diagramBlock,
|
|
303
308
|
drawingBlock,
|
|
309
|
+
estimateSyllables,
|
|
304
310
|
expandCoverBlock,
|
|
305
311
|
expandDocBlocks,
|
|
306
312
|
expandPersistentLayers,
|
|
313
|
+
expectedSyllablesAt,
|
|
307
314
|
extractBlockquoteText,
|
|
308
315
|
extractBodyPlainText,
|
|
309
316
|
extractEmbeddedVideos,
|
|
310
317
|
extractFirstEmbeddedVideo,
|
|
311
318
|
extractFirstImage,
|
|
319
|
+
extractHostedVideos,
|
|
312
320
|
extractImages,
|
|
313
321
|
extractListItems,
|
|
314
322
|
extractRichListItems,
|
|
@@ -341,6 +349,7 @@ import {
|
|
|
341
349
|
imageWithCaption,
|
|
342
350
|
isDataFence,
|
|
343
351
|
isGeometryBoundTemplate,
|
|
352
|
+
isMaterializedMediaNode,
|
|
344
353
|
isShapeName,
|
|
345
354
|
layoutBlock,
|
|
346
355
|
leftFeature,
|
|
@@ -386,10 +395,13 @@ import {
|
|
|
386
395
|
twoColumn,
|
|
387
396
|
videoPullQuote,
|
|
388
397
|
videoWithCaption,
|
|
398
|
+
wordIndexAtChar,
|
|
399
|
+
wordIndexAtTime,
|
|
400
|
+
wordPosAtExpectedSyllables,
|
|
389
401
|
wrapWithPersistentLayers,
|
|
390
402
|
writeCustomTemplatesToFrontmatter,
|
|
391
403
|
writeCustomThemesToFrontmatter
|
|
392
|
-
} from "./chunk-
|
|
404
|
+
} from "./chunk-7IGKCHDP.js";
|
|
393
405
|
import {
|
|
394
406
|
ASCII_DIAGRAM_FENCE_LANGS,
|
|
395
407
|
ASCII_TIMELINE_FENCE_LANGS,
|
|
@@ -414,7 +426,12 @@ import {
|
|
|
414
426
|
parseWrappedFlowTimeline,
|
|
415
427
|
profileBlockContents,
|
|
416
428
|
recommendTemplatesForBlock
|
|
417
|
-
} from "./chunk-
|
|
429
|
+
} from "./chunk-A5QJJZ5S.js";
|
|
430
|
+
import {
|
|
431
|
+
extractContent,
|
|
432
|
+
mapElementToBlock,
|
|
433
|
+
stripMarkdown
|
|
434
|
+
} from "./chunk-SVN7T6BK.js";
|
|
418
435
|
import {
|
|
419
436
|
PATH_SHAPE_KINDS,
|
|
420
437
|
anchorPoint,
|
|
@@ -550,7 +567,7 @@ import {
|
|
|
550
567
|
stringifyMarkdown,
|
|
551
568
|
unwrapMarkdownSource,
|
|
552
569
|
wrapMarkdownSource
|
|
553
|
-
} from "./chunk-
|
|
570
|
+
} from "./chunk-LJZHC6GN.js";
|
|
554
571
|
import {
|
|
555
572
|
DEFAULT_MARKDOWN_SAFETY_LIMITS,
|
|
556
573
|
MarkdownLimitError,
|
|
@@ -562,7 +579,7 @@ import {
|
|
|
562
579
|
resolveMarkdownSafetyLimits,
|
|
563
580
|
serializePandocAttributes,
|
|
564
581
|
toMdast
|
|
565
|
-
} from "./chunk-
|
|
582
|
+
} from "./chunk-PGWYC3S2.js";
|
|
566
583
|
import {
|
|
567
584
|
BLOCK_META_KEY_DESCRIPTORS,
|
|
568
585
|
CONTAINER_TEMPLATES,
|
|
@@ -580,26 +597,36 @@ import {
|
|
|
580
597
|
splitKeyValueToken,
|
|
581
598
|
tokenizeAttrTokens,
|
|
582
599
|
unquoteAttrValue
|
|
583
|
-
} from "./chunk-
|
|
600
|
+
} from "./chunk-WSFXV5BT.js";
|
|
584
601
|
import {
|
|
602
|
+
VIDEO_EMBED_IFRAME_ALLOW,
|
|
603
|
+
VIDEO_EMBED_PROVIDERS,
|
|
585
604
|
countNodes,
|
|
586
605
|
createDocument,
|
|
587
606
|
extractPlainText,
|
|
607
|
+
findBlockVideoEmbed,
|
|
588
608
|
findNodesByType,
|
|
589
609
|
formatBlockScalar,
|
|
590
610
|
formatFrontmatterValue,
|
|
591
611
|
formatFrontmatterYaml,
|
|
592
612
|
getChildren,
|
|
593
613
|
inferDocumentTitle,
|
|
614
|
+
isVideoEmbedUrl,
|
|
615
|
+
mediaKindForUrl,
|
|
594
616
|
parseFrontmatter,
|
|
595
617
|
parseHtmlToNodes,
|
|
618
|
+
parseVideoEmbedInput,
|
|
619
|
+
parseVideoEmbedUrl,
|
|
620
|
+
parseVideoStartTime,
|
|
596
621
|
plainTextFromInlineHtml,
|
|
597
622
|
readFrontmatterThemeId,
|
|
598
623
|
setFrontmatterValues,
|
|
599
624
|
splitFrontmatterBlock,
|
|
600
625
|
stringifyHtmlNodes,
|
|
626
|
+
videoEmbedFromIframe,
|
|
627
|
+
videoEmbedIframeAttributes,
|
|
601
628
|
walkMarkdownTree
|
|
602
|
-
} from "./chunk-
|
|
629
|
+
} from "./chunk-Q6ELOAOQ.js";
|
|
603
630
|
import {
|
|
604
631
|
ICONS,
|
|
605
632
|
canonicalIconToken,
|
|
@@ -683,6 +710,7 @@ export {
|
|
|
683
710
|
DIAGRAM_LABEL_LINE_HEIGHT,
|
|
684
711
|
DIAGRAM_LABEL_MIN_FONT_SIZE,
|
|
685
712
|
DIAGRAM_LABEL_VERTICAL_PADDING,
|
|
713
|
+
DYNAMIC_PRESENTATION_STYLE,
|
|
686
714
|
DocumentVersionManager,
|
|
687
715
|
EMPTY_ADVANCE_LOG,
|
|
688
716
|
FONT_FALLBACKS,
|
|
@@ -730,6 +758,10 @@ export {
|
|
|
730
758
|
PAGE_SHADOWS,
|
|
731
759
|
PAGE_VARIANTS,
|
|
732
760
|
PATH_SHAPE_KINDS,
|
|
761
|
+
PRESENTATION_HINTS_KEY,
|
|
762
|
+
PRESENTATION_KEY,
|
|
763
|
+
PRESENTATION_LAYOUTS,
|
|
764
|
+
PRESENTATION_LIMITS,
|
|
733
765
|
PROOF_DIALECTS,
|
|
734
766
|
PROOF_FRONTMATTER_KEYS,
|
|
735
767
|
PROOF_JOIN_SEPARATOR,
|
|
@@ -749,6 +781,8 @@ export {
|
|
|
749
781
|
TREE_FENCE_LANGS,
|
|
750
782
|
VERSIONS_PREFIX,
|
|
751
783
|
VERSION_TIMESTAMP_PATTERN,
|
|
784
|
+
VIDEO_EMBED_IFRAME_ALLOW,
|
|
785
|
+
VIDEO_EMBED_PROVIDERS,
|
|
752
786
|
VIEWPORT_PRESETS,
|
|
753
787
|
accentForViewport,
|
|
754
788
|
accentToColorScheme,
|
|
@@ -763,6 +797,7 @@ export {
|
|
|
763
797
|
applyMarkdownSourceTransform,
|
|
764
798
|
applyNarrationTiming,
|
|
765
799
|
applyRenderStyleToLayers,
|
|
800
|
+
applySavedPresentation,
|
|
766
801
|
applySurface,
|
|
767
802
|
applyTransform,
|
|
768
803
|
arrayItemKind,
|
|
@@ -813,6 +848,7 @@ export {
|
|
|
813
848
|
coalesceVersions,
|
|
814
849
|
coerceTemplateParams,
|
|
815
850
|
comparisonBar,
|
|
851
|
+
compilePresentationPlan,
|
|
816
852
|
compileTheme,
|
|
817
853
|
composeDashboardLayers,
|
|
818
854
|
computeDiagramLayout,
|
|
@@ -836,6 +872,7 @@ export {
|
|
|
836
872
|
createNarrationSession,
|
|
837
873
|
createNucleiState,
|
|
838
874
|
createPacingState,
|
|
875
|
+
createPresentationPlan,
|
|
839
876
|
createTemplateContext,
|
|
840
877
|
createTheme,
|
|
841
878
|
createThemeRegistry,
|
|
@@ -849,6 +886,7 @@ export {
|
|
|
849
886
|
dateEvent,
|
|
850
887
|
decodeGeohash,
|
|
851
888
|
defaultPageStyle,
|
|
889
|
+
defaultPresentationHints,
|
|
852
890
|
definitionCard,
|
|
853
891
|
deriveColorPalette,
|
|
854
892
|
deriveScale,
|
|
@@ -888,6 +926,7 @@ export {
|
|
|
888
926
|
extractFirstEmbeddedVideo,
|
|
889
927
|
extractFirstImage,
|
|
890
928
|
extractFrameFeatures,
|
|
929
|
+
extractHostedVideos,
|
|
891
930
|
extractImages,
|
|
892
931
|
extractKeywords,
|
|
893
932
|
extractListItems,
|
|
@@ -900,6 +939,7 @@ export {
|
|
|
900
939
|
featureStep,
|
|
901
940
|
fenceRendererLangs,
|
|
902
941
|
fetchResourceBytes,
|
|
942
|
+
findBlockVideoEmbed,
|
|
903
943
|
findDocumentPath,
|
|
904
944
|
findFirstList,
|
|
905
945
|
findFirstTable,
|
|
@@ -987,6 +1027,7 @@ export {
|
|
|
987
1027
|
isExplicitTreeLang,
|
|
988
1028
|
isGeometryBoundTemplate,
|
|
989
1029
|
isHex,
|
|
1030
|
+
isMaterializedMediaNode,
|
|
990
1031
|
isMotionProfileName,
|
|
991
1032
|
isPersistentLayerTemplate,
|
|
992
1033
|
isRepairableDiagram,
|
|
@@ -997,6 +1038,7 @@ export {
|
|
|
997
1038
|
isTemplatedPageBlock,
|
|
998
1039
|
isTransitionType,
|
|
999
1040
|
isTreeFence,
|
|
1041
|
+
isVideoEmbedUrl,
|
|
1000
1042
|
isWrappedFlowTimelineSource,
|
|
1001
1043
|
layoutBlock,
|
|
1002
1044
|
layoutCapacity,
|
|
@@ -1025,6 +1067,7 @@ export {
|
|
|
1025
1067
|
materializePageSection,
|
|
1026
1068
|
materializePageSections,
|
|
1027
1069
|
mayBeAnimatedImage,
|
|
1070
|
+
mediaKindForUrl,
|
|
1028
1071
|
motionDelay,
|
|
1029
1072
|
motionEntrance,
|
|
1030
1073
|
motionStateTransform,
|
|
@@ -1052,6 +1095,8 @@ export {
|
|
|
1052
1095
|
parseMarkdown,
|
|
1053
1096
|
parseNarrationTimingJson,
|
|
1054
1097
|
parsePandocAttrTokens,
|
|
1098
|
+
parsePresentationHints,
|
|
1099
|
+
parsePresentationPlan,
|
|
1055
1100
|
parseProofDictionary,
|
|
1056
1101
|
parseStatNumber,
|
|
1057
1102
|
parseTheme,
|
|
@@ -1059,6 +1104,9 @@ export {
|
|
|
1059
1104
|
parseTree,
|
|
1060
1105
|
parseVersionPath,
|
|
1061
1106
|
parseVersionTimestamp,
|
|
1107
|
+
parseVideoEmbedInput,
|
|
1108
|
+
parseVideoEmbedUrl,
|
|
1109
|
+
parseVideoStartTime,
|
|
1062
1110
|
parseWrappedFlowTimeline,
|
|
1063
1111
|
parseYamlSubset,
|
|
1064
1112
|
photoGrid,
|
|
@@ -1066,6 +1114,7 @@ export {
|
|
|
1066
1114
|
pipStyleVars,
|
|
1067
1115
|
plainTextFromInlineHtml,
|
|
1068
1116
|
pointerSegments,
|
|
1117
|
+
presentationSections,
|
|
1069
1118
|
primaryType,
|
|
1070
1119
|
profileBlockContents,
|
|
1071
1120
|
pruneImageEditVersions,
|
|
@@ -1145,6 +1194,8 @@ export {
|
|
|
1145
1194
|
selectSafeZoneClips,
|
|
1146
1195
|
selectTranscriptClips,
|
|
1147
1196
|
serializePandocAttributes,
|
|
1197
|
+
serializePresentationHints,
|
|
1198
|
+
serializePresentationPlan,
|
|
1148
1199
|
serializeTheme,
|
|
1149
1200
|
setByPointer,
|
|
1150
1201
|
setCanvas,
|
|
@@ -1189,6 +1240,7 @@ export {
|
|
|
1189
1240
|
unquoteAttrValue,
|
|
1190
1241
|
unwrapMarkdownSource,
|
|
1191
1242
|
updateLayer,
|
|
1243
|
+
usesDynamicPresentation,
|
|
1192
1244
|
vadStep,
|
|
1193
1245
|
validateCustomTemplateDefinition,
|
|
1194
1246
|
validateDashboardLayoutDefinition,
|
|
@@ -1196,6 +1248,8 @@ export {
|
|
|
1196
1248
|
validateMarkdownDoc,
|
|
1197
1249
|
validateMarkdownSource,
|
|
1198
1250
|
validateTheme,
|
|
1251
|
+
videoEmbedFromIframe,
|
|
1252
|
+
videoEmbedIframeAttributes,
|
|
1199
1253
|
videoPullQuote,
|
|
1200
1254
|
videoWithCaption,
|
|
1201
1255
|
walkMarkdownTree,
|
package/dist/jsonForm/index.d.ts
CHANGED
package/dist/jsonForm/index.js
CHANGED
package/dist/markdown/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as ParseOptions, n as MarkdownDocument, a0 as StringifyOptions, H as HeadingAttributes, e as HtmlNode, L as MarkdownNode } from '../types-C6VvDDL2.js';
|
|
2
|
-
export { D as DEFAULT_MARKDOWN_SAFETY_LIMITS, b as HeadingTemplateAnnotation, c as HtmlComment,
|
|
1
|
+
import { $ as ParseOptions, n as MarkdownDocument, a0 as StringifyOptions, H as HeadingAttributes, e as HtmlNode, M as MarkdownBlockNode, d as HtmlElement, L as MarkdownNode } from '../types-C6VvDDL2.js';
|
|
2
|
+
export { D as DEFAULT_MARKDOWN_SAFETY_LIMITS, b as HeadingTemplateAnnotation, c as HtmlComment, f as HtmlText, g as MarkdownBlockquote, h as MarkdownBreak, i as MarkdownCodeBlock, j as MarkdownContainerDirective, k as MarkdownDefinitionDescription, l as MarkdownDefinitionList, m as MarkdownDefinitionTerm, o as MarkdownEmphasis, p as MarkdownFootnoteDefinition, q as MarkdownFootnoteReference, r as MarkdownHeading, s as MarkdownHtmlBlock, t as MarkdownImage, u as MarkdownImageReference, v as MarkdownInlineCode, w as MarkdownInlineHtml, x as MarkdownInlineIcon, y as MarkdownInlineMath, z as MarkdownInlineNode, A as MarkdownLeafDirective, B as MarkdownLimitError, C as MarkdownLink, E as MarkdownLinkDefinition, F as MarkdownLinkReference, G as MarkdownList, I as MarkdownListItem, J as MarkdownMathBlock, K as MarkdownMention, N as MarkdownParagraph, O as MarkdownPoint, P as MarkdownSafetyLimits, Q as MarkdownSourcePosition, R as MarkdownStrikethrough, S as MarkdownStrong, T as MarkdownSubscript, U as MarkdownSuperscript, V as MarkdownTable, W as MarkdownTableCell, X as MarkdownTableRow, Y as MarkdownText, Z as MarkdownTextDirective, _ as MarkdownThematicBreak, a6 as assertMarkdownDocumentWithinLimits, a7 as assertMarkdownSourceWithinLimits, ac as resolveMarkdownSafetyLimits } from '../types-C6VvDDL2.js';
|
|
3
3
|
export { B as BLOCK_META_KEY_DESCRIPTORS, a as BlockMetaKeyDescriptor, K as KNOWN_BLOCK_META_KEYS, b as KnownBlockMetaKey, p as parseTimeSeconds } from '../annotationCoercion-BgL52343.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -296,6 +296,147 @@ declare function sanitizeUrl(url: string | null | undefined, kind?: UrlKind, opt
|
|
|
296
296
|
*/
|
|
297
297
|
declare function sanitizeHtmlNodes(nodes: HtmlNode[]): HtmlNode[];
|
|
298
298
|
|
|
299
|
+
/**
|
|
300
|
+
* Hosted-video embeds (YouTube, Vimeo, Loom, Dailymotion, Wistia).
|
|
301
|
+
*
|
|
302
|
+
* The authored form is a paragraph that is ONLY a link, or a bare URL, to a
|
|
303
|
+
* video page:
|
|
304
|
+
*
|
|
305
|
+
* ```markdown
|
|
306
|
+
* [Launch keynote](https://www.youtube.com/watch?v=dQw4w9WgXcQ)
|
|
307
|
+
*
|
|
308
|
+
* https://vimeo.com/76979871
|
|
309
|
+
* ```
|
|
310
|
+
*
|
|
311
|
+
* GitHub, Notion and Medium all follow this convention. It degrades to a working
|
|
312
|
+
* link in every plain markdown renderer and in every document exporter
|
|
313
|
+
* (DOCX/PDF/EPUB), and renderers that know the convention swap in the
|
|
314
|
+
* provider's player. A link inside prose stays a link: only a paragraph made of
|
|
315
|
+
* nothing else is an embed. An `<iframe>` embed snippet copied from a provider's
|
|
316
|
+
* Share → Embed dialog is recognized too ({@link findBlockVideoEmbed} on an
|
|
317
|
+
* `htmlBlock`, {@link parseVideoEmbedInput} for pasted text).
|
|
318
|
+
*
|
|
319
|
+
* The iframe `src` is ALWAYS rebuilt from validated parts — provider, an id
|
|
320
|
+
* matched against the provider's id grammar, a whole-second start offset — on a
|
|
321
|
+
* fixed provider origin. An author's URL never reaches an iframe, which is what
|
|
322
|
+
* lets the HTML sanitizer admit these iframes while it drops every other one.
|
|
323
|
+
*/
|
|
324
|
+
|
|
325
|
+
type VideoEmbedProviderId = 'youtube' | 'vimeo' | 'loom' | 'dailymotion' | 'wistia';
|
|
326
|
+
/** Display facts about a supported provider, for pickers and help text. */
|
|
327
|
+
interface VideoEmbedProviderInfo {
|
|
328
|
+
id: VideoEmbedProviderId;
|
|
329
|
+
/** Human-readable name, e.g. `YouTube`. */
|
|
330
|
+
name: string;
|
|
331
|
+
/** A representative page URL, for placeholder and help text. */
|
|
332
|
+
example: string;
|
|
333
|
+
}
|
|
334
|
+
/** The supported providers, in the order UI should list them. */
|
|
335
|
+
declare const VIDEO_EMBED_PROVIDERS: readonly VideoEmbedProviderInfo[];
|
|
336
|
+
/** A recognized hosted video, normalized. */
|
|
337
|
+
interface VideoEmbed {
|
|
338
|
+
provider: VideoEmbedProviderId;
|
|
339
|
+
/** Human-readable provider name, e.g. `YouTube`. */
|
|
340
|
+
providerName: string;
|
|
341
|
+
/**
|
|
342
|
+
* The provider's id for what plays: a video id, or — for a YouTube
|
|
343
|
+
* playlist link with no video — the playlist id.
|
|
344
|
+
*/
|
|
345
|
+
id: string;
|
|
346
|
+
/** YouTube playlist the video plays within, when the URL named one. */
|
|
347
|
+
playlistId?: string;
|
|
348
|
+
/** The player URL for an `<iframe src>`. Rebuilt from validated parts. */
|
|
349
|
+
embedUrl: string;
|
|
350
|
+
/**
|
|
351
|
+
* The canonical page URL: what a markdown link should point at. Tracking
|
|
352
|
+
* parameters (`si=`, `feature=`, `pp=` …) are dropped; the start offset and
|
|
353
|
+
* playlist are kept. An embed-only URL (`/embed/<id>`) maps back to the
|
|
354
|
+
* watch page, so a pasted iframe still degrades to a link a reader can open.
|
|
355
|
+
*/
|
|
356
|
+
watchUrl: string;
|
|
357
|
+
/** Start offset in whole seconds, when the URL carried one. */
|
|
358
|
+
startSeconds?: number;
|
|
359
|
+
/**
|
|
360
|
+
* A still poster image, when the provider serves one at a predictable URL
|
|
361
|
+
* with no API call (YouTube, Dailymotion). Remote — callers that must stay
|
|
362
|
+
* offline should not fetch it.
|
|
363
|
+
*/
|
|
364
|
+
thumbnailUrl?: string;
|
|
365
|
+
/** Frame width ÷ height: 16/9, or 9/16 for YouTube Shorts. */
|
|
366
|
+
aspectRatio: number;
|
|
367
|
+
}
|
|
368
|
+
/** A block that should render as a hosted-video player. */
|
|
369
|
+
interface BlockVideoEmbed {
|
|
370
|
+
embed: VideoEmbed;
|
|
371
|
+
/**
|
|
372
|
+
* The author's label for the video — the link text — or null when the
|
|
373
|
+
* paragraph is a bare URL. For an `<iframe>` block it is the iframe's
|
|
374
|
+
* `title`, unless that is a provider's generic "… video player" title.
|
|
375
|
+
*/
|
|
376
|
+
title: string | null;
|
|
377
|
+
/** How the block was written. */
|
|
378
|
+
form: 'link' | 'url' | 'iframe';
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* A start offset as providers write it — `90`, `90s`, `1m30s`, `1h2m3s`,
|
|
382
|
+
* `1:30`, `1:02:03` — in whole seconds; undefined when absent, zero or
|
|
383
|
+
* unreadable.
|
|
384
|
+
*/
|
|
385
|
+
declare function parseVideoStartTime(raw: string | null | undefined): number | undefined;
|
|
386
|
+
/**
|
|
387
|
+
* Recognize a hosted-video page or player URL. Accepts the forms people paste:
|
|
388
|
+
* scheme-less (`youtu.be/…`), protocol-relative (`//player.vimeo.com/…`), the
|
|
389
|
+
* `<…>` autolink form, and markdown-escaped destinations. Returns null for
|
|
390
|
+
* anything that is not a playable video on a supported provider — a channel,
|
|
391
|
+
* a search page, a malformed id.
|
|
392
|
+
*/
|
|
393
|
+
declare function parseVideoEmbedUrl(input: string | null | undefined): VideoEmbed | null;
|
|
394
|
+
/** Whether `input` is a hosted-video URL {@link parseVideoEmbedUrl} recognizes. */
|
|
395
|
+
declare function isVideoEmbedUrl(input: string | null | undefined): boolean;
|
|
396
|
+
/** The value a player iframe's `allow` attribute carries. */
|
|
397
|
+
declare const VIDEO_EMBED_IFRAME_ALLOW = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen";
|
|
398
|
+
/**
|
|
399
|
+
* The complete attribute set for a player `<iframe>` — the ONE definition
|
|
400
|
+
* every renderer and exporter emits, so a sanitized iframe and a rendered link
|
|
401
|
+
* paragraph produce the same element. Attribute names are HTML (lowercase).
|
|
402
|
+
*
|
|
403
|
+
* `referrerpolicy` matters: YouTube refuses to play ("Error 153") when an
|
|
404
|
+
* embed request carries no referrer.
|
|
405
|
+
*/
|
|
406
|
+
declare function videoEmbedIframeAttributes(embed: VideoEmbed, title?: string | null): Record<string, string>;
|
|
407
|
+
/**
|
|
408
|
+
* Recognize a provider iframe element (the sanitizer's entry point). Null when
|
|
409
|
+
* its `src` is not a supported video.
|
|
410
|
+
*/
|
|
411
|
+
declare function videoEmbedFromIframe(element: HtmlElement): {
|
|
412
|
+
embed: VideoEmbed;
|
|
413
|
+
title: string | null;
|
|
414
|
+
} | null;
|
|
415
|
+
/**
|
|
416
|
+
* What a person pasted or typed where a video is expected: a page URL, or a
|
|
417
|
+
* provider's `<iframe>` embed code. Null when it is neither.
|
|
418
|
+
*/
|
|
419
|
+
declare function parseVideoEmbedInput(input: string | null | undefined): {
|
|
420
|
+
embed: VideoEmbed;
|
|
421
|
+
title: string | null;
|
|
422
|
+
} | null;
|
|
423
|
+
/**
|
|
424
|
+
* The hosted video a block stands for, or null:
|
|
425
|
+
*
|
|
426
|
+
* - a paragraph whose only content is one link to a video page
|
|
427
|
+
* (`[title](url)`; `title` is the link text unless that is itself a URL);
|
|
428
|
+
* - a paragraph whose whole text is one video URL (a bare URL, which GFM
|
|
429
|
+
* autolinks — read from the text so an autolink that stopped short of a
|
|
430
|
+
* trailing `_` in the id is still recognized);
|
|
431
|
+
* - an HTML block holding a single provider `<iframe>` (pasted embed code).
|
|
432
|
+
*
|
|
433
|
+
* A link with surrounding prose is not an embed. Renderers ask this of
|
|
434
|
+
* TOP-LEVEL blocks only: a video link in a list item or blockquote is a list
|
|
435
|
+
* of links, not a stack of players. (Explicit `<iframe>` code is honored
|
|
436
|
+
* wherever it appears.)
|
|
437
|
+
*/
|
|
438
|
+
declare function findBlockVideoEmbed(node: MarkdownBlockNode): BlockVideoEmbed | null;
|
|
439
|
+
|
|
299
440
|
/**
|
|
300
441
|
* Caller-owned policy for resources referenced by a document.
|
|
301
442
|
*
|
|
@@ -633,11 +774,20 @@ declare function rewriteMarkdownReferences(source: string, options?: MarkdownRef
|
|
|
633
774
|
interface DocfxMarkdownOptions {
|
|
634
775
|
/** Image omission retains descriptive alt text. */
|
|
635
776
|
images?: 'preserve' | 'omit';
|
|
777
|
+
/** Retain invalid or unsupported source metadata visibly without interpreting it. */
|
|
778
|
+
frontmatterAsCode?: boolean;
|
|
779
|
+
/** Resolve code transclusions and UID references without fetching in core. */
|
|
780
|
+
reference?: (kind: 'code' | 'xref', target: string, label: string) => string;
|
|
781
|
+
/** Preserve unsupported presentation markers as visible inline code. */
|
|
782
|
+
unknownDirectives?: 'error' | 'preserve';
|
|
783
|
+
/** Report malformed references retained verbatim as code in preservation mode. */
|
|
784
|
+
onPreservedReference?: (source: string) => void;
|
|
636
785
|
}
|
|
637
786
|
/** Convert presentational DocFX directives to portable Markdown without fetching.
|
|
638
787
|
* Includes and code transclusions remain the source adapter's responsibility.
|
|
639
788
|
* All zone variants are retained with their pivot labels. Code examples and
|
|
640
|
-
* frontmatter remain untouched
|
|
789
|
+
* frontmatter remain untouched by default. Hosts can preserve unsupported syntax
|
|
790
|
+
* and metadata visibly through the explicit preservation options.
|
|
641
791
|
*/
|
|
642
792
|
declare function normalizeDocfxMarkdown(source: string, options?: DocfxMarkdownOptions): string;
|
|
643
793
|
|
|
@@ -650,4 +800,20 @@ declare function normalizeDocfxMarkdown(source: string, options?: DocfxMarkdownO
|
|
|
650
800
|
*/
|
|
651
801
|
declare function condenseMarkdownSource(source: string): string;
|
|
652
802
|
|
|
653
|
-
|
|
803
|
+
/**
|
|
804
|
+
* What a markdown media reference points at. Image syntax is the only
|
|
805
|
+
* embedding markdown has, so documents written for a library that ships
|
|
806
|
+
* clips and recordings (knowledge catalogs, recorder output) reference them
|
|
807
|
+
* as `` — and a renderer that drew
|
|
808
|
+
* every such reference as an `<img>` showed a broken picture.
|
|
809
|
+
*
|
|
810
|
+
* The decision is by file extension, ignoring any query string or fragment.
|
|
811
|
+
* `.webm` and `.mp4` are containers for either; like narration discovery
|
|
812
|
+
* (`audioMapping.ts`), they count as audio only under the `audio/` folder
|
|
813
|
+
* the recorder writes to, and as video everywhere else.
|
|
814
|
+
*/
|
|
815
|
+
type MediaReferenceKind = 'video' | 'audio';
|
|
816
|
+
/** `'video'`, `'audio'`, or null for anything else (an image, a page, no extension). */
|
|
817
|
+
declare function mediaKindForUrl(url: string): MediaReferenceKind | null;
|
|
818
|
+
|
|
819
|
+
export { type BlockVideoEmbed, DEFAULT_INTERACTIVE_RESOURCE_POLICY, DEFAULT_RESOURCE_MAX_BYTES, DEFAULT_RESOURCE_TIMEOUT_MS, DEFAULT_WRAP_WIDTH, type DocfxMarkdownOptions, type FetchResourceBytesOptions, type FetchedResource, HeadingAttributes, HtmlElement, HtmlNode, type HtmlPolicy, LOCAL_ONLY_RESOURCE_POLICY, MARKDOWN_SOURCE_TRANSFORMS, MarkdownBlockNode, MarkdownDocument, MarkdownNode, type MarkdownReferenceOptions, type MarkdownSourceEdit, type MarkdownSourceTransform, type MarkdownSourceTransformId, type MarkdownSourceTransformOptions, type MarkdownSourceTransformResult, type MarkdownWrapState, type MediaReferenceKind, ParseOptions, type ResourcePolicy, ResourcePolicyError, type SanitizeUrlOptions, StringifyOptions, type TrailingAnnotationMatch, type UrlKind, VIDEO_EMBED_IFRAME_ALLOW, VIDEO_EMBED_PROVIDERS, type VideoEmbed, type VideoEmbedProviderId, type VideoEmbedProviderInfo, applyMarkdownSourceTransform, cleanupMarkdownSource, condenseMarkdownSource, countNodes, createDocument, detectMarkdownWrapState, extractPlainText, fetchResourceBytes, findBlockVideoEmbed, findNodesByType, formatBlockScalar, formatFrontmatterValue, formatFrontmatterYaml, fromMdast, getChildren, inferDocumentTitle, isResourceUrlAllowed, isVideoEmbedUrl, matchTrailingPandocAttr, matchTrailingTemplateAnnotation, mediaKindForUrl, needsQuoting, normalizeDocfxMarkdown, parseFrontmatter, parseHtmlToNodes, parseMarkdown, parsePandocAttrTokens, parseVideoEmbedInput, parseVideoEmbedUrl, parseVideoStartTime, plainTextFromInlineHtml, quoteAttrValue, readFrontmatterThemeId, rewriteMarkdownReferences, sanitizeHtmlNodes, sanitizeUrl, serializePandocAttributes, setFrontmatterValues, splitFrontmatterBlock, splitKeyValueToken, stringifyHtmlNodes, stringifyMarkdown, toMdast, tokenizeAttrTokens, unquoteAttrValue, unwrapMarkdownSource, videoEmbedFromIframe, videoEmbedIframeAttributes, walkMarkdownTree, wrapMarkdownSource };
|
package/dist/markdown/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
stringifyMarkdown,
|
|
18
18
|
unwrapMarkdownSource,
|
|
19
19
|
wrapMarkdownSource
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-LJZHC6GN.js";
|
|
21
21
|
import {
|
|
22
22
|
DEFAULT_MARKDOWN_SAFETY_LIMITS,
|
|
23
23
|
MarkdownLimitError,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
resolveMarkdownSafetyLimits,
|
|
30
30
|
serializePandocAttributes,
|
|
31
31
|
toMdast
|
|
32
|
-
} from "../chunk-
|
|
32
|
+
} from "../chunk-PGWYC3S2.js";
|
|
33
33
|
import {
|
|
34
34
|
BLOCK_META_KEY_DESCRIPTORS,
|
|
35
35
|
KNOWN_BLOCK_META_KEYS,
|
|
@@ -43,26 +43,36 @@ import {
|
|
|
43
43
|
splitKeyValueToken,
|
|
44
44
|
tokenizeAttrTokens,
|
|
45
45
|
unquoteAttrValue
|
|
46
|
-
} from "../chunk-
|
|
46
|
+
} from "../chunk-WSFXV5BT.js";
|
|
47
47
|
import {
|
|
48
|
+
VIDEO_EMBED_IFRAME_ALLOW,
|
|
49
|
+
VIDEO_EMBED_PROVIDERS,
|
|
48
50
|
countNodes,
|
|
49
51
|
createDocument,
|
|
50
52
|
extractPlainText,
|
|
53
|
+
findBlockVideoEmbed,
|
|
51
54
|
findNodesByType,
|
|
52
55
|
formatBlockScalar,
|
|
53
56
|
formatFrontmatterValue,
|
|
54
57
|
formatFrontmatterYaml,
|
|
55
58
|
getChildren,
|
|
56
59
|
inferDocumentTitle,
|
|
60
|
+
isVideoEmbedUrl,
|
|
61
|
+
mediaKindForUrl,
|
|
57
62
|
parseFrontmatter,
|
|
58
63
|
parseHtmlToNodes,
|
|
64
|
+
parseVideoEmbedInput,
|
|
65
|
+
parseVideoEmbedUrl,
|
|
66
|
+
parseVideoStartTime,
|
|
59
67
|
plainTextFromInlineHtml,
|
|
60
68
|
readFrontmatterThemeId,
|
|
61
69
|
setFrontmatterValues,
|
|
62
70
|
splitFrontmatterBlock,
|
|
63
71
|
stringifyHtmlNodes,
|
|
72
|
+
videoEmbedFromIframe,
|
|
73
|
+
videoEmbedIframeAttributes,
|
|
64
74
|
walkMarkdownTree
|
|
65
|
-
} from "../chunk-
|
|
75
|
+
} from "../chunk-Q6ELOAOQ.js";
|
|
66
76
|
import "../chunk-7N4G32LG.js";
|
|
67
77
|
import "../chunk-4VOD55SX.js";
|
|
68
78
|
export {
|
|
@@ -77,6 +87,8 @@ export {
|
|
|
77
87
|
MARKDOWN_SOURCE_TRANSFORMS,
|
|
78
88
|
MarkdownLimitError,
|
|
79
89
|
ResourcePolicyError,
|
|
90
|
+
VIDEO_EMBED_IFRAME_ALLOW,
|
|
91
|
+
VIDEO_EMBED_PROVIDERS,
|
|
80
92
|
applyMarkdownSourceTransform,
|
|
81
93
|
assertMarkdownDocumentWithinLimits,
|
|
82
94
|
assertMarkdownSourceWithinLimits,
|
|
@@ -87,6 +99,7 @@ export {
|
|
|
87
99
|
detectMarkdownWrapState,
|
|
88
100
|
extractPlainText,
|
|
89
101
|
fetchResourceBytes,
|
|
102
|
+
findBlockVideoEmbed,
|
|
90
103
|
findNodesByType,
|
|
91
104
|
formatBlockScalar,
|
|
92
105
|
formatFrontmatterValue,
|
|
@@ -95,8 +108,10 @@ export {
|
|
|
95
108
|
getChildren,
|
|
96
109
|
inferDocumentTitle,
|
|
97
110
|
isResourceUrlAllowed,
|
|
111
|
+
isVideoEmbedUrl,
|
|
98
112
|
matchTrailingPandocAttr,
|
|
99
113
|
matchTrailingTemplateAnnotation,
|
|
114
|
+
mediaKindForUrl,
|
|
100
115
|
needsQuoting,
|
|
101
116
|
normalizeDocfxMarkdown,
|
|
102
117
|
parseFrontmatter,
|
|
@@ -104,6 +119,9 @@ export {
|
|
|
104
119
|
parseMarkdown,
|
|
105
120
|
parsePandocAttrTokens,
|
|
106
121
|
parseTimeSeconds,
|
|
122
|
+
parseVideoEmbedInput,
|
|
123
|
+
parseVideoEmbedUrl,
|
|
124
|
+
parseVideoStartTime,
|
|
107
125
|
plainTextFromInlineHtml,
|
|
108
126
|
quoteAttrValue,
|
|
109
127
|
readFrontmatterThemeId,
|
|
@@ -121,6 +139,8 @@ export {
|
|
|
121
139
|
tokenizeAttrTokens,
|
|
122
140
|
unquoteAttrValue,
|
|
123
141
|
unwrapMarkdownSource,
|
|
142
|
+
videoEmbedFromIframe,
|
|
143
|
+
videoEmbedIframeAttributes,
|
|
124
144
|
walkMarkdownTree,
|
|
125
145
|
wrapMarkdownSource
|
|
126
146
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as Block, aT as PageSectionKind, aR as PageEmphasis, by as ThemeColorScheme, aP as PageBackground, bw as Theme,
|
|
1
|
+
import { k as Block, aT as PageSectionKind, aR as PageEmphasis, by as ThemeColorScheme, aP as PageBackground, bw as Theme, c0 as ViewportConfig, y as CustomTemplateDefinition, aW as PageVariant, bk as StartBlockConfig, Q as Doc, bz as ThemePageStyle } from './Doc-B6TYHYGc.js';
|
|
2
2
|
import { M as MarkdownBlockNode } from './types-C6VvDDL2.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -46,6 +46,11 @@ type PageMedia = {
|
|
|
46
46
|
clipEnd?: number;
|
|
47
47
|
credit?: string;
|
|
48
48
|
license?: string;
|
|
49
|
+
} | {
|
|
50
|
+
/** A hosted video (YouTube, Vimeo, …) by its page URL; renderers play it. */
|
|
51
|
+
type: 'videoEmbed';
|
|
52
|
+
url: string;
|
|
53
|
+
title?: string;
|
|
49
54
|
} | {
|
|
50
55
|
type: 'canvas';
|
|
51
56
|
spatial: PageSpatialKind;
|