synthesisui 0.16.320 → 0.16.321

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.
@@ -20,6 +20,7 @@
20
20
  * What is left for a person to judge after this is short and named: which grey is the page,
21
21
  * what the product IS, and the anatomy of each component. Those are readings, not counts.
22
22
  */
23
+ import { lightness } from "./color-distance.js";
23
24
  /** A dark utility in a class name: `dark:bg-x`, and the `dark:` inside a longer chain. */
24
25
  const DARK_UTILITY = /(?:^|["'\s:])dark:/g;
25
26
  /** How a project says which theme is on. Ordered: the first hit is the one it uses. */
@@ -130,7 +131,24 @@ from) {
130
131
  * the strongest of the three page signals and the one a class sweep never finds.
131
132
  */
132
133
  for (const m of source.matchAll(/(?:^|\})\s*(?:html|body|:root)[^{]*\{[^}]*?background(?:-color)?\s*:\s*([^;}]+)/g)) {
133
- addPagePaint(into, m[1].trim(), "light", "global-css");
134
+ const value = m[1].trim();
135
+ /**
136
+ * A FACE VEM DO VALOR, e por muito tempo vinha de um literal.
137
+ *
138
+ * Esta linha carimbava `light` em toda regra `body { background: … }` sem olhar a cor - e é o
139
+ * sinal MAIS FORTE dos três (`global-css` vence `main-or-body` e `viewport-container` em
140
+ * `describeSignals`), então o mais forte era o único que não media nada. Um produto quase
141
+ * preto entrava na medição como página clara.
142
+ *
143
+ * A régua é a que o resto do CLI já usa para separar claro de escuro (`defaultScheme`), e
144
+ * nenhum limiar novo entra aqui. `lightness` devolve `null` para o que ela não consegue ler -
145
+ * `var(…)`, gradiente, `transparent` - e aí o registro NÃO É EMITIDO: carimbar uma face para
146
+ * a lista não ficar vazia é converter "não sei" em certeza, que é o defeito de origem.
147
+ */
148
+ const L = lightness(value);
149
+ if (L == null)
150
+ continue;
151
+ addPagePaint(into, value, L < 0.5 ? "dark" : "light", "global-css");
134
152
  }
135
153
  return;
136
154
  }
@@ -329,8 +329,14 @@ export const CHECKER_SINCE = "0.16.308";
329
329
  * os tokens que o dono já respondeu chegam pela rota `reading` do sync e um token que seria
330
330
  * `unread` conta como respondido. Um censo medido antes diz `answered: 0` para um projeto com
331
331
  * respostas gravadas; quem remede vê "N answered by you" no gaps e no painel.
332
+ *
333
+ * 0.16.315 -> 0.16.321 em 27/08: o fundo da página em CSS global passa a ser lido pelo VALOR. A
334
+ * linha carimbava `light` em toda regra `body { background: … }` sem olhar a cor, e é o sinal mais
335
+ * forte dos três - um produto quase preto entrava na medição como página clara. O que não dá para
336
+ * avaliar (`var(…)`, gradiente) deixa de ser emitido em vez de virar uma face. Isso muda a
337
+ * EVIDÊNCIA que o relatório de import entrega ao agente, e é sobre ela que a face é julgada.
332
338
  */
333
- export const READER_SINCE = "0.16.315";
339
+ export const READER_SINCE = "0.16.321";
334
340
  /**
335
341
  * O QUE ESTÁ INSTALADO AQUI FICOU PARA TRÁS - e as DUAS condições que fazem isso ser verdade.
336
342
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synthesisui",
3
- "version": "0.16.320",
3
+ "version": "0.16.321",
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": {