synthesisui 0.16.512 → 0.16.513
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/install-marks.js +7 -1
- package/dist/new-project-theme.js +44 -2
- package/package.json +1 -1
package/dist/install-marks.js
CHANGED
|
@@ -355,7 +355,13 @@
|
|
|
355
355
|
* bloco do `CLAUDE.md` ensina a leitura da primeira tela em vez do `/sui-import-ds`; com o `rules.json` e o impeccable no
|
|
356
356
|
* projeto, diz que o revisor dele é só da criação. Uma pasta escrita antes manda o agente importar e não fala do revisor.
|
|
357
357
|
*/
|
|
358
|
-
|
|
358
|
+
/**
|
|
359
|
+
* 0.16.508 -> 0.16.513 em 24/10, e o passo 1 dá **SIM** (a largura não vira espaço): o `init` declara
|
|
360
|
+
* `--max-width-<nome>: var(--container-<nome>)` para cada espaçamento do sistema com nome de tamanho de contêiner. Uma pasta
|
|
361
|
+
* escrita antes deixa `max-w-xl` virar `var(--spacing-xl)` - no Post Proof, 3rem e um título com uma palavra por linha.
|
|
362
|
+
* O conserto ficou numa branch local de 16/10 a 24/10 (jornada "o estado da arte do design"); 0.16.500 saiu sem ele.
|
|
363
|
+
*/
|
|
364
|
+
export const MATERIALISER_SINCE = "0.16.513";
|
|
359
365
|
/**
|
|
360
366
|
* A ÚLTIMA VERSÃO EM QUE O QUE O HOOK RODA MUDOU.
|
|
361
367
|
*
|
|
@@ -79,6 +79,37 @@ function theirNameFor(ours) {
|
|
|
79
79
|
return `--duration-${m[1]}`;
|
|
80
80
|
return null;
|
|
81
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* A LARGURA NÃO VIRA ESPAÇO (16/10, medido no experimento das camadas). No Tailwind v4, `max-w-<nome>` lê o
|
|
84
|
+
* `--spacing-<nome>` quando ele existe, antes do `--container-<nome>`: o Post Proof escreve `--spacing-xl: 3rem`, e o
|
|
85
|
+
* `max-w-xl` que o agente usava como largura de leitura (36rem) virava 3rem - títulos com uma palavra por linha.
|
|
86
|
+
* Declarar `--max-width-<nome>` faz o `max-w-*` voltar a ser largura; `px-xl`, `gap-xl` e o resto continuam no espaçamento
|
|
87
|
+
* do sistema (testado no Tailwind 4.3.3).
|
|
88
|
+
*/
|
|
89
|
+
const CONTAINER_SIZES = new Set([
|
|
90
|
+
"3xs",
|
|
91
|
+
"2xs",
|
|
92
|
+
"xs",
|
|
93
|
+
"sm",
|
|
94
|
+
"md",
|
|
95
|
+
"lg",
|
|
96
|
+
"xl",
|
|
97
|
+
"2xl",
|
|
98
|
+
"3xl",
|
|
99
|
+
"4xl",
|
|
100
|
+
"5xl",
|
|
101
|
+
"6xl",
|
|
102
|
+
"7xl",
|
|
103
|
+
]);
|
|
104
|
+
export function widthGuards(names) {
|
|
105
|
+
const out = [];
|
|
106
|
+
for (const n of names) {
|
|
107
|
+
const m = /^--spacing-(.+)$/.exec(n);
|
|
108
|
+
if (m && CONTAINER_SIZES.has(m[1]))
|
|
109
|
+
out.push(` --max-width-${m[1]}: var(--container-${m[1]});`);
|
|
110
|
+
}
|
|
111
|
+
return out;
|
|
112
|
+
}
|
|
82
113
|
export async function writeNewProjectTheme(root, tokensCss, slug, version) {
|
|
83
114
|
const sheets = await sheetsOf(root);
|
|
84
115
|
const own = new Set();
|
|
@@ -116,6 +147,7 @@ export async function writeNewProjectTheme(root, tokensCss, slug, version) {
|
|
|
116
147
|
open(`${slug} v${version}: the system's values under the names Tailwind turns into utilities. They are yours now - change a value here and every component follows. Written by \`init\`, because this project had no tokens of its own.`),
|
|
117
148
|
"@theme {",
|
|
118
149
|
...lines,
|
|
150
|
+
...widthGuards(system.keys()),
|
|
119
151
|
"}",
|
|
120
152
|
...(next.length > 0 ? ["", ":root {", ...next, "}"] : []),
|
|
121
153
|
end(slug),
|
|
@@ -286,7 +318,11 @@ async function readTheirs(root, slug) {
|
|
|
286
318
|
* (`--container-*`), e o par vai para o `.lock`: a seção materializada escreve `var(--container-page)`, e a pessoa muda a
|
|
287
319
|
* largura num lugar só. O valor é o MESMO do catálogo - `page-width-twin.spec.ts` compara os dois.
|
|
288
320
|
*/
|
|
289
|
-
export const PAGE_WIDTH = {
|
|
321
|
+
export const PAGE_WIDTH = {
|
|
322
|
+
ours: "--ds-layout-page-width",
|
|
323
|
+
theirs: "--container-page",
|
|
324
|
+
value: "1440px",
|
|
325
|
+
};
|
|
290
326
|
function systemPairs(tokensCss, lookup = new Map()) {
|
|
291
327
|
const { names, values } = tongueOf([], tokensCss);
|
|
292
328
|
const out = [];
|
|
@@ -410,7 +446,13 @@ export async function writeBesideTheirs(root, tokensCss, slug, version, where) {
|
|
|
410
446
|
begin(slug),
|
|
411
447
|
open(`${slug} v${version}, beside your own tokens. The @theme adds only the names your project did not have; inside the data-theme selector below every value is the system's, including the names you already use, which keep their value everywhere else. Written by \`init\`, where you chose.`),
|
|
412
448
|
...(missing.length > 0
|
|
413
|
-
? [
|
|
449
|
+
? [
|
|
450
|
+
"@theme {",
|
|
451
|
+
...missing.map(([n, v]) => ` ${n}: ${v};`),
|
|
452
|
+
...widthGuards(missing.map(([n]) => n)),
|
|
453
|
+
"}",
|
|
454
|
+
"",
|
|
455
|
+
]
|
|
414
456
|
: []),
|
|
415
457
|
`[data-theme="${slug}"] {`,
|
|
416
458
|
...scoped,
|
package/package.json
CHANGED