@popcraft/kit 1.7.0 → 1.8.0
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-7B7BVF4P.js → agent-3VMEBCB4.js} +1 -1
- package/dist/chunks/{builtin-S4EK4RTI.js → builtin-VFXWVSBY.js} +3 -3
- package/dist/chunks/{buy-credits-4QONQUOT.js → buy-credits-7NG7NUTF.js} +2 -2
- package/dist/chunks/{check-template-LZ5ZAXVA.js → check-template-5X4TXV2I.js} +2 -2
- package/dist/chunks/{chunk-WC3MQ2UY.js → chunk-35H4YW5F.js} +6 -6
- package/dist/chunks/{chunk-EWDA2IXD.js → chunk-3RXYVVPS.js} +1 -1
- package/dist/chunks/{chunk-5RQTBJ5T.js → chunk-4ASS3JJJ.js} +1 -1
- package/dist/chunks/{chunk-LVMEXJ3M.js → chunk-4FHDWGCD.js} +6 -6
- package/dist/chunks/{chunk-W5WZQZPR.js → chunk-4VW6TW52.js} +9 -9
- package/dist/chunks/{chunk-D5YPUWOU.js → chunk-D3EQULKF.js} +1 -1
- package/dist/chunks/{chunk-GUKZMXGA.js → chunk-FH65BZ6F.js} +11 -11
- package/dist/chunks/{chunk-ZP3UFJYP.js → chunk-H3QJ4FGV.js} +51 -47
- package/dist/chunks/{chunk-GNYRFRTH.js → chunk-K3WWCTDF.js} +102 -4
- package/dist/chunks/{chunk-PPCJKLCN.js → chunk-KKWKWUNN.js} +3 -3
- package/dist/chunks/{chunk-DFKYBBNE.js → chunk-KOX6DC7O.js} +4 -4
- package/dist/chunks/{chunk-7AMTUK2N.js → chunk-LGCGRZNK.js} +1 -1
- package/dist/chunks/{chunk-DR5IPUFN.js → chunk-NKFAJTBR.js} +2 -2
- package/dist/chunks/{chunk-RASCUL5W.js → chunk-P36U2QHT.js} +5 -5
- package/dist/chunks/{chunk-GKXXJR34.js → chunk-RTL5OPT4.js} +1 -1
- package/dist/chunks/{chunk-NAI3V2HC.js → chunk-S2KHVXP2.js} +2 -2
- package/dist/chunks/{chunk-JASUIIDF.js → chunk-SUK4OYMS.js} +1 -1
- package/dist/chunks/{chunk-C6WFMA2N.js → chunk-UY4AQKUC.js} +1 -1
- package/dist/chunks/{chunk-VGEBOAJF.js → chunk-VDPCKGMN.js} +5 -5
- package/dist/chunks/{chunk-S3LBFXXR.js → chunk-X56SU5PL.js} +2 -2
- package/dist/chunks/{chunk-3K6H3ZGD.js → chunk-Z2SAV6RK.js} +2 -2
- package/dist/chunks/{client-A5XSZMJA.js → client-3AR5LMWO.js} +3 -3
- package/dist/chunks/{client-62BEAOU4.js → client-4DPA75PJ.js} +2 -2
- package/dist/chunks/{client-HB65QOVX.js → client-NFKHKPDL.js} +1 -1
- package/dist/chunks/{client-actions-ZM254JLP.js → client-actions-6YTCHAFN.js} +5 -5
- package/dist/chunks/{dangerous-UYEFSEMG.js → dangerous-C5OJSIA4.js} +3 -3
- package/dist/chunks/{delete-current-file-J4YIKYB2.js → delete-current-file-CGB4JSWH.js} +5 -5
- package/dist/chunks/{editor-seams-LEL5XEN5.js → editor-seams-CPQXKVQD.js} +12 -12
- package/dist/chunks/{editor-store-7YZ2YWQI.js → editor-store-LZMCUPSM.js} +1 -1
- package/dist/chunks/{export-watermark-O2NGXF3V.js → export-watermark-4FVFQ7EQ.js} +5 -5
- package/dist/chunks/{eyedropper-RDMFOEF6.js → eyedropper-NEB7U3XN.js} +1 -1
- package/dist/chunks/{generate-media-VRT6SMAF.js → generate-media-JNSFV7X2.js} +3 -3
- package/dist/chunks/{host-SVNFP4CL.js → host-Q2B5JDF6.js} +6 -6
- package/dist/chunks/{integrations-VMSRD45R.js → integrations-Q5LMI7GJ.js} +1 -1
- package/dist/chunks/{libraries-P5KKEIC2.js → libraries-RN3FPNA4.js} +5 -5
- package/dist/chunks/{live-36ODVYJF.js → live-U6T4WDTA.js} +1 -1
- package/dist/chunks/{media-tool-5EKPBDIR.js → media-tool-KCK4GFQY.js} +1 -1
- package/dist/chunks/{new-file-MBE6C2CZ.js → new-file-EEIKLZKU.js} +3 -3
- package/dist/chunks/{next-commerce-6MCTWFQH.js → next-commerce-76YNE7N4.js} +2 -2
- package/dist/chunks/{plugin-K4UMCKSW.js → plugin-5B2JXIAG.js} +2 -2
- package/dist/chunks/{plugin-import-U5IAQWJQ.js → plugin-import-SSUSTL7V.js} +16 -16
- package/dist/chunks/{presence-FKAHJ2DE.js → presence-4OSUD5JN.js} +2 -2
- package/dist/chunks/{present-physics-RZ5GBBAN.js → present-physics-KYZBNAVG.js} +1 -1
- package/dist/chunks/{project-6AFM2OAV.js → project-TLJXPUXS.js} +1 -1
- package/dist/chunks/{publish-site-H25CNPM3.js → publish-site-ZM2RYCGU.js} +6 -6
- package/dist/chunks/{publish-store-NXIN4U5K.js → publish-store-AHEXCLYK.js} +5 -5
- package/dist/chunks/{raster-actions-FO5Q3OUX.js → raster-actions-U7F5FZJS.js} +1 -1
- package/dist/chunks/{runner-XQUGGURY.js → runner-3X5C2MOH.js} +18 -18
- package/dist/chunks/{store-SP7EBWWK.js → store-EQALPZRM.js} +6 -6
- package/dist/chunks/{storefront-XU6IULDV.js → storefront-DASOKGXT.js} +2 -2
- package/dist/chunks/{sync-QWPF7VL6.js → sync-6A34IQQE.js} +5 -5
- package/dist/chunks/{tabs-XZ64AP6J.js → tabs-SV6BGUSZ.js} +8 -8
- package/dist/chunks/{team-W3SMSCHY.js → team-KNYMXICM.js} +1 -1
- package/dist/chunks/{team-client-WD4NU6BW.js → team-client-6E6HCYGW.js} +1 -1
- package/dist/chunks/{tools-7E2T67E2.js → tools-KGOJSW5W.js} +2 -2
- package/dist/chunks/{ui-commands-H7NSN5FP.js → ui-commands-XMJPZ5J2.js} +12 -12
- package/dist/chunks/{versions-Y2X7XUTY.js → versions-OREWXTWL.js} +5 -5
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -952,7 +952,7 @@ init_scene_graph();
|
|
|
952
952
|
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.");
|
|
953
953
|
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 });
|
|
954
954
|
async function placeImportedPicture(ctx, imported, at2, what, extra = {}) {
|
|
955
|
-
const client = await import("./client-
|
|
955
|
+
const client = await import("./client-NFKHKPDL.js");
|
|
956
956
|
if (at2.fillLayerId) {
|
|
957
957
|
const doc2 = ctx.doc();
|
|
958
958
|
const target = nodeOrThrow(doc2, at2.fillLayerId);
|
|
@@ -998,7 +998,7 @@ var photoSearch = defineCommand({
|
|
|
998
998
|
}
|
|
999
999
|
},
|
|
1000
1000
|
run: async (args) => {
|
|
1001
|
-
const { searchStockPhotos } = await import("./client-
|
|
1001
|
+
const { searchStockPhotos } = await import("./client-NFKHKPDL.js");
|
|
1002
1002
|
const page = await searchStockPhotos(args.query, args.page ?? 1, { licence: args.licence });
|
|
1003
1003
|
return {
|
|
1004
1004
|
summary: `${page.results.length} photo${page.results.length === 1 ? "" : "s"} for \u201C${page.query}\u201D (page ${page.page} of ${page.pageCount || 1})`,
|
|
@@ -1032,7 +1032,7 @@ var photoInsert = defineCommand({
|
|
|
1032
1032
|
run: async (args, ctx) => {
|
|
1033
1033
|
if (!args.id && !args.query) throw new ToolError("Pass an id from search_photos, or a query.");
|
|
1034
1034
|
if (args.id && !isPhotoId(args.id)) throw new ToolError(`"${args.id}" is not a photo id from search_photos.`);
|
|
1035
|
-
const client = await import("./client-
|
|
1035
|
+
const client = await import("./client-NFKHKPDL.js");
|
|
1036
1036
|
let photo;
|
|
1037
1037
|
if (args.id) photo = await client.stockPhotoInfo(args.id);
|
|
1038
1038
|
else {
|
|
@@ -1070,10 +1070,10 @@ var mediaList = defineCommand({
|
|
|
1070
1070
|
}
|
|
1071
1071
|
},
|
|
1072
1072
|
run: async (args) => {
|
|
1073
|
-
const { listLibraryMedia } = await import("./client-
|
|
1073
|
+
const { listLibraryMedia } = await import("./client-4DPA75PJ.js");
|
|
1074
1074
|
const q = { ...args };
|
|
1075
1075
|
if (!q.workspace) {
|
|
1076
|
-
const { syncStatus } = await import("./sync-
|
|
1076
|
+
const { syncStatus } = await import("./sync-6A34IQQE.js");
|
|
1077
1077
|
const link2 = syncStatus().link;
|
|
1078
1078
|
if (!link2) throw new ToolError("This document is not saved to the cloud, so it has no team media library. Pass workspace.");
|
|
1079
1079
|
q.workspace = (await listLibraryMedia({ file: link2.key, limit: 1 })).workspaceId;
|
|
@@ -1108,7 +1108,7 @@ var mediaInsert = defineCommand({
|
|
|
1108
1108
|
run: async (args, ctx) => {
|
|
1109
1109
|
const contentType = args.contentType ?? "image/*";
|
|
1110
1110
|
if (!contentType.startsWith("image/")) throw new ToolError("insert_media places pictures; this item is not one.");
|
|
1111
|
-
const { importLibraryPicture } = await import("./client-
|
|
1111
|
+
const { importLibraryPicture } = await import("./client-4DPA75PJ.js");
|
|
1112
1112
|
const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "Media", contentType, size: 0, createdAt: "", fileCount: 1, source: null };
|
|
1113
1113
|
const imported = await importLibraryPicture(item);
|
|
1114
1114
|
return placeImportedPicture(ctx, imported, args, `\u201C${imported.name}\u201D`, { hash: imported.hash });
|
|
@@ -1129,7 +1129,7 @@ var mediaDownload = defineCommand({
|
|
|
1129
1129
|
// The Library's right-click menu: saves the item's file to the computer.
|
|
1130
1130
|
expose: { ui: { label: "Download", palette: false } },
|
|
1131
1131
|
run: async (args) => {
|
|
1132
|
-
const { libraryBlob, libraryFileName } = await import("./client-
|
|
1132
|
+
const { libraryBlob, libraryFileName } = await import("./client-4DPA75PJ.js");
|
|
1133
1133
|
const { downloadBlob } = await import("./download-HKKU74HQ.js");
|
|
1134
1134
|
const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "media", contentType: args.contentType ?? "", size: 0, createdAt: "", fileCount: 1, source: null };
|
|
1135
1135
|
const blob = await libraryBlob(item);
|
|
@@ -1160,7 +1160,7 @@ var mediaDelete = defineCommand({
|
|
|
1160
1160
|
}
|
|
1161
1161
|
},
|
|
1162
1162
|
run: async (args) => {
|
|
1163
|
-
const { deleteLibraryMedia } = await import("./client-
|
|
1163
|
+
const { deleteLibraryMedia } = await import("./client-4DPA75PJ.js");
|
|
1164
1164
|
const out = await deleteLibraryMedia(args.workspace, args.hash);
|
|
1165
1165
|
return { summary: `Deleted it from the library (it was in ${out.files} file${out.files === 1 ? "" : "s"})`, data: out };
|
|
1166
1166
|
}
|
|
@@ -1174,13 +1174,13 @@ async function signedIn() {
|
|
|
1174
1174
|
}
|
|
1175
1175
|
async function publishedFile() {
|
|
1176
1176
|
await signedIn();
|
|
1177
|
-
const { openFileKey } = await import("./publish-site-
|
|
1177
|
+
const { openFileKey } = await import("./publish-site-ZM2RYCGU.js");
|
|
1178
1178
|
const key = openFileKey();
|
|
1179
1179
|
if (!key) throw new CommandError("This file is not saved to the cloud yet, so it has no site. Publish it first.", "failed");
|
|
1180
1180
|
return key;
|
|
1181
1181
|
}
|
|
1182
1182
|
async function formsWithoutDatabase(key) {
|
|
1183
|
-
const [{ useEditorStore }, { usesForms, formsGoNowhere }, { siteBackend }] = await Promise.all([import("./editor-store-
|
|
1183
|
+
const [{ useEditorStore }, { usesForms, formsGoNowhere }, { siteBackend }] = await Promise.all([import("./editor-store-LZMCUPSM.js"), import("./backend-XWFLTJ7Q.js"), import("./integrations-Q5LMI7GJ.js")]);
|
|
1184
1184
|
const doc2 = useEditorStore.getState().document;
|
|
1185
1185
|
if (!usesForms(doc2)) return false;
|
|
1186
1186
|
return formsGoNowhere(doc2, await siteBackend(key).catch(() => void 0));
|
|
@@ -1216,7 +1216,7 @@ var publishSite = defineCommand({
|
|
|
1216
1216
|
const { cleanSlug } = await import("./rules-QHJ6MTFA.js");
|
|
1217
1217
|
const address = p.address === void 0 ? void 0 : cleanSlug(p.address);
|
|
1218
1218
|
if (address === null) throw new CommandError("That cannot be a site address: use 3 to 40 letters, digits and dashes.", "invalid_params");
|
|
1219
|
-
const { publishOpenFile, NoScreens } = await import("./publish-site-
|
|
1219
|
+
const { publishOpenFile, NoScreens } = await import("./publish-site-ZM2RYCGU.js");
|
|
1220
1220
|
try {
|
|
1221
1221
|
const done = await publishOpenFile(address);
|
|
1222
1222
|
ctx.notice(`Published version ${done.version}: ${done.url}`);
|
|
@@ -1271,7 +1271,7 @@ var publishListSites = defineCommand({
|
|
|
1271
1271
|
},
|
|
1272
1272
|
run: async (p) => {
|
|
1273
1273
|
await signedIn();
|
|
1274
|
-
const [{ workspaceSites }, { activeTeamWorkspaceId, useHyperyTeam }] = await Promise.all([import("./sites-GPJOZNHF.js"), import("./team-
|
|
1274
|
+
const [{ workspaceSites }, { activeTeamWorkspaceId, useHyperyTeam }] = await Promise.all([import("./sites-GPJOZNHF.js"), import("./team-KNYMXICM.js")]);
|
|
1275
1275
|
const workspaceId = p.workspaceId ?? activeTeamWorkspaceId() ?? useHyperyTeam.getState().personalWorkspaceId;
|
|
1276
1276
|
if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
|
|
1277
1277
|
const out = await workspaceSites(workspaceId);
|
|
@@ -1320,12 +1320,12 @@ var publishStatus = defineCommand({
|
|
|
1320
1320
|
},
|
|
1321
1321
|
run: async () => {
|
|
1322
1322
|
await signedIn();
|
|
1323
|
-
const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-
|
|
1323
|
+
const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-ZM2RYCGU.js"), import("./sites-GPJOZNHF.js")]);
|
|
1324
1324
|
const key = openFileKey();
|
|
1325
1325
|
const status = await siteStatus(key);
|
|
1326
1326
|
const site = status.site;
|
|
1327
|
-
const backend = key ? await (await import("./integrations-
|
|
1328
|
-
const destinations = key ? await (await import("./integrations-
|
|
1327
|
+
const backend = key ? await (await import("./integrations-Q5LMI7GJ.js")).siteBackend(key).catch(() => null) : null;
|
|
1328
|
+
const destinations = key ? await (await import("./integrations-Q5LMI7GJ.js")).listDestinations(key).catch(() => []) : [];
|
|
1329
1329
|
return {
|
|
1330
1330
|
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}`,
|
|
1331
1331
|
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 })) }
|
|
@@ -1356,7 +1356,7 @@ var publishStore = defineCommand({
|
|
|
1356
1356
|
},
|
|
1357
1357
|
run: async (p, ctx) => {
|
|
1358
1358
|
await signedIn();
|
|
1359
|
-
const { deployOpenStore } = await import("./publish-store-
|
|
1359
|
+
const { deployOpenStore } = await import("./publish-store-AHEXCLYK.js");
|
|
1360
1360
|
const done = await deployOpenStore(ctx.doc(), ctx.pageId(), { destinationId: p.destinationId }).catch((e) => {
|
|
1361
1361
|
throw new CommandError(e instanceof Error ? e.message : String(e), "failed");
|
|
1362
1362
|
});
|
|
@@ -1385,7 +1385,7 @@ var integrationList = defineCommand({
|
|
|
1385
1385
|
}
|
|
1386
1386
|
},
|
|
1387
1387
|
run: async ({ capability }) => {
|
|
1388
|
-
const [{ cloudUser }, { integrationsWorkspaceId, listWorkspaceIntegrations }] = await Promise.all([import("./session-MNEF3IH4.js"), import("./integrations-
|
|
1388
|
+
const [{ cloudUser }, { integrationsWorkspaceId, listWorkspaceIntegrations }] = await Promise.all([import("./session-MNEF3IH4.js"), import("./integrations-Q5LMI7GJ.js")]);
|
|
1389
1389
|
if (!cloudUser()) throw new CommandError("You are not signed in: integrations belong to your account's workspace.", "denied");
|
|
1390
1390
|
const workspaceId = integrationsWorkspaceId();
|
|
1391
1391
|
if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
|
|
@@ -1426,7 +1426,7 @@ var integrationOpen = defineCommand({
|
|
|
1426
1426
|
}
|
|
1427
1427
|
});
|
|
1428
1428
|
async function openFile() {
|
|
1429
|
-
const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-MNEF3IH4.js"), import("./publish-site-
|
|
1429
|
+
const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-MNEF3IH4.js"), import("./publish-site-ZM2RYCGU.js")]);
|
|
1430
1430
|
if (!cloudUser()) throw new CommandError("You are not signed in.", "denied");
|
|
1431
1431
|
const key = openFileKey();
|
|
1432
1432
|
if (!key) throw new CommandError("This file is not saved to the cloud yet. Publish it first (publish_site).", "failed");
|
|
@@ -1452,7 +1452,7 @@ var integrationListResources = defineCommand({
|
|
|
1452
1452
|
}
|
|
1453
1453
|
},
|
|
1454
1454
|
run: async ({ connectionId, capability, path }) => {
|
|
1455
|
-
const { listResources } = await import("./integrations-
|
|
1455
|
+
const { listResources } = await import("./integrations-Q5LMI7GJ.js");
|
|
1456
1456
|
const list = await listResources(connectionId, capability, asPath2(path));
|
|
1457
1457
|
return {
|
|
1458
1458
|
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",
|
|
@@ -1487,7 +1487,7 @@ var integrationAddDestination = defineCommand({
|
|
|
1487
1487
|
},
|
|
1488
1488
|
run: async (p, ctx) => {
|
|
1489
1489
|
const key = await openFile();
|
|
1490
|
-
const { addDestination, createDestination, createResource } = await import("./integrations-
|
|
1490
|
+
const { addDestination, createDestination, createResource } = await import("./integrations-Q5LMI7GJ.js");
|
|
1491
1491
|
let made;
|
|
1492
1492
|
if (p.create) made = await createDestination(key, p.capability, void 0, p.connectionId);
|
|
1493
1493
|
else {
|
|
@@ -1524,7 +1524,7 @@ var integrationDeploy = defineCommand({
|
|
|
1524
1524
|
},
|
|
1525
1525
|
run: async (p, ctx) => {
|
|
1526
1526
|
const key = await openFile();
|
|
1527
|
-
const { deployDestination, listDestinations } = await import("./integrations-
|
|
1527
|
+
const { deployDestination, listDestinations } = await import("./integrations-Q5LMI7GJ.js");
|
|
1528
1528
|
const all = await listDestinations(key);
|
|
1529
1529
|
const dest = p.destinationId ? all.find((d) => d.id === p.destinationId) : all.length === 1 ? all[0] : void 0;
|
|
1530
1530
|
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");
|
|
@@ -1558,7 +1558,7 @@ var integrationAttachDatabase = defineCommand({
|
|
|
1558
1558
|
},
|
|
1559
1559
|
run: async (p, ctx) => {
|
|
1560
1560
|
const key = await openFile();
|
|
1561
|
-
const { attachDatabase, createDatabase, createResource, listResources } = await import("./integrations-
|
|
1561
|
+
const { attachDatabase, createDatabase, createResource, listResources } = await import("./integrations-Q5LMI7GJ.js");
|
|
1562
1562
|
if (p.create) return attached(await createDatabase(key, void 0, p.connectionId), ctx);
|
|
1563
1563
|
if (!p.connectionId || !p.target) throw new CommandError("Say connectionId and target, or create: true.", "invalid_params");
|
|
1564
1564
|
let target = asPath2(p.target);
|
|
@@ -1597,7 +1597,7 @@ var integrationSubmissions = defineCommand({
|
|
|
1597
1597
|
},
|
|
1598
1598
|
run: async ({ form, limit }) => {
|
|
1599
1599
|
const key = await openFile();
|
|
1600
|
-
const { listSubmissions } = await import("./integrations-
|
|
1600
|
+
const { listSubmissions } = await import("./integrations-Q5LMI7GJ.js");
|
|
1601
1601
|
const rows = await listSubmissions(key, { form, limit: limit ?? 20 });
|
|
1602
1602
|
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 } };
|
|
1603
1603
|
}
|
|
@@ -1622,7 +1622,7 @@ var integrationSetSignIn = defineCommand({
|
|
|
1622
1622
|
},
|
|
1623
1623
|
run: async ({ on }, ctx) => {
|
|
1624
1624
|
const key = await openFile();
|
|
1625
|
-
const { setSignIn } = await import("./integrations-
|
|
1625
|
+
const { setSignIn } = await import("./integrations-Q5LMI7GJ.js");
|
|
1626
1626
|
const done = await setSignIn(key, on);
|
|
1627
1627
|
ctx.notice(on ? "Visitors can sign in." : "Sign-in is off.");
|
|
1628
1628
|
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 } };
|
|
@@ -1840,7 +1840,7 @@ var fontTeamList = defineCommand({
|
|
|
1840
1840
|
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)." }
|
|
1841
1841
|
},
|
|
1842
1842
|
run: async (args) => {
|
|
1843
|
-
const { refreshTeamFonts } = await import("./team-client-
|
|
1843
|
+
const { refreshTeamFonts } = await import("./team-client-6E6HCYGW.js");
|
|
1844
1844
|
const fonts = await refreshTeamFonts(args.workspace);
|
|
1845
1845
|
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 })) } };
|
|
1846
1846
|
}
|
|
@@ -1867,7 +1867,7 @@ var fontTeamAdd = defineCommand({
|
|
|
1867
1867
|
run: async (args, ctx) => {
|
|
1868
1868
|
const { bytes, fileName: fileName2 } = await fontBytes(args, ctx);
|
|
1869
1869
|
const { face, family, weight, style } = await resolveFace(bytes, args);
|
|
1870
|
-
const { uploadTeamFont } = await import("./team-client-
|
|
1870
|
+
const { uploadTeamFont } = await import("./team-client-6E6HCYGW.js");
|
|
1871
1871
|
const font = await uploadTeamFont(bytes, { family, weight, style, face: face.index, fileName: fileName2 }, args.workspace);
|
|
1872
1872
|
return { summary: `Added ${family} ${weight}${style === "italic" ? " italic" : ""} to the team`, data: { font } };
|
|
1873
1873
|
}
|
|
@@ -1889,7 +1889,7 @@ var fontTeamRemove = defineCommand({
|
|
|
1889
1889
|
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." }
|
|
1890
1890
|
},
|
|
1891
1891
|
run: async (args) => {
|
|
1892
|
-
const { removeTeamFont } = await import("./team-client-
|
|
1892
|
+
const { removeTeamFont } = await import("./team-client-6E6HCYGW.js");
|
|
1893
1893
|
const out = await removeTeamFont(args.id, args.workspace);
|
|
1894
1894
|
return { summary: `Removed the team font${out.freed ? " and freed its storage" : ""}`, data: out };
|
|
1895
1895
|
}
|
|
@@ -1900,7 +1900,7 @@ var fontTeamCommands = [fontTeamList, fontTeamAdd];
|
|
|
1900
1900
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
1901
1901
|
async function cloudFile() {
|
|
1902
1902
|
const [{ syncStatus }, { cloudUser }] = await Promise.all([
|
|
1903
|
-
import("./sync-
|
|
1903
|
+
import("./sync-6A34IQQE.js"),
|
|
1904
1904
|
import("./session-MNEF3IH4.js")
|
|
1905
1905
|
]);
|
|
1906
1906
|
const link2 = syncStatus().link;
|
|
@@ -1962,7 +1962,7 @@ var fileTrash = defineCommand({
|
|
|
1962
1962
|
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." }
|
|
1963
1963
|
},
|
|
1964
1964
|
run: async () => {
|
|
1965
|
-
const { deleteCurrentFile, leaveDeletedFile } = await import("./delete-current-file-
|
|
1965
|
+
const { deleteCurrentFile, leaveDeletedFile } = await import("./delete-current-file-CGB4JSWH.js");
|
|
1966
1966
|
const { name: name2, kind } = await deleteCurrentFile();
|
|
1967
1967
|
leaveDeletedFile();
|
|
1968
1968
|
return { summary: kind === "cloud" ? `Moved \u201C${name2}\u201D to the Trash` : `Deleted \u201C${name2}\u201D` };
|
|
@@ -2079,11 +2079,11 @@ var fileDuplicate = defineCommand({
|
|
|
2079
2079
|
},
|
|
2080
2080
|
run: async (p, ctx) => {
|
|
2081
2081
|
const [{ syncStatus }, { cloudApi }, { isDesktopTabs }, { createFileInTab }, { openNewCloudFile }, { v4: uuid }] = await Promise.all([
|
|
2082
|
-
import("./sync-
|
|
2082
|
+
import("./sync-6A34IQQE.js"),
|
|
2083
2083
|
import("./api-2UT5UYIB.js"),
|
|
2084
2084
|
import("./tab-mode-RB7RFFTR.js"),
|
|
2085
|
-
import("./tabs-
|
|
2086
|
-
import("./sync-
|
|
2085
|
+
import("./tabs-SV6BGUSZ.js"),
|
|
2086
|
+
import("./sync-6A34IQQE.js"),
|
|
2087
2087
|
import("./dist-node-R6GFIW6U.js")
|
|
2088
2088
|
]);
|
|
2089
2089
|
const doc2 = ctx.doc();
|
|
@@ -4512,7 +4512,8 @@ var styleSetVariable = defineCommand({
|
|
|
4512
4512
|
collection: external_exports.string().max(AI_LIMITS.maxNameChars).optional(),
|
|
4513
4513
|
/** Address an EXISTING variable by id and write one mode of it, rather than upserting by name. */
|
|
4514
4514
|
variableId: external_exports.string().optional(),
|
|
4515
|
-
modeId: external_exports.string().optional()
|
|
4515
|
+
modeId: external_exports.string().optional(),
|
|
4516
|
+
persist: external_exports.boolean().optional()
|
|
4516
4517
|
}),
|
|
4517
4518
|
expose: {
|
|
4518
4519
|
agent: {
|
|
@@ -4522,7 +4523,8 @@ var styleSetVariable = defineCommand({
|
|
|
4522
4523
|
name: external_exports.string().min(1).max(AI_LIMITS.maxNameChars),
|
|
4523
4524
|
type: external_exports.enum(["COLOR", "FLOAT", "STRING", "BOOLEAN"]),
|
|
4524
4525
|
value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]),
|
|
4525
|
-
collection: external_exports.string().max(AI_LIMITS.maxNameChars).optional().describe('Collection name (created when missing; default "Variables").')
|
|
4526
|
+
collection: external_exports.string().max(AI_LIMITS.maxNameChars).optional().describe('Collection name (created when missing; default "Variables").'),
|
|
4527
|
+
persist: external_exports.boolean().optional().describe("Keep the value a running game or prototype sets across reloads (levels cleared, a high score).")
|
|
4526
4528
|
})
|
|
4527
4529
|
},
|
|
4528
4530
|
plugin: {
|
|
@@ -4567,7 +4569,8 @@ var styleSetVariable = defineCommand({
|
|
|
4567
4569
|
}
|
|
4568
4570
|
const variables = { ...doc2.variables ?? {} };
|
|
4569
4571
|
const existing = Object.values(variables).find((v) => v.name === args.name && v.variableCollectionId === col.id);
|
|
4570
|
-
const
|
|
4572
|
+
const base = existing ? { ...existing, type: args.type, valuesByMode: { ...existing.valuesByMode, [col.defaultModeId]: value2 } } : { id: `var-${v4_default()}`, name: args.name, type: args.type, variableCollectionId: col.id, valuesByMode: { [col.defaultModeId]: value2 } };
|
|
4573
|
+
const variable = args.persist === void 0 ? base : { ...base, persist: args.persist || void 0 };
|
|
4571
4574
|
variables[variable.id] = variable;
|
|
4572
4575
|
ctx.commit({ ...doc2, variables, variableCollections: collections });
|
|
4573
4576
|
return { summary: `${existing ? "Updated" : "Created"} variable "${args.name}"`, data: { id: variable.id, collectionId: col.id } };
|
|
@@ -4961,7 +4964,7 @@ var viewCopyLink = defineCommand({
|
|
|
4961
4964
|
},
|
|
4962
4965
|
run: async (args, ctx) => {
|
|
4963
4966
|
const [{ syncStatus }, { fileUrl }, { withDeepLink }] = await Promise.all([
|
|
4964
|
-
import("./sync-
|
|
4967
|
+
import("./sync-6A34IQQE.js"),
|
|
4965
4968
|
import("./api-2UT5UYIB.js"),
|
|
4966
4969
|
import("./deep-link-NUGKV6MQ.js")
|
|
4967
4970
|
]);
|
|
@@ -5286,7 +5289,7 @@ var pageGo = defineCommand({
|
|
|
5286
5289
|
] }
|
|
5287
5290
|
},
|
|
5288
5291
|
run: async ({ to }) => {
|
|
5289
|
-
const { useEditorStore } = await import("./editor-store-
|
|
5292
|
+
const { useEditorStore } = await import("./editor-store-LZMCUPSM.js");
|
|
5290
5293
|
useEditorStore.getState().goToPrintPage(to);
|
|
5291
5294
|
return { summary: typeof to === "number" ? `Page ${to + 1}` : `${to} page` };
|
|
5292
5295
|
}
|
|
@@ -5320,7 +5323,7 @@ var pageSetup = defineCommand({
|
|
|
5320
5323
|
}
|
|
5321
5324
|
},
|
|
5322
5325
|
run: async (args) => {
|
|
5323
|
-
const { useEditorStore } = await import("./editor-store-
|
|
5326
|
+
const { useEditorStore } = await import("./editor-store-LZMCUPSM.js");
|
|
5324
5327
|
useEditorStore.getState().applyPageSetup(args);
|
|
5325
5328
|
return { summary: `Page setup updated${args.kind ? ` (${args.kind.toLowerCase()})` : ""}` };
|
|
5326
5329
|
}
|
|
@@ -5758,7 +5761,7 @@ async function docAtTime(doc2, ids, time2) {
|
|
|
5758
5761
|
let frameId;
|
|
5759
5762
|
if (time2 === void 0) {
|
|
5760
5763
|
try {
|
|
5761
|
-
const { useEditorStore } = await import("./editor-store-
|
|
5764
|
+
const { useEditorStore } = await import("./editor-store-LZMCUPSM.js");
|
|
5762
5765
|
const st = useEditorStore.getState();
|
|
5763
5766
|
const target = st.transport?.target;
|
|
5764
5767
|
if (st.mode !== "ANIMATE" || target?.kind !== "frame") return doc2;
|
|
@@ -6152,7 +6155,7 @@ async function runAnimationExport(format, args, ctx) {
|
|
|
6152
6155
|
const filename = exportFileName(args.filename || targetName(doc2, target), format);
|
|
6153
6156
|
const [{ exportAnimation }, { memoryDestination }] = await Promise.all([import("./video-7KPETY67.js"), import("./destination-XVROFAPQ.js")]);
|
|
6154
6157
|
if (format === "lottie" || format === "dotlottie") return runLottieExport(renderer, doc2, spec, filename, ctx, memoryDestination, args.stateMachine);
|
|
6155
|
-
const planWatermark = format !== "png" && await (await import("./export-watermark-
|
|
6158
|
+
const planWatermark = format !== "png" && await (await import("./export-watermark-4FVFQ7EQ.js")).exportWatermark();
|
|
6156
6159
|
if (format !== "png") spec = { ...spec, watermark: planWatermark || args.watermark !== false };
|
|
6157
6160
|
const dest = ctx.destination ? await ctx.destination(filename, FORMAT_MIME[format]) : memoryDestination(filename, FORMAT_MIME[format]);
|
|
6158
6161
|
let stats;
|
|
@@ -6238,7 +6241,7 @@ var exportLottie = animationCommand((args) => args.container === "lottie" ? "dot
|
|
|
6238
6241
|
});
|
|
6239
6242
|
async function exportSite(doc2, pageId2, packaging, styling = "css", siteUrl) {
|
|
6240
6243
|
const [{ completeSite, nextFilesOf, nextProjectDropped, shareImageFiles, staticFilesOf, NoSiteRuntime, bytesOf }, { fileBase }, { zipFiles }, { downloadBlob }] = await Promise.all([
|
|
6241
|
-
import("./project-
|
|
6244
|
+
import("./project-TLJXPUXS.js"),
|
|
6242
6245
|
import("./web-TJD6HFKE.js"),
|
|
6243
6246
|
import("./zip-export-6TZJSSQO.js"),
|
|
6244
6247
|
import("./download-HKKU74HQ.js")
|
|
@@ -6333,8 +6336,8 @@ var exportStorefront = defineCommand({
|
|
|
6333
6336
|
const doc2 = ctx.doc();
|
|
6334
6337
|
const [{ storefrontInputs }, { STOREFRONT_TARGETS }, { bytesOf }, { fileBase, flatten }, { zipFiles }, { downloadBlob }] = await Promise.all([
|
|
6335
6338
|
import("./storefront-prepare-543VBJ2B.js"),
|
|
6336
|
-
import("./storefront-
|
|
6337
|
-
import("./project-
|
|
6339
|
+
import("./storefront-DASOKGXT.js"),
|
|
6340
|
+
import("./project-TLJXPUXS.js"),
|
|
6338
6341
|
import("./web-TJD6HFKE.js"),
|
|
6339
6342
|
import("./zip-export-6TZJSSQO.js"),
|
|
6340
6343
|
import("./download-HKKU74HQ.js")
|
|
@@ -6729,7 +6732,7 @@ var visionRegenerateImage = defineCommand({
|
|
|
6729
6732
|
const id = args.id ?? ctx.selection()[0];
|
|
6730
6733
|
if (!id) throw new ToolError("Select a generated image to regenerate.");
|
|
6731
6734
|
nodeOrThrow(ctx.doc(), id);
|
|
6732
|
-
const { regenerateImage } = await import("./client-actions-
|
|
6735
|
+
const { regenerateImage } = await import("./client-actions-6YTCHAFN.js");
|
|
6733
6736
|
regenerateImage(id, args.count);
|
|
6734
6737
|
return { summary: args.count > 1 ? `Regenerating ${args.count} variants` : "Regenerating the image", data: { id, count: args.count } };
|
|
6735
6738
|
}
|
|
@@ -11678,7 +11681,8 @@ var interaction = external_exports.object({
|
|
|
11678
11681
|
action: action2,
|
|
11679
11682
|
triggerDelay: external_exports.number().min(0).optional(),
|
|
11680
11683
|
triggerKey: external_exports.string().max(40).optional(),
|
|
11681
|
-
dragDirection: external_exports.enum(["LEFT", "RIGHT", "UP", "DOWN"]).optional()
|
|
11684
|
+
dragDirection: external_exports.enum(["LEFT", "RIGHT", "UP", "DOWN"]).optional(),
|
|
11685
|
+
physicsWith: external_exports.string().max(200).optional().describe("ON_COLLIDE / ON_OVERLAP / ON_LAND: only when the player meets this layer id or physics tag.")
|
|
11682
11686
|
});
|
|
11683
11687
|
var LIVE = ["characters", "imageUrl", ...LIVE_VALUE_PROPS];
|
|
11684
11688
|
var prototypeEdit = defineCommand({
|
|
@@ -12135,7 +12139,7 @@ var scriptRun = defineCommand({
|
|
|
12135
12139
|
// A script is not the turn the user is watching: confirm-tier tools are refused inside it (dispatch, `nested`).
|
|
12136
12140
|
actor: { ...ctx.actor, nested: true, label: "Script" },
|
|
12137
12141
|
// A look_at inside the script sees the document as the script has left it so far, not as it was before.
|
|
12138
|
-
use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-
|
|
12142
|
+
use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-3VMEBCB4.js")).renderDocument(staged, ids, options)) : ctx.use(name2))
|
|
12139
12143
|
};
|
|
12140
12144
|
let calls = 0;
|
|
12141
12145
|
const images = [];
|
|
@@ -12988,7 +12992,7 @@ var docImportFile = defineCommand({
|
|
|
12988
12992
|
const file = new File([body], args.name);
|
|
12989
12993
|
if (file.size > MAX_BYTES) throw new ToolError(`"${args.name}" is larger than ${MAX_BYTES / 1024 / 1024} MB.`);
|
|
12990
12994
|
const [{ buildImportedDocument }, { mergeImportedDocument }] = await Promise.all([
|
|
12991
|
-
import("./plugin-import-
|
|
12995
|
+
import("./plugin-import-SSUSTL7V.js"),
|
|
12992
12996
|
import("./import-merge-W2SH4VNP.js")
|
|
12993
12997
|
]);
|
|
12994
12998
|
const built = await buildImportedDocument(file);
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-IT5QDCSB.js";
|
|
10
10
|
import {
|
|
11
11
|
notice
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NKFAJTBR.js";
|
|
13
13
|
import {
|
|
14
14
|
effectiveChatModel,
|
|
15
15
|
setModelPref,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-XLE5SPZO.js";
|
|
18
18
|
import {
|
|
19
19
|
useEditorStore
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-4FHDWGCD.js";
|
|
21
21
|
import {
|
|
22
22
|
create
|
|
23
23
|
} from "./chunk-UZB4UQX3.js";
|
|
@@ -1332,6 +1332,103 @@ so renaming or restyling them is safe and running it again replaces exactly them
|
|
|
1332
1332
|
- Present mode is where it runs: say so, and do not export a game as a video unless asked.`
|
|
1333
1333
|
};
|
|
1334
1334
|
|
|
1335
|
+
// lib/agent/skills/builtin/platformer.ts
|
|
1336
|
+
init_define_POPCRAFT_COMPONENT_IDS();
|
|
1337
|
+
var platformer = {
|
|
1338
|
+
id: "platformer",
|
|
1339
|
+
name: "Platformer games",
|
|
1340
|
+
description: "Playable platformers: a player with power-ups, scrolling levels, blocks, enemies and a world map.",
|
|
1341
|
+
whenToUse: "the user wants a platformer, levels, enemies, power-ups or a world map",
|
|
1342
|
+
tools: [
|
|
1343
|
+
"get_selection",
|
|
1344
|
+
"get_document_outline",
|
|
1345
|
+
"find_nodes",
|
|
1346
|
+
"get_node",
|
|
1347
|
+
"look_at",
|
|
1348
|
+
"manage_todos",
|
|
1349
|
+
"ask_user",
|
|
1350
|
+
"write_design",
|
|
1351
|
+
"get_design_script",
|
|
1352
|
+
"create_node",
|
|
1353
|
+
"update_nodes",
|
|
1354
|
+
"set_variable",
|
|
1355
|
+
"edit_prototype",
|
|
1356
|
+
"select",
|
|
1357
|
+
"zoom_to"
|
|
1358
|
+
],
|
|
1359
|
+
instructions: `# Platformer games
|
|
1360
|
+
|
|
1361
|
+
A platformer is ordinary layers on a screen (a top-level frame), each with a \`physics\` field saying what it is to the
|
|
1362
|
+
game. A screen with a \`player\` plays in Present mode and on a published site: arrows or A/D run, Up/W/Space jump
|
|
1363
|
+
(hold for higher), X or Shift is the action key, Down/S is down. No script, no keyframes. Draw every sprite, tile and
|
|
1364
|
+
item as a Pixel canvas (read the pixel-sprites skill for the art), then give it its role with
|
|
1365
|
+
\`k.patch(id, { physics: {...} })\` in the same \`write_design\` script (or \`update_nodes\` props \`{ physics }\` later).
|
|
1366
|
+
|
|
1367
|
+
## The roles (\`physics.role\`)
|
|
1368
|
+
- \`player\` \u2014 the hero. Usually a group holding \`pose\` layers (\`{ role: 'pose', pose: 'idle'|'run'|'jump', form? }\`),
|
|
1369
|
+
one pixel canvas per pose, all at 0,0 in the group. \`settings\`: gravity, speed, accel, jump, maxFall, coyote, buffer,
|
|
1370
|
+
jumpCut, airControl, hurtGrace (s of blinking after a hit), topDown (a map: no gravity, four-way). \`keys\` rebinds.
|
|
1371
|
+
\`variables\`: ids of variables the game writes (collected, deaths, won, form) for a HUD.
|
|
1372
|
+
- \`solid\` \u2014 ground, walls, bricks. \`bump: { reward: 1, reveal: '<used block id>', spawn: '<template id>' }\` makes a
|
|
1373
|
+
? block: hit from below it bumps, pays a coin, shows its used look and pops the template out on top, once.
|
|
1374
|
+
- \`platform\` \u2014 one-way: land on it from above, jump up through it.
|
|
1375
|
+
- \`collectible\` \u2014 a coin; \`grants: '<form id>'\` makes it a power-up that turns the player into that form.
|
|
1376
|
+
- \`hazard\` \u2014 costs a hit. \`stomp: true\` lets the player defeat it by landing on it, \`hp\` stomps (default 1).
|
|
1377
|
+
Moving: \`patrol: { distance, speed }\` (back and forth) or \`ai: { move: 'walk'|'chase'|'hop', speed, edges, range, hop }\`
|
|
1378
|
+
(gravity, turns at walls; \`edges: false\` walks off ledges; chase within \`range\` px).
|
|
1379
|
+
- \`goal\` \u2014 touching it wins (a flag, a door). \`win\` \u2014 a banner hidden until the player wins.
|
|
1380
|
+
- \`level\` \u2014 a frame bigger than the screen holding the whole level. The camera follows the player inside it and never
|
|
1381
|
+
shows past its edges (\`deadzone\` 0\u20131 of the width, \`deadzoneY\`). Put the score, lives and touch buttons OUTSIDE it,
|
|
1382
|
+
directly on the screen, so they stay put. Size it to the level (e.g. 6000\xD71080 on a 1920\xD71080 screen).
|
|
1383
|
+
- \`parallax\` \u2014 scenery sliding at \`parallax\` (0.1 far \u2026 0.5 near) of the player's travel.
|
|
1384
|
+
- \`reveal\` \u2014 hidden until a bump names it. \`control\` \u2014 an on-screen button (\`control: 'left'|'right'|'jump'|'action'|'down'\`).
|
|
1385
|
+
- \`body\` \u2014 no preset: say \`body\` (static/dynamic/kinematic), \`collider\` (solid/oneWay/sensor/none) and \`effects\`
|
|
1386
|
+
(collect, hurt, finish, damage, checkpoint) yourself. A checkpoint flag is \`{ role: 'body', collider: 'sensor', effects: ['checkpoint'] }\`.
|
|
1387
|
+
|
|
1388
|
+
## Power-ups: forms
|
|
1389
|
+
The player's \`forms\` list, the first the one it starts in:
|
|
1390
|
+
\`[{ id: 'small', h: 64 }, { id: 'big', h: 112, hurtTo: 'small' }, { id: 'fire', h: 112, hurtTo: 'big', shoots: { template: '<fireball id>', vx: 700, max: 2 } }, { id: 'star', invincible: true, lasts: 8, hurtTo: 'big' }]\`.
|
|
1391
|
+
A hit drops to \`hurtTo\` (none: a life lost). Each form can carry its own \`settings\`. Give each form its own pose
|
|
1392
|
+
layers (\`form: 'big'\`); a pose without \`form\` shows in every form that has none of its own. A power-up is a
|
|
1393
|
+
collectible with \`grants\`, usually a \`template\` a ? block's \`bump.spawn\` pops out.
|
|
1394
|
+
|
|
1395
|
+
## Templates and shots
|
|
1396
|
+
\`template: true\` keeps a layer out of play (hide it, park it anywhere in the level); it only appears when spawned.
|
|
1397
|
+
With \`ai\` a spawned copy walks (a mushroom-style item: \`{ role: 'collectible', template: true, grants: 'big', ai: { move: 'walk', speed: 120 } }\`);
|
|
1398
|
+
without, it flies as \`shot: { gravity, bounce, life }\` says. A fireball: \`{ role: 'body', collider: 'sensor', effects: ['damage'], template: true, shot: { gravity: true, bounce: 520, life: 2 } }\`.
|
|
1399
|
+
|
|
1400
|
+
## Triggers and events (\`edit_prototype\`)
|
|
1401
|
+
- \`ON_COLLIDE\` / \`ON_OVERLAP\` / \`ON_LAND\` on a layer, \`physicsWith\` a layer id or tag, fire when the player meets it.
|
|
1402
|
+
Tag layers with \`physics.tags\` (\`['enemy']\`, \`['pipe']\`).
|
|
1403
|
+
- A \`GAME\` action changes the running game: \`{ navigationType: 'GAME', game: { op: 'spawn', template, at?, vx?, vy? } }\`,
|
|
1404
|
+
\`{ op: 'remove', target }\`, \`{ op: 'impulse'|'velocity', x, y }\` (a spring), \`{ op: 'teleport', to }\` (a pipe), \`{ op: 'form', form }\`.
|
|
1405
|
+
- \`KEY_DOWN\` / \`KEY_UP\` with \`triggerKey\`, and \`EVERY\` (\`triggerDelay\` ms, repeating) for timers and spawners.
|
|
1406
|
+
- \`set_variable\` with \`persist: true\` keeps what the game sets across reloads (levels cleared, coins). Bind a HUD
|
|
1407
|
+
with \`liveValues\` (\`characters\` = \`pad({game/coins}, 3)\`).
|
|
1408
|
+
|
|
1409
|
+
## A world map
|
|
1410
|
+
A second screen with a \`level\` frame of paths and level dots, and a player with \`settings: { topDown: true }\` (no
|
|
1411
|
+
gravity, walks four ways). Each level dot is a sensor body (\`{ role: 'body', collider: 'sensor' }\`) with an
|
|
1412
|
+
\`ON_COLLIDE\` interaction that NAVIGATEs to that level's screen. The level's goal NAVIGATEs back to the map (\`ON_COLLIDE\`
|
|
1413
|
+
on the goal) and sets a persisted \`cleared\` variable; lock a dot with \`liveValues\` \`visible\` on its lock.
|
|
1414
|
+
|
|
1415
|
+
## Steps
|
|
1416
|
+
1. Plan with \`manage_todos\`: art (hero poses per form, tiles, blocks, items, enemies), level 1, map, HUD.
|
|
1417
|
+
2. Draw the sprites first (pixel-sprites), on a "Sprites" frame off to the side, one shared palette.
|
|
1418
|
+
3. Build each level screen: the \`level\` frame, ground with pits, one-way platforms, ? blocks with their used looks and
|
|
1419
|
+
spawns, coins in arcs over jumps, enemies with room to stomp them, a checkpoint mid-way, the goal at the end. Teach
|
|
1420
|
+
one idea at a time: flat ground and a first enemy, then a pit, then a block with a power-up.
|
|
1421
|
+
4. Give the player its forms and poses last, and a HUD outside the level.
|
|
1422
|
+
5. \`look_at\` each screen. Check reachability by numbers: the default jump clears ~200 px up and ~360 px across;
|
|
1423
|
+
never leave a gap or a ledge beyond that. Say how to play it (Present mode, the keys).
|
|
1424
|
+
|
|
1425
|
+
## Rules
|
|
1426
|
+
- Game logic goes in roles and triggers, never keyframes: a game is played, not watched.
|
|
1427
|
+
- Sizes: 16\xD716 art tiles at cell 4 make 64 px tiles; a small hero 16\xD716 \u2192 64 px, a big one 16\xD728 \u2192 112 px.
|
|
1428
|
+
- Never stretch a Pixel canvas with width/height; change \`cell\`.
|
|
1429
|
+
- Make it original: invent the hero, the enemies and the items; never copy a commercial game's characters or levels.`
|
|
1430
|
+
};
|
|
1431
|
+
|
|
1335
1432
|
// lib/agent/skills/builtin/orchestration.ts
|
|
1336
1433
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
1337
1434
|
var autoLight = {
|
|
@@ -1403,6 +1500,7 @@ var BUILTIN_SKILLS = [
|
|
|
1403
1500
|
storefront,
|
|
1404
1501
|
pixelSprites,
|
|
1405
1502
|
gameDesign,
|
|
1503
|
+
platformer,
|
|
1406
1504
|
...ORCHESTRATION_SKILLS
|
|
1407
1505
|
].map((s) => ({ ...s, source: "builtin" }));
|
|
1408
1506
|
|
|
@@ -1979,7 +2077,7 @@ async function sendMessage(text) {
|
|
|
1979
2077
|
if (!useAgentStore.getState().activeThreadId) newThread();
|
|
1980
2078
|
const mentions = pruneMentions(body, useAgentStore.getState().draftMentions);
|
|
1981
2079
|
useAgentStore.setState({ draft: "", draftMentions: [], error: null });
|
|
1982
|
-
const { runTurn } = await import("./runner-
|
|
2080
|
+
const { runTurn } = await import("./runner-3X5C2MOH.js");
|
|
1983
2081
|
await runTurn(body, mentions);
|
|
1984
2082
|
}
|
|
1985
2083
|
function stop() {
|
|
@@ -2082,7 +2180,7 @@ var clearTaskChildren = () => useAgentStore.setState({ taskChildren: {} });
|
|
|
2082
2180
|
function subscribeChildTools() {
|
|
2083
2181
|
let dispose;
|
|
2084
2182
|
let cancelled = false;
|
|
2085
|
-
void import("./runner-
|
|
2183
|
+
void import("./runner-3X5C2MOH.js").then(({ onChildTool }) => {
|
|
2086
2184
|
const off = onChildTool((report) => {
|
|
2087
2185
|
if (report?.status !== "running" || report.jobId) return;
|
|
2088
2186
|
recordChildTool(report.toolCallId ?? "", report.name);
|
|
@@ -57,19 +57,19 @@ async function renderDocument(doc, nodeIds, options) {
|
|
|
57
57
|
function generateCapability(ctx) {
|
|
58
58
|
return async (prompt, options = {}) => {
|
|
59
59
|
if (options.format === "audio") {
|
|
60
|
-
const { requestAudio } = await import("./client-
|
|
60
|
+
const { requestAudio } = await import("./client-3AR5LMWO.js");
|
|
61
61
|
const { signal: signal2, format: _f, ...rest2 } = options;
|
|
62
62
|
void _f;
|
|
63
63
|
return requestAudio({ prompt, ...rest2 }, signal2 ?? ctx.signal);
|
|
64
64
|
}
|
|
65
65
|
if (options.format === "video") {
|
|
66
|
-
const { generateVideoFile } = await import("./generate-media-
|
|
66
|
+
const { generateVideoFile } = await import("./generate-media-JNSFV7X2.js");
|
|
67
67
|
const { format: _f, signal: signal2, ...rest2 } = options;
|
|
68
68
|
void _f;
|
|
69
69
|
return generateVideoFile({ ...rest2, prompt, doc: ctx.doc() }, { signal: signal2 ?? ctx.signal });
|
|
70
70
|
}
|
|
71
71
|
const [{ requestImage }, { effectiveImageModel, useAiStore }] = await Promise.all([
|
|
72
|
-
import("./client-
|
|
72
|
+
import("./client-3AR5LMWO.js"),
|
|
73
73
|
import("./client-store-KJYMVKAM.js")
|
|
74
74
|
]);
|
|
75
75
|
const modelId = effectiveImageModel(useAiStore.getState());
|
|
@@ -17,14 +17,14 @@ import {
|
|
|
17
17
|
reportOpenStage,
|
|
18
18
|
setCloudLink,
|
|
19
19
|
trackOpen
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-S2KHVXP2.js";
|
|
21
21
|
import {
|
|
22
22
|
parseDeepLink,
|
|
23
23
|
withDeepLink
|
|
24
24
|
} from "./chunk-VN32C2RG.js";
|
|
25
25
|
import {
|
|
26
26
|
activeTeamWorkspaceId
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-LGCGRZNK.js";
|
|
28
28
|
import {
|
|
29
29
|
ApiError,
|
|
30
30
|
api,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
} from "./chunk-34CAPALE.js";
|
|
33
33
|
import {
|
|
34
34
|
attachPresence
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-D3EQULKF.js";
|
|
36
36
|
import {
|
|
37
37
|
fileOpeningMode,
|
|
38
38
|
isAppleMobile,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
setCollabHistory,
|
|
46
46
|
storedDocument,
|
|
47
47
|
useEditorStore
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-4FHDWGCD.js";
|
|
49
49
|
import {
|
|
50
50
|
currentHistoryGroup
|
|
51
51
|
} from "./chunk-PPJ2NEBU.js";
|
|
@@ -150,7 +150,7 @@ function startHyperyTeams() {
|
|
|
150
150
|
maybePromptForTeam();
|
|
151
151
|
void followFileTeam(linkedKey);
|
|
152
152
|
});
|
|
153
|
-
void import("./sync-
|
|
153
|
+
void import("./sync-6A34IQQE.js").then(({ onSyncStatus, syncStatus }) => {
|
|
154
154
|
linkedKey = syncStatus().link?.key ?? null;
|
|
155
155
|
void followFileTeam(linkedKey);
|
|
156
156
|
onSyncStatus((_s, link) => {
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
requestImageAction,
|
|
17
17
|
sizeForAspect,
|
|
18
18
|
vectorSupport
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SUK4OYMS.js";
|
|
20
20
|
import {
|
|
21
21
|
external_exports
|
|
22
22
|
} from "./chunk-GHPSGTWV.js";
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
} from "./chunk-XZX4EC7B.js";
|
|
32
32
|
import {
|
|
33
33
|
useEditorStore
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-4FHDWGCD.js";
|
|
35
35
|
import {
|
|
36
36
|
withHistoryGroup
|
|
37
37
|
} from "./chunk-PPJ2NEBU.js";
|