@popcraft/kit 1.2.1 → 1.2.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/{agent-5ZVVUKVL.js → agent-A7BOM22T.js} +1 -1
- package/dist/chunks/{builtin-ZWF5I77H.js → builtin-AOXFUXCD.js} +4 -4
- package/dist/chunks/{buy-credits-T7C577LV.js → buy-credits-EJCPC5V7.js} +2 -2
- package/dist/chunks/{check-template-MWOIYAGA.js → check-template-V5U2PC6J.js} +6 -6
- package/dist/chunks/{chunk-7PINHPNT.js → chunk-24ZYL3SN.js} +1 -1
- package/dist/chunks/{chunk-HOWSSUN7.js → chunk-33CFABZ2.js} +49 -49
- package/dist/chunks/{chunk-AMCNGXZF.js → chunk-3UBIOYSA.js} +9 -9
- package/dist/chunks/{chunk-FW3EG2VB.js → chunk-6S57YBJX.js} +1 -3
- package/dist/chunks/{chunk-4CGNSTLN.js → chunk-BOIBQ7MZ.js} +2 -2
- package/dist/chunks/{chunk-GZJHMFPW.js → chunk-C22ZRLC7.js} +7 -7
- package/dist/chunks/{chunk-BBBKLNSW.js → chunk-DWEPCHQV.js} +11 -11
- package/dist/chunks/{chunk-Z53B7NL7.js → chunk-F7TJGTY6.js} +2 -2
- package/dist/chunks/{chunk-WP272KYV.js → chunk-FIJDYPTN.js} +1 -1
- package/dist/chunks/{chunk-SGBWEISH.js → chunk-HDSIM2CO.js} +2 -2
- package/dist/chunks/{chunk-TXEKFUEK.js → chunk-KA2MGAQJ.js} +4 -4
- package/dist/chunks/{chunk-FRDEKTX2.js → chunk-KSNXRXZE.js} +1 -1
- package/dist/chunks/{chunk-DVJ3JIXV.js → chunk-KVPGK3AI.js} +1 -1
- package/dist/chunks/{chunk-NAZQXDXX.js → chunk-M5ETLHVZ.js} +2 -2
- package/dist/chunks/{chunk-TEDUOEHA.js → chunk-NPUNFQF3.js} +6 -6
- package/dist/chunks/{chunk-MEHR2GJ4.js → chunk-OACNFDDE.js} +5 -0
- package/dist/chunks/{chunk-HW6KW3X3.js → chunk-OV2W3YJU.js} +5 -5
- package/dist/chunks/{chunk-NLXZIY6X.js → chunk-RUTPUYED.js} +7 -5
- package/dist/chunks/{chunk-D266WUDD.js → chunk-S3LCCBYA.js} +5 -5
- package/dist/chunks/{chunk-6LCVEEGJ.js → chunk-SRY4ZWCH.js} +3 -3
- package/dist/chunks/{chunk-NRPLKJWD.js → chunk-TJGTNEYL.js} +2 -2
- package/dist/chunks/{chunk-47BCHVLO.js → chunk-TPLD3ZO5.js} +1 -1
- package/dist/chunks/{chunk-RPKBOARY.js → chunk-VUNR4TA5.js} +2 -2
- package/dist/chunks/{chunk-IKGV64X7.js → chunk-VV7HKDNH.js} +4 -4
- package/dist/chunks/{chunk-LZJRXAUA.js → chunk-WIQJ4QRA.js} +2 -2
- package/dist/chunks/{chunk-URH563AK.js → chunk-X4B7SE3J.js} +1 -1
- package/dist/chunks/{client-N5HTFSII.js → client-ATCRQ4Z2.js} +2 -2
- package/dist/chunks/{client-72ZFWAFV.js → client-FKUY77S6.js} +1 -1
- package/dist/chunks/{client-QV5XYYCT.js → client-LD6UEIKF.js} +3 -3
- package/dist/chunks/{client-actions-3X7PCEC6.js → client-actions-5ZFSAP4E.js} +5 -5
- package/dist/chunks/{components-XPBO2ZM5.js → components-JJJ6NOV7.js} +3 -3
- package/dist/chunks/{dangerous-LD5YGW2I.js → dangerous-C7S2EUYQ.js} +4 -4
- package/dist/chunks/{delete-current-file-DBXJ3X5W.js → delete-current-file-BV4SUOBR.js} +5 -5
- package/dist/chunks/{editor-seams-TOAYXI2M.js → editor-seams-Y5E3HJSY.js} +13 -13
- package/dist/chunks/{editor-store-LZFNEHYB.js → editor-store-JQA3IFQ4.js} +1 -1
- package/dist/chunks/{export-watermark-M3URLKD7.js → export-watermark-YUXHSEHB.js} +5 -5
- package/dist/chunks/{eyedropper-4DFRX5AG.js → eyedropper-OTQO5UFY.js} +1 -1
- package/dist/chunks/{generate-media-APYNWFHP.js → generate-media-4YZWLMG5.js} +3 -3
- package/dist/chunks/{host-HE3UQKE3.js → host-JSYAWYNV.js} +4 -4
- package/dist/chunks/{host-KJT6LWVX.js → host-SV2ZGKB3.js} +6 -6
- package/dist/chunks/{integrations-SGZBIQUU.js → integrations-2J5ACHB3.js} +1 -1
- package/dist/chunks/{libraries-7AF3R3GJ.js → libraries-5WFWU4EA.js} +5 -5
- package/dist/chunks/{live-K2YZRNKK.js → live-7CTGJ4VD.js} +1 -1
- package/dist/chunks/{media-tool-VBUUZZIH.js → media-tool-IHV3MK22.js} +1 -1
- package/dist/chunks/{new-file-QSMLBVRU.js → new-file-Z5VURBEJ.js} +3 -3
- package/dist/chunks/{next-commerce-V2QELI45.js → next-commerce-BAVLRG73.js} +5 -5
- package/dist/chunks/{plugin-WKKOD3IW.js → plugin-MTBJ57I6.js} +3 -3
- package/dist/chunks/{plugin-import-GALNL6SB.js → plugin-import-OW37E42K.js} +17 -17
- package/dist/chunks/{presence-MSRD4SIK.js → presence-AGLEN24G.js} +2 -2
- package/dist/chunks/{project-JTHWH3VF.js → project-D3353YKF.js} +5 -5
- package/dist/chunks/{publish-site-25MGB4QH.js → publish-site-ATYXDIV6.js} +6 -6
- package/dist/chunks/{publish-store-2JZEJLSB.js → publish-store-3LC6WJ4I.js} +7 -7
- package/dist/chunks/{raster-actions-2LTYHHOZ.js → raster-actions-IKOFMSP3.js} +1 -1
- package/dist/chunks/{runner-6GHGTHVR.js → runner-66VO3EOK.js} +19 -19
- package/dist/chunks/{store-BEDJRBIQ.js → store-VLXBAKCI.js} +6 -6
- package/dist/chunks/{storefront-QQTNLF3Q.js → storefront-6LO77DYV.js} +6 -6
- package/dist/chunks/{storefront-prepare-QARBKWYY.js → storefront-prepare-DN64DLCR.js} +2 -2
- package/dist/chunks/{sync-A2YT72KR.js → sync-E2ZSQO7W.js} +5 -5
- package/dist/chunks/{tabs-JICBGZ27.js → tabs-UF4G2SFX.js} +8 -8
- package/dist/chunks/{team-6ZMFTJZK.js → team-ZEB7U5XZ.js} +1 -1
- package/dist/chunks/{team-client-TFMDDV25.js → team-client-GFSAI3BD.js} +1 -1
- package/dist/chunks/{tools-5AQKFJ2D.js → tools-AJX5HK2L.js} +2 -2
- package/dist/chunks/{tree-5DKDQLDR.js → tree-3MXMJZ2P.js} +1 -1
- package/dist/chunks/{ui-commands-YL4Q5VWA.js → ui-commands-IO47EC2X.js} +13 -13
- package/dist/chunks/{versions-WFHFBJP2.js → versions-QBEREZYR.js} +5 -5
- package/dist/chunks/{web-BQWY6BIF.js → web-22TCUPNQ.js} +4 -4
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -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-C22ZRLC7.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-33CFABZ2.js";
|
|
17
17
|
import {
|
|
18
18
|
external_exports
|
|
19
19
|
} from "./chunk-R5K2B3R3.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-AGLEN24G.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-JQA3IFQ4.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-JQA3IFQ4.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-5WFWU4EA.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-5WFWU4EA.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-JQA3IFQ4.js"),
|
|
236
|
+
import("./versions-QBEREZYR.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-QBEREZYR.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-QBEREZYR.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 } };
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-QH6PUSXO.js";
|
|
10
10
|
import {
|
|
11
11
|
activeTeamWorkspaceId
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KSNXRXZE.js";
|
|
13
13
|
import {
|
|
14
14
|
ApiError,
|
|
15
15
|
cloudApi
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "./chunk-YU7BEN7M.js";
|
|
23
23
|
import {
|
|
24
24
|
markLibraryDocument
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-S3LCCBYA.js";
|
|
26
26
|
import {
|
|
27
27
|
GUEST_FILE_LIMIT
|
|
28
28
|
} from "./chunk-H3B6PDES.js";
|
|
@@ -7,10 +7,10 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
builtinCommands,
|
|
9
9
|
registerBuiltinCommands
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-33CFABZ2.js";
|
|
11
11
|
import {
|
|
12
12
|
toolView
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SRY4ZWCH.js";
|
|
14
14
|
import {
|
|
15
15
|
init_define_POPCRAFT_COMPONENT_IDS
|
|
16
16
|
} from "./chunk-6JXNKUNX.js";
|
|
@@ -17,14 +17,14 @@ import {
|
|
|
17
17
|
reportOpenStage,
|
|
18
18
|
setCloudLink,
|
|
19
19
|
trackOpen
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-F7TJGTY6.js";
|
|
21
21
|
import {
|
|
22
22
|
parseDeepLink,
|
|
23
23
|
withDeepLink
|
|
24
24
|
} from "./chunk-MAIOW77V.js";
|
|
25
25
|
import {
|
|
26
26
|
activeTeamWorkspaceId
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-KSNXRXZE.js";
|
|
28
28
|
import {
|
|
29
29
|
ApiError,
|
|
30
30
|
api,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
} from "./chunk-CMPXWCFB.js";
|
|
33
33
|
import {
|
|
34
34
|
attachPresence
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-X4B7SE3J.js";
|
|
36
36
|
import {
|
|
37
37
|
fileOpeningMode,
|
|
38
38
|
isAppleMobile,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
setCollabHistory,
|
|
46
46
|
storedDocument,
|
|
47
47
|
useEditorStore
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-S3LCCBYA.js";
|
|
49
49
|
import {
|
|
50
50
|
currentHistoryGroup
|
|
51
51
|
} from "./chunk-F36HILOC.js";
|
|
@@ -150,7 +150,7 @@ function startHyperyTeams() {
|
|
|
150
150
|
maybePromptForTeam();
|
|
151
151
|
void followFileTeam(linkedKey);
|
|
152
152
|
});
|
|
153
|
-
void import("./sync-
|
|
153
|
+
void import("./sync-E2ZSQO7W.js").then(({ onSyncStatus, syncStatus }) => {
|
|
154
154
|
linkedKey = syncStatus().link?.key ?? null;
|
|
155
155
|
void followFileTeam(linkedKey);
|
|
156
156
|
onSyncStatus((_s, link) => {
|
|
@@ -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-JQA3IFQ4.js"),
|
|
95
95
|
import("../lib/document/photo-frames.js"),
|
|
96
|
-
import("./media-tool-
|
|
96
|
+
import("./media-tool-IHV3MK22.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);
|
|
@@ -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-3UBIOYSA.js";
|
|
10
10
|
import {
|
|
11
11
|
storeOpsSeam
|
|
12
12
|
} from "./chunk-2NFTX3PP.js";
|
|
@@ -23,13 +23,13 @@ import {
|
|
|
23
23
|
sameResolution,
|
|
24
24
|
surfaceSize,
|
|
25
25
|
windowCssSize
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-33CFABZ2.js";
|
|
27
27
|
import {
|
|
28
28
|
notice
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-BOIBQ7MZ.js";
|
|
30
30
|
import {
|
|
31
31
|
agentContext
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-SRY4ZWCH.js";
|
|
33
33
|
import {
|
|
34
34
|
setAudioOutputDocument,
|
|
35
35
|
setMediaDocument
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
import {
|
|
38
38
|
collabSession,
|
|
39
39
|
syncStatus
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-KA2MGAQJ.js";
|
|
41
41
|
import {
|
|
42
42
|
loadEntitlements
|
|
43
43
|
} from "./chunk-QH6PUSXO.js";
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
import {
|
|
51
51
|
persist,
|
|
52
52
|
useEditorStore
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-S3LCCBYA.js";
|
|
54
54
|
import {
|
|
55
55
|
create
|
|
56
56
|
} from "./chunk-LLNAXNMG.js";
|
|
@@ -791,6 +791,7 @@ var SCALED_PAGE = {
|
|
|
791
791
|
"max-width": null
|
|
792
792
|
};
|
|
793
793
|
var SCALED_BOX = { "container-type": "size", overflow: "hidden" };
|
|
794
|
+
var SCALED_ROOT = { width: "100%", height: "100%", position: "relative", ...SCALED_BOX };
|
|
794
795
|
var LAYS_OUT = ["display", "flex-direction", "flex-wrap", "gap", "row-gap", "column-gap", "justify-content", "align-items", "align-content", "justify-items", "grid-template-columns", "grid-template-rows", "grid-auto-flow", "grid-auto-rows", "grid-auto-columns", "padding", "padding-top", "padding-right", "padding-bottom", "padding-left"];
|
|
795
796
|
function wrapScaledContent(web, sc) {
|
|
796
797
|
const style = { width: px(sc.width), height: px(sc.height), "transform-origin": "center" };
|
|
@@ -1850,6 +1851,10 @@ function buildPlainTree(doc, nodeId, opts = {}, start, hooks = {}) {
|
|
|
1850
1851
|
for (const c of web.children) if (c.positioning === "flow") c.layered = true;
|
|
1851
1852
|
}
|
|
1852
1853
|
if (scaling && opts.target === "site") wrapScaledContent(web, scaling);
|
|
1854
|
+
else if (scaling && opts.scaleRoot && !parent) {
|
|
1855
|
+
Object.assign(web.style, SCALED_ROOT);
|
|
1856
|
+
wrapScaledContent(web, scaling);
|
|
1857
|
+
}
|
|
1853
1858
|
hooks.built?.(web, node, { parent, in3D, fold });
|
|
1854
1859
|
return web;
|
|
1855
1860
|
};
|
|
@@ -21,14 +21,14 @@ import {
|
|
|
21
21
|
} from "./chunk-KHJE2MFL.js";
|
|
22
22
|
import {
|
|
23
23
|
syncStatus
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-KA2MGAQJ.js";
|
|
25
25
|
import {
|
|
26
26
|
usePluginStore
|
|
27
27
|
} from "./chunk-KIIAD4SO.js";
|
|
28
28
|
import {
|
|
29
29
|
setPluginTabs,
|
|
30
30
|
useEditorStore
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-S3LCCBYA.js";
|
|
32
32
|
import {
|
|
33
33
|
openBeside
|
|
34
34
|
} from "./chunk-GQV6RKZJ.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-MTBJ57I6.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-Z5VURBEJ.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);
|
|
@@ -795,7 +795,7 @@ if (typeof window !== "undefined") {
|
|
|
795
795
|
const name = d.name || "Imported";
|
|
796
796
|
void (async () => {
|
|
797
797
|
try {
|
|
798
|
-
const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-
|
|
798
|
+
const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-OW37E42K.js");
|
|
799
799
|
if (d.ir && typeof d.ir === "object") {
|
|
800
800
|
await applyPluginLayoutIr(d.ir, { mode, name });
|
|
801
801
|
return;
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
serializeCSS,
|
|
13
13
|
serializeHTML
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TJGTNEYL.js";
|
|
15
15
|
import {
|
|
16
16
|
serializeReact,
|
|
17
17
|
serializeTailwind
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-KVPGK3AI.js";
|
|
19
19
|
import {
|
|
20
20
|
altFor,
|
|
21
21
|
behaviorsDropped,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
pictureOf,
|
|
29
29
|
styleMapToInline,
|
|
30
30
|
swiftColor
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-OACNFDDE.js";
|
|
32
32
|
import {
|
|
33
33
|
init_define_POPCRAFT_COMPONENT_IDS
|
|
34
34
|
} from "./chunk-6JXNKUNX.js";
|
|
@@ -600,8 +600,9 @@ function externalAssets(tree, base, dir = "images") {
|
|
|
600
600
|
var WEB_LANGUAGES = layerFormats().map(([value, f]) => ({ value, label: f.label, extension: f.extension }));
|
|
601
601
|
var assetKindFor = (lang) => CODE_FORMATS[lang].pictures;
|
|
602
602
|
var playsMotion = (lang) => CODE_FORMATS[lang].plays;
|
|
603
|
+
var SCALES_IN_CSS = /* @__PURE__ */ new Set(["css", "html", "html-inline", "react", "react-tailwind", "tailwind"]);
|
|
603
604
|
function webTreeFor(doc, nodeId, lang, opts = {}) {
|
|
604
|
-
const tree = buildWebTree(doc, nodeId, { assetKind: assetKindFor(lang), static: !playsMotion(lang), ...opts });
|
|
605
|
+
const tree = buildWebTree(doc, nodeId, { assetKind: assetKindFor(lang), static: !playsMotion(lang), scaleRoot: SCALES_IN_CSS.has(lang), ...opts });
|
|
605
606
|
return lang === "email" ? markEmailPictures(tree) : tree;
|
|
606
607
|
}
|
|
607
608
|
var WRITERS = {
|
|
@@ -622,7 +623,8 @@ function serializeWithReport(lang, tree, opts = {}) {
|
|
|
622
623
|
return { code: serializeSwiftUI(tree, { report: dropped }), dropped: mergeDropped(dropped) };
|
|
623
624
|
}
|
|
624
625
|
const code = WRITERS[lang](tree, opts);
|
|
625
|
-
|
|
626
|
+
const unscaled = tree.root.scaling && !SCALES_IN_CSS.has(lang) ? [{ feature: "page scaling", reason: `${CODE_FORMATS[lang].label} has no way to scale a layer to the space it is given: it is written at its drawn size`, nodeId: tree.root.id }] : [];
|
|
627
|
+
return { code, dropped: mergeDropped(tree.dropped, behaviorsDropped(tree, CODE_FORMATS[lang].label, { timeline: playsMotion(lang) }), unscaled) };
|
|
626
628
|
}
|
|
627
629
|
var extensionFor = (lang) => CODE_FORMATS[lang].extension;
|
|
628
630
|
|
|
@@ -4862,7 +4862,7 @@ function createPopcornSlice(set2, get2) {
|
|
|
4862
4862
|
privateMode: false,
|
|
4863
4863
|
setPrivateMode: (on) => {
|
|
4864
4864
|
set2({ privateMode: on });
|
|
4865
|
-
void import("./presence-
|
|
4865
|
+
void import("./presence-AGLEN24G.js").then((m) => m.setPresencePrivate(on)).catch(() => {
|
|
4866
4866
|
});
|
|
4867
4867
|
},
|
|
4868
4868
|
/** 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-E2ZSQO7W.js");
|
|
6928
6928
|
return duplicateDocumentToCloud(id);
|
|
6929
6929
|
},
|
|
6930
6930
|
deleteDocument: async (id) => {
|
|
@@ -10432,9 +10432,9 @@ if (typeof window !== "undefined") {
|
|
|
10432
10432
|
if (typeof window !== "undefined" && navigator.webdriver) {
|
|
10433
10433
|
window.__vpDesign = async (script, o = {}) => {
|
|
10434
10434
|
const [{ registerBuiltinTools, runTool }, { editorToolContext }, { createDesignPreview }] = await Promise.all([
|
|
10435
|
-
import("./tools-
|
|
10436
|
-
import("./editor-seams-
|
|
10437
|
-
import("./live-
|
|
10435
|
+
import("./tools-AJX5HK2L.js").then(async (m) => ({ ...m, registerBuiltinTools: (await import("./builtin-AOXFUXCD.js")).registerBuiltinTools })),
|
|
10436
|
+
import("./editor-seams-Y5E3HJSY.js"),
|
|
10437
|
+
import("./live-7CTGJ4VD.js")
|
|
10438
10438
|
]);
|
|
10439
10439
|
registerBuiltinTools();
|
|
10440
10440
|
const args = JSON.stringify({ ...o.name ? { name: o.name } : {}, ...o.size ? { size: o.size } : {}, ...o.frame ? { frame: o.frame } : {}, script });
|
|
@@ -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-LD6UEIKF.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-4YZWLMG5.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-LD6UEIKF.js"),
|
|
73
73
|
import("./client-store-URE3KRXT.js")
|
|
74
74
|
]);
|
|
75
75
|
const modelId = effectiveImageModel(useAiStore.getState());
|
|
@@ -7,7 +7,7 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
classNameFor,
|
|
9
9
|
interactiveSpec
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KVPGK3AI.js";
|
|
11
11
|
import {
|
|
12
12
|
fontFaceRules,
|
|
13
13
|
fontsHref
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
styleMapToCSSText,
|
|
29
29
|
styleMapToInline,
|
|
30
30
|
tokensCSS
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-OACNFDDE.js";
|
|
32
32
|
import {
|
|
33
33
|
init_define_POPCRAFT_COMPONENT_IDS
|
|
34
34
|
} from "./chunk-6JXNKUNX.js";
|
|
@@ -14,7 +14,7 @@ init_define_POPCRAFT_COMPONENT_IDS();
|
|
|
14
14
|
// packages/runtime/package.json
|
|
15
15
|
var package_default = {
|
|
16
16
|
name: "@popcraft/runtime",
|
|
17
|
-
version: "1.2.
|
|
17
|
+
version: "1.2.2",
|
|
18
18
|
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.",
|
|
19
19
|
license: "MIT",
|
|
20
20
|
homepage: "https://popcraft.app/docs/exporting/nextjs",
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
componentName,
|
|
13
13
|
mediaRules,
|
|
14
14
|
serializeReact
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KVPGK3AI.js";
|
|
16
16
|
import {
|
|
17
17
|
routesOf,
|
|
18
18
|
screensOf
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
buildPlainTree,
|
|
22
22
|
tokensCSS
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-OACNFDDE.js";
|
|
24
24
|
import {
|
|
25
25
|
COMMERCE_ACTION_PROP,
|
|
26
26
|
COMMERCE_PROP
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-NI5BBHJX.js";
|
|
10
10
|
import {
|
|
11
11
|
notice
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BOIBQ7MZ.js";
|
|
13
13
|
import {
|
|
14
14
|
effectiveChatModel,
|
|
15
15
|
setModelPref,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-MKWU7K63.js";
|
|
18
18
|
import {
|
|
19
19
|
useEditorStore
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-S3LCCBYA.js";
|
|
21
21
|
import {
|
|
22
22
|
create
|
|
23
23
|
} from "./chunk-LLNAXNMG.js";
|
|
@@ -1979,7 +1979,7 @@ async function sendMessage(text) {
|
|
|
1979
1979
|
if (!useAgentStore.getState().activeThreadId) newThread();
|
|
1980
1980
|
const mentions = pruneMentions(body, useAgentStore.getState().draftMentions);
|
|
1981
1981
|
useAgentStore.setState({ draft: "", draftMentions: [], error: null });
|
|
1982
|
-
const { runTurn } = await import("./runner-
|
|
1982
|
+
const { runTurn } = await import("./runner-66VO3EOK.js");
|
|
1983
1983
|
await runTurn(body, mentions);
|
|
1984
1984
|
}
|
|
1985
1985
|
function stop() {
|
|
@@ -2082,7 +2082,7 @@ var clearTaskChildren = () => useAgentStore.setState({ taskChildren: {} });
|
|
|
2082
2082
|
function subscribeChildTools() {
|
|
2083
2083
|
let dispose;
|
|
2084
2084
|
let cancelled = false;
|
|
2085
|
-
void import("./runner-
|
|
2085
|
+
void import("./runner-66VO3EOK.js").then(({ onChildTool }) => {
|
|
2086
2086
|
const off = onChildTool((report) => {
|
|
2087
2087
|
if (report?.status !== "running" || report.jobId) return;
|
|
2088
2088
|
recordChildTool(report.toolCallId ?? "", report.name);
|
|
@@ -7,11 +7,11 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
componentFiles,
|
|
9
9
|
componentPlan
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VUNR4TA5.js";
|
|
11
11
|
import {
|
|
12
12
|
RUNTIME_PACKAGE,
|
|
13
13
|
runtimeRange
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TPLD3ZO5.js";
|
|
15
15
|
import {
|
|
16
16
|
routesOf,
|
|
17
17
|
screensOf
|
|
@@ -7,7 +7,7 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
defaultMeasure,
|
|
9
9
|
placePicture
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-M5ETLHVZ.js";
|
|
11
11
|
import "./chunk-V66O2FNK.js";
|
|
12
12
|
import {
|
|
13
13
|
api
|
|
@@ -122,7 +122,7 @@ async function placeLibraryItem(item, opts = {}) {
|
|
|
122
122
|
}
|
|
123
123
|
if (item.contentType.startsWith("video/")) {
|
|
124
124
|
const file = await libraryFile(item, opts);
|
|
125
|
-
const [{ useEditorStore }, { placeMediaFile }] = await Promise.all([import("./editor-store-
|
|
125
|
+
const [{ useEditorStore }, { placeMediaFile }] = await Promise.all([import("./editor-store-JQA3IFQ4.js"), import("./media-tool-IHV3MK22.js")]);
|
|
126
126
|
const cam = useEditorStore.getState().camera;
|
|
127
127
|
await placeMediaFile(file, { kind: "point", ...opts.at ?? { x: cam.x, y: cam.y } });
|
|
128
128
|
return useEditorStore.getState().selection[0] ?? null;
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
requestEmbeddings,
|
|
17
17
|
requestImage,
|
|
18
18
|
requestImageAction
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-6S57YBJX.js";
|
|
20
|
+
import "./chunk-24ZYL3SN.js";
|
|
21
21
|
import "./chunk-MKWU7K63.js";
|
|
22
22
|
import "./chunk-QH6PUSXO.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-KSNXRXZE.js";
|
|
24
24
|
import "./chunk-CMPXWCFB.js";
|
|
25
25
|
import "./chunk-YU7BEN7M.js";
|
|
26
26
|
import "./chunk-H3B6PDES.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
selectedVectorTarget,
|
|
17
17
|
startImageAction,
|
|
18
18
|
startImageGeneration
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-BOIBQ7MZ.js";
|
|
20
20
|
import "./chunk-NNXEZKK3.js";
|
|
21
21
|
import "./chunk-R5K2B3R3.js";
|
|
22
22
|
import "./chunk-WMPT76QX.js";
|
|
@@ -29,18 +29,18 @@ import "./chunk-V7VBVZKR.js";
|
|
|
29
29
|
import "./chunk-E5NEL7R5.js";
|
|
30
30
|
import "./chunk-PYF2YBOX.js";
|
|
31
31
|
import "./chunk-KHJE2MFL.js";
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-6S57YBJX.js";
|
|
33
|
+
import "./chunk-24ZYL3SN.js";
|
|
34
34
|
import "./chunk-MKWU7K63.js";
|
|
35
35
|
import "./chunk-HIOKDYKH.js";
|
|
36
36
|
import "./chunk-DCQIJ5K6.js";
|
|
37
37
|
import "./chunk-XJFP22CM.js";
|
|
38
38
|
import "./chunk-QH6PUSXO.js";
|
|
39
39
|
import "./chunk-B4PQIUPZ.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-KSNXRXZE.js";
|
|
41
41
|
import "./chunk-CMPXWCFB.js";
|
|
42
42
|
import "./chunk-YU7BEN7M.js";
|
|
43
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-S3LCCBYA.js";
|
|
44
44
|
import "./chunk-GQV6RKZJ.js";
|
|
45
45
|
import "./chunk-F36HILOC.js";
|
|
46
46
|
import "./chunk-XWWV53NR.js";
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
componentMedia,
|
|
10
10
|
componentPlan,
|
|
11
11
|
componentScreens
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VUNR4TA5.js";
|
|
13
13
|
import "./chunk-4LGIB334.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-KVPGK3AI.js";
|
|
15
15
|
import "./chunk-JEIJJB4H.js";
|
|
16
16
|
import "./chunk-77HTR7QU.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-OACNFDDE.js";
|
|
18
18
|
import "./chunk-OZFBHGKA.js";
|
|
19
19
|
import "./chunk-E5NEL7R5.js";
|
|
20
20
|
import "./chunk-SVKLOGS5.js";
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
confirmTierCommands,
|
|
9
9
|
dangerousCommands,
|
|
10
10
|
registerDangerousCommands
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-DWEPCHQV.js";
|
|
12
|
+
import "./chunk-C22ZRLC7.js";
|
|
13
13
|
import "./chunk-2NFTX3PP.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-33CFABZ2.js";
|
|
15
15
|
import "./chunk-YQA5IWOG.js";
|
|
16
16
|
import "./chunk-VT2A3WIM.js";
|
|
17
17
|
import "./chunk-L6RMNPUS.js";
|
|
@@ -22,7 +22,7 @@ import "./chunk-JEIJJB4H.js";
|
|
|
22
22
|
import "./chunk-ZEJGI7M6.js";
|
|
23
23
|
import "./chunk-R5K2B3R3.js";
|
|
24
24
|
import "./chunk-CYD3CB7J.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-OACNFDDE.js";
|
|
26
26
|
import "./chunk-OZFBHGKA.js";
|
|
27
27
|
import "./chunk-V66O2FNK.js";
|
|
28
28
|
import "./chunk-V7VBVZKR.js";
|