synthesisui 0.16.492 → 0.16.494
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/commands/mcp.js +20 -9
- package/dist/commands/sync.js +13 -3
- package/dist/component-codegen.js +40 -1
- package/dist/install-marks.js +5 -1
- package/dist/new-project-theme.js +8 -0
- package/dist/preferences.js +6 -0
- package/dist/their-tongue.js +27 -1
- package/package.json +1 -1
package/dist/commands/mcp.js
CHANGED
|
@@ -1670,6 +1670,22 @@ cli) {
|
|
|
1670
1670
|
* procedência. Nenhuma linha dele conta nada: quem instrumenta é `callTool`,
|
|
1671
1671
|
* uma vez, para todas.
|
|
1672
1672
|
*/
|
|
1673
|
+
/**
|
|
1674
|
+
* POR QUE A MEMÓRIA NÃO VEIO - e o 404 NÃO É "NADA FOI DECIDIDO" ("a memória do sistema", 06/10).
|
|
1675
|
+
*
|
|
1676
|
+
* Em 27/09 o 404 virou "nothing has been decided for this system yet" para não assustar o leigo num projeto
|
|
1677
|
+
* recém-nascido. Só que um sistema dela sem memória responde 200 com a lista vazia - o 404 só chega quando a
|
|
1678
|
+
* plataforma NÃO DEIXA LER, e era o que acontecia com todo sistema instalado da galeria. O agente lia "nada decidido",
|
|
1679
|
+
* seguia a regra geral, e a decisão do sistema nunca chegava. Agora o motivo é o do servidor, com as palavras dele -
|
|
1680
|
+
* sem número, que era o medo de 27/09.
|
|
1681
|
+
*/
|
|
1682
|
+
export function recallUnreached(status, serverSaid, slug) {
|
|
1683
|
+
if (status == null)
|
|
1684
|
+
return "the platform could not be reached";
|
|
1685
|
+
if (status !== 404)
|
|
1686
|
+
return `the platform answered ${status}`;
|
|
1687
|
+
return `this system's memory could not be read here, so nothing below is the system's decision: ${serverSaid ?? `no system called "${slug}" was found`}`;
|
|
1688
|
+
}
|
|
1673
1689
|
/**
|
|
1674
1690
|
* O ELO QUE FALTAVA - `remember` e `recall` eram ANUNCIADOS e não despachados.
|
|
1675
1691
|
*
|
|
@@ -1980,19 +1996,14 @@ cli) {
|
|
|
1980
1996
|
},
|
|
1981
1997
|
body: JSON.stringify(request),
|
|
1982
1998
|
}).catch(() => null);
|
|
1999
|
+
const refused = res && res.status === 404
|
|
2000
|
+
? (await res.json().catch(() => null))
|
|
2001
|
+
: null;
|
|
1983
2002
|
const empty = {
|
|
1984
2003
|
carried: [],
|
|
1985
2004
|
groups: [],
|
|
1986
2005
|
omitted: [],
|
|
1987
|
-
|
|
1988
|
-
* 404 é "nada gravado para este sistema", e dizer o número fazia o leigo achar que algo tinha
|
|
1989
|
-
* quebrado num projeto que acabou de nascer (rodada 1 do refinamento, 27/09).
|
|
1990
|
-
*/
|
|
1991
|
-
because: res
|
|
1992
|
-
? res.status === 404
|
|
1993
|
-
? "nothing has been decided for this system yet"
|
|
1994
|
-
: `the platform answered ${res.status}`
|
|
1995
|
-
: "the platform could not be reached",
|
|
2006
|
+
because: recallUnreached(res?.status ?? null, refused?.message, reach.slug),
|
|
1996
2007
|
};
|
|
1997
2008
|
if (!res?.ok)
|
|
1998
2009
|
return empty;
|
package/dist/commands/sync.js
CHANGED
|
@@ -316,6 +316,13 @@ export async function sync(opts) {
|
|
|
316
316
|
console.log(body(emptyLedger
|
|
317
317
|
? `No checks recorded here yet - the record fills as the hook checks writes and doctor runs.${repo ? " This repo's installed version was sent, so the platform can tell you when a newer one exists." : ""}`
|
|
318
318
|
: `${out.eventsReceived} checks sent, ${out.eventsNew} new. ${out.requestsNow} open request${out.requestsNow === 1 ? "" : "s"}.`));
|
|
319
|
+
/**
|
|
320
|
+
* A QUEM OS PEDIDOS FORAM, quando o sistema é da galeria. Sem a frase, "3 open requests" não diz que alguém os
|
|
321
|
+
* recebeu - e era exatamente isso que faltava: durante 18 turnos eles não chegaram a ninguém.
|
|
322
|
+
*/
|
|
323
|
+
if (out.gallery && out.requestsNow > 0) {
|
|
324
|
+
console.log(body(`${slug} is a gallery system, so the requests went to the people who make it - your record stays under your account.`));
|
|
325
|
+
}
|
|
319
326
|
if (gained > 0) {
|
|
320
327
|
console.log("");
|
|
321
328
|
console.log(body(`${gained} form${gained === 1 ? "" : "s"} your team already taught the pipeline now apply here too - the next measurement reads them without you declaring anything.`));
|
|
@@ -341,9 +348,12 @@ export async function sync(opts) {
|
|
|
341
348
|
console.log(body(decisionLine(d, slug, base)));
|
|
342
349
|
}
|
|
343
350
|
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
351
|
+
/** Num sistema da galeria não há "o seu painel": a página é do dono, e quem instalou não a abre. */
|
|
352
|
+
if (!out.gallery) {
|
|
353
|
+
console.log("");
|
|
354
|
+
console.log(body(`The record lives on your system's overview:`));
|
|
355
|
+
console.log(body(` ${base}/dashboard/mine/${slug}`));
|
|
356
|
+
}
|
|
347
357
|
/**
|
|
348
358
|
* O QUE AINDA FALTA, no fim do comando que a pessoa acabou de rodar.
|
|
349
359
|
*
|
|
@@ -702,6 +702,20 @@ const namedInside = (prop, value, themeVars) => {
|
|
|
702
702
|
? themeVars.nameFor(ref, "ease", key) === key
|
|
703
703
|
: minted(themeVars, `--ease-${key}`);
|
|
704
704
|
return ok ? `var(--ease-${key})` : ref;
|
|
705
|
+
})
|
|
706
|
+
/**
|
|
707
|
+
* E A DURAÇÃO ("a galeria aprende", E02, 06/10): a curva já saía pelo nome e a duração ao lado dela saía
|
|
708
|
+
* `100ms`, porque o `init` não declarava nenhuma. Agora ele declara `--duration-<nome>` no @theme, e a mesma
|
|
709
|
+
* regra vale - o nome dele, quando o valor bate.
|
|
710
|
+
*/
|
|
711
|
+
.replace(/\{motion\.durations\.([a-zA-Z0-9-]+)\}/g, (ref, name) => {
|
|
712
|
+
const key = kebab(name);
|
|
713
|
+
const theirs = themeVars instanceof ThemeVocab
|
|
714
|
+
? themeVars.nameFor(ref, "duration", key)
|
|
715
|
+
: minted(themeVars, `--duration-${key}`)
|
|
716
|
+
? key
|
|
717
|
+
: null;
|
|
718
|
+
return theirs ? `var(--duration-${theirs})` : ref;
|
|
705
719
|
});
|
|
706
720
|
};
|
|
707
721
|
/**
|
|
@@ -717,7 +731,9 @@ function literalAsRef(prop, value, themeVars) {
|
|
|
717
731
|
? FAMILY_SEAM_PREFIX
|
|
718
732
|
: prop === "color" || prop === "backgroundColor" || prop === "borderColor"
|
|
719
733
|
? "--ds-color-semantic-"
|
|
720
|
-
:
|
|
734
|
+
: MARGIN_SIDE[prop]
|
|
735
|
+
? "--ds-spacing-"
|
|
736
|
+
: null;
|
|
721
737
|
if (!ns)
|
|
722
738
|
return null;
|
|
723
739
|
const hits = [...themeVars.dsValues]
|
|
@@ -725,8 +741,22 @@ function literalAsRef(prop, value, themeVars) {
|
|
|
725
741
|
.map(([n]) => n.slice(ns.length));
|
|
726
742
|
if (hits.length !== 1)
|
|
727
743
|
return null;
|
|
744
|
+
if (ns === "--ds-spacing-")
|
|
745
|
+
return `{spacing.${hits[0]}}`;
|
|
728
746
|
return ns === FAMILY_SEAM_PREFIX ? `{typography.families.${hits[0]}}` : `{color.semantic.${hits[0]}}`;
|
|
729
747
|
}
|
|
748
|
+
/**
|
|
749
|
+
* A MARGEM DE UM LADO, NO DEGRAU DO SISTEMA ("a galeria aprende", E03, 06/10). A parte `remove` do chip do Moss traz
|
|
750
|
+
* `marginLeft: 0.25rem`, e o gerador escrevia `[margin-left:0.25rem]` com `--spacing-3xs: 0.25rem` declarado no tema:
|
|
751
|
+
* era o último valor à mão dos componentes do exemplo Lumen Bikes que não era duração. Quando um degrau só segura o
|
|
752
|
+
* valor, ele vira `ml-3xs`.
|
|
753
|
+
*/
|
|
754
|
+
const MARGIN_SIDE = {
|
|
755
|
+
marginLeft: "ml",
|
|
756
|
+
marginRight: "mr",
|
|
757
|
+
marginTop: "mt",
|
|
758
|
+
marginBottom: "mb",
|
|
759
|
+
};
|
|
730
760
|
/** One declaration → Tailwind classes (pretty when mappable, arbitrary-property
|
|
731
761
|
* otherwise - never dropped). */
|
|
732
762
|
function declToTailwind(prop, value, themeVars) {
|
|
@@ -786,6 +816,15 @@ function declToTailwind(prop, value, themeVars) {
|
|
|
786
816
|
return [`rounded-${key}`];
|
|
787
817
|
break;
|
|
788
818
|
}
|
|
819
|
+
case "marginLeft":
|
|
820
|
+
case "marginRight":
|
|
821
|
+
case "marginTop":
|
|
822
|
+
case "marginBottom": {
|
|
823
|
+
const key = nsKey(value, "spacing");
|
|
824
|
+
if (key && minted(themeVars, `--spacing-${key}`))
|
|
825
|
+
return [`${MARGIN_SIDE[prop]}-${key}`];
|
|
826
|
+
break;
|
|
827
|
+
}
|
|
789
828
|
case "gap": {
|
|
790
829
|
const key = nsKey(value, "spacing");
|
|
791
830
|
if (key && minted(themeVars, `--spacing-${key}`))
|
package/dist/install-marks.js
CHANGED
|
@@ -324,7 +324,11 @@
|
|
|
324
324
|
* que o `preferences` devolve - os nomes do sistema e o motion que ela ligou na Structure - É o pedido que a regra do tema
|
|
325
325
|
* espera. Uma pasta escrita antes faz o agente perguntar de novo a cada turno e não instalar o movimento.
|
|
326
326
|
*/
|
|
327
|
-
|
|
327
|
+
/**
|
|
328
|
+
* 0.16.492 -> 0.16.493 em 06/10, e o passo 1 dá **SIM** ("a galeria aprende", E02): o `init` declara as durações do
|
|
329
|
+
* sistema no @theme (`--duration-fast`), e o blueprint as escreve pelo nome. Um componente escrito antes traz `100ms`.
|
|
330
|
+
*/
|
|
331
|
+
export const MATERIALISER_SINCE = "0.16.494";
|
|
328
332
|
/**
|
|
329
333
|
* A ÚLTIMA VERSÃO EM QUE O QUE O HOOK RODA MUDOU.
|
|
330
334
|
*
|
|
@@ -61,6 +61,14 @@ function theirNameFor(ours) {
|
|
|
61
61
|
return `--text-${m[1]}--${m[2]}`;
|
|
62
62
|
if ((m = /^motion-easings-(.+)$/.exec(bare)))
|
|
63
63
|
return `--ease-${m[1]}`;
|
|
64
|
+
/**
|
|
65
|
+
* AS DURAÇÕES TAMBÉM GANHAM NOME ("a galeria aprende", E02, 06/10). As curvas entravam e as durações não, então o
|
|
66
|
+
* Button que a plataforma entrega saía com `[transition:all_100ms_var(--ease-smooth)]`: 21 dos 22 valores à mão
|
|
67
|
+
* dos componentes do exemplo Lumen Bikes eram 100ms e 200ms, e a deriva era nossa, não do agente. Com o nome no
|
|
68
|
+
* tema, o vocabulário do projeto responde por elas e o blueprint escreve `var(--duration-fast)`.
|
|
69
|
+
*/
|
|
70
|
+
if ((m = /^motion-durations-(.+)$/.exec(bare)))
|
|
71
|
+
return `--duration-${m[1]}`;
|
|
64
72
|
return null;
|
|
65
73
|
}
|
|
66
74
|
export async function writeNewProjectTheme(root, tokensCss, slug, version) {
|
package/dist/preferences.js
CHANGED
|
@@ -196,6 +196,12 @@ function craftOf(kind, prefs) {
|
|
|
196
196
|
return [
|
|
197
197
|
"",
|
|
198
198
|
`HOW THIS PLATFORM BUILDS A ${kind.toUpperCase()}${structure} - the same rules its guide uses; their blueprint wins where the two disagree:`,
|
|
199
|
+
/**
|
|
200
|
+
* A DECISÃO DO SISTEMA VEM ANTES DESTA LISTA ("a memória do sistema", 06/10). Estas linhas são o padrão de todo
|
|
201
|
+
* sistema; o que um sistema decidiu (o Moss: o header do painel no tom da base) é dele, e mora na memória. Sem esta
|
|
202
|
+
* ordem dita, o agente lia "a marca só no item ativo" e apagava a decisão - foi o painel claro das rodadas de 05/10.
|
|
203
|
+
*/
|
|
204
|
+
"- These lines are the default for every system. A decision THIS system recorded (call `recall` with the parts in play) comes first: where one disagrees with a line here, follow the decision and say so in one line.",
|
|
199
205
|
...lines.map((l) => `- ${l}`),
|
|
200
206
|
];
|
|
201
207
|
}
|
package/dist/their-tongue.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FAMILY_SEAM_PREFIX } from "./fonts.js";
|
|
1
2
|
/** `var(--ds-x)` e `var(--ds-x, fallback)` - o que a folha compilada escreve. */
|
|
2
3
|
const OUR_VAR = /var\(\s*(--ds-[a-zA-Z0-9_-]+)\s*(?:,([^()]*))?\)/g;
|
|
3
4
|
/**
|
|
@@ -24,6 +25,30 @@ export function sumSpoken(reports) {
|
|
|
24
25
|
left: [...left].sort(),
|
|
25
26
|
};
|
|
26
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* A FAMÍLIA PASSA PELA FONTE QUE O `add` CARREGOU - ele, 14/10, no teste com um agente do zero: o template saía com
|
|
30
|
+
* `font-family: "Instrument Serif"`, e o `next/font` do `fonts.ts` registra a fonte com um nome interno dele. Os dois não
|
|
31
|
+
* se encontravam: o agente apagou o `fonts.ts` e trocou o layout por um `<link>` do Google.
|
|
32
|
+
*
|
|
33
|
+
* A variável é DELE - o `fonts.ts` que o `add` escreveu declara `variable: "--font-ds-<papel>"`, e o layout a põe no
|
|
34
|
+
* `<body>`. Com ela ligada, a seção usa a fonte que o `next/font` baixou; sem ela, cai no nome, como antes. Dois papéis
|
|
35
|
+
* com a mesma família viram UMA const no `fonts.ts` (a do primeiro), então a cadeia passa por todos os papéis que dividem
|
|
36
|
+
* a família: a variável que existir vence.
|
|
37
|
+
*/
|
|
38
|
+
const FAMILY = FAMILY_SEAM_PREFIX;
|
|
39
|
+
const firstOf = (stack) => (stack.split(",")[0] ?? "").trim().replace(/^["']|["']$/g, "").toLowerCase();
|
|
40
|
+
function viaNextFont(name, value, tongue) {
|
|
41
|
+
if (!name.startsWith(FAMILY))
|
|
42
|
+
return null;
|
|
43
|
+
const family = firstOf(value);
|
|
44
|
+
if (!family)
|
|
45
|
+
return null;
|
|
46
|
+
const roles = [name.slice(FAMILY.length)];
|
|
47
|
+
for (const [other, v] of tongue.values)
|
|
48
|
+
if (other !== name && other.startsWith(FAMILY) && firstOf(v) === family)
|
|
49
|
+
roles.push(other.slice(FAMILY.length));
|
|
50
|
+
return roles.reduceRight((inner, role) => `var(--font-ds-${role}, ${inner})`, value);
|
|
51
|
+
}
|
|
27
52
|
export function inTheirTongue(css, tongue, destination = "stylesheet") {
|
|
28
53
|
let named = 0;
|
|
29
54
|
let inlined = 0;
|
|
@@ -46,7 +71,8 @@ export function inTheirTongue(css, tongue, destination = "stylesheet") {
|
|
|
46
71
|
inlined += 1;
|
|
47
72
|
if (tongue.frozen.has(name))
|
|
48
73
|
froze += 1;
|
|
49
|
-
|
|
74
|
+
const font = destination === "stylesheet" ? viaNextFont(name, value, tongue) : null;
|
|
75
|
+
return write(font ?? value);
|
|
50
76
|
}
|
|
51
77
|
/**
|
|
52
78
|
* O FALLBACK ESCRITO NA PRÓPRIA REFERÊNCIA É A ÚLTIMA RESPOSTA, e ela é do autor do texto.
|
package/package.json
CHANGED