@popcraft/kit 0.62.0 → 0.62.2
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-QEQRU376.js → agent-B23RKWSY.js} +1 -1
- package/dist/chunks/{builtin-IDOTNSXV.js → builtin-PBCJK7G6.js} +4 -4
- package/dist/chunks/{buy-credits-Q5FNHCQ7.js → buy-credits-AKB4QPKV.js} +2 -2
- package/dist/chunks/{check-template-4EXSZYDZ.js → check-template-NSHIPKYX.js} +6 -6
- package/dist/chunks/{chunk-4XEHZFTU.js → chunk-4G2G7M3D.js} +5 -5
- package/dist/chunks/{chunk-A3M6SSCA.js → chunk-742U64OX.js} +1 -1
- package/dist/chunks/{chunk-LUTXAIKC.js → chunk-7L6JD7QC.js} +2 -2
- package/dist/chunks/{chunk-TMH3XAAO.js → chunk-A2CCY6KD.js} +3 -3
- package/dist/chunks/{chunk-HUJ3ZZUJ.js → chunk-AWGZT4GU.js} +4 -4
- package/dist/chunks/{chunk-XTQKTF3L.js → chunk-BF2URT2K.js} +7 -7
- package/dist/chunks/{chunk-ZB3RJBSN.js → chunk-CQJBZM3G.js} +3 -3
- package/dist/chunks/{chunk-F2TWVZ6D.js → chunk-FSKHSHHY.js} +1 -1
- package/dist/chunks/{chunk-S7IOMHRN.js → chunk-GMIHMA72.js} +2 -2
- package/dist/chunks/{chunk-YUDZE2GF.js → chunk-GZBZSCCN.js} +4 -4
- package/dist/chunks/{chunk-A6UX4GU2.js → chunk-HIVCE2VY.js} +1 -1
- package/dist/chunks/{chunk-OD4AETIF.js → chunk-HUSLQDS3.js} +2 -2
- package/dist/chunks/{chunk-4FARQ5NS.js → chunk-IG2COAO3.js} +1 -1
- package/dist/chunks/{chunk-2UIAJ3YS.js → chunk-PQBSSDAX.js} +50 -49
- package/dist/chunks/{chunk-XRAUR5Q2.js → chunk-QEFOQU3X.js} +1 -1
- package/dist/chunks/{chunk-GYYEPFLD.js → chunk-RROXC3HP.js} +1 -1
- package/dist/chunks/{chunk-LNTNSLNK.js → chunk-SKCFRNYM.js} +6 -6
- package/dist/chunks/{chunk-YTWKCQH2.js → chunk-T37X2FEE.js} +5 -5
- package/dist/chunks/{chunk-ACA4JAQW.js → chunk-T6CB5N67.js} +2 -2
- package/dist/chunks/{chunk-VPHSSYOF.js → chunk-UAOEFB5A.js} +2 -2
- package/dist/chunks/{chunk-H7ETGN75.js → chunk-V2JH7ZVM.js} +11 -11
- package/dist/chunks/{chunk-J4BZVVVD.js → chunk-VA4FHU2V.js} +1 -1
- package/dist/chunks/{chunk-QQW77XNX.js → chunk-WX5DBUUT.js} +20 -0
- package/dist/chunks/{chunk-IKEYSHNE.js → chunk-Y5Z5EXBX.js} +9 -9
- package/dist/chunks/{chunk-BOFB6Y2I.js → chunk-YSAUJY52.js} +2 -2
- package/dist/chunks/{client-DZPKOATZ.js → client-EYJ7JGOW.js} +3 -3
- package/dist/chunks/{client-K7NEQULL.js → client-H75ZK55C.js} +1 -1
- package/dist/chunks/{client-YX2UZT3K.js → client-LVKQDIXU.js} +2 -2
- package/dist/chunks/{client-actions-COEDUCSG.js → client-actions-KNBTP6NX.js} +5 -5
- package/dist/chunks/{components-ZIFQ7EWF.js → components-7RFVUT6T.js} +3 -3
- package/dist/chunks/{dangerous-JPKFQZKF.js → dangerous-KPBBXARG.js} +4 -4
- package/dist/chunks/{delete-current-file-QIYPKQ65.js → delete-current-file-4GUSFZVC.js} +5 -5
- package/dist/chunks/{editor-seams-JP7E6N47.js → editor-seams-GVNXBGV4.js} +13 -13
- package/dist/chunks/{editor-store-ZENVROKD.js → editor-store-YXEIT6S2.js} +1 -1
- package/dist/chunks/{export-watermark-6ZVV5NOE.js → export-watermark-OA6RYUCA.js} +5 -5
- package/dist/chunks/{eyedropper-PIHJM54Y.js → eyedropper-UPYYP5KV.js} +1 -1
- package/dist/chunks/{generate-media-2EBWD4XF.js → generate-media-KAGJMU2T.js} +3 -3
- package/dist/chunks/{host-HAZKWYQJ.js → host-DVMQG7WC.js} +6 -6
- package/dist/chunks/{host-XQQCRWV4.js → host-WZIPGD4T.js} +4 -4
- package/dist/chunks/{integrations-MUSVRBT2.js → integrations-HTC6JQSU.js} +1 -1
- package/dist/chunks/{libraries-LKRROMID.js → libraries-76HWYHJW.js} +5 -5
- package/dist/chunks/{live-LHZYOC3N.js → live-4AIJ7SSA.js} +1 -1
- package/dist/chunks/{media-tool-SZSATENU.js → media-tool-RO4TBI7Q.js} +1 -1
- package/dist/chunks/{new-file-EX3HIZTV.js → new-file-ASWSAIX6.js} +3 -3
- package/dist/chunks/{next-commerce-SVYE725Z.js → next-commerce-UJB7W7YG.js} +4 -4
- package/dist/chunks/{plugin-3XRJHYMV.js → plugin-KXBBPOPB.js} +3 -3
- package/dist/chunks/{plugin-import-SQM4O74G.js → plugin-import-EWOWIUOA.js} +17 -17
- package/dist/chunks/{presence-D3IG2F64.js → presence-EZOD2NEX.js} +2 -2
- package/dist/chunks/{project-UGMAIW3W.js → project-BM4MZQDD.js} +5 -5
- package/dist/chunks/{publish-site-VXMQGSIO.js → publish-site-TTZ4JANR.js} +6 -6
- package/dist/chunks/{publish-store-ODJ7ZBKV.js → publish-store-XDSHYX4F.js} +7 -7
- package/dist/chunks/{raster-actions-Q5IKRQVT.js → raster-actions-NKJJA5K5.js} +1 -1
- package/dist/chunks/{runner-FSN663MI.js → runner-AQCGJSNI.js} +19 -19
- package/dist/chunks/{store-BPX2C2L3.js → store-4G6OJPE7.js} +6 -6
- package/dist/chunks/{storefront-HOGZCOMF.js → storefront-XNISLS6B.js} +5 -5
- package/dist/chunks/{storefront-prepare-332O3NDO.js → storefront-prepare-QOQBJDAI.js} +2 -2
- package/dist/chunks/{sync-2UKTTMQE.js → sync-OH6TUMME.js} +5 -5
- package/dist/chunks/{tabs-VFO3V6VQ.js → tabs-HJ6SPEIH.js} +8 -8
- package/dist/chunks/{team-L6NYA3PJ.js → team-63NPKSBG.js} +1 -1
- package/dist/chunks/{team-client-6UIWLXYR.js → team-client-YKQFF4ZO.js} +1 -1
- package/dist/chunks/{tools-NR5HSHUI.js → tools-UG6QBDUU.js} +2 -2
- package/dist/chunks/{tree-ITQ2Q6WM.js → tree-XX6XWSJG.js} +1 -1
- package/dist/chunks/{ui-commands-EGFX3DGI.js → ui-commands-M7JLL5TP.js} +13 -13
- package/dist/chunks/{versions-K7YE5BQJ.js → versions-V5J4YK4S.js} +5 -5
- package/dist/chunks/{web-OWSIMSEO.js → web-HJ26JDF2.js} +4 -4
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/types/lib/document/types.d.ts +5 -0
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
import {
|
|
32
32
|
EXPORT_NODE_CAP,
|
|
33
33
|
cleanName
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-WX5DBUUT.js";
|
|
35
35
|
import {
|
|
36
36
|
DEFAULT_VIDEO_MODEL,
|
|
37
37
|
VIDEO_ASPECTS,
|
|
@@ -949,7 +949,7 @@ init_scene_graph();
|
|
|
949
949
|
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.");
|
|
950
950
|
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 });
|
|
951
951
|
async function placeImportedPicture(ctx, imported, at2, what, extra = {}) {
|
|
952
|
-
const client = await import("./client-
|
|
952
|
+
const client = await import("./client-H75ZK55C.js");
|
|
953
953
|
if (at2.fillLayerId) {
|
|
954
954
|
const doc2 = ctx.doc();
|
|
955
955
|
const target = nodeOrThrow(doc2, at2.fillLayerId);
|
|
@@ -995,7 +995,7 @@ var photoSearch = defineCommand({
|
|
|
995
995
|
}
|
|
996
996
|
},
|
|
997
997
|
run: async (args) => {
|
|
998
|
-
const { searchStockPhotos } = await import("./client-
|
|
998
|
+
const { searchStockPhotos } = await import("./client-H75ZK55C.js");
|
|
999
999
|
const page = await searchStockPhotos(args.query, args.page ?? 1, { licence: args.licence });
|
|
1000
1000
|
return {
|
|
1001
1001
|
summary: `${page.results.length} photo${page.results.length === 1 ? "" : "s"} for \u201C${page.query}\u201D (page ${page.page} of ${page.pageCount || 1})`,
|
|
@@ -1029,7 +1029,7 @@ var photoInsert = defineCommand({
|
|
|
1029
1029
|
run: async (args, ctx) => {
|
|
1030
1030
|
if (!args.id && !args.query) throw new ToolError("Pass an id from search_photos, or a query.");
|
|
1031
1031
|
if (args.id && !isPhotoId(args.id)) throw new ToolError(`"${args.id}" is not a photo id from search_photos.`);
|
|
1032
|
-
const client = await import("./client-
|
|
1032
|
+
const client = await import("./client-H75ZK55C.js");
|
|
1033
1033
|
let photo;
|
|
1034
1034
|
if (args.id) photo = await client.stockPhotoInfo(args.id);
|
|
1035
1035
|
else {
|
|
@@ -1067,10 +1067,10 @@ var mediaList = defineCommand({
|
|
|
1067
1067
|
}
|
|
1068
1068
|
},
|
|
1069
1069
|
run: async (args) => {
|
|
1070
|
-
const { listLibraryMedia } = await import("./client-
|
|
1070
|
+
const { listLibraryMedia } = await import("./client-LVKQDIXU.js");
|
|
1071
1071
|
const q = { ...args };
|
|
1072
1072
|
if (!q.workspace) {
|
|
1073
|
-
const { syncStatus } = await import("./sync-
|
|
1073
|
+
const { syncStatus } = await import("./sync-OH6TUMME.js");
|
|
1074
1074
|
const link2 = syncStatus().link;
|
|
1075
1075
|
if (!link2) throw new ToolError("This document is not saved to the cloud, so it has no team media library. Pass workspace.");
|
|
1076
1076
|
q.workspace = (await listLibraryMedia({ file: link2.key, limit: 1 })).workspaceId;
|
|
@@ -1105,7 +1105,7 @@ var mediaInsert = defineCommand({
|
|
|
1105
1105
|
run: async (args, ctx) => {
|
|
1106
1106
|
const contentType = args.contentType ?? "image/*";
|
|
1107
1107
|
if (!contentType.startsWith("image/")) throw new ToolError("insert_media places pictures; this item is not one.");
|
|
1108
|
-
const { importLibraryPicture } = await import("./client-
|
|
1108
|
+
const { importLibraryPicture } = await import("./client-LVKQDIXU.js");
|
|
1109
1109
|
const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "Media", contentType, size: 0, createdAt: "", fileCount: 1, source: null };
|
|
1110
1110
|
const imported = await importLibraryPicture(item);
|
|
1111
1111
|
return placeImportedPicture(ctx, imported, args, `\u201C${imported.name}\u201D`, { hash: imported.hash });
|
|
@@ -1126,7 +1126,7 @@ var mediaDownload = defineCommand({
|
|
|
1126
1126
|
// The Library's right-click menu: saves the item's file to the computer.
|
|
1127
1127
|
expose: { ui: { label: "Download", palette: false } },
|
|
1128
1128
|
run: async (args) => {
|
|
1129
|
-
const { libraryBlob, libraryFileName } = await import("./client-
|
|
1129
|
+
const { libraryBlob, libraryFileName } = await import("./client-LVKQDIXU.js");
|
|
1130
1130
|
const { downloadBlob } = await import("./download-ZIZRVPD3.js");
|
|
1131
1131
|
const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "media", contentType: args.contentType ?? "", size: 0, createdAt: "", fileCount: 1, source: null };
|
|
1132
1132
|
const blob = await libraryBlob(item);
|
|
@@ -1157,7 +1157,7 @@ var mediaDelete = defineCommand({
|
|
|
1157
1157
|
}
|
|
1158
1158
|
},
|
|
1159
1159
|
run: async (args) => {
|
|
1160
|
-
const { deleteLibraryMedia } = await import("./client-
|
|
1160
|
+
const { deleteLibraryMedia } = await import("./client-LVKQDIXU.js");
|
|
1161
1161
|
const out = await deleteLibraryMedia(args.workspace, args.hash);
|
|
1162
1162
|
return { summary: `Deleted it from the library (it was in ${out.files} file${out.files === 1 ? "" : "s"})`, data: out };
|
|
1163
1163
|
}
|
|
@@ -1171,13 +1171,13 @@ async function signedIn() {
|
|
|
1171
1171
|
}
|
|
1172
1172
|
async function publishedFile() {
|
|
1173
1173
|
await signedIn();
|
|
1174
|
-
const { openFileKey } = await import("./publish-site-
|
|
1174
|
+
const { openFileKey } = await import("./publish-site-TTZ4JANR.js");
|
|
1175
1175
|
const key = openFileKey();
|
|
1176
1176
|
if (!key) throw new CommandError("This file is not saved to the cloud yet, so it has no site. Publish it first.", "failed");
|
|
1177
1177
|
return key;
|
|
1178
1178
|
}
|
|
1179
1179
|
async function formsWithoutDatabase(key) {
|
|
1180
|
-
const [{ useEditorStore }, { usesForms, formsGoNowhere }, { siteBackend }] = await Promise.all([import("./editor-store-
|
|
1180
|
+
const [{ useEditorStore }, { usesForms, formsGoNowhere }, { siteBackend }] = await Promise.all([import("./editor-store-YXEIT6S2.js"), import("./backend-UAZ6RRBI.js"), import("./integrations-HTC6JQSU.js")]);
|
|
1181
1181
|
const doc2 = useEditorStore.getState().document;
|
|
1182
1182
|
if (!usesForms(doc2)) return false;
|
|
1183
1183
|
return formsGoNowhere(doc2, await siteBackend(key).catch(() => void 0));
|
|
@@ -1213,7 +1213,7 @@ var publishSite = defineCommand({
|
|
|
1213
1213
|
const { cleanSlug } = await import("./rules-FUQ2IK4R.js");
|
|
1214
1214
|
const address = p.address === void 0 ? void 0 : cleanSlug(p.address);
|
|
1215
1215
|
if (address === null) throw new CommandError("That cannot be a site address: use 3 to 40 letters, digits and dashes.", "invalid_params");
|
|
1216
|
-
const { publishOpenFile, NoScreens } = await import("./publish-site-
|
|
1216
|
+
const { publishOpenFile, NoScreens } = await import("./publish-site-TTZ4JANR.js");
|
|
1217
1217
|
try {
|
|
1218
1218
|
const done = await publishOpenFile(address);
|
|
1219
1219
|
ctx.notice(`Published version ${done.version}: ${done.url}`);
|
|
@@ -1268,7 +1268,7 @@ var publishListSites = defineCommand({
|
|
|
1268
1268
|
},
|
|
1269
1269
|
run: async (p) => {
|
|
1270
1270
|
await signedIn();
|
|
1271
|
-
const [{ workspaceSites }, { activeTeamWorkspaceId, useHyperyTeam }] = await Promise.all([import("./sites-ZDSEZOQI.js"), import("./team-
|
|
1271
|
+
const [{ workspaceSites }, { activeTeamWorkspaceId, useHyperyTeam }] = await Promise.all([import("./sites-ZDSEZOQI.js"), import("./team-63NPKSBG.js")]);
|
|
1272
1272
|
const workspaceId = p.workspaceId ?? activeTeamWorkspaceId() ?? useHyperyTeam.getState().personalWorkspaceId;
|
|
1273
1273
|
if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
|
|
1274
1274
|
const out = await workspaceSites(workspaceId);
|
|
@@ -1317,12 +1317,12 @@ var publishStatus = defineCommand({
|
|
|
1317
1317
|
},
|
|
1318
1318
|
run: async () => {
|
|
1319
1319
|
await signedIn();
|
|
1320
|
-
const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-
|
|
1320
|
+
const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-TTZ4JANR.js"), import("./sites-ZDSEZOQI.js")]);
|
|
1321
1321
|
const key = openFileKey();
|
|
1322
1322
|
const status = await siteStatus(key);
|
|
1323
1323
|
const site = status.site;
|
|
1324
|
-
const backend = key ? await (await import("./integrations-
|
|
1325
|
-
const destinations = key ? await (await import("./integrations-
|
|
1324
|
+
const backend = key ? await (await import("./integrations-HTC6JQSU.js")).siteBackend(key).catch(() => null) : null;
|
|
1325
|
+
const destinations = key ? await (await import("./integrations-HTC6JQSU.js")).listDestinations(key).catch(() => []) : [];
|
|
1326
1326
|
return {
|
|
1327
1327
|
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}`,
|
|
1328
1328
|
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 })) }
|
|
@@ -1353,7 +1353,7 @@ var publishStore = defineCommand({
|
|
|
1353
1353
|
},
|
|
1354
1354
|
run: async (p, ctx) => {
|
|
1355
1355
|
await signedIn();
|
|
1356
|
-
const { deployOpenStore } = await import("./publish-store-
|
|
1356
|
+
const { deployOpenStore } = await import("./publish-store-XDSHYX4F.js");
|
|
1357
1357
|
const done = await deployOpenStore(ctx.doc(), ctx.pageId(), { destinationId: p.destinationId }).catch((e) => {
|
|
1358
1358
|
throw new CommandError(e instanceof Error ? e.message : String(e), "failed");
|
|
1359
1359
|
});
|
|
@@ -1382,7 +1382,7 @@ var integrationList = defineCommand({
|
|
|
1382
1382
|
}
|
|
1383
1383
|
},
|
|
1384
1384
|
run: async ({ capability }) => {
|
|
1385
|
-
const [{ cloudUser }, { integrationsWorkspaceId, listWorkspaceIntegrations }] = await Promise.all([import("./session-MTRKYB52.js"), import("./integrations-
|
|
1385
|
+
const [{ cloudUser }, { integrationsWorkspaceId, listWorkspaceIntegrations }] = await Promise.all([import("./session-MTRKYB52.js"), import("./integrations-HTC6JQSU.js")]);
|
|
1386
1386
|
if (!cloudUser()) throw new CommandError("You are not signed in: integrations belong to your account's workspace.", "denied");
|
|
1387
1387
|
const workspaceId = integrationsWorkspaceId();
|
|
1388
1388
|
if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
|
|
@@ -1423,7 +1423,7 @@ var integrationOpen = defineCommand({
|
|
|
1423
1423
|
}
|
|
1424
1424
|
});
|
|
1425
1425
|
async function openFile() {
|
|
1426
|
-
const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-MTRKYB52.js"), import("./publish-site-
|
|
1426
|
+
const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-MTRKYB52.js"), import("./publish-site-TTZ4JANR.js")]);
|
|
1427
1427
|
if (!cloudUser()) throw new CommandError("You are not signed in.", "denied");
|
|
1428
1428
|
const key = openFileKey();
|
|
1429
1429
|
if (!key) throw new CommandError("This file is not saved to the cloud yet. Publish it first (publish_site).", "failed");
|
|
@@ -1449,7 +1449,7 @@ var integrationListResources = defineCommand({
|
|
|
1449
1449
|
}
|
|
1450
1450
|
},
|
|
1451
1451
|
run: async ({ connectionId, capability, path }) => {
|
|
1452
|
-
const { listResources } = await import("./integrations-
|
|
1452
|
+
const { listResources } = await import("./integrations-HTC6JQSU.js");
|
|
1453
1453
|
const list = await listResources(connectionId, capability, asPath2(path));
|
|
1454
1454
|
return {
|
|
1455
1455
|
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",
|
|
@@ -1484,7 +1484,7 @@ var integrationAddDestination = defineCommand({
|
|
|
1484
1484
|
},
|
|
1485
1485
|
run: async (p, ctx) => {
|
|
1486
1486
|
const key = await openFile();
|
|
1487
|
-
const { addDestination, createDestination, createResource } = await import("./integrations-
|
|
1487
|
+
const { addDestination, createDestination, createResource } = await import("./integrations-HTC6JQSU.js");
|
|
1488
1488
|
let made;
|
|
1489
1489
|
if (p.create) made = await createDestination(key, p.capability, void 0, p.connectionId);
|
|
1490
1490
|
else {
|
|
@@ -1521,7 +1521,7 @@ var integrationDeploy = defineCommand({
|
|
|
1521
1521
|
},
|
|
1522
1522
|
run: async (p, ctx) => {
|
|
1523
1523
|
const key = await openFile();
|
|
1524
|
-
const { deployDestination, listDestinations } = await import("./integrations-
|
|
1524
|
+
const { deployDestination, listDestinations } = await import("./integrations-HTC6JQSU.js");
|
|
1525
1525
|
const all = await listDestinations(key);
|
|
1526
1526
|
const dest = p.destinationId ? all.find((d) => d.id === p.destinationId) : all.length === 1 ? all[0] : void 0;
|
|
1527
1527
|
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");
|
|
@@ -1555,7 +1555,7 @@ var integrationAttachDatabase = defineCommand({
|
|
|
1555
1555
|
},
|
|
1556
1556
|
run: async (p, ctx) => {
|
|
1557
1557
|
const key = await openFile();
|
|
1558
|
-
const { attachDatabase, createDatabase, createResource, listResources } = await import("./integrations-
|
|
1558
|
+
const { attachDatabase, createDatabase, createResource, listResources } = await import("./integrations-HTC6JQSU.js");
|
|
1559
1559
|
if (p.create) return attached(await createDatabase(key, void 0, p.connectionId), ctx);
|
|
1560
1560
|
if (!p.connectionId || !p.target) throw new CommandError("Say connectionId and target, or create: true.", "invalid_params");
|
|
1561
1561
|
let target = asPath2(p.target);
|
|
@@ -1594,7 +1594,7 @@ var integrationSubmissions = defineCommand({
|
|
|
1594
1594
|
},
|
|
1595
1595
|
run: async ({ form, limit }) => {
|
|
1596
1596
|
const key = await openFile();
|
|
1597
|
-
const { listSubmissions } = await import("./integrations-
|
|
1597
|
+
const { listSubmissions } = await import("./integrations-HTC6JQSU.js");
|
|
1598
1598
|
const rows = await listSubmissions(key, { form, limit: limit ?? 20 });
|
|
1599
1599
|
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 } };
|
|
1600
1600
|
}
|
|
@@ -1619,7 +1619,7 @@ var integrationSetSignIn = defineCommand({
|
|
|
1619
1619
|
},
|
|
1620
1620
|
run: async ({ on }, ctx) => {
|
|
1621
1621
|
const key = await openFile();
|
|
1622
|
-
const { setSignIn } = await import("./integrations-
|
|
1622
|
+
const { setSignIn } = await import("./integrations-HTC6JQSU.js");
|
|
1623
1623
|
const done = await setSignIn(key, on);
|
|
1624
1624
|
ctx.notice(on ? "Visitors can sign in." : "Sign-in is off.");
|
|
1625
1625
|
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 } };
|
|
@@ -1837,7 +1837,7 @@ var fontTeamList = defineCommand({
|
|
|
1837
1837
|
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)." }
|
|
1838
1838
|
},
|
|
1839
1839
|
run: async (args) => {
|
|
1840
|
-
const { refreshTeamFonts } = await import("./team-client-
|
|
1840
|
+
const { refreshTeamFonts } = await import("./team-client-YKQFF4ZO.js");
|
|
1841
1841
|
const fonts = await refreshTeamFonts(args.workspace);
|
|
1842
1842
|
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 })) } };
|
|
1843
1843
|
}
|
|
@@ -1864,7 +1864,7 @@ var fontTeamAdd = defineCommand({
|
|
|
1864
1864
|
run: async (args, ctx) => {
|
|
1865
1865
|
const { bytes, fileName: fileName2 } = await fontBytes(args, ctx);
|
|
1866
1866
|
const { face, family, weight, style } = await resolveFace(bytes, args);
|
|
1867
|
-
const { uploadTeamFont } = await import("./team-client-
|
|
1867
|
+
const { uploadTeamFont } = await import("./team-client-YKQFF4ZO.js");
|
|
1868
1868
|
const font = await uploadTeamFont(bytes, { family, weight, style, face: face.index, fileName: fileName2 }, args.workspace);
|
|
1869
1869
|
return { summary: `Added ${family} ${weight}${style === "italic" ? " italic" : ""} to the team`, data: { font } };
|
|
1870
1870
|
}
|
|
@@ -1886,7 +1886,7 @@ var fontTeamRemove = defineCommand({
|
|
|
1886
1886
|
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." }
|
|
1887
1887
|
},
|
|
1888
1888
|
run: async (args) => {
|
|
1889
|
-
const { removeTeamFont } = await import("./team-client-
|
|
1889
|
+
const { removeTeamFont } = await import("./team-client-YKQFF4ZO.js");
|
|
1890
1890
|
const out = await removeTeamFont(args.id, args.workspace);
|
|
1891
1891
|
return { summary: `Removed the team font${out.freed ? " and freed its storage" : ""}`, data: out };
|
|
1892
1892
|
}
|
|
@@ -1897,7 +1897,7 @@ var fontTeamCommands = [fontTeamList, fontTeamAdd];
|
|
|
1897
1897
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
1898
1898
|
async function cloudFile() {
|
|
1899
1899
|
const [{ syncStatus }, { cloudUser }] = await Promise.all([
|
|
1900
|
-
import("./sync-
|
|
1900
|
+
import("./sync-OH6TUMME.js"),
|
|
1901
1901
|
import("./session-MTRKYB52.js")
|
|
1902
1902
|
]);
|
|
1903
1903
|
const link2 = syncStatus().link;
|
|
@@ -1959,7 +1959,7 @@ var fileTrash = defineCommand({
|
|
|
1959
1959
|
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." }
|
|
1960
1960
|
},
|
|
1961
1961
|
run: async () => {
|
|
1962
|
-
const { deleteCurrentFile, leaveDeletedFile } = await import("./delete-current-file-
|
|
1962
|
+
const { deleteCurrentFile, leaveDeletedFile } = await import("./delete-current-file-4GUSFZVC.js");
|
|
1963
1963
|
const { name: name2, kind } = await deleteCurrentFile();
|
|
1964
1964
|
leaveDeletedFile();
|
|
1965
1965
|
return { summary: kind === "cloud" ? `Moved \u201C${name2}\u201D to the Trash` : `Deleted \u201C${name2}\u201D` };
|
|
@@ -2072,11 +2072,11 @@ var fileDuplicate = defineCommand({
|
|
|
2072
2072
|
},
|
|
2073
2073
|
run: async (_p, ctx) => {
|
|
2074
2074
|
const [{ syncStatus }, { cloudApi }, { isDesktopTabs }, { createFileInTab }, { openNewCloudFile }, { v4: uuid }] = await Promise.all([
|
|
2075
|
-
import("./sync-
|
|
2075
|
+
import("./sync-OH6TUMME.js"),
|
|
2076
2076
|
import("./api-CUCF3XEV.js"),
|
|
2077
2077
|
import("./tab-mode-2SY4XTON.js"),
|
|
2078
|
-
import("./tabs-
|
|
2079
|
-
import("./sync-
|
|
2078
|
+
import("./tabs-HJ6SPEIH.js"),
|
|
2079
|
+
import("./sync-OH6TUMME.js"),
|
|
2080
2080
|
import("./dist-node-QUIPBCOH.js")
|
|
2081
2081
|
]);
|
|
2082
2082
|
const doc2 = ctx.doc();
|
|
@@ -4953,7 +4953,7 @@ var viewCopyLink = defineCommand({
|
|
|
4953
4953
|
},
|
|
4954
4954
|
run: async (args, ctx) => {
|
|
4955
4955
|
const [{ syncStatus }, { fileUrl }, { withDeepLink }] = await Promise.all([
|
|
4956
|
-
import("./sync-
|
|
4956
|
+
import("./sync-OH6TUMME.js"),
|
|
4957
4957
|
import("./api-CUCF3XEV.js"),
|
|
4958
4958
|
import("./deep-link-YLBB7P2T.js")
|
|
4959
4959
|
]);
|
|
@@ -5278,7 +5278,7 @@ var pageGo = defineCommand({
|
|
|
5278
5278
|
] }
|
|
5279
5279
|
},
|
|
5280
5280
|
run: async ({ to }) => {
|
|
5281
|
-
const { useEditorStore } = await import("./editor-store-
|
|
5281
|
+
const { useEditorStore } = await import("./editor-store-YXEIT6S2.js");
|
|
5282
5282
|
useEditorStore.getState().goToPrintPage(to);
|
|
5283
5283
|
return { summary: typeof to === "number" ? `Page ${to + 1}` : `${to} page` };
|
|
5284
5284
|
}
|
|
@@ -5312,7 +5312,7 @@ var pageSetup = defineCommand({
|
|
|
5312
5312
|
}
|
|
5313
5313
|
},
|
|
5314
5314
|
run: async (args) => {
|
|
5315
|
-
const { useEditorStore } = await import("./editor-store-
|
|
5315
|
+
const { useEditorStore } = await import("./editor-store-YXEIT6S2.js");
|
|
5316
5316
|
useEditorStore.getState().applyPageSetup(args);
|
|
5317
5317
|
return { summary: `Page setup updated${args.kind ? ` (${args.kind.toLowerCase()})` : ""}` };
|
|
5318
5318
|
}
|
|
@@ -5750,7 +5750,7 @@ async function docAtTime(doc2, ids, time2) {
|
|
|
5750
5750
|
let frameId;
|
|
5751
5751
|
if (time2 === void 0) {
|
|
5752
5752
|
try {
|
|
5753
|
-
const { useEditorStore } = await import("./editor-store-
|
|
5753
|
+
const { useEditorStore } = await import("./editor-store-YXEIT6S2.js");
|
|
5754
5754
|
const st = useEditorStore.getState();
|
|
5755
5755
|
const target = st.transport?.target;
|
|
5756
5756
|
if (st.mode !== "ANIMATE" || target?.kind !== "frame") return doc2;
|
|
@@ -6144,7 +6144,7 @@ async function runAnimationExport(format, args, ctx) {
|
|
|
6144
6144
|
const filename = exportFileName(args.filename || targetName(doc2, target), format);
|
|
6145
6145
|
const [{ exportAnimation }, { memoryDestination }] = await Promise.all([import("./video-3JT7XND6.js"), import("./destination-RW4GCVII.js")]);
|
|
6146
6146
|
if (format === "lottie" || format === "dotlottie") return runLottieExport(renderer, doc2, spec, filename, ctx, memoryDestination, args.stateMachine);
|
|
6147
|
-
const planWatermark = format !== "png" && await (await import("./export-watermark-
|
|
6147
|
+
const planWatermark = format !== "png" && await (await import("./export-watermark-OA6RYUCA.js")).exportWatermark();
|
|
6148
6148
|
if (format !== "png") spec = { ...spec, watermark: planWatermark || args.watermark !== false };
|
|
6149
6149
|
const dest = ctx.destination ? await ctx.destination(filename, FORMAT_MIME[format]) : memoryDestination(filename, FORMAT_MIME[format]);
|
|
6150
6150
|
let stats;
|
|
@@ -6230,8 +6230,8 @@ var exportLottie = animationCommand((args) => args.container === "lottie" ? "dot
|
|
|
6230
6230
|
});
|
|
6231
6231
|
async function exportSite(doc2, pageId2, packaging, styling = "css", siteUrl) {
|
|
6232
6232
|
const [{ completeSite, nextFilesOf, shareImageFiles, staticFilesOf, NoSiteRuntime, bytesOf }, { fileBase }, { zipFiles }, { downloadBlob }] = await Promise.all([
|
|
6233
|
-
import("./project-
|
|
6234
|
-
import("./web-
|
|
6233
|
+
import("./project-BM4MZQDD.js"),
|
|
6234
|
+
import("./web-HJ26JDF2.js"),
|
|
6235
6235
|
import("./zip-export-M2AL2IDF.js"),
|
|
6236
6236
|
import("./download-ZIZRVPD3.js")
|
|
6237
6237
|
]);
|
|
@@ -6273,7 +6273,7 @@ var exportWeb = reportsMissingFonts(defineCommand({
|
|
|
6273
6273
|
const id = args.id ?? ctx.selection()[0] ?? doc2.nodes[ctx.pageId()]?.childIds?.[0];
|
|
6274
6274
|
const node = id ? doc2.nodes[id] : void 0;
|
|
6275
6275
|
if (!node) throw new ToolError("Select a frame or layer to export.");
|
|
6276
|
-
const { webTreeFor, extensionFor, externalAssets, fileBase, resolveWebAssets, serializeFor, flatten } = await import("./web-
|
|
6276
|
+
const { webTreeFor, extensionFor, externalAssets, fileBase, resolveWebAssets, serializeFor, flatten } = await import("./web-HJ26JDF2.js");
|
|
6277
6277
|
const { rendererAssetResolvers } = await import("./resolvers-NBT2NTM3.js");
|
|
6278
6278
|
const { downloadBlob } = await import("./download-ZIZRVPD3.js");
|
|
6279
6279
|
const tree = webTreeFor(doc2, node.id, lang, { nodeCap: EXPORT_NODE_CAP, fullImageUrls: true });
|
|
@@ -6322,17 +6322,17 @@ var exportStorefront = defineCommand({
|
|
|
6322
6322
|
run: async (args, ctx) => {
|
|
6323
6323
|
const doc2 = ctx.doc();
|
|
6324
6324
|
const [{ storefrontInputs }, { STOREFRONT_TARGETS }, { bytesOf }, { fileBase, flatten }, { zipFiles }, { downloadBlob }] = await Promise.all([
|
|
6325
|
-
import("./storefront-prepare-
|
|
6326
|
-
import("./storefront-
|
|
6327
|
-
import("./project-
|
|
6328
|
-
import("./web-
|
|
6325
|
+
import("./storefront-prepare-QOQBJDAI.js"),
|
|
6326
|
+
import("./storefront-XNISLS6B.js"),
|
|
6327
|
+
import("./project-BM4MZQDD.js"),
|
|
6328
|
+
import("./web-HJ26JDF2.js"),
|
|
6329
6329
|
import("./zip-export-M2AL2IDF.js"),
|
|
6330
6330
|
import("./download-ZIZRVPD3.js")
|
|
6331
6331
|
]);
|
|
6332
6332
|
const target = STOREFRONT_TARGETS[args.target];
|
|
6333
6333
|
const { screens, media } = await storefrontInputs(doc2, ctx.pageId(), EXPORT_NODE_CAP);
|
|
6334
6334
|
if (!screens.length) throw new ToolError("This page has no screens: a top-level frame is a page of the store.");
|
|
6335
|
-
const files = args.target === "next-commerce" && args.dir ? (await import("./components-
|
|
6335
|
+
const files = args.target === "next-commerce" && args.dir ? (await import("./components-7RFVUT6T.js")).componentFiles(doc2, screens, { styling: args.styling, dir: args.dir, media }) : target.files(doc2, screens, { media, styling: args.styling });
|
|
6336
6336
|
const base = `${fileBase(doc2.name)}-${args.target}`;
|
|
6337
6337
|
downloadBlob(zipFiles(files.map((f) => ({ name: f.path, bytes: bytesOf(f) }))), `${base}.zip`);
|
|
6338
6338
|
const bound = screens.filter((s) => s.about || flatten(s.tree.root).some((n) => n.repeat && doc2.collections?.[n.repeat.collectionId]?.schema)).length;
|
|
@@ -6719,7 +6719,7 @@ var visionRegenerateImage = defineCommand({
|
|
|
6719
6719
|
const id = args.id ?? ctx.selection()[0];
|
|
6720
6720
|
if (!id) throw new ToolError("Select a generated image to regenerate.");
|
|
6721
6721
|
nodeOrThrow(ctx.doc(), id);
|
|
6722
|
-
const { regenerateImage } = await import("./client-actions-
|
|
6722
|
+
const { regenerateImage } = await import("./client-actions-KNBTP6NX.js");
|
|
6723
6723
|
regenerateImage(id, args.count);
|
|
6724
6724
|
return { summary: args.count > 1 ? `Regenerating ${args.count} variants` : "Regenerating the image", data: { id, count: args.count } };
|
|
6725
6725
|
}
|
|
@@ -11102,6 +11102,7 @@ function buildRhythmGame(doc2, frameId, beats, o) {
|
|
|
11102
11102
|
const frame = doc2.nodes[frameId];
|
|
11103
11103
|
if (!frame || frame.type !== "FRAME") throw new Error("A rhythm game is made on a frame.");
|
|
11104
11104
|
let d = removeRhythmGame(doc2, frameId);
|
|
11105
|
+
d = { ...d, nodes: { ...d.nodes, [frameId]: { ...d.nodes[frameId], fitWindow: true } } };
|
|
11105
11106
|
const W = frame.width, H = frame.height;
|
|
11106
11107
|
const lanes = Math.max(2, Math.min(6, Math.round(o.lanes)));
|
|
11107
11108
|
const lw = Math.min(W * 0.86 / lanes, 230), x0 = (W - lw * lanes) / 2, hitY = Math.round(H * 0.8);
|
|
@@ -11936,7 +11937,7 @@ var scriptRun = defineCommand({
|
|
|
11936
11937
|
// A script is not the turn the user is watching: confirm-tier tools are refused inside it (dispatch, `nested`).
|
|
11937
11938
|
actor: { ...ctx.actor, nested: true, label: "Script" },
|
|
11938
11939
|
// A look_at inside the script sees the document as the script has left it so far, not as it was before.
|
|
11939
|
-
use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-
|
|
11940
|
+
use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-B23RKWSY.js")).renderDocument(staged, ids, options)) : ctx.use(name2))
|
|
11940
11941
|
};
|
|
11941
11942
|
let calls = 0;
|
|
11942
11943
|
const images = [];
|
|
@@ -12756,7 +12757,7 @@ var docImportFile = defineCommand({
|
|
|
12756
12757
|
const file = new File([body], args.name);
|
|
12757
12758
|
if (file.size > MAX_BYTES) throw new ToolError(`"${args.name}" is larger than ${MAX_BYTES / 1024 / 1024} MB.`);
|
|
12758
12759
|
const [{ buildImportedDocument }, { mergeImportedDocument }] = await Promise.all([
|
|
12759
|
-
import("./plugin-import-
|
|
12760
|
+
import("./plugin-import-EWOWIUOA.js"),
|
|
12760
12761
|
import("./import-merge-NVEYNGCN.js")
|
|
12761
12762
|
]);
|
|
12762
12763
|
const built = await buildImportedDocument(file);
|
|
@@ -150,7 +150,7 @@ function startHyperyTeams() {
|
|
|
150
150
|
maybePromptForTeam();
|
|
151
151
|
void followFileTeam(linkedKey);
|
|
152
152
|
});
|
|
153
|
-
void import("./sync-
|
|
153
|
+
void import("./sync-OH6TUMME.js").then(({ onSyncStatus, syncStatus }) => {
|
|
154
154
|
linkedKey = syncStatus().link?.key ?? null;
|
|
155
155
|
void followFileTeam(linkedKey);
|
|
156
156
|
onSyncStatus((_s, link) => {
|
|
@@ -6,7 +6,7 @@ const __filename = __popcraftPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __popcraftDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
registerAppCommands
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-Y5Z5EXBX.js";
|
|
10
10
|
import {
|
|
11
11
|
storeOpsSeam
|
|
12
12
|
} from "./chunk-JLSJE4MZ.js";
|
|
@@ -23,17 +23,17 @@ import {
|
|
|
23
23
|
sameResolution,
|
|
24
24
|
surfaceSize,
|
|
25
25
|
windowCssSize
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-PQBSSDAX.js";
|
|
27
27
|
import {
|
|
28
28
|
notice
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-7L6JD7QC.js";
|
|
30
30
|
import {
|
|
31
31
|
agentContext
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-A2CCY6KD.js";
|
|
33
33
|
import {
|
|
34
34
|
collabSession,
|
|
35
35
|
syncStatus
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-GZBZSCCN.js";
|
|
37
37
|
import {
|
|
38
38
|
setAudioOutputDocument,
|
|
39
39
|
setMediaDocument
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
import {
|
|
48
48
|
persist,
|
|
49
49
|
useEditorStore
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-T37X2FEE.js";
|
|
51
51
|
import {
|
|
52
52
|
plansEnabled
|
|
53
53
|
} from "./chunk-LWTKJQTQ.js";
|
|
@@ -4859,7 +4859,7 @@ function createPopcornSlice(set2, get2) {
|
|
|
4859
4859
|
privateMode: false,
|
|
4860
4860
|
setPrivateMode: (on) => {
|
|
4861
4861
|
set2({ privateMode: on });
|
|
4862
|
-
void import("./presence-
|
|
4862
|
+
void import("./presence-EZOD2NEX.js").then((m) => m.setPresencePrivate(on)).catch(() => {
|
|
4863
4863
|
});
|
|
4864
4864
|
},
|
|
4865
4865
|
/** Reveal every private item THIS user created (they sync to collaborators). Others' stay theirs. */
|
|
@@ -6930,7 +6930,7 @@ var useEditorStore = create()(
|
|
|
6930
6930
|
// A copy is a new file, so it is cloud-backed like any other (see lib/client/cloud/new-file.ts).
|
|
6931
6931
|
// Returns '' when it was refused (offline, signed out, plan full) or failed; nothing is left behind.
|
|
6932
6932
|
duplicateDocument: async (id) => {
|
|
6933
|
-
const { duplicateDocumentToCloud } = await import("./sync-
|
|
6933
|
+
const { duplicateDocumentToCloud } = await import("./sync-OH6TUMME.js");
|
|
6934
6934
|
return duplicateDocumentToCloud(id);
|
|
6935
6935
|
},
|
|
6936
6936
|
deleteDocument: async (id) => {
|
|
@@ -10440,9 +10440,9 @@ if (typeof window !== "undefined") {
|
|
|
10440
10440
|
if (typeof window !== "undefined" && navigator.webdriver) {
|
|
10441
10441
|
window.__vpDesign = async (script, o = {}) => {
|
|
10442
10442
|
const [{ registerBuiltinTools, runTool }, { editorToolContext }, { createDesignPreview }] = await Promise.all([
|
|
10443
|
-
import("./tools-
|
|
10444
|
-
import("./editor-seams-
|
|
10445
|
-
import("./live-
|
|
10443
|
+
import("./tools-UG6QBDUU.js").then(async (m) => ({ ...m, registerBuiltinTools: (await import("./builtin-PBCJK7G6.js")).registerBuiltinTools })),
|
|
10444
|
+
import("./editor-seams-GVNXBGV4.js"),
|
|
10445
|
+
import("./live-4AIJ7SSA.js")
|
|
10446
10446
|
]);
|
|
10447
10447
|
registerBuiltinTools();
|
|
10448
10448
|
const args = JSON.stringify({ ...o.name ? { name: o.name } : {}, ...o.size ? { size: o.size } : {}, ...o.frame ? { frame: o.frame } : {}, script });
|
|
@@ -7,7 +7,7 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
classNameFor,
|
|
9
9
|
interactiveSpec
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QEFOQU3X.js";
|
|
11
11
|
import {
|
|
12
12
|
fontFaceRules,
|
|
13
13
|
fontsHref
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
styleMapToCSSText,
|
|
29
29
|
styleMapToInline,
|
|
30
30
|
tokensCSS
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-WX5DBUUT.js";
|
|
32
32
|
import {
|
|
33
33
|
init_define_POPCRAFT_COMPONENT_IDS
|
|
34
34
|
} from "./chunk-OOA56QGV.js";
|
|
@@ -91,9 +91,9 @@ async function placeStockPhoto(photo, opts = {}) {
|
|
|
91
91
|
}
|
|
92
92
|
async function placePicture(imported, opts = {}) {
|
|
93
93
|
const [{ useEditorStore }, { photoFrameOf }, { placeImage }] = await Promise.all([
|
|
94
|
-
import("./editor-store-
|
|
94
|
+
import("./editor-store-YXEIT6S2.js"),
|
|
95
95
|
import("../lib/document/photo-frames.js"),
|
|
96
|
-
import("./media-tool-
|
|
96
|
+
import("./media-tool-RO4TBI7Q.js")
|
|
97
97
|
]);
|
|
98
98
|
const st = useEditorStore.getState();
|
|
99
99
|
const frame = photoFrameOf(st.document.nodes, opts.targetId !== void 0 ? opts.targetId : st.selection[0] ?? null);
|
|
@@ -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-BF2URT2K.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-PQBSSDAX.js";
|
|
17
17
|
import {
|
|
18
18
|
external_exports
|
|
19
19
|
} from "./chunk-X5PMOGY5.js";
|
|
@@ -53,7 +53,7 @@ var collabSetSpotlight = defineCommand({
|
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
run: async ({ on }, ctx) => {
|
|
56
|
-
const { setSpotlight } = await import("./presence-
|
|
56
|
+
const { setSpotlight } = await import("./presence-EZOD2NEX.js");
|
|
57
57
|
setSpotlight(on);
|
|
58
58
|
ctx.notice(on ? "Spotlight on \u2014 everyone is following this view." : "Spotlight off.");
|
|
59
59
|
return { summary: on ? "Spotlight on" : "Spotlight off", data: { spotlight: on } };
|
|
@@ -80,7 +80,7 @@ var collabRevealPrivate = defineCommand({
|
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
run: async (_p, ctx) => {
|
|
83
|
-
const { useEditorStore } = await import("./editor-store-
|
|
83
|
+
const { useEditorStore } = await import("./editor-store-YXEIT6S2.js");
|
|
84
84
|
const before = Object.values(useEditorStore.getState().document.nodes).filter((n) => n.privateTo).length;
|
|
85
85
|
useEditorStore.getState().revealPrivate();
|
|
86
86
|
ctx.notice(before ? `Revealed ${before} private item${before === 1 ? "" : "s"}.` : "Nothing was private.");
|
|
@@ -144,7 +144,7 @@ var documentDelete = defineCommand({
|
|
|
144
144
|
}
|
|
145
145
|
},
|
|
146
146
|
run: async ({ id }, ctx) => {
|
|
147
|
-
const { useEditorStore } = await import("./editor-store-
|
|
147
|
+
const { useEditorStore } = await import("./editor-store-YXEIT6S2.js");
|
|
148
148
|
const wasOpen = useEditorStore.getState().document.id === id;
|
|
149
149
|
await useEditorStore.getState().deleteDocument(id);
|
|
150
150
|
ctx.notice("Deleted the document.");
|
|
@@ -188,7 +188,7 @@ var libraryPublish = defineCommand({
|
|
|
188
188
|
}
|
|
189
189
|
},
|
|
190
190
|
run: async (p, ctx) => {
|
|
191
|
-
const { publishLibrary } = await import("./libraries-
|
|
191
|
+
const { publishLibrary } = await import("./libraries-76HWYHJW.js");
|
|
192
192
|
const doc = ctx.doc();
|
|
193
193
|
const pick = {
|
|
194
194
|
componentIds: p.componentIds ?? Object.keys(doc.components ?? {}),
|
|
@@ -220,7 +220,7 @@ var libraryUnpublish = defineCommand({
|
|
|
220
220
|
},
|
|
221
221
|
run: async ({ libraryId }, ctx) => {
|
|
222
222
|
if (!libraryId.trim()) throw new CommandError("Which library? Pass its `libraryId`.", "invalid_params");
|
|
223
|
-
const { unpublishLibrary } = await import("./libraries-
|
|
223
|
+
const { unpublishLibrary } = await import("./libraries-76HWYHJW.js");
|
|
224
224
|
await unpublishLibrary(libraryId);
|
|
225
225
|
ctx.notice(`Unpublished library ${libraryId}.`);
|
|
226
226
|
return { summary: `Unpublished library ${libraryId}`, data: { libraryId, unpublished: true } };
|
|
@@ -232,8 +232,8 @@ var libraryCommands = [libraryPublish, libraryUnpublish];
|
|
|
232
232
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
233
233
|
async function findVersion(id) {
|
|
234
234
|
const [{ useEditorStore }, { versionLabel }] = await Promise.all([
|
|
235
|
-
import("./editor-store-
|
|
236
|
-
import("./versions-
|
|
235
|
+
import("./editor-store-YXEIT6S2.js"),
|
|
236
|
+
import("./versions-V5J4YK4S.js")
|
|
237
237
|
]);
|
|
238
238
|
const meta = useEditorStore.getState().versions.find((v) => v.id === id);
|
|
239
239
|
if (!meta) {
|
|
@@ -266,7 +266,7 @@ var versionRestore = defineCommand({
|
|
|
266
266
|
},
|
|
267
267
|
run: async ({ id }) => {
|
|
268
268
|
const found = await findVersion(id);
|
|
269
|
-
const { restoreVersion } = await import("./versions-
|
|
269
|
+
const { restoreVersion } = await import("./versions-V5J4YK4S.js");
|
|
270
270
|
await restoreVersion(found.meta);
|
|
271
271
|
return { summary: `Restored \u201C${found.label}\u201D`, data: { id, label: found.label, restored: true } };
|
|
272
272
|
}
|
|
@@ -291,7 +291,7 @@ var versionDelete = defineCommand({
|
|
|
291
291
|
},
|
|
292
292
|
run: async ({ id }, ctx) => {
|
|
293
293
|
const found = await findVersion(id);
|
|
294
|
-
const { deleteVersion } = await import("./versions-
|
|
294
|
+
const { deleteVersion } = await import("./versions-V5J4YK4S.js");
|
|
295
295
|
await deleteVersion(found.meta);
|
|
296
296
|
ctx.notice(`Deleted the version \u201C${found.label}\u201D.`);
|
|
297
297
|
return { summary: `Deleted the version \u201C${found.label}\u201D`, data: { id, label: found.label, deleted: true } };
|
|
@@ -756,9 +756,29 @@ function placedChild(node, parent, frame = parent) {
|
|
|
756
756
|
const y = constrained(c.vertical, node.y, node.height, frame.height, "top", "bottom", "height");
|
|
757
757
|
return { style: { ...limits(node), ...x.style, ...y.style }, place: { position: "absolute", ...x.place, ...y.place } };
|
|
758
758
|
}
|
|
759
|
+
function fitWindowStyle(frame) {
|
|
760
|
+
const w = px(frame.width), h = px(frame.height);
|
|
761
|
+
const solid = [...frame.fills ?? []].reverse().find((f) => f.type === "SOLID" && f.visible !== false && f.color);
|
|
762
|
+
const bars = solid?.color ? `rgb(${[solid.color.r, solid.color.g, solid.color.b].map((c) => Math.round(c * 255)).join(" ")})` : "#000";
|
|
763
|
+
return {
|
|
764
|
+
position: "fixed",
|
|
765
|
+
width: w,
|
|
766
|
+
height: h,
|
|
767
|
+
"min-height": null,
|
|
768
|
+
"max-width": null,
|
|
769
|
+
// Centered by the transform alone: the site's script places a page's own frame and drops a left or top on it.
|
|
770
|
+
left: "0",
|
|
771
|
+
top: "0",
|
|
772
|
+
"transform-origin": "center",
|
|
773
|
+
transform: `translate(calc(50vw - 50%), calc(50dvh - 50%)) scale(min(tan(atan2(100vw, ${w})), tan(atan2(100dvh, ${h}))))`,
|
|
774
|
+
// The bars beside a screen that is narrower than the window take its color rather than the browser's white.
|
|
775
|
+
"box-shadow": `0 0 0 400vmax ${bars}`
|
|
776
|
+
};
|
|
777
|
+
}
|
|
759
778
|
function siteLayout(node, parent, layout) {
|
|
760
779
|
const own = node.type === "FRAME" || node.type === "COMPONENT" || node.type === "INSTANCE" ? node : null;
|
|
761
780
|
if (!parent) {
|
|
781
|
+
if (own?.fitWindow) return { style: fitWindowStyle(own), place: { position: "fixed" } };
|
|
762
782
|
const grows = !own || laysOut(own) || own.overflowScrolling === "NONE" || !own.overflowScrolling;
|
|
763
783
|
return { style: { ...limits(node), width: "100%", ...grows ? { height: null, "min-height": `max(${px(node.height)}, 100dvh)` } : {} }, place: { position: "relative" } };
|
|
764
784
|
}
|