@bendyline/squisq 2.13.14 → 2.13.16

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 (43) hide show
  1. package/dist/{Doc-BhvotZx_.d.ts → Doc-DLfTam0R.d.ts} +82 -6
  2. package/dist/{ImageEditDoc-D8hYio6b.d.ts → ImageEditDoc-DdSHb6sj.d.ts} +1 -1
  3. package/dist/{chunk-YQQWE4HG.js → chunk-33CAD575.js} +200 -262
  4. package/dist/{chunk-L7QZORLB.js → chunk-37RLFDIT.js} +11 -4
  5. package/dist/chunk-4R3YZTPX.js +42 -0
  6. package/dist/{chunk-DBVCSVNV.js → chunk-A4ZFYGU6.js} +13 -38
  7. package/dist/{chunk-CTT4XAGO.js → chunk-BG2OYBGC.js} +2534 -737
  8. package/dist/{chunk-2SRF5III.js → chunk-BVL3F64S.js} +1 -1
  9. package/dist/chunk-C7DKMO4H.js +88 -0
  10. package/dist/{chunk-SGNWO7OF.js → chunk-MA7XUCSQ.js} +517 -30
  11. package/dist/{chunk-JSGIWW35.js → chunk-MTIR5PWF.js} +1 -1
  12. package/dist/{chunk-C4SB3NN4.js → chunk-NBDF6SQ5.js} +22 -2
  13. package/dist/chunk-TOPEP5B7.js +515 -0
  14. package/dist/{chunk-OIQ2GO2O.js → chunk-TXN23SG2.js} +1 -1
  15. package/dist/{chunk-7MS26OXD.js → chunk-UDPPWYYM.js} +6 -0
  16. package/dist/{chunk-J2G6EOEJ.js → chunk-XY5Z23C4.js} +75 -16
  17. package/dist/{chunk-5DFFVW75.js → chunk-Z73DG6IL.js} +1 -1
  18. package/dist/doc/index.d.ts +412 -26
  19. package/dist/doc/index.js +66 -11
  20. package/dist/fence/index.d.ts +1 -1
  21. package/dist/generate/index.d.ts +1 -1
  22. package/dist/imageEdit/index.d.ts +3 -3
  23. package/dist/index.d.ts +9 -9
  24. package/dist/index.js +147 -29
  25. package/dist/jsonForm/index.d.ts +1 -1
  26. package/dist/jsonForm/index.js +5 -4
  27. package/dist/markdown/index.js +3 -3
  28. package/dist/{materializePageSection-CWxou4mX.d.ts → materializePageSection-HIoRYiZu.d.ts} +121 -8
  29. package/dist/mediaEdit/index.d.ts +154 -3
  30. package/dist/mediaEdit/index.js +241 -2
  31. package/dist/narration/index.d.ts +1 -1
  32. package/dist/narration/index.js +7 -5
  33. package/dist/recommend/index.d.ts +129 -2
  34. package/dist/recommend/index.js +13 -4
  35. package/dist/schemas/index.d.ts +26 -7
  36. package/dist/schemas/index.js +14 -8
  37. package/dist/{themeLibrary-BIYE6aLw.d.ts → themeLibrary-B2K-aAOy.d.ts} +1 -1
  38. package/dist/timing/index.d.ts +66 -2
  39. package/dist/timing/index.js +12 -0
  40. package/dist/transform/index.d.ts +173 -16
  41. package/dist/transform/index.js +58 -17
  42. package/package.json +1 -1
  43. package/dist/chunk-FCB6JLWB.js +0 -125
@@ -202,9 +202,14 @@ function fnv1a64Hex(text) {
202
202
  return (h1 >>> 0).toString(16).padStart(8, "0") + (h2 >>> 0).toString(16).padStart(8, "0");
203
203
  }
204
204
  function mediaRenderKey(src, fx) {
205
- const canonical = fx.ops.map((op) => `${op.id}:${formatMediaNumber(op.value)}`).join(" ");
206
- return fnv1a64Hex(`${src}
207
- ${canonical}`).slice(0, 12);
205
+ return mediaRecipeHash(`${src}
206
+ ${canonicalMediaFx(fx)}`);
207
+ }
208
+ function canonicalMediaFx(fx) {
209
+ return fx.ops.map((op) => `${op.id}:${formatMediaNumber(op.value)}`).join(" ");
210
+ }
211
+ function mediaRecipeHash(text) {
212
+ return fnv1a64Hex(text).slice(0, 12);
208
213
  }
209
214
 
210
215
  export {
@@ -226,5 +231,7 @@ export {
226
231
  serializeMediaEdits,
227
232
  mediaEditValuesFromParams,
228
233
  mediaEditValuesFromAttributes,
229
- mediaRenderKey
234
+ mediaRenderKey,
235
+ canonicalMediaFx,
236
+ mediaRecipeHash
230
237
  };
@@ -0,0 +1,42 @@
1
+ // src/schemas/Doc.ts
2
+ function taskMarker(checked) {
3
+ return checked ? "\u2611" : "\u2610";
4
+ }
5
+ function calculateDuration(audio) {
6
+ return audio.segments.reduce((sum, seg) => sum + seg.duration, 0);
7
+ }
8
+ function getSegmentAtTime(audio, time) {
9
+ let elapsed = 0;
10
+ for (let i = 0; i < audio.segments.length; i++) {
11
+ elapsed += audio.segments[i].duration;
12
+ if (time < elapsed) return i;
13
+ }
14
+ return audio.segments.length - 1;
15
+ }
16
+ var BLOCK_START_TOLERANCE = 1e-3;
17
+ function getBlockAtTime(blocks, time) {
18
+ for (let i = blocks.length - 1; i >= 0; i--) {
19
+ const block = blocks[i];
20
+ if (time + BLOCK_START_TOLERANCE >= block.startTime && time < block.startTime + block.duration) {
21
+ return block;
22
+ }
23
+ }
24
+ return blocks[0] || null;
25
+ }
26
+ function getCaptionAtTime(captions, time) {
27
+ if (!captions || !captions.phrases.length) return null;
28
+ for (const phrase of captions.phrases) {
29
+ if (time >= phrase.startTime && time < phrase.endTime) {
30
+ return phrase;
31
+ }
32
+ }
33
+ return null;
34
+ }
35
+
36
+ export {
37
+ taskMarker,
38
+ calculateDuration,
39
+ getSegmentAtTime,
40
+ getBlockAtTime,
41
+ getCaptionAtTime
42
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  defaultPageStyle
3
- } from "./chunk-2SRF5III.js";
3
+ } from "./chunk-BVL3F64S.js";
4
4
  import {
5
5
  FONT_FALLBACKS,
6
6
  THEME_SCHEMA_VERSION,
@@ -21,38 +21,6 @@ import {
21
21
  parseBuildSpec
22
22
  } from "./chunk-P53Z4RYC.js";
23
23
 
24
- // src/schemas/Doc.ts
25
- function calculateDuration(audio) {
26
- return audio.segments.reduce((sum, seg) => sum + seg.duration, 0);
27
- }
28
- function getSegmentAtTime(audio, time) {
29
- let elapsed = 0;
30
- for (let i = 0; i < audio.segments.length; i++) {
31
- elapsed += audio.segments[i].duration;
32
- if (time < elapsed) return i;
33
- }
34
- return audio.segments.length - 1;
35
- }
36
- var BLOCK_START_TOLERANCE = 1e-3;
37
- function getBlockAtTime(blocks, time) {
38
- for (let i = blocks.length - 1; i >= 0; i--) {
39
- const block = blocks[i];
40
- if (time + BLOCK_START_TOLERANCE >= block.startTime && time < block.startTime + block.duration) {
41
- return block;
42
- }
43
- }
44
- return blocks[0] || null;
45
- }
46
- function getCaptionAtTime(captions, time) {
47
- if (!captions || !captions.phrases.length) return null;
48
- for (const phrase of captions.phrases) {
49
- if (time >= phrase.startTime && time < phrase.endTime) {
50
- return phrase;
51
- }
52
- }
53
- return null;
54
- }
55
-
56
24
  // src/schemas/validateDoc.ts
57
25
  var LAYER_TYPES = /* @__PURE__ */ new Set([
58
26
  "image",
@@ -765,12 +733,18 @@ function buildMermaidThemeVariables(theme) {
765
733
  });
766
734
  return variables;
767
735
  }
736
+ var PAGE_LABELS = [".edgeLabel", ".icon-shape .label", ".image-shape .label"];
737
+ var PLAIN_CSS_COLOR = /^[\w\s#%(),./-]+$/;
738
+ function buildMermaidThemeCss(theme) {
739
+ const color = theme.colors.text.trim();
740
+ if (!PLAIN_CSS_COLOR.test(color)) return "";
741
+ const html = PAGE_LABELS.map((label) => `${label} span`).join(", ");
742
+ const svg = PAGE_LABELS.map((label) => `${label} text`).join(", ");
743
+ return `${html} { color: ${color}; }
744
+ ${svg} { fill: ${color}; }`;
745
+ }
768
746
 
769
747
  export {
770
- calculateDuration,
771
- getSegmentAtTime,
772
- getBlockAtTime,
773
- getCaptionAtTime,
774
748
  validateDocSchema,
775
749
  assertDocSchema,
776
750
  pipStyleVars,
@@ -780,5 +754,6 @@ export {
780
754
  compileTheme,
781
755
  parseTheme,
782
756
  serializeTheme,
783
- buildMermaidThemeVariables
757
+ buildMermaidThemeVariables,
758
+ buildMermaidThemeCss
784
759
  };