@popcraft/kit 0.60.0 → 0.60.1
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-Q7OXDRHJ.js → agent-U5CT23QH.js} +1 -1
- package/dist/chunks/{builtin-3AHQTRQS.js → builtin-C5AGHFJS.js} +3 -3
- package/dist/chunks/{buy-credits-M5QSN6YX.js → buy-credits-SMWSEVH3.js} +2 -2
- package/dist/chunks/{check-template-BW7WMU7W.js → check-template-P3BJBABQ.js} +2 -2
- package/dist/chunks/{chunk-MG5QDKHG.js → chunk-52TGB2U2.js} +6 -6
- package/dist/chunks/{chunk-LKY26YDG.js → chunk-764KUMRX.js} +4 -4
- package/dist/chunks/{chunk-E56XNADQ.js → chunk-AJSP6UG5.js} +5 -5
- package/dist/chunks/{chunk-Y4TO2YBR.js → chunk-AM5IA4WG.js} +1 -1
- package/dist/chunks/{chunk-P65CHL53.js → chunk-APUK7EIY.js} +49 -44
- package/dist/chunks/{chunk-PHH2CCKN.js → chunk-CEDF2YMY.js} +3 -1
- package/dist/chunks/{chunk-WK7CZCZE.js → chunk-EXIMH4VA.js} +5 -5
- package/dist/chunks/{chunk-NORHNWBU.js → chunk-FEIULPGN.js} +1 -1
- package/dist/chunks/{chunk-HWCV6VTU.js → chunk-J2MGIBMU.js} +2 -2
- package/dist/chunks/{chunk-FSXWJRG7.js → chunk-JT2PN2SD.js} +2 -2
- package/dist/chunks/{chunk-5TFMD3UF.js → chunk-K6ZHDHL4.js} +2 -2
- package/dist/chunks/{chunk-GGWLSD5K.js → chunk-KRJ5XS5E.js} +4 -4
- package/dist/chunks/{chunk-666ILBDC.js → chunk-MVXBWFQQ.js} +2 -2
- package/dist/chunks/{chunk-3XACBHHM.js → chunk-NJ4LYRQB.js} +3 -3
- package/dist/chunks/{chunk-UYIT4HE6.js → chunk-PXOFPOY2.js} +34 -10
- package/dist/chunks/{chunk-5AKH4CCL.js → chunk-RW3BWTAF.js} +1 -1
- package/dist/chunks/{chunk-VUFGU4BS.js → chunk-XHVSDFQ4.js} +1 -1
- package/dist/chunks/{chunk-SOU52U4S.js → chunk-YMKIF26Z.js} +3 -3
- package/dist/chunks/{chunk-BDVJX6TO.js → chunk-ZF3ZANVR.js} +11 -11
- package/dist/chunks/{client-UBP3IZBE.js → client-7ZQ3NFOV.js} +1 -1
- package/dist/chunks/{client-NFHQ5AR2.js → client-NSVV6YU3.js} +3 -3
- package/dist/chunks/{client-MGTRD3D5.js → client-VATC2K6O.js} +2 -2
- package/dist/chunks/{client-actions-LOEZVJGG.js → client-actions-YCMXTRBN.js} +5 -5
- package/dist/chunks/{dangerous-U5MQQW2Z.js → dangerous-KK5PLISX.js} +3 -3
- package/dist/chunks/{delete-current-file-GZCO6LRS.js → delete-current-file-UEH67VSJ.js} +5 -5
- package/dist/chunks/{editor-seams-DVU53E2R.js → editor-seams-KHCNE2X6.js} +12 -12
- package/dist/chunks/{editor-store-B5LF7ORJ.js → editor-store-U4JCAFCU.js} +1 -1
- package/dist/chunks/{export-watermark-5YOHTVF2.js → export-watermark-5IZGCYTN.js} +5 -5
- package/dist/chunks/{eyedropper-4PKCVCPJ.js → eyedropper-P4XU47GW.js} +1 -1
- package/dist/chunks/{generate-media-OZU5VNAM.js → generate-media-C53BQZIP.js} +3 -3
- package/dist/chunks/{host-IEOB7VLK.js → host-WMUHPIRI.js} +6 -6
- package/dist/chunks/{integrations-OYFFPUM7.js → integrations-2FDHXGFH.js} +1 -1
- package/dist/chunks/{libraries-UT7OFUEL.js → libraries-25V2MWYC.js} +5 -5
- package/dist/chunks/{live-AHHZJJMB.js → live-6OFYLILA.js} +1 -1
- package/dist/chunks/{media-tool-XPMNFYXL.js → media-tool-HXECTWKQ.js} +1 -1
- package/dist/chunks/{new-file-2JTQ7LYE.js → new-file-GDSII3GJ.js} +3 -3
- package/dist/chunks/{plugin-6KKJZ6SK.js → plugin-VULAPF3S.js} +2 -2
- package/dist/chunks/{plugin-import-SS5WZ2CK.js → plugin-import-6GFVLHSA.js} +16 -16
- package/dist/chunks/{presence-HFNFA2OE.js → presence-5S3JHO22.js} +2 -2
- package/dist/chunks/{project-C5GHWD4S.js → project-SEFKN7XE.js} +1 -1
- package/dist/chunks/{publish-site-7IVXVDCF.js → publish-site-YPVEW2PX.js} +6 -6
- package/dist/chunks/{publish-store-CAJOF4BJ.js → publish-store-Y3HLAH26.js} +4 -4
- package/dist/chunks/{raster-actions-AN77PUK7.js → raster-actions-27OTV5PS.js} +1 -1
- package/dist/chunks/{runner-6ENG2HGY.js → runner-A2BGPIFM.js} +18 -18
- package/dist/chunks/{store-OGZZAKRG.js → store-H4U53JZ5.js} +6 -6
- package/dist/chunks/{sync-OHFX5W44.js → sync-5B55RF3R.js} +5 -5
- package/dist/chunks/{tabs-FTM5BHT7.js → tabs-YQRQMAWT.js} +8 -8
- package/dist/chunks/{team-BHQYP6SA.js → team-IZT26MBY.js} +1 -1
- package/dist/chunks/{team-client-BK3AULCP.js → team-client-4NDH7VS4.js} +1 -1
- package/dist/chunks/{tools-JJFVJULW.js → tools-NUIVD75Y.js} +2 -2
- package/dist/chunks/{ui-commands-7Q3MDB2U.js → ui-commands-K4ONVDYV.js} +12 -12
- package/dist/chunks/{versions-HGSPPDDA.js → versions-IPWF3ZL3.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-K6ZHDHL4.js";
|
|
11
|
+
import "./chunk-APUK7EIY.js";
|
|
12
12
|
import "./chunk-F7YP4K43.js";
|
|
13
13
|
import "./chunk-VCQKXTSJ.js";
|
|
14
14
|
import "./chunk-PEJWXGQC.js";
|
|
@@ -17,7 +17,7 @@ import "./chunk-JFJ3HQUH.js";
|
|
|
17
17
|
import "./chunk-IT56AOP2.js";
|
|
18
18
|
import "./chunk-ZLYTVR5V.js";
|
|
19
19
|
import "./chunk-IX7HAFDY.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-NJ4LYRQB.js";
|
|
21
21
|
import "./chunk-ZF2EYBXY.js";
|
|
22
22
|
import "./chunk-JUHREBH6.js";
|
|
23
23
|
import "./chunk-YEKG65KC.js";
|
|
@@ -7,11 +7,11 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
HYPERY_TEAM_HEADER,
|
|
9
9
|
hyperyRequestHeaders
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XHVSDFQ4.js";
|
|
11
11
|
import "./chunk-KBKUIFSG.js";
|
|
12
12
|
import {
|
|
13
13
|
useHyperyTeam
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-RW3BWTAF.js";
|
|
15
15
|
import {
|
|
16
16
|
openLink
|
|
17
17
|
} from "./chunk-JVFT5JCN.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-PXOFPOY2.js";
|
|
10
10
|
import {
|
|
11
11
|
builtinCommands
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-APUK7EIY.js";
|
|
13
13
|
import "./chunk-F7YP4K43.js";
|
|
14
14
|
import "./chunk-VCQKXTSJ.js";
|
|
15
15
|
import "./chunk-PEJWXGQC.js";
|
|
@@ -6,7 +6,7 @@ const __filename = __popcraftPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __popcraftDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
registerAppCommands
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PXOFPOY2.js";
|
|
10
10
|
import {
|
|
11
11
|
storeOpsSeam
|
|
12
12
|
} from "./chunk-V55TRMJK.js";
|
|
@@ -23,17 +23,17 @@ import {
|
|
|
23
23
|
sameResolution,
|
|
24
24
|
surfaceSize,
|
|
25
25
|
windowCssSize
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-APUK7EIY.js";
|
|
27
27
|
import {
|
|
28
28
|
notice
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-MVXBWFQQ.js";
|
|
30
30
|
import {
|
|
31
31
|
agentContext
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-NJ4LYRQB.js";
|
|
33
33
|
import {
|
|
34
34
|
collabSession,
|
|
35
35
|
syncStatus
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-KRJ5XS5E.js";
|
|
37
37
|
import {
|
|
38
38
|
loadEntitlements
|
|
39
39
|
} from "./chunk-KBKUIFSG.js";
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
import {
|
|
45
45
|
persist,
|
|
46
46
|
useEditorStore
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-EXIMH4VA.js";
|
|
48
48
|
import {
|
|
49
49
|
cloudApi
|
|
50
50
|
} from "./chunk-LZT24WFD.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-ONKVSMEQ.js";
|
|
10
10
|
import {
|
|
11
11
|
notice
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MVXBWFQQ.js";
|
|
13
13
|
import {
|
|
14
14
|
effectiveChatModel,
|
|
15
15
|
setModelPref,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-SUTZWEBK.js";
|
|
18
18
|
import {
|
|
19
19
|
useEditorStore
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-EXIMH4VA.js";
|
|
21
21
|
import {
|
|
22
22
|
create
|
|
23
23
|
} from "./chunk-RF3OTYGM.js";
|
|
@@ -1892,7 +1892,7 @@ async function sendMessage(text) {
|
|
|
1892
1892
|
if (!useAgentStore.getState().activeThreadId) newThread();
|
|
1893
1893
|
const mentions = pruneMentions(body, useAgentStore.getState().draftMentions);
|
|
1894
1894
|
useAgentStore.setState({ draft: "", draftMentions: [], error: null });
|
|
1895
|
-
const { runTurn } = await import("./runner-
|
|
1895
|
+
const { runTurn } = await import("./runner-A2BGPIFM.js");
|
|
1896
1896
|
await runTurn(body, mentions);
|
|
1897
1897
|
}
|
|
1898
1898
|
function stop() {
|
|
@@ -1995,7 +1995,7 @@ var clearTaskChildren = () => useAgentStore.setState({ taskChildren: {} });
|
|
|
1995
1995
|
function subscribeChildTools() {
|
|
1996
1996
|
let dispose;
|
|
1997
1997
|
let cancelled = false;
|
|
1998
|
-
void import("./runner-
|
|
1998
|
+
void import("./runner-A2BGPIFM.js").then(({ onChildTool }) => {
|
|
1999
1999
|
const off = onChildTool((report) => {
|
|
2000
2000
|
if (report?.status !== "running" || report.jobId) return;
|
|
2001
2001
|
recordChildTool(report.toolCallId ?? "", report.name);
|
|
@@ -21,11 +21,11 @@ import {
|
|
|
21
21
|
} from "./chunk-KLL6R7TS.js";
|
|
22
22
|
import {
|
|
23
23
|
syncStatus
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-KRJ5XS5E.js";
|
|
25
25
|
import {
|
|
26
26
|
setPluginTabs,
|
|
27
27
|
useEditorStore
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-EXIMH4VA.js";
|
|
29
29
|
import {
|
|
30
30
|
openBeside
|
|
31
31
|
} from "./chunk-JVFT5JCN.js";
|
|
@@ -69,7 +69,7 @@ init_define_POPCRAFT_COMPONENT_IDS();
|
|
|
69
69
|
// lib/plugins/api.ts
|
|
70
70
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
71
71
|
async function handlePluginCall(env, method, params = {}) {
|
|
72
|
-
const { dispatchPluginCall } = await import("./plugin-
|
|
72
|
+
const { dispatchPluginCall } = await import("./plugin-VULAPF3S.js");
|
|
73
73
|
return dispatchPluginCall(env, method, params);
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -586,7 +586,7 @@ async function runPlugin(pluginId, commandId, opts = {}) {
|
|
|
586
586
|
if (!openBeside(url)) throw new Error("The browser blocked the new tab");
|
|
587
587
|
},
|
|
588
588
|
createDocument: async (opts2) => {
|
|
589
|
-
const { createFreshFileOrExplain } = await import("./new-file-
|
|
589
|
+
const { createFreshFileOrExplain } = await import("./new-file-GDSII3GJ.js");
|
|
590
590
|
const created = await createFreshFileOrExplain({}, { name: opts2?.name });
|
|
591
591
|
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})`);
|
|
592
592
|
await useEditorStore.getState().openDocument(created.docId);
|
|
@@ -785,7 +785,7 @@ if (typeof window !== "undefined") {
|
|
|
785
785
|
const name = d.name || "Imported";
|
|
786
786
|
void (async () => {
|
|
787
787
|
try {
|
|
788
|
-
const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-
|
|
788
|
+
const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-6GFVLHSA.js");
|
|
789
789
|
if (d.ir && typeof d.ir === "object") {
|
|
790
790
|
await applyPluginLayoutIr(d.ir, { mode, name });
|
|
791
791
|
return;
|
|
@@ -938,7 +938,7 @@ init_scene_graph();
|
|
|
938
938
|
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.");
|
|
939
939
|
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 });
|
|
940
940
|
async function placeImportedPicture(ctx, imported, at2, what, extra = {}) {
|
|
941
|
-
const client = await import("./client-
|
|
941
|
+
const client = await import("./client-7ZQ3NFOV.js");
|
|
942
942
|
if (at2.fillLayerId) {
|
|
943
943
|
const doc2 = ctx.doc();
|
|
944
944
|
const target = nodeOrThrow(doc2, at2.fillLayerId);
|
|
@@ -984,7 +984,7 @@ var photoSearch = defineCommand({
|
|
|
984
984
|
}
|
|
985
985
|
},
|
|
986
986
|
run: async (args) => {
|
|
987
|
-
const { searchStockPhotos } = await import("./client-
|
|
987
|
+
const { searchStockPhotos } = await import("./client-7ZQ3NFOV.js");
|
|
988
988
|
const page = await searchStockPhotos(args.query, args.page ?? 1, { licence: args.licence });
|
|
989
989
|
return {
|
|
990
990
|
summary: `${page.results.length} photo${page.results.length === 1 ? "" : "s"} for \u201C${page.query}\u201D (page ${page.page} of ${page.pageCount || 1})`,
|
|
@@ -1018,7 +1018,7 @@ var photoInsert = defineCommand({
|
|
|
1018
1018
|
run: async (args, ctx) => {
|
|
1019
1019
|
if (!args.id && !args.query) throw new ToolError("Pass an id from search_photos, or a query.");
|
|
1020
1020
|
if (args.id && !isPhotoId(args.id)) throw new ToolError(`"${args.id}" is not a photo id from search_photos.`);
|
|
1021
|
-
const client = await import("./client-
|
|
1021
|
+
const client = await import("./client-7ZQ3NFOV.js");
|
|
1022
1022
|
let photo;
|
|
1023
1023
|
if (args.id) photo = await client.stockPhotoInfo(args.id);
|
|
1024
1024
|
else {
|
|
@@ -1056,10 +1056,10 @@ var mediaList = defineCommand({
|
|
|
1056
1056
|
}
|
|
1057
1057
|
},
|
|
1058
1058
|
run: async (args) => {
|
|
1059
|
-
const { listLibraryMedia } = await import("./client-
|
|
1059
|
+
const { listLibraryMedia } = await import("./client-VATC2K6O.js");
|
|
1060
1060
|
const q = { ...args };
|
|
1061
1061
|
if (!q.workspace) {
|
|
1062
|
-
const { syncStatus } = await import("./sync-
|
|
1062
|
+
const { syncStatus } = await import("./sync-5B55RF3R.js");
|
|
1063
1063
|
const link2 = syncStatus().link;
|
|
1064
1064
|
if (!link2) throw new ToolError("This document is not saved to the cloud, so it has no team media library. Pass workspace.");
|
|
1065
1065
|
q.workspace = (await listLibraryMedia({ file: link2.key, limit: 1 })).workspaceId;
|
|
@@ -1094,7 +1094,7 @@ var mediaInsert = defineCommand({
|
|
|
1094
1094
|
run: async (args, ctx) => {
|
|
1095
1095
|
const contentType = args.contentType ?? "image/*";
|
|
1096
1096
|
if (!contentType.startsWith("image/")) throw new ToolError("insert_media places pictures; this item is not one.");
|
|
1097
|
-
const { importLibraryPicture } = await import("./client-
|
|
1097
|
+
const { importLibraryPicture } = await import("./client-VATC2K6O.js");
|
|
1098
1098
|
const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "Media", contentType, size: 0, createdAt: "", fileCount: 1, source: null };
|
|
1099
1099
|
const imported = await importLibraryPicture(item);
|
|
1100
1100
|
return placeImportedPicture(ctx, imported, args, `\u201C${imported.name}\u201D`, { hash: imported.hash });
|
|
@@ -1115,7 +1115,7 @@ var mediaDownload = defineCommand({
|
|
|
1115
1115
|
// The Library's right-click menu: saves the item's file to the computer.
|
|
1116
1116
|
expose: { ui: { label: "Download", palette: false } },
|
|
1117
1117
|
run: async (args) => {
|
|
1118
|
-
const { libraryBlob, libraryFileName } = await import("./client-
|
|
1118
|
+
const { libraryBlob, libraryFileName } = await import("./client-VATC2K6O.js");
|
|
1119
1119
|
const { downloadBlob } = await import("./download-3XU7ZVAR.js");
|
|
1120
1120
|
const item = { hash: args.hash, fileKey: args.fileKey, fileName: args.name ?? "media", contentType: args.contentType ?? "", size: 0, createdAt: "", fileCount: 1, source: null };
|
|
1121
1121
|
const blob = await libraryBlob(item);
|
|
@@ -1146,7 +1146,7 @@ var mediaDelete = defineCommand({
|
|
|
1146
1146
|
}
|
|
1147
1147
|
},
|
|
1148
1148
|
run: async (args) => {
|
|
1149
|
-
const { deleteLibraryMedia } = await import("./client-
|
|
1149
|
+
const { deleteLibraryMedia } = await import("./client-VATC2K6O.js");
|
|
1150
1150
|
const out = await deleteLibraryMedia(args.workspace, args.hash);
|
|
1151
1151
|
return { summary: `Deleted it from the library (it was in ${out.files} file${out.files === 1 ? "" : "s"})`, data: out };
|
|
1152
1152
|
}
|
|
@@ -1160,13 +1160,13 @@ async function signedIn() {
|
|
|
1160
1160
|
}
|
|
1161
1161
|
async function publishedFile() {
|
|
1162
1162
|
await signedIn();
|
|
1163
|
-
const { openFileKey } = await import("./publish-site-
|
|
1163
|
+
const { openFileKey } = await import("./publish-site-YPVEW2PX.js");
|
|
1164
1164
|
const key = openFileKey();
|
|
1165
1165
|
if (!key) throw new CommandError("This file is not saved to the cloud yet, so it has no site. Publish it first.", "failed");
|
|
1166
1166
|
return key;
|
|
1167
1167
|
}
|
|
1168
1168
|
async function formsWithoutDatabase(key) {
|
|
1169
|
-
const [{ useEditorStore }, { usesForms, formsGoNowhere }, { siteBackend }] = await Promise.all([import("./editor-store-
|
|
1169
|
+
const [{ useEditorStore }, { usesForms, formsGoNowhere }, { siteBackend }] = await Promise.all([import("./editor-store-U4JCAFCU.js"), import("./backend-Z2SA6DP6.js"), import("./integrations-2FDHXGFH.js")]);
|
|
1170
1170
|
const doc2 = useEditorStore.getState().document;
|
|
1171
1171
|
if (!usesForms(doc2)) return false;
|
|
1172
1172
|
return formsGoNowhere(doc2, await siteBackend(key).catch(() => void 0));
|
|
@@ -1202,7 +1202,7 @@ var publishSite = defineCommand({
|
|
|
1202
1202
|
const { cleanSlug } = await import("./rules-646OOYFF.js");
|
|
1203
1203
|
const address = p.address === void 0 ? void 0 : cleanSlug(p.address);
|
|
1204
1204
|
if (address === null) throw new CommandError("That cannot be a site address: use 3 to 40 letters, digits and dashes.", "invalid_params");
|
|
1205
|
-
const { publishOpenFile, NoScreens } = await import("./publish-site-
|
|
1205
|
+
const { publishOpenFile, NoScreens } = await import("./publish-site-YPVEW2PX.js");
|
|
1206
1206
|
try {
|
|
1207
1207
|
const done = await publishOpenFile(address);
|
|
1208
1208
|
ctx.notice(`Published version ${done.version}: ${done.url}`);
|
|
@@ -1257,7 +1257,7 @@ var publishListSites = defineCommand({
|
|
|
1257
1257
|
},
|
|
1258
1258
|
run: async (p) => {
|
|
1259
1259
|
await signedIn();
|
|
1260
|
-
const [{ workspaceSites }, { activeTeamWorkspaceId, useHyperyTeam }] = await Promise.all([import("./sites-L5ILN5B6.js"), import("./team-
|
|
1260
|
+
const [{ workspaceSites }, { activeTeamWorkspaceId, useHyperyTeam }] = await Promise.all([import("./sites-L5ILN5B6.js"), import("./team-IZT26MBY.js")]);
|
|
1261
1261
|
const workspaceId = p.workspaceId ?? activeTeamWorkspaceId() ?? useHyperyTeam.getState().personalWorkspaceId;
|
|
1262
1262
|
if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
|
|
1263
1263
|
const out = await workspaceSites(workspaceId);
|
|
@@ -1306,12 +1306,12 @@ var publishStatus = defineCommand({
|
|
|
1306
1306
|
},
|
|
1307
1307
|
run: async () => {
|
|
1308
1308
|
await signedIn();
|
|
1309
|
-
const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-
|
|
1309
|
+
const [{ openFileKey }, { siteStatus }] = await Promise.all([import("./publish-site-YPVEW2PX.js"), import("./sites-L5ILN5B6.js")]);
|
|
1310
1310
|
const key = openFileKey();
|
|
1311
1311
|
const status = await siteStatus(key);
|
|
1312
1312
|
const site = status.site;
|
|
1313
|
-
const backend = key ? await (await import("./integrations-
|
|
1314
|
-
const destinations = key ? await (await import("./integrations-
|
|
1313
|
+
const backend = key ? await (await import("./integrations-2FDHXGFH.js")).siteBackend(key).catch(() => null) : null;
|
|
1314
|
+
const destinations = key ? await (await import("./integrations-2FDHXGFH.js")).listDestinations(key).catch(() => []) : [];
|
|
1315
1315
|
return {
|
|
1316
1316
|
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}`,
|
|
1317
1317
|
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 })) }
|
|
@@ -1342,7 +1342,7 @@ var publishStore = defineCommand({
|
|
|
1342
1342
|
},
|
|
1343
1343
|
run: async (p, ctx) => {
|
|
1344
1344
|
await signedIn();
|
|
1345
|
-
const { deployOpenStore } = await import("./publish-store-
|
|
1345
|
+
const { deployOpenStore } = await import("./publish-store-Y3HLAH26.js");
|
|
1346
1346
|
const done = await deployOpenStore(ctx.doc(), ctx.pageId(), { destinationId: p.destinationId }).catch((e) => {
|
|
1347
1347
|
throw new CommandError(e instanceof Error ? e.message : String(e), "failed");
|
|
1348
1348
|
});
|
|
@@ -1371,7 +1371,7 @@ var integrationList = defineCommand({
|
|
|
1371
1371
|
}
|
|
1372
1372
|
},
|
|
1373
1373
|
run: async ({ capability }) => {
|
|
1374
|
-
const [{ cloudUser }, { integrationsWorkspaceId, listWorkspaceIntegrations }] = await Promise.all([import("./session-47XUQIYR.js"), import("./integrations-
|
|
1374
|
+
const [{ cloudUser }, { integrationsWorkspaceId, listWorkspaceIntegrations }] = await Promise.all([import("./session-47XUQIYR.js"), import("./integrations-2FDHXGFH.js")]);
|
|
1375
1375
|
if (!cloudUser()) throw new CommandError("You are not signed in: integrations belong to your account's workspace.", "denied");
|
|
1376
1376
|
const workspaceId = integrationsWorkspaceId();
|
|
1377
1377
|
if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
|
|
@@ -1412,7 +1412,7 @@ var integrationOpen = defineCommand({
|
|
|
1412
1412
|
}
|
|
1413
1413
|
});
|
|
1414
1414
|
async function openFile() {
|
|
1415
|
-
const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-47XUQIYR.js"), import("./publish-site-
|
|
1415
|
+
const [{ cloudUser }, { openFileKey }] = await Promise.all([import("./session-47XUQIYR.js"), import("./publish-site-YPVEW2PX.js")]);
|
|
1416
1416
|
if (!cloudUser()) throw new CommandError("You are not signed in.", "denied");
|
|
1417
1417
|
const key = openFileKey();
|
|
1418
1418
|
if (!key) throw new CommandError("This file is not saved to the cloud yet. Publish it first (publish_site).", "failed");
|
|
@@ -1438,7 +1438,7 @@ var integrationListResources = defineCommand({
|
|
|
1438
1438
|
}
|
|
1439
1439
|
},
|
|
1440
1440
|
run: async ({ connectionId, capability, path }) => {
|
|
1441
|
-
const { listResources } = await import("./integrations-
|
|
1441
|
+
const { listResources } = await import("./integrations-2FDHXGFH.js");
|
|
1442
1442
|
const list = await listResources(connectionId, capability, asPath2(path));
|
|
1443
1443
|
return {
|
|
1444
1444
|
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",
|
|
@@ -1473,7 +1473,7 @@ var integrationAddDestination = defineCommand({
|
|
|
1473
1473
|
},
|
|
1474
1474
|
run: async (p, ctx) => {
|
|
1475
1475
|
const key = await openFile();
|
|
1476
|
-
const { addDestination, createDestination, createResource } = await import("./integrations-
|
|
1476
|
+
const { addDestination, createDestination, createResource } = await import("./integrations-2FDHXGFH.js");
|
|
1477
1477
|
let made;
|
|
1478
1478
|
if (p.create) made = await createDestination(key, p.capability, void 0, p.connectionId);
|
|
1479
1479
|
else {
|
|
@@ -1510,7 +1510,7 @@ var integrationDeploy = defineCommand({
|
|
|
1510
1510
|
},
|
|
1511
1511
|
run: async (p, ctx) => {
|
|
1512
1512
|
const key = await openFile();
|
|
1513
|
-
const { deployDestination, listDestinations } = await import("./integrations-
|
|
1513
|
+
const { deployDestination, listDestinations } = await import("./integrations-2FDHXGFH.js");
|
|
1514
1514
|
const all = await listDestinations(key);
|
|
1515
1515
|
const dest = p.destinationId ? all.find((d) => d.id === p.destinationId) : all.length === 1 ? all[0] : void 0;
|
|
1516
1516
|
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");
|
|
@@ -1544,7 +1544,7 @@ var integrationAttachDatabase = defineCommand({
|
|
|
1544
1544
|
},
|
|
1545
1545
|
run: async (p, ctx) => {
|
|
1546
1546
|
const key = await openFile();
|
|
1547
|
-
const { attachDatabase, createDatabase, createResource, listResources } = await import("./integrations-
|
|
1547
|
+
const { attachDatabase, createDatabase, createResource, listResources } = await import("./integrations-2FDHXGFH.js");
|
|
1548
1548
|
if (p.create) return attached(await createDatabase(key, void 0, p.connectionId), ctx);
|
|
1549
1549
|
if (!p.connectionId || !p.target) throw new CommandError("Say connectionId and target, or create: true.", "invalid_params");
|
|
1550
1550
|
let target = asPath2(p.target);
|
|
@@ -1583,7 +1583,7 @@ var integrationSubmissions = defineCommand({
|
|
|
1583
1583
|
},
|
|
1584
1584
|
run: async ({ form, limit }) => {
|
|
1585
1585
|
const key = await openFile();
|
|
1586
|
-
const { listSubmissions } = await import("./integrations-
|
|
1586
|
+
const { listSubmissions } = await import("./integrations-2FDHXGFH.js");
|
|
1587
1587
|
const rows = await listSubmissions(key, { form, limit: limit ?? 20 });
|
|
1588
1588
|
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 } };
|
|
1589
1589
|
}
|
|
@@ -1608,7 +1608,7 @@ var integrationSetSignIn = defineCommand({
|
|
|
1608
1608
|
},
|
|
1609
1609
|
run: async ({ on }, ctx) => {
|
|
1610
1610
|
const key = await openFile();
|
|
1611
|
-
const { setSignIn } = await import("./integrations-
|
|
1611
|
+
const { setSignIn } = await import("./integrations-2FDHXGFH.js");
|
|
1612
1612
|
const done = await setSignIn(key, on);
|
|
1613
1613
|
ctx.notice(on ? "Visitors can sign in." : "Sign-in is off.");
|
|
1614
1614
|
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 } };
|
|
@@ -1826,7 +1826,7 @@ var fontTeamList = defineCommand({
|
|
|
1826
1826
|
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)." }
|
|
1827
1827
|
},
|
|
1828
1828
|
run: async (args) => {
|
|
1829
|
-
const { refreshTeamFonts } = await import("./team-client-
|
|
1829
|
+
const { refreshTeamFonts } = await import("./team-client-4NDH7VS4.js");
|
|
1830
1830
|
const fonts = await refreshTeamFonts(args.workspace);
|
|
1831
1831
|
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 })) } };
|
|
1832
1832
|
}
|
|
@@ -1853,7 +1853,7 @@ var fontTeamAdd = defineCommand({
|
|
|
1853
1853
|
run: async (args, ctx) => {
|
|
1854
1854
|
const { bytes, fileName: fileName2 } = await fontBytes(args, ctx);
|
|
1855
1855
|
const { face, family, weight, style } = await resolveFace(bytes, args);
|
|
1856
|
-
const { uploadTeamFont } = await import("./team-client-
|
|
1856
|
+
const { uploadTeamFont } = await import("./team-client-4NDH7VS4.js");
|
|
1857
1857
|
const font = await uploadTeamFont(bytes, { family, weight, style, face: face.index, fileName: fileName2 }, args.workspace);
|
|
1858
1858
|
return { summary: `Added ${family} ${weight}${style === "italic" ? " italic" : ""} to the team`, data: { font } };
|
|
1859
1859
|
}
|
|
@@ -1875,7 +1875,7 @@ var fontTeamRemove = defineCommand({
|
|
|
1875
1875
|
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." }
|
|
1876
1876
|
},
|
|
1877
1877
|
run: async (args) => {
|
|
1878
|
-
const { removeTeamFont } = await import("./team-client-
|
|
1878
|
+
const { removeTeamFont } = await import("./team-client-4NDH7VS4.js");
|
|
1879
1879
|
const out = await removeTeamFont(args.id, args.workspace);
|
|
1880
1880
|
return { summary: `Removed the team font${out.freed ? " and freed its storage" : ""}`, data: out };
|
|
1881
1881
|
}
|
|
@@ -1886,7 +1886,7 @@ var fontTeamCommands = [fontTeamList, fontTeamAdd];
|
|
|
1886
1886
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
1887
1887
|
async function cloudFile() {
|
|
1888
1888
|
const [{ syncStatus }, { cloudUser }] = await Promise.all([
|
|
1889
|
-
import("./sync-
|
|
1889
|
+
import("./sync-5B55RF3R.js"),
|
|
1890
1890
|
import("./session-47XUQIYR.js")
|
|
1891
1891
|
]);
|
|
1892
1892
|
const link2 = syncStatus().link;
|
|
@@ -1948,7 +1948,7 @@ var fileTrash = defineCommand({
|
|
|
1948
1948
|
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." }
|
|
1949
1949
|
},
|
|
1950
1950
|
run: async () => {
|
|
1951
|
-
const { deleteCurrentFile, leaveDeletedFile } = await import("./delete-current-file-
|
|
1951
|
+
const { deleteCurrentFile, leaveDeletedFile } = await import("./delete-current-file-UEH67VSJ.js");
|
|
1952
1952
|
const { name: name2, kind } = await deleteCurrentFile();
|
|
1953
1953
|
leaveDeletedFile();
|
|
1954
1954
|
return { summary: kind === "cloud" ? `Moved \u201C${name2}\u201D to the Trash` : `Deleted \u201C${name2}\u201D` };
|
|
@@ -2061,11 +2061,11 @@ var fileDuplicate = defineCommand({
|
|
|
2061
2061
|
},
|
|
2062
2062
|
run: async (_p, ctx) => {
|
|
2063
2063
|
const [{ syncStatus }, { cloudApi }, { isDesktopTabs }, { createFileInTab }, { openNewCloudFile }, { v4: uuid }] = await Promise.all([
|
|
2064
|
-
import("./sync-
|
|
2064
|
+
import("./sync-5B55RF3R.js"),
|
|
2065
2065
|
import("./api-GQTC6GL4.js"),
|
|
2066
2066
|
import("./tab-mode-GUTDHIFM.js"),
|
|
2067
|
-
import("./tabs-
|
|
2068
|
-
import("./sync-
|
|
2067
|
+
import("./tabs-YQRQMAWT.js"),
|
|
2068
|
+
import("./sync-5B55RF3R.js"),
|
|
2069
2069
|
import("./dist-node-D6SSFLY5.js")
|
|
2070
2070
|
]);
|
|
2071
2071
|
const doc2 = ctx.doc();
|
|
@@ -4198,6 +4198,11 @@ var paintSetEffects = defineCommand({
|
|
|
4198
4198
|
return { summary: `Set effects on ${plural(ids.length, "layer")}`, data: { ids } };
|
|
4199
4199
|
}
|
|
4200
4200
|
});
|
|
4201
|
+
function unbindColor(p) {
|
|
4202
|
+
if (!p.boundVariables?.color) return p;
|
|
4203
|
+
const { color: _c, ...rest } = p.boundVariables;
|
|
4204
|
+
return { ...p, boundVariables: Object.keys(rest).length ? rest : void 0 };
|
|
4205
|
+
}
|
|
4201
4206
|
var paintReplaceColor = defineCommand({
|
|
4202
4207
|
id: "paint.replaceColor",
|
|
4203
4208
|
title: "Replace color",
|
|
@@ -4251,7 +4256,7 @@ var paintReplaceColor = defineCommand({
|
|
|
4251
4256
|
let out = p;
|
|
4252
4257
|
const solid2 = swapColor(p.color);
|
|
4253
4258
|
if (solid2) {
|
|
4254
|
-
out = { ...out, color: solid2 };
|
|
4259
|
+
out = unbindColor({ ...out, color: solid2 });
|
|
4255
4260
|
changed = true;
|
|
4256
4261
|
hit++;
|
|
4257
4262
|
}
|
|
@@ -4284,7 +4289,7 @@ var paintReplaceColor = defineCommand({
|
|
|
4284
4289
|
if (!c) return s;
|
|
4285
4290
|
changed = true;
|
|
4286
4291
|
hit++;
|
|
4287
|
-
return { ...s, color: c };
|
|
4292
|
+
return unbindColor({ ...s, color: c });
|
|
4288
4293
|
});
|
|
4289
4294
|
if (changed) {
|
|
4290
4295
|
patch.strokes = next;
|
|
@@ -4931,7 +4936,7 @@ var viewCopyLink = defineCommand({
|
|
|
4931
4936
|
},
|
|
4932
4937
|
run: async (args, ctx) => {
|
|
4933
4938
|
const [{ syncStatus }, { fileUrl }, { withDeepLink }] = await Promise.all([
|
|
4934
|
-
import("./sync-
|
|
4939
|
+
import("./sync-5B55RF3R.js"),
|
|
4935
4940
|
import("./api-GQTC6GL4.js"),
|
|
4936
4941
|
import("./deep-link-LWG7K7LL.js")
|
|
4937
4942
|
]);
|
|
@@ -5256,7 +5261,7 @@ var pageGo = defineCommand({
|
|
|
5256
5261
|
] }
|
|
5257
5262
|
},
|
|
5258
5263
|
run: async ({ to }) => {
|
|
5259
|
-
const { useEditorStore } = await import("./editor-store-
|
|
5264
|
+
const { useEditorStore } = await import("./editor-store-U4JCAFCU.js");
|
|
5260
5265
|
useEditorStore.getState().goToPrintPage(to);
|
|
5261
5266
|
return { summary: typeof to === "number" ? `Page ${to + 1}` : `${to} page` };
|
|
5262
5267
|
}
|
|
@@ -5290,7 +5295,7 @@ var pageSetup = defineCommand({
|
|
|
5290
5295
|
}
|
|
5291
5296
|
},
|
|
5292
5297
|
run: async (args) => {
|
|
5293
|
-
const { useEditorStore } = await import("./editor-store-
|
|
5298
|
+
const { useEditorStore } = await import("./editor-store-U4JCAFCU.js");
|
|
5294
5299
|
useEditorStore.getState().applyPageSetup(args);
|
|
5295
5300
|
return { summary: `Page setup updated${args.kind ? ` (${args.kind.toLowerCase()})` : ""}` };
|
|
5296
5301
|
}
|
|
@@ -5728,7 +5733,7 @@ async function docAtTime(doc2, ids, time2) {
|
|
|
5728
5733
|
let frameId;
|
|
5729
5734
|
if (time2 === void 0) {
|
|
5730
5735
|
try {
|
|
5731
|
-
const { useEditorStore } = await import("./editor-store-
|
|
5736
|
+
const { useEditorStore } = await import("./editor-store-U4JCAFCU.js");
|
|
5732
5737
|
const st = useEditorStore.getState();
|
|
5733
5738
|
const target = st.transport?.target;
|
|
5734
5739
|
if (st.mode !== "ANIMATE" || target?.kind !== "frame") return doc2;
|
|
@@ -6122,7 +6127,7 @@ async function runAnimationExport(format, args, ctx) {
|
|
|
6122
6127
|
const filename = exportFileName(args.filename || targetName(doc2, target), format);
|
|
6123
6128
|
const [{ exportAnimation }, { memoryDestination }] = await Promise.all([import("./video-HJ2T3LNA.js"), import("./destination-FLP3XYPI.js")]);
|
|
6124
6129
|
if (format === "lottie" || format === "dotlottie") return runLottieExport(renderer, doc2, spec, filename, ctx, memoryDestination, args.stateMachine);
|
|
6125
|
-
const planWatermark = format !== "png" && await (await import("./export-watermark-
|
|
6130
|
+
const planWatermark = format !== "png" && await (await import("./export-watermark-5IZGCYTN.js")).exportWatermark();
|
|
6126
6131
|
if (format !== "png") spec = { ...spec, watermark: planWatermark || args.watermark !== false };
|
|
6127
6132
|
const dest = ctx.destination ? await ctx.destination(filename, FORMAT_MIME[format]) : memoryDestination(filename, FORMAT_MIME[format]);
|
|
6128
6133
|
let stats;
|
|
@@ -6208,7 +6213,7 @@ var exportLottie = animationCommand((args) => args.container === "lottie" ? "dot
|
|
|
6208
6213
|
});
|
|
6209
6214
|
async function exportSite(doc2, pageId2, packaging, styling = "css", siteUrl) {
|
|
6210
6215
|
const [{ completeSite, nextFilesOf, shareImageFiles, staticFilesOf, NoSiteRuntime, bytesOf }, { fileBase }, { zipFiles }, { downloadBlob }] = await Promise.all([
|
|
6211
|
-
import("./project-
|
|
6216
|
+
import("./project-SEFKN7XE.js"),
|
|
6212
6217
|
import("./web-GL5BCN5P.js"),
|
|
6213
6218
|
import("./zip-export-64S64ROR.js"),
|
|
6214
6219
|
import("./download-3XU7ZVAR.js")
|
|
@@ -6302,7 +6307,7 @@ var exportStorefront = defineCommand({
|
|
|
6302
6307
|
const [{ storefrontInputs }, { STOREFRONT_TARGETS }, { bytesOf }, { fileBase, flatten }, { zipFiles }, { downloadBlob }] = await Promise.all([
|
|
6303
6308
|
import("./storefront-prepare-PAPD2BNC.js"),
|
|
6304
6309
|
import("./storefront-4G4YKROR.js"),
|
|
6305
|
-
import("./project-
|
|
6310
|
+
import("./project-SEFKN7XE.js"),
|
|
6306
6311
|
import("./web-GL5BCN5P.js"),
|
|
6307
6312
|
import("./zip-export-64S64ROR.js"),
|
|
6308
6313
|
import("./download-3XU7ZVAR.js")
|
|
@@ -6697,7 +6702,7 @@ var visionRegenerateImage = defineCommand({
|
|
|
6697
6702
|
const id = args.id ?? ctx.selection()[0];
|
|
6698
6703
|
if (!id) throw new ToolError("Select a generated image to regenerate.");
|
|
6699
6704
|
nodeOrThrow(ctx.doc(), id);
|
|
6700
|
-
const { regenerateImage } = await import("./client-actions-
|
|
6705
|
+
const { regenerateImage } = await import("./client-actions-YCMXTRBN.js");
|
|
6701
6706
|
regenerateImage(id, args.count);
|
|
6702
6707
|
return { summary: args.count > 1 ? `Regenerating ${args.count} variants` : "Regenerating the image", data: { id, count: args.count } };
|
|
6703
6708
|
}
|
|
@@ -11400,7 +11405,7 @@ var scriptRun = defineCommand({
|
|
|
11400
11405
|
// A script is not the turn the user is watching: confirm-tier tools are refused inside it (dispatch, `nested`).
|
|
11401
11406
|
actor: { ...ctx.actor, nested: true, label: "Script" },
|
|
11402
11407
|
// A look_at inside the script sees the document as the script has left it so far, not as it was before.
|
|
11403
|
-
use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-
|
|
11408
|
+
use: ((name2) => name2 === "render" && ctx.can("render") ? (async (ids, options) => (await import("./agent-U5CT23QH.js")).renderDocument(staged, ids, options)) : ctx.use(name2))
|
|
11404
11409
|
};
|
|
11405
11410
|
let calls = 0;
|
|
11406
11411
|
const images = [];
|
|
@@ -12220,7 +12225,7 @@ var docImportFile = defineCommand({
|
|
|
12220
12225
|
const file = new File([body], args.name);
|
|
12221
12226
|
if (file.size > MAX_BYTES) throw new ToolError(`"${args.name}" is larger than ${MAX_BYTES / 1024 / 1024} MB.`);
|
|
12222
12227
|
const [{ buildImportedDocument }, { mergeImportedDocument }] = await Promise.all([
|
|
12223
|
-
import("./plugin-import-
|
|
12228
|
+
import("./plugin-import-6GFVLHSA.js"),
|
|
12224
12229
|
import("./import-merge-W5APG7DE.js")
|
|
12225
12230
|
]);
|
|
12226
12231
|
const built = await buildImportedDocument(file);
|
|
@@ -6,7 +6,7 @@ const __filename = __popcraftPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __popcraftDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
hyperyRequestHeaders
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XHVSDFQ4.js";
|
|
10
10
|
import {
|
|
11
11
|
aiAvailability,
|
|
12
12
|
effectiveChatModel,
|
|
@@ -75,6 +75,8 @@ var AiClientError = class extends Error {
|
|
|
75
75
|
this.code = code;
|
|
76
76
|
this.status = status;
|
|
77
77
|
}
|
|
78
|
+
code;
|
|
79
|
+
status;
|
|
78
80
|
};
|
|
79
81
|
var needsReauth = (e) => e instanceof AiClientError && (e.code === "ai_reauth" || e.code === "ai_scope" || e.code === "unauthenticated");
|
|
80
82
|
function ensureAvailable() {
|
|
@@ -4858,7 +4858,7 @@ function createPopcornSlice(set2, get2) {
|
|
|
4858
4858
|
privateMode: false,
|
|
4859
4859
|
setPrivateMode: (on) => {
|
|
4860
4860
|
set2({ privateMode: on });
|
|
4861
|
-
void import("./presence-
|
|
4861
|
+
void import("./presence-5S3JHO22.js").then((m) => m.setPresencePrivate(on)).catch(() => {
|
|
4862
4862
|
});
|
|
4863
4863
|
},
|
|
4864
4864
|
/** Reveal every private item THIS user created (they sync to collaborators). Others' stay theirs. */
|
|
@@ -6924,7 +6924,7 @@ var useEditorStore = create()(
|
|
|
6924
6924
|
// A copy is a new file, so it is cloud-backed like any other (see lib/client/cloud/new-file.ts).
|
|
6925
6925
|
// Returns '' when it was refused (offline, signed out, plan full) or failed; nothing is left behind.
|
|
6926
6926
|
duplicateDocument: async (id) => {
|
|
6927
|
-
const { duplicateDocumentToCloud } = await import("./sync-
|
|
6927
|
+
const { duplicateDocumentToCloud } = await import("./sync-5B55RF3R.js");
|
|
6928
6928
|
return duplicateDocumentToCloud(id);
|
|
6929
6929
|
},
|
|
6930
6930
|
deleteDocument: async (id) => {
|
|
@@ -10428,9 +10428,9 @@ if (typeof window !== "undefined") {
|
|
|
10428
10428
|
if (typeof window !== "undefined" && navigator.webdriver) {
|
|
10429
10429
|
window.__vpDesign = async (script, o = {}) => {
|
|
10430
10430
|
const [{ registerBuiltinTools, runTool }, { editorToolContext }, { createDesignPreview }] = await Promise.all([
|
|
10431
|
-
import("./tools-
|
|
10432
|
-
import("./editor-seams-
|
|
10433
|
-
import("./live-
|
|
10431
|
+
import("./tools-NUIVD75Y.js").then(async (m) => ({ ...m, registerBuiltinTools: (await import("./builtin-C5AGHFJS.js")).registerBuiltinTools })),
|
|
10432
|
+
import("./editor-seams-KHCNE2X6.js"),
|
|
10433
|
+
import("./live-6OFYLILA.js")
|
|
10434
10434
|
]);
|
|
10435
10435
|
registerBuiltinTools();
|
|
10436
10436
|
const args = JSON.stringify({ ...o.name ? { name: o.name } : {}, ...o.size ? { size: o.size } : {}, ...o.frame ? { frame: o.frame } : {}, script });
|
|
@@ -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-U4JCAFCU.js"),
|
|
95
95
|
import("../lib/document/photo-frames.js"),
|
|
96
|
-
import("./media-tool-
|
|
96
|
+
import("./media-tool-HXECTWKQ.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,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./chunk-KBKUIFSG.js";
|
|
10
10
|
import {
|
|
11
11
|
activeTeamWorkspaceId
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RW3BWTAF.js";
|
|
13
13
|
import {
|
|
14
14
|
prepareTemplate
|
|
15
15
|
} from "./chunk-D3CLCZGW.js";
|
|
16
16
|
import {
|
|
17
17
|
markLibraryDocument
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-EXIMH4VA.js";
|
|
19
19
|
import {
|
|
20
20
|
listDocMetas,
|
|
21
21
|
saveDocSnapshot
|