@popcraft/kit 0.38.5 → 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-52ZY2JFO.js → agent-YFVWUBA3.js} +1 -1
  2. package/dist/chunks/{api-QCQ5M4FF.js → api-XQBSIVXX.js} +2 -2
  3. package/dist/chunks/{builtin-FD2BTIC6.js → builtin-ESYHNTNM.js} +3 -3
  4. package/dist/chunks/{buy-credits-IHQRC7SF.js → buy-credits-I5QIQI5P.js} +4 -4
  5. package/dist/chunks/{check-template-QI2UVNI4.js → check-template-6Z4IY5HG.js} +2 -2
  6. package/dist/chunks/{chunk-UWTD357R.js → chunk-37PE7WHJ.js} +11 -11
  7. package/dist/chunks/{chunk-KZXKH3HG.js → chunk-4L54AS2T.js} +7 -7
  8. package/dist/chunks/{chunk-NLRIE3LP.js → chunk-5Q3NF7R6.js} +1 -1
  9. package/dist/chunks/{chunk-XPV6YQ6K.js → chunk-5UX2YF4U.js} +3 -3
  10. package/dist/chunks/{chunk-D7JUNOBH.js → chunk-763I3EKV.js} +10 -7
  11. package/dist/chunks/{chunk-4BR2ZFTJ.js → chunk-D7ADFAVG.js} +7 -4
  12. package/dist/chunks/{chunk-U3KF424A.js → chunk-EHB3DCYX.js} +4 -4
  13. package/dist/chunks/{chunk-TZY27V4B.js → chunk-FCU4OKLZ.js} +6 -6
  14. package/dist/chunks/{chunk-L5UUTG2B.js → chunk-FG4RNLRT.js} +1 -1
  15. package/dist/chunks/{chunk-HUPLGBSZ.js → chunk-FP2JL6RD.js} +11 -11
  16. package/dist/chunks/{chunk-W6M6P2EQ.js → chunk-GPARXTW6.js} +1 -1
  17. package/dist/chunks/{chunk-QOARTKAZ.js → chunk-GSNK5JKW.js} +3 -3
  18. package/dist/chunks/{chunk-XVU6JZHX.js → chunk-HF3RMGFU.js} +4 -4
  19. package/dist/chunks/{chunk-JAA35ESV.js → chunk-HLM7IN6N.js} +9 -9
  20. package/dist/chunks/{chunk-PGK2XJBS.js → chunk-J6G5WD46.js} +5 -5
  21. package/dist/chunks/{chunk-4ZETVHSS.js → chunk-JKIZZQGS.js} +1 -1
  22. package/dist/chunks/{chunk-XYTW4AJV.js → chunk-LSM6EWWU.js} +2 -2
  23. package/dist/chunks/{chunk-IQLPAQXV.js → chunk-LX6QWKYZ.js} +4 -4
  24. package/dist/chunks/{chunk-2P2CAUXE.js → chunk-NNIP6RJU.js} +5 -5
  25. package/dist/chunks/{chunk-TUGNBBKK.js → chunk-NTDQN5KV.js} +1 -1
  26. package/dist/chunks/{chunk-T4ALOAS6.js → chunk-NW6TBOTF.js} +2 -2
  27. package/dist/chunks/{chunk-XAMLC3F2.js → chunk-OAL6OESQ.js} +1 -1
  28. package/dist/chunks/{chunk-2BP3AABU.js → chunk-R5ZSYMEM.js} +65 -65
  29. package/dist/chunks/{chunk-VRWOM5BR.js → chunk-TITVVCK6.js} +1 -1
  30. package/dist/chunks/{chunk-S5QB7DAW.js → chunk-X2GJCXKP.js} +1 -1
  31. package/dist/chunks/{chunk-72MXIQSQ.js → chunk-X4Q6WV6X.js} +2 -2
  32. package/dist/chunks/{chunk-5BO7NK4J.js → chunk-XM7BLGNR.js} +4 -4
  33. package/dist/chunks/{client-YGDSYHCF.js → client-2J7APEUI.js} +1 -1
  34. package/dist/chunks/{client-DLT52G7S.js → client-4WKGWVCY.js} +5 -5
  35. package/dist/chunks/{client-FTBNEXXH.js → client-T2QWHRGB.js} +4 -4
  36. package/dist/chunks/{client-actions-2HPN6N2L.js → client-actions-556WYGRI.js} +11 -11
  37. package/dist/chunks/{dangerous-YGJ5NLS7.js → dangerous-53T5T7SG.js} +3 -3
  38. package/dist/chunks/{delete-current-file-TKFQ7JHF.js → delete-current-file-HK36SJPJ.js} +7 -7
  39. package/dist/chunks/{download-R6UYXOGY.js → download-XCX3HS5A.js} +2 -2
  40. package/dist/chunks/{editor-seams-PE55IBYK.js → editor-seams-RPM4X22U.js} +16 -16
  41. package/dist/chunks/{editor-store-2TOBJOKY.js → editor-store-6OAHCKST.js} +1 -1
  42. package/dist/chunks/{export-IBGXQ6PJ.js → export-A6TPYL5H.js} +3 -3
  43. package/dist/chunks/{export-watermark-SYZBR7JM.js → export-watermark-7KRY6OAF.js} +7 -7
  44. package/dist/chunks/{eyedropper-KOEQWLK7.js → eyedropper-UL5MXHDW.js} +1 -1
  45. package/dist/chunks/{generate-media-FCT2DXD6.js → generate-media-AQF4XPGW.js} +7 -7
  46. package/dist/chunks/{host-ZITBQV7U.js → host-EHSC24BC.js} +12 -12
  47. package/dist/chunks/{integrations-JWX7CAAF.js → integrations-2T7F26WK.js} +3 -3
  48. package/dist/chunks/{libraries-BLVUNTNY.js → libraries-FB7XU2H5.js} +7 -7
  49. package/dist/chunks/{live-2K3AW6ZP.js → live-47GEAGBD.js} +1 -1
  50. package/dist/chunks/{media-tool-WAQY777V.js → media-tool-4VJZNTGR.js} +1 -1
  51. package/dist/chunks/{new-file-LEZXUHJN.js → new-file-IIFPHFNN.js} +5 -5
  52. package/dist/chunks/{plugin-C7WFCF4R.js → plugin-VFQ5EQ73.js} +2 -2
  53. package/dist/chunks/{plugin-import-L7PBNAHY.js → plugin-import-DGTF6ELY.js} +21 -21
  54. package/dist/chunks/{presence-XT2DENNS.js → presence-WIEMP6TA.js} +2 -2
  55. package/dist/chunks/{project-ZHSWMADU.js → project-OU5OIYYJ.js} +3 -3
  56. package/dist/chunks/{publish-site-TUTXQF62.js → publish-site-IHPLUSWZ.js} +9 -9
  57. package/dist/chunks/{publish-store-MKP3IPZY.js → publish-store-RBSHW7RJ.js} +5 -5
  58. package/dist/chunks/{raster-actions-K4APTKT4.js → raster-actions-KA67MHPJ.js} +1 -1
  59. package/dist/chunks/{reference-images-6GATJILY.js → reference-images-PUCEQJ7O.js} +4 -4
  60. package/dist/chunks/{resolvers-IK5EKQYF.js → resolvers-XXZQU3PR.js} +4 -4
  61. package/dist/chunks/{runner-WB35ZXXM.js → runner-ETIFPLQV.js} +23 -23
  62. package/dist/chunks/{sites-WUC7WJWS.js → sites-IMJOEBMX.js} +3 -3
  63. package/dist/chunks/{store-Y7I5ZQGP.js → store-2X7RY2HW.js} +12 -12
  64. package/dist/chunks/{storefront-prepare-LMASPES3.js → storefront-prepare-DA4HVN4K.js} +1 -1
  65. package/dist/chunks/{svg-export-PXDSGAYW.js → svg-export-HFCUX5PC.js} +4 -4
  66. package/dist/chunks/{sync-Y56X2W36.js → sync-M2L4AUS7.js} +7 -7
  67. package/dist/chunks/{tabs-EIMZ5TUF.js → tabs-LQWI7D4A.js} +10 -10
  68. package/dist/chunks/{team-2DZHY2RS.js → team-QZLMMRH2.js} +3 -3
  69. package/dist/chunks/{team-client-JJYUX7EQ.js → team-client-JEEWNM33.js} +3 -3
  70. package/dist/chunks/{templates-E3JYI2TM.js → templates-2OAM6TQS.js} +2 -2
  71. package/dist/chunks/{theme-store-4XFQMNWW.js → theme-store-PSBDULV2.js} +2 -2
  72. package/dist/chunks/{tools-A3FEKCDI.js → tools-P7WEOJQZ.js} +2 -2
  73. package/dist/chunks/{ui-commands-LOLMFYN6.js → ui-commands-LAWFIH4X.js} +18 -18
  74. package/dist/chunks/{versions-Q2QLWKPM.js → versions-GSPLYCOH.js} +7 -7
  75. package/dist/index.js +1 -1
  76. package/package.json +1 -1
@@ -18,7 +18,7 @@ import {
18
18
  renderDocument,
19
19
  toolView,
20
20
  underReviewKit
21
- } from "./chunk-5BO7NK4J.js";
21
+ } from "./chunk-XM7BLGNR.js";
22
22
  import "./chunk-EFIEP7F5.js";
23
23
  import "./chunk-I7RDXUMA.js";
24
24
  import "./chunk-OKK2NFIR.js";
@@ -10,8 +10,8 @@ import {
10
10
  cloudApi,
11
11
  fileUrl,
12
12
  invalidateMe
13
- } from "./chunk-W6M6P2EQ.js";
14
- import "./chunk-D7JUNOBH.js";
13
+ } from "./chunk-GPARXTW6.js";
14
+ import "./chunk-763I3EKV.js";
15
15
  import "./chunk-PY6X3RM3.js";
16
16
  import "./chunk-HW3LIXSM.js";
17
17
  import "./chunk-5GGVZQ7W.js";
@@ -7,8 +7,8 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  builtinTools,
9
9
  registerBuiltinTools
10
- } from "./chunk-XYTW4AJV.js";
11
- import "./chunk-2BP3AABU.js";
10
+ } from "./chunk-LSM6EWWU.js";
11
+ import "./chunk-R5ZSYMEM.js";
12
12
  import "./chunk-Q3KUD3YR.js";
13
13
  import "./chunk-WPCGJEGU.js";
14
14
  import "./chunk-MUHIDICD.js";
@@ -19,7 +19,7 @@ import "./chunk-NQQKGT6G.js";
19
19
  import "./chunk-E7ZFGAVC.js";
20
20
  import "./chunk-D36L44IN.js";
21
21
  import "./chunk-JQUBW634.js";
22
- import "./chunk-5BO7NK4J.js";
22
+ import "./chunk-XM7BLGNR.js";
23
23
  import "./chunk-EFIEP7F5.js";
24
24
  import "./chunk-ZT6ZWSMV.js";
25
25
  import "./chunk-IYED4BWA.js";
@@ -7,18 +7,18 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  HYPERY_TEAM_HEADER,
9
9
  hyperyRequestHeaders
10
- } from "./chunk-T4ALOAS6.js";
10
+ } from "./chunk-NW6TBOTF.js";
11
11
  import {
12
12
  useHyperyTeam
13
- } from "./chunk-QOARTKAZ.js";
13
+ } from "./chunk-GSNK5JKW.js";
14
14
  import {
15
15
  ApiError,
16
16
  inAppPurchases,
17
17
  purchasesAllowed
18
- } from "./chunk-W6M6P2EQ.js";
18
+ } from "./chunk-GPARXTW6.js";
19
19
  import {
20
20
  isDesktop
21
- } from "./chunk-D7JUNOBH.js";
21
+ } from "./chunk-763I3EKV.js";
22
22
  import "./chunk-PY6X3RM3.js";
23
23
  import {
24
24
  openPlanDialog
@@ -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-HUPLGBSZ.js";
9
+ } from "./chunk-FP2JL6RD.js";
10
10
  import {
11
11
  builtinCommands
12
- } from "./chunk-2BP3AABU.js";
12
+ } from "./chunk-R5ZSYMEM.js";
13
13
  import "./chunk-Q3KUD3YR.js";
14
14
  import "./chunk-WPCGJEGU.js";
15
15
  import "./chunk-MUHIDICD.js";
@@ -6,14 +6,14 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  pluginRun
9
- } from "./chunk-IQLPAQXV.js";
9
+ } from "./chunk-LX6QWKYZ.js";
10
10
  import {
11
11
  fileCommands,
12
12
  fontTeamRemove,
13
13
  integrationConfirmCommands,
14
14
  mediaDelete,
15
15
  publishCommands
16
- } from "./chunk-2BP3AABU.js";
16
+ } from "./chunk-R5ZSYMEM.js";
17
17
  import {
18
18
  external_exports
19
19
  } from "./chunk-JQUBW634.js";
@@ -55,7 +55,7 @@ var collabSetSpotlight = defineCommand({
55
55
  }
56
56
  },
57
57
  run: async ({ on }, ctx) => {
58
- const { setSpotlight } = await import("./presence-XT2DENNS.js");
58
+ const { setSpotlight } = await import("./presence-WIEMP6TA.js");
59
59
  setSpotlight(on);
60
60
  ctx.notice(on ? "Spotlight on \u2014 everyone is following this view." : "Spotlight off.");
61
61
  return { summary: on ? "Spotlight on" : "Spotlight off", data: { spotlight: on } };
@@ -82,7 +82,7 @@ var collabRevealPrivate = defineCommand({
82
82
  }
83
83
  },
84
84
  run: async (_p, ctx) => {
85
- const { useEditorStore } = await import("./editor-store-2TOBJOKY.js");
85
+ const { useEditorStore } = await import("./editor-store-6OAHCKST.js");
86
86
  const before = Object.values(useEditorStore.getState().document.nodes).filter((n) => n.privateTo).length;
87
87
  useEditorStore.getState().revealPrivate();
88
88
  ctx.notice(before ? `Revealed ${before} private item${before === 1 ? "" : "s"}.` : "Nothing was private.");
@@ -146,7 +146,7 @@ var documentDelete = defineCommand({
146
146
  }
147
147
  },
148
148
  run: async ({ id }, ctx) => {
149
- const { useEditorStore } = await import("./editor-store-2TOBJOKY.js");
149
+ const { useEditorStore } = await import("./editor-store-6OAHCKST.js");
150
150
  const wasOpen = useEditorStore.getState().document.id === id;
151
151
  await useEditorStore.getState().deleteDocument(id);
152
152
  ctx.notice("Deleted the document.");
@@ -190,7 +190,7 @@ var libraryPublish = defineCommand({
190
190
  }
191
191
  },
192
192
  run: async (p, ctx) => {
193
- const { publishLibrary } = await import("./libraries-BLVUNTNY.js");
193
+ const { publishLibrary } = await import("./libraries-FB7XU2H5.js");
194
194
  const doc = ctx.doc();
195
195
  const pick = {
196
196
  componentIds: p.componentIds ?? Object.keys(doc.components ?? {}),
@@ -222,7 +222,7 @@ var libraryUnpublish = defineCommand({
222
222
  },
223
223
  run: async ({ libraryId }, ctx) => {
224
224
  if (!libraryId.trim()) throw new CommandError("Which library? Pass its `libraryId`.", "invalid_params");
225
- const { unpublishLibrary } = await import("./libraries-BLVUNTNY.js");
225
+ const { unpublishLibrary } = await import("./libraries-FB7XU2H5.js");
226
226
  await unpublishLibrary(libraryId);
227
227
  ctx.notice(`Unpublished library ${libraryId}.`);
228
228
  return { summary: `Unpublished library ${libraryId}`, data: { libraryId, unpublished: true } };
@@ -234,8 +234,8 @@ var libraryCommands = [libraryPublish, libraryUnpublish];
234
234
  init_define_POPCRAFT_COMPONENT_IDS();
235
235
  async function findVersion(id) {
236
236
  const [{ useEditorStore }, { versionLabel }] = await Promise.all([
237
- import("./editor-store-2TOBJOKY.js"),
238
- import("./versions-Q2QLWKPM.js")
237
+ import("./editor-store-6OAHCKST.js"),
238
+ import("./versions-GSPLYCOH.js")
239
239
  ]);
240
240
  const meta = useEditorStore.getState().versions.find((v) => v.id === id);
241
241
  if (!meta) {
@@ -268,7 +268,7 @@ var versionRestore = defineCommand({
268
268
  },
269
269
  run: async ({ id }) => {
270
270
  const found = await findVersion(id);
271
- const { restoreVersion } = await import("./versions-Q2QLWKPM.js");
271
+ const { restoreVersion } = await import("./versions-GSPLYCOH.js");
272
272
  await restoreVersion(found.meta);
273
273
  return { summary: `Restored \u201C${found.label}\u201D`, data: { id, label: found.label, restored: true } };
274
274
  }
@@ -293,7 +293,7 @@ var versionDelete = defineCommand({
293
293
  },
294
294
  run: async ({ id }, ctx) => {
295
295
  const found = await findVersion(id);
296
- const { deleteVersion } = await import("./versions-Q2QLWKPM.js");
296
+ const { deleteVersion } = await import("./versions-GSPLYCOH.js");
297
297
  await deleteVersion(found.meta);
298
298
  ctx.notice(`Deleted the version \u201C${found.label}\u201D.`);
299
299
  return { summary: `Deleted the version \u201C${found.label}\u201D`, data: { id, label: found.label, deleted: true } };
@@ -20,26 +20,26 @@ import {
20
20
  } from "./chunk-RXRCU3ZP.js";
21
21
  import {
22
22
  notice
23
- } from "./chunk-XVU6JZHX.js";
23
+ } from "./chunk-HF3RMGFU.js";
24
24
  import {
25
25
  agentContext
26
- } from "./chunk-5BO7NK4J.js";
26
+ } from "./chunk-XM7BLGNR.js";
27
27
  import {
28
28
  collabSession,
29
29
  syncStatus
30
- } from "./chunk-PGK2XJBS.js";
30
+ } from "./chunk-J6G5WD46.js";
31
31
  import {
32
32
  loadEntitlements
33
- } from "./chunk-2P2CAUXE.js";
33
+ } from "./chunk-NNIP6RJU.js";
34
34
  import {
35
35
  cloudApi
36
- } from "./chunk-W6M6P2EQ.js";
36
+ } from "./chunk-GPARXTW6.js";
37
37
  import {
38
38
  isDesktop
39
- } from "./chunk-D7JUNOBH.js";
39
+ } from "./chunk-763I3EKV.js";
40
40
  import {
41
41
  useEditorStore
42
- } from "./chunk-TZY27V4B.js";
42
+ } from "./chunk-FCU4OKLZ.js";
43
43
  import {
44
44
  plansEnabled
45
45
  } from "./chunk-PY6X3RM3.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-HODDIZFE.js";
10
10
  import {
11
11
  api
12
- } from "./chunk-W6M6P2EQ.js";
12
+ } from "./chunk-GPARXTW6.js";
13
13
  import {
14
14
  init_define_POPCRAFT_COMPONENT_IDS
15
15
  } from "./chunk-DCZ5RFDN.js";
@@ -6,7 +6,7 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  downloadBlob
9
- } from "./chunk-4BR2ZFTJ.js";
9
+ } from "./chunk-D7ADFAVG.js";
10
10
  import {
11
11
  documentForExport
12
12
  } from "./chunk-WMXG7MLG.js";
@@ -127,7 +127,7 @@ async function copyNodeAsPNG(renderer, node, doc, styles, scale = 2) {
127
127
  }
128
128
  async function copyNodeAsSVG(renderer, node, doc, styles) {
129
129
  try {
130
- const { exportNodeToSVG } = await import("./svg-export-PXDSGAYW.js");
130
+ const { exportNodeToSVG } = await import("./svg-export-HFCUX5PC.js");
131
131
  const svg = await exportNodeToSVG(renderer, node, doc, styles);
132
132
  if (!svg) return false;
133
133
  await navigator.clipboard.writeText(svg);
@@ -149,7 +149,7 @@ async function exportSettingFile(renderer, node, setting, doc, styles) {
149
149
  return blob ? { name, blob } : null;
150
150
  }
151
151
  if (setting.format === "SVG") {
152
- const { exportNodeToSVG } = await import("./svg-export-PXDSGAYW.js");
152
+ const { exportNodeToSVG } = await import("./svg-export-HFCUX5PC.js");
153
153
  const svg = await exportNodeToSVG(renderer, node, doc, styles);
154
154
  return svg ? { name, blob: new Blob([svg], { type: "image/svg+xml" }) } : null;
155
155
  }
@@ -28,13 +28,16 @@ function storePlatform() {
28
28
  async function shareFileNatively(blob, name, print = false) {
29
29
  const t = tauri();
30
30
  if (!t || storePlatform() !== "ios") return false;
31
- try {
32
- await t.core.invoke("share_file", new Uint8Array(await blob.arrayBuffer()), { headers: { "x-name": encodeURIComponent(name), "x-print": print ? "1" : "0" } });
33
- return true;
34
- } catch (e) {
35
- console.warn("[share_file]", e);
36
- return false;
37
- }
31
+ await t.core.invoke("share_file", { name, print, data: await blobToBase64(blob) });
32
+ return true;
33
+ }
34
+ function blobToBase64(blob) {
35
+ return new Promise((resolve, reject) => {
36
+ const reader = new FileReader();
37
+ reader.onload = () => resolve(String(reader.result).slice(String(reader.result).indexOf(",") + 1));
38
+ reader.onerror = () => reject(reader.error ?? new Error("Could not read the file"));
39
+ reader.readAsDataURL(blob);
40
+ });
38
41
  }
39
42
  function invoke(cmd, args) {
40
43
  const t = tauri();
@@ -6,7 +6,7 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  shareFileNatively
9
- } from "./chunk-D7JUNOBH.js";
9
+ } from "./chunk-763I3EKV.js";
10
10
  import {
11
11
  init_define_POPCRAFT_COMPONENT_IDS
12
12
  } from "./chunk-DCZ5RFDN.js";
@@ -14,9 +14,12 @@ import {
14
14
  // lib/io/download.ts
15
15
  init_define_POPCRAFT_COMPONENT_IDS();
16
16
  function downloadBlob(blob, filename) {
17
- void shareFileNatively(blob, filename).then((shared) => {
18
- if (!shared) browserDownload(blob, filename);
19
- });
17
+ shareFileNatively(blob, filename).then(
18
+ (shared) => {
19
+ if (!shared) browserDownload(blob, filename);
20
+ },
21
+ (e) => console.error("[share_file]", e)
22
+ );
20
23
  }
21
24
  function browserDownload(blob, filename) {
22
25
  const url = URL.createObjectURL(blob);
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-OO74OZOI.js";
14
14
  import {
15
15
  notice
16
- } from "./chunk-XVU6JZHX.js";
16
+ } from "./chunk-HF3RMGFU.js";
17
17
  import {
18
18
  effectiveChatModel,
19
19
  setModelPref,
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-R52BM44P.js";
22
22
  import {
23
23
  useEditorStore
24
- } from "./chunk-TZY27V4B.js";
24
+ } from "./chunk-FCU4OKLZ.js";
25
25
  import {
26
26
  create
27
27
  } from "./chunk-5GGVZQ7W.js";
@@ -1477,7 +1477,7 @@ async function sendMessage(text) {
1477
1477
  if (!useAgentStore.getState().activeThreadId) newThread();
1478
1478
  const mentions = pruneMentions(body, useAgentStore.getState().draftMentions);
1479
1479
  useAgentStore.setState({ draft: "", draftMentions: [], error: null });
1480
- const { runTurn } = await import("./runner-WB35ZXXM.js");
1480
+ const { runTurn } = await import("./runner-ETIFPLQV.js");
1481
1481
  await runTurn(body, mentions);
1482
1482
  }
1483
1483
  function stop() {
@@ -1580,7 +1580,7 @@ var clearTaskChildren = () => useAgentStore.setState({ taskChildren: {} });
1580
1580
  function subscribeChildTools() {
1581
1581
  let dispose;
1582
1582
  let cancelled = false;
1583
- void import("./runner-WB35ZXXM.js").then(({ onChildTool }) => {
1583
+ void import("./runner-ETIFPLQV.js").then(({ onChildTool }) => {
1584
1584
  const off = onChildTool((report) => {
1585
1585
  if (report?.status !== "running" || report.jobId) return;
1586
1586
  recordChildTool(report.toolCallId ?? "", report.name);
@@ -4576,7 +4576,7 @@ function createPopcornSlice(set2, get2) {
4576
4576
  privateMode: false,
4577
4577
  setPrivateMode: (on) => {
4578
4578
  set2({ privateMode: on });
4579
- void import("./presence-XT2DENNS.js").then((m) => m.setPresencePrivate(on)).catch(() => {
4579
+ void import("./presence-WIEMP6TA.js").then((m) => m.setPresencePrivate(on)).catch(() => {
4580
4580
  });
4581
4581
  },
4582
4582
  /** Reveal every private item THIS user created (they sync to collaborators). Others' stay theirs. */
@@ -6629,7 +6629,7 @@ var useEditorStore = create()(
6629
6629
  // A copy is a new file, so it is cloud-backed like any other (see lib/client/cloud/new-file.ts).
6630
6630
  // Returns '' when it was refused (offline, signed out, plan full) or failed; nothing is left behind.
6631
6631
  duplicateDocument: async (id) => {
6632
- const { duplicateDocumentToCloud } = await import("./sync-Y56X2W36.js");
6632
+ const { duplicateDocumentToCloud } = await import("./sync-M2L4AUS7.js");
6633
6633
  return duplicateDocumentToCloud(id);
6634
6634
  },
6635
6635
  deleteDocument: async (id) => {
@@ -10081,9 +10081,9 @@ if (typeof window !== "undefined") {
10081
10081
  if (typeof window !== "undefined" && navigator.webdriver) {
10082
10082
  window.__vpDesign = async (script, o = {}) => {
10083
10083
  const [{ registerBuiltinTools, runTool }, { editorToolContext }, { createDesignPreview }] = await Promise.all([
10084
- import("./tools-A3FEKCDI.js").then(async (m) => ({ ...m, registerBuiltinTools: (await import("./builtin-FD2BTIC6.js")).registerBuiltinTools })),
10085
- import("./editor-seams-PE55IBYK.js"),
10086
- import("./live-2K3AW6ZP.js")
10084
+ import("./tools-P7WEOJQZ.js").then(async (m) => ({ ...m, registerBuiltinTools: (await import("./builtin-ESYHNTNM.js")).registerBuiltinTools })),
10085
+ import("./editor-seams-RPM4X22U.js"),
10086
+ import("./live-47GEAGBD.js")
10087
10087
  ]);
10088
10088
  registerBuiltinTools();
10089
10089
  const args = JSON.stringify({ ...o.name ? { name: o.name } : {}, ...o.size ? { size: o.size } : {}, ...o.frame ? { frame: o.frame } : {}, script });
@@ -10099,7 +10099,7 @@ if (typeof window !== "undefined" && navigator.webdriver) {
10099
10099
  return runTool("write_design", args, { ...editorToolContext(), toolCallId: "dev" });
10100
10100
  };
10101
10101
  window.__vpLoadTemplate = async (id, sizeId) => {
10102
- const [{ searchTemplates, fetchCloudTemplate }, { documentFromTemplate }, { prepareTemplate }] = await Promise.all([import("./templates-E3JYI2TM.js"), import("../lib/templates/apply.js"), import("./use-G5IJFC7C.js")]);
10102
+ const [{ searchTemplates, fetchCloudTemplate }, { documentFromTemplate }, { prepareTemplate }] = await Promise.all([import("./templates-2OAM6TQS.js"), import("../lib/templates/apply.js"), import("./use-G5IJFC7C.js")]);
10103
10103
  if (!id) return (await searchTemplates({ scope: "official", limit: 200 })).templates.map((t3) => t3.id);
10104
10104
  const t2 = typeof id === "string" ? await fetchCloudTemplate(id) : id;
10105
10105
  if (!t2) throw new Error(`No template ${id}`);
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  isDesktop,
15
15
  storePlatform
16
- } from "./chunk-D7JUNOBH.js";
16
+ } from "./chunk-763I3EKV.js";
17
17
  import {
18
18
  TOKENS,
19
19
  collectCss,
@@ -8,7 +8,7 @@ import {
8
8
  needsSelection,
9
9
  pageGo,
10
10
  selectionIsPicture
11
- } from "./chunk-2BP3AABU.js";
11
+ } from "./chunk-R5ZSYMEM.js";
12
12
  import {
13
13
  external_exports
14
14
  } from "./chunk-JQUBW634.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-2TOBJOKY.js").then((m) => m.useEditorStore.getState());
34
+ var store = () => import("./editor-store-6OAHCKST.js").then((m) => m.useEditorStore.getState());
35
35
  var MODE_IDS = MODE_LIST.map((m) => m.id);
36
36
  var MODE_ALIASES = { JAM: "POPCORN" };
37
37
  var modeSet = defineCommand({
@@ -161,13 +161,13 @@ var dialogOpen = defineCommand({
161
161
  (await import("./plugin-store-YKZ3HECD.js")).usePluginStore.getState().setManagerOpen(true);
162
162
  break;
163
163
  case "theme-editor":
164
- (await import("./theme-store-4XFQMNWW.js")).useThemeStore.getState().setEditorOpen(true);
164
+ (await import("./theme-store-PSBDULV2.js")).useThemeStore.getState().setEditorOpen(true);
165
165
  break;
166
166
  case "plan":
167
167
  (await import("./plan-limit-KEODDTA5.js")).openPlanDialog();
168
168
  break;
169
169
  case "credits":
170
- await (await import("./buy-credits-IHQRC7SF.js")).buyAiCredits();
170
+ await (await import("./buy-credits-I5QIQI5P.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-CEJDYF5V.js")).openAiDialog(dialog);
216
- else (await import("./store-Y7I5ZQGP.js")).openAgentPanel({ skillId: skillId ?? null });
216
+ else (await import("./store-2X7RY2HW.js")).openAgentPanel({ skillId: skillId ?? null });
217
217
  return { summary: dialog ? `Opened AI ${dialog}` : "Opened the agent" };
218
218
  }
219
219
  });
@@ -292,11 +292,11 @@ var toolPlace = defineCommand({
292
292
  run: async ({ what }) => {
293
293
  if (what === "media") {
294
294
  const s = await store();
295
- const { placeMediaFromPicker } = await import("./media-tool-WAQY777V.js");
295
+ const { placeMediaFromPicker } = await import("./media-tool-4VJZNTGR.js");
296
296
  await placeMediaFromPicker({ kind: "point", x: s.camera.x, y: s.camera.y });
297
297
  return { summary: "Placing media" };
298
298
  }
299
- const { beginEyedrop } = await import("./eyedropper-KOEQWLK7.js");
299
+ const { beginEyedrop } = await import("./eyedropper-UL5MXHDW.js");
300
300
  void beginEyedrop();
301
301
  return { summary: "Pick a color" };
302
302
  }
@@ -314,7 +314,7 @@ var nodeRasterize = defineCommand({
314
314
  keywords: ["rasterize", "raster", "flatten", "pixels", "paint layer", "erase", "bitmap"]
315
315
  } },
316
316
  run: async () => {
317
- const { flattenSelectionToPaintLayer } = await import("./raster-actions-K4APTKT4.js");
317
+ const { flattenSelectionToPaintLayer } = await import("./raster-actions-KA67MHPJ.js");
318
318
  await flattenSelectionToPaintLayer();
319
319
  return { summary: "Rasterized" };
320
320
  }
@@ -406,7 +406,7 @@ function themeCommand(themes) {
406
406
  params: external_exports.object({ id: external_exports.string() }),
407
407
  expose: { ui: { label: "Theme", keywords: ["theme", "dark", "light", "comic", "appearance", "colors"], variants: themes.map((t) => ({ id: t.id, label: `Theme: ${t.name}`, params: { id: t.id } })) } },
408
408
  run: async ({ id }) => {
409
- (await import("./theme-store-4XFQMNWW.js")).useThemeStore.getState().setActiveTheme(id);
409
+ (await import("./theme-store-PSBDULV2.js")).useThemeStore.getState().setActiveTheme(id);
410
410
  return { summary: `Theme: ${themes.find((t) => t.id === id)?.name ?? id}` };
411
411
  }
412
412
  });
@@ -425,7 +425,7 @@ function pluginCommand(plugins) {
425
425
  params: external_exports.object({ pluginId: external_exports.string(), commandId: external_exports.string() }),
426
426
  expose: { ui: { label: "Run plugin", keywords: ["plugin", "extension", "run"], variants, palette: variants.length ? void 0 : false } },
427
427
  run: async ({ pluginId, commandId }) => {
428
- await (await import("./host-ZITBQV7U.js")).runPlugin(pluginId, commandId);
428
+ await (await import("./host-EHSC24BC.js")).runPlugin(pluginId, commandId);
429
429
  return { summary: "Plugin started" };
430
430
  }
431
431
  });
@@ -457,7 +457,7 @@ function registerAppCommands() {
457
457
  registerCommand(...appCommands);
458
458
  if (started || typeof window === "undefined") return;
459
459
  started = true;
460
- void import("./theme-store-4XFQMNWW.js").then(({ useThemeStore, pickableThemes }) => {
460
+ void import("./theme-store-PSBDULV2.js").then(({ useThemeStore, pickableThemes }) => {
461
461
  const sync = () => registerCommand(themeCommand(pickableThemes(useThemeStore.getState())));
462
462
  sync();
463
463
  useThemeStore.subscribe(sync);
@@ -6,7 +6,7 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  storePlatform
9
- } from "./chunk-D7JUNOBH.js";
9
+ } from "./chunk-763I3EKV.js";
10
10
  import {
11
11
  accessToken
12
12
  } from "./chunk-PY6X3RM3.js";
@@ -7,7 +7,7 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  cloudApi,
9
9
  invalidateMe
10
- } from "./chunk-W6M6P2EQ.js";
10
+ } from "./chunk-GPARXTW6.js";
11
11
  import {
12
12
  cloudUser,
13
13
  onCloudSessionChange
@@ -120,7 +120,7 @@ async function followFileTeam(key) {
120
120
  const { teams, personalWorkspaceId } = useHyperyTeam.getState();
121
121
  if (!teams) return;
122
122
  try {
123
- const { cloudApi: cloudApi2 } = await import("./api-QCQ5M4FF.js");
123
+ const { cloudApi: cloudApi2 } = await import("./api-XQBSIVXX.js");
124
124
  const { file } = await cloudApi2.getFile(key);
125
125
  if (file.workspaceId === personalWorkspaceId) {
126
126
  selectHyperyTeam("", "");
@@ -140,7 +140,7 @@ function startHyperyTeams() {
140
140
  maybePromptForTeam();
141
141
  void followFileTeam(linkedKey);
142
142
  });
143
- void import("./sync-Y56X2W36.js").then(({ onSyncStatus, syncStatus }) => {
143
+ void import("./sync-M2L4AUS7.js").then(({ onSyncStatus, syncStatus }) => {
144
144
  linkedKey = syncStatus().link?.key ?? null;
145
145
  void followFileTeam(linkedKey);
146
146
  onSyncStatus((_s, link) => {
@@ -15,10 +15,10 @@ import {
15
15
  } from "./chunk-5QB6MXRS.js";
16
16
  import {
17
17
  exportNodeToSVG
18
- } from "./chunk-VRWOM5BR.js";
18
+ } from "./chunk-TITVVCK6.js";
19
19
  import {
20
20
  selectionReferenceImages
21
- } from "./chunk-TUGNBBKK.js";
21
+ } from "./chunk-NTDQN5KV.js";
22
22
  import {
23
23
  AiClientError,
24
24
  IMAGE_ACTIONS,
@@ -28,10 +28,10 @@ import {
28
28
  requestImageAction,
29
29
  sizeForAspect,
30
30
  vectorSupport
31
- } from "./chunk-XAMLC3F2.js";
31
+ } from "./chunk-OAL6OESQ.js";
32
32
  import {
33
33
  useEditorStore
34
- } from "./chunk-TZY27V4B.js";
34
+ } from "./chunk-FCU4OKLZ.js";
35
35
  import {
36
36
  getActiveRenderer
37
37
  } from "./chunk-HO3AMINM.js";
@@ -6,23 +6,23 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  useThemeStore
9
- } from "./chunk-L5UUTG2B.js";
9
+ } from "./chunk-FG4RNLRT.js";
10
10
  import {
11
11
  exportNodeToSVG
12
- } from "./chunk-VRWOM5BR.js";
12
+ } from "./chunk-TITVVCK6.js";
13
13
  import {
14
14
  exportNodeToBlob
15
- } from "./chunk-XPV6YQ6K.js";
15
+ } from "./chunk-5UX2YF4U.js";
16
16
  import {
17
17
  syncStatus
18
- } from "./chunk-PGK2XJBS.js";
18
+ } from "./chunk-J6G5WD46.js";
19
19
  import {
20
20
  downloadBlob
21
- } from "./chunk-4BR2ZFTJ.js";
21
+ } from "./chunk-D7ADFAVG.js";
22
22
  import {
23
23
  setPluginTabs,
24
24
  useEditorStore
25
- } from "./chunk-TZY27V4B.js";
25
+ } from "./chunk-FCU4OKLZ.js";
26
26
  import {
27
27
  TOKEN_IDS,
28
28
  tokenVar
@@ -54,7 +54,7 @@ init_define_POPCRAFT_COMPONENT_IDS();
54
54
  // lib/plugins/api.ts
55
55
  init_define_POPCRAFT_COMPONENT_IDS();
56
56
  async function handlePluginCall(env, method, params = {}) {
57
- const { dispatchPluginCall } = await import("./plugin-C7WFCF4R.js");
57
+ const { dispatchPluginCall } = await import("./plugin-VFQ5EQ73.js");
58
58
  return dispatchPluginCall(env, method, params);
59
59
  }
60
60
 
@@ -378,7 +378,7 @@ async function runPlugin(pluginId, commandId, opts = {}) {
378
378
  if (!opened) throw new Error("The browser blocked the new tab");
379
379
  },
380
380
  createDocument: async (opts2) => {
381
- const { createFreshFileOrExplain } = await import("./new-file-LEZXUHJN.js");
381
+ const { createFreshFileOrExplain } = await import("./new-file-IIFPHFNN.js");
382
382
  const created = await createFreshFileOrExplain({}, { name: opts2?.name });
383
383
  if (!created.ok) throw new Error(created.reason === "plan" ? "Plan limit reached" : created.reason === "guest-limit" ? "Sign in to create another file" : `Could not create file (${created.reason})`);
384
384
  await useEditorStore.getState().openDocument(created.docId);
@@ -538,7 +538,7 @@ if (typeof window !== "undefined") {
538
538
  const name = d.name || "Imported";
539
539
  void (async () => {
540
540
  try {
541
- const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-L7PBNAHY.js");
541
+ const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-DGTF6ELY.js");
542
542
  if (d.ir && typeof d.ir === "object") {
543
543
  await applyPluginLayoutIr(d.ir, { mode, name });
544
544
  return;
@@ -14,22 +14,22 @@ import {
14
14
  newFileRefusal,
15
15
  reportNewFileBlocked,
16
16
  setCloudLink
17
- } from "./chunk-2P2CAUXE.js";
17
+ } from "./chunk-NNIP6RJU.js";
18
18
  import {
19
19
  parseDeepLink,
20
20
  withDeepLink
21
21
  } from "./chunk-XHTNNT6V.js";
22
22
  import {
23
23
  activeTeamWorkspaceId
24
- } from "./chunk-QOARTKAZ.js";
24
+ } from "./chunk-GSNK5JKW.js";
25
25
  import {
26
26
  ApiError,
27
27
  api,
28
28
  cloudApi
29
- } from "./chunk-W6M6P2EQ.js";
29
+ } from "./chunk-GPARXTW6.js";
30
30
  import {
31
31
  attachPresence
32
- } from "./chunk-S5QB7DAW.js";
32
+ } from "./chunk-X2GJCXKP.js";
33
33
  import {
34
34
  isPersistableDocument,
35
35
  isUnsavedPlaceholder,
@@ -40,7 +40,7 @@ import {
40
40
  setCollabHistory,
41
41
  storedDocument,
42
42
  useEditorStore
43
- } from "./chunk-TZY27V4B.js";
43
+ } from "./chunk-FCU4OKLZ.js";
44
44
  import {
45
45
  accessToken,
46
46
  cloudUser,
@@ -13,7 +13,7 @@ import {
13
13
  agentTool,
14
14
  agentToolList,
15
15
  registerCommands
16
- } from "./chunk-5BO7NK4J.js";
16
+ } from "./chunk-XM7BLGNR.js";
17
17
  import {
18
18
  dispatch
19
19
  } from "./chunk-I7RDXUMA.js";
@@ -7,10 +7,10 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  builtinCommands,
9
9
  registerBuiltinCommands
10
- } from "./chunk-2BP3AABU.js";
10
+ } from "./chunk-R5ZSYMEM.js";
11
11
  import {
12
12
  toolView
13
- } from "./chunk-5BO7NK4J.js";
13
+ } from "./chunk-XM7BLGNR.js";
14
14
  import {
15
15
  init_define_POPCRAFT_COMPONENT_IDS
16
16
  } from "./chunk-DCZ5RFDN.js";