@popcraft/cli 0.53.6 → 0.53.8

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.
Files changed (2) hide show
  1. package/dist/popcraft.mjs +37 -17
  2. package/package.json +2 -2
package/dist/popcraft.mjs CHANGED
@@ -295,12 +295,14 @@ var init_page_presets = __esm({
295
295
  p("poster-18x24", "Poster 18\xD724", "PRINT", 18, 24, "in", PRINT_IN),
296
296
  // Comics: the trim sizes the direct market and the manga trade actually print at.
297
297
  p("comic-page", "Comic page", "PRINT", 6.625, 10.25, "in", PRINT_IN),
298
- p("comic-cover", "Comic cover", "PRINT", 6.875, 10.5, "in", PRINT_IN),
298
+ // A cover is trimmed with the pages, so it is the page's trim: 6.875 × 10.5 was the page WITH its bleed, which
299
+ // made a cover larger than the book it binds into (and every interior page a smaller page on an oversized sheet).
300
+ p("comic-cover", "Comic cover", "PRINT", 6.625, 10.25, "in", PRINT_IN),
299
301
  p("comic-strip", "Comic strip", "PRINT", 13, 4, "in", { ...PRINT_IN, bleed: 0, margin: 0.2 }),
300
302
  p("manga-page", "Manga page (B5)", "PRINT", 182, 257, "mm", PRINT_MM),
301
303
  // Spreads: two trim pages side by side, with a fold guide down the middle where the gutter falls.
302
304
  p("comic-spread", "Comic spread", "PRINT", 13.25, 10.25, "in", { ...PRINT_IN, folds: { axis: "X", at: [0.5] }, sheetOf: { presetId: "comic-page", across: 2 } }),
303
- p("comic-wrap", "Comic cover wrap", "PRINT", 13.75, 10.5, "in", { ...PRINT_IN, folds: { axis: "X", at: [0.5] }, sheetOf: { presetId: "comic-cover", across: 2 } }),
305
+ p("comic-wrap", "Comic cover wrap", "PRINT", 13.25, 10.25, "in", { ...PRINT_IN, folds: { axis: "X", at: [0.5] }, sheetOf: { presetId: "comic-cover", across: 2 } }),
304
306
  p("poster-24x36", "Poster 24\xD736", "PRINT", 24, 36, "in", PRINT_IN),
305
307
  // Social
306
308
  p("ig-post", "Instagram post", "SOCIAL", 1080, 1080, "px"),
@@ -1196,7 +1198,7 @@ function operations(spec = openapi) {
1196
1198
  }
1197
1199
  async function call(target2, method, path, opts = {}) {
1198
1200
  const qs = new URLSearchParams(opts.query ?? {}).toString();
1199
- const headers = { "user-agent": `popcraft-cli/${"0.53.6"}`, ...opts.headers };
1201
+ const headers = { "user-agent": `popcraft-cli/${"0.53.8"}`, ...opts.headers };
1200
1202
  if (target2.token) headers.authorization = `Bearer ${target2.token}`;
1201
1203
  if (opts.contentType) headers["content-type"] = opts.contentType;
1202
1204
  try {
@@ -96212,7 +96214,6 @@ function repairDocumentPaints(doc2) {
96212
96214
  var broken;
96213
96215
  var init_paint_repair = __esm({
96214
96216
  "lib/document/paint-repair.ts"() {
96215
- "use strict";
96216
96217
  init_shader_graph();
96217
96218
  broken = (p2) => {
96218
96219
  if (!p2 || typeof p2 !== "object") return false;
@@ -97386,6 +97387,7 @@ function selectionWorldBounds(nodes, ids2, scrollState) {
97386
97387
  }
97387
97388
  var init_selection_bounds = __esm({
97388
97389
  "lib/editor/selection-bounds.ts"() {
97390
+ "use strict";
97389
97391
  init_scene_graph();
97390
97392
  init_transform();
97391
97393
  }
@@ -97577,6 +97579,7 @@ function relinkCopies(doc2, copies) {
97577
97579
  var TEXT_PATH_SOURCE_TYPES, isPathSource;
97578
97580
  var init_text_links = __esm({
97579
97581
  "lib/document/text-links.ts"() {
97582
+ "use strict";
97580
97583
  init_transform();
97581
97584
  TEXT_PATH_SOURCE_TYPES = ["VECTOR", "ELLIPSE", "RECTANGLE", "POLYGON", "STAR", "LINE", "ARROW", "FRAME"];
97582
97585
  isPathSource = (n) => !!n && TEXT_PATH_SOURCE_TYPES.includes(n.type);
@@ -247044,6 +247047,7 @@ function rescaleTextEffect(node2) {
247044
247047
  var DEFAULTS, BLACK5, WHITE5, fillPaint, fillColor, shadow, round, OUTLINED;
247045
247048
  var init_effect_presets = __esm({
247046
247049
  "lib/text/effect-presets.ts"() {
247050
+ "use strict";
247047
247051
  init_effects();
247048
247052
  DEFAULTS = {
247049
247053
  SHADOW: { distance: 17.68, angle: 45, blur: 12.5, thickness: 0, intensity: 45 },
@@ -253121,6 +253125,7 @@ function getActiveRenderer() {
253121
253125
  var active;
253122
253126
  var init_renderer_registry = __esm({
253123
253127
  "lib/engine/renderer-registry.ts"() {
253128
+ "use strict";
253124
253129
  active = null;
253125
253130
  }
253126
253131
  });
@@ -256189,6 +256194,7 @@ fn shade(uv: vec2<f32>, res: vec2<f32>, tm: f32) -> vec4<f32> {
256189
256194
  var SHADER_PRESETS, shaderPreset, legacyPresetOf, DEFAULT_SHADER_PRESET, DEFAULT_TEXTURE_PARAMS, f, vec4, NOISE_LIB;
256190
256195
  var init_shader_presets = __esm({
256191
256196
  "lib/engine/shader-presets.ts"() {
256197
+ "use strict";
256192
256198
  init_shader_graph();
256193
256199
  init_shader_graph_presets();
256194
256200
  init_shader_presets_legacy();
@@ -257992,6 +257998,7 @@ async function docExists(id3) {
257992
257998
  var INDEX_KEY, docKey, thumbKey, THUMB_MAX_BYTES, THUMB_TYPES, LEGACY_DATA_URL, migrating, SPLIT_LAYOUT, nodeKey, WRITER, persisted, saving, deletedHere, keyval, keyvalStore;
257993
257999
  var init_document_library = __esm({
257994
258000
  "lib/storage/document-library.ts"() {
258001
+ "use strict";
257995
258002
  init_idb();
257996
258003
  init_media_types();
257997
258004
  init_collapse_duplicates();
@@ -258063,6 +258070,7 @@ function onTabMessage(fn) {
258063
258070
  var EDITOR_HOME, localDocPath, cloudFilePath, CHANNEL2, channel2;
258064
258071
  var init_tab_mode = __esm({
258065
258072
  "lib/desktop/tab-mode.ts"() {
258073
+ "use strict";
258066
258074
  EDITOR_HOME = "/home";
258067
258075
  localDocPath = (docId) => `${EDITOR_HOME}?doc=${encodeURIComponent(docId)}`;
258068
258076
  cloudFilePath = (key5) => `/pop/${encodeURIComponent(key5)}`;
@@ -258140,6 +258148,7 @@ function scaleSubtreePatches(nodes, id3, sx, sy, includeSelf = true) {
258140
258148
  var scalePoint;
258141
258149
  var init_scale_geometry = __esm({
258142
258150
  "lib/document/scale-geometry.ts"() {
258151
+ "use strict";
258143
258152
  scalePoint = (p2, sx, sy) => ({
258144
258153
  ...p2,
258145
258154
  x: p2.x * sx,
@@ -259135,6 +259144,7 @@ function describeModifier(m) {
259135
259144
  var FLASH_WHITE, BEHAVIOUR_PRESETS, AUDIO_SIGNAL_OPTIONS, AUDIO_MODES, LOOP_MODES, UNKEYABLE, isKeyableParam, freshId4, listOf;
259136
259145
  var init_modifier_edit = __esm({
259137
259146
  "lib/motion/modifier-edit.ts"() {
259147
+ "use strict";
259138
259148
  init_easing();
259139
259149
  init_sample_keys();
259140
259150
  FLASH_WHITE = { r: 1, g: 1, b: 1, a: 1 };
@@ -259579,6 +259589,7 @@ function staggerDocument(doc2, ids2, opts) {
259579
259589
  var PRESET_IDS, num6, restOpacity, overshoots, fadeCurve, span, enter2, leave2, fadeIn, fadeOut, along, scaleSpan, wave, BLUR_ID, SMEAR_ID, SHAKE_STEPS, SHAKE, clips, clipping, WIPE_MIN, wipeGroupId, wipeMaskId, any2, CONTAINERS2, isContainer, autoRise, CAM, zoomOf, camTravel, camArrive, dollyAxis, cameraOrGroup, isPlainText, TEXT_NEEDS, unitRise, cascade, cascadeKeys, cascadeAmount, slideDistance, LIBRARY, BY_ID2, MOTION_PRESETS, presetById2, lengthenedTo;
259580
259590
  var init_presets = __esm({
259581
259591
  "lib/motion/presets.ts"() {
259592
+ "use strict";
259582
259593
  init_author();
259583
259594
  init_keys();
259584
259595
  init_markers();
@@ -261504,6 +261515,7 @@ function breakpointView(state, doc2 = state.document) {
261504
261515
  var storedDocument;
261505
261516
  var init_view = __esm({
261506
261517
  "lib/motion/view.ts"() {
261518
+ "use strict";
261507
261519
  init_motion_slice();
261508
261520
  init_transport_clock();
261509
261521
  init_autokey();
@@ -262772,7 +262784,6 @@ function formatLimit(key5, max3) {
262772
262784
  var formatBytes;
262773
262785
  var init_limits2 = __esm({
262774
262786
  "lib/billing/limits.ts"() {
262775
- "use strict";
262776
262787
  init_format();
262777
262788
  init_plans();
262778
262789
  formatBytes = formatFileSize;
@@ -273487,6 +273498,7 @@ async function prepareTemplate(t3) {
273487
273498
  var templateMediaSources, MEDIA_FETCH_TIMEOUT_MS2, PREPARE_BUDGET_MS, MEDIA_CONCURRENCY, timeoutOf;
273488
273499
  var init_use = __esm({
273489
273500
  "lib/templates/use.ts"() {
273501
+ "use strict";
273490
273502
  init_capture();
273491
273503
  templateMediaSources = (t3, hash3) => [
273492
273504
  `/templates/media/${hash3}`,
@@ -306988,7 +307000,6 @@ function decodeSource(key5, label3) {
306988
307000
  var DECODE_CACHE_BYTES, cache7, pending4, held, sizeOf, lengths, decodedLengths, DECODE_TIMEOUT_MS, decodedAudio, decodedSource, pcmOf;
306989
307001
  var init_audio_decode = __esm({
306990
307002
  "lib/motion/audio-decode.ts"() {
306991
- "use strict";
306992
307003
  init_media_store();
306993
307004
  init_audio_plan();
306994
307005
  init_time_stretch();
@@ -312378,6 +312389,7 @@ function creditLine(c2) {
312378
312389
  var MAX_PHOTO_PAGE, MAX_PHOTO_QUERY, UUID, isPhotoId, photoImagePath;
312379
312390
  var init_stock = __esm({
312380
312391
  "lib/photos/stock.ts"() {
312392
+ "use strict";
312381
312393
  MAX_PHOTO_PAGE = 12;
312382
312394
  MAX_PHOTO_QUERY = 200;
312383
312395
  UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
@@ -313039,6 +313051,7 @@ function applyTextPath(layout2, path, tp, rebase = true) {
313039
313051
  var defaultCircleRadius, ownsPath, mapPoint;
313040
313052
  var init_text_path = __esm({
313041
313053
  "lib/engine/text/text-path.ts"() {
313054
+ "use strict";
313042
313055
  init_scene_graph();
313043
313056
  init_transform();
313044
313057
  init_shape_to_path();
@@ -317129,15 +317142,14 @@ function paperFill(root2, doc2) {
317129
317142
  const f2 = fills.length ? fills[fills.length - 1] : void 0;
317130
317143
  return f2 && f2.type === "SOLID" && f2.color ? { kind: "solid", color: f2.color, alpha: (f2.opacity ?? 1) * (f2.color.a ?? 1) } : null;
317131
317144
  };
317132
- const own2 = solid5(root2);
317133
- if (own2 && own2.alpha >= 0.999) return own2;
317134
- for (const id3 of root2.childIds ?? []) {
317135
- const c2 = doc2.nodes[id3];
317145
+ const ids2 = root2.childIds ?? [];
317146
+ for (let i2 = ids2.length - 1; i2 >= 0; i2--) {
317147
+ const c2 = doc2.nodes[ids2[i2]];
317136
317148
  if (!c2 || !c2.visible || c2.x > 0.5 || c2.y > 0.5 || c2.x + c2.width < root2.width - 0.5 || c2.y + c2.height < root2.height - 0.5) continue;
317137
317149
  const f2 = solid5(c2);
317138
317150
  if (f2 && f2.alpha >= 0.999) return f2;
317139
317151
  }
317140
- return own2;
317152
+ return solid5(root2);
317141
317153
  }
317142
317154
  function pageBox(node2, doc2, opts) {
317143
317155
  const bounds2 = getWorldRenderBounds(doc2, node2.id);
@@ -317251,20 +317263,21 @@ async function exportNodesToPDF(renderer, nodes, scaleOrOpts, doc2, styles) {
317251
317263
  for (const sl of slots2) {
317252
317264
  const vp = sl.page;
317253
317265
  const node2 = roots[vp.index];
317254
- const ir = buildExportIR(node2, ctx2);
317266
+ const bleedOut = single ? Math.max(geo.bleed.maxX - geo.trim.maxX, geo.trim.minX - geo.bleed.minX, geo.bleed.maxY - geo.trim.maxY, geo.trim.minY - geo.bleed.minY) : 0;
317267
+ const ir = buildExportIR(bleedOut > 0 ? { ...node2, clipsContent: false } : node2, ctx2);
317255
317268
  if (!ir) continue;
317256
317269
  const m = sl.matrix;
317257
317270
  const s2 = vp.scale;
317271
+ const ox = vp.offset.x - bleedOut * s2, oy = vp.offset.y - bleedOut * s2;
317258
317272
  const place4 = [
317259
317273
  m[0] * s2,
317260
317274
  m[1] * s2,
317261
317275
  m[2] * s2,
317262
317276
  m[3] * s2,
317263
- m[4] + m[0] * vp.offset.x + m[2] * vp.offset.y,
317264
- m[5] + m[1] * vp.offset.x + m[3] * vp.offset.y
317277
+ m[4] + m[0] * ox + m[2] * oy,
317278
+ m[5] + m[1] * ox + m[3] * oy
317265
317279
  ];
317266
317280
  const inner = { t: "group", name: "page", local: [1, 0, 0, 1, -node2.x - vp.crop.x, -node2.y - vp.crop.y], opacity: 1, blend: "NORMAL", clip: null, children: [ir] };
317267
- const bleedOut = single ? Math.max(geo.bleed.maxX - geo.trim.maxX, geo.trim.minX - geo.bleed.minX, geo.bleed.maxY - geo.trim.maxY, geo.trim.minY - geo.bleed.minY) : 0;
317268
317281
  cb.emit({
317269
317282
  t: "group",
317270
317283
  name: "slot",
@@ -317500,6 +317513,7 @@ async function exportSettingFile(renderer, node2, setting, doc2, styles) {
317500
317513
  var MIME, DEFAULT_EXPORT, exportSettingsOf;
317501
317514
  var init_export = __esm({
317502
317515
  "lib/io/export.ts"() {
317516
+ "use strict";
317503
317517
  init_download();
317504
317518
  init_scene_graph();
317505
317519
  init_codecs();
@@ -317591,6 +317605,7 @@ async function selectionReferenceImages(doc2, selection, opts = {}) {
317591
317605
  var FIT_QUALITIES, FIT_SCALES, blobToDataUrl;
317592
317606
  var init_reference_images = __esm({
317593
317607
  "lib/ai/reference-images.ts"() {
317608
+ "use strict";
317594
317609
  init_export();
317595
317610
  init_selection_bounds();
317596
317611
  init_renderer_registry();
@@ -328786,7 +328801,7 @@ var init_package = __esm({
328786
328801
  "packages/runtime/package.json"() {
328787
328802
  package_default = {
328788
328803
  name: "@popcraft/runtime",
328789
- version: "0.53.6",
328804
+ version: "0.53.8",
328790
328805
  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.",
328791
328806
  license: "MIT",
328792
328807
  homepage: "https://popcraft.app/docs/exporting/nextjs",
@@ -353452,6 +353467,7 @@ function exportsOf(source3) {
353452
353467
  var CODE_LIMITS, packageOf;
353453
353468
  var init_source2 = __esm({
353454
353469
  "lib/code/source.ts"() {
353470
+ "use strict";
353455
353471
  CODE_LIMITS = { modules: 100, sourceLength: 2e5, packages: 12 };
353456
353472
  packageOf = (spec) => spec.split("/").slice(0, spec.startsWith("@") ? 2 : 1).join("/");
353457
353473
  }
@@ -353494,6 +353510,7 @@ function compileModule(module2) {
353494
353510
  var import_sucrase, BUILT_IN, memo4;
353495
353511
  var init_compile2 = __esm({
353496
353512
  "lib/code/compile.ts"() {
353513
+ "use strict";
353497
353514
  import_sucrase = __toESM(require_dist2());
353498
353515
  init_source2();
353499
353516
  init_source2();
@@ -358956,6 +358973,7 @@ function diagnosticsText(diagnostics) {
358956
358973
  var HARNESS_NAMES, plainDiagnostics;
358957
358974
  var init_shader_diagnostics = __esm({
358958
358975
  "lib/engine/shader-diagnostics.ts"() {
358976
+ "use strict";
358959
358977
  HARNESS_NAMES = ["ShaderUniforms", "VOut", "vs_main", "fs_main", "u", "p"];
358960
358978
  plainDiagnostics = (errors2) => errors2.map((message) => ({ line: null, column: null, message, severity: "error" }));
358961
358979
  }
@@ -362014,6 +362032,7 @@ function publishSite(key5, files, opts = {}) {
362014
362032
  var siteStatus, setSiteVersion, workspaceSites, deleteSite, renameSite;
362015
362033
  var init_sites = __esm({
362016
362034
  "lib/client/cloud/sites.ts"() {
362035
+ "use strict";
362017
362036
  init_files();
362018
362037
  init_upload2();
362019
362038
  init_api4();
@@ -368266,6 +368285,7 @@ async function renderLibraryPreviews(renderer, doc2, listing, format = pickPrevi
368266
368285
  var PREVIEW_FORMATS, PREVIEW_FPS, PREVIEW_MAX_MS2, PREVIEW_HOLD_MS, PREVIEW_BOX, POSTER_CELL, PREVIEW_MAX_SCALE, POSTER_COLS, POSTER_MAX, previewScale, componentSchedule;
368267
368286
  var init_library_previews = __esm({
368268
368287
  "lib/motion/library-previews.ts"() {
368288
+ "use strict";
368269
368289
  init_codecs();
368270
368290
  init_gpu_pixels();
368271
368291
  init_render_frames();
@@ -414373,7 +414393,7 @@ init_resources();
414373
414393
  init_desktop();
414374
414394
  init_hypery();
414375
414395
  import { createInterface } from "node:readline";
414376
- var VERSION2 = "0.53.6";
414396
+ var VERSION2 = "0.53.8";
414377
414397
  var HELP = `popcraft ${VERSION2} \u2014 the PopCraft command line
414378
414398
 
414379
414399
  Files (headless, on .popcraft files):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popcraft/cli",
3
- "version": "0.53.6",
3
+ "version": "0.53.8",
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.6"
37
+ "@popcraft/kit": "0.53.8"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "node build.mjs",