@aurea-uds/react 0.59.0 → 0.61.0

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.
@@ -38,7 +38,7 @@ import { cx, useAureaStrings } from "./internal.js";
38
38
  // CodeEditor (e o CodeMirror) somem quando não usados. Split por subpath = decisão do Victor.
39
39
  export const aureaEditorTheme = /*@__PURE__*/ EditorView.theme({
40
40
  "&": { backgroundColor: "var(--surface-inset)", color: "var(--foreground)", border: "var(--border-width) solid transparent", borderRadius: "var(--radius-lg)", fontSize: "var(--text-xs)" },
41
- "&.cm-focused": { outline: "2px solid var(--focus-strong)", outlineOffset: "-2px" },
41
+ "&.cm-focused": { outline: "var(--focus-width) solid var(--focus-strong)", outlineOffset: "calc(-1 * var(--focus-width))" },
42
42
  ".cm-scroller": { fontFamily: "var(--font-code)", lineHeight: "var(--leading-relaxed)", borderRadius: "inherit" },
43
43
  ".cm-content": { caretColor: "var(--foreground)", padding: "var(--space-2) 0" },
44
44
  ".cm-line": { padding: "0 var(--space-3)" },
@@ -112,9 +112,9 @@ function useGavetaFechaNoDesktop(docs = false) {
112
112
  }
113
113
  catch { /* motor sem popover */ }
114
114
  };
115
- const pares = [[window.matchMedia(`(min-width: ${docs ? ESCALA.md : ESCALA.lg}px)`), fechar(SHELL_NAV_ID)]];
115
+ const pares = [[window.matchMedia(`(min-width: ${(docs ? ESCALA.md : ESCALA.lg) / 16}em)`), fechar(SHELL_NAV_ID)]];
116
116
  if (docs)
117
- pares.push([window.matchMedia(`(min-width: ${ESCALA.xl}px)`), fechar(SHELL_TOC_ID)]);
117
+ pares.push([window.matchMedia(`(min-width: ${ESCALA.xl / 16}em)`), fechar(SHELL_TOC_ID)]);
118
118
  for (const [mq, f] of pares)
119
119
  mq.addEventListener?.("change", f);
120
120
  return () => { for (const [mq, f] of pares)
@@ -142,7 +142,9 @@ function useGavetaFechaNoDesktop(docs = false) {
142
142
  //
143
143
  // Tudo LIGADO por `sidebarCollapsible`: sem ele o shell é o de antes, e quem já usa
144
144
  // `sidebarCollapsed` com o próprio botão não ganha um segundo.
145
- const MEDIA_MEDIA = `(min-width: ${ESCALA.lg}px) and (max-width: ${ESCALA.xl - 1}px)`;
145
+ // Em `em`, como o CSS (06/11/2026, o texto a 200%): `em` numa consulta de mídia é a fonte que a pessoa escolheu no
146
+ // navegador — com a fonte em dobro, a tela "encolhe" para a metade, e o JS tem de concordar com o CSS.
147
+ const MEDIA_MEDIA = `(min-width: ${ESCALA.lg / 16}em) and (max-width: ${(ESCALA.xl - 1) / 16}em)`;
146
148
  const MEDIA_ESTREITA = `(max-width: ${ESCALA.lg - 1}px)`;
147
149
  // A largura pela API do navegador, e não por `resize`: o `useSyncExternalStore` dá a resposta certa
148
150
  // já no primeiro desenho do lado do cliente, e no servidor (sem janela) diz "não" — a folha cuida da
package/dist/markup.js CHANGED
@@ -219,7 +219,9 @@ export function MediaPlayerShell({ children, className, ...props }) { return _js
219
219
  // O item da barra e o do painel são o MESMO elemento com a mesma pele: o atual é o atual nos dois.
220
220
  function linksDoHeader(items, current) {
221
221
  return _jsx("ul", { className: "topbar-links", children: items.map(it => {
222
- const p = { className: "topbar-link", "aria-current": it.id === current ? "page" : undefined, children: it.label };
222
+ // O `onClick` do item vale aqui também (06/11/2026): a `Sidebar` o liga e o `Header` o jogava fora — o mesmo `SidebarItem`
223
+ // fazia coisas diferentes nas duas peças. Não é hook: é a prop do `<a>`, que a marcação pura pode passar.
224
+ const p = { className: "topbar-link", "aria-current": it.id === current ? "page" : undefined, onClick: it.onClick, children: it.label };
223
225
  return _jsx("li", { children: it.render ? fundirRender(it.render, p, "a") : _jsx("a", { href: it.href, ...p }) }, it.id);
224
226
  }) });
225
227
  }
@@ -58,7 +58,8 @@ export function ContainerScope({ children, className, ...props }) {
58
58
  const temMatchMedia = () => typeof window !== "undefined" && typeof window.matchMedia === "function";
59
59
  const mqls = new Map();
60
60
  const mql = (px) => {
61
- const q = `(min-width:${px}px)`;
61
+ // em `em`, como o CSS gerado (06/11/2026): a fonte que a pessoa escolheu no navegador entra na conta
62
+ const q = `(min-width:${px / 16}em)`;
62
63
  let m = mqls.get(q);
63
64
  if (!m) {
64
65
  m = window.matchMedia(q);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurea-uds/react",
3
- "version": "0.59.0",
3
+ "version": "0.61.0",
4
4
  "description": "Os componentes React da Aurea UDS. Importe @aurea-uds/fonts/css e @aurea-uds/core/css junto.",
5
5
  "keywords": [
6
6
  "aurea",