@popcraft/cli 0.53.10 → 0.53.12

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 +55 -6
  2. 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.10"}`, ...opts.headers };
1201
+ const headers = { "user-agent": `popcraft-cli/${"0.53.12"}`, ...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 {
@@ -32454,6 +32454,7 @@ var init_en2 = __esm({
32454
32454
  "canvas.comment": "Comment",
32455
32455
  "canvas.dismiss": "Dismiss",
32456
32456
  "canvas.dragToLassoLayers": "Drag to lasso layers",
32457
+ "canvas.figmaCopyCantBePasted": "Figma's Copy can't be pasted here. In Figma, use Copy as SVG or Copy as PNG.",
32457
32458
  "canvas.forStraightEdges": "for straight edges",
32458
32459
  "canvas.hold": "hold",
32459
32460
  "canvas.linkSchemeNotAllowed": "Only http, https, mailto and tel links are allowed.",
@@ -97581,6 +97582,7 @@ function relinkCopies(doc2, copies) {
97581
97582
  var TEXT_PATH_SOURCE_TYPES, isPathSource;
97582
97583
  var init_text_links = __esm({
97583
97584
  "lib/document/text-links.ts"() {
97585
+ "use strict";
97584
97586
  init_transform();
97585
97587
  TEXT_PATH_SOURCE_TYPES = ["VECTOR", "ELLIPSE", "RECTANGLE", "POLYGON", "STAR", "LINE", "ARROW", "FRAME"];
97586
97588
  isPathSource = (n) => !!n && TEXT_PATH_SOURCE_TYPES.includes(n.type);
@@ -247048,6 +247050,7 @@ function rescaleTextEffect(node2) {
247048
247050
  var DEFAULTS, BLACK5, WHITE5, fillPaint, fillColor, shadow, round, OUTLINED;
247049
247051
  var init_effect_presets = __esm({
247050
247052
  "lib/text/effect-presets.ts"() {
247053
+ "use strict";
247051
247054
  init_effects();
247052
247055
  DEFAULTS = {
247053
247056
  SHADOW: { distance: 17.68, angle: 45, blur: 12.5, thickness: 0, intensity: 45 },
@@ -249006,6 +249009,7 @@ function fillPhotoFrame(doc2, groupId, imageUrl, size6, name2 = "Photo", credit)
249006
249009
  var isPhotoFrame;
249007
249010
  var init_photo_frames = __esm({
249008
249011
  "lib/document/photo-frames.ts"() {
249012
+ "use strict";
249009
249013
  init_dist_node();
249010
249014
  init_scene_graph();
249011
249015
  init_types();
@@ -249150,6 +249154,7 @@ function beforeWrite() {
249150
249154
  var leave;
249151
249155
  var init_read_only = __esm({
249152
249156
  "lib/editor/modes/read-only.ts"() {
249157
+ "use strict";
249153
249158
  leave = null;
249154
249159
  }
249155
249160
  });
@@ -252662,6 +252667,7 @@ function resizeWindow(doc2, target2, rect) {
252662
252667
  }
252663
252668
  var init_crop = __esm({
252664
252669
  "lib/editor/crop.ts"() {
252670
+ "use strict";
252665
252671
  init_dist_node();
252666
252672
  init_scene_graph();
252667
252673
  init_photo_frames();
@@ -253125,6 +253131,7 @@ function getActiveRenderer() {
253125
253131
  var active;
253126
253132
  var init_renderer_registry = __esm({
253127
253133
  "lib/engine/renderer-registry.ts"() {
253134
+ "use strict";
253128
253135
  active = null;
253129
253136
  }
253130
253137
  });
@@ -256193,6 +256200,7 @@ fn shade(uv: vec2<f32>, res: vec2<f32>, tm: f32) -> vec4<f32> {
256193
256200
  var SHADER_PRESETS, shaderPreset, legacyPresetOf, DEFAULT_SHADER_PRESET, DEFAULT_TEXTURE_PARAMS, f, vec4, NOISE_LIB;
256194
256201
  var init_shader_presets = __esm({
256195
256202
  "lib/engine/shader-presets.ts"() {
256203
+ "use strict";
256196
256204
  init_shader_graph();
256197
256205
  init_shader_graph_presets();
256198
256206
  init_shader_presets_legacy();
@@ -256889,6 +256897,7 @@ var init_apply2 = __esm({
256889
256897
  var HYPERY_CLIENT_ID, HYPERY_GATEWAY_URL, HYPERY_AI_SCOPES, plansEnabled, HYPERY_BILLING_SCOPES, HYPERY_AUDIO_SCOPES, HYPERY_SCOPES, cloudEnabled;
256890
256898
  var init_config2 = __esm({
256891
256899
  "lib/client/cloud/config.ts"() {
256900
+ "use strict";
256892
256901
  HYPERY_CLIENT_ID = process.env.NEXT_PUBLIC_HYPERY_CLIENT_ID ?? "";
256893
256902
  HYPERY_GATEWAY_URL = process.env.NEXT_PUBLIC_HYPERY_GATEWAY_URL ?? "https://hypery.ai";
256894
256903
  HYPERY_AI_SCOPES = ["ai:chat", "ai:completions", "ai:models", "ai:images"];
@@ -257155,6 +257164,7 @@ function followPeers(peers) {
257155
257164
  var PALETTE, usePresence, awareness, CURSOR_SEND_MS, VIEWPORT_SEND_MS, cursorTimer, pendingCursor, sentCursor, EMOTE_MS, lastFollowCamera;
257156
257165
  var init_presence = __esm({
257157
257166
  "lib/collab/presence.ts"() {
257167
+ "use strict";
257158
257168
  init_esm();
257159
257169
  init_editor_store();
257160
257170
  init_status_announcements();
@@ -257995,6 +258005,7 @@ async function docExists(id3) {
257995
258005
  var INDEX_KEY, docKey, thumbKey, THUMB_MAX_BYTES, THUMB_TYPES, LEGACY_DATA_URL, migrating, SPLIT_LAYOUT, nodeKey, WRITER, persisted, saving, deletedHere, keyval, keyvalStore;
257996
258006
  var init_document_library = __esm({
257997
258007
  "lib/storage/document-library.ts"() {
258008
+ "use strict";
257998
258009
  init_idb();
257999
258010
  init_media_types();
258000
258011
  init_collapse_duplicates();
@@ -258066,6 +258077,7 @@ function onTabMessage(fn) {
258066
258077
  var EDITOR_HOME, localDocPath, cloudFilePath, CHANNEL2, channel2;
258067
258078
  var init_tab_mode = __esm({
258068
258079
  "lib/desktop/tab-mode.ts"() {
258080
+ "use strict";
258069
258081
  EDITOR_HOME = "/home";
258070
258082
  localDocPath = (docId) => `${EDITOR_HOME}?doc=${encodeURIComponent(docId)}`;
258071
258083
  cloudFilePath = (key5) => `/pop/${encodeURIComponent(key5)}`;
@@ -260746,6 +260758,7 @@ function retuneShaderAudio(node2, fillId) {
260746
260758
  }
260747
260759
  var init_shader_audio = __esm({
260748
260760
  "lib/motion/shader-audio.ts"() {
260761
+ "use strict";
260749
260762
  init_shader_params();
260750
260763
  init_modifier_edit();
260751
260764
  init_keys();
@@ -261510,6 +261523,7 @@ function breakpointView(state, doc2 = state.document) {
261510
261523
  var storedDocument;
261511
261524
  var init_view = __esm({
261512
261525
  "lib/motion/view.ts"() {
261526
+ "use strict";
261513
261527
  init_motion_slice();
261514
261528
  init_transport_clock();
261515
261529
  init_autokey();
@@ -262683,6 +262697,7 @@ function networkSignal(signal, timeoutMs = NETWORK_TIMEOUT_MS) {
262683
262697
  var import_react3, NETWORK_TIMEOUT_MS, OfflineError;
262684
262698
  var init_network = __esm({
262685
262699
  "lib/client/network.ts"() {
262700
+ "use strict";
262686
262701
  import_react3 = __toESM(require_react());
262687
262702
  NETWORK_TIMEOUT_MS = 8e3;
262688
262703
  OfflineError = class extends Error {
@@ -262778,6 +262793,7 @@ function formatLimit(key5, max3) {
262778
262793
  var formatBytes;
262779
262794
  var init_limits2 = __esm({
262780
262795
  "lib/billing/limits.ts"() {
262796
+ "use strict";
262781
262797
  init_format();
262782
262798
  init_plans();
262783
262799
  formatBytes = formatFileSize;
@@ -263311,7 +263327,6 @@ function planEntryAction({ home }) {
263311
263327
  var STORAGE_KEY2, useHyperyTeam, TEAM_PROMPT_ENABLED, TEAM_PROMPTED_KEY, PROMPTED_KEY, useTeamPrompt, started;
263312
263328
  var init_team = __esm({
263313
263329
  "lib/client/cloud/team.ts"() {
263314
- "use strict";
263315
263330
  init_esm();
263316
263331
  init_api4();
263317
263332
  init_session();
@@ -273492,6 +273507,7 @@ async function prepareTemplate(t3) {
273492
273507
  var templateMediaSources, MEDIA_FETCH_TIMEOUT_MS2, PREPARE_BUDGET_MS, MEDIA_CONCURRENCY, timeoutOf;
273493
273508
  var init_use = __esm({
273494
273509
  "lib/templates/use.ts"() {
273510
+ "use strict";
273495
273511
  init_capture();
273496
273512
  templateMediaSources = (t3, hash3) => [
273497
273513
  `/templates/media/${hash3}`,
@@ -306993,6 +307009,7 @@ function decodeSource(key5, label3) {
306993
307009
  var DECODE_CACHE_BYTES, cache7, pending4, held, sizeOf, lengths, decodedLengths, DECODE_TIMEOUT_MS, decodedAudio, decodedSource, pcmOf;
306994
307010
  var init_audio_decode = __esm({
306995
307011
  "lib/motion/audio-decode.ts"() {
307012
+ "use strict";
306996
307013
  init_media_store();
306997
307014
  init_audio_plan();
306998
307015
  init_time_stretch();
@@ -311773,7 +311790,6 @@ function startCloudSync() {
311773
311790
  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;
311774
311791
  var init_sync2 = __esm({
311775
311792
  "lib/client/cloud/sync.ts"() {
311776
- "use strict";
311777
311793
  init_paint_repair();
311778
311794
  init_migrate();
311779
311795
  init_view();
@@ -311983,6 +311999,7 @@ async function dispatchShaped(key5, options) {
311983
311999
  var onViolation;
311984
312000
  var init_dispatch = __esm({
311985
312001
  "lib/commands/dispatch.ts"() {
312002
+ "use strict";
311986
312003
  init_errors();
311987
312004
  init_registry();
311988
312005
  init_confirm();
@@ -312382,6 +312399,7 @@ function creditLine(c2) {
312382
312399
  var MAX_PHOTO_PAGE, MAX_PHOTO_QUERY, UUID, isPhotoId, photoImagePath;
312383
312400
  var init_stock = __esm({
312384
312401
  "lib/photos/stock.ts"() {
312402
+ "use strict";
312385
312403
  MAX_PHOTO_PAGE = 12;
312386
312404
  MAX_PHOTO_QUERY = 200;
312387
312405
  UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
@@ -313043,6 +313061,7 @@ function applyTextPath(layout2, path, tp, rebase = true) {
313043
313061
  var defaultCircleRadius, ownsPath, mapPoint;
313044
313062
  var init_text_path = __esm({
313045
313063
  "lib/engine/text/text-path.ts"() {
313064
+ "use strict";
313046
313065
  init_scene_graph();
313047
313066
  init_transform();
313048
313067
  init_shape_to_path();
@@ -313160,6 +313179,7 @@ function areaBounds(rings) {
313160
313179
  }
313161
313180
  var init_text_area = __esm({
313162
313181
  "lib/engine/text/text-area.ts"() {
313182
+ "use strict";
313163
313183
  }
313164
313184
  });
313165
313185
 
@@ -317504,6 +317524,7 @@ async function exportSettingFile(renderer, node2, setting, doc2, styles) {
317504
317524
  var MIME, DEFAULT_EXPORT, exportSettingsOf;
317505
317525
  var init_export = __esm({
317506
317526
  "lib/io/export.ts"() {
317527
+ "use strict";
317507
317528
  init_download();
317508
317529
  init_scene_graph();
317509
317530
  init_codecs();
@@ -318437,7 +318458,6 @@ function agentToolList() {
318437
318458
  var AGENT_CAPABILITIES, legacyCommandId, legacyTools, blobToDataUrl3, provided, legacyTool, legacyToolList;
318438
318459
  var init_agent = __esm({
318439
318460
  "lib/commands/agent.ts"() {
318440
- "use strict";
318441
318461
  init_types5();
318442
318462
  init_registry();
318443
318463
  init_errors();
@@ -319235,6 +319255,8 @@ var init_ui = __esm({
319235
319255
  var svg_place_exports = {};
319236
319256
  __export(svg_place_exports, {
319237
319257
  MAX_SVG_LAYER_BYTES: () => MAX_SVG_LAYER_BYTES,
319258
+ extractSvgMarkup: () => extractSvgMarkup,
319259
+ isFigmaClipboardHtml: () => isFigmaClipboardHtml,
319238
319260
  isSvgMarkup: () => isSvgMarkup,
319239
319261
  placeSvgLayers: () => placeSvgLayers
319240
319262
  });
@@ -319245,6 +319267,26 @@ function isSvgMarkup(text) {
319245
319267
  const tail = text.trimEnd();
319246
319268
  return /<\/svg\s*>$/i.test(tail) || /^<svg[^>]*\/>$/i.test(head2.trimEnd());
319247
319269
  }
319270
+ function isFigmaClipboardHtml(html) {
319271
+ return !!html && /\(fig(?:meta|ma)\)/.test(html);
319272
+ }
319273
+ function extractSvgMarkup(text) {
319274
+ if (!text) return null;
319275
+ if (isSvgMarkup(text)) return text;
319276
+ const find2 = (s) => {
319277
+ const start2 = s.search(/<svg[\s>/]/i);
319278
+ if (start2 < 0) return null;
319279
+ const end = s.toLowerCase().lastIndexOf("</svg>");
319280
+ if (end < start2) return null;
319281
+ const svg = s.slice(start2, end + 6);
319282
+ return isSvgMarkup(svg) ? svg : null;
319283
+ };
319284
+ const direct = find2(text);
319285
+ if (direct) return direct;
319286
+ if (!/&lt;svg/i.test(text)) return null;
319287
+ const decoded = text.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;|&apos;/g, "'").replace(/&nbsp;/g, " ").replace(/&amp;/g, "&");
319288
+ return find2(decoded);
319289
+ }
319248
319290
  function placeSvgLayers(doc2, parentId, svg, place4) {
319249
319291
  if (!doc2.nodes[parentId] || svg.length > MAX_SVG_LAYER_BYTES) return null;
319250
319292
  const frame3 = createFrame({ name: place4.name, x: place4.cx, y: place4.cy, width: 1, height: 1, fills: [], backgroundColor: { r: 1, g: 1, b: 1, a: 0 }, clipsContent: false });
@@ -328790,7 +328832,7 @@ var init_package = __esm({
328790
328832
  "packages/runtime/package.json"() {
328791
328833
  package_default = {
328792
328834
  name: "@popcraft/runtime",
328793
- version: "0.53.10",
328835
+ version: "0.53.12",
328794
328836
  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.",
328795
328837
  license: "MIT",
328796
328838
  homepage: "https://popcraft.app/docs/exporting/nextjs",
@@ -353456,6 +353498,7 @@ function exportsOf(source3) {
353456
353498
  var CODE_LIMITS, packageOf;
353457
353499
  var init_source2 = __esm({
353458
353500
  "lib/code/source.ts"() {
353501
+ "use strict";
353459
353502
  CODE_LIMITS = { modules: 100, sourceLength: 2e5, packages: 12 };
353460
353503
  packageOf = (spec) => spec.split("/").slice(0, spec.startsWith("@") ? 2 : 1).join("/");
353461
353504
  }
@@ -353498,6 +353541,7 @@ function compileModule(module2) {
353498
353541
  var import_sucrase, BUILT_IN, memo4;
353499
353542
  var init_compile2 = __esm({
353500
353543
  "lib/code/compile.ts"() {
353544
+ "use strict";
353501
353545
  import_sucrase = __toESM(require_dist2());
353502
353546
  init_source2();
353503
353547
  init_source2();
@@ -362547,6 +362591,7 @@ var init_delete_current_file = __esm({
362547
362591
  var storeOpsSeam;
362548
362592
  var init_seams = __esm({
362549
362593
  "lib/commands/seams.ts"() {
362594
+ "use strict";
362550
362595
  storeOpsSeam = (st) => ({
362551
362596
  booleanOperation: (op4) => st().booleanOperation(op4),
362552
362597
  flatten: () => st().flattenSelection(),
@@ -368157,6 +368202,7 @@ var init_doc2 = __esm({
368157
368202
  var POSTER_KEY, MAX_PREVIEW_BYTES2, PREVIEW_STILL_TYPE, previewPath;
368158
368203
  var init_motion3 = __esm({
368159
368204
  "lib/marketplace/motion.ts"() {
368205
+ "use strict";
368160
368206
  init_instances2();
368161
368207
  POSTER_KEY = "poster";
368162
368208
  MAX_PREVIEW_BYTES2 = 4 * 1024 * 1024;
@@ -401365,6 +401411,7 @@ function record(source, namespaces, globals, limits) {
401365
401411
  var HELPER_NAMES;
401366
401412
  var init_helper_names = __esm({
401367
401413
  "lib/agent/design-script/helper-names.ts"() {
401414
+ "use strict";
401368
401415
  HELPER_NAMES = ["draw", "marks", "fit", "motion", "captions", "overlays", "texture", "pointer", "windows", "devices", "type", "beat", "web", "social", "video", "site", "effects"];
401369
401416
  }
401370
401417
  });
@@ -401604,6 +401651,7 @@ function placeDesign(doc2, built, source3, size6, name2, at4) {
401604
401651
  var DESIGN_NAMESPACES, DERIVED2, templateOfBuild;
401605
401652
  var init_build3 = __esm({
401606
401653
  "lib/agent/design-script/build.ts"() {
401654
+ "use strict";
401607
401655
  init_hash();
401608
401656
  init_scene_graph();
401609
401657
  init_libraries();
@@ -401633,6 +401681,7 @@ function designFrameOf(doc2, id3) {
401633
401681
  }
401634
401682
  var init_locate = __esm({
401635
401683
  "lib/agent/design-script/locate.ts"() {
401684
+ "use strict";
401636
401685
  }
401637
401686
  });
401638
401687
 
@@ -414380,7 +414429,7 @@ init_resources();
414380
414429
  init_desktop();
414381
414430
  init_hypery();
414382
414431
  import { createInterface } from "node:readline";
414383
- var VERSION2 = "0.53.10";
414432
+ var VERSION2 = "0.53.12";
414384
414433
  var HELP = `popcraft ${VERSION2} \u2014 the PopCraft command line
414385
414434
 
414386
414435
  Files (headless, on .popcraft files):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popcraft/cli",
3
- "version": "0.53.10",
3
+ "version": "0.53.12",
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.10"
37
+ "@popcraft/kit": "0.53.12"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "node build.mjs",