@popcraft/kit 0.9.3 → 0.9.4

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 (36) hide show
  1. package/dist/chunks/{builtin-3QCETKDZ.js → builtin-RX4EA22B.js} +2 -2
  2. package/dist/chunks/{check-template-V7D42C6V.js → check-template-EWPD3JQF.js} +6 -6
  3. package/dist/chunks/{chunk-BPZ6MNCM.js → chunk-364Z443O.js} +3 -3
  4. package/dist/chunks/{chunk-MJUMOHJ3.js → chunk-3YBQ6AUJ.js} +5 -5
  5. package/dist/chunks/{chunk-3KBFG7UG.js → chunk-B4LHWR3X.js} +1 -1
  6. package/dist/chunks/{chunk-KV5PUX2F.js → chunk-LTHUEEOA.js} +1 -1
  7. package/dist/chunks/{chunk-MBBPEPPJ.js → chunk-NRLDSECK.js} +2 -2
  8. package/dist/chunks/{chunk-4IVA4I5O.js → chunk-NWFKSYOK.js} +1 -1
  9. package/dist/chunks/{chunk-FQ55UPTK.js → chunk-RTTZKZKG.js} +3 -3
  10. package/dist/chunks/{chunk-NNSGLPFI.js → chunk-WJ62BVS3.js} +2 -2
  11. package/dist/chunks/{chunk-Q3D2P7G2.js → chunk-XYHRWVQW.js} +5 -5
  12. package/dist/chunks/{chunk-MIVL5UR7.js → chunk-YH7RKEZ6.js} +4 -4
  13. package/dist/chunks/{chunk-B642DVG5.js → chunk-ZI7BWR7C.js} +15 -15
  14. package/dist/chunks/{client-26LZFI7Y.js → client-67F3BIDN.js} +1 -1
  15. package/dist/chunks/{client-VASJTBVQ.js → client-B47YTPCS.js} +2 -2
  16. package/dist/chunks/{editor-seams-C7OLM5QJ.js → editor-seams-CIHXLT3H.js} +5 -5
  17. package/dist/chunks/{editor-store-ECT7TXFJ.js → editor-store-7Y3SJBDZ.js} +1 -1
  18. package/dist/chunks/{export-watermark-MEYNSEPK.js → export-watermark-PDL2MF7A.js} +4 -4
  19. package/dist/chunks/{eyedropper-MMAGZG2J.js → eyedropper-A3ZSUEJD.js} +1 -1
  20. package/dist/chunks/{host-Y2GA3P7H.js → host-LS2Z63MC.js} +5 -5
  21. package/dist/chunks/{libraries-BX77SG2Y.js → libraries-EATTWPJU.js} +4 -4
  22. package/dist/chunks/{live-DJXCPQ7D.js → live-2Z6MBAWT.js} +1 -1
  23. package/dist/chunks/{media-tool-XFVF5RBW.js → media-tool-MMNPPMVC.js} +1 -1
  24. package/dist/chunks/{new-file-QFWDNJ6J.js → new-file-GZIOXOUW.js} +2 -2
  25. package/dist/chunks/{plugin-OX2WOCM2.js → plugin-RNR6QSI7.js} +2 -2
  26. package/dist/chunks/{plugin-import-KLMLPL7X.js → plugin-import-KSUOJS23.js} +9 -9
  27. package/dist/chunks/{presence-XBEKV7P5.js → presence-7IAQQE7M.js} +2 -2
  28. package/dist/chunks/{project-LOIPC5K2.js → project-FZICXBPA.js} +1 -1
  29. package/dist/chunks/{publish-site-5OXUYFY6.js → publish-site-6SZVPXRO.js} +5 -5
  30. package/dist/chunks/{raster-actions-YNEBR7AE.js → raster-actions-I6OCAZ3T.js} +1 -1
  31. package/dist/chunks/{runner-O6CLZJJN.js → runner-EL3VRXNF.js} +20 -20
  32. package/dist/chunks/{store-PWEAGLQQ.js → store-S2EVPXKA.js} +2 -2
  33. package/dist/chunks/{sync-S43UBNVV.js → sync-F67OZYVS.js} +4 -4
  34. package/dist/chunks/{versions-FPQSRGWY.js → versions-K56JRWOE.js} +4 -4
  35. package/dist/index.js +1 -1
  36. package/package.json +1 -1
@@ -7,8 +7,8 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  builtinTools,
9
9
  registerBuiltinTools
10
- } from "./chunk-KV5PUX2F.js";
11
- import "./chunk-B642DVG5.js";
10
+ } from "./chunk-LTHUEEOA.js";
11
+ import "./chunk-ZI7BWR7C.js";
12
12
  import "./chunk-4GBCCBSQ.js";
13
13
  import "./chunk-UFMB2TVR.js";
14
14
  import "./chunk-3DP3VBDU.js";
@@ -9,7 +9,7 @@ import {
9
9
  needsSelection,
10
10
  pageGo,
11
11
  selectionIsPicture
12
- } from "./chunk-B642DVG5.js";
12
+ } from "./chunk-ZI7BWR7C.js";
13
13
  import "./chunk-4GBCCBSQ.js";
14
14
  import "./chunk-UFMB2TVR.js";
15
15
  import "./chunk-3DP3VBDU.js";
@@ -224,7 +224,7 @@ var none = external_exports.object({});
224
224
  var emit = (name, detail) => {
225
225
  if (typeof window !== "undefined") window.dispatchEvent(new CustomEvent(name, { detail }));
226
226
  };
227
- var store = () => import("./editor-store-ECT7TXFJ.js").then((m) => m.useEditorStore.getState());
227
+ var store = () => import("./editor-store-7Y3SJBDZ.js").then((m) => m.useEditorStore.getState());
228
228
  var MODE_IDS = MODE_LIST.map((m) => m.id);
229
229
  var MODE_ALIASES = { JAM: "POPCORN" };
230
230
  var modeSet = defineCommand({
@@ -402,7 +402,7 @@ var aiOpen = defineCommand({
402
402
  ] } },
403
403
  run: async ({ dialog, skillId }) => {
404
404
  if (dialog) (await import("./client-store-QWGARW3P.js")).openAiDialog(dialog);
405
- else (await import("./store-PWEAGLQQ.js")).openAgentPanel({ skillId: skillId ?? null });
405
+ else (await import("./store-S2EVPXKA.js")).openAgentPanel({ skillId: skillId ?? null });
406
406
  return { summary: dialog ? `Opened AI ${dialog}` : "Opened the agent" };
407
407
  }
408
408
  });
@@ -481,11 +481,11 @@ var toolPlace = defineCommand({
481
481
  run: async ({ what }) => {
482
482
  if (what === "media") {
483
483
  const s = await store();
484
- const { placeMediaFromPicker } = await import("./media-tool-XFVF5RBW.js");
484
+ const { placeMediaFromPicker } = await import("./media-tool-MMNPPMVC.js");
485
485
  await placeMediaFromPicker({ kind: "point", x: s.camera.x, y: s.camera.y });
486
486
  return { summary: "Placing media" };
487
487
  }
488
- const { beginEyedrop } = await import("./eyedropper-MMAGZG2J.js");
488
+ const { beginEyedrop } = await import("./eyedropper-A3ZSUEJD.js");
489
489
  void beginEyedrop();
490
490
  return { summary: "Pick a color" };
491
491
  }
@@ -503,7 +503,7 @@ var nodeRasterize = defineCommand({
503
503
  keywords: ["rasterize", "raster", "flatten", "pixels", "paint layer", "erase", "bitmap"]
504
504
  } },
505
505
  run: async () => {
506
- const { flattenSelectionToPaintLayer } = await import("./raster-actions-YNEBR7AE.js");
506
+ const { flattenSelectionToPaintLayer } = await import("./raster-actions-I6OCAZ3T.js");
507
507
  await flattenSelectionToPaintLayer();
508
508
  return { summary: "Rasterized" };
509
509
  }
@@ -27,13 +27,13 @@ import {
27
27
  import {
28
28
  collabSession,
29
29
  syncStatus
30
- } from "./chunk-MIVL5UR7.js";
30
+ } from "./chunk-YH7RKEZ6.js";
31
31
  import {
32
32
  loadEntitlements
33
- } from "./chunk-3KBFG7UG.js";
33
+ } from "./chunk-B4LHWR3X.js";
34
34
  import {
35
35
  useEditorStore
36
- } from "./chunk-Q3D2P7G2.js";
36
+ } from "./chunk-XYHRWVQW.js";
37
37
  import {
38
38
  cloudApi
39
39
  } from "./chunk-INM2MZEQ.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-AF7ACTI3.js";
10
10
  import {
11
11
  syncStatus
12
- } from "./chunk-MIVL5UR7.js";
12
+ } from "./chunk-YH7RKEZ6.js";
13
13
  import {
14
14
  exportNodeToSVG
15
15
  } from "./chunk-SX7GDQCE.js";
@@ -22,7 +22,7 @@ import {
22
22
  import {
23
23
  setPluginTabs,
24
24
  useEditorStore
25
- } from "./chunk-Q3D2P7G2.js";
25
+ } from "./chunk-XYHRWVQW.js";
26
26
  import {
27
27
  TOKEN_IDS,
28
28
  tokenVar
@@ -54,7 +54,7 @@ init_define_POPCRAFT_COMPONENT_IDS();
54
54
  // lib/plugins/api.ts
55
55
  init_define_POPCRAFT_COMPONENT_IDS();
56
56
  async function handlePluginCall(env, method, params = {}) {
57
- const { dispatchPluginCall } = await import("./plugin-OX2WOCM2.js");
57
+ const { dispatchPluginCall } = await import("./plugin-RNR6QSI7.js");
58
58
  return dispatchPluginCall(env, method, params);
59
59
  }
60
60
 
@@ -378,7 +378,7 @@ async function runPlugin(pluginId, commandId, opts = {}) {
378
378
  if (!opened) throw new Error("The browser blocked the new tab");
379
379
  },
380
380
  createDocument: async (opts2) => {
381
- const { createFreshFileOrExplain } = await import("./new-file-QFWDNJ6J.js");
381
+ const { createFreshFileOrExplain } = await import("./new-file-GZIOXOUW.js");
382
382
  const created = await createFreshFileOrExplain({}, { name: opts2?.name });
383
383
  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})`);
384
384
  await useEditorStore.getState().openDocument(created.docId);
@@ -538,7 +538,7 @@ if (typeof window !== "undefined") {
538
538
  const name = d.name || "Imported";
539
539
  void (async () => {
540
540
  try {
541
- const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-KLMLPL7X.js");
541
+ const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-KSUOJS23.js");
542
542
  if (d.ir && typeof d.ir === "object") {
543
543
  await applyPluginLayoutIr(d.ir, { mode, name });
544
544
  return;
@@ -14,7 +14,7 @@ import {
14
14
  cloudFilePath,
15
15
  localDocPath,
16
16
  markLibraryDocument
17
- } from "./chunk-Q3D2P7G2.js";
17
+ } from "./chunk-XYHRWVQW.js";
18
18
  import {
19
19
  listDocMetas,
20
20
  saveDocSnapshot
@@ -7,7 +7,7 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  builtinCommands,
9
9
  registerBuiltinCommands
10
- } from "./chunk-B642DVG5.js";
10
+ } from "./chunk-ZI7BWR7C.js";
11
11
  import {
12
12
  toolView
13
13
  } from "./chunk-JASRRFYT.js";
@@ -9,7 +9,7 @@ import {
9
9
  hostEnv,
10
10
  plain,
11
11
  registerBuiltinCommands
12
- } from "./chunk-B642DVG5.js";
12
+ } from "./chunk-ZI7BWR7C.js";
13
13
  import {
14
14
  storeOpsSeam
15
15
  } from "./chunk-7V6KADBP.js";
@@ -692,7 +692,7 @@ var pluginRun = defineCommand({
692
692
  }
693
693
  },
694
694
  run: async (p, ctx) => {
695
- const { runPlugin } = await import("./host-Y2GA3P7H.js");
695
+ const { runPlugin } = await import("./host-LS2Z63MC.js");
696
696
  await runPlugin(p.pluginId, p.commandId);
697
697
  ctx.notice(`Started ${p.pluginId}.`);
698
698
  return {
@@ -6,7 +6,7 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  useEditorStore
9
- } from "./chunk-Q3D2P7G2.js";
9
+ } from "./chunk-XYHRWVQW.js";
10
10
  import {
11
11
  announce
12
12
  } from "./chunk-T6VCMYYB.js";
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-XHYSH5ZQ.js";
22
22
  import {
23
23
  useEditorStore
24
- } from "./chunk-Q3D2P7G2.js";
24
+ } from "./chunk-XYHRWVQW.js";
25
25
  import {
26
26
  create
27
27
  } from "./chunk-XDQNKR53.js";
@@ -1422,7 +1422,7 @@ async function sendMessage(text) {
1422
1422
  if (!useAgentStore.getState().activeThreadId) newThread();
1423
1423
  const mentions = pruneMentions(body, useAgentStore.getState().draftMentions);
1424
1424
  useAgentStore.setState({ draft: "", draftMentions: [], error: null });
1425
- const { runTurn } = await import("./runner-O6CLZJJN.js");
1425
+ const { runTurn } = await import("./runner-EL3VRXNF.js");
1426
1426
  await runTurn(body, mentions);
1427
1427
  }
1428
1428
  function stop() {
@@ -1525,7 +1525,7 @@ var clearTaskChildren = () => useAgentStore.setState({ taskChildren: {} });
1525
1525
  function subscribeChildTools() {
1526
1526
  let dispose;
1527
1527
  let cancelled = false;
1528
- void import("./runner-O6CLZJJN.js").then(({ onChildTool }) => {
1528
+ void import("./runner-EL3VRXNF.js").then(({ onChildTool }) => {
1529
1529
  const off = onChildTool((report) => {
1530
1530
  if (report?.status !== "running" || report.jobId) return;
1531
1531
  recordChildTool(report.toolCallId ?? "", report.name);
@@ -91,9 +91,9 @@ async function placeStockPhoto(photo, opts = {}) {
91
91
  }
92
92
  async function placePicture(imported, opts = {}) {
93
93
  const [{ useEditorStore }, { photoFrameOf }, { placeImage }] = await Promise.all([
94
- import("./editor-store-ECT7TXFJ.js"),
94
+ import("./editor-store-7Y3SJBDZ.js"),
95
95
  import("../lib/document/photo-frames.js"),
96
- import("./media-tool-XFVF5RBW.js")
96
+ import("./media-tool-MMNPPMVC.js")
97
97
  ]);
98
98
  const st = useEditorStore.getState();
99
99
  const frame = photoFrameOf(st.document.nodes, opts.targetId !== void 0 ? opts.targetId : st.selection[0] ?? null);
@@ -4559,7 +4559,7 @@ function createPopcornSlice(set2, get2) {
4559
4559
  privateMode: false,
4560
4560
  setPrivateMode: (on) => {
4561
4561
  set2({ privateMode: on });
4562
- void import("./presence-XBEKV7P5.js").then((m) => m.setPresencePrivate(on)).catch(() => {
4562
+ void import("./presence-7IAQQE7M.js").then((m) => m.setPresencePrivate(on)).catch(() => {
4563
4563
  });
4564
4564
  },
4565
4565
  /** Reveal every private item THIS user created (they sync to collaborators). Others' stay theirs. */
@@ -6626,7 +6626,7 @@ var useEditorStore = create()(
6626
6626
  // A copy is a new file, so it is cloud-backed like any other (see lib/client/cloud/new-file.ts).
6627
6627
  // Returns '' when it was refused (offline, signed out, plan full) or failed; nothing is left behind.
6628
6628
  duplicateDocument: async (id) => {
6629
- const { duplicateDocumentToCloud } = await import("./sync-S43UBNVV.js");
6629
+ const { duplicateDocumentToCloud } = await import("./sync-F67OZYVS.js");
6630
6630
  return duplicateDocumentToCloud(id);
6631
6631
  },
6632
6632
  deleteDocument: async (id) => {
@@ -10070,9 +10070,9 @@ if (typeof window !== "undefined") {
10070
10070
  if (typeof window !== "undefined" && navigator.webdriver) {
10071
10071
  window.__vpDesign = async (script, o = {}) => {
10072
10072
  const [{ registerBuiltinTools, runTool }, { editorToolContext }, { createDesignPreview }] = await Promise.all([
10073
- import("./tools-NRNNO374.js").then(async (m) => ({ ...m, registerBuiltinTools: (await import("./builtin-3QCETKDZ.js")).registerBuiltinTools })),
10074
- import("./editor-seams-C7OLM5QJ.js"),
10075
- import("./live-DJXCPQ7D.js")
10073
+ import("./tools-NRNNO374.js").then(async (m) => ({ ...m, registerBuiltinTools: (await import("./builtin-RX4EA22B.js")).registerBuiltinTools })),
10074
+ import("./editor-seams-CIHXLT3H.js"),
10075
+ import("./live-2Z6MBAWT.js")
10076
10076
  ]);
10077
10077
  registerBuiltinTools();
10078
10078
  const args = JSON.stringify({ ...o.name ? { name: o.name } : {}, ...o.size ? { size: o.size } : {}, ...o.frame ? { frame: o.frame } : {}, script });
@@ -14,7 +14,7 @@ import {
14
14
  newFileRefusal,
15
15
  reportNewFileBlocked,
16
16
  setCloudLink
17
- } from "./chunk-3KBFG7UG.js";
17
+ } from "./chunk-B4LHWR3X.js";
18
18
  import {
19
19
  activeTeamWorkspaceId
20
20
  } from "./chunk-XRXRSVVQ.js";
@@ -24,7 +24,7 @@ import {
24
24
  } from "./chunk-3VROQ6LH.js";
25
25
  import {
26
26
  attachPresence
27
- } from "./chunk-4IVA4I5O.js";
27
+ } from "./chunk-NWFKSYOK.js";
28
28
  import {
29
29
  documentPath,
30
30
  isDesktopTabs,
@@ -38,7 +38,7 @@ import {
38
38
  setCollabHistory,
39
39
  storedDocument,
40
40
  useEditorStore
41
- } from "./chunk-Q3D2P7G2.js";
41
+ } from "./chunk-XYHRWVQW.js";
42
42
  import {
43
43
  deleteDocFromLibrary,
44
44
  docExists,
@@ -9714,7 +9714,7 @@ function reflectUrl() {
9714
9714
  const docId = useEditorStore.getState().document.id;
9715
9715
  if (isUnsavedPlaceholder(docId)) return;
9716
9716
  if (!isDesktopTabs() && isWebHome(window.location.pathname, window.location.search)) return;
9717
- const localDocId = !isDesktopTabs() && !activeLink && isPersistableDocument(docId) ? docId : null;
9717
+ const localDocId = !activeLink && isPersistableDocument(docId) ? docId : null;
9718
9718
  const base = documentPath({ linkKey: activeLink?.key, localDocId });
9719
9719
  const atSameAddress = window.location.pathname === base.split("?")[0];
9720
9720
  const path = atSameAddress ? withDeepLink(base, parseDeepLink(window.location.search)) : base;
@@ -3315,7 +3315,7 @@ var viewCopyLink = defineCommand({
3315
3315
  },
3316
3316
  run: async (args, ctx) => {
3317
3317
  const [{ syncStatus }, { fileUrl }, { withDeepLink }] = await Promise.all([
3318
- import("./sync-S43UBNVV.js"),
3318
+ import("./sync-F67OZYVS.js"),
3319
3319
  import("./api-6GMG3SAB.js"),
3320
3320
  import("./deep-link-5FVSI2Y6.js")
3321
3321
  ]);
@@ -3640,7 +3640,7 @@ var pageGo = defineCommand({
3640
3640
  ] }
3641
3641
  },
3642
3642
  run: async ({ to }) => {
3643
- const { useEditorStore } = await import("./editor-store-ECT7TXFJ.js");
3643
+ const { useEditorStore } = await import("./editor-store-7Y3SJBDZ.js");
3644
3644
  useEditorStore.getState().goToPrintPage(to);
3645
3645
  return { summary: typeof to === "number" ? `Page ${to + 1}` : `${to} page` };
3646
3646
  }
@@ -3674,7 +3674,7 @@ var pageSetup = defineCommand({
3674
3674
  }
3675
3675
  },
3676
3676
  run: async (args) => {
3677
- const { useEditorStore } = await import("./editor-store-ECT7TXFJ.js");
3677
+ const { useEditorStore } = await import("./editor-store-7Y3SJBDZ.js");
3678
3678
  useEditorStore.getState().applyPageSetup(args);
3679
3679
  return { summary: `Page setup updated${args.kind ? ` (${args.kind.toLowerCase()})` : ""}` };
3680
3680
  }
@@ -4781,7 +4781,7 @@ async function runAnimationExport(format, args, ctx) {
4781
4781
  const filename = exportFileName(args.filename || targetName(doc2, target), format);
4782
4782
  const [{ exportAnimation }, { memoryDestination }] = await Promise.all([import("./video-M6LNBBQ3.js"), import("./destination-HDQ3L4FO.js")]);
4783
4783
  if (format === "lottie" || format === "dotlottie") return runLottieExport(renderer, doc2, spec, filename, ctx, memoryDestination, args.stateMachine);
4784
- const planWatermark = format !== "png" && await (await import("./export-watermark-MEYNSEPK.js")).exportWatermark();
4784
+ const planWatermark = format !== "png" && await (await import("./export-watermark-PDL2MF7A.js")).exportWatermark();
4785
4785
  if (format !== "png") spec = { ...spec, watermark: planWatermark || args.watermark !== false };
4786
4786
  const dest = ctx.destination ? await ctx.destination(filename, FORMAT_MIME[format]) : memoryDestination(filename, FORMAT_MIME[format]);
4787
4787
  let stats;
@@ -4868,7 +4868,7 @@ var exportLottie = animationCommand((args) => args.container === "lottie" ? "dot
4868
4868
  var EXPORT_NODE_CAP = 2e4;
4869
4869
  async function exportSite(doc2, pageId2, packaging, styling = "css") {
4870
4870
  const [{ completeSite, nextFilesOf, staticFilesOf, NoSiteRuntime, bytesOf }, { fileBase }, { zipFiles }, { downloadBlob }] = await Promise.all([
4871
- import("./project-LOIPC5K2.js"),
4871
+ import("./project-FZICXBPA.js"),
4872
4872
  import("./web-UEYBDFCF.js"),
4873
4873
  import("./zip-export-FX3MLZUV.js"),
4874
4874
  import("./download-WGBNF2WA.js")
@@ -7852,7 +7852,7 @@ init_scene_graph();
7852
7852
  var licence = external_exports.enum(["commercial", "any"]).optional().describe("commercial (default): only licences that allow commercial use and edits (CC0, public domain, CC BY, CC BY-SA). any: every Creative Commons licence, including NC and ND.");
7853
7853
  var brief2 = (p) => ({ id: p.id, title: p.title, creator: p.credit.creator, licence: licenceLabel(p.credit), width: p.width, height: p.height, source: p.credit.sourceUrl });
7854
7854
  async function placeImportedPicture(ctx, imported, at, what, extra = {}) {
7855
- const client = await import("./client-26LZFI7Y.js");
7855
+ const client = await import("./client-67F3BIDN.js");
7856
7856
  if (at.fillLayerId) {
7857
7857
  const doc2 = ctx.doc();
7858
7858
  const target = nodeOrThrow(doc2, at.fillLayerId);
@@ -7898,7 +7898,7 @@ var photoSearch = defineCommand({
7898
7898
  }
7899
7899
  },
7900
7900
  run: async (args) => {
7901
- const { searchStockPhotos } = await import("./client-26LZFI7Y.js");
7901
+ const { searchStockPhotos } = await import("./client-67F3BIDN.js");
7902
7902
  const page = await searchStockPhotos(args.query, args.page ?? 1, { licence: args.licence });
7903
7903
  return {
7904
7904
  summary: `${page.results.length} photo${page.results.length === 1 ? "" : "s"} for \u201C${page.query}\u201D (page ${page.page} of ${page.pageCount || 1})`,
@@ -7932,7 +7932,7 @@ var photoInsert = defineCommand({
7932
7932
  run: async (args, ctx) => {
7933
7933
  if (!args.id && !args.query) throw new ToolError("Pass an id from search_photos, or a query.");
7934
7934
  if (args.id && !isPhotoId(args.id)) throw new ToolError(`"${args.id}" is not a photo id from search_photos.`);
7935
- const client = await import("./client-26LZFI7Y.js");
7935
+ const client = await import("./client-67F3BIDN.js");
7936
7936
  let photo;
7937
7937
  if (args.id) photo = await client.stockPhotoInfo(args.id);
7938
7938
  else {
@@ -7971,7 +7971,7 @@ var mediaList = defineCommand({
7971
7971
  }
7972
7972
  },
7973
7973
  run: async (args) => {
7974
- const { listLibraryMedia } = await import("./client-VASJTBVQ.js");
7974
+ const { listLibraryMedia } = await import("./client-B47YTPCS.js");
7975
7975
  const page = await listLibraryMedia(args);
7976
7976
  return { summary: `${page.items.length} media item${page.items.length === 1 ? "" : "s"}${page.nextCursor ? " (more)" : ""}`, data: { workspaceId: page.workspaceId, items: page.items.map(brief3), nextCursor: page.nextCursor } };
7977
7977
  }
@@ -8002,7 +8002,7 @@ var mediaInsert = defineCommand({
8002
8002
  run: async (args, ctx) => {
8003
8003
  const contentType = args.contentType ?? "image/*";
8004
8004
  if (!contentType.startsWith("image/")) throw new ToolError("insert_media places pictures; this item is not one.");
8005
- const { importLibraryPicture } = await import("./client-VASJTBVQ.js");
8005
+ const { importLibraryPicture } = await import("./client-B47YTPCS.js");
8006
8006
  const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "Media", contentType, size: 0, createdAt: "", fileCount: 1, source: null };
8007
8007
  const imported = await importLibraryPicture(item);
8008
8008
  return placeImportedPicture(ctx, imported, args, `\u201C${imported.name}\u201D`, { hash: imported.hash });
@@ -8274,7 +8274,7 @@ async function signedIn() {
8274
8274
  }
8275
8275
  async function publishedFile() {
8276
8276
  await signedIn();
8277
- const { openFileKey } = await import("./publish-site-5OXUYFY6.js");
8277
+ const { openFileKey } = await import("./publish-site-6SZVPXRO.js");
8278
8278
  const key = openFileKey();
8279
8279
  if (!key) throw new CommandError("This file is not saved to the cloud yet, so it has no site. Publish it first.", "failed");
8280
8280
  return key;
@@ -8310,7 +8310,7 @@ var publishSite = defineCommand({
8310
8310
  const { cleanSlug } = await import("./rules-MBMDYEJ5.js");
8311
8311
  const address = p.address === void 0 ? void 0 : cleanSlug(p.address);
8312
8312
  if (address === null) throw new CommandError("That cannot be a site address: use 3 to 40 letters, digits and dashes.", "invalid_params");
8313
- const { publishOpenFile, NoScreens } = await import("./publish-site-5OXUYFY6.js");
8313
+ const { publishOpenFile, NoScreens } = await import("./publish-site-6SZVPXRO.js");
8314
8314
  try {
8315
8315
  const done = await publishOpenFile(address);
8316
8316
  ctx.notice(`Published version ${done.version}: ${done.url}`);
@@ -8365,7 +8365,7 @@ var publishStatus = defineCommand({
8365
8365
  },
8366
8366
  run: async () => {
8367
8367
  await signedIn();
8368
- const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-5OXUYFY6.js"), import("./sites-OZBRHUH6.js")]);
8368
+ const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-6SZVPXRO.js"), import("./sites-OZBRHUH6.js")]);
8369
8369
  const key = openFileKey();
8370
8370
  const status = await siteStatus(key);
8371
8371
  const site = status.site;
@@ -8708,7 +8708,7 @@ var integrationOpen = defineCommand({
8708
8708
  }
8709
8709
  });
8710
8710
  async function openFile() {
8711
- const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-TDPI2HEY.js"), import("./publish-site-5OXUYFY6.js")]);
8711
+ const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-TDPI2HEY.js"), import("./publish-site-6SZVPXRO.js")]);
8712
8712
  if (!cloudUser()) throw new CommandError("You are not signed in.", "denied");
8713
8713
  const key = openFileKey();
8714
8714
  if (!key) throw new CommandError("This file is not saved to the cloud yet. Publish it first (publish_site).", "failed");
@@ -9487,7 +9487,7 @@ var docImportFile = defineCommand({
9487
9487
  const file = new File([body], args.name);
9488
9488
  if (file.size > MAX_BYTES) throw new ToolError(`"${args.name}" is larger than ${MAX_BYTES / 1024 / 1024} MB.`);
9489
9489
  const [{ buildImportedDocument }, { mergeImportedDocument }] = await Promise.all([
9490
- import("./plugin-import-KLMLPL7X.js"),
9490
+ import("./plugin-import-KSUOJS23.js"),
9491
9491
  import("./import-merge-H2V2S3BI.js")
9492
9492
  ]);
9493
9493
  const built = await buildImportedDocument(file);
@@ -14,7 +14,7 @@ import {
14
14
  placeStockPhoto,
15
15
  searchStockPhotos,
16
16
  stockPhotoInfo
17
- } from "./chunk-NNSGLPFI.js";
17
+ } from "./chunk-WJ62BVS3.js";
18
18
  import "./chunk-I6KTHLBX.js";
19
19
  import "./chunk-RXKBF7JU.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-NNSGLPFI.js";
10
+ } from "./chunk-WJ62BVS3.js";
11
11
  import "./chunk-I6KTHLBX.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-ECT7TXFJ.js"), import("./media-tool-XFVF5RBW.js")]);
124
+ const [{ useEditorStore }, { placeMediaFile }] = await Promise.all([import("./editor-store-7Y3SJBDZ.js"), import("./media-tool-MMNPPMVC.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;
@@ -7,7 +7,7 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  editBlockReason,
9
9
  editorToolContext
10
- } from "./chunk-BPZ6MNCM.js";
10
+ } from "./chunk-364Z443O.js";
11
11
  import "./chunk-E5XPS4HV.js";
12
12
  import "./chunk-7V6KADBP.js";
13
13
  import "./chunk-3DP3VBDU.js";
@@ -18,9 +18,9 @@ import "./chunk-XHYSH5ZQ.js";
18
18
  import "./chunk-YPFXDWRH.js";
19
19
  import "./chunk-JASRRFYT.js";
20
20
  import "./chunk-3FIZNBXI.js";
21
- import "./chunk-MIVL5UR7.js";
21
+ import "./chunk-YH7RKEZ6.js";
22
22
  import "./chunk-RVRQIQW7.js";
23
- import "./chunk-3KBFG7UG.js";
23
+ import "./chunk-B4LHWR3X.js";
24
24
  import "./chunk-XRXRSVVQ.js";
25
25
  import "./chunk-3VROQ6LH.js";
26
26
  import "./chunk-SX7GDQCE.js";
@@ -39,8 +39,8 @@ import "./chunk-MASWPAC4.js";
39
39
  import "./chunk-ZY73GWEP.js";
40
40
  import "./chunk-GNHGAXOA.js";
41
41
  import "./chunk-SARRRKQG.js";
42
- import "./chunk-4IVA4I5O.js";
43
- import "./chunk-Q3D2P7G2.js";
42
+ import "./chunk-NWFKSYOK.js";
43
+ import "./chunk-XYHRWVQW.js";
44
44
  import "./chunk-46ZTFFJ6.js";
45
45
  import "./chunk-7DD4V2OC.js";
46
46
  import "./chunk-ZRZ44FWZ.js";
@@ -21,7 +21,7 @@ import {
21
21
  useEditorStore,
22
22
  useMode,
23
23
  useSelection
24
- } from "./chunk-Q3D2P7G2.js";
24
+ } from "./chunk-XYHRWVQW.js";
25
25
  import "./chunk-46ZTFFJ6.js";
26
26
  import "./chunk-7DD4V2OC.js";
27
27
  import "./chunk-ZRZ44FWZ.js";
@@ -6,18 +6,18 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  syncStatus
9
- } from "./chunk-MIVL5UR7.js";
9
+ } from "./chunk-YH7RKEZ6.js";
10
10
  import "./chunk-RVRQIQW7.js";
11
11
  import {
12
12
  cachedLimits,
13
13
  isGuest,
14
14
  loadEntitlements
15
- } from "./chunk-3KBFG7UG.js";
15
+ } from "./chunk-B4LHWR3X.js";
16
16
  import "./chunk-XRXRSVVQ.js";
17
17
  import "./chunk-3VROQ6LH.js";
18
18
  import "./chunk-IM4CQVGS.js";
19
- import "./chunk-4IVA4I5O.js";
20
- import "./chunk-Q3D2P7G2.js";
19
+ import "./chunk-NWFKSYOK.js";
20
+ import "./chunk-XYHRWVQW.js";
21
21
  import "./chunk-46ZTFFJ6.js";
22
22
  import "./chunk-7DD4V2OC.js";
23
23
  import "./chunk-ZRZ44FWZ.js";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-RVRQIQW7.js";
13
13
  import {
14
14
  useEditorStore
15
- } from "./chunk-Q3D2P7G2.js";
15
+ } from "./chunk-XYHRWVQW.js";
16
16
  import "./chunk-46ZTFFJ6.js";
17
17
  import "./chunk-7DD4V2OC.js";
18
18
  import "./chunk-ZRZ44FWZ.js";
@@ -18,12 +18,12 @@ import {
18
18
  runPluginWithImport,
19
19
  runningSessionFor,
20
20
  setEnabled
21
- } from "./chunk-MJUMOHJ3.js";
21
+ } from "./chunk-3YBQ6AUJ.js";
22
22
  import "./chunk-AF7ACTI3.js";
23
23
  import "./chunk-4WX5YEBT.js";
24
- import "./chunk-MIVL5UR7.js";
24
+ import "./chunk-YH7RKEZ6.js";
25
25
  import "./chunk-RVRQIQW7.js";
26
- import "./chunk-3KBFG7UG.js";
26
+ import "./chunk-B4LHWR3X.js";
27
27
  import "./chunk-XRXRSVVQ.js";
28
28
  import "./chunk-3VROQ6LH.js";
29
29
  import "./chunk-SX7GDQCE.js";
@@ -41,8 +41,8 @@ import "./chunk-TKRXIAHH.js";
41
41
  import "./chunk-PNR4PICU.js";
42
42
  import "./chunk-MASWPAC4.js";
43
43
  import "./chunk-SARRRKQG.js";
44
- import "./chunk-4IVA4I5O.js";
45
- import "./chunk-Q3D2P7G2.js";
44
+ import "./chunk-NWFKSYOK.js";
45
+ import "./chunk-XYHRWVQW.js";
46
46
  import "./chunk-46ZTFFJ6.js";
47
47
  import "./chunk-7DD4V2OC.js";
48
48
  import "./chunk-ZRZ44FWZ.js";
@@ -7,16 +7,16 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  onSyncStatus,
9
9
  syncStatus
10
- } from "./chunk-MIVL5UR7.js";
10
+ } from "./chunk-YH7RKEZ6.js";
11
11
  import "./chunk-RVRQIQW7.js";
12
- import "./chunk-3KBFG7UG.js";
12
+ import "./chunk-B4LHWR3X.js";
13
13
  import "./chunk-XRXRSVVQ.js";
14
14
  import "./chunk-3VROQ6LH.js";
15
15
  import "./chunk-IM4CQVGS.js";
16
- import "./chunk-4IVA4I5O.js";
16
+ import "./chunk-NWFKSYOK.js";
17
17
  import {
18
18
  useEditorStore
19
- } from "./chunk-Q3D2P7G2.js";
19
+ } from "./chunk-XYHRWVQW.js";
20
20
  import "./chunk-46ZTFFJ6.js";
21
21
  import "./chunk-7DD4V2OC.js";
22
22
  import "./chunk-ZRZ44FWZ.js";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-BGJEKFNT.js";
13
13
  import {
14
14
  useEditorStore
15
- } from "./chunk-Q3D2P7G2.js";
15
+ } from "./chunk-XYHRWVQW.js";
16
16
  import "./chunk-46ZTFFJ6.js";
17
17
  import "./chunk-7DD4V2OC.js";
18
18
  import "./chunk-ZRZ44FWZ.js";
@@ -12,7 +12,7 @@ import "./chunk-RVRQIQW7.js";
12
12
  import "./chunk-HCN2PBR5.js";
13
13
  import {
14
14
  useEditorStore
15
- } from "./chunk-Q3D2P7G2.js";
15
+ } from "./chunk-XYHRWVQW.js";
16
16
  import "./chunk-46ZTFFJ6.js";
17
17
  import "./chunk-7DD4V2OC.js";
18
18
  import {
@@ -12,10 +12,10 @@ import {
12
12
  createNewLocalFile,
13
13
  documentFromSeed,
14
14
  newFileRefusal
15
- } from "./chunk-3KBFG7UG.js";
15
+ } from "./chunk-B4LHWR3X.js";
16
16
  import "./chunk-XRXRSVVQ.js";
17
17
  import "./chunk-IM4CQVGS.js";
18
- import "./chunk-Q3D2P7G2.js";
18
+ import "./chunk-XYHRWVQW.js";
19
19
  import "./chunk-46ZTFFJ6.js";
20
20
  import "./chunk-7DD4V2OC.js";
21
21
  import "./chunk-ZRZ44FWZ.js";
@@ -12,8 +12,8 @@ import {
12
12
  pluginMethods,
13
13
  pluginRun,
14
14
  registerPluginCommands
15
- } from "./chunk-MBBPEPPJ.js";
16
- import "./chunk-B642DVG5.js";
15
+ } from "./chunk-NRLDSECK.js";
16
+ import "./chunk-ZI7BWR7C.js";
17
17
  import "./chunk-4GBCCBSQ.js";
18
18
  import "./chunk-UFMB2TVR.js";
19
19
  import "./chunk-7V6KADBP.js";
@@ -6,7 +6,7 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  editBlockReason
9
- } from "./chunk-BPZ6MNCM.js";
9
+ } from "./chunk-364Z443O.js";
10
10
  import "./chunk-E5XPS4HV.js";
11
11
  import {
12
12
  mergeImportedDocument
@@ -16,7 +16,7 @@ import "./chunk-3DP3VBDU.js";
16
16
  import "./chunk-KJDY7QE6.js";
17
17
  import {
18
18
  runPluginWithImport
19
- } from "./chunk-MJUMOHJ3.js";
19
+ } from "./chunk-3YBQ6AUJ.js";
20
20
  import "./chunk-AF7ACTI3.js";
21
21
  import "./chunk-4WX5YEBT.js";
22
22
  import "./chunk-J6TOKUS3.js";
@@ -25,11 +25,11 @@ import "./chunk-XHYSH5ZQ.js";
25
25
  import "./chunk-YPFXDWRH.js";
26
26
  import "./chunk-JASRRFYT.js";
27
27
  import "./chunk-3FIZNBXI.js";
28
- import "./chunk-MIVL5UR7.js";
28
+ import "./chunk-YH7RKEZ6.js";
29
29
  import "./chunk-RVRQIQW7.js";
30
30
  import {
31
31
  createFreshFileOrExplain
32
- } from "./chunk-3KBFG7UG.js";
32
+ } from "./chunk-B4LHWR3X.js";
33
33
  import "./chunk-XRXRSVVQ.js";
34
34
  import "./chunk-3VROQ6LH.js";
35
35
  import "./chunk-SX7GDQCE.js";
@@ -49,10 +49,10 @@ import "./chunk-MASWPAC4.js";
49
49
  import "./chunk-ZY73GWEP.js";
50
50
  import "./chunk-GNHGAXOA.js";
51
51
  import "./chunk-SARRRKQG.js";
52
- import "./chunk-4IVA4I5O.js";
52
+ import "./chunk-NWFKSYOK.js";
53
53
  import {
54
54
  useEditorStore
55
- } from "./chunk-Q3D2P7G2.js";
55
+ } from "./chunk-XYHRWVQW.js";
56
56
  import "./chunk-46ZTFFJ6.js";
57
57
  import "./chunk-7DD4V2OC.js";
58
58
  import "./chunk-ZRZ44FWZ.js";
@@ -335,7 +335,7 @@ async function applyLayoutIrNow(ir, opts) {
335
335
  customFonts: cur.customFonts,
336
336
  lastToolProps: cur.lastToolProps
337
337
  });
338
- const { collabSession } = await import("./sync-S43UBNVV.js");
338
+ const { collabSession } = await import("./sync-F67OZYVS.js");
339
339
  collabSession()?.flush();
340
340
  usePluginStore.getState().toast(t("pluginImport.imported", { name: opts.name }));
341
341
  return true;
@@ -490,7 +490,7 @@ async function openCreated(created, opener, frameIds) {
490
490
  if (created.local) {
491
491
  await useEditorStore.getState().openDocument(created.docId);
492
492
  } else {
493
- const { openFilledCloudDocument } = await import("./sync-S43UBNVV.js");
493
+ const { openFilledCloudDocument } = await import("./sync-F67OZYVS.js");
494
494
  await openFilledCloudDocument(created.docId, created.key, 0);
495
495
  }
496
496
  zoomImportedFrames(frameIds);
@@ -527,7 +527,7 @@ async function hostImportIntoOpenDoc(file) {
527
527
  customFonts: cur.customFonts,
528
528
  lastToolProps: cur.lastToolProps
529
529
  });
530
- const { collabSession } = await import("./sync-S43UBNVV.js");
530
+ const { collabSession } = await import("./sync-F67OZYVS.js");
531
531
  collabSession()?.flush();
532
532
  return { notes: built.notes };
533
533
  }
@@ -14,8 +14,8 @@ import {
14
14
  setPresencePrivate,
15
15
  setSpotlight,
16
16
  usePresence
17
- } from "./chunk-4IVA4I5O.js";
18
- import "./chunk-Q3D2P7G2.js";
17
+ } from "./chunk-NWFKSYOK.js";
18
+ import "./chunk-XYHRWVQW.js";
19
19
  import "./chunk-46ZTFFJ6.js";
20
20
  import "./chunk-7DD4V2OC.js";
21
21
  import "./chunk-ZRZ44FWZ.js";
@@ -937,7 +937,7 @@ init_define_POPCRAFT_COMPONENT_IDS();
937
937
  // packages/runtime/package.json
938
938
  var package_default = {
939
939
  name: "@popcraft/runtime",
940
- version: "0.9.3",
940
+ version: "0.9.4",
941
941
  description: "What code exported from PopCraft shares: the meaning of expressions (operators and functions) and, as it grows, the parts of a design's behaviour that are common code rather than generated React.",
942
942
  license: "MIT",
943
943
  homepage: "https://popcraft.app/docs/exporting/nextjs",
@@ -13,16 +13,16 @@ import "./chunk-GKKN6XAU.js";
13
13
  import {
14
14
  syncStatus,
15
15
  uploadActiveDocument
16
- } from "./chunk-MIVL5UR7.js";
16
+ } from "./chunk-YH7RKEZ6.js";
17
17
  import "./chunk-RVRQIQW7.js";
18
- import "./chunk-3KBFG7UG.js";
18
+ import "./chunk-B4LHWR3X.js";
19
19
  import "./chunk-XRXRSVVQ.js";
20
20
  import "./chunk-3VROQ6LH.js";
21
21
  import "./chunk-IM4CQVGS.js";
22
- import "./chunk-4IVA4I5O.js";
22
+ import "./chunk-NWFKSYOK.js";
23
23
  import {
24
24
  useEditorStore
25
- } from "./chunk-Q3D2P7G2.js";
25
+ } from "./chunk-XYHRWVQW.js";
26
26
  import "./chunk-46ZTFFJ6.js";
27
27
  import "./chunk-7DD4V2OC.js";
28
28
  import "./chunk-ZRZ44FWZ.js";
@@ -133,7 +133,7 @@ async function publishOpenFile(slug, progress = {}) {
133
133
  progress.onBuild?.();
134
134
  const key = openFileKey() ?? await uploadActiveDocument();
135
135
  const { document, currentPageId } = useEditorStore.getState();
136
- const { completeSite, staticFilesOf } = await import("./project-LOIPC5K2.js");
136
+ const { completeSite, staticFilesOf } = await import("./project-FZICXBPA.js");
137
137
  const built = await completeSite(document, currentPageId);
138
138
  if (!built.pages.length) throw new NoScreens();
139
139
  const files = await staticFilesOf(built);
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  RASTER_MAX_SIDE,
15
15
  useEditorStore
16
- } from "./chunk-Q3D2P7G2.js";
16
+ } from "./chunk-XYHRWVQW.js";
17
17
  import "./chunk-46ZTFFJ6.js";
18
18
  import "./chunk-7DD4V2OC.js";
19
19
  import "./chunk-ZRZ44FWZ.js";
@@ -19,7 +19,7 @@ import {
19
19
  updateActiveThread,
20
20
  updateMessage,
21
21
  useAgentStore
22
- } from "./chunk-FQ55UPTK.js";
22
+ } from "./chunk-RTTZKZKG.js";
23
23
  import {
24
24
  ALL_TOOLS,
25
25
  SUBAGENT_FRAMING,
@@ -29,20 +29,20 @@ import {
29
29
  } from "./chunk-SDGDUS34.js";
30
30
  import {
31
31
  registerBuiltinTools
32
- } from "./chunk-KV5PUX2F.js";
32
+ } from "./chunk-LTHUEEOA.js";
33
33
  import {
34
34
  editBlockReason,
35
35
  editorToolContext
36
- } from "./chunk-BPZ6MNCM.js";
36
+ } from "./chunk-364Z443O.js";
37
37
  import "./chunk-E5XPS4HV.js";
38
38
  import "./chunk-RJ53C5I6.js";
39
39
  import {
40
40
  pluginRun
41
- } from "./chunk-MBBPEPPJ.js";
41
+ } from "./chunk-NRLDSECK.js";
42
42
  import {
43
43
  integrationConfirmCommands,
44
44
  publishCommands
45
- } from "./chunk-B642DVG5.js";
45
+ } from "./chunk-ZI7BWR7C.js";
46
46
  import "./chunk-4GBCCBSQ.js";
47
47
  import "./chunk-UFMB2TVR.js";
48
48
  import "./chunk-7V6KADBP.js";
@@ -80,9 +80,9 @@ import {
80
80
  import {
81
81
  defineCommand
82
82
  } from "./chunk-3FIZNBXI.js";
83
- import "./chunk-MIVL5UR7.js";
83
+ import "./chunk-YH7RKEZ6.js";
84
84
  import "./chunk-RVRQIQW7.js";
85
- import "./chunk-3KBFG7UG.js";
85
+ import "./chunk-B4LHWR3X.js";
86
86
  import {
87
87
  activeHyperyTeamId
88
88
  } from "./chunk-XRXRSVVQ.js";
@@ -103,10 +103,10 @@ import "./chunk-MASWPAC4.js";
103
103
  import "./chunk-ZY73GWEP.js";
104
104
  import "./chunk-GNHGAXOA.js";
105
105
  import "./chunk-SARRRKQG.js";
106
- import "./chunk-4IVA4I5O.js";
106
+ import "./chunk-NWFKSYOK.js";
107
107
  import {
108
108
  useEditorStore
109
- } from "./chunk-Q3D2P7G2.js";
109
+ } from "./chunk-XYHRWVQW.js";
110
110
  import "./chunk-46ZTFFJ6.js";
111
111
  import "./chunk-7DD4V2OC.js";
112
112
  import "./chunk-ZRZ44FWZ.js";
@@ -993,7 +993,7 @@ var collabSetSpotlight = defineCommand({
993
993
  }
994
994
  },
995
995
  run: async ({ on }, ctx) => {
996
- const { setSpotlight } = await import("./presence-XBEKV7P5.js");
996
+ const { setSpotlight } = await import("./presence-7IAQQE7M.js");
997
997
  setSpotlight(on);
998
998
  ctx.notice(on ? "Spotlight on \u2014 everyone is following this view." : "Spotlight off.");
999
999
  return { summary: on ? "Spotlight on" : "Spotlight off", data: { spotlight: on } };
@@ -1020,7 +1020,7 @@ var collabRevealPrivate = defineCommand({
1020
1020
  }
1021
1021
  },
1022
1022
  run: async (_p, ctx) => {
1023
- const { useEditorStore: useEditorStore2 } = await import("./editor-store-ECT7TXFJ.js");
1023
+ const { useEditorStore: useEditorStore2 } = await import("./editor-store-7Y3SJBDZ.js");
1024
1024
  const before = Object.values(useEditorStore2.getState().document.nodes).filter((n) => n.privateTo).length;
1025
1025
  useEditorStore2.getState().revealPrivate();
1026
1026
  ctx.notice(before ? `Revealed ${before} private item${before === 1 ? "" : "s"}.` : "Nothing was private.");
@@ -1084,7 +1084,7 @@ var documentDelete = defineCommand({
1084
1084
  }
1085
1085
  },
1086
1086
  run: async ({ id }, ctx) => {
1087
- const { useEditorStore: useEditorStore2 } = await import("./editor-store-ECT7TXFJ.js");
1087
+ const { useEditorStore: useEditorStore2 } = await import("./editor-store-7Y3SJBDZ.js");
1088
1088
  const wasOpen = useEditorStore2.getState().document.id === id;
1089
1089
  await useEditorStore2.getState().deleteDocument(id);
1090
1090
  ctx.notice("Deleted the document.");
@@ -1097,7 +1097,7 @@ var docCommands = [docImportJson, documentDelete];
1097
1097
  init_define_POPCRAFT_COMPONENT_IDS();
1098
1098
  async function cloudFile() {
1099
1099
  const [{ syncStatus }, { cloudUser }] = await Promise.all([
1100
- import("./sync-S43UBNVV.js"),
1100
+ import("./sync-F67OZYVS.js"),
1101
1101
  import("./session-TDPI2HEY.js")
1102
1102
  ]);
1103
1103
  const link = syncStatus().link;
@@ -1270,7 +1270,7 @@ var libraryPublish = defineCommand({
1270
1270
  }
1271
1271
  },
1272
1272
  run: async (p, ctx) => {
1273
- const { publishLibrary } = await import("./libraries-BX77SG2Y.js");
1273
+ const { publishLibrary } = await import("./libraries-EATTWPJU.js");
1274
1274
  const doc = ctx.doc();
1275
1275
  const pick = {
1276
1276
  componentIds: p.componentIds ?? Object.keys(doc.components ?? {}),
@@ -1302,7 +1302,7 @@ var libraryUnpublish = defineCommand({
1302
1302
  },
1303
1303
  run: async ({ libraryId }, ctx) => {
1304
1304
  if (!libraryId.trim()) throw new CommandError("Which library? Pass its `libraryId`.", "invalid_params");
1305
- const { unpublishLibrary } = await import("./libraries-BX77SG2Y.js");
1305
+ const { unpublishLibrary } = await import("./libraries-EATTWPJU.js");
1306
1306
  await unpublishLibrary(libraryId);
1307
1307
  ctx.notice(`Unpublished library ${libraryId}.`);
1308
1308
  return { summary: `Unpublished library ${libraryId}`, data: { libraryId, unpublished: true } };
@@ -1314,8 +1314,8 @@ var libraryCommands = [libraryPublish, libraryUnpublish];
1314
1314
  init_define_POPCRAFT_COMPONENT_IDS();
1315
1315
  async function findVersion(id) {
1316
1316
  const [{ useEditorStore: useEditorStore2 }, { versionLabel }] = await Promise.all([
1317
- import("./editor-store-ECT7TXFJ.js"),
1318
- import("./versions-FPQSRGWY.js")
1317
+ import("./editor-store-7Y3SJBDZ.js"),
1318
+ import("./versions-K56JRWOE.js")
1319
1319
  ]);
1320
1320
  const meta = useEditorStore2.getState().versions.find((v) => v.id === id);
1321
1321
  if (!meta) {
@@ -1348,7 +1348,7 @@ var versionRestore = defineCommand({
1348
1348
  },
1349
1349
  run: async ({ id }) => {
1350
1350
  const found = await findVersion(id);
1351
- const { restoreVersion } = await import("./versions-FPQSRGWY.js");
1351
+ const { restoreVersion } = await import("./versions-K56JRWOE.js");
1352
1352
  await restoreVersion(found.meta);
1353
1353
  return { summary: `Restored \u201C${found.label}\u201D`, data: { id, label: found.label, restored: true } };
1354
1354
  }
@@ -1373,7 +1373,7 @@ var versionDelete = defineCommand({
1373
1373
  },
1374
1374
  run: async ({ id }, ctx) => {
1375
1375
  const found = await findVersion(id);
1376
- const { deleteVersion } = await import("./versions-FPQSRGWY.js");
1376
+ const { deleteVersion } = await import("./versions-K56JRWOE.js");
1377
1377
  await deleteVersion(found.meta);
1378
1378
  ctx.notice(`Deleted the version \u201C${found.label}\u201D.`);
1379
1379
  return { summary: `Deleted the version \u201C${found.label}\u201D`, data: { id, label: found.label, deleted: true } };
@@ -1674,7 +1674,7 @@ async function runTurn(text, mentions = []) {
1674
1674
  const abort = new AbortController();
1675
1675
  useAgentStore.setState({ running: true, abort, error: null });
1676
1676
  const ctx = editorToolContext(abort.signal);
1677
- const { createDesignPreview, DESIGN_TOOL } = await import("./live-DJXCPQ7D.js");
1677
+ const { createDesignPreview, DESIGN_TOOL } = await import("./live-2Z6MBAWT.js");
1678
1678
  const preview = createDesignPreview();
1679
1679
  registerTurnTools({
1680
1680
  readOnly: !!editBlockReason(),
@@ -46,7 +46,7 @@ import {
46
46
  updateActiveThread,
47
47
  updateMessage,
48
48
  useAgentStore
49
- } from "./chunk-FQ55UPTK.js";
49
+ } from "./chunk-RTTZKZKG.js";
50
50
  import "./chunk-SDGDUS34.js";
51
51
  import "./chunk-E5XPS4HV.js";
52
52
  import "./chunk-RJ53C5I6.js";
@@ -69,7 +69,7 @@ import "./chunk-RUXZVJOD.js";
69
69
  import "./chunk-PNR4PICU.js";
70
70
  import "./chunk-MASWPAC4.js";
71
71
  import "./chunk-SARRRKQG.js";
72
- import "./chunk-Q3D2P7G2.js";
72
+ import "./chunk-XYHRWVQW.js";
73
73
  import "./chunk-46ZTFFJ6.js";
74
74
  import "./chunk-7DD4V2OC.js";
75
75
  import "./chunk-ZRZ44FWZ.js";
@@ -20,14 +20,14 @@ import {
20
20
  uploadLocalDocument,
21
21
  uploadMediaNow,
22
22
  withDocUploadLock
23
- } from "./chunk-MIVL5UR7.js";
23
+ } from "./chunk-YH7RKEZ6.js";
24
24
  import "./chunk-RVRQIQW7.js";
25
- import "./chunk-3KBFG7UG.js";
25
+ import "./chunk-B4LHWR3X.js";
26
26
  import "./chunk-XRXRSVVQ.js";
27
27
  import "./chunk-3VROQ6LH.js";
28
28
  import "./chunk-IM4CQVGS.js";
29
- import "./chunk-4IVA4I5O.js";
30
- import "./chunk-Q3D2P7G2.js";
29
+ import "./chunk-NWFKSYOK.js";
30
+ import "./chunk-XYHRWVQW.js";
31
31
  import "./chunk-46ZTFFJ6.js";
32
32
  import "./chunk-7DD4V2OC.js";
33
33
  import "./chunk-ZRZ44FWZ.js";
@@ -7,17 +7,17 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  syncStatus,
9
9
  uploadActiveDocument
10
- } from "./chunk-MIVL5UR7.js";
10
+ } from "./chunk-YH7RKEZ6.js";
11
11
  import "./chunk-RVRQIQW7.js";
12
- import "./chunk-3KBFG7UG.js";
12
+ import "./chunk-B4LHWR3X.js";
13
13
  import "./chunk-XRXRSVVQ.js";
14
14
  import "./chunk-3VROQ6LH.js";
15
15
  import "./chunk-IM4CQVGS.js";
16
- import "./chunk-4IVA4I5O.js";
16
+ import "./chunk-NWFKSYOK.js";
17
17
  import {
18
18
  storedDocument,
19
19
  useEditorStore
20
- } from "./chunk-Q3D2P7G2.js";
20
+ } from "./chunk-XYHRWVQW.js";
21
21
  import "./chunk-46ZTFFJ6.js";
22
22
  import "./chunk-7DD4V2OC.js";
23
23
  import "./chunk-ZRZ44FWZ.js";
package/dist/index.js CHANGED
@@ -280,7 +280,7 @@ function toTemplate(document, listing, options = {}) {
280
280
  }
281
281
  var mediaHash = (bytes) => hashBytesSync(bytes);
282
282
  async function checkTemplate(template, options = {}) {
283
- return (await import("./chunks/check-template-V7D42C6V.js")).checkTemplate(template, options);
283
+ return (await import("./chunks/check-template-EWPD3JQF.js")).checkTemplate(template, options);
284
284
  }
285
285
  export {
286
286
  HELPER_NAMES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popcraft/kit",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "The PopCraft design kit: everything PopCraft's own templates are made with — the Kit, every helper, style system and theme kit, every official template source to read and remix, the build and every check the official templates pass — plus the design-script runner and .popcraft output.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://popcraft.app/docs/api/design-reference",