@popcraft/cli 0.4.0 → 0.4.1

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 +16 -9
  2. package/package.json +2 -2
package/dist/popcraft.mjs CHANGED
@@ -314010,7 +314010,6 @@ popcraftMount(document.querySelector('[data-pc="0"]'), ${JSON.stringify(spec)});
314010
314010
  var routeFile, routeUp, bytesOf;
314011
314011
  var init_files = __esm({
314012
314012
  "lib/io/web/project/files.ts"() {
314013
- "use strict";
314014
314013
  routeFile = (route2) => route2 === "/" ? "index.html" : `${route2.replace(/^\//, "")}/index.html`;
314015
314014
  routeUp = (route2) => route2 === "/" ? "" : "../".repeat(route2.replace(/^\//, "").split("/").length);
314016
314015
  bytesOf = (f2) => typeof f2.content === "string" ? new TextEncoder().encode(f2.content) : f2.content;
@@ -315030,7 +315029,7 @@ var init_package = __esm({
315030
315029
  "packages/runtime/package.json"() {
315031
315030
  package_default = {
315032
315031
  name: "@popcraft/runtime",
315033
- version: "0.4.0",
315032
+ version: "0.4.1",
315034
315033
  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.",
315035
315034
  license: "MIT",
315036
315035
  homepage: "https://popcraft.app/docs/exporting/nextjs",
@@ -346770,7 +346769,6 @@ function publishSite(key5, files, opts = {}) {
346770
346769
  var siteStatus, setSiteVersion, renameSite;
346771
346770
  var init_sites = __esm({
346772
346771
  "lib/client/cloud/sites.ts"() {
346773
- "use strict";
346774
346772
  init_files();
346775
346773
  init_upload2();
346776
346774
  init_api3();
@@ -348085,12 +348083,12 @@ const music = beat.bed('tension', 28)
348085
348083
  const b = music.beat
348086
348084
  k.brand({ paper: '#F4F1EA', ink: '#141414', hot: '#E8361E', muted: '#6B6760' }, { name: 'Tillwise', site: 'tillwise.example' })
348087
348085
  k.textStyle('Hook', { size: 132, fontWeight: 900, lineHeight: 120, letterSpacing: -4 })
348088
- k.textStyle('Price', { size: 220, fontWeight: 900, lineHeight: 200, letterSpacing: -8, fontFeatures: { tnum: 1 } })
348086
+ k.textStyle('Price', { size: 220, fontWeight: 900, lineHeight: 236, letterSpacing: -8, fontFeatures: { tnum: 1 } })
348089
348087
  k.textStyle('Line', { size: 34, fontWeight: 500, lineHeight: 44, fontFamily: 'JetBrains Mono' })
348090
348088
  k.textStyle('Caption', { size: 44, fontWeight: 700, lineHeight: 52 })
348091
348089
  k.textStyle('Hook small', { size: 96, fontWeight: 900, lineHeight: 90, letterSpacing: -3 })
348092
348090
  k.textStyle('Hook square', { size: 72, fontWeight: 900, lineHeight: 70, letterSpacing: -2 })
348093
- k.textStyle('Price small', { size: 120, fontWeight: 900, lineHeight: 112, letterSpacing: -5, fontFeatures: { tnum: 1 } })
348091
+ k.textStyle('Price small', { size: 120, fontWeight: 900, lineHeight: 128, letterSpacing: -5, fontFeatures: { tnum: 1 } })
348094
348092
  const sheet = k.sheet
348095
348093
  // The frame itself lays out its content: a vertical stack with margins clear of the apps' buttons (the safe area).
348096
348094
  k.flowSheet(sheet, 36, { top: 270, right: 150, bottom: 500, left: 80 }, 'paper')
@@ -348207,7 +348205,14 @@ web.webResponsive(k, sheet, {
348207
348205
  restyle: { 'Display 64': { laptop: 'Display 44', tablet: 'Display 44', mobile: 'Display 34' }, 'Lead 20': { mobile: 'Lead 17' }, 'Section 32': { mobile: 'Section 26' } },
348208
348206
  gap: { tablet: 56, mobile: 40 },
348209
348207
  // One function per size: a script's function is recorded before the kit runs, so it cannot test which size it is in.
348210
- tweaks: { tablet: (kit, id) => kit.patch(kit.named(id, 'Product')[0], { layoutSizingHorizontal: 'FILL' }), mobile: (kit, id) => kit.patch(kit.named(id, 'Product')[0], { layoutSizingHorizontal: 'FILL' }) },
348208
+ // On the phone the panel is narrower than the 464 px tide line: the line is scaled to fit it, not cut off.
348209
+ tweaks: {
348210
+ tablet: (kit, id) => kit.patch(kit.named(id, 'Product')[0], { layoutSizingHorizontal: 'FILL' }),
348211
+ mobile: (kit, id) => {
348212
+ kit.patch(kit.named(id, 'Product')[0], { layoutSizingHorizontal: 'FILL' })
348213
+ kit.patch(kit.named(id, 'Tide line')[0], { scaleX: 0.58, scaleY: 0.58, anchorX: 0, anchorY: 0 })
348214
+ },
348215
+ },
348211
348216
  })
348212
348217
  `;
348213
348218
  PRICING = `// A pricing page whose monthly/yearly switch really works: two variables, a variant set, and every price block bound.
@@ -348300,7 +348305,9 @@ const btn = k.stack(sheet, { direction: 'HORIZONTAL', width: 'HUG', fill: 'prima
348300
348305
  k.text(btn, 'Try Crumb free', { style: 'Button 22', color: 'onPrimary', autoWidth: true, name: 'Button label' })
348301
348306
  // The art: a loaf on a board with a price tag, drawn on the right.
348302
348307
  k.ellipse(sheet, 520, 'card', { name: 'Plate', absolute: { x: 650, y: 54 } })
348303
- k.rect(sheet, 380, 190, 'primary', { radius: 95, name: 'Loaf', absolute: { x: 720, y: 220 } })
348308
+ // The loaf is a stack so its score marks stay centred on it when the taller cuts resize it.
348309
+ const loaf = k.stack(sheet, { direction: 'HORIZONTAL', align: 'CENTER', justify: 'CENTER', gap: 44, width: 380, height: 190, fill: 'primary', radius: 95, name: 'Loaf', absolute: { x: 720, y: 220 } })
348310
+ for (let i = 0; i < 3; i++) k.patch(k.rect(loaf, 20, 110, 'card', { radius: 10, name: 'Score' }), { rotation: -24 })
348304
348311
  const tag = k.stack(sheet, { direction: 'HORIZONTAL', width: 'HUG', fill: 'text', radius: 10, padding: { top: 10, right: 16, bottom: 10, left: 16 }, name: 'Tag', absolute: { x: 940, y: 120 } })
348305
348312
  k.text(tag, '\xA39 a month', { style: 'Price 40', color: 'paper', autoWidth: true, name: 'Tag price' })
348306
348313
  // Each tall cut puts the art on top and the words under it, with type and the button scaled up for the bigger frame.
@@ -390827,7 +390834,7 @@ function operations(spec = openapi) {
390827
390834
  }
390828
390835
  async function call(target2, method, path, opts = {}) {
390829
390836
  const qs = new URLSearchParams(opts.query ?? {}).toString();
390830
- const headers = { "user-agent": `popcraft-cli/${"0.4.0"}`, ...opts.headers };
390837
+ const headers = { "user-agent": `popcraft-cli/${"0.4.1"}`, ...opts.headers };
390831
390838
  if (target2.token) headers.authorization = `Bearer ${target2.token}`;
390832
390839
  if (opts.contentType) headers["content-type"] = opts.contentType;
390833
390840
  try {
@@ -391787,7 +391794,7 @@ async function runPublish(root2, opts, target2, out) {
391787
391794
  // packages/cli/src/main.ts
391788
391795
  init_resources();
391789
391796
  init_hypery();
391790
- var VERSION2 = "0.4.0";
391797
+ var VERSION2 = "0.4.1";
391791
391798
  var HELP = `popcraft ${VERSION2} \u2014 the PopCraft command line
391792
391799
 
391793
391800
  Files (headless, on .popcraft files):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popcraft/cli",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
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.4.0"
37
+ "@popcraft/kit": "0.4.1"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "node build.mjs",