@datatechsolutions/tympan-tokens 0.3.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 (329) hide show
  1. package/LICENSE +105 -0
  2. package/README.md +318 -0
  3. package/dist/contrast-report.md +13955 -0
  4. package/dist/dtcg/astrlabe.dark-high.tokens.json +2947 -0
  5. package/dist/dtcg/astrlabe.dark.tokens.json +2947 -0
  6. package/dist/dtcg/astrlabe.light-high.tokens.json +2947 -0
  7. package/dist/dtcg/astrlabe.light.tokens.json +2947 -0
  8. package/dist/dtcg/base.tokens.json +422 -0
  9. package/dist/dtcg/density.comfortable.tokens.json +48 -0
  10. package/dist/dtcg/density.compact.tokens.json +48 -0
  11. package/dist/dtcg/density.default.tokens.json +48 -0
  12. package/dist/dtcg/fakhir.dark-high.tokens.json +2971 -0
  13. package/dist/dtcg/fakhir.dark.tokens.json +2971 -0
  14. package/dist/dtcg/fakhir.light-high.tokens.json +2971 -0
  15. package/dist/dtcg/fakhir.light.tokens.json +2971 -0
  16. package/dist/dtcg/flow.tokens.json +675 -0
  17. package/dist/dtcg/high-contrast.dark.tokens.json +2943 -0
  18. package/dist/dtcg/high-contrast.light.tokens.json +2943 -0
  19. package/dist/dtcg/neutral.dark-high.tokens.json +2947 -0
  20. package/dist/dtcg/neutral.dark.tokens.json +2947 -0
  21. package/dist/dtcg/neutral.light-high.tokens.json +2947 -0
  22. package/dist/dtcg/neutral.light.tokens.json +2947 -0
  23. package/dist/dtcg/print/print-aquarela.dark.tokens.json +3014 -0
  24. package/dist/dtcg/print/print-aquarela.light.tokens.json +3009 -0
  25. package/dist/dtcg/print/print-art-nouveau.dark.tokens.json +2944 -0
  26. package/dist/dtcg/print/print-art-nouveau.light.tokens.json +2944 -0
  27. package/dist/dtcg/print/print-atlas-oficial.dark.tokens.json +2945 -0
  28. package/dist/dtcg/print/print-atlas-oficial.light.tokens.json +2945 -0
  29. package/dist/dtcg/print/print-azulejo-modernista.dark.tokens.json +2946 -0
  30. package/dist/dtcg/print/print-azulejo-modernista.light.tokens.json +2946 -0
  31. package/dist/dtcg/print/print-bauhaus.dark.tokens.json +2946 -0
  32. package/dist/dtcg/print/print-bauhaus.light.tokens.json +2942 -0
  33. package/dist/dtcg/print/print-blocos-coloridos.dark.tokens.json +2974 -0
  34. package/dist/dtcg/print/print-blocos-coloridos.light.tokens.json +2967 -0
  35. package/dist/dtcg/print/print-brutalista.dark.tokens.json +2956 -0
  36. package/dist/dtcg/print/print-brutalista.light.tokens.json +2956 -0
  37. package/dist/dtcg/print/print-caderno.dark.tokens.json +2958 -0
  38. package/dist/dtcg/print/print-caderno.light.tokens.json +2954 -0
  39. package/dist/dtcg/print/print-cartao-postal.dark.tokens.json +2958 -0
  40. package/dist/dtcg/print/print-cartao-postal.light.tokens.json +2954 -0
  41. package/dist/dtcg/print/print-cientifico.dark.tokens.json +2944 -0
  42. package/dist/dtcg/print/print-cientifico.light.tokens.json +2944 -0
  43. package/dist/dtcg/print/print-concretismo.dark.tokens.json +2946 -0
  44. package/dist/dtcg/print/print-concretismo.light.tokens.json +2942 -0
  45. package/dist/dtcg/print/print-construtivismo.dark.tokens.json +2946 -0
  46. package/dist/dtcg/print/print-construtivismo.light.tokens.json +2946 -0
  47. package/dist/dtcg/print/print-cordel.dark.tokens.json +2958 -0
  48. package/dist/dtcg/print/print-cordel.light.tokens.json +2954 -0
  49. package/dist/dtcg/print/print-dados-br.dark.tokens.json +2959 -0
  50. package/dist/dtcg/print/print-dados-br.light.tokens.json +2956 -0
  51. package/dist/dtcg/print/print-dashboard.dark.tokens.json +3015 -0
  52. package/dist/dtcg/print/print-dashboard.light.tokens.json +3007 -0
  53. package/dist/dtcg/print/print-diagrama-modernista.dark.tokens.json +2946 -0
  54. package/dist/dtcg/print/print-diagrama-modernista.light.tokens.json +2942 -0
  55. package/dist/dtcg/print/print-divulgacao.dark.tokens.json +2942 -0
  56. package/dist/dtcg/print/print-divulgacao.light.tokens.json +2938 -0
  57. package/dist/dtcg/print/print-fluxo-historico.dark.tokens.json +2944 -0
  58. package/dist/dtcg/print/print-fluxo-historico.light.tokens.json +2941 -0
  59. package/dist/dtcg/print/print-grade-holandesa.dark.tokens.json +2946 -0
  60. package/dist/dtcg/print/print-grade-holandesa.light.tokens.json +2942 -0
  61. package/dist/dtcg/print/print-graficos-1900.dark.tokens.json +2959 -0
  62. package/dist/dtcg/print/print-graficos-1900.light.tokens.json +2955 -0
  63. package/dist/dtcg/print/print-infografico-ilustrado.dark.tokens.json +2974 -0
  64. package/dist/dtcg/print/print-infografico-ilustrado.light.tokens.json +2970 -0
  65. package/dist/dtcg/print/print-isotype.dark.tokens.json +2946 -0
  66. package/dist/dtcg/print/print-isotype.light.tokens.json +2946 -0
  67. package/dist/dtcg/print/print-jornal-1959.dark.tokens.json +2944 -0
  68. package/dist/dtcg/print/print-jornal-1959.light.tokens.json +2944 -0
  69. package/dist/dtcg/print/print-jornal.dark.tokens.json +2958 -0
  70. package/dist/dtcg/print/print-jornal.light.tokens.json +2951 -0
  71. package/dist/dtcg/print/print-mapa-de-metro.dark.tokens.json +2946 -0
  72. package/dist/dtcg/print/print-mapa-de-metro.light.tokens.json +2946 -0
  73. package/dist/dtcg/print/print-memphis.dark.tokens.json +2942 -0
  74. package/dist/dtcg/print/print-memphis.light.tokens.json +2938 -0
  75. package/dist/dtcg/print/print-minimo-de-tinta.dark.tokens.json +2958 -0
  76. package/dist/dtcg/print/print-minimo-de-tinta.light.tokens.json +2951 -0
  77. package/dist/dtcg/print/print-papel-recortado.dark.tokens.json +2946 -0
  78. package/dist/dtcg/print/print-papel-recortado.light.tokens.json +2942 -0
  79. package/dist/dtcg/print/print-papel-salmao.dark.tokens.json +2944 -0
  80. package/dist/dtcg/print/print-papel-salmao.light.tokens.json +2941 -0
  81. package/dist/dtcg/print/print-pictogramas.dark.tokens.json +2946 -0
  82. package/dist/dtcg/print/print-pictogramas.light.tokens.json +2942 -0
  83. package/dist/dtcg/print/print-pop-art.dark.tokens.json +2942 -0
  84. package/dist/dtcg/print/print-pop-art.light.tokens.json +2938 -0
  85. package/dist/dtcg/print/print-prancheta-clara.dark.tokens.json +2960 -0
  86. package/dist/dtcg/print/print-prancheta-clara.light.tokens.json +2956 -0
  87. package/dist/dtcg/print/print-prancheta.dark.tokens.json +2956 -0
  88. package/dist/dtcg/print/print-prancheta.light.tokens.json +2960 -0
  89. package/dist/dtcg/print/print-proporcao-modular.dark.tokens.json +2945 -0
  90. package/dist/dtcg/print/print-proporcao-modular.light.tokens.json +2941 -0
  91. package/dist/dtcg/print/print-riso.dark.tokens.json +2960 -0
  92. package/dist/dtcg/print/print-riso.light.tokens.json +2956 -0
  93. package/dist/dtcg/print/print-semanario.dark.tokens.json +2944 -0
  94. package/dist/dtcg/print/print-semanario.light.tokens.json +2937 -0
  95. package/dist/dtcg/print/print-sinalizacao.dark.tokens.json +2946 -0
  96. package/dist/dtcg/print/print-sinalizacao.light.tokens.json +2942 -0
  97. package/dist/dtcg/print/print-suico.dark.tokens.json +2960 -0
  98. package/dist/dtcg/print/print-suico.light.tokens.json +2956 -0
  99. package/dist/dtcg/print/print-tropicalia.dark.tokens.json +2945 -0
  100. package/dist/dtcg/print/print-tropicalia.light.tokens.json +2941 -0
  101. package/dist/dtcg/print-aquarela.dark-high.tokens.json +3014 -0
  102. package/dist/dtcg/print-aquarela.dark.tokens.json +3014 -0
  103. package/dist/dtcg/print-aquarela.light-high.tokens.json +3014 -0
  104. package/dist/dtcg/print-aquarela.light.tokens.json +3009 -0
  105. package/dist/dtcg/print-art-nouveau.dark-high.tokens.json +2944 -0
  106. package/dist/dtcg/print-art-nouveau.dark.tokens.json +2944 -0
  107. package/dist/dtcg/print-art-nouveau.light-high.tokens.json +2944 -0
  108. package/dist/dtcg/print-art-nouveau.light.tokens.json +2944 -0
  109. package/dist/dtcg/print-atlas-oficial.dark-high.tokens.json +2945 -0
  110. package/dist/dtcg/print-atlas-oficial.dark.tokens.json +2945 -0
  111. package/dist/dtcg/print-atlas-oficial.light-high.tokens.json +2945 -0
  112. package/dist/dtcg/print-atlas-oficial.light.tokens.json +2945 -0
  113. package/dist/dtcg/print-azulejo-modernista.dark-high.tokens.json +2946 -0
  114. package/dist/dtcg/print-azulejo-modernista.dark.tokens.json +2946 -0
  115. package/dist/dtcg/print-azulejo-modernista.light-high.tokens.json +2946 -0
  116. package/dist/dtcg/print-azulejo-modernista.light.tokens.json +2946 -0
  117. package/dist/dtcg/print-bauhaus.dark-high.tokens.json +2946 -0
  118. package/dist/dtcg/print-bauhaus.dark.tokens.json +2946 -0
  119. package/dist/dtcg/print-bauhaus.light-high.tokens.json +2946 -0
  120. package/dist/dtcg/print-bauhaus.light.tokens.json +2942 -0
  121. package/dist/dtcg/print-blocos-coloridos.dark-high.tokens.json +2974 -0
  122. package/dist/dtcg/print-blocos-coloridos.dark.tokens.json +2974 -0
  123. package/dist/dtcg/print-blocos-coloridos.light-high.tokens.json +2974 -0
  124. package/dist/dtcg/print-blocos-coloridos.light.tokens.json +2967 -0
  125. package/dist/dtcg/print-brutalista.dark-high.tokens.json +2956 -0
  126. package/dist/dtcg/print-brutalista.dark.tokens.json +2956 -0
  127. package/dist/dtcg/print-brutalista.light-high.tokens.json +2956 -0
  128. package/dist/dtcg/print-brutalista.light.tokens.json +2956 -0
  129. package/dist/dtcg/print-caderno.dark-high.tokens.json +2958 -0
  130. package/dist/dtcg/print-caderno.dark.tokens.json +2958 -0
  131. package/dist/dtcg/print-caderno.light-high.tokens.json +2958 -0
  132. package/dist/dtcg/print-caderno.light.tokens.json +2954 -0
  133. package/dist/dtcg/print-cartao-postal.dark-high.tokens.json +2958 -0
  134. package/dist/dtcg/print-cartao-postal.dark.tokens.json +2958 -0
  135. package/dist/dtcg/print-cartao-postal.light-high.tokens.json +2958 -0
  136. package/dist/dtcg/print-cartao-postal.light.tokens.json +2954 -0
  137. package/dist/dtcg/print-cientifico.dark-high.tokens.json +2944 -0
  138. package/dist/dtcg/print-cientifico.dark.tokens.json +2944 -0
  139. package/dist/dtcg/print-cientifico.light-high.tokens.json +2944 -0
  140. package/dist/dtcg/print-cientifico.light.tokens.json +2944 -0
  141. package/dist/dtcg/print-concretismo.dark-high.tokens.json +2946 -0
  142. package/dist/dtcg/print-concretismo.dark.tokens.json +2946 -0
  143. package/dist/dtcg/print-concretismo.light-high.tokens.json +2946 -0
  144. package/dist/dtcg/print-concretismo.light.tokens.json +2942 -0
  145. package/dist/dtcg/print-construtivismo.dark-high.tokens.json +2946 -0
  146. package/dist/dtcg/print-construtivismo.dark.tokens.json +2946 -0
  147. package/dist/dtcg/print-construtivismo.light-high.tokens.json +2946 -0
  148. package/dist/dtcg/print-construtivismo.light.tokens.json +2946 -0
  149. package/dist/dtcg/print-cordel.dark-high.tokens.json +2958 -0
  150. package/dist/dtcg/print-cordel.dark.tokens.json +2958 -0
  151. package/dist/dtcg/print-cordel.light-high.tokens.json +2958 -0
  152. package/dist/dtcg/print-cordel.light.tokens.json +2954 -0
  153. package/dist/dtcg/print-dados-br.dark-high.tokens.json +2959 -0
  154. package/dist/dtcg/print-dados-br.dark.tokens.json +2959 -0
  155. package/dist/dtcg/print-dados-br.light-high.tokens.json +2959 -0
  156. package/dist/dtcg/print-dados-br.light.tokens.json +2956 -0
  157. package/dist/dtcg/print-dashboard.dark-high.tokens.json +3015 -0
  158. package/dist/dtcg/print-dashboard.dark.tokens.json +3015 -0
  159. package/dist/dtcg/print-dashboard.light-high.tokens.json +3015 -0
  160. package/dist/dtcg/print-dashboard.light.tokens.json +3007 -0
  161. package/dist/dtcg/print-diagrama-modernista.dark-high.tokens.json +2946 -0
  162. package/dist/dtcg/print-diagrama-modernista.dark.tokens.json +2946 -0
  163. package/dist/dtcg/print-diagrama-modernista.light-high.tokens.json +2946 -0
  164. package/dist/dtcg/print-diagrama-modernista.light.tokens.json +2942 -0
  165. package/dist/dtcg/print-divulgacao.dark-high.tokens.json +2942 -0
  166. package/dist/dtcg/print-divulgacao.dark.tokens.json +2942 -0
  167. package/dist/dtcg/print-divulgacao.light-high.tokens.json +2942 -0
  168. package/dist/dtcg/print-divulgacao.light.tokens.json +2938 -0
  169. package/dist/dtcg/print-fluxo-historico.dark-high.tokens.json +2944 -0
  170. package/dist/dtcg/print-fluxo-historico.dark.tokens.json +2944 -0
  171. package/dist/dtcg/print-fluxo-historico.light-high.tokens.json +2944 -0
  172. package/dist/dtcg/print-fluxo-historico.light.tokens.json +2941 -0
  173. package/dist/dtcg/print-grade-holandesa.dark-high.tokens.json +2946 -0
  174. package/dist/dtcg/print-grade-holandesa.dark.tokens.json +2946 -0
  175. package/dist/dtcg/print-grade-holandesa.light-high.tokens.json +2946 -0
  176. package/dist/dtcg/print-grade-holandesa.light.tokens.json +2942 -0
  177. package/dist/dtcg/print-graficos-1900.dark-high.tokens.json +2959 -0
  178. package/dist/dtcg/print-graficos-1900.dark.tokens.json +2959 -0
  179. package/dist/dtcg/print-graficos-1900.light-high.tokens.json +2959 -0
  180. package/dist/dtcg/print-graficos-1900.light.tokens.json +2955 -0
  181. package/dist/dtcg/print-infografico-ilustrado.dark-high.tokens.json +2974 -0
  182. package/dist/dtcg/print-infografico-ilustrado.dark.tokens.json +2974 -0
  183. package/dist/dtcg/print-infografico-ilustrado.light-high.tokens.json +2974 -0
  184. package/dist/dtcg/print-infografico-ilustrado.light.tokens.json +2970 -0
  185. package/dist/dtcg/print-isotype.dark-high.tokens.json +2946 -0
  186. package/dist/dtcg/print-isotype.dark.tokens.json +2946 -0
  187. package/dist/dtcg/print-isotype.light-high.tokens.json +2946 -0
  188. package/dist/dtcg/print-isotype.light.tokens.json +2946 -0
  189. package/dist/dtcg/print-jornal-1959.dark-high.tokens.json +2944 -0
  190. package/dist/dtcg/print-jornal-1959.dark.tokens.json +2944 -0
  191. package/dist/dtcg/print-jornal-1959.light-high.tokens.json +2944 -0
  192. package/dist/dtcg/print-jornal-1959.light.tokens.json +2944 -0
  193. package/dist/dtcg/print-jornal.dark-high.tokens.json +2958 -0
  194. package/dist/dtcg/print-jornal.dark.tokens.json +2958 -0
  195. package/dist/dtcg/print-jornal.light-high.tokens.json +2958 -0
  196. package/dist/dtcg/print-jornal.light.tokens.json +2951 -0
  197. package/dist/dtcg/print-mapa-de-metro.dark-high.tokens.json +2946 -0
  198. package/dist/dtcg/print-mapa-de-metro.dark.tokens.json +2946 -0
  199. package/dist/dtcg/print-mapa-de-metro.light-high.tokens.json +2946 -0
  200. package/dist/dtcg/print-mapa-de-metro.light.tokens.json +2946 -0
  201. package/dist/dtcg/print-memphis.dark-high.tokens.json +2942 -0
  202. package/dist/dtcg/print-memphis.dark.tokens.json +2942 -0
  203. package/dist/dtcg/print-memphis.light-high.tokens.json +2942 -0
  204. package/dist/dtcg/print-memphis.light.tokens.json +2938 -0
  205. package/dist/dtcg/print-minimo-de-tinta.dark-high.tokens.json +2958 -0
  206. package/dist/dtcg/print-minimo-de-tinta.dark.tokens.json +2958 -0
  207. package/dist/dtcg/print-minimo-de-tinta.light-high.tokens.json +2958 -0
  208. package/dist/dtcg/print-minimo-de-tinta.light.tokens.json +2951 -0
  209. package/dist/dtcg/print-papel-recortado.dark-high.tokens.json +2946 -0
  210. package/dist/dtcg/print-papel-recortado.dark.tokens.json +2946 -0
  211. package/dist/dtcg/print-papel-recortado.light-high.tokens.json +2946 -0
  212. package/dist/dtcg/print-papel-recortado.light.tokens.json +2942 -0
  213. package/dist/dtcg/print-papel-salmao.dark-high.tokens.json +2944 -0
  214. package/dist/dtcg/print-papel-salmao.dark.tokens.json +2944 -0
  215. package/dist/dtcg/print-papel-salmao.light-high.tokens.json +2944 -0
  216. package/dist/dtcg/print-papel-salmao.light.tokens.json +2941 -0
  217. package/dist/dtcg/print-pictogramas.dark-high.tokens.json +2946 -0
  218. package/dist/dtcg/print-pictogramas.dark.tokens.json +2946 -0
  219. package/dist/dtcg/print-pictogramas.light-high.tokens.json +2946 -0
  220. package/dist/dtcg/print-pictogramas.light.tokens.json +2942 -0
  221. package/dist/dtcg/print-pop-art.dark-high.tokens.json +2942 -0
  222. package/dist/dtcg/print-pop-art.dark.tokens.json +2942 -0
  223. package/dist/dtcg/print-pop-art.light-high.tokens.json +2942 -0
  224. package/dist/dtcg/print-pop-art.light.tokens.json +2938 -0
  225. package/dist/dtcg/print-prancheta-clara.dark-high.tokens.json +2960 -0
  226. package/dist/dtcg/print-prancheta-clara.dark.tokens.json +2960 -0
  227. package/dist/dtcg/print-prancheta-clara.light-high.tokens.json +2960 -0
  228. package/dist/dtcg/print-prancheta-clara.light.tokens.json +2956 -0
  229. package/dist/dtcg/print-prancheta.dark-high.tokens.json +2960 -0
  230. package/dist/dtcg/print-prancheta.dark.tokens.json +2956 -0
  231. package/dist/dtcg/print-prancheta.light-high.tokens.json +2960 -0
  232. package/dist/dtcg/print-prancheta.light.tokens.json +2960 -0
  233. package/dist/dtcg/print-proporcao-modular.dark-high.tokens.json +2945 -0
  234. package/dist/dtcg/print-proporcao-modular.dark.tokens.json +2945 -0
  235. package/dist/dtcg/print-proporcao-modular.light-high.tokens.json +2945 -0
  236. package/dist/dtcg/print-proporcao-modular.light.tokens.json +2941 -0
  237. package/dist/dtcg/print-riso.dark-high.tokens.json +2960 -0
  238. package/dist/dtcg/print-riso.dark.tokens.json +2960 -0
  239. package/dist/dtcg/print-riso.light-high.tokens.json +2960 -0
  240. package/dist/dtcg/print-riso.light.tokens.json +2956 -0
  241. package/dist/dtcg/print-semanario.dark-high.tokens.json +2944 -0
  242. package/dist/dtcg/print-semanario.dark.tokens.json +2944 -0
  243. package/dist/dtcg/print-semanario.light-high.tokens.json +2944 -0
  244. package/dist/dtcg/print-semanario.light.tokens.json +2937 -0
  245. package/dist/dtcg/print-sinalizacao.dark-high.tokens.json +2946 -0
  246. package/dist/dtcg/print-sinalizacao.dark.tokens.json +2946 -0
  247. package/dist/dtcg/print-sinalizacao.light-high.tokens.json +2946 -0
  248. package/dist/dtcg/print-sinalizacao.light.tokens.json +2942 -0
  249. package/dist/dtcg/print-suico.dark-high.tokens.json +2960 -0
  250. package/dist/dtcg/print-suico.dark.tokens.json +2960 -0
  251. package/dist/dtcg/print-suico.light-high.tokens.json +2960 -0
  252. package/dist/dtcg/print-suico.light.tokens.json +2956 -0
  253. package/dist/dtcg/print-tropicalia.dark-high.tokens.json +2945 -0
  254. package/dist/dtcg/print-tropicalia.dark.tokens.json +2945 -0
  255. package/dist/dtcg/print-tropicalia.light-high.tokens.json +2945 -0
  256. package/dist/dtcg/print-tropicalia.light.tokens.json +2941 -0
  257. package/dist/dtcg/tympan.dark-high.tokens.json +2971 -0
  258. package/dist/dtcg/tympan.dark.tokens.json +2971 -0
  259. package/dist/dtcg/tympan.light-high.tokens.json +2971 -0
  260. package/dist/dtcg/tympan.light.tokens.json +2971 -0
  261. package/dist/index.d.ts +642 -0
  262. package/dist/index.js +4873 -0
  263. package/dist/index.js.map +1 -0
  264. package/dist/print-aliases.d.ts +54 -0
  265. package/dist/print-aliases.js +71 -0
  266. package/dist/print-aliases.js.map +1 -0
  267. package/dist/print-themes/print-aquarela.css +1483 -0
  268. package/dist/print-themes/print-art-nouveau.css +1467 -0
  269. package/dist/print-themes/print-atlas-oficial.css +1467 -0
  270. package/dist/print-themes/print-azulejo-modernista.css +1467 -0
  271. package/dist/print-themes/print-bauhaus.css +1467 -0
  272. package/dist/print-themes/print-blocos-coloridos.css +1467 -0
  273. package/dist/print-themes/print-brutalista.css +1475 -0
  274. package/dist/print-themes/print-caderno.css +1483 -0
  275. package/dist/print-themes/print-cartao-postal.css +1483 -0
  276. package/dist/print-themes/print-cientifico.css +1467 -0
  277. package/dist/print-themes/print-concretismo.css +1467 -0
  278. package/dist/print-themes/print-construtivismo.css +1467 -0
  279. package/dist/print-themes/print-cordel.css +1483 -0
  280. package/dist/print-themes/print-dados-br.css +1475 -0
  281. package/dist/print-themes/print-dashboard.css +1475 -0
  282. package/dist/print-themes/print-diagrama-modernista.css +1467 -0
  283. package/dist/print-themes/print-divulgacao.css +1467 -0
  284. package/dist/print-themes/print-fluxo-historico.css +1475 -0
  285. package/dist/print-themes/print-grade-holandesa.css +1475 -0
  286. package/dist/print-themes/print-graficos-1900.css +1483 -0
  287. package/dist/print-themes/print-infografico-ilustrado.css +1467 -0
  288. package/dist/print-themes/print-isotype.css +1467 -0
  289. package/dist/print-themes/print-jornal-1959.css +1467 -0
  290. package/dist/print-themes/print-jornal.css +1475 -0
  291. package/dist/print-themes/print-mapa-de-metro.css +1467 -0
  292. package/dist/print-themes/print-memphis.css +1467 -0
  293. package/dist/print-themes/print-minimo-de-tinta.css +1475 -0
  294. package/dist/print-themes/print-papel-recortado.css +1467 -0
  295. package/dist/print-themes/print-papel-salmao.css +1467 -0
  296. package/dist/print-themes/print-pictogramas.css +1467 -0
  297. package/dist/print-themes/print-pop-art.css +1467 -0
  298. package/dist/print-themes/print-prancheta-clara.css +1483 -0
  299. package/dist/print-themes/print-prancheta.css +1483 -0
  300. package/dist/print-themes/print-proporcao-modular.css +1467 -0
  301. package/dist/print-themes/print-riso.css +1483 -0
  302. package/dist/print-themes/print-semanario.css +1467 -0
  303. package/dist/print-themes/print-sinalizacao.css +1467 -0
  304. package/dist/print-themes/print-suico.css +1475 -0
  305. package/dist/print-themes/print-tropicalia.css +1467 -0
  306. package/dist/print-themes.css +57215 -0
  307. package/dist/print-themes.json +236 -0
  308. package/dist/tokens.css +64416 -0
  309. package/dist/tokens.json +31449 -0
  310. package/dist/values.d.ts +14 -0
  311. package/dist/values.js +31454 -0
  312. package/package.json +67 -0
  313. package/src/base/motion.tokens.json +15 -0
  314. package/src/base/space.tokens.json +122 -0
  315. package/src/base/type.tokens.json +227 -0
  316. package/src/base/z.tokens.json +13 -0
  317. package/src/color.ts +239 -0
  318. package/src/dtcg.ts +102 -0
  319. package/src/flow.ts +130 -0
  320. package/src/index.ts +17 -0
  321. package/src/presets.ts +135 -0
  322. package/src/presets.ts.diff +26 -0
  323. package/src/print-aliases.ts +84 -0
  324. package/src/print-presets.ts +1611 -0
  325. package/src/print-themes.ts +404 -0
  326. package/src/scripts.ts +75 -0
  327. package/src/stylesheet.ts +238 -0
  328. package/src/theme.ts +553 -0
  329. package/src/theme.ts.rej +16 -0
package/LICENSE ADDED
@@ -0,0 +1,105 @@
1
+ # Functional Source License, Version 1.1, ALv2 Future License
2
+
3
+ ## Abbreviation
4
+
5
+ FSL-1.1-ALv2
6
+
7
+ ## Notice
8
+
9
+ Copyright 2026 Natalia Mesquita
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
package/README.md ADDED
@@ -0,0 +1,318 @@
1
+ # @datatechsolutions/tympan-tokens
2
+
3
+ Design tokens and theme generator of Tympan, an Astrlabe-family component
4
+ published by Datatech. Licence:
5
+ FSL-1.1-ALv2 (Functional Source License, Version 1.1, Apache 2.0 Future
6
+ License); see `LICENSE`.
7
+ Visual source of truth: `docs/infra/design-direction-fakhir.md` (§2.1 to §2.13)
8
+ in the thesis repository.
9
+
10
+ ```sh
11
+ npm run build -w @datatechsolutions/tympan-tokens # dist/tokens.css, tokens.json, values.js, dtcg/, contrast-report.md, index.js
12
+ npm run typecheck -w @datatechsolutions/tympan-tokens # tsc + source validation + WCAG gate
13
+ npm test -w @datatechsolutions/tympan-tokens # vitest: colour math, ramps, AA in every preset/mode, DTCG, stylesheet
14
+ ```
15
+
16
+ ## What is in the box
17
+
18
+ | Output | Content |
19
+ |---|---|
20
+ | `@datatechsolutions/tympan-tokens/tokens.css` | every `--ty-*` custom property, in `@layer tympan.tokens` |
21
+ | `@datatechsolutions/tympan-tokens/tokens.json` | resolved values: base, density steps, each preset × mode (× high contrast) |
22
+ | `@datatechsolutions/tympan-tokens/dtcg/*.tokens.json` | W3C DTCG trees (2025.10 format) of every set, as fed to Style Dictionary (`dtcg/print/` for the print themes) |
23
+ | `@datatechsolutions/tympan-tokens/print-themes.css` | opt-in: every print book style as a UI theme (`data-ty-theme="print-<style>"`), light, dark and high contrast |
24
+ | `@datatechsolutions/tympan-tokens/print-themes/<theme>.css` | opt-in: one print theme per file (for example `print-themes/print-suico.css`) |
25
+ | `@datatechsolutions/tympan-tokens/print-themes.json` | name, label, font stylesheet URL and CSS file of each print theme |
26
+ | `@datatechsolutions/tympan-tokens/values` | the resolved values as a typed JS module (`values`, `cssVar()`) |
27
+ | `@datatechsolutions/tympan-tokens` | the generator: colour math, `resolveTheme`, presets, `generateThemeCss`, DTCG conversion |
28
+ | `dist/contrast-report.md` | WCAG ratio and APCA Lc of every declared pair, per preset and mode |
29
+
30
+ ## Token model
31
+
32
+ **Static (authored as DTCG in `src/base/`)**: spacing on a 4 px base
33
+ (`--ty-space-1..9`, §2.1), layout sizes (`--ty-layout-*`, §2.8), the 44 px
34
+ touch target (`--ty-control-target`), type families, sizes with paired line
35
+ heights, weights and tracking (§2.2), prose measures, durations and easings
36
+ (`--ty-dur-*`, `--ty-ease`, `--ty-ease-out`, §2.7), stacking order (`--ty-z-*`).
37
+
38
+ **Generated per theme and mode (`src/theme.ts`)**:
39
+
40
+ - **Ramps**: 11 steps (`50 … 950`) per seed, computed in OKLCH:
41
+ `--ty-brand-*`, `--ty-neutral-*`, `--ty-danger-*`, `--ty-warning-*`,
42
+ `--ty-success-*`, `--ty-info-*`.
43
+ - **Paired roles** (X / on-X):
44
+ `bg`/`on-bg`, `surface`/`on-surface`, `surface-raised`/`on-surface-raised`,
45
+ `surface-sunken`/`on-surface-sunken`, `brand`/`on-brand`,
46
+ `brand-soft`/`on-brand-soft`, `cta`/`on-cta`, `secondary`/`on-secondary`,
47
+ and for each tone `danger|warning|success|info|neutral`: `X`, `on-X`,
48
+ `X-soft`, `on-X-soft`. Also `ink`, `ink-2`, `ink-3` (three text levels),
49
+ `line`, `line-soft`, `line-strong`, `input` (field border, 3:1),
50
+ `focus-ring`, `focus-width`, `backdrop`, `ambient-1/2`.
51
+ - **Proof states and actors** (§2.11): `proof-{proved,pending,refuted,not-disclosed,none}`
52
+ (+ `-soft`), `actor-{person,agent,system}` (+ `-soft`).
53
+ - **Charts**: `chart-1..8` (aliases `categorical-1..8`), each ≥ 3:1 on the sheet.
54
+ - **Navigation**: `nav-bg`, `on-nav`, `nav-active`, `on-nav-active`, `nav-line`.
55
+ - **Radius**: one base `--ty-radius`; `radius-control` = base, `radius-card` =
56
+ 1.6 × base, `radius-sheet` = 2.4 × base, `radius-pill`, `radius-agent` = 0.6 × base
57
+ (base 10 gives 10 / 16 / 24 / 6, §2.4).
58
+ - **Elevation and glass**: `shadow-{sheet,raised,floating,modal,sheet-inset}`
59
+ tinted with the neutral hue (never black), `glass-blur-sheet`,
60
+ `glass-blur-floating`, `glass-saturate` (§2.5).
61
+ - **Design-direction aliases**: `accent`, `accent-strong`, `accent-soft`,
62
+ `accent-ink`, `on-accent`, `on-accent-soft` point at the brand roles.
63
+ - **Typography (optional)**: a theme with `fonts` sets `--ty-font-serif`
64
+ (role `display`: headings h1 to h3 and KPI numbers), `--ty-font-sans`
65
+ (role `body`) and `--ty-font-mono` (role `mono`) on its scope; the built-in
66
+ presets leave them to the base tokens. `elevation` (`soft` | `flat` |
67
+ `offset`) picks blurred shadows, none, or a hard ink shadow.
68
+
69
+ **Density** (`data-ty-density`): `compact | default | comfortable` sets
70
+ `--ty-control-height`, `--ty-control-height-touch`, `--ty-control-height-compact`
71
+ and `--ty-density`. The 44 px hit area never changes.
72
+
73
+ **Canvas component tokens (`src/flow.ts`, `--ty-flow-*`)**, used by the
74
+ flow canvas (`@datatechsolutions/tympan/flow`): kind tones `tone-{categorical-1..8,neutral}` with
75
+ `-ink`, `-soft` (a 14 % oklab mix) and `-text`, and the `[data-tone]` mapping
76
+ that sets `--ty-flow-tone`, `-ink`, `-soft`, `-text` on any element;
77
+ connectors (`connector`, `-active`, `-true`, `-false`, `-rule`, `-width`,
78
+ `-width-active`); node frame (`node-border`, `-border-hover`, `-surface`,
79
+ `-radius`) and state rings (`ring-{selected,running,succeeded,failed}`);
80
+ canvas plane (`plane`, `grid-dot`, `guide`, `marquee`); provenance bands
81
+ (`band` 96, `band-label` 130, `node-h` 72, `node-w` 236 px); research steps
82
+ (`step-w` 250, `step-h` 86, `col-gap` 56 px) and data shapes
83
+ (`shape-{records,table,number,chart,decision}`). Colours are DTCG aliases of
84
+ theme roles (`dist/dtcg/flow.tokens.json`) emitted as `var(--ty-role)`, and are
85
+ declared on every theme and mode scope so a nested theme re-resolves them.
86
+
87
+ ## Theming attributes
88
+
89
+ ```html
90
+ <html data-ty-theme="tympan" data-ty-mode="system" data-ty-density="default">
91
+ ```
92
+
93
+ - `data-ty-theme`: `tympan` (default, also applied to `:root`), `fakhir`,
94
+ `neutral`, `high-contrast`, or the name of a generated theme.
95
+ - `data-ty-mode`: `light`, `dark`, or `system`/absent (follows `prefers-color-scheme`).
96
+ - `data-ty-density`: see above.
97
+
98
+ The attributes may be on the same element or nested (a light preview inside a
99
+ dark page works). User preferences are handled in the stylesheet:
100
+
101
+ | Preference | Effect |
102
+ |---|---|
103
+ | `prefers-color-scheme: dark` | dark values when the mode is `system` |
104
+ | `prefers-contrast: more` | the high-contrast variant of the current theme |
105
+ | `prefers-reduced-transparency: reduce` (and no `backdrop-filter` support) | opaque surfaces, no blur, no ambient |
106
+ | `prefers-reduced-motion: reduce` | every `--ty-dur-*` becomes `0ms` |
107
+ | `forced-colors: active` | roles map to system colours (`Canvas`, `CanvasText`, `Highlight`, …); shadows off |
108
+
109
+ In the design system, `<ThemeProvider>` / `useTheme()` set these attributes and
110
+ `themeInitScript()` applies the stored choice before first paint.
111
+
112
+ ## Presets
113
+
114
+ | Preset | Seeds | Radius | Contrast | Glass | CTA |
115
+ |---|---|---|---|---|---|
116
+ | `tympan` (default) | brand teal from the §2.3 accent, neutral with a slight teal tint, semantic hues | 10 | default | on | gradient |
117
+ | `fakhir` | the look of the Fakhir research platform; today the same values as `tympan` | 10 | default | on | gradient |
118
+ | `neutral` | grey-blue brand, near-grey neutral | 8 | default | on | solid |
119
+ | `high-contrast` | tympan seeds | 10 | high | off | solid |
120
+
121
+ The `tympan` preset (and `fakhir`, which an app selects by name with
122
+ `data-ty-theme="fakhir"` or `ThemeProvider theme="fakhir"`) **pins** the exact
123
+ colours of design direction §2.3 (accent,
124
+ surfaces, ink, lines, semantic tones, the CTA gradient) on top of the generated
125
+ roles, so the product keeps the approved look; every other role is generated.
126
+ `neutral` and `high-contrast` are fully generated.
127
+
128
+ ## Book-style print presets
129
+
130
+ `printPresets` holds the 39 book diagramming styles used by
131
+ `@datatechsolutions/tympan-print` (`PRINT_PRESET_NAMES` gives the order:
132
+ `dashboard` … `papel-salmao`, then `dados-br`, `fluxo-historico`,
133
+ `blocos-coloridos`, `construtivismo`, `bauhaus`, `brutalista`, `divulgacao`,
134
+ `proporcao-modular`, `sinalizacao`, `pictogramas`, `mapa-de-metro`,
135
+ `jornal-1959`, `azulejo-modernista`, `tropicalia`, `atlas-oficial`,
136
+ `grade-holandesa`, `papel-recortado`, `pop-art`, `cientifico`, `art-nouveau`,
137
+ `memphis`). Ids and labels are neutral, descriptive names; the tradition a
138
+ style draws on is named only in its description (`referencia`, "inspirado em
139
+ …").
140
+ Optional fields cover page ornaments (`estrutura.moldura`, `cor.ornamento`),
141
+ columns (`estrutura.barras`), running-head bands and title treatments. Each `PrintStyle` names its fonts (Google Fonts,
142
+ OFL), paper and ink, data and proof-state colours, paper texture, stroke,
143
+ chart renderer, proof-mark shape and page structure.
144
+
145
+ ```ts
146
+ import { printPresets, printStyleToCss, googleFontsUrl } from '@datatechsolutions/tympan-tokens'
147
+
148
+ printStyleToCss(printPresets.jornal) // [data-ty-print-style="jornal"] { --ty-print-*: … }
149
+ printStyleToCss(printPresets.jornal, { pb: true }) // black and white: greys of equal luminance + the style's pb
150
+ printStyleToCss(printPresets.jornal, { overrides: { cor: { destaque: '#8a1c7c' } } })
151
+ ```
152
+
153
+ ### Renamed styles (deprecated ids)
154
+
155
+ Eighteen styles were renamed so that no id or label uses a trademark, an
156
+ institution or a person's name. The old ids still work: `PRINT_STYLE_ALIASES`
157
+ maps each one to its new id, and `resolvePrintStyleName`, `printPresetById`,
158
+ `resolvePrintStyle` (which also takes an id), `LivroPrint estilo` and the UI
159
+ theme lookup (`print-<old id>`, through `PRINT_THEME_ALIASES` and
160
+ `resolvePrintThemeName`, used by `ThemeProvider` and `themeInitScript`) accept
161
+ them, with a one-time console warning in development builds. The alias maps
162
+ and resolvers are also published alone, without the presets, as
163
+ `@datatechsolutions/tympan-tokens/print-aliases`.
164
+
165
+ | Old id | New id | Label |
166
+ | --- | --- | --- |
167
+ | `economist` | `semanario` | Semanário de economia |
168
+ | `ft` | `papel-salmao` | Papel salmão |
169
+ | `schiphol` | `sinalizacao` | Sinalização de aeroporto |
170
+ | `jornal-do-brasil` | `jornal-1959` | Jornal modernista (1959) |
171
+ | `atlas-ibge` | `atlas-oficial` | Atlas oficial (cartografia) |
172
+ | `deardata` | `cartao-postal` | Cartão-postal desenhado à mão |
173
+ | `tufte` | `minimo-de-tinta` | Mínimo de tinta |
174
+ | `holmes` | `infografico-ilustrado` | Infográfico ilustrado |
175
+ | `bayer` | `diagrama-modernista` | Diagrama modernista |
176
+ | `dubois` | `graficos-1900` | Gráficos de exposição (1900) |
177
+ | `minard` | `fluxo-historico` | Fluxo histórico (séc. XIX) |
178
+ | `mccandless` | `blocos-coloridos` | Blocos coloridos |
179
+ | `corbusier` | `proporcao-modular` | Proporção modular |
180
+ | `aicher` | `pictogramas` | Pictogramas esportivos |
181
+ | `vignelli` | `mapa-de-metro` | Mapa de metrô |
182
+ | `athos-bulcao` | `azulejo-modernista` | Azulejo modernista |
183
+ | `crouwel` | `grade-holandesa` | Grade holandesa |
184
+ | `saul-bass` | `papel-recortado` | Papel recortado |
185
+
186
+ The labels of `tropicalia`, `pop-art`, `art-nouveau` and `memphis` no longer
187
+ carry a person's name (the ids are unchanged), and the emblem `'modulor'` is
188
+ now `'figura-modular'` (the old value is still drawn).
189
+
190
+ **Removal:** the aliases, the `print-<old id>` theme names and the `'modulor'`
191
+ emblem will be removed in the next major version of
192
+ `@datatechsolutions/tympan-tokens` and `@datatechsolutions/tympan-print`.
193
+ Migrate stored data books to the new ids before then.
194
+
195
+ ```ts
196
+ resolvePrintStyle('economist').name // 'semanario' (warns once in development)
197
+ resolvePrintThemeName('print-tufte') // 'print-minimo-de-tinta'
198
+ ```
199
+
200
+ Tests hold every preset to WCAG AA for `tinta`, `tinta2` and the six proof
201
+ colours on the paper (in colour and in P&B) and keep every data colour
202
+ (`destaque`, `destaque2`, `contexto`, proof states) at CIEDE2000 ΔE ≥ 10 from
203
+ the colours of the lakebrasil logo. `deltaE2000` and `rgbToLab` are exported
204
+ from the colour module.
205
+
206
+ ## Print styles as UI themes
207
+
208
+ `printStyleToTheme(style)` derives a `ThemeConfig` from any `PrintStyle`, and
209
+ `printThemePresets` holds one per book style, named `print-<style>` (for
210
+ example `print-suico`, `print-minimo-de-tinta`). The mapping is data-driven:
211
+
212
+ - **Palette**: in the style's own mode (light for paper styles, dark for
213
+ dark-paper styles such as `prancheta`) the paper is `bg`, surfaces step
214
+ lighter than it and the well darker, `tinta`/`tinta2`/`tinta3` are the three
215
+ ink levels, the printed rule gives the lines, the highlighter tint is
216
+ `brand-soft` and the selected nav item, and the proof-state colours are the
217
+ danger, success and warning tones where they are chromatic. The brand is the
218
+ style's accent (`printStyleAccent`), moved along OKLCH lightness only as far
219
+ as it needs to read on the paper (`legibleOn`). Chart hues come from the
220
+ accents, ornaments and proof colours.
221
+ - **Other mode**: generated from the same hues (neutral from the paper tint,
222
+ brand from the accent), with the paper colour as the ink and the printed
223
+ accent kept as the brand where it reads.
224
+ - **Typography**: `fonts.display` and `fonts.body` are the style's title and
225
+ body stacks; `fonts.mono` is the style's mono stack only when it is really
226
+ monospace (otherwise the base mono stays). `fontsUrl` is the style's Google
227
+ Fonts css2 URL (`googleFontsUrl`) limited to those families.
228
+ - **Surface**: radius from the print corner radius (mm at 96 dpi); glass,
229
+ a gradient call to action and soft shadows only for the card and wash
230
+ styles (`dashboard`, `aquarela`); flat shadows for the ruled print styles
231
+ (`suico`, `minimo-de-tinta`, `bauhaus` …); a hard offset shadow for cut-paper and
232
+ poster styles (`brutalista`, `memphis`, `pop-art`, `divulgacao`).
233
+ - **Contrast**: every exact print colour is a pin only while all WCAG 2.2 AA
234
+ pairs hold in that mode; a pin that fails is dropped and the role is
235
+ regenerated from the style's hue (`printThemeDroppedPins(style)` lists
236
+ them). Tests run every pair of every print theme in light, dark and high
237
+ contrast.
238
+ - **Overrides**: `printStyleToTheme(style, { brand, radius, glass, cta, elevation, pins })`,
239
+ and `PRINT_THEME_OVERRIDES` for judgements the data cannot express.
240
+
241
+ The print themes are **not** in `tokens.css`. To enable them in an app:
242
+
243
+ ```ts
244
+ import '@datatechsolutions/tympan/styles.css' // or tokens.css
245
+ import '@datatechsolutions/tympan-tokens/print-themes.css' // all print themes (about 2 MB, 160 kB gzip)
246
+ // or only the ones you offer:
247
+ import '@datatechsolutions/tympan-tokens/print-themes/print-suico.css'
248
+
249
+ import { printThemeFontUrls } from '@datatechsolutions/tympan-tokens'
250
+ <ThemeProvider theme="print-suico" fonts={printThemeFontUrls}>…</ThemeProvider>
251
+ ```
252
+
253
+ `ThemeProvider`'s `fonts` map (theme name to stylesheet URL) adds the font
254
+ link of the current theme; `themeInitScript(key, defaults, { fonts })` does the
255
+ same before first paint. Without it the stacks fall back to the style's
256
+ system families. `generatePrintThemesCss(list)` builds the same sheet at
257
+ runtime. A default theme nested inside a print theme inherits the print
258
+ fonts, because the built-in presets do not redeclare the font tokens.
259
+
260
+ ## Generator API
261
+
262
+ ```ts
263
+ import { resolveTheme, generateThemeCss, themeToDtcg, tympanPreset, type ThemeConfig } from '@datatechsolutions/tympan-tokens'
264
+
265
+ const config: ThemeConfig = {
266
+ name: 'lab',
267
+ seeds: {
268
+ brand: { hue: 200, chroma: 0.14 }, neutral: { hue: 200, chroma: 0.012 },
269
+ danger: { hue: 15, chroma: 0.2 }, warning: { hue: 70, chroma: 0.15 },
270
+ success: { hue: 150, chroma: 0.16 }, info: { hue: 250, chroma: 0.07 },
271
+ },
272
+ radius: 12, contrast: 'default', glass: true, cta: 'gradient',
273
+ }
274
+ const light = resolveTheme(config, 'light') // roles, ramps, shadows, radii, contrast report
275
+ const css = generateThemeCss(config) // [data-ty-theme="lab"] … blocks, all preference media
276
+ const dtcg = themeToDtcg(light) // DTCG tree
277
+ ```
278
+
279
+ Inputs: seed hue and chroma for six seeds, chart hues, radius base, contrast
280
+ (`default` | `high`), glass on/off, CTA style, optional pinned colours, and
281
+ optionally font families per role (`fonts`, `fontsUrl`) and `elevation`. It is
282
+ pure and deterministic (same input, same output).
283
+
284
+ **Contrast is enforced, then tested.** Each theme declares 70+ pairs
285
+ (`contrastPairs()`): text roles at 4.5:1 and UI roles (field border, focus ring
286
+ on every surface, brand on sunken tracks, chart colours) at 3:1, with
287
+ translucent layers composited over what sits beneath. The generator nudges any
288
+ non-pinned foreground along its OKLCH lightness axis until the pair passes;
289
+ pinned colours are never changed, and a failing pin fails the build. The tests
290
+ check every pair in every preset × mode × contrast level and a hue sweep of
291
+ custom themes (what the customizer can produce). APCA Lc is computed for every
292
+ pair and reported, not enforced.
293
+
294
+ ## Pipeline choice: Style Dictionary v5
295
+
296
+ Checked on 2026-09-26: `style-dictionary@5.5.5` and `@terrazzo/cli@2.7.1`.
297
+ Style Dictionary was chosen because:
298
+
299
+ - its programmatic API (`formatPlatform`) returns output in memory, which lets
300
+ the build compare its result with the generator's own serialisation (the
301
+ one the live customizer uses) and fail on any difference;
302
+ - it reads DTCG natively (`usesDtcg`), including 2025.10 colour and dimension
303
+ objects, and hooks make every value transform ours (colour, shadow,
304
+ gradient, dimension, duration), so the CSS text is identical from both paths;
305
+ - it is widely used and stable across majors; Terrazzo's native modes are
306
+ attractive, but the selector strategy here (theme × mode × density ×
307
+ preference media) is assembled by `src/stylesheet.ts` anyway, which removes
308
+ that advantage.
309
+
310
+ ## Sources
311
+
312
+ The concepts taken from public documentation, with the URLs consulted, are
313
+ recorded in `PROVENANCE.md`.
314
+
315
+ Other references: W3C Design Tokens Community Group format (2025.10); WCAG 2.2
316
+ (1.4.3, 1.4.11, 2.4.7, 2.4.13); Björn Ottosson, "A perceptual color space for
317
+ image processing" (OKLab definition and matrices); the public description of
318
+ the APCA-W3 0.0.98G constants (informational only).