@popcraft/kit 0.58.1 → 0.59.0

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 (60) hide show
  1. package/dist/chunks/{agent-NHOFRCPE.js → agent-S2XBIQEK.js} +1 -1
  2. package/dist/chunks/{builtin-TIDIXV7B.js → builtin-YMJZTZMA.js} +3 -3
  3. package/dist/chunks/{buy-credits-UB3GELP5.js → buy-credits-AK2XYG6U.js} +2 -2
  4. package/dist/chunks/{check-template-ZRRUFFE3.js → check-template-7SY3WP7Y.js} +2 -2
  5. package/dist/chunks/{chunk-7GOK5Z4S.js → chunk-2RJMUSOT.js} +10 -0
  6. package/dist/chunks/{chunk-TMKBC5UN.js → chunk-2YHYGCTT.js} +1 -1
  7. package/dist/chunks/{chunk-7IEN5XYY.js → chunk-5NTVUBIU.js} +13 -13
  8. package/dist/chunks/{chunk-HEDFE2VJ.js → chunk-662GNCQQ.js} +9 -9
  9. package/dist/chunks/{chunk-7O2AEDWT.js → chunk-6ZFNAY5O.js} +46 -42
  10. package/dist/chunks/{chunk-LNJUTZDK.js → chunk-7EBRN34K.js} +1 -1
  11. package/dist/chunks/{chunk-O45XDQE6.js → chunk-7OVPRHIN.js} +6 -6
  12. package/dist/chunks/{chunk-JULEYDGI.js → chunk-CB73AZHN.js} +4 -4
  13. package/dist/chunks/{chunk-SMXWUSAA.js → chunk-GG3BYS2R.js} +33 -16
  14. package/dist/chunks/{chunk-QUSTEFMP.js → chunk-GRAWCIB4.js} +2 -2
  15. package/dist/chunks/{chunk-CGMLRMPF.js → chunk-IPGN7XPW.js} +32 -4
  16. package/dist/chunks/{chunk-35YIDWS6.js → chunk-J4KNHRIR.js} +4 -4
  17. package/dist/chunks/{chunk-AL56JMXI.js → chunk-L4ZLPYBN.js} +2 -2
  18. package/dist/chunks/{chunk-E6PDBU3U.js → chunk-NEZIWVGN.js} +3 -3
  19. package/dist/chunks/{chunk-46IVOII6.js → chunk-OSY3TQB4.js} +11 -11
  20. package/dist/chunks/{chunk-UXN6VD3C.js → chunk-PERS6A4I.js} +2 -2
  21. package/dist/chunks/{chunk-ZF3DASEZ.js → chunk-PSAU4QN4.js} +1 -1
  22. package/dist/chunks/{chunk-ZA7JYVWL.js → chunk-QL5BYW63.js} +1 -1
  23. package/dist/chunks/{chunk-WX2JHSMD.js → chunk-QPHW6JE2.js} +1 -1
  24. package/dist/chunks/{chunk-4OJI2HZC.js → chunk-YTSYQYRT.js} +2 -2
  25. package/dist/chunks/{client-WXREHY4F.js → client-3CGSYZJE.js} +1 -1
  26. package/dist/chunks/{client-BDPCG3YS.js → client-ALL6CZAL.js} +2 -2
  27. package/dist/chunks/{client-3HLBD67S.js → client-FO26KEPK.js} +3 -3
  28. package/dist/chunks/{client-actions-AROIYZ2A.js → client-actions-ZAUXFL2O.js} +5 -5
  29. package/dist/chunks/{dangerous-ULHB7N3S.js → dangerous-JO67OXBS.js} +3 -3
  30. package/dist/chunks/{delete-current-file-7CABS2TB.js → delete-current-file-GT6HXPD3.js} +5 -5
  31. package/dist/chunks/{editor-seams-5UZQQKSN.js → editor-seams-YN6UTX6E.js} +12 -12
  32. package/dist/chunks/{editor-store-YU2YYXBR.js → editor-store-YFW4DJ5W.js} +1 -1
  33. package/dist/chunks/{export-watermark-2FZPX2RY.js → export-watermark-23GQYHS7.js} +5 -5
  34. package/dist/chunks/{eyedropper-EW5AZ4EG.js → eyedropper-5C5PC47G.js} +1 -1
  35. package/dist/chunks/{generate-media-DNGVCXDI.js → generate-media-5PJDPAWR.js} +3 -3
  36. package/dist/chunks/{host-UPHL2EN3.js → host-AQJ33HVQ.js} +9 -7
  37. package/dist/chunks/{integrations-U4C7XFH4.js → integrations-I5KCGRBE.js} +1 -1
  38. package/dist/chunks/{libraries-OOAEZC26.js → libraries-IXCZAWIM.js} +5 -5
  39. package/dist/chunks/{live-HMQX6UT7.js → live-PVTZNZ5E.js} +1 -1
  40. package/dist/chunks/{media-tool-ZAYBDSEE.js → media-tool-GN3HGXTE.js} +1 -1
  41. package/dist/chunks/{new-file-Q4LCYU3M.js → new-file-N5JRPB7A.js} +3 -3
  42. package/dist/chunks/{plugin-SF63BYEC.js → plugin-DAORGN7V.js} +2 -2
  43. package/dist/chunks/{plugin-import-JFW7KKWA.js → plugin-import-S2EP2X6N.js} +17 -17
  44. package/dist/chunks/{plugin-store-VJH7PHS2.js → plugin-store-OCQRBXWK.js} +1 -1
  45. package/dist/chunks/{presence-OWWX2H2P.js → presence-KXQY3TQT.js} +2 -2
  46. package/dist/chunks/{project-CZ2PGF7S.js → project-F7WQIMI5.js} +1 -1
  47. package/dist/chunks/{publish-site-HJ7MXWMK.js → publish-site-FSCSPPME.js} +6 -6
  48. package/dist/chunks/{publish-store-6TGOSZM3.js → publish-store-H4RKL5YB.js} +4 -4
  49. package/dist/chunks/{raster-actions-P2UZ7ZYY.js → raster-actions-2LIUE6YM.js} +1 -1
  50. package/dist/chunks/{runner-U7KIHBIR.js → runner-ZACBUVCU.js} +18 -18
  51. package/dist/chunks/{store-DGVNQHDW.js → store-XL6IPKHJ.js} +6 -6
  52. package/dist/chunks/{sync-TNQN7WWP.js → sync-HIAMQQYN.js} +5 -5
  53. package/dist/chunks/{tabs-GCPSIRYV.js → tabs-PPSFWHAE.js} +8 -8
  54. package/dist/chunks/{team-UW3WDLIN.js → team-DECPX6VV.js} +1 -1
  55. package/dist/chunks/{team-client-SI7LGPN6.js → team-client-Y5JB3YGB.js} +1 -1
  56. package/dist/chunks/{tools-PPP4F2YC.js → tools-TO3SOVT2.js} +2 -2
  57. package/dist/chunks/{ui-commands-RMSYI4CF.js → ui-commands-TEOBCXX5.js} +12 -12
  58. package/dist/chunks/{versions-HXMG5B3E.js → versions-RHYSSG3I.js} +5 -5
  59. package/dist/index.js +1 -1
  60. package/package.json +1 -1
@@ -18,7 +18,7 @@ import {
18
18
  renderDocument,
19
19
  toolView,
20
20
  underReviewKit
21
- } from "./chunk-E6PDBU3U.js";
21
+ } from "./chunk-NEZIWVGN.js";
22
22
  import "./chunk-RRT5HQJP.js";
23
23
  import "./chunk-H5OKJTC3.js";
24
24
  import "./chunk-CERJ4PMP.js";
@@ -7,8 +7,8 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  builtinTools,
9
9
  registerBuiltinTools
10
- } from "./chunk-UXN6VD3C.js";
11
- import "./chunk-7O2AEDWT.js";
10
+ } from "./chunk-PERS6A4I.js";
11
+ import "./chunk-6ZFNAY5O.js";
12
12
  import "./chunk-RBNDP3QS.js";
13
13
  import "./chunk-UDJDLJXO.js";
14
14
  import "./chunk-NDUN6ION.js";
@@ -17,7 +17,7 @@ import "./chunk-WJY5YMZF.js";
17
17
  import "./chunk-UPQJSFMZ.js";
18
18
  import "./chunk-B46OGMLE.js";
19
19
  import "./chunk-3QZXQL3W.js";
20
- import "./chunk-E6PDBU3U.js";
20
+ import "./chunk-NEZIWVGN.js";
21
21
  import "./chunk-RRT5HQJP.js";
22
22
  import "./chunk-TLE2JL3N.js";
23
23
  import "./chunk-YKLYCEHF.js";
@@ -7,11 +7,11 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  HYPERY_TEAM_HEADER,
9
9
  hyperyRequestHeaders
10
- } from "./chunk-ZF3DASEZ.js";
10
+ } from "./chunk-PSAU4QN4.js";
11
11
  import "./chunk-5Z3PWMIP.js";
12
12
  import {
13
13
  useHyperyTeam
14
- } from "./chunk-WX2JHSMD.js";
14
+ } from "./chunk-QPHW6JE2.js";
15
15
  import {
16
16
  openLink
17
17
  } from "./chunk-P4EC4ZZR.js";
@@ -6,10 +6,10 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  appCommands
9
- } from "./chunk-7IEN5XYY.js";
9
+ } from "./chunk-5NTVUBIU.js";
10
10
  import {
11
11
  builtinCommands
12
- } from "./chunk-7O2AEDWT.js";
12
+ } from "./chunk-6ZFNAY5O.js";
13
13
  import "./chunk-RBNDP3QS.js";
14
14
  import "./chunk-UDJDLJXO.js";
15
15
  import "./chunk-NDUN6ION.js";
@@ -23,6 +23,16 @@ var usePluginStore = create()((set) => ({
23
23
  toasts: [],
24
24
  permissionPrompt: null,
25
25
  managerOpen: false,
26
+ panelIcons: {},
27
+ setPanelIcon: (tab, icon) => set((st) => {
28
+ const next = { ...st.panelIcons };
29
+ if (icon) next[tab] = icon;
30
+ else delete next[tab];
31
+ return { panelIcons: next };
32
+ }),
33
+ clearPanelIcons: (pluginId) => set((st) => ({
34
+ panelIcons: Object.fromEntries(Object.entries(st.panelIcons).filter(([, v]) => v.pluginId !== pluginId))
35
+ })),
26
36
  setInstalled: (installed) => set({ installed }),
27
37
  setManagerOpen: (managerOpen) => set({ managerOpen }),
28
38
  upsertSession: (s) => set((st) => ({ sessions: [...st.sessions.filter((x) => x.sessionId !== s.sessionId), s] })),
@@ -13,7 +13,7 @@ import {
13
13
  agentTool,
14
14
  agentToolList,
15
15
  registerCommands
16
- } from "./chunk-E6PDBU3U.js";
16
+ } from "./chunk-NEZIWVGN.js";
17
17
  import {
18
18
  dispatch
19
19
  } from "./chunk-H5OKJTC3.js";
@@ -8,7 +8,7 @@ import {
8
8
  needsSelection,
9
9
  pageGo,
10
10
  selectionIsPicture
11
- } from "./chunk-7O2AEDWT.js";
11
+ } from "./chunk-6ZFNAY5O.js";
12
12
  import {
13
13
  external_exports
14
14
  } from "./chunk-3QZXQL3W.js";
@@ -31,7 +31,7 @@ var none = external_exports.object({});
31
31
  var emit = (name, detail) => {
32
32
  if (typeof window !== "undefined") window.dispatchEvent(new CustomEvent(name, { detail }));
33
33
  };
34
- var store = () => import("./editor-store-YU2YYXBR.js").then((m) => m.useEditorStore.getState());
34
+ var store = () => import("./editor-store-YFW4DJ5W.js").then((m) => m.useEditorStore.getState());
35
35
  var MODE_IDS = MODE_LIST.map((m) => m.id);
36
36
  var MODE_ALIASES = { JAM: "POPCORN", DEV: "VIEW" };
37
37
  var modeSet = defineCommand({
@@ -158,7 +158,7 @@ var dialogOpen = defineCommand({
158
158
  (await import("./share-ENWLGRKU.js")).openShareDialog();
159
159
  break;
160
160
  case "plugins":
161
- (await import("./plugin-store-VJH7PHS2.js")).usePluginStore.getState().setManagerOpen(true);
161
+ (await import("./plugin-store-OCQRBXWK.js")).usePluginStore.getState().setManagerOpen(true);
162
162
  break;
163
163
  case "theme-editor":
164
164
  (await import("./theme-store-LV2FARMB.js")).useThemeStore.getState().setEditorOpen(true);
@@ -167,7 +167,7 @@ var dialogOpen = defineCommand({
167
167
  (await import("./plan-limit-22B6F76F.js")).openPlanDialog();
168
168
  break;
169
169
  case "credits":
170
- await (await import("./buy-credits-UB3GELP5.js")).buyAiCredits();
170
+ await (await import("./buy-credits-AK2XYG6U.js")).buyAiCredits();
171
171
  break;
172
172
  case "tokens":
173
173
  emit("popcraft-open-tokens");
@@ -213,7 +213,7 @@ var aiOpen = defineCommand({
213
213
  ] } },
214
214
  run: async ({ dialog, skillId }) => {
215
215
  if (dialog) (await import("./client-store-DU6THDGV.js")).openAiDialog(dialog);
216
- else (await import("./store-DGVNQHDW.js")).openAgentPanel({ skillId: skillId ?? null });
216
+ else (await import("./store-XL6IPKHJ.js")).openAgentPanel({ skillId: skillId ?? null });
217
217
  return { summary: dialog ? `Opened AI ${dialog}` : "Opened the agent" };
218
218
  }
219
219
  });
@@ -226,7 +226,7 @@ var agentContinue = defineCommand({
226
226
  params: external_exports.object({}),
227
227
  expose: { ui: { label: "AI: Continue the agent\u2019s last turn", keywords: ["ai", "agent", "continue", "resume", "retry", "keep going"] } },
228
228
  run: async () => {
229
- const resumed = await (await import("./runner-U7KIHBIR.js")).continueTurn();
229
+ const resumed = await (await import("./runner-ZACBUVCU.js")).continueTurn();
230
230
  return { summary: resumed ? "Continued the agent" : "Nothing to continue" };
231
231
  }
232
232
  });
@@ -305,11 +305,11 @@ var toolPlace = defineCommand({
305
305
  run: async ({ what }) => {
306
306
  if (what === "media") {
307
307
  const s = await store();
308
- const { placeMediaFromPicker } = await import("./media-tool-ZAYBDSEE.js");
308
+ const { placeMediaFromPicker } = await import("./media-tool-GN3HGXTE.js");
309
309
  await placeMediaFromPicker({ kind: "point", x: s.camera.x, y: s.camera.y });
310
310
  return { summary: "Placing media" };
311
311
  }
312
- const { beginEyedrop } = await import("./eyedropper-EW5AZ4EG.js");
312
+ const { beginEyedrop } = await import("./eyedropper-5C5PC47G.js");
313
313
  void beginEyedrop();
314
314
  return { summary: "Pick a color" };
315
315
  }
@@ -327,7 +327,7 @@ var nodeRasterize = defineCommand({
327
327
  keywords: ["rasterize", "raster", "flatten", "pixels", "paint layer", "erase", "bitmap"]
328
328
  } },
329
329
  run: async () => {
330
- const { flattenSelectionToPaintLayer } = await import("./raster-actions-P2UZ7ZYY.js");
330
+ const { flattenSelectionToPaintLayer } = await import("./raster-actions-2LIUE6YM.js");
331
331
  await flattenSelectionToPaintLayer();
332
332
  return { summary: "Rasterized" };
333
333
  }
@@ -425,8 +425,8 @@ function themeCommand(themes) {
425
425
  });
426
426
  }
427
427
  function pluginCommand(plugins) {
428
- const variants = plugins.filter((p) => p.enabled && (p.manifest.commands?.length || true)).flatMap((p) => {
429
- const commands = p.manifest.commands?.length ? p.manifest.commands : [{ id: "run", label: "Run" }];
428
+ const variants = plugins.filter((p) => p.enabled).flatMap((p) => {
429
+ const commands = p.manifest.commands?.length ? p.manifest.commands : p.manifest.contributes?.panels?.length ? [] : [{ id: "run", label: "Run" }];
430
430
  return commands.map((c) => ({ id: `${p.manifest.id}:${c.id}`, label: `${p.manifest.name}: ${c.label}`, params: { pluginId: p.manifest.id, commandId: c.id } }));
431
431
  });
432
432
  return defineCommand({
@@ -438,7 +438,7 @@ function pluginCommand(plugins) {
438
438
  params: external_exports.object({ pluginId: external_exports.string(), commandId: external_exports.string() }),
439
439
  expose: { ui: { label: "Run plugin", keywords: ["plugin", "extension", "run"], variants, palette: variants.length ? void 0 : false } },
440
440
  run: async ({ pluginId, commandId }) => {
441
- await (await import("./host-UPHL2EN3.js")).runPlugin(pluginId, commandId);
441
+ await (await import("./host-AQJ33HVQ.js")).runPlugin(pluginId, commandId);
442
442
  return { summary: "Plugin started" };
443
443
  }
444
444
  });
@@ -475,7 +475,7 @@ function registerAppCommands() {
475
475
  sync();
476
476
  useThemeStore.subscribe(sync);
477
477
  });
478
- void import("./plugin-store-VJH7PHS2.js").then(({ usePluginStore }) => {
478
+ void import("./plugin-store-OCQRBXWK.js").then(({ usePluginStore }) => {
479
479
  const sync = () => registerCommand(pluginCommand(usePluginStore.getState().installed));
480
480
  sync();
481
481
  usePluginStore.subscribe(sync);
@@ -4839,7 +4839,7 @@ function createPopcornSlice(set2, get2) {
4839
4839
  privateMode: false,
4840
4840
  setPrivateMode: (on) => {
4841
4841
  set2({ privateMode: on });
4842
- void import("./presence-OWWX2H2P.js").then((m) => m.setPresencePrivate(on)).catch(() => {
4842
+ void import("./presence-KXQY3TQT.js").then((m) => m.setPresencePrivate(on)).catch(() => {
4843
4843
  });
4844
4844
  },
4845
4845
  /** Reveal every private item THIS user created (they sync to collaborators). Others' stay theirs. */
@@ -6531,7 +6531,7 @@ var MAX_OPEN_NODES = 15e4;
6531
6531
  function tooLargeToOpen(doc) {
6532
6532
  const count = Object.keys(doc.nodes ?? {}).length;
6533
6533
  if (count <= MAX_OPEN_NODES) return false;
6534
- void import("./plugin-store-VJH7PHS2.js").then(({ usePluginStore }) => usePluginStore.getState().toast(t("editorStore.tooLargeToOpen", { name: doc.name || "Untitled", count: count.toLocaleString() }), { error: true }));
6534
+ void import("./plugin-store-OCQRBXWK.js").then(({ usePluginStore }) => usePluginStore.getState().toast(t("editorStore.tooLargeToOpen", { name: doc.name || "Untitled", count: count.toLocaleString() }), { error: true }));
6535
6535
  return true;
6536
6536
  }
6537
6537
  var sessionDocumentInLibrary = null;
@@ -6637,7 +6637,7 @@ var customIdbPersistStorage = {
6637
6637
  if (!saveFailureNotified) {
6638
6638
  saveFailureNotified = true;
6639
6639
  const tooLarge = /too large|quota/i.test(String(e?.message ?? e));
6640
- import("./plugin-store-VJH7PHS2.js").then(({ usePluginStore }) => usePluginStore.getState().toast(
6640
+ import("./plugin-store-OCQRBXWK.js").then(({ usePluginStore }) => usePluginStore.getState().toast(
6641
6641
  tooLarge ? t("editorStore.thisDocumentIsTooLarge") : t("editorStore.savingToBrowserStorageFailed"),
6642
6642
  { error: true, source: "Save" }
6643
6643
  )).catch(() => {
@@ -6732,7 +6732,7 @@ var readOnlyToldAt = 0;
6732
6732
  function readOnlyRefused() {
6733
6733
  if (Date.now() - readOnlyToldAt < 4e3) return;
6734
6734
  readOnlyToldAt = Date.now();
6735
- import("./plugin-store-VJH7PHS2.js").then(({ usePluginStore }) => usePluginStore.getState().toast(t("editorStore.readOnlyPickAMode"))).catch(() => {
6735
+ import("./plugin-store-OCQRBXWK.js").then(({ usePluginStore }) => usePluginStore.getState().toast(t("editorStore.readOnlyPickAMode"))).catch(() => {
6736
6736
  });
6737
6737
  }
6738
6738
  var useEditorStore = create()(
@@ -6905,7 +6905,7 @@ var useEditorStore = create()(
6905
6905
  // A copy is a new file, so it is cloud-backed like any other (see lib/client/cloud/new-file.ts).
6906
6906
  // Returns '' when it was refused (offline, signed out, plan full) or failed; nothing is left behind.
6907
6907
  duplicateDocument: async (id) => {
6908
- const { duplicateDocumentToCloud } = await import("./sync-TNQN7WWP.js");
6908
+ const { duplicateDocumentToCloud } = await import("./sync-HIAMQQYN.js");
6909
6909
  return duplicateDocumentToCloud(id);
6910
6910
  },
6911
6911
  deleteDocument: async (id) => {
@@ -9017,7 +9017,7 @@ var useEditorStore = create()(
9017
9017
  if (py > maxY) maxY = py;
9018
9018
  }
9019
9019
  if (minX === Infinity || maxX - minX <= 0 || maxY - minY <= 0) {
9020
- void import("./plugin-store-VJH7PHS2.js").then(({ usePluginStore }) => usePluginStore.getState().toast(t("editorStore.leftNothingThoseShapesProduce", { toLowerCase: operation.toLowerCase() }), { error: true, source: "Boolean" }));
9020
+ void import("./plugin-store-OCQRBXWK.js").then(({ usePluginStore }) => usePluginStore.getState().toast(t("editorStore.leftNothingThoseShapesProduce", { toLowerCase: operation.toLowerCase() }), { error: true, source: "Boolean" }));
9021
9021
  return;
9022
9022
  }
9023
9023
  const booleanNode = createBoolean(operation, [], {
@@ -10409,9 +10409,9 @@ if (typeof window !== "undefined") {
10409
10409
  if (typeof window !== "undefined" && navigator.webdriver) {
10410
10410
  window.__vpDesign = async (script, o = {}) => {
10411
10411
  const [{ registerBuiltinTools, runTool }, { editorToolContext }, { createDesignPreview }] = await Promise.all([
10412
- import("./tools-PPP4F2YC.js").then(async (m) => ({ ...m, registerBuiltinTools: (await import("./builtin-TIDIXV7B.js")).registerBuiltinTools })),
10413
- import("./editor-seams-5UZQQKSN.js"),
10414
- import("./live-HMQX6UT7.js")
10412
+ import("./tools-TO3SOVT2.js").then(async (m) => ({ ...m, registerBuiltinTools: (await import("./builtin-YMJZTZMA.js")).registerBuiltinTools })),
10413
+ import("./editor-seams-YN6UTX6E.js"),
10414
+ import("./live-PVTZNZ5E.js")
10415
10415
  ]);
10416
10416
  registerBuiltinTools();
10417
10417
  const args = JSON.stringify({ ...o.name ? { name: o.name } : {}, ...o.size ? { size: o.size } : {}, ...o.frame ? { frame: o.frame } : {}, script });
@@ -938,7 +938,7 @@ init_scene_graph();
938
938
  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.");
939
939
  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 });
940
940
  async function placeImportedPicture(ctx, imported, at2, what, extra = {}) {
941
- const client = await import("./client-WXREHY4F.js");
941
+ const client = await import("./client-3CGSYZJE.js");
942
942
  if (at2.fillLayerId) {
943
943
  const doc2 = ctx.doc();
944
944
  const target = nodeOrThrow(doc2, at2.fillLayerId);
@@ -984,7 +984,7 @@ var photoSearch = defineCommand({
984
984
  }
985
985
  },
986
986
  run: async (args) => {
987
- const { searchStockPhotos } = await import("./client-WXREHY4F.js");
987
+ const { searchStockPhotos } = await import("./client-3CGSYZJE.js");
988
988
  const page = await searchStockPhotos(args.query, args.page ?? 1, { licence: args.licence });
989
989
  return {
990
990
  summary: `${page.results.length} photo${page.results.length === 1 ? "" : "s"} for \u201C${page.query}\u201D (page ${page.page} of ${page.pageCount || 1})`,
@@ -1018,7 +1018,7 @@ var photoInsert = defineCommand({
1018
1018
  run: async (args, ctx) => {
1019
1019
  if (!args.id && !args.query) throw new ToolError("Pass an id from search_photos, or a query.");
1020
1020
  if (args.id && !isPhotoId(args.id)) throw new ToolError(`"${args.id}" is not a photo id from search_photos.`);
1021
- const client = await import("./client-WXREHY4F.js");
1021
+ const client = await import("./client-3CGSYZJE.js");
1022
1022
  let photo;
1023
1023
  if (args.id) photo = await client.stockPhotoInfo(args.id);
1024
1024
  else {
@@ -1056,10 +1056,10 @@ var mediaList = defineCommand({
1056
1056
  }
1057
1057
  },
1058
1058
  run: async (args) => {
1059
- const { listLibraryMedia } = await import("./client-BDPCG3YS.js");
1059
+ const { listLibraryMedia } = await import("./client-ALL6CZAL.js");
1060
1060
  const q = { ...args };
1061
1061
  if (!q.workspace) {
1062
- const { syncStatus } = await import("./sync-TNQN7WWP.js");
1062
+ const { syncStatus } = await import("./sync-HIAMQQYN.js");
1063
1063
  const link2 = syncStatus().link;
1064
1064
  if (!link2) throw new ToolError("This document is not saved to the cloud, so it has no team media library. Pass workspace.");
1065
1065
  q.workspace = (await listLibraryMedia({ file: link2.key, limit: 1 })).workspaceId;
@@ -1094,7 +1094,7 @@ var mediaInsert = defineCommand({
1094
1094
  run: async (args, ctx) => {
1095
1095
  const contentType = args.contentType ?? "image/*";
1096
1096
  if (!contentType.startsWith("image/")) throw new ToolError("insert_media places pictures; this item is not one.");
1097
- const { importLibraryPicture } = await import("./client-BDPCG3YS.js");
1097
+ const { importLibraryPicture } = await import("./client-ALL6CZAL.js");
1098
1098
  const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "Media", contentType, size: 0, createdAt: "", fileCount: 1, source: null };
1099
1099
  const imported = await importLibraryPicture(item);
1100
1100
  return placeImportedPicture(ctx, imported, args, `\u201C${imported.name}\u201D`, { hash: imported.hash });
@@ -1115,7 +1115,7 @@ var mediaDownload = defineCommand({
1115
1115
  // The Library's right-click menu: saves the item's file to the computer.
1116
1116
  expose: { ui: { label: "Download", palette: false } },
1117
1117
  run: async (args) => {
1118
- const { libraryBlob, libraryFileName } = await import("./client-BDPCG3YS.js");
1118
+ const { libraryBlob, libraryFileName } = await import("./client-ALL6CZAL.js");
1119
1119
  const { downloadBlob } = await import("./download-OCJAYTSN.js");
1120
1120
  const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "media", contentType: args.contentType ?? "", size: 0, createdAt: "", fileCount: 1, source: null };
1121
1121
  const blob = await libraryBlob(item);
@@ -1146,7 +1146,7 @@ var mediaDelete = defineCommand({
1146
1146
  }
1147
1147
  },
1148
1148
  run: async (args) => {
1149
- const { deleteLibraryMedia } = await import("./client-BDPCG3YS.js");
1149
+ const { deleteLibraryMedia } = await import("./client-ALL6CZAL.js");
1150
1150
  const out = await deleteLibraryMedia(args.workspace, args.hash);
1151
1151
  return { summary: `Deleted it from the library (it was in ${out.files} file${out.files === 1 ? "" : "s"})`, data: out };
1152
1152
  }
@@ -1160,13 +1160,13 @@ async function signedIn() {
1160
1160
  }
1161
1161
  async function publishedFile() {
1162
1162
  await signedIn();
1163
- const { openFileKey } = await import("./publish-site-HJ7MXWMK.js");
1163
+ const { openFileKey } = await import("./publish-site-FSCSPPME.js");
1164
1164
  const key = openFileKey();
1165
1165
  if (!key) throw new CommandError("This file is not saved to the cloud yet, so it has no site. Publish it first.", "failed");
1166
1166
  return key;
1167
1167
  }
1168
1168
  async function formsWithoutDatabase(key) {
1169
- const [{ useEditorStore }, { usesForms, formsGoNowhere }, { siteBackend }] = await Promise.all([import("./editor-store-YU2YYXBR.js"), import("./backend-NWTUXQWB.js"), import("./integrations-U4C7XFH4.js")]);
1169
+ const [{ useEditorStore }, { usesForms, formsGoNowhere }, { siteBackend }] = await Promise.all([import("./editor-store-YFW4DJ5W.js"), import("./backend-NWTUXQWB.js"), import("./integrations-I5KCGRBE.js")]);
1170
1170
  const doc2 = useEditorStore.getState().document;
1171
1171
  if (!usesForms(doc2)) return false;
1172
1172
  return formsGoNowhere(doc2, await siteBackend(key).catch(() => void 0));
@@ -1202,7 +1202,7 @@ var publishSite = defineCommand({
1202
1202
  const { cleanSlug } = await import("./rules-GKFKMXOG.js");
1203
1203
  const address = p.address === void 0 ? void 0 : cleanSlug(p.address);
1204
1204
  if (address === null) throw new CommandError("That cannot be a site address: use 3 to 40 letters, digits and dashes.", "invalid_params");
1205
- const { publishOpenFile, NoScreens } = await import("./publish-site-HJ7MXWMK.js");
1205
+ const { publishOpenFile, NoScreens } = await import("./publish-site-FSCSPPME.js");
1206
1206
  try {
1207
1207
  const done = await publishOpenFile(address);
1208
1208
  ctx.notice(`Published version ${done.version}: ${done.url}`);
@@ -1257,7 +1257,7 @@ var publishListSites = defineCommand({
1257
1257
  },
1258
1258
  run: async (p) => {
1259
1259
  await signedIn();
1260
- const [{ workspaceSites }, { activeTeamWorkspaceId, useHyperyTeam }] = await Promise.all([import("./sites-AYOMGTXE.js"), import("./team-UW3WDLIN.js")]);
1260
+ const [{ workspaceSites }, { activeTeamWorkspaceId, useHyperyTeam }] = await Promise.all([import("./sites-AYOMGTXE.js"), import("./team-DECPX6VV.js")]);
1261
1261
  const workspaceId = p.workspaceId ?? activeTeamWorkspaceId() ?? useHyperyTeam.getState().personalWorkspaceId;
1262
1262
  if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
1263
1263
  const out = await workspaceSites(workspaceId);
@@ -1306,12 +1306,12 @@ var publishStatus = defineCommand({
1306
1306
  },
1307
1307
  run: async () => {
1308
1308
  await signedIn();
1309
- const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-HJ7MXWMK.js"), import("./sites-AYOMGTXE.js")]);
1309
+ const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-FSCSPPME.js"), import("./sites-AYOMGTXE.js")]);
1310
1310
  const key = openFileKey();
1311
1311
  const status = await siteStatus(key);
1312
1312
  const site = status.site;
1313
- const backend = key ? await (await import("./integrations-U4C7XFH4.js")).siteBackend(key).catch(() => null) : null;
1314
- const destinations = key ? await (await import("./integrations-U4C7XFH4.js")).listDestinations(key).catch(() => []) : [];
1313
+ const backend = key ? await (await import("./integrations-I5KCGRBE.js")).siteBackend(key).catch(() => null) : null;
1314
+ const destinations = key ? await (await import("./integrations-I5KCGRBE.js")).listDestinations(key).catch(() => []) : [];
1315
1315
  return {
1316
1316
  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}`,
1317
1317
  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 })) }
@@ -1342,7 +1342,7 @@ var publishStore = defineCommand({
1342
1342
  },
1343
1343
  run: async (p, ctx) => {
1344
1344
  await signedIn();
1345
- const { deployOpenStore } = await import("./publish-store-6TGOSZM3.js");
1345
+ const { deployOpenStore } = await import("./publish-store-H4RKL5YB.js");
1346
1346
  const done = await deployOpenStore(ctx.doc(), ctx.pageId(), { destinationId: p.destinationId }).catch((e) => {
1347
1347
  throw new CommandError(e instanceof Error ? e.message : String(e), "failed");
1348
1348
  });
@@ -1371,7 +1371,7 @@ var integrationList = defineCommand({
1371
1371
  }
1372
1372
  },
1373
1373
  run: async ({ capability }) => {
1374
- const [{ cloudUser }, { integrationsWorkspaceId, listWorkspaceIntegrations }] = await Promise.all([import("./session-RK72I6KZ.js"), import("./integrations-U4C7XFH4.js")]);
1374
+ const [{ cloudUser }, { integrationsWorkspaceId, listWorkspaceIntegrations }] = await Promise.all([import("./session-RK72I6KZ.js"), import("./integrations-I5KCGRBE.js")]);
1375
1375
  if (!cloudUser()) throw new CommandError("You are not signed in: integrations belong to your account's workspace.", "denied");
1376
1376
  const workspaceId = integrationsWorkspaceId();
1377
1377
  if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
@@ -1412,7 +1412,7 @@ var integrationOpen = defineCommand({
1412
1412
  }
1413
1413
  });
1414
1414
  async function openFile() {
1415
- const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-RK72I6KZ.js"), import("./publish-site-HJ7MXWMK.js")]);
1415
+ const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-RK72I6KZ.js"), import("./publish-site-FSCSPPME.js")]);
1416
1416
  if (!cloudUser()) throw new CommandError("You are not signed in.", "denied");
1417
1417
  const key = openFileKey();
1418
1418
  if (!key) throw new CommandError("This file is not saved to the cloud yet. Publish it first (publish_site).", "failed");
@@ -1438,7 +1438,7 @@ var integrationListResources = defineCommand({
1438
1438
  }
1439
1439
  },
1440
1440
  run: async ({ connectionId, capability, path }) => {
1441
- const { listResources } = await import("./integrations-U4C7XFH4.js");
1441
+ const { listResources } = await import("./integrations-I5KCGRBE.js");
1442
1442
  const list = await listResources(connectionId, capability, asPath2(path));
1443
1443
  return {
1444
1444
  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",
@@ -1473,7 +1473,7 @@ var integrationAddDestination = defineCommand({
1473
1473
  },
1474
1474
  run: async (p, ctx) => {
1475
1475
  const key = await openFile();
1476
- const { addDestination, createDestination, createResource } = await import("./integrations-U4C7XFH4.js");
1476
+ const { addDestination, createDestination, createResource } = await import("./integrations-I5KCGRBE.js");
1477
1477
  let made;
1478
1478
  if (p.create) made = await createDestination(key, p.capability, void 0, p.connectionId);
1479
1479
  else {
@@ -1510,7 +1510,7 @@ var integrationDeploy = defineCommand({
1510
1510
  },
1511
1511
  run: async (p, ctx) => {
1512
1512
  const key = await openFile();
1513
- const { deployDestination, listDestinations } = await import("./integrations-U4C7XFH4.js");
1513
+ const { deployDestination, listDestinations } = await import("./integrations-I5KCGRBE.js");
1514
1514
  const all = await listDestinations(key);
1515
1515
  const dest = p.destinationId ? all.find((d) => d.id === p.destinationId) : all.length === 1 ? all[0] : void 0;
1516
1516
  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");
@@ -1544,7 +1544,7 @@ var integrationAttachDatabase = defineCommand({
1544
1544
  },
1545
1545
  run: async (p, ctx) => {
1546
1546
  const key = await openFile();
1547
- const { attachDatabase, createDatabase, createResource, listResources } = await import("./integrations-U4C7XFH4.js");
1547
+ const { attachDatabase, createDatabase, createResource, listResources } = await import("./integrations-I5KCGRBE.js");
1548
1548
  if (p.create) return attached(await createDatabase(key, void 0, p.connectionId), ctx);
1549
1549
  if (!p.connectionId || !p.target) throw new CommandError("Say connectionId and target, or create: true.", "invalid_params");
1550
1550
  let target = asPath2(p.target);
@@ -1583,7 +1583,7 @@ var integrationSubmissions = defineCommand({
1583
1583
  },
1584
1584
  run: async ({ form, limit }) => {
1585
1585
  const key = await openFile();
1586
- const { listSubmissions } = await import("./integrations-U4C7XFH4.js");
1586
+ const { listSubmissions } = await import("./integrations-I5KCGRBE.js");
1587
1587
  const rows = await listSubmissions(key, { form, limit: limit ?? 20 });
1588
1588
  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 } };
1589
1589
  }
@@ -1608,7 +1608,7 @@ var integrationSetSignIn = defineCommand({
1608
1608
  },
1609
1609
  run: async ({ on }, ctx) => {
1610
1610
  const key = await openFile();
1611
- const { setSignIn } = await import("./integrations-U4C7XFH4.js");
1611
+ const { setSignIn } = await import("./integrations-I5KCGRBE.js");
1612
1612
  const done = await setSignIn(key, on);
1613
1613
  ctx.notice(on ? "Visitors can sign in." : "Sign-in is off.");
1614
1614
  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 } };
@@ -1826,7 +1826,7 @@ var fontTeamList = defineCommand({
1826
1826
  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)." }
1827
1827
  },
1828
1828
  run: async (args) => {
1829
- const { refreshTeamFonts } = await import("./team-client-SI7LGPN6.js");
1829
+ const { refreshTeamFonts } = await import("./team-client-Y5JB3YGB.js");
1830
1830
  const fonts = await refreshTeamFonts(args.workspace);
1831
1831
  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 })) } };
1832
1832
  }
@@ -1853,7 +1853,7 @@ var fontTeamAdd = defineCommand({
1853
1853
  run: async (args, ctx) => {
1854
1854
  const { bytes, fileName: fileName2 } = await fontBytes(args, ctx);
1855
1855
  const { face, family, weight, style } = await resolveFace(bytes, args);
1856
- const { uploadTeamFont } = await import("./team-client-SI7LGPN6.js");
1856
+ const { uploadTeamFont } = await import("./team-client-Y5JB3YGB.js");
1857
1857
  const font = await uploadTeamFont(bytes, { family, weight, style, face: face.index, fileName: fileName2 }, args.workspace);
1858
1858
  return { summary: `Added ${family} ${weight}${style === "italic" ? " italic" : ""} to the team`, data: { font } };
1859
1859
  }
@@ -1875,7 +1875,7 @@ var fontTeamRemove = defineCommand({
1875
1875
  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." }
1876
1876
  },
1877
1877
  run: async (args) => {
1878
- const { removeTeamFont } = await import("./team-client-SI7LGPN6.js");
1878
+ const { removeTeamFont } = await import("./team-client-Y5JB3YGB.js");
1879
1879
  const out = await removeTeamFont(args.id, args.workspace);
1880
1880
  return { summary: `Removed the team font${out.freed ? " and freed its storage" : ""}`, data: out };
1881
1881
  }
@@ -1886,7 +1886,7 @@ var fontTeamCommands = [fontTeamList, fontTeamAdd];
1886
1886
  init_define_POPCRAFT_COMPONENT_IDS();
1887
1887
  async function cloudFile() {
1888
1888
  const [{ syncStatus }, { cloudUser }] = await Promise.all([
1889
- import("./sync-TNQN7WWP.js"),
1889
+ import("./sync-HIAMQQYN.js"),
1890
1890
  import("./session-RK72I6KZ.js")
1891
1891
  ]);
1892
1892
  const link2 = syncStatus().link;
@@ -1948,7 +1948,7 @@ var fileTrash = defineCommand({
1948
1948
  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." }
1949
1949
  },
1950
1950
  run: async () => {
1951
- const { deleteCurrentFile, leaveDeletedFile } = await import("./delete-current-file-7CABS2TB.js");
1951
+ const { deleteCurrentFile, leaveDeletedFile } = await import("./delete-current-file-GT6HXPD3.js");
1952
1952
  const { name: name2, kind } = await deleteCurrentFile();
1953
1953
  leaveDeletedFile();
1954
1954
  return { summary: kind === "cloud" ? `Moved \u201C${name2}\u201D to the Trash` : `Deleted \u201C${name2}\u201D` };
@@ -2061,11 +2061,11 @@ var fileDuplicate = defineCommand({
2061
2061
  },
2062
2062
  run: async (_p, ctx) => {
2063
2063
  const [{ syncStatus }, { cloudApi }, { isDesktopTabs }, { createFileInTab }, { openNewCloudFile }, { v4: uuid }] = await Promise.all([
2064
- import("./sync-TNQN7WWP.js"),
2064
+ import("./sync-HIAMQQYN.js"),
2065
2065
  import("./api-2GTLXDBI.js"),
2066
2066
  import("./tab-mode-D467SBSU.js"),
2067
- import("./tabs-GCPSIRYV.js"),
2068
- import("./sync-TNQN7WWP.js"),
2067
+ import("./tabs-PPSFWHAE.js"),
2068
+ import("./sync-HIAMQQYN.js"),
2069
2069
  import("./dist-node-MFZLYUNP.js")
2070
2070
  ]);
2071
2071
  const doc2 = ctx.doc();
@@ -4931,7 +4931,7 @@ var viewCopyLink = defineCommand({
4931
4931
  },
4932
4932
  run: async (args, ctx) => {
4933
4933
  const [{ syncStatus }, { fileUrl }, { withDeepLink }] = await Promise.all([
4934
- import("./sync-TNQN7WWP.js"),
4934
+ import("./sync-HIAMQQYN.js"),
4935
4935
  import("./api-2GTLXDBI.js"),
4936
4936
  import("./deep-link-BXP6KTOC.js")
4937
4937
  ]);
@@ -5256,7 +5256,7 @@ var pageGo = defineCommand({
5256
5256
  ] }
5257
5257
  },
5258
5258
  run: async ({ to }) => {
5259
- const { useEditorStore } = await import("./editor-store-YU2YYXBR.js");
5259
+ const { useEditorStore } = await import("./editor-store-YFW4DJ5W.js");
5260
5260
  useEditorStore.getState().goToPrintPage(to);
5261
5261
  return { summary: typeof to === "number" ? `Page ${to + 1}` : `${to} page` };
5262
5262
  }
@@ -5290,7 +5290,7 @@ var pageSetup = defineCommand({
5290
5290
  }
5291
5291
  },
5292
5292
  run: async (args) => {
5293
- const { useEditorStore } = await import("./editor-store-YU2YYXBR.js");
5293
+ const { useEditorStore } = await import("./editor-store-YFW4DJ5W.js");
5294
5294
  useEditorStore.getState().applyPageSetup(args);
5295
5295
  return { summary: `Page setup updated${args.kind ? ` (${args.kind.toLowerCase()})` : ""}` };
5296
5296
  }
@@ -5728,7 +5728,7 @@ async function docAtTime(doc2, ids, time2) {
5728
5728
  let frameId;
5729
5729
  if (time2 === void 0) {
5730
5730
  try {
5731
- const { useEditorStore } = await import("./editor-store-YU2YYXBR.js");
5731
+ const { useEditorStore } = await import("./editor-store-YFW4DJ5W.js");
5732
5732
  const st = useEditorStore.getState();
5733
5733
  const target = st.transport?.target;
5734
5734
  if (st.mode !== "ANIMATE" || target?.kind !== "frame") return doc2;
@@ -6122,7 +6122,7 @@ async function runAnimationExport(format, args, ctx) {
6122
6122
  const filename = exportFileName(args.filename || targetName(doc2, target), format);
6123
6123
  const [{ exportAnimation }, { memoryDestination }] = await Promise.all([import("./video-SBGINDTM.js"), import("./destination-6KIPM2N6.js")]);
6124
6124
  if (format === "lottie" || format === "dotlottie") return runLottieExport(renderer, doc2, spec, filename, ctx, memoryDestination, args.stateMachine);
6125
- const planWatermark = format !== "png" && await (await import("./export-watermark-2FZPX2RY.js")).exportWatermark();
6125
+ const planWatermark = format !== "png" && await (await import("./export-watermark-23GQYHS7.js")).exportWatermark();
6126
6126
  if (format !== "png") spec = { ...spec, watermark: planWatermark || args.watermark !== false };
6127
6127
  const dest = ctx.destination ? await ctx.destination(filename, FORMAT_MIME[format]) : memoryDestination(filename, FORMAT_MIME[format]);
6128
6128
  let stats;
@@ -6208,7 +6208,7 @@ var exportLottie = animationCommand((args) => args.container === "lottie" ? "dot
6208
6208
  });
6209
6209
  async function exportSite(doc2, pageId2, packaging, styling = "css", siteUrl) {
6210
6210
  const [{ completeSite, nextFilesOf, shareImageFiles, staticFilesOf, NoSiteRuntime, bytesOf }, { fileBase }, { zipFiles }, { downloadBlob }] = await Promise.all([
6211
- import("./project-CZ2PGF7S.js"),
6211
+ import("./project-F7WQIMI5.js"),
6212
6212
  import("./web-CRKH3ROV.js"),
6213
6213
  import("./zip-export-BOKYQ7BT.js"),
6214
6214
  import("./download-OCJAYTSN.js")
@@ -6302,7 +6302,7 @@ var exportStorefront = defineCommand({
6302
6302
  const [{ storefrontInputs }, { STOREFRONT_TARGETS }, { bytesOf }, { fileBase, flatten }, { zipFiles }, { downloadBlob }] = await Promise.all([
6303
6303
  import("./storefront-prepare-YW32JKQ5.js"),
6304
6304
  import("./storefront-TQZ7UUBP.js"),
6305
- import("./project-CZ2PGF7S.js"),
6305
+ import("./project-F7WQIMI5.js"),
6306
6306
  import("./web-CRKH3ROV.js"),
6307
6307
  import("./zip-export-BOKYQ7BT.js"),
6308
6308
  import("./download-OCJAYTSN.js")
@@ -6697,7 +6697,7 @@ var visionRegenerateImage = defineCommand({
6697
6697
  const id = args.id ?? ctx.selection()[0];
6698
6698
  if (!id) throw new ToolError("Select a generated image to regenerate.");
6699
6699
  nodeOrThrow(ctx.doc(), id);
6700
- const { regenerateImage } = await import("./client-actions-AROIYZ2A.js");
6700
+ const { regenerateImage } = await import("./client-actions-ZAUXFL2O.js");
6701
6701
  regenerateImage(id, args.count);
6702
6702
  return { summary: args.count > 1 ? `Regenerating ${args.count} variants` : "Regenerating the image", data: { id, count: args.count } };
6703
6703
  }
@@ -8502,6 +8502,7 @@ var sequenceAddTitle = defineCommand({
8502
8502
  length: external_exports.number().min(500).max(6e5).optional().describe("ms, default 3000.")
8503
8503
  }),
8504
8504
  expose: {
8505
+ plugin: { method: "addTitle" },
8505
8506
  ui: { label: "Add a title", keywords: ["title", "text", "lower third", "subtitle", "caption", "name"], enabled: (c) => inEdit(c) },
8506
8507
  agent: { name: "add_title", description: "Put a title on a sequence: a new transparent frame (the sequence's size) with the text in a look \u2014 a big centred title, a lower third or a subtitle line \u2014 placed as a clip on a track above V1. Restyle or animate it in its frame like any text; change its words with set_text." }
8507
8508
  },
@@ -8562,6 +8563,7 @@ var sequenceSyncAngles = defineCommand({
8562
8563
  clip: external_exports.string().optional().describe("The multicam clip (default: the picked one).")
8563
8564
  }),
8564
8565
  expose: {
8566
+ plugin: { method: "syncAngles" },
8565
8567
  ui: { label: "Sync angles by sound", keywords: ["multicam", "sync", "align", "audio", "clap", "angles"], enabled: (c) => withPicked(c) },
8566
8568
  agent: { name: "sync_angles", description: "Line up a multicam clip's camera angles by their sound: each angle's audio is matched against the first one's (a clap, speech or music works) and moved so the same moment plays together. Runs in the editor (it decodes the sound)." }
8567
8569
  },
@@ -8639,6 +8641,7 @@ var sequenceNest = defineCommand({
8639
8641
  multicam: external_exports.boolean().optional().describe("A multicam clip: each track of the picked clips is a camera angle (in sync as placed), and the clip shows one at a time \u2014 the first to start with; cut between them with edit_sequence `angle`.")
8640
8642
  }),
8641
8643
  expose: {
8644
+ plugin: { method: "nestClips" },
8642
8645
  ui: { label: "Nest clips", keywords: ["nest", "precompose", "group", "sequence", "compound clip"], enabled: (c) => withPicked(c) },
8643
8646
  agent: { name: "nest_clips", description: "Nest clips on V2 and up into a new sequence (a precomp / compound clip), replaced by one clip of it on the lowest of their tracks. Its picture and sound play as before; open the new sequence to edit inside it." }
8644
8647
  },
@@ -8717,6 +8720,7 @@ var sequenceNormalize = defineCommand({
8717
8720
  to: external_exports.number().min(-24).max(0).optional().describe("Peak level, dBFS (default \u22121).")
8718
8721
  }),
8719
8722
  expose: {
8723
+ plugin: { method: "normalizeAudio" },
8720
8724
  ui: { label: "Normalize audio", keywords: ["normalize", "loudness", "level", "peak", "volume", "gain"], enabled: (c) => inEdit(c) },
8721
8725
  agent: { name: "normalize_audio", description: "Bring audio clips to one peak level (default \u22121 dBFS): each clip's level is scaled so its loudest sample reaches it. Runs in the editor (it reads the sound files)." }
8722
8726
  },
@@ -11396,7 +11400,7 @@ var scriptRun = defineCommand({
11396
11400
  // A script is not the turn the user is watching: confirm-tier tools are refused inside it (dispatch, `nested`).
11397
11401
  actor: { ...ctx.actor, nested: true, label: "Script" },
11398
11402
  // A look_at inside the script sees the document as the script has left it so far, not as it was before.
11399
- use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-NHOFRCPE.js")).renderDocument(staged, ids, options)) : ctx.use(name2))
11403
+ use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-S2XBIQEK.js")).renderDocument(staged, ids, options)) : ctx.use(name2))
11400
11404
  };
11401
11405
  let calls = 0;
11402
11406
  const images = [];
@@ -12216,7 +12220,7 @@ var docImportFile = defineCommand({
12216
12220
  const file = new File([body], args.name);
12217
12221
  if (file.size > MAX_BYTES) throw new ToolError(`"${args.name}" is larger than ${MAX_BYTES / 1024 / 1024} MB.`);
12218
12222
  const [{ buildImportedDocument }, { mergeImportedDocument }] = await Promise.all([
12219
- import("./plugin-import-JFW7KKWA.js"),
12223
+ import("./plugin-import-S2EP2X6N.js"),
12220
12224
  import("./import-merge-2QHSIOJY.js")
12221
12225
  ]);
12222
12226
  const built = await buildImportedDocument(file);
@@ -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-ZF3DASEZ.js";
9
+ } from "./chunk-PSAU4QN4.js";
10
10
  import {
11
11
  aiAvailability,
12
12
  effectiveChatModel,