@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/dist/index.js ADDED
@@ -0,0 +1,4873 @@
1
+ import { PRINT_STYLE_ALIASES, PRINT_THEME_ALIASES, PRINT_THEME_PREFIX, resolvePrintThemeName, warnDeprecatedPrintId } from "./print-aliases.js";
2
+ //#region src/color.ts
3
+ const clamp01 = (v) => Math.min(1, Math.max(0, v));
4
+ function toLinear(c) {
5
+ return c <= .04045 ? c / 12.92 : ((c + .055) / 1.055) ** 2.4;
6
+ }
7
+ function fromLinear$1(c) {
8
+ return c <= .0031308 ? 12.92 * c : 1.055 * c ** (1 / 2.4) - .055;
9
+ }
10
+ function rgbToOklab({ r, g, b }) {
11
+ const lr = toLinear(r);
12
+ const lg = toLinear(g);
13
+ const lb = toLinear(b);
14
+ const l = Math.cbrt(.4122214708 * lr + .5363325363 * lg + .0514459929 * lb);
15
+ const m = Math.cbrt(.2119034982 * lr + .6806995451 * lg + .1073969566 * lb);
16
+ const s = Math.cbrt(.0883024619 * lr + .2817188376 * lg + .6299787005 * lb);
17
+ return {
18
+ L: .2104542553 * l + .793617785 * m - .0040720468 * s,
19
+ a: 1.9779984951 * l - 2.428592205 * m + .4505937099 * s,
20
+ b: .0259040371 * l + .7827717662 * m - .808675766 * s
21
+ };
22
+ }
23
+ /** OKLab to linear-light sRGB (may be out of gamut). */
24
+ function oklabToLinear(L, a, b) {
25
+ const l = (L + .3963377774 * a + .2158037573 * b) ** 3;
26
+ const m = (L - .1055613458 * a - .0638541728 * b) ** 3;
27
+ const s = (L - .0894841775 * a - 1.291485548 * b) ** 3;
28
+ return [
29
+ 4.0767416621 * l - 3.3077115913 * m + .2309699292 * s,
30
+ -1.2684380046 * l + 2.6097574011 * m - .3413193965 * s,
31
+ -.0041960863 * l - .7034186147 * m + 1.707614701 * s
32
+ ];
33
+ }
34
+ function rgbToOklch(c) {
35
+ const { L, a, b } = rgbToOklab(c);
36
+ const chroma = Math.hypot(a, b);
37
+ let h = Math.atan2(b, a) * 180 / Math.PI;
38
+ if (h < 0) h += 360;
39
+ return {
40
+ l: L,
41
+ c: chroma,
42
+ h: chroma < 1e-6 ? 0 : h
43
+ };
44
+ }
45
+ function inGamut(lin) {
46
+ return lin.every((v) => v >= -1e-6 && v <= 1.000001);
47
+ }
48
+ /**
49
+ * OKLCH to sRGB. Out-of-gamut colours keep lightness and hue and lose chroma
50
+ * (binary search), which preserves the perceived tone of a ramp step.
51
+ */
52
+ function oklchToRgb({ l, c, h }, alpha = 1) {
53
+ const L = clamp01(l);
54
+ const rad = h * Math.PI / 180;
55
+ const lin = (chroma) => oklabToLinear(L, chroma * Math.cos(rad), chroma * Math.sin(rad));
56
+ let chroma = Math.max(0, c);
57
+ if (!inGamut(lin(chroma))) {
58
+ let lo = 0;
59
+ let hi = chroma;
60
+ for (let i = 0; i < 32; i++) {
61
+ const mid = (lo + hi) / 2;
62
+ if (inGamut(lin(mid))) lo = mid;
63
+ else hi = mid;
64
+ }
65
+ chroma = lo;
66
+ }
67
+ const [r, g, b] = lin(chroma).map((v) => Math.round(clamp01(fromLinear$1(clamp01(v))) * 255) / 255);
68
+ return {
69
+ r,
70
+ g,
71
+ b,
72
+ a: alpha
73
+ };
74
+ }
75
+ const hex2 = (v) => Math.round(clamp01(v) * 255).toString(16).padStart(2, "0");
76
+ /** `#rrggbb` (alpha ignored). */
77
+ function toHex(c) {
78
+ return `#${hex2(c.r)}${hex2(c.g)}${hex2(c.b)}`;
79
+ }
80
+ /** CSS serialisation: hex when opaque, `rgb(r g b / a)` otherwise. */
81
+ function toCss(c) {
82
+ if (c.a >= 1) return toHex(c);
83
+ const ch = (v) => Math.round(clamp01(v) * 255);
84
+ return `rgb(${ch(c.r)} ${ch(c.g)} ${ch(c.b)} / ${Math.round(c.a * 1e3) / 1e3})`;
85
+ }
86
+ /** Parses `#rgb`, `#rrggbb`, `#rrggbbaa`, `rgb(r g b / a)` and `rgba(r, g, b, a)`. */
87
+ function parseColor(input) {
88
+ const s = input.trim().toLowerCase();
89
+ if (s.startsWith("#")) {
90
+ let h = s.slice(1);
91
+ if (h.length === 3) h = [...h].map((x) => x + x).join("");
92
+ if (h.length !== 6 && h.length !== 8) throw new Error(`Invalid colour ${input}`);
93
+ const n = (i) => parseInt(h.slice(i, i + 2), 16) / 255;
94
+ return {
95
+ r: n(0),
96
+ g: n(2),
97
+ b: n(4),
98
+ a: h.length === 8 ? n(6) : 1
99
+ };
100
+ }
101
+ const m = /^rgba?\(([^)]+)\)$/.exec(s);
102
+ if (m && m[1]) {
103
+ const [r = 0, g = 0, b = 0, a = 1] = m[1].split(/[\s,/]+/).filter(Boolean).map(Number);
104
+ return {
105
+ r: r / 255,
106
+ g: g / 255,
107
+ b: b / 255,
108
+ a
109
+ };
110
+ }
111
+ throw new Error(`Unsupported colour ${input}`);
112
+ }
113
+ /** Source-over compositing of `top` onto `bottom`. */
114
+ function composite(top, bottom) {
115
+ const a = top.a + bottom.a * (1 - top.a);
116
+ if (a === 0) return {
117
+ r: 0,
118
+ g: 0,
119
+ b: 0,
120
+ a: 0
121
+ };
122
+ const mix = (t, b) => (t * top.a + b * bottom.a * (1 - top.a)) / a;
123
+ return {
124
+ r: mix(top.r, bottom.r),
125
+ g: mix(top.g, bottom.g),
126
+ b: mix(top.b, bottom.b),
127
+ a
128
+ };
129
+ }
130
+ /** Composites a stack given from top to bottom; the last layer should be opaque. */
131
+ function flatten(stack) {
132
+ return stack.reduceRight((acc, layer) => acc ? composite(layer, acc) : layer, null) ?? {
133
+ r: 1,
134
+ g: 1,
135
+ b: 1,
136
+ a: 1
137
+ };
138
+ }
139
+ /** WCAG 2.x relative luminance. */
140
+ function luminance(c) {
141
+ return .2126 * toLinear(c.r) + .7152 * toLinear(c.g) + .0722 * toLinear(c.b);
142
+ }
143
+ /** WCAG 2.x contrast ratio (1..21) between two opaque colours. */
144
+ function contrastRatio(a, b) {
145
+ const la = luminance(a);
146
+ const lb = luminance(b);
147
+ const [hi, lo] = la > lb ? [la, lb] : [lb, la];
148
+ return (hi + .05) / (lo + .05);
149
+ }
150
+ /**
151
+ * APCA lightness contrast Lc (text on background), implemented from the
152
+ * public description of the APCA-W3 0.0.98G constants. Informational only:
153
+ * WCAG 2.2 conformance is decided by `contrastRatio`.
154
+ */
155
+ function apcaContrast(text, background) {
156
+ const y = (c) => .2126729 * c.r ** 2.4 + .7151522 * c.g ** 2.4 + .072175 * c.b ** 2.4;
157
+ const clampBlack = (v) => v > .022 ? v : v + (.022 - v) ** 1.414;
158
+ const yt = clampBlack(y(text));
159
+ const yb = clampBlack(y(background));
160
+ if (Math.abs(yb - yt) < 5e-4) return 0;
161
+ if (yb > yt) {
162
+ const sapc = (yb ** .56 - yt ** .57) * 1.14;
163
+ return sapc < .1 ? 0 : (sapc - .027) * 100;
164
+ }
165
+ const sapc = (yb ** .65 - yt ** .62) * 1.14;
166
+ return sapc > -.1 ? 0 : (sapc + .027) * 100;
167
+ }
168
+ /** CIE L*a*b* (D65) from sRGB, via CIE XYZ. */
169
+ function rgbToLab({ r, g, b }) {
170
+ const lr = toLinear(r);
171
+ const lg = toLinear(g);
172
+ const lb = toLinear(b);
173
+ const x = (.4124564 * lr + .3575761 * lg + .1804375 * lb) / .95047;
174
+ const y = .2126729 * lr + .7151522 * lg + .072175 * lb;
175
+ const z = (.0193339 * lr + .119192 * lg + .9503041 * lb) / 1.08883;
176
+ const f = (t) => t > 216 / 24389 ? Math.cbrt(t) : (24389 / 27 * t + 16) / 116;
177
+ const fx = f(x);
178
+ const fy = f(y);
179
+ const fz = f(z);
180
+ return {
181
+ L: 116 * fy - 16,
182
+ a: 500 * (fx - fy),
183
+ b: 200 * (fy - fz)
184
+ };
185
+ }
186
+ /**
187
+ * CIEDE2000 colour difference (ΔE00) between two opaque colours, implemented
188
+ * from the published formula (Sharma, Wu and Dalal, 2005). About 1 is a just
189
+ * noticeable difference; 10 or more reads as clearly different colours.
190
+ */
191
+ function deltaE2000(c1, c2) {
192
+ const { L: L1, a: a1, b: b1 } = rgbToLab(c1);
193
+ const { L: L2, a: a2, b: b2 } = rgbToLab(c2);
194
+ const rad = Math.PI / 180;
195
+ const Cm = (Math.hypot(a1, b1) + Math.hypot(a2, b2)) / 2;
196
+ const G = .5 * (1 - Math.sqrt(Cm ** 7 / (Cm ** 7 + 25 ** 7)));
197
+ const a1p = (1 + G) * a1;
198
+ const a2p = (1 + G) * a2;
199
+ const C1p = Math.hypot(a1p, b1);
200
+ const C2p = Math.hypot(a2p, b2);
201
+ const hp = (a, b) => {
202
+ if (a === 0 && b === 0) return 0;
203
+ const h = Math.atan2(b, a) / rad;
204
+ return h < 0 ? h + 360 : h;
205
+ };
206
+ const h1p = hp(a1p, b1);
207
+ const h2p = hp(a2p, b2);
208
+ const dLp = L2 - L1;
209
+ const dCp = C2p - C1p;
210
+ let dhp = 0;
211
+ if (C1p * C2p !== 0) {
212
+ dhp = h2p - h1p;
213
+ if (dhp > 180) dhp -= 360;
214
+ else if (dhp < -180) dhp += 360;
215
+ }
216
+ const dHp = 2 * Math.sqrt(C1p * C2p) * Math.sin(dhp / 2 * rad);
217
+ const Lmp = (L1 + L2) / 2;
218
+ const Cmp = (C1p + C2p) / 2;
219
+ let hmp = h1p + h2p;
220
+ if (C1p * C2p !== 0) {
221
+ if (Math.abs(h1p - h2p) <= 180) hmp = (h1p + h2p) / 2;
222
+ else hmp = h1p + h2p < 360 ? (h1p + h2p + 360) / 2 : (h1p + h2p - 360) / 2;
223
+ }
224
+ const T = 1 - .17 * Math.cos((hmp - 30) * rad) + .24 * Math.cos(2 * hmp * rad) + .32 * Math.cos((3 * hmp + 6) * rad) - .2 * Math.cos((4 * hmp - 63) * rad);
225
+ const dTheta = 30 * Math.exp(-(((hmp - 275) / 25) ** 2));
226
+ const Rc = 2 * Math.sqrt(Cmp ** 7 / (Cmp ** 7 + 25 ** 7));
227
+ const Sl = 1 + .015 * (Lmp - 50) ** 2 / Math.sqrt(20 + (Lmp - 50) ** 2);
228
+ const Sc = 1 + .045 * Cmp;
229
+ const Sh = 1 + .015 * Cmp * T;
230
+ const Rt = -Math.sin(2 * dTheta * rad) * Rc;
231
+ return Math.sqrt((dLp / Sl) ** 2 + (dCp / Sc) ** 2 + (dHp / Sh) ** 2 + Rt * (dCp / Sc) * (dHp / Sh));
232
+ }
233
+ //#endregion
234
+ //#region src/theme.ts
235
+ /** CSS token of each font role (`--ty-font-<name>`). */
236
+ const FONT_ROLE_TOKENS = {
237
+ display: "serif",
238
+ body: "sans",
239
+ mono: "mono",
240
+ sans: "sans",
241
+ serif: "serif"
242
+ };
243
+ const RAMP_STEPS = [
244
+ 50,
245
+ 100,
246
+ 200,
247
+ 300,
248
+ 400,
249
+ 500,
250
+ 600,
251
+ 700,
252
+ 800,
253
+ 900,
254
+ 950
255
+ ];
256
+ const RAMP_L = [
257
+ .975,
258
+ .94,
259
+ .885,
260
+ .815,
261
+ .725,
262
+ .635,
263
+ .55,
264
+ .47,
265
+ .395,
266
+ .325,
267
+ .255
268
+ ];
269
+ const RAMP_C = [
270
+ .1,
271
+ .2,
272
+ .38,
273
+ .6,
274
+ .84,
275
+ 1,
276
+ .97,
277
+ .88,
278
+ .76,
279
+ .62,
280
+ .5
281
+ ];
282
+ /** 11-step ramp for a seed. */
283
+ function generateRamp(seed) {
284
+ const out = {};
285
+ RAMP_STEPS.forEach((step, i) => {
286
+ out[step] = oklchToRgb({
287
+ l: RAMP_L[i] ?? .5,
288
+ c: seed.chroma * (RAMP_C[i] ?? 1),
289
+ h: seed.hue
290
+ });
291
+ });
292
+ return out;
293
+ }
294
+ /** Seed derived from an existing colour (keeps hue; chroma scaled to a ramp peak). */
295
+ function seedFromColor(color, peakChroma) {
296
+ const { c, h } = rgbToOklch(parseColor(color));
297
+ return {
298
+ hue: Math.round(h * 10) / 10,
299
+ chroma: Math.round((peakChroma ?? c) * 1e3) / 1e3
300
+ };
301
+ }
302
+ const ROLE_NAMES = [
303
+ "bg",
304
+ "on-bg",
305
+ "surface",
306
+ "on-surface",
307
+ "surface-raised",
308
+ "on-surface-raised",
309
+ "surface-sunken",
310
+ "on-surface-sunken",
311
+ "surface-solid",
312
+ "surface-raised-solid",
313
+ "ink",
314
+ "ink-2",
315
+ "ink-3",
316
+ "line",
317
+ "line-soft",
318
+ "line-strong",
319
+ "input",
320
+ "focus-ring",
321
+ "brand",
322
+ "on-brand",
323
+ "brand-strong",
324
+ "brand-soft",
325
+ "on-brand-soft",
326
+ "cta-solid",
327
+ "on-cta",
328
+ "secondary",
329
+ "on-secondary",
330
+ "danger",
331
+ "on-danger",
332
+ "danger-soft",
333
+ "on-danger-soft",
334
+ "warning",
335
+ "on-warning",
336
+ "warning-soft",
337
+ "on-warning-soft",
338
+ "success",
339
+ "on-success",
340
+ "success-soft",
341
+ "on-success-soft",
342
+ "info",
343
+ "on-info",
344
+ "info-soft",
345
+ "on-info-soft",
346
+ "neutral",
347
+ "on-neutral",
348
+ "neutral-soft",
349
+ "on-neutral-soft",
350
+ "proof-proved",
351
+ "proof-proved-soft",
352
+ "proof-pending",
353
+ "proof-pending-soft",
354
+ "proof-refuted",
355
+ "proof-refuted-soft",
356
+ "proof-not-disclosed",
357
+ "proof-not-disclosed-soft",
358
+ "proof-none",
359
+ "proof-none-soft",
360
+ "actor-person",
361
+ "actor-person-soft",
362
+ "actor-agent",
363
+ "actor-agent-soft",
364
+ "actor-system",
365
+ "actor-system-soft",
366
+ "chart-1",
367
+ "chart-2",
368
+ "chart-3",
369
+ "chart-4",
370
+ "chart-5",
371
+ "chart-6",
372
+ "chart-7",
373
+ "chart-8",
374
+ "nav-bg",
375
+ "on-nav",
376
+ "nav-active",
377
+ "on-nav-active",
378
+ "nav-line",
379
+ "backdrop",
380
+ "ambient-1",
381
+ "ambient-2"
382
+ ];
383
+ /** Design-direction names kept as aliases of the role model. */
384
+ const ROLE_ALIASES = {
385
+ accent: "brand",
386
+ "accent-strong": "brand-strong",
387
+ "accent-soft": "brand-soft",
388
+ "accent-ink": "on-brand",
389
+ "on-accent": "on-brand",
390
+ "on-accent-soft": "on-brand-soft",
391
+ "categorical-1": "chart-1",
392
+ "categorical-2": "chart-2",
393
+ "categorical-3": "chart-3",
394
+ "categorical-4": "chart-4",
395
+ "categorical-5": "chart-5",
396
+ "categorical-6": "chart-6",
397
+ "categorical-7": "chart-7",
398
+ "categorical-8": "chart-8"
399
+ };
400
+ const TONES = [
401
+ "danger",
402
+ "warning",
403
+ "success",
404
+ "info",
405
+ "neutral"
406
+ ];
407
+ function recipes(mode, contrast, glass) {
408
+ const dark = mode === "dark";
409
+ const high = contrast === "high";
410
+ const pick = (light, darkV) => dark ? darkV : light;
411
+ const softA = pick(.1, .14) * (high ? 1.6 : 1);
412
+ const r = {
413
+ bg: {
414
+ seed: "neutral",
415
+ l: pick(.975, .165),
416
+ c: .5
417
+ },
418
+ surface: {
419
+ seed: "neutral",
420
+ l: pick(.993, .235),
421
+ c: .4,
422
+ a: glass ? pick(.82, .72) : 1
423
+ },
424
+ "surface-raised": {
425
+ seed: "neutral",
426
+ l: pick(.993, .275),
427
+ c: .4,
428
+ a: glass ? pick(.94, .86) : 1
429
+ },
430
+ "surface-solid": {
431
+ seed: "neutral",
432
+ l: pick(.993, .235),
433
+ c: .4
434
+ },
435
+ "surface-raised-solid": {
436
+ seed: "neutral",
437
+ l: pick(.993, .275),
438
+ c: .4
439
+ },
440
+ "surface-sunken": {
441
+ seed: "neutral",
442
+ l: pick(.955, .195),
443
+ c: .6
444
+ },
445
+ ink: {
446
+ seed: "neutral",
447
+ l: pick(.21, .955),
448
+ c: 2
449
+ },
450
+ "ink-2": {
451
+ seed: "neutral",
452
+ l: high ? pick(.27, .93) : pick(.37, .87),
453
+ c: 2
454
+ },
455
+ "ink-3": {
456
+ seed: "neutral",
457
+ l: high ? pick(.33, .9) : pick(.5, .72),
458
+ c: 2
459
+ },
460
+ line: {
461
+ seed: "neutral",
462
+ l: pick(.55, .78),
463
+ c: 2.5,
464
+ a: high ? pick(.45, .4) : pick(.22, .16)
465
+ },
466
+ "line-soft": {
467
+ seed: "neutral",
468
+ l: pick(.55, .78),
469
+ c: 2.5,
470
+ a: high ? pick(.3, .25) : pick(.12, .09)
471
+ },
472
+ "line-strong": {
473
+ seed: "neutral",
474
+ l: pick(.55, .78),
475
+ c: 2.5,
476
+ a: high ? pick(.75, .65) : pick(.38, .3)
477
+ },
478
+ input: {
479
+ seed: "neutral",
480
+ l: high ? pick(.42, .78) : pick(.6, .58),
481
+ c: 2.5
482
+ },
483
+ "focus-ring": {
484
+ seed: "brand",
485
+ l: high ? pick(.4, .85) : pick(.47, .79),
486
+ c: .75
487
+ },
488
+ brand: {
489
+ seed: "brand",
490
+ l: high ? pick(.4, .85) : pick(.47, .79),
491
+ c: .75
492
+ },
493
+ "brand-strong": {
494
+ seed: "brand",
495
+ l: high ? pick(.33, .9) : pick(.4, .87),
496
+ c: .7
497
+ },
498
+ "brand-soft": {
499
+ seed: "brand",
500
+ l: pick(.55, .75),
501
+ c: .8,
502
+ a: softA
503
+ },
504
+ "on-brand-soft": {
505
+ seed: "brand",
506
+ l: high ? pick(.36, .88) : pick(.44, .82),
507
+ c: .75
508
+ },
509
+ "on-brand": {
510
+ seed: "brand",
511
+ l: pick(.985, .25),
512
+ c: .15
513
+ },
514
+ "cta-solid": {
515
+ seed: "brand",
516
+ l: pick(.45, .45),
517
+ c: .8
518
+ },
519
+ "on-cta": {
520
+ seed: "brand",
521
+ l: .985,
522
+ c: .1
523
+ },
524
+ secondary: {
525
+ seed: "neutral",
526
+ l: pick(.993, .275),
527
+ c: .4,
528
+ a: glass ? pick(.7, .6) : 1
529
+ },
530
+ "on-secondary": {
531
+ seed: "neutral",
532
+ l: pick(.21, .955),
533
+ c: 2
534
+ },
535
+ backdrop: {
536
+ seed: "neutral",
537
+ l: pick(.2, .1),
538
+ c: 2,
539
+ a: pick(.4, .6)
540
+ },
541
+ "ambient-1": {
542
+ seed: "brand",
543
+ l: .72,
544
+ c: .9,
545
+ a: glass ? pick(.07, .12) : 0
546
+ },
547
+ "ambient-2": {
548
+ seed: "ambient",
549
+ l: .75,
550
+ c: .12,
551
+ h: 230,
552
+ a: glass ? pick(.05, .08) : 0
553
+ }
554
+ };
555
+ for (const tone of TONES) {
556
+ const chroma = tone === "neutral" ? 2 : 1;
557
+ r[tone] = {
558
+ seed: tone,
559
+ l: high ? pick(.44, .8) : pick(.51, .74),
560
+ c: chroma
561
+ };
562
+ r[`${tone}-soft`] = {
563
+ seed: tone,
564
+ l: pick(.6, .7),
565
+ c: chroma,
566
+ a: softA
567
+ };
568
+ r[`on-${tone}-soft`] = {
569
+ seed: tone,
570
+ l: high ? pick(.38, .86) : pick(.45, .8),
571
+ c: chroma
572
+ };
573
+ r[`on-${tone}`] = {
574
+ seed: "neutral",
575
+ l: pick(.985, .18),
576
+ c: .3
577
+ };
578
+ }
579
+ return r;
580
+ }
581
+ function contrastPairs(ctaStops) {
582
+ const pairs = [];
583
+ const text = (fg, ...over) => pairs.push({
584
+ fg,
585
+ over,
586
+ min: 4.5,
587
+ kind: "text"
588
+ });
589
+ const ui = (fg, ...over) => pairs.push({
590
+ fg,
591
+ over,
592
+ min: 3,
593
+ kind: "ui"
594
+ });
595
+ for (const ink of [
596
+ "ink",
597
+ "ink-2",
598
+ "ink-3"
599
+ ]) {
600
+ text(ink, "bg");
601
+ text(ink, "surface", "bg");
602
+ text(ink, "surface-raised", "bg");
603
+ text(ink, "surface-sunken");
604
+ }
605
+ text("on-bg", "bg");
606
+ text("on-surface", "surface", "bg");
607
+ text("on-surface-raised", "surface-raised", "bg");
608
+ text("on-surface-sunken", "surface-sunken");
609
+ text("brand", "bg");
610
+ text("brand", "surface", "bg");
611
+ text("brand", "surface-raised", "bg");
612
+ text("brand-strong", "surface", "bg");
613
+ text("on-brand", "brand");
614
+ text("on-brand-soft", "brand-soft", "surface", "bg");
615
+ text("on-cta", "cta-solid");
616
+ for (let i = 0; i < ctaStops; i++) text("on-cta", `cta-stop-${i}`);
617
+ text("on-secondary", "secondary", "bg");
618
+ for (const tone of TONES) {
619
+ text(tone, "surface", "bg");
620
+ text(tone, "surface-raised", "bg");
621
+ text(`on-${tone}`, tone);
622
+ text(`on-${tone}-soft`, `${tone}-soft`, "surface", "bg");
623
+ }
624
+ for (const p of [
625
+ "proved",
626
+ "pending",
627
+ "refuted",
628
+ "not-disclosed",
629
+ "none"
630
+ ]) {
631
+ text(`proof-${p}`, "surface", "bg");
632
+ text(`proof-${p}`, `proof-${p}-soft`, "surface", "bg");
633
+ }
634
+ for (const a of [
635
+ "person",
636
+ "agent",
637
+ "system"
638
+ ]) text(`actor-${a}`, `actor-${a}-soft`, "surface", "bg");
639
+ text("on-nav", "nav-bg", "bg");
640
+ text("on-nav-active", "nav-active", "nav-bg", "bg");
641
+ ui("input", "surface", "bg");
642
+ ui("input", "bg");
643
+ ui("input", "surface-raised", "bg");
644
+ ui("focus-ring", "bg");
645
+ ui("focus-ring", "surface", "bg");
646
+ ui("focus-ring", "surface-raised", "bg");
647
+ ui("brand", "surface-sunken");
648
+ for (let i = 1; i <= 8; i++) ui(`chart-${i}`, "surface", "bg");
649
+ return pairs;
650
+ }
651
+ /** Hues of the eight chart colours when a theme sets none. */
652
+ const DEFAULT_CHART_HUES = [
653
+ 250,
654
+ 62,
655
+ 165,
656
+ 335,
657
+ 215,
658
+ 35,
659
+ 110,
660
+ 290
661
+ ];
662
+ function colorFrom(recipe, seeds) {
663
+ const seed = recipe.seed === "chart" || recipe.seed === "ambient" ? void 0 : seeds[recipe.seed];
664
+ const chroma = seed ? seed.chroma * (recipe.c ?? 1) : recipe.c ?? .1;
665
+ return {
666
+ l: recipe.l,
667
+ c: chroma,
668
+ h: recipe.h ?? seed?.hue ?? 0,
669
+ a: recipe.a ?? 1
670
+ };
671
+ }
672
+ /** Resolves one theme in one mode. */
673
+ function resolveTheme(config, mode, contrastOverride) {
674
+ const contrast = contrastOverride ?? config.contrast;
675
+ const dark = mode === "dark";
676
+ const recipeMap = recipes(mode, contrast, config.glass);
677
+ const lch = {};
678
+ for (const [role, recipe] of Object.entries(recipeMap)) lch[role] = colorFrom(recipe, config.seeds);
679
+ (config.chartHues ?? DEFAULT_CHART_HUES).slice(0, 8).forEach((h, i) => {
680
+ lch[`chart-${i + 1}`] = {
681
+ l: dark ? .76 : .55,
682
+ c: dark ? .13 : .14,
683
+ h,
684
+ a: 1
685
+ };
686
+ });
687
+ const pinned = /* @__PURE__ */ new Set();
688
+ const colors = {};
689
+ const pins = config.pins?.[mode] ?? {};
690
+ const pinnedValue = (role) => {
691
+ const v = contrast === config.contrast ? pins[role] : void 0;
692
+ return v ? parseColor(v) : void 0;
693
+ };
694
+ const materialise = (role) => {
695
+ const p = pinnedValue(role);
696
+ if (p) {
697
+ pinned.add(role);
698
+ colors[role] = p;
699
+ return;
700
+ }
701
+ const v = lch[role];
702
+ if (v) colors[role] = oklchToRgb(v, v.a);
703
+ };
704
+ for (const role of Object.keys(lch)) materialise(role);
705
+ const copy = (role, from) => {
706
+ const p = pinnedValue(role);
707
+ if (p) {
708
+ pinned.add(role);
709
+ colors[role] = p;
710
+ } else if (colors[from]) {
711
+ colors[role] = { ...colors[from] };
712
+ if (lch[from]) lch[role] = { ...lch[from] };
713
+ }
714
+ };
715
+ const aliasRoles = () => {
716
+ copy("on-bg", "ink-2");
717
+ copy("on-surface", "ink-2");
718
+ copy("on-surface-raised", "ink-2");
719
+ copy("on-surface-sunken", "ink-2");
720
+ copy("proof-proved", "on-success-soft");
721
+ copy("proof-proved-soft", "success-soft");
722
+ copy("proof-pending", "on-warning-soft");
723
+ copy("proof-pending-soft", "warning-soft");
724
+ copy("proof-refuted", "on-danger-soft");
725
+ copy("proof-refuted-soft", "danger-soft");
726
+ copy("proof-not-disclosed", "on-neutral-soft");
727
+ copy("proof-not-disclosed-soft", "neutral-soft");
728
+ copy("proof-none", "ink-3");
729
+ copy("proof-none-soft", "neutral-soft");
730
+ copy("actor-person", "on-brand-soft");
731
+ copy("actor-person-soft", "brand-soft");
732
+ copy("actor-agent", "ink-2");
733
+ copy("actor-agent-soft", "neutral-soft");
734
+ copy("actor-system", "ink-3");
735
+ copy("actor-system-soft", "neutral-soft");
736
+ copy("nav-bg", "surface");
737
+ copy("on-nav", "ink-2");
738
+ copy("nav-active", "brand-soft");
739
+ copy("on-nav-active", "on-brand-soft");
740
+ copy("nav-line", "line");
741
+ };
742
+ aliasRoles();
743
+ const brand = config.seeds.brand;
744
+ const ctaPin = config.ctaPins?.[mode];
745
+ let ctaStops;
746
+ if (ctaPin && contrast === config.contrast) ctaStops = ctaPin.map(parseColor);
747
+ else if (config.cta === "solid") ctaStops = [colors["cta-solid"]];
748
+ else ctaStops = [
749
+ oklchToRgb({
750
+ l: .5,
751
+ c: brand.chroma * .85,
752
+ h: brand.hue - 12
753
+ }),
754
+ oklchToRgb({
755
+ l: .47,
756
+ c: brand.chroma * .8,
757
+ h: brand.hue + 8
758
+ }),
759
+ oklchToRgb({
760
+ l: .47,
761
+ c: brand.chroma * .85,
762
+ h: brand.hue + 60
763
+ })
764
+ ];
765
+ const pairs = contrastPairs(ctaStops.length);
766
+ const layer = (name) => {
767
+ const m = /^cta-stop-(\d+)$/.exec(name);
768
+ if (m) return ctaStops[Number(m[1])];
769
+ return colors[name] ?? {
770
+ r: 1,
771
+ g: 1,
772
+ b: 1,
773
+ a: 1
774
+ };
775
+ };
776
+ const measure = (pair) => {
777
+ const bgc = flatten([...pair.over.map(layer), dark ? layer("bg") : layer("bg")]);
778
+ const fgc = flatten([layer(pair.fg), bgc]);
779
+ return {
780
+ ratio: contrastRatio(fgc, bgc),
781
+ apca: apcaContrast(fgc, bgc),
782
+ bgc
783
+ };
784
+ };
785
+ for (let pass = 0; pass < 3; pass++) {
786
+ for (const pair of pairs) {
787
+ const role = pair.fg;
788
+ if (pinned.has(role) || !lch[role]) continue;
789
+ let guard = 0;
790
+ let m = measure(pair);
791
+ while (m.ratio < pair.min && guard++ < 80) {
792
+ const v = lch[role];
793
+ const step = rgbToOklch(m.bgc).l > .6 ? -.01 : .01;
794
+ v.l = Math.min(.995, Math.max(.02, v.l + step));
795
+ colors[role] = oklchToRgb(v, v.a);
796
+ m = measure(pair);
797
+ }
798
+ }
799
+ aliasRoles();
800
+ }
801
+ const report = pairs.map((pair) => {
802
+ const m = measure(pair);
803
+ return {
804
+ fg: pair.fg,
805
+ over: pair.over,
806
+ kind: pair.kind,
807
+ min: pair.min,
808
+ ratio: Math.round(m.ratio * 100) / 100,
809
+ apca: Math.round(m.apca * 10) / 10,
810
+ pass: m.ratio >= pair.min - 1e-9
811
+ };
812
+ });
813
+ for (const [alias, role] of Object.entries(ROLE_ALIASES)) if (colors[role]) colors[alias] = colors[role];
814
+ const ramps = Object.fromEntries(Object.keys(config.seeds).map((s) => [s, generateRamp(config.seeds[s])]));
815
+ const tint = oklchToRgb({
816
+ l: dark ? .12 : .2,
817
+ c: config.seeds.neutral.chroma * 2,
818
+ h: config.seeds.neutral.hue
819
+ });
820
+ const shade = (alpha) => ({
821
+ ...tint,
822
+ a: Math.min(.9, alpha * (dark ? 2 : 1))
823
+ });
824
+ const inset = {
825
+ x: 0,
826
+ y: 1,
827
+ blur: 0,
828
+ spread: 0,
829
+ inset: true,
830
+ color: {
831
+ r: 1,
832
+ g: 1,
833
+ b: 1,
834
+ a: dark && config.glass ? .06 : 0
835
+ }
836
+ };
837
+ const elevation = config.elevation ?? "soft";
838
+ let shadows;
839
+ if (elevation === "flat") {
840
+ const none = [{
841
+ x: 0,
842
+ y: 0,
843
+ blur: 0,
844
+ spread: 0,
845
+ color: {
846
+ ...tint,
847
+ a: 0
848
+ }
849
+ }];
850
+ shadows = {
851
+ sheet: none,
852
+ raised: none,
853
+ floating: [{
854
+ x: 0,
855
+ y: 2,
856
+ blur: 6,
857
+ spread: -2,
858
+ color: shade(.12)
859
+ }],
860
+ modal: [{
861
+ x: 0,
862
+ y: 16,
863
+ blur: 40,
864
+ spread: -16,
865
+ color: shade(.3)
866
+ }],
867
+ "sheet-inset": [inset]
868
+ };
869
+ } else if (elevation === "offset") {
870
+ const ink = colors.ink ?? tint;
871
+ const hard = (d) => [{
872
+ x: d,
873
+ y: d,
874
+ blur: 0,
875
+ spread: 0,
876
+ color: {
877
+ ...ink,
878
+ a: 1
879
+ }
880
+ }];
881
+ shadows = {
882
+ sheet: hard(3),
883
+ raised: hard(2),
884
+ floating: hard(4),
885
+ modal: hard(6),
886
+ "sheet-inset": [inset]
887
+ };
888
+ } else shadows = {
889
+ sheet: [{
890
+ x: 0,
891
+ y: 1,
892
+ blur: 2,
893
+ spread: 0,
894
+ color: shade(.04)
895
+ }, {
896
+ x: 0,
897
+ y: 8,
898
+ blur: 24,
899
+ spread: -12,
900
+ color: shade(.1)
901
+ }],
902
+ raised: [{
903
+ x: 0,
904
+ y: 4,
905
+ blur: 12,
906
+ spread: -2,
907
+ color: shade(.08)
908
+ }],
909
+ floating: [{
910
+ x: 0,
911
+ y: 12,
912
+ blur: 24,
913
+ spread: -8,
914
+ color: shade(.14)
915
+ }],
916
+ modal: [{
917
+ x: 0,
918
+ y: 40,
919
+ blur: 100,
920
+ spread: -30,
921
+ color: shade(.35)
922
+ }],
923
+ "sheet-inset": [inset]
924
+ };
925
+ const R = config.radius;
926
+ const dimensions = {
927
+ radius: R,
928
+ "radius-control": R,
929
+ "radius-card": Math.round(R * 1.6),
930
+ "radius-sheet": Math.round(R * 2.4),
931
+ "radius-pill": 999,
932
+ "radius-agent": Math.max(2, Math.round(R * .6)),
933
+ "focus-width": contrast === "high" ? 3 : 2,
934
+ "glass-blur-sheet": config.glass ? 20 : 0,
935
+ "glass-blur-floating": config.glass ? 24 : 0
936
+ };
937
+ const numbers = { "glass-saturate": config.glass ? 1.15 : 1 };
938
+ const fonts = {};
939
+ for (const role of [
940
+ "display",
941
+ "body",
942
+ "mono"
943
+ ]) {
944
+ const list = config.fonts?.[role];
945
+ if (list?.length) fonts[FONT_ROLE_TOKENS[role]] = [...list];
946
+ }
947
+ return {
948
+ name: config.name,
949
+ mode,
950
+ contrast,
951
+ colors,
952
+ ramps,
953
+ cta: {
954
+ angle: 135,
955
+ stops: ctaStops
956
+ },
957
+ shadows,
958
+ dimensions,
959
+ numbers,
960
+ fonts,
961
+ strings: config.strings ?? {},
962
+ report
963
+ };
964
+ }
965
+ const DENSITIES = {
966
+ compact: {
967
+ "control-height": 36,
968
+ "control-height-touch": 44,
969
+ "control-height-compact": 28,
970
+ density: .875
971
+ },
972
+ default: {
973
+ "control-height": 40,
974
+ "control-height-touch": 44,
975
+ "control-height-compact": 32,
976
+ density: 1
977
+ },
978
+ comfortable: {
979
+ "control-height": 44,
980
+ "control-height-touch": 48,
981
+ "control-height-compact": 36,
982
+ density: 1.125
983
+ }
984
+ };
985
+ function shadowToCss(layers) {
986
+ return layers.map((l) => `${l.inset ? "inset " : ""}${l.x}px ${l.y}px ${l.blur}px ${l.spread}px ${toCss(l.color)}`).join(", ");
987
+ }
988
+ function gradientToCss(angle, stops) {
989
+ const list = stops.length === 1 ? [stops[0], stops[0]] : stops;
990
+ return `linear-gradient(${angle}deg, ${list.map((s, i) => `${toCss(s)} ${Math.round(i / (list.length - 1) * 100)}%`).join(", ")})`;
991
+ }
992
+ /** Ordered `[--ty-name, value]` pairs for one resolved theme. */
993
+ function themeVariables(t) {
994
+ const out = [];
995
+ for (const [name, c] of Object.entries(t.colors)) out.push([`--ty-${name}`, toCss(c)]);
996
+ out.push(["--ty-cta", gradientToCss(t.cta.angle, t.cta.stops)]);
997
+ for (const [seed, ramp] of Object.entries(t.ramps)) for (const step of RAMP_STEPS) out.push([`--ty-${seed}-${step}`, toCss(ramp[step])]);
998
+ for (const [name, layers] of Object.entries(t.shadows)) out.push([`--ty-shadow-${name}`, shadowToCss(layers)]);
999
+ for (const [name, px] of Object.entries(t.dimensions)) out.push([`--ty-${name}`, `${px}px`]);
1000
+ for (const [name, n] of Object.entries(t.numbers)) out.push([`--ty-${name}`, String(n)]);
1001
+ for (const [name, list] of Object.entries(t.fonts)) out.push([`--ty-font-${name}`, fontStackToCss(list)]);
1002
+ for (const [name, s] of Object.entries(t.strings ?? {})) out.push([`--ty-${name}`, s]);
1003
+ return out;
1004
+ }
1005
+ /**
1006
+ * CSS `font-family` value of a family list: names with spaces or digits are
1007
+ * quoted, keywords and single identifiers are not (the same rule as the
1008
+ * Style Dictionary font-family transform of the build).
1009
+ */
1010
+ function fontStackToCss(families) {
1011
+ return families.map((f) => /[\s\d]/.test(f) && !/^[\w-]+$/.test(f) ? `'${f}'` : f).join(", ");
1012
+ }
1013
+ /** Family list of a CSS `font-family` value (quotes removed). */
1014
+ function parseFontStack(stack) {
1015
+ return stack.split(",").map((f) => f.trim().replace(/^["']|["']$/g, "")).filter(Boolean);
1016
+ }
1017
+ function densityVariables(density) {
1018
+ return Object.entries(DENSITIES[density]).map(([k, v]) => [`--ty-${k}`, k === "density" ? String(v) : `${v}px`]);
1019
+ }
1020
+ //#endregion
1021
+ //#region src/presets.ts
1022
+ const brand = seedFromColor("#166e5a", .13);
1023
+ const baseSeeds = {
1024
+ brand,
1025
+ neutral: {
1026
+ hue: brand.hue,
1027
+ chroma: .012
1028
+ },
1029
+ danger: {
1030
+ hue: 12,
1031
+ chroma: .2
1032
+ },
1033
+ warning: {
1034
+ hue: 68,
1035
+ chroma: .15
1036
+ },
1037
+ success: {
1038
+ hue: 148,
1039
+ chroma: .16
1040
+ },
1041
+ info: {
1042
+ hue: 255,
1043
+ chroma: .06
1044
+ }
1045
+ };
1046
+ /**
1047
+ * Default theme. Generated from seeds, with the exact colours of design
1048
+ * direction §2.3 pinned so the product matches the approved direction.
1049
+ */
1050
+ const tympanPreset = {
1051
+ name: "tympan",
1052
+ label: "Tympan",
1053
+ seeds: baseSeeds,
1054
+ radius: 10,
1055
+ contrast: "default",
1056
+ glass: true,
1057
+ cta: "gradient",
1058
+ pins: {
1059
+ light: {
1060
+ brand: "#166e5a",
1061
+ "focus-ring": "#166e5a",
1062
+ "brand-strong": "#0f5a49",
1063
+ "brand-soft": "rgb(22 110 90 / 0.10)",
1064
+ "on-brand": "#f6fbf9",
1065
+ bg: "#f6f8fa",
1066
+ surface: "rgb(252 253 253 / 0.82)",
1067
+ "surface-raised": "rgb(252 253 253 / 0.94)",
1068
+ "surface-solid": "#fcfdfd",
1069
+ "surface-raised-solid": "#fcfdfd",
1070
+ "surface-sunken": "#eef2f5",
1071
+ line: "rgb(100 116 139 / 0.22)",
1072
+ "line-strong": "rgb(100 116 139 / 0.38)",
1073
+ ink: "#0f172a",
1074
+ "ink-2": "#334155",
1075
+ "ink-3": "#526077",
1076
+ success: "#15803d",
1077
+ warning: "#a16207",
1078
+ danger: "#be123c",
1079
+ neutral: "#526077"
1080
+ },
1081
+ dark: {
1082
+ brand: "#34d399",
1083
+ "focus-ring": "#34d399",
1084
+ "brand-strong": "#6ee7b7",
1085
+ "brand-soft": "rgb(52 211 153 / 0.14)",
1086
+ "on-brand": "#052e25",
1087
+ bg: "#0a0f1c",
1088
+ surface: "rgb(20 28 46 / 0.72)",
1089
+ "surface-raised": "rgb(28 38 60 / 0.86)",
1090
+ "surface-solid": "#141c2e",
1091
+ "surface-raised-solid": "#1c263c",
1092
+ "surface-sunken": "#0f1626",
1093
+ line: "rgb(148 163 184 / 0.16)",
1094
+ "line-strong": "rgb(148 163 184 / 0.30)",
1095
+ ink: "#eef2f7",
1096
+ "ink-2": "#cbd5e1",
1097
+ "ink-3": "#94a3b8",
1098
+ success: "#4ade80",
1099
+ warning: "#fbbf24",
1100
+ danger: "#fb7185",
1101
+ neutral: "#94a3b8"
1102
+ }
1103
+ },
1104
+ ctaPins: {
1105
+ light: [
1106
+ "#047857",
1107
+ "#0f766e",
1108
+ "#0369a1"
1109
+ ],
1110
+ dark: [
1111
+ "#047857",
1112
+ "#0f766e",
1113
+ "#0369a1"
1114
+ ]
1115
+ }
1116
+ };
1117
+ /** Brand-free grey theme for embedding and white-label use. Fully generated. */
1118
+ const neutralPreset = {
1119
+ name: "neutral",
1120
+ label: "Neutral",
1121
+ seeds: {
1122
+ brand: {
1123
+ hue: 255,
1124
+ chroma: .03
1125
+ },
1126
+ neutral: {
1127
+ hue: 255,
1128
+ chroma: .008
1129
+ },
1130
+ danger: {
1131
+ hue: 18,
1132
+ chroma: .19
1133
+ },
1134
+ warning: {
1135
+ hue: 70,
1136
+ chroma: .14
1137
+ },
1138
+ success: {
1139
+ hue: 150,
1140
+ chroma: .14
1141
+ },
1142
+ info: {
1143
+ hue: 255,
1144
+ chroma: .05
1145
+ }
1146
+ },
1147
+ radius: 8,
1148
+ contrast: "default",
1149
+ glass: true,
1150
+ cta: "solid"
1151
+ };
1152
+ /**
1153
+ * The Fakhir research platform's look, selected by name
1154
+ * (`data-ty-theme="fakhir"`). Today it carries the default theme's values; it
1155
+ * is a separate preset so that app keeps its look if the default changes.
1156
+ */
1157
+ const fakhirPreset = {
1158
+ ...tympanPreset,
1159
+ name: "fakhir",
1160
+ label: "Fakhir"
1161
+ };
1162
+ /** Default hues with high contrast, opaque surfaces and a thicker focus ring. */
1163
+ const highContrastPreset = {
1164
+ name: "high-contrast",
1165
+ label: "High contrast",
1166
+ seeds: baseSeeds,
1167
+ radius: 10,
1168
+ contrast: "high",
1169
+ glass: false,
1170
+ cta: "solid"
1171
+ };
1172
+ const astrlabePreset = {
1173
+ name: "astrlabe",
1174
+ label: "Astrlabe",
1175
+ seeds: {
1176
+ ...baseSeeds,
1177
+ brand: {
1178
+ hue: 240,
1179
+ chroma: .15
1180
+ }
1181
+ },
1182
+ radius: 8,
1183
+ contrast: "default",
1184
+ glass: true,
1185
+ cta: "solid"
1186
+ };
1187
+ const presets = [
1188
+ tympanPreset,
1189
+ fakhirPreset,
1190
+ neutralPreset,
1191
+ highContrastPreset,
1192
+ astrlabePreset
1193
+ ];
1194
+ const DEFAULT_THEME = "tympan";
1195
+ //#endregion
1196
+ //#region src/dtcg.ts
1197
+ const r4 = (v) => Math.round(v * 1e4) / 1e4;
1198
+ function toDtcgColor(c) {
1199
+ const out = {
1200
+ colorSpace: "srgb",
1201
+ components: [
1202
+ r4(c.r),
1203
+ r4(c.g),
1204
+ r4(c.b)
1205
+ ],
1206
+ hex: toHex(c)
1207
+ };
1208
+ if (c.a < 1) out.alpha = r4(c.a);
1209
+ return out;
1210
+ }
1211
+ function fromDtcgColor(v) {
1212
+ if (typeof v === "string") {
1213
+ const h = v.replace("#", "");
1214
+ return {
1215
+ r: parseInt(h.slice(0, 2), 16) / 255,
1216
+ g: parseInt(h.slice(2, 4), 16) / 255,
1217
+ b: parseInt(h.slice(4, 6), 16) / 255,
1218
+ a: 1
1219
+ };
1220
+ }
1221
+ const [r, g, b] = v.components;
1222
+ return {
1223
+ r,
1224
+ g,
1225
+ b,
1226
+ a: v.alpha ?? 1
1227
+ };
1228
+ }
1229
+ const px$1 = (value) => ({
1230
+ value,
1231
+ unit: "px"
1232
+ });
1233
+ const ext = (cssName) => ({ "br.com.datatechsolutions.tympan": { cssName } });
1234
+ function shadowValue(layers) {
1235
+ return layers.map((l) => ({
1236
+ color: toDtcgColor(l.color),
1237
+ offsetX: px$1(l.x),
1238
+ offsetY: px$1(l.y),
1239
+ blur: px$1(l.blur),
1240
+ spread: px$1(l.spread),
1241
+ ...l.inset ? { inset: true } : {}
1242
+ }));
1243
+ }
1244
+ /** DTCG tree for one resolved theme and mode. */
1245
+ function themeToDtcg(t) {
1246
+ const color = { $type: "color" };
1247
+ for (const [name, c] of Object.entries(t.colors)) color[name] = {
1248
+ $value: toDtcgColor(c),
1249
+ $extensions: ext(`--ty-${name}`)
1250
+ };
1251
+ const ramp = { $type: "color" };
1252
+ for (const [seed, steps] of Object.entries(t.ramps)) {
1253
+ const group = {};
1254
+ for (const step of RAMP_STEPS) group[String(step)] = {
1255
+ $value: toDtcgColor(steps[step]),
1256
+ $extensions: ext(`--ty-${seed}-${step}`)
1257
+ };
1258
+ ramp[seed] = group;
1259
+ }
1260
+ const shadow = { $type: "shadow" };
1261
+ for (const [name, layers] of Object.entries(t.shadows)) shadow[name] = {
1262
+ $value: shadowValue(layers),
1263
+ $extensions: ext(`--ty-shadow-${name}`)
1264
+ };
1265
+ const dimension = { $type: "dimension" };
1266
+ for (const [name, v] of Object.entries(t.dimensions)) dimension[name] = {
1267
+ $value: px$1(v),
1268
+ $extensions: ext(`--ty-${name}`)
1269
+ };
1270
+ const number = { $type: "number" };
1271
+ for (const [name, v] of Object.entries(t.numbers)) number[name] = {
1272
+ $value: v,
1273
+ $extensions: ext(`--ty-${name}`)
1274
+ };
1275
+ const fontFamily = { $type: "fontFamily" };
1276
+ for (const [name, list] of Object.entries(t.fonts)) fontFamily[name] = {
1277
+ $value: [...list],
1278
+ $extensions: ext(`--ty-font-${name}`)
1279
+ };
1280
+ return {
1281
+ $description: `Theme ${t.name}, ${t.mode} mode, ${t.contrast} contrast. Generated by @datatechsolutions/tympan-tokens.`,
1282
+ color,
1283
+ ramp,
1284
+ gradient: {
1285
+ $type: "gradient",
1286
+ cta: {
1287
+ $value: t.cta.stops.map((s, i, all) => ({
1288
+ color: toDtcgColor(s),
1289
+ position: all.length === 1 ? 0 : r4(i / (all.length - 1))
1290
+ })),
1291
+ $extensions: { "br.com.datatechsolutions.tympan": {
1292
+ cssName: "--ty-cta",
1293
+ angle: t.cta.angle
1294
+ } }
1295
+ }
1296
+ },
1297
+ shadow,
1298
+ dimension,
1299
+ number,
1300
+ ...Object.keys(t.fonts).length ? { fontFamily } : {}
1301
+ };
1302
+ }
1303
+ /** DTCG tree for one density step. */
1304
+ function densityToDtcg(density) {
1305
+ const group = { $type: "dimension" };
1306
+ for (const [k, v] of Object.entries(DENSITIES[density])) group[k] = k === "density" ? {
1307
+ $type: "number",
1308
+ $value: v,
1309
+ $extensions: ext(`--ty-${k}`)
1310
+ } : {
1311
+ $value: px$1(v),
1312
+ $extensions: ext(`--ty-${k}`)
1313
+ };
1314
+ return {
1315
+ $description: `Density ${density}.`,
1316
+ density: group
1317
+ };
1318
+ }
1319
+ //#endregion
1320
+ //#region src/print-presets.ts
1321
+ const ESTADOS_PROVA = [
1322
+ "sustentada",
1323
+ "refutada",
1324
+ "nao-da-para-afirmar",
1325
+ "pendente",
1326
+ "sem-dado",
1327
+ "nao-testada"
1328
+ ];
1329
+ /** The word printed for each proof state (always visible, whatever the mark's shape). */
1330
+ const ROTULOS_PROVA = {
1331
+ sustentada: "Sustentada",
1332
+ refutada: "Refutada",
1333
+ "nao-da-para-afirmar": "Não dá para afirmar",
1334
+ pendente: "Pendente",
1335
+ "sem-dado": "Sem dado",
1336
+ "nao-testada": "Não testada"
1337
+ };
1338
+ const SERIF = "Georgia, \"Times New Roman\", serif";
1339
+ const SANS = "system-ui, \"Helvetica Neue\", Arial, sans-serif";
1340
+ const MONO = "ui-monospace, \"SFMono-Regular\", Menlo, monospace";
1341
+ const HAND = "\"Comic Neue\", \"Segoe Print\", cursive";
1342
+ const f = (family, fallback) => `"${family}", ${fallback}`;
1343
+ const PLEX_MONO = "IBM Plex Mono:wght@400;500";
1344
+ const dashboard = {
1345
+ name: "dashboard",
1346
+ label: "Dashboard editorial",
1347
+ referencia: "Painéis de pesquisa: cartões, estado de prova em pílula, gráfico sóbrio; inspirado em painéis da plataforma Fakhir",
1348
+ fontes: {
1349
+ titulo: f("Source Serif 4", SERIF),
1350
+ corpo: f("IBM Plex Sans", SANS),
1351
+ numero: f("IBM Plex Sans", SANS),
1352
+ rotulo: f("IBM Plex Sans", SANS),
1353
+ anotacao: f("Source Serif 4", SERIF),
1354
+ mono: f("IBM Plex Mono", MONO)
1355
+ },
1356
+ googleFonts: [
1357
+ "Source Serif 4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400",
1358
+ "IBM Plex Sans:ital,wght@0,400;0,500;0,600;0,700;1,400",
1359
+ PLEX_MONO
1360
+ ],
1361
+ cor: {
1362
+ papel: "#f7f4ee",
1363
+ tinta: "#1c1a17",
1364
+ tinta2: "#3d3933",
1365
+ tinta3: "#5f594f",
1366
+ linha: "#d6cfc2",
1367
+ destaque: "#1c1a17",
1368
+ destaque2: "#9a4f2a",
1369
+ marcaTexto: "#f3e6cf",
1370
+ contexto: "#8f877a",
1371
+ prova: {
1372
+ sustentada: "#3d6b1f",
1373
+ refutada: "#a3302a",
1374
+ "nao-da-para-afirmar": "#8a5a0f",
1375
+ pendente: "#8a5a0f",
1376
+ "sem-dado": "#5f594f",
1377
+ "nao-testada": "#5f594f"
1378
+ }
1379
+ },
1380
+ papel: {
1381
+ textura: "nenhuma",
1382
+ intensidade: 0
1383
+ },
1384
+ traco: {
1385
+ largura: .25,
1386
+ tremor: 0,
1387
+ hachura: "simples"
1388
+ },
1389
+ grafico: "limpo",
1390
+ marcaProva: "pilula",
1391
+ raio: 1.6,
1392
+ caixaAlta: false,
1393
+ pb: {},
1394
+ estrutura: {
1395
+ painel: "nenhum",
1396
+ rotulo: "letra",
1397
+ rotuloCaixa: "alta",
1398
+ notas: "dentro",
1399
+ figura: "simples",
1400
+ minusculas: false
1401
+ }
1402
+ };
1403
+ const graficos1900 = {
1404
+ name: "graficos-1900",
1405
+ label: "Gráficos de exposição (1900)",
1406
+ referencia: "Pranchas estatísticas de exposição universal: letreiro à mão, cores chapadas, papel pardo; inspirado em W. E. B. Du Bois (pranchas para a Exposição de Paris de 1900)",
1407
+ fontes: {
1408
+ titulo: f("Rubik Mono One", SANS),
1409
+ corpo: f("Literata", SERIF),
1410
+ numero: f("Rubik Mono One", SANS),
1411
+ rotulo: f("Patrick Hand SC", HAND),
1412
+ anotacao: f("Patrick Hand SC", HAND),
1413
+ mono: f("IBM Plex Mono", MONO)
1414
+ },
1415
+ googleFonts: [
1416
+ "Rubik Mono One",
1417
+ "Literata:ital,opsz,wght@0,7..72,400;0,7..72,600;1,7..72,400",
1418
+ "Patrick Hand SC",
1419
+ PLEX_MONO
1420
+ ],
1421
+ cor: {
1422
+ papel: "#eadfc8",
1423
+ tinta: "#1d1a16",
1424
+ tinta2: "#342e27",
1425
+ tinta3: "#564a3d",
1426
+ linha: "#1d1a16",
1427
+ destaque: "#c23b2e",
1428
+ destaque2: "#c98a2b",
1429
+ marcaTexto: "#dcc690",
1430
+ contexto: "#7a5a3e",
1431
+ prova: {
1432
+ sustentada: "#3e6a48",
1433
+ refutada: "#a8342a",
1434
+ "nao-da-para-afirmar": "#6f4a2e",
1435
+ pendente: "#6f4a2e",
1436
+ "sem-dado": "#1d1a16",
1437
+ "nao-testada": "#1d1a16"
1438
+ }
1439
+ },
1440
+ papel: {
1441
+ textura: "fibra",
1442
+ intensidade: .55
1443
+ },
1444
+ traco: {
1445
+ largura: .45,
1446
+ tremor: .7,
1447
+ hachura: "nenhuma"
1448
+ },
1449
+ grafico: "mao",
1450
+ marcaProva: "carimbo",
1451
+ raio: 0,
1452
+ caixaAlta: true,
1453
+ pb: {
1454
+ destaque: "#3a3a3a",
1455
+ destaque2: "#9a9a9a"
1456
+ },
1457
+ estrutura: {
1458
+ painel: "caixa-grossa",
1459
+ rotulo: "letra",
1460
+ rotuloCaixa: "versalete",
1461
+ notas: "dentro",
1462
+ figura: "simples",
1463
+ minusculas: false,
1464
+ forma: "ziguezague",
1465
+ tituloEstilo: "centro"
1466
+ }
1467
+ };
1468
+ const cartaoPostal = {
1469
+ name: "cartao-postal",
1470
+ label: "Cartão-postal desenhado à mão",
1471
+ referencia: "Cartões-postais de dados desenhados à mão: um ponto por registro, legenda à mão; inspirado em Dear Data (Giorgia Lupi e Stefanie Posavec, 2016)",
1472
+ fontes: {
1473
+ titulo: f("Newsreader", SERIF),
1474
+ corpo: f("Newsreader", SERIF),
1475
+ numero: f("Caveat", HAND),
1476
+ rotulo: f("Caveat", HAND),
1477
+ anotacao: f("Caveat", HAND),
1478
+ mono: f("IBM Plex Mono", MONO)
1479
+ },
1480
+ googleFonts: [
1481
+ "Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,600;1,6..72,300;1,6..72,400",
1482
+ "Caveat:wght@400;600",
1483
+ PLEX_MONO
1484
+ ],
1485
+ cor: {
1486
+ papel: "#fbf9f3",
1487
+ tinta: "#24211e",
1488
+ tinta2: "#45413c",
1489
+ tinta3: "#625e58",
1490
+ linha: "#3a3632",
1491
+ destaque: "#3d3fa0",
1492
+ destaque2: "#c9462b",
1493
+ marcaTexto: "#f1e7c4",
1494
+ contexto: "#9a958c",
1495
+ prova: {
1496
+ sustentada: "#3d3fa0",
1497
+ refutada: "#b53d25",
1498
+ "nao-da-para-afirmar": "#24211e",
1499
+ pendente: "#45413c",
1500
+ "sem-dado": "#24211e",
1501
+ "nao-testada": "#24211e"
1502
+ }
1503
+ },
1504
+ papel: {
1505
+ textura: "grao",
1506
+ intensidade: .35
1507
+ },
1508
+ traco: {
1509
+ largura: .3,
1510
+ tremor: 1,
1511
+ hachura: "nenhuma"
1512
+ },
1513
+ grafico: "pontos",
1514
+ marcaProva: "circulo",
1515
+ raio: 0,
1516
+ caixaAlta: false,
1517
+ pb: {
1518
+ destaque: "#1a1a1a",
1519
+ destaque2: "#8a8a8a"
1520
+ },
1521
+ estrutura: {
1522
+ painel: "caixa",
1523
+ rotulo: "parenteses",
1524
+ rotuloCaixa: "normal",
1525
+ notas: "dentro",
1526
+ figura: "simples",
1527
+ minusculas: false,
1528
+ forma: "eixo-central"
1529
+ }
1530
+ };
1531
+ const caderno = {
1532
+ name: "caderno",
1533
+ label: "Caderno de campo",
1534
+ referencia: "Caderno pautado de pesquisa: lápis, hachura cruzada, caneta vermelha e marca-texto",
1535
+ fontes: {
1536
+ titulo: f("Source Serif 4", SERIF),
1537
+ corpo: f("Source Serif 4", SERIF),
1538
+ numero: f("Kalam", HAND),
1539
+ rotulo: f("Kalam", HAND),
1540
+ anotacao: f("Gochi Hand", HAND),
1541
+ mono: f("Courier Prime", MONO)
1542
+ },
1543
+ googleFonts: [
1544
+ "Source Serif 4:ital,opsz,wght@0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400",
1545
+ "Kalam:wght@400;700",
1546
+ "Gochi Hand",
1547
+ "Courier Prime:wght@400;700"
1548
+ ],
1549
+ cor: {
1550
+ papel: "#f7f2e4",
1551
+ tinta: "#2b2b2b",
1552
+ tinta2: "#454545",
1553
+ tinta3: "#625d54",
1554
+ linha: "#474747",
1555
+ destaque: "#2b2b2b",
1556
+ destaque2: "#b8322a",
1557
+ marcaTexto: "#fff45c",
1558
+ contexto: "#6b665c",
1559
+ prova: {
1560
+ sustentada: "#2b2b2b",
1561
+ refutada: "#b0302a",
1562
+ "nao-da-para-afirmar": "#2b2b2b",
1563
+ pendente: "#625d54",
1564
+ "sem-dado": "#454545",
1565
+ "nao-testada": "#454545"
1566
+ }
1567
+ },
1568
+ papel: {
1569
+ textura: "pauta",
1570
+ intensidade: .6
1571
+ },
1572
+ traco: {
1573
+ largura: .3,
1574
+ tremor: 1.2,
1575
+ hachura: "cruzada"
1576
+ },
1577
+ grafico: "mao",
1578
+ marcaProva: "circulo",
1579
+ raio: 0,
1580
+ caixaAlta: false,
1581
+ pb: {
1582
+ destaque2: "#3a3a3a",
1583
+ marcaTexto: "#dddddd"
1584
+ },
1585
+ estrutura: {
1586
+ painel: "caixa",
1587
+ rotulo: "parenteses",
1588
+ rotuloCaixa: "normal",
1589
+ notas: "dentro",
1590
+ figura: "simples",
1591
+ minusculas: false,
1592
+ forma: "colunas",
1593
+ chamadas: "manuscritas",
1594
+ multiplos: "lado-a-lado",
1595
+ tituloEstilo: "sublinhado",
1596
+ numerosMarcados: true
1597
+ }
1598
+ };
1599
+ const isotype = {
1600
+ name: "isotype",
1601
+ label: "Isotype",
1602
+ referencia: "Estatística em pictogramas (Viena, 1925-1934): um ícone = uma quantidade fixa; inspirado em Otto e Marie Neurath e Gerd Arntz",
1603
+ fontes: {
1604
+ titulo: f("Jost", SANS),
1605
+ corpo: f("Jost", SANS),
1606
+ numero: f("Jost", SANS),
1607
+ rotulo: f("Jost", SANS),
1608
+ anotacao: f("Jost", SANS),
1609
+ mono: f("Jost", SANS)
1610
+ },
1611
+ googleFonts: ["Jost:ital,wght@0,400;0,500;0,600;0,700;1,400"],
1612
+ cor: {
1613
+ papel: "#f3eee2",
1614
+ tinta: "#1c1b19",
1615
+ tinta2: "#383632",
1616
+ tinta3: "#5f5a50",
1617
+ linha: "#1c1b19",
1618
+ destaque: "#1c1b19",
1619
+ destaque2: "#c73a2c",
1620
+ marcaTexto: "#e4dcc8",
1621
+ contexto: "#8a8577",
1622
+ prova: {
1623
+ sustentada: "#1c1b19",
1624
+ refutada: "#b3342a",
1625
+ "nao-da-para-afirmar": "#1c1b19",
1626
+ pendente: "#383632",
1627
+ "sem-dado": "#5f5a50",
1628
+ "nao-testada": "#1c1b19"
1629
+ }
1630
+ },
1631
+ papel: {
1632
+ textura: "nenhuma",
1633
+ intensidade: 0
1634
+ },
1635
+ traco: {
1636
+ largura: .5,
1637
+ tremor: 0,
1638
+ hachura: "simples"
1639
+ },
1640
+ grafico: "isotype",
1641
+ marcaProva: "barra",
1642
+ raio: 0,
1643
+ caixaAlta: false,
1644
+ pb: { destaque2: "#8c8c8c" },
1645
+ estrutura: {
1646
+ painel: "fio-grosso",
1647
+ rotulo: "quadrado",
1648
+ rotuloCaixa: "alta",
1649
+ notas: "dentro",
1650
+ figura: "simples",
1651
+ minusculas: false
1652
+ }
1653
+ };
1654
+ const cordel = {
1655
+ name: "cordel",
1656
+ label: "Cordel",
1657
+ referencia: "Xilogravura de cordel: papel pardo, goiva, letreiro em laje; inspirado em J. Borges e Gilvan Samico",
1658
+ fontes: {
1659
+ titulo: f("Alfa Slab One", SERIF),
1660
+ corpo: f("Alegreya", SERIF),
1661
+ numero: f("Alfa Slab One", SERIF),
1662
+ rotulo: f("Alegreya SC", SERIF),
1663
+ anotacao: f("Alegreya", SERIF),
1664
+ mono: f("Courier Prime", MONO)
1665
+ },
1666
+ googleFonts: [
1667
+ "Alfa Slab One",
1668
+ "Alegreya:ital,wght@0,400;0,500;0,700;1,400",
1669
+ "Alegreya SC:wght@500;700",
1670
+ "Courier Prime"
1671
+ ],
1672
+ cor: {
1673
+ papel: "#dcc79c",
1674
+ tinta: "#15110d",
1675
+ tinta2: "#2c2219",
1676
+ tinta3: "#4a3a29",
1677
+ linha: "#15110d",
1678
+ destaque: "#15110d",
1679
+ destaque2: "#15110d",
1680
+ marcaTexto: "#c9ae78",
1681
+ contexto: "#5a4632",
1682
+ prova: {
1683
+ sustentada: "#15110d",
1684
+ refutada: "#15110d",
1685
+ "nao-da-para-afirmar": "#15110d",
1686
+ pendente: "#2c2219",
1687
+ "sem-dado": "#15110d",
1688
+ "nao-testada": "#15110d"
1689
+ }
1690
+ },
1691
+ papel: {
1692
+ textura: "fibra",
1693
+ intensidade: .8
1694
+ },
1695
+ traco: {
1696
+ largura: .6,
1697
+ tremor: .9,
1698
+ hachura: "goiva"
1699
+ },
1700
+ grafico: "gravura",
1701
+ marcaProva: "carimbo",
1702
+ raio: 0,
1703
+ caixaAlta: false,
1704
+ pb: {},
1705
+ estrutura: {
1706
+ painel: "caixa-grossa",
1707
+ rotulo: "quadrado",
1708
+ rotuloCaixa: "versalete",
1709
+ notas: "dentro",
1710
+ figura: "simples",
1711
+ minusculas: false,
1712
+ emblema: "casa"
1713
+ },
1714
+ logo: "mono"
1715
+ };
1716
+ const riso = {
1717
+ name: "riso",
1718
+ label: "Risografia",
1719
+ referencia: "Impressão em risógrafo a duas tintas (azul e rosa fluorescente): grão, meio-tom e registro solto",
1720
+ fontes: {
1721
+ titulo: f("Bricolage Grotesque", SANS),
1722
+ corpo: f("Archivo", SANS),
1723
+ numero: f("Bricolage Grotesque", SANS),
1724
+ rotulo: f("Archivo", SANS),
1725
+ anotacao: f("Space Mono", MONO),
1726
+ mono: f("Space Mono", MONO)
1727
+ },
1728
+ googleFonts: [
1729
+ "Bricolage Grotesque:opsz,wdth,wght@12..96,75..100,400..800",
1730
+ "Archivo:ital,wdth,wght@0,62..125,400;0,62..125,600;1,62..125,400",
1731
+ "Space Mono"
1732
+ ],
1733
+ cor: {
1734
+ papel: "#f5f1e8",
1735
+ tinta: "#3d3fa0",
1736
+ tinta2: "#3d3fa0",
1737
+ tinta3: "#4f51a3",
1738
+ linha: "#3d3fa0",
1739
+ destaque: "#3d3fa0",
1740
+ destaque2: "#ff48b0",
1741
+ marcaTexto: "#ffd3ea",
1742
+ contexto: "#9a8fc4",
1743
+ prova: {
1744
+ sustentada: "#3d3fa0",
1745
+ refutada: "#c8187a",
1746
+ "nao-da-para-afirmar": "#3d3fa0",
1747
+ pendente: "#3d3fa0",
1748
+ "sem-dado": "#3d3fa0",
1749
+ "nao-testada": "#3d3fa0"
1750
+ }
1751
+ },
1752
+ papel: {
1753
+ textura: "grao",
1754
+ intensidade: .6
1755
+ },
1756
+ traco: {
1757
+ largura: .5,
1758
+ tremor: 0,
1759
+ hachura: "pontilhada"
1760
+ },
1761
+ grafico: "riso",
1762
+ marcaProva: "barra",
1763
+ raio: 0,
1764
+ caixaAlta: false,
1765
+ pb: {
1766
+ tinta: "#1a1a1a",
1767
+ tinta2: "#1a1a1a",
1768
+ tinta3: "#3a3a3a",
1769
+ linha: "#1a1a1a",
1770
+ destaque: "#1a1a1a",
1771
+ destaque2: "#8a8a8a"
1772
+ },
1773
+ estrutura: {
1774
+ painel: "caixa",
1775
+ rotulo: "circulo",
1776
+ rotuloCaixa: "alta",
1777
+ notas: "dentro",
1778
+ figura: "simples",
1779
+ minusculas: false,
1780
+ fundoPainel: "pontilhado",
1781
+ veredito: "bloco-cor"
1782
+ },
1783
+ logo: "mono"
1784
+ };
1785
+ const jornal = {
1786
+ name: "jornal",
1787
+ label: "Editorial de jornal",
1788
+ referencia: "Gráficos editoriais de jornal: serifa no texto, grotesca nos números, um acento; inspirado em gráficos do NYT The Upshot (Amanda Cox, Kevin Quealy), do The Pudding e da Folha de S.Paulo",
1789
+ fontes: {
1790
+ titulo: f("Newsreader", SERIF),
1791
+ corpo: f("Newsreader", SERIF),
1792
+ numero: f("Libre Franklin", SANS),
1793
+ rotulo: f("Libre Franklin", SANS),
1794
+ anotacao: f("Newsreader", SERIF),
1795
+ mono: f("IBM Plex Mono", MONO)
1796
+ },
1797
+ googleFonts: [
1798
+ "Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400;1,6..72,500",
1799
+ "Libre Franklin:ital,wght@0,400;0,500;0,600;0,700;1,400",
1800
+ PLEX_MONO
1801
+ ],
1802
+ cor: {
1803
+ papel: "#fdfcfa",
1804
+ tinta: "#121212",
1805
+ tinta2: "#3d3d3d",
1806
+ tinta3: "#636363",
1807
+ linha: "#cfcfcf",
1808
+ destaque: "#c8431f",
1809
+ destaque2: "#121212",
1810
+ marcaTexto: "#f7e4db",
1811
+ contexto: "#b0b0b0",
1812
+ prova: {
1813
+ sustentada: "#121212",
1814
+ refutada: "#b83c1b",
1815
+ "nao-da-para-afirmar": "#121212",
1816
+ pendente: "#636363",
1817
+ "sem-dado": "#636363",
1818
+ "nao-testada": "#636363"
1819
+ }
1820
+ },
1821
+ papel: {
1822
+ textura: "nenhuma",
1823
+ intensidade: 0
1824
+ },
1825
+ traco: {
1826
+ largura: .25,
1827
+ tremor: 0,
1828
+ hachura: "nenhuma"
1829
+ },
1830
+ grafico: "limpo",
1831
+ marcaProva: "pilula",
1832
+ raio: 3,
1833
+ caixaAlta: false,
1834
+ pb: { destaque: "#121212" },
1835
+ estrutura: {
1836
+ painel: "fio",
1837
+ rotulo: "letra",
1838
+ rotuloCaixa: "alta",
1839
+ notas: "dentro",
1840
+ figura: "simples",
1841
+ minusculas: false
1842
+ }
1843
+ };
1844
+ const prancheta = {
1845
+ name: "prancheta",
1846
+ label: "Prancheta (cianotipia)",
1847
+ referencia: "Desenho técnico em cópia heliográfica: papel azul, milimetrado, cotas e letreiro normógrafo",
1848
+ fontes: {
1849
+ titulo: f("Share Tech Mono", MONO),
1850
+ corpo: f("IBM Plex Sans Condensed", SANS),
1851
+ numero: f("Share Tech Mono", MONO),
1852
+ rotulo: f("Share Tech Mono", MONO),
1853
+ anotacao: f("IBM Plex Sans Condensed", SANS),
1854
+ mono: f("IBM Plex Mono", MONO)
1855
+ },
1856
+ googleFonts: [
1857
+ "Share Tech Mono",
1858
+ "IBM Plex Sans Condensed:ital,wght@0,400;0,500;1,400",
1859
+ PLEX_MONO
1860
+ ],
1861
+ cor: {
1862
+ papel: "#1d4b8f",
1863
+ tinta: "#f6f4ea",
1864
+ tinta2: "#e2dfd3",
1865
+ tinta3: "#d9d6c8",
1866
+ linha: "#f6f4ea",
1867
+ destaque: "#f6f4ea",
1868
+ destaque2: "#ece9dc",
1869
+ marcaTexto: "#4d5d78",
1870
+ contexto: "#c9c5b5",
1871
+ prova: {
1872
+ sustentada: "#f6f4ea",
1873
+ refutada: "#f6f4ea",
1874
+ "nao-da-para-afirmar": "#f6f4ea",
1875
+ pendente: "#e2dfd3",
1876
+ "sem-dado": "#e2dfd3",
1877
+ "nao-testada": "#e2dfd3"
1878
+ }
1879
+ },
1880
+ papel: {
1881
+ textura: "milimetrado",
1882
+ intensidade: .7
1883
+ },
1884
+ traco: {
1885
+ largura: .25,
1886
+ tremor: 0,
1887
+ hachura: "simples"
1888
+ },
1889
+ grafico: "prancheta",
1890
+ marcaProva: "barra",
1891
+ raio: 0,
1892
+ caixaAlta: true,
1893
+ pb: {
1894
+ papel: "#ffffff",
1895
+ tinta: "#111111",
1896
+ tinta2: "#333333",
1897
+ tinta3: "#555555",
1898
+ linha: "#111111",
1899
+ destaque: "#111111",
1900
+ destaque2: "#444444",
1901
+ marcaTexto: "#eeeeee",
1902
+ contexto: "#9a9a9a",
1903
+ prova: {
1904
+ sustentada: "#111111",
1905
+ refutada: "#111111",
1906
+ "nao-da-para-afirmar": "#111111",
1907
+ pendente: "#333333",
1908
+ "sem-dado": "#333333",
1909
+ "nao-testada": "#333333"
1910
+ }
1911
+ },
1912
+ estrutura: {
1913
+ painel: "prancha",
1914
+ rotulo: "circulo",
1915
+ rotuloCaixa: "alta",
1916
+ notas: "dentro",
1917
+ figura: "simples",
1918
+ minusculas: false
1919
+ },
1920
+ logo: "mono"
1921
+ };
1922
+ const pranchetaClara = {
1923
+ ...prancheta,
1924
+ name: "prancheta-clara",
1925
+ label: "Prancheta clara",
1926
+ referencia: "Desenho técnico em papel vegetal claro: tinta azul, milimetrado, cotas e letreiro normógrafo",
1927
+ cor: {
1928
+ papel: "#f6f7f4",
1929
+ tinta: "#1f4787",
1930
+ tinta2: "#2f5390",
1931
+ tinta3: "#4a669a",
1932
+ linha: "#1f4787",
1933
+ destaque: "#2e3192",
1934
+ destaque2: "#2e3192",
1935
+ marcaTexto: "#e2dfd3",
1936
+ contexto: "#9aa3c4",
1937
+ prova: {
1938
+ sustentada: "#2e3192",
1939
+ refutada: "#2e3192",
1940
+ "nao-da-para-afirmar": "#2e3192",
1941
+ pendente: "#2e3192",
1942
+ "sem-dado": "#2e3192",
1943
+ "nao-testada": "#2e3192"
1944
+ }
1945
+ },
1946
+ papel: {
1947
+ textura: "milimetrado",
1948
+ intensidade: .6
1949
+ },
1950
+ pb: {
1951
+ destaque: "#1a1a1a",
1952
+ destaque2: "#1a1a1a"
1953
+ }
1954
+ };
1955
+ const aquarela = {
1956
+ name: "aquarela",
1957
+ label: "Aquarela",
1958
+ referencia: "Caderno de aquarela: papel de algodão, lavagens de índigo e siena com borda de pigmento, legenda à mão",
1959
+ fontes: {
1960
+ titulo: f("Cormorant Garamond", SERIF),
1961
+ corpo: f("Crimson Pro", SERIF),
1962
+ numero: f("Caveat", HAND),
1963
+ rotulo: f("Caveat", HAND),
1964
+ anotacao: f("Caveat", HAND),
1965
+ mono: f("IBM Plex Mono", MONO)
1966
+ },
1967
+ googleFonts: [
1968
+ "Cormorant Garamond:ital,wght@0,500;0,600;1,500;1,600",
1969
+ "Crimson Pro:ital,wght@0,400;0,500;0,600;1,400",
1970
+ "Caveat:wght@500;700",
1971
+ PLEX_MONO
1972
+ ],
1973
+ cor: {
1974
+ papel: "#fbf7ee",
1975
+ tinta: "#2e2520",
1976
+ tinta2: "#4a3d33",
1977
+ tinta3: "#635446",
1978
+ linha: "#2e2520",
1979
+ destaque: "#5b5fa8",
1980
+ destaque2: "#cf8448",
1981
+ marcaTexto: "#efe0b0",
1982
+ contexto: "#b8ab98",
1983
+ prova: {
1984
+ sustentada: "#3e6a48",
1985
+ refutada: "#a4442a",
1986
+ "nao-da-para-afirmar": "#7a5a1c",
1987
+ pendente: "#7a5a1c",
1988
+ "sem-dado": "#635446",
1989
+ "nao-testada": "#635446"
1990
+ }
1991
+ },
1992
+ papel: {
1993
+ textura: "fibra",
1994
+ intensidade: .6
1995
+ },
1996
+ traco: {
1997
+ largura: .35,
1998
+ tremor: .8,
1999
+ hachura: "nenhuma"
2000
+ },
2001
+ grafico: "aquarela",
2002
+ marcaProva: "barra",
2003
+ raio: 0,
2004
+ caixaAlta: false,
2005
+ pb: {
2006
+ destaque: "#5a5a5a",
2007
+ destaque2: "#b0b0b0"
2008
+ },
2009
+ estrutura: {
2010
+ painel: "caixa",
2011
+ rotulo: "parenteses",
2012
+ rotuloCaixa: "normal",
2013
+ notas: "dentro",
2014
+ figura: "simples",
2015
+ minusculas: false,
2016
+ forma: "colunas",
2017
+ multiplos: "lado-a-lado",
2018
+ tituloEstilo: "italico"
2019
+ }
2020
+ };
2021
+ const minimoDeTinta = {
2022
+ name: "minimo-de-tinta",
2023
+ label: "Mínimo de tinta",
2024
+ referencia: "Pouca tinta, notas na margem, pequenos múltiplos, moldura de amplitude; inspirado em Edward Tufte (The Visual Display of Quantitative Information, Beautiful Evidence)",
2025
+ fontes: {
2026
+ titulo: f("EB Garamond", SERIF),
2027
+ corpo: f("EB Garamond", SERIF),
2028
+ numero: f("EB Garamond", SERIF),
2029
+ rotulo: f("EB Garamond", SERIF),
2030
+ anotacao: f("EB Garamond", SERIF),
2031
+ mono: f("IBM Plex Mono", MONO)
2032
+ },
2033
+ googleFonts: ["EB Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500", PLEX_MONO],
2034
+ cor: {
2035
+ papel: "#fffff8",
2036
+ tinta: "#111111",
2037
+ tinta2: "#333333",
2038
+ tinta3: "#575757",
2039
+ linha: "#bdbdb5",
2040
+ destaque: "#a3261c",
2041
+ destaque2: "#111111",
2042
+ marcaTexto: "#f3efd6",
2043
+ contexto: "#a6a6a0",
2044
+ prova: {
2045
+ sustentada: "#111111",
2046
+ refutada: "#a3261c",
2047
+ "nao-da-para-afirmar": "#333333",
2048
+ pendente: "#575757",
2049
+ "sem-dado": "#575757",
2050
+ "nao-testada": "#575757"
2051
+ }
2052
+ },
2053
+ papel: {
2054
+ textura: "nenhuma",
2055
+ intensidade: 0
2056
+ },
2057
+ traco: {
2058
+ largura: .15,
2059
+ tremor: 0,
2060
+ hachura: "nenhuma"
2061
+ },
2062
+ grafico: "limpo",
2063
+ marcaProva: "etiqueta",
2064
+ raio: 0,
2065
+ caixaAlta: false,
2066
+ pb: { destaque: "#111111" },
2067
+ estrutura: {
2068
+ painel: "nenhum",
2069
+ rotulo: "letra",
2070
+ rotuloCaixa: "versalete",
2071
+ notas: "margem",
2072
+ figura: "amplitude",
2073
+ minusculas: false,
2074
+ forma: "colunas",
2075
+ colunasFinas: true,
2076
+ linhaCorte: "tracejada",
2077
+ tituloEstilo: "italico"
2078
+ }
2079
+ };
2080
+ const suico = {
2081
+ name: "suico",
2082
+ label: "Estilo Suíço",
2083
+ referencia: "Estilo tipográfico internacional: grade rígida, grotesca, assimetria, um vermelho; inspirado em Josef Müller-Brockmann (Grid Systems, 1981)",
2084
+ fontes: {
2085
+ titulo: f("Archivo", SANS),
2086
+ corpo: f("Archivo", SANS),
2087
+ numero: f("Archivo", SANS),
2088
+ rotulo: f("Archivo", SANS),
2089
+ anotacao: f("Archivo", SANS),
2090
+ mono: f("IBM Plex Mono", MONO)
2091
+ },
2092
+ googleFonts: ["Archivo:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400", PLEX_MONO],
2093
+ cor: {
2094
+ papel: "#fbfbf9",
2095
+ tinta: "#0d0d0d",
2096
+ tinta2: "#2e2e2e",
2097
+ tinta3: "#595959",
2098
+ linha: "#0d0d0d",
2099
+ destaque: "#0d0d0d",
2100
+ destaque2: "#e0261b",
2101
+ marcaTexto: "#f9d7d2",
2102
+ contexto: "#b5b5b0",
2103
+ prova: {
2104
+ sustentada: "#0d0d0d",
2105
+ refutada: "#c8150b",
2106
+ "nao-da-para-afirmar": "#0d0d0d",
2107
+ pendente: "#595959",
2108
+ "sem-dado": "#595959",
2109
+ "nao-testada": "#595959"
2110
+ }
2111
+ },
2112
+ papel: {
2113
+ textura: "nenhuma",
2114
+ intensidade: 0
2115
+ },
2116
+ traco: {
2117
+ largura: .35,
2118
+ tremor: 0,
2119
+ hachura: "nenhuma"
2120
+ },
2121
+ grafico: "limpo",
2122
+ marcaProva: "barra",
2123
+ raio: 0,
2124
+ caixaAlta: false,
2125
+ pb: { destaque2: "#8a8a8a" },
2126
+ estrutura: {
2127
+ painel: "fio-grosso",
2128
+ rotulo: "letra",
2129
+ rotuloCaixa: "normal",
2130
+ notas: "dentro",
2131
+ figura: "simples",
2132
+ minusculas: false,
2133
+ tituloEstilo: "coluna3"
2134
+ }
2135
+ };
2136
+ const concretismo = {
2137
+ name: "concretismo",
2138
+ label: "Concretismo",
2139
+ referencia: "Design concreto brasileiro (anos 1950-60): geometria, grotesca em caixa-baixa, preto, vermelho e ultramar; inspirado em Alexandre Wollner, Aloísio Magalhães e na ESDI",
2140
+ fontes: {
2141
+ titulo: f("Barlow", SANS),
2142
+ corpo: f("Barlow", SANS),
2143
+ numero: f("Barlow", SANS),
2144
+ rotulo: f("Barlow Condensed", SANS),
2145
+ anotacao: f("Barlow", SANS),
2146
+ mono: f("Barlow Condensed", SANS)
2147
+ },
2148
+ googleFonts: ["Barlow:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400", "Barlow Condensed:wght@500;600"],
2149
+ cor: {
2150
+ papel: "#f3efe6",
2151
+ tinta: "#141414",
2152
+ tinta2: "#2b2b2b",
2153
+ tinta3: "#57534c",
2154
+ linha: "#141414",
2155
+ destaque: "#d7372a",
2156
+ destaque2: "#3d3fa0",
2157
+ marcaTexto: "#f3d3cc",
2158
+ contexto: "#c9c3b6",
2159
+ prova: {
2160
+ sustentada: "#141414",
2161
+ refutada: "#b82e22",
2162
+ "nao-da-para-afirmar": "#3d3fa0",
2163
+ pendente: "#57534c",
2164
+ "sem-dado": "#57534c",
2165
+ "nao-testada": "#57534c"
2166
+ }
2167
+ },
2168
+ papel: {
2169
+ textura: "nenhuma",
2170
+ intensidade: 0
2171
+ },
2172
+ traco: {
2173
+ largura: .7,
2174
+ tremor: 0,
2175
+ hachura: "nenhuma"
2176
+ },
2177
+ grafico: "limpo",
2178
+ marcaProva: "etiqueta",
2179
+ raio: 0,
2180
+ caixaAlta: false,
2181
+ pb: {
2182
+ destaque: "#141414",
2183
+ destaque2: "#8a8a8a"
2184
+ },
2185
+ estrutura: {
2186
+ painel: "fio-grosso",
2187
+ rotulo: "quadrado",
2188
+ rotuloCaixa: "normal",
2189
+ notas: "dentro",
2190
+ figura: "simples",
2191
+ minusculas: true,
2192
+ forma: "eixo-central",
2193
+ emblema: "circulo-bicolor",
2194
+ veredito: "bloco-escuro",
2195
+ costura: "barra"
2196
+ }
2197
+ };
2198
+ const semanario = {
2199
+ name: "semanario",
2200
+ label: "Semanário de economia",
2201
+ referencia: "Gráficos de revista semanal de economia: barra vermelha no topo, título curto, grotesca condensada, grade só horizontal; inspirado em gráficos da revista The Economist",
2202
+ fontes: {
2203
+ titulo: f("Source Serif 4", SERIF),
2204
+ corpo: f("Source Serif 4", SERIF),
2205
+ numero: f("Fira Sans Condensed", SANS),
2206
+ rotulo: f("Fira Sans Condensed", SANS),
2207
+ anotacao: f("Fira Sans Condensed", SANS),
2208
+ mono: f("Fira Sans Condensed", SANS)
2209
+ },
2210
+ googleFonts: ["Fira Sans Condensed:ital,wght@0,400;0,500;0,600;0,700;1,400", "Source Serif 4:ital,opsz,wght@0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400"],
2211
+ cor: {
2212
+ papel: "#ffffff",
2213
+ tinta: "#121212",
2214
+ tinta2: "#333333",
2215
+ tinta3: "#595959",
2216
+ linha: "#b7c6cf",
2217
+ destaque: "#3a4aa0",
2218
+ destaque2: "#b0bee0",
2219
+ marcaTexto: "#fbdcd8",
2220
+ contexto: "#b7c6cf",
2221
+ prova: {
2222
+ sustentada: "#3a4aa0",
2223
+ refutada: "#d7110a",
2224
+ "nao-da-para-afirmar": "#3a4aa0",
2225
+ pendente: "#595959",
2226
+ "sem-dado": "#595959",
2227
+ "nao-testada": "#595959"
2228
+ }
2229
+ },
2230
+ papel: {
2231
+ textura: "nenhuma",
2232
+ intensidade: 0
2233
+ },
2234
+ traco: {
2235
+ largura: .3,
2236
+ tremor: 0,
2237
+ hachura: "nenhuma"
2238
+ },
2239
+ grafico: "limpo",
2240
+ marcaProva: "barra",
2241
+ raio: 0,
2242
+ caixaAlta: false,
2243
+ pb: {
2244
+ destaque: "#121212",
2245
+ destaque2: "#9a9a9a"
2246
+ },
2247
+ estrutura: {
2248
+ painel: "fio",
2249
+ rotulo: "quadrado",
2250
+ rotuloCaixa: "normal",
2251
+ notas: "dentro",
2252
+ figura: "barra-topo",
2253
+ minusculas: false,
2254
+ multiplos: "lado-a-lado"
2255
+ }
2256
+ };
2257
+ const infograficoIlustrado = {
2258
+ name: "infografico-ilustrado",
2259
+ label: "Infográfico ilustrado",
2260
+ referencia: "Infografia explicativa: pictogramas, cantos redondos, balão de fala, cores amigáveis; inspirado em Nigel Holmes (Time, Wordless Diagrams)",
2261
+ fontes: {
2262
+ titulo: f("Rubik", SANS),
2263
+ corpo: f("Nunito Sans", SANS),
2264
+ numero: f("Rubik", SANS),
2265
+ rotulo: f("Rubik", SANS),
2266
+ anotacao: f("Nunito Sans", SANS),
2267
+ mono: f("Nunito Sans", SANS)
2268
+ },
2269
+ googleFonts: ["Rubik:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400", "Nunito Sans:ital,opsz,wght@0,6..12,400;0,6..12,600;0,6..12,700;1,6..12,400"],
2270
+ cor: {
2271
+ papel: "#fbf6ea",
2272
+ tinta: "#22303c",
2273
+ tinta2: "#34424e",
2274
+ tinta3: "#56606a",
2275
+ linha: "#22303c",
2276
+ destaque: "#e0603f",
2277
+ destaque2: "#2b8a86",
2278
+ marcaTexto: "#f6e1ad",
2279
+ contexto: "#d9cfbb",
2280
+ prova: {
2281
+ sustentada: "#1f6f6b",
2282
+ refutada: "#b8401f",
2283
+ "nao-da-para-afirmar": "#22303c",
2284
+ pendente: "#56606a",
2285
+ "sem-dado": "#56606a",
2286
+ "nao-testada": "#56606a"
2287
+ }
2288
+ },
2289
+ papel: {
2290
+ textura: "nenhuma",
2291
+ intensidade: 0
2292
+ },
2293
+ traco: {
2294
+ largura: .5,
2295
+ tremor: 0,
2296
+ hachura: "nenhuma"
2297
+ },
2298
+ grafico: "isotype",
2299
+ marcaProva: "pilula",
2300
+ raio: 2.4,
2301
+ caixaAlta: false,
2302
+ pb: {
2303
+ destaque: "#2a2a2a",
2304
+ destaque2: "#8a8a8a"
2305
+ },
2306
+ estrutura: {
2307
+ painel: "cartao",
2308
+ rotulo: "circulo",
2309
+ rotuloCaixa: "normal",
2310
+ notas: "dentro",
2311
+ figura: "simples",
2312
+ minusculas: false,
2313
+ forma: "predios",
2314
+ linhaCorte: "tracejada",
2315
+ chamadas: "baloes",
2316
+ multiplos: "lado-a-lado",
2317
+ emblema: "predios"
2318
+ }
2319
+ };
2320
+ const diagramaModernista = {
2321
+ name: "diagrama-modernista",
2322
+ label: "Diagrama modernista",
2323
+ referencia: "Atlas modernista: blocos de cor chapada, sans geométrica em caixa-baixa; inspirado em Herbert Bayer (World Geo-Graphic Atlas, 1953)",
2324
+ fontes: {
2325
+ titulo: f("League Spartan", SANS),
2326
+ corpo: f("Jost", SANS),
2327
+ numero: f("League Spartan", SANS),
2328
+ rotulo: f("League Spartan", SANS),
2329
+ anotacao: f("Jost", SANS),
2330
+ mono: f("Jost", SANS)
2331
+ },
2332
+ googleFonts: ["League Spartan:wght@400;500;600;700", "Jost:ital,wght@0,400;0,500;0,600;1,400"],
2333
+ cor: {
2334
+ papel: "#f1ece0",
2335
+ tinta: "#1b1a17",
2336
+ tinta2: "#36342f",
2337
+ tinta3: "#5c574d",
2338
+ linha: "#1b1a17",
2339
+ destaque: "#c0512d",
2340
+ destaque2: "#5a5f93",
2341
+ marcaTexto: "#ecd8a8",
2342
+ contexto: "#cbc2ae",
2343
+ prova: {
2344
+ sustentada: "#56602a",
2345
+ refutada: "#a8401f",
2346
+ "nao-da-para-afirmar": "#1b1a17",
2347
+ pendente: "#5c574d",
2348
+ "sem-dado": "#5c574d",
2349
+ "nao-testada": "#5c574d"
2350
+ }
2351
+ },
2352
+ papel: {
2353
+ textura: "nenhuma",
2354
+ intensidade: 0
2355
+ },
2356
+ traco: {
2357
+ largura: .4,
2358
+ tremor: 0,
2359
+ hachura: "nenhuma"
2360
+ },
2361
+ grafico: "limpo",
2362
+ marcaProva: "ponto",
2363
+ raio: 0,
2364
+ caixaAlta: false,
2365
+ pb: {
2366
+ destaque: "#2a2a2a",
2367
+ destaque2: "#8a8a8a"
2368
+ },
2369
+ estrutura: {
2370
+ painel: "bloco",
2371
+ rotulo: "circulo",
2372
+ rotuloCaixa: "normal",
2373
+ notas: "dentro",
2374
+ figura: "simples",
2375
+ minusculas: true,
2376
+ forma: "colunas",
2377
+ linhaCorte: "cheia",
2378
+ marcador: "circulo",
2379
+ multiplos: "lado-a-lado",
2380
+ fundoPainel: "alternado",
2381
+ moldura: "quartos",
2382
+ manchete: "texto"
2383
+ }
2384
+ };
2385
+ const papelSalmao = {
2386
+ name: "papel-salmao",
2387
+ label: "Papel salmão",
2388
+ referencia: "Gráficos de jornal financeiro em papel salmão: serifa editorial no título, grotesca nos rótulos, clarete e azul; inspirado em gráficos do Financial Times",
2389
+ fontes: {
2390
+ titulo: f("DM Serif Display", SERIF),
2391
+ corpo: f("Gelasio", SERIF),
2392
+ numero: f("Hanken Grotesk", SANS),
2393
+ rotulo: f("Hanken Grotesk", SANS),
2394
+ anotacao: f("Hanken Grotesk", SANS),
2395
+ mono: f("Hanken Grotesk", SANS)
2396
+ },
2397
+ googleFonts: [
2398
+ "DM Serif Display:ital@0;1",
2399
+ "Gelasio:ital,wght@0,400;0,500;0,600;1,400",
2400
+ "Hanken Grotesk:ital,wght@0,400;0,500;0,600;0,700;1,400"
2401
+ ],
2402
+ cor: {
2403
+ papel: "#fff1e5",
2404
+ tinta: "#33302e",
2405
+ tinta2: "#4a4543",
2406
+ tinta3: "#625c58",
2407
+ linha: "#e3d2c3",
2408
+ destaque: "#3a4aa0",
2409
+ destaque2: "#b0bee0",
2410
+ marcaTexto: "#f2dfce",
2411
+ contexto: "#c9bcb0",
2412
+ prova: {
2413
+ sustentada: "#3a4aa0",
2414
+ refutada: "#990f3d",
2415
+ "nao-da-para-afirmar": "#33302e",
2416
+ pendente: "#625c58",
2417
+ "sem-dado": "#625c58",
2418
+ "nao-testada": "#625c58"
2419
+ }
2420
+ },
2421
+ papel: {
2422
+ textura: "nenhuma",
2423
+ intensidade: 0
2424
+ },
2425
+ traco: {
2426
+ largura: .3,
2427
+ tremor: 0,
2428
+ hachura: "nenhuma"
2429
+ },
2430
+ grafico: "limpo",
2431
+ marcaProva: "etiqueta",
2432
+ raio: 0,
2433
+ caixaAlta: false,
2434
+ pb: {
2435
+ papel: "#ffffff",
2436
+ destaque: "#1a1a1a",
2437
+ destaque2: "#a0a0a0"
2438
+ },
2439
+ estrutura: {
2440
+ painel: "fio",
2441
+ rotulo: "letra",
2442
+ rotuloCaixa: "alta",
2443
+ notas: "dentro",
2444
+ figura: "simples",
2445
+ minusculas: false,
2446
+ forma: "colunas",
2447
+ chamadas: "guia",
2448
+ multiplos: "lado-a-lado"
2449
+ }
2450
+ };
2451
+ const cinzas = (a, b = a) => ({
2452
+ pendente: a,
2453
+ "sem-dado": b,
2454
+ "nao-testada": b
2455
+ });
2456
+ /** The 39 book styles, by name. */
2457
+ const printPresets = {
2458
+ dashboard,
2459
+ "graficos-1900": graficos1900,
2460
+ "cartao-postal": cartaoPostal,
2461
+ caderno,
2462
+ isotype,
2463
+ cordel,
2464
+ riso,
2465
+ jornal,
2466
+ prancheta,
2467
+ "prancheta-clara": pranchetaClara,
2468
+ aquarela,
2469
+ "minimo-de-tinta": minimoDeTinta,
2470
+ suico,
2471
+ concretismo,
2472
+ semanario,
2473
+ "infografico-ilustrado": infograficoIlustrado,
2474
+ "diagrama-modernista": diagramaModernista,
2475
+ "papel-salmao": papelSalmao,
2476
+ "dados-br": {
2477
+ name: "dados-br",
2478
+ label: "Dados à brasileira",
2479
+ referencia: "Jornalismo de dados brasileiro: grotesca pesada, serifa no texto, vermelho só no lado que importa; inspirado em Núcleo, Folha, Estadão e Agência Pública",
2480
+ fontes: {
2481
+ titulo: f("Libre Franklin", SANS),
2482
+ corpo: f("Source Serif 4", SERIF),
2483
+ numero: f("Libre Franklin", SANS),
2484
+ rotulo: f("Libre Franklin", SANS),
2485
+ anotacao: f("Source Serif 4", SERIF),
2486
+ mono: f("IBM Plex Mono", MONO)
2487
+ },
2488
+ googleFonts: [
2489
+ "Libre Franklin:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400",
2490
+ "Source Serif 4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400",
2491
+ PLEX_MONO
2492
+ ],
2493
+ cor: {
2494
+ papel: "#fbfaf6",
2495
+ tinta: "#1f1e1c",
2496
+ tinta2: "#3d3a36",
2497
+ tinta3: "#625d56",
2498
+ linha: "#dcd8cf",
2499
+ destaque: "#c4553a",
2500
+ destaque2: "#b5afa4",
2501
+ marcaTexto: "#f3efe6",
2502
+ contexto: "#b5afa4",
2503
+ prova: {
2504
+ sustentada: "#1f1e1c",
2505
+ refutada: "#b24a31",
2506
+ "nao-da-para-afirmar": "#1f1e1c",
2507
+ ...cinzas("#625d56")
2508
+ }
2509
+ },
2510
+ papel: {
2511
+ textura: "nenhuma",
2512
+ intensidade: 0
2513
+ },
2514
+ traco: {
2515
+ largura: .3,
2516
+ tremor: 0,
2517
+ hachura: "nenhuma"
2518
+ },
2519
+ grafico: "limpo",
2520
+ marcaProva: "barra",
2521
+ raio: .8,
2522
+ caixaAlta: false,
2523
+ pb: { destaque: "#1f1e1c" },
2524
+ estrutura: {
2525
+ painel: "fio",
2526
+ rotulo: "letra",
2527
+ rotuloCaixa: "normal",
2528
+ notas: "dentro",
2529
+ figura: "simples",
2530
+ minusculas: false,
2531
+ notasFigura: "coluna",
2532
+ manchete: "texto"
2533
+ }
2534
+ },
2535
+ "fluxo-historico": {
2536
+ name: "fluxo-historico",
2537
+ label: "Fluxo histórico (séc. XIX)",
2538
+ referencia: "Cartas figurativas do século XIX: papel envelhecido, tinta sépia, filete duplo, versaletes; inspirado em Charles Joseph Minard e Florence Nightingale",
2539
+ fontes: {
2540
+ titulo: f("IM Fell English", SERIF),
2541
+ corpo: f("Old Standard TT", SERIF),
2542
+ numero: f("Old Standard TT", SERIF),
2543
+ rotulo: f("IM Fell English SC", SERIF),
2544
+ anotacao: f("IM Fell English", SERIF),
2545
+ mono: f("Old Standard TT", SERIF)
2546
+ },
2547
+ googleFonts: [
2548
+ "IM Fell English:ital@0;1",
2549
+ "IM Fell English SC",
2550
+ "Old Standard TT:ital,wght@0,400;0,700;1,400"
2551
+ ],
2552
+ cor: {
2553
+ papel: "#efe3c6",
2554
+ tinta: "#3b2a1a",
2555
+ tinta2: "#4f3d2a",
2556
+ tinta3: "#5e4a36",
2557
+ linha: "#b89d78",
2558
+ destaque: "#caa472",
2559
+ destaque2: "#3b2a1a",
2560
+ marcaTexto: "#e6d5ae",
2561
+ contexto: "#b89d78",
2562
+ prova: {
2563
+ sustentada: "#3b2a1a",
2564
+ refutada: "#8f4431",
2565
+ "nao-da-para-afirmar": "#3b2a1a",
2566
+ ...cinzas("#5e4a36")
2567
+ }
2568
+ },
2569
+ papel: {
2570
+ textura: "fibra",
2571
+ intensidade: .35
2572
+ },
2573
+ traco: {
2574
+ largura: .25,
2575
+ tremor: 0,
2576
+ hachura: "pontilhada"
2577
+ },
2578
+ grafico: "limpo",
2579
+ marcaProva: "etiqueta",
2580
+ raio: 0,
2581
+ caixaAlta: false,
2582
+ pb: { destaque: "#8a8a8a" },
2583
+ estrutura: {
2584
+ painel: "fio",
2585
+ rotulo: "letra",
2586
+ rotuloCaixa: "versalete",
2587
+ notas: "dentro",
2588
+ figura: "simples",
2589
+ minusculas: false,
2590
+ moldura: "dupla",
2591
+ forma: "fluxo",
2592
+ tituloEstilo: "centro-italico"
2593
+ }
2594
+ },
2595
+ "blocos-coloridos": {
2596
+ name: "blocos-coloridos",
2597
+ label: "Blocos coloridos",
2598
+ referencia: "Infografia em cartões de cores claras: colunas, números grandes, grotesca geométrica; inspirado em David McCandless (Information is Beautiful)",
2599
+ fontes: {
2600
+ titulo: f("Montserrat", SANS),
2601
+ corpo: f("Lato", SANS),
2602
+ numero: f("Montserrat", SANS),
2603
+ rotulo: f("Montserrat", SANS),
2604
+ anotacao: f("Lato", SANS),
2605
+ mono: f("Lato", SANS)
2606
+ },
2607
+ googleFonts: ["Montserrat:ital,wght@0,500;0,600;0,700;0,800;0,900;1,500", "Lato:ital,wght@0,400;0,700;1,400"],
2608
+ cor: {
2609
+ papel: "#ffffff",
2610
+ tinta: "#2b2b2b",
2611
+ tinta2: "#444444",
2612
+ tinta3: "#6b6b76",
2613
+ linha: "#e4e4ea",
2614
+ destaque: "#f0506e",
2615
+ destaque2: "#7b5ea7",
2616
+ marcaTexto: "#ffe9cf",
2617
+ contexto: "#d3d3cf",
2618
+ prova: {
2619
+ sustentada: "#2b2b2b",
2620
+ refutada: "#c93a58",
2621
+ "nao-da-para-afirmar": "#b8561a",
2622
+ ...cinzas("#6b6b76")
2623
+ }
2624
+ },
2625
+ papel: {
2626
+ textura: "nenhuma",
2627
+ intensidade: 0
2628
+ },
2629
+ traco: {
2630
+ largura: .3,
2631
+ tremor: 0,
2632
+ hachura: "nenhuma"
2633
+ },
2634
+ grafico: "limpo",
2635
+ marcaProva: "barra",
2636
+ raio: 1.6,
2637
+ caixaAlta: false,
2638
+ pb: {
2639
+ destaque: "#2b2b2b",
2640
+ destaque2: "#9a9a9a"
2641
+ },
2642
+ estrutura: {
2643
+ painel: "cartao",
2644
+ rotulo: "quadrado",
2645
+ rotuloCaixa: "alta",
2646
+ notas: "dentro",
2647
+ figura: "simples",
2648
+ minusculas: false,
2649
+ barras: "vertical",
2650
+ corRotulo: "tinta",
2651
+ forma: "cartoes",
2652
+ multiplos: "lado-a-lado",
2653
+ veredito: "bloco-escuro",
2654
+ fundoPainel: "alternado",
2655
+ manchete: "texto"
2656
+ }
2657
+ },
2658
+ construtivismo: {
2659
+ name: "construtivismo",
2660
+ label: "Construtivismo russo",
2661
+ referencia: "Construtivismo soviético: vermelho e preto, diagonais, grotesca condensada em caixa-alta; inspirado em El Lissitzky, Rodchenko e os irmãos Stenberg",
2662
+ fontes: {
2663
+ titulo: f("Oswald", SANS),
2664
+ corpo: f("PT Sans", SANS),
2665
+ numero: f("Oswald", SANS),
2666
+ rotulo: f("Oswald", SANS),
2667
+ anotacao: f("PT Sans Narrow", SANS),
2668
+ mono: f("PT Sans Narrow", SANS)
2669
+ },
2670
+ googleFonts: [
2671
+ "Oswald:wght@400;500;600;700",
2672
+ "PT Sans:ital,wght@0,400;0,700;1,400",
2673
+ "PT Sans Narrow:wght@400;700"
2674
+ ],
2675
+ cor: {
2676
+ papel: "#efe6d2",
2677
+ tinta: "#1a1714",
2678
+ tinta2: "#2e2a25",
2679
+ tinta3: "#5e564c",
2680
+ linha: "#1a1714",
2681
+ destaque: "#c8201e",
2682
+ destaque2: "#1a1714",
2683
+ marcaTexto: "#e3d6bb",
2684
+ contexto: "#b9ad97",
2685
+ prova: {
2686
+ sustentada: "#1a1714",
2687
+ refutada: "#b01c1a",
2688
+ "nao-da-para-afirmar": "#1a1714",
2689
+ ...cinzas("#5e564c")
2690
+ },
2691
+ ornamento: ["#c8201e", "#1a1714"]
2692
+ },
2693
+ papel: {
2694
+ textura: "nenhuma",
2695
+ intensidade: 0
2696
+ },
2697
+ traco: {
2698
+ largura: .4,
2699
+ tremor: 0,
2700
+ hachura: "nenhuma"
2701
+ },
2702
+ grafico: "limpo",
2703
+ marcaProva: "barra",
2704
+ raio: 0,
2705
+ caixaAlta: true,
2706
+ pb: { destaque: "#6a6a6a" },
2707
+ estrutura: {
2708
+ painel: "fio-grosso",
2709
+ rotulo: "quadrado",
2710
+ rotuloCaixa: "alta",
2711
+ notas: "dentro",
2712
+ figura: "simples",
2713
+ minusculas: false,
2714
+ moldura: "diagonais",
2715
+ corRotulo: "refutada",
2716
+ tituloEstilo: "pesado",
2717
+ costura: "bloco-escuro",
2718
+ manchete: "diagonal"
2719
+ }
2720
+ },
2721
+ bauhaus: {
2722
+ name: "bauhaus",
2723
+ label: "Bauhaus",
2724
+ referencia: "Escola Bauhaus (1923–1930): triângulo, quadrado e círculo nas três primárias, sans geométrica em caixa-baixa; inspirado em Herbert Bayer e Joost Schmidt",
2725
+ fontes: {
2726
+ titulo: f("Jost", SANS),
2727
+ corpo: f("Jost", SANS),
2728
+ numero: f("Jost", SANS),
2729
+ rotulo: f("Jost", SANS),
2730
+ anotacao: f("Jost", SANS),
2731
+ mono: f("Jost", SANS)
2732
+ },
2733
+ googleFonts: ["Jost:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400"],
2734
+ cor: {
2735
+ papel: "#f6f2e9",
2736
+ tinta: "#141414",
2737
+ tinta2: "#2e2d2b",
2738
+ tinta3: "#5d5a55",
2739
+ linha: "#141414",
2740
+ destaque: "#d4372c",
2741
+ destaque2: "#3a3f9e",
2742
+ marcaTexto: "#ece21c",
2743
+ contexto: "#cfc9bd",
2744
+ prova: {
2745
+ sustentada: "#141414",
2746
+ refutada: "#b52d24",
2747
+ "nao-da-para-afirmar": "#141414",
2748
+ ...cinzas("#5d5a55")
2749
+ },
2750
+ ornamento: [
2751
+ "#ece21c",
2752
+ "#d4372c",
2753
+ "#3a3f9e"
2754
+ ]
2755
+ },
2756
+ papel: {
2757
+ textura: "nenhuma",
2758
+ intensidade: 0
2759
+ },
2760
+ traco: {
2761
+ largura: .4,
2762
+ tremor: 0,
2763
+ hachura: "nenhuma"
2764
+ },
2765
+ grafico: "limpo",
2766
+ marcaProva: "formas",
2767
+ raio: 0,
2768
+ caixaAlta: false,
2769
+ pb: {
2770
+ destaque: "#5a5a5a",
2771
+ destaque2: "#a0a0a0",
2772
+ marcaTexto: "#e0e0e0"
2773
+ },
2774
+ estrutura: {
2775
+ painel: "fio-grosso",
2776
+ rotulo: "circulo",
2777
+ rotuloCaixa: "normal",
2778
+ notas: "dentro",
2779
+ figura: "simples",
2780
+ minusculas: true,
2781
+ barras: "vertical",
2782
+ moldura: "formas",
2783
+ corRotulo: "marcaTexto",
2784
+ multiplos: "lado-a-lado",
2785
+ costura: "faixa",
2786
+ manchete: "texto"
2787
+ }
2788
+ },
2789
+ brutalista: {
2790
+ name: "brutalista",
2791
+ label: "Brutalista (dossiê)",
2792
+ referencia: "Design brutalista de dossiê e formulário: mono em caixa-alta, campos numerados, faixas pretas, hachura, carimbo",
2793
+ fontes: {
2794
+ titulo: f("Space Mono", MONO),
2795
+ corpo: f("IBM Plex Mono", MONO),
2796
+ numero: f("Space Mono", MONO),
2797
+ rotulo: f("Space Mono", MONO),
2798
+ anotacao: f("IBM Plex Mono", MONO),
2799
+ mono: f("IBM Plex Mono", MONO)
2800
+ },
2801
+ googleFonts: ["Space Mono:ital,wght@0,400;0,700;1,400", "IBM Plex Mono:ital,wght@0,400;0,500;0,600;0,700;1,400"],
2802
+ cor: {
2803
+ papel: "#ebeae5",
2804
+ tinta: "#0d0d0d",
2805
+ tinta2: "#2e2e2c",
2806
+ tinta3: "#4d4d4a",
2807
+ linha: "#0d0d0d",
2808
+ destaque: "#0d0d0d",
2809
+ destaque2: "#0d0d0d",
2810
+ marcaTexto: "#d6d5cf",
2811
+ contexto: "#9a9994",
2812
+ prova: {
2813
+ sustentada: "#0d0d0d",
2814
+ refutada: "#0d0d0d",
2815
+ "nao-da-para-afirmar": "#0d0d0d",
2816
+ ...cinzas("#2e2e2c", "#4d4d4a")
2817
+ }
2818
+ },
2819
+ papel: {
2820
+ textura: "nenhuma",
2821
+ intensidade: 0
2822
+ },
2823
+ traco: {
2824
+ largura: .35,
2825
+ tremor: 0,
2826
+ hachura: "simples"
2827
+ },
2828
+ grafico: "limpo",
2829
+ marcaProva: "carimbo",
2830
+ raio: 0,
2831
+ caixaAlta: true,
2832
+ pb: {},
2833
+ estrutura: {
2834
+ painel: "dossie",
2835
+ rotulo: "letra",
2836
+ rotuloCaixa: "alta",
2837
+ notas: "dentro",
2838
+ figura: "simples",
2839
+ minusculas: false
2840
+ }
2841
+ },
2842
+ divulgacao: {
2843
+ name: "divulgacao",
2844
+ label: "Revista de divulgação",
2845
+ referencia: "Revistas de divulgação científica para jovens: cores vivas, cartões arredondados, balões, títulos pesados; inspirado em Ciência Hoje das Crianças e Superinteressante",
2846
+ fontes: {
2847
+ titulo: f("Archivo Black", SANS),
2848
+ corpo: f("Nunito", SANS),
2849
+ numero: f("Archivo Black", SANS),
2850
+ rotulo: f("Nunito", SANS),
2851
+ anotacao: f("Nunito", SANS),
2852
+ mono: f("Nunito", SANS)
2853
+ },
2854
+ googleFonts: ["Archivo Black", "Nunito:ital,wght@0,400;0,600;0,700;0,800;0,900;1,400"],
2855
+ cor: {
2856
+ papel: "#fffdf7",
2857
+ tinta: "#1b1446",
2858
+ tinta2: "#2a1d5c",
2859
+ tinta3: "#5f5a7a",
2860
+ linha: "#6a2c91",
2861
+ destaque: "#f58220",
2862
+ destaque2: "#6a2c91",
2863
+ marcaTexto: "#fff4c2",
2864
+ contexto: "#dcd3c4",
2865
+ prova: {
2866
+ sustentada: "#3d6b1f",
2867
+ refutada: "#c4006a",
2868
+ "nao-da-para-afirmar": "#b35a00",
2869
+ ...cinzas("#5f5a7a")
2870
+ },
2871
+ ornamento: [
2872
+ "#e6007e",
2873
+ "#f58220",
2874
+ "#8cc63f",
2875
+ "#6a2c91"
2876
+ ]
2877
+ },
2878
+ papel: {
2879
+ textura: "nenhuma",
2880
+ intensidade: 0
2881
+ },
2882
+ traco: {
2883
+ largura: .35,
2884
+ tremor: 0,
2885
+ hachura: "nenhuma"
2886
+ },
2887
+ grafico: "limpo",
2888
+ marcaProva: "pilula",
2889
+ raio: 3,
2890
+ caixaAlta: false,
2891
+ pb: {
2892
+ destaque: "#8a8a8a",
2893
+ destaque2: "#2a2a2a"
2894
+ },
2895
+ estrutura: {
2896
+ painel: "cartao",
2897
+ rotulo: "circulo",
2898
+ rotuloCaixa: "alta",
2899
+ notas: "dentro",
2900
+ figura: "simples",
2901
+ minusculas: false,
2902
+ barras: "vertical",
2903
+ corRotulo: "destaque",
2904
+ contornoBarra: true,
2905
+ tituloEstilo: "normal",
2906
+ forma: "colunas",
2907
+ chamadas: "baloes",
2908
+ multiplos: "lado-a-lado",
2909
+ emblema: "lupa",
2910
+ fundoPainel: "alternado",
2911
+ costura: "selo",
2912
+ manchete: "lupa"
2913
+ }
2914
+ },
2915
+ "proporcao-modular": {
2916
+ name: "proporcao-modular",
2917
+ label: "Proporção modular",
2918
+ referencia: "Proporções modulares e policromia arquitetônica: letras em estêncil, siena e verde, paredes de cor chapada; inspirado em Le Corbusier (policromia de 1931 e 1959)",
2919
+ fontes: {
2920
+ titulo: f("Stardos Stencil", SERIF),
2921
+ corpo: f("Work Sans", SANS),
2922
+ numero: f("Work Sans", SANS),
2923
+ rotulo: f("Work Sans", SANS),
2924
+ anotacao: f("Work Sans", SANS),
2925
+ mono: f("Allerta Stencil", SANS)
2926
+ },
2927
+ googleFonts: [
2928
+ "Stardos Stencil:wght@400;700",
2929
+ "Work Sans:ital,wght@0,400;0,500;0,600;1,400",
2930
+ "Allerta Stencil"
2931
+ ],
2932
+ cor: {
2933
+ papel: "#f7f2e8",
2934
+ tinta: "#26221d",
2935
+ tinta2: "#3c3630",
2936
+ tinta3: "#6a6259",
2937
+ linha: "#26221d",
2938
+ destaque: "#9a4b33",
2939
+ destaque2: "#2f5f45",
2940
+ marcaTexto: "#e9dcc3",
2941
+ contexto: "#d6cbb8",
2942
+ prova: {
2943
+ sustentada: "#2a5a40",
2944
+ refutada: "#9a4b33",
2945
+ "nao-da-para-afirmar": "#26221d",
2946
+ ...cinzas("#6a6259")
2947
+ }
2948
+ },
2949
+ papel: {
2950
+ textura: "nenhuma",
2951
+ intensidade: 0
2952
+ },
2953
+ traco: {
2954
+ largura: .3,
2955
+ tremor: 0,
2956
+ hachura: "nenhuma"
2957
+ },
2958
+ grafico: "limpo",
2959
+ marcaProva: "etiqueta",
2960
+ raio: 0,
2961
+ caixaAlta: true,
2962
+ pb: {
2963
+ destaque: "#5a5a5a",
2964
+ destaque2: "#a0a0a0"
2965
+ },
2966
+ estrutura: {
2967
+ painel: "bloco",
2968
+ rotulo: "quadrado",
2969
+ rotuloCaixa: "alta",
2970
+ notas: "dentro",
2971
+ figura: "simples",
2972
+ minusculas: false,
2973
+ barras: "vertical",
2974
+ corRotulo: "tinta",
2975
+ multiplos: "lado-a-lado",
2976
+ emblema: "figura-modular",
2977
+ fundoPainel: "alternado",
2978
+ costura: "barra",
2979
+ manchete: "texto"
2980
+ }
2981
+ },
2982
+ sinalizacao: {
2983
+ name: "sinalizacao",
2984
+ label: "Sinalização de aeroporto",
2985
+ referencia: "Sinalização de aeroporto: faixas amarelas, setas, preto, grotesca legível à distância; inspirado em Benno Wissing e Total Design (aeroporto de Schiphol, 1967)",
2986
+ fontes: {
2987
+ titulo: f("Hind", SANS),
2988
+ corpo: f("Hind", SANS),
2989
+ numero: f("Hind", SANS),
2990
+ rotulo: f("Hind", SANS),
2991
+ anotacao: f("Hind", SANS),
2992
+ mono: f("Hind", SANS)
2993
+ },
2994
+ googleFonts: ["Hind:wght@400;500;600;700"],
2995
+ cor: {
2996
+ papel: "#fbfbf8",
2997
+ tinta: "#121212",
2998
+ tinta2: "#2b2b2b",
2999
+ tinta3: "#555553",
3000
+ linha: "#121212",
3001
+ destaque: "#121212",
3002
+ destaque2: "#9d9d9d",
3003
+ marcaTexto: "#fff200",
3004
+ contexto: "#9d9d9d",
3005
+ prova: {
3006
+ sustentada: "#121212",
3007
+ refutada: "#121212",
3008
+ "nao-da-para-afirmar": "#121212",
3009
+ ...cinzas("#555553")
3010
+ }
3011
+ },
3012
+ papel: {
3013
+ textura: "nenhuma",
3014
+ intensidade: 0
3015
+ },
3016
+ traco: {
3017
+ largura: .35,
3018
+ tremor: 0,
3019
+ hachura: "nenhuma"
3020
+ },
3021
+ grafico: "limpo",
3022
+ marcaProva: "pilula",
3023
+ raio: 0,
3024
+ caixaAlta: false,
3025
+ pb: { marcaTexto: "#d9d9d9" },
3026
+ estrutura: {
3027
+ painel: "placa",
3028
+ rotulo: "quadrado",
3029
+ rotuloCaixa: "normal",
3030
+ notas: "dentro",
3031
+ figura: "simples",
3032
+ minusculas: false,
3033
+ cabeco: "etiqueta",
3034
+ corRotulo: "tinta",
3035
+ veredito: "bloco-escuro",
3036
+ rastro: "placa",
3037
+ manchete: "faixa"
3038
+ }
3039
+ },
3040
+ pictogramas: {
3041
+ name: "pictogramas",
3042
+ label: "Pictogramas esportivos",
3043
+ referencia: "Identidade de grande evento esportivo: pictogramas em grade, azul-claro, verde e laranja, sans de corpo leve; inspirado em Otl Aicher (Munique, 1972)",
3044
+ fontes: {
3045
+ titulo: f("Albert Sans", SANS),
3046
+ corpo: f("Albert Sans", SANS),
3047
+ numero: f("Albert Sans", SANS),
3048
+ rotulo: f("Albert Sans", SANS),
3049
+ anotacao: f("Albert Sans", SANS),
3050
+ mono: f("Albert Sans", SANS)
3051
+ },
3052
+ googleFonts: ["Albert Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400"],
3053
+ cor: {
3054
+ papel: "#ffffff",
3055
+ tinta: "#1f2a33",
3056
+ tinta2: "#34414b",
3057
+ tinta3: "#5f6b73",
3058
+ linha: "#1f2a33",
3059
+ destaque: "#f28c28",
3060
+ destaque2: "#6b8e3a",
3061
+ marcaTexto: "#d4e6e8",
3062
+ contexto: "#b9bcc0",
3063
+ prova: {
3064
+ sustentada: "#2f5f45",
3065
+ refutada: "#b35a0c",
3066
+ "nao-da-para-afirmar": "#1f2a33",
3067
+ ...cinzas("#5f6b73")
3068
+ }
3069
+ },
3070
+ papel: {
3071
+ textura: "nenhuma",
3072
+ intensidade: 0
3073
+ },
3074
+ traco: {
3075
+ largura: .3,
3076
+ tremor: 0,
3077
+ hachura: "nenhuma"
3078
+ },
3079
+ grafico: "limpo",
3080
+ marcaProva: "etiqueta",
3081
+ raio: 0,
3082
+ caixaAlta: false,
3083
+ pb: {
3084
+ destaque: "#8a8a8a",
3085
+ destaque2: "#3a3a3a",
3086
+ marcaTexto: "#d9d9d9"
3087
+ },
3088
+ estrutura: {
3089
+ painel: "bloco",
3090
+ rotulo: "quadrado",
3091
+ rotuloCaixa: "normal",
3092
+ notas: "dentro",
3093
+ figura: "simples",
3094
+ minusculas: false,
3095
+ barras: "vertical",
3096
+ corRotulo: "sustentada",
3097
+ multiplos: "lado-a-lado",
3098
+ emblema: "pictogramas",
3099
+ fundoPainel: "claro",
3100
+ manchete: "faixa"
3101
+ }
3102
+ },
3103
+ "mapa-de-metro": {
3104
+ name: "mapa-de-metro",
3105
+ label: "Mapa de metrô",
3106
+ referencia: "Manual e mapa de metrô: faixa preta no topo, círculos coloridos, grotesca neutra; inspirado em Massimo Vignelli (metrô de Nova York, Unimark, 1970–1972)",
3107
+ fontes: {
3108
+ titulo: f("Inter", SANS),
3109
+ corpo: f("Inter", SANS),
3110
+ numero: f("Inter", SANS),
3111
+ rotulo: f("Inter", SANS),
3112
+ anotacao: f("Inter", SANS),
3113
+ mono: f("Inter", SANS)
3114
+ },
3115
+ googleFonts: ["Inter:wght@400;500;600;700"],
3116
+ cor: {
3117
+ papel: "#ffffff",
3118
+ tinta: "#111111",
3119
+ tinta2: "#2e2e2e",
3120
+ tinta3: "#595959",
3121
+ linha: "#111111",
3122
+ destaque: "#ee352e",
3123
+ destaque2: "#a7a9ac",
3124
+ marcaTexto: "#ebebe6",
3125
+ contexto: "#a7a9ac",
3126
+ prova: {
3127
+ sustentada: "#111111",
3128
+ refutada: "#d6261f",
3129
+ "nao-da-para-afirmar": "#111111",
3130
+ ...cinzas("#595959")
3131
+ },
3132
+ ornamento: [
3133
+ "#ee352e",
3134
+ "#ff6319",
3135
+ "#b933ad",
3136
+ "#996633"
3137
+ ]
3138
+ },
3139
+ papel: {
3140
+ textura: "nenhuma",
3141
+ intensidade: 0
3142
+ },
3143
+ traco: {
3144
+ largura: .3,
3145
+ tremor: 0,
3146
+ hachura: "nenhuma"
3147
+ },
3148
+ grafico: "limpo",
3149
+ marcaProva: "ponto",
3150
+ raio: 0,
3151
+ caixaAlta: false,
3152
+ pb: { destaque: "#4a4a4a" },
3153
+ estrutura: {
3154
+ painel: "fio",
3155
+ rotulo: "circulo",
3156
+ rotuloCaixa: "normal",
3157
+ notas: "dentro",
3158
+ figura: "simples",
3159
+ minusculas: false,
3160
+ barras: "vertical",
3161
+ cabeco: "faixa",
3162
+ corRotulo: "tinta",
3163
+ veredito: "bloco-escuro",
3164
+ rastro: "metro",
3165
+ manchete: "texto"
3166
+ }
3167
+ },
3168
+ "jornal-1959": {
3169
+ name: "jornal-1959",
3170
+ label: "Jornal modernista (1959)",
3171
+ referencia: "Reforma gráfica de jornal modernista: branco, preto e cinza, filetes, Bodoni no título, grade limpa; inspirado em Amilcar de Castro (reforma do Jornal do Brasil, 1956–1959)",
3172
+ fontes: {
3173
+ titulo: f("Libre Bodoni", SERIF),
3174
+ corpo: f("PT Serif", SERIF),
3175
+ numero: f("Libre Bodoni", SERIF),
3176
+ rotulo: f("Libre Franklin", SANS),
3177
+ anotacao: f("PT Serif", SERIF),
3178
+ mono: f("Libre Franklin", SANS)
3179
+ },
3180
+ googleFonts: [
3181
+ "Libre Bodoni:wght@400;700",
3182
+ "PT Serif:ital,wght@0,400;0,700;1,400",
3183
+ "Libre Franklin:wght@400;500;600;700"
3184
+ ],
3185
+ cor: {
3186
+ papel: "#fdfdfb",
3187
+ tinta: "#111111",
3188
+ tinta2: "#2b2b2b",
3189
+ tinta3: "#595959",
3190
+ linha: "#111111",
3191
+ destaque: "#111111",
3192
+ destaque2: "#a3a3a3",
3193
+ marcaTexto: "#ececea",
3194
+ contexto: "#a3a3a3",
3195
+ prova: {
3196
+ sustentada: "#111111",
3197
+ refutada: "#111111",
3198
+ "nao-da-para-afirmar": "#111111",
3199
+ ...cinzas("#595959")
3200
+ }
3201
+ },
3202
+ papel: {
3203
+ textura: "nenhuma",
3204
+ intensidade: 0
3205
+ },
3206
+ traco: {
3207
+ largura: .25,
3208
+ tremor: 0,
3209
+ hachura: "nenhuma"
3210
+ },
3211
+ grafico: "limpo",
3212
+ marcaProva: "barra",
3213
+ raio: 0,
3214
+ caixaAlta: false,
3215
+ pb: {},
3216
+ estrutura: {
3217
+ painel: "fio",
3218
+ rotulo: "letra",
3219
+ rotuloCaixa: "alta",
3220
+ notas: "dentro",
3221
+ figura: "simples",
3222
+ minusculas: false
3223
+ }
3224
+ },
3225
+ "azulejo-modernista": {
3226
+ name: "azulejo-modernista",
3227
+ label: "Azulejo modernista",
3228
+ referencia: "Painéis de azulejo modernista: módulo azul e branco com semicírculos e quadrados, acento amarelo, geometria; inspirado em Athos Bulcão (Brasília)",
3229
+ fontes: {
3230
+ titulo: f("Jost", SANS),
3231
+ corpo: f("Jost", SANS),
3232
+ numero: f("Jost", SANS),
3233
+ rotulo: f("Jost", SANS),
3234
+ anotacao: f("Jost", SANS),
3235
+ mono: f("Jost", SANS)
3236
+ },
3237
+ googleFonts: ["Jost:ital,wght@0,400;0,500;0,600;0,700;1,400"],
3238
+ cor: {
3239
+ papel: "#fbfaf5",
3240
+ tinta: "#15171c",
3241
+ tinta2: "#2b2e35",
3242
+ tinta3: "#5f636b",
3243
+ linha: "#3040b0",
3244
+ destaque: "#3040b0",
3245
+ destaque2: "#aab3de",
3246
+ marcaTexto: "#f0efe8",
3247
+ contexto: "#aab3de",
3248
+ prova: {
3249
+ sustentada: "#15171c",
3250
+ refutada: "#3040b0",
3251
+ "nao-da-para-afirmar": "#15171c",
3252
+ ...cinzas("#5f636b")
3253
+ },
3254
+ ornamento: [
3255
+ "#3040b0",
3256
+ "#fbfaf5",
3257
+ "#f0b323"
3258
+ ]
3259
+ },
3260
+ papel: {
3261
+ textura: "nenhuma",
3262
+ intensidade: 0
3263
+ },
3264
+ traco: {
3265
+ largura: .3,
3266
+ tremor: 0,
3267
+ hachura: "nenhuma"
3268
+ },
3269
+ grafico: "limpo",
3270
+ marcaProva: "barra",
3271
+ raio: 0,
3272
+ caixaAlta: false,
3273
+ pb: {
3274
+ destaque: "#3a3a3a",
3275
+ destaque2: "#b0b0b0"
3276
+ },
3277
+ estrutura: {
3278
+ painel: "fio",
3279
+ rotulo: "quadrado",
3280
+ rotuloCaixa: "normal",
3281
+ notas: "dentro",
3282
+ figura: "simples",
3283
+ minusculas: false,
3284
+ moldura: "azulejo",
3285
+ corRotulo: "destaque"
3286
+ }
3287
+ },
3288
+ tropicalia: {
3289
+ name: "tropicalia",
3290
+ label: "Tropicália",
3291
+ referencia: "Capas e cartazes tropicalistas (1967–1969): ondas de cor, letreiro exuberante, laranja, roxo e magenta; inspirado em Rogério Duarte",
3292
+ fontes: {
3293
+ titulo: f("Shrikhand", SERIF),
3294
+ corpo: f("Work Sans", SANS),
3295
+ numero: f("Work Sans", SANS),
3296
+ rotulo: f("Work Sans", SANS),
3297
+ anotacao: f("Work Sans", SANS),
3298
+ mono: f("Work Sans", SANS)
3299
+ },
3300
+ googleFonts: ["Shrikhand", "Work Sans:ital,wght@0,400;0,500;0,600;0,700;1,400"],
3301
+ cor: {
3302
+ papel: "#fff6e3",
3303
+ tinta: "#1e1a24",
3304
+ tinta2: "#332c3b",
3305
+ tinta3: "#61586a",
3306
+ linha: "#5b2a86",
3307
+ destaque: "#5b2a86",
3308
+ destaque2: "#ee8a1c",
3309
+ marcaTexto: "#fde7c2",
3310
+ contexto: "#ead9bf",
3311
+ prova: {
3312
+ sustentada: "#5b2a86",
3313
+ refutada: "#c21f6e",
3314
+ "nao-da-para-afirmar": "#1e1a24",
3315
+ ...cinzas("#61586a")
3316
+ },
3317
+ ornamento: [
3318
+ "#e8601c",
3319
+ "#d6247a",
3320
+ "#5b2a86",
3321
+ "#1f8a5b"
3322
+ ]
3323
+ },
3324
+ papel: {
3325
+ textura: "nenhuma",
3326
+ intensidade: 0
3327
+ },
3328
+ traco: {
3329
+ largura: .3,
3330
+ tremor: 0,
3331
+ hachura: "nenhuma"
3332
+ },
3333
+ grafico: "limpo",
3334
+ marcaProva: "barra",
3335
+ raio: 0,
3336
+ caixaAlta: false,
3337
+ pb: {
3338
+ destaque: "#2a2a2a",
3339
+ destaque2: "#a0a0a0"
3340
+ },
3341
+ estrutura: {
3342
+ painel: "fio",
3343
+ rotulo: "letra",
3344
+ rotuloCaixa: "normal",
3345
+ notas: "dentro",
3346
+ figura: "simples",
3347
+ minusculas: false,
3348
+ moldura: "ondas",
3349
+ tituloEstilo: "arcoiris"
3350
+ }
3351
+ },
3352
+ "atlas-oficial": {
3353
+ name: "atlas-oficial",
3354
+ label: "Atlas oficial (cartografia)",
3355
+ referencia: "Atlas oficiais: moldura cartográfica com régua alternada, hachura, terra e oliva, legenda de convenções; inspirado em atlas oficiais brasileiros (IBGE, Atlas Nacional)",
3356
+ fontes: {
3357
+ titulo: f("IBM Plex Sans Condensed", SANS),
3358
+ corpo: f("IBM Plex Serif", SERIF),
3359
+ numero: f("IBM Plex Sans Condensed", SANS),
3360
+ rotulo: f("IBM Plex Sans Condensed", SANS),
3361
+ anotacao: f("IBM Plex Serif", SERIF),
3362
+ mono: f("IBM Plex Sans Condensed", SANS)
3363
+ },
3364
+ googleFonts: ["IBM Plex Sans Condensed:wght@400;500;600;700", "IBM Plex Serif:ital,wght@0,400;0,600;1,400"],
3365
+ cor: {
3366
+ papel: "#fbf8ef",
3367
+ tinta: "#23231d",
3368
+ tinta2: "#3a3a31",
3369
+ tinta3: "#666355",
3370
+ linha: "#23231d",
3371
+ destaque: "#8c5a2b",
3372
+ destaque2: "#5c6b2f",
3373
+ marcaTexto: "#eee8d3",
3374
+ contexto: "#d9d3bd",
3375
+ prova: {
3376
+ sustentada: "#23231d",
3377
+ refutada: "#8c5a2b",
3378
+ "nao-da-para-afirmar": "#23231d",
3379
+ ...cinzas("#666355")
3380
+ },
3381
+ ornamento: ["#23231d", "#fbf8ef"]
3382
+ },
3383
+ papel: {
3384
+ textura: "nenhuma",
3385
+ intensidade: 0
3386
+ },
3387
+ traco: {
3388
+ largura: .3,
3389
+ tremor: 0,
3390
+ hachura: "simples"
3391
+ },
3392
+ grafico: "limpo",
3393
+ marcaProva: "barra",
3394
+ raio: 0,
3395
+ caixaAlta: true,
3396
+ pb: {
3397
+ destaque: "#4a4a4a",
3398
+ destaque2: "#7a7a7a"
3399
+ },
3400
+ estrutura: {
3401
+ painel: "fio",
3402
+ rotulo: "letra",
3403
+ rotuloCaixa: "alta",
3404
+ notas: "dentro",
3405
+ figura: "simples",
3406
+ minusculas: false,
3407
+ moldura: "regua"
3408
+ }
3409
+ },
3410
+ "grade-holandesa": {
3411
+ name: "grade-holandesa",
3412
+ label: "Grade holandesa",
3413
+ referencia: "Grade aparente, letreiro modular espaçado, preto e um laranja; inspirado em Wim Crouwel (Stedelijk Museum, New Alphabet, 1967)",
3414
+ fontes: {
3415
+ titulo: f("Major Mono Display", MONO),
3416
+ corpo: f("Hanken Grotesk", SANS),
3417
+ numero: f("Hanken Grotesk", SANS),
3418
+ rotulo: f("Hanken Grotesk", SANS),
3419
+ anotacao: f("Hanken Grotesk", SANS),
3420
+ mono: f("Hanken Grotesk", SANS)
3421
+ },
3422
+ googleFonts: ["Major Mono Display", "Hanken Grotesk:wght@400;500;600;700;800"],
3423
+ cor: {
3424
+ papel: "#ffffff",
3425
+ tinta: "#111111",
3426
+ tinta2: "#2e2e2e",
3427
+ tinta3: "#595959",
3428
+ linha: "#111111",
3429
+ destaque: "#111111",
3430
+ destaque2: "#f04e23",
3431
+ marcaTexto: "#fde3da",
3432
+ contexto: "#dddddd",
3433
+ prova: {
3434
+ sustentada: "#111111",
3435
+ refutada: "#c8391a",
3436
+ "nao-da-para-afirmar": "#111111",
3437
+ ...cinzas("#595959")
3438
+ }
3439
+ },
3440
+ papel: {
3441
+ textura: "milimetrado",
3442
+ intensidade: .5
3443
+ },
3444
+ traco: {
3445
+ largura: .3,
3446
+ tremor: 0,
3447
+ hachura: "nenhuma"
3448
+ },
3449
+ grafico: "limpo",
3450
+ marcaProva: "barra",
3451
+ raio: 0,
3452
+ caixaAlta: true,
3453
+ pb: { destaque2: "#9a9a9a" },
3454
+ estrutura: {
3455
+ painel: "fio-grosso",
3456
+ rotulo: "quadrado",
3457
+ rotuloCaixa: "normal",
3458
+ notas: "dentro",
3459
+ figura: "simples",
3460
+ minusculas: true,
3461
+ corRotulo: "destaque2"
3462
+ }
3463
+ },
3464
+ "papel-recortado": {
3465
+ name: "papel-recortado",
3466
+ label: "Papel recortado",
3467
+ referencia: "Cartazes e aberturas de filme em papel recortado: preto e laranja, letreiro à mão em blocos; inspirado em Saul Bass (Anatomy of a Murder, Vertigo)",
3468
+ fontes: {
3469
+ titulo: f("Londrina Solid", SANS),
3470
+ corpo: f("Work Sans", SANS),
3471
+ numero: f("Londrina Solid", SANS),
3472
+ rotulo: f("Work Sans", SANS),
3473
+ anotacao: f("Work Sans", SANS),
3474
+ mono: f("Work Sans", SANS)
3475
+ },
3476
+ googleFonts: ["Londrina Solid:wght@400;900", "Work Sans:ital,wght@0,400;0,500;0,600;0,700;1,400"],
3477
+ cor: {
3478
+ papel: "#f3ead8",
3479
+ tinta: "#161616",
3480
+ tinta2: "#2c2a26",
3481
+ tinta3: "#5e574c",
3482
+ linha: "#161616",
3483
+ destaque: "#161616",
3484
+ destaque2: "#e8591a",
3485
+ marcaTexto: "#ecd9b9",
3486
+ contexto: "#d8cbb0",
3487
+ prova: {
3488
+ sustentada: "#161616",
3489
+ refutada: "#b3431a",
3490
+ "nao-da-para-afirmar": "#161616",
3491
+ ...cinzas("#5e574c")
3492
+ },
3493
+ ornamento: ["#161616", "#e8591a"]
3494
+ },
3495
+ papel: {
3496
+ textura: "nenhuma",
3497
+ intensidade: 0
3498
+ },
3499
+ traco: {
3500
+ largura: .35,
3501
+ tremor: 0,
3502
+ hachura: "nenhuma"
3503
+ },
3504
+ grafico: "limpo",
3505
+ marcaProva: "barra",
3506
+ raio: 0,
3507
+ caixaAlta: false,
3508
+ pb: { destaque2: "#8a8a8a" },
3509
+ estrutura: {
3510
+ painel: "fio-grosso",
3511
+ rotulo: "letra",
3512
+ rotuloCaixa: "normal",
3513
+ notas: "dentro",
3514
+ figura: "simples",
3515
+ minusculas: false,
3516
+ moldura: "recortes",
3517
+ tituloEstilo: "recorte"
3518
+ }
3519
+ },
3520
+ "pop-art": {
3521
+ name: "pop-art",
3522
+ label: "Pop art",
3523
+ referencia: "Pop art: pontos Ben-Day, contorno preto grosso, primárias, balão e letreiro de quadrinhos; inspirado em Roy Lichtenstein",
3524
+ fontes: {
3525
+ titulo: f("Bangers", SANS),
3526
+ corpo: f("Nunito Sans", SANS),
3527
+ numero: f("Bangers", SANS),
3528
+ rotulo: f("Nunito Sans", SANS),
3529
+ anotacao: f("Comic Neue", HAND),
3530
+ mono: f("Nunito Sans", SANS)
3531
+ },
3532
+ googleFonts: [
3533
+ "Bangers",
3534
+ "Nunito Sans:wght@400;600;700;800",
3535
+ "Comic Neue:wght@400;700"
3536
+ ],
3537
+ cor: {
3538
+ papel: "#fffdf5",
3539
+ tinta: "#111111",
3540
+ tinta2: "#2b2b2b",
3541
+ tinta3: "#555555",
3542
+ linha: "#111111",
3543
+ destaque: "#2b44b8",
3544
+ destaque2: "#e4252b",
3545
+ marcaTexto: "#f6ea00",
3546
+ contexto: "#d9d4c4",
3547
+ prova: {
3548
+ sustentada: "#111111",
3549
+ refutada: "#c81e24",
3550
+ "nao-da-para-afirmar": "#111111",
3551
+ ...cinzas("#555555")
3552
+ },
3553
+ ornamento: [
3554
+ "#e4252b",
3555
+ "#f6ea00",
3556
+ "#2b44b8"
3557
+ ]
3558
+ },
3559
+ papel: {
3560
+ textura: "nenhuma",
3561
+ intensidade: 0
3562
+ },
3563
+ traco: {
3564
+ largura: .45,
3565
+ tremor: 0,
3566
+ hachura: "pontilhada"
3567
+ },
3568
+ grafico: "limpo",
3569
+ marcaProva: "barra",
3570
+ raio: 0,
3571
+ caixaAlta: true,
3572
+ pb: {
3573
+ destaque: "#2a2a2a",
3574
+ destaque2: "#8a8a8a",
3575
+ marcaTexto: "#d9d9d9"
3576
+ },
3577
+ estrutura: {
3578
+ painel: "fio-grosso",
3579
+ rotulo: "letra",
3580
+ rotuloCaixa: "normal",
3581
+ notas: "dentro",
3582
+ figura: "simples",
3583
+ minusculas: false,
3584
+ moldura: "reticula",
3585
+ tituloEstilo: "faixa",
3586
+ contornoBarra: true
3587
+ }
3588
+ },
3589
+ cientifico: {
3590
+ name: "cientifico",
3591
+ label: "Figura de periódico científico",
3592
+ referencia: "Figuras de periódicos científicos: painéis A e B, eixos com rótulo, paleta segura para daltônicos, legenda longa; inspirado em figuras da Nature, da Science e da PNAS",
3593
+ fontes: {
3594
+ titulo: f("STIX Two Text", SERIF),
3595
+ corpo: f("STIX Two Text", SERIF),
3596
+ numero: f("Arimo", SANS),
3597
+ rotulo: f("Arimo", SANS),
3598
+ anotacao: f("Arimo", SANS),
3599
+ mono: f("Arimo", SANS)
3600
+ },
3601
+ googleFonts: ["STIX Two Text:ital,wght@0,400;0,600;0,700;1,400", "Arimo:wght@400;700"],
3602
+ cor: {
3603
+ papel: "#ffffff",
3604
+ tinta: "#111111",
3605
+ tinta2: "#2e2e2e",
3606
+ tinta3: "#555555",
3607
+ linha: "#111111",
3608
+ destaque: "#3b4aa8",
3609
+ destaque2: "#d97a00",
3610
+ marcaTexto: "#f2f2f2",
3611
+ contexto: "#bdbdbd",
3612
+ prova: {
3613
+ sustentada: "#111111",
3614
+ refutada: "#111111",
3615
+ "nao-da-para-afirmar": "#111111",
3616
+ ...cinzas("#555555")
3617
+ }
3618
+ },
3619
+ papel: {
3620
+ textura: "nenhuma",
3621
+ intensidade: 0
3622
+ },
3623
+ traco: {
3624
+ largura: .25,
3625
+ tremor: 0,
3626
+ hachura: "nenhuma"
3627
+ },
3628
+ grafico: "limpo",
3629
+ marcaProva: "barra",
3630
+ raio: 0,
3631
+ caixaAlta: false,
3632
+ pb: {
3633
+ destaque: "#2a2a2a",
3634
+ destaque2: "#9a9a9a"
3635
+ },
3636
+ estrutura: {
3637
+ painel: "fio",
3638
+ rotulo: "letra",
3639
+ rotuloCaixa: "normal",
3640
+ notas: "dentro",
3641
+ figura: "simples",
3642
+ minusculas: false,
3643
+ barras: "vertical",
3644
+ forma: "colunas",
3645
+ letraMultiplo: true,
3646
+ multiplos: "lado-a-lado"
3647
+ }
3648
+ },
3649
+ "art-nouveau": {
3650
+ name: "art-nouveau",
3651
+ label: "Art nouveau",
3652
+ referencia: "Art nouveau: moldura arredondada, ramos e folhas, ocre e verde-oliva, letreiro decorativo; inspirado em Alphonse Mucha",
3653
+ fontes: {
3654
+ titulo: f("Federo", SERIF),
3655
+ corpo: f("EB Garamond", SERIF),
3656
+ numero: f("EB Garamond", SERIF),
3657
+ rotulo: f("Federo", SERIF),
3658
+ anotacao: f("EB Garamond", SERIF),
3659
+ mono: f("EB Garamond", SERIF)
3660
+ },
3661
+ googleFonts: ["Federo", "EB Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500"],
3662
+ cor: {
3663
+ papel: "#f6eedb",
3664
+ tinta: "#2a2718",
3665
+ tinta2: "#3f3a26",
3666
+ tinta3: "#625a44",
3667
+ linha: "#8a6d2c",
3668
+ destaque: "#4a5a2a",
3669
+ destaque2: "#b9832a",
3670
+ marcaTexto: "#efe2c2",
3671
+ contexto: "#e0d2ae",
3672
+ prova: {
3673
+ sustentada: "#4a5a2a",
3674
+ refutada: "#9a4a36",
3675
+ "nao-da-para-afirmar": "#2a2718",
3676
+ ...cinzas("#625a44")
3677
+ },
3678
+ ornamento: [
3679
+ "#4a5a2a",
3680
+ "#b9832a",
3681
+ "#8a6d2c"
3682
+ ]
3683
+ },
3684
+ papel: {
3685
+ textura: "nenhuma",
3686
+ intensidade: 0
3687
+ },
3688
+ traco: {
3689
+ largura: .3,
3690
+ tremor: 0,
3691
+ hachura: "nenhuma"
3692
+ },
3693
+ grafico: "limpo",
3694
+ marcaProva: "pilula",
3695
+ raio: 2,
3696
+ caixaAlta: false,
3697
+ pb: {
3698
+ destaque: "#3a3a3a",
3699
+ destaque2: "#a0a0a0"
3700
+ },
3701
+ estrutura: {
3702
+ painel: "fio",
3703
+ rotulo: "letra",
3704
+ rotuloCaixa: "normal",
3705
+ notas: "dentro",
3706
+ figura: "simples",
3707
+ minusculas: false,
3708
+ moldura: "ramos"
3709
+ }
3710
+ },
3711
+ memphis: {
3712
+ name: "memphis",
3713
+ label: "Memphis",
3714
+ referencia: "Design pós-moderno de Milão (1981): zigue-zagues, triângulos, confete, turquesa, amarelo e rosa, contorno preto; inspirado em Ettore Sottsass e no grupo Memphis",
3715
+ fontes: {
3716
+ titulo: f("Bungee", SANS),
3717
+ corpo: f("Rubik", SANS),
3718
+ numero: f("Bungee", SANS),
3719
+ rotulo: f("Rubik", SANS),
3720
+ anotacao: f("Rubik", SANS),
3721
+ mono: f("Rubik", SANS)
3722
+ },
3723
+ googleFonts: ["Bungee", "Rubik:ital,wght@0,400;0,500;0,700;1,400"],
3724
+ cor: {
3725
+ papel: "#fffaf0",
3726
+ tinta: "#161616",
3727
+ tinta2: "#2c2b29",
3728
+ tinta3: "#5c5a57",
3729
+ linha: "#161616",
3730
+ destaque: "#1fb5a8",
3731
+ destaque2: "#f6ea00",
3732
+ marcaTexto: "#fff2b8",
3733
+ contexto: "#e2dccb",
3734
+ prova: {
3735
+ sustentada: "#161616",
3736
+ refutada: "#c2185b",
3737
+ "nao-da-para-afirmar": "#161616",
3738
+ ...cinzas("#5c5a57")
3739
+ },
3740
+ ornamento: [
3741
+ "#161616",
3742
+ "#f6ea00",
3743
+ "#ff5fa2",
3744
+ "#1fb5a8"
3745
+ ]
3746
+ },
3747
+ papel: {
3748
+ textura: "nenhuma",
3749
+ intensidade: 0
3750
+ },
3751
+ traco: {
3752
+ largura: .3,
3753
+ tremor: 0,
3754
+ hachura: "nenhuma"
3755
+ },
3756
+ grafico: "limpo",
3757
+ marcaProva: "barra",
3758
+ raio: 0,
3759
+ caixaAlta: true,
3760
+ pb: {
3761
+ destaque: "#5a5a5a",
3762
+ destaque2: "#d0d0d0"
3763
+ },
3764
+ estrutura: {
3765
+ painel: "caixa",
3766
+ rotulo: "circulo",
3767
+ rotuloCaixa: "normal",
3768
+ notas: "dentro",
3769
+ figura: "simples",
3770
+ minusculas: false,
3771
+ moldura: "memphis",
3772
+ tituloEstilo: "sombra",
3773
+ contornoBarra: true,
3774
+ corRotulo: "destaque2"
3775
+ }
3776
+ }
3777
+ };
3778
+ const PRINT_PRESET_NAMES = Object.keys(printPresets);
3779
+ const DEFAULT_PRINT_STYLE = "jornal";
3780
+ /**
3781
+ * The current name of a style id: a current name is returned as is, a
3782
+ * deprecated alias is mapped (with a one-time development warning), anything
3783
+ * else gives `undefined`.
3784
+ */
3785
+ function resolvePrintStyleName(id) {
3786
+ if (Object.hasOwn(printPresets, id)) return id;
3787
+ if (Object.hasOwn(PRINT_STYLE_ALIASES, id)) {
3788
+ const current = PRINT_STYLE_ALIASES[id];
3789
+ warnDeprecatedPrintId(id, current);
3790
+ return current;
3791
+ }
3792
+ }
3793
+ /** The preset of a style id (current or deprecated); throws on an unknown id. */
3794
+ function printPresetById(id) {
3795
+ const name = resolvePrintStyleName(id);
3796
+ if (!name) throw new Error(`tympan: unknown print style "${id}"`);
3797
+ return printPresets[name];
3798
+ }
3799
+ function mergeCores(base, over) {
3800
+ if (!over) return base;
3801
+ const { prova, ...rest } = over;
3802
+ const clean = Object.fromEntries(Object.entries(rest).filter(([, v]) => v !== void 0));
3803
+ return {
3804
+ ...base,
3805
+ ...clean,
3806
+ prova: {
3807
+ ...base.prova,
3808
+ ...prova ?? {}
3809
+ }
3810
+ };
3811
+ }
3812
+ /** A style with the editor's overrides applied (nested, partial). */
3813
+ function mergePrintStyle(style, overrides) {
3814
+ if (!overrides) return style;
3815
+ return {
3816
+ ...style,
3817
+ label: overrides.label ?? style.label,
3818
+ fontes: {
3819
+ ...style.fontes,
3820
+ ...overrides.fontes
3821
+ },
3822
+ googleFonts: overrides.googleFonts ?? style.googleFonts,
3823
+ cor: mergeCores(style.cor, overrides.cor),
3824
+ papel: {
3825
+ ...style.papel,
3826
+ ...overrides.papel
3827
+ },
3828
+ traco: {
3829
+ ...style.traco,
3830
+ ...overrides.traco
3831
+ },
3832
+ grafico: overrides.grafico ?? style.grafico,
3833
+ marcaProva: overrides.marcaProva ?? style.marcaProva,
3834
+ raio: overrides.raio ?? style.raio,
3835
+ caixaAlta: overrides.caixaAlta ?? style.caixaAlta,
3836
+ pb: overrides.pb ? mergeCores({
3837
+ ...style.cor,
3838
+ ...style.pb,
3839
+ prova: {
3840
+ ...style.cor.prova,
3841
+ ...style.pb.prova
3842
+ }
3843
+ }, overrides.pb) : style.pb,
3844
+ estrutura: {
3845
+ ...style.estrutura,
3846
+ ...overrides.estrutura
3847
+ },
3848
+ logo: overrides.logo ?? style.logo
3849
+ };
3850
+ }
3851
+ const fromLinear = (c) => c <= .0031308 ? 12.92 * c : 1.055 * c ** (1 / 2.4) - .055;
3852
+ /** The grey with the same WCAG relative luminance, so every contrast ratio survives the conversion. */
3853
+ function toGrey(color) {
3854
+ const y = luminance(parseColor(color));
3855
+ const v = fromLinear(y);
3856
+ return toHex({
3857
+ r: v,
3858
+ g: v,
3859
+ b: v,
3860
+ a: 1
3861
+ });
3862
+ }
3863
+ /** Colours for black and white print: every role in grey, then the style's own `pb` adjustments. */
3864
+ function printStyleCoresPb(style) {
3865
+ const g = style.cor;
3866
+ return mergeCores({
3867
+ papel: toGrey(g.papel),
3868
+ tinta: toGrey(g.tinta),
3869
+ tinta2: toGrey(g.tinta2),
3870
+ tinta3: toGrey(g.tinta3),
3871
+ linha: toGrey(g.linha),
3872
+ destaque: toGrey(g.destaque),
3873
+ destaque2: toGrey(g.destaque2),
3874
+ marcaTexto: toGrey(g.marcaTexto),
3875
+ contexto: toGrey(g.contexto),
3876
+ prova: Object.fromEntries(ESTADOS_PROVA.map((e) => [e, toGrey(g.prova[e])])),
3877
+ ...g.ornamento ? { ornamento: g.ornamento.map(toGrey) } : {}
3878
+ }, style.pb);
3879
+ }
3880
+ /**
3881
+ * The style as it will print: overrides applied, then (for `pb`) the grey
3882
+ * conversion. Takes a preset or a style id; a deprecated id resolves to its
3883
+ * current style (`resolvePrintStyle('economist').name === 'semanario'`).
3884
+ */
3885
+ function resolvePrintStyle(style, options = {}) {
3886
+ const merged = mergePrintStyle(typeof style === "string" ? printPresetById(style) : style, options.overrides);
3887
+ if (!options.pb) return merged;
3888
+ return {
3889
+ ...merged,
3890
+ cor: printStyleCoresPb(merged)
3891
+ };
3892
+ }
3893
+ const kebab = {
3894
+ papel: "papel",
3895
+ tinta: "tinta",
3896
+ tinta2: "tinta-2",
3897
+ tinta3: "tinta-3",
3898
+ linha: "linha",
3899
+ destaque: "destaque",
3900
+ destaque2: "destaque-2",
3901
+ marcaTexto: "marca-texto",
3902
+ contexto: "contexto"
3903
+ };
3904
+ const num = (n) => String(Math.round(n * 1e3) / 1e3);
3905
+ /** Custom properties of a resolved style, in a stable order. */
3906
+ function printStyleVariables(style) {
3907
+ const vars = [];
3908
+ for (const k of [
3909
+ "titulo",
3910
+ "corpo",
3911
+ "numero",
3912
+ "rotulo",
3913
+ "anotacao",
3914
+ "mono"
3915
+ ]) vars.push([`--ty-print-fonte-${k}`, style.fontes[k]]);
3916
+ for (const [k, name] of Object.entries(kebab)) vars.push([`--ty-print-${name}`, style.cor[k]]);
3917
+ for (const e of ESTADOS_PROVA) vars.push([`--ty-print-prova-${e}`, style.cor.prova[e]]);
3918
+ vars.push(["--ty-print-textura-intensidade", num(style.papel.intensidade)]);
3919
+ vars.push(["--ty-print-traco", `${num(style.traco.largura)}mm`]);
3920
+ vars.push(["--ty-print-tremor", num(style.traco.tremor)]);
3921
+ vars.push(["--ty-print-raio", `${num(style.raio)}mm`]);
3922
+ const minusculas = style.estrutura.minusculas;
3923
+ vars.push(["--ty-print-titulo-caixa", style.caixaAlta ? "uppercase" : minusculas ? "lowercase" : "none"]);
3924
+ vars.push(["--ty-print-titulo-espaco", style.caixaAlta ? "0.04em" : "normal"]);
3925
+ const rc = style.estrutura.rotuloCaixa;
3926
+ vars.push(["--ty-print-rotulo-caixa", minusculas ? "lowercase" : rc === "alta" ? "uppercase" : "none"]);
3927
+ vars.push(["--ty-print-rotulo-variante", rc === "versalete" ? "small-caps" : "normal"]);
3928
+ vars.push(["--ty-print-rotulo-espaco", rc === "normal" ? "normal" : "0.07em"]);
3929
+ const orn = style.cor.ornamento ?? [];
3930
+ const reserva = [
3931
+ style.cor.destaque,
3932
+ style.cor.destaque2,
3933
+ style.cor.tinta,
3934
+ style.cor.marcaTexto
3935
+ ];
3936
+ for (let i = 0; i < 4; i++) vars.push([`--ty-print-ornamento-${i + 1}`, orn[i] ?? reserva[i]]);
3937
+ const cr = style.estrutura.corRotulo;
3938
+ if (cr) {
3939
+ const fundo = cr === "sustentada" || cr === "refutada" ? style.cor.prova[cr] : style.cor[cr];
3940
+ vars.push(["--ty-print-rotulo-fundo", fundo]);
3941
+ vars.push(["--ty-print-rotulo-tinta", luminance(parseColor(fundo)) > .4 ? style.cor.tinta : style.cor.papel]);
3942
+ }
3943
+ return vars;
3944
+ }
3945
+ /**
3946
+ * CSS custom properties (`--ty-print-*`) of a style on
3947
+ * `[data-ty-print-style="<name>"]`, with the editor's overrides and, when
3948
+ * `pb` is set, the black and white colours.
3949
+ */
3950
+ function printStyleToCss(style, options = {}) {
3951
+ const resolved = resolvePrintStyle(style, options);
3952
+ return `${options.seletor ?? `[data-ty-print-style="${style.name}"]`} {\n${printStyleVariables(resolved).map(([n, v]) => ` ${n}: ${v};`).join("\n")}\n}\n`;
3953
+ }
3954
+ /** Google Fonts css2 URL for a style's families (null when it uses system fonts only). */
3955
+ function googleFontsUrl(style) {
3956
+ if (!style.googleFonts.length) return null;
3957
+ return `https://fonts.googleapis.com/css2?${style.googleFonts.map((spec) => `family=${encodeURIComponent(spec).replace(/%20/g, "+").replace(/%3A/g, ":").replace(/%40/g, "@").replace(/%3B/g, ";").replace(/%2C/g, ",")}`).join("&")}&display=swap`;
3958
+ }
3959
+ /** True when the paper is dark (the brand seal and logo then use the light mono version). */
3960
+ function papelEscuro(style) {
3961
+ return luminance(parseColor(style.cor.papel)) < .2;
3962
+ }
3963
+ //#endregion
3964
+ //#region src/print-themes.ts
3965
+ function createTextureSvg(style) {
3966
+ const papel = style.papel;
3967
+ if (!papel || papel.textura === "nenhuma" || papel.intensidade <= 0) return void 0;
3968
+ const k = papel.intensidade;
3969
+ const n3 = (x) => Math.round(x * 1e3) / 1e3;
3970
+ const matriz = (cor, alfa, limiar) => {
3971
+ const c = parseColor(cor);
3972
+ return `0 0 0 0 ${n3(c.r)} 0 0 0 0 ${n3(c.g)} 0 0 0 0 ${n3(c.b)} 0 0 0 ${n3(alfa)} ${n3(limiar)}`;
3973
+ };
3974
+ const tinta = style.cor.tinta;
3975
+ let defs = "";
3976
+ let corpo = "";
3977
+ if (papel.textura === "grao") {
3978
+ defs = `
3979
+ <filter id="f" x="0" y="0" width="100%" height="100%">
3980
+ <feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="2" seed="21" stitchTiles="stitch" />
3981
+ <feColorMatrix values="${matriz(tinta, .9 * k, -.34)}" />
3982
+ </filter>
3983
+ `;
3984
+ corpo = `<rect width="100%" height="100%" filter="url(#f)" />`;
3985
+ } else if (papel.textura === "fibra") {
3986
+ defs = `
3987
+ <filter id="f" x="0" y="0" width="100%" height="100%">
3988
+ <feTurbulence type="fractalNoise" baseFrequency="0.035 0.09" numOctaves="3" seed="4" />
3989
+ <feColorMatrix values="${matriz(tinta, .55 * k, -.2)}" />
3990
+ </filter>
3991
+ <filter id="g" x="0" y="0" width="100%" height="100%">
3992
+ <feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="2" seed="11" stitchTiles="stitch" />
3993
+ <feColorMatrix values="${matriz(tinta, 1.1 * k, -.45)}" />
3994
+ </filter>
3995
+ `;
3996
+ corpo = `
3997
+ <rect width="100%" height="100%" filter="url(#f)" opacity="0.6" />
3998
+ <rect width="100%" height="100%" filter="url(#g)" />
3999
+ `;
4000
+ } else if (papel.textura === "pauta") {
4001
+ const linha = style.pb ? "#bdbdbd" : "#b7cbe0";
4002
+ defs = `
4003
+ <pattern id="p" width="10" height="${n3(7 * 3.7795)}" patternUnits="userSpaceOnUse" y="${n3(60.472)}">
4004
+ <line x1="0" x2="10" y1="${n3(7 * 3.7795 - .5)}" y2="${n3(7 * 3.7795 - .5)}" stroke="${linha}" stroke-width="0.9" />
4005
+ </pattern>
4006
+ `;
4007
+ corpo = `
4008
+ <g opacity="${Math.min(1, .4 + k)}">
4009
+ <rect width="100%" height="100%" fill="url(#p)" />
4010
+ </g>
4011
+ `;
4012
+ } else if (papel.textura === "milimetrado") {
4013
+ const mm = 3.7795;
4014
+ const cm = 37.795;
4015
+ const mmStr = n3(mm);
4016
+ const cmStr = n3(cm);
4017
+ const op1 = n3(.09 * k);
4018
+ const op2 = n3(.22 * k);
4019
+ const linha = style.cor.linha;
4020
+ defs = `
4021
+ <pattern id="mm" width="${mmStr}" height="${mmStr}" patternUnits="userSpaceOnUse">
4022
+ <path d="M ${mmStr} 0 L 0 0 0 ${mmStr}" fill="none" stroke="${linha}" stroke-opacity="${op1}" stroke-width="0.5" />
4023
+ </pattern>
4024
+ <pattern id="cm" width="${cmStr}" height="${cmStr}" patternUnits="userSpaceOnUse">
4025
+ <path d="M ${cmStr} 0 L 0 0 0 ${cmStr}" fill="none" stroke="${linha}" stroke-opacity="${op2}" stroke-width="0.8" />
4026
+ </pattern>
4027
+ `;
4028
+ corpo = `
4029
+ <rect width="100%" height="100%" fill="url(#mm)" />
4030
+ <rect width="100%" height="100%" fill="url(#cm)" />
4031
+ `;
4032
+ } else return;
4033
+ const cleanSvg = `<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><defs>${defs}</defs>${corpo}</svg>`.replace(/>\s+</g, "><").trim();
4034
+ return `url('data:image/svg+xml;utf8,${encodeURIComponent(cleanSvg)}')`;
4035
+ }
4036
+ /** Chroma under which a colour counts as grey (ink, paper, rules). */
4037
+ const CHROMATIC = .05;
4038
+ /** One millimetre of the print radius in CSS pixels (96 dpi). */
4039
+ const MM = 96 / 25.4;
4040
+ const oklch = (c) => rgbToOklch(parseColor(c));
4041
+ const chromatic = (c) => oklch(c).c >= CHROMATIC;
4042
+ const ratio = (a, b) => contrastRatio(parseColor(a), parseColor(b));
4043
+ const shiftL = (c, dl, chromaScale = 1, alpha = 1) => {
4044
+ const v = oklch(c);
4045
+ return toCss(oklchToRgb({
4046
+ l: Math.min(.998, Math.max(.02, v.l + dl)),
4047
+ c: v.c * chromaScale,
4048
+ h: v.h
4049
+ }, alpha));
4050
+ };
4051
+ const seedOf = (c, fallback) => {
4052
+ const v = oklch(c);
4053
+ if (fallback && v.c < CHROMATIC) return fallback;
4054
+ return {
4055
+ hue: Math.round(v.h * 10) / 10,
4056
+ chroma: Math.round(v.c * 1e3) / 1e3
4057
+ };
4058
+ };
4059
+ const hueGap = (a, b) => {
4060
+ const d = Math.abs(a - b) % 360;
4061
+ return d > 180 ? 360 - d : d;
4062
+ };
4063
+ /** Default semantic seeds, used where a style's proof colour is grey. */
4064
+ const TONE_FALLBACK = {
4065
+ danger: {
4066
+ hue: 18,
4067
+ chroma: .19
4068
+ },
4069
+ warning: {
4070
+ hue: 70,
4071
+ chroma: .14
4072
+ },
4073
+ success: {
4074
+ hue: 150,
4075
+ chroma: .14
4076
+ },
4077
+ info: {
4078
+ hue: 255,
4079
+ chroma: .06
4080
+ }
4081
+ };
4082
+ /**
4083
+ * Where the derivation reads a style differently from its tradition. Kept
4084
+ * short on purpose: every entry is a judgement the data cannot express.
4085
+ */
4086
+ const PRINT_THEME_OVERRIDES = {};
4087
+ /** The colour moved along OKLCH lightness (hue and chroma kept) until it reaches `min` against `over`. */
4088
+ function legibleOn(colour, over, min = 4.6) {
4089
+ const v = oklch(colour);
4090
+ const step = luminance(parseColor(over)) > .2 ? -.005 : .005;
4091
+ let out = colour;
4092
+ for (let i = 0; i < 200 && ratio(out, over) < min; i++) {
4093
+ v.l = Math.min(.995, Math.max(.02, v.l + step));
4094
+ out = toCss(oklchToRgb(v));
4095
+ }
4096
+ return out;
4097
+ }
4098
+ /**
4099
+ * The accent that represents a style, before any legibility adjustment: the
4100
+ * first chromatic accent that nearly reads on the paper (3:1), else the most
4101
+ * legible chromatic accent, else the first chromatic ornament, else the ink
4102
+ * (or, on dark paper, the paper itself).
4103
+ */
4104
+ function printStyleAccent(style) {
4105
+ const c = style.cor;
4106
+ const darkPaper = luminance(parseColor(c.papel)) < .2;
4107
+ const accents = [c.destaque, c.destaque2].filter(chromatic);
4108
+ const near = accents.find((x) => ratio(x, c.papel) >= 3);
4109
+ if (near) return near;
4110
+ if (accents.length) return [...accents].sort((a, b) => ratio(b, c.papel) - ratio(a, c.papel))[0];
4111
+ const ornament = (c.ornamento ?? []).find(chromatic);
4112
+ if (ornament) return ornament;
4113
+ return darkPaper ? c.papel : c.tinta;
4114
+ }
4115
+ function chartHues(style) {
4116
+ const c = style.cor;
4117
+ const sources = [
4118
+ c.destaque,
4119
+ c.destaque2,
4120
+ ...c.ornamento ?? [],
4121
+ c.prova.refutada,
4122
+ c.prova.sustentada,
4123
+ c.prova["nao-da-para-afirmar"],
4124
+ c.marcaTexto
4125
+ ];
4126
+ const hues = [];
4127
+ for (const s of sources) {
4128
+ const v = oklch(s);
4129
+ if (v.c < CHROMATIC) continue;
4130
+ if (hues.every((h) => hueGap(h, v.h) >= 30)) hues.push(Math.round(v.h));
4131
+ }
4132
+ for (const h of DEFAULT_CHART_HUES) {
4133
+ if (hues.length >= 8) break;
4134
+ if (hues.every((x) => hueGap(x, h) >= 30)) hues.push(h);
4135
+ }
4136
+ for (const h of DEFAULT_CHART_HUES) if (hues.length < 8 && !hues.includes(h)) hues.push(h);
4137
+ return hues.slice(0, 8);
4138
+ }
4139
+ /** Families of a print stack for a UI role; `mono` is kept only when the stack is really monospace. */
4140
+ function fontsOf(style) {
4141
+ const display = parseFontStack(style.fontes.titulo);
4142
+ const body = parseFontStack(style.fontes.corpo);
4143
+ const monoStack = parseFontStack(style.fontes.mono);
4144
+ const fonts = {
4145
+ display,
4146
+ body,
4147
+ serif: display,
4148
+ sans: body
4149
+ };
4150
+ if (monoStack.at(-1) === "monospace") {
4151
+ fonts.mono = monoStack;
4152
+ fonts.mono = monoStack;
4153
+ }
4154
+ const used = new Set([
4155
+ display[0],
4156
+ body[0],
4157
+ fonts.mono?.[0]
4158
+ ].filter(Boolean));
4159
+ return {
4160
+ fonts,
4161
+ url: googleFontsUrl({ googleFonts: style.googleFonts.filter((g) => used.has(g.split(":")[0])) }) ?? void 0
4162
+ };
4163
+ }
4164
+ /**
4165
+ * Exact colours of the style's own mode (paper as background, ink as text).
4166
+ * Surfaces step lighter than the paper, the sunken well a little darker.
4167
+ */
4168
+ function nativePins(style, brand, glass, darkPaper) {
4169
+ const c = style.cor;
4170
+ const paper = c.papel;
4171
+ const dl = 0;
4172
+ const surface = shiftL(paper, dl, 1);
4173
+ const raised = shiftL(paper, dl, 1);
4174
+ const pins = {
4175
+ bg: paper,
4176
+ "surface-solid": surface,
4177
+ "surface-raised-solid": raised,
4178
+ surface: glass ? shiftL(paper, dl, .7, .82) : surface,
4179
+ "surface-raised": glass ? shiftL(paper, 0, .6, .94) : raised,
4180
+ "surface-sunken": shiftL(paper, darkPaper ? -.04 : -.03, 1.1),
4181
+ secondary: raised,
4182
+ ink: c.tinta,
4183
+ "ink-2": c.tinta2,
4184
+ "ink-3": c.tinta3,
4185
+ "on-secondary": c.tinta,
4186
+ brand,
4187
+ "focus-ring": brand,
4188
+ "cta-solid": brand,
4189
+ "on-brand": ratio(paper, brand) >= ratio(c.tinta, brand) ? paper : c.tinta,
4190
+ "on-cta": ratio(paper, brand) >= ratio(c.tinta, brand) ? paper : c.tinta
4191
+ };
4192
+ const lineRgb = parseColor(c.linha);
4193
+ const lineAlpha = (a) => toCss({
4194
+ ...lineRgb,
4195
+ a
4196
+ });
4197
+ if (ratio(c.linha, paper) >= 3) {
4198
+ pins.line = lineAlpha(.3);
4199
+ pins["line-soft"] = lineAlpha(.16);
4200
+ pins["line-strong"] = lineAlpha(.55);
4201
+ } else {
4202
+ pins.line = c.linha;
4203
+ pins["line-soft"] = lineAlpha(.6);
4204
+ pins["line-strong"] = shiftL(c.linha, darkPaper ? .12 : -.12);
4205
+ }
4206
+ if (deltaE2000(parseColor(c.marcaTexto), parseColor(paper)) >= 6) {
4207
+ pins["brand-soft"] = c.marcaTexto;
4208
+ pins["nav-active"] = c.marcaTexto;
4209
+ }
4210
+ for (const [tone, colour] of [
4211
+ ["danger", c.prova.refutada],
4212
+ ["success", c.prova.sustentada],
4213
+ ["warning", c.prova["nao-da-para-afirmar"]]
4214
+ ]) if (chromatic(colour)) pins[tone] = colour;
4215
+ return pins;
4216
+ }
4217
+ /**
4218
+ * Exact colours of the other mode, over the generated background: the paper
4219
+ * colour becomes the ink, and the accent is tried as the brand as printed (a
4220
+ * grey accent, as in one-ink styles, is replaced by the paper colour).
4221
+ */
4222
+ function counterPins(style, accent) {
4223
+ const brand = chromatic(accent) ? accent : style.cor.papel;
4224
+ const pins = {
4225
+ ink: style.cor.papel,
4226
+ brand,
4227
+ "focus-ring": brand
4228
+ };
4229
+ if (!chromatic(accent)) pins["cta-solid"] = brand;
4230
+ return pins;
4231
+ }
4232
+ /** Resolves both modes and drops every pin that takes part in a failing pair, until all pairs pass. */
4233
+ function settlePins(config) {
4234
+ const pins = {
4235
+ light: { ...config.pins?.light },
4236
+ dark: { ...config.pins?.dark }
4237
+ };
4238
+ for (const mode of ["light", "dark"]) for (let round = 0; round < 12; round++) {
4239
+ const failing = resolveTheme({
4240
+ ...config,
4241
+ pins
4242
+ }, mode).report.filter((r) => !r.pass);
4243
+ if (!failing.length) break;
4244
+ let dropped = false;
4245
+ for (const r of failing) {
4246
+ const fg = r.fg;
4247
+ if (fg in pins[mode]) {
4248
+ delete pins[mode][fg];
4249
+ dropped = true;
4250
+ }
4251
+ }
4252
+ if (!dropped) {
4253
+ for (const r of failing) for (const layer of r.over) if (layer in pins[mode]) {
4254
+ delete pins[mode][layer];
4255
+ dropped = true;
4256
+ }
4257
+ }
4258
+ if (!dropped) break;
4259
+ }
4260
+ return {
4261
+ ...config,
4262
+ pins
4263
+ };
4264
+ }
4265
+ /**
4266
+ * The UI theme of a book style, in light and dark. The name is
4267
+ * `print-<style name>`; the label is the style's own.
4268
+ */
4269
+ function printStyleToTheme(style, override) {
4270
+ return settlePins(draftPrintTheme(style, override));
4271
+ }
4272
+ /**
4273
+ * Exact print colours the derivation had to give up for contrast, per mode
4274
+ * (role -> the print colour that was dropped and regenerated).
4275
+ */
4276
+ function printThemeDroppedPins(style, override) {
4277
+ const draft = draftPrintTheme(style, override);
4278
+ const settled = settlePins(draft);
4279
+ const out = {
4280
+ light: {},
4281
+ dark: {}
4282
+ };
4283
+ for (const mode of ["light", "dark"]) for (const [role, value] of Object.entries(draft.pins?.[mode] ?? {})) if (!(role in (settled.pins?.[mode] ?? {}))) out[mode][role] = value;
4284
+ return out;
4285
+ }
4286
+ function draftPrintTheme(style, override = PRINT_THEME_OVERRIDES[style.name] ?? {}) {
4287
+ const c = style.cor;
4288
+ const darkPaper = luminance(parseColor(c.papel)) < .2;
4289
+ const accent = override.brand ?? printStyleAccent(style);
4290
+ const brand = legibleOn(accent, c.papel);
4291
+ const e = style.estrutura;
4292
+ const paper = oklch(c.papel);
4293
+ const ink = oklch(c.tinta);
4294
+ const tinted = paper.c >= ink.c ? paper : ink;
4295
+ const neutral = {
4296
+ hue: Math.round(tinted.h * 10) / 10,
4297
+ chroma: Math.min(.02, Math.round(tinted.c * 1e3) / 1e3)
4298
+ };
4299
+ const brandSeed = seedOf(accent);
4300
+ const seeds = {
4301
+ brand: {
4302
+ hue: brandSeed.hue,
4303
+ chroma: Math.max(brandSeed.chroma, .01)
4304
+ },
4305
+ neutral,
4306
+ danger: seedOf(c.prova.refutada, TONE_FALLBACK.danger),
4307
+ warning: seedOf(c.prova["nao-da-para-afirmar"], TONE_FALLBACK.warning),
4308
+ success: seedOf(c.prova.sustentada, TONE_FALLBACK.success),
4309
+ info: TONE_FALLBACK.info
4310
+ };
4311
+ const soft = style.grafico === "aquarela" || e.painel === "nenhum" && style.raio > 1;
4312
+ const glass = override.glass ?? soft;
4313
+ const offset = e.tituloEstilo === "sombra" || e.contornoBarra === true || e.painel === "dossie";
4314
+ const elevation = override.elevation ?? (offset ? "offset" : soft || e.painel === "cartao" ? "soft" : "flat");
4315
+ const { fonts, url } = fontsOf(style);
4316
+ const native = nativePins(style, brand, glass, darkPaper);
4317
+ const counter = counterPins(style, accent);
4318
+ const bgTexture = createTextureSvg(style);
4319
+ const nativeMode = darkPaper ? "dark" : "light";
4320
+ const counterMode = darkPaper ? "light" : "dark";
4321
+ return {
4322
+ name: `${PRINT_THEME_PREFIX}${style.name}`,
4323
+ label: style.label,
4324
+ seeds,
4325
+ chartHues: chartHues(style),
4326
+ radius: override.radius ?? Math.min(16, Math.round(style.raio * MM)),
4327
+ contrast: "default",
4328
+ glass,
4329
+ cta: override.cta ?? (soft ? "gradient" : "solid"),
4330
+ elevation,
4331
+ fonts,
4332
+ ...url ? { fontsUrl: url } : {},
4333
+ ...bgTexture ? { strings: { "bg-image": bgTexture } } : {},
4334
+ pins: {
4335
+ [nativeMode]: {
4336
+ ...native,
4337
+ ...override.pins?.[nativeMode]
4338
+ },
4339
+ [counterMode]: {
4340
+ ...counter,
4341
+ ...override.pins?.[counterMode]
4342
+ }
4343
+ }
4344
+ };
4345
+ }
4346
+ /** Every book style as a UI theme, in the order of `printPresets`. */
4347
+ const printThemePresets = Object.values(printPresets).map((s) => printStyleToTheme(s));
4348
+ /** Stylesheet URL of the families of each print theme, by theme name (for ThemeProvider's `fonts`). */
4349
+ const printThemeFontUrls = Object.fromEntries(printThemePresets.filter((t) => t.fontsUrl).map((t) => [t.name, t.fontsUrl]));
4350
+ //#endregion
4351
+ //#region src/scripts.ts
4352
+ const SCRIPT_RULES = [
4353
+ {
4354
+ langs: [
4355
+ "ar",
4356
+ "fa",
4357
+ "ur",
4358
+ "ps",
4359
+ "ckb",
4360
+ "sd",
4361
+ "ug"
4362
+ ],
4363
+ sans: ["Noto Sans Arabic", "Noto Naskh Arabic"],
4364
+ serif: ["Noto Naskh Arabic"],
4365
+ leading: 1.2,
4366
+ noTracking: true
4367
+ },
4368
+ {
4369
+ langs: ["he", "yi"],
4370
+ sans: ["Noto Sans Hebrew"],
4371
+ serif: ["Noto Serif Hebrew"],
4372
+ leading: 1.1,
4373
+ noTracking: true
4374
+ },
4375
+ {
4376
+ langs: [
4377
+ "hi",
4378
+ "mr",
4379
+ "ne",
4380
+ "sa",
4381
+ "kok",
4382
+ "mai"
4383
+ ],
4384
+ sans: ["Noto Sans Devanagari"],
4385
+ serif: ["Noto Serif Devanagari"],
4386
+ leading: 1.25,
4387
+ noTracking: true
4388
+ },
4389
+ {
4390
+ langs: ["bn", "as"],
4391
+ sans: ["Noto Sans Bengali"],
4392
+ serif: ["Noto Serif Bengali"],
4393
+ leading: 1.25,
4394
+ noTracking: true
4395
+ },
4396
+ {
4397
+ langs: ["ta"],
4398
+ sans: ["Noto Sans Tamil"],
4399
+ serif: ["Noto Serif Tamil"],
4400
+ leading: 1.25,
4401
+ noTracking: true
4402
+ },
4403
+ {
4404
+ langs: ["te"],
4405
+ sans: ["Noto Sans Telugu"],
4406
+ leading: 1.25,
4407
+ noTracking: true
4408
+ },
4409
+ {
4410
+ langs: ["kn"],
4411
+ sans: ["Noto Sans Kannada"],
4412
+ leading: 1.25,
4413
+ noTracking: true
4414
+ },
4415
+ {
4416
+ langs: ["ml"],
4417
+ sans: ["Noto Sans Malayalam"],
4418
+ leading: 1.25,
4419
+ noTracking: true
4420
+ },
4421
+ {
4422
+ langs: ["gu"],
4423
+ sans: ["Noto Sans Gujarati"],
4424
+ leading: 1.25,
4425
+ noTracking: true
4426
+ },
4427
+ {
4428
+ langs: ["pa"],
4429
+ sans: ["Noto Sans Gurmukhi"],
4430
+ leading: 1.25,
4431
+ noTracking: true
4432
+ },
4433
+ {
4434
+ langs: ["si"],
4435
+ sans: ["Noto Sans Sinhala"],
4436
+ leading: 1.25,
4437
+ noTracking: true
4438
+ },
4439
+ {
4440
+ langs: ["th"],
4441
+ sans: ["Noto Sans Thai"],
4442
+ serif: ["Noto Serif Thai"],
4443
+ leading: 1.25,
4444
+ noTracking: true,
4445
+ text: ["word-break: normal;", "line-break: auto;"]
4446
+ },
4447
+ {
4448
+ langs: ["lo"],
4449
+ sans: ["Noto Sans Lao"],
4450
+ leading: 1.25,
4451
+ noTracking: true
4452
+ },
4453
+ {
4454
+ langs: ["km"],
4455
+ sans: ["Noto Sans Khmer"],
4456
+ leading: 1.25,
4457
+ noTracking: true
4458
+ },
4459
+ {
4460
+ langs: ["my"],
4461
+ sans: ["Noto Sans Myanmar"],
4462
+ leading: 1.35,
4463
+ noTracking: true
4464
+ },
4465
+ {
4466
+ langs: [
4467
+ "am",
4468
+ "ti",
4469
+ "gez"
4470
+ ],
4471
+ sans: ["Noto Sans Ethiopic"],
4472
+ serif: ["Noto Serif Ethiopic"],
4473
+ leading: 1.15,
4474
+ noTracking: true
4475
+ },
4476
+ {
4477
+ langs: ["hy"],
4478
+ sans: ["Noto Sans Armenian"]
4479
+ },
4480
+ {
4481
+ langs: ["ka"],
4482
+ sans: ["Noto Sans Georgian"]
4483
+ },
4484
+ {
4485
+ langs: ["ja"],
4486
+ sans: ["Noto Sans JP"],
4487
+ serif: ["Noto Serif JP"],
4488
+ leading: 1.15,
4489
+ noTracking: true,
4490
+ text: [
4491
+ "line-break: strict;",
4492
+ "word-break: normal;",
4493
+ "overflow-wrap: anywhere;"
4494
+ ]
4495
+ },
4496
+ {
4497
+ langs: [
4498
+ "zh",
4499
+ "zh-Hans",
4500
+ "zh-CN",
4501
+ "zh-SG"
4502
+ ],
4503
+ sans: ["Noto Sans SC"],
4504
+ serif: ["Noto Serif SC"],
4505
+ leading: 1.15,
4506
+ noTracking: true,
4507
+ text: [
4508
+ "line-break: strict;",
4509
+ "word-break: normal;",
4510
+ "overflow-wrap: anywhere;"
4511
+ ]
4512
+ },
4513
+ {
4514
+ langs: [
4515
+ "zh-Hant",
4516
+ "zh-TW",
4517
+ "zh-HK",
4518
+ "zh-MO"
4519
+ ],
4520
+ sans: ["Noto Sans TC"],
4521
+ serif: ["Noto Serif TC"],
4522
+ leading: 1.15,
4523
+ noTracking: true,
4524
+ text: [
4525
+ "line-break: strict;",
4526
+ "word-break: normal;",
4527
+ "overflow-wrap: anywhere;"
4528
+ ]
4529
+ },
4530
+ {
4531
+ langs: ["ko"],
4532
+ sans: ["Noto Sans KR"],
4533
+ serif: ["Noto Serif KR"],
4534
+ leading: 1.15,
4535
+ noTracking: true,
4536
+ text: ["word-break: keep-all;", "overflow-wrap: anywhere;"]
4537
+ }
4538
+ ];
4539
+ const quote = (family) => /^[\w-]+$/.test(family) && !/\s/.test(family) ? family : `"${family}"`;
4540
+ function scaledPx(value, factor) {
4541
+ const m = /^(\d+(?:\.\d+)?)px$/.exec(value.trim());
4542
+ if (!m) return value;
4543
+ return `${Math.ceil(Number(m[1]) * factor / 2) * 2}px`;
4544
+ }
4545
+ /** The `:lang()` blocks, derived from the base token values. */
4546
+ function scriptRules(base) {
4547
+ const value = (name) => base.find(([n]) => n === name)?.[1] ?? "";
4548
+ const sansBase = value("--ty-font-sans");
4549
+ const serifBase = value("--ty-font-serif");
4550
+ const leadings = base.filter(([n]) => n.startsWith("--ty-font-line-height-"));
4551
+ const trackings = base.filter(([n]) => n.startsWith("--ty-font-tracking-"));
4552
+ return SCRIPT_RULES.map((r) => {
4553
+ const decls = [`--ty-font-sans: ${r.sans.map(quote).join(", ")}, ${sansBase};`];
4554
+ if (r.serif) decls.push(`--ty-font-serif: ${r.serif.map(quote).join(", ")}, ${serifBase};`);
4555
+ if (r.leading) for (const [n, v] of leadings) decls.push(`${n}: ${scaledPx(v, r.leading)};`);
4556
+ if (r.noTracking) for (const [n] of trackings) decls.push(`${n}: 0em;`);
4557
+ decls.push(...r.text ?? []);
4558
+ return `${r.langs.map((l) => `:lang(${l})`).join(",\n")} {\n${decls.map((d) => ` ${d}`).join("\n")}\n}`;
4559
+ }).join("\n\n");
4560
+ }
4561
+ //#endregion
4562
+ //#region src/stylesheet.ts
4563
+ const indent = (s, n = 2) => s.split("\n").map((l) => l ? " ".repeat(n) + l : l).join("\n");
4564
+ const decls = (vars, extra = []) => [...extra, ...vars.map(([n, v]) => `${n}: ${v};`)].join("\n");
4565
+ const rule = (selectors, body) => `${selectors.join(",\n")} {\n${indent(body)}\n}`;
4566
+ const media = (query, body) => `@media ${query} {\n${indent(body)}\n}`;
4567
+ /**
4568
+ * Selectors for one theme. The attributes may sit on the same element or on
4569
+ * an ancestor: `data-ty-theme` picks the theme, `data-ty-mode` forces light or
4570
+ * dark (absent or `system` follows `prefers-color-scheme`).
4571
+ */
4572
+ function themeSelectors(name, isDefault) {
4573
+ const t = `[data-ty-theme="${name}"]`;
4574
+ return {
4575
+ light: isDefault ? [
4576
+ ":root",
4577
+ t,
4578
+ "[data-ty-mode=\"light\"]"
4579
+ ] : [t, `${t} [data-ty-mode="light"]`],
4580
+ systemDark: isDefault ? [":root:not([data-ty-mode=\"light\"])", `${t}:not([data-ty-mode="light"])`] : [`${t}:not([data-ty-mode="light"])`],
4581
+ dark: isDefault ? [
4582
+ "[data-ty-mode=\"dark\"]",
4583
+ `${t}[data-ty-mode="dark"]`,
4584
+ `${t} [data-ty-mode="dark"]`,
4585
+ `[data-ty-mode="dark"] ${t}`
4586
+ ] : [
4587
+ `${t}[data-ty-mode="dark"]`,
4588
+ `${t} [data-ty-mode="dark"]`,
4589
+ `[data-ty-mode="dark"] ${t}`
4590
+ ],
4591
+ explicitLight: [`${t}[data-ty-mode="light"]`, `[data-ty-mode="dark"] ${t}[data-ty-mode="light"]`]
4592
+ };
4593
+ }
4594
+ function themeBlocks(theme, isDefault, light, dark) {
4595
+ const s = themeSelectors(theme.name, isDefault);
4596
+ return [
4597
+ rule(s.light, decls(light, ["color-scheme: light;"])),
4598
+ media("(prefers-color-scheme: dark)", rule(s.systemDark, decls(dark, ["color-scheme: dark;"]))),
4599
+ rule(s.dark, decls(dark, ["color-scheme: dark;"])),
4600
+ rule(s.explicitLight, decls(light, ["color-scheme: light;"]))
4601
+ ];
4602
+ }
4603
+ const ANY_SCOPE = [
4604
+ ":root",
4605
+ "[data-ty-theme]",
4606
+ "[data-ty-mode]"
4607
+ ];
4608
+ /** Forced colours: roles map to system colours so boundaries and state stay visible. */
4609
+ const FORCED_COLORS_VARS = [
4610
+ ["--ty-bg", "Canvas"],
4611
+ ["--ty-surface", "Canvas"],
4612
+ ["--ty-surface-raised", "Canvas"],
4613
+ ["--ty-surface-sunken", "Canvas"],
4614
+ ["--ty-surface-solid", "Canvas"],
4615
+ ["--ty-surface-raised-solid", "Canvas"],
4616
+ ["--ty-secondary", "ButtonFace"],
4617
+ ["--ty-on-secondary", "ButtonText"],
4618
+ ["--ty-ink", "CanvasText"],
4619
+ ["--ty-ink-2", "CanvasText"],
4620
+ ["--ty-ink-3", "CanvasText"],
4621
+ ["--ty-line", "CanvasText"],
4622
+ ["--ty-line-soft", "CanvasText"],
4623
+ ["--ty-line-strong", "CanvasText"],
4624
+ ["--ty-input", "CanvasText"],
4625
+ ["--ty-focus-ring", "Highlight"],
4626
+ ["--ty-brand", "Highlight"],
4627
+ ["--ty-accent", "Highlight"],
4628
+ ["--ty-on-brand", "HighlightText"],
4629
+ ["--ty-accent-ink", "HighlightText"],
4630
+ ["--ty-brand-soft", "Canvas"],
4631
+ ["--ty-accent-soft", "Canvas"],
4632
+ ["--ty-on-brand-soft", "LinkText"],
4633
+ ["--ty-on-accent-soft", "LinkText"],
4634
+ ["--ty-cta", "ButtonFace"],
4635
+ ["--ty-cta-solid", "ButtonFace"],
4636
+ ["--ty-on-cta", "ButtonText"],
4637
+ ["--ty-backdrop", "transparent"],
4638
+ ["--ty-shadow-sheet", "none"],
4639
+ ["--ty-shadow-raised", "none"],
4640
+ ["--ty-shadow-floating", "none"],
4641
+ ["--ty-shadow-modal", "none"],
4642
+ ["--ty-glass-blur-sheet", "0px"],
4643
+ ["--ty-glass-blur-floating", "0px"]
4644
+ ];
4645
+ /** Reduced transparency (and no backdrop-filter support): opaque surfaces, no blur, no ambient. */
4646
+ const OPAQUE_VARS = [
4647
+ ["--ty-surface", "var(--ty-surface-solid) !important"],
4648
+ ["--ty-surface-raised", "var(--ty-surface-raised-solid) !important"],
4649
+ ["--ty-secondary", "var(--ty-surface-raised-solid) !important"],
4650
+ ["--ty-glass-blur-sheet", "0px !important"],
4651
+ ["--ty-glass-blur-floating", "0px !important"],
4652
+ ["--ty-glass-saturate", "1 !important"],
4653
+ ["--ty-ambient-1", "transparent !important"],
4654
+ ["--ty-ambient-2", "transparent !important"]
4655
+ ];
4656
+ function buildStylesheet(input) {
4657
+ const parts = [];
4658
+ const defaultTheme = input.defaultTheme === void 0 ? DEFAULT_THEME : input.defaultTheme;
4659
+ if (input.base?.length) {
4660
+ parts.push(rule([":root"], decls(input.base)));
4661
+ parts.push(`/* per-script typography (:lang) */\n${scriptRules(input.base)}`);
4662
+ parts.push(`:root,\n[dir="ltr"] {\n --ty-inline-sign: 1;\n}\n\n[dir="rtl"] {\n --ty-inline-sign: -1;\n}`);
4663
+ }
4664
+ const densities = input.densities ?? {};
4665
+ if (densities.default) parts.push(rule([":root", "[data-ty-density=\"default\"]"], decls(densities.default)));
4666
+ for (const d of ["compact", "comfortable"]) {
4667
+ const v = densities[d];
4668
+ if (v) parts.push(rule([`[data-ty-density="${d}"]`], decls(v)));
4669
+ }
4670
+ if (input.components?.length) parts.push(`/* component tokens */\n${rule(ANY_SCOPE, decls(input.components))}`);
4671
+ if (input.componentRules) parts.push(input.componentRules);
4672
+ for (const theme of input.themes) {
4673
+ parts.push(`/* theme: ${theme.name} */`);
4674
+ parts.push(...themeBlocks(theme, theme.name === defaultTheme, theme.light, theme.dark));
4675
+ }
4676
+ const high = input.themes.filter((t) => t.highLight && t.highDark);
4677
+ if (high.length) {
4678
+ const inner = high.flatMap((t) => themeBlocks(t, t.name === defaultTheme, t.highLight, t.highDark));
4679
+ parts.push(`/* prefers-contrast: more -> the high-contrast variant of each theme */\n${media("(prefers-contrast: more)", inner.join("\n\n"))}`);
4680
+ }
4681
+ if (input.preferences !== false) {
4682
+ const durations = (input.base ?? []).filter(([n]) => n.startsWith("--ty-dur-")).map(([n]) => [n, "0ms"]);
4683
+ if (durations.length) parts.push(media("(prefers-reduced-motion: reduce)", rule(ANY_SCOPE, decls(durations))));
4684
+ parts.push(media("(prefers-reduced-transparency: reduce)", rule(ANY_SCOPE, decls(OPAQUE_VARS))));
4685
+ parts.push(`@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {\n${indent(rule(ANY_SCOPE, decls(OPAQUE_VARS)))}\n}`);
4686
+ parts.push(media("(forced-colors: active)", rule(ANY_SCOPE, decls(FORCED_COLORS_VARS))));
4687
+ }
4688
+ const body = parts.join("\n\n");
4689
+ const layered = input.layer === null ? body : `@layer ${input.layer ?? "tympan.tokens"} {\n${indent(body)}\n}`;
4690
+ return `${input.banner ? `${input.banner}\n` : ""}${layered}\n`;
4691
+ }
4692
+ /** Generator output for one theme config, as variable lists. */
4693
+ function themeVarsFor(config) {
4694
+ const vars = {
4695
+ name: config.name,
4696
+ light: themeVariables(resolveTheme(config, "light")),
4697
+ dark: themeVariables(resolveTheme(config, "dark"))
4698
+ };
4699
+ if (config.contrast !== "high") {
4700
+ vars.highLight = themeVariables(resolveTheme(config, "light", "high"));
4701
+ vars.highDark = themeVariables(resolveTheme(config, "dark", "high"));
4702
+ }
4703
+ return vars;
4704
+ }
4705
+ /** CSS for one theme config, straight from the generator (used by the customizer). */
4706
+ function generateThemeCss(config, options = {}) {
4707
+ return buildStylesheet({
4708
+ themes: [themeVarsFor(config)],
4709
+ defaultTheme: options.asDefault ? config.name : null,
4710
+ densities: options.densities ? {
4711
+ default: densityVariables("default"),
4712
+ compact: densityVariables("compact"),
4713
+ comfortable: densityVariables("comfortable")
4714
+ } : void 0,
4715
+ layer: options.layer === void 0 ? "tympan.tokens" : options.layer
4716
+ });
4717
+ }
4718
+ /** Variable lists of every built-in preset. */
4719
+ function presetThemeVars(list = presets) {
4720
+ return list.map(themeVarsFor);
4721
+ }
4722
+ /**
4723
+ * The opt-in stylesheet of the print themes (`print-themes.css`): every
4724
+ * listed theme scoped to its `data-ty-theme` attribute, with its high-contrast
4725
+ * variant, and no user-preference blocks (the main token sheet has them).
4726
+ * Load it after `tokens.css`.
4727
+ */
4728
+ function generatePrintThemesCss(list = printThemePresets, options = {}) {
4729
+ return buildStylesheet({
4730
+ themes: options.themes ?? list.map(themeVarsFor),
4731
+ defaultTheme: null,
4732
+ layer: options.layer === void 0 ? "tympan.tokens" : options.layer,
4733
+ preferences: false,
4734
+ banner: options.banner
4735
+ });
4736
+ }
4737
+ //#endregion
4738
+ //#region src/flow.ts
4739
+ const FLOW_TONES = [
4740
+ "categorical-1",
4741
+ "categorical-2",
4742
+ "categorical-3",
4743
+ "categorical-4",
4744
+ "categorical-5",
4745
+ "categorical-6",
4746
+ "categorical-7",
4747
+ "categorical-8",
4748
+ "neutral"
4749
+ ];
4750
+ /** Tint strength of a tone's soft variant (badge background). */
4751
+ const SOFT_MIX = 14;
4752
+ const color = (ref, mix) => mix === void 0 ? {
4753
+ type: "color",
4754
+ ref
4755
+ } : {
4756
+ type: "color",
4757
+ ref,
4758
+ mix
4759
+ };
4760
+ const px = (value) => ({
4761
+ type: "dimension",
4762
+ px: value
4763
+ });
4764
+ function toneTokens() {
4765
+ const out = [];
4766
+ const cats = FLOW_TONES.filter((t) => t !== "neutral");
4767
+ for (const t of cats) out.push([`tone-${t}`, color(t)]);
4768
+ out.push(["tone-neutral", color("ink-3")]);
4769
+ for (const t of cats) out.push([`tone-${t}-ink`, color("on-accent")]);
4770
+ out.push(["tone-neutral-ink", color("surface-solid")]);
4771
+ for (const t of cats) out.push([`tone-${t}-soft`, color(t, SOFT_MIX)]);
4772
+ out.push(["tone-neutral-soft", color("surface-sunken")]);
4773
+ for (const t of cats) out.push([`tone-${t}-text`, color(t)]);
4774
+ out.push(["tone-neutral-text", color("ink-2")]);
4775
+ return out;
4776
+ }
4777
+ /** Every canvas token, in stylesheet order (name without the `--ty-flow-` prefix). */
4778
+ const FLOW_TOKENS = [
4779
+ ...toneTokens(),
4780
+ ["connector", color("input")],
4781
+ ["connector-active", color("accent")],
4782
+ ["connector-true", color("success")],
4783
+ ["connector-false", color("danger")],
4784
+ ["connector-rule", color("categorical-2")],
4785
+ ["connector-width", px(1.5)],
4786
+ ["connector-width-active", px(2.5)],
4787
+ ["node-border", color("line-strong")],
4788
+ ["node-border-hover", color("input")],
4789
+ ["ring-selected", color("accent")],
4790
+ ["ring-running", color("warning")],
4791
+ ["ring-succeeded", color("success")],
4792
+ ["ring-failed", color("danger")],
4793
+ ["node-surface", color("surface-raised-solid")],
4794
+ ["node-radius", {
4795
+ type: "dimension",
4796
+ ref: "radius-card"
4797
+ }],
4798
+ ["plane", color("surface-sunken")],
4799
+ ["grid-dot", color("line-strong")],
4800
+ ["guide", color("accent")],
4801
+ ["marquee", color("accent-soft")],
4802
+ ["band", px(96)],
4803
+ ["band-label", px(130)],
4804
+ ["node-h", px(72)],
4805
+ ["node-w", px(236)],
4806
+ ["step-w", px(250)],
4807
+ ["step-h", px(86)],
4808
+ ["col-gap", px(56)],
4809
+ ["shape-records", color("accent")],
4810
+ ["shape-table", color("categorical-1")],
4811
+ ["shape-number", color("warning")],
4812
+ ["shape-chart", color("categorical-8")],
4813
+ ["shape-decision", color("danger")]
4814
+ ];
4815
+ const flowCssName = (name) => `--ty-flow-${name}`;
4816
+ /** CSS value of one canvas token. */
4817
+ function flowTokenCss(token) {
4818
+ if ("px" in token) return `${token.px}px`;
4819
+ const ref = `var(--ty-${token.ref})`;
4820
+ return token.type === "color" && token.mix !== void 0 ? `color-mix(in oklab, ${ref} ${token.mix}%, transparent)` : ref;
4821
+ }
4822
+ /** Ordered `[--ty-flow-name, value]` pairs (the generator's direct serialisation). */
4823
+ function flowVariables() {
4824
+ return FLOW_TOKENS.map(([name, token]) => [flowCssName(name), flowTokenCss(token)]);
4825
+ }
4826
+ /** DTCG tree of the canvas tokens; colour and radius values alias the theme tree. */
4827
+ function flowToDtcg() {
4828
+ const flow = {};
4829
+ for (const [name, token] of FLOW_TOKENS) {
4830
+ const app = { cssName: flowCssName(name) };
4831
+ let $value;
4832
+ if ("px" in token) $value = {
4833
+ value: token.px,
4834
+ unit: "px"
4835
+ };
4836
+ else if (token.type === "color") {
4837
+ $value = `{color.${token.ref}}`;
4838
+ if (token.mix !== void 0) app.mix = {
4839
+ space: "oklab",
4840
+ amount: token.mix / 100,
4841
+ with: "transparent"
4842
+ };
4843
+ } else $value = `{dimension.${token.ref}}`;
4844
+ flow[name] = {
4845
+ $type: token.type,
4846
+ $value,
4847
+ $extensions: { "br.com.datatechsolutions.tympan": app }
4848
+ };
4849
+ }
4850
+ return {
4851
+ $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.",
4852
+ flow
4853
+ };
4854
+ }
4855
+ /**
4856
+ * The `[data-tone]` mapping: a tone name on any element selects its four parts
4857
+ * as `--ty-flow-tone`, `-ink`, `-soft` and `-text`.
4858
+ */
4859
+ function flowToneRules() {
4860
+ return FLOW_TONES.map((t) => `[data-tone="${t}"] {\n` + [
4861
+ "",
4862
+ "-ink",
4863
+ "-soft",
4864
+ "-text"
4865
+ ].map((part) => ` --ty-flow-tone${part}: var(--ty-flow-tone-${t}${part});`).join("\n") + "\n}").join("\n\n");
4866
+ }
4867
+ //#endregion
4868
+ //#region src/index.ts
4869
+ const allThemes = [...presets, ...printThemePresets];
4870
+ //#endregion
4871
+ export { DEFAULT_CHART_HUES, DEFAULT_PRINT_STYLE, DEFAULT_THEME, DENSITIES, ESTADOS_PROVA, FLOW_TOKENS, FLOW_TONES, FONT_ROLE_TOKENS, FORCED_COLORS_VARS, OPAQUE_VARS, PRINT_PRESET_NAMES, PRINT_STYLE_ALIASES, PRINT_THEME_ALIASES, PRINT_THEME_OVERRIDES, PRINT_THEME_PREFIX, RAMP_STEPS, ROLE_ALIASES, ROLE_NAMES, ROTULOS_PROVA, allThemes, apcaContrast, astrlabePreset, buildStylesheet, composite, contrastPairs, contrastRatio, deltaE2000, densityToDtcg, densityVariables, fakhirPreset, flatten, flowCssName, flowToDtcg, flowTokenCss, flowToneRules, flowVariables, fontStackToCss, fromDtcgColor, generatePrintThemesCss, generateRamp, generateThemeCss, googleFontsUrl, gradientToCss, highContrastPreset, legibleOn, luminance, mergePrintStyle, neutralPreset, oklchToRgb, papelEscuro, parseColor, parseFontStack, presetThemeVars, presets, printPresetById, printPresets, printStyleAccent, printStyleCoresPb, printStyleToCss, printStyleToTheme, printStyleVariables, printThemeDroppedPins, printThemeFontUrls, printThemePresets, resolvePrintStyle, resolvePrintStyleName, resolvePrintThemeName, resolveTheme, rgbToLab, rgbToOklab, rgbToOklch, seedFromColor, shadowToCss, themeSelectors, themeToDtcg, themeVariables, themeVarsFor, toCss, toDtcgColor, toGrey, toHex, tympanPreset, warnDeprecatedPrintId };
4872
+
4873
+ //# sourceMappingURL=index.js.map