@popcraft/kit 0.53.16 → 0.53.18
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-CMHX6TIO.js → agent-QSCYOPEH.js} +1 -1
- package/dist/chunks/{builtin-RTTBLUAL.js → builtin-5P5A2IMY.js} +4 -4
- package/dist/chunks/{buy-credits-DD453AXQ.js → buy-credits-LK6QXRXO.js} +2 -2
- package/dist/chunks/{check-template-JUZALH4J.js → check-template-SWWOPCV6.js} +3 -3
- package/dist/chunks/{chunk-GZZNTUHF.js → chunk-2O3AJLC7.js} +5 -5
- package/dist/chunks/{chunk-MUOTQRR5.js → chunk-35ZHGX7R.js} +3 -3
- package/dist/chunks/{chunk-ESP2XWO3.js → chunk-56ZMLITS.js} +4 -4
- package/dist/chunks/{chunk-WNCUXXQ3.js → chunk-735IMMB6.js} +4 -4
- package/dist/chunks/{chunk-ZIOF5AO6.js → chunk-7G7UOKM4.js} +1 -1
- package/dist/chunks/{chunk-YPSNEHNF.js → chunk-7HICNIH2.js} +54 -54
- package/dist/chunks/{chunk-KU4HCWYC.js → chunk-7PRWYB7R.js} +4 -4
- package/dist/chunks/{chunk-JQNEQDKU.js → chunk-7R77JLIP.js} +1 -1
- package/dist/chunks/{chunk-AGOLJ27G.js → chunk-AN22TGNL.js} +3 -1
- package/dist/chunks/{chunk-FUS7Y4SS.js → chunk-ASMDKFSL.js} +1 -1
- package/dist/chunks/{chunk-W2PQ27E2.js → chunk-C4JKLCPX.js} +10 -10
- package/dist/chunks/{chunk-IFDOQEHS.js → chunk-E6LFTCYF.js} +4 -4
- package/dist/chunks/{chunk-XI7YE4K3.js → chunk-ETC4DTCD.js} +2 -2
- package/dist/chunks/{chunk-2FFA6464.js → chunk-F4AFFSFA.js} +4 -4
- package/dist/chunks/{chunk-KMGJ55U3.js → chunk-GZWJRQRF.js} +1 -1
- package/dist/chunks/{chunk-LVENLTN6.js → chunk-HC2BCDFS.js} +4 -4
- package/dist/chunks/{chunk-ZEERADTI.js → chunk-I5VBP754.js} +12 -12
- package/dist/chunks/{chunk-IIPH3CZZ.js → chunk-IY5UZMTO.js} +251 -2
- package/dist/chunks/{chunk-EIPEDGHA.js → chunk-L5MSOOYG.js} +2 -2
- package/dist/chunks/{chunk-S2QORHQB.js → chunk-LC62KWV5.js} +2 -2
- package/dist/chunks/{chunk-KWJBP75Z.js → chunk-LPGPKUME.js} +1 -1
- package/dist/chunks/{chunk-D5EG45LZ.js → chunk-MGLGBL5N.js} +12 -12
- package/dist/chunks/{chunk-2KPU4QCV.js → chunk-NK4G5HDO.js} +28 -7
- package/dist/chunks/{chunk-XSYCOMIX.js → chunk-OK3DQPII.js} +280 -54
- package/dist/chunks/{chunk-QS4AT3DM.js → chunk-RPZJC2IG.js} +2 -4
- package/dist/chunks/{chunk-LV2DMDTD.js → chunk-VWL5XI7L.js} +11 -11
- package/dist/chunks/{chunk-XKUI2K2V.js → chunk-X4JKF2JG.js} +214 -1
- package/dist/chunks/{chunk-K63NQAOB.js → chunk-XE6NJFI2.js} +89 -89
- package/dist/chunks/{client-XKJT4H2P.js → client-3JR3D6HI.js} +3 -3
- package/dist/chunks/{client-RMWHGLS4.js → client-7ABQN2CO.js} +1 -1
- package/dist/chunks/{client-MCO72XP4.js → client-LHZIJH23.js} +2 -2
- package/dist/chunks/{client-actions-IRIVVQJJ.js → client-actions-VNMC4A7Z.js} +13 -14
- package/dist/chunks/{dangerous-IGR27D2F.js → dangerous-VGWX2YEI.js} +4 -4
- package/dist/chunks/{delete-current-file-OHKLBKKQ.js → delete-current-file-5IZOBWY2.js} +9 -10
- package/dist/chunks/{editor-seams-WVHFVQHE.js → editor-seams-4M7R4HNW.js} +18 -20
- package/dist/chunks/{editor-store-A2SNJTLI.js → editor-store-L4V3QA4A.js} +5 -5
- package/dist/chunks/{export-FWVSW5AN.js → export-FZA6A6I6.js} +1 -1
- package/dist/chunks/{export-watermark-KGGTO4O4.js → export-watermark-3FQ7QOYR.js} +9 -10
- package/dist/chunks/{eyedropper-4FPMVPMA.js → eyedropper-P3ZONVHS.js} +7 -11
- package/dist/chunks/{generate-media-XVYKOX6Q.js → generate-media-SSWL4Y2L.js} +4 -4
- package/dist/chunks/{host-YTWNKTAD.js → host-VSSIPMLW.js} +14 -17
- package/dist/chunks/{integrations-V57Q7LUC.js → integrations-OQV4PCCS.js} +1 -1
- package/dist/chunks/{libraries-T6HTLURU.js → libraries-CWODJKJI.js} +9 -10
- package/dist/chunks/{live-EA3LBJFA.js → live-DQITX7DB.js} +5 -5
- package/dist/chunks/{lottie-AGAHYTZE.js → lottie-ZKR6H64U.js} +3 -4
- package/dist/chunks/{media-tool-RYUZKR7X.js → media-tool-3IFICUR3.js} +12 -126
- package/dist/chunks/{new-file-UQQMA2GY.js → new-file-GYD6TJYO.js} +7 -7
- package/dist/chunks/{pdf-X3ZB6QKO.js → pdf-RPD6QHMP.js} +5 -7
- package/dist/chunks/{player-check-ZGWLAHXY.js → player-check-CZVWUJXW.js} +3 -4
- package/dist/chunks/{plugin-E3ILJQPJ.js → plugin-V2XZNMZE.js} +3 -3
- package/dist/chunks/{plugin-import-TI46GQFN.js → plugin-import-UFRJVWX3.js} +23 -26
- package/dist/chunks/{pptx-OI7DTHPN.js → pptx-QZMA6SRM.js} +3 -4
- package/dist/chunks/{presence-FTKMD5F3.js → presence-GGLTIRS2.js} +6 -6
- package/dist/chunks/{project-JGVNQ5OU.js → project-XENIE5UL.js} +3 -3
- package/dist/chunks/{publish-site-TEZEZGDT.js → publish-site-HBMHT6ZH.js} +10 -11
- package/dist/chunks/{publish-store-WUY2P2RZ.js → publish-store-PFXW7OCQ.js} +5 -5
- package/dist/chunks/{raster-actions-DI55TXCE.js → raster-actions-ZGFZYTAH.js} +7 -11
- package/dist/chunks/{reference-images-36D6WIRI.js → reference-images-RAJE3NRE.js} +2 -2
- package/dist/chunks/{resolvers-V6SR7XRN.js → resolvers-J3DRJJ7P.js} +5 -6
- package/dist/chunks/{runner-OYGJ7BEH.js → runner-KSX7DGFW.js} +25 -27
- package/dist/chunks/{store-EUIN7C5G.js → store-4GUNFV7U.js} +14 -15
- package/dist/chunks/{storefront-prepare-6WYLPH6E.js → storefront-prepare-S6A5FZXC.js} +1 -1
- package/dist/chunks/{svg-export-QTVHP7B2.js → svg-export-J23NHZWC.js} +4 -5
- package/dist/chunks/{sync-THYAERCF.js → sync-K2VRUB23.js} +9 -10
- package/dist/chunks/{tabs-IURSKOB4.js → tabs-A6SMBMFX.js} +12 -12
- package/dist/chunks/{team-WYTKJA5K.js → team-T3SVBBAO.js} +1 -1
- package/dist/chunks/{team-client-QABPVGKN.js → team-client-S3GCAISX.js} +1 -1
- package/dist/chunks/{theme-store-FAYEXX7K.js → theme-store-CBS2LI4H.js} +2 -3
- package/dist/chunks/{tools-676MQY7D.js → tools-JRQSLBJK.js} +2 -2
- package/dist/chunks/{ui-commands-TRN7NNDS.js → ui-commands-ECGJ3AYH.js} +20 -22
- package/dist/chunks/{versions-6I33EUEK.js → versions-MP3FT4IV.js} +9 -10
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/chunk-C3QJHVOH.js +0 -269
- package/dist/chunks/chunk-I5REOOP7.js +0 -225
- package/dist/chunks/chunk-P4LE4WLR.js +0 -25
- package/dist/chunks/chunk-ZBANBY2Q.js +0 -27
|
@@ -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-L5MSOOYG.js";
|
|
11
|
+
import "./chunk-7HICNIH2.js";
|
|
12
12
|
import "./chunk-LJZR7CU3.js";
|
|
13
13
|
import "./chunk-JNBUJE2Z.js";
|
|
14
14
|
import "./chunk-EGUH2RFR.js";
|
|
@@ -19,7 +19,7 @@ import "./chunk-SH6T47YM.js";
|
|
|
19
19
|
import "./chunk-O6H6N3RA.js";
|
|
20
20
|
import "./chunk-WA5G5BAY.js";
|
|
21
21
|
import "./chunk-UDDWBCFE.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-735IMMB6.js";
|
|
23
23
|
import "./chunk-T2U7UWFL.js";
|
|
24
24
|
import "./chunk-ZX64TIVJ.js";
|
|
25
25
|
import "./chunk-AKNWNB6A.js";
|
|
@@ -27,7 +27,7 @@ import "./chunk-AFRAXU4Y.js";
|
|
|
27
27
|
import "./chunk-FJL3DZQB.js";
|
|
28
28
|
import "./chunk-FIJRNTK2.js";
|
|
29
29
|
import "./chunk-NPFIKFPP.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-XE6NJFI2.js";
|
|
31
31
|
import "./chunk-VB3ZFOB6.js";
|
|
32
32
|
import "./chunk-ZVISQBYU.js";
|
|
33
33
|
import "./chunk-TXEWYX4G.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-ASMDKFSL.js";
|
|
11
11
|
import "./chunk-6TMH7HCQ.js";
|
|
12
12
|
import {
|
|
13
13
|
useHyperyTeam
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7R77JLIP.js";
|
|
15
15
|
import {
|
|
16
16
|
ApiError,
|
|
17
17
|
inAppPurchases,
|
|
@@ -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-MGLGBL5N.js";
|
|
10
10
|
import {
|
|
11
11
|
builtinCommands
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7HICNIH2.js";
|
|
13
13
|
import "./chunk-LJZR7CU3.js";
|
|
14
14
|
import "./chunk-JNBUJE2Z.js";
|
|
15
15
|
import "./chunk-EGUH2RFR.js";
|
|
@@ -34,7 +34,7 @@ import "./chunk-FJL3DZQB.js";
|
|
|
34
34
|
import "./chunk-FIJRNTK2.js";
|
|
35
35
|
import "./chunk-NPFIKFPP.js";
|
|
36
36
|
import "./chunk-PPM77AQB.js";
|
|
37
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-XE6NJFI2.js";
|
|
38
38
|
import "./chunk-ECOCNQ6W.js";
|
|
39
39
|
import "./chunk-VB3ZFOB6.js";
|
|
40
40
|
import "./chunk-ZVISQBYU.js";
|
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
} from "./chunk-52AGTWH7.js";
|
|
11
11
|
import {
|
|
12
12
|
walkNode
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import {
|
|
15
|
-
fittedRadii,
|
|
16
|
-
vectorCmds
|
|
17
|
-
} from "./chunk-C3QJHVOH.js";
|
|
13
|
+
} from "./chunk-HC2BCDFS.js";
|
|
18
14
|
import {
|
|
19
15
|
strToU8,
|
|
20
16
|
zipSync
|
|
21
17
|
} from "./chunk-ZQMCKI3G.js";
|
|
18
|
+
import {
|
|
19
|
+
fittedRadii,
|
|
20
|
+
vectorCmds
|
|
21
|
+
} from "./chunk-IY5UZMTO.js";
|
|
22
22
|
import {
|
|
23
23
|
bytesToBase64,
|
|
24
24
|
encodePng
|
|
@@ -127,7 +127,7 @@ async function copyNodeAsPNG(renderer, node, doc, styles, scale = 2) {
|
|
|
127
127
|
}
|
|
128
128
|
async function copyNodeAsSVG(renderer, node, doc, styles) {
|
|
129
129
|
try {
|
|
130
|
-
const { exportNodeToSVG } = await import("./svg-export-
|
|
130
|
+
const { exportNodeToSVG } = await import("./svg-export-J23NHZWC.js");
|
|
131
131
|
const svg = await exportNodeToSVG(renderer, node, doc, styles);
|
|
132
132
|
if (!svg) return false;
|
|
133
133
|
await navigator.clipboard.writeText(svg);
|
|
@@ -149,12 +149,12 @@ async function exportSettingFile(renderer, node, setting, doc, styles) {
|
|
|
149
149
|
return blob ? { name, blob } : null;
|
|
150
150
|
}
|
|
151
151
|
if (setting.format === "SVG") {
|
|
152
|
-
const { exportNodeToSVG } = await import("./svg-export-
|
|
152
|
+
const { exportNodeToSVG } = await import("./svg-export-J23NHZWC.js");
|
|
153
153
|
const svg = await exportNodeToSVG(renderer, node, doc, styles);
|
|
154
154
|
return svg ? { name, blob: new Blob([svg], { type: "image/svg+xml" }) } : null;
|
|
155
155
|
}
|
|
156
156
|
if (setting.format === "PDF") {
|
|
157
|
-
const { exportNodeToPDF, pdfOptionsFor } = await import("./pdf-
|
|
157
|
+
const { exportNodeToPDF, pdfOptionsFor } = await import("./pdf-RPD6QHMP.js");
|
|
158
158
|
const blob = await exportNodeToPDF(renderer, node, pdfOptionsFor(setting), doc, styles);
|
|
159
159
|
return blob ? { name, blob } : null;
|
|
160
160
|
}
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
requestImageAction,
|
|
17
17
|
sizeForAspect,
|
|
18
18
|
vectorSupport
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-AN22TGNL.js";
|
|
20
20
|
import {
|
|
21
21
|
external_exports
|
|
22
22
|
} from "./chunk-UDDWBCFE.js";
|
|
@@ -25,13 +25,13 @@ import {
|
|
|
25
25
|
} from "./chunk-53RJWF2A.js";
|
|
26
26
|
import {
|
|
27
27
|
exportNodeToSVG
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-I5VBP754.js";
|
|
29
29
|
import {
|
|
30
30
|
selectionReferenceImages
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-7G7UOKM4.js";
|
|
32
32
|
import {
|
|
33
33
|
useEditorStore
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-OK3DQPII.js";
|
|
35
35
|
import {
|
|
36
36
|
withHistoryGroup
|
|
37
37
|
} from "./chunk-DUH4J3CB.js";
|
|
@@ -40,7 +40,7 @@ async function underReviewKit(doc, kit) {
|
|
|
40
40
|
return settleMeasuredLayout({ ...kitted, nodes });
|
|
41
41
|
}
|
|
42
42
|
async function renderDocument(doc, nodeIds, options) {
|
|
43
|
-
const { selectionReferenceImages } = await import("./reference-images-
|
|
43
|
+
const { selectionReferenceImages } = await import("./reference-images-RAJE3NRE.js");
|
|
44
44
|
if (options?.kit) {
|
|
45
45
|
doc = await underReviewKit(doc, options.kit);
|
|
46
46
|
}
|
|
@@ -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-3JR3D6HI.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-SSWL4Y2L.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-3JR3D6HI.js"),
|
|
73
73
|
import("./client-store-4J5MJDAW.js")
|
|
74
74
|
]);
|
|
75
75
|
const modelId = effectiveImageModel(useAiStore.getState());
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
reboxed,
|
|
77
77
|
reorderSelection,
|
|
78
78
|
textAndShapeOf
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-XE6NJFI2.js";
|
|
80
80
|
import {
|
|
81
81
|
scaleSubtreePatches
|
|
82
82
|
} from "./chunk-VB3ZFOB6.js";
|
|
@@ -876,7 +876,7 @@ init_scene_graph();
|
|
|
876
876
|
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.");
|
|
877
877
|
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 });
|
|
878
878
|
async function placeImportedPicture(ctx, imported, at, what, extra = {}) {
|
|
879
|
-
const client = await import("./client-
|
|
879
|
+
const client = await import("./client-7ABQN2CO.js");
|
|
880
880
|
if (at.fillLayerId) {
|
|
881
881
|
const doc2 = ctx.doc();
|
|
882
882
|
const target = nodeOrThrow(doc2, at.fillLayerId);
|
|
@@ -922,7 +922,7 @@ var photoSearch = defineCommand({
|
|
|
922
922
|
}
|
|
923
923
|
},
|
|
924
924
|
run: async (args) => {
|
|
925
|
-
const { searchStockPhotos } = await import("./client-
|
|
925
|
+
const { searchStockPhotos } = await import("./client-7ABQN2CO.js");
|
|
926
926
|
const page = await searchStockPhotos(args.query, args.page ?? 1, { licence: args.licence });
|
|
927
927
|
return {
|
|
928
928
|
summary: `${page.results.length} photo${page.results.length === 1 ? "" : "s"} for \u201C${page.query}\u201D (page ${page.page} of ${page.pageCount || 1})`,
|
|
@@ -956,7 +956,7 @@ var photoInsert = defineCommand({
|
|
|
956
956
|
run: async (args, ctx) => {
|
|
957
957
|
if (!args.id && !args.query) throw new ToolError("Pass an id from search_photos, or a query.");
|
|
958
958
|
if (args.id && !isPhotoId(args.id)) throw new ToolError(`"${args.id}" is not a photo id from search_photos.`);
|
|
959
|
-
const client = await import("./client-
|
|
959
|
+
const client = await import("./client-7ABQN2CO.js");
|
|
960
960
|
let photo;
|
|
961
961
|
if (args.id) photo = await client.stockPhotoInfo(args.id);
|
|
962
962
|
else {
|
|
@@ -994,10 +994,10 @@ var mediaList = defineCommand({
|
|
|
994
994
|
}
|
|
995
995
|
},
|
|
996
996
|
run: async (args) => {
|
|
997
|
-
const { listLibraryMedia } = await import("./client-
|
|
997
|
+
const { listLibraryMedia } = await import("./client-LHZIJH23.js");
|
|
998
998
|
const q = { ...args };
|
|
999
999
|
if (!q.workspace) {
|
|
1000
|
-
const { syncStatus } = await import("./sync-
|
|
1000
|
+
const { syncStatus } = await import("./sync-K2VRUB23.js");
|
|
1001
1001
|
const link2 = syncStatus().link;
|
|
1002
1002
|
if (!link2) throw new ToolError("This document is not saved to the cloud, so it has no team media library. Pass workspace.");
|
|
1003
1003
|
q.workspace = (await listLibraryMedia({ file: link2.key, limit: 1 })).workspaceId;
|
|
@@ -1032,7 +1032,7 @@ var mediaInsert = defineCommand({
|
|
|
1032
1032
|
run: async (args, ctx) => {
|
|
1033
1033
|
const contentType = args.contentType ?? "image/*";
|
|
1034
1034
|
if (!contentType.startsWith("image/")) throw new ToolError("insert_media places pictures; this item is not one.");
|
|
1035
|
-
const { importLibraryPicture } = await import("./client-
|
|
1035
|
+
const { importLibraryPicture } = await import("./client-LHZIJH23.js");
|
|
1036
1036
|
const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "Media", contentType, size: 0, createdAt: "", fileCount: 1, source: null };
|
|
1037
1037
|
const imported = await importLibraryPicture(item);
|
|
1038
1038
|
return placeImportedPicture(ctx, imported, args, `\u201C${imported.name}\u201D`, { hash: imported.hash });
|
|
@@ -1053,7 +1053,7 @@ var mediaDownload = defineCommand({
|
|
|
1053
1053
|
// The Library's right-click menu: saves the item's file to the computer.
|
|
1054
1054
|
expose: { ui: { label: "Download", palette: false } },
|
|
1055
1055
|
run: async (args) => {
|
|
1056
|
-
const { libraryBlob, libraryFileName } = await import("./client-
|
|
1056
|
+
const { libraryBlob, libraryFileName } = await import("./client-LHZIJH23.js");
|
|
1057
1057
|
const { downloadBlob } = await import("./download-Y3ITVA3U.js");
|
|
1058
1058
|
const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "media", contentType: args.contentType ?? "", size: 0, createdAt: "", fileCount: 1, source: null };
|
|
1059
1059
|
const blob = await libraryBlob(item);
|
|
@@ -1084,7 +1084,7 @@ var mediaDelete = defineCommand({
|
|
|
1084
1084
|
}
|
|
1085
1085
|
},
|
|
1086
1086
|
run: async (args) => {
|
|
1087
|
-
const { deleteLibraryMedia } = await import("./client-
|
|
1087
|
+
const { deleteLibraryMedia } = await import("./client-LHZIJH23.js");
|
|
1088
1088
|
const out = await deleteLibraryMedia(args.workspace, args.hash);
|
|
1089
1089
|
return { summary: `Deleted it from the library (it was in ${out.files} file${out.files === 1 ? "" : "s"})`, data: out };
|
|
1090
1090
|
}
|
|
@@ -1098,13 +1098,13 @@ async function signedIn() {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
async function publishedFile() {
|
|
1100
1100
|
await signedIn();
|
|
1101
|
-
const { openFileKey } = await import("./publish-site-
|
|
1101
|
+
const { openFileKey } = await import("./publish-site-HBMHT6ZH.js");
|
|
1102
1102
|
const key = openFileKey();
|
|
1103
1103
|
if (!key) throw new CommandError("This file is not saved to the cloud yet, so it has no site. Publish it first.", "failed");
|
|
1104
1104
|
return key;
|
|
1105
1105
|
}
|
|
1106
1106
|
async function formsWithoutDatabase(key) {
|
|
1107
|
-
const [{ useEditorStore }, { usesForms, formsGoNowhere }, { siteBackend }] = await Promise.all([import("./editor-store-
|
|
1107
|
+
const [{ useEditorStore }, { usesForms, formsGoNowhere }, { siteBackend }] = await Promise.all([import("./editor-store-L4V3QA4A.js"), import("./backend-7KRMCLSO.js"), import("./integrations-OQV4PCCS.js")]);
|
|
1108
1108
|
const doc2 = useEditorStore.getState().document;
|
|
1109
1109
|
if (!usesForms(doc2)) return false;
|
|
1110
1110
|
return formsGoNowhere(doc2, await siteBackend(key).catch(() => void 0));
|
|
@@ -1140,7 +1140,7 @@ var publishSite = defineCommand({
|
|
|
1140
1140
|
const { cleanSlug } = await import("./rules-5NYUWZVM.js");
|
|
1141
1141
|
const address = p.address === void 0 ? void 0 : cleanSlug(p.address);
|
|
1142
1142
|
if (address === null) throw new CommandError("That cannot be a site address: use 3 to 40 letters, digits and dashes.", "invalid_params");
|
|
1143
|
-
const { publishOpenFile, NoScreens } = await import("./publish-site-
|
|
1143
|
+
const { publishOpenFile, NoScreens } = await import("./publish-site-HBMHT6ZH.js");
|
|
1144
1144
|
try {
|
|
1145
1145
|
const done = await publishOpenFile(address);
|
|
1146
1146
|
ctx.notice(`Published version ${done.version}: ${done.url}`);
|
|
@@ -1195,7 +1195,7 @@ var publishListSites = defineCommand({
|
|
|
1195
1195
|
},
|
|
1196
1196
|
run: async (p) => {
|
|
1197
1197
|
await signedIn();
|
|
1198
|
-
const [{ workspaceSites }, { activeTeamWorkspaceId, useHyperyTeam }] = await Promise.all([import("./sites-QMNZBRQV.js"), import("./team-
|
|
1198
|
+
const [{ workspaceSites }, { activeTeamWorkspaceId, useHyperyTeam }] = await Promise.all([import("./sites-QMNZBRQV.js"), import("./team-T3SVBBAO.js")]);
|
|
1199
1199
|
const workspaceId = p.workspaceId ?? activeTeamWorkspaceId() ?? useHyperyTeam.getState().personalWorkspaceId;
|
|
1200
1200
|
if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
|
|
1201
1201
|
const out = await workspaceSites(workspaceId);
|
|
@@ -1244,12 +1244,12 @@ var publishStatus = defineCommand({
|
|
|
1244
1244
|
},
|
|
1245
1245
|
run: async () => {
|
|
1246
1246
|
await signedIn();
|
|
1247
|
-
const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-
|
|
1247
|
+
const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-HBMHT6ZH.js"), import("./sites-QMNZBRQV.js")]);
|
|
1248
1248
|
const key = openFileKey();
|
|
1249
1249
|
const status = await siteStatus(key);
|
|
1250
1250
|
const site = status.site;
|
|
1251
|
-
const backend = key ? await (await import("./integrations-
|
|
1252
|
-
const destinations = key ? await (await import("./integrations-
|
|
1251
|
+
const backend = key ? await (await import("./integrations-OQV4PCCS.js")).siteBackend(key).catch(() => null) : null;
|
|
1252
|
+
const destinations = key ? await (await import("./integrations-OQV4PCCS.js")).listDestinations(key).catch(() => []) : [];
|
|
1253
1253
|
return {
|
|
1254
1254
|
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}`,
|
|
1255
1255
|
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 })) }
|
|
@@ -1280,7 +1280,7 @@ var publishStore = defineCommand({
|
|
|
1280
1280
|
},
|
|
1281
1281
|
run: async (p, ctx) => {
|
|
1282
1282
|
await signedIn();
|
|
1283
|
-
const { deployOpenStore } = await import("./publish-store-
|
|
1283
|
+
const { deployOpenStore } = await import("./publish-store-PFXW7OCQ.js");
|
|
1284
1284
|
const done = await deployOpenStore(ctx.doc(), ctx.pageId(), { destinationId: p.destinationId }).catch((e) => {
|
|
1285
1285
|
throw new CommandError(e instanceof Error ? e.message : String(e), "failed");
|
|
1286
1286
|
});
|
|
@@ -1309,7 +1309,7 @@ var integrationList = defineCommand({
|
|
|
1309
1309
|
}
|
|
1310
1310
|
},
|
|
1311
1311
|
run: async ({ capability }) => {
|
|
1312
|
-
const [{ cloudUser }, { integrationsWorkspaceId, listWorkspaceIntegrations }] = await Promise.all([import("./session-Q7CTWZ3F.js"), import("./integrations-
|
|
1312
|
+
const [{ cloudUser }, { integrationsWorkspaceId, listWorkspaceIntegrations }] = await Promise.all([import("./session-Q7CTWZ3F.js"), import("./integrations-OQV4PCCS.js")]);
|
|
1313
1313
|
if (!cloudUser()) throw new CommandError("You are not signed in: integrations belong to your account's workspace.", "denied");
|
|
1314
1314
|
const workspaceId = integrationsWorkspaceId();
|
|
1315
1315
|
if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
|
|
@@ -1350,7 +1350,7 @@ var integrationOpen = defineCommand({
|
|
|
1350
1350
|
}
|
|
1351
1351
|
});
|
|
1352
1352
|
async function openFile() {
|
|
1353
|
-
const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-Q7CTWZ3F.js"), import("./publish-site-
|
|
1353
|
+
const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-Q7CTWZ3F.js"), import("./publish-site-HBMHT6ZH.js")]);
|
|
1354
1354
|
if (!cloudUser()) throw new CommandError("You are not signed in.", "denied");
|
|
1355
1355
|
const key = openFileKey();
|
|
1356
1356
|
if (!key) throw new CommandError("This file is not saved to the cloud yet. Publish it first (publish_site).", "failed");
|
|
@@ -1376,7 +1376,7 @@ var integrationListResources = defineCommand({
|
|
|
1376
1376
|
}
|
|
1377
1377
|
},
|
|
1378
1378
|
run: async ({ connectionId, capability, path }) => {
|
|
1379
|
-
const { listResources } = await import("./integrations-
|
|
1379
|
+
const { listResources } = await import("./integrations-OQV4PCCS.js");
|
|
1380
1380
|
const list = await listResources(connectionId, capability, asPath2(path));
|
|
1381
1381
|
return {
|
|
1382
1382
|
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",
|
|
@@ -1411,7 +1411,7 @@ var integrationAddDestination = defineCommand({
|
|
|
1411
1411
|
},
|
|
1412
1412
|
run: async (p, ctx) => {
|
|
1413
1413
|
const key = await openFile();
|
|
1414
|
-
const { addDestination, createDestination, createResource } = await import("./integrations-
|
|
1414
|
+
const { addDestination, createDestination, createResource } = await import("./integrations-OQV4PCCS.js");
|
|
1415
1415
|
let made;
|
|
1416
1416
|
if (p.create) made = await createDestination(key, p.capability, void 0, p.connectionId);
|
|
1417
1417
|
else {
|
|
@@ -1448,7 +1448,7 @@ var integrationDeploy = defineCommand({
|
|
|
1448
1448
|
},
|
|
1449
1449
|
run: async (p, ctx) => {
|
|
1450
1450
|
const key = await openFile();
|
|
1451
|
-
const { deployDestination, listDestinations } = await import("./integrations-
|
|
1451
|
+
const { deployDestination, listDestinations } = await import("./integrations-OQV4PCCS.js");
|
|
1452
1452
|
const all = await listDestinations(key);
|
|
1453
1453
|
const dest = p.destinationId ? all.find((d) => d.id === p.destinationId) : all.length === 1 ? all[0] : void 0;
|
|
1454
1454
|
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");
|
|
@@ -1482,7 +1482,7 @@ var integrationAttachDatabase = defineCommand({
|
|
|
1482
1482
|
},
|
|
1483
1483
|
run: async (p, ctx) => {
|
|
1484
1484
|
const key = await openFile();
|
|
1485
|
-
const { attachDatabase, createDatabase, createResource, listResources } = await import("./integrations-
|
|
1485
|
+
const { attachDatabase, createDatabase, createResource, listResources } = await import("./integrations-OQV4PCCS.js");
|
|
1486
1486
|
if (p.create) return attached(await createDatabase(key, void 0, p.connectionId), ctx);
|
|
1487
1487
|
if (!p.connectionId || !p.target) throw new CommandError("Say connectionId and target, or create: true.", "invalid_params");
|
|
1488
1488
|
let target = asPath2(p.target);
|
|
@@ -1521,7 +1521,7 @@ var integrationSubmissions = defineCommand({
|
|
|
1521
1521
|
},
|
|
1522
1522
|
run: async ({ form, limit }) => {
|
|
1523
1523
|
const key = await openFile();
|
|
1524
|
-
const { listSubmissions } = await import("./integrations-
|
|
1524
|
+
const { listSubmissions } = await import("./integrations-OQV4PCCS.js");
|
|
1525
1525
|
const rows = await listSubmissions(key, { form, limit: limit ?? 20 });
|
|
1526
1526
|
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 } };
|
|
1527
1527
|
}
|
|
@@ -1546,7 +1546,7 @@ var integrationSetSignIn = defineCommand({
|
|
|
1546
1546
|
},
|
|
1547
1547
|
run: async ({ on }, ctx) => {
|
|
1548
1548
|
const key = await openFile();
|
|
1549
|
-
const { setSignIn } = await import("./integrations-
|
|
1549
|
+
const { setSignIn } = await import("./integrations-OQV4PCCS.js");
|
|
1550
1550
|
const done = await setSignIn(key, on);
|
|
1551
1551
|
ctx.notice(on ? "Visitors can sign in." : "Sign-in is off.");
|
|
1552
1552
|
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 } };
|
|
@@ -1764,7 +1764,7 @@ var fontTeamList = defineCommand({
|
|
|
1764
1764
|
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)." }
|
|
1765
1765
|
},
|
|
1766
1766
|
run: async (args) => {
|
|
1767
|
-
const { refreshTeamFonts } = await import("./team-client-
|
|
1767
|
+
const { refreshTeamFonts } = await import("./team-client-S3GCAISX.js");
|
|
1768
1768
|
const fonts = await refreshTeamFonts(args.workspace);
|
|
1769
1769
|
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 })) } };
|
|
1770
1770
|
}
|
|
@@ -1791,7 +1791,7 @@ var fontTeamAdd = defineCommand({
|
|
|
1791
1791
|
run: async (args, ctx) => {
|
|
1792
1792
|
const { bytes, fileName: fileName2 } = await fontBytes(args, ctx);
|
|
1793
1793
|
const { face, family, weight, style } = await resolveFace(bytes, args);
|
|
1794
|
-
const { uploadTeamFont } = await import("./team-client-
|
|
1794
|
+
const { uploadTeamFont } = await import("./team-client-S3GCAISX.js");
|
|
1795
1795
|
const font = await uploadTeamFont(bytes, { family, weight, style, face: face.index, fileName: fileName2 }, args.workspace);
|
|
1796
1796
|
return { summary: `Added ${family} ${weight}${style === "italic" ? " italic" : ""} to the team`, data: { font } };
|
|
1797
1797
|
}
|
|
@@ -1813,7 +1813,7 @@ var fontTeamRemove = defineCommand({
|
|
|
1813
1813
|
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." }
|
|
1814
1814
|
},
|
|
1815
1815
|
run: async (args) => {
|
|
1816
|
-
const { removeTeamFont } = await import("./team-client-
|
|
1816
|
+
const { removeTeamFont } = await import("./team-client-S3GCAISX.js");
|
|
1817
1817
|
const out = await removeTeamFont(args.id, args.workspace);
|
|
1818
1818
|
return { summary: `Removed the team font${out.freed ? " and freed its storage" : ""}`, data: out };
|
|
1819
1819
|
}
|
|
@@ -1824,7 +1824,7 @@ var fontTeamCommands = [fontTeamList, fontTeamAdd];
|
|
|
1824
1824
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
1825
1825
|
async function cloudFile() {
|
|
1826
1826
|
const [{ syncStatus }, { cloudUser }] = await Promise.all([
|
|
1827
|
-
import("./sync-
|
|
1827
|
+
import("./sync-K2VRUB23.js"),
|
|
1828
1828
|
import("./session-Q7CTWZ3F.js")
|
|
1829
1829
|
]);
|
|
1830
1830
|
const link2 = syncStatus().link;
|
|
@@ -1886,7 +1886,7 @@ var fileTrash = defineCommand({
|
|
|
1886
1886
|
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." }
|
|
1887
1887
|
},
|
|
1888
1888
|
run: async () => {
|
|
1889
|
-
const { deleteCurrentFile, leaveDeletedFile } = await import("./delete-current-file-
|
|
1889
|
+
const { deleteCurrentFile, leaveDeletedFile } = await import("./delete-current-file-5IZOBWY2.js");
|
|
1890
1890
|
const { name: name2, kind } = await deleteCurrentFile();
|
|
1891
1891
|
leaveDeletedFile();
|
|
1892
1892
|
return { summary: kind === "cloud" ? `Moved \u201C${name2}\u201D to the Trash` : `Deleted \u201C${name2}\u201D` };
|
|
@@ -1999,11 +1999,11 @@ var fileDuplicate = defineCommand({
|
|
|
1999
1999
|
},
|
|
2000
2000
|
run: async (_p, ctx) => {
|
|
2001
2001
|
const [{ syncStatus }, { cloudApi }, { isDesktopTabs }, { createFileInTab }, { openNewCloudFile }, { v4: uuid }] = await Promise.all([
|
|
2002
|
-
import("./sync-
|
|
2002
|
+
import("./sync-K2VRUB23.js"),
|
|
2003
2003
|
import("./api-EJGMIFIU.js"),
|
|
2004
2004
|
import("./tab-mode-YHCYF7R2.js"),
|
|
2005
|
-
import("./tabs-
|
|
2006
|
-
import("./sync-
|
|
2005
|
+
import("./tabs-A6SMBMFX.js"),
|
|
2006
|
+
import("./sync-K2VRUB23.js"),
|
|
2007
2007
|
import("./dist-node-KMLAA4ON.js")
|
|
2008
2008
|
]);
|
|
2009
2009
|
const doc2 = ctx.doc();
|
|
@@ -4821,7 +4821,7 @@ var viewCopyLink = defineCommand({
|
|
|
4821
4821
|
},
|
|
4822
4822
|
run: async (args, ctx) => {
|
|
4823
4823
|
const [{ syncStatus }, { fileUrl }, { withDeepLink }] = await Promise.all([
|
|
4824
|
-
import("./sync-
|
|
4824
|
+
import("./sync-K2VRUB23.js"),
|
|
4825
4825
|
import("./api-EJGMIFIU.js"),
|
|
4826
4826
|
import("./deep-link-KQENGQMI.js")
|
|
4827
4827
|
]);
|
|
@@ -5146,7 +5146,7 @@ var pageGo = defineCommand({
|
|
|
5146
5146
|
] }
|
|
5147
5147
|
},
|
|
5148
5148
|
run: async ({ to }) => {
|
|
5149
|
-
const { useEditorStore } = await import("./editor-store-
|
|
5149
|
+
const { useEditorStore } = await import("./editor-store-L4V3QA4A.js");
|
|
5150
5150
|
useEditorStore.getState().goToPrintPage(to);
|
|
5151
5151
|
return { summary: typeof to === "number" ? `Page ${to + 1}` : `${to} page` };
|
|
5152
5152
|
}
|
|
@@ -5180,7 +5180,7 @@ var pageSetup = defineCommand({
|
|
|
5180
5180
|
}
|
|
5181
5181
|
},
|
|
5182
5182
|
run: async (args) => {
|
|
5183
|
-
const { useEditorStore } = await import("./editor-store-
|
|
5183
|
+
const { useEditorStore } = await import("./editor-store-L4V3QA4A.js");
|
|
5184
5184
|
useEditorStore.getState().applyPageSetup(args);
|
|
5185
5185
|
return { summary: `Page setup updated${args.kind ? ` (${args.kind.toLowerCase()})` : ""}` };
|
|
5186
5186
|
}
|
|
@@ -5939,7 +5939,7 @@ async function docAtTime(doc2, ids, time2) {
|
|
|
5939
5939
|
let frameId;
|
|
5940
5940
|
if (time2 === void 0) {
|
|
5941
5941
|
try {
|
|
5942
|
-
const { useEditorStore } = await import("./editor-store-
|
|
5942
|
+
const { useEditorStore } = await import("./editor-store-L4V3QA4A.js");
|
|
5943
5943
|
const st = useEditorStore.getState();
|
|
5944
5944
|
const target = st.transport?.target;
|
|
5945
5945
|
if (st.mode !== "ANIMATE" || target?.kind !== "frame") return doc2;
|
|
@@ -5992,7 +5992,7 @@ var exportSvg = reportsMissingFonts(defineCommand({
|
|
|
5992
5992
|
const node = nodeOrThrow(doc2, args.id);
|
|
5993
5993
|
const renderer = ctx.use("canvas")();
|
|
5994
5994
|
if (!renderer) throw new ToolError("SVG export needs the canvas renderer, which is not running (the editor canvas may not have initialised WebGPU). Use get_node or measure instead.");
|
|
5995
|
-
const { exportNodeToSVG } = await import("./svg-export-
|
|
5995
|
+
const { exportNodeToSVG } = await import("./svg-export-J23NHZWC.js");
|
|
5996
5996
|
const svg = await exportNodeToSVG(renderer, node, doc2, doc2.styles);
|
|
5997
5997
|
if (!svg) throw new ToolError(`"${node.name}" has nothing to export (it may be empty or zero-sized).`);
|
|
5998
5998
|
const max = args.maxChars ?? 2e4;
|
|
@@ -6046,7 +6046,7 @@ var exportNodes = reportsMissingFonts(defineCommand({
|
|
|
6046
6046
|
const nodes = ids.map((id) => nodeOrThrow(doc2, id));
|
|
6047
6047
|
const renderer = ctx.use("canvas")();
|
|
6048
6048
|
if (!renderer) throw new ToolError("Exporting needs the canvas renderer, which is not running (the editor canvas may not have initialised WebGPU). Use measure or export_svg instead.");
|
|
6049
|
-
const { exportSettingFile, exportSettingsOf } = await import("./export-
|
|
6049
|
+
const { exportSettingFile, exportSettingsOf } = await import("./export-FZA6A6I6.js");
|
|
6050
6050
|
const { downloadBlob } = await import("./download-Y3ITVA3U.js");
|
|
6051
6051
|
const files = [];
|
|
6052
6052
|
let savedByFormat = 0;
|
|
@@ -6057,7 +6057,7 @@ var exportNodes = reportsMissingFonts(defineCommand({
|
|
|
6057
6057
|
};
|
|
6058
6058
|
const asked = args.format ? [{ format: args.format, scale: args.scale ?? 1, suffix: args.suffix ?? "" }] : null;
|
|
6059
6059
|
if (asked && args.format === "PDF" && args.singlePdf !== false && nodes.length > 1) {
|
|
6060
|
-
const { exportNodesToPDF } = await import("./pdf-
|
|
6060
|
+
const { exportNodesToPDF } = await import("./pdf-RPD6QHMP.js");
|
|
6061
6061
|
record(ids.join(","), `${doc2.name || "export"}.pdf`, await exportNodesToPDF(renderer, nodes, args.scale ?? 1, doc2, doc2.styles));
|
|
6062
6062
|
} else {
|
|
6063
6063
|
for (const n of nodes) {
|
|
@@ -6125,7 +6125,7 @@ var exportPdf = reportsMissingFonts(defineCommand({
|
|
|
6125
6125
|
if (!nodes.length) throw new ToolError("There is nothing on this page to export.");
|
|
6126
6126
|
const posed = await docAtTime(doc2, nodes.map((n) => n.id), args.time);
|
|
6127
6127
|
nodes = nodes.map((n) => posed.nodes[n.id] ?? n);
|
|
6128
|
-
const { exportNodesToPDF } = await import("./pdf-
|
|
6128
|
+
const { exportNodesToPDF } = await import("./pdf-RPD6QHMP.js");
|
|
6129
6129
|
const { downloadBlob } = await import("./download-Y3ITVA3U.js");
|
|
6130
6130
|
const { scale, ids: _ids, time: _time, ...print } = args;
|
|
6131
6131
|
void _ids;
|
|
@@ -6170,7 +6170,7 @@ var exportCopy = defineCommand({
|
|
|
6170
6170
|
const renderer = ctx.use("canvas")();
|
|
6171
6171
|
if (!renderer) throw new ToolError("Copying a layer needs the canvas renderer, which is not running.");
|
|
6172
6172
|
const format = args.format ?? "PNG";
|
|
6173
|
-
const { copyNodeAsPNG, copyNodeAsSVG } = await import("./export-
|
|
6173
|
+
const { copyNodeAsPNG, copyNodeAsSVG } = await import("./export-FZA6A6I6.js");
|
|
6174
6174
|
const ok = format === "SVG" ? await copyNodeAsSVG(renderer, node, doc2, doc2.styles) : await copyNodeAsPNG(renderer, node, doc2, doc2.styles, args.scale ?? 2);
|
|
6175
6175
|
if (!ok) throw new ToolError(`"${node.name}" could not be copied as ${format} \u2014 it may be empty, or the browser refused clipboard access.`);
|
|
6176
6176
|
return { summary: `Copied "${node.name}" as ${format}`, data: { id: node.id, format } };
|
|
@@ -6214,7 +6214,7 @@ var exportPages = reportsMissingFonts(defineCommand({
|
|
|
6214
6214
|
nodes = nodes.map((n) => posed.nodes[n.id] ?? n);
|
|
6215
6215
|
const format = args.format ?? "PNG";
|
|
6216
6216
|
const dpi = args.dpi ?? (doc2.settings?.kind === "PRINT" ? doc2.settings.dpi ?? 300 : 96);
|
|
6217
|
-
const { exportNodeToBlob } = await import("./export-
|
|
6217
|
+
const { exportNodeToBlob } = await import("./export-FZA6A6I6.js");
|
|
6218
6218
|
const { downloadBlob } = await import("./download-Y3ITVA3U.js");
|
|
6219
6219
|
const { zipFiles } = await import("./zip-export-ITATIAQ3.js");
|
|
6220
6220
|
const files = [];
|
|
@@ -6259,7 +6259,7 @@ var exportPptx = reportsMissingFonts(defineCommand({
|
|
|
6259
6259
|
}
|
|
6260
6260
|
}
|
|
6261
6261
|
if (!nodes.length) throw new ToolError("There are no slides on this page to export.");
|
|
6262
|
-
const { exportSlidesToPPTX } = await import("./pptx-
|
|
6262
|
+
const { exportSlidesToPPTX } = await import("./pptx-QZMA6SRM.js");
|
|
6263
6263
|
const { downloadBlob } = await import("./download-Y3ITVA3U.js");
|
|
6264
6264
|
const blob = await exportSlidesToPPTX(renderer, nodes, doc2, doc2.styles);
|
|
6265
6265
|
if (!blob) throw new ToolError("Those slides produced no file.");
|
|
@@ -6333,7 +6333,7 @@ async function runAnimationExport(format, args, ctx) {
|
|
|
6333
6333
|
const filename = exportFileName(args.filename || targetName(doc2, target), format);
|
|
6334
6334
|
const [{ exportAnimation }, { memoryDestination }] = await Promise.all([import("./video-AP7MEMEL.js"), import("./destination-JJAVZ5ER.js")]);
|
|
6335
6335
|
if (format === "lottie" || format === "dotlottie") return runLottieExport(renderer, doc2, spec, filename, ctx, memoryDestination, args.stateMachine);
|
|
6336
|
-
const planWatermark = format !== "png" && await (await import("./export-watermark-
|
|
6336
|
+
const planWatermark = format !== "png" && await (await import("./export-watermark-3FQ7QOYR.js")).exportWatermark();
|
|
6337
6337
|
if (format !== "png") spec = { ...spec, watermark: planWatermark || args.watermark !== false };
|
|
6338
6338
|
const dest = ctx.destination ? await ctx.destination(filename, FORMAT_MIME[format]) : memoryDestination(filename, FORMAT_MIME[format]);
|
|
6339
6339
|
let stats;
|
|
@@ -6358,7 +6358,7 @@ async function runAnimationExport(format, args, ctx) {
|
|
|
6358
6358
|
};
|
|
6359
6359
|
}
|
|
6360
6360
|
async function runLottieExport(renderer, doc2, spec, filename, ctx, memoryDestination, stateMachine) {
|
|
6361
|
-
const { exportLottie: exportLottie2, lottieSupport } = await import("./lottie-
|
|
6361
|
+
const { exportLottie: exportLottie2, lottieSupport } = await import("./lottie-ZKR6H64U.js");
|
|
6362
6362
|
const { FORMAT_MIME } = await import("./plan-4CD2KFNS.js");
|
|
6363
6363
|
const support = lottieSupport(doc2, spec.target);
|
|
6364
6364
|
if (!support.ok) throw new ToolError(`Lottie cannot carry this animation: ${support.blockers.join("; ")}. Export MP4, WebM or GIF instead.`);
|
|
@@ -6419,7 +6419,7 @@ var exportLottie = animationCommand((args) => args.container === "lottie" ? "dot
|
|
|
6419
6419
|
});
|
|
6420
6420
|
async function exportSite(doc2, pageId2, packaging, styling = "css", siteUrl) {
|
|
6421
6421
|
const [{ completeSite, nextFilesOf, shareImageFiles, staticFilesOf, NoSiteRuntime, bytesOf }, { fileBase }, { zipFiles }, { downloadBlob }] = await Promise.all([
|
|
6422
|
-
import("./project-
|
|
6422
|
+
import("./project-XENIE5UL.js"),
|
|
6423
6423
|
import("./web-7JL5HL5Y.js"),
|
|
6424
6424
|
import("./zip-export-ITATIAQ3.js"),
|
|
6425
6425
|
import("./download-Y3ITVA3U.js")
|
|
@@ -6463,7 +6463,7 @@ var exportWeb = reportsMissingFonts(defineCommand({
|
|
|
6463
6463
|
const node = id ? doc2.nodes[id] : void 0;
|
|
6464
6464
|
if (!node) throw new ToolError("Select a frame or layer to export.");
|
|
6465
6465
|
const { webTreeFor, extensionFor, externalAssets, fileBase, resolveWebAssets, serializeFor, flatten } = await import("./web-7JL5HL5Y.js");
|
|
6466
|
-
const { rendererAssetResolvers } = await import("./resolvers-
|
|
6466
|
+
const { rendererAssetResolvers } = await import("./resolvers-J3DRJJ7P.js");
|
|
6467
6467
|
const { downloadBlob } = await import("./download-Y3ITVA3U.js");
|
|
6468
6468
|
const tree = webTreeFor(doc2, node.id, lang, { nodeCap: EXPORT_NODE_CAP, fullImageUrls: true });
|
|
6469
6469
|
if (flatten(tree.root).some((n) => n.asset)) await resolveWebAssets(tree, rendererAssetResolvers(doc2));
|
|
@@ -6511,9 +6511,9 @@ var exportStorefront = defineCommand({
|
|
|
6511
6511
|
run: async (args, ctx) => {
|
|
6512
6512
|
const doc2 = ctx.doc();
|
|
6513
6513
|
const [{ storefrontInputs }, { STOREFRONT_TARGETS }, { bytesOf }, { fileBase, flatten }, { zipFiles }, { downloadBlob }] = await Promise.all([
|
|
6514
|
-
import("./storefront-prepare-
|
|
6514
|
+
import("./storefront-prepare-S6A5FZXC.js"),
|
|
6515
6515
|
import("./storefront-N34CMI4B.js"),
|
|
6516
|
-
import("./project-
|
|
6516
|
+
import("./project-XENIE5UL.js"),
|
|
6517
6517
|
import("./web-7JL5HL5Y.js"),
|
|
6518
6518
|
import("./zip-export-ITATIAQ3.js"),
|
|
6519
6519
|
import("./download-Y3ITVA3U.js")
|
|
@@ -6574,7 +6574,7 @@ var exportBoard = defineCommand({
|
|
|
6574
6574
|
const bounds = boardBounds(doc2, roots);
|
|
6575
6575
|
const scale = boardScale(bounds, args.scale);
|
|
6576
6576
|
const { documentForExport } = await import("./export-fills-QIJU6TOQ.js");
|
|
6577
|
-
const { encodeImageData } = await import("./export-
|
|
6577
|
+
const { encodeImageData } = await import("./export-FZA6A6I6.js");
|
|
6578
6578
|
const clean = documentForExport(doc2);
|
|
6579
6579
|
const image = await renderer.exportRegion(roots.map((n) => clean.nodes[n.id] ?? n), bounds, scale, clean, clean.styles, void 0, true);
|
|
6580
6580
|
const blob = image && await encodeImageData(image, "PNG");
|
|
@@ -6908,7 +6908,7 @@ var visionRegenerateImage = defineCommand({
|
|
|
6908
6908
|
const id = args.id ?? ctx.selection()[0];
|
|
6909
6909
|
if (!id) throw new ToolError("Select a generated image to regenerate.");
|
|
6910
6910
|
nodeOrThrow(ctx.doc(), id);
|
|
6911
|
-
const { regenerateImage } = await import("./client-actions-
|
|
6911
|
+
const { regenerateImage } = await import("./client-actions-VNMC4A7Z.js");
|
|
6912
6912
|
regenerateImage(id, args.count);
|
|
6913
6913
|
return { summary: args.count > 1 ? `Regenerating ${args.count} variants` : "Regenerating the image", data: { id, count: args.count } };
|
|
6914
6914
|
}
|
|
@@ -10067,7 +10067,7 @@ var scriptRun = defineCommand({
|
|
|
10067
10067
|
// A script is not the turn the user is watching: confirm-tier tools are refused inside it (dispatch, `nested`).
|
|
10068
10068
|
actor: { ...ctx.actor, nested: true, label: "Script" },
|
|
10069
10069
|
// A look_at inside the script sees the document as the script has left it so far, not as it was before.
|
|
10070
|
-
use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-
|
|
10070
|
+
use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-QSCYOPEH.js")).renderDocument(staged, ids, options)) : ctx.use(name2))
|
|
10071
10071
|
};
|
|
10072
10072
|
let calls = 0;
|
|
10073
10073
|
const images = [];
|
|
@@ -10887,7 +10887,7 @@ var docImportFile = defineCommand({
|
|
|
10887
10887
|
const file = new File([body], args.name);
|
|
10888
10888
|
if (file.size > MAX_BYTES) throw new ToolError(`"${args.name}" is larger than ${MAX_BYTES / 1024 / 1024} MB.`);
|
|
10889
10889
|
const [{ buildImportedDocument }, { mergeImportedDocument }] = await Promise.all([
|
|
10890
|
-
import("./plugin-import-
|
|
10890
|
+
import("./plugin-import-UFRJVWX3.js"),
|
|
10891
10891
|
import("./import-merge-YW6UGHX2.js")
|
|
10892
10892
|
]);
|
|
10893
10893
|
const built = await buildImportedDocument(file);
|