@popcraft/kit 0.34.0 → 0.34.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.
- package/dist/chunks/{agent-ZMN2JVBJ.js → agent-M6XAVFPV.js} +1 -1
- package/dist/chunks/{builtin-ZCNKIEMF.js → builtin-5HGHK6MW.js} +3 -3
- package/dist/chunks/{check-template-VOAKBGCM.js → check-template-QKLTVXLA.js} +2 -2
- package/dist/chunks/{chunk-EHYRFOMY.js → chunk-2AFAD222.js} +5 -5
- package/dist/chunks/{chunk-4LXWTT3H.js → chunk-2FELWUKN.js} +1 -1
- package/dist/chunks/{chunk-5PPA6PXY.js → chunk-BEYZJ5JI.js} +2 -2
- package/dist/chunks/{chunk-YN5GV22N.js → chunk-BL7L4FZN.js} +2 -2
- package/dist/chunks/{chunk-GF7PFMHA.js → chunk-C6ILLCN5.js} +3 -3
- package/dist/chunks/{chunk-3BA3MHVM.js → chunk-CUS3KO77.js} +3 -1
- package/dist/chunks/{chunk-4S4HQYAX.js → chunk-DLV4TN3I.js} +5 -5
- package/dist/chunks/{chunk-6AYHOP4D.js → chunk-GAO34CUB.js} +2 -2
- package/dist/chunks/{chunk-32NYNGOM.js → chunk-I6WE43YR.js} +5 -5
- package/dist/chunks/{chunk-WOH5K2BK.js → chunk-JZLVT2J6.js} +7 -7
- package/dist/chunks/{chunk-3CYTECLE.js → chunk-MOCJXRJ7.js} +4 -4
- package/dist/chunks/{chunk-RXARFLUG.js → chunk-PHPTT65P.js} +40 -40
- package/dist/chunks/{chunk-27NDY7JP.js → chunk-QWZJBI3N.js} +4 -4
- package/dist/chunks/{chunk-LZV345SO.js → chunk-RQQIQJIZ.js} +2 -2
- package/dist/chunks/{chunk-FINNFQT2.js → chunk-TCZ5LFMG.js} +11 -11
- package/dist/chunks/{chunk-MHFVPGQN.js → chunk-TMOB6PGQ.js} +1 -1
- package/dist/chunks/{chunk-RB6ZFAI6.js → chunk-WKCBJALH.js} +1 -1
- package/dist/chunks/{chunk-LZDJRFPH.js → chunk-ZOSDUVEI.js} +4 -4
- package/dist/chunks/{client-BDISHPVU.js → client-3MMUIYTE.js} +1 -1
- package/dist/chunks/{client-EQ6TEZ22.js → client-HJNVJRVV.js} +2 -2
- package/dist/chunks/{client-PO2PR6TA.js → client-R5RZ7EZA.js} +2 -2
- package/dist/chunks/{client-actions-NTU6U3KT.js → client-actions-O5Z5PA6P.js} +4 -4
- package/dist/chunks/{dangerous-UEMB3UQG.js → dangerous-6ULU6SW2.js} +3 -3
- package/dist/chunks/{editor-seams-YC7HCKBE.js → editor-seams-Y6TIK6VB.js} +9 -9
- package/dist/chunks/{editor-store-R2OQWVDE.js → editor-store-ADP57RCA.js} +1 -1
- package/dist/chunks/{export-watermark-PNE7H7LW.js → export-watermark-SBHMCZYI.js} +5 -5
- package/dist/chunks/{eyedropper-4DKSE5DR.js → eyedropper-FKDHWAWJ.js} +1 -1
- package/dist/chunks/{generate-media-T22NB3DD.js → generate-media-ILI3VCUL.js} +2 -2
- package/dist/chunks/{host-S5EUWVNP.js → host-TCGMI65A.js} +6 -6
- package/dist/chunks/{integrations-2IYBZ2IT.js → integrations-ZBICRIS4.js} +1 -1
- package/dist/chunks/{libraries-TKLM5XKU.js → libraries-BJMUQIDH.js} +5 -5
- package/dist/chunks/{live-CRXBBIGM.js → live-FDSL5FLH.js} +1 -1
- package/dist/chunks/{media-tool-PTZ3L7BJ.js → media-tool-ORP2J5ZV.js} +1 -1
- package/dist/chunks/{new-file-QDZWI4CD.js → new-file-7C6MHARD.js} +3 -3
- package/dist/chunks/{plugin-5ZTLMVTC.js → plugin-IM6ZCNVB.js} +2 -2
- package/dist/chunks/{plugin-import-KBALDSZD.js → plugin-import-S6W3KRXC.js} +13 -13
- package/dist/chunks/{presence-24VMSTQJ.js → presence-EE7K24TC.js} +2 -2
- package/dist/chunks/{project-2JJPRR5J.js → project-DCOT4WJ4.js} +1 -1
- package/dist/chunks/{publish-site-4KIF4RFN.js → publish-site-GYDAWHYX.js} +6 -6
- package/dist/chunks/{publish-store-DAYWZTMY.js → publish-store-5L4U4OBB.js} +4 -4
- package/dist/chunks/{raster-actions-PAR34YMU.js → raster-actions-RDPLXF5I.js} +1 -1
- package/dist/chunks/{runner-O2LLIN7U.js → runner-Y7WLEWWQ.js} +61 -27
- package/dist/chunks/{store-VJYVPLEL.js → store-EJVB6AVQ.js} +5 -5
- package/dist/chunks/{sync-CY5AXHXN.js → sync-WWDL5HMM.js} +5 -5
- package/dist/chunks/{tabs-NEK3NEGN.js → tabs-VOGBI2T4.js} +8 -8
- package/dist/chunks/{team-KEGFHUQB.js → team-XY4I6LPK.js} +1 -1
- package/dist/chunks/{team-client-TGXIY547.js → team-client-ZMXLFNZY.js} +1 -1
- package/dist/chunks/{tools-67A4YVFB.js → tools-HPY5KARF.js} +2 -2
- package/dist/chunks/{ui-commands-4PSSWCTZ.js → ui-commands-3XG5L4LL.js} +11 -11
- package/dist/chunks/{versions-5XWT6HT4.js → versions-MOD2DUME.js} +5 -5
- 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-BEYZJ5JI.js";
|
|
11
|
+
import "./chunk-PHPTT65P.js";
|
|
12
12
|
import "./chunk-2HHUJ2HJ.js";
|
|
13
13
|
import "./chunk-FDF6Q3XF.js";
|
|
14
14
|
import "./chunk-Q3JDDT3G.js";
|
|
@@ -19,7 +19,7 @@ import "./chunk-3ZM2SFOD.js";
|
|
|
19
19
|
import "./chunk-5D5AYGLX.js";
|
|
20
20
|
import "./chunk-7VC66UJP.js";
|
|
21
21
|
import "./chunk-346QA5CP.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-MOCJXRJ7.js";
|
|
23
23
|
import "./chunk-JUH24L6J.js";
|
|
24
24
|
import "./chunk-U7HPX6ES.js";
|
|
25
25
|
import "./chunk-VIL5EI72.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-JZLVT2J6.js";
|
|
10
10
|
import {
|
|
11
11
|
builtinCommands
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PHPTT65P.js";
|
|
13
13
|
import "./chunk-2HHUJ2HJ.js";
|
|
14
14
|
import "./chunk-FDF6Q3XF.js";
|
|
15
15
|
import "./chunk-Q3JDDT3G.js";
|
|
@@ -15,14 +15,14 @@ import {
|
|
|
15
15
|
} from "./chunk-42INXCFA.js";
|
|
16
16
|
import {
|
|
17
17
|
syncStatus
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ZOSDUVEI.js";
|
|
19
19
|
import {
|
|
20
20
|
downloadBlob
|
|
21
21
|
} from "./chunk-QF32TI7G.js";
|
|
22
22
|
import {
|
|
23
23
|
setPluginTabs,
|
|
24
24
|
useEditorStore
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-DLV4TN3I.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-IM6ZCNVB.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-7C6MHARD.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-S6W3KRXC.js");
|
|
542
542
|
if (d.ir && typeof d.ir === "object") {
|
|
543
543
|
await applyPluginLayoutIr(d.ir, { mode, name });
|
|
544
544
|
return;
|
|
@@ -7,10 +7,10 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
builtinCommands,
|
|
9
9
|
registerBuiltinCommands
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PHPTT65P.js";
|
|
11
11
|
import {
|
|
12
12
|
toolView
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MOCJXRJ7.js";
|
|
14
14
|
import {
|
|
15
15
|
init_define_POPCRAFT_COMPONENT_IDS
|
|
16
16
|
} from "./chunk-CULZUB7R.js";
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
requestImageAction,
|
|
29
29
|
sizeForAspect,
|
|
30
30
|
vectorSupport
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-CUS3KO77.js";
|
|
32
32
|
import {
|
|
33
33
|
useEditorStore
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-DLV4TN3I.js";
|
|
35
35
|
import {
|
|
36
36
|
getActiveRenderer
|
|
37
37
|
} from "./chunk-FIZX4IWK.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
hostEnv,
|
|
10
10
|
plain,
|
|
11
11
|
registerBuiltinCommands
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PHPTT65P.js";
|
|
13
13
|
import {
|
|
14
14
|
storeOpsSeam
|
|
15
15
|
} from "./chunk-YTCAECKD.js";
|
|
@@ -572,7 +572,7 @@ var commands = [
|
|
|
572
572
|
const [{ storefrontInputs }, { STOREFRONT_TARGETS }, { bytesOf }, { zipFiles }, { EXPORT_NODE_CAP }] = await Promise.all([
|
|
573
573
|
import("./storefront-prepare-GFIXURRH.js"),
|
|
574
574
|
import("./storefront-TZLYTSJE.js"),
|
|
575
|
-
import("./project-
|
|
575
|
+
import("./project-DCOT4WJ4.js"),
|
|
576
576
|
import("./zip-export-MWBFFENO.js"),
|
|
577
577
|
import("./tree-TDOORGXT.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-TCGMI65A.js");
|
|
773
773
|
await runPlugin(p.pluginId, p.commandId);
|
|
774
774
|
ctx.notice(`Started ${p.pluginId}.`);
|
|
775
775
|
return {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-VNTBWX44.js";
|
|
14
14
|
import {
|
|
15
15
|
activeHyperyTeamId
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TMOB6PGQ.js";
|
|
17
17
|
import {
|
|
18
18
|
accessToken
|
|
19
19
|
} from "./chunk-UYTKC7WH.js";
|
|
@@ -95,6 +95,8 @@ var AiClientError = class extends Error {
|
|
|
95
95
|
this.code = code;
|
|
96
96
|
this.status = status;
|
|
97
97
|
}
|
|
98
|
+
code;
|
|
99
|
+
status;
|
|
98
100
|
};
|
|
99
101
|
var needsReauth = (e) => e instanceof AiClientError && (e.code === "ai_reauth" || e.code === "ai_scope" || e.code === "unauthenticated");
|
|
100
102
|
function ensureAvailable() {
|
|
@@ -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-EE7K24TC.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-WWDL5HMM.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-HPY5KARF.js").then(async (m) => ({ ...m, registerBuiltinTools: (await import("./builtin-5HGHK6MW.js")).registerBuiltinTools })),
|
|
10085
|
+
import("./editor-seams-Y6TIK6VB.js"),
|
|
10086
|
+
import("./live-FDSL5FLH.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 });
|
|
@@ -6,7 +6,7 @@ const __filename = __popcraftPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __popcraftDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
activeTeamWorkspaceId
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TMOB6PGQ.js";
|
|
10
10
|
import {
|
|
11
11
|
ApiError,
|
|
12
12
|
GUEST_FILE_LIMIT,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-GMV3RRYZ.js";
|
|
19
19
|
import {
|
|
20
20
|
markLibraryDocument
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-DLV4TN3I.js";
|
|
22
22
|
import {
|
|
23
23
|
cloudEnabled,
|
|
24
24
|
cloudUser
|
|
@@ -20,17 +20,17 @@ import {
|
|
|
20
20
|
} from "./chunk-7ESVS4LB.js";
|
|
21
21
|
import {
|
|
22
22
|
notice
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-BL7L4FZN.js";
|
|
24
24
|
import {
|
|
25
25
|
agentContext
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-MOCJXRJ7.js";
|
|
27
27
|
import {
|
|
28
28
|
collabSession,
|
|
29
29
|
syncStatus
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-ZOSDUVEI.js";
|
|
31
31
|
import {
|
|
32
32
|
loadEntitlements
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-GAO34CUB.js";
|
|
34
34
|
import {
|
|
35
35
|
cloudApi
|
|
36
36
|
} from "./chunk-S4CRXU5W.js";
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
} from "./chunk-YZF7QI4U.js";
|
|
40
40
|
import {
|
|
41
41
|
useEditorStore
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-DLV4TN3I.js";
|
|
43
43
|
import {
|
|
44
44
|
plansEnabled
|
|
45
45
|
} from "./chunk-UYTKC7WH.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
needsSelection,
|
|
9
9
|
pageGo,
|
|
10
10
|
selectionIsPicture
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-PHPTT65P.js";
|
|
12
12
|
import {
|
|
13
13
|
external_exports
|
|
14
14
|
} from "./chunk-346QA5CP.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-ADP57RCA.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-ODWXHKZE.js")).openAiDialog(dialog);
|
|
212
|
-
else (await import("./store-
|
|
212
|
+
else (await import("./store-EJVB6AVQ.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-ORP2J5ZV.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-FKDHWAWJ.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-RDPLXF5I.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-TCGMI65A.js")).runPlugin(pluginId, commandId);
|
|
425
425
|
return { summary: "Plugin started" };
|
|
426
426
|
}
|
|
427
427
|
});
|
|
@@ -54,24 +54,24 @@ async function renderDocument(doc, nodeIds, options) {
|
|
|
54
54
|
if (frame) doc = { ...doc, nodes: bakeMotion(doc.nodes, frame.id, options.at) };
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
return selectionReferenceImages(doc, [...nodeIds], { maxEdge: options?.maxEdge, max: 8, format: "
|
|
57
|
+
return selectionReferenceImages(doc, [...nodeIds], { maxEdge: options?.maxEdge, max: 8, format: "JPG", ...options?.bands ? { bands: options.bands } : {} });
|
|
58
58
|
}
|
|
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-R5RZ7EZA.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-ILI3VCUL.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-R5RZ7EZA.js"),
|
|
75
75
|
import("./client-store-ODWXHKZE.js")
|
|
76
76
|
]);
|
|
77
77
|
const modelId = effectiveImageModel(useAiStore.getState());
|