@bendyline/squisq 2.12.0 → 2.12.2

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-DIdmgDsV.d.ts → Doc-BJSPtsQD.d.ts} +27 -2
  2. package/dist/{ImageEditDoc-DXQMA6qH.d.ts → ImageEditDoc-QIzn1qK5.d.ts} +1 -1
  3. package/dist/{chunk-W45PAVYE.js → chunk-5VFC5T4N.js} +88 -1057
  4. package/dist/{chunk-RPPUCFRW.js → chunk-DTAYI7AV.js} +20 -20
  5. package/dist/{chunk-WAX4QYHA.js → chunk-E2NFHYCB.js} +14 -3
  6. package/dist/{chunk-H54A35NZ.js → chunk-EX75I5HX.js} +3 -3
  7. package/dist/{chunk-3H7SYCZS.js → chunk-FTN6SGW5.js} +1 -1
  8. package/dist/{chunk-QHNO67JS.js → chunk-GX3VSKYS.js} +1 -1
  9. package/dist/{chunk-I4L4GYDN.js → chunk-HYJ63N6V.js} +1 -1
  10. package/dist/{chunk-B3AFOXMA.js → chunk-MPEGJKFJ.js} +1031 -3
  11. package/dist/chunk-MWSGNEH6.js +2376 -0
  12. package/dist/{chunk-M6YXFNGO.js → chunk-P53Z4RYC.js} +10 -0
  13. package/dist/{chunk-K2PZMWQ5.js → chunk-TFMDVOUQ.js} +10 -9
  14. package/dist/chunk-Y25EJEZN.js +178 -0
  15. package/dist/{chunk-3Z2NGHLI.js → chunk-YZ66VMBB.js} +1 -1
  16. package/dist/{chunk-VTG7PNOL.js → chunk-ZKDJHO6Y.js} +3 -8
  17. package/dist/doc/index.d.ts +18 -10
  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-C33MgcDg.d.ts → materializePageSection-DYnmh8X1.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-BaDfxgzt.d.ts → themeLibrary-IHAirzT-.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
@@ -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-K2PZMWQ5.js";
6
+ } from "./chunk-TFMDVOUQ.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-W45PAVYE.js";
35
+ } from "./chunk-5VFC5T4N.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 {
@@ -15,10 +15,11 @@ import {
15
15
  relativeLuminance,
16
16
  resolveFontFamily,
17
17
  withAlpha
18
- } from "./chunk-I4L4GYDN.js";
18
+ } from "./chunk-HYJ63N6V.js";
19
19
  import {
20
+ SVG_ISLAND_LIMITS,
20
21
  parseBuildSpec
21
- } from "./chunk-M6YXFNGO.js";
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-ZYWYSM6W.js";
8
+ } from "./chunk-Y25EJEZN.js";
10
9
  import {
10
+ coerceAnnotationValues,
11
11
  parseFrontmatter,
12
12
  parseHtmlToNodes
13
- } from "./chunk-NNJA7ICB.js";
13
+ } from "./chunk-MWSGNEH6.js";
14
14
  import {
15
15
  resolveIcon
16
16
  } from "./chunk-CZ7AUSLI.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  recordBuildAdvance
3
- } from "./chunk-M6YXFNGO.js";
3
+ } from "./chunk-P53Z4RYC.js";
4
4
 
5
5
  // src/narration/sidecar.ts
6
6
  function resolveNarrationTimingGenerator(options) {
@@ -2,7 +2,7 @@ import {
2
2
  DEFAULT_THEME,
3
3
  applySurface,
4
4
  resolveFontFamily
5
- } from "./chunk-I4L4GYDN.js";
5
+ } from "./chunk-HYJ63N6V.js";
6
6
 
7
7
  // src/jsonForm/chooseControl.ts
8
8
  var ENUM_SEGMENTED_LIMIT = 4;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isTransitionType
3
- } from "./chunk-M6YXFNGO.js";
3
+ } from "./chunk-P53Z4RYC.js";
4
4
 
5
5
  // src/schemas/Motion.ts
6
6
  var MOTION_PROFILE_NAMES = ["calm", "documentary", "vibrant"];