@popcraft/kit 0.62.0 → 0.62.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/chunks/{agent-QEQRU376.js → agent-HR43WPJA.js} +1 -1
  2. package/dist/chunks/{builtin-IDOTNSXV.js → builtin-4PBZK6B4.js} +4 -4
  3. package/dist/chunks/{buy-credits-Q5FNHCQ7.js → buy-credits-YMEU5ASP.js} +2 -2
  4. package/dist/chunks/{check-template-4EXSZYDZ.js → check-template-AGVJ6BIO.js} +6 -6
  5. package/dist/chunks/{chunk-J4BZVVVD.js → chunk-4C7GWCRU.js} +1 -1
  6. package/dist/chunks/{chunk-TMH3XAAO.js → chunk-5INQT2HJ.js} +3 -3
  7. package/dist/chunks/{chunk-ACA4JAQW.js → chunk-5VL4H3VC.js} +2 -2
  8. package/dist/chunks/{chunk-4XEHZFTU.js → chunk-7FO7GKS4.js} +5 -5
  9. package/dist/chunks/{chunk-GYYEPFLD.js → chunk-7WCTGTU2.js} +1 -1
  10. package/dist/chunks/{chunk-YUDZE2GF.js → chunk-AUII3JNR.js} +4 -4
  11. package/dist/chunks/{chunk-LNTNSLNK.js → chunk-CJRF3MTA.js} +6 -6
  12. package/dist/chunks/{chunk-LUTXAIKC.js → chunk-GID3Y2HZ.js} +2 -2
  13. package/dist/chunks/{chunk-S7IOMHRN.js → chunk-HTO4ORRV.js} +2 -2
  14. package/dist/chunks/{chunk-XTQKTF3L.js → chunk-JZGWHICG.js} +7 -7
  15. package/dist/chunks/{chunk-F2TWVZ6D.js → chunk-LD323FPF.js} +1 -1
  16. package/dist/chunks/{chunk-IKEYSHNE.js → chunk-M56JZHP5.js} +9 -9
  17. package/dist/chunks/{chunk-H7ETGN75.js → chunk-MRPC7JW2.js} +11 -11
  18. package/dist/chunks/{chunk-QQW77XNX.js → chunk-N2LE3BUI.js} +19 -0
  19. package/dist/chunks/{chunk-A3M6SSCA.js → chunk-O6KDNEP2.js} +1 -1
  20. package/dist/chunks/{chunk-VPHSSYOF.js → chunk-OLBPIDN6.js} +2 -2
  21. package/dist/chunks/{chunk-BOFB6Y2I.js → chunk-OR4MUAGT.js} +2 -2
  22. package/dist/chunks/{chunk-XRAUR5Q2.js → chunk-RDP5CFWT.js} +1 -1
  23. package/dist/chunks/{chunk-HUJ3ZZUJ.js → chunk-RUVDYHCX.js} +4 -4
  24. package/dist/chunks/{chunk-YTWKCQH2.js → chunk-SDWXKIBX.js} +5 -5
  25. package/dist/chunks/{chunk-4FARQ5NS.js → chunk-TCPM6UMM.js} +1 -1
  26. package/dist/chunks/{chunk-OD4AETIF.js → chunk-TOPHYQDO.js} +2 -2
  27. package/dist/chunks/{chunk-ZB3RJBSN.js → chunk-TVO2HNJJ.js} +3 -3
  28. package/dist/chunks/{chunk-2UIAJ3YS.js → chunk-WFG7D35H.js} +50 -49
  29. package/dist/chunks/{chunk-A6UX4GU2.js → chunk-YNTDDU2F.js} +1 -1
  30. package/dist/chunks/{client-YX2UZT3K.js → client-G4RADIMS.js} +2 -2
  31. package/dist/chunks/{client-DZPKOATZ.js → client-MTDIULXD.js} +3 -3
  32. package/dist/chunks/{client-K7NEQULL.js → client-QA2LYFU7.js} +1 -1
  33. package/dist/chunks/{client-actions-COEDUCSG.js → client-actions-5A7QK7TJ.js} +5 -5
  34. package/dist/chunks/{components-ZIFQ7EWF.js → components-LNBY2RGY.js} +3 -3
  35. package/dist/chunks/{dangerous-JPKFQZKF.js → dangerous-RGA2JHIL.js} +4 -4
  36. package/dist/chunks/{delete-current-file-QIYPKQ65.js → delete-current-file-VCM67TK6.js} +5 -5
  37. package/dist/chunks/{editor-seams-JP7E6N47.js → editor-seams-4UGQDY7D.js} +13 -13
  38. package/dist/chunks/{editor-store-ZENVROKD.js → editor-store-BUTJ6TXS.js} +1 -1
  39. package/dist/chunks/{export-watermark-6ZVV5NOE.js → export-watermark-NROOOILN.js} +5 -5
  40. package/dist/chunks/{eyedropper-PIHJM54Y.js → eyedropper-EUWCC3RV.js} +1 -1
  41. package/dist/chunks/{generate-media-2EBWD4XF.js → generate-media-PISMZTX5.js} +3 -3
  42. package/dist/chunks/{host-HAZKWYQJ.js → host-CNDUJFUC.js} +6 -6
  43. package/dist/chunks/{host-XQQCRWV4.js → host-JRPYIA4L.js} +4 -4
  44. package/dist/chunks/{integrations-MUSVRBT2.js → integrations-P22MVF7G.js} +1 -1
  45. package/dist/chunks/{libraries-LKRROMID.js → libraries-IAVOFG2O.js} +5 -5
  46. package/dist/chunks/{live-LHZYOC3N.js → live-L4JJWBHT.js} +1 -1
  47. package/dist/chunks/{media-tool-SZSATENU.js → media-tool-QWOFIYYO.js} +1 -1
  48. package/dist/chunks/{new-file-EX3HIZTV.js → new-file-2OTELH34.js} +3 -3
  49. package/dist/chunks/{next-commerce-SVYE725Z.js → next-commerce-YLMBLO2K.js} +4 -4
  50. package/dist/chunks/{plugin-3XRJHYMV.js → plugin-XONP4FVE.js} +3 -3
  51. package/dist/chunks/{plugin-import-SQM4O74G.js → plugin-import-46RIAJVJ.js} +17 -17
  52. package/dist/chunks/{presence-D3IG2F64.js → presence-BXMXHJI3.js} +2 -2
  53. package/dist/chunks/{project-UGMAIW3W.js → project-4D2BXKV7.js} +5 -5
  54. package/dist/chunks/{publish-site-VXMQGSIO.js → publish-site-JEXX3DCH.js} +6 -6
  55. package/dist/chunks/{publish-store-ODJ7ZBKV.js → publish-store-R6JJQKV6.js} +7 -7
  56. package/dist/chunks/{raster-actions-Q5IKRQVT.js → raster-actions-MXKADA5J.js} +1 -1
  57. package/dist/chunks/{runner-FSN663MI.js → runner-IL2MGQ57.js} +19 -19
  58. package/dist/chunks/{store-BPX2C2L3.js → store-TRQXPVEB.js} +6 -6
  59. package/dist/chunks/{storefront-HOGZCOMF.js → storefront-YV5AECAG.js} +5 -5
  60. package/dist/chunks/{storefront-prepare-332O3NDO.js → storefront-prepare-23GAGKEQ.js} +2 -2
  61. package/dist/chunks/{sync-2UKTTMQE.js → sync-5EDSCSX2.js} +5 -5
  62. package/dist/chunks/{tabs-VFO3V6VQ.js → tabs-PCOUDDGZ.js} +8 -8
  63. package/dist/chunks/{team-L6NYA3PJ.js → team-76IBWWEN.js} +1 -1
  64. package/dist/chunks/{team-client-6UIWLXYR.js → team-client-D52FBEJI.js} +1 -1
  65. package/dist/chunks/{tools-NR5HSHUI.js → tools-LHAYUYDA.js} +2 -2
  66. package/dist/chunks/{tree-ITQ2Q6WM.js → tree-PKOUXMJI.js} +1 -1
  67. package/dist/chunks/{ui-commands-EGFX3DGI.js → ui-commands-TKDBP6JB.js} +13 -13
  68. package/dist/chunks/{versions-K7YE5BQJ.js → versions-HBAGBNQG.js} +5 -5
  69. package/dist/chunks/{web-OWSIMSEO.js → web-MR54DRCQ.js} +4 -4
  70. package/dist/index.js +1 -1
  71. package/package.json +1 -1
  72. package/types/lib/document/types.d.ts +5 -0
@@ -18,7 +18,7 @@ import {
18
18
  renderDocument,
19
19
  toolView,
20
20
  underReviewKit
21
- } from "./chunk-TMH3XAAO.js";
21
+ } from "./chunk-5INQT2HJ.js";
22
22
  import "./chunk-LPZQHY5G.js";
23
23
  import "./chunk-H4BK2M7G.js";
24
24
  import "./chunk-PVJRXEDQ.js";
@@ -7,8 +7,8 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  builtinTools,
9
9
  registerBuiltinTools
10
- } from "./chunk-S7IOMHRN.js";
11
- import "./chunk-2UIAJ3YS.js";
10
+ } from "./chunk-HTO4ORRV.js";
11
+ import "./chunk-WFG7D35H.js";
12
12
  import "./chunk-AHJPLNHX.js";
13
13
  import "./chunk-YKLTGZHQ.js";
14
14
  import "./chunk-DHC3FDN4.js";
@@ -16,10 +16,10 @@ import "./chunk-F3KKMFK7.js";
16
16
  import "./chunk-2PP3TMRP.js";
17
17
  import "./chunk-NNZDS7WH.js";
18
18
  import "./chunk-MI67A4UL.js";
19
- import "./chunk-QQW77XNX.js";
19
+ import "./chunk-N2LE3BUI.js";
20
20
  import "./chunk-XKJIKINS.js";
21
21
  import "./chunk-X5PMOGY5.js";
22
- import "./chunk-TMH3XAAO.js";
22
+ import "./chunk-5INQT2HJ.js";
23
23
  import "./chunk-LPZQHY5G.js";
24
24
  import "./chunk-OBQUNIGO.js";
25
25
  import "./chunk-KK2QFHLG.js";
@@ -7,11 +7,11 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  HYPERY_TEAM_HEADER,
9
9
  hyperyRequestHeaders
10
- } from "./chunk-A6UX4GU2.js";
10
+ } from "./chunk-YNTDDU2F.js";
11
11
  import "./chunk-LKGA5TJC.js";
12
12
  import {
13
13
  useHyperyTeam
14
- } from "./chunk-GYYEPFLD.js";
14
+ } from "./chunk-7WCTGTU2.js";
15
15
  import {
16
16
  ApiError
17
17
  } from "./chunk-BZWRFEYI.js";
@@ -6,24 +6,24 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  appCommands
9
- } from "./chunk-IKEYSHNE.js";
9
+ } from "./chunk-M56JZHP5.js";
10
10
  import {
11
11
  builtinCommands
12
- } from "./chunk-2UIAJ3YS.js";
12
+ } from "./chunk-WFG7D35H.js";
13
13
  import "./chunk-AHJPLNHX.js";
14
14
  import "./chunk-YKLTGZHQ.js";
15
15
  import "./chunk-DHC3FDN4.js";
16
16
  import "./chunk-F3KKMFK7.js";
17
17
  import "./chunk-2PP3TMRP.js";
18
- import "./chunk-ZB3RJBSN.js";
18
+ import "./chunk-TVO2HNJJ.js";
19
19
  import "./chunk-NNZDS7WH.js";
20
- import "./chunk-ACA4JAQW.js";
20
+ import "./chunk-5VL4H3VC.js";
21
21
  import {
22
22
  buildWebSite
23
- } from "./chunk-XRAUR5Q2.js";
23
+ } from "./chunk-RDP5CFWT.js";
24
24
  import "./chunk-MI67A4UL.js";
25
25
  import "./chunk-ZMO7UZUY.js";
26
- import "./chunk-QQW77XNX.js";
26
+ import "./chunk-N2LE3BUI.js";
27
27
  import "./chunk-XKJIKINS.js";
28
28
  import "./chunk-X5PMOGY5.js";
29
29
  import "./chunk-LPZQHY5G.js";
@@ -13,7 +13,7 @@ import {
13
13
  agentTool,
14
14
  agentToolList,
15
15
  registerCommands
16
- } from "./chunk-TMH3XAAO.js";
16
+ } from "./chunk-5INQT2HJ.js";
17
17
  import {
18
18
  dispatch
19
19
  } from "./chunk-H4BK2M7G.js";
@@ -57,19 +57,19 @@ async function renderDocument(doc, nodeIds, options) {
57
57
  function generateCapability(ctx) {
58
58
  return async (prompt, options = {}) => {
59
59
  if (options.format === "audio") {
60
- const { requestAudio } = await import("./client-DZPKOATZ.js");
60
+ const { requestAudio } = await import("./client-MTDIULXD.js");
61
61
  const { signal: signal2, format: _f, ...rest2 } = options;
62
62
  void _f;
63
63
  return requestAudio({ prompt, ...rest2 }, signal2 ?? ctx.signal);
64
64
  }
65
65
  if (options.format === "video") {
66
- const { generateVideoFile } = await import("./generate-media-2EBWD4XF.js");
66
+ const { generateVideoFile } = await import("./generate-media-PISMZTX5.js");
67
67
  const { format: _f, signal: signal2, ...rest2 } = options;
68
68
  void _f;
69
69
  return generateVideoFile({ ...rest2, prompt, doc: ctx.doc() }, { signal: signal2 ?? ctx.signal });
70
70
  }
71
71
  const [{ requestImage }, { effectiveImageModel, useAiStore }] = await Promise.all([
72
- import("./client-DZPKOATZ.js"),
72
+ import("./client-MTDIULXD.js"),
73
73
  import("./client-store-DWB6JN64.js")
74
74
  ]);
75
75
  const modelId = effectiveImageModel(useAiStore.getState());
@@ -7,7 +7,7 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  classNameFor,
9
9
  interactiveSpec
10
- } from "./chunk-XRAUR5Q2.js";
10
+ } from "./chunk-RDP5CFWT.js";
11
11
  import {
12
12
  fontFaceRules,
13
13
  fontsHref
@@ -28,7 +28,7 @@ import {
28
28
  styleMapToCSSText,
29
29
  styleMapToInline,
30
30
  tokensCSS
31
- } from "./chunk-QQW77XNX.js";
31
+ } from "./chunk-N2LE3BUI.js";
32
32
  import {
33
33
  init_define_POPCRAFT_COMPONENT_IDS
34
34
  } from "./chunk-OOA56QGV.js";
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-LPZQHY5G.js";
16
16
  import {
17
17
  syncStatus
18
- } from "./chunk-YUDZE2GF.js";
18
+ } from "./chunk-AUII3JNR.js";
19
19
  import {
20
20
  exportNodeToSVG
21
21
  } from "./chunk-TSQ34T5R.js";
@@ -25,7 +25,7 @@ import {
25
25
  import {
26
26
  setPluginTabs,
27
27
  useEditorStore
28
- } from "./chunk-YTWKCQH2.js";
28
+ } from "./chunk-SDWXKIBX.js";
29
29
  import {
30
30
  openBeside
31
31
  } from "./chunk-673BCXB7.js";
@@ -69,7 +69,7 @@ init_define_POPCRAFT_COMPONENT_IDS();
69
69
  // lib/plugins/api.ts
70
70
  init_define_POPCRAFT_COMPONENT_IDS();
71
71
  async function handlePluginCall(env, method, params = {}) {
72
- const { dispatchPluginCall } = await import("./plugin-3XRJHYMV.js");
72
+ const { dispatchPluginCall } = await import("./plugin-XONP4FVE.js");
73
73
  return dispatchPluginCall(env, method, params);
74
74
  }
75
75
 
@@ -586,7 +586,7 @@ async function runPlugin(pluginId, commandId, opts = {}) {
586
586
  if (!openBeside(url)) throw new Error("The browser blocked the new tab");
587
587
  },
588
588
  createDocument: async (opts2) => {
589
- const { createFreshFileOrExplain } = await import("./new-file-EX3HIZTV.js");
589
+ const { createFreshFileOrExplain } = await import("./new-file-2OTELH34.js");
590
590
  const created = await createFreshFileOrExplain({}, { name: opts2?.name });
591
591
  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})`);
592
592
  await useEditorStore.getState().openDocument(created.docId);
@@ -795,7 +795,7 @@ if (typeof window !== "undefined") {
795
795
  const name = d.name || "Imported";
796
796
  void (async () => {
797
797
  try {
798
- const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-SQM4O74G.js");
798
+ const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-46RIAJVJ.js");
799
799
  if (d.ir && typeof d.ir === "object") {
800
800
  await applyPluginLayoutIr(d.ir, { mode, name });
801
801
  return;
@@ -150,7 +150,7 @@ function startHyperyTeams() {
150
150
  maybePromptForTeam();
151
151
  void followFileTeam(linkedKey);
152
152
  });
153
- void import("./sync-2UKTTMQE.js").then(({ onSyncStatus, syncStatus }) => {
153
+ void import("./sync-5EDSCSX2.js").then(({ onSyncStatus, syncStatus }) => {
154
154
  linkedKey = syncStatus().link?.key ?? null;
155
155
  void followFileTeam(linkedKey);
156
156
  onSyncStatus((_s, link) => {
@@ -21,10 +21,10 @@ import {
21
21
  reportOpenStage,
22
22
  setCloudLink,
23
23
  trackOpen
24
- } from "./chunk-OD4AETIF.js";
24
+ } from "./chunk-TOPHYQDO.js";
25
25
  import {
26
26
  activeTeamWorkspaceId
27
- } from "./chunk-GYYEPFLD.js";
27
+ } from "./chunk-7WCTGTU2.js";
28
28
  import {
29
29
  ApiError,
30
30
  api,
@@ -32,7 +32,7 @@ import {
32
32
  } from "./chunk-BZWRFEYI.js";
33
33
  import {
34
34
  attachPresence
35
- } from "./chunk-4FARQ5NS.js";
35
+ } from "./chunk-TCPM6UMM.js";
36
36
  import {
37
37
  fileOpeningMode,
38
38
  isAppleMobile,
@@ -45,7 +45,7 @@ import {
45
45
  setCollabHistory,
46
46
  storedDocument,
47
47
  useEditorStore
48
- } from "./chunk-YTWKCQH2.js";
48
+ } from "./chunk-SDWXKIBX.js";
49
49
  import {
50
50
  currentHistoryGroup
51
51
  } from "./chunk-2WYJ76BQ.js";
@@ -6,7 +6,7 @@ const __filename = __popcraftPath(import.meta.url);
6
6
  const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  registerAppCommands
9
- } from "./chunk-IKEYSHNE.js";
9
+ } from "./chunk-M56JZHP5.js";
10
10
  import {
11
11
  storeOpsSeam
12
12
  } from "./chunk-JLSJE4MZ.js";
@@ -23,17 +23,17 @@ import {
23
23
  sameResolution,
24
24
  surfaceSize,
25
25
  windowCssSize
26
- } from "./chunk-2UIAJ3YS.js";
26
+ } from "./chunk-WFG7D35H.js";
27
27
  import {
28
28
  notice
29
- } from "./chunk-LUTXAIKC.js";
29
+ } from "./chunk-GID3Y2HZ.js";
30
30
  import {
31
31
  agentContext
32
- } from "./chunk-TMH3XAAO.js";
32
+ } from "./chunk-5INQT2HJ.js";
33
33
  import {
34
34
  collabSession,
35
35
  syncStatus
36
- } from "./chunk-YUDZE2GF.js";
36
+ } from "./chunk-AUII3JNR.js";
37
37
  import {
38
38
  setAudioOutputDocument,
39
39
  setMediaDocument
@@ -47,7 +47,7 @@ import {
47
47
  import {
48
48
  persist,
49
49
  useEditorStore
50
- } from "./chunk-YTWKCQH2.js";
50
+ } from "./chunk-SDWXKIBX.js";
51
51
  import {
52
52
  plansEnabled
53
53
  } from "./chunk-LWTKJQTQ.js";
@@ -19,7 +19,7 @@ import {
19
19
  requestImageAction,
20
20
  sizeForAspect,
21
21
  vectorSupport
22
- } from "./chunk-A3M6SSCA.js";
22
+ } from "./chunk-O6KDNEP2.js";
23
23
  import {
24
24
  external_exports
25
25
  } from "./chunk-X5PMOGY5.js";
@@ -31,7 +31,7 @@ import {
31
31
  } from "./chunk-TSQ34T5R.js";
32
32
  import {
33
33
  useEditorStore
34
- } from "./chunk-YTWKCQH2.js";
34
+ } from "./chunk-SDWXKIBX.js";
35
35
  import {
36
36
  withHistoryGroup
37
37
  } from "./chunk-2WYJ76BQ.js";
@@ -7,10 +7,10 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  builtinCommands,
9
9
  registerBuiltinCommands
10
- } from "./chunk-2UIAJ3YS.js";
10
+ } from "./chunk-WFG7D35H.js";
11
11
  import {
12
12
  toolView
13
- } from "./chunk-TMH3XAAO.js";
13
+ } from "./chunk-5INQT2HJ.js";
14
14
  import {
15
15
  init_define_POPCRAFT_COMPONENT_IDS
16
16
  } from "./chunk-OOA56QGV.js";
@@ -12,7 +12,7 @@ import {
12
12
  hostEnv,
13
13
  plain,
14
14
  registerBuiltinCommands
15
- } from "./chunk-2UIAJ3YS.js";
15
+ } from "./chunk-WFG7D35H.js";
16
16
  import {
17
17
  external_exports
18
18
  } from "./chunk-X5PMOGY5.js";
@@ -626,7 +626,7 @@ var commands = [
626
626
  // A storefront design in a neutral form (lib/io/web/project/storefront.ts `storefrontDesign`): what an exporter
627
627
  // plugin turns into its own store's templates, as PopCraft turns it into a Next.js Commerce store (the Ecommerce plugin makes a Shopify theme of it).
628
628
  run: async (_p, ctx) => {
629
- const [{ componentScreens }, { storefrontDesign }] = await Promise.all([import("./components-ZIFQ7EWF.js"), import("./storefront-HOGZCOMF.js")]);
629
+ const [{ componentScreens }, { storefrontDesign }] = await Promise.all([import("./components-LNBY2RGY.js"), import("./storefront-YV5AECAG.js")]);
630
630
  const doc = ctx.doc();
631
631
  const design = storefrontDesign(doc, componentScreens(doc, ctx.pageId()));
632
632
  return { summary: `Storefront: ${design.pages.length} pages`, data: design };
@@ -644,11 +644,11 @@ var commands = [
644
644
  // saves (the Ecommerce plugin's Shopify theme), so a target is written once, here, and never again in a plugin.
645
645
  run: async (p, ctx) => {
646
646
  const [{ storefrontInputs }, { STOREFRONT_TARGETS }, { bytesOf }, { zipFiles }, { EXPORT_NODE_CAP }] = await Promise.all([
647
- import("./storefront-prepare-332O3NDO.js"),
648
- import("./storefront-HOGZCOMF.js"),
649
- import("./project-UGMAIW3W.js"),
647
+ import("./storefront-prepare-23GAGKEQ.js"),
648
+ import("./storefront-YV5AECAG.js"),
649
+ import("./project-4D2BXKV7.js"),
650
650
  import("./zip-export-M2AL2IDF.js"),
651
- import("./tree-ITQ2Q6WM.js")
651
+ import("./tree-PKOUXMJI.js")
652
652
  ]);
653
653
  const doc = ctx.doc();
654
654
  const { screens, media } = await storefrontInputs(doc, ctx.pageId(), EXPORT_NODE_CAP);
@@ -843,7 +843,7 @@ var pluginRun = defineCommand({
843
843
  }
844
844
  },
845
845
  run: async (p, ctx) => {
846
- const { runPlugin } = await import("./host-HAZKWYQJ.js");
846
+ const { runPlugin } = await import("./host-CNDUJFUC.js");
847
847
  await runPlugin(p.pluginId, p.commandId);
848
848
  ctx.notice(`Started ${p.pluginId}.`);
849
849
  return {
@@ -7,7 +7,7 @@ const __dirname = __popcraftDirname(__filename);
7
7
  import {
8
8
  componentFiles,
9
9
  componentPlan
10
- } from "./chunk-BOFB6Y2I.js";
10
+ } from "./chunk-OR4MUAGT.js";
11
11
  import {
12
12
  routesOf,
13
13
  screensOf
@@ -8,7 +8,7 @@ import {
8
8
  needsSelection,
9
9
  pageGo,
10
10
  selectionIsPicture
11
- } from "./chunk-2UIAJ3YS.js";
11
+ } from "./chunk-WFG7D35H.js";
12
12
  import {
13
13
  external_exports
14
14
  } from "./chunk-X5PMOGY5.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-ZENVROKD.js").then((m) => m.useEditorStore.getState());
34
+ var store = () => import("./editor-store-BUTJ6TXS.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({
@@ -191,7 +191,7 @@ var dialogOpen = defineCommand({
191
191
  (await import("./plan-limit-CJJ6DH76.js")).openPlanDialog();
192
192
  break;
193
193
  case "credits":
194
- await (await import("./buy-credits-Q5FNHCQ7.js")).buyAiCredits();
194
+ await (await import("./buy-credits-YMEU5ASP.js")).buyAiCredits();
195
195
  break;
196
196
  case "tokens":
197
197
  emit("popcraft-open-tokens");
@@ -237,7 +237,7 @@ var aiOpen = defineCommand({
237
237
  ] } },
238
238
  run: async ({ dialog, skillId }) => {
239
239
  if (dialog) (await import("./client-store-DWB6JN64.js")).openAiDialog(dialog);
240
- else (await import("./store-BPX2C2L3.js")).openAgentPanel({ skillId: skillId ?? null });
240
+ else (await import("./store-TRQXPVEB.js")).openAgentPanel({ skillId: skillId ?? null });
241
241
  return { summary: dialog ? `Opened AI ${dialog}` : "Opened the agent" };
242
242
  }
243
243
  });
@@ -250,7 +250,7 @@ var agentContinue = defineCommand({
250
250
  params: external_exports.object({}),
251
251
  expose: { ui: { label: "AI: Continue the agent\u2019s last turn", keywords: ["ai", "agent", "continue", "resume", "retry", "keep going"] } },
252
252
  run: async () => {
253
- const resumed = await (await import("./runner-FSN663MI.js")).continueTurn();
253
+ const resumed = await (await import("./runner-IL2MGQ57.js")).continueTurn();
254
254
  return { summary: resumed ? "Continued the agent" : "Nothing to continue" };
255
255
  }
256
256
  });
@@ -329,11 +329,11 @@ var toolPlace = defineCommand({
329
329
  run: async ({ what }) => {
330
330
  if (what === "media") {
331
331
  const s = await store();
332
- const { placeMediaFromPicker } = await import("./media-tool-SZSATENU.js");
332
+ const { placeMediaFromPicker } = await import("./media-tool-QWOFIYYO.js");
333
333
  await placeMediaFromPicker({ kind: "point", x: s.camera.x, y: s.camera.y });
334
334
  return { summary: "Placing media" };
335
335
  }
336
- const { beginEyedrop } = await import("./eyedropper-PIHJM54Y.js");
336
+ const { beginEyedrop } = await import("./eyedropper-EUWCC3RV.js");
337
337
  void beginEyedrop();
338
338
  return { summary: "Pick a color" };
339
339
  }
@@ -351,7 +351,7 @@ var nodeRasterize = defineCommand({
351
351
  keywords: ["rasterize", "raster", "flatten", "pixels", "paint layer", "erase", "bitmap"]
352
352
  } },
353
353
  run: async () => {
354
- const { flattenSelectionToPaintLayer } = await import("./raster-actions-Q5IKRQVT.js");
354
+ const { flattenSelectionToPaintLayer } = await import("./raster-actions-MXKADA5J.js");
355
355
  await flattenSelectionToPaintLayer();
356
356
  return { summary: "Rasterized" };
357
357
  }
@@ -462,7 +462,7 @@ function pluginCommand(plugins) {
462
462
  params: external_exports.object({ pluginId: external_exports.string(), commandId: external_exports.string() }),
463
463
  expose: { ui: { label: "Run plugin", keywords: ["plugin", "extension", "run"], variants, palette: variants.length ? void 0 : false } },
464
464
  run: async ({ pluginId, commandId }) => {
465
- await (await import("./host-HAZKWYQJ.js")).runPlugin(pluginId, commandId);
465
+ await (await import("./host-CNDUJFUC.js")).runPlugin(pluginId, commandId);
466
466
  return { summary: "Plugin started" };
467
467
  }
468
468
  });
@@ -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-XTQKTF3L.js";
9
+ } from "./chunk-JZGWHICG.js";
10
10
  import {
11
11
  fileCommands,
12
12
  fontTeamRemove,
13
13
  integrationConfirmCommands,
14
14
  mediaDelete,
15
15
  publishCommands
16
- } from "./chunk-2UIAJ3YS.js";
16
+ } from "./chunk-WFG7D35H.js";
17
17
  import {
18
18
  external_exports
19
19
  } from "./chunk-X5PMOGY5.js";
@@ -53,7 +53,7 @@ var collabSetSpotlight = defineCommand({
53
53
  }
54
54
  },
55
55
  run: async ({ on }, ctx) => {
56
- const { setSpotlight } = await import("./presence-D3IG2F64.js");
56
+ const { setSpotlight } = await import("./presence-BXMXHJI3.js");
57
57
  setSpotlight(on);
58
58
  ctx.notice(on ? "Spotlight on \u2014 everyone is following this view." : "Spotlight off.");
59
59
  return { summary: on ? "Spotlight on" : "Spotlight off", data: { spotlight: on } };
@@ -80,7 +80,7 @@ var collabRevealPrivate = defineCommand({
80
80
  }
81
81
  },
82
82
  run: async (_p, ctx) => {
83
- const { useEditorStore } = await import("./editor-store-ZENVROKD.js");
83
+ const { useEditorStore } = await import("./editor-store-BUTJ6TXS.js");
84
84
  const before = Object.values(useEditorStore.getState().document.nodes).filter((n) => n.privateTo).length;
85
85
  useEditorStore.getState().revealPrivate();
86
86
  ctx.notice(before ? `Revealed ${before} private item${before === 1 ? "" : "s"}.` : "Nothing was private.");
@@ -144,7 +144,7 @@ var documentDelete = defineCommand({
144
144
  }
145
145
  },
146
146
  run: async ({ id }, ctx) => {
147
- const { useEditorStore } = await import("./editor-store-ZENVROKD.js");
147
+ const { useEditorStore } = await import("./editor-store-BUTJ6TXS.js");
148
148
  const wasOpen = useEditorStore.getState().document.id === id;
149
149
  await useEditorStore.getState().deleteDocument(id);
150
150
  ctx.notice("Deleted the document.");
@@ -188,7 +188,7 @@ var libraryPublish = defineCommand({
188
188
  }
189
189
  },
190
190
  run: async (p, ctx) => {
191
- const { publishLibrary } = await import("./libraries-LKRROMID.js");
191
+ const { publishLibrary } = await import("./libraries-IAVOFG2O.js");
192
192
  const doc = ctx.doc();
193
193
  const pick = {
194
194
  componentIds: p.componentIds ?? Object.keys(doc.components ?? {}),
@@ -220,7 +220,7 @@ var libraryUnpublish = defineCommand({
220
220
  },
221
221
  run: async ({ libraryId }, ctx) => {
222
222
  if (!libraryId.trim()) throw new CommandError("Which library? Pass its `libraryId`.", "invalid_params");
223
- const { unpublishLibrary } = await import("./libraries-LKRROMID.js");
223
+ const { unpublishLibrary } = await import("./libraries-IAVOFG2O.js");
224
224
  await unpublishLibrary(libraryId);
225
225
  ctx.notice(`Unpublished library ${libraryId}.`);
226
226
  return { summary: `Unpublished library ${libraryId}`, data: { libraryId, unpublished: true } };
@@ -232,8 +232,8 @@ var libraryCommands = [libraryPublish, libraryUnpublish];
232
232
  init_define_POPCRAFT_COMPONENT_IDS();
233
233
  async function findVersion(id) {
234
234
  const [{ useEditorStore }, { versionLabel }] = await Promise.all([
235
- import("./editor-store-ZENVROKD.js"),
236
- import("./versions-K7YE5BQJ.js")
235
+ import("./editor-store-BUTJ6TXS.js"),
236
+ import("./versions-HBAGBNQG.js")
237
237
  ]);
238
238
  const meta = useEditorStore.getState().versions.find((v) => v.id === id);
239
239
  if (!meta) {
@@ -266,7 +266,7 @@ var versionRestore = defineCommand({
266
266
  },
267
267
  run: async ({ id }) => {
268
268
  const found = await findVersion(id);
269
- const { restoreVersion } = await import("./versions-K7YE5BQJ.js");
269
+ const { restoreVersion } = await import("./versions-HBAGBNQG.js");
270
270
  await restoreVersion(found.meta);
271
271
  return { summary: `Restored \u201C${found.label}\u201D`, data: { id, label: found.label, restored: true } };
272
272
  }
@@ -291,7 +291,7 @@ var versionDelete = defineCommand({
291
291
  },
292
292
  run: async ({ id }, ctx) => {
293
293
  const found = await findVersion(id);
294
- const { deleteVersion } = await import("./versions-K7YE5BQJ.js");
294
+ const { deleteVersion } = await import("./versions-HBAGBNQG.js");
295
295
  await deleteVersion(found.meta);
296
296
  ctx.notice(`Deleted the version \u201C${found.label}\u201D.`);
297
297
  return { summary: `Deleted the version \u201C${found.label}\u201D`, data: { id, label: found.label, deleted: true } };
@@ -756,9 +756,28 @@ function placedChild(node, parent, frame = parent) {
756
756
  const y = constrained(c.vertical, node.y, node.height, frame.height, "top", "bottom", "height");
757
757
  return { style: { ...limits(node), ...x.style, ...y.style }, place: { position: "absolute", ...x.place, ...y.place } };
758
758
  }
759
+ function fitWindowStyle(frame) {
760
+ const w = px(frame.width), h = px(frame.height);
761
+ const solid = [...frame.fills ?? []].reverse().find((f) => f.type === "SOLID" && f.visible !== false && f.color);
762
+ const bars = solid?.color ? `rgb(${[solid.color.r, solid.color.g, solid.color.b].map((c) => Math.round(c * 255)).join(" ")})` : "#000";
763
+ return {
764
+ position: "fixed",
765
+ width: w,
766
+ height: h,
767
+ "min-height": null,
768
+ "max-width": null,
769
+ left: "50%",
770
+ top: "50%",
771
+ "transform-origin": "center",
772
+ transform: `translate(-50%, -50%) scale(min(tan(atan2(100vw, ${w})), tan(atan2(100dvh, ${h}))))`,
773
+ // The bars beside a screen that is narrower than the window take its color rather than the browser's white.
774
+ "box-shadow": `0 0 0 400vmax ${bars}`
775
+ };
776
+ }
759
777
  function siteLayout(node, parent, layout) {
760
778
  const own = node.type === "FRAME" || node.type === "COMPONENT" || node.type === "INSTANCE" ? node : null;
761
779
  if (!parent) {
780
+ if (own?.fitWindow) return { style: fitWindowStyle(own), place: { position: "fixed" } };
762
781
  const grows = !own || laysOut(own) || own.overflowScrolling === "NONE" || !own.overflowScrolling;
763
782
  return { style: { ...limits(node), width: "100%", ...grows ? { height: null, "min-height": `max(${px(node.height)}, 100dvh)` } : {} }, place: { position: "relative" } };
764
783
  }
@@ -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-A6UX4GU2.js";
9
+ } from "./chunk-YNTDDU2F.js";
10
10
  import {
11
11
  aiAvailability,
12
12
  effectiveChatModel,
@@ -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-ZENVROKD.js"),
94
+ import("./editor-store-BUTJ6TXS.js"),
95
95
  import("../lib/document/photo-frames.js"),
96
- import("./media-tool-SZSATENU.js")
96
+ import("./media-tool-QWOFIYYO.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);
@@ -12,7 +12,7 @@ import {
12
12
  componentName,
13
13
  mediaRules,
14
14
  serializeReact
15
- } from "./chunk-XRAUR5Q2.js";
15
+ } from "./chunk-RDP5CFWT.js";
16
16
  import {
17
17
  routesOf,
18
18
  screensOf
@@ -20,7 +20,7 @@ import {
20
20
  import {
21
21
  buildPlainTree,
22
22
  tokensCSS
23
- } from "./chunk-QQW77XNX.js";
23
+ } from "./chunk-N2LE3BUI.js";
24
24
  import {
25
25
  COMMERCE_ACTION_PROP,
26
26
  COMMERCE_PROP
@@ -27,7 +27,7 @@ import {
27
27
  styleMapToJSX,
28
28
  variantStates,
29
29
  webStateMachine
30
- } from "./chunk-QQW77XNX.js";
30
+ } from "./chunk-N2LE3BUI.js";
31
31
  import {
32
32
  stopsOf
33
33
  } from "./chunk-ZQ2BWV4J.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-WEI2MQND.js";
10
10
  import {
11
11
  notice
12
- } from "./chunk-LUTXAIKC.js";
12
+ } from "./chunk-GID3Y2HZ.js";
13
13
  import {
14
14
  effectiveChatModel,
15
15
  setModelPref,
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-OE3B23SW.js";
18
18
  import {
19
19
  useEditorStore
20
- } from "./chunk-YTWKCQH2.js";
20
+ } from "./chunk-SDWXKIBX.js";
21
21
  import {
22
22
  create
23
23
  } from "./chunk-VLQGXCRU.js";
@@ -1903,7 +1903,7 @@ async function sendMessage(text) {
1903
1903
  if (!useAgentStore.getState().activeThreadId) newThread();
1904
1904
  const mentions = pruneMentions(body, useAgentStore.getState().draftMentions);
1905
1905
  useAgentStore.setState({ draft: "", draftMentions: [], error: null });
1906
- const { runTurn } = await import("./runner-FSN663MI.js");
1906
+ const { runTurn } = await import("./runner-IL2MGQ57.js");
1907
1907
  await runTurn(body, mentions);
1908
1908
  }
1909
1909
  function stop() {
@@ -2006,7 +2006,7 @@ var clearTaskChildren = () => useAgentStore.setState({ taskChildren: {} });
2006
2006
  function subscribeChildTools() {
2007
2007
  let dispose;
2008
2008
  let cancelled = false;
2009
- void import("./runner-FSN663MI.js").then(({ onChildTool }) => {
2009
+ void import("./runner-IL2MGQ57.js").then(({ onChildTool }) => {
2010
2010
  const off = onChildTool((report) => {
2011
2011
  if (report?.status !== "running" || report.jobId) return;
2012
2012
  recordChildTool(report.toolCallId ?? "", report.name);