synthesisui 0.16.466 → 0.16.467

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.
@@ -1,3 +1,4 @@
1
+ import { neverMeasured } from "../never-measured.js";
1
2
  import { access, mkdir, readFile, rm, writeFile } from "node:fs/promises";
2
3
  import { join } from "node:path";
3
4
  import { agentsToMaintain } from "../agents-chosen.js";
@@ -347,7 +348,11 @@ export async function add(slug, opts) {
347
348
  registry: base,
348
349
  ...(opts.cli ? { cli: opts.cli } : {}),
349
350
  /** O que o `sync` aprendeu sobre a leitura não se perde no próximo `connect` (27/09). */
350
- ...(prev?.reading === "none" ? { reading: "none" } : {}),
351
+ /**
352
+ * E O SISTEMA QUE NUNCA FOI MEDIDO NUM CÓDIGO já nasce assim - ver `neverMeasured` (rodada 5, 27/09):
353
+ * o fork do leigo-5 terminava o `connect` mandando rodar `sync` para uma pasta que não existe.
354
+ */
355
+ ...(prev?.reading === "none" || neverMeasured(payload.document) ? { reading: "none" } : {}),
351
356
  /** Ver `RegistryPayload.compiler`: é o que faz um conserto de CSS chegar a um install. */
352
357
  ...(payload.compiler != null ? { compiler: payload.compiler } : {}),
353
358
  ...(payload.rulesStamp ? { rules: payload.rulesStamp } : {}),
@@ -586,7 +591,7 @@ export async function add(slug, opts) {
586
591
  * A linha diz quantos utilitários do Tailwind ficaram apontando para a decisão dele e quantos
587
592
  * saíram por serem nossos, com os primeiros nomes. Quem lê pode discordar de qualquer um.
588
593
  */
589
- if (aligned.dropped.length > 0 || aligned.own.length > 0) {
594
+ if (!opts.themeFollows && (aligned.dropped.length > 0 || aligned.own.length > 0)) {
590
595
  console.log(line(
591
596
  /**
592
597
  * A LINHA DIZ QUE FICARAM DE FORA - e nao AFIRMA por que, porque ela nao sabe.
@@ -528,6 +528,21 @@ round) {
528
528
  * pelo nome é o que transforma uma perda silenciosa numa lacuna declarada (lei 8).
529
529
  */
530
530
  const rest = changed.slice(AT_MOST);
531
+ /**
532
+ * NO FIM DO TURNO, O REGISTRO É DO TURNO INTEIRO - rodada 5 do refinamento, 27/09.
533
+ *
534
+ * O relatório para em três, e a linha do ledger só nascia dentro dele: o agente do leigo-5 escreveu
535
+ * sete arquivos do dashboard num turno, o ledger ficou com três linhas `hook` e o envio com
536
+ * `count: 3`. O `connect` promete "every file (...) is checked at the end of each agent turn", e o
537
+ * painel contava três. Os demais agora são checados e registrados em silêncio; o texto continua em
538
+ * três, com o resto pelo nome logo abaixo.
539
+ *
540
+ * Só no turno: um comando de shell continua como era, porque ali o corte existe para um `git
541
+ * checkout` que muda a árvore inteira não virar trinta checagens a cada comando.
542
+ */
543
+ if (round === "turn")
544
+ for (const { rel } of rest.slice(0, REFUSAL_CEILING))
545
+ await report(root, join(root, rel), mode).catch(() => null);
531
546
  /**
532
547
  * E EM CONSUMIR, O TETO DO RELATÓRIO NÃO É O TETO DA RECUSA - achado da revisão de QA no fecho,
533
548
  * e ele falsificava a invariante inteira.
@@ -168,6 +168,7 @@ export async function init(opts) {
168
168
  registry: opts.registry,
169
169
  dir: root,
170
170
  setupHints: false,
171
+ ...(major !== null && major >= 4 ? { themeFollows: true } : {}),
171
172
  ...(opts.cli ? { cli: opts.cli } : {}),
172
173
  });
173
174
  /**
@@ -672,9 +672,22 @@ const preferFor = (prop) => (prop.startsWith("border") ? "border" : null);
672
672
  const namedInside = (prop, value, themeVars) => {
673
673
  if (themeVars === null)
674
674
  return value;
675
- return value.replace(/\{color\.[a-zA-Z0-9.-]+\}/g, (ref) => {
675
+ return value
676
+ .replace(/\{color\.[a-zA-Z0-9.-]+\}/g, (ref) => {
676
677
  const key = theirColorKey(ref, themeVars, preferFor(prop));
677
678
  return key ? `var(--color-${key})` : ref;
679
+ })
680
+ /**
681
+ * E A CURVA - rodada 5, 27/09: o `card` do Zephyr saía com `cubic-bezier(0.2, 0.7, 0.2, 1)` escrito
682
+ * dentro da `transition`, com `--ease-lumina` declarado pelo `init`. Mesma regra: o nome dele vale
683
+ * quando o valor bate.
684
+ */
685
+ .replace(/\{motion\.easings\.([a-zA-Z0-9-]+)\}/g, (ref, name) => {
686
+ const key = kebab(name);
687
+ const ok = themeVars instanceof ThemeVocab
688
+ ? themeVars.nameFor(ref, "ease", key) === key
689
+ : minted(themeVars, `--ease-${key}`);
690
+ return ok ? `var(--ease-${key})` : ref;
678
691
  });
679
692
  };
680
693
  /** One declaration → Tailwind classes (pretty when mappable, arbitrary-property
package/dist/guide.js CHANGED
@@ -461,7 +461,17 @@ ${depLines.join("\n")}
461
461
  Object.keys(foundations.color.semanticAlt).length > 0;
462
462
  const altScheme = meta.scheme === "light" ? "dark" : "light";
463
463
  const hasTailwind = "theme.css" in payload.artifacts;
464
- const hasParts = Object.values(components).some((r) => r.parts && Object.keys(r.parts).length > 0);
464
+ /**
465
+ * O EXEMPLO DE PEÇA COM PARTES SAI DE UMA QUE O SISTEMA TEM - rodada 5, 27/09. Era sempre uma tabela
466
+ * (`.ds-table`, `.ds-table-head`…), bastando QUALQUER peça ter partes: o Zephyr tem `streak`, `xp-bar` e
467
+ * `join-field`, nenhuma tabela, e o agente dele foi procurar classes que não existem. A tabela só é o
468
+ * exemplo quando o sistema a tem.
469
+ */
470
+ const withParts = Object.entries(components).filter(([, r]) => r.parts && Object.keys(r.parts).length > 0);
471
+ const picked = withParts.find(([n]) => n === "table") ?? withParts[0];
472
+ const multiPart = picked
473
+ ? { name: kebab(picked[0]), parts: Object.keys(picked[1].parts ?? {}).map(kebab) }
474
+ : null;
465
475
  const componentLines = Object.entries(components).map(([cname, recipe]) => componentEntry(cname, recipe));
466
476
  /**
467
477
  * O CORTE SÓ ACONTECE QUANDO ELE DE FATO CORTA - e este é o único jeito honesto de prometê-lo.
@@ -739,26 +749,15 @@ The system defines the scale; these are sensible defaults for spending it:
739
749
  - **Section gaps:** \`lg\` (or the nearest large step). **Card/panel padding:** \`md\`.
740
750
  - **Field / tight gaps:** \`2xs\`/\`3xs\`.
741
751
  - The system imposes no content max-width - cap long-form/text columns yourself for readability.
742
- ${hasParts
752
+ ${multiPart
743
753
  ? `
744
754
  ### Multi-part components
745
755
  Components that have **parts** compile to \`.ds-<name>-<part>\` classes you nest yourself; the exact
746
- part classes and their \`data-*\` are listed per component below. Example - a table:
756
+ part classes and their \`data-*\` are listed per component below. Example - ${multiPart.name}:
747
757
  \`\`\`tsx
748
- <table className="ds-table">
749
- <thead className="ds-table-head">
750
- <tr>
751
- <th className="ds-table-cell-head">Name</th>
752
- <th className="ds-table-cell-head" data-align="end">Updated</th>
753
- </tr>
754
- </thead>
755
- <tbody>
756
- <tr className="ds-table-row">
757
- <td className="ds-table-cell">Halogen</td>
758
- <td className="ds-table-cell" data-align="end">2h ago</td>
759
- </tr>
760
- </tbody>
761
- </table>
758
+ <div className="ds-${multiPart.name}">
759
+ ${multiPart.parts.map((p) => ` <div className="ds-${multiPart.name}-${p}">…</div>`).join("\n")}
760
+ </div>
762
761
  \`\`\`
763
762
  `
764
763
  : ""}
@@ -275,7 +275,13 @@
275
275
  * `--color-accent` e `--color-primary` declarados - e a desempatar pela palavra da propriedade numa borda
276
276
  * (rodada 4 do refinamento).
277
277
  */
278
- export const MATERIALISER_SINCE = "0.16.464";
278
+ /**
279
+ * 0.16.464 -> 0.16.467 em 27/09, e o passo 1 dá **SIM**: o gerador que o `upgrade` usa passa a escrever a
280
+ * curva de uma `transition` pelo nome dele (`var(--ease-lumina)`), o `GUIDE.md` deixa de ensinar uma tabela
281
+ * que o sistema não tem, e o `.lock` de um sistema nunca medido num código nasce com `reading: "none"` -
282
+ * rodada 5 do refinamento. Uma pasta escrita antes ensina `.ds-table` ao agente.
283
+ */
284
+ export const MATERIALISER_SINCE = "0.16.467";
279
285
  /**
280
286
  * A ÚLTIMA VERSÃO EM QUE O QUE O HOOK RODA MUDOU.
281
287
  *
@@ -437,7 +443,12 @@ export const COUNTED_DIFFERENTLY = "this run counts a value as named only when Y
437
443
  * rodada 3 do refinamento: o dashboard do leigo-3 inteiro nunca foi checado. Um hook anterior segue calado
438
444
  * nos dois casos.
439
445
  */
440
- export const CHECKER_SINCE = "0.16.463";
446
+ /**
447
+ * 0.16.463 -> 0.16.467 em 27/09, e o passo 1 dá **SIM**: o fim do turno passa a registrar no ledger TODOS os
448
+ * arquivos do turno, e não só os três que relata - rodada 5: o leigo-5 escreveu sete e o painel recebeu
449
+ * três. Um hook anterior segue mandando ao painel um turno pela metade.
450
+ */
451
+ export const CHECKER_SINCE = "0.16.467";
441
452
  /**
442
453
  * A ÚLTIMA VERSÃO EM QUE OS LEITORES PASSARAM A PRODUZIR UM CENSO DIFERENTE.
443
454
  *
@@ -0,0 +1,21 @@
1
+ /**
2
+ * O SISTEMA NUNCA FOI MEDIDO NUM CÓDIGO - rodada 5 do refinamento, 27/09.
3
+ *
4
+ * O `connect` do leigo-5 terminou com "Still out of alignment: \"zephyr\" does not record where it was
5
+ * measured (...) npx synthesisui sync". O aviso só se calava com `reading: "none"` no `.lock`, e isso só
6
+ * era gravado depois de um `sync` que perguntava. Só que o documento já responde: cada fundação carrega
7
+ * quem a escreveu (`foundations.source`, os `FoundationAuthor` da plataforma), e num fork nascido na
8
+ * plataforma todas são `seed`. Não existe pasta de onde ele veio, e não há o que remedir.
9
+ *
10
+ * OS AUTORES QUE LERAM UM CÓDIGO são `import`, `sync`, `reground` e `reinterpret`. Um deles basta para o
11
+ * sistema ter origem num repositório, e aí a pergunta do `sync` continua valendo. Sem `source` nenhum, o
12
+ * documento não diz - e o silêncio não vira afirmação.
13
+ */
14
+ const FROM_CODE = new Set(["import", "sync", "reground", "reinterpret"]);
15
+ export function neverMeasured(doc) {
16
+ const source = doc?.foundations?.source;
17
+ if (!source || typeof source !== "object")
18
+ return false;
19
+ const authors = Object.values(source);
20
+ return authors.length > 0 && !authors.some((a) => FROM_CODE.has(String(a)));
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synthesisui",
3
- "version": "0.16.466",
3
+ "version": "0.16.467",
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": {