@bendyline/squisq 2.3.3 → 2.4.0
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-BrgZC7SE.d.ts → Doc-DLpyOAXJ.d.ts} +87 -2
- package/dist/{ImageEditDoc-rum0Xb9P.d.ts → ImageEditDoc-Cu30xb9b.d.ts} +1 -1
- package/dist/{chunk-2ZWIXGAC.js → chunk-2S74DPJH.js} +4 -0
- package/dist/{chunk-RS5AP3J4.js → chunk-AE3IUKMM.js} +1 -1
- package/dist/{chunk-QWCFK5FN.js → chunk-CUYHFOFL.js} +5 -1
- package/dist/{chunk-G3JOS25T.js → chunk-D4LPP3P5.js} +43 -14
- package/dist/{chunk-GQNH7PLN.js → chunk-F2IEPSMA.js} +1320 -8
- package/dist/{chunk-IZLKI3IL.js → chunk-KPBZZVGY.js} +29 -5
- package/dist/{chunk-BCCXTMN5.js → chunk-O7JILDEF.js} +7 -0
- package/dist/{chunk-SPTY4C6F.js → chunk-REDUXXDJ.js} +1 -1
- package/dist/{chunk-ABP4LAJS.js → chunk-ZHLNKB2I.js} +1 -1
- package/dist/chunk-ZYO3DBTA.js +983 -0
- package/dist/doc/index.d.ts +103 -6
- package/dist/doc/index.js +8 -6
- 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 +29 -11
- package/dist/jsonForm/index.d.ts +1 -1
- package/dist/jsonForm/index.js +2 -2
- package/dist/markdown/index.d.ts +118 -1
- package/dist/markdown/index.js +21 -5
- package/dist/{materializePageSection-CrZWYnXM.d.ts → materializePageSection-CgNs5Qmw.d.ts} +2 -2
- package/dist/narration/index.d.ts +1 -1
- package/dist/narration/index.js +4 -4
- package/dist/recommend/index.js +2 -2
- package/dist/schemas/index.d.ts +4 -4
- package/dist/schemas/index.js +2 -2
- package/dist/{themeLibrary-DJt89gyP.d.ts → themeLibrary-RWsNtlOu.d.ts} +1 -1
- package/dist/transform/index.d.ts +2 -2
- package/dist/transform/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-UA5DTYAY.js +0 -400
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SHAPE_NAMES,
|
|
3
3
|
TEMPLATE_ALIASES,
|
|
4
|
+
buildChartData,
|
|
4
5
|
buildNarrationScript,
|
|
5
6
|
coerceTemplateParams,
|
|
6
7
|
deriveTemplateInputs,
|
|
@@ -25,7 +26,7 @@ import {
|
|
|
25
26
|
templateRegistry,
|
|
26
27
|
writeCustomTemplatesToFrontmatter,
|
|
27
28
|
writeCustomThemesToFrontmatter
|
|
28
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-F2IEPSMA.js";
|
|
29
30
|
import {
|
|
30
31
|
ASCII_TREE_VOCAB,
|
|
31
32
|
ASCII_VOCAB,
|
|
@@ -41,11 +42,11 @@ import {
|
|
|
41
42
|
toCells,
|
|
42
43
|
toGrid,
|
|
43
44
|
traceBoxes
|
|
44
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-CUYHFOFL.js";
|
|
45
46
|
import {
|
|
46
47
|
defaultPageStyle,
|
|
47
48
|
resolveMediaSchedule
|
|
48
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-2S74DPJH.js";
|
|
49
50
|
import {
|
|
50
51
|
DEFAULT_THEME,
|
|
51
52
|
FRONTMATTER_CUSTOM_TEMPLATES_KEY,
|
|
@@ -60,7 +61,7 @@ import {
|
|
|
60
61
|
} from "./chunk-BAOV476U.js";
|
|
61
62
|
import {
|
|
62
63
|
parseMarkdown
|
|
63
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-D4LPP3P5.js";
|
|
64
65
|
import {
|
|
65
66
|
KNOWN_BLOCK_META_KEYS,
|
|
66
67
|
coerceAnnotationValues,
|
|
@@ -69,8 +70,9 @@ import {
|
|
|
69
70
|
import {
|
|
70
71
|
extractPlainText,
|
|
71
72
|
getChildren,
|
|
73
|
+
parseHtmlToNodes,
|
|
72
74
|
readFrontmatterThemeId
|
|
73
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-O7JILDEF.js";
|
|
74
76
|
import {
|
|
75
77
|
estimateTimeFromText
|
|
76
78
|
} from "./chunk-67L6WRJN.js";
|
|
@@ -415,10 +417,19 @@ function synthesizeAnnotationParagraph(block) {
|
|
|
415
417
|
return { type: "paragraph", children: [{ type: "text", value: text }] };
|
|
416
418
|
}
|
|
417
419
|
function synthesizeMediaParagraph(clip) {
|
|
420
|
+
if (clip.origin?.format === "html" && clip.origin.raw) {
|
|
421
|
+
return {
|
|
422
|
+
type: "htmlBlock",
|
|
423
|
+
rawHtml: clip.origin.raw,
|
|
424
|
+
htmlChildren: parseHtmlToNodes(clip.origin.raw)
|
|
425
|
+
};
|
|
426
|
+
}
|
|
418
427
|
if (clip.origin?.raw) {
|
|
419
428
|
return { type: "paragraph", children: [{ type: "text", value: clip.origin.raw }] };
|
|
420
429
|
}
|
|
421
430
|
const params = { src: clip.src };
|
|
431
|
+
if (clip.placement) params.placement = clip.placement;
|
|
432
|
+
if (clip.lockToBlock != null) params.lockToBlock = String(clip.lockToBlock);
|
|
422
433
|
if (clip.anchor === "document") params.anchor = "document";
|
|
423
434
|
if (clip.startAt) params.startAt = String(clip.startAt);
|
|
424
435
|
if (clip.clipStart != null) params.clipStart = String(clip.clipStart);
|
|
@@ -903,6 +914,12 @@ var dataTable = (input) => {
|
|
|
903
914
|
colorScheme: d.colorScheme
|
|
904
915
|
};
|
|
905
916
|
};
|
|
917
|
+
var chartExtractor = (input, ctx) => {
|
|
918
|
+
const chart = input;
|
|
919
|
+
const chartable = Array.isArray(chart.headers) && Array.isArray(chart.rows) && buildChartData({ headers: chart.headers, rows: chart.rows }, chart) !== null;
|
|
920
|
+
if (chartable) return canvasDraft("chart", ctx, input);
|
|
921
|
+
return content(input, ctx);
|
|
922
|
+
};
|
|
906
923
|
var diagram = (input, ctx) => canvasDraft("diagram", ctx, input);
|
|
907
924
|
var tree = (input, ctx) => canvasDraft("tree", ctx, input);
|
|
908
925
|
var timeline = (input, ctx) => canvasDraft("timeline", ctx, input);
|
|
@@ -931,6 +948,13 @@ var sectionExtractors = {
|
|
|
931
948
|
videoWithCaption,
|
|
932
949
|
videoPullQuote,
|
|
933
950
|
dataTable,
|
|
951
|
+
barChart: chartExtractor,
|
|
952
|
+
columnChart: chartExtractor,
|
|
953
|
+
pieChart: chartExtractor,
|
|
954
|
+
donutChart: chartExtractor,
|
|
955
|
+
lineChart: chartExtractor,
|
|
956
|
+
areaChart: chartExtractor,
|
|
957
|
+
scatterChart: chartExtractor,
|
|
934
958
|
diagram,
|
|
935
959
|
tree,
|
|
936
960
|
timeline,
|
|
@@ -440,6 +440,12 @@ function formatBlockScalar(value) {
|
|
|
440
440
|
${body}`;
|
|
441
441
|
}
|
|
442
442
|
var FRONTMATTER_BLOCK_RE = /^---\r?\n([\s\S]*?)\r?\n---(\r?\n)?/;
|
|
443
|
+
var EMPTY_FRONTMATTER_BLOCK_RE = /^---\r?\n---(\r?\n)?/;
|
|
444
|
+
function splitFrontmatterBlock(source) {
|
|
445
|
+
const match = FRONTMATTER_BLOCK_RE.exec(source) ?? EMPTY_FRONTMATTER_BLOCK_RE.exec(source);
|
|
446
|
+
if (!match) return { frontmatter: null, body: source };
|
|
447
|
+
return { frontmatter: match[0], body: source.slice(match[0].length) };
|
|
448
|
+
}
|
|
443
449
|
function formatFrontmatterValue(value) {
|
|
444
450
|
if (typeof value === "boolean" || typeof value === "number") return String(value);
|
|
445
451
|
if (/[\r\n]/.test(value)) return formatBlockScalar(value.replace(/\r\n?/g, "\n"));
|
|
@@ -689,6 +695,7 @@ export {
|
|
|
689
695
|
countNodes,
|
|
690
696
|
parseFrontmatter,
|
|
691
697
|
formatBlockScalar,
|
|
698
|
+
splitFrontmatterBlock,
|
|
692
699
|
formatFrontmatterValue,
|
|
693
700
|
formatFrontmatterYaml,
|
|
694
701
|
setFrontmatterValues,
|