@apollion-dsi/core 4.9.1 → 4.11.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.
Files changed (193) hide show
  1. package/README.md +4 -16
  2. package/lib/chunks/{chunk-3F7OIMU5.esm.js → chunk-2DS6D2PN.esm.js} +1 -1
  3. package/lib/chunks/chunk-2KZQ4XRC.esm.js +1 -0
  4. package/lib/chunks/{chunk-LMFXELKN.esm.js → chunk-2QDKZFCI.esm.js} +1 -1
  5. package/lib/chunks/chunk-34ESSZWX.esm.js +1 -0
  6. package/lib/chunks/{chunk-46TTCCRW.esm.js → chunk-52SIK5XP.esm.js} +1 -1
  7. package/lib/chunks/{chunk-46XZZR7Z.esm.js → chunk-6RNTVN4P.esm.js} +1 -1
  8. package/lib/chunks/{chunk-2URCFJDM.esm.js → chunk-6YLVHKDA.esm.js} +1 -1
  9. package/lib/chunks/{chunk-MPOF4AVP.esm.js → chunk-7CAFRS2U.esm.js} +1 -1
  10. package/lib/chunks/{chunk-TOI4RVAE.esm.js → chunk-7DNX3CLK.esm.js} +1 -1
  11. package/lib/chunks/{chunk-4ETGHVIY.esm.js → chunk-7ZH22VYB.esm.js} +1 -1
  12. package/lib/chunks/chunk-AATQ3MMI.esm.js +1 -0
  13. package/lib/chunks/{chunk-UHBWT5AW.esm.js → chunk-ACHWNVBH.esm.js} +1 -1
  14. package/lib/chunks/{chunk-KDUQEGEN.esm.js → chunk-ADLBRC7X.esm.js} +1 -1
  15. package/lib/chunks/{chunk-ITUU5A6G.esm.js → chunk-AXMLJQDO.esm.js} +1 -1
  16. package/lib/chunks/{chunk-OFLO3RWK.esm.js → chunk-BDSHPKGN.esm.js} +1 -1
  17. package/lib/chunks/{chunk-H27BFMIP.esm.js → chunk-BPBF66RC.esm.js} +1 -1
  18. package/lib/chunks/{chunk-26LI3MXC.esm.js → chunk-BPH65267.esm.js} +1 -1
  19. package/lib/chunks/chunk-BUVGH5EZ.esm.js +1 -0
  20. package/lib/chunks/{chunk-IPHK2TF4.esm.js → chunk-C7N3WYAP.esm.js} +1 -1
  21. package/lib/chunks/{chunk-G6RGUMLI.esm.js → chunk-DJ2A3Q3R.esm.js} +1 -1
  22. package/lib/chunks/chunk-DSXAMA7B.esm.js +1 -0
  23. package/lib/chunks/{chunk-MSLFSFPM.esm.js → chunk-ICRZFFDB.esm.js} +1 -1
  24. package/lib/chunks/{chunk-AHV3TGEY.esm.js → chunk-IHRQQM7Z.esm.js} +1 -1
  25. package/lib/chunks/chunk-IK5Z5C2R.esm.js +1 -0
  26. package/lib/chunks/{chunk-PQXDJLGK.esm.js → chunk-ITOB7S4H.esm.js} +1 -1
  27. package/lib/chunks/chunk-KZHSN55R.esm.js +1 -0
  28. package/lib/chunks/{chunk-5N2JVFTP.esm.js → chunk-LTPRMA4G.esm.js} +1 -1
  29. package/lib/chunks/{chunk-CPGN2SH2.esm.js → chunk-M4XIAGP6.esm.js} +1 -1
  30. package/lib/chunks/{chunk-RRGK56WI.esm.js → chunk-MZVPNR6R.esm.js} +1 -1
  31. package/lib/chunks/{chunk-SZFWURBI.esm.js → chunk-NEEEX4A4.esm.js} +1 -1
  32. package/lib/chunks/chunk-NI6YLGUA.esm.js +1 -0
  33. package/lib/chunks/chunk-OB3S7VAY.esm.js +1 -0
  34. package/lib/chunks/{chunk-5PG5BLXK.esm.js → chunk-OCOQSZIV.esm.js} +1 -1
  35. package/lib/chunks/{chunk-X7OXNFQV.esm.js → chunk-OLGQ5AJB.esm.js} +1 -1
  36. package/lib/chunks/{chunk-4RAVNJVP.esm.js → chunk-QEUNUVRP.esm.js} +1 -1
  37. package/lib/chunks/{chunk-KAM7CXBI.esm.js → chunk-QOT6DPC2.esm.js} +1 -1
  38. package/lib/chunks/{chunk-PU6WQB3C.esm.js → chunk-RLF4L4WG.esm.js} +1 -1
  39. package/lib/chunks/{chunk-JLARG22X.esm.js → chunk-RYSLIZ6A.esm.js} +1 -1
  40. package/lib/chunks/{chunk-WXS2V6GM.esm.js → chunk-RZDVS7AY.esm.js} +1 -1
  41. package/lib/chunks/{chunk-YXLJZPNH.esm.js → chunk-S7A4WDK3.esm.js} +1 -1
  42. package/lib/chunks/{chunk-PWGN2XFC.esm.js → chunk-SAL6T43Z.esm.js} +1 -1
  43. package/lib/chunks/{chunk-ECSEHSVO.esm.js → chunk-SBPKWFPI.esm.js} +1 -1
  44. package/lib/chunks/{chunk-FLD6GUTF.esm.js → chunk-SWEGVDTY.esm.js} +1 -1
  45. package/lib/chunks/{chunk-3WTCIJQT.esm.js → chunk-SY6WC77R.esm.js} +1 -1
  46. package/lib/chunks/{chunk-JFOTSEOS.esm.js → chunk-TDXR6PQV.esm.js} +1 -1
  47. package/lib/chunks/{chunk-2B2NHBNE.esm.js → chunk-TH5Q6ACT.esm.js} +1 -1
  48. package/lib/chunks/{chunk-HF3LH5A2.esm.js → chunk-TXL563FW.esm.js} +1 -1
  49. package/lib/chunks/{chunk-HNO34UKT.esm.js → chunk-ULVNUZSW.esm.js} +1 -1
  50. package/lib/chunks/{chunk-PD3U6Y6P.esm.js → chunk-V4AFMRV2.esm.js} +1 -1
  51. package/lib/chunks/{chunk-XBPBD5Z4.esm.js → chunk-V6TE7HQW.esm.js} +1 -1
  52. package/lib/chunks/{chunk-2DLDGQEF.esm.js → chunk-VIB54GXH.esm.js} +1 -1
  53. package/lib/chunks/{chunk-2PA37TWW.esm.js → chunk-W4H25ZTU.esm.js} +1 -1
  54. package/lib/chunks/chunk-W6L7SS5T.esm.js +1 -0
  55. package/lib/chunks/{chunk-QH4TOZTO.esm.js → chunk-WCILSA73.esm.js} +1 -1
  56. package/lib/chunks/{chunk-2MFEXO2J.esm.js → chunk-WKEURV5Z.esm.js} +1 -1
  57. package/lib/chunks/{chunk-2ZOV42J4.esm.js → chunk-XB4FCTKB.esm.js} +1 -1
  58. package/lib/chunks/chunk-XI6MNT35.esm.js +1 -0
  59. package/lib/chunks/{chunk-UBSYXIRH.esm.js → chunk-XLGUBRKW.esm.js} +1 -1
  60. package/lib/chunks/{chunk-QGP4LLO7.esm.js → chunk-XOPG5TL5.esm.js} +1 -1
  61. package/lib/chunks/{chunk-YCGCCH6Q.esm.js → chunk-XU2GJK6Z.esm.js} +1 -1
  62. package/lib/chunks/chunk-YG2ZZMJF.esm.js +1 -0
  63. package/lib/chunks/{chunk-ZE7R46X3.esm.js → chunk-YGSPHLFE.esm.js} +1 -1
  64. package/lib/chunks/{chunk-MSX4RO76.esm.js → chunk-YWKMGYNR.esm.js} +1 -1
  65. package/lib/containers/Base/Base.style.d.ts +20 -5
  66. package/lib/containers/Base/index.esm.js +1 -1
  67. package/lib/containers/Card/index.esm.js +1 -1
  68. package/lib/containers/Content/index.esm.js +1 -1
  69. package/lib/containers/Flex/Flex.style.d.ts +20 -5
  70. package/lib/containers/Flex/index.esm.js +1 -1
  71. package/lib/containers/Grid/index.esm.js +1 -1
  72. package/lib/containers/Notification/Notification.style.d.ts +160 -40
  73. package/lib/containers/Notification/index.esm.js +1 -1
  74. package/lib/containers/Paper/Paper.style.d.ts +4 -4
  75. package/lib/containers/Paper/index.esm.js +1 -1
  76. package/lib/containers/Scroll/index.esm.js +1 -1
  77. package/lib/containers/index.esm.js +1 -1
  78. package/lib/dataDisplay/DataTable/DataTable.style.d.ts +8 -8
  79. package/lib/dataDisplay/DataTable/index.esm.js +1 -1
  80. package/lib/dataDisplay/DescriptionList/DescriptionList.interface.d.ts +8 -0
  81. package/lib/dataDisplay/DescriptionList/index.esm.js +1 -1
  82. package/lib/dataDisplay/Meter/Meter.d.ts +28 -0
  83. package/lib/dataDisplay/Meter/Meter.interface.d.ts +102 -0
  84. package/lib/dataDisplay/Meter/Meter.style.d.ts +67 -0
  85. package/lib/dataDisplay/Meter/index.d.ts +9 -0
  86. package/lib/dataDisplay/Meter/index.esm.js +1 -0
  87. package/lib/dataDisplay/Table/Table/index.esm.js +1 -1
  88. package/lib/dataDisplay/Table/TableCell/index.esm.js +1 -1
  89. package/lib/dataDisplay/Table/TableCheckboxCell/index.esm.js +1 -1
  90. package/lib/dataDisplay/Table/TableEmpty/TableEmpty.style.d.ts +4 -4
  91. package/lib/dataDisplay/Table/TableEmpty/index.esm.js +1 -1
  92. package/lib/dataDisplay/Table/TableFooter/index.esm.js +1 -1
  93. package/lib/dataDisplay/Table/TableHeaderCell/index.esm.js +1 -1
  94. package/lib/dataDisplay/Table/TableHeaderCheckboxCell/index.esm.js +1 -1
  95. package/lib/dataDisplay/Table/TablePagination/index.esm.js +1 -1
  96. package/lib/dataDisplay/Table/index.esm.js +1 -1
  97. package/lib/dataDisplay/Tabs/Tabs.style.d.ts +4 -4
  98. package/lib/dataDisplay/Tabs/index.esm.js +1 -1
  99. package/lib/dataDisplay/index.d.ts +2 -0
  100. package/lib/dataDisplay/index.esm.js +1 -1
  101. package/lib/elements/Avatar/index.esm.js +1 -1
  102. package/lib/elements/Button/index.esm.js +1 -1
  103. package/lib/elements/Dropdown/index.esm.js +1 -1
  104. package/lib/elements/Icon/index.esm.js +1 -1
  105. package/lib/elements/IconButton/index.esm.js +1 -1
  106. package/lib/elements/Image/index.esm.js +1 -1
  107. package/lib/elements/Label/Label.d.ts +4 -1
  108. package/lib/elements/Label/Label.interface.d.ts +12 -0
  109. package/lib/elements/Label/Label.style.d.ts +6 -4
  110. package/lib/elements/Label/index.esm.js +1 -1
  111. package/lib/elements/Link/Link.style.d.ts +29 -5
  112. package/lib/elements/Link/index.esm.js +1 -1
  113. package/lib/elements/List/index.esm.js +1 -1
  114. package/lib/elements/Modal/Modal.style.d.ts +610 -160
  115. package/lib/elements/Modal/index.esm.js +1 -1
  116. package/lib/elements/Popover/index.esm.js +1 -1
  117. package/lib/elements/ProgressBar/ProgressBar.d.ts +6 -0
  118. package/lib/elements/ProgressBar/ProgressBar.style.d.ts +36 -4
  119. package/lib/elements/ProgressBar/index.d.ts +4 -2
  120. package/lib/elements/ProgressBar/index.esm.js +1 -1
  121. package/lib/elements/Spinner/index.esm.js +1 -1
  122. package/lib/elements/Svg/Svg.style.d.ts +1 -1
  123. package/lib/elements/Svg/index.esm.js +1 -1
  124. package/lib/elements/Text/Text.props.d.ts +20 -5
  125. package/lib/elements/Text/index.esm.js +1 -1
  126. package/lib/elements/Tooltip/index.esm.js +1 -1
  127. package/lib/elements/index.esm.js +1 -1
  128. package/lib/factory/ColorFactory/ColorFactory.d.ts +9 -4
  129. package/lib/factory/ColorFactory/ColorFactory.interface.d.ts +24 -1
  130. package/lib/factory/ColorFactory/index.esm.js +1 -1
  131. package/lib/factory/ContainerFactory/ContainerFactory.interface.d.ts +9 -0
  132. package/lib/factory/ContainerFactory/index.esm.js +1 -1
  133. package/lib/factory/DeepFactory/index.esm.js +1 -1
  134. package/lib/factory/FlexFactory/index.esm.js +1 -1
  135. package/lib/factory/FontFactory/FontFactory.interface.d.ts +16 -0
  136. package/lib/factory/FontFactory/index.esm.js +1 -1
  137. package/lib/factory/ResponsiveFactory/index.esm.js +1 -1
  138. package/lib/factory/System/index.esm.js +1 -1
  139. package/lib/factory/index.esm.js +1 -1
  140. package/lib/form/Checkbox/Checkbox.style.d.ts +4 -4
  141. package/lib/form/Checkbox/index.esm.js +1 -1
  142. package/lib/form/Field/index.esm.js +1 -1
  143. package/lib/form/FieldGroup/index.esm.js +1 -1
  144. package/lib/form/Form/index.esm.js +1 -1
  145. package/lib/form/Input/Input.style.d.ts +8 -6
  146. package/lib/form/Input/index.esm.js +1 -1
  147. package/lib/form/InputCurrency/index.esm.js +1 -1
  148. package/lib/form/InputDate/index.esm.js +1 -1
  149. package/lib/form/InputMask/index.esm.js +1 -1
  150. package/lib/form/InputRange/InputRange.style.d.ts +8 -8
  151. package/lib/form/InputRange/index.esm.js +1 -1
  152. package/lib/form/InputSelect/index.esm.js +1 -1
  153. package/lib/form/Radio/Radio.style.d.ts +4 -4
  154. package/lib/form/Radio/index.esm.js +1 -1
  155. package/lib/form/Select/index.esm.js +1 -1
  156. package/lib/form/Switch/index.esm.js +1 -1
  157. package/lib/form/TextArea/TextArea.style.d.ts +4 -2
  158. package/lib/form/TextArea/index.esm.js +1 -1
  159. package/lib/form/UploadCard/UploadCard.style.d.ts +8 -8
  160. package/lib/form/UploadCard/index.esm.js +1 -1
  161. package/lib/form/index.esm.js +1 -1
  162. package/lib/hooks/index.esm.js +1 -1
  163. package/lib/index.d.ts +1 -1
  164. package/lib/index.esm.js +1 -1
  165. package/lib/index.js +1 -1
  166. package/lib/layouts/DefaultLayout/DefaultLayout.style.d.ts +2 -2
  167. package/lib/layouts/DefaultLayout/index.esm.js +1 -1
  168. package/lib/layouts/SideBarLayout/SideBarLayout.style.d.ts +2 -2
  169. package/lib/layouts/SideBarLayout/index.esm.js +1 -1
  170. package/lib/layouts/index.esm.js +1 -1
  171. package/lib/scenario/RectComponent/index.esm.js +1 -1
  172. package/lib/scenario/index.esm.js +1 -1
  173. package/lib/skeleton/ComposedSkeleton/index.esm.js +1 -1
  174. package/lib/skeleton/TextPreset/index.esm.js +1 -1
  175. package/lib/skeleton/index.esm.js +1 -1
  176. package/lib/themes/Colors/Colors.helpers.d.ts +62 -1
  177. package/lib/themes/Colors/index.esm.js +1 -1
  178. package/lib/themes/Deep/index.esm.js +1 -1
  179. package/lib/themes/Semantic/index.esm.js +1 -1
  180. package/lib/themes/Surface/index.esm.js +1 -1
  181. package/lib/themes/ThemeProvider/index.esm.js +1 -1
  182. package/lib/themes/index.esm.js +1 -1
  183. package/package.json +10 -10
  184. package/CHANGELOG.md +0 -1519
  185. package/lib/chunks/chunk-752Z7BQF.esm.js +0 -1
  186. package/lib/chunks/chunk-GOLX7UQY.esm.js +0 -1
  187. package/lib/chunks/chunk-GP7NECT4.esm.js +0 -1
  188. package/lib/chunks/chunk-JB7G6UGV.esm.js +0 -1
  189. package/lib/chunks/chunk-LJGXMFAJ.esm.js +0 -1
  190. package/lib/chunks/chunk-MBFUX4KR.esm.js +0 -1
  191. package/lib/chunks/chunk-SYABXHFT.esm.js +0 -1
  192. package/lib/chunks/chunk-VKXOGGQ2.esm.js +0 -1
  193. package/lib/chunks/chunk-YQS4LSPO.esm.js +0 -1
package/CHANGELOG.md DELETED
@@ -1,1519 +0,0 @@
1
- # @apollion-dsi/core
2
-
3
- ## 4.9.1
4
-
5
- ### Patch Changes
6
-
7
- - fix(core): sync `APOLLION_CORE_VERSION` with the published version
8
-
9
- The hand-maintained `APOLLION_CORE_VERSION` literal lagged the release in
10
- 4.9.0 (it still reported `4.8.0`), tripping the `index.test.ts` drift guard.
11
- This patch re-syncs the literal so the published bundle self-reports its own
12
- version again.
13
-
14
- ## 4.9.0
15
-
16
- ### Minor Changes
17
-
18
- - f44247c: feat(form): add SSR-inert, native-`<select>`-backed `Select`
19
-
20
- New `@apollion-dsi/core/form/select` component: a token-styled native
21
- `<select>` that renders correct, functional markup with JavaScript disabled
22
- (no hydration, no `useEffect`) and emits native `change` events — usable on
23
- pure static SSG (`renderToStaticMarkup`, zero app JS) where `InputSelect`
24
- (react-select) cannot. Typed `options`, `size` (`small`/`medium`/`large`),
25
- `variant`, `borderRadius` (incl. `straight`), visible `:focus-visible`
26
- outline, and forced-readable native `option` colors on dark surfaces.
27
-
28
- Also adds accessibility palette presets to `@apollion-dsi/core/themes/colors`
29
- (`grayscalePalette`, `highContrastPalette` AAA, `colorblindPalette`
30
- Okabe–Ito, and the `accessibilityPalettes` registry) — color-input factories
31
- for `createTheme({ colors })`.
32
-
33
- ## 4.8.0
34
-
35
- ### Minor Changes
36
-
37
- - 5bd1d6f: feat(core): `Text` tipa os atributos HTML pela `variant`, não só pelo `as`
38
-
39
- Desde a 4.7.0 o `Text` derivava os atributos nativos da tag concreta, mas `T` era inferido **só do `as`** — enquanto o runtime (`getTextProps`) resolve a tag pela `variant` quando a entrada de `variantStyleProps` não declara uma. Resultado: `<Text variant="blockquote" cite="…">` renderizava um `<blockquote>` no DOM e mesmo assim não compilava; o `as` precisava ser repetido junto da variante só para destravar o tipo (o próprio exemplo da doc fazia isso). Agora `T` segue a mesma ordem do runtime: `as` quando presente, senão a tag da `variant`, senão o default `span`. `variant="blockquote"` aceita `cite`; `variant="meta"` e `variant="lead"` tipam como `<p>` e `d1`–`d4` como `h1`–`h4`, respeitando a `tag` explícita do mapa; `as` continua vencendo a `variant` quando os dois aparecem, como no runtime. O mapa variante → tag é derivado de `typeof variantStyleProps` (`as const satisfies`), então uma variante nova entra no tipo sem segunda fonte de verdade. Sem breaking change: `TextInterface` sem argumento — usado em composição por `Label`, `Tooltip` e os `labelProps` de `Radio`/`Checkbox`/`Switch` — continua no conjunto global de atributos, e nenhum call-site com `as` muda de comportamento.
40
-
41
- ### Patch Changes
42
-
43
- - 30e6fb7: fix(core): `Link` mescla o `rel` do consumer em URL externa em vez de sobrescrever
44
-
45
- `Link` e `Link.Button` aplicavam `externalAttrs` **depois** do spread de `props`, então qualquer `rel` passado pelo consumer era descartado em `href` externo — `rel="nofollow noopener"` saía como `rel="noopener noreferrer"`. Agora há uma função pura `mergeRel`: `noopener` e `noreferrer` continuam sempre presentes e vêm primeiro (ordem estável), tokens extras do consumer (`nofollow`, `ugc`, `sponsored`, `me`) são preservados na ordem em que vieram, tudo deduplicado e normalizado para minúsculas. `target="_blank"` segue forçado em link externo (nova aba é o contrato do DS) e `href` interno não recebe injeção — o `rel` do consumer passa como veio. Sem mudança de API e sem churn de snapshot: link externo sem `rel` continua renderizando `rel="noopener noreferrer"`. Origem: feedback do consumidor Brasil 2030 — link de citação de fonte externa em `<figcaption>` precisa de `nofollow` (higiene de SEO).
46
-
47
- ## 4.7.0
48
-
49
- ### Minor Changes
50
-
51
- - 4ff812d: feat(core): `Text` aceita os atributos HTML da tag escolhida por `as`
52
-
53
- `TextInterface` estendia apenas `HTMLAttributes<HTMLElement>` — só os atributos **globais**. Atributos específicos de elemento ficavam de fora, então a variante `blockquote` existia sem que a fonte da citação (`cite`, de `BlockquoteHTMLAttributes`) pudesse ser declarada; em runtime o atributo já chegava ao DOM (`shouldForwardProp` → `isPropValid`), o bloqueio era só de tipo.
54
-
55
- `TextInterface<T>` agora é polimórfico: `T` é inferido do próprio `as` e os atributos nativos vêm da tag resolvida — `cite` em `blockquote`/`q`, `dateTime` em `time`, `value` em `li`, etc. Sem `as` (e em `TextInterface` sem argumento — `Label`, `Tooltip`, `labelProps`) o tipo cai no conjunto global de atributos, exatamente o contrato anterior: nenhum consumidor existente estreita. Em nome repetido (`color`, `width`, `height`, `type`), a prop da Apollion continua vencendo.
56
-
57
- Sem mudança de runtime nem de API: o consumidor deixa de precisar de spread com cast (`{...(citeAttr(url) as object)}`) para citar a fonte. Origem: feedback do consumidor Brasil 2030 (`web/ssg/pages/report/RetirementCard.tsx`, citação em `<figure>`/`<blockquote cite>`/`<figcaption>` conforme HTML §4.4.4).
58
-
59
- ### Patch Changes
60
-
61
- - 0e1aa6e: fix(core): `getContrastColor` escolhe o texto de maior contraste em fundos de tom médio
62
-
63
- `getContrastColor` usava um threshold fixo de luminância + um único candidato escurecido e podia escolher branco a ~3.6:1 sobre fundos de luminância média (ex.: `#708B97`), reprovando WCAG AA. Agora seleciona, entre o texto escuro tonalizado e o claro, o de maior contraste — escalando para o endpoint puro (`#000`/`#fff`) quando nenhum passa — garantindo AA (≥ 4.5) em qualquer fundo. Alinha `getContrastColor` à direção-por-contraste que `readableColor` já aplicava (math WCAG unificada em `contrastRatio`). Sem mudança de API; cores de marca/feedback que já passavam permanecem idênticas (0 churn de snapshot). Origem: feedback do consumidor Brasil 2030 (ADR-010 §12).
64
-
65
- ## 4.6.3
66
-
67
- ### Patch Changes
68
-
69
- - Sync `APOLLION_CORE_VERSION` with `package.json#version` (was still `4.6.1` after the 4.6.2 bump).
70
-
71
- ## 4.6.2
72
-
73
- ### Patch Changes
74
-
75
- - bc11147: fix(core): Storybook iframe empty in `storybook dev` — apply relative `publicPath` only on production builds
76
-
77
- ## 4.6.1
78
-
79
- ### Patch Changes
80
-
81
- - fix(core): `Image` e `Svg` emitem `width`/`height` como atributos HTML nativos
82
-
83
- `width`/`height` são props de dimensão do `SizeFactory` **e** atributos HTML
84
- nativos de elementos de mídia/vetor (`<img>`, `<svg>`). O `shouldForwardProp`
85
- global os removia do DOM, então os elementos renderizados saíam sem
86
- `width`/`height` — o PageSpeed acusa "image elements do not have explicit width
87
- and height" (risco de CLS) e SVGs "explodem" sem CSS de autor.
88
- - **`Image`**: `ImageStyle` passa a encaminhar `width`/`height` para o DOM.
89
- - **`Svg`**: novo `getNativeDims` deriva `width`/`height` nativos de
90
- `size`/`dimensions` **quando numéricos** e os emite via `attrs`. Valores
91
- CSS-only (`1em`, `auto`, `calc(...)`, `100%` fluido) seguem só como CSS.
92
-
93
- Ambos usam o novo predicado compartilhado `shouldForwardDimensionAttrs`, que
94
- reintroduz só esses dois atributos preservando o resto da regra do DS. Sem
95
- mudança de layout com CSS: os valores já eram aplicados como estilo; agora
96
- também chegam como atributos, reservando o espaço.
97
-
98
- ## 4.6.0
99
-
100
- ### Minor Changes
101
-
102
- - Move `styled-components` from `dependencies` to `peerDependencies` (`^6.0.0`) so the consumer app always owns the single `styled-components` instance.
103
-
104
- Previously the exact pin (`"styled-components": "6.4.1"`) prevented yarn from deduping against an app resolving a different `6.x` patch (e.g. `6.4.3`), installing a second nested copy under `@apollion-dsi/core/node_modules`. Two `styled-components` instances meant two React `ThemeContext`s: `<ApollionProvider>` set the theme on core's context while the app's own `styled()` read its own empty context, so `theme.breakpoints` was `undefined` and any `Grid`/`theme.breakpoints` consumer crashed.
105
-
106
- Also loosened the `react`/`react-dom` peer ranges from the exact `19.2.6` to `^19.0.0`.
107
-
108
- Note for consumers: `styled-components` is now a peer — apps must declare it directly (yarn Berry does not auto-install peers). Any app that already writes `styled()` against the Apollion theme already does.
109
-
110
- ## 4.5.1
111
-
112
- ### Patch Changes
113
-
114
- - 461d7a1: fix(core): sync `APOLLION_CORE_VERSION` with package version + README subpaths
115
- - `APOLLION_CORE_VERSION` was a stale hand-maintained literal: it reported
116
- `4.1.0` through the 4.2→4.5 releases (the published 4.5.0 build exposed
117
- `4.1.0` at runtime). Bumped to `4.5.0` and added `src/index.test.ts`, a
118
- drift guard that fails `validate` whenever the literal and
119
- `package.json#version` disagree.
120
- - README "Setup mínimo"/"Theming" still showed the pre-v4 barrel import
121
- (`import { ApollionProvider } from '@apollion-dsi/core'`), which throws under
122
- the subpaths-only barrel (ADR-006 §3.7 E7). Rewrote the examples to granular
123
- subpaths and added an explicit "Imports (v4 — subpaths-only)" section. The
124
- barrel removal stays intentional; only the docs were out of sync.
125
-
126
- ## 4.5.0
127
-
128
- ### Minor Changes
129
-
130
- - 1ebb3e3: Typography joins the `dimension` density axis — fixed root + `rem` scale (ADR-011)
131
- - **Fixed root:** `GlobalStyle` emits `html { font-size: 100% }` (16px) instead of
132
- the fluid `clamp(16px, 1vw + 12px, 28px)`. Product UI keeps stable reading
133
- density on ultrawide/4K — large screens gain columns/space, not inflated text.
134
- - **`createFont(input, dimension)`** mirrors `createSpacing`: the same
135
- `<ApollionProvider dimension>` knob (multipliers `0.20 / 0.25 / 0.32`) now
136
- drives type size, so spacing and typography scale together. `normal` is 1:1
137
- with the previous px scale (`small` 16px → `1rem`).
138
- - **Breaking (type):** `theme.font.fontSize.*` changed `number` → `string` (CSS
139
- `rem`). Additive `theme.font.fontSizePx.*` carries the effective px for layout
140
- math (e.g. `height = fontSizePx.small * ratio`). Style code that concatenated a
141
- manual `px` suffix (`` `${theme.font.fontSize.small}px` ``) must drop it.
142
- - **Tokens:** font left the axis-invariant `base` set — it is now emitted per
143
- dimension as `font.<dimension>` sets (symmetric with `spacing.<dimension>`),
144
- with `font.size.*` carrying the resolved `rem` value for that density.
145
-
146
- ## 4.4.0
147
-
148
- ### Minor Changes
149
-
150
- - 1d0fcc6: feat(form): add `Switch` component — on/off toggle for immediate-effect settings.
151
-
152
- Mirrors the `Checkbox`/`Radio` anatomy (`DefaultInputInterface`, semantic
153
- `variant`, `label`/`labelProps`) and adds a `size` axis (`small`/`medium`/`large`).
154
- Renders a native `<input type="checkbox" role="switch">`, keyboard-focusable
155
- (Tab + Space), with a sliding thumb. Ships stories, tests (variant × size
156
- snapshots), `README.mdx` + `README.AI.md`, barrel + generated subpath export
157
- (`@apollion-dsi/core/form/switch`), and catalog/doc updates.
158
-
159
- ## 4.3.1
160
-
161
- ### Patch Changes
162
-
163
- - ADR-010 follow-up: o elemento `Link` agora mira **AA + margem** (~5:1 contra `baseLight`) ao tornar a cor de acento legível via `readableColor`, garantindo ≥ AA também em superfícies levemente diferentes do `baseLight` — footer (`neutral.5`), cards, etc. A v4.3.0 mirava 4.5:1 contra `baseLight` e caía para ~4.42:1 no footer (sub-AA). `readableColor` ganha cobertura de teste da margem.
164
-
165
- ## 4.3.0
166
-
167
- ### Minor Changes
168
-
169
- - ADR-010: `txtOn` por contraste de luminância (`getContrastColor`) — on-color **dark-mode-stable** para superfícies sólidas (marca + feedback/action + interface.function). Corrige o "escuro-no-escuro" em fundos de marca fixos (`main`) no dark mode: o texto agora deriva da luminância do próprio fundo, não do par `baseLight`/`baseDark` que o dark mode troca.
170
-
171
- Novos tokens Foundation (aditivos): `bg.brand`, `text.onMain`, `text.onOpposite`, `text.onComplementary`.
172
-
173
- Novo helper `readableColor(color, background, minRatio?)` (export de `themes/colors`) — ajusta a luminância OKLch de uma cor de acento até passar o piso WCAG contra um fundo, **preservando hue/croma** (diferente de `getContrastColor`). Aplicado no elemento `Link`: links de marca agora ficam legíveis sobre fundos escuros (dark mode) sem perder a cor.
174
-
175
- ## 4.2.0
176
-
177
- ### Minor Changes
178
-
179
- - feat(form): `Checkbox`/`Radio` string labels render with DS typography; new `labelProps`
180
-
181
- String labels now render through the DS `BaseText` styles instead of raw text,
182
- and the new optional `labelProps` lets consumers override the label typography
183
- (`fontSize`, `color`, `fontWeight`, …). `ReactNode` labels are rendered as-is,
184
- unchanged.
185
-
186
- - feat(themes): native dark mode in `ApollionProvider` + `useApollionTheme`
187
- - `ApollionProvider` now implements the mode API its types already advertised:
188
- the `lightTheme`/`darkTheme` pair, controlled `themeMode` +
189
- `onThemeModeChange`, `useSystemPreference` (watches `prefers-color-scheme`,
190
- SSR-safe) and `toggleTheme` via the new `useApollionTheme()` hook. The single
191
- `theme` prop keeps working unchanged.
192
- - Dark-mode contrast fixes: the `Tabs` header divider now uses a mode-symmetric
193
- gray (`grayscale.30`), and `InputSelect` no longer hardcodes white — the
194
- control and menu follow the same surface tokens as the other inputs
195
- (`grayscale.0`/`baseLight`).
196
- - Vendor isolation now also blocks `import type` of vendored libs, enforced
197
- via `@typescript-eslint/no-restricted-imports` in the package lint config.
198
- - Internal: the `entities/` folder was dissolved — the SSR-safe window helpers
199
- (`$window`, `$documentBody`, `canuseDom`) moved into `utils` (still exported
200
- via `@apollion-dsi/core/utils`); the unused `debounce`/`timer` entities were
201
- removed (never part of the public API).
202
- - Storybook: stories renamed to `<Component>.story.tsx` and new `Flex`/`Grid`
203
- stories (not part of the published bundle).
204
-
205
- ### Patch Changes
206
-
207
- - 3321f56: fix(core): correct three DataTable/Calendar visual bugs
208
- - **DataTable EmptyState** now centers horizontally. The 80%-wide empty block
209
- was pinned to the left because the flex container (a `BaseContainer`, which
210
- defaults to `flex-direction: column`) lacked `align-items: center` on its
211
- cross axis.
212
- - **DataTable pagination** no longer renders an empty scroll region when the
213
- page size grows. The virtualizer now targets the element that actually
214
- scrolls — `CustomScroll`'s inner node, exposed via a new optional
215
- `scrollableRef` prop — instead of the non-scrolling outer container, so
216
- `getScrollElement` reads the correct `scrollTop`/`clientHeight` and receives
217
- scroll events.
218
- - **Calendar** renders the day number on a day that is simultaneously today and
219
- selected. A CSS specificity collision painted the number in `primary.base`
220
- over the selected `primary.base` background (invisible); the today rule now
221
- excludes selected days so the selected contrast color wins.
222
-
223
- - b3cf796: fix(core): seed type-aware empty defaults in `Form` so fields mount controlled
224
-
225
- `Form` passed `defaultValues: { ...initialValues }` to `useForm`, so a field
226
- without an `initialValues` entry mounted with `value={undefined}` (uncontrolled)
227
- and flipped to controlled on the first change — triggering React's
228
- "changing an uncontrolled input to be controlled" warning. The new
229
- `buildDefaultValues` helper seeds every field with a type-aware empty value
230
- (`false` for checkbox/radio, `''` otherwise — same convention as `Field` reset),
231
- with `initialValues` taking precedence. No public API change.
232
-
233
- ## 4.1.0
234
-
235
- ### Minor Changes
236
-
237
- - d18737c: Add `DescriptionList` + widen `Field` hint props to `ReactNode` — closes two open "Gaps Apollion" tracked by DEX-Aggregator.
238
- - **`DescriptionList`** (`@apollion-dsi/core/data-display/description-list`) — new `data-display` component: semantic key/value list (`<dl>`/`<dt>`/`<dd>`) under an optional title, `direction="row" | "column"`. Both `key` and `value` accept `ReactNode`. Absorbs the recurring "key/value card under a title" pattern that clients reimplemented locally (DEX-Aggregator `InfoCard`, ~210 LOC duplicated across 7 screens). Full doc surface (TSDoc + Storybook + README.mdx + README.AI.md) + unit tests.
239
- - **`Field` hint props accept `ReactNode`.** `hintText`, `hintSuccessText` and `hintErrorText` widen from `string` to `React.ReactNode` (backward-compatible — `string ⊂ ReactNode`). Unblocks inline hint affordances — an action button ("use max"), a daily-limit `Text` — that previously had to render as a sibling outside `Field`, blocking deletion of the consumer wrapper (DEX-Aggregator `InputTextAdapter`).
240
-
241
- No breaking change. `@apollion-dsi/tokens` bumps in lockstep (`.changeset/config.json#fixed`).
242
-
243
- - 063e0e9: Align `@apollion-dsi/tokens` DTCG output with the Design Tokens Format Module 2025.10.
244
- - **Structured values:** `color` `$value` is now an OKLch object `{ colorSpace, components, hex, alpha? }` and `dimension` is `{ value, unit }` (was bare hex / length strings).
245
- - **Typed IR:** a single intermediate representation (`src/ir.ts`) drives the JSON/CSS/TS renderers as pure projections.
246
- - **Reference graph:** JSON emits a `color` primitives layer (structural SSOT) and foundation `bg`/`text` colours reference it via DTCG aliases (`{color.primary.base}`), with inline fallback when a resolved value diverges (e.g. surface inversion).
247
- - **Composite tokens:** `border` (dimension / strokeStyle), `typography` (fontFamily / fontWeight / number + dimension) and `shadow` (DTCG shadow composite) now ship; values DTCG cannot model (em `letterSpacing`, `textTransform`, `fontStyle`, `100%` radius) travel in `$extensions` under `com.apollion.*`.
248
-
249
- `@apollion-dsi/core` now exports the `themes/{border,depth,font}` subpaths so tokens consumes them as the single source of truth.
250
-
251
- CSS/TS outputs for the existing `bg`/`text`/`spacing` layers are byte-identical; JSON is the spec-interop surface.
252
-
253
- ## 4.0.0
254
-
255
- ### Major Changes
256
-
257
- - bd7d6cb: # v4.0.0 — OKLch + Dimension + Token Split
258
-
259
- The v4 epic per [ADR-006](../packages/core/docs/adr/ADR-006-v4-oklch-dimension-token-split.md) + [PRD-002](../packages/core/docs/prd/PRD-002-v4-epic-execution.md). DS-from-scratch (Q-G grilling 2026-05-24); no consumer migration. Greenfield adoption via [MIGRATION-v4.md](../packages/core/docs/migration/MIGRATION-v4.md).
260
-
261
- ## Breaking — `@apollion-dsi/core@4.0.0`
262
- - **Root barrel removed.** `import { Button } from '@apollion-dsi/core'` no longer works. Use granular subpaths (`@apollion-dsi/core/elements/button`). ESLint rule flips warn → error. ADR-001 Slice 6 finalized here. ADR-006 §3.7 E7.
263
- - **OKLch palette derivation.** All `mount*Colors` helpers + `getOppositeColor` migrated from `color@5` RGB lerp to `culori@4` OKLch lerp. Validated by `spike/culori-oklch-lerp-parity` (0 unexpected regressions; greyscale 19× more uniform in OKLAB L). ADR-006 §2 B1 + §6 S2.
264
- - **`defaultInputColors.opposite` token value changed.** OKLch hue rotation differs from HSL rotation (the OKLch is the perceptually correct opposite). Audit `theme.colors.opposite.*` consumers.
265
- - **Dimension axis added.** `<ApollionProvider dimension="compact|normal|spacious">` is a new prop; default `normal` preserves v3.x spacing byte-exact. ADR-006 §6 S3.
266
- - **`vendors/Color` eliminated.** Internal `color@5` vendor deleted (zero call-sites after S6 migration). `color` + `@types/color` removed from `package.json#dependencies`. WCAG functions migrated to `culori.wcagContrast` + `culori.wcagLuminance` (100% bit-exact parity per `spike/culori-wcag-parity`).
267
- - **`invertForSurface(theme, surface, mode)` 3-arg signature.** `mode` is additive optional — existing 2-arg calls continue to work; `mode` is a placeholder for future PRD-003 mode-aware inversion. ADR-006 §6 S6.
268
-
269
- ## Minor — `@apollion-dsi/eslint-config`
270
- - `culori` + `zod` added to `VENDORED_V4_LIBS` — must import via `vendors/Culori|Zod`.
271
- - `color` removed from `VENDORED_T2_LIBS` (eliminated).
272
- - `no-restricted-imports` for `'@apollion-dsi/core'` root: `warn` → `error` (per v4 barrel removal above).
273
-
274
- ## Major — `@apollion-dsi/tokens@4.0.0` (first release)
275
-
276
- New package — framework-agnostic design tokens consumed via `runtime/v1` versioned API + `apollion-tokens build` CLI.
277
- - **Strangler Fig builders** duplicated from core (`colors.ts`, `spacing.ts`); Foundation + Surface re-exported. Parity enforced by `__tests__/parity.test.ts`. ADR-006 §3.1 + §6 S4.
278
- - **Atomic + idempotent build CLI.** `apollion-tokens build [--check] [--verbose] --config <path> [--out <dir>]`. Emits `dist/{css,json,ts}/*` + `dist/manifest.json` with sha256 audit trail. Rerun byte-identical. `--check` mode for CI gate. ADR-006 §3.5 + §6 S5.
279
- - **DTCG-compliant JSON output** (tech-radar R1).
280
- - **`as const` TypeScript output** (tech-radar R4).
281
- - **CSS `@property` declarations** (tech-radar R3) + custom properties `--apollion-{layer}-{role}-{variant}`.
282
- - **Sandboxed `apollion.config.mjs` loader** (`node:vm` + zod schema) — threat-model T2+E1 mitigation. ADR-006 §3.8 B3 + §6 S6.
283
- - **Lockstep version** with `@apollion-dsi/core` via `.changeset/config.json#fixed`.
284
-
285
- ## Minor — `@apollion-dsi/scripts`
286
- - `codemods/v4-migrate.mjs` — one-way codemod (Q-G10: no `--revert`; DEX/Jovian/Fanaticofc don't consume v3.x, no legacy to revert). Transforms `invertForSurface` to 3-arg, flags `createTheme` for manual hoist to `apollion.config.mjs`. Transcript JSONL audit log.
287
- - `verify-no-install-scripts.js` — supply-chain hardening; blocks `preinstall`/`install`/`postinstall` in `@apollion-dsi/*` workspaces (threat-model E2 mitigation).
288
-
289
- ## Spike validation (preserved local, NOT merged to main)
290
- - `spike/culori-wcag-parity` — 100.0000% bit-exact culori vs color@5 (262 measurements / 10 palettes). `vendors/Color` elimination LOCKED.
291
- - `spike/culori-oklch-lerp-parity` — 0 unexpected regressions in 68 deltas; greyscale ramp 19× more uniform in OKLAB L. DECISION ✅ PROCEED.
292
-
293
- - 879eedd: feat(core)!: ADR-007 S6 — hard cut Formik+Yup vendors (v4.0.0)
294
-
295
- Completa a migração ADR-007 com a remoção definitiva do legacy stack
296
- Formik+Yup. Vendors removidos, deps dropped, ESLint VENDORED_LIBS limpo.
297
-
298
- **Removidos:**
299
- - `packages/core/src/vendors/Formik/` — 4 arquivos (component.ts, interface.ts, index.ts, README.md).
300
- - `packages/core/src/vendors/Yup/` — 4 arquivos (mesmo padrão).
301
- - `formik@2.4.9` removido de `packages/core/package.json#dependencies`.
302
- - `yup@1.7.1` removido de `packages/core/package.json#dependencies`.
303
- - `formik` + `yup` removidos de `packages/eslint-config/index.js` `VENDORED_T1_FORM_LIBS`.
304
- - `yarn.lock` shrunk em ~932 KiB (-9 transitive packages).
305
-
306
- **Estado pós-S6:**
307
- - 0 imports diretos de `formik`/`yup` em `packages/core/src/**` e `website/src/**`.
308
- - `corepack yarn workspace @apollion-dsi/core run check-types`: ✅
309
- - `corepack yarn workspace @apollion-dsi/core run lint`: ✅
310
- - `corepack yarn workspace @apollion-dsi/core run validate:tests`: ✅ 317 passed (1 skipped pre-existente), 59 snapshots OK.
311
- - `corepack yarn workspace @apollion-dsi/website run build`: ✅
312
- - Bundle form-basic/form-form/form-dynamic: 422 kB First Load JS (unchanged vs S3 — Formik/Yup já eram dead code desde S3).
313
-
314
- **Status ADR-007:** ✅ Implemented. Todos S0-S6 mergeados.
315
-
316
- **Achado de sessão:** ADR-006 v4 epic já estava ✅ Implemented (2026-05-25,
317
- commit `4188501`). O "gate v4.0.0" para S6 era apenas pendência de
318
- execução, não bloqueio externo. S6 executado imediatamente.
319
-
320
- **Trabalho restante (fora do escopo ADR-007):**
321
- 1. `corepack yarn version` — consolida changesets queued, bumpa
322
- `@apollion-dsi/core@3.0.0 → 4.0.0` (lockstep com `@apollion-dsi/tokens`).
323
- 2. `corepack yarn release` — npm publish com `--provenance` (ADR-006 §AI-7).
324
- 3. Visual regression 3-browser full pass na CI antes do release.
325
-
326
- **Breaking changes consumer-facing (já documentados em MIGRATION-v4.md §1-§8):**
327
- - `validation` prop em `<Form fields>` agora aceita `ZodTypeAny` (era Yup).
328
- - `validateOnChange`/`validateOnBlur` booleans → `mode?: Mode` enum.
329
- - `onError(errors)` recebe `FieldErrors` (era `FormikErrors`).
330
- - `handleSubmit(values, methods)` recebe `UseFormReturn` no 2º arg (era `FormikHelpers`).
331
- - `FormRef` type aponta para `UseFormReturn<any>` (era `FormikProps<any>`).
332
- - `formik` + `yup` removidos de transitive deps — consumers que importavam diretamente do core via barrel devem trocar para `import { z } from 'zod'` / `import { useForm } from 'react-hook-form'` direto.
333
-
334
- Ver `packages/core/docs/adr/ADR-007-form-stack-rhf-zod.md` §6 Slice 6 +
335
- `packages/core/MIGRATION-v4.md` para guia consumer-side completo.
336
-
337
- - e2abc9c: feat(core)!: ADR-008 — router-agnostic polymorphic Link (v4.0.0)
338
-
339
- `<Link>` deixa de depender de `react-router-dom`. Refactor para polymorphic
340
- component via prop `as` — default `<a>` nativo; consumer passa
341
- `as={NextLink}`/`as={RouterLink}`/`as={RemixLink}` para SPA navigation.
342
-
343
- **Removidos:**
344
- - `packages/core/src/vendors/ReactRouterDom/` (4 files).
345
- - `react-router-dom@7.15.0` de `packages/core/package.json#dependencies`.
346
- - `react-router-dom` de `packages/eslint-config/index.js` `VENDORED_T1_DATA_LIBS`.
347
- - `<MemoryRouter>` wrapper de `website/pages/_app.jsx` (era só para satisfazer Link RRD-based).
348
- - Yarn lockfile shrunk **−4.17 MiB** (−4 packages: `react-router-dom`, `react-router`, `cookie`, `set-cookie-parser`).
349
-
350
- **Refatorados:**
351
- - `elements/Link/Link.tsx` — single render path; `effectiveAs = isExternal ? 'a' : as`; dropped `getRoute()` helper.
352
- - `elements/Link/Link.style.ts` — `LinkStyle` + `LinkButtonStyle` base em `baseStyled.a`; styled-components forward `as` prop. Eliminados styles redundantes (`ExternalLinkStyle`, `ExternalLinkButtonStyle`).
353
- - `elements/Link/Link.interface.ts` — drop `Partial<LinkProps>`; add `as?: React.ElementType` + `to?: any`.
354
- - `elements/Link/Link.test.tsx` — drop `<Router>` wrapper + `jest.mock('react-router-dom')`.
355
- - `elements/Link/story.tsx` — drop `MemoryRouter` decorator.
356
- - `elements/List/story.tsx` — drop `MemoryRouter` decorator (era scaffolding-only).
357
- - `elements/List/List.tsx` — `<Link to={item.to}>` → `<Link href={item.to}>`.
358
- - `elements/Link/README.mdx` + `README.AI.md` — rewrite com pattern `as={NextLink}` / `as={RouterLink}`.
359
- - `hooks/useUnload/README.mdx` — remove exemplo legacy com `<Prompt>` (Prompt nem existe em react-router v6+).
360
-
361
- **Bundle delta (Next.js First Load JS, website pós-build):**
362
-
363
- | Page | Pre | Post | Δ |
364
- | ------------------- | -----: | -----: | -------------: |
365
- | `form-basic` | 422 kB | 410 kB | −12 kB / −2.8% |
366
- | `form-form` | 422 kB | 410 kB | −12 kB / −2.8% |
367
- | `form-input-select` | 411 kB | 399 kB | −12 kB / −2.9% |
368
- | Shared chunks | 211 kB | 199 kB | −12 kB / −5.7% |
369
-
370
- **12 kB real savings** em todas pages do website — `react-router-dom` saía amortizado em shared chunks. Aplica também a consumers externos que não usavam RRD (Next.js, Remix). Contraste com ADR-007 (Form migration) que ficou em +1.2%.
371
-
372
- **Breaking change consumer-facing** (documentado em MIGRATION-v4.md §ADR-008):
373
- - `<Link to="/x">` sem `as` vira no-op silencioso. Migrar para `<Link as={RouterLink} to="/x">` ou `<Link href="/x">`.
374
- - `<MemoryRouter>` wrappers que só existiam para satisfazer DS Link podem ser removidos.
375
-
376
- **Validation:**
377
- - check-types ✅ / lint ✅ / 317 tests ✅ / 59 snapshots ✅ / core build ✅ / website build ✅
378
- - 0 imports de `react-router-dom` em `packages/core/src/**` e `website/src/**` (only docs/JSDoc examples remain — legítimos).
379
-
380
- ROADMAP entry "Router-agnostic Link" → ✅ COMPLETE. ADR-008 Status → ✅ Implemented.
381
-
382
- Ver `packages/core/docs/adr/ADR-008-router-agnostic-link.md` para análise completa + `packages/core/MIGRATION-v4.md` §ADR-008 para guia consumer-side.
383
-
384
- ### Minor Changes
385
-
386
- - 32f7a1d: feat(themes): ADR-002 Slice 2 — Semantic alias layer
387
-
388
- Adds `theme.semantic` — the intent-named token layer that mirrors Aplica DS
389
- taxonomy (`semantic.<category>.<group>.<state>.<property>`) and derives
390
- from the existing structural theme without breaking it.
391
-
392
- Public API:
393
- - `theme.semantic.color.feedback.{success|danger|warning|information}.{bg|txtOn|border}`
394
- - `theme.semantic.color.interface.function.{primary|secondary|tertiary}.normal.{bg|txtOn}`
395
- - `theme.semantic.color.brand.{first|second|third}.default.{surface|txtOn}`
396
- - `theme.semantic.dimension.spacing.{zero..giant}` (pre-resolved CSS strings)
397
- - `createSemantic(input)` helper — pure, idempotent, no side-effects
398
- - Granular subpath import: `@apollion-dsi/core/themes/semantic`
399
-
400
- Backward-compatible: `theme.colors.*`, `theme.spacing(...)` and all other
401
- structural tokens remain untouched. Components migrate at their own pace.
402
-
403
- Also fixes a latent regression in `scripts/generate-exports.js` that would
404
- overwrite `package.json#sideEffects` (currently `false` since the v3.0.0
405
- side-effects-free refactor) back to the legacy allow-list.
406
-
407
- See `packages/core/docs/adr/ADR-002-layered-theme-aliases-and-surface.md`
408
- §3, §6 (Slice 2), §9 (grill-with-docs validations).
409
-
410
- - 2dadba5: feat(themes): ADR-002 Slice 3 — Foundation alias layer
411
-
412
- Adds `theme.foundation` — ergonomic short aliases over Semantic, designed
413
- as the **default layer for product code** (DEX, Jovian, Fanaticofc).
414
-
415
- Public API:
416
- - `theme.foundation.bg.{primary, secondary, tertiary, success, danger, warning, info}`
417
- - `theme.foundation.text.{onPrimary, onSecondary, onTertiary, onSuccess, onDanger, onWarning, onInfo}`
418
- - `theme.foundation.spacing.{xs, sm, md, lg, xl, xxl}` (pre-resolved CSS strings)
419
- - `createFoundation(semantic)` helper — pure, idempotent (ADR-002 §9 contract)
420
- - Subpath import: `@apollion-dsi/core/themes/foundation`
421
- - Cheatsheet: `packages/core/src/themes/Foundation/README.md`
422
-
423
- Layer-of-choice rule (CONCEPTS.md §3):
424
- - Product code → Foundation
425
- - Core components → Semantic
426
- - Engine internals → Structural (unchanged)
427
-
428
- Backward-compatible: no breaking change. Existing `theme.colors.*`,
429
- `theme.spacing(...)`, `theme.semantic.*` remain intact.
430
-
431
- Storybook MDX cheatsheet deferred (themes folder has no story precedent
432
- in repo) — replaced by Markdown cheatsheet co-located with the layer.
433
-
434
- See `packages/core/docs/adr/ADR-002-layered-theme-aliases-and-surface.md`
435
- §3, §6 (Slice 3).
436
-
437
- - 820a612: feat(themes): ADR-002 Slice 4 — Surface inversion (positive / negative)
438
-
439
- Adds contextual surface inversion for Semantic + Foundation **without
440
- touching Structural**, resolving the "dark card on light page" hack
441
- documented in ADR-002 §2.
442
-
443
- Public API:
444
- - `<SurfaceProvider surface="positive" | "negative">` — lightweight wrapper
445
- for subtree inversion (preferred). Uses styled-components theme function
446
- pattern (ADR-002 §9 grill-with-docs §1).
447
- - `invertForSurface(theme, surface)` — pure, idempotent helper (ADR-002 §9).
448
- - `ApollionProvider` now accepts `surface` prop for app-wide inversion.
449
- - New type: `SurfaceMode = 'positive' | 'negative'`.
450
- - Subpath import: `@apollion-dsi/core/themes/surface`.
451
- - Quick docs: `packages/core/src/themes/Surface/README.md`.
452
-
453
- Semantics of inversion (v1):
454
- - Structural (`theme.colors.*`, `theme.spacing(...)`) untouched.
455
- - `foundation.bg.{primary,secondary,tertiary}` → `colors.baseDark`.
456
- - `foundation.bg.<feedback>` → `colors.<feedback>.dark` (hue preserved).
457
- - `foundation.text.*` → `colors.baseLight` (always).
458
- - `semantic.color.brand.{n}.default.surface` → `colors.<brand>.dark`.
459
- - `semantic.color.feedback.<state>.border` → `colors.<state>.base`.
460
-
461
- Tests: 17 new cases including WCAG contrast sanity checks and subtree
462
- isolation (negative does not leak to siblings).
463
-
464
- Limitations (v1, deferred to ADR-003 / v4 epic):
465
- - Inversion is deterministic and ignores `themeMode` — Apollion v3.x has
466
- no algorithmic mode resolution yet. v4 will introduce "negative within
467
- the current mode" semantics per Aplica DS Mode × Surface matrix.
468
-
469
- Refs:
470
- - packages/core/docs/adr/ADR-002-layered-theme-aliases-and-surface.md §3.2, §6, §9
471
- - packages/core/src/themes/Surface/README.md (full cheatsheet)
472
-
473
- 🎉 ADR-002 epic complete (Slices 1-4 shipped, 3.0.0 → 3.3.0).
474
-
475
- - 75961a1: feat: novo `Calendar` primitive + `InputDate` reescrito com popover Apollion-styled
476
-
477
- Substitui o antigo wrapper de `<input type="date">` nativo por um popover
478
- Apollion-styled. Resolve dois problemas distintos:
479
- 1. **Bug crítico no `form/Input`**: o default `value = ''` em
480
- `Input.tsx:27` forçava todos os Inputs ao modo controlled mesmo quando
481
- o consumer passava apenas `defaultValue`. Afetava `InputDate`,
482
- `InputCurrency`, `InputMask`, etc. — sintoma reportado era "valor não
483
- atualiza ao selecionar". Fix cirúrgico + regressão em `Input.test.tsx`.
484
- 2. **Visual inconsistente cross-browser do `InputDate`**: o picker nativo
485
- variava de UA pra UA e Safari Desktop não tinha picker nenhum.
486
-
487
- Mudanças:
488
- - **Novo:** `elements/Calendar` — primitive de grid headless sobre
489
- `react-day-picker@9`. Modos `single`/`multiple`/`range`, locale via
490
- `date-fns` (default `ptBR`), `disabled`/`hidden` via `Matcher`. Não
491
- cuida de posicionamento — é grid puro. Stories Default/Range/Locale/MinMax.
492
- - **Refatorado:** `form/InputDate` — `Input[type=text readOnly]` + popover
493
- com `@floating-ui/react` + `Paper` + `Calendar`. API **drop-in**:
494
- `onChange: (e: ChangeEvent<HTMLInputElement>) => void` preservado via
495
- synthetic event (`target.value` em ISO `yyyy-MM-dd`). Adicional
496
- `onValueChange: (iso) => void` para código novo. Novas props: `locale`,
497
- `displayFormat`, `minDate`, `maxDate`, `disabledDates`.
498
- - **Fix:** `form/Input` deixa de forçar `value=""` quando consumer omite
499
- `value`. Permite `defaultValue` funcionar.
500
- - **Novo ícone:** `calendar` em `icons/Icons/categoryInterface.tsx`.
501
- - **Deps:** `react-day-picker@9.5.0`, `date-fns@4.1.0`. ~25 KB gzip.
502
- - **Subpath export:** `@apollion-dsi/core/elements/calendar` registrado em
503
- `package.json#exports`.
504
-
505
- Sem breaking change. Consumers existentes do `InputDate` (zero hoje em
506
- DEX/Jovian/Fanaticofc) continuam funcionando — `onValueChange` é o caminho
507
- novo recomendado.
508
-
509
- Ver `docs/ROADMAP.md` §🟡 Next ("Calendar primitive + InputDate refactor"
510
- ✅ COMPLETE 2026-05-27).
511
-
512
- - fba9a41: feat(core): DataTable absorbs faceted filters (per-column drill-down)
513
-
514
- ROADMAP §🟡 Next "DataTable absorption gaps" — 3rd sub-feature
515
- shipped (after pagination + tree expansion). Remaining: column
516
- reordering + detail-panel expansion (deferred — conflicts with
517
- fixed-row-height virtualizer).
518
-
519
- Shipped across 4 vertical slices (+ 2 visual baseline commits):
520
- - **S1** (`552e1ca`) — Vendor extension: added `getFacetedRowModel`,
521
- `getFacetedUniqueValues`, `getFacetedMinMaxValues` runtime exports
522
- and `ColumnFiltersState`, `FilterFn` type re-exports to
523
- `vendors/TanstackReactTable/`. Wrapper test grew from 15 to 21
524
- invariant cases (`TanstackReactTable.test.ts`).
525
- - **S2** (`865525c` + baseline `90ce176`) — DataTable wiring + filter
526
- UI + bonus dead-code fix. New `DataTable.filters.tsx` houses three
527
- pure sub-components anchored in `<Dropdown>` popovers off the
528
- header filter icon: - `SelectFilter` — multi-select checkboxes with counts (uses
529
- `getFacetedUniqueValues()`). - `RangeFilter` — 2 number inputs (uses
530
- `getFacetedMinMaxValues()` for placeholders). Apply debounced
531
- 200ms. - `TextFilter` — single input. Case-insensitive contains. Apply
532
- debounced 200ms. - `VARIANT_FILTER_FN` resolver maps
533
- `'select' → 'arrIncludesSome'`, `'range' → 'inNumberRange'`,
534
- `'text' → 'includesString'`. Consumer overrides via
535
- `Column.filterFn`.
536
-
537
- New styled `HeaderControls` grouper centralizes the filter + sort
538
- icon alignment in the header cell. Filter icon click stops
539
- propagation so it does NOT toggle sort. `useReactTable` spreads
540
- faceted helpers + columnFilters state conditionally on
541
- `hasAnyFilter` (derived from `columns.some(c =>
542
-
543
- c.filterVariant && !c.disableFilters)`) — zero overhead when no
544
- column opts in.
545
-
546
- **Bonus fix:** activates `Column.disableFilters` (was no-op for
547
- multiple cycles). Now hides the filter icon AND sets
548
- `enableColumnFilter: false` on the corresponding ColumnDef.
549
-
550
- Filter icon: `ellipsisH` (3-dot more-options) — DS icon registry
551
- has no `filter`/`funnel` icon; `ellipsisH` reads as "open options".
552
- A dedicated SVG can land later without changing the public API.
553
-
554
- Existing 5 DataTable visual baselines regen'd: the `<HeaderControls>`
555
- wrapper shifts the sort icon's spacing by `theme.spacing('xs')` on
556
- any sortable column, even when no filter chrome is rendered. The
557
- functional behavior is unchanged — click on the header still
558
- toggles sort.
559
-
560
- - **S3** (`2ce44ef` + baseline `b9fa130`) — New `FacetedFiltering`
561
- story with 4 columns showcasing all three variants + a
562
- `disableFilters` override. 9 new jsdom-observable smoke tests
563
- (mounts per variant, header text co-exists with chrome,
564
- `disableFilters` honored, controlled / initialColumnFilters,
565
- consumer filterFn override, default-off path).
566
- - **S4** (this commit) — README.mdx adds "Filtros por coluna
567
- (faceted)" section with variant table, controlled + uncontrolled
568
- examples, `filterFn` override pattern, and the i18n / pipeline /
569
- drill-down notes. README.AI.md grows by 5 rows (Column-level
570
- `filterVariant` + `filterFn` + DataTable-level
571
- `initialColumnFilters`, `columnFilters`, `onColumnFiltersChange`).
572
- `disableFilters` description corrected (was "exclude from global
573
- filter" — actually it opts the column out of the per-column filter
574
- pipeline AND hides the filter icon).
575
-
576
- New props on `DataTableProps` (all optional, default-off):
577
- - `initialColumnFilters?: ColumnFiltersState` — uncontrolled init.
578
- - `columnFilters?: ColumnFiltersState` — controlled state.
579
- - `onColumnFiltersChange?: OnChangeFn<ColumnFiltersState>` — controlled
580
- callback; also fires in uncontrolled mode as observer (via reused
581
- `useHybridState` helper from S2/S3 #8).
582
-
583
- New props on `Column<T>`:
584
- - `filterVariant?: 'select' | 'range' | 'text'` — opt-in switch +
585
- drives UI choice.
586
- - `filterFn?: FilterFn<T> | string` — custom filter logic override.
587
-
588
- Non-breaking for existing consumers — all new props default-off. The
589
- `Column.disableFilters` activation is technically observable but the
590
- declared semantics were already what the docs said; the no-op was the
591
- bug.
592
-
593
- 40 suites · 318 tests passing. Coverage 69.72 / 50.57 / 56.65 / 69.42
594
- (vs floors 68/48/53/67).
595
-
596
- - 3a90653: feat(core): DataTable absorbs pagination + expandable tree rows
597
-
598
- ROADMAP §🟡 Next "DataTable absorption gaps" — 2 of 4 sub-features
599
- shipped this cycle. The remaining 2 (column reordering, faceted
600
- filters) stay open for future cycles; detail-panel expansion is
601
- documented as a separate gap (conflicts with the fixed-row-height
602
- virtualizer).
603
-
604
- Shipped across 4 vertical slices:
605
- - **S1** (`e53fec6`) — Vendor extension: added `getPaginationRowModel`
606
- - `getExpandedRowModel` runtime exports and `PaginationState`,
607
- `ExpandedState`, `OnChangeFn` type re-exports to
608
- `vendors/TanstackReactTable/`. Closed the pre-existing wrapper-test
609
- gap (15 invariant cases mirror FloatingUI / TanstackReactVirtual S1
610
- pattern).
611
- - **S2** (`ac54bd8` + baseline `3d3a45e`) — Pagination: opt-in via
612
- `paginated: true`. New `PaginationRow` styled + `PaginationControls`
613
- pure component (`"Mostrando X-Y de Z"` + Anterior / page indicator /
614
- Próximo + page-size dropdown). Hybrid state pattern via new
615
- `useHybridState<T>` helper that unifies controlled/uncontrolled in a
616
- single `[value, setValue]` callsite. New `Paginated` story + 1
617
- visual baseline. 8 new tests.
618
- - **S3** (`808d162` + baseline `763bbe6`) — Expandable tree: opt-in
619
- via `getSubRows` callback. New `buildExpandColumnDef` helper mirrors
620
- `buildSelectableColumnDef`; expand toggle column injected leftmost
621
- (read order: "control the tree → select what you see → consume
622
- data"). Chevron indented by `row.depth * 16px`. `useHybridState`
623
- reused for `ExpandedState`. New `Expandable` story + 1 baseline. 5
624
- new tests.
625
- - **S4** (this commit) — README.mdx adds "Paginação client-side" +
626
- "Linhas expansíveis (modo tree)" sections with controlled +
627
- uncontrolled examples. README.AI.md props table extended with the
628
- 10 new props. ROADMAP entry stays in `🟡 Next` annotated with the
629
- shipped sub-features.
630
-
631
- New props on `DataTableProps` (all optional, default-off):
632
-
633
- Pagination:
634
- - `paginated?: boolean` — opt-in flag.
635
- - `initialPagination?: Partial<PaginationState>` — uncontrolled init.
636
- - `pagination?: PaginationState` — controlled state.
637
- - `onPaginationChange?: OnChangeFn<PaginationState>` — controlled
638
- callback; also fires in uncontrolled mode as observer.
639
- - `pageSizeOptions?: number[]` — default `[10, 25, 50, 100]`. Empty
640
- or single-element hides the page-size selector.
641
-
642
- Expandable (tree mode):
643
- - `getSubRows?: (row: T, index: number) => T[] | undefined` — opt-in.
644
- - `expandedColumnWidth?: number` — defaults to
645
- `selectableColumnWidth`.
646
- - `initialExpanded?: ExpandedState` — uncontrolled init (use `true`
647
- to expand all).
648
- - `expanded?: ExpandedState` — controlled state.
649
- - `onExpandedChange?: OnChangeFn<ExpandedState>` — controlled callback.
650
-
651
- Non-breaking for existing consumers — all new props default-off, none
652
- of the 21 existing DataTable visual baselines drift, public API of
653
- `DataTableProps` is purely additive.
654
-
655
- Strings (`"Mostrando X-Y de Z"`, `"Anterior"`, `"Próximo"`,
656
- `"{N} / página"`) hardcoded PT-BR — consistent with `EmptyTable`'s
657
- default `"Nada foi encontrado"`. Apollion has no i18n layer today;
658
- documented gap.
659
-
660
- 40 suites · 302 tests passing. Coverage `70.46 / 50.95 / 57.73 /
661
- 70.17` (vs floors `68 / 48 / 53 / 67`).
662
-
663
- - 5fca933: feat(core): swap `react-window` for `@tanstack/react-virtual` in DataTable
664
-
665
- ROADMAP §🟡 Next "Migrate ReactWindow → @tanstack/react-virtual" closes
666
- across 4 vertical slices:
667
- - **S1** (`456b13e`) — Scaffolded `vendors/TanstackReactVirtual/`
668
- re-exporting `useVirtualizer` + `Virtualizer` + `VirtualItem` from
669
- `@tanstack/react-virtual@^3.13.26`. 3 wrapper-invariant unit tests
670
- modeled on ADR-005 S2.
671
- - **S2** (`e04e6c4`) — Refactored `DataTable.tsx` virtualization block
672
- to use the hook via a small internal `VirtualizedRows` wrapper. The
673
- public `renderRow({ index, style })` callsite contract stayed
674
- stable. Dropped the file-level `@ts-ignore` and the inline
675
- `@ts-ignore TS2786` over the JSX block. Replaced
676
- `outerElementType={VitualScrollbar}` with direct
677
- `<VitualScrollbar ref={parentRef}>`. Added 4 jsdom-observable
678
- characterization tests (mount / headers / empty state). Refreshed
679
- one visual-regression baseline (`components-datatable--bordered`,
680
- 0.19% pixel drift on transform-vs-absolute border rendering).
681
- - **S3** (`04d9f7e`) — Added 8 wide-scope smoke tests: header chrome
682
- (title / hasHeader gating / search placeholder), header checkbox
683
- select-all + deselect cycles via `onRowSelect`, spacing-menu
684
- rendering, sortable-header click cycle.
685
- - **S4** (this commit) — Removed `vendors/ReactWindow/` and the
686
- `react-window` + `@types/react-window` deps. Flipped the
687
- `VENDORED_T1_UI_LIBS` allow-list in `@apollion-dsi/eslint-config`
688
- to replace `'react-window'` with `'@tanstack/react-virtual'` so the
689
- vendor-isolation rule keeps catching future direct imports outside
690
- `src/vendors/**`.
691
-
692
- Why the swap (driver):
693
- 1. **Same family as `@tanstack/react-table`** (already vendored). One
694
- fewer mental model, one fewer audit surface.
695
- 2. **React 19 + TS 6 compatibility.** `react-window` is class-component
696
- with an incompatible type shape — required `@ts-ignore TS2786` at
697
- the JSX site. Hook surface removes that debt.
698
- 3. **Variable-row-height unlocked.** `useVirtualizer` exposes
699
- `estimateSize: (i) => number` + opt-in `measureElement`. Future
700
- DataTable variable-row work (ROADMAP §🟡 "DataTable absorption
701
- gaps") needs no further vendor swap.
702
-
703
- Non-breaking for consumers — `DataTable<T>` public API
704
- (`data` / `columns` / `height` / `striped` / `bordered` / `hasHeader` /
705
- `onRowSelect` / `renderRow`-like callbacks via `Column.Cell`) stays
706
- identical. Bundle delta: react-window 1.8.11 + @types/react-window
707
- 1.8.8 (~7 KB shipped + types) out, @tanstack/react-virtual 3.13.26 +
708
- @tanstack/virtual-core 3.16.0 (~12 KB shipped) in. Net node_modules
709
- freed: 929 KiB.
710
-
711
- Coverage at the end of the swap: statements 69.95 / branches 49.69 /
712
- functions 56.08 / lines 69.63 — comfortably above the ratchet floors
713
- (68 / 48 / 53 / 67). +1 vendor test suite + 1 DataTable test suite (12
714
- cases total).
715
-
716
- - ea3dc3a: feat(core): swap `@tippyjs/react/headless` for `@floating-ui/react` in Tooltip + Dropdown
717
-
718
- ROADMAP §🟡 Next "Migrate TippyHeadless → @floating-ui/react" closes
719
- across 4 vertical slices, all landed in the same day:
720
- - **S1** (`f75e428`) — Scaffolded `vendors/FloatingUI/` re-exporting
721
- the runtime surface from `@floating-ui/react@^0.27.19`: 10 hooks
722
- (`useFloating`, `useInteractions`, `useClick`, `useHover`,
723
- `useFocus`, `useDismiss`, `useRole`), 2 components
724
- (`FloatingPortal`, `FloatingFocusManager`), 5 middleware (`arrow`,
725
- `offset`, `flip`, `shift`, `autoUpdate`), 4 types (`Placement`,
726
- `Strategy`, `MiddlewareData`, `OpenChangeReason`). 29 wrapper-
727
- invariant unit tests (singleton + runtime shape + type re-exports).
728
- - **S2** (`d61a111`) — Refactored `Tooltip.tsx` from `<Tippy
729
- render={…}>` to `useFloating + useInteractions([useHover(restMs: 40),
730
- useFocus(), useDismiss(), useRole({ role: 'tooltip' })])`. Added
731
- `useFocus` per Q2 of the grill so the tooltip also opens on Tab
732
- focus (a11y AAA). Arrow positioning is now inline at the callsite,
733
- reading `middlewareData.arrow.{x, y}` (Q3 option a). Tooltip gained
734
- its first `.test.tsx` (6 cases on the controlled `visible` path —
735
- jsdom can't observe uncontrolled hover/focus). Dropped the
736
- `@ts-ignore TS2786`.
737
- - **S3** (`681f73b`) — Refactored `Dropdown.tsx` to `useFloating +
738
- useInteractions([useClick({ enabled: !function-children }),
739
- useHover({ enabled: hoverable }), useDismiss(), useRole({ role })])`.
740
- Per Q1.a: `role: 'menu'` when `options` prop is passed, `role:
741
- 'dialog'` when arbitrary `content` — `useRole(context, { role })`
742
- injects the correct `aria-haspopup` and the floating-element role.
743
- Wraps the floating element in `<FloatingPortal>` +
744
- `<FloatingFocusManager modal={false} initialFocus={-1}>` (no trap,
745
- no auto-focus jump — preserves the legacy click-and-pick UX).
746
- Existing 5 tests in `Dropdown.test.tsx` pass unchanged. Dropped
747
- the `@ts-ignore TS2786`.
748
- - **S4** (this commit) — Removed `vendors/TippyHeadless/` and the
749
- `@tippyjs/react` dep. Flipped the `VENDORED_T1_UI_LIBS` allow-list
750
- in `@apollion-dsi/eslint-config` to replace
751
- `'@tippyjs/react/headless'` with `'@floating-ui/react'` so the
752
- vendor-isolation rule keeps catching future direct imports outside
753
- `src/vendors/**`. Removed the corresponding ROADMAP entry per the
754
- new convention (drop completed items instead of striking them
755
- through — see `7c2d253`).
756
-
757
- Why the swap (driver):
758
- 1. **`tippy.js` sem release ≥ 18 meses.** `floating-ui` is the de
759
- facto successor, maintained by the original Popper author whose
760
- library `tippy.js` already wrapped internally. Same family, zero
761
- functional regression in the consumer-facing surface.
762
- 2. **Explicit a11y.** Tippy didn't dictate ARIA. `useRole(context, {
763
- role })` injects `role="tooltip" | "menu" | "dialog"` plus the
764
- matching `aria-haspopup` / `aria-describedby` linkage via prop
765
- getters. A11y is now code, not hope.
766
- 3. **Composição visível.** `<Tippy interactive onClickOutside={…}>`
767
- packaged hover/click/focus/dismiss into a single opaque boolean.
768
- floating-ui demands `useInteractions([useClick, useHover, useFocus,
769
- useDismiss, useRole])` — the reader knows exactly which behaviors
770
- are wired. Tested invariants per `enabled` flag.
771
- 4. **Type ergonomics.** Pure hooks — no `@ts-ignore TS2786` (which
772
- was required in 2 sites with React 19 + TS 6).
773
-
774
- Non-breaking for consumers — `TooltipProps` and `DropdownProps`
775
- public surface unchanged. `interactive?: boolean` on `Tooltip` is
776
- kept as a `@deprecated` legacy no-op because floating-ui's tooltip is
777
- inherently interactive (hover/focus on the floating element doesn't
778
- trigger dismiss). `position` props now type as `Placement` from
779
- `@floating-ui/react` — same 12 string-literal values as Tippy.
780
-
781
- Bundle delta:
782
- - Out: `@tippyjs/react@4.2.6` + transitive `tippy.js@6.3.7` (~2.23 MiB
783
- on disk, ~16 KB shipped).
784
- - In: `@floating-ui/react@0.27.19` + transitive `@floating-ui/react-
785
- dom`, `@floating-ui/utils`, `tabbable` (~911 KiB on disk, ~11 KB
786
- shipped).
787
- - Net: ~5 KB shipped reduction; ~1.32 MiB node_modules freed.
788
-
789
- Coverage at the end of the swap: statements 70.25 / branches 49.97 /
790
- functions 57.37 / lines 70.01 — comfortably above the ratchet floors
791
- (68 / 48 / 53 / 67). +1 vendor test suite (29 cases) + 1 Tooltip test
792
- suite (6 cases).
793
-
794
- ### Patch Changes
795
-
796
- - 032f81c: docs: ADR-002 Slice 1 — CONCEPTS.md + README lineage
797
-
798
- Adds conceptual reference document covering the Layer Cake (Structural →
799
- Semantic → Foundation), 3-group communication model (Abstraction / Intent /
800
- Consumer), Learning Spiral with three personas, bilingual glossary (PT-BR /
801
- EN-US), and the Apollion ⇄ Aplica DS vocabulary map.
802
-
803
- Credits Fernando Poe (co-author of Apollion 2020, author of
804
- [Aplica DS](https://aplica.me/en/)) in a new Lineage & Acknowledgements
805
- section of the README.
806
-
807
- Doc-only. Zero API change.
808
-
809
- See `packages/core/docs/adr/ADR-002-layered-theme-aliases-and-surface.md` §6
810
- (Migration Plan, Slice 1).
811
-
812
- - c056ee3: chore(core,eslint-config): ADR-004 backfill — vendor `react-day-picker` + `date-fns` + InputDate hardening
813
-
814
- Pattern-guardian audit do commit `75961a1 Input Date` (Calendar primitive +
815
- InputDate refactor) flagueou 4 desvios vs Apollion gold standard. Backfill
816
- consolidado neste PR:
817
-
818
- **V1 — ADR-004 backfill (2 novos vendors, vendor count 16 → 18):**
819
- - **ReactDayPicker** (T1 UI, 4 files)
820
- - Absorbed runtime: `DayPicker`
821
- - Absorbed types: `DayPickerProps`, `Mode`, `DateRange`, `Matcher`,
822
- `PropsSingle`, `PropsSingleRequired`, `PropsRange`, `PropsRangeRequired`
823
- - Gap intencional: `useDayPicker` hook, `Modifier` API, plugins `addons`
824
- — reabsorver quando `InputDateTime`/`TimePicker` (ROADMAP) precisar.
825
- - **DateFns** (util tier, 4 files, novo `VENDORED_DATE_LIBS` na eslint-config)
826
- - Absorbed runtime: `format`, `parse`, `parseISO`, `isValid`
827
- - Absorbed locales: `ptBR`, `enUS`
828
- - Absorbed types: `Locale`
829
- - Gap intencional: `addDays`/`subDays`/aritmética, `formatDistance`/
830
- formatação relativa, locales adicionais — adicionar conforme demanda.
831
-
832
- Sites migrados (8 files): Calendar.tsx, Calendar.interface, Calendar.test,
833
- Calendar/story, InputDate.tsx, InputDate.interface, InputDate.test,
834
- InputDate/story.
835
-
836
- **V2 — `parseInputDate` removido** do barrel `form/InputDate/index.ts`:
837
- re-export vazava `date-fns` na public surface do DS (anti-pattern
838
- ADR-004). Sem consumers conhecidos. Consumers que precisem importam
839
- direto de `date-fns` no próprio package.
840
-
841
- **V3 — `InputDate.handleKeyDown` a11y**: rewrite blocklist → allowlist.
842
- Antes: `preventDefault` em tudo exceto Tab/Enter/Space — Esc, ArrowUp/Down/
843
- Left/Right, Home, End, PageUp/Down ficavam swallowed, quebrando
844
- `useDismiss({ escapeKey: true })`. Agora: `preventDefault` só em printable
845
- chars (`key.length === 1 && key !== ' '`); named keys bubblam livremente.
846
- WCAG 2.1.1 ok.
847
-
848
- **V4 — `buildSyntheticEvent` extraído** para `form/InputDate/buildSyntheticEvent.ts`:
849
- helper com cast-chain `as unknown as ChangeEvent` é fragile sob mudança
850
- de shape em majors do React. Novo arquivo dedicado + 6 testes de contrato
851
- runtime detectam drift cedo.
852
-
853
- **Determinismo visual**: `Calendar/story.tsx` agora pin `FIXED_TODAY`
854
- constant + `today`/`month` props nas 4 stories — baseline não drifta
855
- diariamente conforme `new Date()` muda (era 0.5%+ por dia, acima do
856
- threshold 0.1%).
857
-
858
- Backward-compatible runtime API. Validate verde
859
- (54 visual tests, 352+ unit tests, lint, typecheck, build).
860
-
861
- Refs:
862
- - `packages/core/docs/adr/ADR-004-vendor-isolation-policy.md` (status
863
- atualizado: 18 vendors após backfill)
864
- - `docs/ROADMAP.md` §"Calendar primitive + InputDate refactor" (hardening
865
- block adicionado)
866
- - `packages/core/src/vendors/ReactDayPicker/README.md` + DateFns/README.md
867
-
868
- - d032437: docs(core): ADR-004 / PRD-001 S0 — vendor isolation scaffold
869
-
870
- Approves ADR-004 (Vendor Isolation Policy) and PRD-001 (Vendor Isolation
871
- Execution). Adds the infrastructure that makes `packages/core/src/vendors/`
872
- internal-only:
873
- - `esbuild.js` skips `vendors/` in `findEntryPoints` so wrappers never
874
- become bundle entry points.
875
- - `scripts/check-vendors-not-published.js` (new) asserts the invariant
876
- post-build: no `lib/vendors/**` and no `./vendors/*` keys in
877
- `package.json#exports`. Wired into `validate.sh`.
878
- - `docs/CONCEPTS.md` gets a new §8 Vendor Isolation covering the canonical
879
- shape (`component.ts` / `interface.ts` / `index.ts` / `README.md`), hard
880
- rules, and rationale.
881
- - `ROADMAP.md` moves vendor isolation to 🔴 Now.
882
-
883
- `generate-exports.js` needed no change: its allow-list (`LEAF_CATEGORIES`,
884
- `UTIL_CATEGORIES`) already excludes `vendors/` by construction.
885
-
886
- No vendor wrappers in this slice. No API surface change. Doc + infra only.
887
-
888
- See `packages/core/docs/adr/ADR-004-vendor-isolation-policy.md` §6 (Migration
889
- Plan, Slice 0) and `packages/core/docs/prd/PRD-001-vendor-isolation-execution.md`.
890
-
891
- - 00e0525: feat(core,eslint-config): ADR-004 Slice 1 — T2 utils vendoring
892
-
893
- Vendor 8 T2 utility libs (re-export wrappers only) into
894
- `packages/core/src/vendors/<Lib>/`, migrating all direct imports across
895
- the core, and add a `no-restricted-imports` ESLint rule (severity `warn`)
896
- that enforces the policy in `@apollion-dsi/eslint-config`.
897
-
898
- **Vendored libs (T2 utils, 8 wrappers × 4 files):**
899
- - Nanoid (4 sites)
900
- - LodashDebounce (2)
901
- - ObjectHash (1)
902
- - Deepmerge (1)
903
- - Color (3 — incl. Surface.test.tsx)
904
- - FastDeepEqual (1)
905
- - EmotionIsPropValid (2)
906
- - StyledNormalize (1)
907
-
908
- **Each vendor ships with:**
909
- - `component.ts` — typed re-export of the absorbed surface
910
- - `interface.ts` — DS-owned contract (skeleton for S1; full opinionated
911
- shape will land per-lib in S2-S4 where DS opinion matters more)
912
- - `index.ts` — barrel
913
- - `README.md` — skeleton with `## What this vendor wraps` etc. — full
914
- pass in S5
915
-
916
- **ESLint rule (`@apollion-dsi/eslint-config`):**
917
- - Path-scoped to `packages/core/src/**/*.{ts,tsx}`
918
- - Allows direct upstream imports inside `packages/core/src/vendors/**`
919
- - Severity `warn` in S1-S5 (grace period); flips to `error` in S6
920
- - Other workspaces unaffected (paths don't match)
921
-
922
- **Backward-compatible:** vendors are internal (esbuild skips the folder,
923
- generate-exports.js doesn't list them, validate.sh's
924
- `check-vendors-not-published.js` keeps the invariant). Consumer-side import
925
- surface (`@apollion-dsi/core/elements/button` etc.) unchanged.
926
-
927
- Bundle delta target: ≤ 0 KB gzip (re-exports are inlined by esbuild).
928
-
929
- Refs:
930
- - `packages/core/docs/adr/ADR-004-vendor-isolation-policy.md` §6 Slice 1
931
- - `packages/core/docs/prd/PRD-001-vendor-isolation-execution.md` §S1
932
-
933
- - 1c87be8: feat(core,eslint-config): ADR-004 S2 — T1 UI primitives vendoring
934
-
935
- Vendor 4 T1 UI primitive libs into `packages/core/src/vendors/<Lib>/`
936
- and migrate 12 direct import sites. Extends the ESLint
937
- `no-restricted-imports` rule (warn) to cover the new vendors.
938
-
939
- **Vendored libs (T1 UI, 4 × 4 files):**
940
- - FramerMotion (6 sites: Modal, Notification × 3, Flex.style, Base.style)
941
- - Absorbed: `motion`, `AnimatePresence`, `MotionConfig`, `useReducedMotion`, `MotionProps`
942
- - Gap: gestures, drag, useAnimate, useScroll, layoutGroup (intentional — DS doesn't expose full expressiveness)
943
- - TippyHeadless (3 sites: Dropdown, Tooltip × 2)
944
- - Absorbed: `Tippy` default + `TippyProps`
945
- - Uses headless entry only (no embedded CSS)
946
- - ReactContentLoader (2 sites: ComposedSkeleton × 2)
947
- - Absorbed: `ContentLoader`, `BulletList`, `Code`, `Facebook`, `List`, `IContentLoaderProps`
948
- - ReactWindow (1 site: DataTable)
949
- - Absorbed: `FixedSizeList` only
950
-
951
- Backward-compatible. Bundle delta target ≤ +0.1 KB gzip per ADR-004 §6.
952
- Snapshot tests Modal/Notification (framer consumers) inalterados.
953
-
954
- Refs:
955
- - `packages/core/docs/adr/ADR-004-vendor-isolation-policy.md` §6 Slice 2
956
- - `packages/core/docs/prd/PRD-001-vendor-isolation-execution.md` §S2
957
-
958
- - d1192da: feat(core,eslint-config): ADR-004 S3 — T1 form/validation vendoring
959
-
960
- Vendor 3 T1 form/validation libs into `packages/core/src/vendors/<Lib>/`
961
- and migrate 13 direct import sites. Slice mais opinativo do épico
962
- ADR-004 — `interface.ts` faz o exercício real de "contrato ideal do DS,
963
- não espelho da lib" (ADR-004 §6 S3).
964
-
965
- **Vendored libs (T1 form/validation, 3 × 4 files):**
966
- - **Formik** (4 sites: Form.{interface,tsx,helpers}, Field.interface)
967
- - Absorbed runtime: `useFormik` apenas (DS expõe `Form`/`Field`/`FieldGroup` próprios)
968
- - Absorbed types: `FormikErrors`, `FormikHelpers`, `FormikProps`, `FormikSharedConfig`
969
- - Gap intencional: `<Field>`, `<FieldArray>`, `<ErrorMessage>`, `Formik`, `FormikProvider`, `useFormikContext`, `useField`, `withFormik`, wizards
970
- - **Yup** (4 sites: Form.{interface,tsx,helpers}, story.tsx)
971
- - Absorbed: namespace inteiro via `export *` — preserva padrão `import * as Yup`
972
- - Justificativa: Yup é DSL; restringir builders quebra expressividade
973
- - **ReactSelect** (5 sites: InputSelect.{tsx,interface}, DropdownIndicator)
974
- - Sync + `/async` consolidados em 1 wrapper
975
- - Absorbed runtime: `DefaultSelect`, `AsyncSelect`, `components`
976
- - Absorbed types: `DropdownIndicatorProps`, `ReactSelectProps` (re-export renomeado de `Props`)
977
- - Gap: `Creatable`, `formatGroupLabel`, `MenuListProps`, `MultiValue`, sortable
978
-
979
- ESLint rule estendida para cobrir `formik`, `react-select`,
980
- `react-select/async`, `yup` com severidade `warn` (flips em S6).
981
-
982
- Backward-compatible. Bundle delta target ≤ +0.1 KB gzip em `lib/form/form/`.
983
-
984
- Refs:
985
- - `packages/core/docs/adr/ADR-004-vendor-isolation-policy.md` §6 Slice 3
986
- - `packages/core/docs/prd/PRD-001-vendor-isolation-execution.md` §S3
987
-
988
- - 3194fba: feat(core,eslint-config): ADR-004 S4 — T1 data/routing vendoring
989
-
990
- Vendor 2 T1 data/routing libs into `packages/core/src/vendors/<Lib>/`
991
- and migrate 7 direct import sites.
992
-
993
- **Vendored libs (T1 data/routing, 2 × 4 files):**
994
- - **ReactRouterDom** (5 sites: Link.style, Link.interface, Link.test,
995
- List/story, Link/story)
996
- - Absorbed runtime: `Link`, `MemoryRouter` (stories + tests apenas)
997
- - Absorbed types: `LinkProps`
998
- - Gap intencional: tudo o mais. Decisão consciente (ADR-004 §9 Q3):
999
- DS não deve ditar router. Reabsorver é diff por símbolo + entrada
1000
- de roadmap. `BrowserRouter`, `Route`, `Routes`, `Outlet`,
1001
- `useNavigate`, `useLocation`, `useParams`, `NavLink`, `Navigate`
1002
- não absorvidos.
1003
- - **TanstackReactTable** (2 sites: DataTable.tsx multi-import + DataTable.interface)
1004
- - Absorbed runtime: `useReactTable`, `flexRender`, `getCoreRowModel`,
1005
- `getSortedRowModel`, `getFilteredRowModel`
1006
- - Absorbed types: `ColumnDef`, `Row`, `RowSelectionState`,
1007
- `SortingState`
1008
- - Gap: `getExpandedRowModel`, `getGroupedRowModel`,
1009
- `getPaginationRowModel`, `getFacetedRowModel` + types `Cell`,
1010
- `Header`, `Table`, `RowModel`, `Column`, etc. — features que
1011
- DataTable do core não suporta hoje.
1012
-
1013
- ESLint rule estendida (warn) cobrindo `@tanstack/react-table` e
1014
- `react-router-dom`.
1015
-
1016
- Backward-compatible. Validate target verde (180+ tests, snapshots
1017
- inalterados em DataTable/Link).
1018
-
1019
- Refs:
1020
- - `packages/core/docs/adr/ADR-004-vendor-isolation-policy.md` §6 Slice 4
1021
- - `packages/core/docs/prd/PRD-001-vendor-isolation-execution.md` §S4
1022
-
1023
- - f359982: docs(core): ADR-004 S5 — Vendor README full pass
1024
-
1025
- Preenche os 17 vendor READMEs (skeleton → completo) com 3 seções
1026
- padronizadas + atualiza ROADMAP com 6 entradas derivadas de gaps:
1027
-
1028
- **Cada vendor README agora tem:**
1029
- - `## What this vendor wraps` — npm link + versão exata + tabela
1030
- símbolo → tipo → uso no core
1031
- - `## DS Absorption Gap` — bullet do que ficou fora + rationale + link
1032
- ROADMAP quando candidato
1033
- - `## Replacement candidates` — libs concorrentes com trade-off explícito
1034
- - "When to consider" + triggers de troca quantificados
1035
-
1036
- **Novas entradas em ROADMAP.md (🟡 Next):**
1037
- 1. Migrate ReactWindow → @tanstack/react-virtual (Low burn, consolida ecosystem)
1038
- 2. Migrate TippyHeadless → @floating-ui/react (Medium burn, sucessor natural)
1039
- 3. Router-agnostic Link — remove react-router-dom dep (Medium, candidato ADR-006)
1040
- 4. DataTable absorption gaps (expandable rows, pagination, etc.)
1041
- 5. FormWizard absorption + Combobox replacement evaluation
1042
- 6. Zod/Valibot evaluation paired with form library refactor
1043
-
1044
- **Resolve numbering conflict:**
1045
- - ADR-003 (file) = Visual regression (não "v4 epic")
1046
- - ADR-005 = styled-components facade (placeholder)
1047
- - ADR-006 = v4 epic (OKLch + Dimension + token-only) — renomeado de "ADR-003"
1048
-
1049
- Remove entrada duplicada "Visual regression suite (Chromatic)" de 🟡 Next
1050
- (agora coberta por ADR-003).
1051
-
1052
- Doc-only. Sem mudança de código/API. Patch bump.
1053
-
1054
- Refs:
1055
- - packages/core/docs/adr/ADR-004-vendor-isolation-policy.md §6 Slice 5
1056
- - packages/core/docs/prd/PRD-001-vendor-isolation-execution.md §S5
1057
-
1058
- - 5d17ebc: feat(core, eslint-config): ADR-005 — styled-components vendor facade
1059
-
1060
- Closes the Vendor Isolation epic (ADR-004 §5 leftover). styled-components
1061
- becomes vendor #18 under `packages/core/src/vendors/StyledComponents/`,
1062
- following the same canonical 4-file shape used by the other vendors.
1063
-
1064
- **Core (`@apollion-dsi/core`):**
1065
- - New `vendors/StyledComponents/{component.ts, interface.ts, index.ts,
1066
- README.md, StyledComponents.test.ts}`. Wrapper re-exports the surface
1067
- consumed by the core (runtime: `styled`, `css`, `keyframes`,
1068
- `ThemeProvider`, `StyleSheetManager`, `createGlobalStyle`, `useTheme`;
1069
- types: `CSSObject`, `DefaultTheme`, `Interpolation`, `IStyledComponent`,
1070
- `RuleSet`, `Styled`).
1071
- - `DefaultTheme extends Theme` augmentation moved out of
1072
- `src/typings/index.d.ts` into the co-located `vendors/StyledComponents/
1073
- interface.ts`. `typings/index.d.ts` reduced to `@testing-library/jest-dom` - the legacy `react-table` module declaration.
1074
- - 62 sites under `src/**/*.{ts,tsx}` codemoded from `import ... from
1075
- 'styled-components'` to the vendor wrapper via the new
1076
- `scripts/migrate-styled-components-imports.js` helper. READMEs in
1077
- `containers/Base/README.{mdx,AI.md}` preserved — consumer-facing examples
1078
- must keep showing `from 'styled-components'`.
1079
- - `@types/styled-components@5.1.36` removed from `devDependencies` — dead
1080
- for `styled-components@6.x`, which ships its own `dist/index.d.ts`.
1081
- - Vendor test verifies (a) singleton — wrapper re-exports identical
1082
- upstream runtime references, (b) `Theme` `satisfies DefaultTheme` at
1083
- compile time, (c) `useTheme()` returns the `Theme`-shaped object injected
1084
- by `<ApollionProvider>`.
1085
-
1086
- **ESLint config (`@apollion-dsi/eslint-config`):**
1087
- - New `VENDORED_STYLED_LIBS = ['styled-components']` group folded into
1088
- `VENDORED_LIBS`. The existing `no-restricted-imports` rule now blocks
1089
- direct `from 'styled-components'` in `packages/core/src/**` (vendor
1090
- directory remains exempt). Severity `error` from day one — the codemod
1091
- guarantees zero violations before the rule activates, so the
1092
- warn-intermediate phase originally proposed in ADR-005 §6 S3 was
1093
- skipped (documented in ADR-005 §11.2).
1094
-
1095
- Non-breaking: consumer-facing API and `ApollionProvider` behavior
1096
- unchanged. See `packages/core/docs/adr/ADR-005-styled-components-vendor-facade.md`
1097
- §11 for the full set of deviations between the planned and executed slices.
1098
-
1099
- - 6545751: docs(core): ADR-007 — Zod v4 idiomatic corrections + shadow-PoC S1 wording
1100
-
1101
- Atualiza ADR-007 (Form stack migration) com correções pós grill-with-docs
1102
- (2026-05-27) sobre as APIs externas reais:
1103
- - **§S1 wording:** clarifica que S1 é **shadow-PoC em arquivo novo**
1104
- (`poc-rhf-zod.tsx`), NÃO migração do example atual. Examples atuais usam
1105
- `<Form>` do DS que ainda é Formik-backed em S0/S1 — migrar example exige
1106
- S2 (DS Form refactor) primeiro. Shadow-PoC destrava sem reverter ordem.
1107
- - **§S2 + §7 PoC code:** validation API muda de `validateOnChange`/
1108
- `validateOnBlur` booleans → `mode?: Mode` direto (breaking aceito em
1109
- v4.0.0). Mode type vendored em S0 follow-up.
1110
- - **§7 Yup→Zod mapping:** atualizado para Zod v4 idiomatic:
1111
- - `z.string().email()` → `z.email()` (top-level)
1112
- - `Yup.string().required()` → `z.string().min(1, 'msg')`
1113
- - `Yup.boolean().required()` → `z.boolean().refine((v) => v === true, ...)`
1114
- - `z.ZodIssueCode.custom` → `'custom'` string literal
1115
- - Nota sobre `z.unknown()` não ser optional por default em v4.
1116
- - **§7 BasicFormExample concrete mapping** adicionado — fonte de verdade
1117
- do S1 PoC schema.
1118
- - **§7 Zod v4 breaking changes table** adicionada com 10 entries cobrindo
1119
- todas as APIs usadas no PoC.
1120
- - **§8 Risks #6 atualizado:** validation API direct mode (não mais
1121
- mapping interno boolean→enum).
1122
- - **§8 Risks #9 + #10 adicionados:** Zod v4 `z.unknown()` não-optional
1123
- por default; `.refine()` removeu type narrowing via predicate.
1124
- - **§S0 marcado MERGED** com commits + 3 changesets gerados.
1125
- - **Status do ADR:** 📝 Proposed → 🚧 In Progress.
1126
-
1127
- Doc-lock cross-checked contra `.d.ts` locais de `react-hook-form@7.76.1`,
1128
- `@hookform/resolvers@5.4.0` e `zod@4.4.3`, suplementado com WebFetch de
1129
- zod.dev/v4/changelog.
1130
-
1131
- - 36eaf4a: feat(core): ADR-007 S0 follow-up — expose `Mode` type in ReactHookForm vendor
1132
-
1133
- Adiciona `Mode` (`'onSubmit' | 'onBlur' | 'onChange' | 'onTouched' | 'all'`)
1134
- ao surface re-exportado de `vendors/ReactHookForm/interface.ts`. Necessário
1135
- para `Form.interface.ts#FormCommonInterface['mode']` em S2 — substitui o par
1136
- booleano legado `validateOnChange?`/`validateOnBlur?` do Formik (decisão
1137
- fixada via tech-radar pass 2026-05-27).
1138
-
1139
- Surface change pequena, isolada à interface do vendor. Zero impacto
1140
- runtime — só types.
1141
-
1142
- Ver `packages/core/src/vendors/ReactHookForm/README.md` para tabela
1143
- atualizada.
1144
-
1145
- - 802828f: feat(core): ADR-007 S0 — react-hook-form vendor scaffold
1146
-
1147
- Adds `packages/core/src/vendors/ReactHookForm/` (4 arquivos no padrão
1148
- ADR-004): re-export tipado de `useForm`, `Controller`, `useFormContext`,
1149
- `useFieldArray` + bridge adapter `zodResolver` (de `@hookform/resolvers/zod`)
1150
- co-localizado para evitar dois call-sites distintos.
1151
-
1152
- Deps adicionadas (exact pin, latest stable):
1153
- - `react-hook-form@7.76.1`
1154
- - `@hookform/resolvers@5.4.0`
1155
-
1156
- Vendor wrapper isolado — ainda não consumido pelo core (S2 migra
1157
- `form/Form/Form.tsx`). Zero impacto runtime nesta slice. `vendors/Zod/`
1158
- já existe desde ADR-006 S6 e cobre a surface de schema requerida — sem
1159
- duplicação.
1160
-
1161
- Pre-flight verificado: lint, check-types e prettier verdes; sem violações
1162
- da regra `no-restricted-imports` (codemod do core acontece em S2).
1163
-
1164
- Ver `packages/core/docs/adr/ADR-007-form-stack-rhf-zod.md` §6 Slice 0
1165
- e `docs/ROADMAP.md` §🟡 Next "Form stack migration — Formik+Yup → RHF+Zod".
1166
-
1167
- - e14469c: feat(core): ADR-007 S2 — DS Form internals migrated Formik+Yup → RHF+Zod
1168
-
1169
- Migra os 4 arquivos core do `form/` do stack Formik+Yup para React Hook
1170
- Form + Zod, dentro do escopo de [vendors/ReactHookForm](src/vendors/ReactHookForm)
1171
- e [vendors/Zod](src/vendors/Zod) (ADR-004 vendor isolation). Single
1172
- commit no padrão "vertical-slice":
1173
-
1174
- **Arquivos migrados:**
1175
- - **`form/Form/Form.tsx`** — `useFormik({...})` → `useForm<any>({ resolver: zodResolver(schema), mode: mode ?? 'onSubmit', defaultValues })`. `useImperativeHandle(ref, () => methods)` agora expõe `UseFormReturn<any>` no lugar de `FormikProps<any>`. `Field` continua recebendo `value`/`errors`/`setFieldValue` via prop (paradigma controlled preservado via `methods.watch()` e `methods.setValue`).
1176
- - **`form/Form/Form.helpers.ts`** — `getValidationSchema` agora constrói `z.object(shape)`. Default fallback p/ fields sem `validation`: `z.unknown().optional()` (Zod v4 requer `.optional()` explícito — `z.unknown()` não é optional por default em object schemas, mudança vs v3). `prepareSubmit` assinatura aceita `UseFormReturn<any>` no lugar de `FormikHelpers`.
1177
- - **`form/Form/Form.interface.ts`** — types swap inteiro:
1178
- - `FormRef = FormikProps<any>` → `FormRef = UseFormReturn<any>` (breaking API ref — major bump em v4)
1179
- - `validateOnChange?: boolean` + `validateOnBlur?: boolean` → **REMOVIDOS**. Substituídos por `mode?: Mode` enum (`'onSubmit' | 'onBlur' | 'onChange' | 'onTouched' | 'all'`), default `'onSubmit'`. Mapping legacy em MIGRATION-v4.md (ADR-007 §S5).
1180
- - `validation?: any | (() => any)` → `validation?: ZodTypeAny`
1181
- - `onError?: (errors: FormikErrors<...>) => void` → `onError?: (errors: FieldErrors<...>) => void`
1182
- - Workaround `const a = Yup.string().required()` (tree-shake legacy) removido.
1183
- - **`form/Field/Field.interface.ts`** — `setFieldValue?: FormikHelpers<any>['setFieldValue']` → `setFieldValue?: UseFormSetValue<any>`. Nome da prop preservado para minimizar blast-radius nos primitives (`InputDate`, `InputSelect`, etc. continuam chamando `setFieldValue(name, value)` — assinatura compat). Renome `FormikBaseInterface` → `FormBaseInterface`.
1184
- - **`form/Form/story.tsx`** (Storybook) — `Yup.string().required('Required')` → `z.string().min(1, 'Required')`; `Yup.string().email()` → `z.email()`. Import de `vendors/Yup` removido.
1185
-
1186
- **Estado pós-S2:**
1187
- - `yarn workspace @apollion-dsi/core run validate:tests`: ✅ 317 passed (1 skipped pre-existente), 59 snapshots OK.
1188
- - `yarn workspace @apollion-dsi/core run check-types`: ✅ verde.
1189
- - `yarn workspace @apollion-dsi/core run lint`: ✅ zero violations.
1190
- - `yarn workspace @apollion-dsi/core run build` (esbuild + tsc + Storybook): ✅ verde.
1191
- - `yarn workspace @apollion-dsi/website run build` (Next.js): ✅ verde.
1192
-
1193
- **Website examples (`BasicFormExample`, `FormExample`, `DynamicFormExample`) ainda usam Yup schemas:**
1194
-
1195
- Type check passa via casting permissivo (`validation as ZodSchema`), mas runtime de submit no website QUEBRA (Yup schema sem `.parse()` → `zodResolver` throws). Render OK; submit broken until S3 migra os examples. Esperado per ADR-007 §S2 critério.
1196
-
1197
- **Bundle delta:** ainda não visível (Yup permanece importado pelos examples website até S3). Re-measure em S3 com examples + smoke pages atualizadas.
1198
-
1199
- Storybook stories (`Form/story.tsx`) já migradas — Storybook submit funciona end-to-end.
1200
-
1201
- **Vendors antigos `vendors/Formik/` + `vendors/Yup/`:** preservados sem uso interno até S6 (hard cut em v4.0.0). 0 imports de `formik`/`yup` em `packages/core/src/**` fora dos próprios vendor dirs.
1202
-
1203
- Ver `packages/core/docs/adr/ADR-007-form-stack-rhf-zod.md` §6 Slice 2.
1204
-
1205
- - 81cd55b: feat(website): ADR-007 S3 — migrate 8 form examples Yup → Zod + cleanup PoC/smoke
1206
-
1207
- Completa a migração end-to-end Formik+Yup → RHF+Zod no website:
1208
-
1209
- **6 example files migrados:**
1210
- - `website/src/examples/Components/Form/Form/index.tsx` — `BasicFormExample`, `FormExample` (15 fields), `DynamicFormExample` (8 fields + conditional).
1211
- - `website/src/examples/Components/Form/Field/index.tsx` — `FieldFormExample` (UploadCard).
1212
- - `website/src/examples/Components/Form/Inputs/Input/index.tsx` — `InputFormExample`.
1213
- - `website/src/examples/Components/Form/Inputs/InputDate/index.tsx` — `InputDateFormExample`.
1214
- - `website/src/examples/Components/Form/Inputs/InputMask/index.tsx` — `InputMaskDateExample`.
1215
- - `website/src/examples/Components/Form/Inputs/InputSelect/index.tsx` — `InputSelectExampleButton`.
1216
-
1217
- **Mapping aplicado** (consistente com MIGRATION-v4.md ADR-007 §S5):
1218
-
1219
- | Yup pattern | Zod v4 equivalent |
1220
- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
1221
- | `Yup.string().required('msg')` | `z.string().min(1, 'msg')` |
1222
- | `Yup.string().email('m1').required('m2')` | `z.email('m1')` (top-level v4) |
1223
- | `Yup.boolean().required('msg')` | `z.boolean()` (matches Yup loose `.required` semantics) |
1224
- | `Yup.number().required('msg')` | `z.coerce.number()` (HTML inputs return string) |
1225
- | `Yup.mixed().test('hasFile', 'm', fn)` | `z.unknown().refine(fn, { message: 'm' })` |
1226
- | `Yup.mixed().test(date).required()` | `z.string().min(1, 'Required').refine(dateValid, { message: 'm' })` |
1227
- | `Yup.string().required()` on InputSelect/FieldGroup (object/array stores) | `z.unknown().refine((v) => !!v, { message: 'Required' })` (preserve Yup permissive coercion) |
1228
-
1229
- **Cleanup:**
1230
- - ❌ `website/src/examples/Components/Form/Form/poc-rhf-zod.tsx` — deletado (shadow-PoC obsoleto; `BasicFormExample` agora cobre o mesmo pattern via DS `<Form>` migrado).
1231
- - ❌ `website/pages/docs/smoke-form-poc-rhf-zod.mdx` — deletado (instrumentação S1).
1232
- - ❌ `website/pages/docs/smoke-form-basic-formik.mdx` — deletado (instrumentação S1).
1233
-
1234
- **Bundle re-measurement (Next.js First Load JS):**
1235
-
1236
- | Page | Pre-S0 (Formik+Yup) | Post-S3 (RHF+Zod) | Δ |
1237
- | -------------- | ------------------: | ----------------: | ------------: |
1238
- | `form-basic` | 417 kB | 422 kB | +5 kB / +1.2% |
1239
- | `form-dynamic` | 417 kB | 422 kB | +5 kB / +1.2% |
1240
- | `form-form` | 417 kB | 422 kB | +5 kB / +1.2% |
1241
-
1242
- **Δ NEGATIVO vs ADR-007 target** (≥15% redução; alvo 21%). Análise honesta:
1243
- - Zod v4 com features atuais (`z.email`, `z.coerce`, `z.refine`, `z.string().min`) ship mais bytes que o subset de Yup usado previamente.
1244
- - Formik (~13kB) → RHF (~10kB) shrink ~3kB.
1245
- - Yup (~15kB) → Zod (~15-18kB) wash or slight growth.
1246
- - Net: bundle parity, com leve growth devido a Zod ser mais "feature-rich" em runtime.
1247
-
1248
- **Benefícios do migration (realizados, independente do bundle):**
1249
- - ✅ Ecosystem alignment 2024-2026+: RHF + Zod dominantes em TS-first stacks.
1250
- - ✅ TypeScript SSOT via `z.infer<typeof schema>` (Yup exigia tipo manual `Values<T>`).
1251
- - ✅ Future-proofing: Formik+Yup com manutenção decrescente, React 19/20 risk.
1252
- - ✅ Vendor isolation paga: refactor cirúrgico em 4 arquivos core + 6 examples.
1253
- - ✅ Apollion como gold-standard do ecosystem mantém alinhamento com mercado.
1254
-
1255
- **Acceptance Criteria ADR-007:**
1256
- - ✅ 0 imports diretos de `formik`/`yup` em `packages/core/src/**` e `website/src/**` (fora dos vendors).
1257
- - ✅ 0 imports diretos de `react-hook-form`/`zod`/`@hookform/resolvers/zod` em core fora de `vendors/`.
1258
- - ⚠️ Bundle delta target ≥15%: **NÃO atingido** (medição real: +1.2% growth). Documentado como finding honesto. Justificativa do migration permanece válida (ecosystem + maintenance + TS).
1259
- - ✅ `yarn validate` verde nos 4 workspaces.
1260
- - ✅ 317 tests passed (1 skipped pre-existente), 59 snapshots OK.
1261
-
1262
- Vendors `vendors/Formik/` + `vendors/Yup/` permanecem sem uso interno até S6 hard cut em v4.0.0.
1263
-
1264
- Ver `packages/core/docs/adr/ADR-007-form-stack-rhf-zod.md` §6 Slice 3.
1265
-
1266
- - c57c548: docs(core): ADR-007 S4+S5 — README sweep + MIGRATION-v4.md draft
1267
-
1268
- **S4 — README + AI docs sweep (12 arquivos):**
1269
-
1270
- MDX docs (4):
1271
- - `form/Form/README.mdx` — exemplos Yup → Zod v4 idiomatic.
1272
- - `form/Field/README.mdx` — exemplos Yup → Zod; "(Formik)" → "(RHF + Zod)".
1273
- - `form/InputDate/README.mdx` — `Yup.mixed().test(date)` → `z.string().min(1).refine(date)`.
1274
- - `form/InputMask/README.mdx` — mesma migration de date validator.
1275
-
1276
- AI docs (8):
1277
- - `form/Form/README.AI.md` — reescrita full (purpose, props table com `mode`,
1278
- examples Zod, do-not section atualizada).
1279
- - `form/Field/README.AI.md` — referências "Formik" → "RHF + Zod"; exemplo
1280
- inside-form com Zod.
1281
- - `form/Checkbox/README.AI.md`, `form/InputCurrency/README.AI.md`,
1282
- `form/InputDate/README.AI.md`, `form/InputMask/README.AI.md`,
1283
- `form/InputRange/README.AI.md`, `form/InputSelect/README.AI.md`,
1284
- `form/TextArea/README.AI.md` — `<related>` section "Form orquestra
1285
- validação Yup" → "Zod"; exemplos Yup migrados onde presentes.
1286
-
1287
- **DEPRECATED headers nos vendors antigos:**
1288
- - `vendors/Formik/README.md` — ⚠️ DEPRECATED header apontando ReactHookForm
1289
- - ADR-007 §S6.
1290
- - `vendors/Yup/README.md` — ⚠️ DEPRECATED header apontando Zod + ADR-007 §S6.
1291
-
1292
- **S5 — MIGRATION-v4.md draft:**
1293
-
1294
- Cria `packages/core/MIGRATION-v4.md` com seção "Form stack migration"
1295
- cobrindo:
1296
- - §1 Resumo do impacto (7 surfaces com migration cost por linha).
1297
- - §2 Mapping Yup → Zod v4 (cheat sheet com 20+ patterns).
1298
- - §3 `validateOnChange`/`validateOnBlur` → `mode` (com diff blocks).
1299
- - §4 `onError` callback shape (FormikErrors → FieldErrors).
1300
- - §5 `handleSubmit` second arg (FormikHelpers → UseFormReturn method map).
1301
- - §6 Ref imperativa (FormikProps → UseFormReturn).
1302
- - §7 Type inference (`z.infer<typeof schema>` SSOT vs `Values<T>` manual).
1303
- - §8 Migration steps consumer-side (7 passos).
1304
- - §9 Bundle delta esperado (medição real + análise honesta).
1305
- - §10 Refs (ADR-007, ADR-004, Zod v4 changelog, RHF docs).
1306
-
1307
- Status DRAFT — finalizado no merge final do épico v4.0.0.
1308
-
1309
- **ADR-007 status atualizado:** S0-S5 marcados ✅; S6 (hard cut) ⏳ gated pelo
1310
- épico v4.0.0 (ADR-006). Acceptance criteria atualizado com checkboxes
1311
- reais; finding de bundle delta documentado honestamente (NÃO atingido
1312
- target; justificativa migration permanece válida).
1313
-
1314
- Vendors `Formik`/`Yup` permanecem (sem uso interno) até S6 hard cut.
1315
-
1316
- Ver `packages/core/docs/adr/ADR-007-form-stack-rhf-zod.md` §6 Slice 4 + 5
1317
- - §10 Acceptance Criteria atualizado.
1318
-
1319
- - e55019a: chore(security): bump Storybook 8.6.9 → 8.6.18 + force `uuid` to 11.1.1
1320
-
1321
- DevDeps-only — no consumer-facing API change. Closes three security
1322
- advisories surfaced by `yarn audit-dependencies` (after the audit pipeline
1323
- itself was migrated off the broken `audit-ci@7.1.0` Yarn Berry handler in
1324
- the same cycle):
1325
- - **High** — Storybook manager bundle env-var exposure during build
1326
- (GHSA-8452-54wp-rmv6, fixed in `storybook >=8.6.15`).
1327
- - **High** — Storybook Dev Server WebSocket Hijacking
1328
- (GHSA-mjf5-7g4m-gx5w, fixed in `storybook >=8.6.17`).
1329
- - **Moderate** — `uuid` missing buffer bounds check in v3/v5/v6
1330
- (GHSA-w5hq-g745-h8pq, fixed in `uuid >=11.1.1`). Forced via root
1331
- `resolutions` since `@storybook/addon-actions` + `jest-junit` would
1332
- otherwise keep transitive `uuid@8.3.2` / `uuid@9.0.1`.
1333
-
1334
- Verified:
1335
- - `yarn install` clean.
1336
- - `yarn workspace @apollion-dsi/core build-storybook` succeeds.
1337
- - Visual regression suite (chromium, 133/133) idempotent — matches the
1338
- pre-push hook default.
1339
- - `yarn audit-dependencies` no longer reports any of the three
1340
- advisories above.
1341
-
1342
- - 51f71f6: fix(core): emit `.d.ts` for every subpath entry (v4 build follow-up)
1343
-
1344
- `packages/core/tsconfig.json` used `files: ["src/index.ts"]` as its only
1345
- entry point. After ADR-006 §3.7 E7 emptied the root barrel in v4.0.0,
1346
- that entry walks to nothing — `tsc --emitDeclarationOnly` produced a
1347
- single `lib/index.d.ts` while `esbuild` emitted 217 `.esm.js` files for
1348
- every subpath barrel discovered via `findEntryPoints`. Consumers
1349
- importing `@apollion-dsi/core/themes/colors`, `@apollion-dsi/core/elements/
1350
- button`, etc. got runtime JS but `any`-typed modules — which only became
1351
- visible when `@apollion-dsi/tokens` validate started failing with TS7016
1352
- "Could not find a declaration file" against the published subpaths.
1353
-
1354
- The same bug also reduced `yarn check-types` to a near no-op: since
1355
- `src/index.ts` no longer imported anything, `tsc --noEmit` only checked
1356
- that one file and silently ignored real type errors in the remaining 200+
1357
- modules of the source tree.
1358
-
1359
- Switches the config to `include: ["src/**/*"]` with explicit excludes for
1360
- test files (`*.test.{ts,tsx}`, `__tests__/**`) and Storybook stories
1361
- (`story.{ts,tsx}`, `__stories__/**`) — neither of which should ship type
1362
- declarations. Post-fix:
1363
- - `lib/` carries 430 `.d.ts` files (covering all 217 ESM entries plus
1364
- pure-type interface files), matching the surface declared in
1365
- `package.json#exports`.
1366
- - `lib/vendors/StyledComponents/` ships `.d.ts` only (`component.d.ts`,
1367
- `interface.d.ts`, `index.d.ts`) — `scripts/check-vendors-not-published.js`
1368
- remains green (the script only forbids `.js` under `lib/vendors/`).
1369
- - `yarn check-types` now type-checks the entire `src/**` tree.
1370
- - No new TypeScript errors surfaced — the existing source tree was
1371
- internally consistent; it just wasn't being checked.
1372
-
1373
- Pure build-config fix. No runtime change, no public API change. Patch
1374
- bump.
1375
-
1376
- - 0a1baeb: chore(core): coverage re-baseline — exclude boilerplate, honest floors
1377
-
1378
- Apply coverage exclusions em `packages/core/jest.config.js` +
1379
- `packages/relay/jest.config.js` para boilerplate sem business logic
1380
- testável:
1381
- - `/vendors/` — wrappers re-export-only (re-exports a 100% statements
1382
- - 0-50% functions noise via IIFE wrappers ts-jest).
1383
- - `*.story.tsx` — Storybook stories (visual coverage via visual-gate).
1384
- - `*.interface.ts` — type-only files (compile a empty JS = 100% padding).
1385
- - `*.style.ts` — styled-components (testados via component renders).
1386
- - `/index.ts` (barrels) — re-exports puros.
1387
-
1388
- **Impact:** revela coverage real do código com lógica testável.
1389
-
1390
- | Métrica core | Pre-exclusões | Post-exclusões | Δ |
1391
- | ------------ | ------------: | -------------: | ------: |
1392
- | Statements | 69.8% | 61.75% | -8.05pp |
1393
- | Branches | 50.63% | 50.74% | +0.11pp |
1394
- | Functions | 56.2% | 48.25% | -7.95pp |
1395
- | Lines | 69.41% | 62.3% | -7.11pp |
1396
-
1397
- Drop em statements/functions/lines reflete REMOÇÃO de files inflados
1398
- (re-exports a 100%, types a 100%) — não regressão real. Branches estável
1399
- porque excluídos não tinham branches significativos.
1400
-
1401
- **Thresholds rebaselined** (core/jest.config.js):
1402
- - `branches`: 48 → 50 (sobe acompanhando actuals)
1403
- - `functions`: 53 → 47 (cai — honest baseline)
1404
- - `lines`: 67 → 61
1405
- - `statements`: 68 → 60
1406
-
1407
- Buffer ~1-2pp do actuals real. Relay thresholds unchanged (actuals
1408
- post-exclusion ainda passam).
1409
-
1410
- **Path para 80% goal** (adoption-readiness, decisão @fedbalves 2026-05-27):
1411
-
1412
- Top gaps onde testes reais teriam impacto:
1413
- - `hooks/*` — useDrag/useClipboard/useScript/useProgress/useIntersect/
1414
- useFileDialog todos <30% statements.
1415
- - `form/UploadCard` (21%), `form/InputSelect` (51%), `form/InputRange` (55%).
1416
- - `entities/*` (32%).
1417
- - `containers/Scroll` (63%).
1418
- - `elements/Svg` (38%), `elements/Label` (52%).
1419
-
1420
- Ratchet path: +5pp incremental atrás de feature work TDD-vertical (per
1421
- strategy original do ROADMAP).
1422
-
1423
- Ver `docs/ROADMAP.md` §🟡 Next "Coverage ratchet to 80%" — entrada
1424
- atualizada com baseline honesta + path detalhado.
1425
-
1426
- - 6d1371e: docs: factual drift sweep + AI-friendly doc surface
1427
-
1428
- Sincroniza documentação com estado de `main` pós-v3.x (ADR-002 +
1429
- ADR-004 shipped, ADR-005 escrito) e introduz camada AI-readable
1430
- (`README.AI.md`, `AGENTS.md`, `llms.txt` por sub-package).
1431
-
1432
- **Drift corrigido (BLOCKER):**
1433
- - Root README + core README: Storybook `9` → `8.x` (real: 8.6.9).
1434
- - ROADMAP: ADR-005 "placeholder/não escrita" → "Proposed" linkando ao
1435
- arquivo já existente.
1436
- - `website/README.md`: era boilerplate de Docusaurus 2 — substituído
1437
- por descrição real (Next 15 + Nextra 2 + copyStorybook).
1438
- - `website/pages/index.mdx`: remove `npm install` (yarn-only) e
1439
- amplia scope para citar 3-layer theme + vendor isolation.
1440
- - `packages/scripts/README.MD`: rebrand de `@captalys-platform/scripts`
1441
- → `@apollion-dsi/scripts`; atualiza stack (webpack 5, Babel 7,
1442
- Jest 30, TS 6); remove `.editorconfig.js`.
1443
-
1444
- **Novas concept pages no website (IMPORTANT):**
1445
- - `concept-semantic-tokens.mdx` — explica Foundation/Semantic/Structural
1446
- (ADR-002).
1447
- - `concept-surface-inversion.mdx` — `surface="negative"` + limitação
1448
- mode-agnostic (ADR-002 S4 / refinada em ADR-006).
1449
- - `concept-vendor-policy.mdx` — política de vendor isolation pública
1450
- (ADR-004).
1451
-
1452
- Source canônica em `packages/core/concept/`; thin re-exports em
1453
- `website/pages/docs/`; entradas em `_meta.json`.
1454
-
1455
- **AI-friendly doc layer:**
1456
- - Raiz `README.AI.md` — navegação + decision tree + ADR matrix.
1457
- - Raiz `AGENTS.md` — contrato operacional p/ agentes (hard rules,
1458
- per-component checklist, skill triggers).
1459
- - `packages/eslint-config/llms.txt`, `packages/relay/llms.txt`,
1460
- `packages/scripts/llms.txt` — indexação token-otimizada por package
1461
- (espelhando o padrão já em `packages/core/llms.txt`).
1462
-
1463
- Doc-only. Sem mudança de API/código. Patch bump em todos os
1464
- publishable packages para sincronizar versões.
1465
-
1466
- - e55019a: chore(security): close 7 pre-existing CVEs revealed by audit-dependencies fix
1467
-
1468
- Follow-up to the `audit-ci@7.1.0` → `yarn npm audit` migration earlier in
1469
- this cycle. The native audit pipeline surfaced 7 vulnerabilities that the
1470
- broken handler had been printing as `undefined` and never failing on.
1471
- All closed in this changeset. `yarn audit-dependencies` → 0 findings.
1472
-
1473
- | # | CVE | Pkg | Severity | Strategy |
1474
- | --- | ------------------- | ---------------- | -------- | ------------------------------------------------------------------------------------------------------------------- |
1475
- | 1 | GHSA-3xgq-45jj-v275 | `cross-spawn` | High | Root resolution `cross-spawn: ^7.0.6` (was transitive 5.1.0 via `execa@0.8.0` → `clipboardy` → `title` → `nextra`). |
1476
- | 2 | GHSA-qjx8-664m-686j | `js-cookie` | High | Direct upgrade in `packages/relay`: `3.0.5` → `3.0.7`. |
1477
- | 3 | GHSA-37ch-88jc-xwx2 | `path-to-regexp` | High | Direct upgrade in `packages/relay`: `express 4.21.2` → `4.22.2` (express 4.22 ships path-to-regexp 0.1.13). |
1478
- | 4 | GHSA-7mvr-c777-76hp | `playwright` | High | Direct upgrade in `packages/core`: `@playwright/test 1.49.1` → `1.60.0`. |
1479
- | 5 | GHSA-qx2v-qp2m-jg93 | `postcss` | Moderate | Root resolution `postcss: ^8.5.10` (Next 15 pinned 8.4.31; css-loader already uses 8.5.15). |
1480
- | 6 | GHSA-6rw7-vpxm-498p | `qs` | Moderate | Closed by item 3 (express 4.22.2 bundles body-parser 1.20.5 → qs 6.15.2). |
1481
- | 7 | GHSA-q8mj-m7cp-5q26 | `qs` | Moderate | Closed by item 3 (same). |
1482
-
1483
- **Verified post-remediation:**
1484
- - `corepack yarn audit-dependencies` → exit 0, no audit suggestions.
1485
- - `corepack yarn workspace @apollion-dsi/core run validate` → green (types + prettier + lint + tests + build + check-vendors-not-published + visual gate). Visual regression suite chromium **133/133 passing** with `@playwright/test@1.60.0` — no baseline drift from the playwright bump.
1486
- - `corepack yarn workspace @apollion-dsi/relay run validate` → green (3 test suites / 11 tests / 0 failures).
1487
- - `corepack yarn workspace @apollion-dsi/website run build` → green.
1488
-
1489
- **Exploit-surface notes:**
1490
- - Express, body-parser, qs, path-to-regexp are all in `@apollion-dsi/relay#devDependencies` (test fixtures for the GraphQL relay environment) — realistic exploit surface was zero. Upgraded anyway because the fix was free.
1491
- - Playwright cert verification (item 4) only matters during `npx playwright install` — also low exploit surface in a single-machine setup, but upgrading was free.
1492
- - cross-spawn ReDoS reachable only during `nextra` doc generation, dev-only.
1493
-
1494
- - 29081ae: chore(visual): regenerate firefox + webkit baselines (post ADR-006 OKLch)
1495
-
1496
- DevDeps-only — no consumer-facing API change. Refreshes the 124 stale
1497
- firefox + webkit baselines that drifted after `d57c47c feat(v4-s2): OKLch
1498
- lerp via culori` updated only chromium baselines (the pre-push hook is
1499
- chromium-only, so firefox + webkit drift went unnoticed). Restores the
1500
- multi-browser net at 399/399 green and idempotent on darwin-arm64.
1501
- - **Median diff absorbed:** 0.53 %; **max:** 10.35 % on
1502
- `Layouts/SideBarLayout › Default` firefox — `primary.dark` shifted from
1503
- `rgb(20, 70, 88)` (pre-OKLch RGB lerp) to `rgb(7, 46, 60)` (OKLch lerp).
1504
- Same code, new perceptually-uniform color math.
1505
- - **Net-new baselines:** `Components/Button › AllDimensions` and
1506
- `Components/Card › AllDimensions` firefox + webkit captured for the first
1507
- time (story count 131 → 133).
1508
- - **PER_STORY_THRESHOLD escalations** (firefox skeleton shimmer sub-pixel
1509
- drift — pre-existing class documented in `__image_snapshots__/AUDIT.md`):
1510
- - `components-textpreset--default`: 0.5 % (re-emergence of the S2 entry,
1511
- handled per AUDIT's predicted path).
1512
- - `components-scenario-rect--default`: 1 % (new entry — same root cause).
1513
-
1514
- Verified:
1515
- - `VISUAL_BROWSERS="chromium firefox webkit" yarn workspace @apollion-dsi/core run test-storybook`
1516
- is 399/399 green on two consecutive fresh runs (~80 s each, no `-u`).
1517
- - Pre-push hook (chromium-only) behavior unchanged — closes the same gate.
1518
- - SHA-256 of regenerated PNGs differs from `HEAD` (real pixel updates, not
1519
- no-op mtime touches).