@popcraft/kit 0.53.1 → 0.53.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 (77) hide show
  1. package/dist/chunks/{agent-B4XH7FCC.js → agent-SED37SYN.js} +1 -1
  2. package/dist/chunks/{builtin-3TWJNRDI.js → builtin-6C24JNML.js} +4 -3
  3. package/dist/chunks/{buy-credits-VZ2J2SR7.js → buy-credits-L4YYC7OH.js} +2 -2
  4. package/dist/chunks/{check-template-GMNQVCCI.js → check-template-EE5TET2G.js} +3 -2
  5. package/dist/chunks/{chunk-UT6GKZJF.js → chunk-32OBPYVY.js} +1 -1
  6. package/dist/chunks/{chunk-SMF4YIFH.js → chunk-3OXHJA4W.js} +1 -1
  7. package/dist/chunks/{chunk-D7XGMFYM.js → chunk-3OZO3VDZ.js} +4 -4
  8. package/dist/chunks/{chunk-7XP5CWQO.js → chunk-7DRZUU3D.js} +121 -63
  9. package/dist/chunks/{chunk-UDUHQLOJ.js → chunk-AEVF4O3X.js} +2 -2
  10. package/dist/chunks/{chunk-7CNZ5HLR.js → chunk-AYWP3RXA.js} +4 -4
  11. package/dist/chunks/{chunk-MJMCMLHB.js → chunk-BKRXB4FD.js} +1 -1
  12. package/dist/chunks/{chunk-KPKVF2TA.js → chunk-DGM2NZSE.js} +2 -2
  13. package/dist/chunks/{chunk-XJFTD3EZ.js → chunk-E6DRH2F2.js} +1 -1
  14. package/dist/chunks/{chunk-DFY5UNVM.js → chunk-F6NLCJI5.js} +45 -5
  15. package/dist/chunks/{chunk-5JMMBP5Q.js → chunk-FLGDAOPE.js} +60 -101
  16. package/dist/chunks/{chunk-UNJ2Y726.js → chunk-FM4WN2UV.js} +4 -4
  17. package/dist/chunks/{chunk-AJPYEZRT.js → chunk-GMUR223M.js} +2 -2
  18. package/dist/chunks/{chunk-GNNRFMXK.js → chunk-GNOX55UB.js} +9 -9
  19. package/dist/chunks/{chunk-XMO6D5A2.js → chunk-GUGOVTVN.js} +55 -7
  20. package/dist/chunks/{chunk-IROVLB4V.js → chunk-HS4CR6HU.js} +19 -5
  21. package/dist/chunks/{chunk-P5HF37GX.js → chunk-L6TWTQWB.js} +2 -2
  22. package/dist/chunks/{chunk-YHQGAEC5.js → chunk-M5MBUFEB.js} +1 -1
  23. package/dist/chunks/{chunk-DBGETMUH.js → chunk-MGNS52I2.js} +4 -4
  24. package/dist/chunks/{chunk-NPTJQ2AF.js → chunk-NBFZY6QK.js} +1 -1
  25. package/dist/chunks/{chunk-Z557VFSN.js → chunk-NDMT4BWH.js} +1 -1
  26. package/dist/chunks/{chunk-MYCQCAXZ.js → chunk-NYGQP3I2.js} +4 -4
  27. package/dist/chunks/{chunk-U54RHZSX.js → chunk-OE2LGHLL.js} +3 -3
  28. package/dist/chunks/chunk-OLQTCVWP.js +92 -0
  29. package/dist/chunks/{chunk-T4FFRJAH.js → chunk-OWWBFGCR.js} +3 -3
  30. package/dist/chunks/{chunk-TCPSVZN3.js → chunk-TRTT3FG2.js} +5 -5
  31. package/dist/chunks/{chunk-U3PY5BWW.js → chunk-WENYC56A.js} +11 -11
  32. package/dist/chunks/{chunk-5ICU2TQ2.js → chunk-Y6MJOYOD.js} +8 -8
  33. package/dist/chunks/{client-DNVGPZXT.js → client-FHS3A5KE.js} +1 -1
  34. package/dist/chunks/{client-SE7SVRWK.js → client-FZXXX7Z4.js} +2 -2
  35. package/dist/chunks/{client-77HZDECD.js → client-JTMPIRKQ.js} +3 -3
  36. package/dist/chunks/{client-actions-UNYIWTLI.js → client-actions-3KZRX52M.js} +13 -12
  37. package/dist/chunks/{dangerous-WMMPM5TV.js → dangerous-D6BD66C2.js} +4 -3
  38. package/dist/chunks/{delete-current-file-WB6ZWMBO.js → delete-current-file-EUYQ4W5Y.js} +7 -6
  39. package/dist/chunks/{editor-seams-AZ2NUX6J.js → editor-seams-SJRRQFZT.js} +18 -17
  40. package/dist/chunks/{editor-store-TPVGGNLW.js → editor-store-AXRJNCRC.js} +5 -5
  41. package/dist/chunks/{export-PGMO7YEU.js → export-ILWWIDBI.js} +1 -1
  42. package/dist/chunks/{export-watermark-UGGZ5TX6.js → export-watermark-MYKTALXF.js} +7 -6
  43. package/dist/chunks/{eyedropper-HPK6A4PE.js → eyedropper-EZ33OG43.js} +3 -2
  44. package/dist/chunks/{generate-media-Y6MB3ENV.js → generate-media-ODWN3RNS.js} +4 -4
  45. package/dist/chunks/{host-FNER4M32.js → host-K6K7OOJY.js} +12 -11
  46. package/dist/chunks/{integrations-LPVAVUUV.js → integrations-TPVN7WNB.js} +1 -1
  47. package/dist/chunks/{libraries-I6J7YJQE.js → libraries-L7RTUME7.js} +7 -6
  48. package/dist/chunks/{live-ZRJ2GT3E.js → live-SODTH6AK.js} +3 -2
  49. package/dist/chunks/{lottie-CBQTJRYU.js → lottie-ZWAKIFY2.js} +4 -4
  50. package/dist/chunks/{media-tool-LTK46STY.js → media-tool-76BJQ4EH.js} +4 -3
  51. package/dist/chunks/{new-file-XH7E3IEZ.js → new-file-4B74SA7T.js} +5 -4
  52. package/dist/chunks/{pdf-NHOWFQ66.js → pdf-HK3GJ6QP.js} +3 -3
  53. package/dist/chunks/{player-check-4LAIMR3H.js → player-check-3HTULNTP.js} +4 -4
  54. package/dist/chunks/{plugin-LAZVW4F4.js → plugin-OFAK7X55.js} +3 -2
  55. package/dist/chunks/{plugin-import-P4PD76X3.js → plugin-import-FHPXNY5S.js} +23 -22
  56. package/dist/chunks/{pptx-LHJRZA42.js → pptx-O7RRDHAR.js} +2 -2
  57. package/dist/chunks/{presence-WSPF6N32.js → presence-CLCMZPNT.js} +4 -3
  58. package/dist/chunks/{project-M3KF66GG.js → project-RJ3UIR3F.js} +3 -3
  59. package/dist/chunks/{publish-site-PUHKHZF4.js → publish-site-NYDQQTVZ.js} +8 -7
  60. package/dist/chunks/{publish-store-PZMIV6LJ.js → publish-store-YNPQKV6P.js} +5 -5
  61. package/dist/chunks/{raster-actions-NS2NSYLC.js → raster-actions-MC3CT72Z.js} +3 -2
  62. package/dist/chunks/{reference-images-CYSRQG7A.js → reference-images-TAWHPRYN.js} +2 -2
  63. package/dist/chunks/{resolvers-BQ5WXLUC.js → resolvers-UTQHZ6ET.js} +5 -5
  64. package/dist/chunks/{runner-PGFSW23U.js → runner-YB2KJMV5.js} +30 -24
  65. package/dist/chunks/{store-BXDDRMK7.js → store-RMG4PHWL.js} +14 -13
  66. package/dist/chunks/{storefront-prepare-EXR7OIWW.js → storefront-prepare-6IUMZTCQ.js} +1 -1
  67. package/dist/chunks/{svg-export-J2YVV3WM.js → svg-export-LMGINUQK.js} +5 -5
  68. package/dist/chunks/{svg-place-ZAG7VYF6.js → svg-place-LWB4XU2O.js} +2 -1
  69. package/dist/chunks/{sync-4AHF7NWR.js → sync-K72H36V7.js} +7 -6
  70. package/dist/chunks/{tabs-KFQNMNUM.js → tabs-56YA6CWU.js} +10 -9
  71. package/dist/chunks/{team-QUBELR4W.js → team-35KCR2TX.js} +1 -1
  72. package/dist/chunks/{team-client-NCOTLKC5.js → team-client-NJYR2EHQ.js} +1 -1
  73. package/dist/chunks/{tools-T5XCKKCW.js → tools-HSZSBWOP.js} +4 -2
  74. package/dist/chunks/{ui-commands-77JZN35K.js → ui-commands-J54KK6XU.js} +20 -19
  75. package/dist/chunks/{versions-5HYBXUPA.js → versions-X2TC2RMO.js} +7 -6
  76. package/dist/index.js +1 -1
  77. package/package.json +1 -1
@@ -16,14 +16,14 @@ import {
16
16
  reportOpenStage,
17
17
  setCloudLink,
18
18
  trackOpen
19
- } from "./chunk-KPKVF2TA.js";
19
+ } from "./chunk-DGM2NZSE.js";
20
20
  import {
21
21
  parseDeepLink,
22
22
  withDeepLink
23
23
  } from "./chunk-EUF3VFBW.js";
24
24
  import {
25
25
  activeTeamWorkspaceId
26
- } from "./chunk-Z557VFSN.js";
26
+ } from "./chunk-NDMT4BWH.js";
27
27
  import {
28
28
  ApiError,
29
29
  api,
@@ -31,7 +31,7 @@ import {
31
31
  } from "./chunk-KWUXHRXD.js";
32
32
  import {
33
33
  attachPresence
34
- } from "./chunk-XJFTD3EZ.js";
34
+ } from "./chunk-E6DRH2F2.js";
35
35
  import {
36
36
  isPersistableDocument,
37
37
  isUnsavedPlaceholder,
@@ -42,7 +42,7 @@ import {
42
42
  setCollabHistory,
43
43
  storedDocument,
44
44
  useEditorStore
45
- } from "./chunk-5JMMBP5Q.js";
45
+ } from "./chunk-FLGDAOPE.js";
46
46
  import {
47
47
  currentHistoryGroup
48
48
  } from "./chunk-76I6DIEM.js";
@@ -6,7 +6,7 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  computeBooleanMultiPoly
9
- } from "./chunk-XMO6D5A2.js";
9
+ } from "./chunk-GUGOVTVN.js";
10
10
  import {
11
11
  glyphOutline,
12
12
  init_text_rings
@@ -150,7 +150,7 @@ function startHyperyTeams() {
150
150
  maybePromptForTeam();
151
151
  void followFileTeam(linkedKey);
152
152
  });
153
- void import("./sync-4AHF7NWR.js").then(({ onSyncStatus, syncStatus }) => {
153
+ void import("./sync-K72H36V7.js").then(({ onSyncStatus, syncStatus }) => {
154
154
  linkedKey = syncStatus().link?.key ?? null;
155
155
  void followFileTeam(linkedKey);
156
156
  onSyncStatus((_s, link) => {
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-LRF3JAZW.js";
10
10
  import {
11
11
  notice
12
- } from "./chunk-TCPSVZN3.js";
12
+ } from "./chunk-TRTT3FG2.js";
13
13
  import {
14
14
  effectiveChatModel,
15
15
  setModelPref,
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-A4CGHVJP.js";
18
18
  import {
19
19
  useEditorStore
20
- } from "./chunk-5JMMBP5Q.js";
20
+ } from "./chunk-FLGDAOPE.js";
21
21
  import {
22
22
  create
23
23
  } from "./chunk-QLJLPV5R.js";
@@ -1797,7 +1797,7 @@ async function sendMessage(text) {
1797
1797
  if (!useAgentStore.getState().activeThreadId) newThread();
1798
1798
  const mentions = pruneMentions(body, useAgentStore.getState().draftMentions);
1799
1799
  useAgentStore.setState({ draft: "", draftMentions: [], error: null });
1800
- const { runTurn } = await import("./runner-PGFSW23U.js");
1800
+ const { runTurn } = await import("./runner-YB2KJMV5.js");
1801
1801
  await runTurn(body, mentions);
1802
1802
  }
1803
1803
  function stop() {
@@ -1900,7 +1900,7 @@ var clearTaskChildren = () => useAgentStore.setState({ taskChildren: {} });
1900
1900
  function subscribeChildTools() {
1901
1901
  let dispose;
1902
1902
  let cancelled = false;
1903
- void import("./runner-PGFSW23U.js").then(({ onChildTool }) => {
1903
+ void import("./runner-YB2KJMV5.js").then(({ onChildTool }) => {
1904
1904
  const off = onChildTool((report) => {
1905
1905
  if (report?.status !== "running" || report.jobId) return;
1906
1906
  recordChildTool(report.toolCallId ?? "", report.name);
@@ -127,7 +127,7 @@ async function copyNodeAsPNG(renderer, node, doc, styles, scale = 2) {
127
127
  }
128
128
  async function copyNodeAsSVG(renderer, node, doc, styles) {
129
129
  try {
130
- const { exportNodeToSVG } = await import("./svg-export-J2YVV3WM.js");
130
+ const { exportNodeToSVG } = await import("./svg-export-LMGINUQK.js");
131
131
  const svg = await exportNodeToSVG(renderer, node, doc, styles);
132
132
  if (!svg) return false;
133
133
  await navigator.clipboard.writeText(svg);
@@ -149,12 +149,12 @@ async function exportSettingFile(renderer, node, setting, doc, styles) {
149
149
  return blob ? { name, blob } : null;
150
150
  }
151
151
  if (setting.format === "SVG") {
152
- const { exportNodeToSVG } = await import("./svg-export-J2YVV3WM.js");
152
+ const { exportNodeToSVG } = await import("./svg-export-LMGINUQK.js");
153
153
  const svg = await exportNodeToSVG(renderer, node, doc, styles);
154
154
  return svg ? { name, blob: new Blob([svg], { type: "image/svg+xml" }) } : null;
155
155
  }
156
156
  if (setting.format === "PDF") {
157
- const { exportNodeToPDF, pdfOptionsFor } = await import("./pdf-NHOWFQ66.js");
157
+ const { exportNodeToPDF, pdfOptionsFor } = await import("./pdf-HK3GJ6QP.js");
158
158
  const blob = await exportNodeToPDF(renderer, node, pdfOptionsFor(setting), doc, styles);
159
159
  return blob ? { name, blob } : null;
160
160
  }
@@ -0,0 +1,92 @@
1
+ import { createRequire as __popcraftRequire } from 'node:module';
2
+ import { fileURLToPath as __popcraftPath } from 'node:url';
3
+ import { dirname as __popcraftDirname } from 'node:path';
4
+ const require = __popcraftRequire(import.meta.url);
5
+ const __filename = __popcraftPath(import.meta.url);
6
+ const __dirname = __popcraftDirname(__filename);
7
+ import {
8
+ init_define_POPCRAFT_COMPONENT_IDS
9
+ } from "./chunk-WKDVCZ45.js";
10
+
11
+ // lib/document/scale-geometry.ts
12
+ init_define_POPCRAFT_COMPONENT_IDS();
13
+ var scalePoint = (p, sx, sy) => ({
14
+ ...p,
15
+ x: p.x * sx,
16
+ y: p.y * sy,
17
+ // Bezier handles live in the same space as the point and have to scale with it, or a stretched curve
18
+ // keeps its original curvature and bulges out of the shape.
19
+ handleIn: p.handleIn ? { x: p.handleIn.x * sx, y: p.handleIn.y * sy } : void 0,
20
+ handleOut: p.handleOut ? { x: p.handleOut.x * sx, y: p.handleOut.y * sy } : void 0
21
+ });
22
+ function scaleVectorPaths(paths, sx, sy, rebuild) {
23
+ if (!paths?.length || sx === 1 && sy === 1) return paths;
24
+ return paths.map((path) => {
25
+ const points = path.points.map((p) => scalePoint(p, sx, sy));
26
+ return { ...path, points, data: rebuild(points, path.closed) };
27
+ });
28
+ }
29
+ function scaledChildProps(orig, sx, sy, rebuild) {
30
+ return {
31
+ x: orig.x * sx,
32
+ y: orig.y * sy,
33
+ width: orig.width * sx,
34
+ height: orig.height * sy,
35
+ ...orig.type === "VECTOR" ? { paths: scaleVectorPaths(orig.paths, sx, sy, rebuild) } : {}
36
+ };
37
+ }
38
+ function rebuildVectorData(points, closed) {
39
+ if (points.length < 2) return [];
40
+ const data = [];
41
+ data.push("M", points[0].x, points[0].y);
42
+ for (let i = 1; i < points.length; i++) {
43
+ const prev = points[i - 1];
44
+ const curr = points[i];
45
+ if (prev.handleOut && curr.handleIn) {
46
+ data.push("C", prev.handleOut.x, prev.handleOut.y, curr.handleIn.x, curr.handleIn.y, curr.x, curr.y);
47
+ } else if (prev.handleOut) {
48
+ data.push("Q", prev.handleOut.x, prev.handleOut.y, curr.x, curr.y);
49
+ } else if (curr.handleIn) {
50
+ data.push("Q", curr.handleIn.x, curr.handleIn.y, curr.x, curr.y);
51
+ } else {
52
+ data.push("L", curr.x, curr.y);
53
+ }
54
+ }
55
+ if (closed) {
56
+ const prev = points[points.length - 1];
57
+ const curr = points[0];
58
+ if (prev.handleOut && curr.handleIn) {
59
+ data.push("C", prev.handleOut.x, prev.handleOut.y, curr.handleIn.x, curr.handleIn.y, curr.x, curr.y);
60
+ } else if (prev.handleOut) {
61
+ data.push("Q", prev.handleOut.x, prev.handleOut.y, curr.x, curr.y);
62
+ } else if (curr.handleIn) {
63
+ data.push("Q", curr.handleIn.x, curr.handleIn.y, curr.x, curr.y);
64
+ }
65
+ data.push("Z");
66
+ }
67
+ return data;
68
+ }
69
+ function scaleSubtreePatches(nodes, id, sx, sy, includeSelf = true) {
70
+ const out = /* @__PURE__ */ new Map();
71
+ const root = nodes[id];
72
+ if (!root || sx === 1 && sy === 1) return out;
73
+ if (includeSelf && root.type === "VECTOR") out.set(id, { paths: scaleVectorPaths(root.paths, sx, sy, rebuildVectorData) });
74
+ const walk = (parent) => {
75
+ for (const cid of parent.childIds ?? []) {
76
+ const c = nodes[cid];
77
+ if (!c) continue;
78
+ const patch = { ...scaledChildProps(c, sx, sy, rebuildVectorData) };
79
+ if (c.type === "TEXT") patch.fontSize = (c.fontSize ?? 16) * Math.min(sx, sy);
80
+ out.set(cid, patch);
81
+ walk(c);
82
+ }
83
+ };
84
+ if (root.type === "GROUP" || root.type === "BOOLEAN" || !includeSelf) walk(root);
85
+ return out;
86
+ }
87
+
88
+ export {
89
+ scaleVectorPaths,
90
+ rebuildVectorData,
91
+ scaleSubtreePatches
92
+ };
@@ -15,7 +15,7 @@ import {
15
15
  layoutText,
16
16
  resolveThreadNode,
17
17
  rootMatrix
18
- } from "./chunk-MJMCMLHB.js";
18
+ } from "./chunk-BKRXB4FD.js";
19
19
  import {
20
20
  attachTextPath,
21
21
  polylineOf,
@@ -30,14 +30,14 @@ import {
30
30
  toSvgD,
31
31
  trimCmds,
32
32
  vectorCmds
33
- } from "./chunk-NPTJQ2AF.js";
33
+ } from "./chunk-NBFZY6QK.js";
34
34
  import {
35
35
  strokeBehindFill
36
36
  } from "./chunk-YZKSEJHZ.js";
37
37
  import {
38
38
  encodeImageData,
39
39
  sliceRegion
40
- } from "./chunk-U54RHZSX.js";
40
+ } from "./chunk-OE2LGHLL.js";
41
41
  import {
42
42
  documentForExport
43
43
  } from "./chunk-T4R6MNN5.js";
@@ -16,22 +16,22 @@ import {
16
16
  requestImageAction,
17
17
  sizeForAspect,
18
18
  vectorSupport
19
- } from "./chunk-YHQGAEC5.js";
19
+ } from "./chunk-M5MBUFEB.js";
20
20
  import {
21
21
  external_exports
22
22
  } from "./chunk-VOOUF5TT.js";
23
23
  import {
24
24
  placeSvgLayers
25
- } from "./chunk-IROVLB4V.js";
25
+ } from "./chunk-HS4CR6HU.js";
26
26
  import {
27
27
  exportNodeToSVG
28
- } from "./chunk-T4FFRJAH.js";
28
+ } from "./chunk-OWWBFGCR.js";
29
29
  import {
30
30
  selectionReferenceImages
31
- } from "./chunk-SMF4YIFH.js";
31
+ } from "./chunk-3OXHJA4W.js";
32
32
  import {
33
33
  useEditorStore
34
- } from "./chunk-5JMMBP5Q.js";
34
+ } from "./chunk-FLGDAOPE.js";
35
35
  import {
36
36
  withHistoryGroup
37
37
  } from "./chunk-76I6DIEM.js";
@@ -6,14 +6,14 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  pluginRun
9
- } from "./chunk-7CNZ5HLR.js";
9
+ } from "./chunk-AYWP3RXA.js";
10
10
  import {
11
11
  fileCommands,
12
12
  fontTeamRemove,
13
13
  integrationConfirmCommands,
14
14
  mediaDelete,
15
15
  publishCommands
16
- } from "./chunk-7XP5CWQO.js";
16
+ } from "./chunk-7DRZUU3D.js";
17
17
  import {
18
18
  external_exports
19
19
  } from "./chunk-VOOUF5TT.js";
@@ -53,7 +53,7 @@ var collabSetSpotlight = defineCommand({
53
53
  }
54
54
  },
55
55
  run: async ({ on }, ctx) => {
56
- const { setSpotlight } = await import("./presence-WSPF6N32.js");
56
+ const { setSpotlight } = await import("./presence-CLCMZPNT.js");
57
57
  setSpotlight(on);
58
58
  ctx.notice(on ? "Spotlight on \u2014 everyone is following this view." : "Spotlight off.");
59
59
  return { summary: on ? "Spotlight on" : "Spotlight off", data: { spotlight: on } };
@@ -80,7 +80,7 @@ var collabRevealPrivate = defineCommand({
80
80
  }
81
81
  },
82
82
  run: async (_p, ctx) => {
83
- const { useEditorStore } = await import("./editor-store-TPVGGNLW.js");
83
+ const { useEditorStore } = await import("./editor-store-AXRJNCRC.js");
84
84
  const before = Object.values(useEditorStore.getState().document.nodes).filter((n) => n.privateTo).length;
85
85
  useEditorStore.getState().revealPrivate();
86
86
  ctx.notice(before ? `Revealed ${before} private item${before === 1 ? "" : "s"}.` : "Nothing was private.");
@@ -144,7 +144,7 @@ var documentDelete = defineCommand({
144
144
  }
145
145
  },
146
146
  run: async ({ id }, ctx) => {
147
- const { useEditorStore } = await import("./editor-store-TPVGGNLW.js");
147
+ const { useEditorStore } = await import("./editor-store-AXRJNCRC.js");
148
148
  const wasOpen = useEditorStore.getState().document.id === id;
149
149
  await useEditorStore.getState().deleteDocument(id);
150
150
  ctx.notice("Deleted the document.");
@@ -188,7 +188,7 @@ var libraryPublish = defineCommand({
188
188
  }
189
189
  },
190
190
  run: async (p, ctx) => {
191
- const { publishLibrary } = await import("./libraries-I6J7YJQE.js");
191
+ const { publishLibrary } = await import("./libraries-L7RTUME7.js");
192
192
  const doc = ctx.doc();
193
193
  const pick = {
194
194
  componentIds: p.componentIds ?? Object.keys(doc.components ?? {}),
@@ -220,7 +220,7 @@ var libraryUnpublish = defineCommand({
220
220
  },
221
221
  run: async ({ libraryId }, ctx) => {
222
222
  if (!libraryId.trim()) throw new CommandError("Which library? Pass its `libraryId`.", "invalid_params");
223
- const { unpublishLibrary } = await import("./libraries-I6J7YJQE.js");
223
+ const { unpublishLibrary } = await import("./libraries-L7RTUME7.js");
224
224
  await unpublishLibrary(libraryId);
225
225
  ctx.notice(`Unpublished library ${libraryId}.`);
226
226
  return { summary: `Unpublished library ${libraryId}`, data: { libraryId, unpublished: true } };
@@ -232,8 +232,8 @@ var libraryCommands = [libraryPublish, libraryUnpublish];
232
232
  init_define_POPCRAFT_COMPONENT_IDS();
233
233
  async function findVersion(id) {
234
234
  const [{ useEditorStore }, { versionLabel }] = await Promise.all([
235
- import("./editor-store-TPVGGNLW.js"),
236
- import("./versions-5HYBXUPA.js")
235
+ import("./editor-store-AXRJNCRC.js"),
236
+ import("./versions-X2TC2RMO.js")
237
237
  ]);
238
238
  const meta = useEditorStore.getState().versions.find((v) => v.id === id);
239
239
  if (!meta) {
@@ -266,7 +266,7 @@ var versionRestore = defineCommand({
266
266
  },
267
267
  run: async ({ id }) => {
268
268
  const found = await findVersion(id);
269
- const { restoreVersion } = await import("./versions-5HYBXUPA.js");
269
+ const { restoreVersion } = await import("./versions-X2TC2RMO.js");
270
270
  await restoreVersion(found.meta);
271
271
  return { summary: `Restored \u201C${found.label}\u201D`, data: { id, label: found.label, restored: true } };
272
272
  }
@@ -291,7 +291,7 @@ var versionDelete = defineCommand({
291
291
  },
292
292
  run: async ({ id }, ctx) => {
293
293
  const found = await findVersion(id);
294
- const { deleteVersion } = await import("./versions-5HYBXUPA.js");
294
+ const { deleteVersion } = await import("./versions-X2TC2RMO.js");
295
295
  await deleteVersion(found.meta);
296
296
  ctx.notice(`Deleted the version \u201C${found.label}\u201D.`);
297
297
  return { summary: `Deleted the version \u201C${found.label}\u201D`, data: { id, label: found.label, deleted: true } };
@@ -15,20 +15,20 @@ import {
15
15
  } from "./chunk-ZYK65XJJ.js";
16
16
  import {
17
17
  syncStatus
18
- } from "./chunk-DBGETMUH.js";
18
+ } from "./chunk-MGNS52I2.js";
19
19
  import {
20
20
  exportNodeToSVG
21
- } from "./chunk-T4FFRJAH.js";
21
+ } from "./chunk-OWWBFGCR.js";
22
22
  import {
23
23
  exportNodeToBlob
24
- } from "./chunk-U54RHZSX.js";
24
+ } from "./chunk-OE2LGHLL.js";
25
25
  import {
26
26
  usePluginStore
27
27
  } from "./chunk-RJHJSADV.js";
28
28
  import {
29
29
  setPluginTabs,
30
30
  useEditorStore
31
- } from "./chunk-5JMMBP5Q.js";
31
+ } from "./chunk-FLGDAOPE.js";
32
32
  import {
33
33
  openBeside
34
34
  } from "./chunk-PMLSPVLR.js";
@@ -69,7 +69,7 @@ init_define_POPCRAFT_COMPONENT_IDS();
69
69
  // lib/plugins/api.ts
70
70
  init_define_POPCRAFT_COMPONENT_IDS();
71
71
  async function handlePluginCall(env, method, params = {}) {
72
- const { dispatchPluginCall } = await import("./plugin-LAZVW4F4.js");
72
+ const { dispatchPluginCall } = await import("./plugin-OFAK7X55.js");
73
73
  return dispatchPluginCall(env, method, params);
74
74
  }
75
75
 
@@ -579,7 +579,7 @@ async function runPlugin(pluginId, commandId, opts = {}) {
579
579
  if (!openBeside(url)) throw new Error("The browser blocked the new tab");
580
580
  },
581
581
  createDocument: async (opts2) => {
582
- const { createFreshFileOrExplain } = await import("./new-file-XH7E3IEZ.js");
582
+ const { createFreshFileOrExplain } = await import("./new-file-4B74SA7T.js");
583
583
  const created = await createFreshFileOrExplain({}, { name: opts2?.name });
584
584
  if (!created.ok) throw new Error(created.reason === "plan" ? "Plan limit reached" : created.reason === "guest-limit" ? "Sign in to create another file" : `Could not create file (${created.reason})`);
585
585
  await useEditorStore.getState().openDocument(created.docId);
@@ -600,7 +600,7 @@ async function runPlugin(pluginId, commandId, opts = {}) {
600
600
  const st = useEditorStore.getState();
601
601
  const node = nodes[0];
602
602
  if (format === "PDF") {
603
- const { exportNodesToPDF } = await import("./pdf-NHOWFQ66.js");
603
+ const { exportNodesToPDF } = await import("./pdf-HK3GJ6QP.js");
604
604
  const { jobPageSize } = await import("../lib/document/print-pages.js");
605
605
  const { loadFullBleed } = await import("./print-prefs-XQJ4IJYZ.js");
606
606
  const blob2 = await exportNodesToPDF(renderer, nodes, { dpi: 300, bleed: !loadFullBleed(), marks: false, splitSpreads: true, pageSize: jobPageSize(st.document) }, st.document, st.document.styles);
@@ -769,7 +769,7 @@ if (typeof window !== "undefined") {
769
769
  const name = d.name || "Imported";
770
770
  void (async () => {
771
771
  try {
772
- const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-P4PD76X3.js");
772
+ const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-FHPXNY5S.js");
773
773
  if (d.ir && typeof d.ir === "object") {
774
774
  await applyPluginLayoutIr(d.ir, { mode, name });
775
775
  return;
@@ -14,7 +14,7 @@ import {
14
14
  placeStockPhoto,
15
15
  searchStockPhotos,
16
16
  stockPhotoInfo
17
- } from "./chunk-AJPYEZRT.js";
17
+ } from "./chunk-GMUR223M.js";
18
18
  import "./chunk-UCNBKWJQ.js";
19
19
  import "./chunk-WKDVCZ45.js";
20
20
  import "./chunk-LJSVREWM.js";
@@ -7,7 +7,7 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  defaultMeasure,
9
9
  placePicture
10
- } from "./chunk-AJPYEZRT.js";
10
+ } from "./chunk-GMUR223M.js";
11
11
  import "./chunk-UCNBKWJQ.js";
12
12
  import {
13
13
  api
@@ -121,7 +121,7 @@ async function placeLibraryItem(item, opts = {}) {
121
121
  }
122
122
  if (item.contentType.startsWith("video/")) {
123
123
  const file = await libraryFile(item, opts);
124
- const [{ useEditorStore }, { placeMediaFile }] = await Promise.all([import("./editor-store-TPVGGNLW.js"), import("./media-tool-LTK46STY.js")]);
124
+ const [{ useEditorStore }, { placeMediaFile }] = await Promise.all([import("./editor-store-AXRJNCRC.js"), import("./media-tool-76BJQ4EH.js")]);
125
125
  const cam = useEditorStore.getState().camera;
126
126
  await placeMediaFile(file, { kind: "point", ...opts.at ?? { x: cam.x, y: cam.y } });
127
127
  return useEditorStore.getState().selection[0] ?? null;
@@ -16,11 +16,11 @@ import {
16
16
  requestEmbeddings,
17
17
  requestImage,
18
18
  requestImageAction
19
- } from "./chunk-YHQGAEC5.js";
20
- import "./chunk-UT6GKZJF.js";
19
+ } from "./chunk-M5MBUFEB.js";
20
+ import "./chunk-32OBPYVY.js";
21
21
  import "./chunk-A4CGHVJP.js";
22
22
  import "./chunk-7SMURRFY.js";
23
- import "./chunk-Z557VFSN.js";
23
+ import "./chunk-NDMT4BWH.js";
24
24
  import "./chunk-KWUXHRXD.js";
25
25
  import "./chunk-3PRZ5XSZ.js";
26
26
  import "./chunk-QLJLPV5R.js";
@@ -16,42 +16,43 @@ import {
16
16
  selectedVectorTarget,
17
17
  startImageAction,
18
18
  startImageGeneration
19
- } from "./chunk-TCPSVZN3.js";
19
+ } from "./chunk-TRTT3FG2.js";
20
20
  import "./chunk-3QD6CCCN.js";
21
- import "./chunk-YHQGAEC5.js";
22
- import "./chunk-UT6GKZJF.js";
21
+ import "./chunk-M5MBUFEB.js";
22
+ import "./chunk-32OBPYVY.js";
23
23
  import "./chunk-A4CGHVJP.js";
24
24
  import "./chunk-VOOUF5TT.js";
25
- import "./chunk-IROVLB4V.js";
26
- import "./chunk-T4FFRJAH.js";
25
+ import "./chunk-HS4CR6HU.js";
26
+ import "./chunk-OWWBFGCR.js";
27
27
  import "./chunk-LB26H7IY.js";
28
28
  import "./chunk-ZLTGINSH.js";
29
29
  import "./chunk-UCNBKWJQ.js";
30
- import "./chunk-MJMCMLHB.js";
30
+ import "./chunk-BKRXB4FD.js";
31
31
  import "./chunk-33WF4AEY.js";
32
- import "./chunk-NPTJQ2AF.js";
32
+ import "./chunk-NBFZY6QK.js";
33
33
  import "./chunk-YZKSEJHZ.js";
34
- import "./chunk-SMF4YIFH.js";
35
- import "./chunk-U54RHZSX.js";
34
+ import "./chunk-3OXHJA4W.js";
35
+ import "./chunk-OE2LGHLL.js";
36
36
  import "./chunk-T4R6MNN5.js";
37
37
  import "./chunk-IYAH6IB3.js";
38
38
  import "./chunk-633NXQV2.js";
39
39
  import "./chunk-EYGE2XSW.js";
40
40
  import "./chunk-7SMURRFY.js";
41
- import "./chunk-Z557VFSN.js";
41
+ import "./chunk-NDMT4BWH.js";
42
42
  import "./chunk-KWUXHRXD.js";
43
43
  import "./chunk-3PRZ5XSZ.js";
44
- import "./chunk-5JMMBP5Q.js";
44
+ import "./chunk-FLGDAOPE.js";
45
45
  import "./chunk-OZJ7KASI.js";
46
46
  import "./chunk-PMLSPVLR.js";
47
47
  import "./chunk-76I6DIEM.js";
48
48
  import "./chunk-ZWKNYWUL.js";
49
49
  import "./chunk-ISEGXWC3.js";
50
50
  import "./chunk-VXB34VXD.js";
51
+ import "./chunk-OLQTCVWP.js";
51
52
  import "./chunk-EOPTDAPJ.js";
52
53
  import "./chunk-UM2WBM37.js";
53
54
  import "./chunk-BNQZIEZX.js";
54
- import "./chunk-XMO6D5A2.js";
55
+ import "./chunk-GUGOVTVN.js";
55
56
  import "./chunk-R5O3E5HI.js";
56
57
  import "./chunk-SW4F3FK5.js";
57
58
  import "./chunk-CBXDTH5N.js";
@@ -8,9 +8,9 @@ import {
8
8
  confirmTierCommands,
9
9
  dangerousCommands,
10
10
  registerDangerousCommands
11
- } from "./chunk-U3PY5BWW.js";
12
- import "./chunk-7CNZ5HLR.js";
13
- import "./chunk-7XP5CWQO.js";
11
+ } from "./chunk-WENYC56A.js";
12
+ import "./chunk-AYWP3RXA.js";
13
+ import "./chunk-7DRZUU3D.js";
14
14
  import "./chunk-ZLWN6LBH.js";
15
15
  import "./chunk-Q7EITIAT.js";
16
16
  import "./chunk-X36CCQ76.js";
@@ -31,6 +31,7 @@ import "./chunk-YD7Z3PGN.js";
31
31
  import "./chunk-3DMEPFEZ.js";
32
32
  import "./chunk-76I6DIEM.js";
33
33
  import "./chunk-ZWKNYWUL.js";
34
+ import "./chunk-OLQTCVWP.js";
34
35
  import "./chunk-EOPTDAPJ.js";
35
36
  import "./chunk-R5O3E5HI.js";
36
37
  import "./chunk-OQZFD4BD.js";
@@ -6,31 +6,32 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  syncStatus
9
- } from "./chunk-DBGETMUH.js";
9
+ } from "./chunk-MGNS52I2.js";
10
10
  import "./chunk-DE2GVUWC.js";
11
- import "./chunk-KPKVF2TA.js";
11
+ import "./chunk-DGM2NZSE.js";
12
12
  import "./chunk-7SMURRFY.js";
13
13
  import "./chunk-EUF3VFBW.js";
14
- import "./chunk-Z557VFSN.js";
14
+ import "./chunk-NDMT4BWH.js";
15
15
  import {
16
16
  cloudApi
17
17
  } from "./chunk-KWUXHRXD.js";
18
18
  import "./chunk-3PRZ5XSZ.js";
19
19
  import "./chunk-TZQJDYMB.js";
20
- import "./chunk-XJFTD3EZ.js";
20
+ import "./chunk-E6DRH2F2.js";
21
21
  import {
22
22
  useEditorStore
23
- } from "./chunk-5JMMBP5Q.js";
23
+ } from "./chunk-FLGDAOPE.js";
24
24
  import "./chunk-OZJ7KASI.js";
25
25
  import "./chunk-PMLSPVLR.js";
26
26
  import "./chunk-76I6DIEM.js";
27
27
  import "./chunk-ZWKNYWUL.js";
28
28
  import "./chunk-ISEGXWC3.js";
29
29
  import "./chunk-VXB34VXD.js";
30
+ import "./chunk-OLQTCVWP.js";
30
31
  import "./chunk-EOPTDAPJ.js";
31
32
  import "./chunk-UM2WBM37.js";
32
33
  import "./chunk-BNQZIEZX.js";
33
- import "./chunk-XMO6D5A2.js";
34
+ import "./chunk-GUGOVTVN.js";
34
35
  import "./chunk-R5O3E5HI.js";
35
36
  import "./chunk-SW4F3FK5.js";
36
37
  import "./chunk-CBXDTH5N.js";
@@ -7,55 +7,56 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  editBlockReason,
9
9
  editorToolContext
10
- } from "./chunk-D7XGMFYM.js";
10
+ } from "./chunk-3OZO3VDZ.js";
11
11
  import "./chunk-KOAEKWIA.js";
12
12
  import "./chunk-U7FLEMSS.js";
13
- import "./chunk-TCPSVZN3.js";
13
+ import "./chunk-TRTT3FG2.js";
14
14
  import "./chunk-3QD6CCCN.js";
15
- import "./chunk-YHQGAEC5.js";
16
- import "./chunk-UT6GKZJF.js";
15
+ import "./chunk-M5MBUFEB.js";
16
+ import "./chunk-32OBPYVY.js";
17
17
  import "./chunk-A4CGHVJP.js";
18
18
  import "./chunk-VOOUF5TT.js";
19
- import "./chunk-UNJ2Y726.js";
19
+ import "./chunk-FM4WN2UV.js";
20
20
  import "./chunk-ZYK65XJJ.js";
21
- import "./chunk-IROVLB4V.js";
22
- import "./chunk-DBGETMUH.js";
21
+ import "./chunk-HS4CR6HU.js";
22
+ import "./chunk-MGNS52I2.js";
23
23
  import "./chunk-DE2GVUWC.js";
24
- import "./chunk-T4FFRJAH.js";
24
+ import "./chunk-OWWBFGCR.js";
25
25
  import "./chunk-LB26H7IY.js";
26
26
  import "./chunk-ZLTGINSH.js";
27
27
  import "./chunk-UCNBKWJQ.js";
28
- import "./chunk-MJMCMLHB.js";
28
+ import "./chunk-BKRXB4FD.js";
29
29
  import "./chunk-33WF4AEY.js";
30
- import "./chunk-NPTJQ2AF.js";
30
+ import "./chunk-NBFZY6QK.js";
31
31
  import "./chunk-YZKSEJHZ.js";
32
- import "./chunk-SMF4YIFH.js";
33
- import "./chunk-U54RHZSX.js";
32
+ import "./chunk-3OXHJA4W.js";
33
+ import "./chunk-OE2LGHLL.js";
34
34
  import "./chunk-T4R6MNN5.js";
35
35
  import "./chunk-IYAH6IB3.js";
36
36
  import "./chunk-633NXQV2.js";
37
37
  import "./chunk-YD7Z3PGN.js";
38
38
  import "./chunk-3DMEPFEZ.js";
39
39
  import "./chunk-EYGE2XSW.js";
40
- import "./chunk-KPKVF2TA.js";
40
+ import "./chunk-DGM2NZSE.js";
41
41
  import "./chunk-7SMURRFY.js";
42
42
  import "./chunk-EUF3VFBW.js";
43
- import "./chunk-Z557VFSN.js";
43
+ import "./chunk-NDMT4BWH.js";
44
44
  import "./chunk-KWUXHRXD.js";
45
45
  import "./chunk-3PRZ5XSZ.js";
46
46
  import "./chunk-TZQJDYMB.js";
47
- import "./chunk-XJFTD3EZ.js";
48
- import "./chunk-5JMMBP5Q.js";
47
+ import "./chunk-E6DRH2F2.js";
48
+ import "./chunk-FLGDAOPE.js";
49
49
  import "./chunk-OZJ7KASI.js";
50
50
  import "./chunk-PMLSPVLR.js";
51
51
  import "./chunk-76I6DIEM.js";
52
52
  import "./chunk-ZWKNYWUL.js";
53
53
  import "./chunk-ISEGXWC3.js";
54
54
  import "./chunk-VXB34VXD.js";
55
+ import "./chunk-OLQTCVWP.js";
55
56
  import "./chunk-EOPTDAPJ.js";
56
57
  import "./chunk-UM2WBM37.js";
57
58
  import "./chunk-BNQZIEZX.js";
58
- import "./chunk-XMO6D5A2.js";
59
+ import "./chunk-GUGOVTVN.js";
59
60
  import "./chunk-R5O3E5HI.js";
60
61
  import "./chunk-SW4F3FK5.js";
61
62
  import "./chunk-CBXDTH5N.js";