@popcraft/kit 0.39.2 → 0.39.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-KI3CLDIB.js → agent-4E255LAP.js} +1 -1
- package/dist/chunks/{builtin-O4KTOKBA.js → builtin-AA5TFW3X.js} +3 -3
- package/dist/chunks/{buy-credits-M4ESEIRV.js → buy-credits-QUB7IW4X.js} +3 -2
- package/dist/chunks/{check-template-J5Y743LU.js → check-template-N7SAEIMQ.js} +2 -2
- package/dist/chunks/{chunk-367BWDP6.js → chunk-42LN72V2.js} +4 -4
- package/dist/chunks/{chunk-BWUHGZCD.js → chunk-5DY3YPFB.js} +13 -5
- package/dist/chunks/{chunk-UA5JCPK7.js → chunk-73SQPECB.js} +1 -1
- package/dist/chunks/{chunk-LUYQ7J7Y.js → chunk-BUUGRRLL.js} +2 -2
- package/dist/chunks/{chunk-2KJ5MNIQ.js → chunk-D7MJXRNN.js} +1 -1
- package/dist/chunks/{chunk-FUT34NIA.js → chunk-DIFI3JDD.js} +5 -5
- package/dist/chunks/{chunk-SJMBD4YT.js → chunk-GFGEQRH4.js} +3 -3
- package/dist/chunks/{chunk-3CDJFUR2.js → chunk-I3SIVY2F.js} +1 -1
- package/dist/chunks/{chunk-BKRKK6BL.js → chunk-INORGURH.js} +5 -5
- package/dist/chunks/{chunk-HA52ZAX6.js → chunk-IPUIH5FB.js} +8 -8
- package/dist/chunks/{chunk-SDP72PLQ.js → chunk-JZQSBIPM.js} +2 -2
- package/dist/chunks/{chunk-QHVNDHT2.js → chunk-KIRCO2V3.js} +5 -5
- package/dist/chunks/chunk-LHR354QM.js +45 -0
- package/dist/chunks/{chunk-Z2MTSNIE.js → chunk-NZZVIBR6.js} +41 -41
- package/dist/chunks/{chunk-UOS7S3ZA.js → chunk-OEEABDYO.js} +3 -3
- package/dist/chunks/{chunk-PFNKNCZA.js → chunk-PRW3HXHI.js} +1 -1
- package/dist/chunks/{chunk-5Y5AUX3W.js → chunk-Q7UXEZQ7.js} +2 -2
- package/dist/chunks/{chunk-FUPMMN3D.js → chunk-SWODQJ7B.js} +11 -11
- package/dist/chunks/{chunk-DL34EUOY.js → chunk-XFVEENSY.js} +6 -34
- package/dist/chunks/{chunk-DSCQ5MKG.js → chunk-XN3OPBM5.js} +4 -4
- package/dist/chunks/{client-JR265W25.js → client-DL74R6XP.js} +1 -1
- package/dist/chunks/{client-EI2EOEPW.js → client-I475VQKH.js} +4 -3
- package/dist/chunks/{client-4NHRIPID.js → client-RDOGDXZN.js} +2 -2
- package/dist/chunks/{client-actions-62ABT2DT.js → client-actions-GOSA5YS2.js} +6 -5
- package/dist/chunks/{dangerous-LDMEDFCO.js → dangerous-7LRNUZJL.js} +3 -3
- package/dist/chunks/{delete-current-file-O7FI5BDC.js → delete-current-file-OMPYBTLR.js} +6 -5
- package/dist/chunks/{editor-seams-ELICUY4D.js → editor-seams-SSDVF5EG.js} +11 -10
- package/dist/chunks/{editor-store-YFGN57WA.js → editor-store-FEIOZB4Q.js} +1 -1
- package/dist/chunks/{export-watermark-RHTHSC5Y.js → export-watermark-FGFZ4XBT.js} +8 -6
- package/dist/chunks/{eyedropper-RT7VFF4I.js → eyedropper-CBEEPFMO.js} +1 -1
- package/dist/chunks/{generate-media-2VIG43AJ.js → generate-media-7O3HIT34.js} +4 -3
- package/dist/chunks/{host-4R6JNGCA.js → host-DLDZDU67.js} +7 -6
- package/dist/chunks/{integrations-ZABOMQ4C.js → integrations-ZIEWOJ2U.js} +1 -1
- package/dist/chunks/{libraries-GSTMWQHL.js → libraries-5ARWVM4T.js} +6 -5
- package/dist/chunks/{live-XLEAXHIJ.js → live-QJUP4B2I.js} +1 -1
- package/dist/chunks/{media-tool-VBA4APYJ.js → media-tool-2E2IPYDH.js} +1 -1
- package/dist/chunks/{new-file-ENIMZ5RX.js → new-file-HMHD3U6D.js} +4 -3
- package/dist/chunks/{plugin-C4S5ZMSE.js → plugin-HM6RJQUE.js} +2 -2
- package/dist/chunks/{plugin-import-JW4RKYOO.js → plugin-import-GCL6XI6R.js} +15 -14
- package/dist/chunks/{presence-7PCBRAQ6.js → presence-XLFPN565.js} +2 -2
- package/dist/chunks/{project-YMGHL6U2.js → project-PP6WZJXJ.js} +1 -1
- package/dist/chunks/{publish-site-AZ7USE2L.js → publish-site-5BL3MPGS.js} +7 -6
- package/dist/chunks/{publish-store-VNZR3MCB.js → publish-store-VWDIEOO7.js} +4 -4
- package/dist/chunks/{raster-actions-THFED73I.js → raster-actions-MMWG6SUD.js} +1 -1
- package/dist/chunks/{runner-B5OWG6AJ.js → runner-3FMK4AQD.js} +19 -18
- package/dist/chunks/{store-KQA72SRV.js → store-XQSIY777.js} +7 -6
- package/dist/chunks/{sync-W5N4AOWZ.js → sync-B5K7ODIH.js} +6 -5
- package/dist/chunks/{tabs-BBAC3NDH.js → tabs-CPKH62U3.js} +9 -8
- package/dist/chunks/{team-UG6Q2MMC.js → team-UBSE6CP3.js} +1 -1
- package/dist/chunks/{team-client-RHC7Z4QT.js → team-client-3J5K4AT2.js} +1 -1
- package/dist/chunks/{tools-5GGJFQCU.js → tools-RTEMMKZ3.js} +2 -2
- package/dist/chunks/{ui-commands-UCIRSWID.js → ui-commands-CNEV6VXE.js} +13 -12
- package/dist/chunks/{versions-N4UU6PJJ.js → versions-VMGFWCH6.js} +6 -5
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -864,7 +864,7 @@ init_scene_graph();
|
|
|
864
864
|
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.");
|
|
865
865
|
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 });
|
|
866
866
|
async function placeImportedPicture(ctx, imported, at, what, extra = {}) {
|
|
867
|
-
const client = await import("./client-
|
|
867
|
+
const client = await import("./client-DL74R6XP.js");
|
|
868
868
|
if (at.fillLayerId) {
|
|
869
869
|
const doc2 = ctx.doc();
|
|
870
870
|
const target = nodeOrThrow(doc2, at.fillLayerId);
|
|
@@ -910,7 +910,7 @@ var photoSearch = defineCommand({
|
|
|
910
910
|
}
|
|
911
911
|
},
|
|
912
912
|
run: async (args) => {
|
|
913
|
-
const { searchStockPhotos } = await import("./client-
|
|
913
|
+
const { searchStockPhotos } = await import("./client-DL74R6XP.js");
|
|
914
914
|
const page = await searchStockPhotos(args.query, args.page ?? 1, { licence: args.licence });
|
|
915
915
|
return {
|
|
916
916
|
summary: `${page.results.length} photo${page.results.length === 1 ? "" : "s"} for \u201C${page.query}\u201D (page ${page.page} of ${page.pageCount || 1})`,
|
|
@@ -944,7 +944,7 @@ var photoInsert = defineCommand({
|
|
|
944
944
|
run: async (args, ctx) => {
|
|
945
945
|
if (!args.id && !args.query) throw new ToolError("Pass an id from search_photos, or a query.");
|
|
946
946
|
if (args.id && !isPhotoId(args.id)) throw new ToolError(`"${args.id}" is not a photo id from search_photos.`);
|
|
947
|
-
const client = await import("./client-
|
|
947
|
+
const client = await import("./client-DL74R6XP.js");
|
|
948
948
|
let photo;
|
|
949
949
|
if (args.id) photo = await client.stockPhotoInfo(args.id);
|
|
950
950
|
else {
|
|
@@ -982,7 +982,7 @@ var mediaList = defineCommand({
|
|
|
982
982
|
}
|
|
983
983
|
},
|
|
984
984
|
run: async (args) => {
|
|
985
|
-
const { listLibraryMedia } = await import("./client-
|
|
985
|
+
const { listLibraryMedia } = await import("./client-RDOGDXZN.js");
|
|
986
986
|
const page = await listLibraryMedia(args);
|
|
987
987
|
return { summary: `${page.items.length} media item${page.items.length === 1 ? "" : "s"}${page.nextCursor ? " (more)" : ""}`, data: { workspaceId: page.workspaceId, items: page.items.map(brief3), nextCursor: page.nextCursor } };
|
|
988
988
|
}
|
|
@@ -1013,7 +1013,7 @@ var mediaInsert = defineCommand({
|
|
|
1013
1013
|
run: async (args, ctx) => {
|
|
1014
1014
|
const contentType = args.contentType ?? "image/*";
|
|
1015
1015
|
if (!contentType.startsWith("image/")) throw new ToolError("insert_media places pictures; this item is not one.");
|
|
1016
|
-
const { importLibraryPicture } = await import("./client-
|
|
1016
|
+
const { importLibraryPicture } = await import("./client-RDOGDXZN.js");
|
|
1017
1017
|
const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "Media", contentType, size: 0, createdAt: "", fileCount: 1, source: null };
|
|
1018
1018
|
const imported = await importLibraryPicture(item);
|
|
1019
1019
|
return placeImportedPicture(ctx, imported, args, `\u201C${imported.name}\u201D`, { hash: imported.hash });
|
|
@@ -1034,7 +1034,7 @@ var mediaDownload = defineCommand({
|
|
|
1034
1034
|
// The Library's right-click menu: saves the item's file to the computer.
|
|
1035
1035
|
expose: { ui: { label: "Download", palette: false } },
|
|
1036
1036
|
run: async (args) => {
|
|
1037
|
-
const { libraryBlob, libraryFileName } = await import("./client-
|
|
1037
|
+
const { libraryBlob, libraryFileName } = await import("./client-RDOGDXZN.js");
|
|
1038
1038
|
const { downloadBlob } = await import("./download-IS2F6UJD.js");
|
|
1039
1039
|
const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "media", contentType: args.contentType ?? "", size: 0, createdAt: "", fileCount: 1, source: null };
|
|
1040
1040
|
const blob = await libraryBlob(item);
|
|
@@ -1065,7 +1065,7 @@ var mediaDelete = defineCommand({
|
|
|
1065
1065
|
}
|
|
1066
1066
|
},
|
|
1067
1067
|
run: async (args) => {
|
|
1068
|
-
const { deleteLibraryMedia } = await import("./client-
|
|
1068
|
+
const { deleteLibraryMedia } = await import("./client-RDOGDXZN.js");
|
|
1069
1069
|
const out = await deleteLibraryMedia(args.workspace, args.hash);
|
|
1070
1070
|
return { summary: `Deleted it from the library (it was in ${out.files} file${out.files === 1 ? "" : "s"})`, data: out };
|
|
1071
1071
|
}
|
|
@@ -1079,13 +1079,13 @@ async function signedIn() {
|
|
|
1079
1079
|
}
|
|
1080
1080
|
async function publishedFile() {
|
|
1081
1081
|
await signedIn();
|
|
1082
|
-
const { openFileKey } = await import("./publish-site-
|
|
1082
|
+
const { openFileKey } = await import("./publish-site-5BL3MPGS.js");
|
|
1083
1083
|
const key = openFileKey();
|
|
1084
1084
|
if (!key) throw new CommandError("This file is not saved to the cloud yet, so it has no site. Publish it first.", "failed");
|
|
1085
1085
|
return key;
|
|
1086
1086
|
}
|
|
1087
1087
|
async function formsWithoutDatabase(key) {
|
|
1088
|
-
const [{ useEditorStore }, { usesForms, formsGoNowhere }, { siteBackend }] = await Promise.all([import("./editor-store-
|
|
1088
|
+
const [{ useEditorStore }, { usesForms, formsGoNowhere }, { siteBackend }] = await Promise.all([import("./editor-store-FEIOZB4Q.js"), import("./backend-E5LU63VM.js"), import("./integrations-ZIEWOJ2U.js")]);
|
|
1089
1089
|
const doc2 = useEditorStore.getState().document;
|
|
1090
1090
|
if (!usesForms(doc2)) return false;
|
|
1091
1091
|
return formsGoNowhere(doc2, await siteBackend(key).catch(() => void 0));
|
|
@@ -1121,7 +1121,7 @@ var publishSite = defineCommand({
|
|
|
1121
1121
|
const { cleanSlug } = await import("./rules-TXOULPED.js");
|
|
1122
1122
|
const address = p.address === void 0 ? void 0 : cleanSlug(p.address);
|
|
1123
1123
|
if (address === null) throw new CommandError("That cannot be a site address: use 3 to 40 letters, digits and dashes.", "invalid_params");
|
|
1124
|
-
const { publishOpenFile, NoScreens } = await import("./publish-site-
|
|
1124
|
+
const { publishOpenFile, NoScreens } = await import("./publish-site-5BL3MPGS.js");
|
|
1125
1125
|
try {
|
|
1126
1126
|
const done = await publishOpenFile(address);
|
|
1127
1127
|
ctx.notice(`Published version ${done.version}: ${done.url}`);
|
|
@@ -1176,7 +1176,7 @@ var publishListSites = defineCommand({
|
|
|
1176
1176
|
},
|
|
1177
1177
|
run: async (p) => {
|
|
1178
1178
|
await signedIn();
|
|
1179
|
-
const [{ workspaceSites }, { activeTeamWorkspaceId, useHyperyTeam }] = await Promise.all([import("./sites-322SPIIE.js"), import("./team-
|
|
1179
|
+
const [{ workspaceSites }, { activeTeamWorkspaceId, useHyperyTeam }] = await Promise.all([import("./sites-322SPIIE.js"), import("./team-UBSE6CP3.js")]);
|
|
1180
1180
|
const workspaceId = p.workspaceId ?? activeTeamWorkspaceId() ?? useHyperyTeam.getState().personalWorkspaceId;
|
|
1181
1181
|
if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
|
|
1182
1182
|
const out = await workspaceSites(workspaceId);
|
|
@@ -1225,12 +1225,12 @@ var publishStatus = defineCommand({
|
|
|
1225
1225
|
},
|
|
1226
1226
|
run: async () => {
|
|
1227
1227
|
await signedIn();
|
|
1228
|
-
const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-
|
|
1228
|
+
const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-5BL3MPGS.js"), import("./sites-322SPIIE.js")]);
|
|
1229
1229
|
const key = openFileKey();
|
|
1230
1230
|
const status = await siteStatus(key);
|
|
1231
1231
|
const site = status.site;
|
|
1232
|
-
const backend = key ? await (await import("./integrations-
|
|
1233
|
-
const destinations = key ? await (await import("./integrations-
|
|
1232
|
+
const backend = key ? await (await import("./integrations-ZIEWOJ2U.js")).siteBackend(key).catch(() => null) : null;
|
|
1233
|
+
const destinations = key ? await (await import("./integrations-ZIEWOJ2U.js")).listDestinations(key).catch(() => []) : [];
|
|
1234
1234
|
return {
|
|
1235
1235
|
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}`,
|
|
1236
1236
|
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 })) }
|
|
@@ -1261,7 +1261,7 @@ var publishStore = defineCommand({
|
|
|
1261
1261
|
},
|
|
1262
1262
|
run: async (p, ctx) => {
|
|
1263
1263
|
await signedIn();
|
|
1264
|
-
const { deployOpenStore } = await import("./publish-store-
|
|
1264
|
+
const { deployOpenStore } = await import("./publish-store-VWDIEOO7.js");
|
|
1265
1265
|
const done = await deployOpenStore(ctx.doc(), ctx.pageId(), { destinationId: p.destinationId }).catch((e) => {
|
|
1266
1266
|
throw new CommandError(e instanceof Error ? e.message : String(e), "failed");
|
|
1267
1267
|
});
|
|
@@ -1290,7 +1290,7 @@ var integrationList = defineCommand({
|
|
|
1290
1290
|
}
|
|
1291
1291
|
},
|
|
1292
1292
|
run: async ({ capability }) => {
|
|
1293
|
-
const [{ cloudUser }, { integrationsWorkspaceId, listWorkspaceIntegrations }] = await Promise.all([import("./session-ZCWT3Y3C.js"), import("./integrations-
|
|
1293
|
+
const [{ cloudUser }, { integrationsWorkspaceId, listWorkspaceIntegrations }] = await Promise.all([import("./session-ZCWT3Y3C.js"), import("./integrations-ZIEWOJ2U.js")]);
|
|
1294
1294
|
if (!cloudUser()) throw new CommandError("You are not signed in: integrations belong to your account's workspace.", "denied");
|
|
1295
1295
|
const workspaceId = integrationsWorkspaceId();
|
|
1296
1296
|
if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
|
|
@@ -1331,7 +1331,7 @@ var integrationOpen = defineCommand({
|
|
|
1331
1331
|
}
|
|
1332
1332
|
});
|
|
1333
1333
|
async function openFile() {
|
|
1334
|
-
const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-ZCWT3Y3C.js"), import("./publish-site-
|
|
1334
|
+
const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-ZCWT3Y3C.js"), import("./publish-site-5BL3MPGS.js")]);
|
|
1335
1335
|
if (!cloudUser()) throw new CommandError("You are not signed in.", "denied");
|
|
1336
1336
|
const key = openFileKey();
|
|
1337
1337
|
if (!key) throw new CommandError("This file is not saved to the cloud yet. Publish it first (publish_site).", "failed");
|
|
@@ -1357,7 +1357,7 @@ var integrationListResources = defineCommand({
|
|
|
1357
1357
|
}
|
|
1358
1358
|
},
|
|
1359
1359
|
run: async ({ connectionId, capability, path }) => {
|
|
1360
|
-
const { listResources } = await import("./integrations-
|
|
1360
|
+
const { listResources } = await import("./integrations-ZIEWOJ2U.js");
|
|
1361
1361
|
const list = await listResources(connectionId, capability, asPath2(path));
|
|
1362
1362
|
return {
|
|
1363
1363
|
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",
|
|
@@ -1392,7 +1392,7 @@ var integrationAddDestination = defineCommand({
|
|
|
1392
1392
|
},
|
|
1393
1393
|
run: async (p, ctx) => {
|
|
1394
1394
|
const key = await openFile();
|
|
1395
|
-
const { addDestination, createDestination, createResource } = await import("./integrations-
|
|
1395
|
+
const { addDestination, createDestination, createResource } = await import("./integrations-ZIEWOJ2U.js");
|
|
1396
1396
|
let made;
|
|
1397
1397
|
if (p.create) made = await createDestination(key, p.capability, void 0, p.connectionId);
|
|
1398
1398
|
else {
|
|
@@ -1429,7 +1429,7 @@ var integrationDeploy = defineCommand({
|
|
|
1429
1429
|
},
|
|
1430
1430
|
run: async (p, ctx) => {
|
|
1431
1431
|
const key = await openFile();
|
|
1432
|
-
const { deployDestination, listDestinations } = await import("./integrations-
|
|
1432
|
+
const { deployDestination, listDestinations } = await import("./integrations-ZIEWOJ2U.js");
|
|
1433
1433
|
const all = await listDestinations(key);
|
|
1434
1434
|
const dest = p.destinationId ? all.find((d) => d.id === p.destinationId) : all.length === 1 ? all[0] : void 0;
|
|
1435
1435
|
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");
|
|
@@ -1463,7 +1463,7 @@ var integrationAttachDatabase = defineCommand({
|
|
|
1463
1463
|
},
|
|
1464
1464
|
run: async (p, ctx) => {
|
|
1465
1465
|
const key = await openFile();
|
|
1466
|
-
const { attachDatabase, createDatabase, createResource, listResources } = await import("./integrations-
|
|
1466
|
+
const { attachDatabase, createDatabase, createResource, listResources } = await import("./integrations-ZIEWOJ2U.js");
|
|
1467
1467
|
if (p.create) return attached(await createDatabase(key, void 0, p.connectionId), ctx);
|
|
1468
1468
|
if (!p.connectionId || !p.target) throw new CommandError("Say connectionId and target, or create: true.", "invalid_params");
|
|
1469
1469
|
let target = asPath2(p.target);
|
|
@@ -1502,7 +1502,7 @@ var integrationSubmissions = defineCommand({
|
|
|
1502
1502
|
},
|
|
1503
1503
|
run: async ({ form, limit }) => {
|
|
1504
1504
|
const key = await openFile();
|
|
1505
|
-
const { listSubmissions } = await import("./integrations-
|
|
1505
|
+
const { listSubmissions } = await import("./integrations-ZIEWOJ2U.js");
|
|
1506
1506
|
const rows = await listSubmissions(key, { form, limit: limit ?? 20 });
|
|
1507
1507
|
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 } };
|
|
1508
1508
|
}
|
|
@@ -1527,7 +1527,7 @@ var integrationSetSignIn = defineCommand({
|
|
|
1527
1527
|
},
|
|
1528
1528
|
run: async ({ on }, ctx) => {
|
|
1529
1529
|
const key = await openFile();
|
|
1530
|
-
const { setSignIn } = await import("./integrations-
|
|
1530
|
+
const { setSignIn } = await import("./integrations-ZIEWOJ2U.js");
|
|
1531
1531
|
const done = await setSignIn(key, on);
|
|
1532
1532
|
ctx.notice(on ? "Visitors can sign in." : "Sign-in is off.");
|
|
1533
1533
|
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 } };
|
|
@@ -1745,7 +1745,7 @@ var fontTeamList = defineCommand({
|
|
|
1745
1745
|
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)." }
|
|
1746
1746
|
},
|
|
1747
1747
|
run: async (args) => {
|
|
1748
|
-
const { refreshTeamFonts } = await import("./team-client-
|
|
1748
|
+
const { refreshTeamFonts } = await import("./team-client-3J5K4AT2.js");
|
|
1749
1749
|
const fonts = await refreshTeamFonts(args.workspace);
|
|
1750
1750
|
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 })) } };
|
|
1751
1751
|
}
|
|
@@ -1772,7 +1772,7 @@ var fontTeamAdd = defineCommand({
|
|
|
1772
1772
|
run: async (args, ctx) => {
|
|
1773
1773
|
const { bytes, fileName: fileName2 } = await fontBytes(args, ctx);
|
|
1774
1774
|
const { face, family, weight, style } = await resolveFace(bytes, args);
|
|
1775
|
-
const { uploadTeamFont } = await import("./team-client-
|
|
1775
|
+
const { uploadTeamFont } = await import("./team-client-3J5K4AT2.js");
|
|
1776
1776
|
const font = await uploadTeamFont(bytes, { family, weight, style, face: face.index, fileName: fileName2 }, args.workspace);
|
|
1777
1777
|
return { summary: `Added ${family} ${weight}${style === "italic" ? " italic" : ""} to the team`, data: { font } };
|
|
1778
1778
|
}
|
|
@@ -1794,7 +1794,7 @@ var fontTeamRemove = defineCommand({
|
|
|
1794
1794
|
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." }
|
|
1795
1795
|
},
|
|
1796
1796
|
run: async (args) => {
|
|
1797
|
-
const { removeTeamFont } = await import("./team-client-
|
|
1797
|
+
const { removeTeamFont } = await import("./team-client-3J5K4AT2.js");
|
|
1798
1798
|
const out = await removeTeamFont(args.id, args.workspace);
|
|
1799
1799
|
return { summary: `Removed the team font${out.freed ? " and freed its storage" : ""}`, data: out };
|
|
1800
1800
|
}
|
|
@@ -1805,7 +1805,7 @@ var fontTeamCommands = [fontTeamList, fontTeamAdd];
|
|
|
1805
1805
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
1806
1806
|
async function cloudFile() {
|
|
1807
1807
|
const [{ syncStatus }, { cloudUser }] = await Promise.all([
|
|
1808
|
-
import("./sync-
|
|
1808
|
+
import("./sync-B5K7ODIH.js"),
|
|
1809
1809
|
import("./session-ZCWT3Y3C.js")
|
|
1810
1810
|
]);
|
|
1811
1811
|
const link2 = syncStatus().link;
|
|
@@ -1867,7 +1867,7 @@ var fileTrash = defineCommand({
|
|
|
1867
1867
|
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." }
|
|
1868
1868
|
},
|
|
1869
1869
|
run: async () => {
|
|
1870
|
-
const { deleteCurrentFile, leaveDeletedFile } = await import("./delete-current-file-
|
|
1870
|
+
const { deleteCurrentFile, leaveDeletedFile } = await import("./delete-current-file-OMPYBTLR.js");
|
|
1871
1871
|
const { name: name2, kind } = await deleteCurrentFile();
|
|
1872
1872
|
leaveDeletedFile();
|
|
1873
1873
|
return { summary: kind === "cloud" ? `Moved \u201C${name2}\u201D to the Trash` : `Deleted \u201C${name2}\u201D` };
|
|
@@ -1980,11 +1980,11 @@ var fileDuplicate = defineCommand({
|
|
|
1980
1980
|
},
|
|
1981
1981
|
run: async (_p, ctx) => {
|
|
1982
1982
|
const [{ syncStatus }, { cloudApi }, { isDesktopTabs }, { createFileInTab }, { openNewCloudFile }, { v4: uuid }] = await Promise.all([
|
|
1983
|
-
import("./sync-
|
|
1983
|
+
import("./sync-B5K7ODIH.js"),
|
|
1984
1984
|
import("./api-ACJNFNUN.js"),
|
|
1985
1985
|
import("./tab-mode-TLS32N2Y.js"),
|
|
1986
|
-
import("./tabs-
|
|
1987
|
-
import("./sync-
|
|
1986
|
+
import("./tabs-CPKH62U3.js"),
|
|
1987
|
+
import("./sync-B5K7ODIH.js"),
|
|
1988
1988
|
import("./dist-node-FS6BOXYT.js")
|
|
1989
1989
|
]);
|
|
1990
1990
|
const doc2 = ctx.doc();
|
|
@@ -4600,7 +4600,7 @@ var viewCopyLink = defineCommand({
|
|
|
4600
4600
|
},
|
|
4601
4601
|
run: async (args, ctx) => {
|
|
4602
4602
|
const [{ syncStatus }, { fileUrl }, { withDeepLink }] = await Promise.all([
|
|
4603
|
-
import("./sync-
|
|
4603
|
+
import("./sync-B5K7ODIH.js"),
|
|
4604
4604
|
import("./api-ACJNFNUN.js"),
|
|
4605
4605
|
import("./deep-link-K26TLDDL.js")
|
|
4606
4606
|
]);
|
|
@@ -4925,7 +4925,7 @@ var pageGo = defineCommand({
|
|
|
4925
4925
|
] }
|
|
4926
4926
|
},
|
|
4927
4927
|
run: async ({ to }) => {
|
|
4928
|
-
const { useEditorStore } = await import("./editor-store-
|
|
4928
|
+
const { useEditorStore } = await import("./editor-store-FEIOZB4Q.js");
|
|
4929
4929
|
useEditorStore.getState().goToPrintPage(to);
|
|
4930
4930
|
return { summary: typeof to === "number" ? `Page ${to + 1}` : `${to} page` };
|
|
4931
4931
|
}
|
|
@@ -4959,7 +4959,7 @@ var pageSetup = defineCommand({
|
|
|
4959
4959
|
}
|
|
4960
4960
|
},
|
|
4961
4961
|
run: async (args) => {
|
|
4962
|
-
const { useEditorStore } = await import("./editor-store-
|
|
4962
|
+
const { useEditorStore } = await import("./editor-store-FEIOZB4Q.js");
|
|
4963
4963
|
useEditorStore.getState().applyPageSetup(args);
|
|
4964
4964
|
return { summary: `Page setup updated${args.kind ? ` (${args.kind.toLowerCase()})` : ""}` };
|
|
4965
4965
|
}
|
|
@@ -5718,7 +5718,7 @@ async function docAtTime(doc2, ids, time2) {
|
|
|
5718
5718
|
let frameId;
|
|
5719
5719
|
if (time2 === void 0) {
|
|
5720
5720
|
try {
|
|
5721
|
-
const { useEditorStore } = await import("./editor-store-
|
|
5721
|
+
const { useEditorStore } = await import("./editor-store-FEIOZB4Q.js");
|
|
5722
5722
|
const st = useEditorStore.getState();
|
|
5723
5723
|
const target = st.transport?.target;
|
|
5724
5724
|
if (st.mode !== "ANIMATE" || target?.kind !== "frame") return doc2;
|
|
@@ -6112,7 +6112,7 @@ async function runAnimationExport(format, args, ctx) {
|
|
|
6112
6112
|
const filename = exportFileName(args.filename || targetName(doc2, target), format);
|
|
6113
6113
|
const [{ exportAnimation }, { memoryDestination }] = await Promise.all([import("./video-6BKETKTD.js"), import("./destination-NI52D7OG.js")]);
|
|
6114
6114
|
if (format === "lottie" || format === "dotlottie") return runLottieExport(renderer, doc2, spec, filename, ctx, memoryDestination, args.stateMachine);
|
|
6115
|
-
const planWatermark = format !== "png" && await (await import("./export-watermark-
|
|
6115
|
+
const planWatermark = format !== "png" && await (await import("./export-watermark-FGFZ4XBT.js")).exportWatermark();
|
|
6116
6116
|
if (format !== "png") spec = { ...spec, watermark: planWatermark || args.watermark !== false };
|
|
6117
6117
|
const dest = ctx.destination ? await ctx.destination(filename, FORMAT_MIME[format]) : memoryDestination(filename, FORMAT_MIME[format]);
|
|
6118
6118
|
let stats;
|
|
@@ -6198,7 +6198,7 @@ var exportLottie = animationCommand((args) => args.container === "lottie" ? "dot
|
|
|
6198
6198
|
});
|
|
6199
6199
|
async function exportSite(doc2, pageId2, packaging, styling = "css", siteUrl) {
|
|
6200
6200
|
const [{ completeSite, nextFilesOf, shareImageFiles, staticFilesOf, NoSiteRuntime, bytesOf }, { fileBase }, { zipFiles }, { downloadBlob }] = await Promise.all([
|
|
6201
|
-
import("./project-
|
|
6201
|
+
import("./project-PP6WZJXJ.js"),
|
|
6202
6202
|
import("./web-RHNSTZDT.js"),
|
|
6203
6203
|
import("./zip-export-ZVCGOKIS.js"),
|
|
6204
6204
|
import("./download-IS2F6UJD.js")
|
|
@@ -6292,7 +6292,7 @@ var exportStorefront = defineCommand({
|
|
|
6292
6292
|
const [{ storefrontInputs }, { STOREFRONT_TARGETS }, { bytesOf }, { fileBase, flatten }, { zipFiles }, { downloadBlob }] = await Promise.all([
|
|
6293
6293
|
import("./storefront-prepare-T2YDKUPB.js"),
|
|
6294
6294
|
import("./storefront-K7HF5OJQ.js"),
|
|
6295
|
-
import("./project-
|
|
6295
|
+
import("./project-PP6WZJXJ.js"),
|
|
6296
6296
|
import("./web-RHNSTZDT.js"),
|
|
6297
6297
|
import("./zip-export-ZVCGOKIS.js"),
|
|
6298
6298
|
import("./download-IS2F6UJD.js")
|
|
@@ -6687,7 +6687,7 @@ var visionRegenerateImage = defineCommand({
|
|
|
6687
6687
|
const id = args.id ?? ctx.selection()[0];
|
|
6688
6688
|
if (!id) throw new ToolError("Select a generated image to regenerate.");
|
|
6689
6689
|
nodeOrThrow(ctx.doc(), id);
|
|
6690
|
-
const { regenerateImage } = await import("./client-actions-
|
|
6690
|
+
const { regenerateImage } = await import("./client-actions-GOSA5YS2.js");
|
|
6691
6691
|
regenerateImage(id, args.count);
|
|
6692
6692
|
return { summary: args.count > 1 ? `Regenerating ${args.count} variants` : "Regenerating the image", data: { id, count: args.count } };
|
|
6693
6693
|
}
|
|
@@ -9846,7 +9846,7 @@ var scriptRun = defineCommand({
|
|
|
9846
9846
|
// A script is not the turn the user is watching: confirm-tier tools are refused inside it (dispatch, `nested`).
|
|
9847
9847
|
actor: { ...ctx.actor, nested: true, label: "Script" },
|
|
9848
9848
|
// A look_at inside the script sees the document as the script has left it so far, not as it was before.
|
|
9849
|
-
use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-
|
|
9849
|
+
use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-4E255LAP.js")).renderDocument(staged, ids, options)) : ctx.use(name2))
|
|
9850
9850
|
};
|
|
9851
9851
|
let calls = 0;
|
|
9852
9852
|
const images = [];
|
|
@@ -10666,7 +10666,7 @@ var docImportFile = defineCommand({
|
|
|
10666
10666
|
const file = new File([body], args.name);
|
|
10667
10667
|
if (file.size > MAX_BYTES) throw new ToolError(`"${args.name}" is larger than ${MAX_BYTES / 1024 / 1024} MB.`);
|
|
10668
10668
|
const [{ buildImportedDocument }, { mergeImportedDocument }] = await Promise.all([
|
|
10669
|
-
import("./plugin-import-
|
|
10669
|
+
import("./plugin-import-GCL6XI6R.js"),
|
|
10670
10670
|
import("./import-merge-ZLS2G6MZ.js")
|
|
10671
10671
|
]);
|
|
10672
10672
|
const built = await buildImportedDocument(file);
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
hostEnv,
|
|
10
10
|
plain,
|
|
11
11
|
registerBuiltinCommands
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NZZVIBR6.js";
|
|
13
13
|
import {
|
|
14
14
|
storeOpsSeam
|
|
15
15
|
} from "./chunk-RZF5F427.js";
|
|
@@ -572,7 +572,7 @@ var commands = [
|
|
|
572
572
|
const [{ storefrontInputs }, { STOREFRONT_TARGETS }, { bytesOf }, { zipFiles }, { EXPORT_NODE_CAP }] = await Promise.all([
|
|
573
573
|
import("./storefront-prepare-T2YDKUPB.js"),
|
|
574
574
|
import("./storefront-K7HF5OJQ.js"),
|
|
575
|
-
import("./project-
|
|
575
|
+
import("./project-PP6WZJXJ.js"),
|
|
576
576
|
import("./zip-export-ZVCGOKIS.js"),
|
|
577
577
|
import("./tree-AQNOO6MB.js")
|
|
578
578
|
]);
|
|
@@ -769,7 +769,7 @@ var pluginRun = defineCommand({
|
|
|
769
769
|
}
|
|
770
770
|
},
|
|
771
771
|
run: async (p, ctx) => {
|
|
772
|
-
const { runPlugin } = await import("./host-
|
|
772
|
+
const { runPlugin } = await import("./host-DLDZDU67.js");
|
|
773
773
|
await runPlugin(p.pluginId, p.commandId);
|
|
774
774
|
ctx.notice(`Started ${p.pluginId}.`);
|
|
775
775
|
return {
|
|
@@ -7,10 +7,10 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
builtinCommands,
|
|
9
9
|
registerBuiltinCommands
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NZZVIBR6.js";
|
|
11
11
|
import {
|
|
12
12
|
toolView
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GFGEQRH4.js";
|
|
14
14
|
import {
|
|
15
15
|
init_define_POPCRAFT_COMPONENT_IDS
|
|
16
16
|
} from "./chunk-SRMWT24M.js";
|
|
@@ -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-OEEABDYO.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-NZZVIBR6.js";
|
|
17
17
|
import {
|
|
18
18
|
external_exports
|
|
19
19
|
} from "./chunk-AX2KIQW3.js";
|
|
@@ -55,7 +55,7 @@ var collabSetSpotlight = defineCommand({
|
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
run: async ({ on }, ctx) => {
|
|
58
|
-
const { setSpotlight } = await import("./presence-
|
|
58
|
+
const { setSpotlight } = await import("./presence-XLFPN565.js");
|
|
59
59
|
setSpotlight(on);
|
|
60
60
|
ctx.notice(on ? "Spotlight on \u2014 everyone is following this view." : "Spotlight off.");
|
|
61
61
|
return { summary: on ? "Spotlight on" : "Spotlight off", data: { spotlight: on } };
|
|
@@ -82,7 +82,7 @@ var collabRevealPrivate = defineCommand({
|
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
84
|
run: async (_p, ctx) => {
|
|
85
|
-
const { useEditorStore } = await import("./editor-store-
|
|
85
|
+
const { useEditorStore } = await import("./editor-store-FEIOZB4Q.js");
|
|
86
86
|
const before = Object.values(useEditorStore.getState().document.nodes).filter((n) => n.privateTo).length;
|
|
87
87
|
useEditorStore.getState().revealPrivate();
|
|
88
88
|
ctx.notice(before ? `Revealed ${before} private item${before === 1 ? "" : "s"}.` : "Nothing was private.");
|
|
@@ -146,7 +146,7 @@ var documentDelete = defineCommand({
|
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
148
|
run: async ({ id }, ctx) => {
|
|
149
|
-
const { useEditorStore } = await import("./editor-store-
|
|
149
|
+
const { useEditorStore } = await import("./editor-store-FEIOZB4Q.js");
|
|
150
150
|
const wasOpen = useEditorStore.getState().document.id === id;
|
|
151
151
|
await useEditorStore.getState().deleteDocument(id);
|
|
152
152
|
ctx.notice("Deleted the document.");
|
|
@@ -190,7 +190,7 @@ var libraryPublish = defineCommand({
|
|
|
190
190
|
}
|
|
191
191
|
},
|
|
192
192
|
run: async (p, ctx) => {
|
|
193
|
-
const { publishLibrary } = await import("./libraries-
|
|
193
|
+
const { publishLibrary } = await import("./libraries-5ARWVM4T.js");
|
|
194
194
|
const doc = ctx.doc();
|
|
195
195
|
const pick = {
|
|
196
196
|
componentIds: p.componentIds ?? Object.keys(doc.components ?? {}),
|
|
@@ -222,7 +222,7 @@ var libraryUnpublish = defineCommand({
|
|
|
222
222
|
},
|
|
223
223
|
run: async ({ libraryId }, ctx) => {
|
|
224
224
|
if (!libraryId.trim()) throw new CommandError("Which library? Pass its `libraryId`.", "invalid_params");
|
|
225
|
-
const { unpublishLibrary } = await import("./libraries-
|
|
225
|
+
const { unpublishLibrary } = await import("./libraries-5ARWVM4T.js");
|
|
226
226
|
await unpublishLibrary(libraryId);
|
|
227
227
|
ctx.notice(`Unpublished library ${libraryId}.`);
|
|
228
228
|
return { summary: `Unpublished library ${libraryId}`, data: { libraryId, unpublished: true } };
|
|
@@ -234,8 +234,8 @@ var libraryCommands = [libraryPublish, libraryUnpublish];
|
|
|
234
234
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
235
235
|
async function findVersion(id) {
|
|
236
236
|
const [{ useEditorStore }, { versionLabel }] = await Promise.all([
|
|
237
|
-
import("./editor-store-
|
|
238
|
-
import("./versions-
|
|
237
|
+
import("./editor-store-FEIOZB4Q.js"),
|
|
238
|
+
import("./versions-VMGFWCH6.js")
|
|
239
239
|
]);
|
|
240
240
|
const meta = useEditorStore.getState().versions.find((v) => v.id === id);
|
|
241
241
|
if (!meta) {
|
|
@@ -268,7 +268,7 @@ var versionRestore = defineCommand({
|
|
|
268
268
|
},
|
|
269
269
|
run: async ({ id }) => {
|
|
270
270
|
const found = await findVersion(id);
|
|
271
|
-
const { restoreVersion } = await import("./versions-
|
|
271
|
+
const { restoreVersion } = await import("./versions-VMGFWCH6.js");
|
|
272
272
|
await restoreVersion(found.meta);
|
|
273
273
|
return { summary: `Restored \u201C${found.label}\u201D`, data: { id, label: found.label, restored: true } };
|
|
274
274
|
}
|
|
@@ -293,7 +293,7 @@ var versionDelete = defineCommand({
|
|
|
293
293
|
},
|
|
294
294
|
run: async ({ id }, ctx) => {
|
|
295
295
|
const found = await findVersion(id);
|
|
296
|
-
const { deleteVersion } = await import("./versions-
|
|
296
|
+
const { deleteVersion } = await import("./versions-VMGFWCH6.js");
|
|
297
297
|
await deleteVersion(found.meta);
|
|
298
298
|
ctx.notice(`Deleted the version \u201C${found.label}\u201D.`);
|
|
299
299
|
return { summary: `Deleted the version \u201C${found.label}\u201D`, data: { id, label: found.label, deleted: true } };
|
|
@@ -4,13 +4,15 @@ import { dirname as __popcraftDirname } from 'node:path';
|
|
|
4
4
|
const require = __popcraftRequire(import.meta.url);
|
|
5
5
|
const __filename = __popcraftPath(import.meta.url);
|
|
6
6
|
const __dirname = __popcraftDirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
cachedLimits
|
|
9
|
+
} from "./chunk-LHR354QM.js";
|
|
7
10
|
import {
|
|
8
11
|
activeTeamWorkspaceId
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-I3SIVY2F.js";
|
|
10
13
|
import {
|
|
11
14
|
ApiError,
|
|
12
15
|
GUEST_FILE_LIMIT,
|
|
13
|
-
api,
|
|
14
16
|
cloudApi
|
|
15
17
|
} from "./chunk-SXZWSY3K.js";
|
|
16
18
|
import {
|
|
@@ -21,7 +23,7 @@ import {
|
|
|
21
23
|
} from "./chunk-52FBTTS7.js";
|
|
22
24
|
import {
|
|
23
25
|
markLibraryDocument
|
|
24
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-KIRCO2V3.js";
|
|
25
27
|
import {
|
|
26
28
|
cloudEnabled,
|
|
27
29
|
cloudUser
|
|
@@ -37,9 +39,6 @@ import {
|
|
|
37
39
|
import {
|
|
38
40
|
create
|
|
39
41
|
} from "./chunk-3QKFLCO2.js";
|
|
40
|
-
import {
|
|
41
|
-
require_react
|
|
42
|
-
} from "./chunk-VUHKDNL4.js";
|
|
43
42
|
import {
|
|
44
43
|
documentFromTemplate
|
|
45
44
|
} from "./chunk-C46FJRBI.js";
|
|
@@ -62,9 +61,6 @@ import {
|
|
|
62
61
|
import {
|
|
63
62
|
init_define_POPCRAFT_COMPONENT_IDS
|
|
64
63
|
} from "./chunk-SRMWT24M.js";
|
|
65
|
-
import {
|
|
66
|
-
__toESM
|
|
67
|
-
} from "./chunk-LJSVREWM.js";
|
|
68
64
|
|
|
69
65
|
// lib/client/cloud/new-file.ts
|
|
70
66
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
@@ -100,28 +96,6 @@ async function findLinkByKey(key) {
|
|
|
100
96
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
101
97
|
var isGuest = () => cloudEnabled() && !cloudUser();
|
|
102
98
|
|
|
103
|
-
// lib/client/cloud/entitlements.ts
|
|
104
|
-
init_define_POPCRAFT_COMPONENT_IDS();
|
|
105
|
-
var import_react = __toESM(require_react());
|
|
106
|
-
var TTL_MS = 3e4;
|
|
107
|
-
var cache = /* @__PURE__ */ new Map();
|
|
108
|
-
var lastResolved = null;
|
|
109
|
-
var cachedLimits = () => lastResolved?.limits ?? null;
|
|
110
|
-
function loadEntitlements(workspaceId, opts = {}) {
|
|
111
|
-
const hit = cache.get(workspaceId);
|
|
112
|
-
if (hit && !opts.fresh && Date.now() - hit.at < TTL_MS) return hit.value;
|
|
113
|
-
const value = api(`/api/billing/entitlements${workspaceId ? `?${new URLSearchParams({ workspaceId })}` : ""}`);
|
|
114
|
-
void value.then((e) => {
|
|
115
|
-
lastResolved = e;
|
|
116
|
-
}, () => {
|
|
117
|
-
});
|
|
118
|
-
cache.set(workspaceId, { at: Date.now(), value });
|
|
119
|
-
value.catch(() => {
|
|
120
|
-
if (cache.get(workspaceId)?.value === value) cache.delete(workspaceId);
|
|
121
|
-
});
|
|
122
|
-
return value;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
99
|
// lib/client/cloud/new-file-block.ts
|
|
126
100
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
127
101
|
var useNewFileBlock = create(() => ({ block: null }));
|
|
@@ -225,7 +199,7 @@ async function createNewFile(place = {}, seed = {}) {
|
|
|
225
199
|
return result;
|
|
226
200
|
}
|
|
227
201
|
function countTemplateUse(id) {
|
|
228
|
-
void import("./api-ACJNFNUN.js").then(({ api
|
|
202
|
+
void import("./api-ACJNFNUN.js").then(({ api }) => api(`/api/templates/${encodeURIComponent(id)}/installs`, { method: "POST" })).catch(() => {
|
|
229
203
|
});
|
|
230
204
|
}
|
|
231
205
|
async function createNewFileOrExplain(place = {}, seed = {}) {
|
|
@@ -247,8 +221,6 @@ export {
|
|
|
247
221
|
setCloudLink,
|
|
248
222
|
findLinkByKey,
|
|
249
223
|
isGuest,
|
|
250
|
-
cachedLimits,
|
|
251
|
-
loadEntitlements,
|
|
252
224
|
reportNewFileBlocked,
|
|
253
225
|
documentFromSeed,
|
|
254
226
|
newFileRefusal,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-525USHCJ.js";
|
|
14
14
|
import {
|
|
15
15
|
notice
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BUUGRRLL.js";
|
|
17
17
|
import {
|
|
18
18
|
effectiveChatModel,
|
|
19
19
|
setModelPref,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-5WR2A2SQ.js";
|
|
22
22
|
import {
|
|
23
23
|
useEditorStore
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-KIRCO2V3.js";
|
|
25
25
|
import {
|
|
26
26
|
create
|
|
27
27
|
} from "./chunk-3QKFLCO2.js";
|
|
@@ -1477,7 +1477,7 @@ async function sendMessage(text) {
|
|
|
1477
1477
|
if (!useAgentStore.getState().activeThreadId) newThread();
|
|
1478
1478
|
const mentions = pruneMentions(body, useAgentStore.getState().draftMentions);
|
|
1479
1479
|
useAgentStore.setState({ draft: "", draftMentions: [], error: null });
|
|
1480
|
-
const { runTurn } = await import("./runner-
|
|
1480
|
+
const { runTurn } = await import("./runner-3FMK4AQD.js");
|
|
1481
1481
|
await runTurn(body, mentions);
|
|
1482
1482
|
}
|
|
1483
1483
|
function stop() {
|
|
@@ -1580,7 +1580,7 @@ var clearTaskChildren = () => useAgentStore.setState({ taskChildren: {} });
|
|
|
1580
1580
|
function subscribeChildTools() {
|
|
1581
1581
|
let dispose;
|
|
1582
1582
|
let cancelled = false;
|
|
1583
|
-
void import("./runner-
|
|
1583
|
+
void import("./runner-3FMK4AQD.js").then(({ onChildTool }) => {
|
|
1584
1584
|
const off = onChildTool((report) => {
|
|
1585
1585
|
if (report?.status !== "running" || report.jobId) return;
|
|
1586
1586
|
recordChildTool(report.toolCallId ?? "", report.name);
|
|
@@ -16,10 +16,11 @@ import {
|
|
|
16
16
|
requestEmbeddings,
|
|
17
17
|
requestImage,
|
|
18
18
|
requestImageAction
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-PRW3HXHI.js";
|
|
20
|
+
import "./chunk-5DY3YPFB.js";
|
|
21
21
|
import "./chunk-5WR2A2SQ.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-LHR354QM.js";
|
|
23
|
+
import "./chunk-I3SIVY2F.js";
|
|
23
24
|
import "./chunk-SXZWSY3K.js";
|
|
24
25
|
import "./chunk-CRNGAJP2.js";
|
|
25
26
|
import "./chunk-XP52W6IF.js";
|
|
@@ -7,7 +7,7 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
defaultMeasure,
|
|
9
9
|
placePicture
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JZQSBIPM.js";
|
|
11
11
|
import "./chunk-DASSWBD6.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-FEIOZB4Q.js"), import("./media-tool-2E2IPYDH.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;
|