@popcraft/kit 0.20.2 → 0.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{agent-3XRGQL6K.js → agent-J4SXBHGV.js} +1 -1
- package/dist/chunks/{builtin-O5EUMSK7.js → builtin-PWQNLB2U.js} +3 -3
- package/dist/chunks/{check-template-UISBUUB3.js → check-template-ENJQZXH5.js} +2 -2
- package/dist/chunks/{chunk-VM4TCXGM.js → chunk-3MPDKA5K.js} +1 -1
- package/dist/chunks/{chunk-HWXDUZAO.js → chunk-3Z2Y6QKZ.js} +2 -2
- package/dist/chunks/{chunk-SVAABCJG.js → chunk-45ACHLAL.js} +5 -5
- package/dist/chunks/{chunk-LAC5I6AM.js → chunk-464OAKNK.js} +1 -1
- package/dist/chunks/{chunk-HXAO664S.js → chunk-4EITFMGW.js} +2 -2
- package/dist/chunks/{chunk-DQEH7YHZ.js → chunk-5SDOA4AU.js} +5 -5
- package/dist/chunks/{chunk-RQOK4QB5.js → chunk-5WQ22SPX.js} +3 -3
- package/dist/chunks/{chunk-43EUFENA.js → chunk-7AMSDSLP.js} +4 -4
- package/dist/chunks/{chunk-OJTNFHBZ.js → chunk-D22LSMIW.js} +7 -7
- package/dist/chunks/{chunk-YTOCMYV3.js → chunk-EAIMKIA5.js} +2 -2
- package/dist/chunks/{chunk-G4KE7KT4.js → chunk-FUMDXWBG.js} +1 -1
- package/dist/chunks/{chunk-LA6QHNAX.js → chunk-GAEBPOHW.js} +1 -1
- package/dist/chunks/{chunk-IH5DE4KB.js → chunk-K4LCJD5K.js} +11 -11
- package/dist/chunks/{chunk-DXXUFB7X.js → chunk-NR3AJXQ4.js} +5 -5
- package/dist/chunks/{chunk-N6SD377O.js → chunk-OL577EGK.js} +35 -35
- package/dist/chunks/{chunk-AWIP7QCB.js → chunk-R7NWPQKR.js} +2 -2
- package/dist/chunks/{chunk-V7PIZ2ZW.js → chunk-U4JVPR7Z.js} +3 -3
- package/dist/chunks/{chunk-6SP73YB7.js → chunk-UVOCENGW.js} +4 -4
- package/dist/chunks/{client-ZZ4BXWSM.js → client-JFQ2TVII.js} +1 -1
- package/dist/chunks/{client-NHRXRV7Y.js → client-MYF3W7PM.js} +2 -2
- package/dist/chunks/{client-PQES24BC.js → client-YDSMG6VW.js} +2 -2
- package/dist/chunks/{client-actions-SG4XCLG3.js → client-actions-XW7PGUMD.js} +4 -4
- package/dist/chunks/{dangerous-42IJNPKX.js → dangerous-JD7VUYER.js} +3 -3
- package/dist/chunks/{editor-seams-3W2VZIMT.js → editor-seams-ZGI54SDD.js} +9 -9
- package/dist/chunks/{editor-store-I7CK6EUM.js → editor-store-HMBMRJJW.js} +1 -1
- package/dist/chunks/{export-watermark-P4EUETUI.js → export-watermark-JRQNIQQ5.js} +5 -5
- package/dist/chunks/{eyedropper-DZSU56VR.js → eyedropper-C7KDYS64.js} +1 -1
- package/dist/chunks/{generate-media-6CIG67D7.js → generate-media-Z6FOXFSV.js} +2 -2
- package/dist/chunks/{host-G52FWPTW.js → host-UHSDIH36.js} +6 -6
- package/dist/chunks/{integrations-GKIWYVK4.js → integrations-3332ZZTF.js} +1 -1
- package/dist/chunks/{libraries-VCGHYYCK.js → libraries-YJHBPRTY.js} +5 -5
- package/dist/chunks/{live-KA4N4BJN.js → live-P3DFZLYB.js} +1 -1
- package/dist/chunks/{media-tool-HHQSLJOV.js → media-tool-H4UGBQIQ.js} +1 -1
- package/dist/chunks/{new-file-AFI3VBV2.js → new-file-JJEODOJM.js} +3 -3
- package/dist/chunks/{plugin-2ACUW576.js → plugin-OC5OOC3U.js} +2 -2
- package/dist/chunks/{plugin-import-GLHFCITY.js → plugin-import-QW3HGML4.js} +13 -13
- package/dist/chunks/{presence-OJPOVGS7.js → presence-44JVMJ6W.js} +2 -2
- package/dist/chunks/{project-XNTT4XD2.js → project-M4KOGR2O.js} +1 -1
- package/dist/chunks/{publish-site-GJ6KL5WK.js → publish-site-YT7HNDH3.js} +6 -6
- package/dist/chunks/{publish-store-WBNG5E32.js → publish-store-ZRSUHYXH.js} +4 -4
- package/dist/chunks/{raster-actions-SFGUYYTL.js → raster-actions-V4K3L52M.js} +1 -1
- package/dist/chunks/{runner-GFFPYL3H.js → runner-JEV5TMZ4.js} +16 -16
- package/dist/chunks/{store-OVTYLNL2.js → store-BUVK2SOK.js} +5 -5
- package/dist/chunks/{sync-VNEOQ3YF.js → sync-YJPTY2NK.js} +5 -5
- package/dist/chunks/{tabs-V2FIK5E4.js → tabs-4CWASU2R.js} +8 -8
- package/dist/chunks/{team-SVFXXVIX.js → team-N74ADY6L.js} +1 -1
- package/dist/chunks/{tools-SWNBWHOE.js → tools-45XK2ITU.js} +2 -2
- package/dist/chunks/{ui-commands-4YUJXHBL.js → ui-commands-XTNPMZB4.js} +11 -11
- package/dist/chunks/{versions-U26D53YL.js → versions-ERMENPFZ.js} +5 -5
- 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-R7NWPQKR.js";
|
|
11
|
+
import "./chunk-OL577EGK.js";
|
|
12
12
|
import "./chunk-PW2CNK5I.js";
|
|
13
13
|
import "./chunk-ESWEDBML.js";
|
|
14
14
|
import "./chunk-W2ZOUTFE.js";
|
|
@@ -22,7 +22,7 @@ import "./chunk-XUCU2ODB.js";
|
|
|
22
22
|
import "./chunk-K43OUC2L.js";
|
|
23
23
|
import "./chunk-TUE3FJHT.js";
|
|
24
24
|
import "./chunk-TC4GXRI3.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-5WQ22SPX.js";
|
|
26
26
|
import "./chunk-7NQ5744H.js";
|
|
27
27
|
import "./chunk-T7PNSZ4T.js";
|
|
28
28
|
import "./chunk-TQXZOQRM.js";
|
|
@@ -6,10 +6,10 @@ const __filename = __popcraftPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __popcraftDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
appCommands
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-D22LSMIW.js";
|
|
10
10
|
import {
|
|
11
11
|
builtinCommands
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OL577EGK.js";
|
|
13
13
|
import "./chunk-PW2CNK5I.js";
|
|
14
14
|
import "./chunk-ESWEDBML.js";
|
|
15
15
|
import "./chunk-W2ZOUTFE.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-HMBMRJJW.js"),
|
|
95
95
|
import("../lib/document/photo-frames.js"),
|
|
96
|
-
import("./media-tool-
|
|
96
|
+
import("./media-tool-H4UGBQIQ.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);
|
|
@@ -20,20 +20,20 @@ import {
|
|
|
20
20
|
} from "./chunk-SFZFU7HO.js";
|
|
21
21
|
import {
|
|
22
22
|
notice
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-EAIMKIA5.js";
|
|
24
24
|
import {
|
|
25
25
|
agentContext
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-5WQ22SPX.js";
|
|
27
27
|
import {
|
|
28
28
|
collabSession,
|
|
29
29
|
syncStatus
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-UVOCENGW.js";
|
|
31
31
|
import {
|
|
32
32
|
loadEntitlements
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-4EITFMGW.js";
|
|
34
34
|
import {
|
|
35
35
|
useEditorStore
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-5SDOA4AU.js";
|
|
37
37
|
import {
|
|
38
38
|
cloudApi
|
|
39
39
|
} from "./chunk-7IGFWASX.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-CKEJK7AD.js";
|
|
10
10
|
import {
|
|
11
11
|
markLibraryDocument
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5SDOA4AU.js";
|
|
13
13
|
import {
|
|
14
14
|
listDocMetas,
|
|
15
15
|
saveDocSnapshot
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-IX4H4YZT.js";
|
|
21
21
|
import {
|
|
22
22
|
activeTeamWorkspaceId
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-FUMDXWBG.js";
|
|
24
24
|
import {
|
|
25
25
|
ApiError,
|
|
26
26
|
GUEST_FILE_LIMIT,
|
|
@@ -4572,7 +4572,7 @@ function createPopcornSlice(set2, get2) {
|
|
|
4572
4572
|
privateMode: false,
|
|
4573
4573
|
setPrivateMode: (on) => {
|
|
4574
4574
|
set2({ privateMode: on });
|
|
4575
|
-
void import("./presence-
|
|
4575
|
+
void import("./presence-44JVMJ6W.js").then((m) => m.setPresencePrivate(on)).catch(() => {
|
|
4576
4576
|
});
|
|
4577
4577
|
},
|
|
4578
4578
|
/** Reveal every private item THIS user created (they sync to collaborators). Others' stay theirs. */
|
|
@@ -6621,7 +6621,7 @@ var useEditorStore = create()(
|
|
|
6621
6621
|
// A copy is a new file, so it is cloud-backed like any other (see lib/client/cloud/new-file.ts).
|
|
6622
6622
|
// Returns '' when it was refused (offline, signed out, plan full) or failed; nothing is left behind.
|
|
6623
6623
|
duplicateDocument: async (id) => {
|
|
6624
|
-
const { duplicateDocumentToCloud } = await import("./sync-
|
|
6624
|
+
const { duplicateDocumentToCloud } = await import("./sync-YJPTY2NK.js");
|
|
6625
6625
|
return duplicateDocumentToCloud(id);
|
|
6626
6626
|
},
|
|
6627
6627
|
deleteDocument: async (id) => {
|
|
@@ -10073,9 +10073,9 @@ if (typeof window !== "undefined") {
|
|
|
10073
10073
|
if (typeof window !== "undefined" && navigator.webdriver) {
|
|
10074
10074
|
window.__vpDesign = async (script, o = {}) => {
|
|
10075
10075
|
const [{ registerBuiltinTools, runTool }, { editorToolContext }, { createDesignPreview }] = await Promise.all([
|
|
10076
|
-
import("./tools-
|
|
10077
|
-
import("./editor-seams-
|
|
10078
|
-
import("./live-
|
|
10076
|
+
import("./tools-45XK2ITU.js").then(async (m) => ({ ...m, registerBuiltinTools: (await import("./builtin-PWQNLB2U.js")).registerBuiltinTools })),
|
|
10077
|
+
import("./editor-seams-ZGI54SDD.js"),
|
|
10078
|
+
import("./live-P3DFZLYB.js")
|
|
10079
10079
|
]);
|
|
10080
10080
|
registerBuiltinTools();
|
|
10081
10081
|
const args = JSON.stringify({ ...o.name ? { name: o.name } : {}, ...o.size ? { size: o.size } : {}, ...o.frame ? { frame: o.frame } : {}, script });
|
|
@@ -59,19 +59,19 @@ async function renderDocument(doc, nodeIds, options) {
|
|
|
59
59
|
function generateCapability(ctx) {
|
|
60
60
|
return async (prompt, options = {}) => {
|
|
61
61
|
if (options.format === "audio") {
|
|
62
|
-
const { requestAudio } = await import("./client-
|
|
62
|
+
const { requestAudio } = await import("./client-MYF3W7PM.js");
|
|
63
63
|
const { signal: signal2, format: _f, ...rest2 } = options;
|
|
64
64
|
void _f;
|
|
65
65
|
return requestAudio({ prompt, ...rest2 }, signal2 ?? ctx.signal);
|
|
66
66
|
}
|
|
67
67
|
if (options.format === "video") {
|
|
68
|
-
const { generateVideoFile } = await import("./generate-media-
|
|
68
|
+
const { generateVideoFile } = await import("./generate-media-Z6FOXFSV.js");
|
|
69
69
|
const { format: _f, signal: signal2, ...rest2 } = options;
|
|
70
70
|
void _f;
|
|
71
71
|
return generateVideoFile({ ...rest2, prompt, doc: ctx.doc() }, { signal: signal2 ?? ctx.signal });
|
|
72
72
|
}
|
|
73
73
|
const [{ requestImage }, { effectiveImageModel, useAiStore }] = await Promise.all([
|
|
74
|
-
import("./client-
|
|
74
|
+
import("./client-MYF3W7PM.js"),
|
|
75
75
|
import("./client-store-J3N2WMK2.js")
|
|
76
76
|
]);
|
|
77
77
|
const modelId = effectiveImageModel(useAiStore.getState());
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-KIK6F5SP.js";
|
|
14
14
|
import {
|
|
15
15
|
notice
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-EAIMKIA5.js";
|
|
17
17
|
import {
|
|
18
18
|
effectiveChatModel,
|
|
19
19
|
setModelPref,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-Z5KWGXYT.js";
|
|
22
22
|
import {
|
|
23
23
|
useEditorStore
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5SDOA4AU.js";
|
|
25
25
|
import {
|
|
26
26
|
create
|
|
27
27
|
} from "./chunk-OE4VGEOQ.js";
|
|
@@ -1475,7 +1475,7 @@ async function sendMessage(text) {
|
|
|
1475
1475
|
if (!useAgentStore.getState().activeThreadId) newThread();
|
|
1476
1476
|
const mentions = pruneMentions(body, useAgentStore.getState().draftMentions);
|
|
1477
1477
|
useAgentStore.setState({ draft: "", draftMentions: [], error: null });
|
|
1478
|
-
const { runTurn } = await import("./runner-
|
|
1478
|
+
const { runTurn } = await import("./runner-JEV5TMZ4.js");
|
|
1479
1479
|
await runTurn(body, mentions);
|
|
1480
1480
|
}
|
|
1481
1481
|
function stop() {
|
|
@@ -1578,7 +1578,7 @@ var clearTaskChildren = () => useAgentStore.setState({ taskChildren: {} });
|
|
|
1578
1578
|
function subscribeChildTools() {
|
|
1579
1579
|
let dispose;
|
|
1580
1580
|
let cancelled = false;
|
|
1581
|
-
void import("./runner-
|
|
1581
|
+
void import("./runner-JEV5TMZ4.js").then(({ onChildTool }) => {
|
|
1582
1582
|
const off = onChildTool((report) => {
|
|
1583
1583
|
if (report?.status !== "running" || report.jobId) return;
|
|
1584
1584
|
recordChildTool(report.toolCallId ?? "", report.name);
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
needsSelection,
|
|
9
9
|
pageGo,
|
|
10
10
|
selectionIsPicture
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OL577EGK.js";
|
|
12
12
|
import {
|
|
13
13
|
external_exports
|
|
14
14
|
} from "./chunk-LCIZBGZN.js";
|
|
@@ -31,7 +31,7 @@ var none = external_exports.object({});
|
|
|
31
31
|
var emit = (name, detail) => {
|
|
32
32
|
if (typeof window !== "undefined") window.dispatchEvent(new CustomEvent(name, { detail }));
|
|
33
33
|
};
|
|
34
|
-
var store = () => import("./editor-store-
|
|
34
|
+
var store = () => import("./editor-store-HMBMRJJW.js").then((m) => m.useEditorStore.getState());
|
|
35
35
|
var MODE_IDS = MODE_LIST.map((m) => m.id);
|
|
36
36
|
var MODE_ALIASES = { JAM: "POPCORN" };
|
|
37
37
|
var modeSet = defineCommand({
|
|
@@ -209,7 +209,7 @@ var aiOpen = defineCommand({
|
|
|
209
209
|
] } },
|
|
210
210
|
run: async ({ dialog, skillId }) => {
|
|
211
211
|
if (dialog) (await import("./client-store-J3N2WMK2.js")).openAiDialog(dialog);
|
|
212
|
-
else (await import("./store-
|
|
212
|
+
else (await import("./store-BUVK2SOK.js")).openAgentPanel({ skillId: skillId ?? null });
|
|
213
213
|
return { summary: dialog ? `Opened AI ${dialog}` : "Opened the agent" };
|
|
214
214
|
}
|
|
215
215
|
});
|
|
@@ -288,11 +288,11 @@ var toolPlace = defineCommand({
|
|
|
288
288
|
run: async ({ what }) => {
|
|
289
289
|
if (what === "media") {
|
|
290
290
|
const s = await store();
|
|
291
|
-
const { placeMediaFromPicker } = await import("./media-tool-
|
|
291
|
+
const { placeMediaFromPicker } = await import("./media-tool-H4UGBQIQ.js");
|
|
292
292
|
await placeMediaFromPicker({ kind: "point", x: s.camera.x, y: s.camera.y });
|
|
293
293
|
return { summary: "Placing media" };
|
|
294
294
|
}
|
|
295
|
-
const { beginEyedrop } = await import("./eyedropper-
|
|
295
|
+
const { beginEyedrop } = await import("./eyedropper-C7KDYS64.js");
|
|
296
296
|
void beginEyedrop();
|
|
297
297
|
return { summary: "Pick a color" };
|
|
298
298
|
}
|
|
@@ -310,7 +310,7 @@ var nodeRasterize = defineCommand({
|
|
|
310
310
|
keywords: ["rasterize", "raster", "flatten", "pixels", "paint layer", "erase", "bitmap"]
|
|
311
311
|
} },
|
|
312
312
|
run: async () => {
|
|
313
|
-
const { flattenSelectionToPaintLayer } = await import("./raster-actions-
|
|
313
|
+
const { flattenSelectionToPaintLayer } = await import("./raster-actions-V4K3L52M.js");
|
|
314
314
|
await flattenSelectionToPaintLayer();
|
|
315
315
|
return { summary: "Rasterized" };
|
|
316
316
|
}
|
|
@@ -421,7 +421,7 @@ function pluginCommand(plugins) {
|
|
|
421
421
|
params: external_exports.object({ pluginId: external_exports.string(), commandId: external_exports.string() }),
|
|
422
422
|
expose: { ui: { label: "Run plugin", keywords: ["plugin", "extension", "run"], variants, palette: variants.length ? void 0 : false } },
|
|
423
423
|
run: async ({ pluginId, commandId }) => {
|
|
424
|
-
await (await import("./host-
|
|
424
|
+
await (await import("./host-UHSDIH36.js")).runPlugin(pluginId, commandId);
|
|
425
425
|
return { summary: "Plugin started" };
|
|
426
426
|
}
|
|
427
427
|
});
|
|
@@ -25,10 +25,10 @@ import {
|
|
|
25
25
|
requestImageAction,
|
|
26
26
|
sizeForAspect,
|
|
27
27
|
vectorSupport
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-3MPDKA5K.js";
|
|
29
29
|
import {
|
|
30
30
|
useEditorStore
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-5SDOA4AU.js";
|
|
32
32
|
import {
|
|
33
33
|
getActiveRenderer
|
|
34
34
|
} from "./chunk-IILXBI4I.js";
|
|
@@ -140,7 +140,7 @@ function startHyperyTeams() {
|
|
|
140
140
|
maybePromptForTeam();
|
|
141
141
|
void followFileTeam(linkedKey);
|
|
142
142
|
});
|
|
143
|
-
void import("./sync-
|
|
143
|
+
void import("./sync-YJPTY2NK.js").then(({ onSyncStatus, syncStatus }) => {
|
|
144
144
|
linkedKey = syncStatus().link?.key ?? null;
|
|
145
145
|
void followFileTeam(linkedKey);
|
|
146
146
|
onSyncStatus((_s, link) => {
|
|
@@ -6,13 +6,13 @@ const __filename = __popcraftPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __popcraftDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
pluginRun
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-U4JVPR7Z.js";
|
|
10
10
|
import {
|
|
11
11
|
fileCommands,
|
|
12
12
|
integrationConfirmCommands,
|
|
13
13
|
mediaDelete,
|
|
14
14
|
publishCommands
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-OL577EGK.js";
|
|
16
16
|
import {
|
|
17
17
|
external_exports
|
|
18
18
|
} from "./chunk-LCIZBGZN.js";
|
|
@@ -54,7 +54,7 @@ var collabSetSpotlight = defineCommand({
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
run: async ({ on }, ctx) => {
|
|
57
|
-
const { setSpotlight } = await import("./presence-
|
|
57
|
+
const { setSpotlight } = await import("./presence-44JVMJ6W.js");
|
|
58
58
|
setSpotlight(on);
|
|
59
59
|
ctx.notice(on ? "Spotlight on \u2014 everyone is following this view." : "Spotlight off.");
|
|
60
60
|
return { summary: on ? "Spotlight on" : "Spotlight off", data: { spotlight: on } };
|
|
@@ -81,7 +81,7 @@ var collabRevealPrivate = defineCommand({
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
run: async (_p, ctx) => {
|
|
84
|
-
const { useEditorStore } = await import("./editor-store-
|
|
84
|
+
const { useEditorStore } = await import("./editor-store-HMBMRJJW.js");
|
|
85
85
|
const before = Object.values(useEditorStore.getState().document.nodes).filter((n) => n.privateTo).length;
|
|
86
86
|
useEditorStore.getState().revealPrivate();
|
|
87
87
|
ctx.notice(before ? `Revealed ${before} private item${before === 1 ? "" : "s"}.` : "Nothing was private.");
|
|
@@ -145,7 +145,7 @@ var documentDelete = defineCommand({
|
|
|
145
145
|
}
|
|
146
146
|
},
|
|
147
147
|
run: async ({ id }, ctx) => {
|
|
148
|
-
const { useEditorStore } = await import("./editor-store-
|
|
148
|
+
const { useEditorStore } = await import("./editor-store-HMBMRJJW.js");
|
|
149
149
|
const wasOpen = useEditorStore.getState().document.id === id;
|
|
150
150
|
await useEditorStore.getState().deleteDocument(id);
|
|
151
151
|
ctx.notice("Deleted the document.");
|
|
@@ -189,7 +189,7 @@ var libraryPublish = defineCommand({
|
|
|
189
189
|
}
|
|
190
190
|
},
|
|
191
191
|
run: async (p, ctx) => {
|
|
192
|
-
const { publishLibrary } = await import("./libraries-
|
|
192
|
+
const { publishLibrary } = await import("./libraries-YJHBPRTY.js");
|
|
193
193
|
const doc = ctx.doc();
|
|
194
194
|
const pick = {
|
|
195
195
|
componentIds: p.componentIds ?? Object.keys(doc.components ?? {}),
|
|
@@ -221,7 +221,7 @@ var libraryUnpublish = defineCommand({
|
|
|
221
221
|
},
|
|
222
222
|
run: async ({ libraryId }, ctx) => {
|
|
223
223
|
if (!libraryId.trim()) throw new CommandError("Which library? Pass its `libraryId`.", "invalid_params");
|
|
224
|
-
const { unpublishLibrary } = await import("./libraries-
|
|
224
|
+
const { unpublishLibrary } = await import("./libraries-YJHBPRTY.js");
|
|
225
225
|
await unpublishLibrary(libraryId);
|
|
226
226
|
ctx.notice(`Unpublished library ${libraryId}.`);
|
|
227
227
|
return { summary: `Unpublished library ${libraryId}`, data: { libraryId, unpublished: true } };
|
|
@@ -233,8 +233,8 @@ var libraryCommands = [libraryPublish, libraryUnpublish];
|
|
|
233
233
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
234
234
|
async function findVersion(id) {
|
|
235
235
|
const [{ useEditorStore }, { versionLabel }] = await Promise.all([
|
|
236
|
-
import("./editor-store-
|
|
237
|
-
import("./versions-
|
|
236
|
+
import("./editor-store-HMBMRJJW.js"),
|
|
237
|
+
import("./versions-ERMENPFZ.js")
|
|
238
238
|
]);
|
|
239
239
|
const meta = useEditorStore.getState().versions.find((v) => v.id === id);
|
|
240
240
|
if (!meta) {
|
|
@@ -267,7 +267,7 @@ var versionRestore = defineCommand({
|
|
|
267
267
|
},
|
|
268
268
|
run: async ({ id }) => {
|
|
269
269
|
const found = await findVersion(id);
|
|
270
|
-
const { restoreVersion } = await import("./versions-
|
|
270
|
+
const { restoreVersion } = await import("./versions-ERMENPFZ.js");
|
|
271
271
|
await restoreVersion(found.meta);
|
|
272
272
|
return { summary: `Restored \u201C${found.label}\u201D`, data: { id, label: found.label, restored: true } };
|
|
273
273
|
}
|
|
@@ -292,7 +292,7 @@ var versionDelete = defineCommand({
|
|
|
292
292
|
},
|
|
293
293
|
run: async ({ id }, ctx) => {
|
|
294
294
|
const found = await findVersion(id);
|
|
295
|
-
const { deleteVersion } = await import("./versions-
|
|
295
|
+
const { deleteVersion } = await import("./versions-ERMENPFZ.js");
|
|
296
296
|
await deleteVersion(found.meta);
|
|
297
297
|
ctx.notice(`Deleted the version \u201C${found.label}\u201D.`);
|
|
298
298
|
return { summary: `Deleted the version \u201C${found.label}\u201D`, data: { id, label: found.label, deleted: true } };
|
|
@@ -15,14 +15,14 @@ import {
|
|
|
15
15
|
} from "./chunk-L6R43WQX.js";
|
|
16
16
|
import {
|
|
17
17
|
syncStatus
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-UVOCENGW.js";
|
|
19
19
|
import {
|
|
20
20
|
downloadBlob
|
|
21
21
|
} from "./chunk-RVMIBNSQ.js";
|
|
22
22
|
import {
|
|
23
23
|
setPluginTabs,
|
|
24
24
|
useEditorStore
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-5SDOA4AU.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-OC5OOC3U.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-JJEODOJM.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-QW3HGML4.js");
|
|
542
542
|
if (d.ir && typeof d.ir === "object") {
|
|
543
543
|
await applyPluginLayoutIr(d.ir, { mode, name });
|
|
544
544
|
return;
|