@popcraft/kit 0.53.2 → 0.53.3
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-SED37SYN.js → agent-DVKYZ5MR.js} +1 -1
- package/dist/chunks/{builtin-6C24JNML.js → builtin-VDSMLZXH.js} +4 -3
- package/dist/chunks/{buy-credits-L4YYC7OH.js → buy-credits-424PQFK4.js} +2 -2
- package/dist/chunks/{check-template-EE5TET2G.js → check-template-E5WVEJ54.js} +3 -2
- package/dist/chunks/{chunk-WENYC56A.js → chunk-4SD7TX7R.js} +11 -11
- package/dist/chunks/{chunk-NYGQP3I2.js → chunk-4SPJEVG6.js} +4 -4
- package/dist/chunks/{chunk-M5MBUFEB.js → chunk-524RSKF3.js} +1 -1
- package/dist/chunks/{chunk-FLGDAOPE.js → chunk-5SVFCWRP.js} +5 -5
- package/dist/chunks/{chunk-L6TWTQWB.js → chunk-6HQI4NQA.js} +2 -2
- package/dist/chunks/{chunk-GNOX55UB.js → chunk-777OZHEF.js} +9 -9
- package/dist/chunks/{chunk-MGNS52I2.js → chunk-7IH7U6KU.js} +4 -4
- package/dist/chunks/{chunk-FM4WN2UV.js → chunk-FJSJT5ZM.js} +3 -3
- package/dist/chunks/{chunk-NDMT4BWH.js → chunk-FMWUXVVS.js} +1 -1
- package/dist/chunks/{chunk-E6DRH2F2.js → chunk-JOUHQ5HK.js} +1 -1
- package/dist/chunks/{chunk-AYWP3RXA.js → chunk-MQ73SYLV.js} +3 -3
- package/dist/chunks/{chunk-GMUR223M.js → chunk-NQPNGZ3C.js} +2 -2
- package/dist/chunks/{chunk-3OZO3VDZ.js → chunk-ODM6DFGO.js} +4 -4
- package/dist/chunks/{chunk-TRTT3FG2.js → chunk-Q23DL77U.js} +2 -2
- package/dist/chunks/{chunk-32OBPYVY.js → chunk-UPLMAXNQ.js} +1 -1
- package/dist/chunks/{chunk-Y6MJOYOD.js → chunk-VYWXAGEE.js} +5 -5
- package/dist/chunks/{chunk-DGM2NZSE.js → chunk-W5KNQERV.js} +2 -2
- package/dist/chunks/{chunk-F6NLCJI5.js → chunk-ZLHMVVTT.js} +1 -1
- package/dist/chunks/{chunk-7DRZUU3D.js → chunk-ZPETEA54.js} +105 -51
- package/dist/chunks/{client-FHS3A5KE.js → client-2L4XUPQN.js} +1 -1
- package/dist/chunks/{client-FZXXX7Z4.js → client-6XOD422W.js} +2 -2
- package/dist/chunks/{client-JTMPIRKQ.js → client-NOHRL7S3.js} +3 -3
- package/dist/chunks/{client-actions-3KZRX52M.js → client-actions-K54NVVVW.js} +5 -5
- package/dist/chunks/{dangerous-D6BD66C2.js → dangerous-4QU6QUOD.js} +4 -3
- package/dist/chunks/{delete-current-file-EUYQ4W5Y.js → delete-current-file-RMINS2BA.js} +5 -5
- package/dist/chunks/{editor-seams-SJRRQFZT.js → editor-seams-SW67BCBW.js} +10 -10
- package/dist/chunks/{editor-store-AXRJNCRC.js → editor-store-WPRQJL2A.js} +1 -1
- package/dist/chunks/{export-watermark-MYKTALXF.js → export-watermark-2QVKO7OR.js} +5 -5
- package/dist/chunks/{eyedropper-EZ33OG43.js → eyedropper-WCIR6LL5.js} +1 -1
- package/dist/chunks/{generate-media-ODWN3RNS.js → generate-media-WCNTS5OY.js} +3 -3
- package/dist/chunks/{host-K6K7OOJY.js → host-GLRRFC2S.js} +6 -6
- package/dist/chunks/{integrations-TPVN7WNB.js → integrations-5I6DGN6S.js} +1 -1
- package/dist/chunks/{libraries-L7RTUME7.js → libraries-INCBCGOZ.js} +5 -5
- package/dist/chunks/{live-SODTH6AK.js → live-SGBLJFAC.js} +1 -1
- package/dist/chunks/{media-tool-76BJQ4EH.js → media-tool-KSXO2AAJ.js} +1 -1
- package/dist/chunks/{new-file-4B74SA7T.js → new-file-56ACDQ35.js} +3 -3
- package/dist/chunks/{plugin-OFAK7X55.js → plugin-GJXXN4UQ.js} +3 -2
- package/dist/chunks/{plugin-import-FHPXNY5S.js → plugin-import-N2J7NVET.js} +14 -14
- package/dist/chunks/{presence-CLCMZPNT.js → presence-S6FAMSP4.js} +2 -2
- package/dist/chunks/{project-RJ3UIR3F.js → project-IH23X2UG.js} +1 -1
- package/dist/chunks/{publish-site-NYDQQTVZ.js → publish-site-7YFHE7PV.js} +6 -6
- package/dist/chunks/{publish-store-YNPQKV6P.js → publish-store-I3NKMHZK.js} +4 -4
- package/dist/chunks/{raster-actions-MC3CT72Z.js → raster-actions-PRMIAQQ7.js} +1 -1
- package/dist/chunks/{runner-YB2KJMV5.js → runner-OVYUXA4W.js} +17 -17
- package/dist/chunks/{store-RMG4PHWL.js → store-BYSDY5PO.js} +6 -6
- package/dist/chunks/{sync-K72H36V7.js → sync-TFB3VWFP.js} +5 -5
- package/dist/chunks/{tabs-56YA6CWU.js → tabs-CNE4XGIM.js} +8 -8
- package/dist/chunks/{team-35KCR2TX.js → team-DFOKEFOE.js} +1 -1
- package/dist/chunks/{team-client-NJYR2EHQ.js → team-client-QHRXYUPI.js} +1 -1
- package/dist/chunks/{tools-HSZSBWOP.js → tools-YDR7QIHQ.js} +2 -2
- package/dist/chunks/{ui-commands-J54KK6XU.js → ui-commands-HB4FFFXA.js} +12 -12
- package/dist/chunks/{versions-X2TC2RMO.js → versions-G4PGAFLF.js} +5 -5
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -159,6 +159,9 @@ import {
|
|
|
159
159
|
bindShaderAudio,
|
|
160
160
|
retuneShaderAudio
|
|
161
161
|
} from "./chunk-A54HJQ6T.js";
|
|
162
|
+
import {
|
|
163
|
+
pathBounds
|
|
164
|
+
} from "./chunk-7DATU5VX.js";
|
|
162
165
|
import {
|
|
163
166
|
HELPER_NAMES
|
|
164
167
|
} from "./chunk-6YZC5UXW.js";
|
|
@@ -340,6 +343,7 @@ import {
|
|
|
340
343
|
init_scene_graph,
|
|
341
344
|
isPrintPage,
|
|
342
345
|
moveNodeInZOrder,
|
|
346
|
+
placementUnder,
|
|
343
347
|
printPageOf,
|
|
344
348
|
removeNode,
|
|
345
349
|
reparentNode,
|
|
@@ -590,7 +594,10 @@ init_scene_graph();
|
|
|
590
594
|
init_types();
|
|
591
595
|
var MAX_NODES = 200;
|
|
592
596
|
var plural = (n, one, many = `${one}s`) => `${n} ${n === 1 ? one : many}`;
|
|
593
|
-
var hexOf = (c) => c ? "#" + [c.r, c.g, c.b].map((v) =>
|
|
597
|
+
var hexOf = (c) => c ? "#" + [c.r, c.g, c.b].map((v) => {
|
|
598
|
+
const n = Number.isFinite(v) ? Math.max(0, Math.min(1, v)) : 0;
|
|
599
|
+
return Math.round(n * 255).toString(16).padStart(2, "0");
|
|
600
|
+
}).join("") : "";
|
|
594
601
|
function nodeOrThrow(doc2, id) {
|
|
595
602
|
const n = doc2.nodes[id];
|
|
596
603
|
if (!n) throw new ToolError(`Unknown node id "${id}". Call get_document_outline or find_nodes first and use an id from there.`);
|
|
@@ -866,7 +873,7 @@ init_scene_graph();
|
|
|
866
873
|
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.");
|
|
867
874
|
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 });
|
|
868
875
|
async function placeImportedPicture(ctx, imported, at, what, extra = {}) {
|
|
869
|
-
const client = await import("./client-
|
|
876
|
+
const client = await import("./client-2L4XUPQN.js");
|
|
870
877
|
if (at.fillLayerId) {
|
|
871
878
|
const doc2 = ctx.doc();
|
|
872
879
|
const target = nodeOrThrow(doc2, at.fillLayerId);
|
|
@@ -912,7 +919,7 @@ var photoSearch = defineCommand({
|
|
|
912
919
|
}
|
|
913
920
|
},
|
|
914
921
|
run: async (args) => {
|
|
915
|
-
const { searchStockPhotos } = await import("./client-
|
|
922
|
+
const { searchStockPhotos } = await import("./client-2L4XUPQN.js");
|
|
916
923
|
const page = await searchStockPhotos(args.query, args.page ?? 1, { licence: args.licence });
|
|
917
924
|
return {
|
|
918
925
|
summary: `${page.results.length} photo${page.results.length === 1 ? "" : "s"} for \u201C${page.query}\u201D (page ${page.page} of ${page.pageCount || 1})`,
|
|
@@ -946,7 +953,7 @@ var photoInsert = defineCommand({
|
|
|
946
953
|
run: async (args, ctx) => {
|
|
947
954
|
if (!args.id && !args.query) throw new ToolError("Pass an id from search_photos, or a query.");
|
|
948
955
|
if (args.id && !isPhotoId(args.id)) throw new ToolError(`"${args.id}" is not a photo id from search_photos.`);
|
|
949
|
-
const client = await import("./client-
|
|
956
|
+
const client = await import("./client-2L4XUPQN.js");
|
|
950
957
|
let photo;
|
|
951
958
|
if (args.id) photo = await client.stockPhotoInfo(args.id);
|
|
952
959
|
else {
|
|
@@ -984,10 +991,10 @@ var mediaList = defineCommand({
|
|
|
984
991
|
}
|
|
985
992
|
},
|
|
986
993
|
run: async (args) => {
|
|
987
|
-
const { listLibraryMedia } = await import("./client-
|
|
994
|
+
const { listLibraryMedia } = await import("./client-6XOD422W.js");
|
|
988
995
|
const q = { ...args };
|
|
989
996
|
if (!q.workspace) {
|
|
990
|
-
const { syncStatus } = await import("./sync-
|
|
997
|
+
const { syncStatus } = await import("./sync-TFB3VWFP.js");
|
|
991
998
|
const link2 = syncStatus().link;
|
|
992
999
|
if (!link2) throw new ToolError("This document is not saved to the cloud, so it has no team media library. Pass workspace.");
|
|
993
1000
|
q.workspace = (await listLibraryMedia({ file: link2.key, limit: 1 })).workspaceId;
|
|
@@ -1022,7 +1029,7 @@ var mediaInsert = defineCommand({
|
|
|
1022
1029
|
run: async (args, ctx) => {
|
|
1023
1030
|
const contentType = args.contentType ?? "image/*";
|
|
1024
1031
|
if (!contentType.startsWith("image/")) throw new ToolError("insert_media places pictures; this item is not one.");
|
|
1025
|
-
const { importLibraryPicture } = await import("./client-
|
|
1032
|
+
const { importLibraryPicture } = await import("./client-6XOD422W.js");
|
|
1026
1033
|
const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "Media", contentType, size: 0, createdAt: "", fileCount: 1, source: null };
|
|
1027
1034
|
const imported = await importLibraryPicture(item);
|
|
1028
1035
|
return placeImportedPicture(ctx, imported, args, `\u201C${imported.name}\u201D`, { hash: imported.hash });
|
|
@@ -1043,7 +1050,7 @@ var mediaDownload = defineCommand({
|
|
|
1043
1050
|
// The Library's right-click menu: saves the item's file to the computer.
|
|
1044
1051
|
expose: { ui: { label: "Download", palette: false } },
|
|
1045
1052
|
run: async (args) => {
|
|
1046
|
-
const { libraryBlob, libraryFileName } = await import("./client-
|
|
1053
|
+
const { libraryBlob, libraryFileName } = await import("./client-6XOD422W.js");
|
|
1047
1054
|
const { downloadBlob } = await import("./download-YRHNMQPH.js");
|
|
1048
1055
|
const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "media", contentType: args.contentType ?? "", size: 0, createdAt: "", fileCount: 1, source: null };
|
|
1049
1056
|
const blob = await libraryBlob(item);
|
|
@@ -1074,7 +1081,7 @@ var mediaDelete = defineCommand({
|
|
|
1074
1081
|
}
|
|
1075
1082
|
},
|
|
1076
1083
|
run: async (args) => {
|
|
1077
|
-
const { deleteLibraryMedia } = await import("./client-
|
|
1084
|
+
const { deleteLibraryMedia } = await import("./client-6XOD422W.js");
|
|
1078
1085
|
const out = await deleteLibraryMedia(args.workspace, args.hash);
|
|
1079
1086
|
return { summary: `Deleted it from the library (it was in ${out.files} file${out.files === 1 ? "" : "s"})`, data: out };
|
|
1080
1087
|
}
|
|
@@ -1088,13 +1095,13 @@ async function signedIn() {
|
|
|
1088
1095
|
}
|
|
1089
1096
|
async function publishedFile() {
|
|
1090
1097
|
await signedIn();
|
|
1091
|
-
const { openFileKey } = await import("./publish-site-
|
|
1098
|
+
const { openFileKey } = await import("./publish-site-7YFHE7PV.js");
|
|
1092
1099
|
const key = openFileKey();
|
|
1093
1100
|
if (!key) throw new CommandError("This file is not saved to the cloud yet, so it has no site. Publish it first.", "failed");
|
|
1094
1101
|
return key;
|
|
1095
1102
|
}
|
|
1096
1103
|
async function formsWithoutDatabase(key) {
|
|
1097
|
-
const [{ useEditorStore }, { usesForms, formsGoNowhere }, { siteBackend }] = await Promise.all([import("./editor-store-
|
|
1104
|
+
const [{ useEditorStore }, { usesForms, formsGoNowhere }, { siteBackend }] = await Promise.all([import("./editor-store-WPRQJL2A.js"), import("./backend-Q4FQVKIS.js"), import("./integrations-5I6DGN6S.js")]);
|
|
1098
1105
|
const doc2 = useEditorStore.getState().document;
|
|
1099
1106
|
if (!usesForms(doc2)) return false;
|
|
1100
1107
|
return formsGoNowhere(doc2, await siteBackend(key).catch(() => void 0));
|
|
@@ -1130,7 +1137,7 @@ var publishSite = defineCommand({
|
|
|
1130
1137
|
const { cleanSlug } = await import("./rules-QWGSAJAE.js");
|
|
1131
1138
|
const address = p.address === void 0 ? void 0 : cleanSlug(p.address);
|
|
1132
1139
|
if (address === null) throw new CommandError("That cannot be a site address: use 3 to 40 letters, digits and dashes.", "invalid_params");
|
|
1133
|
-
const { publishOpenFile, NoScreens } = await import("./publish-site-
|
|
1140
|
+
const { publishOpenFile, NoScreens } = await import("./publish-site-7YFHE7PV.js");
|
|
1134
1141
|
try {
|
|
1135
1142
|
const done = await publishOpenFile(address);
|
|
1136
1143
|
ctx.notice(`Published version ${done.version}: ${done.url}`);
|
|
@@ -1185,7 +1192,7 @@ var publishListSites = defineCommand({
|
|
|
1185
1192
|
},
|
|
1186
1193
|
run: async (p) => {
|
|
1187
1194
|
await signedIn();
|
|
1188
|
-
const [{ workspaceSites }, { activeTeamWorkspaceId, useHyperyTeam }] = await Promise.all([import("./sites-L6JYZ4SV.js"), import("./team-
|
|
1195
|
+
const [{ workspaceSites }, { activeTeamWorkspaceId, useHyperyTeam }] = await Promise.all([import("./sites-L6JYZ4SV.js"), import("./team-DFOKEFOE.js")]);
|
|
1189
1196
|
const workspaceId = p.workspaceId ?? activeTeamWorkspaceId() ?? useHyperyTeam.getState().personalWorkspaceId;
|
|
1190
1197
|
if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
|
|
1191
1198
|
const out = await workspaceSites(workspaceId);
|
|
@@ -1234,12 +1241,12 @@ var publishStatus = defineCommand({
|
|
|
1234
1241
|
},
|
|
1235
1242
|
run: async () => {
|
|
1236
1243
|
await signedIn();
|
|
1237
|
-
const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-
|
|
1244
|
+
const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-7YFHE7PV.js"), import("./sites-L6JYZ4SV.js")]);
|
|
1238
1245
|
const key = openFileKey();
|
|
1239
1246
|
const status = await siteStatus(key);
|
|
1240
1247
|
const site = status.site;
|
|
1241
|
-
const backend = key ? await (await import("./integrations-
|
|
1242
|
-
const destinations = key ? await (await import("./integrations-
|
|
1248
|
+
const backend = key ? await (await import("./integrations-5I6DGN6S.js")).siteBackend(key).catch(() => null) : null;
|
|
1249
|
+
const destinations = key ? await (await import("./integrations-5I6DGN6S.js")).listDestinations(key).catch(() => []) : [];
|
|
1243
1250
|
return {
|
|
1244
1251
|
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}`,
|
|
1245
1252
|
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 })) }
|
|
@@ -1270,7 +1277,7 @@ var publishStore = defineCommand({
|
|
|
1270
1277
|
},
|
|
1271
1278
|
run: async (p, ctx) => {
|
|
1272
1279
|
await signedIn();
|
|
1273
|
-
const { deployOpenStore } = await import("./publish-store-
|
|
1280
|
+
const { deployOpenStore } = await import("./publish-store-I3NKMHZK.js");
|
|
1274
1281
|
const done = await deployOpenStore(ctx.doc(), ctx.pageId(), { destinationId: p.destinationId }).catch((e) => {
|
|
1275
1282
|
throw new CommandError(e instanceof Error ? e.message : String(e), "failed");
|
|
1276
1283
|
});
|
|
@@ -1299,7 +1306,7 @@ var integrationList = defineCommand({
|
|
|
1299
1306
|
}
|
|
1300
1307
|
},
|
|
1301
1308
|
run: async ({ capability }) => {
|
|
1302
|
-
const [{ cloudUser }, { integrationsWorkspaceId, listWorkspaceIntegrations }] = await Promise.all([import("./session-QE4TAG7G.js"), import("./integrations-
|
|
1309
|
+
const [{ cloudUser }, { integrationsWorkspaceId, listWorkspaceIntegrations }] = await Promise.all([import("./session-QE4TAG7G.js"), import("./integrations-5I6DGN6S.js")]);
|
|
1303
1310
|
if (!cloudUser()) throw new CommandError("You are not signed in: integrations belong to your account's workspace.", "denied");
|
|
1304
1311
|
const workspaceId = integrationsWorkspaceId();
|
|
1305
1312
|
if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
|
|
@@ -1340,7 +1347,7 @@ var integrationOpen = defineCommand({
|
|
|
1340
1347
|
}
|
|
1341
1348
|
});
|
|
1342
1349
|
async function openFile() {
|
|
1343
|
-
const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-QE4TAG7G.js"), import("./publish-site-
|
|
1350
|
+
const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-QE4TAG7G.js"), import("./publish-site-7YFHE7PV.js")]);
|
|
1344
1351
|
if (!cloudUser()) throw new CommandError("You are not signed in.", "denied");
|
|
1345
1352
|
const key = openFileKey();
|
|
1346
1353
|
if (!key) throw new CommandError("This file is not saved to the cloud yet. Publish it first (publish_site).", "failed");
|
|
@@ -1366,7 +1373,7 @@ var integrationListResources = defineCommand({
|
|
|
1366
1373
|
}
|
|
1367
1374
|
},
|
|
1368
1375
|
run: async ({ connectionId, capability, path }) => {
|
|
1369
|
-
const { listResources } = await import("./integrations-
|
|
1376
|
+
const { listResources } = await import("./integrations-5I6DGN6S.js");
|
|
1370
1377
|
const list = await listResources(connectionId, capability, asPath2(path));
|
|
1371
1378
|
return {
|
|
1372
1379
|
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",
|
|
@@ -1401,7 +1408,7 @@ var integrationAddDestination = defineCommand({
|
|
|
1401
1408
|
},
|
|
1402
1409
|
run: async (p, ctx) => {
|
|
1403
1410
|
const key = await openFile();
|
|
1404
|
-
const { addDestination, createDestination, createResource } = await import("./integrations-
|
|
1411
|
+
const { addDestination, createDestination, createResource } = await import("./integrations-5I6DGN6S.js");
|
|
1405
1412
|
let made;
|
|
1406
1413
|
if (p.create) made = await createDestination(key, p.capability, void 0, p.connectionId);
|
|
1407
1414
|
else {
|
|
@@ -1438,7 +1445,7 @@ var integrationDeploy = defineCommand({
|
|
|
1438
1445
|
},
|
|
1439
1446
|
run: async (p, ctx) => {
|
|
1440
1447
|
const key = await openFile();
|
|
1441
|
-
const { deployDestination, listDestinations } = await import("./integrations-
|
|
1448
|
+
const { deployDestination, listDestinations } = await import("./integrations-5I6DGN6S.js");
|
|
1442
1449
|
const all = await listDestinations(key);
|
|
1443
1450
|
const dest = p.destinationId ? all.find((d) => d.id === p.destinationId) : all.length === 1 ? all[0] : void 0;
|
|
1444
1451
|
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");
|
|
@@ -1472,7 +1479,7 @@ var integrationAttachDatabase = defineCommand({
|
|
|
1472
1479
|
},
|
|
1473
1480
|
run: async (p, ctx) => {
|
|
1474
1481
|
const key = await openFile();
|
|
1475
|
-
const { attachDatabase, createDatabase, createResource, listResources } = await import("./integrations-
|
|
1482
|
+
const { attachDatabase, createDatabase, createResource, listResources } = await import("./integrations-5I6DGN6S.js");
|
|
1476
1483
|
if (p.create) return attached(await createDatabase(key, void 0, p.connectionId), ctx);
|
|
1477
1484
|
if (!p.connectionId || !p.target) throw new CommandError("Say connectionId and target, or create: true.", "invalid_params");
|
|
1478
1485
|
let target = asPath2(p.target);
|
|
@@ -1511,7 +1518,7 @@ var integrationSubmissions = defineCommand({
|
|
|
1511
1518
|
},
|
|
1512
1519
|
run: async ({ form, limit }) => {
|
|
1513
1520
|
const key = await openFile();
|
|
1514
|
-
const { listSubmissions } = await import("./integrations-
|
|
1521
|
+
const { listSubmissions } = await import("./integrations-5I6DGN6S.js");
|
|
1515
1522
|
const rows = await listSubmissions(key, { form, limit: limit ?? 20 });
|
|
1516
1523
|
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 } };
|
|
1517
1524
|
}
|
|
@@ -1536,7 +1543,7 @@ var integrationSetSignIn = defineCommand({
|
|
|
1536
1543
|
},
|
|
1537
1544
|
run: async ({ on }, ctx) => {
|
|
1538
1545
|
const key = await openFile();
|
|
1539
|
-
const { setSignIn } = await import("./integrations-
|
|
1546
|
+
const { setSignIn } = await import("./integrations-5I6DGN6S.js");
|
|
1540
1547
|
const done = await setSignIn(key, on);
|
|
1541
1548
|
ctx.notice(on ? "Visitors can sign in." : "Sign-in is off.");
|
|
1542
1549
|
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 } };
|
|
@@ -1754,7 +1761,7 @@ var fontTeamList = defineCommand({
|
|
|
1754
1761
|
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)." }
|
|
1755
1762
|
},
|
|
1756
1763
|
run: async (args) => {
|
|
1757
|
-
const { refreshTeamFonts } = await import("./team-client-
|
|
1764
|
+
const { refreshTeamFonts } = await import("./team-client-QHRXYUPI.js");
|
|
1758
1765
|
const fonts = await refreshTeamFonts(args.workspace);
|
|
1759
1766
|
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 })) } };
|
|
1760
1767
|
}
|
|
@@ -1781,7 +1788,7 @@ var fontTeamAdd = defineCommand({
|
|
|
1781
1788
|
run: async (args, ctx) => {
|
|
1782
1789
|
const { bytes, fileName: fileName2 } = await fontBytes(args, ctx);
|
|
1783
1790
|
const { face, family, weight, style } = await resolveFace(bytes, args);
|
|
1784
|
-
const { uploadTeamFont } = await import("./team-client-
|
|
1791
|
+
const { uploadTeamFont } = await import("./team-client-QHRXYUPI.js");
|
|
1785
1792
|
const font = await uploadTeamFont(bytes, { family, weight, style, face: face.index, fileName: fileName2 }, args.workspace);
|
|
1786
1793
|
return { summary: `Added ${family} ${weight}${style === "italic" ? " italic" : ""} to the team`, data: { font } };
|
|
1787
1794
|
}
|
|
@@ -1803,7 +1810,7 @@ var fontTeamRemove = defineCommand({
|
|
|
1803
1810
|
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." }
|
|
1804
1811
|
},
|
|
1805
1812
|
run: async (args) => {
|
|
1806
|
-
const { removeTeamFont } = await import("./team-client-
|
|
1813
|
+
const { removeTeamFont } = await import("./team-client-QHRXYUPI.js");
|
|
1807
1814
|
const out = await removeTeamFont(args.id, args.workspace);
|
|
1808
1815
|
return { summary: `Removed the team font${out.freed ? " and freed its storage" : ""}`, data: out };
|
|
1809
1816
|
}
|
|
@@ -1814,7 +1821,7 @@ var fontTeamCommands = [fontTeamList, fontTeamAdd];
|
|
|
1814
1821
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
1815
1822
|
async function cloudFile() {
|
|
1816
1823
|
const [{ syncStatus }, { cloudUser }] = await Promise.all([
|
|
1817
|
-
import("./sync-
|
|
1824
|
+
import("./sync-TFB3VWFP.js"),
|
|
1818
1825
|
import("./session-QE4TAG7G.js")
|
|
1819
1826
|
]);
|
|
1820
1827
|
const link2 = syncStatus().link;
|
|
@@ -1876,7 +1883,7 @@ var fileTrash = defineCommand({
|
|
|
1876
1883
|
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." }
|
|
1877
1884
|
},
|
|
1878
1885
|
run: async () => {
|
|
1879
|
-
const { deleteCurrentFile, leaveDeletedFile } = await import("./delete-current-file-
|
|
1886
|
+
const { deleteCurrentFile, leaveDeletedFile } = await import("./delete-current-file-RMINS2BA.js");
|
|
1880
1887
|
const { name: name2, kind } = await deleteCurrentFile();
|
|
1881
1888
|
leaveDeletedFile();
|
|
1882
1889
|
return { summary: kind === "cloud" ? `Moved \u201C${name2}\u201D to the Trash` : `Deleted \u201C${name2}\u201D` };
|
|
@@ -1989,11 +1996,11 @@ var fileDuplicate = defineCommand({
|
|
|
1989
1996
|
},
|
|
1990
1997
|
run: async (_p, ctx) => {
|
|
1991
1998
|
const [{ syncStatus }, { cloudApi }, { isDesktopTabs }, { createFileInTab }, { openNewCloudFile }, { v4: uuid }] = await Promise.all([
|
|
1992
|
-
import("./sync-
|
|
1999
|
+
import("./sync-TFB3VWFP.js"),
|
|
1993
2000
|
import("./api-7ZHHFXRP.js"),
|
|
1994
2001
|
import("./tab-mode-5ALKOT7S.js"),
|
|
1995
|
-
import("./tabs-
|
|
1996
|
-
import("./sync-
|
|
2002
|
+
import("./tabs-CNE4XGIM.js"),
|
|
2003
|
+
import("./sync-TFB3VWFP.js"),
|
|
1997
2004
|
import("./dist-node-MAITLUAX.js")
|
|
1998
2005
|
]);
|
|
1999
2006
|
const doc2 = ctx.doc();
|
|
@@ -2315,10 +2322,12 @@ var nodeFind = defineCommand({
|
|
|
2315
2322
|
hits.push(n);
|
|
2316
2323
|
if (hits.length >= limit) break;
|
|
2317
2324
|
}
|
|
2325
|
+
const truncated = hits.length >= limit;
|
|
2318
2326
|
return {
|
|
2319
|
-
summary: `${plural(hits.length, "match", "matches")} for ${q || type || args.name || "everything here"}`,
|
|
2327
|
+
summary: `${plural(hits.length, "match", "matches")}${truncated ? "+ (capped)" : ""} for ${q || type || args.name || "everything here"}`,
|
|
2320
2328
|
data: {
|
|
2321
2329
|
count: hits.length,
|
|
2330
|
+
truncated,
|
|
2322
2331
|
nodes: args.detail === "full" ? plain(hits) : hits.map((n) => ({ ...brief(n), page: pageOf2(doc2, n.id) }))
|
|
2323
2332
|
}
|
|
2324
2333
|
};
|
|
@@ -2360,11 +2369,23 @@ var nodeGet = defineCommand({
|
|
|
2360
2369
|
return n2 ? plain(n2) : null;
|
|
2361
2370
|
}
|
|
2362
2371
|
const n = resolvedNodeOrThrow(doc2, id);
|
|
2363
|
-
|
|
2372
|
+
if (args.detail === "full") return plain(n);
|
|
2373
|
+
const props = describeProps(doc2, n);
|
|
2374
|
+
const warning = geometryMismatch(doc2, n.id);
|
|
2375
|
+
return warning ? { ...props, warning } : props;
|
|
2364
2376
|
});
|
|
2365
2377
|
return { summary: `Read ${plural(nodes.length, "layer")}`, data: { nodes } };
|
|
2366
2378
|
}
|
|
2367
2379
|
});
|
|
2380
|
+
function geometryMismatch(doc2, id) {
|
|
2381
|
+
const n = doc2.nodes[id];
|
|
2382
|
+
if (!n || n.type !== "VECTOR" || !n.paths?.length) return void 0;
|
|
2383
|
+
const pb = pathBounds(n.paths);
|
|
2384
|
+
if (!pb) return void 0;
|
|
2385
|
+
const gw = pb.maxX - pb.minX, gh = pb.maxY - pb.minY;
|
|
2386
|
+
if (Math.abs(gw - n.width) <= 1 && Math.abs(gh - n.height) <= 1) return void 0;
|
|
2387
|
+
return `box is ${Math.round(n.width)}\xD7${Math.round(n.height)} but the artwork is ${Math.round(gw)}\xD7${Math.round(gh)} \u2014 resize_nodes to reconcile them`;
|
|
2388
|
+
}
|
|
2368
2389
|
var nodeMeasure = defineCommand({
|
|
2369
2390
|
id: "node.measure",
|
|
2370
2391
|
title: "Measure layers",
|
|
@@ -2393,7 +2414,8 @@ var nodeMeasure = defineCommand({
|
|
|
2393
2414
|
});
|
|
2394
2415
|
const each = ids.map((id) => {
|
|
2395
2416
|
const rb = getWorldRenderBounds(doc2, id);
|
|
2396
|
-
|
|
2417
|
+
const warning = geometryMismatch(doc2, id);
|
|
2418
|
+
return { id, name: doc2.nodes[id].name, bounds: rb ? round(rb) : null, ...warning ? { warning } : {} };
|
|
2397
2419
|
});
|
|
2398
2420
|
const combined = round(box);
|
|
2399
2421
|
return { summary: `Bounds: ${combined.width}\xD7${combined.height} at ${combined.x},${combined.y}`, data: { combined, nodes: each } };
|
|
@@ -2550,6 +2572,15 @@ function normalizeColor(c, key) {
|
|
|
2550
2572
|
const a = typeof o.a === "number" && Number.isFinite(o.a) ? o.a > 1 ? o.a / 255 : o.a : 1;
|
|
2551
2573
|
return createColor(nums[0] / scale, nums[1] / scale, nums[2] / scale, a);
|
|
2552
2574
|
}
|
|
2575
|
+
function normalizeSegments(v) {
|
|
2576
|
+
if (!Array.isArray(v)) return v;
|
|
2577
|
+
return v.map((seg) => {
|
|
2578
|
+
if (!seg || typeof seg !== "object") return seg;
|
|
2579
|
+
const s = { ...seg };
|
|
2580
|
+
for (const k of ["fills", "strokes", "textDecorationColor"]) if (k in s) s[k] = normalizePaints(s[k], k);
|
|
2581
|
+
return s;
|
|
2582
|
+
});
|
|
2583
|
+
}
|
|
2553
2584
|
function normalizePaints(v, key) {
|
|
2554
2585
|
if (!Array.isArray(v)) throw new ToolError(`${key} must be an array of paints.`);
|
|
2555
2586
|
return v.map((p) => {
|
|
@@ -2611,13 +2642,34 @@ var nodeUpdate = defineCommand({
|
|
|
2611
2642
|
for (const [k, v] of Object.entries(u.props)) {
|
|
2612
2643
|
if (args.strict && FORBIDDEN_PROPS.has(k)) throw new ToolError(`update_nodes cannot change "${k}". Use reparent, delete_nodes or create_node instead.`);
|
|
2613
2644
|
if (FORBIDDEN_PROPS.has(k) || v === void 0) continue;
|
|
2614
|
-
patch[k] = k === "fills" || k === "strokes" ? normalizePaints(v, k) : v;
|
|
2645
|
+
patch[k] = k === "fills" || k === "strokes" ? normalizePaints(v, k) : k === "styledSegments" ? normalizeSegments(v) : v;
|
|
2615
2646
|
changedKeys.add(k);
|
|
2616
2647
|
}
|
|
2648
|
+
if ("fills" in patch) patch.fillStyleId = void 0;
|
|
2649
|
+
if ("strokes" in patch) patch.strokeStyleId = void 0;
|
|
2617
2650
|
if (args.strict && !Object.keys(patch).length) throw new ToolError(`No properties given for "${u.id}".`);
|
|
2618
2651
|
patches.set(u.id, patch);
|
|
2619
2652
|
}
|
|
2620
|
-
|
|
2653
|
+
for (const [id, patch] of patches) {
|
|
2654
|
+
const p = patch;
|
|
2655
|
+
if (!("width" in p) && !("height" in p)) continue;
|
|
2656
|
+
const n = doc2.nodes[id];
|
|
2657
|
+
if (n.width <= 0 || n.height <= 0) continue;
|
|
2658
|
+
const w = p.width ?? n.width, h = p.height ?? n.height;
|
|
2659
|
+
if (n.type === "FRAME" || n.type === "COMPONENT" || n.type === "SECTION") continue;
|
|
2660
|
+
for (const [pid, sub] of scaleSubtreePatches(doc2.nodes, id, w / n.width, h / n.height)) {
|
|
2661
|
+
patches.set(pid, { ...patches.get(pid), ...sub });
|
|
2662
|
+
}
|
|
2663
|
+
}
|
|
2664
|
+
let committed = doc2;
|
|
2665
|
+
for (const [id, patch] of patches) {
|
|
2666
|
+
const p = patch;
|
|
2667
|
+
const n = doc2.nodes[id];
|
|
2668
|
+
if (("width" in p || "height" in p) && (n.type === "FRAME" || n.type === "COMPONENT" || n.type === "SECTION")) {
|
|
2669
|
+
committed = applyConstraints(committed, id, n.width, n.height, p.width ?? n.width, p.height ?? n.height);
|
|
2670
|
+
}
|
|
2671
|
+
}
|
|
2672
|
+
commitUpdates(ctx, committed, patches);
|
|
2621
2673
|
return { summary: `Updated ${plural(patches.size, "layer")} (${[...changedKeys].slice(0, 6).join(", ")})`, data: { ids: [...patches.keys()] } };
|
|
2622
2674
|
}
|
|
2623
2675
|
});
|
|
@@ -2760,7 +2812,7 @@ var nodeReparent = defineCommand({
|
|
|
2760
2812
|
plugin: { method: "reparentNodes" },
|
|
2761
2813
|
agent: {
|
|
2762
2814
|
name: "reparent",
|
|
2763
|
-
description: "Move layers into another parent (frame, group or page), optionally at a child index.
|
|
2815
|
+
description: "Move layers into another parent (frame, group or page), optionally at a child index. Each layer keeps its position on screen (its coordinates are rebased into the new parent)."
|
|
2764
2816
|
}
|
|
2765
2817
|
},
|
|
2766
2818
|
run: (args, ctx) => {
|
|
@@ -2771,6 +2823,8 @@ var nodeReparent = defineCommand({
|
|
|
2771
2823
|
for (const id of args.ids) {
|
|
2772
2824
|
nodeOrThrow(doc2, id);
|
|
2773
2825
|
if (id === args.parentId) throw new ToolError("A layer cannot be its own parent.");
|
|
2826
|
+
const placed = placementUnder(next, id, args.parentId);
|
|
2827
|
+
if (placed) next = updateNode(next, id, placed);
|
|
2774
2828
|
next = reparentNode(next, id, args.parentId, args.index);
|
|
2775
2829
|
}
|
|
2776
2830
|
ctx.commit(applyInvariants(next, [...args.ids, args.parentId]));
|
|
@@ -3890,7 +3944,7 @@ var paintSetFills = defineCommand({
|
|
|
3890
3944
|
else if (mode === "replace" || !existing.length) fills = [paint];
|
|
3891
3945
|
else if (mode === "add") fills = [...existing, paint];
|
|
3892
3946
|
else fills = [paint, ...existing.slice(1)];
|
|
3893
|
-
patches.set(id, { fills });
|
|
3947
|
+
patches.set(id, { fills, ...args.remove ? {} : { fillStyleId: void 0 } });
|
|
3894
3948
|
}
|
|
3895
3949
|
const what = args.gradient ? `a ${args.gradient.type.toLowerCase()} gradient` : args.image ? "an image" : args.color;
|
|
3896
3950
|
commitUpdates(ctx, doc2, patches);
|
|
@@ -3957,7 +4011,7 @@ var paintSetStrokes = defineCommand({
|
|
|
3957
4011
|
...args.join !== void 0 ? { join: args.join } : {},
|
|
3958
4012
|
...args.dashPattern !== void 0 ? { dashPattern: args.dashPattern } : {}
|
|
3959
4013
|
};
|
|
3960
|
-
patches.set(id, { strokes: [merged, ...existing.slice(1)], ...order2 });
|
|
4014
|
+
patches.set(id, { strokes: [merged, ...existing.slice(1)], strokeStyleId: void 0, ...order2 });
|
|
3961
4015
|
}
|
|
3962
4016
|
commitUpdates(ctx, doc2, patches);
|
|
3963
4017
|
return {
|
|
@@ -4707,7 +4761,7 @@ var viewCopyLink = defineCommand({
|
|
|
4707
4761
|
},
|
|
4708
4762
|
run: async (args, ctx) => {
|
|
4709
4763
|
const [{ syncStatus }, { fileUrl }, { withDeepLink }] = await Promise.all([
|
|
4710
|
-
import("./sync-
|
|
4764
|
+
import("./sync-TFB3VWFP.js"),
|
|
4711
4765
|
import("./api-7ZHHFXRP.js"),
|
|
4712
4766
|
import("./deep-link-BD4WN46A.js")
|
|
4713
4767
|
]);
|
|
@@ -5032,7 +5086,7 @@ var pageGo = defineCommand({
|
|
|
5032
5086
|
] }
|
|
5033
5087
|
},
|
|
5034
5088
|
run: async ({ to }) => {
|
|
5035
|
-
const { useEditorStore } = await import("./editor-store-
|
|
5089
|
+
const { useEditorStore } = await import("./editor-store-WPRQJL2A.js");
|
|
5036
5090
|
useEditorStore.getState().goToPrintPage(to);
|
|
5037
5091
|
return { summary: typeof to === "number" ? `Page ${to + 1}` : `${to} page` };
|
|
5038
5092
|
}
|
|
@@ -5066,7 +5120,7 @@ var pageSetup = defineCommand({
|
|
|
5066
5120
|
}
|
|
5067
5121
|
},
|
|
5068
5122
|
run: async (args) => {
|
|
5069
|
-
const { useEditorStore } = await import("./editor-store-
|
|
5123
|
+
const { useEditorStore } = await import("./editor-store-WPRQJL2A.js");
|
|
5070
5124
|
useEditorStore.getState().applyPageSetup(args);
|
|
5071
5125
|
return { summary: `Page setup updated${args.kind ? ` (${args.kind.toLowerCase()})` : ""}` };
|
|
5072
5126
|
}
|
|
@@ -5825,7 +5879,7 @@ async function docAtTime(doc2, ids, time2) {
|
|
|
5825
5879
|
let frameId;
|
|
5826
5880
|
if (time2 === void 0) {
|
|
5827
5881
|
try {
|
|
5828
|
-
const { useEditorStore } = await import("./editor-store-
|
|
5882
|
+
const { useEditorStore } = await import("./editor-store-WPRQJL2A.js");
|
|
5829
5883
|
const st = useEditorStore.getState();
|
|
5830
5884
|
const target = st.transport?.target;
|
|
5831
5885
|
if (st.mode !== "ANIMATE" || target?.kind !== "frame") return doc2;
|
|
@@ -6219,7 +6273,7 @@ async function runAnimationExport(format, args, ctx) {
|
|
|
6219
6273
|
const filename = exportFileName(args.filename || targetName(doc2, target), format);
|
|
6220
6274
|
const [{ exportAnimation }, { memoryDestination }] = await Promise.all([import("./video-TWXTQTP3.js"), import("./destination-DJEJM5KM.js")]);
|
|
6221
6275
|
if (format === "lottie" || format === "dotlottie") return runLottieExport(renderer, doc2, spec, filename, ctx, memoryDestination, args.stateMachine);
|
|
6222
|
-
const planWatermark = format !== "png" && await (await import("./export-watermark-
|
|
6276
|
+
const planWatermark = format !== "png" && await (await import("./export-watermark-2QVKO7OR.js")).exportWatermark();
|
|
6223
6277
|
if (format !== "png") spec = { ...spec, watermark: planWatermark || args.watermark !== false };
|
|
6224
6278
|
const dest = ctx.destination ? await ctx.destination(filename, FORMAT_MIME[format]) : memoryDestination(filename, FORMAT_MIME[format]);
|
|
6225
6279
|
let stats;
|
|
@@ -6305,7 +6359,7 @@ var exportLottie = animationCommand((args) => args.container === "lottie" ? "dot
|
|
|
6305
6359
|
});
|
|
6306
6360
|
async function exportSite(doc2, pageId2, packaging, styling = "css", siteUrl) {
|
|
6307
6361
|
const [{ completeSite, nextFilesOf, shareImageFiles, staticFilesOf, NoSiteRuntime, bytesOf }, { fileBase }, { zipFiles }, { downloadBlob }] = await Promise.all([
|
|
6308
|
-
import("./project-
|
|
6362
|
+
import("./project-IH23X2UG.js"),
|
|
6309
6363
|
import("./web-TDSHIXQY.js"),
|
|
6310
6364
|
import("./zip-export-ZYXDK4SM.js"),
|
|
6311
6365
|
import("./download-YRHNMQPH.js")
|
|
@@ -6399,7 +6453,7 @@ var exportStorefront = defineCommand({
|
|
|
6399
6453
|
const [{ storefrontInputs }, { STOREFRONT_TARGETS }, { bytesOf }, { fileBase, flatten }, { zipFiles }, { downloadBlob }] = await Promise.all([
|
|
6400
6454
|
import("./storefront-prepare-6IUMZTCQ.js"),
|
|
6401
6455
|
import("./storefront-BPMM6QWK.js"),
|
|
6402
|
-
import("./project-
|
|
6456
|
+
import("./project-IH23X2UG.js"),
|
|
6403
6457
|
import("./web-TDSHIXQY.js"),
|
|
6404
6458
|
import("./zip-export-ZYXDK4SM.js"),
|
|
6405
6459
|
import("./download-YRHNMQPH.js")
|
|
@@ -6794,7 +6848,7 @@ var visionRegenerateImage = defineCommand({
|
|
|
6794
6848
|
const id = args.id ?? ctx.selection()[0];
|
|
6795
6849
|
if (!id) throw new ToolError("Select a generated image to regenerate.");
|
|
6796
6850
|
nodeOrThrow(ctx.doc(), id);
|
|
6797
|
-
const { regenerateImage } = await import("./client-actions-
|
|
6851
|
+
const { regenerateImage } = await import("./client-actions-K54NVVVW.js");
|
|
6798
6852
|
regenerateImage(id, args.count);
|
|
6799
6853
|
return { summary: args.count > 1 ? `Regenerating ${args.count} variants` : "Regenerating the image", data: { id, count: args.count } };
|
|
6800
6854
|
}
|
|
@@ -9953,7 +10007,7 @@ var scriptRun = defineCommand({
|
|
|
9953
10007
|
// A script is not the turn the user is watching: confirm-tier tools are refused inside it (dispatch, `nested`).
|
|
9954
10008
|
actor: { ...ctx.actor, nested: true, label: "Script" },
|
|
9955
10009
|
// A look_at inside the script sees the document as the script has left it so far, not as it was before.
|
|
9956
|
-
use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-
|
|
10010
|
+
use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-DVKYZ5MR.js")).renderDocument(staged, ids, options)) : ctx.use(name2))
|
|
9957
10011
|
};
|
|
9958
10012
|
let calls = 0;
|
|
9959
10013
|
const images = [];
|
|
@@ -10773,7 +10827,7 @@ var docImportFile = defineCommand({
|
|
|
10773
10827
|
const file = new File([body], args.name);
|
|
10774
10828
|
if (file.size > MAX_BYTES) throw new ToolError(`"${args.name}" is larger than ${MAX_BYTES / 1024 / 1024} MB.`);
|
|
10775
10829
|
const [{ buildImportedDocument }, { mergeImportedDocument }] = await Promise.all([
|
|
10776
|
-
import("./plugin-import-
|
|
10830
|
+
import("./plugin-import-N2J7NVET.js"),
|
|
10777
10831
|
import("./import-merge-73U4J6IN.js")
|
|
10778
10832
|
]);
|
|
10779
10833
|
const built = await buildImportedDocument(file);
|
|
@@ -7,7 +7,7 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
defaultMeasure,
|
|
9
9
|
placePicture
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NQPNGZ3C.js";
|
|
11
11
|
import "./chunk-UCNBKWJQ.js";
|
|
12
12
|
import {
|
|
13
13
|
api
|
|
@@ -121,7 +121,7 @@ async function placeLibraryItem(item, opts = {}) {
|
|
|
121
121
|
}
|
|
122
122
|
if (item.contentType.startsWith("video/")) {
|
|
123
123
|
const file = await libraryFile(item, opts);
|
|
124
|
-
const [{ useEditorStore }, { placeMediaFile }] = await Promise.all([import("./editor-store-
|
|
124
|
+
const [{ useEditorStore }, { placeMediaFile }] = await Promise.all([import("./editor-store-WPRQJL2A.js"), import("./media-tool-KSXO2AAJ.js")]);
|
|
125
125
|
const cam = useEditorStore.getState().camera;
|
|
126
126
|
await placeMediaFile(file, { kind: "point", ...opts.at ?? { x: cam.x, y: cam.y } });
|
|
127
127
|
return useEditorStore.getState().selection[0] ?? null;
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
requestEmbeddings,
|
|
17
17
|
requestImage,
|
|
18
18
|
requestImageAction
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-524RSKF3.js";
|
|
20
|
+
import "./chunk-UPLMAXNQ.js";
|
|
21
21
|
import "./chunk-A4CGHVJP.js";
|
|
22
22
|
import "./chunk-7SMURRFY.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-FMWUXVVS.js";
|
|
24
24
|
import "./chunk-KWUXHRXD.js";
|
|
25
25
|
import "./chunk-3PRZ5XSZ.js";
|
|
26
26
|
import "./chunk-QLJLPV5R.js";
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
selectedVectorTarget,
|
|
17
17
|
startImageAction,
|
|
18
18
|
startImageGeneration
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-Q23DL77U.js";
|
|
20
20
|
import "./chunk-3QD6CCCN.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-524RSKF3.js";
|
|
22
|
+
import "./chunk-UPLMAXNQ.js";
|
|
23
23
|
import "./chunk-A4CGHVJP.js";
|
|
24
24
|
import "./chunk-VOOUF5TT.js";
|
|
25
25
|
import "./chunk-HS4CR6HU.js";
|
|
@@ -38,10 +38,10 @@ import "./chunk-IYAH6IB3.js";
|
|
|
38
38
|
import "./chunk-633NXQV2.js";
|
|
39
39
|
import "./chunk-EYGE2XSW.js";
|
|
40
40
|
import "./chunk-7SMURRFY.js";
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-FMWUXVVS.js";
|
|
42
42
|
import "./chunk-KWUXHRXD.js";
|
|
43
43
|
import "./chunk-3PRZ5XSZ.js";
|
|
44
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-5SVFCWRP.js";
|
|
45
45
|
import "./chunk-OZJ7KASI.js";
|
|
46
46
|
import "./chunk-PMLSPVLR.js";
|
|
47
47
|
import "./chunk-76I6DIEM.js";
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
confirmTierCommands,
|
|
9
9
|
dangerousCommands,
|
|
10
10
|
registerDangerousCommands
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-4SD7TX7R.js";
|
|
12
|
+
import "./chunk-MQ73SYLV.js";
|
|
13
|
+
import "./chunk-ZPETEA54.js";
|
|
14
14
|
import "./chunk-ZLWN6LBH.js";
|
|
15
15
|
import "./chunk-Q7EITIAT.js";
|
|
16
16
|
import "./chunk-X36CCQ76.js";
|
|
@@ -46,6 +46,7 @@ import "./chunk-ZWGSFZFE.js";
|
|
|
46
46
|
import "./chunk-PLHJR3CN.js";
|
|
47
47
|
import "./chunk-RK3HJC3E.js";
|
|
48
48
|
import "./chunk-A54HJQ6T.js";
|
|
49
|
+
import "./chunk-7DATU5VX.js";
|
|
49
50
|
import "./chunk-6YZC5UXW.js";
|
|
50
51
|
import "./chunk-E66ZNPHF.js";
|
|
51
52
|
import "./chunk-INZZZ5M6.js";
|
|
@@ -6,21 +6,21 @@ const __filename = __popcraftPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __popcraftDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
syncStatus
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7IH7U6KU.js";
|
|
10
10
|
import "./chunk-DE2GVUWC.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-W5KNQERV.js";
|
|
12
12
|
import "./chunk-7SMURRFY.js";
|
|
13
13
|
import "./chunk-EUF3VFBW.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-FMWUXVVS.js";
|
|
15
15
|
import {
|
|
16
16
|
cloudApi
|
|
17
17
|
} from "./chunk-KWUXHRXD.js";
|
|
18
18
|
import "./chunk-3PRZ5XSZ.js";
|
|
19
19
|
import "./chunk-TZQJDYMB.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-JOUHQ5HK.js";
|
|
21
21
|
import {
|
|
22
22
|
useEditorStore
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-5SVFCWRP.js";
|
|
24
24
|
import "./chunk-OZJ7KASI.js";
|
|
25
25
|
import "./chunk-PMLSPVLR.js";
|
|
26
26
|
import "./chunk-76I6DIEM.js";
|