@popcraft/kit 0.55.2 → 0.55.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-FKHU27BN.js → agent-H4MB6SAO.js} +1 -1
- package/dist/chunks/{api-JUPUFV5S.js → api-WLDSRSFX.js} +1 -1
- package/dist/chunks/{builtin-J6ZGZ4XA.js → builtin-WEBXXT7A.js} +3 -3
- package/dist/chunks/{buy-credits-SONV2G3Z.js → buy-credits-OJPM3MO4.js} +4 -4
- package/dist/chunks/{check-template-UAH7O2PK.js → check-template-VTVX2V2O.js} +2 -2
- package/dist/chunks/{chunk-HZPZGSPI.js → chunk-3DK3PVRQ.js} +4 -4
- package/dist/chunks/{chunk-SYTXPXKM.js → chunk-5O2GXE33.js} +3 -3
- package/dist/chunks/{chunk-VCRMIT3U.js → chunk-A5V6RLDB.js} +1 -1
- package/dist/chunks/{chunk-7EWR3ZPW.js → chunk-AMAKZX23.js} +3 -3
- package/dist/chunks/{chunk-EYUFOLVB.js → chunk-AZUGCZN3.js} +3 -3
- package/dist/chunks/{chunk-5ESKXIOI.js → chunk-BCWYDJC6.js} +5 -5
- package/dist/chunks/{chunk-K37ABRNF.js → chunk-C6AMEANF.js} +6 -6
- package/dist/chunks/{chunk-UUVHJ4E7.js → chunk-CM7MZQLR.js} +2 -2
- package/dist/chunks/{chunk-GUFAKFYN.js → chunk-FCSL5B4G.js} +1 -1
- package/dist/chunks/{chunk-LPZSNJ6C.js → chunk-GUIW7DSC.js} +2 -2
- package/dist/chunks/{chunk-KKEUJBVB.js → chunk-IMQP3MHC.js} +2 -2
- package/dist/chunks/{chunk-6RTOG3SA.js → chunk-LUBEXKDJ.js} +12 -1
- package/dist/chunks/{chunk-TQXHOEFN.js → chunk-NW4DCD5O.js} +1 -1
- package/dist/chunks/{chunk-7AINVVFW.js → chunk-O7ETIWNG.js} +3 -3
- package/dist/chunks/{chunk-YNOGVTNE.js → chunk-PHO6X2B2.js} +11 -11
- package/dist/chunks/{chunk-WFAZNRI3.js → chunk-RKISJDWZ.js} +6 -6
- package/dist/chunks/{chunk-CUKVNWIW.js → chunk-SNE2WLUE.js} +1 -1
- package/dist/chunks/{chunk-IWE3TYKJ.js → chunk-WKOFUGDL.js} +48 -48
- package/dist/chunks/{chunk-4PUI3V2J.js → chunk-WVWXXB2M.js} +6 -6
- package/dist/chunks/{chunk-KZOHHKMB.js → chunk-YICKA742.js} +1 -1
- package/dist/chunks/{chunk-ZHANJ25S.js → chunk-YKGXSVJN.js} +9 -9
- package/dist/chunks/{chunk-DCULKNUV.js → chunk-ZIVPZ262.js} +5 -5
- package/dist/chunks/{client-ODU66HFR.js → client-JEVPLGGF.js} +3 -3
- package/dist/chunks/{client-W4KDKXJP.js → client-YMDV6MDY.js} +5 -5
- package/dist/chunks/{client-7TCGFXUH.js → client-YRR4ZH52.js} +1 -1
- package/dist/chunks/{client-actions-G23VP2LO.js → client-actions-NGQG2SBX.js} +7 -7
- package/dist/chunks/{dangerous-QHXUBTSH.js → dangerous-FHAT7SAQ.js} +3 -3
- package/dist/chunks/{delete-current-file-AC3H7FEO.js → delete-current-file-CIEAXLJD.js} +7 -7
- package/dist/chunks/{editor-seams-FWGHLGM7.js → editor-seams-MNSMUZF6.js} +12 -12
- package/dist/chunks/{editor-store-EMCLHKBR.js → editor-store-NTRUWPYO.js} +1 -1
- package/dist/chunks/{export-watermark-JXMRE46M.js → export-watermark-UVQID6Q3.js} +7 -7
- package/dist/chunks/{eyedropper-BC35FTWT.js → eyedropper-UV5UEGZF.js} +1 -1
- package/dist/chunks/{generate-media-4ZBFI25S.js → generate-media-EHBLU4ZU.js} +5 -5
- package/dist/chunks/{host-6B2GGGNE.js → host-IXHIW6S6.js} +8 -8
- package/dist/chunks/{integrations-U6UENGFR.js → integrations-VT7VMJ5S.js} +2 -2
- package/dist/chunks/{libraries-GFVTGUTZ.js → libraries-I2GMDUWH.js} +7 -7
- package/dist/chunks/{live-5D6BV5X3.js → live-XIZRCGN7.js} +1 -1
- package/dist/chunks/{media-tool-4ETLAS2Q.js → media-tool-OIIV4OCQ.js} +1 -1
- package/dist/chunks/{new-file-WLMSKM3H.js → new-file-3DSUSBAS.js} +5 -5
- package/dist/chunks/{plugin-COICIQPS.js → plugin-ETEABZQW.js} +2 -2
- package/dist/chunks/{plugin-import-NWEKZ7AJ.js → plugin-import-RUZFO3Z3.js} +16 -16
- package/dist/chunks/{presence-X6DTRNUD.js → presence-R4ULZAVE.js} +2 -2
- package/dist/chunks/{project-CQWH7QSM.js → project-W5G66BBB.js} +1 -1
- package/dist/chunks/{publish-site-R3ZTK4OM.js → publish-site-U4UDWOMX.js} +9 -9
- package/dist/chunks/{publish-store-GCNH64OY.js → publish-store-ZYYOWWEZ.js} +4 -4
- package/dist/chunks/{raster-actions-Y4ULMM53.js → raster-actions-XX6SKK7V.js} +1 -1
- package/dist/chunks/{runner-GXJMECWH.js → runner-GQCVZL2K.js} +19 -19
- package/dist/chunks/{sites-D6IA7WTP.js → sites-V3J7T6AK.js} +2 -2
- package/dist/chunks/{store-4ZBTALMW.js → store-62RBSSX6.js} +8 -8
- package/dist/chunks/{sync-VOJYNDQI.js → sync-SCX5AHQB.js} +7 -7
- package/dist/chunks/{tabs-K4MZRWKN.js → tabs-3Q45P77E.js} +10 -10
- package/dist/chunks/{team-2XBCMJUW.js → team-UMTFETUC.js} +2 -2
- package/dist/chunks/{team-client-KLTF3WFW.js → team-client-ALTJV3YG.js} +2 -2
- package/dist/chunks/{templates-CU6OBTEN.js → templates-KGGDGD2B.js} +1 -1
- package/dist/chunks/{tools-EBEDL7N6.js → tools-CHTTNUKI.js} +2 -2
- package/dist/chunks/{ui-commands-TJI7WUQ6.js → ui-commands-S22ADYXN.js} +14 -14
- package/dist/chunks/{versions-ZEEBP3V3.js → versions-FOOCCGKY.js} +7 -7
- 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-GUIW7DSC.js";
|
|
11
|
+
import "./chunk-WKOFUGDL.js";
|
|
12
12
|
import "./chunk-IF7VGA4A.js";
|
|
13
13
|
import "./chunk-NP5GZ7KX.js";
|
|
14
14
|
import "./chunk-FWV6QEQB.js";
|
|
@@ -20,7 +20,7 @@ import "./chunk-FOIVUBMA.js";
|
|
|
20
20
|
import "./chunk-MM5A2JXD.js";
|
|
21
21
|
import "./chunk-BYK4UKFZ.js";
|
|
22
22
|
import "./chunk-QYE5ZBKF.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-5O2GXE33.js";
|
|
24
24
|
import "./chunk-E62GNCKF.js";
|
|
25
25
|
import "./chunk-ABPJ2NHG.js";
|
|
26
26
|
import "./chunk-OIDJ7NKJ.js";
|
|
@@ -7,19 +7,19 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
HYPERY_TEAM_HEADER,
|
|
9
9
|
hyperyRequestHeaders
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-AMAKZX23.js";
|
|
11
|
+
import "./chunk-FCSL5B4G.js";
|
|
12
12
|
import {
|
|
13
13
|
openLink
|
|
14
14
|
} from "./chunk-VUEGRBOY.js";
|
|
15
15
|
import {
|
|
16
16
|
useHyperyTeam
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-AZUGCZN3.js";
|
|
18
18
|
import {
|
|
19
19
|
ApiError,
|
|
20
20
|
inAppPurchases,
|
|
21
21
|
purchasesAllowed
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-LUBEXKDJ.js";
|
|
23
23
|
import {
|
|
24
24
|
openPlanDialog
|
|
25
25
|
} from "./chunk-EFGI7YEY.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-YKGXSVJN.js";
|
|
10
10
|
import {
|
|
11
11
|
builtinCommands
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WKOFUGDL.js";
|
|
13
13
|
import "./chunk-IF7VGA4A.js";
|
|
14
14
|
import "./chunk-NP5GZ7KX.js";
|
|
15
15
|
import "./chunk-FWV6QEQB.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-THSYXT6D.js";
|
|
10
10
|
import {
|
|
11
11
|
notice
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IMQP3MHC.js";
|
|
13
13
|
import {
|
|
14
14
|
effectiveChatModel,
|
|
15
15
|
setModelPref,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-QW3TASQN.js";
|
|
18
18
|
import {
|
|
19
19
|
useEditorStore
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-RKISJDWZ.js";
|
|
21
21
|
import {
|
|
22
22
|
create
|
|
23
23
|
} from "./chunk-6WXASC7R.js";
|
|
@@ -1797,7 +1797,7 @@ async function sendMessage(text) {
|
|
|
1797
1797
|
if (!useAgentStore.getState().activeThreadId) newThread();
|
|
1798
1798
|
const mentions = pruneMentions(body, useAgentStore.getState().draftMentions);
|
|
1799
1799
|
useAgentStore.setState({ draft: "", draftMentions: [], error: null });
|
|
1800
|
-
const { runTurn } = await import("./runner-
|
|
1800
|
+
const { runTurn } = await import("./runner-GQCVZL2K.js");
|
|
1801
1801
|
await runTurn(body, mentions);
|
|
1802
1802
|
}
|
|
1803
1803
|
function stop() {
|
|
@@ -1900,7 +1900,7 @@ var clearTaskChildren = () => useAgentStore.setState({ taskChildren: {} });
|
|
|
1900
1900
|
function subscribeChildTools() {
|
|
1901
1901
|
let dispose;
|
|
1902
1902
|
let cancelled = false;
|
|
1903
|
-
void import("./runner-
|
|
1903
|
+
void import("./runner-GQCVZL2K.js").then(({ onChildTool }) => {
|
|
1904
1904
|
const off = onChildTool((report) => {
|
|
1905
1905
|
if (report?.status !== "running" || report.jobId) return;
|
|
1906
1906
|
recordChildTool(report.toolCallId ?? "", report.name);
|
|
@@ -57,19 +57,19 @@ async function renderDocument(doc, nodeIds, options) {
|
|
|
57
57
|
function generateCapability(ctx) {
|
|
58
58
|
return async (prompt, options = {}) => {
|
|
59
59
|
if (options.format === "audio") {
|
|
60
|
-
const { requestAudio } = await import("./client-
|
|
60
|
+
const { requestAudio } = await import("./client-YMDV6MDY.js");
|
|
61
61
|
const { signal: signal2, format: _f, ...rest2 } = options;
|
|
62
62
|
void _f;
|
|
63
63
|
return requestAudio({ prompt, ...rest2 }, signal2 ?? ctx.signal);
|
|
64
64
|
}
|
|
65
65
|
if (options.format === "video") {
|
|
66
|
-
const { generateVideoFile } = await import("./generate-media-
|
|
66
|
+
const { generateVideoFile } = await import("./generate-media-EHBLU4ZU.js");
|
|
67
67
|
const { format: _f, signal: signal2, ...rest2 } = options;
|
|
68
68
|
void _f;
|
|
69
69
|
return generateVideoFile({ ...rest2, prompt, doc: ctx.doc() }, { signal: signal2 ?? ctx.signal });
|
|
70
70
|
}
|
|
71
71
|
const [{ requestImage }, { effectiveImageModel, useAiStore }] = await Promise.all([
|
|
72
|
-
import("./client-
|
|
72
|
+
import("./client-YMDV6MDY.js"),
|
|
73
73
|
import("./client-store-QRM25DG4.js")
|
|
74
74
|
]);
|
|
75
75
|
const modelId = effectiveImageModel(useAiStore.getState());
|
|
@@ -6,15 +6,15 @@ const __filename = __popcraftPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __popcraftDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
loadEntitlements
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FCSL5B4G.js";
|
|
10
10
|
import {
|
|
11
11
|
activeHyperyTeamId,
|
|
12
12
|
activeTeamWorkspaceId,
|
|
13
13
|
useHyperyTeam
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-AZUGCZN3.js";
|
|
15
15
|
import {
|
|
16
16
|
inAppPurchases
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-LUBEXKDJ.js";
|
|
18
18
|
import {
|
|
19
19
|
accessToken
|
|
20
20
|
} from "./chunk-V4JUCTGH.js";
|
|
@@ -7,7 +7,7 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
cloudApi,
|
|
9
9
|
invalidateMe
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LUBEXKDJ.js";
|
|
11
11
|
import {
|
|
12
12
|
create
|
|
13
13
|
} from "./chunk-6WXASC7R.js";
|
|
@@ -130,7 +130,7 @@ async function followFileTeam(key) {
|
|
|
130
130
|
const { teams, personalWorkspaceId } = useHyperyTeam.getState();
|
|
131
131
|
if (!teams) return;
|
|
132
132
|
try {
|
|
133
|
-
const { cloudApi: cloudApi2 } = await import("./api-
|
|
133
|
+
const { cloudApi: cloudApi2 } = await import("./api-WLDSRSFX.js");
|
|
134
134
|
const { file } = await cloudApi2.getFile(key);
|
|
135
135
|
if (file.workspaceId === personalWorkspaceId) {
|
|
136
136
|
selectHyperyTeam("", "");
|
|
@@ -150,7 +150,7 @@ function startHyperyTeams() {
|
|
|
150
150
|
maybePromptForTeam();
|
|
151
151
|
void followFileTeam(linkedKey);
|
|
152
152
|
});
|
|
153
|
-
void import("./sync-
|
|
153
|
+
void import("./sync-SCX5AHQB.js").then(({ onSyncStatus, syncStatus }) => {
|
|
154
154
|
linkedKey = syncStatus().link?.key ?? null;
|
|
155
155
|
void followFileTeam(linkedKey);
|
|
156
156
|
onSyncStatus((_s, link) => {
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-E62GNCKF.js";
|
|
16
16
|
import {
|
|
17
17
|
syncStatus
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ZIVPZ262.js";
|
|
19
19
|
import {
|
|
20
20
|
exportNodeToSVG
|
|
21
21
|
} from "./chunk-3EYF2YPU.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
import {
|
|
26
26
|
setPluginTabs,
|
|
27
27
|
useEditorStore
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-RKISJDWZ.js";
|
|
29
29
|
import {
|
|
30
30
|
openBeside
|
|
31
31
|
} from "./chunk-VUEGRBOY.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-ETEABZQW.js");
|
|
73
73
|
return dispatchPluginCall(env, method, params);
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -579,7 +579,7 @@ async function runPlugin(pluginId, commandId, opts = {}) {
|
|
|
579
579
|
if (!openBeside(url)) throw new Error("The browser blocked the new tab");
|
|
580
580
|
},
|
|
581
581
|
createDocument: async (opts2) => {
|
|
582
|
-
const { createFreshFileOrExplain } = await import("./new-file-
|
|
582
|
+
const { createFreshFileOrExplain } = await import("./new-file-3DSUSBAS.js");
|
|
583
583
|
const created = await createFreshFileOrExplain({}, { name: opts2?.name });
|
|
584
584
|
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})`);
|
|
585
585
|
await useEditorStore.getState().openDocument(created.docId);
|
|
@@ -769,7 +769,7 @@ if (typeof window !== "undefined") {
|
|
|
769
769
|
const name = d.name || "Imported";
|
|
770
770
|
void (async () => {
|
|
771
771
|
try {
|
|
772
|
-
const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-
|
|
772
|
+
const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-RUZFO3Z3.js");
|
|
773
773
|
if (d.ir && typeof d.ir === "object") {
|
|
774
774
|
await applyPluginLayoutIr(d.ir, { mode, name });
|
|
775
775
|
return;
|
|
@@ -20,24 +20,24 @@ import {
|
|
|
20
20
|
} from "./chunk-F7FHTESQ.js";
|
|
21
21
|
import {
|
|
22
22
|
notice
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-IMQP3MHC.js";
|
|
24
24
|
import {
|
|
25
25
|
agentContext
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-5O2GXE33.js";
|
|
27
27
|
import {
|
|
28
28
|
collabSession,
|
|
29
29
|
syncStatus
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-ZIVPZ262.js";
|
|
31
31
|
import {
|
|
32
32
|
loadEntitlements
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-FCSL5B4G.js";
|
|
34
34
|
import {
|
|
35
35
|
persist,
|
|
36
36
|
useEditorStore
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-RKISJDWZ.js";
|
|
38
38
|
import {
|
|
39
39
|
cloudApi
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-LUBEXKDJ.js";
|
|
41
41
|
import {
|
|
42
42
|
create
|
|
43
43
|
} from "./chunk-6WXASC7R.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-NTRUWPYO.js"),
|
|
95
95
|
import("../lib/document/photo-frames.js"),
|
|
96
|
-
import("./media-tool-
|
|
96
|
+
import("./media-tool-OIIV4OCQ.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);
|
|
@@ -7,10 +7,10 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
builtinCommands,
|
|
9
9
|
registerBuiltinCommands
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WKOFUGDL.js";
|
|
11
11
|
import {
|
|
12
12
|
toolView
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5O2GXE33.js";
|
|
14
14
|
import {
|
|
15
15
|
init_define_POPCRAFT_COMPONENT_IDS
|
|
16
16
|
} from "./chunk-4LR5JFGB.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
requestImageAction,
|
|
23
23
|
sizeForAspect,
|
|
24
24
|
vectorSupport
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-A5V6RLDB.js";
|
|
26
26
|
import {
|
|
27
27
|
external_exports
|
|
28
28
|
} from "./chunk-QYE5ZBKF.js";
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
} from "./chunk-3EYF2YPU.js";
|
|
32
32
|
import {
|
|
33
33
|
useEditorStore
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-RKISJDWZ.js";
|
|
35
35
|
import {
|
|
36
36
|
withHistoryGroup
|
|
37
37
|
} from "./chunk-AWH6VFF3.js";
|
|
@@ -243,9 +243,20 @@ function limitMessage(d) {
|
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
// lib/billing/purchases.ts
|
|
246
|
+
var PLAY_APP_KEY = "pc:play-app";
|
|
247
|
+
function inPlayApp() {
|
|
248
|
+
if (typeof window === "undefined" || typeof document === "undefined") return false;
|
|
249
|
+
const fromApp = document.referrer.startsWith("android-app://app.popcraft");
|
|
250
|
+
try {
|
|
251
|
+
if (fromApp) sessionStorage.setItem(PLAY_APP_KEY, "1");
|
|
252
|
+
return fromApp || sessionStorage.getItem(PLAY_APP_KEY) === "1";
|
|
253
|
+
} catch {
|
|
254
|
+
return fromApp;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
246
257
|
function purchaseChannel() {
|
|
247
258
|
const store = storePlatform();
|
|
248
|
-
if (store === null) return "web";
|
|
259
|
+
if (store === null) return inPlayApp() ? null : "web";
|
|
249
260
|
return store === "ios" || store === "macos" ? "app_store" : null;
|
|
250
261
|
}
|
|
251
262
|
function purchasesAllowed() {
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
hostEnv,
|
|
10
10
|
plain,
|
|
11
11
|
registerBuiltinCommands
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WKOFUGDL.js";
|
|
13
13
|
import {
|
|
14
14
|
storeOpsSeam
|
|
15
15
|
} from "./chunk-VCY5ZYCK.js";
|
|
@@ -618,7 +618,7 @@ var commands = [
|
|
|
618
618
|
const [{ storefrontInputs }, { STOREFRONT_TARGETS }, { bytesOf }, { zipFiles }, { EXPORT_NODE_CAP }] = await Promise.all([
|
|
619
619
|
import("./storefront-prepare-ORDEDJJG.js"),
|
|
620
620
|
import("./storefront-4Y7ZBJW5.js"),
|
|
621
|
-
import("./project-
|
|
621
|
+
import("./project-W5G66BBB.js"),
|
|
622
622
|
import("./zip-export-MY5KVTJH.js"),
|
|
623
623
|
import("./tree-C66L6YYD.js")
|
|
624
624
|
]);
|
|
@@ -815,7 +815,7 @@ var pluginRun = defineCommand({
|
|
|
815
815
|
}
|
|
816
816
|
},
|
|
817
817
|
run: async (p, ctx) => {
|
|
818
|
-
const { runPlugin } = await import("./host-
|
|
818
|
+
const { runPlugin } = await import("./host-IXHIW6S6.js");
|
|
819
819
|
await runPlugin(p.pluginId, p.commandId);
|
|
820
820
|
ctx.notice(`Started ${p.pluginId}.`);
|
|
821
821
|
return {
|
|
@@ -6,14 +6,14 @@ const __filename = __popcraftPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __popcraftDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
pluginRun
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-O7ETIWNG.js";
|
|
10
10
|
import {
|
|
11
11
|
fileCommands,
|
|
12
12
|
fontTeamRemove,
|
|
13
13
|
integrationConfirmCommands,
|
|
14
14
|
mediaDelete,
|
|
15
15
|
publishCommands
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WKOFUGDL.js";
|
|
17
17
|
import {
|
|
18
18
|
external_exports
|
|
19
19
|
} from "./chunk-QYE5ZBKF.js";
|
|
@@ -53,7 +53,7 @@ var collabSetSpotlight = defineCommand({
|
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
run: async ({ on }, ctx) => {
|
|
56
|
-
const { setSpotlight } = await import("./presence-
|
|
56
|
+
const { setSpotlight } = await import("./presence-R4ULZAVE.js");
|
|
57
57
|
setSpotlight(on);
|
|
58
58
|
ctx.notice(on ? "Spotlight on \u2014 everyone is following this view." : "Spotlight off.");
|
|
59
59
|
return { summary: on ? "Spotlight on" : "Spotlight off", data: { spotlight: on } };
|
|
@@ -80,7 +80,7 @@ var collabRevealPrivate = defineCommand({
|
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
run: async (_p, ctx) => {
|
|
83
|
-
const { useEditorStore } = await import("./editor-store-
|
|
83
|
+
const { useEditorStore } = await import("./editor-store-NTRUWPYO.js");
|
|
84
84
|
const before = Object.values(useEditorStore.getState().document.nodes).filter((n) => n.privateTo).length;
|
|
85
85
|
useEditorStore.getState().revealPrivate();
|
|
86
86
|
ctx.notice(before ? `Revealed ${before} private item${before === 1 ? "" : "s"}.` : "Nothing was private.");
|
|
@@ -144,7 +144,7 @@ var documentDelete = defineCommand({
|
|
|
144
144
|
}
|
|
145
145
|
},
|
|
146
146
|
run: async ({ id }, ctx) => {
|
|
147
|
-
const { useEditorStore } = await import("./editor-store-
|
|
147
|
+
const { useEditorStore } = await import("./editor-store-NTRUWPYO.js");
|
|
148
148
|
const wasOpen = useEditorStore.getState().document.id === id;
|
|
149
149
|
await useEditorStore.getState().deleteDocument(id);
|
|
150
150
|
ctx.notice("Deleted the document.");
|
|
@@ -188,7 +188,7 @@ var libraryPublish = defineCommand({
|
|
|
188
188
|
}
|
|
189
189
|
},
|
|
190
190
|
run: async (p, ctx) => {
|
|
191
|
-
const { publishLibrary } = await import("./libraries-
|
|
191
|
+
const { publishLibrary } = await import("./libraries-I2GMDUWH.js");
|
|
192
192
|
const doc = ctx.doc();
|
|
193
193
|
const pick = {
|
|
194
194
|
componentIds: p.componentIds ?? Object.keys(doc.components ?? {}),
|
|
@@ -220,7 +220,7 @@ var libraryUnpublish = defineCommand({
|
|
|
220
220
|
},
|
|
221
221
|
run: async ({ libraryId }, ctx) => {
|
|
222
222
|
if (!libraryId.trim()) throw new CommandError("Which library? Pass its `libraryId`.", "invalid_params");
|
|
223
|
-
const { unpublishLibrary } = await import("./libraries-
|
|
223
|
+
const { unpublishLibrary } = await import("./libraries-I2GMDUWH.js");
|
|
224
224
|
await unpublishLibrary(libraryId);
|
|
225
225
|
ctx.notice(`Unpublished library ${libraryId}.`);
|
|
226
226
|
return { summary: `Unpublished library ${libraryId}`, data: { libraryId, unpublished: true } };
|
|
@@ -232,8 +232,8 @@ var libraryCommands = [libraryPublish, libraryUnpublish];
|
|
|
232
232
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
233
233
|
async function findVersion(id) {
|
|
234
234
|
const [{ useEditorStore }, { versionLabel }] = await Promise.all([
|
|
235
|
-
import("./editor-store-
|
|
236
|
-
import("./versions-
|
|
235
|
+
import("./editor-store-NTRUWPYO.js"),
|
|
236
|
+
import("./versions-FOOCCGKY.js")
|
|
237
237
|
]);
|
|
238
238
|
const meta = useEditorStore.getState().versions.find((v) => v.id === id);
|
|
239
239
|
if (!meta) {
|
|
@@ -266,7 +266,7 @@ var versionRestore = defineCommand({
|
|
|
266
266
|
},
|
|
267
267
|
run: async ({ id }) => {
|
|
268
268
|
const found = await findVersion(id);
|
|
269
|
-
const { restoreVersion } = await import("./versions-
|
|
269
|
+
const { restoreVersion } = await import("./versions-FOOCCGKY.js");
|
|
270
270
|
await restoreVersion(found.meta);
|
|
271
271
|
return { summary: `Restored \u201C${found.label}\u201D`, data: { id, label: found.label, restored: true } };
|
|
272
272
|
}
|
|
@@ -291,7 +291,7 @@ var versionDelete = defineCommand({
|
|
|
291
291
|
},
|
|
292
292
|
run: async ({ id }, ctx) => {
|
|
293
293
|
const found = await findVersion(id);
|
|
294
|
-
const { deleteVersion } = await import("./versions-
|
|
294
|
+
const { deleteVersion } = await import("./versions-FOOCCGKY.js");
|
|
295
295
|
await deleteVersion(found.meta);
|
|
296
296
|
ctx.notice(`Deleted the version \u201C${found.label}\u201D.`);
|
|
297
297
|
return { summary: `Deleted the version \u201C${found.label}\u201D`, data: { id, label: found.label, deleted: true } };
|
|
@@ -4836,7 +4836,7 @@ function createPopcornSlice(set2, get2) {
|
|
|
4836
4836
|
privateMode: false,
|
|
4837
4837
|
setPrivateMode: (on) => {
|
|
4838
4838
|
set2({ privateMode: on });
|
|
4839
|
-
void import("./presence-
|
|
4839
|
+
void import("./presence-R4ULZAVE.js").then((m) => m.setPresencePrivate(on)).catch(() => {
|
|
4840
4840
|
});
|
|
4841
4841
|
},
|
|
4842
4842
|
/** Reveal every private item THIS user created (they sync to collaborators). Others' stay theirs. */
|
|
@@ -6881,7 +6881,7 @@ var useEditorStore = create()(
|
|
|
6881
6881
|
// A copy is a new file, so it is cloud-backed like any other (see lib/client/cloud/new-file.ts).
|
|
6882
6882
|
// Returns '' when it was refused (offline, signed out, plan full) or failed; nothing is left behind.
|
|
6883
6883
|
duplicateDocument: async (id) => {
|
|
6884
|
-
const { duplicateDocumentToCloud } = await import("./sync-
|
|
6884
|
+
const { duplicateDocumentToCloud } = await import("./sync-SCX5AHQB.js");
|
|
6885
6885
|
return duplicateDocumentToCloud(id);
|
|
6886
6886
|
},
|
|
6887
6887
|
deleteDocument: async (id) => {
|
|
@@ -10385,9 +10385,9 @@ if (typeof window !== "undefined") {
|
|
|
10385
10385
|
if (typeof window !== "undefined" && navigator.webdriver) {
|
|
10386
10386
|
window.__vpDesign = async (script, o = {}) => {
|
|
10387
10387
|
const [{ registerBuiltinTools, runTool }, { editorToolContext }, { createDesignPreview }] = await Promise.all([
|
|
10388
|
-
import("./tools-
|
|
10389
|
-
import("./editor-seams-
|
|
10390
|
-
import("./live-
|
|
10388
|
+
import("./tools-CHTTNUKI.js").then(async (m) => ({ ...m, registerBuiltinTools: (await import("./builtin-WEBXXT7A.js")).registerBuiltinTools })),
|
|
10389
|
+
import("./editor-seams-MNSMUZF6.js"),
|
|
10390
|
+
import("./live-XIZRCGN7.js")
|
|
10391
10391
|
]);
|
|
10392
10392
|
registerBuiltinTools();
|
|
10393
10393
|
const args = JSON.stringify({ ...o.name ? { name: o.name } : {}, ...o.size ? { size: o.size } : {}, ...o.frame ? { frame: o.frame } : {}, script });
|
|
@@ -10403,7 +10403,7 @@ if (typeof window !== "undefined" && navigator.webdriver) {
|
|
|
10403
10403
|
return runTool("write_design", args, { ...editorToolContext(), toolCallId: "dev" });
|
|
10404
10404
|
};
|
|
10405
10405
|
window.__vpLoadTemplate = async (id, sizeId) => {
|
|
10406
|
-
const [{ searchTemplates, fetchCloudTemplate }, { documentFromTemplate }, { prepareTemplate }] = await Promise.all([import("./templates-
|
|
10406
|
+
const [{ searchTemplates, fetchCloudTemplate }, { documentFromTemplate }, { prepareTemplate }] = await Promise.all([import("./templates-KGGDGD2B.js"), import("../lib/templates/apply.js"), import("./use-T6DDJH2A.js")]);
|
|
10407
10407
|
if (!id) return (await searchTemplates({ scope: "official", limit: 200 })).templates.map((t3) => t3.id);
|
|
10408
10408
|
const t2 = typeof id === "string" ? await fetchCloudTemplate(id) : id;
|
|
10409
10409
|
if (!t2) throw new Error(`No template ${id}`);
|