synthesisui 0.16.215 → 0.16.217
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/guide.js +68 -1
- package/dist/install-marks.js +12 -1
- package/package.json +1 -1
package/dist/guide.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { nextFontSnippet } from "./fonts.js";
|
|
2
2
|
import { animationShorthand, classifyKeyframe, describeKeyframe, isFullRotation, } from "./motion.js";
|
|
3
3
|
const kebab = (v) => v.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
4
|
+
/**
|
|
5
|
+
* O NOME CSS DE UMA PROPRIEDADE DO DOCUMENTO - e o hífen do prefixo de fornecedor faz parte dele.
|
|
6
|
+
*
|
|
7
|
+
* `WebkitFontSmoothing` é `-webkit-font-smoothing` no CSS, e sem o hífen inicial o agente copia uma
|
|
8
|
+
* propriedade que não existe. `kebab` sozinho começa a palavra em `webkit`.
|
|
9
|
+
*/
|
|
10
|
+
const cssProp = (v) => (/^[A-Z]/.test(v) ? "-" : "") + kebab(v);
|
|
4
11
|
const list = (items) => items.length ? items.map((i) => `\`${i}\``).join(", ") : "_(none)_";
|
|
5
12
|
const dataAttrs = (variants) => Object.entries(variants).map(([axis, opts]) => `data-${kebab(axis)}="${Object.keys(opts).join("|")}"`);
|
|
6
13
|
// Famílias genéricas do CSS - fallbacks, não webfonts a carregar.
|
|
@@ -375,6 +382,66 @@ ${depLines.join("\n")}
|
|
|
375
382
|
return `- ${usage} - ${INTENT_LINE[intent]} (${describeKeyframe(kf)})`;
|
|
376
383
|
});
|
|
377
384
|
const patternLines = Object.entries(motion.patterns ?? {}).map(([pname, p]) => `- **${pname}** (on ${p.trigger}): ${p.description}`);
|
|
385
|
+
/**
|
|
386
|
+
* O QUE ESTE SISTEMA AINDA NÃO DECIDIU - e o agente precisa saber ANTES de compor contra ele.
|
|
387
|
+
*
|
|
388
|
+
* Um valor cru que o código dele dá a um papel entra no sistema exato, num degrau colocado por
|
|
389
|
+
* proximidade na família dele. A cor está garantida; o NOME daquele degrau é uma decisão que
|
|
390
|
+
* ninguém tomou ainda. Sem esta seção o agente lê o degrau como vocabulário estabelecido e escreve
|
|
391
|
+
* o próximo componente contra ele - e o retrabalho, quando alguém decidir, é tudo que foi escrito
|
|
392
|
+
* nesse meio tempo.
|
|
393
|
+
*
|
|
394
|
+
* A prosa vem PRONTA do registry (ver `RegistryPayload.pending`): medir aqui seria uma segunda
|
|
395
|
+
* cópia da regra, do lado que não tem a procedência dos caminhos.
|
|
396
|
+
*/
|
|
397
|
+
/**
|
|
398
|
+
* A PÁGINA DELE, DITA AO AGENTE - e sem esta seção a adoção escrevia um registro que ninguém lia.
|
|
399
|
+
*
|
|
400
|
+
* O QUÊ: as regras de elemento da folha global dele que ele adotou no sistema - `body { margin: 0 }`,
|
|
401
|
+
* `a { text-decoration-line: underline }`, `h1 { font-size: {typography.scale.h1} }`.
|
|
402
|
+
*
|
|
403
|
+
* POR QUÊ: a oferta que as adota promete, com todas as letras, *"your agent stops guessing at the
|
|
404
|
+
* page"*. Elas viajam no `design-system.json` desde o primeiro dia e o GUIDE - o arquivo que o
|
|
405
|
+
* agente é MANDADO ler primeiro - nunca as mencionou. Seis regras adotadas no sistema real em
|
|
406
|
+
* 12/08, e nenhum agente do mundo as encontraria (medido no repo dele, no `v6/GUIDE.md`).
|
|
407
|
+
*
|
|
408
|
+
* O que ele ganha ao ler: a página já tem base, então o próximo componente não redecide `margin`,
|
|
409
|
+
* `box-sizing` nem a família do heading - e não briga com o que a folha dele já faz.
|
|
410
|
+
*/
|
|
411
|
+
const pageBase = Object.entries(foundations.base ?? {});
|
|
412
|
+
const pageBaseSection = pageBase.length === 0
|
|
413
|
+
? ""
|
|
414
|
+
: `
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
## The page this system sits on
|
|
418
|
+
|
|
419
|
+
Their global stylesheet already dresses the page before any component runs, and the system carries
|
|
420
|
+
it. **Do not re-declare these, and do not fight them** - compose on top:
|
|
421
|
+
|
|
422
|
+
${pageBase
|
|
423
|
+
.map(([element, props]) => `- \`${element}\` - ${Object.entries(props)
|
|
424
|
+
.map(([prop, at]) => `${cssProp(prop)}: ${at.value}`)
|
|
425
|
+
.join("; ")}`)
|
|
426
|
+
.join("\n")}
|
|
427
|
+
|
|
428
|
+
A value in braces is a token of theirs: it re-themes with the system, so the page follows the same
|
|
429
|
+
edit the components do.
|
|
430
|
+
`;
|
|
431
|
+
const pending = payload.pending ?? [];
|
|
432
|
+
const pendingSection = pending.length === 0
|
|
433
|
+
? ""
|
|
434
|
+
: `
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
## Open in this system (${pending.length}) - decided by you, not by me
|
|
438
|
+
|
|
439
|
+
${pending.length === 1 ? "One thing in this system carries a name nobody chose" : `${pending.length} things in this system carry names nobody chose`}. ${pending.length === 1 ? "It is" : "They are"} not broken and ${pending.length === 1 ? "does" : "do"} not block you - but treat ${pending.length === 1 ? "it" : "them"} as provisional: prefer a role that is settled when you have the choice, and do not build a new vocabulary on top of ${pending.length === 1 ? "this one" : "these"}.
|
|
440
|
+
|
|
441
|
+
${pending
|
|
442
|
+
.map((p) => `- ${p.what}\n - **Why:** ${p.why}\n - **Settle it:** ${p.fix}`)
|
|
443
|
+
.join("\n")}
|
|
444
|
+
`;
|
|
378
445
|
// Engagement blocks (gamification library) - category apart from core components.
|
|
379
446
|
const blockEntries = Object.entries(doc.blocks ?? {});
|
|
380
447
|
const blockLines = blockEntries.map(([bname, recipe]) => componentEntry(bname, recipe));
|
|
@@ -624,7 +691,7 @@ ${hasTailwind
|
|
|
624
691
|
**Motion vocabulary** below; never hand-roll \`@keyframes\` or raw durations.
|
|
625
692
|
- When **creating a new component** the DS does not cover yet: compose it from these semantic
|
|
626
693
|
tokens to inherit the system's identity; do not invent colors/measures outside the scale.
|
|
627
|
-
${keyframeLines.length > 0
|
|
694
|
+
${pageBaseSection}${pendingSection}${keyframeLines.length > 0
|
|
628
695
|
? `
|
|
629
696
|
---
|
|
630
697
|
|
package/dist/install-marks.js
CHANGED
|
@@ -54,7 +54,18 @@
|
|
|
54
54
|
*
|
|
55
55
|
* O resto da pasta vem do servidor e já é coberto pela versão do DS.
|
|
56
56
|
*/
|
|
57
|
-
|
|
57
|
+
/**
|
|
58
|
+
* 0.16.204 -> 0.16.216 em 12/08, e a resposta do passo 1 foi SIM pela primeira vez desde que o
|
|
59
|
+
* portão existe: o `GUIDE.md` que cai na pasta ganhou a seção "Open in this system", com o que o
|
|
60
|
+
* sistema ainda não decidiu. Um install anterior a esta versão materializa um guia que não diz ao
|
|
61
|
+
* agente dele quais nomes são provisórios - bytes diferentes, e diferença que muda o que ele lê.
|
|
62
|
+
*
|
|
63
|
+
* 0.16.216 -> 0.16.217 no mesmo dia, e SIM de novo: o guia passou a imprimir a PÁGINA que o sistema
|
|
64
|
+
* carrega - as regras de elemento da folha global dele. Elas viajavam no `design-system.json` desde
|
|
65
|
+
* sempre e o arquivo que o agente é mandado ler não as citava, então seis regras adotadas no sistema
|
|
66
|
+
* real eram invisíveis para quem ia escrever a próxima tela.
|
|
67
|
+
*/
|
|
68
|
+
export const MATERIALISER_SINCE = "0.16.217";
|
|
58
69
|
/**
|
|
59
70
|
* A ÚLTIMA VERSÃO EM QUE O QUE O HOOK RODA MUDOU.
|
|
60
71
|
*
|
package/package.json
CHANGED