@popcraft/kit 0.38.4 → 0.38.5
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.
- package/dist/chunks/{agent-YC2TSI5E.js → agent-52ZY2JFO.js} +1 -1
- package/dist/chunks/{api-7WOLDYQY.js → api-QCQ5M4FF.js} +2 -2
- package/dist/chunks/{builtin-2ZAY3HDM.js → builtin-FD2BTIC6.js} +3 -3
- package/dist/chunks/{buy-credits-WYODGD7D.js → buy-credits-IHQRC7SF.js} +4 -4
- package/dist/chunks/{check-template-YXRHSW5I.js → check-template-QI2UVNI4.js} +2 -2
- package/dist/chunks/{chunk-PVF4M3SF.js → chunk-2BP3AABU.js} +65 -65
- package/dist/chunks/{chunk-NTPHRKHZ.js → chunk-2P2CAUXE.js} +5 -5
- package/dist/chunks/{chunk-BSG3FLLW.js → chunk-4BR2ZFTJ.js} +8 -0
- package/dist/chunks/{chunk-DGMLM5EP.js → chunk-4ZETVHSS.js} +1 -1
- package/dist/chunks/{chunk-6VZNYMAR.js → chunk-5BO7NK4J.js} +4 -4
- package/dist/chunks/{chunk-NK3HWAZE.js → chunk-72MXIQSQ.js} +2 -2
- package/dist/chunks/{chunk-B43Z4HHA.js → chunk-D7JUNOBH.js} +12 -0
- package/dist/chunks/{chunk-3JKRM4V6.js → chunk-HUPLGBSZ.js} +11 -11
- package/dist/chunks/{chunk-MTNM7DOV.js → chunk-IQLPAQXV.js} +4 -4
- package/dist/chunks/{chunk-ZJI65A2I.js → chunk-JAA35ESV.js} +9 -9
- package/dist/chunks/{chunk-MDPSEKSE.js → chunk-KZXKH3HG.js} +7 -7
- package/dist/chunks/{chunk-LABTJ43O.js → chunk-L5UUTG2B.js} +1 -1
- package/dist/chunks/{chunk-CRWBEO6C.js → chunk-NLRIE3LP.js} +1 -1
- package/dist/chunks/{chunk-Y44EF2FQ.js → chunk-PGK2XJBS.js} +5 -5
- package/dist/chunks/{chunk-K5CEAFG6.js → chunk-QOARTKAZ.js} +3 -3
- package/dist/chunks/{chunk-UJ4BDTK4.js → chunk-S5QB7DAW.js} +1 -1
- package/dist/chunks/{chunk-FCCF6WRB.js → chunk-T4ALOAS6.js} +2 -2
- package/dist/chunks/{chunk-AOLFGBHL.js → chunk-TUGNBBKK.js} +1 -1
- package/dist/chunks/{chunk-LMQGWQBU.js → chunk-TZY27V4B.js} +6 -6
- package/dist/chunks/{chunk-2R57XO3E.js → chunk-U3KF424A.js} +4 -4
- package/dist/chunks/{chunk-K3Q2ZKXX.js → chunk-UWTD357R.js} +11 -11
- package/dist/chunks/{chunk-KUKKFYBL.js → chunk-VRWOM5BR.js} +1 -1
- package/dist/chunks/{chunk-KOVTNCOH.js → chunk-W6M6P2EQ.js} +1 -1
- package/dist/chunks/{chunk-GHJPGFBJ.js → chunk-XAMLC3F2.js} +3 -1
- package/dist/chunks/{chunk-5AE2AJPB.js → chunk-XPV6YQ6K.js} +3 -3
- package/dist/chunks/{chunk-OW2UYRWT.js → chunk-XVU6JZHX.js} +4 -4
- package/dist/chunks/{chunk-BLLGD7YB.js → chunk-XYTW4AJV.js} +2 -2
- package/dist/chunks/{client-EGQ7ZVJA.js → client-DLT52G7S.js} +5 -5
- package/dist/chunks/{client-QOUD7IFI.js → client-FTBNEXXH.js} +4 -4
- package/dist/chunks/{client-4WBIMHT6.js → client-YGDSYHCF.js} +1 -1
- package/dist/chunks/{client-actions-VJI42ETY.js → client-actions-2HPN6N2L.js} +11 -11
- package/dist/chunks/{dangerous-FPXEQOHC.js → dangerous-YGJ5NLS7.js} +3 -3
- package/dist/chunks/{delete-current-file-6HBNMLIN.js → delete-current-file-TKFQ7JHF.js} +7 -7
- package/dist/chunks/{download-VA32CX7D.js → download-R6UYXOGY.js} +2 -1
- package/dist/chunks/{editor-seams-LVQQZTXY.js → editor-seams-PE55IBYK.js} +16 -16
- package/dist/chunks/{editor-store-OCFJ6OSK.js → editor-store-2TOBJOKY.js} +1 -1
- package/dist/chunks/{export-UXBQ55UP.js → export-IBGXQ6PJ.js} +3 -2
- package/dist/chunks/{export-watermark-W4NFJZ5R.js → export-watermark-SYZBR7JM.js} +7 -7
- package/dist/chunks/{eyedropper-JC2TRQLC.js → eyedropper-KOEQWLK7.js} +1 -1
- package/dist/chunks/{generate-media-MXRYY5Z7.js → generate-media-FCT2DXD6.js} +7 -7
- package/dist/chunks/{host-HOKDSH6M.js → host-ZITBQV7U.js} +12 -12
- package/dist/chunks/{integrations-JFZEDH4A.js → integrations-JWX7CAAF.js} +3 -3
- package/dist/chunks/{libraries-QRJLHRAI.js → libraries-BLVUNTNY.js} +7 -7
- package/dist/chunks/{live-MY353SSG.js → live-2K3AW6ZP.js} +1 -1
- package/dist/chunks/{media-tool-VXRJZOCS.js → media-tool-WAQY777V.js} +1 -1
- package/dist/chunks/{new-file-BWDNFNPG.js → new-file-LEZXUHJN.js} +5 -5
- package/dist/chunks/{plugin-XDQ6XTAJ.js → plugin-C7WFCF4R.js} +2 -2
- package/dist/chunks/{plugin-import-NWVUVAWV.js → plugin-import-L7PBNAHY.js} +21 -21
- package/dist/chunks/{presence-SBB3TAQV.js → presence-XT2DENNS.js} +2 -2
- package/dist/chunks/{project-ICLC536M.js → project-ZHSWMADU.js} +3 -3
- package/dist/chunks/{publish-site-TVA3X5DI.js → publish-site-TUTXQF62.js} +9 -9
- package/dist/chunks/{publish-store-JM54ZG6P.js → publish-store-MKP3IPZY.js} +5 -5
- package/dist/chunks/{raster-actions-F6AY3L6I.js → raster-actions-K4APTKT4.js} +1 -1
- package/dist/chunks/{reference-images-FB5WX5DF.js → reference-images-6GATJILY.js} +4 -3
- package/dist/chunks/{resolvers-CYLYNECW.js → resolvers-IK5EKQYF.js} +4 -3
- package/dist/chunks/{runner-7NDXCW3E.js → runner-WB35ZXXM.js} +23 -23
- package/dist/chunks/{sites-BXTU6H3M.js → sites-WUC7WJWS.js} +3 -3
- package/dist/chunks/{store-5P55BMER.js → store-Y7I5ZQGP.js} +12 -12
- package/dist/chunks/{storefront-prepare-3BRN4UCT.js → storefront-prepare-LMASPES3.js} +1 -1
- package/dist/chunks/{svg-export-7GHGZEUU.js → svg-export-PXDSGAYW.js} +4 -3
- package/dist/chunks/{sync-SN3J3F2E.js → sync-Y56X2W36.js} +7 -7
- package/dist/chunks/{tabs-JLZ3KY3J.js → tabs-EIMZ5TUF.js} +10 -10
- package/dist/chunks/{team-TB5WEX3R.js → team-2DZHY2RS.js} +3 -3
- package/dist/chunks/{team-client-RIANHJ3V.js → team-client-JJYUX7EQ.js} +3 -3
- package/dist/chunks/{templates-6O2AH4II.js → templates-E3JYI2TM.js} +2 -2
- package/dist/chunks/{theme-store-ZDMYLKPS.js → theme-store-4XFQMNWW.js} +2 -2
- package/dist/chunks/{tools-NU2CWESK.js → tools-A3FEKCDI.js} +2 -2
- package/dist/chunks/{ui-commands-JXMUHSLO.js → ui-commands-LOLMFYN6.js} +18 -18
- package/dist/chunks/{versions-PGGZ5NJX.js → versions-Q2QLWKPM.js} +7 -7
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -42,7 +42,7 @@ async function underReviewKit(doc, kit) {
|
|
|
42
42
|
return settleMeasuredLayout({ ...kitted, nodes });
|
|
43
43
|
}
|
|
44
44
|
async function renderDocument(doc, nodeIds, options) {
|
|
45
|
-
const { selectionReferenceImages } = await import("./reference-images-
|
|
45
|
+
const { selectionReferenceImages } = await import("./reference-images-6GATJILY.js");
|
|
46
46
|
if (options?.kit) {
|
|
47
47
|
doc = await underReviewKit(doc, options.kit);
|
|
48
48
|
}
|
|
@@ -59,19 +59,19 @@ async function renderDocument(doc, nodeIds, options) {
|
|
|
59
59
|
function generateCapability(ctx) {
|
|
60
60
|
return async (prompt, options = {}) => {
|
|
61
61
|
if (options.format === "audio") {
|
|
62
|
-
const { requestAudio } = await import("./client-
|
|
62
|
+
const { requestAudio } = await import("./client-DLT52G7S.js");
|
|
63
63
|
const { signal: signal2, format: _f, ...rest2 } = options;
|
|
64
64
|
void _f;
|
|
65
65
|
return requestAudio({ prompt, ...rest2 }, signal2 ?? ctx.signal);
|
|
66
66
|
}
|
|
67
67
|
if (options.format === "video") {
|
|
68
|
-
const { generateVideoFile } = await import("./generate-media-
|
|
68
|
+
const { generateVideoFile } = await import("./generate-media-FCT2DXD6.js");
|
|
69
69
|
const { format: _f, signal: signal2, ...rest2 } = options;
|
|
70
70
|
void _f;
|
|
71
71
|
return generateVideoFile({ ...rest2, prompt, doc: ctx.doc() }, { signal: signal2 ?? ctx.signal });
|
|
72
72
|
}
|
|
73
73
|
const [{ requestImage }, { effectiveImageModel, useAiStore }] = await Promise.all([
|
|
74
|
-
import("./client-
|
|
74
|
+
import("./client-DLT52G7S.js"),
|
|
75
75
|
import("./client-store-CEJDYF5V.js")
|
|
76
76
|
]);
|
|
77
77
|
const modelId = effectiveImageModel(useAiStore.getState());
|
|
@@ -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-
|
|
94
|
+
import("./editor-store-2TOBJOKY.js"),
|
|
95
95
|
import("../lib/document/photo-frames.js"),
|
|
96
|
-
import("./media-tool-
|
|
96
|
+
import("./media-tool-WAQY777V.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);
|
|
@@ -25,6 +25,17 @@ function storePlatform() {
|
|
|
25
25
|
if (/Android/.test(navigator.userAgent)) return "android";
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
|
+
async function shareFileNatively(blob, name, print = false) {
|
|
29
|
+
const t = tauri();
|
|
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
|
+
}
|
|
38
|
+
}
|
|
28
39
|
function invoke(cmd, args) {
|
|
29
40
|
const t = tauri();
|
|
30
41
|
return t ? t.core.invoke(cmd, args) : Promise.reject(new Error("Not running in the desktop app"));
|
|
@@ -48,6 +59,7 @@ function listenDesktop(event, handler) {
|
|
|
48
59
|
export {
|
|
49
60
|
isDesktop,
|
|
50
61
|
storePlatform,
|
|
62
|
+
shareFileNatively,
|
|
51
63
|
invoke,
|
|
52
64
|
listenDesktop
|
|
53
65
|
};
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
needsSelection,
|
|
9
9
|
pageGo,
|
|
10
10
|
selectionIsPicture
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2BP3AABU.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-
|
|
34
|
+
var store = () => import("./editor-store-2TOBJOKY.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-
|
|
164
|
+
(await import("./theme-store-4XFQMNWW.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-
|
|
170
|
+
await (await import("./buy-credits-IHQRC7SF.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-
|
|
216
|
+
else (await import("./store-Y7I5ZQGP.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-
|
|
295
|
+
const { placeMediaFromPicker } = await import("./media-tool-WAQY777V.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-
|
|
299
|
+
const { beginEyedrop } = await import("./eyedropper-KOEQWLK7.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-
|
|
317
|
+
const { flattenSelectionToPaintLayer } = await import("./raster-actions-K4APTKT4.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-
|
|
409
|
+
(await import("./theme-store-4XFQMNWW.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-
|
|
428
|
+
await (await import("./host-ZITBQV7U.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-
|
|
460
|
+
void import("./theme-store-4XFQMNWW.js").then(({ useThemeStore, pickableThemes }) => {
|
|
461
461
|
const sync = () => registerCommand(themeCommand(pickableThemes(useThemeStore.getState())));
|
|
462
462
|
sync();
|
|
463
463
|
useThemeStore.subscribe(sync);
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
hostEnv,
|
|
10
10
|
plain,
|
|
11
11
|
registerBuiltinCommands
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2BP3AABU.js";
|
|
13
13
|
import {
|
|
14
14
|
storeOpsSeam
|
|
15
15
|
} from "./chunk-B5RUQ57B.js";
|
|
@@ -570,9 +570,9 @@ var commands = [
|
|
|
570
570
|
// saves (the Ecommerce plugin's Shopify theme), so a target is written once, here, and never again in a plugin.
|
|
571
571
|
run: async (p, ctx) => {
|
|
572
572
|
const [{ storefrontInputs }, { STOREFRONT_TARGETS }, { bytesOf }, { zipFiles }, { EXPORT_NODE_CAP }] = await Promise.all([
|
|
573
|
-
import("./storefront-prepare-
|
|
573
|
+
import("./storefront-prepare-LMASPES3.js"),
|
|
574
574
|
import("./storefront-SXLAZPLE.js"),
|
|
575
|
-
import("./project-
|
|
575
|
+
import("./project-ZHSWMADU.js"),
|
|
576
576
|
import("./zip-export-BWJF6HFA.js"),
|
|
577
577
|
import("./tree-DQJVVVRL.js")
|
|
578
578
|
]);
|
|
@@ -769,7 +769,7 @@ var pluginRun = defineCommand({
|
|
|
769
769
|
}
|
|
770
770
|
},
|
|
771
771
|
run: async (p, ctx) => {
|
|
772
|
-
const { runPlugin } = await import("./host-
|
|
772
|
+
const { runPlugin } = await import("./host-ZITBQV7U.js");
|
|
773
773
|
await runPlugin(p.pluginId, p.commandId);
|
|
774
774
|
ctx.notice(`Started ${p.pluginId}.`);
|
|
775
775
|
return {
|
|
@@ -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-
|
|
9
|
+
} from "./chunk-L5UUTG2B.js";
|
|
10
10
|
import {
|
|
11
11
|
exportNodeToSVG
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VRWOM5BR.js";
|
|
13
13
|
import {
|
|
14
14
|
exportNodeToBlob
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XPV6YQ6K.js";
|
|
16
16
|
import {
|
|
17
17
|
syncStatus
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-PGK2XJBS.js";
|
|
19
19
|
import {
|
|
20
20
|
downloadBlob
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-4BR2ZFTJ.js";
|
|
22
22
|
import {
|
|
23
23
|
setPluginTabs,
|
|
24
24
|
useEditorStore
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-TZY27V4B.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-
|
|
57
|
+
const { dispatchPluginCall } = await import("./plugin-C7WFCF4R.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-
|
|
381
|
+
const { createFreshFileOrExplain } = await import("./new-file-LEZXUHJN.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-
|
|
541
|
+
const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-L7PBNAHY.js");
|
|
542
542
|
if (d.ir && typeof d.ir === "object") {
|
|
543
543
|
await applyPluginLayoutIr(d.ir, { mode, name });
|
|
544
544
|
return;
|
|
@@ -20,26 +20,26 @@ import {
|
|
|
20
20
|
} from "./chunk-RXRCU3ZP.js";
|
|
21
21
|
import {
|
|
22
22
|
notice
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-XVU6JZHX.js";
|
|
24
24
|
import {
|
|
25
25
|
agentContext
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-5BO7NK4J.js";
|
|
27
27
|
import {
|
|
28
28
|
collabSession,
|
|
29
29
|
syncStatus
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-PGK2XJBS.js";
|
|
31
31
|
import {
|
|
32
32
|
loadEntitlements
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-2P2CAUXE.js";
|
|
34
34
|
import {
|
|
35
35
|
cloudApi
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-W6M6P2EQ.js";
|
|
37
37
|
import {
|
|
38
38
|
isDesktop
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-D7JUNOBH.js";
|
|
40
40
|
import {
|
|
41
41
|
useEditorStore
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-TZY27V4B.js";
|
|
43
43
|
import {
|
|
44
44
|
plansEnabled
|
|
45
45
|
} from "./chunk-PY6X3RM3.js";
|
|
@@ -14,22 +14,22 @@ import {
|
|
|
14
14
|
newFileRefusal,
|
|
15
15
|
reportNewFileBlocked,
|
|
16
16
|
setCloudLink
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-2P2CAUXE.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-
|
|
24
|
+
} from "./chunk-QOARTKAZ.js";
|
|
25
25
|
import {
|
|
26
26
|
ApiError,
|
|
27
27
|
api,
|
|
28
28
|
cloudApi
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-W6M6P2EQ.js";
|
|
30
30
|
import {
|
|
31
31
|
attachPresence
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-S5QB7DAW.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-
|
|
43
|
+
} from "./chunk-TZY27V4B.js";
|
|
44
44
|
import {
|
|
45
45
|
accessToken,
|
|
46
46
|
cloudUser,
|
|
@@ -7,7 +7,7 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
cloudApi,
|
|
9
9
|
invalidateMe
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-W6M6P2EQ.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-
|
|
123
|
+
const { cloudApi: cloudApi2 } = await import("./api-QCQ5M4FF.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-
|
|
143
|
+
void import("./sync-Y56X2W36.js").then(({ onSyncStatus, syncStatus }) => {
|
|
144
144
|
linkedKey = syncStatus().link?.key ?? null;
|
|
145
145
|
void followFileTeam(linkedKey);
|
|
146
146
|
onSyncStatus((_s, link) => {
|
|
@@ -6,10 +6,10 @@ const __filename = __popcraftPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __popcraftDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
activeHyperyTeamId
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QOARTKAZ.js";
|
|
10
10
|
import {
|
|
11
11
|
inAppPurchases
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-W6M6P2EQ.js";
|
|
13
13
|
import {
|
|
14
14
|
accessToken
|
|
15
15
|
} from "./chunk-PY6X3RM3.js";
|
|
@@ -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-
|
|
4579
|
+
void import("./presence-XT2DENNS.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-
|
|
6632
|
+
const { duplicateDocumentToCloud } = await import("./sync-Y56X2W36.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-
|
|
10085
|
-
import("./editor-seams-
|
|
10086
|
-
import("./live-
|
|
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")
|
|
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-
|
|
10102
|
+
const [{ searchTemplates, fetchCloudTemplate }, { documentFromTemplate }, { prepareTemplate }] = await Promise.all([import("./templates-E3JYI2TM.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
|
} from "./chunk-OO74OZOI.js";
|
|
14
14
|
import {
|
|
15
15
|
notice
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XVU6JZHX.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-
|
|
24
|
+
} from "./chunk-TZY27V4B.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-
|
|
1480
|
+
const { runTurn } = await import("./runner-WB35ZXXM.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-
|
|
1583
|
+
void import("./runner-WB35ZXXM.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);
|
|
@@ -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-
|
|
9
|
+
} from "./chunk-IQLPAQXV.js";
|
|
10
10
|
import {
|
|
11
11
|
fileCommands,
|
|
12
12
|
fontTeamRemove,
|
|
13
13
|
integrationConfirmCommands,
|
|
14
14
|
mediaDelete,
|
|
15
15
|
publishCommands
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2BP3AABU.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-
|
|
58
|
+
const { setSpotlight } = await import("./presence-XT2DENNS.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-
|
|
85
|
+
const { useEditorStore } = await import("./editor-store-2TOBJOKY.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-
|
|
149
|
+
const { useEditorStore } = await import("./editor-store-2TOBJOKY.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-
|
|
193
|
+
const { publishLibrary } = await import("./libraries-BLVUNTNY.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-
|
|
225
|
+
const { unpublishLibrary } = await import("./libraries-BLVUNTNY.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-
|
|
238
|
-
import("./versions-
|
|
237
|
+
import("./editor-store-2TOBJOKY.js"),
|
|
238
|
+
import("./versions-Q2QLWKPM.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-
|
|
271
|
+
const { restoreVersion } = await import("./versions-Q2QLWKPM.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-
|
|
296
|
+
const { deleteVersion } = await import("./versions-Q2QLWKPM.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 } };
|
|
@@ -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-
|
|
9
|
+
} from "./chunk-T4ALOAS6.js";
|
|
10
10
|
import {
|
|
11
11
|
aiAvailability,
|
|
12
12
|
effectiveChatModel,
|
|
@@ -75,6 +75,8 @@ var AiClientError = class extends Error {
|
|
|
75
75
|
this.code = code;
|
|
76
76
|
this.status = status;
|
|
77
77
|
}
|
|
78
|
+
code;
|
|
79
|
+
status;
|
|
78
80
|
};
|
|
79
81
|
var needsReauth = (e) => e instanceof AiClientError && (e.code === "ai_reauth" || e.code === "ai_scope" || e.code === "unauthenticated");
|
|
80
82
|
function ensureAvailable() {
|
|
@@ -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-
|
|
9
|
+
} from "./chunk-4BR2ZFTJ.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-
|
|
130
|
+
const { exportNodeToSVG } = await import("./svg-export-PXDSGAYW.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-
|
|
152
|
+
const { exportNodeToSVG } = await import("./svg-export-PXDSGAYW.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
|
}
|