synthesisui 0.16.507 → 0.16.509

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/claude-md.js CHANGED
@@ -409,7 +409,17 @@ async function renderRegion(projectRoot, installed) {
409
409
  * O que NÃO é recuperável e por isso fica: que existe um portão, que ele roda por arquivo tocado, e
410
410
  * que um valor sem token não se inventa. É gate obrigatório, não documentação.
411
411
  */
412
- const selfCheck = recall.available
412
+ /**
413
+ * O PLACAR DE FIDELIDADE (jornada "o placar de fidelidade", E05, 23/10): quando o DESIGN.md da raiz veio de um site lido no
414
+ * SynthesisUI (ele carrega a leitura do site, `synthesisui:reading`), o agente confere a página contra o site antes de
415
+ * entregar - sem a pessoa pedir. Medido nas três landings da Tilde: os valores do sistema batiam, e o que variava de
416
+ * rodada para rodada era a composição, que ninguém conferia.
417
+ */
418
+ const designMd = await readFile(join(projectRoot, "DESIGN.md"), "utf8").catch(() => "");
419
+ const fidelityLine = designMd.includes("synthesisui:reading v1")
420
+ ? "\n\n**Before you hand a page over, check its fidelity to the site this DESIGN.md was read from.** With the dev server up, run `npx synthesisui@latest fidelity`, fix every value and pattern it lists (what the brief rules out is already left out), run it again, and tell the person the final score. Fidelity is the source's grammar, not its content: never copy its words, images or logos."
421
+ : "";
422
+ const selfCheck = (recall.available
413
423
  ? `
414
424
 
415
425
  **Check what you wrote** with \`check_file\` on the file you touched, and fix what it names before
@@ -418,7 +428,7 @@ you would file a missing component. And call \`refresh_system\` once per session
418
428
  here: a newer reader sees styles the old one could not.`
419
429
  : (await hasHook(projectRoot))
420
430
  ? SELF_CHECK_HOOKED
421
- : SELF_CHECK_MANUAL;
431
+ : SELF_CHECK_MANUAL) + fidelityLine;
422
432
  /**
423
433
  * O BOOTSTRAP É REDUZIDO QUANDO EXISTE CAMINHO DE VOLTA - e o portão é CAPACIDADE, não nome.
424
434
  *
@@ -355,7 +355,7 @@
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
- export const MATERIALISER_SINCE = "0.16.501";
358
+ export const MATERIALISER_SINCE = "0.16.508";
359
359
  /**
360
360
  * A ÚLTIMA VERSÃO EM QUE O QUE O HOOK RODA MUDOU.
361
361
  *
@@ -144,7 +144,20 @@ export const PAGE_LANGUAGE = `(() => {
144
144
  const contentWidth = content && Number(content[0]) >= 900 ? Number(content[0]) : inset ? innerWidth - 2 * Number(inset[0]) : content ? Number(content[0]) : null;
145
145
  const rhythm = { bands: bands.length, sectionGap: median(gaps.filter((g) => g >= 64)), innerGap: median(gaps.filter((g) => g > 0 && g < 64)), contentWidth };
146
146
 
147
- return { type, components, bars, sections, cards, rhythm, width: innerWidth };
147
+ /* O QUE O SITE TEM E A ENGINE AINDA NÃO LÊ (o placar de fidelidade, E07, 23/10) - contado para a barra do quanto foi
148
+ extraído: cada um só pesa quando o site o usa. */
149
+ const shown = [...document.querySelectorAll("body *")].filter(vis);
150
+ const svgs = shown.filter((e) => e.tagName.toLowerCase() === "svg");
151
+ const unread = {
152
+ animations: document.getAnimations().length,
153
+ transitions: shown.filter((e) => { const d = getComputedStyle(e).transitionDuration; return !!d && d.split(",").some((x) => parseFloat(x) > 0); }).length,
154
+ artwork: svgs.filter((e) => { const q = e.getBoundingClientRect(); return q.width >= 120 && q.height >= 120; }).length + shown.filter((e) => e.tagName === "CANVAS" || e.tagName === "VIDEO").length,
155
+ gradients: shown.filter((e) => /gradient\\(/.test(getComputedStyle(e).backgroundImage)).length,
156
+ photos: shown.filter((e) => e.tagName === "IMG" && e.getBoundingClientRect().width >= 200).length,
157
+ icons: svgs.filter((e) => { const q = e.getBoundingClientRect(); return q.width <= 32 && q.height <= 32; }).length,
158
+ };
159
+
160
+ return { type, components, bars, sections, cards, rhythm, unread, width: innerWidth };
148
161
  })()`;
149
162
  /**
150
163
  * O AVISO DE COOKIES E O MODAL, ESCONDIDOS - só nas fotos: a leitura já foi medida. Medido em 21/10 nos 21 sites: 7 dobras
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synthesisui",
3
- "version": "0.16.507",
3
+ "version": "0.16.509",
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": {