@popcraft/kit 0.38.4 → 0.38.6

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 (76) hide show
  1. package/dist/chunks/{agent-YC2TSI5E.js → agent-YFVWUBA3.js} +1 -1
  2. package/dist/chunks/{api-7WOLDYQY.js → api-XQBSIVXX.js} +2 -2
  3. package/dist/chunks/{builtin-2ZAY3HDM.js → builtin-ESYHNTNM.js} +3 -3
  4. package/dist/chunks/{buy-credits-WYODGD7D.js → buy-credits-I5QIQI5P.js} +4 -4
  5. package/dist/chunks/{check-template-YXRHSW5I.js → check-template-6Z4IY5HG.js} +2 -2
  6. package/dist/chunks/{chunk-K3Q2ZKXX.js → chunk-37PE7WHJ.js} +11 -11
  7. package/dist/chunks/{chunk-MDPSEKSE.js → chunk-4L54AS2T.js} +7 -7
  8. package/dist/chunks/{chunk-CRWBEO6C.js → chunk-5Q3NF7R6.js} +1 -1
  9. package/dist/chunks/{chunk-5AE2AJPB.js → chunk-5UX2YF4U.js} +3 -3
  10. package/dist/chunks/{chunk-B43Z4HHA.js → chunk-763I3EKV.js} +15 -0
  11. package/dist/chunks/{chunk-BSG3FLLW.js → chunk-D7ADFAVG.js} +11 -0
  12. package/dist/chunks/{chunk-2R57XO3E.js → chunk-EHB3DCYX.js} +4 -4
  13. package/dist/chunks/{chunk-LMQGWQBU.js → chunk-FCU4OKLZ.js} +6 -6
  14. package/dist/chunks/{chunk-LABTJ43O.js → chunk-FG4RNLRT.js} +1 -1
  15. package/dist/chunks/{chunk-3JKRM4V6.js → chunk-FP2JL6RD.js} +11 -11
  16. package/dist/chunks/{chunk-KOVTNCOH.js → chunk-GPARXTW6.js} +1 -1
  17. package/dist/chunks/{chunk-K5CEAFG6.js → chunk-GSNK5JKW.js} +3 -3
  18. package/dist/chunks/{chunk-OW2UYRWT.js → chunk-HF3RMGFU.js} +4 -4
  19. package/dist/chunks/{chunk-ZJI65A2I.js → chunk-HLM7IN6N.js} +9 -9
  20. package/dist/chunks/{chunk-Y44EF2FQ.js → chunk-J6G5WD46.js} +5 -5
  21. package/dist/chunks/{chunk-DGMLM5EP.js → chunk-JKIZZQGS.js} +1 -1
  22. package/dist/chunks/{chunk-BLLGD7YB.js → chunk-LSM6EWWU.js} +2 -2
  23. package/dist/chunks/{chunk-MTNM7DOV.js → chunk-LX6QWKYZ.js} +4 -4
  24. package/dist/chunks/{chunk-NTPHRKHZ.js → chunk-NNIP6RJU.js} +5 -5
  25. package/dist/chunks/{chunk-AOLFGBHL.js → chunk-NTDQN5KV.js} +1 -1
  26. package/dist/chunks/{chunk-FCCF6WRB.js → chunk-NW6TBOTF.js} +2 -2
  27. package/dist/chunks/{chunk-GHJPGFBJ.js → chunk-OAL6OESQ.js} +3 -1
  28. package/dist/chunks/{chunk-PVF4M3SF.js → chunk-R5ZSYMEM.js} +65 -65
  29. package/dist/chunks/{chunk-KUKKFYBL.js → chunk-TITVVCK6.js} +1 -1
  30. package/dist/chunks/{chunk-UJ4BDTK4.js → chunk-X2GJCXKP.js} +1 -1
  31. package/dist/chunks/{chunk-NK3HWAZE.js → chunk-X4Q6WV6X.js} +2 -2
  32. package/dist/chunks/{chunk-6VZNYMAR.js → chunk-XM7BLGNR.js} +4 -4
  33. package/dist/chunks/{client-4WBIMHT6.js → client-2J7APEUI.js} +1 -1
  34. package/dist/chunks/{client-EGQ7ZVJA.js → client-4WKGWVCY.js} +5 -5
  35. package/dist/chunks/{client-QOUD7IFI.js → client-T2QWHRGB.js} +4 -4
  36. package/dist/chunks/{client-actions-VJI42ETY.js → client-actions-556WYGRI.js} +11 -11
  37. package/dist/chunks/{dangerous-FPXEQOHC.js → dangerous-53T5T7SG.js} +3 -3
  38. package/dist/chunks/{delete-current-file-6HBNMLIN.js → delete-current-file-HK36SJPJ.js} +7 -7
  39. package/dist/chunks/{download-VA32CX7D.js → download-XCX3HS5A.js} +2 -1
  40. package/dist/chunks/{editor-seams-LVQQZTXY.js → editor-seams-RPM4X22U.js} +16 -16
  41. package/dist/chunks/{editor-store-OCFJ6OSK.js → editor-store-6OAHCKST.js} +1 -1
  42. package/dist/chunks/{export-UXBQ55UP.js → export-A6TPYL5H.js} +3 -2
  43. package/dist/chunks/{export-watermark-W4NFJZ5R.js → export-watermark-7KRY6OAF.js} +7 -7
  44. package/dist/chunks/{eyedropper-JC2TRQLC.js → eyedropper-UL5MXHDW.js} +1 -1
  45. package/dist/chunks/{generate-media-MXRYY5Z7.js → generate-media-AQF4XPGW.js} +7 -7
  46. package/dist/chunks/{host-HOKDSH6M.js → host-EHSC24BC.js} +12 -12
  47. package/dist/chunks/{integrations-JFZEDH4A.js → integrations-2T7F26WK.js} +3 -3
  48. package/dist/chunks/{libraries-QRJLHRAI.js → libraries-FB7XU2H5.js} +7 -7
  49. package/dist/chunks/{live-MY353SSG.js → live-47GEAGBD.js} +1 -1
  50. package/dist/chunks/{media-tool-VXRJZOCS.js → media-tool-4VJZNTGR.js} +1 -1
  51. package/dist/chunks/{new-file-BWDNFNPG.js → new-file-IIFPHFNN.js} +5 -5
  52. package/dist/chunks/{plugin-XDQ6XTAJ.js → plugin-VFQ5EQ73.js} +2 -2
  53. package/dist/chunks/{plugin-import-NWVUVAWV.js → plugin-import-DGTF6ELY.js} +21 -21
  54. package/dist/chunks/{presence-SBB3TAQV.js → presence-WIEMP6TA.js} +2 -2
  55. package/dist/chunks/{project-ICLC536M.js → project-OU5OIYYJ.js} +3 -3
  56. package/dist/chunks/{publish-site-TVA3X5DI.js → publish-site-IHPLUSWZ.js} +9 -9
  57. package/dist/chunks/{publish-store-JM54ZG6P.js → publish-store-RBSHW7RJ.js} +5 -5
  58. package/dist/chunks/{raster-actions-F6AY3L6I.js → raster-actions-KA67MHPJ.js} +1 -1
  59. package/dist/chunks/{reference-images-FB5WX5DF.js → reference-images-PUCEQJ7O.js} +4 -3
  60. package/dist/chunks/{resolvers-CYLYNECW.js → resolvers-XXZQU3PR.js} +4 -3
  61. package/dist/chunks/{runner-7NDXCW3E.js → runner-ETIFPLQV.js} +23 -23
  62. package/dist/chunks/{sites-BXTU6H3M.js → sites-IMJOEBMX.js} +3 -3
  63. package/dist/chunks/{store-5P55BMER.js → store-2X7RY2HW.js} +12 -12
  64. package/dist/chunks/{storefront-prepare-3BRN4UCT.js → storefront-prepare-DA4HVN4K.js} +1 -1
  65. package/dist/chunks/{svg-export-7GHGZEUU.js → svg-export-HFCUX5PC.js} +4 -3
  66. package/dist/chunks/{sync-SN3J3F2E.js → sync-M2L4AUS7.js} +7 -7
  67. package/dist/chunks/{tabs-JLZ3KY3J.js → tabs-LQWI7D4A.js} +10 -10
  68. package/dist/chunks/{team-TB5WEX3R.js → team-QZLMMRH2.js} +3 -3
  69. package/dist/chunks/{team-client-RIANHJ3V.js → team-client-JEEWNM33.js} +3 -3
  70. package/dist/chunks/{templates-6O2AH4II.js → templates-2OAM6TQS.js} +2 -2
  71. package/dist/chunks/{theme-store-ZDMYLKPS.js → theme-store-PSBDULV2.js} +2 -2
  72. package/dist/chunks/{tools-NU2CWESK.js → tools-P7WEOJQZ.js} +2 -2
  73. package/dist/chunks/{ui-commands-JXMUHSLO.js → ui-commands-LAWFIH4X.js} +18 -18
  74. package/dist/chunks/{versions-PGGZ5NJX.js → versions-GSPLYCOH.js} +7 -7
  75. package/dist/index.js +1 -1
  76. package/package.json +1 -1
@@ -9,7 +9,7 @@ import {
9
9
  hostEnv,
10
10
  plain,
11
11
  registerBuiltinCommands
12
- } from "./chunk-PVF4M3SF.js";
12
+ } from "./chunk-R5ZSYMEM.js";
13
13
  import {
14
14
  storeOpsSeam
15
15
  } from "./chunk-B5RUQ57B.js";
@@ -570,9 +570,9 @@ var commands = [
570
570
  // saves (the Ecommerce plugin's Shopify theme), so a target is written once, here, and never again in a plugin.
571
571
  run: async (p, ctx) => {
572
572
  const [{ storefrontInputs }, { STOREFRONT_TARGETS }, { bytesOf }, { zipFiles }, { EXPORT_NODE_CAP }] = await Promise.all([
573
- import("./storefront-prepare-3BRN4UCT.js"),
573
+ import("./storefront-prepare-DA4HVN4K.js"),
574
574
  import("./storefront-SXLAZPLE.js"),
575
- import("./project-ICLC536M.js"),
575
+ import("./project-OU5OIYYJ.js"),
576
576
  import("./zip-export-BWJF6HFA.js"),
577
577
  import("./tree-DQJVVVRL.js")
578
578
  ]);
@@ -769,7 +769,7 @@ var pluginRun = defineCommand({
769
769
  }
770
770
  },
771
771
  run: async (p, ctx) => {
772
- const { runPlugin } = await import("./host-HOKDSH6M.js");
772
+ const { runPlugin } = await import("./host-EHSC24BC.js");
773
773
  await runPlugin(p.pluginId, p.commandId);
774
774
  ctx.notice(`Started ${p.pluginId}.`);
775
775
  return {
@@ -6,19 +6,19 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  activeTeamWorkspaceId
9
- } from "./chunk-K5CEAFG6.js";
9
+ } from "./chunk-GSNK5JKW.js";
10
10
  import {
11
11
  ApiError,
12
12
  GUEST_FILE_LIMIT,
13
13
  api,
14
14
  cloudApi
15
- } from "./chunk-KOVTNCOH.js";
15
+ } from "./chunk-GPARXTW6.js";
16
16
  import {
17
17
  prepareTemplate
18
18
  } from "./chunk-FGGGAM7K.js";
19
19
  import {
20
20
  markLibraryDocument
21
- } from "./chunk-LMQGWQBU.js";
21
+ } from "./chunk-FCU4OKLZ.js";
22
22
  import {
23
23
  cloudEnabled,
24
24
  cloudUser
@@ -149,7 +149,7 @@ async function documentFromSeed(seed) {
149
149
  return seed.name && seed.name !== doc.name ? { ...doc, name: seed.name } : doc;
150
150
  }
151
151
  let template = seed.template;
152
- if (!template && seed.templateId) template = await (await import("./templates-6O2AH4II.js")).fetchCloudTemplate(seed.templateId);
152
+ if (!template && seed.templateId) template = await (await import("./templates-2OAM6TQS.js")).fetchCloudTemplate(seed.templateId);
153
153
  if (template) {
154
154
  await prepareTemplate(template);
155
155
  const doc = documentFromTemplate(template, seed.name ?? template.meta.name, seed.sizeId);
@@ -225,7 +225,7 @@ async function createNewFile(place = {}, seed = {}) {
225
225
  return result;
226
226
  }
227
227
  function countTemplateUse(id) {
228
- void import("./api-7WOLDYQY.js").then(({ api: api2 }) => api2(`/api/templates/${encodeURIComponent(id)}/installs`, { method: "POST" })).catch(() => {
228
+ void import("./api-XQBSIVXX.js").then(({ api: api2 }) => api2(`/api/templates/${encodeURIComponent(id)}/installs`, { method: "POST" })).catch(() => {
229
229
  });
230
230
  }
231
231
  async function createNewFileOrExplain(place = {}, seed = {}) {
@@ -6,7 +6,7 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  encodeImageData
9
- } from "./chunk-5AE2AJPB.js";
9
+ } from "./chunk-5UX2YF4U.js";
10
10
  import {
11
11
  selectionWorldBounds
12
12
  } from "./chunk-BZKEFQQO.js";
@@ -6,10 +6,10 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  activeHyperyTeamId
9
- } from "./chunk-K5CEAFG6.js";
9
+ } from "./chunk-GSNK5JKW.js";
10
10
  import {
11
11
  inAppPurchases
12
- } from "./chunk-KOVTNCOH.js";
12
+ } from "./chunk-GPARXTW6.js";
13
13
  import {
14
14
  accessToken
15
15
  } from "./chunk-PY6X3RM3.js";
@@ -6,7 +6,7 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  hyperyRequestHeaders
9
- } from "./chunk-FCCF6WRB.js";
9
+ } from "./chunk-NW6TBOTF.js";
10
10
  import {
11
11
  aiAvailability,
12
12
  effectiveChatModel,
@@ -75,6 +75,8 @@ var AiClientError = class extends Error {
75
75
  this.code = code;
76
76
  this.status = status;
77
77
  }
78
+ code;
79
+ status;
78
80
  };
79
81
  var needsReauth = (e) => e instanceof AiClientError && (e.code === "ai_reauth" || e.code === "ai_scope" || e.code === "unauthenticated");
80
82
  function ensureAvailable() {
@@ -864,7 +864,7 @@ init_scene_graph();
864
864
  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.");
865
865
  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 });
866
866
  async function placeImportedPicture(ctx, imported, at, what, extra = {}) {
867
- const client = await import("./client-4WBIMHT6.js");
867
+ const client = await import("./client-2J7APEUI.js");
868
868
  if (at.fillLayerId) {
869
869
  const doc2 = ctx.doc();
870
870
  const target = nodeOrThrow(doc2, at.fillLayerId);
@@ -910,7 +910,7 @@ var photoSearch = defineCommand({
910
910
  }
911
911
  },
912
912
  run: async (args) => {
913
- const { searchStockPhotos } = await import("./client-4WBIMHT6.js");
913
+ const { searchStockPhotos } = await import("./client-2J7APEUI.js");
914
914
  const page = await searchStockPhotos(args.query, args.page ?? 1, { licence: args.licence });
915
915
  return {
916
916
  summary: `${page.results.length} photo${page.results.length === 1 ? "" : "s"} for \u201C${page.query}\u201D (page ${page.page} of ${page.pageCount || 1})`,
@@ -944,7 +944,7 @@ var photoInsert = defineCommand({
944
944
  run: async (args, ctx) => {
945
945
  if (!args.id && !args.query) throw new ToolError("Pass an id from search_photos, or a query.");
946
946
  if (args.id && !isPhotoId(args.id)) throw new ToolError(`"${args.id}" is not a photo id from search_photos.`);
947
- const client = await import("./client-4WBIMHT6.js");
947
+ const client = await import("./client-2J7APEUI.js");
948
948
  let photo;
949
949
  if (args.id) photo = await client.stockPhotoInfo(args.id);
950
950
  else {
@@ -982,7 +982,7 @@ var mediaList = defineCommand({
982
982
  }
983
983
  },
984
984
  run: async (args) => {
985
- const { listLibraryMedia } = await import("./client-QOUD7IFI.js");
985
+ const { listLibraryMedia } = await import("./client-T2QWHRGB.js");
986
986
  const page = await listLibraryMedia(args);
987
987
  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 } };
988
988
  }
@@ -1013,7 +1013,7 @@ var mediaInsert = defineCommand({
1013
1013
  run: async (args, ctx) => {
1014
1014
  const contentType = args.contentType ?? "image/*";
1015
1015
  if (!contentType.startsWith("image/")) throw new ToolError("insert_media places pictures; this item is not one.");
1016
- const { importLibraryPicture } = await import("./client-QOUD7IFI.js");
1016
+ const { importLibraryPicture } = await import("./client-T2QWHRGB.js");
1017
1017
  const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "Media", contentType, size: 0, createdAt: "", fileCount: 1, source: null };
1018
1018
  const imported = await importLibraryPicture(item);
1019
1019
  return placeImportedPicture(ctx, imported, args, `\u201C${imported.name}\u201D`, { hash: imported.hash });
@@ -1034,8 +1034,8 @@ var mediaDownload = defineCommand({
1034
1034
  // The Library's right-click menu: saves the item's file to the computer.
1035
1035
  expose: { ui: { label: "Download", palette: false } },
1036
1036
  run: async (args) => {
1037
- const { libraryBlob, libraryFileName } = await import("./client-QOUD7IFI.js");
1038
- const { downloadBlob } = await import("./download-VA32CX7D.js");
1037
+ const { libraryBlob, libraryFileName } = await import("./client-T2QWHRGB.js");
1038
+ const { downloadBlob } = await import("./download-XCX3HS5A.js");
1039
1039
  const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "media", contentType: args.contentType ?? "", size: 0, createdAt: "", fileCount: 1, source: null };
1040
1040
  const blob = await libraryBlob(item);
1041
1041
  const name2 = libraryFileName({ ...item, contentType: args.contentType || blob.type });
@@ -1065,7 +1065,7 @@ var mediaDelete = defineCommand({
1065
1065
  }
1066
1066
  },
1067
1067
  run: async (args) => {
1068
- const { deleteLibraryMedia } = await import("./client-QOUD7IFI.js");
1068
+ const { deleteLibraryMedia } = await import("./client-T2QWHRGB.js");
1069
1069
  const out = await deleteLibraryMedia(args.workspace, args.hash);
1070
1070
  return { summary: `Deleted it from the library (it was in ${out.files} file${out.files === 1 ? "" : "s"})`, data: out };
1071
1071
  }
@@ -1079,13 +1079,13 @@ async function signedIn() {
1079
1079
  }
1080
1080
  async function publishedFile() {
1081
1081
  await signedIn();
1082
- const { openFileKey } = await import("./publish-site-TVA3X5DI.js");
1082
+ const { openFileKey } = await import("./publish-site-IHPLUSWZ.js");
1083
1083
  const key = openFileKey();
1084
1084
  if (!key) throw new CommandError("This file is not saved to the cloud yet, so it has no site. Publish it first.", "failed");
1085
1085
  return key;
1086
1086
  }
1087
1087
  async function formsWithoutDatabase(key) {
1088
- const [{ useEditorStore }, { usesForms, formsGoNowhere }, { siteBackend }] = await Promise.all([import("./editor-store-OCFJ6OSK.js"), import("./backend-CRMUFNYE.js"), import("./integrations-JFZEDH4A.js")]);
1088
+ const [{ useEditorStore }, { usesForms, formsGoNowhere }, { siteBackend }] = await Promise.all([import("./editor-store-6OAHCKST.js"), import("./backend-CRMUFNYE.js"), import("./integrations-2T7F26WK.js")]);
1089
1089
  const doc2 = useEditorStore.getState().document;
1090
1090
  if (!usesForms(doc2)) return false;
1091
1091
  return formsGoNowhere(doc2, await siteBackend(key).catch(() => void 0));
@@ -1121,7 +1121,7 @@ var publishSite = defineCommand({
1121
1121
  const { cleanSlug } = await import("./rules-4X63TYO2.js");
1122
1122
  const address = p.address === void 0 ? void 0 : cleanSlug(p.address);
1123
1123
  if (address === null) throw new CommandError("That cannot be a site address: use 3 to 40 letters, digits and dashes.", "invalid_params");
1124
- const { publishOpenFile, NoScreens } = await import("./publish-site-TVA3X5DI.js");
1124
+ const { publishOpenFile, NoScreens } = await import("./publish-site-IHPLUSWZ.js");
1125
1125
  try {
1126
1126
  const done = await publishOpenFile(address);
1127
1127
  ctx.notice(`Published version ${done.version}: ${done.url}`);
@@ -1156,7 +1156,7 @@ var publishSetVersion = defineCommand({
1156
1156
  },
1157
1157
  run: async ({ version: version2 }, ctx) => {
1158
1158
  const key = await publishedFile();
1159
- const { setSiteVersion } = await import("./sites-BXTU6H3M.js");
1159
+ const { setSiteVersion } = await import("./sites-IMJOEBMX.js");
1160
1160
  const status = await setSiteVersion(key, version2);
1161
1161
  ctx.notice(version2 === null ? "The site is offline." : `Version ${version2} is online.`);
1162
1162
  return { summary: version2 === null ? "Took the site offline" : `Version ${version2} is online at ${status.site?.url ?? "the site's address"}`, data: statusData(status) };
@@ -1176,7 +1176,7 @@ var publishListSites = defineCommand({
1176
1176
  },
1177
1177
  run: async (p) => {
1178
1178
  await signedIn();
1179
- const [{ workspaceSites }, { activeTeamWorkspaceId, useHyperyTeam }] = await Promise.all([import("./sites-BXTU6H3M.js"), import("./team-TB5WEX3R.js")]);
1179
+ const [{ workspaceSites }, { activeTeamWorkspaceId, useHyperyTeam }] = await Promise.all([import("./sites-IMJOEBMX.js"), import("./team-QZLMMRH2.js")]);
1180
1180
  const workspaceId = p.workspaceId ?? activeTeamWorkspaceId() ?? useHyperyTeam.getState().personalWorkspaceId;
1181
1181
  if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
1182
1182
  const out = await workspaceSites(workspaceId);
@@ -1203,7 +1203,7 @@ var publishDeleteSite = defineCommand({
1203
1203
  run: async (p, ctx) => {
1204
1204
  const key = p.fileKey ?? await publishedFile();
1205
1205
  await signedIn();
1206
- const { deleteSite } = await import("./sites-BXTU6H3M.js");
1206
+ const { deleteSite } = await import("./sites-IMJOEBMX.js");
1207
1207
  await deleteSite(key);
1208
1208
  ctx.notice("The website is deleted.");
1209
1209
  return { summary: "Deleted the published website", data: { fileKey: key } };
@@ -1225,12 +1225,12 @@ var publishStatus = defineCommand({
1225
1225
  },
1226
1226
  run: async () => {
1227
1227
  await signedIn();
1228
- const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-TVA3X5DI.js"), import("./sites-BXTU6H3M.js")]);
1228
+ const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-IHPLUSWZ.js"), import("./sites-IMJOEBMX.js")]);
1229
1229
  const key = openFileKey();
1230
1230
  const status = await siteStatus(key);
1231
1231
  const site = status.site;
1232
- const backend = key ? await (await import("./integrations-JFZEDH4A.js")).siteBackend(key).catch(() => null) : null;
1233
- const destinations = key ? await (await import("./integrations-JFZEDH4A.js")).listDestinations(key).catch(() => []) : [];
1232
+ const backend = key ? await (await import("./integrations-2T7F26WK.js")).siteBackend(key).catch(() => null) : null;
1233
+ const destinations = key ? await (await import("./integrations-2T7F26WK.js")).listDestinations(key).catch(() => []) : [];
1234
1234
  return {
1235
1235
  summary: !status.configured ? "This server does not publish websites" : !site ? "Not published yet" : site.currentVersion === null ? `Offline (${site.versions.length} versions kept) \u2014 ${site.url}` : `Version ${site.currentVersion} is online at ${site.url}`,
1236
1236
  data: { ...statusData(status), database: backend?.database ? { provider: backend.database.connection.provider, account: backend.database.connection.account, target: backend.database.target.map((t) => t.name), visitorsCanSignIn: backend.database.signIn } : null, destinations: destinations.map((d) => ({ destinationId: d.id, provider: d.connection.provider, account: d.connection.account, kind: d.capability, target: d.target.map((t) => t.name), lastSent: d.lastDeploy })) }
@@ -1261,7 +1261,7 @@ var publishStore = defineCommand({
1261
1261
  },
1262
1262
  run: async (p, ctx) => {
1263
1263
  await signedIn();
1264
- const { deployOpenStore } = await import("./publish-store-JM54ZG6P.js");
1264
+ const { deployOpenStore } = await import("./publish-store-RBSHW7RJ.js");
1265
1265
  const done = await deployOpenStore(ctx.doc(), ctx.pageId(), { destinationId: p.destinationId }).catch((e) => {
1266
1266
  throw new CommandError(e instanceof Error ? e.message : String(e), "failed");
1267
1267
  });
@@ -1290,7 +1290,7 @@ var integrationList = defineCommand({
1290
1290
  }
1291
1291
  },
1292
1292
  run: async ({ capability }) => {
1293
- const [{ cloudUser }, { integrationsWorkspaceId, listWorkspaceIntegrations }] = await Promise.all([import("./session-VOE6ZB7Z.js"), import("./integrations-JFZEDH4A.js")]);
1293
+ const [{ cloudUser }, { integrationsWorkspaceId, listWorkspaceIntegrations }] = await Promise.all([import("./session-VOE6ZB7Z.js"), import("./integrations-2T7F26WK.js")]);
1294
1294
  if (!cloudUser()) throw new CommandError("You are not signed in: integrations belong to your account's workspace.", "denied");
1295
1295
  const workspaceId = integrationsWorkspaceId();
1296
1296
  if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
@@ -1331,7 +1331,7 @@ var integrationOpen = defineCommand({
1331
1331
  }
1332
1332
  });
1333
1333
  async function openFile() {
1334
- const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-VOE6ZB7Z.js"), import("./publish-site-TVA3X5DI.js")]);
1334
+ const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-VOE6ZB7Z.js"), import("./publish-site-IHPLUSWZ.js")]);
1335
1335
  if (!cloudUser()) throw new CommandError("You are not signed in.", "denied");
1336
1336
  const key = openFileKey();
1337
1337
  if (!key) throw new CommandError("This file is not saved to the cloud yet. Publish it first (publish_site).", "failed");
@@ -1357,7 +1357,7 @@ var integrationListResources = defineCommand({
1357
1357
  }
1358
1358
  },
1359
1359
  run: async ({ connectionId, capability, path }) => {
1360
- const { listResources } = await import("./integrations-JFZEDH4A.js");
1360
+ const { listResources } = await import("./integrations-2T7F26WK.js");
1361
1361
  const list = await listResources(connectionId, capability, asPath2(path));
1362
1362
  return {
1363
1363
  summary: list.level ? `${list.resources.length} at the ${list.level.label.toLowerCase()} level${list.canCreate ? " (a new one can be made)" : ""}` : "Nothing further to pick: the path is complete",
@@ -1392,7 +1392,7 @@ var integrationAddDestination = defineCommand({
1392
1392
  },
1393
1393
  run: async (p, ctx) => {
1394
1394
  const key = await openFile();
1395
- const { addDestination, createDestination, createResource } = await import("./integrations-JFZEDH4A.js");
1395
+ const { addDestination, createDestination, createResource } = await import("./integrations-2T7F26WK.js");
1396
1396
  let made;
1397
1397
  if (p.create) made = await createDestination(key, p.capability, void 0, p.connectionId);
1398
1398
  else {
@@ -1429,7 +1429,7 @@ var integrationDeploy = defineCommand({
1429
1429
  },
1430
1430
  run: async (p, ctx) => {
1431
1431
  const key = await openFile();
1432
- const { deployDestination, listDestinations } = await import("./integrations-JFZEDH4A.js");
1432
+ const { deployDestination, listDestinations } = await import("./integrations-2T7F26WK.js");
1433
1433
  const all = await listDestinations(key);
1434
1434
  const dest = p.destinationId ? all.find((d) => d.id === p.destinationId) : all.length === 1 ? all[0] : void 0;
1435
1435
  if (!dest) throw new CommandError(all.length ? `Say which destination: ${all.map((d) => `${d.id} (${d.target.map((t) => t.name).join(" / ")})`).join(", ")}.` : "This file has no destination yet. Add one first (add_site_destination).", "invalid_params");
@@ -1463,7 +1463,7 @@ var integrationAttachDatabase = defineCommand({
1463
1463
  },
1464
1464
  run: async (p, ctx) => {
1465
1465
  const key = await openFile();
1466
- const { attachDatabase, createDatabase, createResource, listResources } = await import("./integrations-JFZEDH4A.js");
1466
+ const { attachDatabase, createDatabase, createResource, listResources } = await import("./integrations-2T7F26WK.js");
1467
1467
  if (p.create) return attached(await createDatabase(key, void 0, p.connectionId), ctx);
1468
1468
  if (!p.connectionId || !p.target) throw new CommandError("Say connectionId and target, or create: true.", "invalid_params");
1469
1469
  let target = asPath2(p.target);
@@ -1502,7 +1502,7 @@ var integrationSubmissions = defineCommand({
1502
1502
  },
1503
1503
  run: async ({ form, limit }) => {
1504
1504
  const key = await openFile();
1505
- const { listSubmissions } = await import("./integrations-JFZEDH4A.js");
1505
+ const { listSubmissions } = await import("./integrations-2T7F26WK.js");
1506
1506
  const rows = await listSubmissions(key, { form, limit: limit ?? 20 });
1507
1507
  return { summary: rows.length ? `${rows.length} ${rows.length === 1 ? "submission" : "submissions"}, the newest ${new Date(rows[0].createdAt).toISOString()}` : "Nothing has been sent yet", data: { submissions: rows } };
1508
1508
  }
@@ -1527,7 +1527,7 @@ var integrationSetSignIn = defineCommand({
1527
1527
  },
1528
1528
  run: async ({ on }, ctx) => {
1529
1529
  const key = await openFile();
1530
- const { setSignIn } = await import("./integrations-JFZEDH4A.js");
1530
+ const { setSignIn } = await import("./integrations-2T7F26WK.js");
1531
1531
  const done = await setSignIn(key, on);
1532
1532
  ctx.notice(on ? "Visitors can sign in." : "Sign-in is off.");
1533
1533
  return { summary: on ? "Visitors can now create accounts and sign in on the published site" : "Sign-in is off for the published site", data: { signIn: !!done.database?.signIn } };
@@ -1745,7 +1745,7 @@ var fontTeamList = defineCommand({
1745
1745
  agent: { name: "list_team_fonts", readOnly: true, description: "The team's fonts: faces uploaded once that every file of the team can use (family, weight, style)." }
1746
1746
  },
1747
1747
  run: async (args) => {
1748
- const { refreshTeamFonts } = await import("./team-client-RIANHJ3V.js");
1748
+ const { refreshTeamFonts } = await import("./team-client-JEEWNM33.js");
1749
1749
  const fonts = await refreshTeamFonts(args.workspace);
1750
1750
  return { summary: plural(fonts.length, "team font"), data: { fonts: fonts.map((f) => ({ id: f.id, family: f.family, weight: f.weight, style: f.style, face: f.face, fileName: f.fileName })) } };
1751
1751
  }
@@ -1772,7 +1772,7 @@ var fontTeamAdd = defineCommand({
1772
1772
  run: async (args, ctx) => {
1773
1773
  const { bytes, fileName: fileName2 } = await fontBytes(args, ctx);
1774
1774
  const { face, family, weight, style } = await resolveFace(bytes, args);
1775
- const { uploadTeamFont } = await import("./team-client-RIANHJ3V.js");
1775
+ const { uploadTeamFont } = await import("./team-client-JEEWNM33.js");
1776
1776
  const font = await uploadTeamFont(bytes, { family, weight, style, face: face.index, fileName: fileName2 }, args.workspace);
1777
1777
  return { summary: `Added ${family} ${weight}${style === "italic" ? " italic" : ""} to the team`, data: { font } };
1778
1778
  }
@@ -1794,7 +1794,7 @@ var fontTeamRemove = defineCommand({
1794
1794
  agent: { name: "remove_team_font", description: "Remove a font from the team (list_team_fonts). Files that use it fall back to another font unless they carry it themselves. The user approves every call." }
1795
1795
  },
1796
1796
  run: async (args) => {
1797
- const { removeTeamFont } = await import("./team-client-RIANHJ3V.js");
1797
+ const { removeTeamFont } = await import("./team-client-JEEWNM33.js");
1798
1798
  const out = await removeTeamFont(args.id, args.workspace);
1799
1799
  return { summary: `Removed the team font${out.freed ? " and freed its storage" : ""}`, data: out };
1800
1800
  }
@@ -1805,7 +1805,7 @@ var fontTeamCommands = [fontTeamList, fontTeamAdd];
1805
1805
  init_define_POPCRAFT_COMPONENT_IDS();
1806
1806
  async function cloudFile() {
1807
1807
  const [{ syncStatus }, { cloudUser }] = await Promise.all([
1808
- import("./sync-SN3J3F2E.js"),
1808
+ import("./sync-M2L4AUS7.js"),
1809
1809
  import("./session-VOE6ZB7Z.js")
1810
1810
  ]);
1811
1811
  const link2 = syncStatus().link;
@@ -1815,13 +1815,13 @@ async function cloudFile() {
1815
1815
  }
1816
1816
  async function fileName(key) {
1817
1817
  try {
1818
- const { cloudApi } = await import("./api-7WOLDYQY.js");
1818
+ const { cloudApi } = await import("./api-XQBSIVXX.js");
1819
1819
  return (await cloudApi.getFile(key)).file.name || "Untitled";
1820
1820
  } catch {
1821
1821
  return "Untitled";
1822
1822
  }
1823
1823
  }
1824
- var api = async () => (await import("./api-7WOLDYQY.js")).cloudApi;
1824
+ var api = async () => (await import("./api-XQBSIVXX.js")).cloudApi;
1825
1825
  var FILE_ROLE = external_exports.enum(["viewer", "commenter", "editor"]);
1826
1826
  var fileDelete = defineCommand({
1827
1827
  id: "file.delete",
@@ -1867,7 +1867,7 @@ var fileTrash = defineCommand({
1867
1867
  agent: { name: "trash_file", description: "Delete the open file: a cloud file goes to the Trash (restorable), a signed-out local file is deleted for good. Then the editor goes back to Home. The user approves every call." }
1868
1868
  },
1869
1869
  run: async () => {
1870
- const { deleteCurrentFile, leaveDeletedFile } = await import("./delete-current-file-6HBNMLIN.js");
1870
+ const { deleteCurrentFile, leaveDeletedFile } = await import("./delete-current-file-HK36SJPJ.js");
1871
1871
  const { name: name2, kind } = await deleteCurrentFile();
1872
1872
  leaveDeletedFile();
1873
1873
  return { summary: kind === "cloud" ? `Moved \u201C${name2}\u201D to the Trash` : `Deleted \u201C${name2}\u201D` };
@@ -1980,11 +1980,11 @@ var fileDuplicate = defineCommand({
1980
1980
  },
1981
1981
  run: async (_p, ctx) => {
1982
1982
  const [{ syncStatus }, { cloudApi }, { isDesktopTabs }, { createFileInTab }, { openNewCloudFile }, { v4: uuid }] = await Promise.all([
1983
- import("./sync-SN3J3F2E.js"),
1984
- import("./api-7WOLDYQY.js"),
1983
+ import("./sync-M2L4AUS7.js"),
1984
+ import("./api-XQBSIVXX.js"),
1985
1985
  import("./tab-mode-53FSPM4H.js"),
1986
- import("./tabs-JLZ3KY3J.js"),
1987
- import("./sync-SN3J3F2E.js"),
1986
+ import("./tabs-LQWI7D4A.js"),
1987
+ import("./sync-M2L4AUS7.js"),
1988
1988
  import("./dist-node-RK2RBQC3.js")
1989
1989
  ]);
1990
1990
  const doc2 = ctx.doc();
@@ -4600,8 +4600,8 @@ var viewCopyLink = defineCommand({
4600
4600
  },
4601
4601
  run: async (args, ctx) => {
4602
4602
  const [{ syncStatus }, { fileUrl }, { withDeepLink }] = await Promise.all([
4603
- import("./sync-SN3J3F2E.js"),
4604
- import("./api-7WOLDYQY.js"),
4603
+ import("./sync-M2L4AUS7.js"),
4604
+ import("./api-XQBSIVXX.js"),
4605
4605
  import("./deep-link-SWO6Q3GM.js")
4606
4606
  ]);
4607
4607
  const link2 = syncStatus().link;
@@ -4925,7 +4925,7 @@ var pageGo = defineCommand({
4925
4925
  ] }
4926
4926
  },
4927
4927
  run: async ({ to }) => {
4928
- const { useEditorStore } = await import("./editor-store-OCFJ6OSK.js");
4928
+ const { useEditorStore } = await import("./editor-store-6OAHCKST.js");
4929
4929
  useEditorStore.getState().goToPrintPage(to);
4930
4930
  return { summary: typeof to === "number" ? `Page ${to + 1}` : `${to} page` };
4931
4931
  }
@@ -4959,7 +4959,7 @@ var pageSetup = defineCommand({
4959
4959
  }
4960
4960
  },
4961
4961
  run: async (args) => {
4962
- const { useEditorStore } = await import("./editor-store-OCFJ6OSK.js");
4962
+ const { useEditorStore } = await import("./editor-store-6OAHCKST.js");
4963
4963
  useEditorStore.getState().applyPageSetup(args);
4964
4964
  return { summary: `Page setup updated${args.kind ? ` (${args.kind.toLowerCase()})` : ""}` };
4965
4965
  }
@@ -5718,7 +5718,7 @@ async function docAtTime(doc2, ids, time2) {
5718
5718
  let frameId;
5719
5719
  if (time2 === void 0) {
5720
5720
  try {
5721
- const { useEditorStore } = await import("./editor-store-OCFJ6OSK.js");
5721
+ const { useEditorStore } = await import("./editor-store-6OAHCKST.js");
5722
5722
  const st = useEditorStore.getState();
5723
5723
  const target = st.transport?.target;
5724
5724
  if (st.mode !== "ANIMATE" || target?.kind !== "frame") return doc2;
@@ -5771,7 +5771,7 @@ var exportSvg = reportsMissingFonts(defineCommand({
5771
5771
  const node = nodeOrThrow(doc2, args.id);
5772
5772
  const renderer = ctx.use("canvas")();
5773
5773
  if (!renderer) throw new ToolError("SVG export needs the canvas renderer, which is not running (the editor canvas may not have initialised WebGPU). Use get_node or measure instead.");
5774
- const { exportNodeToSVG } = await import("./svg-export-7GHGZEUU.js");
5774
+ const { exportNodeToSVG } = await import("./svg-export-HFCUX5PC.js");
5775
5775
  const svg = await exportNodeToSVG(renderer, node, doc2, doc2.styles);
5776
5776
  if (!svg) throw new ToolError(`"${node.name}" has nothing to export (it may be empty or zero-sized).`);
5777
5777
  const max = args.maxChars ?? 2e4;
@@ -5825,8 +5825,8 @@ var exportNodes = reportsMissingFonts(defineCommand({
5825
5825
  const nodes = ids.map((id) => nodeOrThrow(doc2, id));
5826
5826
  const renderer = ctx.use("canvas")();
5827
5827
  if (!renderer) throw new ToolError("Exporting needs the canvas renderer, which is not running (the editor canvas may not have initialised WebGPU). Use measure or export_svg instead.");
5828
- const { exportSettingFile, exportSettingsOf } = await import("./export-UXBQ55UP.js");
5829
- const { downloadBlob } = await import("./download-VA32CX7D.js");
5828
+ const { exportSettingFile, exportSettingsOf } = await import("./export-A6TPYL5H.js");
5829
+ const { downloadBlob } = await import("./download-XCX3HS5A.js");
5830
5830
  const files = [];
5831
5831
  let savedByFormat = 0;
5832
5832
  const record = (id, name2, blob) => {
@@ -5905,7 +5905,7 @@ var exportPdf = reportsMissingFonts(defineCommand({
5905
5905
  const posed = await docAtTime(doc2, nodes.map((n) => n.id), args.time);
5906
5906
  nodes = nodes.map((n) => posed.nodes[n.id] ?? n);
5907
5907
  const { exportNodesToPDF } = await import("./pdf-JUF3X5YX.js");
5908
- const { downloadBlob } = await import("./download-VA32CX7D.js");
5908
+ const { downloadBlob } = await import("./download-XCX3HS5A.js");
5909
5909
  const { scale, ids: _ids, time: _time, ...print } = args;
5910
5910
  void _ids;
5911
5911
  void _time;
@@ -5949,7 +5949,7 @@ var exportCopy = defineCommand({
5949
5949
  const renderer = ctx.use("canvas")();
5950
5950
  if (!renderer) throw new ToolError("Copying a layer needs the canvas renderer, which is not running.");
5951
5951
  const format = args.format ?? "PNG";
5952
- const { copyNodeAsPNG, copyNodeAsSVG } = await import("./export-UXBQ55UP.js");
5952
+ const { copyNodeAsPNG, copyNodeAsSVG } = await import("./export-A6TPYL5H.js");
5953
5953
  const ok = format === "SVG" ? await copyNodeAsSVG(renderer, node, doc2, doc2.styles) : await copyNodeAsPNG(renderer, node, doc2, doc2.styles, args.scale ?? 2);
5954
5954
  if (!ok) throw new ToolError(`"${node.name}" could not be copied as ${format} \u2014 it may be empty, or the browser refused clipboard access.`);
5955
5955
  return { summary: `Copied "${node.name}" as ${format}`, data: { id: node.id, format } };
@@ -5993,8 +5993,8 @@ var exportPages = reportsMissingFonts(defineCommand({
5993
5993
  nodes = nodes.map((n) => posed.nodes[n.id] ?? n);
5994
5994
  const format = args.format ?? "PNG";
5995
5995
  const dpi = args.dpi ?? (doc2.settings?.kind === "PRINT" ? doc2.settings.dpi ?? 300 : 96);
5996
- const { exportNodeToBlob } = await import("./export-UXBQ55UP.js");
5997
- const { downloadBlob } = await import("./download-VA32CX7D.js");
5996
+ const { exportNodeToBlob } = await import("./export-A6TPYL5H.js");
5997
+ const { downloadBlob } = await import("./download-XCX3HS5A.js");
5998
5998
  const { zipFiles } = await import("./zip-export-BWJF6HFA.js");
5999
5999
  const files = [];
6000
6000
  const pad = String(nodes.length).length;
@@ -6039,7 +6039,7 @@ var exportPptx = reportsMissingFonts(defineCommand({
6039
6039
  }
6040
6040
  if (!nodes.length) throw new ToolError("There are no slides on this page to export.");
6041
6041
  const { exportSlidesToPPTX } = await import("./pptx-JEBDAN7O.js");
6042
- const { downloadBlob } = await import("./download-VA32CX7D.js");
6042
+ const { downloadBlob } = await import("./download-XCX3HS5A.js");
6043
6043
  const blob = await exportSlidesToPPTX(renderer, nodes, doc2, doc2.styles);
6044
6044
  if (!blob) throw new ToolError("Those slides produced no file.");
6045
6045
  const filename = `${doc2.name || "deck"}.pptx`;
@@ -6112,7 +6112,7 @@ async function runAnimationExport(format, args, ctx) {
6112
6112
  const filename = exportFileName(args.filename || targetName(doc2, target), format);
6113
6113
  const [{ exportAnimation }, { memoryDestination }] = await Promise.all([import("./video-KMJ3D6EI.js"), import("./destination-QNJMMV7P.js")]);
6114
6114
  if (format === "lottie" || format === "dotlottie") return runLottieExport(renderer, doc2, spec, filename, ctx, memoryDestination, args.stateMachine);
6115
- const planWatermark = format !== "png" && await (await import("./export-watermark-W4NFJZ5R.js")).exportWatermark();
6115
+ const planWatermark = format !== "png" && await (await import("./export-watermark-7KRY6OAF.js")).exportWatermark();
6116
6116
  if (format !== "png") spec = { ...spec, watermark: planWatermark || args.watermark !== false };
6117
6117
  const dest = ctx.destination ? await ctx.destination(filename, FORMAT_MIME[format]) : memoryDestination(filename, FORMAT_MIME[format]);
6118
6118
  let stats;
@@ -6127,7 +6127,7 @@ async function runAnimationExport(format, args, ctx) {
6127
6127
  }
6128
6128
  const blob = await dest.close();
6129
6129
  if (blob) {
6130
- const { downloadBlob } = await import("./download-VA32CX7D.js");
6130
+ const { downloadBlob } = await import("./download-XCX3HS5A.js");
6131
6131
  downloadBlob(blob, dest.name);
6132
6132
  }
6133
6133
  const secs = (spec.range.count / spec.range.fps).toFixed(1);
@@ -6152,7 +6152,7 @@ async function runLottieExport(renderer, doc2, spec, filename, ctx, memoryDestin
6152
6152
  await w.close();
6153
6153
  const blob = await dest.close();
6154
6154
  if (blob) {
6155
- const { downloadBlob } = await import("./download-VA32CX7D.js");
6155
+ const { downloadBlob } = await import("./download-XCX3HS5A.js");
6156
6156
  downloadBlob(blob, dest.name);
6157
6157
  }
6158
6158
  ctx.progress?.(spec.range.count, spec.range.count, "Writing Lottie");
@@ -6198,10 +6198,10 @@ var exportLottie = animationCommand((args) => args.container === "lottie" ? "dot
6198
6198
  });
6199
6199
  async function exportSite(doc2, pageId2, packaging, styling = "css", siteUrl) {
6200
6200
  const [{ completeSite, nextFilesOf, shareImageFiles, staticFilesOf, NoSiteRuntime, bytesOf }, { fileBase }, { zipFiles }, { downloadBlob }] = await Promise.all([
6201
- import("./project-ICLC536M.js"),
6201
+ import("./project-OU5OIYYJ.js"),
6202
6202
  import("./web-V5O6R6JH.js"),
6203
6203
  import("./zip-export-BWJF6HFA.js"),
6204
- import("./download-VA32CX7D.js")
6204
+ import("./download-XCX3HS5A.js")
6205
6205
  ]);
6206
6206
  const site = await completeSite(doc2, pageId2);
6207
6207
  if (!site.pages.length) throw new ToolError("This page has no screens: a top-level frame is a page of the site.");
@@ -6242,8 +6242,8 @@ var exportWeb = reportsMissingFonts(defineCommand({
6242
6242
  const node = id ? doc2.nodes[id] : void 0;
6243
6243
  if (!node) throw new ToolError("Select a frame or layer to export.");
6244
6244
  const { webTreeFor, extensionFor, externalAssets, fileBase, resolveWebAssets, serializeFor, flatten } = await import("./web-V5O6R6JH.js");
6245
- const { rendererAssetResolvers } = await import("./resolvers-CYLYNECW.js");
6246
- const { downloadBlob } = await import("./download-VA32CX7D.js");
6245
+ const { rendererAssetResolvers } = await import("./resolvers-XXZQU3PR.js");
6246
+ const { downloadBlob } = await import("./download-XCX3HS5A.js");
6247
6247
  const tree = webTreeFor(doc2, node.id, lang, { nodeCap: EXPORT_NODE_CAP, fullImageUrls: true });
6248
6248
  if (flatten(tree.root).some((n) => n.asset)) await resolveWebAssets(tree, rendererAssetResolvers(doc2));
6249
6249
  const { webFontFaces } = await import("./web-fonts-VGN7QFMY.js");
@@ -6290,12 +6290,12 @@ var exportStorefront = defineCommand({
6290
6290
  run: async (args, ctx) => {
6291
6291
  const doc2 = ctx.doc();
6292
6292
  const [{ storefrontInputs }, { STOREFRONT_TARGETS }, { bytesOf }, { fileBase, flatten }, { zipFiles }, { downloadBlob }] = await Promise.all([
6293
- import("./storefront-prepare-3BRN4UCT.js"),
6293
+ import("./storefront-prepare-DA4HVN4K.js"),
6294
6294
  import("./storefront-SXLAZPLE.js"),
6295
- import("./project-ICLC536M.js"),
6295
+ import("./project-OU5OIYYJ.js"),
6296
6296
  import("./web-V5O6R6JH.js"),
6297
6297
  import("./zip-export-BWJF6HFA.js"),
6298
- import("./download-VA32CX7D.js")
6298
+ import("./download-XCX3HS5A.js")
6299
6299
  ]);
6300
6300
  const target = STOREFRONT_TARGETS[args.target];
6301
6301
  const { screens, media } = await storefrontInputs(doc2, ctx.pageId(), EXPORT_NODE_CAP);
@@ -6346,14 +6346,14 @@ var exportBoard = defineCommand({
6346
6346
  const roots = boardExportRoots(doc2, ctx.pageId(), selection);
6347
6347
  if (!roots.length) throw new ToolError("There is nothing on this board to export.");
6348
6348
  const name2 = (doc2.name || "Board").replace(/[\\/:*?"<>|]+/g, "-");
6349
- const { downloadBlob } = await import("./download-VA32CX7D.js");
6349
+ const { downloadBlob } = await import("./download-XCX3HS5A.js");
6350
6350
  if (args.format === "PNG") {
6351
6351
  const renderer = ctx.use("canvas")();
6352
6352
  if (!renderer) throw new ToolError("Exporting needs the canvas renderer, which is not running.");
6353
6353
  const bounds = boardBounds(doc2, roots);
6354
6354
  const scale = boardScale(bounds, args.scale);
6355
6355
  const { documentForExport } = await import("./export-fills-W66TS22U.js");
6356
- const { encodeImageData } = await import("./export-UXBQ55UP.js");
6356
+ const { encodeImageData } = await import("./export-A6TPYL5H.js");
6357
6357
  const clean = documentForExport(doc2);
6358
6358
  const image = await renderer.exportRegion(roots.map((n) => clean.nodes[n.id] ?? n), bounds, scale, clean, clean.styles, void 0, true);
6359
6359
  const blob = image && await encodeImageData(image, "PNG");
@@ -6687,7 +6687,7 @@ var visionRegenerateImage = defineCommand({
6687
6687
  const id = args.id ?? ctx.selection()[0];
6688
6688
  if (!id) throw new ToolError("Select a generated image to regenerate.");
6689
6689
  nodeOrThrow(ctx.doc(), id);
6690
- const { regenerateImage } = await import("./client-actions-VJI42ETY.js");
6690
+ const { regenerateImage } = await import("./client-actions-556WYGRI.js");
6691
6691
  regenerateImage(id, args.count);
6692
6692
  return { summary: args.count > 1 ? `Regenerating ${args.count} variants` : "Regenerating the image", data: { id, count: args.count } };
6693
6693
  }
@@ -9846,7 +9846,7 @@ var scriptRun = defineCommand({
9846
9846
  // A script is not the turn the user is watching: confirm-tier tools are refused inside it (dispatch, `nested`).
9847
9847
  actor: { ...ctx.actor, nested: true, label: "Script" },
9848
9848
  // A look_at inside the script sees the document as the script has left it so far, not as it was before.
9849
- use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-YC2TSI5E.js")).renderDocument(staged, ids, options)) : ctx.use(name2))
9849
+ use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-YFVWUBA3.js")).renderDocument(staged, ids, options)) : ctx.use(name2))
9850
9850
  };
9851
9851
  let calls = 0;
9852
9852
  const images = [];
@@ -10666,7 +10666,7 @@ var docImportFile = defineCommand({
10666
10666
  const file = new File([body], args.name);
10667
10667
  if (file.size > MAX_BYTES) throw new ToolError(`"${args.name}" is larger than ${MAX_BYTES / 1024 / 1024} MB.`);
10668
10668
  const [{ buildImportedDocument }, { mergeImportedDocument }] = await Promise.all([
10669
- import("./plugin-import-NWVUVAWV.js"),
10669
+ import("./plugin-import-DGTF6ELY.js"),
10670
10670
  import("./import-merge-YMAPF5T6.js")
10671
10671
  ]);
10672
10672
  const built = await buildImportedDocument(file);
@@ -37,7 +37,7 @@ import {
37
37
  import {
38
38
  encodeImageData,
39
39
  sliceRegion
40
- } from "./chunk-5AE2AJPB.js";
40
+ } from "./chunk-5UX2YF4U.js";
41
41
  import {
42
42
  documentForExport
43
43
  } from "./chunk-WMXG7MLG.js";
@@ -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-LMQGWQBU.js";
9
+ } from "./chunk-FCU4OKLZ.js";
10
10
  import {
11
11
  announce
12
12
  } from "./chunk-EJT3FVAU.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-OCFJ6OSK.js"),
94
+ import("./editor-store-6OAHCKST.js"),
95
95
  import("../lib/document/photo-frames.js"),
96
- import("./media-tool-VXRJZOCS.js")
96
+ import("./media-tool-4VJZNTGR.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);