synthesisui 0.16.233 → 0.16.234

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.
@@ -53,9 +53,9 @@ export async function use(slug, intent, opts) {
53
53
  const hasDoctrine = await exists(join(slugDir, "doctrine.json"));
54
54
  const readFirst = [
55
55
  hasDoctrine
56
- ? "- Call `system_doctrine` first — this system's rules and philosophy, pinned to the installed version; obey them above everything else. Without MCP, the same data is `doctrine.json` and the `philosophy` of `design-system.json`"
56
+ ? "- Call `system_doctrine` first - this system's rules and philosophy, pinned to the installed version; obey them above everything else. Without MCP, the same data is `doctrine.json` and the `philosophy` of `design-system.json`"
57
57
  : "",
58
- `- ${base}/v${version}/GUIDE.md — how to apply the system, the recipes and the token vocabulary`,
58
+ `- ${base}/v${version}/GUIDE.md - how to apply the system, the recipes and the token vocabulary`,
59
59
  ].filter(Boolean);
60
60
  // The styling contract differs by target: Next projects in this product use
61
61
  // Tailwind v4 backed by the DS; the "general" target is framework-agnostic CSS.
@@ -1,5 +1,6 @@
1
1
  import { appendFile, readFile, stat, writeFile } from "node:fs/promises";
2
2
  import { join } from "node:path";
3
+ import { nameToWrite } from "./scan.js";
3
4
  /**
4
5
  * THE LAYER THAT REMEMBERS - governance that cannot answer "is it getting
5
6
  * better?" is a sequence of moments, not a system.
@@ -43,13 +44,23 @@ const MATCHED_CAP = 300;
43
44
  * `Diagnosis` mora em `scan.ts`, e importar de lá para cá fecharia um ciclo.
44
45
  */
45
46
  export function suggestionsFrom(repeats) {
47
+ /**
48
+ * O FILTRO É "TEM NOME", e não "tem nome NOSSO" - senão a contagem do outro lado mente.
49
+ *
50
+ * A versão anterior exigia `r.token`, então as 23 sugestões que só o vocabulário DELE nomeia nunca
51
+ * saíam do repositório: a plataforma achava que 59 ofertas foram feitas onde foram 82. Para COR não
52
+ * há julgamento a perder (um hex numa posição de cor não tem ambiguidade de família), mas "0 de 843
53
+ * erradas" é um fato, e não ter o número é diferente de o número ser zero.
54
+ */
46
55
  return repeats
47
- .filter((r) => Boolean(r.token))
56
+ .filter((r) => Boolean(nameToWrite(r)))
48
57
  .slice(0, MATCHED_CAP)
49
58
  .map((r) => ({
50
59
  literal: r.literal,
51
60
  kind: r.kind,
52
61
  token: r.token,
62
+ /** Não-nulo por construção: o filtro acima só deixa passar quem tem nome. */
63
+ shown: nameToWrite(r),
53
64
  count: r.count,
54
65
  }));
55
66
  }
@@ -1,4 +1,4 @@
1
- import { DS_FAMILY, familySays, normalizeValue, } from "./tokens.js";
1
+ import { FAMILY_PREFIX, familySays, normalizeValue, } from "./tokens.js";
2
2
  /**
3
3
  * COMO ELE CHAMA O VALOR - para a gente parar de renomear as variáveis dele.
4
4
  *
@@ -116,7 +116,7 @@ export function theirNames(ours, theirs) {
116
116
  const head = segments(name)[0] ?? "";
117
117
  convention.set(head, (convention.get(head) ?? 0) + 1);
118
118
  }
119
- for (const [kind, prefix] of Object.entries(DS_FAMILY)) {
119
+ for (const [kind, prefix] of Object.entries(FAMILY_PREFIX)) {
120
120
  for (const [name, raw] of ours.byName) {
121
121
  if (!name.startsWith(prefix))
122
122
  continue;
@@ -506,7 +506,15 @@ export function nearestToken(table, literal) {
506
506
  */
507
507
  /** Exportado para `their-names.ts`, que precisa da MESMA divisão de família para validar a natureza
508
508
  * de um nome dele - duas tabelas de família seriam duas leis. */
509
- export const DS_FAMILY = {
509
+ /**
510
+ * O ESPELHO de `FAMILY_PREFIX` e `FAMILY_WORDS` em `libs/ds-contracts/src/token-ref.ts`.
511
+ *
512
+ * O CLI é publicado standalone (`dependencies: {}`) e não pode importar os contratos, então as duas
513
+ * cópias são inevitáveis - `family-vocabulary.spec.ts` compara as duas com o arquivo do contrato, como
514
+ * o gêmeo do `frontier-kind` já faz. O nome é o MESMO dos dois lados de propósito: `DS_FAMILY` aqui e
515
+ * `FAMILY` lá era a mesma tabela com dois nomes, e ninguém que lesse um dos dois saberia do outro.
516
+ */
517
+ export const FAMILY_PREFIX = {
510
518
  color: "--ds-color-",
511
519
  radius: "--ds-radius-",
512
520
  spacing: "--ds-spacing-",
@@ -576,7 +584,7 @@ export function tokenMatch(table, literal, kind) {
576
584
  const hit = table.byValue.get(normalizeValue(literal, table.rootPx));
577
585
  if (!hit || hit.length === 0)
578
586
  return null;
579
- const prefix = kind ? DS_FAMILY[kind] : undefined;
587
+ const prefix = kind ? FAMILY_PREFIX[kind] : undefined;
580
588
  const family = prefix ? hit.filter((n) => n.startsWith(prefix)) : [];
581
589
  const pool = family.length > 0 ? family : hit;
582
590
  // Semantic roles name intent; primitives name a shelf. Prefer intent.
package/dist/last-sync.js CHANGED
@@ -124,7 +124,7 @@ export function describeDelta(now, before) {
124
124
  ? `, and the reader moved ${before.cli} → ${now.cli}, so some of this is us reading better rather than your code changing`
125
125
  : "";
126
126
  if (parts.length > 0)
127
- return `${parts.join(" · ")} — since your last sync${when ? `, ${when}` : ""}${reader}`;
127
+ return `${parts.join(" · ")} - since your last sync${when ? `, ${when}` : ""}${reader}`;
128
128
  /**
129
129
  * NADA MUDOU É DIFERENTE DE NÃO DÁ PARA SABER. Um carimbo de uma versão anterior a esta não tem
130
130
  * as impressões, então afirmar que nada mudou seria afirmar sobre o que não foi medido - e é
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synthesisui",
3
- "version": "0.16.233",
3
+ "version": "0.16.234",
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": {