@popcraft/cli 0.53.5 → 0.53.6

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 +14 -31
  2. package/package.json +2 -2
package/dist/popcraft.mjs CHANGED
@@ -1196,7 +1196,7 @@ function operations(spec = openapi) {
1196
1196
  }
1197
1197
  async function call(target2, method, path, opts = {}) {
1198
1198
  const qs = new URLSearchParams(opts.query ?? {}).toString();
1199
- const headers = { "user-agent": `popcraft-cli/${"0.53.5"}`, ...opts.headers };
1199
+ const headers = { "user-agent": `popcraft-cli/${"0.53.6"}`, ...opts.headers };
1200
1200
  if (target2.token) headers.authorization = `Bearer ${target2.token}`;
1201
1201
  if (opts.contentType) headers["content-type"] = opts.contentType;
1202
1202
  try {
@@ -96212,6 +96212,7 @@ function repairDocumentPaints(doc2) {
96212
96212
  var broken;
96213
96213
  var init_paint_repair = __esm({
96214
96214
  "lib/document/paint-repair.ts"() {
96215
+ "use strict";
96215
96216
  init_shader_graph();
96216
96217
  broken = (p2) => {
96217
96218
  if (!p2 || typeof p2 !== "object") return false;
@@ -97385,7 +97386,6 @@ function selectionWorldBounds(nodes, ids2, scrollState) {
97385
97386
  }
97386
97387
  var init_selection_bounds = __esm({
97387
97388
  "lib/editor/selection-bounds.ts"() {
97388
- "use strict";
97389
97389
  init_scene_graph();
97390
97390
  init_transform();
97391
97391
  }
@@ -97577,7 +97577,6 @@ function relinkCopies(doc2, copies) {
97577
97577
  var TEXT_PATH_SOURCE_TYPES, isPathSource;
97578
97578
  var init_text_links = __esm({
97579
97579
  "lib/document/text-links.ts"() {
97580
- "use strict";
97581
97580
  init_transform();
97582
97581
  TEXT_PATH_SOURCE_TYPES = ["VECTOR", "ELLIPSE", "RECTANGLE", "POLYGON", "STAR", "LINE", "ARROW", "FRAME"];
97583
97582
  isPathSource = (n) => !!n && TEXT_PATH_SOURCE_TYPES.includes(n.type);
@@ -247045,7 +247044,6 @@ function rescaleTextEffect(node2) {
247045
247044
  var DEFAULTS, BLACK5, WHITE5, fillPaint, fillColor, shadow, round, OUTLINED;
247046
247045
  var init_effect_presets = __esm({
247047
247046
  "lib/text/effect-presets.ts"() {
247048
- "use strict";
247049
247047
  init_effects();
247050
247048
  DEFAULTS = {
247051
247049
  SHADOW: { distance: 17.68, angle: 45, blur: 12.5, thickness: 0, intensity: 45 },
@@ -252660,7 +252658,6 @@ function resizeWindow(doc2, target2, rect) {
252660
252658
  }
252661
252659
  var init_crop = __esm({
252662
252660
  "lib/editor/crop.ts"() {
252663
- "use strict";
252664
252661
  init_dist_node();
252665
252662
  init_scene_graph();
252666
252663
  init_photo_frames();
@@ -253124,7 +253121,6 @@ function getActiveRenderer() {
253124
253121
  var active;
253125
253122
  var init_renderer_registry = __esm({
253126
253123
  "lib/engine/renderer-registry.ts"() {
253127
- "use strict";
253128
253124
  active = null;
253129
253125
  }
253130
253126
  });
@@ -256193,7 +256189,6 @@ fn shade(uv: vec2<f32>, res: vec2<f32>, tm: f32) -> vec4<f32> {
256193
256189
  var SHADER_PRESETS, shaderPreset, legacyPresetOf, DEFAULT_SHADER_PRESET, DEFAULT_TEXTURE_PARAMS, f, vec4, NOISE_LIB;
256194
256190
  var init_shader_presets = __esm({
256195
256191
  "lib/engine/shader-presets.ts"() {
256196
- "use strict";
256197
256192
  init_shader_graph();
256198
256193
  init_shader_graph_presets();
256199
256194
  init_shader_presets_legacy();
@@ -257997,7 +257992,6 @@ async function docExists(id3) {
257997
257992
  var INDEX_KEY, docKey, thumbKey, THUMB_MAX_BYTES, THUMB_TYPES, LEGACY_DATA_URL, migrating, SPLIT_LAYOUT, nodeKey, WRITER, persisted, saving, deletedHere, keyval, keyvalStore;
257998
257993
  var init_document_library = __esm({
257999
257994
  "lib/storage/document-library.ts"() {
258000
- "use strict";
258001
257995
  init_idb();
258002
257996
  init_media_types();
258003
257997
  init_collapse_duplicates();
@@ -258069,7 +258063,6 @@ function onTabMessage(fn) {
258069
258063
  var EDITOR_HOME, localDocPath, cloudFilePath, CHANNEL2, channel2;
258070
258064
  var init_tab_mode = __esm({
258071
258065
  "lib/desktop/tab-mode.ts"() {
258072
- "use strict";
258073
258066
  EDITOR_HOME = "/home";
258074
258067
  localDocPath = (docId) => `${EDITOR_HOME}?doc=${encodeURIComponent(docId)}`;
258075
258068
  cloudFilePath = (key5) => `/pop/${encodeURIComponent(key5)}`;
@@ -258147,7 +258140,6 @@ function scaleSubtreePatches(nodes, id3, sx, sy, includeSelf = true) {
258147
258140
  var scalePoint;
258148
258141
  var init_scale_geometry = __esm({
258149
258142
  "lib/document/scale-geometry.ts"() {
258150
- "use strict";
258151
258143
  scalePoint = (p2, sx, sy) => ({
258152
258144
  ...p2,
258153
258145
  x: p2.x * sx,
@@ -259143,7 +259135,6 @@ function describeModifier(m) {
259143
259135
  var FLASH_WHITE, BEHAVIOUR_PRESETS, AUDIO_SIGNAL_OPTIONS, AUDIO_MODES, LOOP_MODES, UNKEYABLE, isKeyableParam, freshId4, listOf;
259144
259136
  var init_modifier_edit = __esm({
259145
259137
  "lib/motion/modifier-edit.ts"() {
259146
- "use strict";
259147
259138
  init_easing();
259148
259139
  init_sample_keys();
259149
259140
  FLASH_WHITE = { r: 1, g: 1, b: 1, a: 1 };
@@ -259588,7 +259579,6 @@ function staggerDocument(doc2, ids2, opts) {
259588
259579
  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;
259589
259580
  var init_presets = __esm({
259590
259581
  "lib/motion/presets.ts"() {
259591
- "use strict";
259592
259582
  init_author();
259593
259583
  init_keys();
259594
259584
  init_markers();
@@ -260750,7 +260740,6 @@ function retuneShaderAudio(node2, fillId) {
260750
260740
  }
260751
260741
  var init_shader_audio = __esm({
260752
260742
  "lib/motion/shader-audio.ts"() {
260753
- "use strict";
260754
260743
  init_shader_params();
260755
260744
  init_modifier_edit();
260756
260745
  init_keys();
@@ -261515,7 +261504,6 @@ function breakpointView(state, doc2 = state.document) {
261515
261504
  var storedDocument;
261516
261505
  var init_view = __esm({
261517
261506
  "lib/motion/view.ts"() {
261518
- "use strict";
261519
261507
  init_motion_slice();
261520
261508
  init_transport_clock();
261521
261509
  init_autokey();
@@ -262784,6 +262772,7 @@ function formatLimit(key5, max3) {
262784
262772
  var formatBytes;
262785
262773
  var init_limits2 = __esm({
262786
262774
  "lib/billing/limits.ts"() {
262775
+ "use strict";
262787
262776
  init_format();
262788
262777
  init_plans();
262789
262778
  formatBytes = formatFileSize;
@@ -263317,6 +263306,7 @@ function planEntryAction({ home }) {
263317
263306
  var STORAGE_KEY2, useHyperyTeam, TEAM_PROMPT_ENABLED, TEAM_PROMPTED_KEY, PROMPTED_KEY, useTeamPrompt, started;
263318
263307
  var init_team = __esm({
263319
263308
  "lib/client/cloud/team.ts"() {
263309
+ "use strict";
263320
263310
  init_esm();
263321
263311
  init_api4();
263322
263312
  init_session();
@@ -273497,7 +273487,6 @@ async function prepareTemplate(t3) {
273497
273487
  var templateMediaSources, MEDIA_FETCH_TIMEOUT_MS2, PREPARE_BUDGET_MS, MEDIA_CONCURRENCY, timeoutOf;
273498
273488
  var init_use = __esm({
273499
273489
  "lib/templates/use.ts"() {
273500
- "use strict";
273501
273490
  init_capture();
273502
273491
  templateMediaSources = (t3, hash3) => [
273503
273492
  `/templates/media/${hash3}`,
@@ -311780,6 +311769,7 @@ function startCloudSync() {
311780
311769
  var status, readOnlyDoc, activeLink, statusListeners, notice, urlArmed, opening, syncStatus, canEdit, uploaded, MEDIA_UPLOAD_PARALLEL, pushTimer, pushing, dirty, pendingMedia, collab, collabSession, collabAnonymous, uploadedThumbs, thumbCheckedAt, THUMB_EVERY_MS, THUMB_MIN_GAP_MS, putThumbnail, openingFiles, mediaHealed, started2;
311781
311770
  var init_sync2 = __esm({
311782
311771
  "lib/client/cloud/sync.ts"() {
311772
+ "use strict";
311783
311773
  init_paint_repair();
311784
311774
  init_migrate();
311785
311775
  init_view();
@@ -312388,7 +312378,6 @@ function creditLine(c2) {
312388
312378
  var MAX_PHOTO_PAGE, MAX_PHOTO_QUERY, UUID, isPhotoId, photoImagePath;
312389
312379
  var init_stock = __esm({
312390
312380
  "lib/photos/stock.ts"() {
312391
- "use strict";
312392
312381
  MAX_PHOTO_PAGE = 12;
312393
312382
  MAX_PHOTO_QUERY = 200;
312394
312383
  UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
@@ -313050,7 +313039,6 @@ function applyTextPath(layout2, path, tp, rebase = true) {
313050
313039
  var defaultCircleRadius, ownsPath, mapPoint;
313051
313040
  var init_text_path = __esm({
313052
313041
  "lib/engine/text/text-path.ts"() {
313053
- "use strict";
313054
313042
  init_scene_graph();
313055
313043
  init_transform();
313056
313044
  init_shape_to_path();
@@ -313168,7 +313156,6 @@ function areaBounds(rings) {
313168
313156
  }
313169
313157
  var init_text_area = __esm({
313170
313158
  "lib/engine/text/text-area.ts"() {
313171
- "use strict";
313172
313159
  }
313173
313160
  });
313174
313161
 
@@ -317513,7 +317500,6 @@ async function exportSettingFile(renderer, node2, setting, doc2, styles) {
317513
317500
  var MIME, DEFAULT_EXPORT, exportSettingsOf;
317514
317501
  var init_export = __esm({
317515
317502
  "lib/io/export.ts"() {
317516
- "use strict";
317517
317503
  init_download();
317518
317504
  init_scene_graph();
317519
317505
  init_codecs();
@@ -328800,7 +328786,7 @@ var init_package = __esm({
328800
328786
  "packages/runtime/package.json"() {
328801
328787
  package_default = {
328802
328788
  name: "@popcraft/runtime",
328803
- version: "0.53.5",
328789
+ version: "0.53.6",
328804
328790
  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.",
328805
328791
  license: "MIT",
328806
328792
  homepage: "https://popcraft.app/docs/exporting/nextjs",
@@ -358970,7 +358956,6 @@ function diagnosticsText(diagnostics) {
358970
358956
  var HARNESS_NAMES, plainDiagnostics;
358971
358957
  var init_shader_diagnostics = __esm({
358972
358958
  "lib/engine/shader-diagnostics.ts"() {
358973
- "use strict";
358974
358959
  HARNESS_NAMES = ["ShaderUniforms", "VOut", "vs_main", "fs_main", "u", "p"];
358975
358960
  plainDiagnostics = (errors2) => errors2.map((message) => ({ line: null, column: null, message, severity: "error" }));
358976
358961
  }
@@ -362029,7 +362014,6 @@ function publishSite(key5, files, opts = {}) {
362029
362014
  var siteStatus, setSiteVersion, workspaceSites, deleteSite, renameSite;
362030
362015
  var init_sites = __esm({
362031
362016
  "lib/client/cloud/sites.ts"() {
362032
- "use strict";
362033
362017
  init_files();
362034
362018
  init_upload2();
362035
362019
  init_api4();
@@ -368167,7 +368151,6 @@ var init_doc2 = __esm({
368167
368151
  var POSTER_KEY, MAX_PREVIEW_BYTES2, PREVIEW_STILL_TYPE, previewPath;
368168
368152
  var init_motion3 = __esm({
368169
368153
  "lib/marketplace/motion.ts"() {
368170
- "use strict";
368171
368154
  init_instances2();
368172
368155
  POSTER_KEY = "poster";
368173
368156
  MAX_PREVIEW_BYTES2 = 4 * 1024 * 1024;
@@ -368283,7 +368266,6 @@ async function renderLibraryPreviews(renderer, doc2, listing, format = pickPrevi
368283
368266
  var PREVIEW_FORMATS, PREVIEW_FPS, PREVIEW_MAX_MS2, PREVIEW_HOLD_MS, PREVIEW_BOX, POSTER_CELL, PREVIEW_MAX_SCALE, POSTER_COLS, POSTER_MAX, previewScale, componentSchedule;
368284
368267
  var init_library_previews = __esm({
368285
368268
  "lib/motion/library-previews.ts"() {
368286
- "use strict";
368287
368269
  init_codecs();
368288
368270
  init_gpu_pixels();
368289
368271
  init_render_frames();
@@ -399236,7 +399218,7 @@ async function runPlugin(pluginId, commandId, opts = {}) {
399236
399218
  downloadBlob(new Blob([file2.bytes], { type: file2.mimeType || "application/octet-stream" }), name2);
399237
399219
  return { name: name2, byteLength: file2.bytes.byteLength };
399238
399220
  },
399239
- exportNode: async (nodes, format, scale) => {
399221
+ exportNode: async (nodes, format, scale, bleed) => {
399240
399222
  const renderer = getActiveRenderer();
399241
399223
  if (!renderer) throw new Error("Renderer is not ready");
399242
399224
  const st = useEditorStore.getState();
@@ -399245,7 +399227,7 @@ async function runPlugin(pluginId, commandId, opts = {}) {
399245
399227
  const { exportNodesToPDF: exportNodesToPDF2 } = await Promise.resolve().then(() => (init_pdf(), pdf_exports));
399246
399228
  const { jobPageSize: jobPageSize2 } = await Promise.resolve().then(() => (init_print_pages(), print_pages_exports));
399247
399229
  const { loadFullBleed: loadFullBleed2 } = await Promise.resolve().then(() => (init_print_prefs(), print_prefs_exports));
399248
- const blob2 = await exportNodesToPDF2(renderer, nodes, { dpi: 300, bleed: !loadFullBleed2(), marks: false, splitSpreads: true, pageSize: jobPageSize2(st.document) }, st.document, st.document.styles);
399230
+ const blob2 = await exportNodesToPDF2(renderer, nodes, { dpi: 300, bleed: bleed ?? !loadFullBleed2(), marks: false, splitSpreads: true, pageSize: jobPageSize2(st.document) }, st.document, st.document.styles);
399249
399231
  if (!blob2) throw new Error("PDF export failed");
399250
399232
  return new Uint8Array(await blob2.arrayBuffer());
399251
399233
  }
@@ -399632,7 +399614,10 @@ var init_plugin = __esm({
399632
399614
  format: external_exports.unknown().transform((v) => String(v ?? "PNG").toUpperCase()).refine((f2) => f2 in MIME2, { error: (iss) => `Unsupported format ${String(iss.input)}` }).optional(),
399633
399615
  // Clamped, not rejected: the legacy switch clamped, and a plugin asking for scale 20 should get
399634
399616
  // an 8× image rather than an exception it never handled.
399635
- scale: external_exports.unknown().transform((v) => Math.max(0.1, Math.min(8, Number(v) || 1))).optional()
399617
+ scale: external_exports.unknown().transform((v) => Math.max(0.1, Math.min(8, Number(v) || 1))).optional(),
399618
+ // PDF only. true: 0.125 in of bleed outside the trim, what a commercial printer needs. false: the
399619
+ // page is the trim. Left out, it follows the person's Print setting.
399620
+ bleed: external_exports.boolean().optional()
399636
399621
  }).optional()
399637
399622
  }),
399638
399623
  effect: "none",
@@ -399654,7 +399639,7 @@ var init_plugin = __esm({
399654
399639
  if (nodes.length > 1 && format !== "PDF") {
399655
399640
  throw new PluginApiError("Several nodes can only be exported as one PDF", "invalid_params");
399656
399641
  }
399657
- const data = await env.effects.exportNode(nodes, format, p2.options?.scale ?? 1);
399642
+ const data = await env.effects.exportNode(nodes, format, p2.options?.scale ?? 1, p2.options?.bleed);
399658
399643
  return { summary: nodes.length > 1 ? `Exported ${nodes.length} pages` : `Exported ${nodes[0].name ?? nodes[0].id}`, data };
399659
399644
  }
399660
399645
  }),
@@ -401612,7 +401597,6 @@ function placeDesign(doc2, built, source3, size6, name2, at4) {
401612
401597
  var DESIGN_NAMESPACES, DERIVED2, templateOfBuild;
401613
401598
  var init_build3 = __esm({
401614
401599
  "lib/agent/design-script/build.ts"() {
401615
- "use strict";
401616
401600
  init_hash();
401617
401601
  init_scene_graph();
401618
401602
  init_libraries();
@@ -401642,7 +401626,6 @@ function designFrameOf(doc2, id3) {
401642
401626
  }
401643
401627
  var init_locate = __esm({
401644
401628
  "lib/agent/design-script/locate.ts"() {
401645
- "use strict";
401646
401629
  }
401647
401630
  });
401648
401631
 
@@ -414390,7 +414373,7 @@ init_resources();
414390
414373
  init_desktop();
414391
414374
  init_hypery();
414392
414375
  import { createInterface } from "node:readline";
414393
- var VERSION2 = "0.53.5";
414376
+ var VERSION2 = "0.53.6";
414394
414377
  var HELP = `popcraft ${VERSION2} \u2014 the PopCraft command line
414395
414378
 
414396
414379
  Files (headless, on .popcraft files):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popcraft/cli",
3
- "version": "0.53.5",
3
+ "version": "0.53.6",
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.5"
37
+ "@popcraft/kit": "0.53.6"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "node build.mjs",