@popcraft/kit 0.7.0 → 0.7.1

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 (35) hide show
  1. package/dist/chunks/{builtin-MFSAMH6Y.js → builtin-QU6NQMMJ.js} +2 -2
  2. package/dist/chunks/{check-template-KB3AC5Y7.js → check-template-XDTHMIG7.js} +6 -6
  3. package/dist/chunks/{chunk-MJHXS3F6.js → chunk-6HRT3V4N.js} +5 -5
  4. package/dist/chunks/{chunk-YY4DV32H.js → chunk-6NFBXJNJ.js} +3 -3
  5. package/dist/chunks/{chunk-N7FBWCPH.js → chunk-GIKBBKJ2.js} +3 -3
  6. package/dist/chunks/{chunk-BU6LVQQC.js → chunk-HUWTWZ37.js} +5 -5
  7. package/dist/chunks/{chunk-R7O36OD7.js → chunk-KU3HVQIO.js} +1 -1
  8. package/dist/chunks/{chunk-4VBZKMWZ.js → chunk-L6KSXR4W.js} +2 -2
  9. package/dist/chunks/{chunk-PPPQAXON.js → chunk-NN22SLNV.js} +3 -3
  10. package/dist/chunks/{chunk-AKM4YB3B.js → chunk-PCCKLCRC.js} +1 -1
  11. package/dist/chunks/{chunk-5TV4LCPE.js → chunk-RLC7NKOP.js} +1 -1
  12. package/dist/chunks/{chunk-KT353V34.js → chunk-VUCFCFAH.js} +2 -2
  13. package/dist/chunks/{chunk-V6D6MRXS.js → chunk-YONR4W4H.js} +14 -14
  14. package/dist/chunks/{client-RKX74S6Y.js → client-G4FKWM6O.js} +1 -1
  15. package/dist/chunks/{client-AZKXTSAT.js → client-UVLLIPRN.js} +2 -2
  16. package/dist/chunks/{editor-seams-3YMOQVH6.js → editor-seams-IUVXGSLA.js} +5 -5
  17. package/dist/chunks/{editor-store-PCASWLGD.js → editor-store-ZNHUWFAA.js} +1 -1
  18. package/dist/chunks/{eyedropper-EYVXCCU7.js → eyedropper-6VAT4BOJ.js} +1 -1
  19. package/dist/chunks/{host-FEYLS4KU.js → host-YVCCRTUT.js} +5 -5
  20. package/dist/chunks/{libraries-32JIEX6C.js → libraries-LIOANEGM.js} +4 -4
  21. package/dist/chunks/{live-TB4V6CJR.js → live-I7QG3IOL.js} +1 -1
  22. package/dist/chunks/{media-tool-IVBOPQVP.js → media-tool-J6IYWYOX.js} +1 -1
  23. package/dist/chunks/{new-file-TM5JFYG6.js → new-file-TDJRMDBK.js} +2 -2
  24. package/dist/chunks/{plugin-SZWRK55I.js → plugin-6YADYL37.js} +2 -2
  25. package/dist/chunks/{plugin-import-GKTHKYWB.js → plugin-import-ISKSMZZX.js} +9 -9
  26. package/dist/chunks/{presence-DDBWVYRJ.js → presence-Q43F46DQ.js} +2 -2
  27. package/dist/chunks/{project-4OFA6YH7.js → project-DMWZR7BQ.js} +1 -1
  28. package/dist/chunks/{publish-site-CA57NPU5.js → publish-site-ZGV6Z3YO.js} +5 -5
  29. package/dist/chunks/{raster-actions-N2CPOFNT.js → raster-actions-XQMA6VHA.js} +1 -1
  30. package/dist/chunks/{runner-JTQAU64E.js → runner-LBK3HJZ4.js} +20 -20
  31. package/dist/chunks/{store-MVHHTFAJ.js → store-5ESZA6EV.js} +2 -2
  32. package/dist/chunks/{sync-4SURJ4DV.js → sync-QBBCVSWA.js} +4 -4
  33. package/dist/chunks/{versions-SZIFIEZA.js → versions-RXS6J6HL.js} +4 -4
  34. package/dist/index.js +1 -1
  35. 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-R7O36OD7.js";
11
- import "./chunk-V6D6MRXS.js";
10
+ } from "./chunk-KU3HVQIO.js";
11
+ import "./chunk-YONR4W4H.js";
12
12
  import "./chunk-MQ633OSZ.js";
13
13
  import "./chunk-LRFNQSJ3.js";
14
14
  import "./chunk-P24C3JOT.js";
@@ -9,7 +9,7 @@ import {
9
9
  needsSelection,
10
10
  pageGo,
11
11
  selectionIsPicture
12
- } from "./chunk-V6D6MRXS.js";
12
+ } from "./chunk-YONR4W4H.js";
13
13
  import "./chunk-MQ633OSZ.js";
14
14
  import "./chunk-LRFNQSJ3.js";
15
15
  import "./chunk-P24C3JOT.js";
@@ -223,7 +223,7 @@ var none = external_exports.object({});
223
223
  var emit = (name, detail) => {
224
224
  if (typeof window !== "undefined") window.dispatchEvent(new CustomEvent(name, { detail }));
225
225
  };
226
- var store = () => import("./editor-store-PCASWLGD.js").then((m) => m.useEditorStore.getState());
226
+ var store = () => import("./editor-store-ZNHUWFAA.js").then((m) => m.useEditorStore.getState());
227
227
  var MODE_IDS = MODE_LIST.map((m) => m.id);
228
228
  var MODE_ALIASES = { JAM: "POPCORN" };
229
229
  var modeSet = defineCommand({
@@ -396,7 +396,7 @@ var aiOpen = defineCommand({
396
396
  ] } },
397
397
  run: async ({ dialog, skillId }) => {
398
398
  if (dialog) (await import("./client-store-SPJITZ4B.js")).openAiDialog(dialog);
399
- else (await import("./store-MVHHTFAJ.js")).openAgentPanel({ skillId: skillId ?? null });
399
+ else (await import("./store-5ESZA6EV.js")).openAgentPanel({ skillId: skillId ?? null });
400
400
  return { summary: dialog ? `Opened AI ${dialog}` : "Opened the agent" };
401
401
  }
402
402
  });
@@ -475,11 +475,11 @@ var toolPlace = defineCommand({
475
475
  run: async ({ what }) => {
476
476
  if (what === "media") {
477
477
  const s = await store();
478
- const { placeMediaFromPicker } = await import("./media-tool-IVBOPQVP.js");
478
+ const { placeMediaFromPicker } = await import("./media-tool-J6IYWYOX.js");
479
479
  await placeMediaFromPicker({ kind: "point", x: s.camera.x, y: s.camera.y });
480
480
  return { summary: "Placing media" };
481
481
  }
482
- const { beginEyedrop } = await import("./eyedropper-EYVXCCU7.js");
482
+ const { beginEyedrop } = await import("./eyedropper-6VAT4BOJ.js");
483
483
  void beginEyedrop();
484
484
  return { summary: "Pick a color" };
485
485
  }
@@ -497,7 +497,7 @@ var nodeRasterize = defineCommand({
497
497
  keywords: ["rasterize", "raster", "flatten", "pixels", "paint layer", "erase", "bitmap"]
498
498
  } },
499
499
  run: async () => {
500
- const { flattenSelectionToPaintLayer } = await import("./raster-actions-N2CPOFNT.js");
500
+ const { flattenSelectionToPaintLayer } = await import("./raster-actions-XQMA6VHA.js");
501
501
  await flattenSelectionToPaintLayer();
502
502
  return { summary: "Rasterized" };
503
503
  }
@@ -15,14 +15,14 @@ import {
15
15
  } from "./chunk-AUBAFKNO.js";
16
16
  import {
17
17
  syncStatus
18
- } from "./chunk-PPPQAXON.js";
18
+ } from "./chunk-NN22SLNV.js";
19
19
  import {
20
20
  downloadBlob
21
21
  } from "./chunk-2Y6XYVI7.js";
22
22
  import {
23
23
  setPluginTabs,
24
24
  useEditorStore
25
- } from "./chunk-BU6LVQQC.js";
25
+ } from "./chunk-HUWTWZ37.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-SZWRK55I.js");
57
+ const { dispatchPluginCall } = await import("./plugin-6YADYL37.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-TM5JFYG6.js");
381
+ const { createFreshFileOrExplain } = await import("./new-file-TDJRMDBK.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-GKTHKYWB.js");
541
+ const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-ISKSMZZX.js");
542
542
  if (d.ir && typeof d.ir === "object") {
543
543
  await applyPluginLayoutIr(d.ir, { mode, name });
544
544
  return;
@@ -27,10 +27,10 @@ import {
27
27
  import {
28
28
  collabSession,
29
29
  syncStatus
30
- } from "./chunk-PPPQAXON.js";
30
+ } from "./chunk-NN22SLNV.js";
31
31
  import {
32
32
  loadEntitlements
33
- } from "./chunk-5TV4LCPE.js";
33
+ } from "./chunk-RLC7NKOP.js";
34
34
  import {
35
35
  cloudApi
36
36
  } from "./chunk-5WKNA522.js";
@@ -39,7 +39,7 @@ import {
39
39
  } from "./chunk-VTZUJ6QD.js";
40
40
  import {
41
41
  useEditorStore
42
- } from "./chunk-BU6LVQQC.js";
42
+ } from "./chunk-HUWTWZ37.js";
43
43
  import {
44
44
  plansEnabled
45
45
  } from "./chunk-ULE4AENJ.js";
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-HNHPP4KM.js";
22
22
  import {
23
23
  useEditorStore
24
- } from "./chunk-BU6LVQQC.js";
24
+ } from "./chunk-HUWTWZ37.js";
25
25
  import {
26
26
  create
27
27
  } from "./chunk-JLQHJ5G3.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-JTQAU64E.js");
1425
+ const { runTurn } = await import("./runner-LBK3HJZ4.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-JTQAU64E.js").then(({ onChildTool }) => {
1528
+ void import("./runner-LBK3HJZ4.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);
@@ -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-DDBWVYRJ.js").then((m) => m.setPresencePrivate(on)).catch(() => {
4562
+ void import("./presence-Q43F46DQ.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-4SURJ4DV.js");
6629
+ const { duplicateDocumentToCloud } = await import("./sync-QBBCVSWA.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-5RTJ7M3K.js").then(async (m) => ({ ...m, registerBuiltinTools: (await import("./builtin-MFSAMH6Y.js")).registerBuiltinTools })),
10074
- import("./editor-seams-3YMOQVH6.js"),
10075
- import("./live-TB4V6CJR.js")
10073
+ import("./tools-5RTJ7M3K.js").then(async (m) => ({ ...m, registerBuiltinTools: (await import("./builtin-QU6NQMMJ.js")).registerBuiltinTools })),
10074
+ import("./editor-seams-IUVXGSLA.js"),
10075
+ import("./live-I7QG3IOL.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 });
@@ -7,7 +7,7 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  builtinCommands,
9
9
  registerBuiltinCommands
10
- } from "./chunk-V6D6MRXS.js";
10
+ } from "./chunk-YONR4W4H.js";
11
11
  import {
12
12
  toolView
13
13
  } from "./chunk-QHMDPHPP.js";
@@ -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-PCASWLGD.js"),
94
+ import("./editor-store-ZNHUWFAA.js"),
95
95
  import("../lib/document/photo-frames.js"),
96
- import("./media-tool-IVBOPQVP.js")
96
+ import("./media-tool-J6IYWYOX.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);
@@ -14,7 +14,7 @@ import {
14
14
  newFileRefusal,
15
15
  reportNewFileBlocked,
16
16
  setCloudLink
17
- } from "./chunk-5TV4LCPE.js";
17
+ } from "./chunk-RLC7NKOP.js";
18
18
  import {
19
19
  activeTeamWorkspaceId
20
20
  } from "./chunk-SZWIU6OU.js";
@@ -29,7 +29,7 @@ import {
29
29
  } from "./chunk-5WKNA522.js";
30
30
  import {
31
31
  attachPresence
32
- } from "./chunk-AKM4YB3B.js";
32
+ } from "./chunk-PCCKLCRC.js";
33
33
  import {
34
34
  documentPath,
35
35
  isDesktopTabs,
@@ -43,7 +43,7 @@ import {
43
43
  setCollabHistory,
44
44
  storedDocument,
45
45
  useEditorStore
46
- } from "./chunk-BU6LVQQC.js";
46
+ } from "./chunk-HUWTWZ37.js";
47
47
  import {
48
48
  accessToken,
49
49
  cloudUser,
@@ -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-BU6LVQQC.js";
9
+ } from "./chunk-HUWTWZ37.js";
10
10
  import {
11
11
  announce
12
12
  } from "./chunk-JFJ2M7ZG.js";
@@ -20,7 +20,7 @@ import {
20
20
  cloudFilePath,
21
21
  localDocPath,
22
22
  markLibraryDocument
23
- } from "./chunk-BU6LVQQC.js";
23
+ } from "./chunk-HUWTWZ37.js";
24
24
  import {
25
25
  cloudEnabled,
26
26
  cloudUser
@@ -9,7 +9,7 @@ import {
9
9
  hostEnv,
10
10
  plain,
11
11
  registerBuiltinCommands
12
- } from "./chunk-V6D6MRXS.js";
12
+ } from "./chunk-YONR4W4H.js";
13
13
  import {
14
14
  storeOpsSeam
15
15
  } from "./chunk-Q5HZTZ23.js";
@@ -692,7 +692,7 @@ var pluginRun = defineCommand({
692
692
  }
693
693
  },
694
694
  run: async (p, ctx) => {
695
- const { runPlugin } = await import("./host-FEYLS4KU.js");
695
+ const { runPlugin } = await import("./host-YVCCRTUT.js");
696
696
  await runPlugin(p.pluginId, p.commandId);
697
697
  ctx.notice(`Started ${p.pluginId}.`);
698
698
  return {
@@ -3313,7 +3313,7 @@ var viewCopyLink = defineCommand({
3313
3313
  },
3314
3314
  run: async (args, ctx) => {
3315
3315
  const [{ syncStatus }, { fileUrl }, { withDeepLink }] = await Promise.all([
3316
- import("./sync-4SURJ4DV.js"),
3316
+ import("./sync-QBBCVSWA.js"),
3317
3317
  import("./api-KZYKLPZM.js"),
3318
3318
  import("./deep-link-XQBXPXUU.js")
3319
3319
  ]);
@@ -3638,7 +3638,7 @@ var pageGo = defineCommand({
3638
3638
  ] }
3639
3639
  },
3640
3640
  run: async ({ to }) => {
3641
- const { useEditorStore } = await import("./editor-store-PCASWLGD.js");
3641
+ const { useEditorStore } = await import("./editor-store-ZNHUWFAA.js");
3642
3642
  useEditorStore.getState().goToPrintPage(to);
3643
3643
  return { summary: typeof to === "number" ? `Page ${to + 1}` : `${to} page` };
3644
3644
  }
@@ -3672,7 +3672,7 @@ var pageSetup = defineCommand({
3672
3672
  }
3673
3673
  },
3674
3674
  run: async (args) => {
3675
- const { useEditorStore } = await import("./editor-store-PCASWLGD.js");
3675
+ const { useEditorStore } = await import("./editor-store-ZNHUWFAA.js");
3676
3676
  useEditorStore.getState().applyPageSetup(args);
3677
3677
  return { summary: `Page setup updated${args.kind ? ` (${args.kind.toLowerCase()})` : ""}` };
3678
3678
  }
@@ -4862,7 +4862,7 @@ var exportLottie = animationCommand((args) => args.container === "lottie" ? "dot
4862
4862
  var EXPORT_NODE_CAP = 2e4;
4863
4863
  async function exportSite(doc2, pageId2, packaging, styling = "css") {
4864
4864
  const [{ completeSite, nextFilesOf, staticFilesOf, NoSiteRuntime, bytesOf }, { fileBase }, { zipFiles }, { downloadBlob }] = await Promise.all([
4865
- import("./project-4OFA6YH7.js"),
4865
+ import("./project-DMWZR7BQ.js"),
4866
4866
  import("./web-G4F6IL3Q.js"),
4867
4867
  import("./zip-export-IDLKJLC4.js"),
4868
4868
  import("./download-BMAYRB56.js")
@@ -7846,7 +7846,7 @@ init_scene_graph();
7846
7846
  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.");
7847
7847
  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 });
7848
7848
  async function placeImportedPicture(ctx, imported, at, what, extra = {}) {
7849
- const client = await import("./client-RKX74S6Y.js");
7849
+ const client = await import("./client-G4FKWM6O.js");
7850
7850
  if (at.fillLayerId) {
7851
7851
  const doc2 = ctx.doc();
7852
7852
  const target = nodeOrThrow(doc2, at.fillLayerId);
@@ -7892,7 +7892,7 @@ var photoSearch = defineCommand({
7892
7892
  }
7893
7893
  },
7894
7894
  run: async (args) => {
7895
- const { searchStockPhotos } = await import("./client-RKX74S6Y.js");
7895
+ const { searchStockPhotos } = await import("./client-G4FKWM6O.js");
7896
7896
  const page = await searchStockPhotos(args.query, args.page ?? 1, { licence: args.licence });
7897
7897
  return {
7898
7898
  summary: `${page.results.length} photo${page.results.length === 1 ? "" : "s"} for \u201C${page.query}\u201D (page ${page.page} of ${page.pageCount || 1})`,
@@ -7926,7 +7926,7 @@ var photoInsert = defineCommand({
7926
7926
  run: async (args, ctx) => {
7927
7927
  if (!args.id && !args.query) throw new ToolError("Pass an id from search_photos, or a query.");
7928
7928
  if (args.id && !isPhotoId(args.id)) throw new ToolError(`"${args.id}" is not a photo id from search_photos.`);
7929
- const client = await import("./client-RKX74S6Y.js");
7929
+ const client = await import("./client-G4FKWM6O.js");
7930
7930
  let photo;
7931
7931
  if (args.id) photo = await client.stockPhotoInfo(args.id);
7932
7932
  else {
@@ -7965,7 +7965,7 @@ var mediaList = defineCommand({
7965
7965
  }
7966
7966
  },
7967
7967
  run: async (args) => {
7968
- const { listLibraryMedia } = await import("./client-AZKXTSAT.js");
7968
+ const { listLibraryMedia } = await import("./client-UVLLIPRN.js");
7969
7969
  const page = await listLibraryMedia(args);
7970
7970
  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 } };
7971
7971
  }
@@ -7996,7 +7996,7 @@ var mediaInsert = defineCommand({
7996
7996
  run: async (args, ctx) => {
7997
7997
  const contentType = args.contentType ?? "image/*";
7998
7998
  if (!contentType.startsWith("image/")) throw new ToolError("insert_media places pictures; this item is not one.");
7999
- const { importLibraryPicture } = await import("./client-AZKXTSAT.js");
7999
+ const { importLibraryPicture } = await import("./client-UVLLIPRN.js");
8000
8000
  const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "Media", contentType, size: 0, createdAt: "", fileCount: 1, source: null };
8001
8001
  const imported = await importLibraryPicture(item);
8002
8002
  return placeImportedPicture(ctx, imported, args, `\u201C${imported.name}\u201D`, { hash: imported.hash });
@@ -8268,7 +8268,7 @@ async function signedIn() {
8268
8268
  }
8269
8269
  async function publishedFile() {
8270
8270
  await signedIn();
8271
- const { openFileKey } = await import("./publish-site-CA57NPU5.js");
8271
+ const { openFileKey } = await import("./publish-site-ZGV6Z3YO.js");
8272
8272
  const key = openFileKey();
8273
8273
  if (!key) throw new CommandError("This file is not saved to the cloud yet, so it has no site. Publish it first.", "failed");
8274
8274
  return key;
@@ -8304,7 +8304,7 @@ var publishSite = defineCommand({
8304
8304
  const { cleanSlug } = await import("./rules-25TL76FW.js");
8305
8305
  const address = p.address === void 0 ? void 0 : cleanSlug(p.address);
8306
8306
  if (address === null) throw new CommandError("That cannot be a site address: use 3 to 40 letters, digits and dashes.", "invalid_params");
8307
- const { publishOpenFile, NoScreens } = await import("./publish-site-CA57NPU5.js");
8307
+ const { publishOpenFile, NoScreens } = await import("./publish-site-ZGV6Z3YO.js");
8308
8308
  try {
8309
8309
  const done = await publishOpenFile(address);
8310
8310
  ctx.notice(`Published version ${done.version}: ${done.url}`);
@@ -8359,7 +8359,7 @@ var publishStatus = defineCommand({
8359
8359
  },
8360
8360
  run: async () => {
8361
8361
  await signedIn();
8362
- const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-CA57NPU5.js"), import("./sites-NCUBRRKI.js")]);
8362
+ const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-ZGV6Z3YO.js"), import("./sites-NCUBRRKI.js")]);
8363
8363
  const key = openFileKey();
8364
8364
  const status = await siteStatus(key);
8365
8365
  const site = status.site;
@@ -8702,7 +8702,7 @@ var integrationOpen = defineCommand({
8702
8702
  }
8703
8703
  });
8704
8704
  async function openFile() {
8705
- const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-JFWNALYQ.js"), import("./publish-site-CA57NPU5.js")]);
8705
+ const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-JFWNALYQ.js"), import("./publish-site-ZGV6Z3YO.js")]);
8706
8706
  if (!cloudUser()) throw new CommandError("You are not signed in.", "denied");
8707
8707
  const key = openFileKey();
8708
8708
  if (!key) throw new CommandError("This file is not saved to the cloud yet. Publish it first (publish_site).", "failed");
@@ -9457,7 +9457,7 @@ var docImportFile = defineCommand({
9457
9457
  const file = new File([body], args.name);
9458
9458
  if (file.size > MAX_BYTES) throw new ToolError(`"${args.name}" is larger than ${MAX_BYTES / 1024 / 1024} MB.`);
9459
9459
  const [{ buildImportedDocument }, { mergeImportedDocument }] = await Promise.all([
9460
- import("./plugin-import-GKTHKYWB.js"),
9460
+ import("./plugin-import-ISKSMZZX.js"),
9461
9461
  import("./import-merge-PQ5KLBCY.js")
9462
9462
  ]);
9463
9463
  const built = await buildImportedDocument(file);
@@ -14,7 +14,7 @@ import {
14
14
  placeStockPhoto,
15
15
  searchStockPhotos,
16
16
  stockPhotoInfo
17
- } from "./chunk-4VBZKMWZ.js";
17
+ } from "./chunk-L6KSXR4W.js";
18
18
  import "./chunk-NFPVJBFB.js";
19
19
  import "./chunk-2CHXDBK2.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-4VBZKMWZ.js";
10
+ } from "./chunk-L6KSXR4W.js";
11
11
  import "./chunk-NFPVJBFB.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-PCASWLGD.js"), import("./media-tool-IVBOPQVP.js")]);
124
+ const [{ useEditorStore }, { placeMediaFile }] = await Promise.all([import("./editor-store-ZNHUWFAA.js"), import("./media-tool-J6IYWYOX.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-YY4DV32H.js";
10
+ } from "./chunk-6NFBXJNJ.js";
11
11
  import "./chunk-F2OQ25ZC.js";
12
12
  import "./chunk-Q5HZTZ23.js";
13
13
  import "./chunk-P24C3JOT.js";
@@ -26,9 +26,9 @@ import "./chunk-3RSGJPIC.js";
26
26
  import "./chunk-HNHPP4KM.js";
27
27
  import "./chunk-QHMDPHPP.js";
28
28
  import "./chunk-OUB25GAB.js";
29
- import "./chunk-PPPQAXON.js";
29
+ import "./chunk-NN22SLNV.js";
30
30
  import "./chunk-SXKYSOG3.js";
31
- import "./chunk-5TV4LCPE.js";
31
+ import "./chunk-RLC7NKOP.js";
32
32
  import "./chunk-SZWIU6OU.js";
33
33
  import "./chunk-DJ2TCXUX.js";
34
34
  import "./chunk-2Y6XYVI7.js";
@@ -41,8 +41,8 @@ import "./chunk-UOYD3NZZ.js";
41
41
  import "./chunk-GYWKCMY3.js";
42
42
  import "./chunk-WM6B4JZG.js";
43
43
  import "./chunk-O2FIIAVC.js";
44
- import "./chunk-AKM4YB3B.js";
45
- import "./chunk-BU6LVQQC.js";
44
+ import "./chunk-PCCKLCRC.js";
45
+ import "./chunk-HUWTWZ37.js";
46
46
  import "./chunk-A3ZR2PTN.js";
47
47
  import "./chunk-TMEDCQDQ.js";
48
48
  import "./chunk-ROBJDYPG.js";
@@ -21,7 +21,7 @@ import {
21
21
  useEditorStore,
22
22
  useMode,
23
23
  useSelection
24
- } from "./chunk-BU6LVQQC.js";
24
+ } from "./chunk-HUWTWZ37.js";
25
25
  import "./chunk-A3ZR2PTN.js";
26
26
  import "./chunk-TMEDCQDQ.js";
27
27
  import "./chunk-ROBJDYPG.js";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-SXKYSOG3.js";
13
13
  import {
14
14
  useEditorStore
15
- } from "./chunk-BU6LVQQC.js";
15
+ } from "./chunk-HUWTWZ37.js";
16
16
  import "./chunk-A3ZR2PTN.js";
17
17
  import "./chunk-TMEDCQDQ.js";
18
18
  import "./chunk-ROBJDYPG.js";
@@ -18,7 +18,7 @@ import {
18
18
  runPluginWithImport,
19
19
  runningSessionFor,
20
20
  setEnabled
21
- } from "./chunk-MJHXS3F6.js";
21
+ } from "./chunk-6HRT3V4N.js";
22
22
  import "./chunk-52DT2F6D.js";
23
23
  import "./chunk-CPODO5EB.js";
24
24
  import "./chunk-WMMTDJCD.js";
@@ -29,9 +29,9 @@ import "./chunk-YWUHUCNE.js";
29
29
  import "./chunk-TC2JONQT.js";
30
30
  import "./chunk-AUBAFKNO.js";
31
31
  import "./chunk-Q22LLH7F.js";
32
- import "./chunk-PPPQAXON.js";
32
+ import "./chunk-NN22SLNV.js";
33
33
  import "./chunk-SXKYSOG3.js";
34
- import "./chunk-5TV4LCPE.js";
34
+ import "./chunk-RLC7NKOP.js";
35
35
  import "./chunk-SZWIU6OU.js";
36
36
  import "./chunk-DJ2TCXUX.js";
37
37
  import "./chunk-2Y6XYVI7.js";
@@ -43,8 +43,8 @@ import "./chunk-YSV7P4RD.js";
43
43
  import "./chunk-ZQL7EDMJ.js";
44
44
  import "./chunk-UOYD3NZZ.js";
45
45
  import "./chunk-GYWKCMY3.js";
46
- import "./chunk-AKM4YB3B.js";
47
- import "./chunk-BU6LVQQC.js";
46
+ import "./chunk-PCCKLCRC.js";
47
+ import "./chunk-HUWTWZ37.js";
48
48
  import "./chunk-A3ZR2PTN.js";
49
49
  import "./chunk-TMEDCQDQ.js";
50
50
  import "./chunk-ROBJDYPG.js";
@@ -7,9 +7,9 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  onSyncStatus,
9
9
  syncStatus
10
- } from "./chunk-PPPQAXON.js";
10
+ } from "./chunk-NN22SLNV.js";
11
11
  import "./chunk-SXKYSOG3.js";
12
- import "./chunk-5TV4LCPE.js";
12
+ import "./chunk-RLC7NKOP.js";
13
13
  import "./chunk-SZWIU6OU.js";
14
14
  import "./chunk-DJ2TCXUX.js";
15
15
  import {
@@ -17,10 +17,10 @@ import {
17
17
  } from "./chunk-5WKNA522.js";
18
18
  import "./chunk-VTZUJ6QD.js";
19
19
  import "./chunk-CU5UVX7H.js";
20
- import "./chunk-AKM4YB3B.js";
20
+ import "./chunk-PCCKLCRC.js";
21
21
  import {
22
22
  useEditorStore
23
- } from "./chunk-BU6LVQQC.js";
23
+ } from "./chunk-HUWTWZ37.js";
24
24
  import "./chunk-A3ZR2PTN.js";
25
25
  import "./chunk-TMEDCQDQ.js";
26
26
  import "./chunk-ROBJDYPG.js";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-C7JTGIVH.js";
13
13
  import {
14
14
  useEditorStore
15
- } from "./chunk-BU6LVQQC.js";
15
+ } from "./chunk-HUWTWZ37.js";
16
16
  import "./chunk-A3ZR2PTN.js";
17
17
  import "./chunk-TMEDCQDQ.js";
18
18
  import "./chunk-ROBJDYPG.js";
@@ -12,7 +12,7 @@ import "./chunk-TC2JONQT.js";
12
12
  import "./chunk-SXKYSOG3.js";
13
13
  import {
14
14
  useEditorStore
15
- } from "./chunk-BU6LVQQC.js";
15
+ } from "./chunk-HUWTWZ37.js";
16
16
  import "./chunk-A3ZR2PTN.js";
17
17
  import "./chunk-TMEDCQDQ.js";
18
18
  import {
@@ -12,12 +12,12 @@ import {
12
12
  createNewLocalFile,
13
13
  documentFromSeed,
14
14
  newFileRefusal
15
- } from "./chunk-5TV4LCPE.js";
15
+ } from "./chunk-RLC7NKOP.js";
16
16
  import "./chunk-SZWIU6OU.js";
17
17
  import "./chunk-5WKNA522.js";
18
18
  import "./chunk-VTZUJ6QD.js";
19
19
  import "./chunk-CU5UVX7H.js";
20
- import "./chunk-BU6LVQQC.js";
20
+ import "./chunk-HUWTWZ37.js";
21
21
  import "./chunk-A3ZR2PTN.js";
22
22
  import "./chunk-TMEDCQDQ.js";
23
23
  import "./chunk-ROBJDYPG.js";
@@ -12,8 +12,8 @@ import {
12
12
  pluginMethods,
13
13
  pluginRun,
14
14
  registerPluginCommands
15
- } from "./chunk-KT353V34.js";
16
- import "./chunk-V6D6MRXS.js";
15
+ } from "./chunk-VUCFCFAH.js";
16
+ import "./chunk-YONR4W4H.js";
17
17
  import "./chunk-MQ633OSZ.js";
18
18
  import "./chunk-LRFNQSJ3.js";
19
19
  import "./chunk-Q5HZTZ23.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-YY4DV32H.js";
9
+ } from "./chunk-6NFBXJNJ.js";
10
10
  import "./chunk-F2OQ25ZC.js";
11
11
  import {
12
12
  mergeImportedDocument
@@ -16,7 +16,7 @@ import "./chunk-P24C3JOT.js";
16
16
  import "./chunk-PTSEPA2F.js";
17
17
  import {
18
18
  runPluginWithImport
19
- } from "./chunk-MJHXS3F6.js";
19
+ } from "./chunk-6HRT3V4N.js";
20
20
  import "./chunk-52DT2F6D.js";
21
21
  import "./chunk-CPODO5EB.js";
22
22
  import "./chunk-BASPQA2U.js";
@@ -33,11 +33,11 @@ import "./chunk-3RSGJPIC.js";
33
33
  import "./chunk-HNHPP4KM.js";
34
34
  import "./chunk-QHMDPHPP.js";
35
35
  import "./chunk-OUB25GAB.js";
36
- import "./chunk-PPPQAXON.js";
36
+ import "./chunk-NN22SLNV.js";
37
37
  import "./chunk-SXKYSOG3.js";
38
38
  import {
39
39
  createFreshFileOrExplain
40
- } from "./chunk-5TV4LCPE.js";
40
+ } from "./chunk-RLC7NKOP.js";
41
41
  import "./chunk-SZWIU6OU.js";
42
42
  import "./chunk-DJ2TCXUX.js";
43
43
  import "./chunk-2Y6XYVI7.js";
@@ -51,10 +51,10 @@ import "./chunk-UOYD3NZZ.js";
51
51
  import "./chunk-GYWKCMY3.js";
52
52
  import "./chunk-WM6B4JZG.js";
53
53
  import "./chunk-O2FIIAVC.js";
54
- import "./chunk-AKM4YB3B.js";
54
+ import "./chunk-PCCKLCRC.js";
55
55
  import {
56
56
  useEditorStore
57
- } from "./chunk-BU6LVQQC.js";
57
+ } from "./chunk-HUWTWZ37.js";
58
58
  import "./chunk-A3ZR2PTN.js";
59
59
  import "./chunk-TMEDCQDQ.js";
60
60
  import "./chunk-ROBJDYPG.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-4SURJ4DV.js");
338
+ const { collabSession } = await import("./sync-QBBCVSWA.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-4SURJ4DV.js");
493
+ const { openFilledCloudDocument } = await import("./sync-QBBCVSWA.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-4SURJ4DV.js");
530
+ const { collabSession } = await import("./sync-QBBCVSWA.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-AKM4YB3B.js";
18
- import "./chunk-BU6LVQQC.js";
17
+ } from "./chunk-PCCKLCRC.js";
18
+ import "./chunk-HUWTWZ37.js";
19
19
  import "./chunk-A3ZR2PTN.js";
20
20
  import "./chunk-TMEDCQDQ.js";
21
21
  import "./chunk-ROBJDYPG.js";
@@ -923,7 +923,7 @@ init_define_POPCRAFT_COMPONENT_IDS();
923
923
  // packages/runtime/package.json
924
924
  var package_default = {
925
925
  name: "@popcraft/runtime",
926
- version: "0.7.0",
926
+ version: "0.7.1",
927
927
  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.",
928
928
  license: "MIT",
929
929
  homepage: "https://popcraft.app/docs/exporting/nextjs",
@@ -13,18 +13,18 @@ import "./chunk-NULPQXMF.js";
13
13
  import {
14
14
  syncStatus,
15
15
  uploadActiveDocument
16
- } from "./chunk-PPPQAXON.js";
16
+ } from "./chunk-NN22SLNV.js";
17
17
  import "./chunk-SXKYSOG3.js";
18
- import "./chunk-5TV4LCPE.js";
18
+ import "./chunk-RLC7NKOP.js";
19
19
  import "./chunk-SZWIU6OU.js";
20
20
  import "./chunk-DJ2TCXUX.js";
21
21
  import "./chunk-5WKNA522.js";
22
22
  import "./chunk-VTZUJ6QD.js";
23
23
  import "./chunk-CU5UVX7H.js";
24
- import "./chunk-AKM4YB3B.js";
24
+ import "./chunk-PCCKLCRC.js";
25
25
  import {
26
26
  useEditorStore
27
- } from "./chunk-BU6LVQQC.js";
27
+ } from "./chunk-HUWTWZ37.js";
28
28
  import "./chunk-A3ZR2PTN.js";
29
29
  import "./chunk-TMEDCQDQ.js";
30
30
  import "./chunk-ROBJDYPG.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-4OFA6YH7.js");
136
+ const { completeSite, staticFilesOf } = await import("./project-DMWZR7BQ.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-BU6LVQQC.js";
16
+ } from "./chunk-HUWTWZ37.js";
17
17
  import "./chunk-A3ZR2PTN.js";
18
18
  import "./chunk-TMEDCQDQ.js";
19
19
  import "./chunk-ROBJDYPG.js";
@@ -19,7 +19,7 @@ import {
19
19
  updateActiveThread,
20
20
  updateMessage,
21
21
  useAgentStore
22
- } from "./chunk-N7FBWCPH.js";
22
+ } from "./chunk-GIKBBKJ2.js";
23
23
  import {
24
24
  ALL_TOOLS,
25
25
  SUBAGENT_FRAMING,
@@ -29,20 +29,20 @@ import {
29
29
  } from "./chunk-3QJDJ4A2.js";
30
30
  import {
31
31
  registerBuiltinTools
32
- } from "./chunk-R7O36OD7.js";
32
+ } from "./chunk-KU3HVQIO.js";
33
33
  import {
34
34
  editBlockReason,
35
35
  editorToolContext
36
- } from "./chunk-YY4DV32H.js";
36
+ } from "./chunk-6NFBXJNJ.js";
37
37
  import "./chunk-F2OQ25ZC.js";
38
38
  import "./chunk-BPTZYIJE.js";
39
39
  import {
40
40
  pluginRun
41
- } from "./chunk-KT353V34.js";
41
+ } from "./chunk-VUCFCFAH.js";
42
42
  import {
43
43
  integrationConfirmCommands,
44
44
  publishCommands
45
- } from "./chunk-V6D6MRXS.js";
45
+ } from "./chunk-YONR4W4H.js";
46
46
  import "./chunk-MQ633OSZ.js";
47
47
  import "./chunk-LRFNQSJ3.js";
48
48
  import "./chunk-Q5HZTZ23.js";
@@ -87,9 +87,9 @@ import {
87
87
  import {
88
88
  defineCommand
89
89
  } from "./chunk-OUB25GAB.js";
90
- import "./chunk-PPPQAXON.js";
90
+ import "./chunk-NN22SLNV.js";
91
91
  import "./chunk-SXKYSOG3.js";
92
- import "./chunk-5TV4LCPE.js";
92
+ import "./chunk-RLC7NKOP.js";
93
93
  import {
94
94
  activeHyperyTeamId
95
95
  } from "./chunk-SZWIU6OU.js";
@@ -104,10 +104,10 @@ import "./chunk-UOYD3NZZ.js";
104
104
  import "./chunk-GYWKCMY3.js";
105
105
  import "./chunk-WM6B4JZG.js";
106
106
  import "./chunk-O2FIIAVC.js";
107
- import "./chunk-AKM4YB3B.js";
107
+ import "./chunk-PCCKLCRC.js";
108
108
  import {
109
109
  useEditorStore
110
- } from "./chunk-BU6LVQQC.js";
110
+ } from "./chunk-HUWTWZ37.js";
111
111
  import "./chunk-A3ZR2PTN.js";
112
112
  import "./chunk-TMEDCQDQ.js";
113
113
  import "./chunk-ROBJDYPG.js";
@@ -992,7 +992,7 @@ var collabSetSpotlight = defineCommand({
992
992
  }
993
993
  },
994
994
  run: async ({ on }, ctx) => {
995
- const { setSpotlight } = await import("./presence-DDBWVYRJ.js");
995
+ const { setSpotlight } = await import("./presence-Q43F46DQ.js");
996
996
  setSpotlight(on);
997
997
  ctx.notice(on ? "Spotlight on \u2014 everyone is following this view." : "Spotlight off.");
998
998
  return { summary: on ? "Spotlight on" : "Spotlight off", data: { spotlight: on } };
@@ -1019,7 +1019,7 @@ var collabRevealPrivate = defineCommand({
1019
1019
  }
1020
1020
  },
1021
1021
  run: async (_p, ctx) => {
1022
- const { useEditorStore: useEditorStore2 } = await import("./editor-store-PCASWLGD.js");
1022
+ const { useEditorStore: useEditorStore2 } = await import("./editor-store-ZNHUWFAA.js");
1023
1023
  const before = Object.values(useEditorStore2.getState().document.nodes).filter((n) => n.privateTo).length;
1024
1024
  useEditorStore2.getState().revealPrivate();
1025
1025
  ctx.notice(before ? `Revealed ${before} private item${before === 1 ? "" : "s"}.` : "Nothing was private.");
@@ -1083,7 +1083,7 @@ var documentDelete = defineCommand({
1083
1083
  }
1084
1084
  },
1085
1085
  run: async ({ id }, ctx) => {
1086
- const { useEditorStore: useEditorStore2 } = await import("./editor-store-PCASWLGD.js");
1086
+ const { useEditorStore: useEditorStore2 } = await import("./editor-store-ZNHUWFAA.js");
1087
1087
  const wasOpen = useEditorStore2.getState().document.id === id;
1088
1088
  await useEditorStore2.getState().deleteDocument(id);
1089
1089
  ctx.notice("Deleted the document.");
@@ -1096,7 +1096,7 @@ var docCommands = [docImportJson, documentDelete];
1096
1096
  init_define_POPCRAFT_COMPONENT_IDS();
1097
1097
  async function cloudFile() {
1098
1098
  const [{ syncStatus }, { cloudUser }] = await Promise.all([
1099
- import("./sync-4SURJ4DV.js"),
1099
+ import("./sync-QBBCVSWA.js"),
1100
1100
  import("./session-JFWNALYQ.js")
1101
1101
  ]);
1102
1102
  const link = syncStatus().link;
@@ -1269,7 +1269,7 @@ var libraryPublish = defineCommand({
1269
1269
  }
1270
1270
  },
1271
1271
  run: async (p, ctx) => {
1272
- const { publishLibrary } = await import("./libraries-32JIEX6C.js");
1272
+ const { publishLibrary } = await import("./libraries-LIOANEGM.js");
1273
1273
  const doc = ctx.doc();
1274
1274
  const pick = {
1275
1275
  componentIds: p.componentIds ?? Object.keys(doc.components ?? {}),
@@ -1301,7 +1301,7 @@ var libraryUnpublish = defineCommand({
1301
1301
  },
1302
1302
  run: async ({ libraryId }, ctx) => {
1303
1303
  if (!libraryId.trim()) throw new CommandError("Which library? Pass its `libraryId`.", "invalid_params");
1304
- const { unpublishLibrary } = await import("./libraries-32JIEX6C.js");
1304
+ const { unpublishLibrary } = await import("./libraries-LIOANEGM.js");
1305
1305
  await unpublishLibrary(libraryId);
1306
1306
  ctx.notice(`Unpublished library ${libraryId}.`);
1307
1307
  return { summary: `Unpublished library ${libraryId}`, data: { libraryId, unpublished: true } };
@@ -1313,8 +1313,8 @@ var libraryCommands = [libraryPublish, libraryUnpublish];
1313
1313
  init_define_POPCRAFT_COMPONENT_IDS();
1314
1314
  async function findVersion(id) {
1315
1315
  const [{ useEditorStore: useEditorStore2 }, { versionLabel }] = await Promise.all([
1316
- import("./editor-store-PCASWLGD.js"),
1317
- import("./versions-SZIFIEZA.js")
1316
+ import("./editor-store-ZNHUWFAA.js"),
1317
+ import("./versions-RXS6J6HL.js")
1318
1318
  ]);
1319
1319
  const meta = useEditorStore2.getState().versions.find((v) => v.id === id);
1320
1320
  if (!meta) {
@@ -1347,7 +1347,7 @@ var versionRestore = defineCommand({
1347
1347
  },
1348
1348
  run: async ({ id }) => {
1349
1349
  const found = await findVersion(id);
1350
- const { restoreVersion } = await import("./versions-SZIFIEZA.js");
1350
+ const { restoreVersion } = await import("./versions-RXS6J6HL.js");
1351
1351
  await restoreVersion(found.meta);
1352
1352
  return { summary: `Restored \u201C${found.label}\u201D`, data: { id, label: found.label, restored: true } };
1353
1353
  }
@@ -1372,7 +1372,7 @@ var versionDelete = defineCommand({
1372
1372
  },
1373
1373
  run: async ({ id }, ctx) => {
1374
1374
  const found = await findVersion(id);
1375
- const { deleteVersion } = await import("./versions-SZIFIEZA.js");
1375
+ const { deleteVersion } = await import("./versions-RXS6J6HL.js");
1376
1376
  await deleteVersion(found.meta);
1377
1377
  ctx.notice(`Deleted the version \u201C${found.label}\u201D.`);
1378
1378
  return { summary: `Deleted the version \u201C${found.label}\u201D`, data: { id, label: found.label, deleted: true } };
@@ -1673,7 +1673,7 @@ async function runTurn(text, mentions = []) {
1673
1673
  const abort = new AbortController();
1674
1674
  useAgentStore.setState({ running: true, abort, error: null });
1675
1675
  const ctx = editorToolContext(abort.signal);
1676
- const { createDesignPreview, DESIGN_TOOL } = await import("./live-TB4V6CJR.js");
1676
+ const { createDesignPreview, DESIGN_TOOL } = await import("./live-I7QG3IOL.js");
1677
1677
  const preview = createDesignPreview();
1678
1678
  registerTurnTools({
1679
1679
  readOnly: !!editBlockReason(),
@@ -46,7 +46,7 @@ import {
46
46
  updateActiveThread,
47
47
  updateMessage,
48
48
  useAgentStore
49
- } from "./chunk-N7FBWCPH.js";
49
+ } from "./chunk-GIKBBKJ2.js";
50
50
  import "./chunk-3QJDJ4A2.js";
51
51
  import "./chunk-F2OQ25ZC.js";
52
52
  import "./chunk-BPTZYIJE.js";
@@ -71,7 +71,7 @@ import "./chunk-VTZUJ6QD.js";
71
71
  import "./chunk-ZQL7EDMJ.js";
72
72
  import "./chunk-UOYD3NZZ.js";
73
73
  import "./chunk-GYWKCMY3.js";
74
- import "./chunk-BU6LVQQC.js";
74
+ import "./chunk-HUWTWZ37.js";
75
75
  import "./chunk-A3ZR2PTN.js";
76
76
  import "./chunk-TMEDCQDQ.js";
77
77
  import "./chunk-ROBJDYPG.js";
@@ -20,16 +20,16 @@ import {
20
20
  uploadLocalDocument,
21
21
  uploadMediaNow,
22
22
  withDocUploadLock
23
- } from "./chunk-PPPQAXON.js";
23
+ } from "./chunk-NN22SLNV.js";
24
24
  import "./chunk-SXKYSOG3.js";
25
- import "./chunk-5TV4LCPE.js";
25
+ import "./chunk-RLC7NKOP.js";
26
26
  import "./chunk-SZWIU6OU.js";
27
27
  import "./chunk-DJ2TCXUX.js";
28
28
  import "./chunk-5WKNA522.js";
29
29
  import "./chunk-VTZUJ6QD.js";
30
30
  import "./chunk-CU5UVX7H.js";
31
- import "./chunk-AKM4YB3B.js";
32
- import "./chunk-BU6LVQQC.js";
31
+ import "./chunk-PCCKLCRC.js";
32
+ import "./chunk-HUWTWZ37.js";
33
33
  import "./chunk-A3ZR2PTN.js";
34
34
  import "./chunk-TMEDCQDQ.js";
35
35
  import "./chunk-ROBJDYPG.js";
@@ -7,9 +7,9 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  syncStatus,
9
9
  uploadActiveDocument
10
- } from "./chunk-PPPQAXON.js";
10
+ } from "./chunk-NN22SLNV.js";
11
11
  import "./chunk-SXKYSOG3.js";
12
- import "./chunk-5TV4LCPE.js";
12
+ import "./chunk-RLC7NKOP.js";
13
13
  import "./chunk-SZWIU6OU.js";
14
14
  import "./chunk-DJ2TCXUX.js";
15
15
  import {
@@ -17,11 +17,11 @@ import {
17
17
  } from "./chunk-5WKNA522.js";
18
18
  import "./chunk-VTZUJ6QD.js";
19
19
  import "./chunk-CU5UVX7H.js";
20
- import "./chunk-AKM4YB3B.js";
20
+ import "./chunk-PCCKLCRC.js";
21
21
  import {
22
22
  storedDocument,
23
23
  useEditorStore
24
- } from "./chunk-BU6LVQQC.js";
24
+ } from "./chunk-HUWTWZ37.js";
25
25
  import "./chunk-A3ZR2PTN.js";
26
26
  import "./chunk-TMEDCQDQ.js";
27
27
  import "./chunk-ROBJDYPG.js";
package/dist/index.js CHANGED
@@ -278,7 +278,7 @@ function toTemplate(document, listing, options = {}) {
278
278
  }
279
279
  var mediaHash = (bytes) => hashBytesSync(bytes);
280
280
  async function checkTemplate(template, options = {}) {
281
- return (await import("./chunks/check-template-KB3AC5Y7.js")).checkTemplate(template, options);
281
+ return (await import("./chunks/check-template-XDTHMIG7.js")).checkTemplate(template, options);
282
282
  }
283
283
  export {
284
284
  HELPER_NAMES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popcraft/kit",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
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",