@bendyline/squisq 2.13.1 → 2.13.3
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-C7iCmmmF.d.ts → Doc-BPhdJFS_.d.ts} +53 -2
- package/dist/{ImageEditDoc-CxRHe41J.d.ts → ImageEditDoc-DDx-sw_S.d.ts} +1 -1
- package/dist/{chunk-ITLJQG7Z.js → chunk-5FUBK3DK.js} +527 -266
- package/dist/{chunk-HE3HQZWU.js → chunk-6NWVLLMI.js} +104 -1
- package/dist/{chunk-3A6YM375.js → chunk-D3JQMZUT.js} +8 -8
- package/dist/chunk-DOOUVVOM.js +78 -0
- package/dist/{chunk-2LTALYXX.js → chunk-F3LRTRST.js} +15 -10
- package/dist/{chunk-5SVFLLOD.js → chunk-ISVJ42I3.js} +3 -0
- package/dist/{chunk-7ZXCS3UU.js → chunk-JFJZ4NS6.js} +2 -2
- package/dist/{chunk-V4USYYYO.js → chunk-JOBMPMY5.js} +1 -1
- package/dist/{chunk-HGCIIXHP.js → chunk-POZCKPCO.js} +235 -4
- package/dist/{chunk-DCO5GYVW.js → chunk-VX7MPZOK.js} +5 -5
- package/dist/doc/index.d.ts +100 -15
- package/dist/doc/index.js +15 -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 +5 -5
- package/dist/index.js +26 -18
- package/dist/jsonForm/index.d.ts +1 -1
- package/dist/jsonForm/index.js +1 -1
- package/dist/markdown/index.js +11 -12
- package/dist/{materializePageSection-_5uQrEYP.d.ts → materializePageSection-DnQi-0TA.d.ts} +1 -1
- package/dist/mediaEdit/index.d.ts +2 -2
- package/dist/narration/index.d.ts +1 -1
- package/dist/narration/index.js +5 -5
- package/dist/recommend/index.js +3 -2
- package/dist/schemas/index.d.ts +4 -4
- package/dist/schemas/index.js +1 -1
- package/dist/{themeLibrary-DsntZLoa.d.ts → themeLibrary-DM7eSK1w.d.ts} +1 -1
- package/dist/timing/index.d.ts +1 -1
- package/dist/transform/index.d.ts +2 -2
- package/dist/transform/index.js +6 -6
- package/package.json +1 -1
- package/dist/chunk-Y25EJEZN.js +0 -178
package/dist/jsonForm/index.js
CHANGED
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-JFJZ4NS6.js";
|
|
21
21
|
import {
|
|
22
22
|
DEFAULT_MARKDOWN_SAFETY_LIMITS,
|
|
23
23
|
MarkdownLimitError,
|
|
@@ -32,16 +32,8 @@ import {
|
|
|
32
32
|
serializePandocAttributes,
|
|
33
33
|
toMdast,
|
|
34
34
|
wikiLinkPath
|
|
35
|
-
} from "../chunk-
|
|
36
|
-
import
|
|
37
|
-
matchTrailingPandocAttr,
|
|
38
|
-
matchTrailingTemplateAnnotation,
|
|
39
|
-
needsQuoting,
|
|
40
|
-
quoteAttrValue,
|
|
41
|
-
splitKeyValueToken,
|
|
42
|
-
tokenizeAttrTokens,
|
|
43
|
-
unquoteAttrValue
|
|
44
|
-
} from "../chunk-Y25EJEZN.js";
|
|
35
|
+
} from "../chunk-D3JQMZUT.js";
|
|
36
|
+
import "../chunk-DOOUVVOM.js";
|
|
45
37
|
import {
|
|
46
38
|
BLOCK_META_KEY_DESCRIPTORS,
|
|
47
39
|
KNOWN_BLOCK_META_KEYS,
|
|
@@ -61,7 +53,10 @@ import {
|
|
|
61
53
|
isSvgIslandFence,
|
|
62
54
|
isSvgIslandLang,
|
|
63
55
|
isVideoEmbedUrl,
|
|
56
|
+
matchTrailingPandocAttr,
|
|
57
|
+
matchTrailingTemplateAnnotation,
|
|
64
58
|
mediaKindForUrl,
|
|
59
|
+
needsQuoting,
|
|
65
60
|
parseFrontmatter,
|
|
66
61
|
parseHtmlToNodes,
|
|
67
62
|
parseSvgIsland,
|
|
@@ -70,20 +65,24 @@ import {
|
|
|
70
65
|
parseVideoEmbedUrl,
|
|
71
66
|
parseVideoStartTime,
|
|
72
67
|
plainTextFromInlineHtml,
|
|
68
|
+
quoteAttrValue,
|
|
73
69
|
readFrontmatterThemeId,
|
|
74
70
|
sanitizeHtmlNodes,
|
|
75
71
|
sanitizeUrl,
|
|
76
72
|
setFrontmatterValues,
|
|
77
73
|
splitFrontmatterBlock,
|
|
74
|
+
splitKeyValueToken,
|
|
78
75
|
stringifyHtmlNodes,
|
|
79
76
|
svgIslandDataUrl,
|
|
80
77
|
svgIslandMarkup,
|
|
81
78
|
svgSourceFromBytes,
|
|
82
79
|
svgSourceFromDataUrl,
|
|
80
|
+
tokenizeAttrTokens,
|
|
81
|
+
unquoteAttrValue,
|
|
83
82
|
videoEmbedFromIframe,
|
|
84
83
|
videoEmbedIframeAttributes,
|
|
85
84
|
walkMarkdownTree
|
|
86
|
-
} from "../chunk-
|
|
85
|
+
} from "../chunk-6NWVLLMI.js";
|
|
87
86
|
import "../chunk-CZ7AUSLI.js";
|
|
88
87
|
import {
|
|
89
88
|
SVG_ISLAND_LIMITS
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as Block,
|
|
1
|
+
import { k as Block, aV as PageSectionKind, aT as PageEmphasis, bE as ThemeColorScheme, aR as PageBackground, bC as Theme, c7 as ViewportConfig, z as CustomTemplateDefinition, aY as PageVariant, bm as StartBlockConfig, R as Doc, bF as ThemePageStyle } from './Doc-BPhdJFS_.js';
|
|
2
2
|
import { M as MarkdownBlockNode } from './types-Zk8qYuaT.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { am as MediaCut, R as Doc, ak as MediaClip, cD as MediaFxOpId, cE as MediaFxChain } from '../Doc-BPhdJFS_.js';
|
|
2
|
+
export { cF as MEDIA_EDIT_PARAMS, cG as MEDIA_FX_ORDER, cH as MEDIA_FX_SPECS, al as MediaCrop, cI as MediaEditParamKey, cJ as MediaEditParamValues, an as MediaEdits, cK as MediaFxOp, cL as formatMediaNumber, cM as hasRenderableFx, cN as mediaEditHtmlAttribute, cO as mediaEditValuesFromAttributes, cP as mediaEditValuesFromParams, cQ as mediaRenderKey, cR as normalizeMediaCrop, cS as normalizeMediaCuts, cT as parseMediaCrop, cU as parseMediaCuts, cV as parseMediaEdits, cW as parseMediaFx, cX as serializeMediaCrop, cY as serializeMediaCuts, cZ as serializeMediaEdits, c_ as serializeMediaFx } from '../Doc-BPhdJFS_.js';
|
|
3
3
|
import '../types-Zk8qYuaT.js';
|
|
4
4
|
|
|
5
5
|
/**
|
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-JOBMPMY5.js";
|
|
31
31
|
import "../chunk-NEWNNLWN.js";
|
|
32
32
|
import {
|
|
33
33
|
buildNarrationTimingJson,
|
|
@@ -41,13 +41,13 @@ import {
|
|
|
41
41
|
wordIndexAtChar,
|
|
42
42
|
wordIndexAtTime,
|
|
43
43
|
wordPosAtExpectedSyllables
|
|
44
|
-
} from "../chunk-
|
|
45
|
-
import "../chunk-
|
|
44
|
+
} from "../chunk-5FUBK3DK.js";
|
|
45
|
+
import "../chunk-POZCKPCO.js";
|
|
46
46
|
import "../chunk-FUBMT6SJ.js";
|
|
47
47
|
import "../chunk-WNEH3BZP.js";
|
|
48
48
|
import "../chunk-L7QZORLB.js";
|
|
49
|
-
import "../chunk-
|
|
50
|
-
import "../chunk-
|
|
49
|
+
import "../chunk-DOOUVVOM.js";
|
|
50
|
+
import "../chunk-6NWVLLMI.js";
|
|
51
51
|
import "../chunk-P53Z4RYC.js";
|
|
52
52
|
import "../chunk-GHOPHGOK.js";
|
|
53
53
|
import "../chunk-XRW6P7IF.js";
|
package/dist/recommend/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
profileBlockContents,
|
|
3
3
|
recommendTemplatesForBlock
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-POZCKPCO.js";
|
|
5
|
+
import "../chunk-L7QZORLB.js";
|
|
6
|
+
import "../chunk-6NWVLLMI.js";
|
|
6
7
|
import "../chunk-P53Z4RYC.js";
|
|
7
8
|
export {
|
|
8
9
|
profileBlockContents,
|
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, C as CaptionPhrase,
|
|
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 { R as Doc, bC as Theme, bF as ThemePageStyle, bE as ThemeColorScheme, L as DeepPartial, bI as ThemeSeedColors, bD as ThemeColorPalette, $ as FontFamilyKind, _ as FontFamily } from '../Doc-BPhdJFS_.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 ChartBaseFields, r as ChartTemplateInput, s as ColorScheme, t as ColumnChartInput, u as ComparisonBarInput, v as ContentBlockInput, w as CornerBrandingConfig, x as CountUpSpec, y as CreateTemplateContextOptions, z as CustomTemplateDefinition, D as CustomTemplateLayer, E as CustomTemplateValidationError, F as CustomTemplateValidationResult, G as DARK_SURFACE, H as DEFAULT_DOC_FONT, I as DEFAULT_TITLE_FONT, J as DataTableInput, K as DateEventInput, M as DefinitionCardInput, N as DiagramBlockInput, O as DiagramEdgeAnchor, P as DiagramTemplateEdge, Q as DiagramTemplateNode, S as DocBlock, T as DocDiagnostic, U as DonutChartInput, V as DrawingBlockInput, W as FRONTMATTER_CUSTOM_TEMPLATES_KEY, X as FRONTMATTER_CUSTOM_THEMES_KEY, Y as FRONTMATTER_MOTION_KEY, Z as FactCardInput, a0 as FullBleedQuoteInput, a1 as GradientBackgroundConfig, a2 as ImageBackgroundConfig, a3 as ImageLayer, a4 as ImageTreatment, a5 as ImageWithCaptionInput, a6 as LIGHT_SURFACE, a7 as Layer, a8 as LayerRepeat, a9 as LayoutHints, aa as LeftFeatureInput, ab as LineChartInput, ac as LinearGradient, ad as ListBlockInput, ae as MOTION_PROFILES, af as MapBlockInput, ag as MapLayer, ah as MapMarker, ai as MapTileStyle, aj as MarkerStyle, ak as MediaClip, al as MediaCrop, am as MediaCut, an as MediaEdits, ao as MediaOnlyInput, ap as MediaScheduleOptions, aq as MermaidLayer, ar as MotionEntrance, as as MotionOrigin, at as MotionProfile, au as MotionProfileName, av as MotionSpec, aw as MotionState, ax as PAGE_ACCENT_STRATEGIES, ay as PAGE_BACKGROUNDS, az as PAGE_BACKGROUND_RHYTHMS, aA as PAGE_DESIGN_FAMILIES, aB as PAGE_DIVIDERS, aC as PAGE_EMPHASES, aD as PAGE_EYEBROWS, aE as PAGE_HEADING_CASES, aF as PAGE_HEADING_SCALES, aG as PAGE_HEADING_UNDERLINES, aH as PAGE_HERO_STYLES, aI as PAGE_IMAGE_FRAMINGS, aJ as PAGE_NUMERAL_STYLES, aK as PAGE_PATTERNS, aL as PAGE_QUOTE_MARKS, aM as PAGE_SECTION_KINDS, aN as PAGE_SECTION_SPACINGS, aO as PAGE_SHADOWS, aP as PAGE_VARIANTS, aQ as PageAccentRotation, aR as PageBackground, aS as PageDesignFamily, aT as PageEmphasis, aU as PageHeadingTreatment, aV as PageSectionKind, aW as PageSectionOverride, aX as PageTokens, aY as PageVariant, aZ as PathLayer, a_ as PatternBackgroundConfig, a$ as PersistentLayer, b0 as PersistentLayerConfig, b1 as PersistentLayerTemplate, b2 as PersistentLayerTemplateConfig, b3 as PersistentLayerTemplateType, b4 as PhotoGridInput, b5 as PieChartInput, b6 as PipStyle, b7 as Position, b8 as ProgressIndicatorConfig, b9 as PromotedBodyAnnotation, ba as PullQuoteInput, bb as QuoteBlockInput, bc as RawLayersInput, bd as RenderStyle, be as RightFeatureInput, bf as ScatterChartInput, bg as ScheduledClip, bh as SectionHeaderInput, bi as ShapeFilter, bj as ShapeLayer, bk as ShapePattern, bl as SolidBackgroundConfig, bm as StartBlockConfig, bn as StatHighlightInput, bo as SurfaceScheme, bp as SvgLayer, bq as THEME_SCHEMA_VERSION, br as TableLayer, bs as TableLayerStyle, bt as TemplateBlock, bu as TemplateContext, bv as TemplateFunction, bw as TemplateRegistry, bx as TextFlow, by as TextLayer, bz as TextParagraph, bA as TextParagraphList, bB as TextStyle, bG as ThemeRegistry, bH as ThemeSchemaVersion, bJ as ThemeStyle, bK as ThemeTypography, bL as TimelineBlockInput, bM as TimelineTemplateEvent, bN as TimelineTemplateLink, bO as TimelineTemplateTrack, bP as TitleBlockInput, bQ as TitleCaptionConfig, bR as TopFeatureInput, bS as TranscriptBlockInput, bT as TreeBlockInput, bU as TreeLayer, bV as TreeLayerItem, bW as TreeLayerStyle, bX as TreeTemplateItem, bY as TwoColumnInput, bZ as VIEWPORT_PRESETS, b_ as VideoEmbedLayer, b$ as VideoLayer, c0 as VideoPipPosition, c1 as VideoPipShape, c2 as VideoPipSize, c3 as VideoPlacement, c4 as VideoPresentation, c5 as VideoPullQuoteInput, c6 as VideoWithCaptionInput, c7 as ViewportConfig, c8 as ViewportOrientation, c9 as ViewportPreset, ca as VignetteConfig, cb as applySurface, cc as calculateDuration, cd as calculateFontScale, ce as createTemplateContext, cf as createTheme, cg as createThemeRegistry, ch as getAspectRatioString, ci as getBlockAtTime, cj as getCaptionAtTime, ck as getDocPlaybackDuration, cl as getLayoutHints, cm as getSafeTextBounds, cn as getSegmentAtTime, co as getTwoColumnPositions, cp as getViewport, cq as getViewportOrientation, cr as isCustomTemplateDefinition, cs as isMotionProfileName, ct as isPersistentLayerTemplate, cu as isTemplateBlock, cv as layoutScaledFontSize, cw as readFrontmatterMotion, cx as resolveMediaSchedule, cy as resolveMotionForDoc, cz as resolveMotionProfile, cA as scaledFontSize, cB as scheduleMediaClip, cC as validateCustomTemplateDefinition } from '../Doc-BPhdJFS_.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-DM7eSK1w.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-DDx-sw_S.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Runtime validation for the canonical {@link Doc} JSON shape.
|
package/dist/schemas/index.js
CHANGED
package/dist/timing/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as PageTransformHints } from '../materializePageSection-
|
|
1
|
+
import { R as Doc, s as ColorScheme, k as Block, bt as TemplateBlock } from '../Doc-BPhdJFS_.js';
|
|
2
|
+
import { i as PageTransformHints } from '../materializePageSection-DnQi-0TA.js';
|
|
3
3
|
import { d as ExtractionType, E as ExtractedElement, b as ExtractionOptions } from '../contentExtractor-BNfVJV2U.js';
|
|
4
4
|
import { f as BuildSpec } from '../types-Zk8qYuaT.js';
|
|
5
5
|
|
package/dist/transform/index.js
CHANGED
|
@@ -24,16 +24,16 @@ import {
|
|
|
24
24
|
serializePresentationPlan,
|
|
25
25
|
transformNarratedSegment,
|
|
26
26
|
usesDynamicPresentation
|
|
27
|
-
} from "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
27
|
+
} from "../chunk-VX7MPZOK.js";
|
|
28
|
+
import "../chunk-5FUBK3DK.js";
|
|
29
|
+
import "../chunk-POZCKPCO.js";
|
|
30
30
|
import "../chunk-SVN7T6BK.js";
|
|
31
31
|
import "../chunk-FUBMT6SJ.js";
|
|
32
32
|
import "../chunk-WNEH3BZP.js";
|
|
33
33
|
import "../chunk-L7QZORLB.js";
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
34
|
+
import "../chunk-D3JQMZUT.js";
|
|
35
|
+
import "../chunk-DOOUVVOM.js";
|
|
36
|
+
import "../chunk-6NWVLLMI.js";
|
|
37
37
|
import "../chunk-CZ7AUSLI.js";
|
|
38
38
|
import "../chunk-P53Z4RYC.js";
|
|
39
39
|
import "../chunk-GHOPHGOK.js";
|
package/package.json
CHANGED
package/dist/chunk-Y25EJEZN.js
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
// src/doc/templates/templateNames.ts
|
|
2
|
-
var TEMPLATE_ALIASES = Object.freeze({
|
|
3
|
-
titleBlock: "title",
|
|
4
|
-
quoteBlock: "quote",
|
|
5
|
-
mapBlock: "map",
|
|
6
|
-
listBlock: "list",
|
|
7
|
-
diagramBlock: "diagram",
|
|
8
|
-
diagramNode: "diagram"
|
|
9
|
-
});
|
|
10
|
-
function resolveTemplateName(name) {
|
|
11
|
-
return TEMPLATE_ALIASES[name] ?? name;
|
|
12
|
-
}
|
|
13
|
-
var TABLE_FED_TEMPLATES = /* @__PURE__ */ new Set([
|
|
14
|
-
"dataTable",
|
|
15
|
-
"barChart",
|
|
16
|
-
"columnChart",
|
|
17
|
-
"pieChart",
|
|
18
|
-
"donutChart",
|
|
19
|
-
"lineChart",
|
|
20
|
-
"areaChart",
|
|
21
|
-
"scatterChart"
|
|
22
|
-
]);
|
|
23
|
-
var CONTAINER_TEMPLATES = /* @__PURE__ */ new Set(["diagram", "drawing", "layout"]);
|
|
24
|
-
function isContainerTemplate(name) {
|
|
25
|
-
return !!name && CONTAINER_TEMPLATES.has(resolveTemplateName(name));
|
|
26
|
-
}
|
|
27
|
-
var TEMPLATE_TOKEN_NAMES = /* @__PURE__ */ new Set([
|
|
28
|
-
"title",
|
|
29
|
-
"sectionHeader",
|
|
30
|
-
"bigText",
|
|
31
|
-
"transcript",
|
|
32
|
-
"content",
|
|
33
|
-
"statHighlight",
|
|
34
|
-
"quote",
|
|
35
|
-
"factCard",
|
|
36
|
-
"twoColumn",
|
|
37
|
-
"dateEvent",
|
|
38
|
-
"imageWithCaption",
|
|
39
|
-
"leftFeature",
|
|
40
|
-
"rightFeature",
|
|
41
|
-
"map",
|
|
42
|
-
"fullBleedQuote",
|
|
43
|
-
"list",
|
|
44
|
-
"photoGrid",
|
|
45
|
-
"definitionCard",
|
|
46
|
-
"comparisonBar",
|
|
47
|
-
"pullQuote",
|
|
48
|
-
"videoWithCaption",
|
|
49
|
-
"videoPullQuote",
|
|
50
|
-
"dataTable",
|
|
51
|
-
"barChart",
|
|
52
|
-
"columnChart",
|
|
53
|
-
"pieChart",
|
|
54
|
-
"donutChart",
|
|
55
|
-
"lineChart",
|
|
56
|
-
"areaChart",
|
|
57
|
-
"scatterChart",
|
|
58
|
-
"diagram",
|
|
59
|
-
"tree",
|
|
60
|
-
"timeline",
|
|
61
|
-
"layout",
|
|
62
|
-
"drawing"
|
|
63
|
-
]);
|
|
64
|
-
function isReservedAnnotationToken(token) {
|
|
65
|
-
return TEMPLATE_TOKEN_NAMES.has(resolveTemplateName(token));
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// src/markdown/attrTokens.ts
|
|
69
|
-
var DQ_RUN = `"(?:[^"\\\\]|\\\\.)*"`;
|
|
70
|
-
var SQ_RUN = `'(?:[^'\\\\]|\\\\.)*'`;
|
|
71
|
-
var TEMPLATE_STRICT_RE = new RegExp(
|
|
72
|
-
`\\s*\\{\\[((?:[^\\]"']|${DQ_RUN}|${SQ_RUN})*)\\]\\}[\\s\\]}]*$`
|
|
73
|
-
);
|
|
74
|
-
var TEMPLATE_LEGACY_RE = /\s*\{\[([^\]]*)\]\}[\s\]}]*$/;
|
|
75
|
-
var PANDOC_STRICT_RE = new RegExp(`\\s*\\{(?!\\[)((?:[^}"']|${DQ_RUN}|${SQ_RUN})*)\\}\\s*$`);
|
|
76
|
-
var PANDOC_LEGACY_RE = /\s*\{(?!\[)([^}]*)\}\s*$/;
|
|
77
|
-
function matchTrailing(text, strict, legacy) {
|
|
78
|
-
const m = strict.exec(text) ?? legacy.exec(text);
|
|
79
|
-
return m ? { inner: m[1], index: m.index } : null;
|
|
80
|
-
}
|
|
81
|
-
function matchTrailingTemplateAnnotation(text) {
|
|
82
|
-
return matchTrailing(text, TEMPLATE_STRICT_RE, TEMPLATE_LEGACY_RE);
|
|
83
|
-
}
|
|
84
|
-
function matchTrailingPandocAttr(text) {
|
|
85
|
-
return matchTrailing(text, PANDOC_STRICT_RE, PANDOC_LEGACY_RE);
|
|
86
|
-
}
|
|
87
|
-
var WHITESPACE_RE = /\s/;
|
|
88
|
-
function tokenizeAttrTokens(input) {
|
|
89
|
-
const tokens = [];
|
|
90
|
-
let i = 0;
|
|
91
|
-
const n = input.length;
|
|
92
|
-
while (i < n) {
|
|
93
|
-
while (i < n && WHITESPACE_RE.test(input[i])) i++;
|
|
94
|
-
if (i >= n) break;
|
|
95
|
-
let token = "";
|
|
96
|
-
while (i < n && !WHITESPACE_RE.test(input[i])) {
|
|
97
|
-
const ch = input[i];
|
|
98
|
-
const atValueStart = token === "" || token.endsWith("=");
|
|
99
|
-
if ((ch === '"' || ch === "'") && atValueStart) {
|
|
100
|
-
token += ch;
|
|
101
|
-
i++;
|
|
102
|
-
while (i < n && input[i] !== ch) {
|
|
103
|
-
if (input[i] === "\\" && i + 1 < n && (input[i + 1] === ch || input[i + 1] === "\\")) {
|
|
104
|
-
token += input[i] + input[i + 1];
|
|
105
|
-
i += 2;
|
|
106
|
-
} else {
|
|
107
|
-
token += input[i];
|
|
108
|
-
i++;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
if (i < n && input[i] === ch) {
|
|
112
|
-
token += ch;
|
|
113
|
-
i++;
|
|
114
|
-
}
|
|
115
|
-
} else {
|
|
116
|
-
token += ch;
|
|
117
|
-
i++;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
if (token) tokens.push(token);
|
|
121
|
-
}
|
|
122
|
-
return tokens;
|
|
123
|
-
}
|
|
124
|
-
var DQ_UNESCAPE_RE = /\\([\\"])/g;
|
|
125
|
-
var SQ_UNESCAPE_RE = /\\([\\'])/g;
|
|
126
|
-
function unquoteAttrValue(raw) {
|
|
127
|
-
if (raw.length >= 2) {
|
|
128
|
-
const q = raw[0];
|
|
129
|
-
if ((q === '"' || q === "'") && raw.endsWith(q)) {
|
|
130
|
-
const body = raw.slice(1, -1);
|
|
131
|
-
return body.replace(q === '"' ? DQ_UNESCAPE_RE : SQ_UNESCAPE_RE, "$1");
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
return raw;
|
|
135
|
-
}
|
|
136
|
-
function splitKeyValueToken(token) {
|
|
137
|
-
const eqIdx = token.indexOf("=");
|
|
138
|
-
if (eqIdx <= 0) return null;
|
|
139
|
-
return { key: token.slice(0, eqIdx), value: unquoteAttrValue(token.slice(eqIdx + 1)) };
|
|
140
|
-
}
|
|
141
|
-
var NEEDS_QUOTING_RE = /[\s"'[\]{}]/;
|
|
142
|
-
var DQ_ESCAPE_RE = /[\\"]/g;
|
|
143
|
-
var SQ_ESCAPE_RE = /[\\']/g;
|
|
144
|
-
function needsQuoting(value) {
|
|
145
|
-
return value === "" || NEEDS_QUOTING_RE.test(value);
|
|
146
|
-
}
|
|
147
|
-
function quoteAttrValue(value) {
|
|
148
|
-
if (!needsQuoting(value)) return value;
|
|
149
|
-
if (value.includes('"') && !value.includes("'")) {
|
|
150
|
-
return `'${value.replace(SQ_ESCAPE_RE, (ch) => `\\${ch}`)}'`;
|
|
151
|
-
}
|
|
152
|
-
return `"${value.replace(DQ_ESCAPE_RE, (ch) => `\\${ch}`)}"`;
|
|
153
|
-
}
|
|
154
|
-
function serializeAnnotation(template, params) {
|
|
155
|
-
const parts = [];
|
|
156
|
-
if (template) parts.push(template);
|
|
157
|
-
for (const [key, value] of Object.entries(params ?? {})) {
|
|
158
|
-
parts.push(`${key}=${quoteAttrValue(value)}`);
|
|
159
|
-
}
|
|
160
|
-
return `{[${parts.join(" ")}]}`;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export {
|
|
164
|
-
TEMPLATE_ALIASES,
|
|
165
|
-
resolveTemplateName,
|
|
166
|
-
TABLE_FED_TEMPLATES,
|
|
167
|
-
CONTAINER_TEMPLATES,
|
|
168
|
-
isContainerTemplate,
|
|
169
|
-
isReservedAnnotationToken,
|
|
170
|
-
matchTrailingTemplateAnnotation,
|
|
171
|
-
matchTrailingPandocAttr,
|
|
172
|
-
tokenizeAttrTokens,
|
|
173
|
-
unquoteAttrValue,
|
|
174
|
-
splitKeyValueToken,
|
|
175
|
-
needsQuoting,
|
|
176
|
-
quoteAttrValue,
|
|
177
|
-
serializeAnnotation
|
|
178
|
-
};
|