@bendyline/squisq 2.12.1 → 2.12.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-CHD4fxfm.d.ts → Doc-BkSiCJnM.d.ts} +28 -2
- package/dist/{ImageEditDoc-DSUM5MiA.d.ts → ImageEditDoc-UjQv8q3j.d.ts} +1 -1
- package/dist/{chunk-WAX4QYHA.js → chunk-E2NFHYCB.js} +14 -3
- package/dist/{chunk-H54A35NZ.js → chunk-EX75I5HX.js} +3 -3
- package/dist/{chunk-3H7SYCZS.js → chunk-FTN6SGW5.js} +1 -1
- package/dist/{chunk-QHNO67JS.js → chunk-GX3VSKYS.js} +1 -1
- package/dist/{chunk-I4L4GYDN.js → chunk-HYJ63N6V.js} +1 -1
- package/dist/{chunk-ISH4HDH7.js → chunk-J6AGNXFO.js} +1 -1
- package/dist/{chunk-B3AFOXMA.js → chunk-MPEGJKFJ.js} +1031 -3
- package/dist/chunk-MWSGNEH6.js +2376 -0
- package/dist/{chunk-M6YXFNGO.js → chunk-P53Z4RYC.js} +10 -0
- package/dist/{chunk-B2BQFF5B.js → chunk-SK5TQSYN.js} +20 -20
- package/dist/{chunk-RKCARBWM.js → chunk-VTVBSZXB.js} +78 -1048
- package/dist/chunk-Y25EJEZN.js +178 -0
- package/dist/{chunk-LN72K54P.js → chunk-ZBPWNH4L.js} +10 -9
- package/dist/{chunk-VTG7PNOL.js → chunk-ZKDJHO6Y.js} +3 -8
- package/dist/doc/index.d.ts +17 -9
- package/dist/doc/index.js +41 -39
- 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 +6 -6
- package/dist/index.js +68 -48
- package/dist/jsonForm/index.d.ts +1 -1
- package/dist/jsonForm/index.js +4 -4
- package/dist/markdown/index.d.ts +143 -1
- package/dist/markdown/index.js +29 -10
- package/dist/{materializePageSection-Dx1Sz0vK.d.ts → materializePageSection-DEXohgVt.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 +8 -8
- package/dist/recommend/index.js +3 -2
- package/dist/schemas/index.d.ts +4 -4
- package/dist/schemas/index.js +3 -3
- package/dist/{themeLibrary-DLmZ1Ct8.d.ts → themeLibrary-BrBc0mrP.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 +8 -8
- package/package.json +1 -1
- package/dist/chunk-NNJA7ICB.js +0 -1088
- package/dist/chunk-ZYWYSM6W.js +0 -657
|
@@ -2636,7 +2636,7 @@ interface Block {
|
|
|
2636
2636
|
* A visual element within a block.
|
|
2637
2637
|
* Layers are composited back-to-front (first layer is background).
|
|
2638
2638
|
*/
|
|
2639
|
-
type Layer = ImageLayer | TextLayer | ShapeLayer | PathLayer | MapLayer | VideoLayer | VideoEmbedLayer | TableLayer | TreeLayer | MermaidLayer;
|
|
2639
|
+
type Layer = ImageLayer | TextLayer | ShapeLayer | PathLayer | MapLayer | VideoLayer | VideoEmbedLayer | TableLayer | TreeLayer | MermaidLayer | SvgLayer;
|
|
2640
2640
|
interface BaseLayer {
|
|
2641
2641
|
/** Unique identifier for this layer */
|
|
2642
2642
|
id: string;
|
|
@@ -3041,6 +3041,25 @@ interface MermaidLayer extends BaseLayer {
|
|
|
3041
3041
|
padding?: number;
|
|
3042
3042
|
};
|
|
3043
3043
|
}
|
|
3044
|
+
/**
|
|
3045
|
+
* SVG island layer — an authored ```svg code fence drawn as a picture.
|
|
3046
|
+
*
|
|
3047
|
+
* The layer carries the fence's RAW source, never sanitized markup: every
|
|
3048
|
+
* renderer re-runs core's `parseSvgIsland` and shows only its output, as an
|
|
3049
|
+
* image. A hand-written Doc cannot slip markup past the sanitizer by putting
|
|
3050
|
+
* it on a layer (the same rule `VideoEmbedLayer` follows for player URLs).
|
|
3051
|
+
*/
|
|
3052
|
+
interface SvgLayer extends BaseLayer {
|
|
3053
|
+
type: 'svg';
|
|
3054
|
+
content: {
|
|
3055
|
+
/** Complete fence body (`<svg …>…</svg>`), excluding the fence delimiters. */
|
|
3056
|
+
source: string;
|
|
3057
|
+
/** Text alternative; defaults to the island's own title. */
|
|
3058
|
+
alt?: string;
|
|
3059
|
+
/** The surrounding text color, which the island's `currentColor` follows. */
|
|
3060
|
+
color?: string;
|
|
3061
|
+
};
|
|
3062
|
+
}
|
|
3044
3063
|
/**
|
|
3045
3064
|
* Available map tile styles from free/open-source providers.
|
|
3046
3065
|
*/
|
|
@@ -3098,6 +3117,13 @@ interface TextStyle {
|
|
|
3098
3117
|
* vertical baseline is derived from `position.anchor` (legacy behavior).
|
|
3099
3118
|
*/
|
|
3100
3119
|
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
3120
|
+
/**
|
|
3121
|
+
* Shift the drawn text down by this many em of its rendered size (negative
|
|
3122
|
+
* shifts it up), without moving the layer's box. For optical centering:
|
|
3123
|
+
* vertically centred text aligns its lowercase middle on the anchor, so
|
|
3124
|
+
* capitals in a mixed-case line sit visibly high; ~0.07 balances them.
|
|
3125
|
+
*/
|
|
3126
|
+
baselineShift?: number;
|
|
3101
3127
|
/** Line height multiplier */
|
|
3102
3128
|
lineHeight?: number;
|
|
3103
3129
|
/** Add drop shadow for readability over images */
|
|
@@ -3320,4 +3346,4 @@ declare function getBlockAtTime(blocks: Block[], time: number): Block | null;
|
|
|
3320
3346
|
*/
|
|
3321
3347
|
declare function getCaptionAtTime(captions: CaptionTrack | undefined, time: number): CaptionPhrase | null;
|
|
3322
3348
|
|
|
3323
|
-
export { type FullBleedQuoteInput as $, type AccentImage as A, type BarChartInput as B, type CaptionPhrase as C, type CustomTemplateValidationError as D, type CustomTemplateValidationResult as E, DARK_SURFACE as F, DEFAULT_DOC_FONT as G, DEFAULT_TITLE_FONT as H, type DataTableInput as I, type DateEventInput as J, type DeepPartial as K, type DefinitionCardInput as L, type DiagramBlockInput as M, type DiagramEdgeAnchor as N, type DiagramTemplateEdge as O, type DiagramTemplateNode as P, type Doc as Q, type DocBlock as R, type DocDiagnostic as S, type DonutChartInput as T, type DrawingBlockInput as U, FRONTMATTER_CUSTOM_TEMPLATES_KEY as V, FRONTMATTER_CUSTOM_THEMES_KEY as W, FRONTMATTER_MOTION_KEY as X, type FactCardInput as Y, type FontFamily as Z, type FontFamilyKind as _, type AccentPosition as a, type PersistentLayerTemplate as a$, type GradientBackgroundConfig as a0, type ImageBackgroundConfig as a1, type ImageLayer as a2, type ImageTreatment as a3, type ImageWithCaptionInput as a4, LIGHT_SURFACE as a5, type Layer as a6, type LayerRepeat as a7, type LayoutHints as a8, type LeftFeatureInput as a9, PAGE_EMPHASES as aA, PAGE_EYEBROWS as aB, PAGE_HEADING_CASES as aC, PAGE_HEADING_SCALES as aD, PAGE_HEADING_UNDERLINES as aE, PAGE_HERO_STYLES as aF, PAGE_IMAGE_FRAMINGS as aG, PAGE_NUMERAL_STYLES as aH, PAGE_PATTERNS as aI, PAGE_QUOTE_MARKS as aJ, PAGE_SECTION_KINDS as aK, PAGE_SECTION_SPACINGS as aL, PAGE_SHADOWS as aM, PAGE_VARIANTS as aN, type PageAccentRotation as aO, type PageBackground as aP, type PageDesignFamily as aQ, type PageEmphasis as aR, type PageHeadingTreatment as aS, type PageSectionKind as aT, type PageSectionOverride as aU, type PageTokens as aV, type PageVariant as aW, type PathLayer as aX, type PatternBackgroundConfig as aY, type PersistentLayer as aZ, type PersistentLayerConfig as a_, type LineChartInput as aa, type LinearGradient as ab, type ListBlockInput as ac, MOTION_PROFILES as ad, type MapBlockInput as ae, type MapLayer as af, type MapMarker as ag, type MapTileStyle as ah, type MarkerStyle as ai, type MediaClip as aj, type MediaCrop as ak, type MediaCut as al, type MediaEdits as am, type MediaScheduleOptions as an, type MermaidLayer as ao, type MotionEntrance as ap, type MotionOrigin as aq, type MotionProfile as ar, type MotionProfileName as as, type MotionSpec as at, type MotionState as au, PAGE_ACCENT_STRATEGIES as av, PAGE_BACKGROUNDS as aw, PAGE_BACKGROUND_RHYTHMS as ax, PAGE_DESIGN_FAMILIES as ay, PAGE_DIVIDERS as az, type AmbientGradientConfig as b, type
|
|
3349
|
+
export { type FullBleedQuoteInput as $, type AccentImage as A, type BarChartInput as B, type CaptionPhrase as C, type CustomTemplateValidationError as D, type CustomTemplateValidationResult as E, DARK_SURFACE as F, DEFAULT_DOC_FONT as G, DEFAULT_TITLE_FONT as H, type DataTableInput as I, type DateEventInput as J, type DeepPartial as K, type DefinitionCardInput as L, type DiagramBlockInput as M, type DiagramEdgeAnchor as N, type DiagramTemplateEdge as O, type DiagramTemplateNode as P, type Doc as Q, type DocBlock as R, type DocDiagnostic as S, type DonutChartInput as T, type DrawingBlockInput as U, FRONTMATTER_CUSTOM_TEMPLATES_KEY as V, FRONTMATTER_CUSTOM_THEMES_KEY as W, FRONTMATTER_MOTION_KEY as X, type FactCardInput as Y, type FontFamily as Z, type FontFamilyKind as _, type AccentPosition as a, type PersistentLayerTemplate as a$, type GradientBackgroundConfig as a0, type ImageBackgroundConfig as a1, type ImageLayer as a2, type ImageTreatment as a3, type ImageWithCaptionInput as a4, LIGHT_SURFACE as a5, type Layer as a6, type LayerRepeat as a7, type LayoutHints as a8, type LeftFeatureInput as a9, PAGE_EMPHASES as aA, PAGE_EYEBROWS as aB, PAGE_HEADING_CASES as aC, PAGE_HEADING_SCALES as aD, PAGE_HEADING_UNDERLINES as aE, PAGE_HERO_STYLES as aF, PAGE_IMAGE_FRAMINGS as aG, PAGE_NUMERAL_STYLES as aH, PAGE_PATTERNS as aI, PAGE_QUOTE_MARKS as aJ, PAGE_SECTION_KINDS as aK, PAGE_SECTION_SPACINGS as aL, PAGE_SHADOWS as aM, PAGE_VARIANTS as aN, type PageAccentRotation as aO, type PageBackground as aP, type PageDesignFamily as aQ, type PageEmphasis as aR, type PageHeadingTreatment as aS, type PageSectionKind as aT, type PageSectionOverride as aU, type PageTokens as aV, type PageVariant as aW, type PathLayer as aX, type PatternBackgroundConfig as aY, type PersistentLayer as aZ, type PersistentLayerConfig as a_, type LineChartInput as aa, type LinearGradient as ab, type ListBlockInput as ac, MOTION_PROFILES as ad, type MapBlockInput as ae, type MapLayer as af, type MapMarker as ag, type MapTileStyle as ah, type MarkerStyle as ai, type MediaClip as aj, type MediaCrop as ak, type MediaCut as al, type MediaEdits as am, type MediaScheduleOptions as an, type MermaidLayer as ao, type MotionEntrance as ap, type MotionOrigin as aq, type MotionProfile as ar, type MotionProfileName as as, type MotionSpec as at, type MotionState as au, PAGE_ACCENT_STRATEGIES as av, PAGE_BACKGROUNDS as aw, PAGE_BACKGROUND_RHYTHMS as ax, PAGE_DESIGN_FAMILIES as ay, PAGE_DIVIDERS as az, type AmbientGradientConfig as b, type VideoPullQuoteInput as b$, type PersistentLayerTemplateConfig as b0, type PersistentLayerTemplateType as b1, type PhotoGridInput as b2, type PieChartInput as b3, type PipStyle as b4, type Position as b5, type ProgressIndicatorConfig as b6, type PromotedBodyAnnotation as b7, type PullQuoteInput as b8, type QuoteBlockInput as b9, type ThemePageStyle as bA, type ThemeRegistry as bB, type ThemeSchemaVersion as bC, type ThemeSeedColors as bD, type ThemeStyle as bE, type ThemeTypography as bF, type TimelineBlockInput as bG, type TimelineTemplateEvent as bH, type TimelineTemplateLink as bI, type TimelineTemplateTrack as bJ, type TitleBlockInput as bK, type TitleCaptionConfig as bL, type TranscriptBlockInput as bM, type TreeBlockInput as bN, type TreeLayer as bO, type TreeLayerItem as bP, type TreeLayerStyle as bQ, type TreeTemplateItem as bR, type TwoColumnInput as bS, VIEWPORT_PRESETS as bT, type VideoEmbedLayer as bU, type VideoLayer as bV, type VideoPipPosition as bW, type VideoPipShape as bX, type VideoPipSize as bY, type VideoPlacement as bZ, type VideoPresentation as b_, type RawLayersInput as ba, type RenderStyle as bb, type RightFeatureInput as bc, type ScatterChartInput as bd, type ScheduledClip as be, type SectionHeaderInput as bf, type ShapeFilter as bg, type ShapeLayer as bh, type ShapePattern as bi, type SolidBackgroundConfig as bj, type StartBlockConfig as bk, type StatHighlightInput as bl, type SurfaceScheme as bm, type SvgLayer as bn, THEME_SCHEMA_VERSION as bo, type TableLayer as bp, type TableLayerStyle as bq, type TemplateBlock as br, type TemplateContext as bs, type TemplateFunction as bt, type TemplateRegistry as bu, type TextLayer as bv, type TextStyle as bw, type Theme as bx, type ThemeColorPalette as by, type ThemeColorScheme as bz, type Animation as c, type VideoWithCaptionInput as c0, type ViewportConfig as c1, type ViewportOrientation as c2, type ViewportPreset as c3, type VignetteConfig as c4, applySurface as c5, calculateDuration as c6, calculateFontScale as c7, createTemplateContext as c8, createTheme as c9, MEDIA_FX_ORDER as cA, MEDIA_FX_SPECS as cB, type MediaEditParamKey as cC, type MediaEditParamValues as cD, type MediaFxOp as cE, formatMediaNumber as cF, hasRenderableFx as cG, mediaEditHtmlAttribute as cH, mediaEditValuesFromAttributes as cI, mediaEditValuesFromParams as cJ, mediaRenderKey as cK, normalizeMediaCrop as cL, normalizeMediaCuts as cM, parseMediaCrop as cN, parseMediaCuts as cO, parseMediaEdits as cP, parseMediaFx as cQ, serializeMediaCrop as cR, serializeMediaCuts as cS, serializeMediaEdits as cT, serializeMediaFx as cU, createThemeRegistry as ca, getAspectRatioString as cb, getBlockAtTime as cc, getCaptionAtTime as cd, getDocPlaybackDuration as ce, getLayoutHints as cf, getSafeTextBounds as cg, getSegmentAtTime as ch, getTwoColumnPositions as ci, getViewport as cj, getViewportOrientation as ck, isCustomTemplateDefinition as cl, isMotionProfileName as cm, isPersistentLayerTemplate as cn, isTemplateBlock as co, scaledFontSize$1 as cp, readFrontmatterMotion as cq, resolveMediaSchedule as cr, resolveMotionForDoc as cs, resolveMotionProfile as ct, scaledFontSize as cu, scheduleMediaClip as cv, validateCustomTemplateDefinition as cw, type MediaFxOpId as cx, type MediaFxChain as cy, MEDIA_EDIT_PARAMS as cz, type AnimationType as d, type AreaChartInput as e, type AudioBookmark as f, type AudioSegment as g, type AudioTimingData as h, type AudioTrack as i, type BigTextInput as j, type Block as k, type BlockConnection as l, type BorderStyle as m, type CaptionTrack as n, type CaptionWord as o, type ChartBaseFields as p, type ChartTemplateInput as q, type ColorScheme as r, type ColumnChartInput as s, type ComparisonBarInput as t, type ContentBlockInput as u, type CornerBrandingConfig as v, type CountUpSpec as w, type CreateTemplateContextOptions as x, type CustomTemplateDefinition as y, type CustomTemplateLayer as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a2 as ImageLayer,
|
|
1
|
+
import { a2 as ImageLayer, bv as TextLayer, bh as ShapeLayer, aX as PathLayer } from './Doc-BkSiCJnM.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* ImageEditDoc — JSON document describing a layered, editable image.
|
|
@@ -15,10 +15,11 @@ import {
|
|
|
15
15
|
relativeLuminance,
|
|
16
16
|
resolveFontFamily,
|
|
17
17
|
withAlpha
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-HYJ63N6V.js";
|
|
19
19
|
import {
|
|
20
|
+
SVG_ISLAND_LIMITS,
|
|
20
21
|
parseBuildSpec
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-P53Z4RYC.js";
|
|
22
23
|
|
|
23
24
|
// src/schemas/Doc.ts
|
|
24
25
|
function calculateDuration(audio) {
|
|
@@ -63,7 +64,8 @@ var LAYER_TYPES = /* @__PURE__ */ new Set([
|
|
|
63
64
|
"videoEmbed",
|
|
64
65
|
"table",
|
|
65
66
|
"tree",
|
|
66
|
-
"mermaid"
|
|
67
|
+
"mermaid",
|
|
68
|
+
"svg"
|
|
67
69
|
]);
|
|
68
70
|
function validateDocSchema(value) {
|
|
69
71
|
const issues = [];
|
|
@@ -223,6 +225,15 @@ function validateLayerContent(type, content, path, issues) {
|
|
|
223
225
|
case "mermaid":
|
|
224
226
|
requiredString(content, "source", `${path}.source`, issues);
|
|
225
227
|
break;
|
|
228
|
+
case "svg": {
|
|
229
|
+
const source = requiredString(content, "source", `${path}.source`, issues);
|
|
230
|
+
if (source !== void 0 && source.length > SVG_ISLAND_LIMITS.maxSourceBytes) {
|
|
231
|
+
add(issues, `${path}.source`, "is larger than an SVG island may be", source.length);
|
|
232
|
+
}
|
|
233
|
+
optionalString(content, "alt", `${path}.alt`, issues);
|
|
234
|
+
optionalString(content, "color", `${path}.color`, issues);
|
|
235
|
+
break;
|
|
236
|
+
}
|
|
226
237
|
}
|
|
227
238
|
}
|
|
228
239
|
function validatePosition(value, path, issues) {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
-
coerceAnnotationValues,
|
|
3
2
|
isReservedAnnotationToken,
|
|
4
3
|
matchTrailingPandocAttr,
|
|
5
4
|
matchTrailingTemplateAnnotation,
|
|
6
5
|
quoteAttrValue,
|
|
7
6
|
splitKeyValueToken,
|
|
8
7
|
tokenizeAttrTokens
|
|
9
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-Y25EJEZN.js";
|
|
10
9
|
import {
|
|
10
|
+
coerceAnnotationValues,
|
|
11
11
|
parseFrontmatter,
|
|
12
12
|
parseHtmlToNodes
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MWSGNEH6.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveIcon
|
|
16
16
|
} from "./chunk-CZ7AUSLI.js";
|