@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/src/dtcg.ts ADDED
@@ -0,0 +1,102 @@
1
+ // Conversion between resolved themes and W3C Design Tokens Community Group
2
+ // (DTCG, 2025.10 format) trees: colour objects with `colorSpace` and
3
+ // `components`, dimension objects with `value` and `unit`.
4
+ // Every generated token carries its CSS custom property name in
5
+ // `$extensions["br.com.datatechsolutions.tympan"].cssName` so any DTCG tool maps it back exactly.
6
+
7
+ import { toHex, type Rgba } from './color.ts'
8
+ import { RAMP_STEPS, type Density, DENSITIES, type ResolvedTheme, type ShadowLayer } from './theme.ts'
9
+
10
+ export interface DtcgColor {
11
+ colorSpace: 'srgb'
12
+ components: [number, number, number]
13
+ alpha?: number
14
+ hex: string
15
+ }
16
+
17
+ type Tree = { [key: string]: Tree | unknown }
18
+
19
+ const r4 = (v: number) => Math.round(v * 10000) / 10000
20
+
21
+ export function toDtcgColor(c: Rgba): DtcgColor {
22
+ const out: DtcgColor = { colorSpace: 'srgb', components: [r4(c.r), r4(c.g), r4(c.b)], hex: toHex(c) }
23
+ if (c.a < 1) out.alpha = r4(c.a)
24
+ return out
25
+ }
26
+
27
+ export function fromDtcgColor(v: DtcgColor | string): Rgba {
28
+ if (typeof v === 'string') {
29
+ const h = v.replace('#', '')
30
+ return { r: parseInt(h.slice(0, 2), 16) / 255, g: parseInt(h.slice(2, 4), 16) / 255, b: parseInt(h.slice(4, 6), 16) / 255, a: 1 }
31
+ }
32
+ const [r, g, b] = v.components
33
+ return { r, g, b, a: v.alpha ?? 1 }
34
+ }
35
+
36
+ const px = (value: number) => ({ value, unit: 'px' as const })
37
+ const ext = (cssName: string) => ({ 'br.com.datatechsolutions.tympan': { cssName } })
38
+
39
+ function shadowValue(layers: ShadowLayer[]) {
40
+ return layers.map((l) => ({
41
+ color: toDtcgColor(l.color),
42
+ offsetX: px(l.x),
43
+ offsetY: px(l.y),
44
+ blur: px(l.blur),
45
+ spread: px(l.spread),
46
+ ...(l.inset ? { inset: true } : {}),
47
+ }))
48
+ }
49
+
50
+ /** DTCG tree for one resolved theme and mode. */
51
+ export function themeToDtcg(t: ResolvedTheme): Tree {
52
+ const color: Tree = { $type: 'color' }
53
+ for (const [name, c] of Object.entries(t.colors)) {
54
+ color[name] = { $value: toDtcgColor(c), $extensions: ext(`--ty-${name}`) }
55
+ }
56
+ const ramp: Tree = { $type: 'color' }
57
+ for (const [seed, steps] of Object.entries(t.ramps)) {
58
+ const group: Tree = {}
59
+ for (const step of RAMP_STEPS) group[String(step)] = { $value: toDtcgColor(steps[step]), $extensions: ext(`--ty-${seed}-${step}`) }
60
+ ramp[seed] = group
61
+ }
62
+ const shadow: Tree = { $type: 'shadow' }
63
+ for (const [name, layers] of Object.entries(t.shadows)) {
64
+ shadow[name] = { $value: shadowValue(layers), $extensions: ext(`--ty-shadow-${name}`) }
65
+ }
66
+ const dimension: Tree = { $type: 'dimension' }
67
+ for (const [name, v] of Object.entries(t.dimensions)) dimension[name] = { $value: px(v), $extensions: ext(`--ty-${name}`) }
68
+ const number: Tree = { $type: 'number' }
69
+ for (const [name, v] of Object.entries(t.numbers)) number[name] = { $value: v, $extensions: ext(`--ty-${name}`) }
70
+
71
+
72
+ const fontFamily: Tree = { $type: 'fontFamily' }
73
+ for (const [name, list] of Object.entries(t.fonts)) fontFamily[name] = { $value: [...list], $extensions: ext(`--ty-font-${name}`) }
74
+ return {
75
+ $description: `Theme ${t.name}, ${t.mode} mode, ${t.contrast} contrast. Generated by @datatechsolutions/tympan-tokens.`,
76
+ color,
77
+ ramp,
78
+ gradient: {
79
+ $type: 'gradient',
80
+ cta: {
81
+ $value: t.cta.stops.map((s, i, all) => ({ color: toDtcgColor(s), position: all.length === 1 ? 0 : r4(i / (all.length - 1)) })),
82
+ $extensions: { 'br.com.datatechsolutions.tympan': { cssName: '--ty-cta', angle: t.cta.angle } },
83
+ },
84
+ },
85
+ shadow,
86
+ dimension,
87
+ number,
88
+ ...(Object.keys(t.fonts).length ? { fontFamily } : {})
89
+ }
90
+ }
91
+
92
+ /** DTCG tree for one density step. */
93
+ export function densityToDtcg(density: Density): Tree {
94
+ const group: Tree = { $type: 'dimension' }
95
+ for (const [k, v] of Object.entries(DENSITIES[density])) {
96
+ group[k] =
97
+ k === 'density'
98
+ ? { $type: 'number', $value: v, $extensions: ext(`--ty-${k}`) }
99
+ : { $value: px(v), $extensions: ext(`--ty-${k}`) }
100
+ }
101
+ return { $description: `Density ${density}.`, density: group }
102
+ }
package/src/flow.ts ADDED
@@ -0,0 +1,130 @@
1
+ // Canvas tokens (--ty-flow-*) for the flow canvas (@datatechsolutions/tympan/flow): kind tones, connectors,
2
+ // node frame and state rings, the canvas plane, provenance band and research
3
+ // step sizes, and data shape colours.
4
+ //
5
+ // Colour tokens are references to theme roles, emitted as `var(--ty-role)` so
6
+ // every theme, mode, contrast level and forced-colours mapping follows without
7
+ // a per-theme copy. In DTCG they are aliases (`{color.accent}`,
8
+ // `{dimension.radius-card}`); a soft tint carries its mix in
9
+ // `$extensions["br.com.datatechsolutions.tympan"].mix`. Sizes are plain px dimensions (the
10
+ // provenance layout reads them at mount). No gradients: the design direction
11
+ // reserves the gradient for the primary button.
12
+
13
+ export type FlowToken =
14
+ | { type: 'color'; ref: string; mix?: number }
15
+ | { type: 'dimension'; ref: string }
16
+ | { type: 'dimension'; px: number }
17
+
18
+ export const FLOW_TONES = [
19
+ 'categorical-1', 'categorical-2', 'categorical-3', 'categorical-4',
20
+ 'categorical-5', 'categorical-6', 'categorical-7', 'categorical-8', 'neutral',
21
+ ] as const
22
+ export type FlowTone = (typeof FLOW_TONES)[number]
23
+
24
+ /** Tint strength of a tone's soft variant (badge background). */
25
+ const SOFT_MIX = 14
26
+
27
+ const color = (ref: string, mix?: number): FlowToken => (mix === undefined ? { type: 'color', ref } : { type: 'color', ref, mix })
28
+ const px = (value: number): FlowToken => ({ type: 'dimension', px: value })
29
+
30
+ function toneTokens(): Array<[string, FlowToken]> {
31
+ const out: Array<[string, FlowToken]> = []
32
+ const cats = FLOW_TONES.filter((t) => t !== 'neutral')
33
+ // Full strength (bubble fill, port, overview map), ink on it, soft tint and text in the tone.
34
+ for (const t of cats) out.push([`tone-${t}`, color(t)])
35
+ out.push(['tone-neutral', color('ink-3')])
36
+ for (const t of cats) out.push([`tone-${t}-ink`, color('on-accent')])
37
+ out.push(['tone-neutral-ink', color('surface-solid')])
38
+ for (const t of cats) out.push([`tone-${t}-soft`, color(t, SOFT_MIX)])
39
+ out.push(['tone-neutral-soft', color('surface-sunken')])
40
+ for (const t of cats) out.push([`tone-${t}-text`, color(t)])
41
+ out.push(['tone-neutral-text', color('ink-2')])
42
+ return out
43
+ }
44
+
45
+ /** Every canvas token, in stylesheet order (name without the `--ty-flow-` prefix). */
46
+ export const FLOW_TOKENS: ReadonlyArray<readonly [string, FlowToken]> = [
47
+ ...toneTokens(),
48
+ // Connectors. Rest uses the >=3:1 boundary role (WCAG 1.4.11), not line-strong.
49
+ ['connector', color('input')],
50
+ ['connector-active', color('accent')],
51
+ ['connector-true', color('success')],
52
+ ['connector-false', color('danger')],
53
+ ['connector-rule', color('categorical-2')],
54
+ ['connector-width', px(1.5)],
55
+ ['connector-width-active', px(2.5)],
56
+ // Node frame and state rings.
57
+ ['node-border', color('line-strong')],
58
+ ['node-border-hover', color('input')],
59
+ ['ring-selected', color('accent')],
60
+ ['ring-running', color('warning')],
61
+ ['ring-succeeded', color('success')],
62
+ ['ring-failed', color('danger')],
63
+ ['node-surface', color('surface-raised-solid')],
64
+ ['node-radius', { type: 'dimension', ref: 'radius-card' }],
65
+ // Canvas plane.
66
+ ['plane', color('surface-sunken')],
67
+ ['grid-dot', color('line-strong')],
68
+ ['guide', color('accent')],
69
+ ['marquee', color('accent-soft')],
70
+ // Provenance bands.
71
+ ['band', px(96)],
72
+ ['band-label', px(130)],
73
+ ['node-h', px(72)],
74
+ ['node-w', px(236)],
75
+ // Research steps and the data shapes on their ports (colour always paired with the shape word).
76
+ ['step-w', px(250)],
77
+ ['step-h', px(86)],
78
+ ['col-gap', px(56)],
79
+ ['shape-records', color('accent')],
80
+ ['shape-table', color('categorical-1')],
81
+ ['shape-number', color('warning')],
82
+ ['shape-chart', color('categorical-8')],
83
+ ['shape-decision', color('danger')],
84
+ ]
85
+
86
+ export const flowCssName = (name: string) => `--ty-flow-${name}`
87
+
88
+ /** CSS value of one canvas token. */
89
+ export function flowTokenCss(token: FlowToken): string {
90
+ if ('px' in token) return `${token.px}px`
91
+ const ref = `var(--ty-${token.ref})`
92
+ return token.type === 'color' && token.mix !== undefined ? `color-mix(in oklab, ${ref} ${token.mix}%, transparent)` : ref
93
+ }
94
+
95
+ /** Ordered `[--ty-flow-name, value]` pairs (the generator's direct serialisation). */
96
+ export function flowVariables(): Array<[string, string]> {
97
+ return FLOW_TOKENS.map(([name, token]) => [flowCssName(name), flowTokenCss(token)])
98
+ }
99
+
100
+ /** DTCG tree of the canvas tokens; colour and radius values alias the theme tree. */
101
+ export function flowToDtcg(): Record<string, unknown> {
102
+ const flow: Record<string, unknown> = {}
103
+ for (const [name, token] of FLOW_TOKENS) {
104
+ const app: Record<string, unknown> = { cssName: flowCssName(name) }
105
+ let $value: unknown
106
+ if ('px' in token) $value = { value: token.px, unit: 'px' }
107
+ else if (token.type === 'color') {
108
+ $value = `{color.${token.ref}}`
109
+ if (token.mix !== undefined) app.mix = { space: 'oklab', amount: token.mix / 100, with: 'transparent' }
110
+ } else $value = `{dimension.${token.ref}}`
111
+ flow[name] = { $type: token.type, $value, $extensions: { 'br.com.datatechsolutions.tympan': app } }
112
+ }
113
+ return {
114
+ $description: 'Canvas tokens for the flow canvas (@datatechsolutions/tympan/flow). Colour values alias theme roles and are emitted as var() references. Generated by @datatechsolutions/tympan-tokens.',
115
+ flow,
116
+ }
117
+ }
118
+
119
+ /**
120
+ * The `[data-tone]` mapping: a tone name on any element selects its four parts
121
+ * as `--ty-flow-tone`, `-ink`, `-soft` and `-text`.
122
+ */
123
+ export function flowToneRules(): string {
124
+ return FLOW_TONES.map(
125
+ (t) =>
126
+ `[data-tone="${t}"] {\n` +
127
+ ['', '-ink', '-soft', '-text'].map((part) => ` --ty-flow-tone${part}: var(--ty-flow-tone-${t}${part});`).join('\n') +
128
+ '\n}',
129
+ ).join('\n\n')
130
+ }
package/src/index.ts ADDED
@@ -0,0 +1,17 @@
1
+ // @datatechsolutions/tympan-tokens: design tokens and the theme generator (FSL-1.1-ALv2).
2
+ export * from './color.ts'
3
+ export * from './theme.ts'
4
+ export * from './presets.ts'
5
+ export * from './dtcg.ts'
6
+ export * from './stylesheet.ts'
7
+ export * from './flow.ts'
8
+ export * from './print-presets.ts'
9
+ export * from './print-themes.ts'
10
+ export * from './print-aliases.ts'
11
+
12
+ import { presets as corePresets } from './presets.ts'
13
+ import { printThemePresets } from './print-themes.ts'
14
+ import type { ThemeConfig } from './theme.ts'
15
+
16
+ // Unified exported themes: UI + Book themes combined
17
+ export const allThemes: readonly ThemeConfig[] = [...corePresets, ...printThemePresets]
package/src/presets.ts ADDED
@@ -0,0 +1,135 @@
1
+ import { seedFromColor, type Seed, type SeedName, type ThemeConfig } from './theme.ts'
2
+
3
+ // Seeds. The brand hue comes from the design direction's accent (§2.3); the
4
+ // neutral carries a slight tint of the brand hue; semantic hues are chosen so
5
+ // the proof-state greens sit about 30 degrees away from the brand teal (§2.3).
6
+ const brand = seedFromColor('#166e5a', 0.13)
7
+
8
+ const baseSeeds: Record<SeedName, Seed> = {
9
+ brand,
10
+ neutral: { hue: brand.hue, chroma: 0.012 },
11
+ danger: { hue: 12, chroma: 0.2 },
12
+ warning: { hue: 68, chroma: 0.15 },
13
+ success: { hue: 148, chroma: 0.16 },
14
+ info: { hue: 255, chroma: 0.06 },
15
+ }
16
+
17
+ /**
18
+ * Default theme. Generated from seeds, with the exact colours of design
19
+ * direction §2.3 pinned so the product matches the approved direction.
20
+ */
21
+ export const tympanPreset: ThemeConfig = {
22
+ name: 'tympan',
23
+ label: 'Tympan',
24
+ seeds: baseSeeds,
25
+ radius: 10,
26
+ contrast: 'default',
27
+ glass: true,
28
+ cta: 'gradient',
29
+ pins: {
30
+ light: {
31
+ brand: '#166e5a',
32
+ 'focus-ring': '#166e5a',
33
+ 'brand-strong': '#0f5a49',
34
+ 'brand-soft': 'rgb(22 110 90 / 0.10)',
35
+ 'on-brand': '#f6fbf9',
36
+ bg: '#f6f8fa',
37
+ surface: 'rgb(252 253 253 / 0.82)',
38
+ 'surface-raised': 'rgb(252 253 253 / 0.94)',
39
+ 'surface-solid': '#fcfdfd',
40
+ 'surface-raised-solid': '#fcfdfd',
41
+ 'surface-sunken': '#eef2f5',
42
+ line: 'rgb(100 116 139 / 0.22)',
43
+ 'line-strong': 'rgb(100 116 139 / 0.38)',
44
+ ink: '#0f172a',
45
+ 'ink-2': '#334155',
46
+ 'ink-3': '#526077',
47
+ success: '#15803d',
48
+ warning: '#a16207',
49
+ danger: '#be123c',
50
+ neutral: '#526077',
51
+ },
52
+ dark: {
53
+ brand: '#34d399',
54
+ 'focus-ring': '#34d399',
55
+ 'brand-strong': '#6ee7b7',
56
+ 'brand-soft': 'rgb(52 211 153 / 0.14)',
57
+ 'on-brand': '#052e25',
58
+ bg: '#0a0f1c',
59
+ surface: 'rgb(20 28 46 / 0.72)',
60
+ 'surface-raised': 'rgb(28 38 60 / 0.86)',
61
+ 'surface-solid': '#141c2e',
62
+ 'surface-raised-solid': '#1c263c',
63
+ 'surface-sunken': '#0f1626',
64
+ line: 'rgb(148 163 184 / 0.16)',
65
+ 'line-strong': 'rgb(148 163 184 / 0.30)',
66
+ ink: '#eef2f7',
67
+ 'ink-2': '#cbd5e1',
68
+ 'ink-3': '#94a3b8',
69
+ success: '#4ade80',
70
+ warning: '#fbbf24',
71
+ danger: '#fb7185',
72
+ neutral: '#94a3b8',
73
+ },
74
+ },
75
+ ctaPins: {
76
+ light: ['#047857', '#0f766e', '#0369a1'],
77
+ dark: ['#047857', '#0f766e', '#0369a1'],
78
+ },
79
+ }
80
+
81
+ /** Brand-free grey theme for embedding and white-label use. Fully generated. */
82
+ export const neutralPreset: ThemeConfig = {
83
+ name: 'neutral',
84
+ label: 'Neutral',
85
+ seeds: {
86
+ brand: { hue: 255, chroma: 0.03 },
87
+ neutral: { hue: 255, chroma: 0.008 },
88
+ danger: { hue: 18, chroma: 0.19 },
89
+ warning: { hue: 70, chroma: 0.14 },
90
+ success: { hue: 150, chroma: 0.14 },
91
+ info: { hue: 255, chroma: 0.05 },
92
+ },
93
+ radius: 8,
94
+ contrast: 'default',
95
+ glass: true,
96
+ cta: 'solid',
97
+ }
98
+
99
+ /**
100
+ * The Fakhir research platform's look, selected by name
101
+ * (`data-ty-theme="fakhir"`). Today it carries the default theme's values; it
102
+ * is a separate preset so that app keeps its look if the default changes.
103
+ */
104
+ export const fakhirPreset: ThemeConfig = {
105
+ ...tympanPreset,
106
+ name: 'fakhir',
107
+ label: 'Fakhir',
108
+ }
109
+
110
+ /** Default hues with high contrast, opaque surfaces and a thicker focus ring. */
111
+ export const highContrastPreset: ThemeConfig = {
112
+ name: 'high-contrast',
113
+ label: 'High contrast',
114
+ seeds: baseSeeds,
115
+ radius: 10,
116
+ contrast: 'high',
117
+ glass: false,
118
+ cta: 'solid',
119
+ }
120
+
121
+ export const astrlabePreset: ThemeConfig = {
122
+ name: 'astrlabe',
123
+ label: 'Astrlabe',
124
+ seeds: {
125
+ ...baseSeeds,
126
+ brand: { hue: 240, chroma: 0.15 },
127
+ },
128
+ radius: 8,
129
+ contrast: 'default',
130
+ glass: true,
131
+ cta: 'solid',
132
+ }
133
+
134
+ export const presets: readonly ThemeConfig[] = [tympanPreset, fakhirPreset, neutralPreset, highContrastPreset, astrlabePreset]
135
+ export const DEFAULT_THEME = 'tympan'
@@ -0,0 +1,26 @@
1
+ --- datatech/tympan-wt/site/packages/tokens/src/presets.ts
2
+ +++ datatech/tympan-wt/site/packages/tokens/src/presets.ts
3
+ @@ -102,4 +102,23 @@
4
+ -export const presets: readonly ThemeConfig[] = [tympanPreset, fakhirPreset, neutralPreset, highContrastPreset]
5
+ +export const astrlabePreset: ThemeConfig = {
6
+ + name: 'astrlabe',
7
+ + label: 'Astrlabe',
8
+ + seeds: {
9
+ + ...baseSeeds,
10
+ + brand: { hue: 240, chroma: 0.15 }, // Example deep blue for Astrlabe
11
+ + },
12
+ + radius: 6,
13
+ + contrast: 'comfortable',
14
+ + glass: false,
15
+ + cta: 'solid',
16
+ + pins: {
17
+ + light: {
18
+ + brand: '#4f46e5',
19
+ + },
20
+ + dark: {
21
+ + brand: '#6366f1',
22
+ + }
23
+ + }
24
+ +}
25
+ +
26
+ +export const presets: readonly ThemeConfig[] = [tympanPreset, fakhirPreset, neutralPreset, highContrastPreset, astrlabePreset]
@@ -0,0 +1,84 @@
1
+ // Deprecated ids of the print book styles and of their UI themes. Kept in a
2
+ // module of its own, with no runtime imports, so that hosts which only need to
3
+ // resolve a stored theme name (ThemeProvider, themeInitScript) can import it
4
+ // from `@datatechsolutions/tympan-tokens/print-aliases` without loading the
5
+ // presets or generating the print themes.
6
+
7
+ import type { PrintPresetName } from './print-presets.ts'
8
+
9
+ /** Prefix of every print theme name: `data-ty-theme="print-<style>"`. */
10
+ export const PRINT_THEME_PREFIX = 'print-'
11
+
12
+ /**
13
+ * Deprecated style ids and the current id each one maps to. The styles were
14
+ * renamed to neutral, descriptive ids (no trademarks, institutions or people's
15
+ * names); the old ids keep working through `resolvePrintStyleName`,
16
+ * `resolvePrintStyle`, `LivroPrint estilo` and, as `print-<old id>`, the UI
17
+ * theme lookup (`resolvePrintThemeName`), with a one-time console warning in
18
+ * development builds.
19
+ *
20
+ * Removal: the aliases (and the `'modulor'` emblem) will be dropped in the
21
+ * next major version of @datatechsolutions/tympan-tokens and
22
+ * @datatechsolutions/tympan-print; migrate stored data books to the new ids.
23
+ */
24
+ export const PRINT_STYLE_ALIASES = {
25
+ economist: 'semanario',
26
+ ft: 'papel-salmao',
27
+ schiphol: 'sinalizacao',
28
+ 'jornal-do-brasil': 'jornal-1959',
29
+ 'atlas-ibge': 'atlas-oficial',
30
+ deardata: 'cartao-postal',
31
+ tufte: 'minimo-de-tinta',
32
+ holmes: 'infografico-ilustrado',
33
+ bayer: 'diagrama-modernista',
34
+ dubois: 'graficos-1900',
35
+ minard: 'fluxo-historico',
36
+ mccandless: 'blocos-coloridos',
37
+ corbusier: 'proporcao-modular',
38
+ aicher: 'pictogramas',
39
+ vignelli: 'mapa-de-metro',
40
+ 'athos-bulcao': 'azulejo-modernista',
41
+ crouwel: 'grade-holandesa',
42
+ 'saul-bass': 'papel-recortado',
43
+ } as const satisfies Record<string, PrintPresetName>
44
+
45
+ /** A deprecated style id (see PRINT_STYLE_ALIASES). */
46
+ export type PrintStyleAlias = keyof typeof PRINT_STYLE_ALIASES
47
+
48
+ const isDev = (() => {
49
+ try {
50
+ return (globalThis as { process?: { env?: Record<string, string | undefined> } }).process?.env?.NODE_ENV !== 'production'
51
+ } catch {
52
+ return true
53
+ }
54
+ })()
55
+ const warned = new Set<string>()
56
+
57
+ /** Warns once per id (development builds only) that a deprecated id was used. @internal */
58
+ export function warnDeprecatedPrintId(old: string, current: string, kind = 'print style'): void {
59
+ if (!isDev || warned.has(old)) return
60
+ warned.add(old)
61
+ console.warn(`[@datatechsolutions/tympan] The ${kind} "${old}" is deprecated; use "${current}". The old id will be removed in the next major version.`)
62
+ }
63
+
64
+ /**
65
+ * Deprecated print theme names (`print-<old style id>`) and the current theme
66
+ * each maps to, derived from PRINT_STYLE_ALIASES (for example
67
+ * `print-economist` -> `print-semanario`). Same removal schedule: dropped in
68
+ * the next major version.
69
+ */
70
+ export const PRINT_THEME_ALIASES: Readonly<Record<string, string>> = Object.fromEntries(
71
+ Object.entries(PRINT_STYLE_ALIASES).map(([old, current]) => [`${PRINT_THEME_PREFIX}${old}`, `${PRINT_THEME_PREFIX}${current}`]),
72
+ )
73
+
74
+ /**
75
+ * The current name of a theme: a deprecated `print-<old id>` is mapped to its
76
+ * `print-<new id>` (with a one-time development warning); any other name is
77
+ * returned unchanged.
78
+ */
79
+ export function resolvePrintThemeName(theme: string): string {
80
+ if (!Object.hasOwn(PRINT_THEME_ALIASES, theme)) return theme
81
+ const current = PRINT_THEME_ALIASES[theme]!
82
+ warnDeprecatedPrintId(theme, current, 'theme')
83
+ return current
84
+ }