synthesisui 0.16.364 → 0.16.365

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.
@@ -0,0 +1,42 @@
1
+ /**
2
+ * A NOTA DO SISTEMA DELE E AS TRÊS LENTES QUE A COMPÕEM, no fim de um import.
3
+ *
4
+ * O QUE O CLIENTE GANHA: ele fecha o import sabendo em que pé o sistema dele nasceu - a nota, e as
5
+ * três lentes que dizem POR QUE ela é aquela - sem abrir o navegador. Quem apaga e recria um
6
+ * sistema para comparar antes e depois tinha de abrir a tela ou rodar um script sobre o banco, e o
7
+ * número que mais interessa naquele momento é exatamente esse.
8
+ *
9
+ * OS NÚMEROS SÃO IMPRESSOS, NUNCA COMPOSTOS - e a razão foi medida duas vezes em 24/08, quando o
10
+ * resumo escrito pelo agente derrubou justamente a metade que tinha acabado de entrar. Este módulo
11
+ * não calcula nada: ele formata o que o servidor devolveu, pela mesma função que desenha a tela
12
+ * pós-import. Um número calculado em dois lugares tem duas chances de discordar de si mesmo.
13
+ *
14
+ * E TODA LINHA CARREGA O SEU DENOMINADOR. "Token Discipline 62" sozinho não é auditável; "62, on 41
15
+ * of your 62 components" é - e é a mesma frase que a tela mostra embaixo de cada barra.
16
+ */
17
+ import { body, bodyWrapped, paint } from "./output.js";
18
+ /**
19
+ * AS LINHAS DO BLOCO, ou vazio quando não há nota para dar.
20
+ *
21
+ * Vazio e não uma linha vazia: quem chama decide se imprime o título, e um bloco com cabeçalho e
22
+ * nada embaixo é pior que bloco nenhum.
23
+ */
24
+ export function craftLines(craft) {
25
+ if (!craft)
26
+ return [];
27
+ if (craft.score === null) {
28
+ return bodyWrapped("No component of yours was read yet, so there is no line to draw. Your tokens came through - the components are next.").map(body);
29
+ }
30
+ const lines = [
31
+ body(`${paint.strong(`${craft.score}/100`)} on your ${craft.authored} component${craft.authored === 1 ? "" : "s"} - never on our kit, never on a demo.`),
32
+ ];
33
+ /**
34
+ * OS RÓTULOS ALINHADOS PELO MAIS LONGO, e a largura é medida e não estimada: os nomes chegam do
35
+ * servidor, então um padding fixo desalinharia no dia em que uma lente for renomeada lá.
36
+ */
37
+ const width = Math.max(...craft.lenses.map((l) => l.label.length));
38
+ for (const lens of craft.lenses) {
39
+ lines.push(body(` ${lens.label.padEnd(width)} ${paint.strong(String(lens.score).padStart(3))} ${paint.dim(`on ${lens.measuredOn} of them`)}`));
40
+ }
41
+ return lines;
42
+ }
@@ -3,6 +3,7 @@ import { basename, dirname, join, relative, resolve, sep } from "node:path";
3
3
  import { anatomyFromSketch } from "../anatomy-from-sketch.js";
4
4
  import { applyAnatomyPatch, hasEdits, } from "../anatomy-patch.js";
5
5
  import { resolveAnatomy, resolveFlatParts, safePartName, } from "../anatomy-read.js";
6
+ import { craftLines } from "../baseline-craft.js";
6
7
  import { PAGES_MAX, pageCompositionOf } from "../census-pages.js";
7
8
  import { readCredentials, readToken, resolveRegistry, sameRegistry, } from "../config.js";
8
9
  import { declaredElsewhere } from "../declared-elsewhere.js";
@@ -4524,6 +4525,22 @@ export async function runImport(opts) {
4524
4525
  console.log(body(paint.dim(`In the group ${payload.group}.`)));
4525
4526
  for (const note of payload?.notes ?? [])
4526
4527
  console.log(body(paint.dim(note)));
4528
+ /**
4529
+ * A NOTA COM QUE O SISTEMA DELE NASCEU, e as três lentes - ver `baseline-craft.ts`.
4530
+ *
4531
+ * AQUI E NÃO DEPOIS DO v2, porque o v2 argumenta com estes mesmos números: uma proposta que
4532
+ * promete melhorar a disciplina de token precisa que a disciplina de hoje já esteja na tela.
4533
+ * É a ordem que a tela pós-import usa, e ela é deliberada lá pelo mesmo motivo.
4534
+ *
4535
+ * O bloco cala sozinho quando não há nota - servidor anterior a esta versão, ou análise que não
4536
+ * pôde rodar. Um cabeçalho sem número embaixo seria pior que o silêncio.
4537
+ */
4538
+ const craft = craftLines(payload?.quality);
4539
+ if (craft.length > 0) {
4540
+ console.log(section("The line your system starts on"));
4541
+ for (const line of craft)
4542
+ console.log(line);
4543
+ }
4527
4544
  // What a v2 would be worth, in their own values. Said here because this is
4528
4545
  // where the person is standing, and because a number they can check beats an
4529
4546
  // invitation they have to trust.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synthesisui",
3
- "version": "0.16.364",
3
+ "version": "0.16.365",
4
4
  "description": "Bring SynthesisUI design systems into any project - tokens, typed components, whole pages and an agent-ready CLAUDE.md manifest.",
5
5
  "type": "module",
6
6
  "bin": {