@popcraft/kit 0.8.1 → 0.8.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/{builtin-IYPOVT57.js → builtin-X3AREHEY.js} +2 -2
- package/dist/chunks/{check-template-D3BJNM3S.js → check-template-G5MKOIQT.js} +6 -6
- package/dist/chunks/{chunk-ZRHOKLI5.js → chunk-2RKQUQZI.js} +5 -5
- package/dist/chunks/{chunk-VGJNSCKG.js → chunk-EIHEOYZ5.js} +3 -3
- package/dist/chunks/{chunk-4AXOXT6J.js → chunk-FIZZ2SIM.js} +1 -1
- package/dist/chunks/{chunk-7FX5W4YT.js → chunk-J7FJCDMZ.js} +1 -1
- package/dist/chunks/{chunk-5ENJWXWQ.js → chunk-KWOU53PH.js} +2 -2
- package/dist/chunks/{chunk-XFOA4XPC.js → chunk-M2FW3CMB.js} +14 -14
- package/dist/chunks/{chunk-RICNDPSD.js → chunk-QENL3J7E.js} +3 -3
- package/dist/chunks/{chunk-GKO3ZSFY.js → chunk-SGELR6GD.js} +1 -1
- package/dist/chunks/{chunk-M3H64ACU.js → chunk-SOUVCBG7.js} +3 -3
- package/dist/chunks/{chunk-NWNYUGOL.js → chunk-WWNP3DDH.js} +2 -2
- package/dist/chunks/{chunk-SGCDZFYN.js → chunk-ZB5ZKFJQ.js} +5 -5
- package/dist/chunks/{client-HKFH5H35.js → client-N6XCTLGT.js} +2 -2
- package/dist/chunks/{client-YC5L5QLT.js → client-T3EFHHYO.js} +1 -1
- package/dist/chunks/{editor-seams-UO64XFLG.js → editor-seams-SLK4AKPL.js} +5 -5
- package/dist/chunks/{editor-store-5G2EZJZR.js → editor-store-2HJGI7VM.js} +1 -1
- package/dist/chunks/{eyedropper-YAXPS6GV.js → eyedropper-F7XRSUMW.js} +1 -1
- package/dist/chunks/{host-DO45LZO5.js → host-U2P5GPFZ.js} +5 -5
- package/dist/chunks/{libraries-GYHCVYRQ.js → libraries-IHQ4DXJ2.js} +4 -4
- package/dist/chunks/{live-WAG6WKQX.js → live-J4K5LOPF.js} +1 -1
- package/dist/chunks/{media-tool-JKL74DJN.js → media-tool-SYMYNQTK.js} +1 -1
- package/dist/chunks/{new-file-QEBA3MTW.js → new-file-U2UXHQIT.js} +2 -2
- package/dist/chunks/{plugin-22PY37TR.js → plugin-JTAHBDF4.js} +2 -2
- package/dist/chunks/{plugin-import-XMOYZBMP.js → plugin-import-2Y6UXFZ7.js} +9 -9
- package/dist/chunks/{presence-4WKWY6K2.js → presence-BCI3LELV.js} +2 -2
- package/dist/chunks/{project-GLBS6UXF.js → project-SHWNTP34.js} +1 -1
- package/dist/chunks/{publish-site-5KXMAT4K.js → publish-site-EQVFO4M4.js} +5 -5
- package/dist/chunks/{raster-actions-OQQMOBXD.js → raster-actions-UKA3H73N.js} +1 -1
- package/dist/chunks/{runner-MKJV5UFN.js → runner-4WA2V6YB.js} +20 -20
- package/dist/chunks/{store-CJG7UKVF.js → store-M44XUK34.js} +2 -2
- package/dist/chunks/{sync-7BQCQG7O.js → sync-EV4NXME6.js} +4 -4
- package/dist/chunks/{versions-XVVUW7SJ.js → versions-XZTDXS42.js} +4 -4
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -7,8 +7,8 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
builtinTools,
|
|
9
9
|
registerBuiltinTools
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-J7FJCDMZ.js";
|
|
11
|
+
import "./chunk-M2FW3CMB.js";
|
|
12
12
|
import "./chunk-L2JCZ2PL.js";
|
|
13
13
|
import "./chunk-NM7KO57Q.js";
|
|
14
14
|
import "./chunk-PWZXOKTK.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
needsSelection,
|
|
10
10
|
pageGo,
|
|
11
11
|
selectionIsPicture
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-M2FW3CMB.js";
|
|
13
13
|
import "./chunk-L2JCZ2PL.js";
|
|
14
14
|
import "./chunk-NM7KO57Q.js";
|
|
15
15
|
import "./chunk-PWZXOKTK.js";
|
|
@@ -224,7 +224,7 @@ var none = external_exports.object({});
|
|
|
224
224
|
var emit = (name, detail) => {
|
|
225
225
|
if (typeof window !== "undefined") window.dispatchEvent(new CustomEvent(name, { detail }));
|
|
226
226
|
};
|
|
227
|
-
var store = () => import("./editor-store-
|
|
227
|
+
var store = () => import("./editor-store-2HJGI7VM.js").then((m) => m.useEditorStore.getState());
|
|
228
228
|
var MODE_IDS = MODE_LIST.map((m) => m.id);
|
|
229
229
|
var MODE_ALIASES = { JAM: "POPCORN" };
|
|
230
230
|
var modeSet = defineCommand({
|
|
@@ -397,7 +397,7 @@ var aiOpen = defineCommand({
|
|
|
397
397
|
] } },
|
|
398
398
|
run: async ({ dialog, skillId }) => {
|
|
399
399
|
if (dialog) (await import("./client-store-LCOD5UE7.js")).openAiDialog(dialog);
|
|
400
|
-
else (await import("./store-
|
|
400
|
+
else (await import("./store-M44XUK34.js")).openAgentPanel({ skillId: skillId ?? null });
|
|
401
401
|
return { summary: dialog ? `Opened AI ${dialog}` : "Opened the agent" };
|
|
402
402
|
}
|
|
403
403
|
});
|
|
@@ -476,11 +476,11 @@ var toolPlace = defineCommand({
|
|
|
476
476
|
run: async ({ what }) => {
|
|
477
477
|
if (what === "media") {
|
|
478
478
|
const s = await store();
|
|
479
|
-
const { placeMediaFromPicker } = await import("./media-tool-
|
|
479
|
+
const { placeMediaFromPicker } = await import("./media-tool-SYMYNQTK.js");
|
|
480
480
|
await placeMediaFromPicker({ kind: "point", x: s.camera.x, y: s.camera.y });
|
|
481
481
|
return { summary: "Placing media" };
|
|
482
482
|
}
|
|
483
|
-
const { beginEyedrop } = await import("./eyedropper-
|
|
483
|
+
const { beginEyedrop } = await import("./eyedropper-F7XRSUMW.js");
|
|
484
484
|
void beginEyedrop();
|
|
485
485
|
return { summary: "Pick a color" };
|
|
486
486
|
}
|
|
@@ -498,7 +498,7 @@ var nodeRasterize = defineCommand({
|
|
|
498
498
|
keywords: ["rasterize", "raster", "flatten", "pixels", "paint layer", "erase", "bitmap"]
|
|
499
499
|
} },
|
|
500
500
|
run: async () => {
|
|
501
|
-
const { flattenSelectionToPaintLayer } = await import("./raster-actions-
|
|
501
|
+
const { flattenSelectionToPaintLayer } = await import("./raster-actions-UKA3H73N.js");
|
|
502
502
|
await flattenSelectionToPaintLayer();
|
|
503
503
|
return { summary: "Rasterized" };
|
|
504
504
|
}
|
|
@@ -4559,7 +4559,7 @@ function createPopcornSlice(set2, get2) {
|
|
|
4559
4559
|
privateMode: false,
|
|
4560
4560
|
setPrivateMode: (on) => {
|
|
4561
4561
|
set2({ privateMode: on });
|
|
4562
|
-
void import("./presence-
|
|
4562
|
+
void import("./presence-BCI3LELV.js").then((m) => m.setPresencePrivate(on)).catch(() => {
|
|
4563
4563
|
});
|
|
4564
4564
|
},
|
|
4565
4565
|
/** Reveal every private item THIS user created (they sync to collaborators). Others' stay theirs. */
|
|
@@ -6626,7 +6626,7 @@ var useEditorStore = create()(
|
|
|
6626
6626
|
// A copy is a new file, so it is cloud-backed like any other (see lib/client/cloud/new-file.ts).
|
|
6627
6627
|
// Returns '' when it was refused (offline, signed out, plan full) or failed; nothing is left behind.
|
|
6628
6628
|
duplicateDocument: async (id) => {
|
|
6629
|
-
const { duplicateDocumentToCloud } = await import("./sync-
|
|
6629
|
+
const { duplicateDocumentToCloud } = await import("./sync-EV4NXME6.js");
|
|
6630
6630
|
return duplicateDocumentToCloud(id);
|
|
6631
6631
|
},
|
|
6632
6632
|
deleteDocument: async (id) => {
|
|
@@ -10070,9 +10070,9 @@ if (typeof window !== "undefined") {
|
|
|
10070
10070
|
if (typeof window !== "undefined" && navigator.webdriver) {
|
|
10071
10071
|
window.__vpDesign = async (script, o = {}) => {
|
|
10072
10072
|
const [{ registerBuiltinTools, runTool }, { editorToolContext }, { createDesignPreview }] = await Promise.all([
|
|
10073
|
-
import("./tools-QDYTTOME.js").then(async (m) => ({ ...m, registerBuiltinTools: (await import("./builtin-
|
|
10074
|
-
import("./editor-seams-
|
|
10075
|
-
import("./live-
|
|
10073
|
+
import("./tools-QDYTTOME.js").then(async (m) => ({ ...m, registerBuiltinTools: (await import("./builtin-X3AREHEY.js")).registerBuiltinTools })),
|
|
10074
|
+
import("./editor-seams-SLK4AKPL.js"),
|
|
10075
|
+
import("./live-J4K5LOPF.js")
|
|
10076
10076
|
]);
|
|
10077
10077
|
registerBuiltinTools();
|
|
10078
10078
|
const args = JSON.stringify({ ...o.name ? { name: o.name } : {}, ...o.size ? { size: o.size } : {}, ...o.frame ? { frame: o.frame } : {}, script });
|
|
@@ -27,13 +27,13 @@ import {
|
|
|
27
27
|
import {
|
|
28
28
|
collabSession,
|
|
29
29
|
syncStatus
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-SOUVCBG7.js";
|
|
31
31
|
import {
|
|
32
32
|
loadEntitlements
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-SGELR6GD.js";
|
|
34
34
|
import {
|
|
35
35
|
useEditorStore
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-2RKQUQZI.js";
|
|
37
37
|
import {
|
|
38
38
|
cloudApi
|
|
39
39
|
} from "./chunk-MPYFCJ4A.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
hostEnv,
|
|
10
10
|
plain,
|
|
11
11
|
registerBuiltinCommands
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-M2FW3CMB.js";
|
|
13
13
|
import {
|
|
14
14
|
storeOpsSeam
|
|
15
15
|
} from "./chunk-CYUSQUYT.js";
|
|
@@ -692,7 +692,7 @@ var pluginRun = defineCommand({
|
|
|
692
692
|
}
|
|
693
693
|
},
|
|
694
694
|
run: async (p, ctx) => {
|
|
695
|
-
const { runPlugin } = await import("./host-
|
|
695
|
+
const { runPlugin } = await import("./host-U2P5GPFZ.js");
|
|
696
696
|
await runPlugin(p.pluginId, p.commandId);
|
|
697
697
|
ctx.notice(`Started ${p.pluginId}.`);
|
|
698
698
|
return {
|
|
@@ -3315,7 +3315,7 @@ var viewCopyLink = defineCommand({
|
|
|
3315
3315
|
},
|
|
3316
3316
|
run: async (args, ctx) => {
|
|
3317
3317
|
const [{ syncStatus }, { fileUrl }, { withDeepLink }] = await Promise.all([
|
|
3318
|
-
import("./sync-
|
|
3318
|
+
import("./sync-EV4NXME6.js"),
|
|
3319
3319
|
import("./api-DH3CEYHF.js"),
|
|
3320
3320
|
import("./deep-link-AXEHT53U.js")
|
|
3321
3321
|
]);
|
|
@@ -3640,7 +3640,7 @@ var pageGo = defineCommand({
|
|
|
3640
3640
|
] }
|
|
3641
3641
|
},
|
|
3642
3642
|
run: async ({ to }) => {
|
|
3643
|
-
const { useEditorStore } = await import("./editor-store-
|
|
3643
|
+
const { useEditorStore } = await import("./editor-store-2HJGI7VM.js");
|
|
3644
3644
|
useEditorStore.getState().goToPrintPage(to);
|
|
3645
3645
|
return { summary: typeof to === "number" ? `Page ${to + 1}` : `${to} page` };
|
|
3646
3646
|
}
|
|
@@ -3674,7 +3674,7 @@ var pageSetup = defineCommand({
|
|
|
3674
3674
|
}
|
|
3675
3675
|
},
|
|
3676
3676
|
run: async (args) => {
|
|
3677
|
-
const { useEditorStore } = await import("./editor-store-
|
|
3677
|
+
const { useEditorStore } = await import("./editor-store-2HJGI7VM.js");
|
|
3678
3678
|
useEditorStore.getState().applyPageSetup(args);
|
|
3679
3679
|
return { summary: `Page setup updated${args.kind ? ` (${args.kind.toLowerCase()})` : ""}` };
|
|
3680
3680
|
}
|
|
@@ -4864,7 +4864,7 @@ var exportLottie = animationCommand((args) => args.container === "lottie" ? "dot
|
|
|
4864
4864
|
var EXPORT_NODE_CAP = 2e4;
|
|
4865
4865
|
async function exportSite(doc2, pageId2, packaging, styling = "css") {
|
|
4866
4866
|
const [{ completeSite, nextFilesOf, staticFilesOf, NoSiteRuntime, bytesOf }, { fileBase }, { zipFiles }, { downloadBlob }] = await Promise.all([
|
|
4867
|
-
import("./project-
|
|
4867
|
+
import("./project-SHWNTP34.js"),
|
|
4868
4868
|
import("./web-2WCDIGD6.js"),
|
|
4869
4869
|
import("./zip-export-MXQMQMO4.js"),
|
|
4870
4870
|
import("./download-QK6I3IWH.js")
|
|
@@ -7848,7 +7848,7 @@ init_scene_graph();
|
|
|
7848
7848
|
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.");
|
|
7849
7849
|
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 });
|
|
7850
7850
|
async function placeImportedPicture(ctx, imported, at, what, extra = {}) {
|
|
7851
|
-
const client = await import("./client-
|
|
7851
|
+
const client = await import("./client-T3EFHHYO.js");
|
|
7852
7852
|
if (at.fillLayerId) {
|
|
7853
7853
|
const doc2 = ctx.doc();
|
|
7854
7854
|
const target = nodeOrThrow(doc2, at.fillLayerId);
|
|
@@ -7894,7 +7894,7 @@ var photoSearch = defineCommand({
|
|
|
7894
7894
|
}
|
|
7895
7895
|
},
|
|
7896
7896
|
run: async (args) => {
|
|
7897
|
-
const { searchStockPhotos } = await import("./client-
|
|
7897
|
+
const { searchStockPhotos } = await import("./client-T3EFHHYO.js");
|
|
7898
7898
|
const page = await searchStockPhotos(args.query, args.page ?? 1, { licence: args.licence });
|
|
7899
7899
|
return {
|
|
7900
7900
|
summary: `${page.results.length} photo${page.results.length === 1 ? "" : "s"} for \u201C${page.query}\u201D (page ${page.page} of ${page.pageCount || 1})`,
|
|
@@ -7928,7 +7928,7 @@ var photoInsert = defineCommand({
|
|
|
7928
7928
|
run: async (args, ctx) => {
|
|
7929
7929
|
if (!args.id && !args.query) throw new ToolError("Pass an id from search_photos, or a query.");
|
|
7930
7930
|
if (args.id && !isPhotoId(args.id)) throw new ToolError(`"${args.id}" is not a photo id from search_photos.`);
|
|
7931
|
-
const client = await import("./client-
|
|
7931
|
+
const client = await import("./client-T3EFHHYO.js");
|
|
7932
7932
|
let photo;
|
|
7933
7933
|
if (args.id) photo = await client.stockPhotoInfo(args.id);
|
|
7934
7934
|
else {
|
|
@@ -7967,7 +7967,7 @@ var mediaList = defineCommand({
|
|
|
7967
7967
|
}
|
|
7968
7968
|
},
|
|
7969
7969
|
run: async (args) => {
|
|
7970
|
-
const { listLibraryMedia } = await import("./client-
|
|
7970
|
+
const { listLibraryMedia } = await import("./client-N6XCTLGT.js");
|
|
7971
7971
|
const page = await listLibraryMedia(args);
|
|
7972
7972
|
return { summary: `${page.items.length} media item${page.items.length === 1 ? "" : "s"}${page.nextCursor ? " (more)" : ""}`, data: { workspaceId: page.workspaceId, items: page.items.map(brief3), nextCursor: page.nextCursor } };
|
|
7973
7973
|
}
|
|
@@ -7998,7 +7998,7 @@ var mediaInsert = defineCommand({
|
|
|
7998
7998
|
run: async (args, ctx) => {
|
|
7999
7999
|
const contentType = args.contentType ?? "image/*";
|
|
8000
8000
|
if (!contentType.startsWith("image/")) throw new ToolError("insert_media places pictures; this item is not one.");
|
|
8001
|
-
const { importLibraryPicture } = await import("./client-
|
|
8001
|
+
const { importLibraryPicture } = await import("./client-N6XCTLGT.js");
|
|
8002
8002
|
const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "Media", contentType, size: 0, createdAt: "", fileCount: 1, source: null };
|
|
8003
8003
|
const imported = await importLibraryPicture(item);
|
|
8004
8004
|
return placeImportedPicture(ctx, imported, args, `\u201C${imported.name}\u201D`, { hash: imported.hash });
|
|
@@ -8270,7 +8270,7 @@ async function signedIn() {
|
|
|
8270
8270
|
}
|
|
8271
8271
|
async function publishedFile() {
|
|
8272
8272
|
await signedIn();
|
|
8273
|
-
const { openFileKey } = await import("./publish-site-
|
|
8273
|
+
const { openFileKey } = await import("./publish-site-EQVFO4M4.js");
|
|
8274
8274
|
const key = openFileKey();
|
|
8275
8275
|
if (!key) throw new CommandError("This file is not saved to the cloud yet, so it has no site. Publish it first.", "failed");
|
|
8276
8276
|
return key;
|
|
@@ -8306,7 +8306,7 @@ var publishSite = defineCommand({
|
|
|
8306
8306
|
const { cleanSlug } = await import("./rules-P7T57YUG.js");
|
|
8307
8307
|
const address = p.address === void 0 ? void 0 : cleanSlug(p.address);
|
|
8308
8308
|
if (address === null) throw new CommandError("That cannot be a site address: use 3 to 40 letters, digits and dashes.", "invalid_params");
|
|
8309
|
-
const { publishOpenFile, NoScreens } = await import("./publish-site-
|
|
8309
|
+
const { publishOpenFile, NoScreens } = await import("./publish-site-EQVFO4M4.js");
|
|
8310
8310
|
try {
|
|
8311
8311
|
const done = await publishOpenFile(address);
|
|
8312
8312
|
ctx.notice(`Published version ${done.version}: ${done.url}`);
|
|
@@ -8361,7 +8361,7 @@ var publishStatus = defineCommand({
|
|
|
8361
8361
|
},
|
|
8362
8362
|
run: async () => {
|
|
8363
8363
|
await signedIn();
|
|
8364
|
-
const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-
|
|
8364
|
+
const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-EQVFO4M4.js"), import("./sites-V4I4PO32.js")]);
|
|
8365
8365
|
const key = openFileKey();
|
|
8366
8366
|
const status = await siteStatus(key);
|
|
8367
8367
|
const site = status.site;
|
|
@@ -8704,7 +8704,7 @@ var integrationOpen = defineCommand({
|
|
|
8704
8704
|
}
|
|
8705
8705
|
});
|
|
8706
8706
|
async function openFile() {
|
|
8707
|
-
const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-KPKHE3BG.js"), import("./publish-site-
|
|
8707
|
+
const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-KPKHE3BG.js"), import("./publish-site-EQVFO4M4.js")]);
|
|
8708
8708
|
if (!cloudUser()) throw new CommandError("You are not signed in.", "denied");
|
|
8709
8709
|
const key = openFileKey();
|
|
8710
8710
|
if (!key) throw new CommandError("This file is not saved to the cloud yet. Publish it first (publish_site).", "failed");
|
|
@@ -9483,7 +9483,7 @@ var docImportFile = defineCommand({
|
|
|
9483
9483
|
const file = new File([body], args.name);
|
|
9484
9484
|
if (file.size > MAX_BYTES) throw new ToolError(`"${args.name}" is larger than ${MAX_BYTES / 1024 / 1024} MB.`);
|
|
9485
9485
|
const [{ buildImportedDocument }, { mergeImportedDocument }] = await Promise.all([
|
|
9486
|
-
import("./plugin-import-
|
|
9486
|
+
import("./plugin-import-2Y6UXFZ7.js"),
|
|
9487
9487
|
import("./import-merge-CUTRQ6LM.js")
|
|
9488
9488
|
]);
|
|
9489
9489
|
const built = await buildImportedDocument(file);
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-L6DF4F6R.js";
|
|
22
22
|
import {
|
|
23
23
|
useEditorStore
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-2RKQUQZI.js";
|
|
25
25
|
import {
|
|
26
26
|
create
|
|
27
27
|
} from "./chunk-QKOZ2B5K.js";
|
|
@@ -1422,7 +1422,7 @@ async function sendMessage(text) {
|
|
|
1422
1422
|
if (!useAgentStore.getState().activeThreadId) newThread();
|
|
1423
1423
|
const mentions = pruneMentions(body, useAgentStore.getState().draftMentions);
|
|
1424
1424
|
useAgentStore.setState({ draft: "", draftMentions: [], error: null });
|
|
1425
|
-
const { runTurn } = await import("./runner-
|
|
1425
|
+
const { runTurn } = await import("./runner-4WA2V6YB.js");
|
|
1426
1426
|
await runTurn(body, mentions);
|
|
1427
1427
|
}
|
|
1428
1428
|
function stop() {
|
|
@@ -1525,7 +1525,7 @@ var clearTaskChildren = () => useAgentStore.setState({ taskChildren: {} });
|
|
|
1525
1525
|
function subscribeChildTools() {
|
|
1526
1526
|
let dispose;
|
|
1527
1527
|
let cancelled = false;
|
|
1528
|
-
void import("./runner-
|
|
1528
|
+
void import("./runner-4WA2V6YB.js").then(({ onChildTool }) => {
|
|
1529
1529
|
const off = onChildTool((report) => {
|
|
1530
1530
|
if (report?.status !== "running" || report.jobId) return;
|
|
1531
1531
|
recordChildTool(report.toolCallId ?? "", report.name);
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
newFileRefusal,
|
|
15
15
|
reportNewFileBlocked,
|
|
16
16
|
setCloudLink
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SGELR6GD.js";
|
|
18
18
|
import {
|
|
19
19
|
activeTeamWorkspaceId
|
|
20
20
|
} from "./chunk-YIRD2LU3.js";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./chunk-73U3L223.js";
|
|
25
25
|
import {
|
|
26
26
|
attachPresence
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-FIZZ2SIM.js";
|
|
28
28
|
import {
|
|
29
29
|
documentPath,
|
|
30
30
|
isDesktopTabs,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
setCollabHistory,
|
|
39
39
|
storedDocument,
|
|
40
40
|
useEditorStore
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-2RKQUQZI.js";
|
|
42
42
|
import {
|
|
43
43
|
deleteDocFromLibrary,
|
|
44
44
|
docExists,
|
|
@@ -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-2HJGI7VM.js"),
|
|
95
95
|
import("../lib/document/photo-frames.js"),
|
|
96
|
-
import("./media-tool-
|
|
96
|
+
import("./media-tool-SYMYNQTK.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);
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-I2JKO4S5.js";
|
|
10
10
|
import {
|
|
11
11
|
syncStatus
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SOUVCBG7.js";
|
|
13
13
|
import {
|
|
14
14
|
exportNodeToSVG
|
|
15
15
|
} from "./chunk-7B4L7MIH.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import {
|
|
23
23
|
setPluginTabs,
|
|
24
24
|
useEditorStore
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-2RKQUQZI.js";
|
|
26
26
|
import {
|
|
27
27
|
TOKEN_IDS,
|
|
28
28
|
tokenVar
|
|
@@ -54,7 +54,7 @@ init_define_POPCRAFT_COMPONENT_IDS();
|
|
|
54
54
|
// lib/plugins/api.ts
|
|
55
55
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
56
56
|
async function handlePluginCall(env, method, params = {}) {
|
|
57
|
-
const { dispatchPluginCall } = await import("./plugin-
|
|
57
|
+
const { dispatchPluginCall } = await import("./plugin-JTAHBDF4.js");
|
|
58
58
|
return dispatchPluginCall(env, method, params);
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -378,7 +378,7 @@ async function runPlugin(pluginId, commandId, opts = {}) {
|
|
|
378
378
|
if (!opened) throw new Error("The browser blocked the new tab");
|
|
379
379
|
},
|
|
380
380
|
createDocument: async (opts2) => {
|
|
381
|
-
const { createFreshFileOrExplain } = await import("./new-file-
|
|
381
|
+
const { createFreshFileOrExplain } = await import("./new-file-U2UXHQIT.js");
|
|
382
382
|
const created = await createFreshFileOrExplain({}, { name: opts2?.name });
|
|
383
383
|
if (!created.ok) throw new Error(created.reason === "plan" ? "Plan limit reached" : created.reason === "guest-limit" ? "Sign in to create another file" : `Could not create file (${created.reason})`);
|
|
384
384
|
await useEditorStore.getState().openDocument(created.docId);
|
|
@@ -538,7 +538,7 @@ if (typeof window !== "undefined") {
|
|
|
538
538
|
const name = d.name || "Imported";
|
|
539
539
|
void (async () => {
|
|
540
540
|
try {
|
|
541
|
-
const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-
|
|
541
|
+
const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-2Y6UXFZ7.js");
|
|
542
542
|
if (d.ir && typeof d.ir === "object") {
|
|
543
543
|
await applyPluginLayoutIr(d.ir, { mode, name });
|
|
544
544
|
return;
|
|
@@ -7,7 +7,7 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
defaultMeasure,
|
|
9
9
|
placePicture
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WWNP3DDH.js";
|
|
11
11
|
import "./chunk-QIVAS3NC.js";
|
|
12
12
|
import {
|
|
13
13
|
api
|
|
@@ -121,7 +121,7 @@ async function placeLibraryItem(item, opts = {}) {
|
|
|
121
121
|
}
|
|
122
122
|
if (item.contentType.startsWith("video/")) {
|
|
123
123
|
const file = await libraryFile(item, opts);
|
|
124
|
-
const [{ useEditorStore }, { placeMediaFile }] = await Promise.all([import("./editor-store-
|
|
124
|
+
const [{ useEditorStore }, { placeMediaFile }] = await Promise.all([import("./editor-store-2HJGI7VM.js"), import("./media-tool-SYMYNQTK.js")]);
|
|
125
125
|
const cam = useEditorStore.getState().camera;
|
|
126
126
|
await placeMediaFile(file, { kind: "point", ...opts.at ?? { x: cam.x, y: cam.y } });
|
|
127
127
|
return useEditorStore.getState().selection[0] ?? null;
|
|
@@ -7,7 +7,7 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
editBlockReason,
|
|
9
9
|
editorToolContext
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EIHEOYZ5.js";
|
|
11
11
|
import "./chunk-7JWLVDTD.js";
|
|
12
12
|
import "./chunk-CYUSQUYT.js";
|
|
13
13
|
import "./chunk-RN3OUB4Z.js";
|
|
@@ -18,9 +18,9 @@ import "./chunk-L6DF4F6R.js";
|
|
|
18
18
|
import "./chunk-GFEGC5PN.js";
|
|
19
19
|
import "./chunk-2WZZ7GII.js";
|
|
20
20
|
import "./chunk-V5JCSC74.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-SOUVCBG7.js";
|
|
22
22
|
import "./chunk-YVHQESDU.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-SGELR6GD.js";
|
|
24
24
|
import "./chunk-YIRD2LU3.js";
|
|
25
25
|
import "./chunk-73U3L223.js";
|
|
26
26
|
import "./chunk-7B4L7MIH.js";
|
|
@@ -39,8 +39,8 @@ import "./chunk-BZBEKFIM.js";
|
|
|
39
39
|
import "./chunk-EGZFZKKW.js";
|
|
40
40
|
import "./chunk-DNJ2JXEP.js";
|
|
41
41
|
import "./chunk-Q6NFF6DX.js";
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-FIZZ2SIM.js";
|
|
43
|
+
import "./chunk-2RKQUQZI.js";
|
|
44
44
|
import "./chunk-FOPWTTWN.js";
|
|
45
45
|
import "./chunk-MVM6Q75O.js";
|
|
46
46
|
import "./chunk-26XDPYKE.js";
|
|
@@ -18,12 +18,12 @@ import {
|
|
|
18
18
|
runPluginWithImport,
|
|
19
19
|
runningSessionFor,
|
|
20
20
|
setEnabled
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ZB5ZKFJQ.js";
|
|
22
22
|
import "./chunk-I2JKO4S5.js";
|
|
23
23
|
import "./chunk-77RQ2YCO.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-SOUVCBG7.js";
|
|
25
25
|
import "./chunk-YVHQESDU.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-SGELR6GD.js";
|
|
27
27
|
import "./chunk-YIRD2LU3.js";
|
|
28
28
|
import "./chunk-73U3L223.js";
|
|
29
29
|
import "./chunk-7B4L7MIH.js";
|
|
@@ -41,8 +41,8 @@ import "./chunk-77GARPO7.js";
|
|
|
41
41
|
import "./chunk-I5QURTTK.js";
|
|
42
42
|
import "./chunk-BZBEKFIM.js";
|
|
43
43
|
import "./chunk-Q6NFF6DX.js";
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-FIZZ2SIM.js";
|
|
45
|
+
import "./chunk-2RKQUQZI.js";
|
|
46
46
|
import "./chunk-FOPWTTWN.js";
|
|
47
47
|
import "./chunk-MVM6Q75O.js";
|
|
48
48
|
import "./chunk-26XDPYKE.js";
|
|
@@ -7,16 +7,16 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
onSyncStatus,
|
|
9
9
|
syncStatus
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SOUVCBG7.js";
|
|
11
11
|
import "./chunk-YVHQESDU.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-SGELR6GD.js";
|
|
13
13
|
import "./chunk-YIRD2LU3.js";
|
|
14
14
|
import "./chunk-73U3L223.js";
|
|
15
15
|
import "./chunk-AMCLYCZZ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-FIZZ2SIM.js";
|
|
17
17
|
import {
|
|
18
18
|
useEditorStore
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-2RKQUQZI.js";
|
|
20
20
|
import "./chunk-FOPWTTWN.js";
|
|
21
21
|
import "./chunk-MVM6Q75O.js";
|
|
22
22
|
import "./chunk-26XDPYKE.js";
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
createNewLocalFile,
|
|
13
13
|
documentFromSeed,
|
|
14
14
|
newFileRefusal
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-SGELR6GD.js";
|
|
16
16
|
import "./chunk-YIRD2LU3.js";
|
|
17
17
|
import "./chunk-AMCLYCZZ.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-2RKQUQZI.js";
|
|
19
19
|
import "./chunk-FOPWTTWN.js";
|
|
20
20
|
import "./chunk-MVM6Q75O.js";
|
|
21
21
|
import "./chunk-26XDPYKE.js";
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
pluginMethods,
|
|
13
13
|
pluginRun,
|
|
14
14
|
registerPluginCommands
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-KWOU53PH.js";
|
|
16
|
+
import "./chunk-M2FW3CMB.js";
|
|
17
17
|
import "./chunk-L2JCZ2PL.js";
|
|
18
18
|
import "./chunk-NM7KO57Q.js";
|
|
19
19
|
import "./chunk-PWZXOKTK.js";
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./chunk-5IF2HV4X.js";
|
|
10
10
|
import {
|
|
11
11
|
runPluginWithImport
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZB5ZKFJQ.js";
|
|
13
13
|
import "./chunk-I2JKO4S5.js";
|
|
14
14
|
import {
|
|
15
15
|
editBlockReason
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-EIHEOYZ5.js";
|
|
17
17
|
import "./chunk-7JWLVDTD.js";
|
|
18
18
|
import "./chunk-CYUSQUYT.js";
|
|
19
19
|
import "./chunk-RN3OUB4Z.js";
|
|
@@ -25,11 +25,11 @@ import "./chunk-L6DF4F6R.js";
|
|
|
25
25
|
import "./chunk-GFEGC5PN.js";
|
|
26
26
|
import "./chunk-2WZZ7GII.js";
|
|
27
27
|
import "./chunk-V5JCSC74.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-SOUVCBG7.js";
|
|
29
29
|
import "./chunk-YVHQESDU.js";
|
|
30
30
|
import {
|
|
31
31
|
createFreshFileOrExplain
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-SGELR6GD.js";
|
|
33
33
|
import "./chunk-YIRD2LU3.js";
|
|
34
34
|
import "./chunk-73U3L223.js";
|
|
35
35
|
import "./chunk-7B4L7MIH.js";
|
|
@@ -49,10 +49,10 @@ import "./chunk-BZBEKFIM.js";
|
|
|
49
49
|
import "./chunk-EGZFZKKW.js";
|
|
50
50
|
import "./chunk-DNJ2JXEP.js";
|
|
51
51
|
import "./chunk-Q6NFF6DX.js";
|
|
52
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-FIZZ2SIM.js";
|
|
53
53
|
import {
|
|
54
54
|
useEditorStore
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-2RKQUQZI.js";
|
|
56
56
|
import "./chunk-FOPWTTWN.js";
|
|
57
57
|
import "./chunk-MVM6Q75O.js";
|
|
58
58
|
import "./chunk-26XDPYKE.js";
|
|
@@ -335,7 +335,7 @@ async function applyLayoutIrNow(ir, opts) {
|
|
|
335
335
|
customFonts: cur.customFonts,
|
|
336
336
|
lastToolProps: cur.lastToolProps
|
|
337
337
|
});
|
|
338
|
-
const { collabSession } = await import("./sync-
|
|
338
|
+
const { collabSession } = await import("./sync-EV4NXME6.js");
|
|
339
339
|
collabSession()?.flush();
|
|
340
340
|
usePluginStore.getState().toast(t("pluginImport.imported", { name: opts.name }));
|
|
341
341
|
return true;
|
|
@@ -490,7 +490,7 @@ async function openCreated(created, opener, frameIds) {
|
|
|
490
490
|
if (created.local) {
|
|
491
491
|
await useEditorStore.getState().openDocument(created.docId);
|
|
492
492
|
} else {
|
|
493
|
-
const { openFilledCloudDocument } = await import("./sync-
|
|
493
|
+
const { openFilledCloudDocument } = await import("./sync-EV4NXME6.js");
|
|
494
494
|
await openFilledCloudDocument(created.docId, created.key, 0);
|
|
495
495
|
}
|
|
496
496
|
zoomImportedFrames(frameIds);
|
|
@@ -527,7 +527,7 @@ async function hostImportIntoOpenDoc(file) {
|
|
|
527
527
|
customFonts: cur.customFonts,
|
|
528
528
|
lastToolProps: cur.lastToolProps
|
|
529
529
|
});
|
|
530
|
-
const { collabSession } = await import("./sync-
|
|
530
|
+
const { collabSession } = await import("./sync-EV4NXME6.js");
|
|
531
531
|
collabSession()?.flush();
|
|
532
532
|
return { notes: built.notes };
|
|
533
533
|
}
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
setPresencePrivate,
|
|
15
15
|
setSpotlight,
|
|
16
16
|
usePresence
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-FIZZ2SIM.js";
|
|
18
|
+
import "./chunk-2RKQUQZI.js";
|
|
19
19
|
import "./chunk-FOPWTTWN.js";
|
|
20
20
|
import "./chunk-MVM6Q75O.js";
|
|
21
21
|
import "./chunk-26XDPYKE.js";
|
|
@@ -937,7 +937,7 @@ init_define_POPCRAFT_COMPONENT_IDS();
|
|
|
937
937
|
// packages/runtime/package.json
|
|
938
938
|
var package_default = {
|
|
939
939
|
name: "@popcraft/runtime",
|
|
940
|
-
version: "0.8.
|
|
940
|
+
version: "0.8.2",
|
|
941
941
|
description: "What code exported from PopCraft shares: the meaning of expressions (operators and functions) and, as it grows, the parts of a design's behaviour that are common code rather than generated React.",
|
|
942
942
|
license: "MIT",
|
|
943
943
|
homepage: "https://popcraft.app/docs/exporting/nextjs",
|
|
@@ -13,16 +13,16 @@ import "./chunk-TWYPUUCX.js";
|
|
|
13
13
|
import {
|
|
14
14
|
syncStatus,
|
|
15
15
|
uploadActiveDocument
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-SOUVCBG7.js";
|
|
17
17
|
import "./chunk-YVHQESDU.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-SGELR6GD.js";
|
|
19
19
|
import "./chunk-YIRD2LU3.js";
|
|
20
20
|
import "./chunk-73U3L223.js";
|
|
21
21
|
import "./chunk-AMCLYCZZ.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-FIZZ2SIM.js";
|
|
23
23
|
import {
|
|
24
24
|
useEditorStore
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-2RKQUQZI.js";
|
|
26
26
|
import "./chunk-FOPWTTWN.js";
|
|
27
27
|
import "./chunk-MVM6Q75O.js";
|
|
28
28
|
import "./chunk-26XDPYKE.js";
|
|
@@ -133,7 +133,7 @@ async function publishOpenFile(slug, progress = {}) {
|
|
|
133
133
|
progress.onBuild?.();
|
|
134
134
|
const key = openFileKey() ?? await uploadActiveDocument();
|
|
135
135
|
const { document, currentPageId } = useEditorStore.getState();
|
|
136
|
-
const { completeSite, staticFilesOf } = await import("./project-
|
|
136
|
+
const { completeSite, staticFilesOf } = await import("./project-SHWNTP34.js");
|
|
137
137
|
const built = await completeSite(document, currentPageId);
|
|
138
138
|
if (!built.pages.length) throw new NoScreens();
|
|
139
139
|
const files = await staticFilesOf(built);
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
updateActiveThread,
|
|
20
20
|
updateMessage,
|
|
21
21
|
useAgentStore
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-QENL3J7E.js";
|
|
23
23
|
import {
|
|
24
24
|
ALL_TOOLS,
|
|
25
25
|
SUBAGENT_FRAMING,
|
|
@@ -29,22 +29,22 @@ import {
|
|
|
29
29
|
} from "./chunk-R7LS46JH.js";
|
|
30
30
|
import {
|
|
31
31
|
registerBuiltinTools
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-J7FJCDMZ.js";
|
|
33
33
|
import "./chunk-3IJZGFGH.js";
|
|
34
34
|
import {
|
|
35
35
|
pluginRun
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-KWOU53PH.js";
|
|
37
37
|
import {
|
|
38
38
|
integrationConfirmCommands,
|
|
39
39
|
publishCommands
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-M2FW3CMB.js";
|
|
41
41
|
import "./chunk-L2JCZ2PL.js";
|
|
42
42
|
import "./chunk-NM7KO57Q.js";
|
|
43
43
|
import "./chunk-PWZXOKTK.js";
|
|
44
44
|
import {
|
|
45
45
|
editBlockReason,
|
|
46
46
|
editorToolContext
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-EIHEOYZ5.js";
|
|
48
48
|
import "./chunk-7JWLVDTD.js";
|
|
49
49
|
import "./chunk-CYUSQUYT.js";
|
|
50
50
|
import "./chunk-RN3OUB4Z.js";
|
|
@@ -80,9 +80,9 @@ import {
|
|
|
80
80
|
import {
|
|
81
81
|
defineCommand
|
|
82
82
|
} from "./chunk-V5JCSC74.js";
|
|
83
|
-
import "./chunk-
|
|
83
|
+
import "./chunk-SOUVCBG7.js";
|
|
84
84
|
import "./chunk-YVHQESDU.js";
|
|
85
|
-
import "./chunk-
|
|
85
|
+
import "./chunk-SGELR6GD.js";
|
|
86
86
|
import {
|
|
87
87
|
activeHyperyTeamId
|
|
88
88
|
} from "./chunk-YIRD2LU3.js";
|
|
@@ -103,10 +103,10 @@ import "./chunk-BZBEKFIM.js";
|
|
|
103
103
|
import "./chunk-EGZFZKKW.js";
|
|
104
104
|
import "./chunk-DNJ2JXEP.js";
|
|
105
105
|
import "./chunk-Q6NFF6DX.js";
|
|
106
|
-
import "./chunk-
|
|
106
|
+
import "./chunk-FIZZ2SIM.js";
|
|
107
107
|
import {
|
|
108
108
|
useEditorStore
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-2RKQUQZI.js";
|
|
110
110
|
import "./chunk-FOPWTTWN.js";
|
|
111
111
|
import "./chunk-MVM6Q75O.js";
|
|
112
112
|
import "./chunk-26XDPYKE.js";
|
|
@@ -993,7 +993,7 @@ var collabSetSpotlight = defineCommand({
|
|
|
993
993
|
}
|
|
994
994
|
},
|
|
995
995
|
run: async ({ on }, ctx) => {
|
|
996
|
-
const { setSpotlight } = await import("./presence-
|
|
996
|
+
const { setSpotlight } = await import("./presence-BCI3LELV.js");
|
|
997
997
|
setSpotlight(on);
|
|
998
998
|
ctx.notice(on ? "Spotlight on \u2014 everyone is following this view." : "Spotlight off.");
|
|
999
999
|
return { summary: on ? "Spotlight on" : "Spotlight off", data: { spotlight: on } };
|
|
@@ -1020,7 +1020,7 @@ var collabRevealPrivate = defineCommand({
|
|
|
1020
1020
|
}
|
|
1021
1021
|
},
|
|
1022
1022
|
run: async (_p, ctx) => {
|
|
1023
|
-
const { useEditorStore: useEditorStore2 } = await import("./editor-store-
|
|
1023
|
+
const { useEditorStore: useEditorStore2 } = await import("./editor-store-2HJGI7VM.js");
|
|
1024
1024
|
const before = Object.values(useEditorStore2.getState().document.nodes).filter((n) => n.privateTo).length;
|
|
1025
1025
|
useEditorStore2.getState().revealPrivate();
|
|
1026
1026
|
ctx.notice(before ? `Revealed ${before} private item${before === 1 ? "" : "s"}.` : "Nothing was private.");
|
|
@@ -1084,7 +1084,7 @@ var documentDelete = defineCommand({
|
|
|
1084
1084
|
}
|
|
1085
1085
|
},
|
|
1086
1086
|
run: async ({ id }, ctx) => {
|
|
1087
|
-
const { useEditorStore: useEditorStore2 } = await import("./editor-store-
|
|
1087
|
+
const { useEditorStore: useEditorStore2 } = await import("./editor-store-2HJGI7VM.js");
|
|
1088
1088
|
const wasOpen = useEditorStore2.getState().document.id === id;
|
|
1089
1089
|
await useEditorStore2.getState().deleteDocument(id);
|
|
1090
1090
|
ctx.notice("Deleted the document.");
|
|
@@ -1097,7 +1097,7 @@ var docCommands = [docImportJson, documentDelete];
|
|
|
1097
1097
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
1098
1098
|
async function cloudFile() {
|
|
1099
1099
|
const [{ syncStatus }, { cloudUser }] = await Promise.all([
|
|
1100
|
-
import("./sync-
|
|
1100
|
+
import("./sync-EV4NXME6.js"),
|
|
1101
1101
|
import("./session-KPKHE3BG.js")
|
|
1102
1102
|
]);
|
|
1103
1103
|
const link = syncStatus().link;
|
|
@@ -1270,7 +1270,7 @@ var libraryPublish = defineCommand({
|
|
|
1270
1270
|
}
|
|
1271
1271
|
},
|
|
1272
1272
|
run: async (p, ctx) => {
|
|
1273
|
-
const { publishLibrary } = await import("./libraries-
|
|
1273
|
+
const { publishLibrary } = await import("./libraries-IHQ4DXJ2.js");
|
|
1274
1274
|
const doc = ctx.doc();
|
|
1275
1275
|
const pick = {
|
|
1276
1276
|
componentIds: p.componentIds ?? Object.keys(doc.components ?? {}),
|
|
@@ -1302,7 +1302,7 @@ var libraryUnpublish = defineCommand({
|
|
|
1302
1302
|
},
|
|
1303
1303
|
run: async ({ libraryId }, ctx) => {
|
|
1304
1304
|
if (!libraryId.trim()) throw new CommandError("Which library? Pass its `libraryId`.", "invalid_params");
|
|
1305
|
-
const { unpublishLibrary } = await import("./libraries-
|
|
1305
|
+
const { unpublishLibrary } = await import("./libraries-IHQ4DXJ2.js");
|
|
1306
1306
|
await unpublishLibrary(libraryId);
|
|
1307
1307
|
ctx.notice(`Unpublished library ${libraryId}.`);
|
|
1308
1308
|
return { summary: `Unpublished library ${libraryId}`, data: { libraryId, unpublished: true } };
|
|
@@ -1314,8 +1314,8 @@ var libraryCommands = [libraryPublish, libraryUnpublish];
|
|
|
1314
1314
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
1315
1315
|
async function findVersion(id) {
|
|
1316
1316
|
const [{ useEditorStore: useEditorStore2 }, { versionLabel }] = await Promise.all([
|
|
1317
|
-
import("./editor-store-
|
|
1318
|
-
import("./versions-
|
|
1317
|
+
import("./editor-store-2HJGI7VM.js"),
|
|
1318
|
+
import("./versions-XZTDXS42.js")
|
|
1319
1319
|
]);
|
|
1320
1320
|
const meta = useEditorStore2.getState().versions.find((v) => v.id === id);
|
|
1321
1321
|
if (!meta) {
|
|
@@ -1348,7 +1348,7 @@ var versionRestore = defineCommand({
|
|
|
1348
1348
|
},
|
|
1349
1349
|
run: async ({ id }) => {
|
|
1350
1350
|
const found = await findVersion(id);
|
|
1351
|
-
const { restoreVersion } = await import("./versions-
|
|
1351
|
+
const { restoreVersion } = await import("./versions-XZTDXS42.js");
|
|
1352
1352
|
await restoreVersion(found.meta);
|
|
1353
1353
|
return { summary: `Restored \u201C${found.label}\u201D`, data: { id, label: found.label, restored: true } };
|
|
1354
1354
|
}
|
|
@@ -1373,7 +1373,7 @@ var versionDelete = defineCommand({
|
|
|
1373
1373
|
},
|
|
1374
1374
|
run: async ({ id }, ctx) => {
|
|
1375
1375
|
const found = await findVersion(id);
|
|
1376
|
-
const { deleteVersion } = await import("./versions-
|
|
1376
|
+
const { deleteVersion } = await import("./versions-XZTDXS42.js");
|
|
1377
1377
|
await deleteVersion(found.meta);
|
|
1378
1378
|
ctx.notice(`Deleted the version \u201C${found.label}\u201D.`);
|
|
1379
1379
|
return { summary: `Deleted the version \u201C${found.label}\u201D`, data: { id, label: found.label, deleted: true } };
|
|
@@ -1674,7 +1674,7 @@ async function runTurn(text, mentions = []) {
|
|
|
1674
1674
|
const abort = new AbortController();
|
|
1675
1675
|
useAgentStore.setState({ running: true, abort, error: null });
|
|
1676
1676
|
const ctx = editorToolContext(abort.signal);
|
|
1677
|
-
const { createDesignPreview, DESIGN_TOOL } = await import("./live-
|
|
1677
|
+
const { createDesignPreview, DESIGN_TOOL } = await import("./live-J4K5LOPF.js");
|
|
1678
1678
|
const preview = createDesignPreview();
|
|
1679
1679
|
registerTurnTools({
|
|
1680
1680
|
readOnly: !!editBlockReason(),
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
updateActiveThread,
|
|
47
47
|
updateMessage,
|
|
48
48
|
useAgentStore
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-QENL3J7E.js";
|
|
50
50
|
import "./chunk-R7LS46JH.js";
|
|
51
51
|
import "./chunk-3IJZGFGH.js";
|
|
52
52
|
import "./chunk-7JWLVDTD.js";
|
|
@@ -69,7 +69,7 @@ import "./chunk-55OXH64D.js";
|
|
|
69
69
|
import "./chunk-I5QURTTK.js";
|
|
70
70
|
import "./chunk-BZBEKFIM.js";
|
|
71
71
|
import "./chunk-Q6NFF6DX.js";
|
|
72
|
-
import "./chunk-
|
|
72
|
+
import "./chunk-2RKQUQZI.js";
|
|
73
73
|
import "./chunk-FOPWTTWN.js";
|
|
74
74
|
import "./chunk-MVM6Q75O.js";
|
|
75
75
|
import "./chunk-26XDPYKE.js";
|
|
@@ -20,14 +20,14 @@ import {
|
|
|
20
20
|
uploadLocalDocument,
|
|
21
21
|
uploadMediaNow,
|
|
22
22
|
withDocUploadLock
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-SOUVCBG7.js";
|
|
24
24
|
import "./chunk-YVHQESDU.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-SGELR6GD.js";
|
|
26
26
|
import "./chunk-YIRD2LU3.js";
|
|
27
27
|
import "./chunk-73U3L223.js";
|
|
28
28
|
import "./chunk-AMCLYCZZ.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-FIZZ2SIM.js";
|
|
30
|
+
import "./chunk-2RKQUQZI.js";
|
|
31
31
|
import "./chunk-FOPWTTWN.js";
|
|
32
32
|
import "./chunk-MVM6Q75O.js";
|
|
33
33
|
import "./chunk-26XDPYKE.js";
|
|
@@ -7,17 +7,17 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
syncStatus,
|
|
9
9
|
uploadActiveDocument
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SOUVCBG7.js";
|
|
11
11
|
import "./chunk-YVHQESDU.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-SGELR6GD.js";
|
|
13
13
|
import "./chunk-YIRD2LU3.js";
|
|
14
14
|
import "./chunk-73U3L223.js";
|
|
15
15
|
import "./chunk-AMCLYCZZ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-FIZZ2SIM.js";
|
|
17
17
|
import {
|
|
18
18
|
storedDocument,
|
|
19
19
|
useEditorStore
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2RKQUQZI.js";
|
|
21
21
|
import "./chunk-FOPWTTWN.js";
|
|
22
22
|
import "./chunk-MVM6Q75O.js";
|
|
23
23
|
import "./chunk-26XDPYKE.js";
|
package/dist/index.js
CHANGED
|
@@ -280,7 +280,7 @@ function toTemplate(document, listing, options = {}) {
|
|
|
280
280
|
}
|
|
281
281
|
var mediaHash = (bytes) => hashBytesSync(bytes);
|
|
282
282
|
async function checkTemplate(template, options = {}) {
|
|
283
|
-
return (await import("./chunks/check-template-
|
|
283
|
+
return (await import("./chunks/check-template-G5MKOIQT.js")).checkTemplate(template, options);
|
|
284
284
|
}
|
|
285
285
|
export {
|
|
286
286
|
HELPER_NAMES,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@popcraft/kit",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "The PopCraft design kit: everything PopCraft's own templates are made with — the Kit, every helper, style system and theme kit, every official template source to read and remix, the build and every check the official templates pass — plus the design-script runner and .popcraft output.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://popcraft.app/docs/api/design-reference",
|