@popcraft/kit 0.13.1 → 0.13.2
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-GAQVC5Y2.js → agent-HSXS4GKB.js} +1 -1
- package/dist/chunks/{builtin-5MXEXHZ7.js → builtin-YURQN77F.js} +3 -3
- package/dist/chunks/{check-template-SOQKHVZM.js → check-template-5U6PGVTP.js} +2 -2
- package/dist/chunks/{chunk-UQD7UG4X.js → chunk-5ONL777I.js} +5 -5
- package/dist/chunks/{chunk-F3QWKSFQ.js → chunk-ALT6ETRT.js} +3 -3
- package/dist/chunks/{chunk-7NCF6O4C.js → chunk-BD6252CM.js} +5 -5
- package/dist/chunks/{chunk-W3NGD7R3.js → chunk-HDYLDHNP.js} +2 -2
- package/dist/chunks/{chunk-YALTSTZT.js → chunk-JBZTBRV2.js} +7 -7
- package/dist/chunks/{chunk-RQP2MBM2.js → chunk-JIQATDNG.js} +0 -2
- package/dist/chunks/{chunk-5DXQSJFE.js → chunk-JK3P545Q.js} +23 -23
- package/dist/chunks/{chunk-S4NA6QCH.js → chunk-KKHYG4BA.js} +1 -1
- package/dist/chunks/{chunk-LRYTXKJU.js → chunk-LUDCYNXO.js} +3 -3
- package/dist/chunks/{chunk-R5YE2EW4.js → chunk-NKXN523O.js} +4 -4
- package/dist/chunks/{chunk-262FQ5R2.js → chunk-OBI7ICHS.js} +2 -2
- package/dist/chunks/{chunk-DN7WLVHA.js → chunk-PKRWF3FG.js} +2 -2
- package/dist/chunks/{chunk-7YV5KBWW.js → chunk-QLZ7GVKY.js} +11 -11
- package/dist/chunks/{chunk-NATENLGI.js → chunk-TV37FSRO.js} +2 -2
- package/dist/chunks/{chunk-N4T5CEPP.js → chunk-W3WJAAPP.js} +1 -1
- package/dist/chunks/{chunk-3VNJ3HRN.js → chunk-WSI2P3UY.js} +5 -5
- package/dist/chunks/{chunk-BPUAVS5A.js → chunk-YAODRFLE.js} +1 -1
- package/dist/chunks/{client-EFHISFKD.js → client-JKTGMAOY.js} +2 -2
- package/dist/chunks/{client-ZMLWUMZ4.js → client-OB2WJKLV.js} +1 -1
- package/dist/chunks/{client-LLFX6EUY.js → client-VNXJDJQ2.js} +1 -1
- package/dist/chunks/{client-actions-PJL3DGUA.js → client-actions-HNOV4BCR.js} +3 -3
- package/dist/chunks/{dangerous-M32FECRK.js → dangerous-3AOCE4J3.js} +3 -3
- package/dist/chunks/{editor-seams-DNC64D4X.js → editor-seams-F3JQCRXO.js} +8 -8
- package/dist/chunks/{editor-store-DEUUM6FV.js → editor-store-GEWWIL5L.js} +1 -1
- package/dist/chunks/{export-watermark-L6QWWQNI.js → export-watermark-NFSW5BER.js} +4 -4
- package/dist/chunks/{eyedropper-3NVLMUBC.js → eyedropper-XHN4BIZF.js} +1 -1
- package/dist/chunks/{generate-media-VBKWJNKC.js → generate-media-4VRGEZ3S.js} +1 -1
- package/dist/chunks/{host-RAHNLTXF.js → host-QPZQ3DGP.js} +5 -5
- package/dist/chunks/{libraries-W7YKBGZP.js → libraries-RV7VDQX7.js} +4 -4
- package/dist/chunks/{live-FGCKWVN5.js → live-S4UUTCME.js} +1 -1
- package/dist/chunks/{media-tool-YNOTVMOC.js → media-tool-4VZHXWBJ.js} +4 -2
- package/dist/chunks/{new-file-H7QRBNEO.js → new-file-QHFAQEUS.js} +2 -2
- package/dist/chunks/{plugin-6T7OBLHW.js → plugin-U7XJNXQ4.js} +2 -2
- package/dist/chunks/{plugin-import-P3NOZZM2.js → plugin-import-H6DI4P2P.js} +12 -12
- package/dist/chunks/{presence-ADIDQM3Y.js → presence-7QZFBELH.js} +2 -2
- package/dist/chunks/{project-ZY2XASS6.js → project-XYBSLADA.js} +1 -1
- package/dist/chunks/{publish-site-3ZWNVCXJ.js → publish-site-E5MYTXPF.js} +5 -5
- package/dist/chunks/{raster-actions-TCYZDOT6.js → raster-actions-ZPZ33SPN.js} +1 -1
- package/dist/chunks/{runner-2Z5LXJYK.js → runner-NIIOKKHQ.js} +15 -15
- package/dist/chunks/{store-7B6MPMQZ.js → store-CMSN4LPO.js} +4 -4
- package/dist/chunks/{sync-FWHDITLR.js → sync-IFTULJVS.js} +4 -4
- package/dist/chunks/{tabs-QTO2WLNC.js → tabs-NIIUP4VU.js} +7 -7
- package/dist/chunks/{tools-MLNHKXC2.js → tools-FP65DHK6.js} +2 -2
- package/dist/chunks/{ui-commands-LNZYEN7S.js → ui-commands-NFT6QVLY.js} +10 -10
- package/dist/chunks/{versions-5DRX7URC.js → versions-OSQXNPBJ.js} +4 -4
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -7,8 +7,8 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
builtinTools,
|
|
9
9
|
registerBuiltinTools
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-OBI7ICHS.js";
|
|
11
|
+
import "./chunk-JK3P545Q.js";
|
|
12
12
|
import "./chunk-QQW4K7KP.js";
|
|
13
13
|
import "./chunk-XZPCQNUJ.js";
|
|
14
14
|
import "./chunk-3OSFIVJN.js";
|
|
@@ -19,7 +19,7 @@ import "./chunk-62DJISQO.js";
|
|
|
19
19
|
import "./chunk-74QJ4O4O.js";
|
|
20
20
|
import "./chunk-M7QFHLLS.js";
|
|
21
21
|
import "./chunk-YGCRLHAU.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-ALT6ETRT.js";
|
|
23
23
|
import "./chunk-55XWHCJQ.js";
|
|
24
24
|
import "./chunk-QF754BFD.js";
|
|
25
25
|
import "./chunk-BP6IY2JS.js";
|
|
@@ -6,10 +6,10 @@ const __filename = __popcraftPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __popcraftDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
appCommands
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JBZTBRV2.js";
|
|
10
10
|
import {
|
|
11
11
|
builtinCommands
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JK3P545Q.js";
|
|
13
13
|
import "./chunk-QQW4K7KP.js";
|
|
14
14
|
import "./chunk-XZPCQNUJ.js";
|
|
15
15
|
import "./chunk-3OSFIVJN.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-L3TENWLA.js";
|
|
16
16
|
import {
|
|
17
17
|
syncStatus
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LUDCYNXO.js";
|
|
19
19
|
import {
|
|
20
20
|
downloadBlob
|
|
21
21
|
} from "./chunk-MFG5DGY4.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
import {
|
|
26
26
|
setPluginTabs,
|
|
27
27
|
useEditorStore
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-BD6252CM.js";
|
|
29
29
|
import {
|
|
30
30
|
TOKEN_IDS,
|
|
31
31
|
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-U7XJNXQ4.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-QHFAQEUS.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-H6DI4P2P.js");
|
|
542
542
|
if (d.ir && typeof d.ir === "object") {
|
|
543
543
|
await applyPluginLayoutIr(d.ir, { mode, name });
|
|
544
544
|
return;
|
|
@@ -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-OB2WJKLV.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-4VRGEZ3S.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-OB2WJKLV.js"),
|
|
75
75
|
import("./client-store-QYLVXRLB.js")
|
|
76
76
|
]);
|
|
77
77
|
const modelId = effectiveImageModel(useAiStore.getState());
|
|
@@ -4572,7 +4572,7 @@ function createPopcornSlice(set2, get2) {
|
|
|
4572
4572
|
privateMode: false,
|
|
4573
4573
|
setPrivateMode: (on) => {
|
|
4574
4574
|
set2({ privateMode: on });
|
|
4575
|
-
void import("./presence-
|
|
4575
|
+
void import("./presence-7QZFBELH.js").then((m) => m.setPresencePrivate(on)).catch(() => {
|
|
4576
4576
|
});
|
|
4577
4577
|
},
|
|
4578
4578
|
/** Reveal every private item THIS user created (they sync to collaborators). Others' stay theirs. */
|
|
@@ -6619,7 +6619,7 @@ var useEditorStore = create()(
|
|
|
6619
6619
|
// A copy is a new file, so it is cloud-backed like any other (see lib/client/cloud/new-file.ts).
|
|
6620
6620
|
// Returns '' when it was refused (offline, signed out, plan full) or failed; nothing is left behind.
|
|
6621
6621
|
duplicateDocument: async (id) => {
|
|
6622
|
-
const { duplicateDocumentToCloud } = await import("./sync-
|
|
6622
|
+
const { duplicateDocumentToCloud } = await import("./sync-IFTULJVS.js");
|
|
6623
6623
|
return duplicateDocumentToCloud(id);
|
|
6624
6624
|
},
|
|
6625
6625
|
deleteDocument: async (id) => {
|
|
@@ -10071,9 +10071,9 @@ if (typeof window !== "undefined") {
|
|
|
10071
10071
|
if (typeof window !== "undefined" && navigator.webdriver) {
|
|
10072
10072
|
window.__vpDesign = async (script, o = {}) => {
|
|
10073
10073
|
const [{ registerBuiltinTools, runTool }, { editorToolContext }, { createDesignPreview }] = await Promise.all([
|
|
10074
|
-
import("./tools-
|
|
10075
|
-
import("./editor-seams-
|
|
10076
|
-
import("./live-
|
|
10074
|
+
import("./tools-FP65DHK6.js").then(async (m) => ({ ...m, registerBuiltinTools: (await import("./builtin-YURQN77F.js")).registerBuiltinTools })),
|
|
10075
|
+
import("./editor-seams-F3JQCRXO.js"),
|
|
10076
|
+
import("./live-S4UUTCME.js")
|
|
10077
10077
|
]);
|
|
10078
10078
|
registerBuiltinTools();
|
|
10079
10079
|
const args = JSON.stringify({ ...o.name ? { name: o.name } : {}, ...o.size ? { size: o.size } : {}, ...o.frame ? { frame: o.frame } : {}, script });
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
hostEnv,
|
|
10
10
|
plain,
|
|
11
11
|
registerBuiltinCommands
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JK3P545Q.js";
|
|
13
13
|
import {
|
|
14
14
|
storeOpsSeam
|
|
15
15
|
} from "./chunk-KKBDAX5F.js";
|
|
@@ -692,7 +692,7 @@ var pluginRun = defineCommand({
|
|
|
692
692
|
}
|
|
693
693
|
},
|
|
694
694
|
run: async (p, ctx) => {
|
|
695
|
-
const { runPlugin } = await import("./host-
|
|
695
|
+
const { runPlugin } = await import("./host-QPZQ3DGP.js");
|
|
696
696
|
await runPlugin(p.pluginId, p.commandId);
|
|
697
697
|
ctx.notice(`Started ${p.pluginId}.`);
|
|
698
698
|
return {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
needsSelection,
|
|
9
9
|
pageGo,
|
|
10
10
|
selectionIsPicture
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JK3P545Q.js";
|
|
12
12
|
import {
|
|
13
13
|
external_exports
|
|
14
14
|
} from "./chunk-YGCRLHAU.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-GEWWIL5L.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({
|
|
@@ -209,7 +209,7 @@ var aiOpen = defineCommand({
|
|
|
209
209
|
] } },
|
|
210
210
|
run: async ({ dialog, skillId }) => {
|
|
211
211
|
if (dialog) (await import("./client-store-QYLVXRLB.js")).openAiDialog(dialog);
|
|
212
|
-
else (await import("./store-
|
|
212
|
+
else (await import("./store-CMSN4LPO.js")).openAgentPanel({ skillId: skillId ?? null });
|
|
213
213
|
return { summary: dialog ? `Opened AI ${dialog}` : "Opened the agent" };
|
|
214
214
|
}
|
|
215
215
|
});
|
|
@@ -288,11 +288,11 @@ var toolPlace = defineCommand({
|
|
|
288
288
|
run: async ({ what }) => {
|
|
289
289
|
if (what === "media") {
|
|
290
290
|
const s = await store();
|
|
291
|
-
const { placeMediaFromPicker } = await import("./media-tool-
|
|
291
|
+
const { placeMediaFromPicker } = await import("./media-tool-4VZHXWBJ.js");
|
|
292
292
|
await placeMediaFromPicker({ kind: "point", x: s.camera.x, y: s.camera.y });
|
|
293
293
|
return { summary: "Placing media" };
|
|
294
294
|
}
|
|
295
|
-
const { beginEyedrop } = await import("./eyedropper-
|
|
295
|
+
const { beginEyedrop } = await import("./eyedropper-XHN4BIZF.js");
|
|
296
296
|
void beginEyedrop();
|
|
297
297
|
return { summary: "Pick a color" };
|
|
298
298
|
}
|
|
@@ -310,7 +310,7 @@ var nodeRasterize = defineCommand({
|
|
|
310
310
|
keywords: ["rasterize", "raster", "flatten", "pixels", "paint layer", "erase", "bitmap"]
|
|
311
311
|
} },
|
|
312
312
|
run: async () => {
|
|
313
|
-
const { flattenSelectionToPaintLayer } = await import("./raster-actions-
|
|
313
|
+
const { flattenSelectionToPaintLayer } = await import("./raster-actions-ZPZ33SPN.js");
|
|
314
314
|
await flattenSelectionToPaintLayer();
|
|
315
315
|
return { summary: "Rasterized" };
|
|
316
316
|
}
|
|
@@ -421,7 +421,7 @@ function pluginCommand(plugins) {
|
|
|
421
421
|
params: external_exports.object({ pluginId: external_exports.string(), commandId: external_exports.string() }),
|
|
422
422
|
expose: { ui: { label: "Run plugin", keywords: ["plugin", "extension", "run"], variants, palette: variants.length ? void 0 : false } },
|
|
423
423
|
run: async ({ pluginId, commandId }) => {
|
|
424
|
-
await (await import("./host-
|
|
424
|
+
await (await import("./host-QPZQ3DGP.js")).runPlugin(pluginId, commandId);
|
|
425
425
|
return { summary: "Plugin started" };
|
|
426
426
|
}
|
|
427
427
|
});
|
|
@@ -95,8 +95,6 @@ var AiClientError = class extends Error {
|
|
|
95
95
|
this.code = code;
|
|
96
96
|
this.status = status;
|
|
97
97
|
}
|
|
98
|
-
code;
|
|
99
|
-
status;
|
|
100
98
|
};
|
|
101
99
|
var needsReauth = (e) => e instanceof AiClientError && (e.code === "ai_reauth" || e.code === "ai_scope" || e.code === "unauthenticated");
|
|
102
100
|
function ensureAvailable() {
|
|
@@ -847,7 +847,7 @@ init_scene_graph();
|
|
|
847
847
|
var licence = external_exports.enum(["commercial", "any"]).optional().describe("commercial (default): only licences that allow commercial use and edits (CC0, public domain, CC BY, CC BY-SA). any: every Creative Commons licence, including NC and ND.");
|
|
848
848
|
var brief2 = (p) => ({ id: p.id, title: p.title, creator: p.credit.creator, licence: licenceLabel(p.credit), width: p.width, height: p.height, source: p.credit.sourceUrl });
|
|
849
849
|
async function placeImportedPicture(ctx, imported, at, what, extra = {}) {
|
|
850
|
-
const client = await import("./client-
|
|
850
|
+
const client = await import("./client-VNXJDJQ2.js");
|
|
851
851
|
if (at.fillLayerId) {
|
|
852
852
|
const doc2 = ctx.doc();
|
|
853
853
|
const target = nodeOrThrow(doc2, at.fillLayerId);
|
|
@@ -893,7 +893,7 @@ var photoSearch = defineCommand({
|
|
|
893
893
|
}
|
|
894
894
|
},
|
|
895
895
|
run: async (args) => {
|
|
896
|
-
const { searchStockPhotos } = await import("./client-
|
|
896
|
+
const { searchStockPhotos } = await import("./client-VNXJDJQ2.js");
|
|
897
897
|
const page = await searchStockPhotos(args.query, args.page ?? 1, { licence: args.licence });
|
|
898
898
|
return {
|
|
899
899
|
summary: `${page.results.length} photo${page.results.length === 1 ? "" : "s"} for \u201C${page.query}\u201D (page ${page.page} of ${page.pageCount || 1})`,
|
|
@@ -927,7 +927,7 @@ var photoInsert = defineCommand({
|
|
|
927
927
|
run: async (args, ctx) => {
|
|
928
928
|
if (!args.id && !args.query) throw new ToolError("Pass an id from search_photos, or a query.");
|
|
929
929
|
if (args.id && !isPhotoId(args.id)) throw new ToolError(`"${args.id}" is not a photo id from search_photos.`);
|
|
930
|
-
const client = await import("./client-
|
|
930
|
+
const client = await import("./client-VNXJDJQ2.js");
|
|
931
931
|
let photo;
|
|
932
932
|
if (args.id) photo = await client.stockPhotoInfo(args.id);
|
|
933
933
|
else {
|
|
@@ -965,7 +965,7 @@ var mediaList = defineCommand({
|
|
|
965
965
|
}
|
|
966
966
|
},
|
|
967
967
|
run: async (args) => {
|
|
968
|
-
const { listLibraryMedia } = await import("./client-
|
|
968
|
+
const { listLibraryMedia } = await import("./client-JKTGMAOY.js");
|
|
969
969
|
const page = await listLibraryMedia(args);
|
|
970
970
|
return { summary: `${page.items.length} media item${page.items.length === 1 ? "" : "s"}${page.nextCursor ? " (more)" : ""}`, data: { workspaceId: page.workspaceId, items: page.items.map(brief3), nextCursor: page.nextCursor } };
|
|
971
971
|
}
|
|
@@ -996,7 +996,7 @@ var mediaInsert = defineCommand({
|
|
|
996
996
|
run: async (args, ctx) => {
|
|
997
997
|
const contentType = args.contentType ?? "image/*";
|
|
998
998
|
if (!contentType.startsWith("image/")) throw new ToolError("insert_media places pictures; this item is not one.");
|
|
999
|
-
const { importLibraryPicture } = await import("./client-
|
|
999
|
+
const { importLibraryPicture } = await import("./client-JKTGMAOY.js");
|
|
1000
1000
|
const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "Media", contentType, size: 0, createdAt: "", fileCount: 1, source: null };
|
|
1001
1001
|
const imported = await importLibraryPicture(item);
|
|
1002
1002
|
return placeImportedPicture(ctx, imported, args, `\u201C${imported.name}\u201D`, { hash: imported.hash });
|
|
@@ -1017,7 +1017,7 @@ var mediaDownload = defineCommand({
|
|
|
1017
1017
|
// The Library's right-click menu: saves the item's file to the computer.
|
|
1018
1018
|
expose: { ui: { label: "Download", palette: false } },
|
|
1019
1019
|
run: async (args) => {
|
|
1020
|
-
const { libraryBlob, libraryFileName } = await import("./client-
|
|
1020
|
+
const { libraryBlob, libraryFileName } = await import("./client-JKTGMAOY.js");
|
|
1021
1021
|
const { downloadBlob } = await import("./download-PEVU3YCY.js");
|
|
1022
1022
|
const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "media", contentType: args.contentType ?? "", size: 0, createdAt: "", fileCount: 1, source: null };
|
|
1023
1023
|
const blob = await libraryBlob(item);
|
|
@@ -1048,7 +1048,7 @@ var mediaDelete = defineCommand({
|
|
|
1048
1048
|
}
|
|
1049
1049
|
},
|
|
1050
1050
|
run: async (args) => {
|
|
1051
|
-
const { deleteLibraryMedia } = await import("./client-
|
|
1051
|
+
const { deleteLibraryMedia } = await import("./client-JKTGMAOY.js");
|
|
1052
1052
|
const out = await deleteLibraryMedia(args.workspace, args.hash);
|
|
1053
1053
|
return { summary: `Deleted it from the library (it was in ${out.files} file${out.files === 1 ? "" : "s"})`, data: out };
|
|
1054
1054
|
}
|
|
@@ -1062,7 +1062,7 @@ async function signedIn() {
|
|
|
1062
1062
|
}
|
|
1063
1063
|
async function publishedFile() {
|
|
1064
1064
|
await signedIn();
|
|
1065
|
-
const { openFileKey } = await import("./publish-site-
|
|
1065
|
+
const { openFileKey } = await import("./publish-site-E5MYTXPF.js");
|
|
1066
1066
|
const key = openFileKey();
|
|
1067
1067
|
if (!key) throw new CommandError("This file is not saved to the cloud yet, so it has no site. Publish it first.", "failed");
|
|
1068
1068
|
return key;
|
|
@@ -1098,7 +1098,7 @@ var publishSite = defineCommand({
|
|
|
1098
1098
|
const { cleanSlug } = await import("./rules-XARXIK27.js");
|
|
1099
1099
|
const address = p.address === void 0 ? void 0 : cleanSlug(p.address);
|
|
1100
1100
|
if (address === null) throw new CommandError("That cannot be a site address: use 3 to 40 letters, digits and dashes.", "invalid_params");
|
|
1101
|
-
const { publishOpenFile, NoScreens } = await import("./publish-site-
|
|
1101
|
+
const { publishOpenFile, NoScreens } = await import("./publish-site-E5MYTXPF.js");
|
|
1102
1102
|
try {
|
|
1103
1103
|
const done = await publishOpenFile(address);
|
|
1104
1104
|
ctx.notice(`Published version ${done.version}: ${done.url}`);
|
|
@@ -1153,7 +1153,7 @@ var publishStatus = defineCommand({
|
|
|
1153
1153
|
},
|
|
1154
1154
|
run: async () => {
|
|
1155
1155
|
await signedIn();
|
|
1156
|
-
const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-
|
|
1156
|
+
const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-E5MYTXPF.js"), import("./sites-CZ54XOVT.js")]);
|
|
1157
1157
|
const key = openFileKey();
|
|
1158
1158
|
const status = await siteStatus(key);
|
|
1159
1159
|
const site = status.site;
|
|
@@ -1227,7 +1227,7 @@ var integrationOpen = defineCommand({
|
|
|
1227
1227
|
}
|
|
1228
1228
|
});
|
|
1229
1229
|
async function openFile() {
|
|
1230
|
-
const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-OUTYCM5Q.js"), import("./publish-site-
|
|
1230
|
+
const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-OUTYCM5Q.js"), import("./publish-site-E5MYTXPF.js")]);
|
|
1231
1231
|
if (!cloudUser()) throw new CommandError("You are not signed in.", "denied");
|
|
1232
1232
|
const key = openFileKey();
|
|
1233
1233
|
if (!key) throw new CommandError("This file is not saved to the cloud yet. Publish it first (publish_site).", "failed");
|
|
@@ -1435,7 +1435,7 @@ var integrationConfirmCommands = [integrationAddDestination, integrationDeploy,
|
|
|
1435
1435
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
1436
1436
|
async function cloudFile() {
|
|
1437
1437
|
const [{ syncStatus }, { cloudUser }] = await Promise.all([
|
|
1438
|
-
import("./sync-
|
|
1438
|
+
import("./sync-IFTULJVS.js"),
|
|
1439
1439
|
import("./session-OUTYCM5Q.js")
|
|
1440
1440
|
]);
|
|
1441
1441
|
const link2 = syncStatus().link;
|
|
@@ -1587,11 +1587,11 @@ var fileDuplicate = defineCommand({
|
|
|
1587
1587
|
},
|
|
1588
1588
|
run: async (_p, ctx) => {
|
|
1589
1589
|
const [{ syncStatus }, { cloudApi }, { isDesktopTabs }, { createFileInTab }, { openNewCloudFile }, { v4: uuid }] = await Promise.all([
|
|
1590
|
-
import("./sync-
|
|
1590
|
+
import("./sync-IFTULJVS.js"),
|
|
1591
1591
|
import("./api-NRXCTQNR.js"),
|
|
1592
1592
|
import("./tab-mode-6FXTPMXZ.js"),
|
|
1593
|
-
import("./tabs-
|
|
1594
|
-
import("./sync-
|
|
1593
|
+
import("./tabs-NIIUP4VU.js"),
|
|
1594
|
+
import("./sync-IFTULJVS.js"),
|
|
1595
1595
|
import("./dist-node-ADQ7FRYM.js")
|
|
1596
1596
|
]);
|
|
1597
1597
|
const doc2 = ctx.doc();
|
|
@@ -4098,7 +4098,7 @@ var viewCopyLink = defineCommand({
|
|
|
4098
4098
|
},
|
|
4099
4099
|
run: async (args, ctx) => {
|
|
4100
4100
|
const [{ syncStatus }, { fileUrl }, { withDeepLink }] = await Promise.all([
|
|
4101
|
-
import("./sync-
|
|
4101
|
+
import("./sync-IFTULJVS.js"),
|
|
4102
4102
|
import("./api-NRXCTQNR.js"),
|
|
4103
4103
|
import("./deep-link-KC3M76T5.js")
|
|
4104
4104
|
]);
|
|
@@ -4423,7 +4423,7 @@ var pageGo = defineCommand({
|
|
|
4423
4423
|
] }
|
|
4424
4424
|
},
|
|
4425
4425
|
run: async ({ to }) => {
|
|
4426
|
-
const { useEditorStore } = await import("./editor-store-
|
|
4426
|
+
const { useEditorStore } = await import("./editor-store-GEWWIL5L.js");
|
|
4427
4427
|
useEditorStore.getState().goToPrintPage(to);
|
|
4428
4428
|
return { summary: typeof to === "number" ? `Page ${to + 1}` : `${to} page` };
|
|
4429
4429
|
}
|
|
@@ -4457,7 +4457,7 @@ var pageSetup = defineCommand({
|
|
|
4457
4457
|
}
|
|
4458
4458
|
},
|
|
4459
4459
|
run: async (args) => {
|
|
4460
|
-
const { useEditorStore } = await import("./editor-store-
|
|
4460
|
+
const { useEditorStore } = await import("./editor-store-GEWWIL5L.js");
|
|
4461
4461
|
useEditorStore.getState().applyPageSetup(args);
|
|
4462
4462
|
return { summary: `Page setup updated${args.kind ? ` (${args.kind.toLowerCase()})` : ""}` };
|
|
4463
4463
|
}
|
|
@@ -5565,7 +5565,7 @@ async function runAnimationExport(format, args, ctx) {
|
|
|
5565
5565
|
const filename = exportFileName(args.filename || targetName(doc2, target), format);
|
|
5566
5566
|
const [{ exportAnimation }, { memoryDestination }] = await Promise.all([import("./video-36RXH7NB.js"), import("./destination-7ZR74ICN.js")]);
|
|
5567
5567
|
if (format === "lottie" || format === "dotlottie") return runLottieExport(renderer, doc2, spec, filename, ctx, memoryDestination, args.stateMachine);
|
|
5568
|
-
const planWatermark = format !== "png" && await (await import("./export-watermark-
|
|
5568
|
+
const planWatermark = format !== "png" && await (await import("./export-watermark-NFSW5BER.js")).exportWatermark();
|
|
5569
5569
|
if (format !== "png") spec = { ...spec, watermark: planWatermark || args.watermark !== false };
|
|
5570
5570
|
const dest = ctx.destination ? await ctx.destination(filename, FORMAT_MIME[format]) : memoryDestination(filename, FORMAT_MIME[format]);
|
|
5571
5571
|
let stats;
|
|
@@ -5652,7 +5652,7 @@ var exportLottie = animationCommand((args) => args.container === "lottie" ? "dot
|
|
|
5652
5652
|
var EXPORT_NODE_CAP = 2e4;
|
|
5653
5653
|
async function exportSite(doc2, pageId2, packaging, styling = "css") {
|
|
5654
5654
|
const [{ completeSite, nextFilesOf, staticFilesOf, NoSiteRuntime, bytesOf }, { fileBase }, { zipFiles }, { downloadBlob }] = await Promise.all([
|
|
5655
|
-
import("./project-
|
|
5655
|
+
import("./project-XYBSLADA.js"),
|
|
5656
5656
|
import("./web-X2DJVRS2.js"),
|
|
5657
5657
|
import("./zip-export-QXDRWMK6.js"),
|
|
5658
5658
|
import("./download-PEVU3YCY.js")
|
|
@@ -6090,7 +6090,7 @@ var visionRegenerateImage = defineCommand({
|
|
|
6090
6090
|
const id = args.id ?? ctx.selection()[0];
|
|
6091
6091
|
if (!id) throw new ToolError("Select a generated image to regenerate.");
|
|
6092
6092
|
nodeOrThrow(ctx.doc(), id);
|
|
6093
|
-
const { regenerateImage } = await import("./client-actions-
|
|
6093
|
+
const { regenerateImage } = await import("./client-actions-HNOV4BCR.js");
|
|
6094
6094
|
regenerateImage(id, args.count);
|
|
6095
6095
|
return { summary: args.count > 1 ? `Regenerating ${args.count} variants` : "Regenerating the image", data: { id, count: args.count } };
|
|
6096
6096
|
}
|
|
@@ -9249,7 +9249,7 @@ var scriptRun = defineCommand({
|
|
|
9249
9249
|
// A script is not the turn the user is watching: confirm-tier tools are refused inside it (dispatch, `nested`).
|
|
9250
9250
|
actor: { ...ctx.actor, nested: true, label: "Script" },
|
|
9251
9251
|
// A look_at inside the script sees the document as the script has left it so far, not as it was before.
|
|
9252
|
-
use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-
|
|
9252
|
+
use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-HSXS4GKB.js")).renderDocument(staged, ids, options)) : ctx.use(name2))
|
|
9253
9253
|
};
|
|
9254
9254
|
let calls = 0;
|
|
9255
9255
|
const images = [];
|
|
@@ -9856,7 +9856,7 @@ var docImportFile = defineCommand({
|
|
|
9856
9856
|
const file = new File([body], args.name);
|
|
9857
9857
|
if (file.size > MAX_BYTES) throw new ToolError(`"${args.name}" is larger than ${MAX_BYTES / 1024 / 1024} MB.`);
|
|
9858
9858
|
const [{ buildImportedDocument }, { mergeImportedDocument }] = await Promise.all([
|
|
9859
|
-
import("./plugin-import-
|
|
9859
|
+
import("./plugin-import-H6DI4P2P.js"),
|
|
9860
9860
|
import("./import-merge-S37T2L26.js")
|
|
9861
9861
|
]);
|
|
9862
9862
|
const built = await buildImportedDocument(file);
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
newFileRefusal,
|
|
15
15
|
reportNewFileBlocked,
|
|
16
16
|
setCloudLink
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-YAODRFLE.js";
|
|
18
18
|
import {
|
|
19
19
|
activeTeamWorkspaceId
|
|
20
20
|
} from "./chunk-5CC6OBBA.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./chunk-KGZQYXX4.js";
|
|
30
30
|
import {
|
|
31
31
|
attachPresence
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-KKHYG4BA.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-BD6252CM.js";
|
|
44
44
|
import {
|
|
45
45
|
accessToken,
|
|
46
46
|
cloudUser,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-ZWPFPVWR.js";
|
|
14
14
|
import {
|
|
15
15
|
notice
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-PKRWF3FG.js";
|
|
17
17
|
import {
|
|
18
18
|
effectiveChatModel,
|
|
19
19
|
setModelPref,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-FGLBIZ26.js";
|
|
22
22
|
import {
|
|
23
23
|
useEditorStore
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-BD6252CM.js";
|
|
25
25
|
import {
|
|
26
26
|
create
|
|
27
27
|
} from "./chunk-OIUNEB2P.js";
|
|
@@ -1422,7 +1422,7 @@ async function sendMessage(text) {
|
|
|
1422
1422
|
if (!useAgentStore.getState().activeThreadId) newThread();
|
|
1423
1423
|
const mentions = pruneMentions(body, useAgentStore.getState().draftMentions);
|
|
1424
1424
|
useAgentStore.setState({ draft: "", draftMentions: [], error: null });
|
|
1425
|
-
const { runTurn } = await import("./runner-
|
|
1425
|
+
const { runTurn } = await import("./runner-NIIOKKHQ.js");
|
|
1426
1426
|
await runTurn(body, mentions);
|
|
1427
1427
|
}
|
|
1428
1428
|
function stop() {
|
|
@@ -1525,7 +1525,7 @@ var clearTaskChildren = () => useAgentStore.setState({ taskChildren: {} });
|
|
|
1525
1525
|
function subscribeChildTools() {
|
|
1526
1526
|
let dispose;
|
|
1527
1527
|
let cancelled = false;
|
|
1528
|
-
void import("./runner-
|
|
1528
|
+
void import("./runner-NIIOKKHQ.js").then(({ onChildTool }) => {
|
|
1529
1529
|
const off = onChildTool((report) => {
|
|
1530
1530
|
if (report?.status !== "running" || report.jobId) return;
|
|
1531
1531
|
recordChildTool(report.toolCallId ?? "", report.name);
|
|
@@ -7,10 +7,10 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
builtinCommands,
|
|
9
9
|
registerBuiltinCommands
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JK3P545Q.js";
|
|
11
11
|
import {
|
|
12
12
|
toolView
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ALT6ETRT.js";
|
|
14
14
|
import {
|
|
15
15
|
init_define_POPCRAFT_COMPONENT_IDS
|
|
16
16
|
} from "./chunk-JZD4HLWR.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
requestImageAction,
|
|
17
17
|
sizeForAspect,
|
|
18
18
|
vectorSupport
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-JIQATDNG.js";
|
|
20
20
|
import {
|
|
21
21
|
external_exports
|
|
22
22
|
} from "./chunk-YGCRLHAU.js";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
} from "./chunk-D6C455EI.js";
|
|
29
29
|
import {
|
|
30
30
|
useEditorStore
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-BD6252CM.js";
|
|
32
32
|
import {
|
|
33
33
|
getActiveRenderer
|
|
34
34
|
} from "./chunk-WPHYRLEA.js";
|
|
@@ -6,13 +6,13 @@ const __filename = __popcraftPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __popcraftDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
pluginRun
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HDYLDHNP.js";
|
|
10
10
|
import {
|
|
11
11
|
fileCommands,
|
|
12
12
|
integrationConfirmCommands,
|
|
13
13
|
mediaDelete,
|
|
14
14
|
publishCommands
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JK3P545Q.js";
|
|
16
16
|
import {
|
|
17
17
|
external_exports
|
|
18
18
|
} from "./chunk-YGCRLHAU.js";
|
|
@@ -54,7 +54,7 @@ var collabSetSpotlight = defineCommand({
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
run: async ({ on }, ctx) => {
|
|
57
|
-
const { setSpotlight } = await import("./presence-
|
|
57
|
+
const { setSpotlight } = await import("./presence-7QZFBELH.js");
|
|
58
58
|
setSpotlight(on);
|
|
59
59
|
ctx.notice(on ? "Spotlight on \u2014 everyone is following this view." : "Spotlight off.");
|
|
60
60
|
return { summary: on ? "Spotlight on" : "Spotlight off", data: { spotlight: on } };
|
|
@@ -81,7 +81,7 @@ var collabRevealPrivate = defineCommand({
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
run: async (_p, ctx) => {
|
|
84
|
-
const { useEditorStore } = await import("./editor-store-
|
|
84
|
+
const { useEditorStore } = await import("./editor-store-GEWWIL5L.js");
|
|
85
85
|
const before = Object.values(useEditorStore.getState().document.nodes).filter((n) => n.privateTo).length;
|
|
86
86
|
useEditorStore.getState().revealPrivate();
|
|
87
87
|
ctx.notice(before ? `Revealed ${before} private item${before === 1 ? "" : "s"}.` : "Nothing was private.");
|
|
@@ -145,7 +145,7 @@ var documentDelete = defineCommand({
|
|
|
145
145
|
}
|
|
146
146
|
},
|
|
147
147
|
run: async ({ id }, ctx) => {
|
|
148
|
-
const { useEditorStore } = await import("./editor-store-
|
|
148
|
+
const { useEditorStore } = await import("./editor-store-GEWWIL5L.js");
|
|
149
149
|
const wasOpen = useEditorStore.getState().document.id === id;
|
|
150
150
|
await useEditorStore.getState().deleteDocument(id);
|
|
151
151
|
ctx.notice("Deleted the document.");
|
|
@@ -189,7 +189,7 @@ var libraryPublish = defineCommand({
|
|
|
189
189
|
}
|
|
190
190
|
},
|
|
191
191
|
run: async (p, ctx) => {
|
|
192
|
-
const { publishLibrary } = await import("./libraries-
|
|
192
|
+
const { publishLibrary } = await import("./libraries-RV7VDQX7.js");
|
|
193
193
|
const doc = ctx.doc();
|
|
194
194
|
const pick = {
|
|
195
195
|
componentIds: p.componentIds ?? Object.keys(doc.components ?? {}),
|
|
@@ -221,7 +221,7 @@ var libraryUnpublish = defineCommand({
|
|
|
221
221
|
},
|
|
222
222
|
run: async ({ libraryId }, ctx) => {
|
|
223
223
|
if (!libraryId.trim()) throw new CommandError("Which library? Pass its `libraryId`.", "invalid_params");
|
|
224
|
-
const { unpublishLibrary } = await import("./libraries-
|
|
224
|
+
const { unpublishLibrary } = await import("./libraries-RV7VDQX7.js");
|
|
225
225
|
await unpublishLibrary(libraryId);
|
|
226
226
|
ctx.notice(`Unpublished library ${libraryId}.`);
|
|
227
227
|
return { summary: `Unpublished library ${libraryId}`, data: { libraryId, unpublished: true } };
|
|
@@ -233,8 +233,8 @@ var libraryCommands = [libraryPublish, libraryUnpublish];
|
|
|
233
233
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
234
234
|
async function findVersion(id) {
|
|
235
235
|
const [{ useEditorStore }, { versionLabel }] = await Promise.all([
|
|
236
|
-
import("./editor-store-
|
|
237
|
-
import("./versions-
|
|
236
|
+
import("./editor-store-GEWWIL5L.js"),
|
|
237
|
+
import("./versions-OSQXNPBJ.js")
|
|
238
238
|
]);
|
|
239
239
|
const meta = useEditorStore.getState().versions.find((v) => v.id === id);
|
|
240
240
|
if (!meta) {
|
|
@@ -267,7 +267,7 @@ var versionRestore = defineCommand({
|
|
|
267
267
|
},
|
|
268
268
|
run: async ({ id }) => {
|
|
269
269
|
const found = await findVersion(id);
|
|
270
|
-
const { restoreVersion } = await import("./versions-
|
|
270
|
+
const { restoreVersion } = await import("./versions-OSQXNPBJ.js");
|
|
271
271
|
await restoreVersion(found.meta);
|
|
272
272
|
return { summary: `Restored \u201C${found.label}\u201D`, data: { id, label: found.label, restored: true } };
|
|
273
273
|
}
|
|
@@ -292,7 +292,7 @@ var versionDelete = defineCommand({
|
|
|
292
292
|
},
|
|
293
293
|
run: async ({ id }, ctx) => {
|
|
294
294
|
const found = await findVersion(id);
|
|
295
|
-
const { deleteVersion } = await import("./versions-
|
|
295
|
+
const { deleteVersion } = await import("./versions-OSQXNPBJ.js");
|
|
296
296
|
await deleteVersion(found.meta);
|
|
297
297
|
ctx.notice(`Deleted the version \u201C${found.label}\u201D.`);
|
|
298
298
|
return { summary: `Deleted the version \u201C${found.label}\u201D`, data: { id, label: found.label, deleted: true } };
|
|
@@ -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-GEWWIL5L.js"),
|
|
95
95
|
import("../lib/document/photo-frames.js"),
|
|
96
|
-
import("./media-tool-
|
|
96
|
+
import("./media-tool-4VZHXWBJ.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);
|