@popcraft/cli 0.53.14 → 0.53.15
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/popcraft.mjs +36 -13
- package/package.json +2 -2
package/dist/popcraft.mjs
CHANGED
|
@@ -1198,7 +1198,7 @@ function operations(spec = openapi) {
|
|
|
1198
1198
|
}
|
|
1199
1199
|
async function call(target2, method, path, opts = {}) {
|
|
1200
1200
|
const qs = new URLSearchParams(opts.query ?? {}).toString();
|
|
1201
|
-
const headers = { "user-agent": `popcraft-cli/${"0.53.
|
|
1201
|
+
const headers = { "user-agent": `popcraft-cli/${"0.53.15"}`, ...opts.headers };
|
|
1202
1202
|
if (target2.token) headers.authorization = `Bearer ${target2.token}`;
|
|
1203
1203
|
if (opts.contentType) headers["content-type"] = opts.contentType;
|
|
1204
1204
|
try {
|
|
@@ -94515,7 +94515,6 @@ function hasMessage(key5) {
|
|
|
94515
94515
|
var current2, loading, listeners, formats, asts;
|
|
94516
94516
|
var init_runtime = __esm({
|
|
94517
94517
|
"lib/i18n/runtime.ts"() {
|
|
94518
|
-
"use strict";
|
|
94519
94518
|
init_intl_messageformat();
|
|
94520
94519
|
init_icu_messageformat_parser();
|
|
94521
94520
|
init_catalogs();
|
|
@@ -248032,6 +248031,7 @@ function repairCompositions(comps, nodes) {
|
|
|
248032
248031
|
var isObj5, finite6, optFinite, isVec2, TIMELINE_COLOR_IDS, TIMELINE_COLORS, UNITS, ORDERS, PROP_KEYS, ANIMATOR_ID, MOTION_TYPES, TRANSITIONS, isFraction, MEDIA_HASH;
|
|
248033
248032
|
var init_invariants = __esm({
|
|
248034
248033
|
"lib/motion/invariants.ts"() {
|
|
248034
|
+
"use strict";
|
|
248035
248035
|
init_easing();
|
|
248036
248036
|
init_properties();
|
|
248037
248037
|
init_markers();
|
|
@@ -257163,6 +257163,7 @@ function followPeers(peers) {
|
|
|
257163
257163
|
var PALETTE, usePresence, awareness, CURSOR_SEND_MS, VIEWPORT_SEND_MS, cursorTimer, pendingCursor, sentCursor, EMOTE_MS, lastFollowCamera;
|
|
257164
257164
|
var init_presence = __esm({
|
|
257165
257165
|
"lib/collab/presence.ts"() {
|
|
257166
|
+
"use strict";
|
|
257166
257167
|
init_esm();
|
|
257167
257168
|
init_editor_store();
|
|
257168
257169
|
init_status_announcements();
|
|
@@ -262790,6 +262791,7 @@ function formatLimit(key5, max3) {
|
|
|
262790
262791
|
var formatBytes;
|
|
262791
262792
|
var init_limits2 = __esm({
|
|
262792
262793
|
"lib/billing/limits.ts"() {
|
|
262794
|
+
"use strict";
|
|
262793
262795
|
init_format();
|
|
262794
262796
|
init_plans();
|
|
262795
262797
|
formatBytes = formatFileSize;
|
|
@@ -317613,6 +317615,7 @@ async function selectionReferenceImages(doc2, selection, opts = {}) {
|
|
|
317613
317615
|
var FIT_QUALITIES, FIT_SCALES, blobToDataUrl;
|
|
317614
317616
|
var init_reference_images = __esm({
|
|
317615
317617
|
"lib/ai/reference-images.ts"() {
|
|
317618
|
+
"use strict";
|
|
317616
317619
|
init_export();
|
|
317617
317620
|
init_selection_bounds();
|
|
317618
317621
|
init_renderer_registry();
|
|
@@ -319305,7 +319308,7 @@ function placeSvgLayers(doc2, parentId, svg, place4) {
|
|
|
319305
319308
|
}
|
|
319306
319309
|
const minX = Math.min(...kids.map((k3) => k3.x)), minY = Math.min(...kids.map((k3) => k3.y));
|
|
319307
319310
|
const maxX = Math.max(...kids.map((k3) => k3.x + k3.width)), maxY = Math.max(...kids.map((k3) => k3.y + k3.height));
|
|
319308
|
-
for (const k3 of kids) nodes[k3.id] = { ...nodes[k3.id], x: k3.x - minX, y: k3.y - minY };
|
|
319311
|
+
for (const k3 of kids) nodes[k3.id] = { ...nodes[k3.id], x: k3.x - minX, y: k3.y - minY, constraints: { horizontal: "SCALE", vertical: "SCALE" } };
|
|
319309
319312
|
let w = Math.max(1, maxX - minX), h = Math.max(1, maxY - minY);
|
|
319310
319313
|
const f2 = place4.fit;
|
|
319311
319314
|
const k2 = f2 && (f2.width || f2.height) ? Math.min(f2.width ? f2.width / w : Infinity, f2.height ? f2.height / h : Infinity) : 1;
|
|
@@ -319920,12 +319923,20 @@ var init_node = __esm({
|
|
|
319920
319923
|
capped(args2.ids, "reparent");
|
|
319921
319924
|
const parent = nodeOrThrow(doc2, args2.parentId);
|
|
319922
319925
|
let next2 = doc2;
|
|
319923
|
-
|
|
319926
|
+
const stackIndex = (id3) => {
|
|
319927
|
+
const n = doc2.nodes[id3];
|
|
319928
|
+
const p2 = n?.parentId ? doc2.nodes[n.parentId] : void 0;
|
|
319929
|
+
return p2 ? p2.childIds.indexOf(id3) : 0;
|
|
319930
|
+
};
|
|
319931
|
+
const ordered2 = [...args2.ids].sort((a, b) => doc2.nodes[a]?.parentId === doc2.nodes[b]?.parentId ? stackIndex(a) - stackIndex(b) : 0);
|
|
319932
|
+
let insertAt = args2.index;
|
|
319933
|
+
for (const id3 of ordered2) {
|
|
319924
319934
|
nodeOrThrow(doc2, id3);
|
|
319925
319935
|
if (id3 === args2.parentId) throw new ToolError("A layer cannot be its own parent.");
|
|
319926
319936
|
const placed2 = placementUnder(next2, id3, args2.parentId);
|
|
319927
319937
|
if (placed2) next2 = updateNode(next2, id3, placed2);
|
|
319928
|
-
next2 = reparentNode(next2, id3, args2.parentId,
|
|
319938
|
+
next2 = reparentNode(next2, id3, args2.parentId, insertAt);
|
|
319939
|
+
if (insertAt !== void 0) insertAt = next2.nodes[args2.parentId].childIds.indexOf(id3) + 1;
|
|
319929
319940
|
}
|
|
319930
319941
|
ctx2.commit(applyInvariants(next2, [...args2.ids, args2.parentId]));
|
|
319931
319942
|
return { summary: `Moved ${plural2(args2.ids.length, "layer")} into "${parent.name}"`, data: { ids: args2.ids, parentId: args2.parentId } };
|
|
@@ -319954,10 +319965,12 @@ var init_node = __esm({
|
|
|
319954
319965
|
const box2 = localBox(doc2, ids2);
|
|
319955
319966
|
const g = createGroup();
|
|
319956
319967
|
const node2 = { ...g, name: args2.name ?? g.name, x: box2.minX, y: box2.minY, width: box2.maxX - box2.minX, height: box2.maxY - box2.minY };
|
|
319957
|
-
const
|
|
319968
|
+
const siblings = doc2.nodes[parentId].childIds;
|
|
319969
|
+
const ordered2 = [...ids2].sort((a, b) => siblings.indexOf(a) - siblings.indexOf(b));
|
|
319970
|
+
const top = Math.max(...ordered2.map((id3) => siblings.indexOf(id3)));
|
|
319958
319971
|
let next2 = addNode(doc2, node2, parentId);
|
|
319959
|
-
next2 = reparentNode(next2, node2.id, parentId,
|
|
319960
|
-
for (const id3 of
|
|
319972
|
+
next2 = reparentNode(next2, node2.id, parentId, top + 1);
|
|
319973
|
+
for (const id3 of ordered2) {
|
|
319961
319974
|
const n = next2.nodes[id3];
|
|
319962
319975
|
next2 = reparentNode(next2, id3, node2.id);
|
|
319963
319976
|
next2 = updateNode(next2, id3, { x: n.x - box2.minX, y: n.y - box2.minY });
|
|
@@ -328830,7 +328843,7 @@ var init_package = __esm({
|
|
|
328830
328843
|
"packages/runtime/package.json"() {
|
|
328831
328844
|
package_default = {
|
|
328832
328845
|
name: "@popcraft/runtime",
|
|
328833
|
-
version: "0.53.
|
|
328846
|
+
version: "0.53.15",
|
|
328834
328847
|
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.",
|
|
328835
328848
|
license: "MIT",
|
|
328836
328849
|
homepage: "https://popcraft.app/docs/exporting/nextjs",
|
|
@@ -353496,7 +353509,6 @@ function exportsOf(source3) {
|
|
|
353496
353509
|
var CODE_LIMITS, packageOf;
|
|
353497
353510
|
var init_source2 = __esm({
|
|
353498
353511
|
"lib/code/source.ts"() {
|
|
353499
|
-
"use strict";
|
|
353500
353512
|
CODE_LIMITS = { modules: 100, sourceLength: 2e5, packages: 12 };
|
|
353501
353513
|
packageOf = (spec) => spec.split("/").slice(0, spec.startsWith("@") ? 2 : 1).join("/");
|
|
353502
353514
|
}
|
|
@@ -353539,7 +353551,6 @@ function compileModule(module2) {
|
|
|
353539
353551
|
var import_sucrase, BUILT_IN, memo4;
|
|
353540
353552
|
var init_compile2 = __esm({
|
|
353541
353553
|
"lib/code/compile.ts"() {
|
|
353542
|
-
"use strict";
|
|
353543
353554
|
import_sucrase = __toESM(require_dist2());
|
|
353544
353555
|
init_source2();
|
|
353545
353556
|
init_source2();
|
|
@@ -360424,6 +360435,13 @@ var init_cell_text = __esm({
|
|
|
360424
360435
|
}
|
|
360425
360436
|
});
|
|
360426
360437
|
|
|
360438
|
+
// lib/document/resize-children.ts
|
|
360439
|
+
var init_resize_children = __esm({
|
|
360440
|
+
"lib/document/resize-children.ts"() {
|
|
360441
|
+
init_scale_geometry();
|
|
360442
|
+
}
|
|
360443
|
+
});
|
|
360444
|
+
|
|
360427
360445
|
// lib/editor/pointer/move/snap.ts
|
|
360428
360446
|
var init_snap = __esm({
|
|
360429
360447
|
"lib/editor/pointer/move/snap.ts"() {
|
|
@@ -360435,6 +360453,7 @@ var init_snap = __esm({
|
|
|
360435
360453
|
// lib/editor/pointer/move/group-resize.ts
|
|
360436
360454
|
var init_group_resize = __esm({
|
|
360437
360455
|
"lib/editor/pointer/move/group-resize.ts"() {
|
|
360456
|
+
init_resize_children();
|
|
360438
360457
|
init_scene_graph();
|
|
360439
360458
|
init_selection_bounds();
|
|
360440
360459
|
init_snap();
|
|
@@ -410285,8 +410304,12 @@ var init_editor_store = __esm({
|
|
|
410285
410304
|
group2.width = maxX - minX;
|
|
410286
410305
|
group2.height = maxY - minY;
|
|
410287
410306
|
group2.name = "Group";
|
|
410307
|
+
const siblings = state.document.nodes[parentId]?.childIds ?? [];
|
|
410308
|
+
const ordered2 = [...state.selection].sort((a, b) => siblings.indexOf(a) - siblings.indexOf(b));
|
|
410309
|
+
const top = Math.max(...ordered2.map((id3) => siblings.indexOf(id3)));
|
|
410288
410310
|
let doc2 = addNode(state.document, group2, parentId);
|
|
410289
|
-
|
|
410311
|
+
if (top >= 0) doc2 = reparentNode(doc2, group2.id, parentId, top + 1);
|
|
410312
|
+
ordered2.forEach((id3) => {
|
|
410290
410313
|
doc2 = reparentNode(doc2, id3, group2.id);
|
|
410291
410314
|
const child = doc2.nodes[id3];
|
|
410292
410315
|
if (child) {
|
|
@@ -414425,7 +414448,7 @@ init_resources();
|
|
|
414425
414448
|
init_desktop();
|
|
414426
414449
|
init_hypery();
|
|
414427
414450
|
import { createInterface } from "node:readline";
|
|
414428
|
-
var VERSION2 = "0.53.
|
|
414451
|
+
var VERSION2 = "0.53.15";
|
|
414429
414452
|
var HELP = `popcraft ${VERSION2} \u2014 the PopCraft command line
|
|
414430
414453
|
|
|
414431
414454
|
Files (headless, on .popcraft files):
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@popcraft/cli",
|
|
3
|
-
"version": "0.53.
|
|
3
|
+
"version": "0.53.15",
|
|
4
4
|
"description": "The PopCraft command line: edit .popcraft files headlessly, call the REST API, publish to the marketplace and manage the desktop app's local plugins, themes, fonts, skills and agents.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://popcraft.app/docs/api/cli",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"esbuild": "0.28.2"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@popcraft/kit": "0.53.
|
|
37
|
+
"@popcraft/kit": "0.53.15"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "node build.mjs",
|