@base44-preview/cli 0.1.15-pr.630.51361fe → 0.1.15-pr.630.68db200

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/cli/index.js CHANGED
@@ -275891,119 +275891,6 @@ var build_default = TextInput;
275891
275891
  // src/cli/commands/code/session.tsx
275892
275892
  var import_react23 = __toESM(require_react(), 1);
275893
275893
 
275894
- // src/cli/commands/code/logo.ts
275895
- var ROWS = 6;
275896
- var ASPECT = 0.44;
275897
- var SAMPLES = 4;
275898
- var FILL = 0.6;
275899
- var GAP_ROW = 3.5 + 0.5;
275900
- var GAP_HEIGHT_ROWS = 0.8;
275901
- var LOGO_COLS = Math.max(2, Math.floor(ROWS / ASPECT + 0.5));
275902
- var OCTANT = {
275903
- rx: 2,
275904
- ry: 4,
275905
- table: Array.from(" \uD83E\uDF82\uD833\uDD00▘\uD833\uDD01\uD833\uDD02\uD833\uDD03\uD833\uDD04▝\uD833\uDD05\uD833\uDD06\uD833\uDD07\uD833\uDD08▀\uD833\uDD09\uD833\uDD0A\uD833\uDD0B\uD833\uDD0C\uD833\uDD00\uD833\uDD0D\uD833\uDD0E\uD833\uDD0F\uD833\uDD10\uD833\uDD11\uD833\uDD12\uD833\uDD13\uD833\uDD14\uD833\uDD15\uD833\uDD16\uD833\uDD17\uD833\uDD18\uD833\uDD19\uD833\uDD1A\uD833\uDD1B\uD833\uDD1C\uD833\uDD1D\uD833\uDD1E\uD833\uDD1F\uD833\uDD03\uD833\uDD20\uD833\uDD21\uD833\uDD22\uD833\uDD23\uD833\uDD24\uD833\uDD25\uD833\uDD26\uD833\uDD27\uD833\uDD28\uD833\uDD29\uD833\uDD2A\uD833\uDD2B\uD833\uDD2C\uD833\uDD2D\uD833\uDD2E\uD833\uDD2F\uD833\uDD30\uD833\uDD31\uD833\uDD32\uD833\uDD33\uD833\uDD34\uD833\uDD35\uD83E\uDF85 \uD833\uDD36\uD833\uDD37\uD833\uDD38\uD833\uDD39\uD833\uDD3A\uD833\uDD3B\uD833\uDD3C\uD833\uDD3D\uD833\uDD3E\uD833\uDD3F\uD833\uDD40\uD833\uDD41\uD833\uDD42\uD833\uDD43\uD833\uDD44▖\uD833\uDD45\uD833\uDD46\uD833\uDD47\uD833\uDD48▌\uD833\uDD49\uD833\uDD4A\uD833\uDD4B\uD833\uDD4C▞\uD833\uDD4D\uD833\uDD4E\uD833\uDD4F\uD833\uDD50▛\uD833\uDD51\uD833\uDD52\uD833\uDD53\uD833\uDD54\uD833\uDD55\uD833\uDD56\uD833\uDD57\uD833\uDD58\uD833\uDD59\uD833\uDD5A\uD833\uDD5B\uD833\uDD5C\uD833\uDD5D\uD833\uDD5E\uD833\uDD5F\uD833\uDD60\uD833\uDD61\uD833\uDD62\uD833\uDD63\uD833\uDD64\uD833\uDD65\uD833\uDD66\uD833\uDD67\uD833\uDD68\uD833\uDD69\uD833\uDD6A\uD833\uDD6B\uD833\uDD6C\uD833\uDD6D\uD833\uDD6E\uD833\uDD6F\uD833\uDD70 \uD833\uDD71\uD833\uDD72\uD833\uDD73\uD833\uDD74\uD833\uDD75\uD833\uDD76\uD833\uDD77\uD833\uDD78\uD833\uDD79\uD833\uDD7A\uD833\uDD7B\uD833\uDD7C\uD833\uDD7D\uD833\uDD7E\uD833\uDD7F\uD833\uDD80\uD833\uDD81\uD833\uDD82\uD833\uDD83\uD833\uDD84\uD833\uDD85\uD833\uDD86\uD833\uDD87\uD833\uDD88\uD833\uDD89\uD833\uDD8A\uD833\uDD8B\uD833\uDD8C\uD833\uDD8D\uD833\uDD8E\uD833\uDD8F▗\uD833\uDD90\uD833\uDD91\uD833\uDD92\uD833\uDD93▚\uD833\uDD94\uD833\uDD95\uD833\uDD96\uD833\uDD97▐\uD833\uDD98\uD833\uDD99\uD833\uDD9A\uD833\uDD9B▜\uD833\uDD9C\uD833\uDD9D\uD833\uDD9E\uD833\uDD9F\uD833\uDDA0\uD833\uDDA1\uD833\uDDA2\uD833\uDDA3\uD833\uDDA4\uD833\uDDA5\uD833\uDDA6\uD833\uDDA7\uD833\uDDA8\uD833\uDDA9\uD833\uDDAA\uD833\uDDAB▂\uD833\uDDAC\uD833\uDDAD\uD833\uDDAE\uD833\uDDAF\uD833\uDDB0\uD833\uDDB1\uD833\uDDB2\uD833\uDDB3\uD833\uDDB4\uD833\uDDB5\uD833\uDDB6\uD833\uDDB7\uD833\uDDB8\uD833\uDDB9\uD833\uDDBA\uD833\uDDBB\uD833\uDDBC\uD833\uDDBD\uD833\uDDBE\uD833\uDDBF\uD833\uDDC0\uD833\uDDC1\uD833\uDDC2\uD833\uDDC3\uD833\uDDC4\uD833\uDDC5\uD833\uDDC6\uD833\uDDC7\uD833\uDDC8\uD833\uDDC9\uD833\uDDCA\uD833\uDDCB\uD833\uDDCC\uD833\uDDCD\uD833\uDDCE\uD833\uDDCF\uD833\uDDD0\uD833\uDDD1\uD833\uDDD2\uD833\uDDD3\uD833\uDDD4\uD833\uDDD5\uD833\uDDD6\uD833\uDDD7\uD833\uDDD8\uD833\uDDD9\uD833\uDDDA▄\uD833\uDDDB\uD833\uDDDC\uD833\uDDDD\uD833\uDDDE▙\uD833\uDDDF\uD833\uDDE0\uD833\uDDE1\uD833\uDDE2▟\uD833\uDDE3▆\uD833\uDDE4\uD833\uDDE5█")
275906
- };
275907
- var QUAD = {
275908
- rx: 2,
275909
- ry: 2,
275910
- table: Array.from(" ▘▝▀▖▌▞▛▗▚▐▜▄▙▟█")
275911
- };
275912
- function detectTier(env = process.env) {
275913
- const term = env.TERM ?? "";
275914
- const prog = env.TERM_PROGRAM ?? "";
275915
- if (prog === "ghostty" || term.includes("ghostty"))
275916
- return "octant";
275917
- if (env.KITTY_WINDOW_ID || term.includes("kitty"))
275918
- return "octant";
275919
- if (env.WEZTERM_PANE || env.WEZTERM_EXECUTABLE)
275920
- return "octant";
275921
- if (term.startsWith("foot") || prog === "contour")
275922
- return "octant";
275923
- return "quad";
275924
- }
275925
- function coverageGrid(rows, cols, aspect, pixelH) {
275926
- const worldH = rows * pixelH;
275927
- const worldW = cols * aspect;
275928
- const radius = Math.min(worldH, worldW) / 2;
275929
- const cx = worldW / 2;
275930
- const cy = worldH / 2;
275931
- const step = 1 / SAMPLES;
275932
- const grid = [];
275933
- for (let py = 0;py < rows; py++) {
275934
- const y0 = py * pixelH;
275935
- const y1 = y0 + pixelH;
275936
- const dyLo = y0 <= cy && cy <= y1 ? 0 : Math.min(Math.abs(y0 - cy), Math.abs(y1 - cy));
275937
- const dyHi = Math.max(Math.abs(y0 - cy), Math.abs(y1 - cy));
275938
- const line = [];
275939
- for (let px = 0;px < cols; px++) {
275940
- const x0 = px * aspect;
275941
- const x1 = x0 + aspect;
275942
- const dxLo = x0 <= cx && cx <= x1 ? 0 : Math.min(Math.abs(x0 - cx), Math.abs(x1 - cx));
275943
- const dxHi = Math.max(Math.abs(x0 - cx), Math.abs(x1 - cx));
275944
- if (Math.hypot(dxLo, dyLo) >= radius) {
275945
- line.push(0);
275946
- continue;
275947
- }
275948
- if (Math.hypot(dxHi, dyHi) <= radius) {
275949
- line.push(1);
275950
- continue;
275951
- }
275952
- let hits = 0;
275953
- for (let j = 0;j < SAMPLES; j++) {
275954
- const dy = y0 + (j + 0.5) * step * pixelH - cy;
275955
- for (let i = 0;i < SAMPLES; i++) {
275956
- const dx = x0 + (i + 0.5) * step * aspect - cx;
275957
- if (Math.hypot(dx, dy) <= radius)
275958
- hits++;
275959
- }
275960
- }
275961
- line.push(hits / (SAMPLES * SAMPLES));
275962
- }
275963
- grid.push(line);
275964
- }
275965
- return grid;
275966
- }
275967
- function carveGap(grid, ry) {
275968
- const n = grid.length;
275969
- const thick = Math.max(1, Math.round(GAP_HEIGHT_ROWS * ry));
275970
- const centre = GAP_ROW >= 0 ? GAP_ROW * ry : n + GAP_ROW * ry;
275971
- const start = Math.max(0, Math.min(n - thick, centre - thick / 2));
275972
- for (let i = Math.trunc(start);i < Math.trunc(start + thick); i++) {
275973
- grid[i].fill(0);
275974
- }
275975
- }
275976
- function logoRows(color, tier = detectTier()) {
275977
- const { rx, ry, table } = tier === "octant" ? OCTANT : QUAD;
275978
- const grid = coverageGrid(ROWS * ry, LOGO_COLS * rx, ASPECT / rx, 1 / ry);
275979
- carveGap(grid, ry);
275980
- const fg = color ? source_default.hex(color) : (s) => s;
275981
- const bg = color ? source_default.bgHex(color) : (s) => s;
275982
- const full = (1 << rx * ry) - 1;
275983
- const out = [];
275984
- for (let r = 0;r < ROWS; r++) {
275985
- let row = "";
275986
- for (let c = 0;c < LOGO_COLS; c++) {
275987
- let mask = 0;
275988
- for (let sr = 0;sr < ry; sr++) {
275989
- for (let sc = 0;sc < rx; sc++) {
275990
- if (grid[r * ry + sr][c * rx + sc] >= FILL)
275991
- mask |= 1 << sr * rx + sc;
275992
- }
275993
- }
275994
- const glyph = table[mask];
275995
- if (glyph === " ")
275996
- row += " ";
275997
- else if (mask === full && color)
275998
- row += bg(" ");
275999
- else
276000
- row += fg(glyph);
276001
- }
276002
- out.push(row);
276003
- }
276004
- return out;
276005
- }
276006
-
276007
275894
  // src/cli/commands/code/paste.ts
276008
275895
  import { PassThrough as PassThrough3 } from "node:stream";
276009
275896
  var START = "\x1B[200~";
@@ -276503,11 +276390,43 @@ function SessionView({ engine, footer, subscribe }) {
276503
276390
  ]
276504
276391
  }, undefined, true, undefined, this);
276505
276392
  }
276393
+ var LOGO_ROWS = 6;
276394
+ var LOGO_GAP_SUBROW = 8;
276395
+ var QUAD = " ▘▝▀▖▌▞▛▗▚▐▜▄▙▟█";
276396
+ function buildLogoRows() {
276397
+ const sy = 2 * LOGO_ROWS;
276398
+ const sx = 2 * sy;
276399
+ const cx = (sx - 1) / 2;
276400
+ const cy = (sy - 1) / 2;
276401
+ const rad = sy / 2 - 0.5;
276402
+ const on = (px, py) => {
276403
+ if (py === LOGO_GAP_SUBROW)
276404
+ return false;
276405
+ const dx = (px - cx) * 0.5;
276406
+ const dy = py - cy;
276407
+ return dx * dx + dy * dy <= rad * rad;
276408
+ };
276409
+ const rows = [];
276410
+ for (let ty = 0;ty < sy; ty += 2) {
276411
+ let row = "";
276412
+ for (let tx = 0;tx < sx; tx += 2) {
276413
+ const bits = (on(tx, ty) ? 1 : 0) | (on(tx + 1, ty) ? 2 : 0) | (on(tx, ty + 1) ? 4 : 0) | (on(tx + 1, ty + 1) ? 8 : 0);
276414
+ row += QUAD[bits];
276415
+ }
276416
+ rows.push(row.trim());
276417
+ }
276418
+ return rows.map((row) => row.trim());
276419
+ }
276506
276420
  function renderHeader(who, mode) {
276507
276421
  const orange = source_default.hex(BRAND_ORANGE);
276508
276422
  const cwd = process.cwd().replace(process.env.HOME ?? "", "~");
276509
- const logo = logoRows(BRAND_ORANGE);
276510
- const logoW = LOGO_COLS;
276423
+ const logo = buildLogoRows();
276424
+ const logoW = Math.max(...logo.map((r) => r.length));
276425
+ const center = (s) => {
276426
+ const total = Math.max(0, logoW - s.length);
276427
+ const left = Math.floor(total / 2);
276428
+ return " ".repeat(left) + s + " ".repeat(total - left);
276429
+ };
276511
276430
  const text = [
276512
276431
  `${orange.bold("Base44 Code")} ${source_default.dim(`v${package_default.version}`)}`,
276513
276432
  source_default.bold(who ? `Welcome back, ${who}!` : "Welcome!"),
@@ -276519,7 +276438,7 @@ function renderHeader(who, mode) {
276519
276438
  const textTop = Math.max(0, Math.floor((logo.length - text.length) / 2));
276520
276439
  const out = [];
276521
276440
  for (let i = 0;i < height; i++) {
276522
- const left = i < logo.length ? logo[i] : " ".repeat(logoW);
276441
+ const left = i < logo.length ? orange(center(logo[i])) : " ".repeat(logoW);
276523
276442
  const right = text[i - textTop] ?? "";
276524
276443
  out.push(` ${left} ${right}`.trimEnd());
276525
276444
  }
@@ -288467,4 +288386,4 @@ export {
288467
288386
  runCLI
288468
288387
  };
288469
288388
 
288470
- //# debugId=C14BEE0A94355AC364756E2164756E21
288389
+ //# debugId=DDB3983E5E326EC264756E2164756E21