@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.
Files changed (41) hide show
  1. package/dist/{Doc-CHD4fxfm.d.ts → Doc-BkSiCJnM.d.ts} +28 -2
  2. package/dist/{ImageEditDoc-DSUM5MiA.d.ts → ImageEditDoc-UjQv8q3j.d.ts} +1 -1
  3. package/dist/{chunk-WAX4QYHA.js → chunk-E2NFHYCB.js} +14 -3
  4. package/dist/{chunk-H54A35NZ.js → chunk-EX75I5HX.js} +3 -3
  5. package/dist/{chunk-3H7SYCZS.js → chunk-FTN6SGW5.js} +1 -1
  6. package/dist/{chunk-QHNO67JS.js → chunk-GX3VSKYS.js} +1 -1
  7. package/dist/{chunk-I4L4GYDN.js → chunk-HYJ63N6V.js} +1 -1
  8. package/dist/{chunk-ISH4HDH7.js → chunk-J6AGNXFO.js} +1 -1
  9. package/dist/{chunk-B3AFOXMA.js → chunk-MPEGJKFJ.js} +1031 -3
  10. package/dist/chunk-MWSGNEH6.js +2376 -0
  11. package/dist/{chunk-M6YXFNGO.js → chunk-P53Z4RYC.js} +10 -0
  12. package/dist/{chunk-B2BQFF5B.js → chunk-SK5TQSYN.js} +20 -20
  13. package/dist/{chunk-RKCARBWM.js → chunk-VTVBSZXB.js} +78 -1048
  14. package/dist/chunk-Y25EJEZN.js +178 -0
  15. package/dist/{chunk-LN72K54P.js → chunk-ZBPWNH4L.js} +10 -9
  16. package/dist/{chunk-VTG7PNOL.js → chunk-ZKDJHO6Y.js} +3 -8
  17. package/dist/doc/index.d.ts +17 -9
  18. package/dist/doc/index.js +41 -39
  19. package/dist/fence/index.d.ts +1 -1
  20. package/dist/generate/index.d.ts +1 -1
  21. package/dist/imageEdit/index.d.ts +3 -3
  22. package/dist/index.d.ts +6 -6
  23. package/dist/index.js +68 -48
  24. package/dist/jsonForm/index.d.ts +1 -1
  25. package/dist/jsonForm/index.js +4 -4
  26. package/dist/markdown/index.d.ts +143 -1
  27. package/dist/markdown/index.js +29 -10
  28. package/dist/{materializePageSection-Dx1Sz0vK.d.ts → materializePageSection-DEXohgVt.d.ts} +1 -1
  29. package/dist/mediaEdit/index.d.ts +2 -2
  30. package/dist/narration/index.d.ts +1 -1
  31. package/dist/narration/index.js +8 -8
  32. package/dist/recommend/index.js +3 -2
  33. package/dist/schemas/index.d.ts +4 -4
  34. package/dist/schemas/index.js +3 -3
  35. package/dist/{themeLibrary-DLmZ1Ct8.d.ts → themeLibrary-BrBc0mrP.d.ts} +1 -1
  36. package/dist/timing/index.d.ts +1 -1
  37. package/dist/transform/index.d.ts +2 -2
  38. package/dist/transform/index.js +8 -8
  39. package/package.json +1 -1
  40. package/dist/chunk-NNJA7ICB.js +0 -1088
  41. package/dist/chunk-ZYWYSM6W.js +0 -657
@@ -28,6 +28,15 @@ function buildSpecParams(build) {
28
28
  };
29
29
  }
30
30
 
31
+ // src/markdown/svgIslandLimits.ts
32
+ var SVG_ISLAND_LIMITS = Object.freeze({
33
+ maxSourceBytes: 512 * 1024,
34
+ maxElements: 2e4,
35
+ maxDepth: 200,
36
+ /** Elements rendered after `<use>` expansion. */
37
+ maxExpandedElements: 5e4
38
+ });
39
+
31
40
  // src/schemas/Transitions.ts
32
41
  var DEFAULT_TRANSITION_DURATION_SECONDS = 0.7;
33
42
  var TRANSITION_TYPES = [
@@ -203,6 +212,7 @@ export {
203
212
  BUILD_PARAM_KEYS,
204
213
  parseBuildSpec,
205
214
  buildSpecParams,
215
+ SVG_ISLAND_LIMITS,
206
216
  DEFAULT_TRANSITION_DURATION_SECONDS,
207
217
  TRANSITION_TYPES,
208
218
  TRANSITION_DIRECTIONS,
@@ -1,19 +1,16 @@
1
1
  import {
2
2
  parseNarrationTimingJson
3
- } from "./chunk-3H7SYCZS.js";
3
+ } from "./chunk-FTN6SGW5.js";
4
4
  import {
5
5
  applySavedPresentation
6
- } from "./chunk-LN72K54P.js";
6
+ } from "./chunk-ZBPWNH4L.js";
7
7
  import {
8
8
  SHAPE_NAMES,
9
9
  buildChartData,
10
10
  buildNarrationScript,
11
11
  buildRegistry,
12
12
  coerceTemplateParams,
13
- deriveTemplateInputs,
14
13
  expandPersistentLayers,
15
- extractBodyPlainText,
16
- extractRichListItems,
17
14
  flattenBlocks,
18
15
  flattenRenderableBlocks,
19
16
  getBlockBodyText,
@@ -35,7 +32,7 @@ import {
35
32
  templateRegistry,
36
33
  writeCustomTemplatesToFrontmatter,
37
34
  writeCustomThemesToFrontmatter
38
- } from "./chunk-RKCARBWM.js";
35
+ } from "./chunk-VTVBSZXB.js";
39
36
  import {
40
37
  ASCII_TREE_VOCAB,
41
38
  ASCII_VOCAB,
@@ -44,15 +41,19 @@ import {
44
41
  UNICODE_VOCAB,
45
42
  arrowDirection,
46
43
  cellWidth,
44
+ deriveTemplateInputs,
47
45
  detectAsciiDiagram,
46
+ extractBodyPlainText,
47
+ extractRichListItems,
48
48
  isHoriz,
49
49
  isJunction,
50
50
  isLineChar,
51
+ isPictureFence,
51
52
  isVert,
52
53
  toCells,
53
54
  toGrid,
54
55
  traceBoxes
55
- } from "./chunk-B3AFOXMA.js";
56
+ } from "./chunk-MPEGJKFJ.js";
56
57
  import {
57
58
  iconMarker
58
59
  } from "./chunk-7ZAAICW4.js";
@@ -76,7 +77,7 @@ import {
76
77
  resolveFontFamily,
77
78
  resolveTheme,
78
79
  withAlpha
79
- } from "./chunk-I4L4GYDN.js";
80
+ } from "./chunk-HYJ63N6V.js";
80
81
  import {
81
82
  createMediaTimeMap
82
83
  } from "./chunk-JSGIWW35.js";
@@ -85,17 +86,17 @@ import {
85
86
  } from "./chunk-L7QZORLB.js";
86
87
  import {
87
88
  parseMarkdown
88
- } from "./chunk-H54A35NZ.js";
89
+ } from "./chunk-EX75I5HX.js";
89
90
  import {
90
- KNOWN_BLOCK_META_KEYS,
91
91
  TABLE_FED_TEMPLATES,
92
92
  TEMPLATE_ALIASES,
93
- coerceAnnotationValues,
94
93
  isContainerTemplate,
95
94
  resolveTemplateName,
96
95
  serializeAnnotation
97
- } from "./chunk-ZYWYSM6W.js";
96
+ } from "./chunk-Y25EJEZN.js";
98
97
  import {
98
+ KNOWN_BLOCK_META_KEYS,
99
+ coerceAnnotationValues,
99
100
  extractPlainText,
100
101
  findBlockVideoEmbed,
101
102
  getChildren,
@@ -103,11 +104,11 @@ import {
103
104
  parseHtmlToNodes,
104
105
  parseVideoEmbedUrl,
105
106
  readFrontmatterThemeId
106
- } from "./chunk-NNJA7ICB.js";
107
+ } from "./chunk-MWSGNEH6.js";
107
108
  import {
108
109
  BUILD_PARAM_KEYS,
109
110
  buildSpecParams
110
- } from "./chunk-M6YXFNGO.js";
111
+ } from "./chunk-P53Z4RYC.js";
111
112
  import {
112
113
  buildCaptionTrack
113
114
  } from "./chunk-4OQFLZ6G.js";
@@ -843,7 +844,7 @@ function extractBodyText(contents) {
843
844
  if (!contents || contents.length === 0) return "";
844
845
  const parts = [];
845
846
  for (const node of contents) {
846
- if (node.type === "code" && node.lang?.trim().toLowerCase() === "mermaid") continue;
847
+ if (isPictureFence(node)) continue;
847
848
  parts.push(extractRichText(node));
848
849
  }
849
850
  return parts.join("\n").trim();
@@ -1710,11 +1711,8 @@ var PANEL_KINDS = /* @__PURE__ */ new Set([
1710
1711
  "timeline-rail",
1711
1712
  "table-section"
1712
1713
  ]);
1713
- function isMermaidFence(node) {
1714
- return node.type === "code" && node.lang?.trim().toLowerCase() === "mermaid";
1715
- }
1716
1714
  function isWidgetFence(node, widgetFenceLangs) {
1717
- if (isMermaidFence(node)) return true;
1715
+ if (isPictureFence(node)) return true;
1718
1716
  if (!widgetFenceLangs || widgetFenceLangs.length === 0) return false;
1719
1717
  if (node.type !== "code") return false;
1720
1718
  const lang = node.lang?.trim().toLowerCase();
@@ -1749,8 +1747,10 @@ function unconsumedRichContent(block, draft, widgetFenceLangs) {
1749
1747
  const video = findBlockVideoEmbed(node);
1750
1748
  return video !== null && video.embed.watchUrl !== playedVideo;
1751
1749
  };
1750
+ const canvasContents = media?.type === "canvas" ? media.block.contents : void 0;
1751
+ const drawnByCanvas = (node) => isPictureFence(node) && canvasContents?.includes(node) === true;
1752
1752
  const markdown = block.contents.filter(
1753
- (node) => isWidgetFence(node, widgetFenceLangs) || !templateHasMedia && markdownNodeContainsMedia(node) || isUnplayedVideo(node)
1753
+ (node) => isWidgetFence(node, widgetFenceLangs) && !drawnByCanvas(node) || !templateHasMedia && markdownNodeContainsMedia(node) || isUnplayedVideo(node)
1754
1754
  );
1755
1755
  if (markdown.length === 0) return void 0;
1756
1756
  return {