@popcraft/kit 0.56.3 → 0.56.4
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-2SWYM2W7.js → agent-HKZ2AICN.js} +1 -1
- package/dist/chunks/{builtin-S5YFVKBR.js → builtin-A2MEOJ2P.js} +3 -3
- package/dist/chunks/{buy-credits-332C6WT5.js → buy-credits-IKKMI5MJ.js} +2 -2
- package/dist/chunks/{check-template-6E6YW5XI.js → check-template-QZIFVVTN.js} +2 -2
- package/dist/chunks/{chunk-Y64MBFW5.js → chunk-2XYTEMMH.js} +6 -6
- package/dist/chunks/{chunk-CZGTWTE4.js → chunk-3HUYGEQ5.js} +2 -2
- package/dist/chunks/{chunk-GRY2KGG7.js → chunk-4SMAQFWL.js} +11 -11
- package/dist/chunks/{chunk-A6DRGCZ7.js → chunk-5TBCDPS4.js} +2 -2
- package/dist/chunks/{chunk-D7X6T6KF.js → chunk-B3JAZIVR.js} +1 -1
- package/dist/chunks/{chunk-EU6H6JWS.js → chunk-DP36GJAV.js} +42 -42
- package/dist/chunks/{chunk-NHU4OEZ6.js → chunk-FY4V7E2Z.js} +3 -1
- package/dist/chunks/{chunk-INKBQE2O.js → chunk-GQMDY3G7.js} +2 -2
- package/dist/chunks/{chunk-NNQ37FVW.js → chunk-JYYUHHPP.js} +1 -1
- package/dist/chunks/{chunk-GDP5EFI3.js → chunk-KCITMVSI.js} +3 -3
- package/dist/chunks/{chunk-TNTHOAUK.js → chunk-KIIUKUPR.js} +4 -4
- package/dist/chunks/{chunk-ONYPDU23.js → chunk-L6KV4M7M.js} +5 -5
- package/dist/chunks/{chunk-QMKJJPIW.js → chunk-N7D3DBWI.js} +4 -4
- package/dist/chunks/{chunk-IGYLHEAU.js → chunk-O5OVJGIW.js} +5 -5
- package/dist/chunks/{chunk-MEONOXOD.js → chunk-RLMZ73ZM.js} +1 -1
- package/dist/chunks/{chunk-WWVADDHZ.js → chunk-T4J4CIKH.js} +9 -9
- package/dist/chunks/{chunk-SLMU4YX7.js → chunk-TPYMC6EN.js} +1 -1
- package/dist/chunks/{chunk-MFQIELVU.js → chunk-W2K6IA7Y.js} +2 -2
- package/dist/chunks/{chunk-6J2ILHTN.js → chunk-WUQVB2LM.js} +3 -3
- package/dist/chunks/{client-WBBAZUKM.js → client-K7WJQRSH.js} +2 -2
- package/dist/chunks/{client-TWIU2EQP.js → client-NP2BHRY5.js} +1 -1
- package/dist/chunks/{client-2CTZR6BA.js → client-NUDNRHUE.js} +3 -3
- package/dist/chunks/{client-actions-FBNG6RAL.js → client-actions-N3SGT7GT.js} +5 -5
- package/dist/chunks/{dangerous-Q4VKTDID.js → dangerous-VDXO5WWV.js} +3 -3
- package/dist/chunks/{delete-current-file-7ERIJHLN.js → delete-current-file-VID4OSNL.js} +5 -5
- package/dist/chunks/{editor-seams-T5TXORL3.js → editor-seams-EC5TJ4M2.js} +12 -12
- package/dist/chunks/{editor-store-A63HCQPZ.js → editor-store-QMAGIJRQ.js} +1 -1
- package/dist/chunks/{export-watermark-ZFY4DWDO.js → export-watermark-DBCWDRIY.js} +5 -5
- package/dist/chunks/{eyedropper-AOBIMQF2.js → eyedropper-DYRBU2OA.js} +1 -1
- package/dist/chunks/{generate-media-JMIYWYIU.js → generate-media-RFIPTUJW.js} +3 -3
- package/dist/chunks/{host-ADB2QM5R.js → host-IP5H7K6V.js} +6 -6
- package/dist/chunks/{integrations-KATKXF2X.js → integrations-ZG7U4WV4.js} +1 -1
- package/dist/chunks/{libraries-M4I5AESB.js → libraries-GYTXFWI4.js} +5 -5
- package/dist/chunks/{live-2BE2VQGX.js → live-ARB2FPMW.js} +1 -1
- package/dist/chunks/{media-tool-BFS3NM5J.js → media-tool-DBAH4UXQ.js} +1 -1
- package/dist/chunks/{new-file-26UKCDVW.js → new-file-4NISWIRW.js} +3 -3
- package/dist/chunks/{plugin-VOCXRAS2.js → plugin-RPECO7QH.js} +2 -2
- package/dist/chunks/{plugin-import-GBFQUUHR.js → plugin-import-COKPJN26.js} +16 -16
- package/dist/chunks/{presence-3SV5CULO.js → presence-FHKWGP4N.js} +2 -2
- package/dist/chunks/{project-JYTBWBTB.js → project-PE3HLZOK.js} +1 -1
- package/dist/chunks/{publish-site-HTAACL7X.js → publish-site-FSNJRH5S.js} +6 -6
- package/dist/chunks/{publish-store-SI5KJKJW.js → publish-store-3RC4PDY6.js} +4 -4
- package/dist/chunks/{raster-actions-WKE5MXL2.js → raster-actions-ALO3BPFM.js} +1 -1
- package/dist/chunks/{runner-YN2LXROX.js → runner-43YJB7K6.js} +18 -18
- package/dist/chunks/{store-WJQA4GOX.js → store-DGCXCSHM.js} +6 -6
- package/dist/chunks/{sync-JTDVKQWY.js → sync-RHDWZ5TR.js} +5 -5
- package/dist/chunks/{tabs-5AWW6FBK.js → tabs-GROQZKNU.js} +8 -8
- package/dist/chunks/{team-PWGQHK5D.js → team-EAZOD63G.js} +1 -1
- package/dist/chunks/{team-client-HWNNYUZY.js → team-client-AA2ASV4H.js} +1 -1
- package/dist/chunks/{tools-J2K4QBSD.js → tools-HUYPOTQ4.js} +2 -2
- package/dist/chunks/{ui-commands-EY6P4K6K.js → ui-commands-XB3VQAUA.js} +12 -12
- package/dist/chunks/{versions-KI2FPL6P.js → versions-MWOT2WAU.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-5TBCDPS4.js";
|
|
11
|
+
import "./chunk-DP36GJAV.js";
|
|
12
12
|
import "./chunk-WIBKHKFR.js";
|
|
13
13
|
import "./chunk-3YMKB5YK.js";
|
|
14
14
|
import "./chunk-4TNQYLEG.js";
|
|
@@ -17,7 +17,7 @@ import "./chunk-2UA6KLQX.js";
|
|
|
17
17
|
import "./chunk-CHVESFYA.js";
|
|
18
18
|
import "./chunk-QYMTM54E.js";
|
|
19
19
|
import "./chunk-NVXFRYWV.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-KCITMVSI.js";
|
|
21
21
|
import "./chunk-ZIGFBFCX.js";
|
|
22
22
|
import "./chunk-XYX3LSOI.js";
|
|
23
23
|
import "./chunk-3TDMKUWG.js";
|
|
@@ -7,11 +7,11 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
HYPERY_TEAM_HEADER,
|
|
9
9
|
hyperyRequestHeaders
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-B3JAZIVR.js";
|
|
11
11
|
import "./chunk-L2VP6DWG.js";
|
|
12
12
|
import {
|
|
13
13
|
useHyperyTeam
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JYYUHHPP.js";
|
|
15
15
|
import {
|
|
16
16
|
openLink
|
|
17
17
|
} from "./chunk-N7LKKGX6.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-T4J4CIKH.js";
|
|
10
10
|
import {
|
|
11
11
|
builtinCommands
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DP36GJAV.js";
|
|
13
13
|
import "./chunk-WIBKHKFR.js";
|
|
14
14
|
import "./chunk-3YMKB5YK.js";
|
|
15
15
|
import "./chunk-4TNQYLEG.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-
|
|
9
|
+
} from "./chunk-T4J4CIKH.js";
|
|
10
10
|
import {
|
|
11
11
|
storeOpsSeam
|
|
12
12
|
} from "./chunk-BAJDECDK.js";
|
|
@@ -23,17 +23,17 @@ import {
|
|
|
23
23
|
sameResolution,
|
|
24
24
|
surfaceSize,
|
|
25
25
|
windowCssSize
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-DP36GJAV.js";
|
|
27
27
|
import {
|
|
28
28
|
notice
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-W2K6IA7Y.js";
|
|
30
30
|
import {
|
|
31
31
|
agentContext
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-KCITMVSI.js";
|
|
33
33
|
import {
|
|
34
34
|
collabSession,
|
|
35
35
|
syncStatus
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-KIIUKUPR.js";
|
|
37
37
|
import {
|
|
38
38
|
loadEntitlements
|
|
39
39
|
} from "./chunk-L2VP6DWG.js";
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
import {
|
|
45
45
|
persist,
|
|
46
46
|
useEditorStore
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-L6KV4M7M.js";
|
|
48
48
|
import {
|
|
49
49
|
cloudApi
|
|
50
50
|
} from "./chunk-I3HFMXPA.js";
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./chunk-L2VP6DWG.js";
|
|
10
10
|
import {
|
|
11
11
|
activeTeamWorkspaceId
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JYYUHHPP.js";
|
|
13
13
|
import {
|
|
14
14
|
prepareTemplate
|
|
15
15
|
} from "./chunk-BWJ3CCUE.js";
|
|
16
16
|
import {
|
|
17
17
|
markLibraryDocument
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-L6KV4M7M.js";
|
|
19
19
|
import {
|
|
20
20
|
listDocMetas,
|
|
21
21
|
saveDocSnapshot
|
|
@@ -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-WUQVB2LM.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-DP36GJAV.js";
|
|
17
17
|
import {
|
|
18
18
|
external_exports
|
|
19
19
|
} from "./chunk-NVXFRYWV.js";
|
|
@@ -53,7 +53,7 @@ var collabSetSpotlight = defineCommand({
|
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
run: async ({ on }, ctx) => {
|
|
56
|
-
const { setSpotlight } = await import("./presence-
|
|
56
|
+
const { setSpotlight } = await import("./presence-FHKWGP4N.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-
|
|
83
|
+
const { useEditorStore } = await import("./editor-store-QMAGIJRQ.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-
|
|
147
|
+
const { useEditorStore } = await import("./editor-store-QMAGIJRQ.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-
|
|
191
|
+
const { publishLibrary } = await import("./libraries-GYTXFWI4.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-
|
|
223
|
+
const { unpublishLibrary } = await import("./libraries-GYTXFWI4.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-
|
|
236
|
-
import("./versions-
|
|
235
|
+
import("./editor-store-QMAGIJRQ.js"),
|
|
236
|
+
import("./versions-MWOT2WAU.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-
|
|
269
|
+
const { restoreVersion } = await import("./versions-MWOT2WAU.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-
|
|
294
|
+
const { deleteVersion } = await import("./versions-MWOT2WAU.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 } };
|
|
@@ -7,10 +7,10 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
builtinCommands,
|
|
9
9
|
registerBuiltinCommands
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DP36GJAV.js";
|
|
11
11
|
import {
|
|
12
12
|
toolView
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KCITMVSI.js";
|
|
14
14
|
import {
|
|
15
15
|
init_define_POPCRAFT_COMPONENT_IDS
|
|
16
16
|
} from "./chunk-4N2QVWSV.js";
|
|
@@ -934,7 +934,7 @@ init_scene_graph();
|
|
|
934
934
|
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.");
|
|
935
935
|
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 });
|
|
936
936
|
async function placeImportedPicture(ctx, imported, at2, what, extra = {}) {
|
|
937
|
-
const client = await import("./client-
|
|
937
|
+
const client = await import("./client-NP2BHRY5.js");
|
|
938
938
|
if (at2.fillLayerId) {
|
|
939
939
|
const doc2 = ctx.doc();
|
|
940
940
|
const target = nodeOrThrow(doc2, at2.fillLayerId);
|
|
@@ -980,7 +980,7 @@ var photoSearch = defineCommand({
|
|
|
980
980
|
}
|
|
981
981
|
},
|
|
982
982
|
run: async (args) => {
|
|
983
|
-
const { searchStockPhotos } = await import("./client-
|
|
983
|
+
const { searchStockPhotos } = await import("./client-NP2BHRY5.js");
|
|
984
984
|
const page = await searchStockPhotos(args.query, args.page ?? 1, { licence: args.licence });
|
|
985
985
|
return {
|
|
986
986
|
summary: `${page.results.length} photo${page.results.length === 1 ? "" : "s"} for \u201C${page.query}\u201D (page ${page.page} of ${page.pageCount || 1})`,
|
|
@@ -1014,7 +1014,7 @@ var photoInsert = defineCommand({
|
|
|
1014
1014
|
run: async (args, ctx) => {
|
|
1015
1015
|
if (!args.id && !args.query) throw new ToolError("Pass an id from search_photos, or a query.");
|
|
1016
1016
|
if (args.id && !isPhotoId(args.id)) throw new ToolError(`"${args.id}" is not a photo id from search_photos.`);
|
|
1017
|
-
const client = await import("./client-
|
|
1017
|
+
const client = await import("./client-NP2BHRY5.js");
|
|
1018
1018
|
let photo;
|
|
1019
1019
|
if (args.id) photo = await client.stockPhotoInfo(args.id);
|
|
1020
1020
|
else {
|
|
@@ -1052,10 +1052,10 @@ var mediaList = defineCommand({
|
|
|
1052
1052
|
}
|
|
1053
1053
|
},
|
|
1054
1054
|
run: async (args) => {
|
|
1055
|
-
const { listLibraryMedia } = await import("./client-
|
|
1055
|
+
const { listLibraryMedia } = await import("./client-K7WJQRSH.js");
|
|
1056
1056
|
const q = { ...args };
|
|
1057
1057
|
if (!q.workspace) {
|
|
1058
|
-
const { syncStatus } = await import("./sync-
|
|
1058
|
+
const { syncStatus } = await import("./sync-RHDWZ5TR.js");
|
|
1059
1059
|
const link2 = syncStatus().link;
|
|
1060
1060
|
if (!link2) throw new ToolError("This document is not saved to the cloud, so it has no team media library. Pass workspace.");
|
|
1061
1061
|
q.workspace = (await listLibraryMedia({ file: link2.key, limit: 1 })).workspaceId;
|
|
@@ -1090,7 +1090,7 @@ var mediaInsert = defineCommand({
|
|
|
1090
1090
|
run: async (args, ctx) => {
|
|
1091
1091
|
const contentType = args.contentType ?? "image/*";
|
|
1092
1092
|
if (!contentType.startsWith("image/")) throw new ToolError("insert_media places pictures; this item is not one.");
|
|
1093
|
-
const { importLibraryPicture } = await import("./client-
|
|
1093
|
+
const { importLibraryPicture } = await import("./client-K7WJQRSH.js");
|
|
1094
1094
|
const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "Media", contentType, size: 0, createdAt: "", fileCount: 1, source: null };
|
|
1095
1095
|
const imported = await importLibraryPicture(item);
|
|
1096
1096
|
return placeImportedPicture(ctx, imported, args, `\u201C${imported.name}\u201D`, { hash: imported.hash });
|
|
@@ -1111,7 +1111,7 @@ var mediaDownload = defineCommand({
|
|
|
1111
1111
|
// The Library's right-click menu: saves the item's file to the computer.
|
|
1112
1112
|
expose: { ui: { label: "Download", palette: false } },
|
|
1113
1113
|
run: async (args) => {
|
|
1114
|
-
const { libraryBlob, libraryFileName } = await import("./client-
|
|
1114
|
+
const { libraryBlob, libraryFileName } = await import("./client-K7WJQRSH.js");
|
|
1115
1115
|
const { downloadBlob } = await import("./download-FTTNYILJ.js");
|
|
1116
1116
|
const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "media", contentType: args.contentType ?? "", size: 0, createdAt: "", fileCount: 1, source: null };
|
|
1117
1117
|
const blob = await libraryBlob(item);
|
|
@@ -1142,7 +1142,7 @@ var mediaDelete = defineCommand({
|
|
|
1142
1142
|
}
|
|
1143
1143
|
},
|
|
1144
1144
|
run: async (args) => {
|
|
1145
|
-
const { deleteLibraryMedia } = await import("./client-
|
|
1145
|
+
const { deleteLibraryMedia } = await import("./client-K7WJQRSH.js");
|
|
1146
1146
|
const out = await deleteLibraryMedia(args.workspace, args.hash);
|
|
1147
1147
|
return { summary: `Deleted it from the library (it was in ${out.files} file${out.files === 1 ? "" : "s"})`, data: out };
|
|
1148
1148
|
}
|
|
@@ -1156,13 +1156,13 @@ async function signedIn() {
|
|
|
1156
1156
|
}
|
|
1157
1157
|
async function publishedFile() {
|
|
1158
1158
|
await signedIn();
|
|
1159
|
-
const { openFileKey } = await import("./publish-site-
|
|
1159
|
+
const { openFileKey } = await import("./publish-site-FSNJRH5S.js");
|
|
1160
1160
|
const key = openFileKey();
|
|
1161
1161
|
if (!key) throw new CommandError("This file is not saved to the cloud yet, so it has no site. Publish it first.", "failed");
|
|
1162
1162
|
return key;
|
|
1163
1163
|
}
|
|
1164
1164
|
async function formsWithoutDatabase(key) {
|
|
1165
|
-
const [{ useEditorStore }, { usesForms, formsGoNowhere }, { siteBackend }] = await Promise.all([import("./editor-store-
|
|
1165
|
+
const [{ useEditorStore }, { usesForms, formsGoNowhere }, { siteBackend }] = await Promise.all([import("./editor-store-QMAGIJRQ.js"), import("./backend-WGCTK6TK.js"), import("./integrations-ZG7U4WV4.js")]);
|
|
1166
1166
|
const doc2 = useEditorStore.getState().document;
|
|
1167
1167
|
if (!usesForms(doc2)) return false;
|
|
1168
1168
|
return formsGoNowhere(doc2, await siteBackend(key).catch(() => void 0));
|
|
@@ -1198,7 +1198,7 @@ var publishSite = defineCommand({
|
|
|
1198
1198
|
const { cleanSlug } = await import("./rules-JSF5OTBI.js");
|
|
1199
1199
|
const address = p.address === void 0 ? void 0 : cleanSlug(p.address);
|
|
1200
1200
|
if (address === null) throw new CommandError("That cannot be a site address: use 3 to 40 letters, digits and dashes.", "invalid_params");
|
|
1201
|
-
const { publishOpenFile, NoScreens } = await import("./publish-site-
|
|
1201
|
+
const { publishOpenFile, NoScreens } = await import("./publish-site-FSNJRH5S.js");
|
|
1202
1202
|
try {
|
|
1203
1203
|
const done = await publishOpenFile(address);
|
|
1204
1204
|
ctx.notice(`Published version ${done.version}: ${done.url}`);
|
|
@@ -1253,7 +1253,7 @@ var publishListSites = defineCommand({
|
|
|
1253
1253
|
},
|
|
1254
1254
|
run: async (p) => {
|
|
1255
1255
|
await signedIn();
|
|
1256
|
-
const [{ workspaceSites }, { activeTeamWorkspaceId, useHyperyTeam }] = await Promise.all([import("./sites-WSO6PVVG.js"), import("./team-
|
|
1256
|
+
const [{ workspaceSites }, { activeTeamWorkspaceId, useHyperyTeam }] = await Promise.all([import("./sites-WSO6PVVG.js"), import("./team-EAZOD63G.js")]);
|
|
1257
1257
|
const workspaceId = p.workspaceId ?? activeTeamWorkspaceId() ?? useHyperyTeam.getState().personalWorkspaceId;
|
|
1258
1258
|
if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
|
|
1259
1259
|
const out = await workspaceSites(workspaceId);
|
|
@@ -1302,12 +1302,12 @@ var publishStatus = defineCommand({
|
|
|
1302
1302
|
},
|
|
1303
1303
|
run: async () => {
|
|
1304
1304
|
await signedIn();
|
|
1305
|
-
const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-
|
|
1305
|
+
const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-FSNJRH5S.js"), import("./sites-WSO6PVVG.js")]);
|
|
1306
1306
|
const key = openFileKey();
|
|
1307
1307
|
const status = await siteStatus(key);
|
|
1308
1308
|
const site = status.site;
|
|
1309
|
-
const backend = key ? await (await import("./integrations-
|
|
1310
|
-
const destinations = key ? await (await import("./integrations-
|
|
1309
|
+
const backend = key ? await (await import("./integrations-ZG7U4WV4.js")).siteBackend(key).catch(() => null) : null;
|
|
1310
|
+
const destinations = key ? await (await import("./integrations-ZG7U4WV4.js")).listDestinations(key).catch(() => []) : [];
|
|
1311
1311
|
return {
|
|
1312
1312
|
summary: !status.configured ? "This server does not publish websites" : !site ? "Not published yet" : site.currentVersion === null ? `Offline (${site.versions.length} versions kept) \u2014 ${site.url}` : `Version ${site.currentVersion} is online at ${site.url}`,
|
|
1313
1313
|
data: { ...statusData(status), database: backend?.database ? { provider: backend.database.connection.provider, account: backend.database.connection.account, target: backend.database.target.map((t) => t.name), visitorsCanSignIn: backend.database.signIn } : null, destinations: destinations.map((d) => ({ destinationId: d.id, provider: d.connection.provider, account: d.connection.account, kind: d.capability, target: d.target.map((t) => t.name), lastSent: d.lastDeploy })) }
|
|
@@ -1338,7 +1338,7 @@ var publishStore = defineCommand({
|
|
|
1338
1338
|
},
|
|
1339
1339
|
run: async (p, ctx) => {
|
|
1340
1340
|
await signedIn();
|
|
1341
|
-
const { deployOpenStore } = await import("./publish-store-
|
|
1341
|
+
const { deployOpenStore } = await import("./publish-store-3RC4PDY6.js");
|
|
1342
1342
|
const done = await deployOpenStore(ctx.doc(), ctx.pageId(), { destinationId: p.destinationId }).catch((e) => {
|
|
1343
1343
|
throw new CommandError(e instanceof Error ? e.message : String(e), "failed");
|
|
1344
1344
|
});
|
|
@@ -1367,7 +1367,7 @@ var integrationList = defineCommand({
|
|
|
1367
1367
|
}
|
|
1368
1368
|
},
|
|
1369
1369
|
run: async ({ capability }) => {
|
|
1370
|
-
const [{ cloudUser }, { integrationsWorkspaceId, listWorkspaceIntegrations }] = await Promise.all([import("./session-D6PKG4TK.js"), import("./integrations-
|
|
1370
|
+
const [{ cloudUser }, { integrationsWorkspaceId, listWorkspaceIntegrations }] = await Promise.all([import("./session-D6PKG4TK.js"), import("./integrations-ZG7U4WV4.js")]);
|
|
1371
1371
|
if (!cloudUser()) throw new CommandError("You are not signed in: integrations belong to your account's workspace.", "denied");
|
|
1372
1372
|
const workspaceId = integrationsWorkspaceId();
|
|
1373
1373
|
if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
|
|
@@ -1408,7 +1408,7 @@ var integrationOpen = defineCommand({
|
|
|
1408
1408
|
}
|
|
1409
1409
|
});
|
|
1410
1410
|
async function openFile() {
|
|
1411
|
-
const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-D6PKG4TK.js"), import("./publish-site-
|
|
1411
|
+
const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-D6PKG4TK.js"), import("./publish-site-FSNJRH5S.js")]);
|
|
1412
1412
|
if (!cloudUser()) throw new CommandError("You are not signed in.", "denied");
|
|
1413
1413
|
const key = openFileKey();
|
|
1414
1414
|
if (!key) throw new CommandError("This file is not saved to the cloud yet. Publish it first (publish_site).", "failed");
|
|
@@ -1434,7 +1434,7 @@ var integrationListResources = defineCommand({
|
|
|
1434
1434
|
}
|
|
1435
1435
|
},
|
|
1436
1436
|
run: async ({ connectionId, capability, path }) => {
|
|
1437
|
-
const { listResources } = await import("./integrations-
|
|
1437
|
+
const { listResources } = await import("./integrations-ZG7U4WV4.js");
|
|
1438
1438
|
const list = await listResources(connectionId, capability, asPath2(path));
|
|
1439
1439
|
return {
|
|
1440
1440
|
summary: list.level ? `${list.resources.length} at the ${list.level.label.toLowerCase()} level${list.canCreate ? " (a new one can be made)" : ""}` : "Nothing further to pick: the path is complete",
|
|
@@ -1469,7 +1469,7 @@ var integrationAddDestination = defineCommand({
|
|
|
1469
1469
|
},
|
|
1470
1470
|
run: async (p, ctx) => {
|
|
1471
1471
|
const key = await openFile();
|
|
1472
|
-
const { addDestination, createDestination, createResource } = await import("./integrations-
|
|
1472
|
+
const { addDestination, createDestination, createResource } = await import("./integrations-ZG7U4WV4.js");
|
|
1473
1473
|
let made;
|
|
1474
1474
|
if (p.create) made = await createDestination(key, p.capability, void 0, p.connectionId);
|
|
1475
1475
|
else {
|
|
@@ -1506,7 +1506,7 @@ var integrationDeploy = defineCommand({
|
|
|
1506
1506
|
},
|
|
1507
1507
|
run: async (p, ctx) => {
|
|
1508
1508
|
const key = await openFile();
|
|
1509
|
-
const { deployDestination, listDestinations } = await import("./integrations-
|
|
1509
|
+
const { deployDestination, listDestinations } = await import("./integrations-ZG7U4WV4.js");
|
|
1510
1510
|
const all = await listDestinations(key);
|
|
1511
1511
|
const dest = p.destinationId ? all.find((d) => d.id === p.destinationId) : all.length === 1 ? all[0] : void 0;
|
|
1512
1512
|
if (!dest) throw new CommandError(all.length ? `Say which destination: ${all.map((d) => `${d.id} (${d.target.map((t) => t.name).join(" / ")})`).join(", ")}.` : "This file has no destination yet. Add one first (add_site_destination).", "invalid_params");
|
|
@@ -1540,7 +1540,7 @@ var integrationAttachDatabase = defineCommand({
|
|
|
1540
1540
|
},
|
|
1541
1541
|
run: async (p, ctx) => {
|
|
1542
1542
|
const key = await openFile();
|
|
1543
|
-
const { attachDatabase, createDatabase, createResource, listResources } = await import("./integrations-
|
|
1543
|
+
const { attachDatabase, createDatabase, createResource, listResources } = await import("./integrations-ZG7U4WV4.js");
|
|
1544
1544
|
if (p.create) return attached(await createDatabase(key, void 0, p.connectionId), ctx);
|
|
1545
1545
|
if (!p.connectionId || !p.target) throw new CommandError("Say connectionId and target, or create: true.", "invalid_params");
|
|
1546
1546
|
let target = asPath2(p.target);
|
|
@@ -1579,7 +1579,7 @@ var integrationSubmissions = defineCommand({
|
|
|
1579
1579
|
},
|
|
1580
1580
|
run: async ({ form, limit }) => {
|
|
1581
1581
|
const key = await openFile();
|
|
1582
|
-
const { listSubmissions } = await import("./integrations-
|
|
1582
|
+
const { listSubmissions } = await import("./integrations-ZG7U4WV4.js");
|
|
1583
1583
|
const rows = await listSubmissions(key, { form, limit: limit ?? 20 });
|
|
1584
1584
|
return { summary: rows.length ? `${rows.length} ${rows.length === 1 ? "submission" : "submissions"}, the newest ${new Date(rows[0].createdAt).toISOString()}` : "Nothing has been sent yet", data: { submissions: rows } };
|
|
1585
1585
|
}
|
|
@@ -1604,7 +1604,7 @@ var integrationSetSignIn = defineCommand({
|
|
|
1604
1604
|
},
|
|
1605
1605
|
run: async ({ on }, ctx) => {
|
|
1606
1606
|
const key = await openFile();
|
|
1607
|
-
const { setSignIn } = await import("./integrations-
|
|
1607
|
+
const { setSignIn } = await import("./integrations-ZG7U4WV4.js");
|
|
1608
1608
|
const done = await setSignIn(key, on);
|
|
1609
1609
|
ctx.notice(on ? "Visitors can sign in." : "Sign-in is off.");
|
|
1610
1610
|
return { summary: on ? "Visitors can now create accounts and sign in on the published site" : "Sign-in is off for the published site", data: { signIn: !!done.database?.signIn } };
|
|
@@ -1822,7 +1822,7 @@ var fontTeamList = defineCommand({
|
|
|
1822
1822
|
agent: { name: "list_team_fonts", readOnly: true, description: "The team's fonts: faces uploaded once that every file of the team can use (family, weight, style)." }
|
|
1823
1823
|
},
|
|
1824
1824
|
run: async (args) => {
|
|
1825
|
-
const { refreshTeamFonts } = await import("./team-client-
|
|
1825
|
+
const { refreshTeamFonts } = await import("./team-client-AA2ASV4H.js");
|
|
1826
1826
|
const fonts = await refreshTeamFonts(args.workspace);
|
|
1827
1827
|
return { summary: plural(fonts.length, "team font"), data: { fonts: fonts.map((f) => ({ id: f.id, family: f.family, weight: f.weight, style: f.style, face: f.face, fileName: f.fileName })) } };
|
|
1828
1828
|
}
|
|
@@ -1849,7 +1849,7 @@ var fontTeamAdd = defineCommand({
|
|
|
1849
1849
|
run: async (args, ctx) => {
|
|
1850
1850
|
const { bytes, fileName: fileName2 } = await fontBytes(args, ctx);
|
|
1851
1851
|
const { face, family, weight, style } = await resolveFace(bytes, args);
|
|
1852
|
-
const { uploadTeamFont } = await import("./team-client-
|
|
1852
|
+
const { uploadTeamFont } = await import("./team-client-AA2ASV4H.js");
|
|
1853
1853
|
const font = await uploadTeamFont(bytes, { family, weight, style, face: face.index, fileName: fileName2 }, args.workspace);
|
|
1854
1854
|
return { summary: `Added ${family} ${weight}${style === "italic" ? " italic" : ""} to the team`, data: { font } };
|
|
1855
1855
|
}
|
|
@@ -1871,7 +1871,7 @@ var fontTeamRemove = defineCommand({
|
|
|
1871
1871
|
agent: { name: "remove_team_font", description: "Remove a font from the team (list_team_fonts). Files that use it fall back to another font unless they carry it themselves. The user approves every call." }
|
|
1872
1872
|
},
|
|
1873
1873
|
run: async (args) => {
|
|
1874
|
-
const { removeTeamFont } = await import("./team-client-
|
|
1874
|
+
const { removeTeamFont } = await import("./team-client-AA2ASV4H.js");
|
|
1875
1875
|
const out = await removeTeamFont(args.id, args.workspace);
|
|
1876
1876
|
return { summary: `Removed the team font${out.freed ? " and freed its storage" : ""}`, data: out };
|
|
1877
1877
|
}
|
|
@@ -1882,7 +1882,7 @@ var fontTeamCommands = [fontTeamList, fontTeamAdd];
|
|
|
1882
1882
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
1883
1883
|
async function cloudFile() {
|
|
1884
1884
|
const [{ syncStatus }, { cloudUser }] = await Promise.all([
|
|
1885
|
-
import("./sync-
|
|
1885
|
+
import("./sync-RHDWZ5TR.js"),
|
|
1886
1886
|
import("./session-D6PKG4TK.js")
|
|
1887
1887
|
]);
|
|
1888
1888
|
const link2 = syncStatus().link;
|
|
@@ -1944,7 +1944,7 @@ var fileTrash = defineCommand({
|
|
|
1944
1944
|
agent: { name: "trash_file", description: "Delete the open file: a cloud file goes to the Trash (restorable), a signed-out local file is deleted for good. Then the editor goes back to Home. The user approves every call." }
|
|
1945
1945
|
},
|
|
1946
1946
|
run: async () => {
|
|
1947
|
-
const { deleteCurrentFile, leaveDeletedFile } = await import("./delete-current-file-
|
|
1947
|
+
const { deleteCurrentFile, leaveDeletedFile } = await import("./delete-current-file-VID4OSNL.js");
|
|
1948
1948
|
const { name: name2, kind } = await deleteCurrentFile();
|
|
1949
1949
|
leaveDeletedFile();
|
|
1950
1950
|
return { summary: kind === "cloud" ? `Moved \u201C${name2}\u201D to the Trash` : `Deleted \u201C${name2}\u201D` };
|
|
@@ -2057,11 +2057,11 @@ var fileDuplicate = defineCommand({
|
|
|
2057
2057
|
},
|
|
2058
2058
|
run: async (_p, ctx) => {
|
|
2059
2059
|
const [{ syncStatus }, { cloudApi }, { isDesktopTabs }, { createFileInTab }, { openNewCloudFile }, { v4: uuid }] = await Promise.all([
|
|
2060
|
-
import("./sync-
|
|
2060
|
+
import("./sync-RHDWZ5TR.js"),
|
|
2061
2061
|
import("./api-6BD4R74D.js"),
|
|
2062
2062
|
import("./tab-mode-ALCZHWAE.js"),
|
|
2063
|
-
import("./tabs-
|
|
2064
|
-
import("./sync-
|
|
2063
|
+
import("./tabs-GROQZKNU.js"),
|
|
2064
|
+
import("./sync-RHDWZ5TR.js"),
|
|
2065
2065
|
import("./dist-node-A6V442T2.js")
|
|
2066
2066
|
]);
|
|
2067
2067
|
const doc2 = ctx.doc();
|
|
@@ -4927,7 +4927,7 @@ var viewCopyLink = defineCommand({
|
|
|
4927
4927
|
},
|
|
4928
4928
|
run: async (args, ctx) => {
|
|
4929
4929
|
const [{ syncStatus }, { fileUrl }, { withDeepLink }] = await Promise.all([
|
|
4930
|
-
import("./sync-
|
|
4930
|
+
import("./sync-RHDWZ5TR.js"),
|
|
4931
4931
|
import("./api-6BD4R74D.js"),
|
|
4932
4932
|
import("./deep-link-OO4WYEJV.js")
|
|
4933
4933
|
]);
|
|
@@ -5252,7 +5252,7 @@ var pageGo = defineCommand({
|
|
|
5252
5252
|
] }
|
|
5253
5253
|
},
|
|
5254
5254
|
run: async ({ to }) => {
|
|
5255
|
-
const { useEditorStore } = await import("./editor-store-
|
|
5255
|
+
const { useEditorStore } = await import("./editor-store-QMAGIJRQ.js");
|
|
5256
5256
|
useEditorStore.getState().goToPrintPage(to);
|
|
5257
5257
|
return { summary: typeof to === "number" ? `Page ${to + 1}` : `${to} page` };
|
|
5258
5258
|
}
|
|
@@ -5286,7 +5286,7 @@ var pageSetup = defineCommand({
|
|
|
5286
5286
|
}
|
|
5287
5287
|
},
|
|
5288
5288
|
run: async (args) => {
|
|
5289
|
-
const { useEditorStore } = await import("./editor-store-
|
|
5289
|
+
const { useEditorStore } = await import("./editor-store-QMAGIJRQ.js");
|
|
5290
5290
|
useEditorStore.getState().applyPageSetup(args);
|
|
5291
5291
|
return { summary: `Page setup updated${args.kind ? ` (${args.kind.toLowerCase()})` : ""}` };
|
|
5292
5292
|
}
|
|
@@ -5724,7 +5724,7 @@ async function docAtTime(doc2, ids, time2) {
|
|
|
5724
5724
|
let frameId;
|
|
5725
5725
|
if (time2 === void 0) {
|
|
5726
5726
|
try {
|
|
5727
|
-
const { useEditorStore } = await import("./editor-store-
|
|
5727
|
+
const { useEditorStore } = await import("./editor-store-QMAGIJRQ.js");
|
|
5728
5728
|
const st = useEditorStore.getState();
|
|
5729
5729
|
const target = st.transport?.target;
|
|
5730
5730
|
if (st.mode !== "ANIMATE" || target?.kind !== "frame") return doc2;
|
|
@@ -6118,7 +6118,7 @@ async function runAnimationExport(format, args, ctx) {
|
|
|
6118
6118
|
const filename = exportFileName(args.filename || targetName(doc2, target), format);
|
|
6119
6119
|
const [{ exportAnimation }, { memoryDestination }] = await Promise.all([import("./video-V4R7C32D.js"), import("./destination-OF3DQCEU.js")]);
|
|
6120
6120
|
if (format === "lottie" || format === "dotlottie") return runLottieExport(renderer, doc2, spec, filename, ctx, memoryDestination, args.stateMachine);
|
|
6121
|
-
const planWatermark = format !== "png" && await (await import("./export-watermark-
|
|
6121
|
+
const planWatermark = format !== "png" && await (await import("./export-watermark-DBCWDRIY.js")).exportWatermark();
|
|
6122
6122
|
if (format !== "png") spec = { ...spec, watermark: planWatermark || args.watermark !== false };
|
|
6123
6123
|
const dest = ctx.destination ? await ctx.destination(filename, FORMAT_MIME[format]) : memoryDestination(filename, FORMAT_MIME[format]);
|
|
6124
6124
|
let stats;
|
|
@@ -6204,7 +6204,7 @@ var exportLottie = animationCommand((args) => args.container === "lottie" ? "dot
|
|
|
6204
6204
|
});
|
|
6205
6205
|
async function exportSite(doc2, pageId2, packaging, styling = "css", siteUrl) {
|
|
6206
6206
|
const [{ completeSite, nextFilesOf, shareImageFiles, staticFilesOf, NoSiteRuntime, bytesOf }, { fileBase }, { zipFiles }, { downloadBlob }] = await Promise.all([
|
|
6207
|
-
import("./project-
|
|
6207
|
+
import("./project-PE3HLZOK.js"),
|
|
6208
6208
|
import("./web-VURBGZSJ.js"),
|
|
6209
6209
|
import("./zip-export-3VB4JEAP.js"),
|
|
6210
6210
|
import("./download-FTTNYILJ.js")
|
|
@@ -6298,7 +6298,7 @@ var exportStorefront = defineCommand({
|
|
|
6298
6298
|
const [{ storefrontInputs }, { STOREFRONT_TARGETS }, { bytesOf }, { fileBase, flatten }, { zipFiles }, { downloadBlob }] = await Promise.all([
|
|
6299
6299
|
import("./storefront-prepare-PKFQOLIB.js"),
|
|
6300
6300
|
import("./storefront-7FWEVS52.js"),
|
|
6301
|
-
import("./project-
|
|
6301
|
+
import("./project-PE3HLZOK.js"),
|
|
6302
6302
|
import("./web-VURBGZSJ.js"),
|
|
6303
6303
|
import("./zip-export-3VB4JEAP.js"),
|
|
6304
6304
|
import("./download-FTTNYILJ.js")
|
|
@@ -6693,7 +6693,7 @@ var visionRegenerateImage = defineCommand({
|
|
|
6693
6693
|
const id = args.id ?? ctx.selection()[0];
|
|
6694
6694
|
if (!id) throw new ToolError("Select a generated image to regenerate.");
|
|
6695
6695
|
nodeOrThrow(ctx.doc(), id);
|
|
6696
|
-
const { regenerateImage } = await import("./client-actions-
|
|
6696
|
+
const { regenerateImage } = await import("./client-actions-N3SGT7GT.js");
|
|
6697
6697
|
regenerateImage(id, args.count);
|
|
6698
6698
|
return { summary: args.count > 1 ? `Regenerating ${args.count} variants` : "Regenerating the image", data: { id, count: args.count } };
|
|
6699
6699
|
}
|
|
@@ -11333,7 +11333,7 @@ var scriptRun = defineCommand({
|
|
|
11333
11333
|
// A script is not the turn the user is watching: confirm-tier tools are refused inside it (dispatch, `nested`).
|
|
11334
11334
|
actor: { ...ctx.actor, nested: true, label: "Script" },
|
|
11335
11335
|
// A look_at inside the script sees the document as the script has left it so far, not as it was before.
|
|
11336
|
-
use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-
|
|
11336
|
+
use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-HKZ2AICN.js")).renderDocument(staged, ids, options)) : ctx.use(name2))
|
|
11337
11337
|
};
|
|
11338
11338
|
let calls = 0;
|
|
11339
11339
|
const images = [];
|
|
@@ -12153,7 +12153,7 @@ var docImportFile = defineCommand({
|
|
|
12153
12153
|
const file = new File([body], args.name);
|
|
12154
12154
|
if (file.size > MAX_BYTES) throw new ToolError(`"${args.name}" is larger than ${MAX_BYTES / 1024 / 1024} MB.`);
|
|
12155
12155
|
const [{ buildImportedDocument }, { mergeImportedDocument }] = await Promise.all([
|
|
12156
|
-
import("./plugin-import-
|
|
12156
|
+
import("./plugin-import-COKPJN26.js"),
|
|
12157
12157
|
import("./import-merge-XPXQ3JK3.js")
|
|
12158
12158
|
]);
|
|
12159
12159
|
const built = await buildImportedDocument(file);
|
|
@@ -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-B3JAZIVR.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() {
|
|
@@ -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-QMAGIJRQ.js"),
|
|
95
95
|
import("../lib/document/photo-frames.js"),
|
|
96
|
-
import("./media-tool-
|
|
96
|
+
import("./media-tool-DBAH4UXQ.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);
|
|
@@ -150,7 +150,7 @@ function startHyperyTeams() {
|
|
|
150
150
|
maybePromptForTeam();
|
|
151
151
|
void followFileTeam(linkedKey);
|
|
152
152
|
});
|
|
153
|
-
void import("./sync-
|
|
153
|
+
void import("./sync-RHDWZ5TR.js").then(({ onSyncStatus, syncStatus }) => {
|
|
154
154
|
linkedKey = syncStatus().link?.key ?? null;
|
|
155
155
|
void followFileTeam(linkedKey);
|
|
156
156
|
onSyncStatus((_s, link) => {
|
|
@@ -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-
|
|
60
|
+
const { requestAudio } = await import("./client-NUDNRHUE.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-
|
|
66
|
+
const { generateVideoFile } = await import("./generate-media-RFIPTUJW.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-
|
|
72
|
+
import("./client-NUDNRHUE.js"),
|
|
73
73
|
import("./client-store-5GY4BFFF.js")
|
|
74
74
|
]);
|
|
75
75
|
const modelId = effectiveImageModel(useAiStore.getState());
|