synthesisui 0.16.208 → 0.16.210
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/doctor/fragments.js
CHANGED
|
@@ -262,6 +262,26 @@ kind) {
|
|
|
262
262
|
*/
|
|
263
263
|
export function judgeFragments(seen, declared, admitted) {
|
|
264
264
|
return seen.map((f) => {
|
|
265
|
+
/**
|
|
266
|
+
* UMA DECLARAÇÃO SEM LEITOR CUJO VALOR É UM TOKEN QUE ELES JÁ DECLARAM.
|
|
267
|
+
*
|
|
268
|
+
* `h1 { font-size: var(--text-h1) }` num CSS global não tem leitor, e a frase que ia junto -
|
|
269
|
+
* *"os estilos que ela carrega não chegam a receita nenhuma"* - é falsa: `--text-h1` está
|
|
270
|
+
* declarado, capturado, e vale 2rem no sistema dele. O que não foi capturado é a LIGAÇÃO, qual
|
|
271
|
+
* elemento veste qual token.
|
|
272
|
+
*
|
|
273
|
+
* Medido em 11/08 na base tipográfica dele: das 13 declarações do `src/styles.css` arquivadas
|
|
274
|
+
* como sem leitor, SETE são desta forma - `--font-sans` (3x), `--text-h1`, `--text-h2`,
|
|
275
|
+
* `--text-h3` e `--color-blue-600`. Nenhuma delas carrega um valor que o sistema não tenha.
|
|
276
|
+
*
|
|
277
|
+
* A referência precisa apontar para algo DECLARADO. Um `var(--nao-existe)` continua sendo o que
|
|
278
|
+
* era: o browser descarta a declaração, e ali não há token nenhum a reivindicar.
|
|
279
|
+
*/
|
|
280
|
+
if (f.reason === "shape-not-read") {
|
|
281
|
+
const ref = /:\s*var\(\s*(--[a-z0-9-]+)/i.exec(f.text);
|
|
282
|
+
if (ref && declared.has(ref[1]))
|
|
283
|
+
return { ...f, reason: "binding-not-read" };
|
|
284
|
+
}
|
|
265
285
|
if (f.reason)
|
|
266
286
|
return f;
|
|
267
287
|
switch (f.shape) {
|
|
@@ -46,6 +46,11 @@ const OWNER = {
|
|
|
46
46
|
function verdictOf(reason) {
|
|
47
47
|
switch (reason) {
|
|
48
48
|
case "shape-not-read":
|
|
49
|
+
/**
|
|
50
|
+
* A LIGAÇÃO TAMBÉM É TRABALHO DE LEITOR - o que muda é a frase, não o veredito. O valor já
|
|
51
|
+
* está no sistema; o que falta é um leitor que registre qual elemento veste qual token.
|
|
52
|
+
*/
|
|
53
|
+
case "binding-not-read":
|
|
49
54
|
return "no-reader";
|
|
50
55
|
case "value-not-read":
|
|
51
56
|
return "value-gap";
|
|
@@ -50,12 +50,32 @@ const SHAPE_LABEL = {
|
|
|
50
50
|
styled: "styled-components",
|
|
51
51
|
runtime: "classes built at runtime",
|
|
52
52
|
};
|
|
53
|
+
/**
|
|
54
|
+
* OS MOTIVOS QUE UM LEITOR NOVO ALCANÇA - e por isso os fragmentos deles viajam com o TEXTO.
|
|
55
|
+
*
|
|
56
|
+
* CONJUNTO NOMEADO, e não uma comparação com um literal, porque a comparação já falhou. Isto era
|
|
57
|
+
* `reason === "shape-not-read"`, e em 0.16.209 aquele motivo foi DIVIDIDO em dois: as sete
|
|
58
|
+
* declarações da base tipográfica do repo do dono viraram `binding-not-read` e saíram, caladas, do
|
|
59
|
+
* único lugar que carrega o texto delas. A tela então mostrava UM exemplo de sete, embaixo de um
|
|
60
|
+
* prompt que promete *"the detail page carries each fragment with its file, its line AND the text"*
|
|
61
|
+
* (dono, 11/08).
|
|
62
|
+
*
|
|
63
|
+
* O que o texto compra: um leitor novo roda no servidor sobre o censo já guardado, e o conserto vira
|
|
64
|
+
* um deploy em vez de esperar aquele repositório publicar um CLI novo e re-medir.
|
|
65
|
+
*
|
|
66
|
+
* Um motivo novo que um leitor alcance entra AQUI. Fora daqui ele vira contagem sem lugar.
|
|
67
|
+
*/
|
|
68
|
+
const A_READER_REACHES = new Set([
|
|
69
|
+
"shape-not-read",
|
|
70
|
+
"binding-not-read",
|
|
71
|
+
]);
|
|
53
72
|
const BECAUSE = {
|
|
54
73
|
"shape-not-read": "no reader in this version understands this shape, so the styles it holds reach no recipe",
|
|
55
74
|
"value-not-read": "the shape is read and this value is not - a utility or property outside the scales this project declares",
|
|
56
75
|
computed: "the value is assembled at render time, so it is not in the source at any level and there is nothing to read",
|
|
57
76
|
"component-not-admitted": "read, and it belongs to a component this scope does not admit into the system - the styles exist and no recipe claims them",
|
|
58
77
|
"sheet-not-imported": "this is a sass partial and no stylesheet imports it, so your own build never compiles it - it paints nothing today, here or anywhere",
|
|
78
|
+
"binding-not-read": "the value here is a token your system already declares, so nothing is lost - what is not captured is which element wears it",
|
|
59
79
|
};
|
|
60
80
|
/**
|
|
61
81
|
* O ledger de uma varredura, a partir dos fragmentos vistos.
|
|
@@ -96,13 +116,11 @@ export function buildLedger(cli, seen) {
|
|
|
96
116
|
text: f.text.replace(/\s+/g, " ").trim().slice(0, 160),
|
|
97
117
|
});
|
|
98
118
|
/**
|
|
99
|
-
* SÓ
|
|
119
|
+
* SÓ O QUE UM LEITOR ALCANÇA, E SÓ TEXTO DISTINTO - as duas restrições vieram de medir.
|
|
100
120
|
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* Sobra `shape-not-read`: "nenhum leitor desta versão entende esta forma", que é exatamente a
|
|
105
|
-
* frase que um leitor novo responde.
|
|
121
|
+
* `value-not-read` diz que a forma FOI lida e o valor está fora das escalas deles - texto não
|
|
122
|
+
* ensina nada a leitor nenhum. `computed` é montado em runtime e não existe na fonte.
|
|
123
|
+
* `component-not-admitted` é o portão, não a leitura. Sobram os dois de `A_READER_REACHES`.
|
|
106
124
|
*
|
|
107
125
|
* E TEXTO DISTINTO, porque a primeira versão disto reprovou no spec do repo vivo: guardar todo
|
|
108
126
|
* fragmento deu 723 215 bytes no dashboard dele, contra um teto de 65 536. Oito mil cópias da
|
|
@@ -111,7 +129,7 @@ export function buildLedger(cli, seen) {
|
|
|
111
129
|
* O teto de 512 é declarado e não mudo: `uses` continua contando tudo, então a diferença entre o
|
|
112
130
|
* contado e o que viajou é visível em vez de silenciosa.
|
|
113
131
|
*/
|
|
114
|
-
if (reason
|
|
132
|
+
if (A_READER_REACHES.has(reason) &&
|
|
115
133
|
group.unreadable.length < 512 &&
|
|
116
134
|
!group.unreadable.some((u) => u.text === f.text))
|
|
117
135
|
group.unreadable.push({
|
package/dist/install-marks.js
CHANGED
|
@@ -93,7 +93,11 @@ export const CHECKER_SINCE = "0.16.202";
|
|
|
93
93
|
* 0.16.208 `readInlineStyle` parou de descartar valor com parêntese - `var()` e
|
|
94
94
|
* `linear-gradient()` em `style={{}}` chegam na receita, e 2 dos 6 fragmentos
|
|
95
95
|
* chamados de `computed` eram literais no fonte
|
|
96
|
+
* 0.16.209 uma declaração global cujo valor é token JÁ declarado deixou de ser arquivada
|
|
97
|
+
* como "nenhum leitor entende esta forma" - 7 das 13 da base tipográfica dele
|
|
98
|
+
* 0.16.210 e essas 7 voltaram a viajar com o TEXTO: o array `unreadable` era preenchido por
|
|
99
|
+
* comparação com UM literal, e a divisão do motivo as tirou dele em silêncio
|
|
96
100
|
*
|
|
97
101
|
* Um censo medido antes disto carrega as duas leituras erradas.
|
|
98
102
|
*/
|
|
99
|
-
export const READER_SINCE = "0.16.
|
|
103
|
+
export const READER_SINCE = "0.16.210";
|
package/package.json
CHANGED