@fusedashlabs/widgets 0.3.1 → 0.4.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 (342) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +1 -1
  3. package/dist/components/chart-renderer/element/ui9000-chart-renderer.d.ts +1 -0
  4. package/dist/components/chart-renderer/element/ui9000-chart-renderer.d.ts.map +1 -1
  5. package/dist/components/chart-renderer/element/ui9000-chart-renderer.js +12 -1
  6. package/dist/components/chart-renderer/element/ui9000-chart-renderer.js.map +1 -1
  7. package/dist/components/chart-renderer/lib/registry.d.ts.map +1 -1
  8. package/dist/components/chart-renderer/lib/registry.js +17 -4
  9. package/dist/components/chart-renderer/lib/registry.js.map +1 -1
  10. package/dist/components/chart-renderer/lib/types.d.ts +5 -0
  11. package/dist/components/chart-renderer/lib/types.d.ts.map +1 -1
  12. package/dist/components/donut-chart/element/ui9000-donut-chart.js +1 -1
  13. package/dist/components/donut-chart/element/ui9000-donut-chart.js.map +1 -1
  14. package/dist/components/lollipop/element/styles.d.ts.map +1 -1
  15. package/dist/components/lollipop/element/styles.js +19 -1
  16. package/dist/components/lollipop/element/styles.js.map +1 -1
  17. package/dist/components/lollipop/element/ui9000-lollipop.d.ts +6 -1
  18. package/dist/components/lollipop/element/ui9000-lollipop.d.ts.map +1 -1
  19. package/dist/components/lollipop/element/ui9000-lollipop.js +68 -7
  20. package/dist/components/lollipop/element/ui9000-lollipop.js.map +1 -1
  21. package/dist/components/lollipop/index.d.ts +1 -1
  22. package/dist/components/lollipop/index.d.ts.map +1 -1
  23. package/dist/components/lollipop/index.js +2 -0
  24. package/dist/components/lollipop/index.js.map +1 -1
  25. package/dist/components/lollipop/lib/domain.d.ts +16 -1
  26. package/dist/components/lollipop/lib/domain.d.ts.map +1 -1
  27. package/dist/components/lollipop/lib/domain.js +56 -1
  28. package/dist/components/lollipop/lib/domain.js.map +1 -1
  29. package/dist/components/lollipop/lib/index.d.ts +3 -2
  30. package/dist/components/lollipop/lib/index.d.ts.map +1 -1
  31. package/dist/components/lollipop/lib/layout.d.ts +16 -0
  32. package/dist/components/lollipop/lib/layout.d.ts.map +1 -0
  33. package/dist/components/lollipop/lib/layout.js +16 -0
  34. package/dist/components/lollipop/lib/layout.js.map +1 -0
  35. package/dist/components/lollipop/lib/types.d.ts +5 -0
  36. package/dist/components/lollipop/lib/types.d.ts.map +1 -1
  37. package/dist/components/lollipop/metadata.json.d.ts +10 -0
  38. package/dist/components/lollipop/metadata.json.js +4 -1
  39. package/dist/components/lollipop/metadata.json.js.map +1 -1
  40. package/dist/components/lollipop/render/draw.d.ts +8 -1
  41. package/dist/components/lollipop/render/draw.d.ts.map +1 -1
  42. package/dist/components/lollipop/render/draw.js +155 -84
  43. package/dist/components/lollipop/render/draw.js.map +1 -1
  44. package/dist/components/map-chart/element/styles.d.ts +2 -0
  45. package/dist/components/map-chart/element/styles.d.ts.map +1 -0
  46. package/dist/components/map-chart/element/styles.js +372 -0
  47. package/dist/components/map-chart/element/styles.js.map +1 -0
  48. package/dist/components/map-chart/element/ui9000-map-chart.d.ts +54 -0
  49. package/dist/components/map-chart/element/ui9000-map-chart.d.ts.map +1 -0
  50. package/dist/components/map-chart/element/ui9000-map-chart.js +539 -0
  51. package/dist/components/map-chart/element/ui9000-map-chart.js.map +1 -0
  52. package/dist/components/map-chart/index.d.ts +5 -0
  53. package/dist/components/map-chart/index.d.ts.map +1 -0
  54. package/dist/components/map-chart/index.js +29 -0
  55. package/dist/components/map-chart/index.js.map +1 -0
  56. package/dist/components/map-chart/lib/constants.d.ts +34 -0
  57. package/dist/components/map-chart/lib/constants.d.ts.map +1 -0
  58. package/dist/components/map-chart/lib/constants.js +122 -0
  59. package/dist/components/map-chart/lib/constants.js.map +1 -0
  60. package/dist/components/map-chart/lib/domain.d.ts +12 -0
  61. package/dist/components/map-chart/lib/domain.d.ts.map +1 -0
  62. package/dist/components/map-chart/lib/domain.js +105 -0
  63. package/dist/components/map-chart/lib/domain.js.map +1 -0
  64. package/dist/components/map-chart/lib/format.d.ts +8 -0
  65. package/dist/components/map-chart/lib/format.d.ts.map +1 -0
  66. package/dist/components/map-chart/lib/format.js +45 -0
  67. package/dist/components/map-chart/lib/format.js.map +1 -0
  68. package/dist/components/map-chart/lib/geo-index.d.ts +7 -0
  69. package/dist/components/map-chart/lib/geo-index.d.ts.map +1 -0
  70. package/dist/components/map-chart/lib/geo-index.js +200 -0
  71. package/dist/components/map-chart/lib/geo-index.js.map +1 -0
  72. package/dist/components/map-chart/lib/geojson.d.ts +5 -0
  73. package/dist/components/map-chart/lib/geojson.d.ts.map +1 -0
  74. package/dist/components/map-chart/lib/geojson.js +47 -0
  75. package/dist/components/map-chart/lib/geojson.js.map +1 -0
  76. package/dist/components/map-chart/lib/index.d.ts +13 -0
  77. package/dist/components/map-chart/lib/index.d.ts.map +1 -0
  78. package/dist/components/map-chart/lib/join.d.ts +7 -0
  79. package/dist/components/map-chart/lib/join.d.ts.map +1 -0
  80. package/dist/components/map-chart/lib/join.js +156 -0
  81. package/dist/components/map-chart/lib/join.js.map +1 -0
  82. package/dist/components/map-chart/lib/legend.d.ts +45 -0
  83. package/dist/components/map-chart/lib/legend.d.ts.map +1 -0
  84. package/dist/components/map-chart/lib/legend.js +108 -0
  85. package/dist/components/map-chart/lib/legend.js.map +1 -0
  86. package/dist/components/map-chart/lib/normalize.d.ts +3 -0
  87. package/dist/components/map-chart/lib/normalize.d.ts.map +1 -0
  88. package/dist/components/map-chart/lib/normalize.js +177 -0
  89. package/dist/components/map-chart/lib/normalize.js.map +1 -0
  90. package/dist/components/map-chart/lib/pmtiles.d.ts +41 -0
  91. package/dist/components/map-chart/lib/pmtiles.d.ts.map +1 -0
  92. package/dist/components/map-chart/lib/pmtiles.js +112 -0
  93. package/dist/components/map-chart/lib/pmtiles.js.map +1 -0
  94. package/dist/components/map-chart/lib/types.d.ts +128 -0
  95. package/dist/components/map-chart/lib/types.d.ts.map +1 -0
  96. package/dist/components/map-chart/metadata.json.d.ts +83 -0
  97. package/dist/components/map-chart/metadata.json.js +42 -0
  98. package/dist/components/map-chart/metadata.json.js.map +1 -0
  99. package/dist/components/map-chart/render/draw.d.ts +24 -0
  100. package/dist/components/map-chart/render/draw.d.ts.map +1 -0
  101. package/dist/components/map-chart/render/draw.js +455 -0
  102. package/dist/components/map-chart/render/draw.js.map +1 -0
  103. package/dist/components/map-chart/render/index.d.ts +2 -0
  104. package/dist/components/map-chart/render/index.d.ts.map +1 -0
  105. package/dist/components/matrix-chart/element/styles.d.ts +2 -0
  106. package/dist/components/matrix-chart/element/styles.d.ts.map +1 -0
  107. package/dist/components/matrix-chart/element/styles.js +97 -0
  108. package/dist/components/matrix-chart/element/styles.js.map +1 -0
  109. package/dist/components/matrix-chart/element/ui9000-matrix-chart.d.ts +39 -0
  110. package/dist/components/matrix-chart/element/ui9000-matrix-chart.d.ts.map +1 -0
  111. package/dist/components/matrix-chart/element/ui9000-matrix-chart.js +238 -0
  112. package/dist/components/matrix-chart/element/ui9000-matrix-chart.js.map +1 -0
  113. package/dist/components/matrix-chart/index.d.ts +5 -0
  114. package/dist/components/matrix-chart/index.d.ts.map +1 -0
  115. package/dist/components/matrix-chart/index.js +20 -0
  116. package/dist/components/matrix-chart/lib/domain.d.ts +7 -0
  117. package/dist/components/matrix-chart/lib/domain.d.ts.map +1 -0
  118. package/dist/components/matrix-chart/lib/domain.js +58 -0
  119. package/dist/components/matrix-chart/lib/domain.js.map +1 -0
  120. package/dist/components/matrix-chart/lib/format.d.ts +5 -0
  121. package/dist/components/matrix-chart/lib/format.d.ts.map +1 -0
  122. package/dist/components/matrix-chart/lib/format.js +16 -0
  123. package/dist/components/matrix-chart/lib/format.js.map +1 -0
  124. package/dist/components/matrix-chart/lib/index.d.ts +5 -0
  125. package/dist/components/matrix-chart/lib/index.d.ts.map +1 -0
  126. package/dist/components/matrix-chart/lib/normalize.d.ts +5 -0
  127. package/dist/components/matrix-chart/lib/normalize.d.ts.map +1 -0
  128. package/dist/components/matrix-chart/lib/normalize.js +165 -0
  129. package/dist/components/matrix-chart/lib/normalize.js.map +1 -0
  130. package/dist/components/matrix-chart/lib/types.d.ts +33 -0
  131. package/dist/components/matrix-chart/lib/types.d.ts.map +1 -0
  132. package/dist/components/matrix-chart/metadata.json.d.ts +110 -0
  133. package/dist/components/matrix-chart/metadata.json.js +42 -0
  134. package/dist/components/matrix-chart/metadata.json.js.map +1 -0
  135. package/dist/components/matrix-chart/render/draw.d.ts +63 -0
  136. package/dist/components/matrix-chart/render/draw.d.ts.map +1 -0
  137. package/dist/components/matrix-chart/render/draw.js +225 -0
  138. package/dist/components/matrix-chart/render/draw.js.map +1 -0
  139. package/dist/components/matrix-chart/render/index.d.ts +2 -0
  140. package/dist/components/matrix-chart/render/index.d.ts.map +1 -0
  141. package/dist/components/network-graph/element/styles.d.ts.map +1 -1
  142. package/dist/components/network-graph/element/styles.js +177 -57
  143. package/dist/components/network-graph/element/styles.js.map +1 -1
  144. package/dist/components/network-graph/element/ui9000-network-graph.d.ts +4 -0
  145. package/dist/components/network-graph/element/ui9000-network-graph.d.ts.map +1 -1
  146. package/dist/components/network-graph/element/ui9000-network-graph.js +116 -39
  147. package/dist/components/network-graph/element/ui9000-network-graph.js.map +1 -1
  148. package/dist/components/network-graph/lib/domain.d.ts +2 -2
  149. package/dist/components/network-graph/lib/domain.js.map +1 -1
  150. package/dist/components/network-graph/lib/index.d.ts +1 -0
  151. package/dist/components/network-graph/lib/index.d.ts.map +1 -1
  152. package/dist/components/network-graph/lib/legend.d.ts +15 -0
  153. package/dist/components/network-graph/lib/legend.d.ts.map +1 -0
  154. package/dist/components/network-graph/lib/legend.js +35 -0
  155. package/dist/components/network-graph/lib/legend.js.map +1 -0
  156. package/dist/components/network-graph/render/draw.d.ts +4 -1
  157. package/dist/components/network-graph/render/draw.d.ts.map +1 -1
  158. package/dist/components/network-graph/render/draw.js +34 -9
  159. package/dist/components/network-graph/render/draw.js.map +1 -1
  160. package/dist/components/pie-chart/element/styles.d.ts.map +1 -1
  161. package/dist/components/pie-chart/element/styles.js +34 -1
  162. package/dist/components/pie-chart/element/styles.js.map +1 -1
  163. package/dist/components/pie-chart/element/ui9000-pie-chart.d.ts +0 -2
  164. package/dist/components/pie-chart/element/ui9000-pie-chart.d.ts.map +1 -1
  165. package/dist/components/pie-chart/element/ui9000-pie-chart.js +2 -8
  166. package/dist/components/pie-chart/element/ui9000-pie-chart.js.map +1 -1
  167. package/dist/components/pie-chart/metadata.json.d.ts +1 -7
  168. package/dist/components/pie-chart/metadata.json.js +2 -2
  169. package/dist/components/polar-area-chart/element/styles.d.ts +1 -1
  170. package/dist/components/polar-area-chart/element/styles.d.ts.map +1 -1
  171. package/dist/components/{donut-group-chart → polar-area-chart}/element/styles.js +9 -27
  172. package/dist/components/polar-area-chart/element/styles.js.map +1 -0
  173. package/dist/components/polar-area-chart/element/ui9000-polar-area-chart.d.ts.map +1 -1
  174. package/dist/components/polar-area-chart/element/ui9000-polar-area-chart.js +4 -3
  175. package/dist/components/polar-area-chart/element/ui9000-polar-area-chart.js.map +1 -1
  176. package/dist/components/polar-area-chart/index.d.ts +1 -1
  177. package/dist/components/polar-area-chart/index.d.ts.map +1 -1
  178. package/dist/components/polar-area-chart/index.js +2 -1
  179. package/dist/components/polar-area-chart/lib/domain.d.ts +8 -0
  180. package/dist/components/polar-area-chart/lib/domain.d.ts.map +1 -1
  181. package/dist/components/polar-area-chart/lib/domain.js +20 -0
  182. package/dist/components/polar-area-chart/lib/domain.js.map +1 -1
  183. package/dist/components/polar-area-chart/lib/index.d.ts +1 -1
  184. package/dist/components/polar-area-chart/lib/index.d.ts.map +1 -1
  185. package/dist/components/polar-area-chart/lib/normalize.d.ts.map +1 -1
  186. package/dist/components/polar-area-chart/lib/normalize.js +72 -6
  187. package/dist/components/polar-area-chart/lib/normalize.js.map +1 -1
  188. package/dist/components/polar-area-chart/lib/types.d.ts +6 -1
  189. package/dist/components/polar-area-chart/lib/types.d.ts.map +1 -1
  190. package/dist/components/polar-area-chart/metadata.json.d.ts +1 -1
  191. package/dist/components/polar-area-chart/metadata.json.js +1 -1
  192. package/dist/components/polar-area-chart/render/draw.d.ts.map +1 -1
  193. package/dist/components/polar-area-chart/render/draw.js +2 -2
  194. package/dist/components/polar-area-chart/render/draw.js.map +1 -1
  195. package/dist/components/punchcard-chart/metadata.json.d.ts +1 -1
  196. package/dist/components/punchcard-chart/metadata.json.js +1 -1
  197. package/dist/components/sankey-chart/element/styles.d.ts.map +1 -1
  198. package/dist/components/sankey-chart/element/styles.js +7 -27
  199. package/dist/components/sankey-chart/element/styles.js.map +1 -1
  200. package/dist/components/sankey-chart/element/ui9000-sankey-chart.d.ts +5 -5
  201. package/dist/components/sankey-chart/element/ui9000-sankey-chart.d.ts.map +1 -1
  202. package/dist/components/sankey-chart/element/ui9000-sankey-chart.js +37 -35
  203. package/dist/components/sankey-chart/element/ui9000-sankey-chart.js.map +1 -1
  204. package/dist/components/treemap-chart/element/styles.d.ts +2 -0
  205. package/dist/components/treemap-chart/element/styles.d.ts.map +1 -0
  206. package/dist/components/treemap-chart/element/styles.js +141 -0
  207. package/dist/components/treemap-chart/element/styles.js.map +1 -0
  208. package/dist/components/treemap-chart/element/ui9000-treemap-chart.d.ts +35 -0
  209. package/dist/components/treemap-chart/element/ui9000-treemap-chart.d.ts.map +1 -0
  210. package/dist/components/treemap-chart/element/ui9000-treemap-chart.js +177 -0
  211. package/dist/components/treemap-chart/element/ui9000-treemap-chart.js.map +1 -0
  212. package/dist/components/treemap-chart/index.d.ts +5 -0
  213. package/dist/components/treemap-chart/index.d.ts.map +1 -0
  214. package/dist/components/treemap-chart/index.js +22 -0
  215. package/dist/components/treemap-chart/index.js.map +1 -0
  216. package/dist/components/treemap-chart/lib/color.d.ts +25 -0
  217. package/dist/components/treemap-chart/lib/color.d.ts.map +1 -0
  218. package/dist/components/treemap-chart/lib/color.js +67 -0
  219. package/dist/components/treemap-chart/lib/color.js.map +1 -0
  220. package/dist/components/treemap-chart/lib/format.d.ts +7 -0
  221. package/dist/components/treemap-chart/lib/format.d.ts.map +1 -0
  222. package/dist/components/treemap-chart/lib/format.js +9 -0
  223. package/dist/components/treemap-chart/lib/format.js.map +1 -0
  224. package/dist/components/treemap-chart/lib/index.d.ts +6 -0
  225. package/dist/components/treemap-chart/lib/index.d.ts.map +1 -0
  226. package/dist/components/treemap-chart/lib/layout.d.ts +18 -0
  227. package/dist/components/treemap-chart/lib/layout.d.ts.map +1 -0
  228. package/dist/components/treemap-chart/lib/layout.js +31 -0
  229. package/dist/components/treemap-chart/lib/layout.js.map +1 -0
  230. package/dist/components/treemap-chart/lib/normalize.d.ts +4 -0
  231. package/dist/components/treemap-chart/lib/normalize.d.ts.map +1 -0
  232. package/dist/components/treemap-chart/lib/normalize.js +182 -0
  233. package/dist/components/treemap-chart/lib/normalize.js.map +1 -0
  234. package/dist/components/treemap-chart/lib/types.d.ts +63 -0
  235. package/dist/components/treemap-chart/lib/types.d.ts.map +1 -0
  236. package/dist/components/treemap-chart/metadata.json.d.ts +126 -0
  237. package/dist/components/treemap-chart/metadata.json.js +45 -0
  238. package/dist/components/treemap-chart/render/draw.d.ts +24 -0
  239. package/dist/components/treemap-chart/render/draw.d.ts.map +1 -0
  240. package/dist/components/treemap-chart/render/draw.js +124 -0
  241. package/dist/components/treemap-chart/render/draw.js.map +1 -0
  242. package/dist/components/treemap-chart/render/index.d.ts +2 -0
  243. package/dist/components/treemap-chart/render/index.d.ts.map +1 -0
  244. package/dist/element/chart-legend-render.d.ts +5 -0
  245. package/dist/element/chart-legend-render.d.ts.map +1 -1
  246. package/dist/element/chart-legend-render.js +19 -1
  247. package/dist/element/chart-legend-render.js.map +1 -1
  248. package/dist/element/chart-shell-styles.d.ts.map +1 -1
  249. package/dist/element/chart-shell-styles.js +35 -0
  250. package/dist/element/chart-shell-styles.js.map +1 -1
  251. package/dist/index.d.ts +8 -4
  252. package/dist/index.d.ts.map +1 -1
  253. package/dist/index.js +73 -39
  254. package/dist/index.js.map +1 -1
  255. package/dist/lazy/index.d.ts +4 -2
  256. package/dist/lazy/index.d.ts.map +1 -1
  257. package/dist/lazy/index.js +24 -8
  258. package/dist/lazy/index.js.map +1 -1
  259. package/dist/lazy/map-chart.d.ts +4 -0
  260. package/dist/lazy/map-chart.d.ts.map +1 -0
  261. package/dist/lazy/map-chart.js +5 -0
  262. package/dist/lazy/map-chart.js.map +1 -0
  263. package/dist/lazy/matrix-chart.d.ts +4 -0
  264. package/dist/lazy/matrix-chart.d.ts.map +1 -0
  265. package/dist/lazy/matrix-chart.js +5 -0
  266. package/dist/lazy/matrix-chart.js.map +1 -0
  267. package/dist/lazy/treemap-chart.d.ts +4 -0
  268. package/dist/lazy/treemap-chart.d.ts.map +1 -0
  269. package/dist/lazy/treemap-chart.js +5 -0
  270. package/dist/lazy/treemap-chart.js.map +1 -0
  271. package/dist/node_modules/lit-html/directive.js +28 -0
  272. package/dist/node_modules/lit-html/directive.js.map +1 -0
  273. package/dist/node_modules/lit-html/directives/style-map.js +37 -0
  274. package/dist/node_modules/lit-html/directives/style-map.js.map +1 -0
  275. package/dist/node_modules/lit-html/lit-html.js +231 -0
  276. package/dist/node_modules/lit-html/lit-html.js.map +1 -0
  277. package/dist/utils/axis-units.d.ts +15 -0
  278. package/dist/utils/axis-units.d.ts.map +1 -0
  279. package/dist/utils/axis-units.js +27 -0
  280. package/dist/utils/axis-units.js.map +1 -0
  281. package/dist/utils/chart-helpers.d.ts +4 -6
  282. package/dist/utils/chart-helpers.d.ts.map +1 -1
  283. package/dist/utils/chart-helpers.js +16 -15
  284. package/dist/utils/chart-helpers.js.map +1 -1
  285. package/dist/utils/format-text.d.ts +5 -0
  286. package/dist/utils/format-text.d.ts.map +1 -1
  287. package/dist/utils/format-text.js +7 -0
  288. package/dist/utils/format-text.js.map +1 -1
  289. package/dist/utils/fuse-palette.d.ts +12 -0
  290. package/dist/utils/fuse-palette.d.ts.map +1 -1
  291. package/dist/utils/fuse-palette.js +23 -1
  292. package/dist/utils/fuse-palette.js.map +1 -1
  293. package/dist/utils/fuse-widget.d.ts +13 -4
  294. package/dist/utils/fuse-widget.d.ts.map +1 -1
  295. package/dist/utils/fuse-widget.js.map +1 -1
  296. package/dist/utils/fusedash-visual.d.ts +65 -52
  297. package/dist/utils/fusedash-visual.d.ts.map +1 -1
  298. package/dist/utils/fusedash-visual.js +48 -29
  299. package/dist/utils/fusedash-visual.js.map +1 -1
  300. package/package.json +38 -11
  301. package/dist/components/donut-group-chart/element/styles.d.ts +0 -2
  302. package/dist/components/donut-group-chart/element/styles.d.ts.map +0 -1
  303. package/dist/components/donut-group-chart/element/styles.js.map +0 -1
  304. package/dist/components/donut-group-chart/element/ui9000-donut-group-chart.d.ts +0 -34
  305. package/dist/components/donut-group-chart/element/ui9000-donut-group-chart.d.ts.map +0 -1
  306. package/dist/components/donut-group-chart/element/ui9000-donut-group-chart.js +0 -169
  307. package/dist/components/donut-group-chart/element/ui9000-donut-group-chart.js.map +0 -1
  308. package/dist/components/donut-group-chart/index.d.ts +0 -5
  309. package/dist/components/donut-group-chart/index.d.ts.map +0 -1
  310. package/dist/components/donut-group-chart/index.js +0 -23
  311. package/dist/components/donut-group-chart/lib/domain.d.ts +0 -39
  312. package/dist/components/donut-group-chart/lib/domain.d.ts.map +0 -1
  313. package/dist/components/donut-group-chart/lib/domain.js +0 -51
  314. package/dist/components/donut-group-chart/lib/domain.js.map +0 -1
  315. package/dist/components/donut-group-chart/lib/format.d.ts +0 -7
  316. package/dist/components/donut-group-chart/lib/format.d.ts.map +0 -1
  317. package/dist/components/donut-group-chart/lib/format.js +0 -21
  318. package/dist/components/donut-group-chart/lib/format.js.map +0 -1
  319. package/dist/components/donut-group-chart/lib/index.d.ts +0 -5
  320. package/dist/components/donut-group-chart/lib/index.d.ts.map +0 -1
  321. package/dist/components/donut-group-chart/lib/normalize.d.ts +0 -14
  322. package/dist/components/donut-group-chart/lib/normalize.d.ts.map +0 -1
  323. package/dist/components/donut-group-chart/lib/normalize.js +0 -98
  324. package/dist/components/donut-group-chart/lib/normalize.js.map +0 -1
  325. package/dist/components/donut-group-chart/lib/types.d.ts +0 -49
  326. package/dist/components/donut-group-chart/lib/types.d.ts.map +0 -1
  327. package/dist/components/donut-group-chart/metadata.json.d.ts +0 -113
  328. package/dist/components/donut-group-chart/metadata.json.js +0 -45
  329. package/dist/components/donut-group-chart/render/draw.d.ts +0 -44
  330. package/dist/components/donut-group-chart/render/draw.d.ts.map +0 -1
  331. package/dist/components/donut-group-chart/render/draw.js +0 -194
  332. package/dist/components/donut-group-chart/render/draw.js.map +0 -1
  333. package/dist/components/donut-group-chart/render/index.d.ts +0 -2
  334. package/dist/components/donut-group-chart/render/index.d.ts.map +0 -1
  335. package/dist/components/donut-group-chart/tests/fixtures.d.ts +0 -33
  336. package/dist/components/donut-group-chart/tests/fixtures.d.ts.map +0 -1
  337. package/dist/lazy/donut-group-chart.d.ts +0 -4
  338. package/dist/lazy/donut-group-chart.d.ts.map +0 -1
  339. package/dist/lazy/donut-group-chart.js +0 -5
  340. package/dist/lazy/donut-group-chart.js.map +0 -1
  341. /package/dist/components/{donut-group-chart → matrix-chart}/index.js.map +0 -0
  342. /package/dist/components/{donut-group-chart → treemap-chart}/metadata.json.js.map +0 -0
@@ -0,0 +1,35 @@
1
+ import { PropertyValues } from 'lit';
2
+ import { Ui9000ChartElement } from '../../../element/ui9000-chart-base.js';
3
+ export declare class Ui9000TreemapChart extends Ui9000ChartElement {
4
+ static styles: import('lit').CSSResult[];
5
+ showLegend: boolean;
6
+ showTooltip: boolean;
7
+ private _tooltip;
8
+ private _empty;
9
+ private _rangeColors;
10
+ private _resizeObserver?;
11
+ private _raf;
12
+ connectedCallback(): void;
13
+ disconnectedCallback(): void;
14
+ /**
15
+ * The palette legend only appears once the data is known, which shortens the
16
+ * plot — observing the plot box (not just the host) redraws it at the size it
17
+ * actually got.
18
+ */
19
+ firstUpdated(): void;
20
+ updated(changed: PropertyValues): void;
21
+ private scheduleDraw;
22
+ private parseData;
23
+ /** Client tooltip: `Value` plus the dimension the tile encodes. */
24
+ private tooltipFor;
25
+ private draw;
26
+ private renderLegend;
27
+ render(): import('lit-html').TemplateResult<1>;
28
+ }
29
+ declare global {
30
+ interface HTMLElementTagNameMap {
31
+ 'ui9000-treemap-chart': Ui9000TreemapChart;
32
+ }
33
+ }
34
+ export declare function registerTreemapChart(): void;
35
+ //# sourceMappingURL=ui9000-treemap-chart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui9000-treemap-chart.d.ts","sourceRoot":"","sources":["../../../../src/components/treemap-chart/element/ui9000-treemap-chart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAKzD,OAAO,EAAoB,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAa7F,qBACa,kBAAmB,SAAQ,kBAAkB;IACxD,OAAgB,MAAM,4BAA0C;IAGhE,UAAU,UAAQ;IAGlB,WAAW,UAAQ;IAGnB,OAAO,CAAC,QAAQ,CAA6E;IAG7F,OAAO,CAAC,MAAM,CAAS;IAGvB,OAAO,CAAC,YAAY,CAAgB;IAEpC,OAAO,CAAC,eAAe,CAAC,CAAiB;IACzC,OAAO,CAAC,IAAI,CAAK;IAER,iBAAiB,IAAI,IAAI;IAMzB,oBAAoB,IAAI,IAAI;IAMrC;;;;OAIG;IACM,YAAY,IAAI,IAAI;IAKpB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAI/C,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,SAAS;IAKjB,mEAAmE;IACnE,OAAO,CAAC,UAAU;IA4BlB,OAAO,CAAC,IAAI;IAyCZ,OAAO,CAAC,YAAY;IAKX,MAAM;CA0BhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,sBAAsB,EAAE,kBAAkB,CAAC;KAC5C;CACF;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAI3C"}
@@ -0,0 +1,177 @@
1
+ import { nothing, html } from "lit";
2
+ import { property, state, customElement } from "lit/decorators.js";
3
+ import { readThemeFromElement } from "../../../context/widget-context.js";
4
+ import { renderPaletteLegend } from "../../../element/chart-legend-render.js";
5
+ import { Ui9000ChartElement } from "../../../element/ui9000-chart-base.js";
6
+ import { parseJsonAttr, getTreemapDimensions } from "../../../utils/chart-helpers.js";
7
+ import { chartPropsChanged } from "../../../utils/lit-draw.js";
8
+ import { formatValueWithUnit } from "../../../utils/axis-units.js";
9
+ import { formatCapitalizedText, formatCapitalizedWords } from "../../../utils/format-text.js";
10
+ import { formatTreemapValue } from "../lib/format.js";
11
+ import { normalizeTreemapData } from "../lib/normalize.js";
12
+ import { renderTreemapChart } from "../render/draw.js";
13
+ import { treemapChartStyles } from "./styles.js";
14
+ import { chartShellStyles } from "../../../element/chart-shell-styles.js";
15
+ var __defProp = Object.defineProperty;
16
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
17
+ var __decorateClass = (decorators, target, key, kind) => {
18
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
19
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
20
+ if (decorator = decorators[i])
21
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
22
+ if (kind && result) __defProp(target, key, result);
23
+ return result;
24
+ };
25
+ let Ui9000TreemapChart = class extends Ui9000ChartElement {
26
+ constructor() {
27
+ super(...arguments);
28
+ this.showLegend = true;
29
+ this.showTooltip = true;
30
+ this._tooltip = null;
31
+ this._empty = false;
32
+ this._rangeColors = [];
33
+ this._raf = 0;
34
+ }
35
+ connectedCallback() {
36
+ super.connectedCallback();
37
+ this._resizeObserver = new ResizeObserver(() => this.scheduleDraw());
38
+ this._resizeObserver.observe(this);
39
+ }
40
+ disconnectedCallback() {
41
+ var _a;
42
+ (_a = this._resizeObserver) == null ? void 0 : _a.disconnect();
43
+ cancelAnimationFrame(this._raf);
44
+ super.disconnectedCallback();
45
+ }
46
+ /**
47
+ * The palette legend only appears once the data is known, which shortens the
48
+ * plot — observing the plot box (not just the host) redraws it at the size it
49
+ * actually got.
50
+ */
51
+ firstUpdated() {
52
+ var _a, _b;
53
+ const root = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(".chart-root");
54
+ if (root) (_b = this._resizeObserver) == null ? void 0 : _b.observe(root);
55
+ }
56
+ updated(changed) {
57
+ if (chartPropsChanged(changed)) this.scheduleDraw();
58
+ }
59
+ scheduleDraw() {
60
+ cancelAnimationFrame(this._raf);
61
+ this._raf = requestAnimationFrame(() => this.draw());
62
+ }
63
+ parseData() {
64
+ const raw = parseJsonAttr(this.dataJson, null);
65
+ return normalizeTreemapData(raw);
66
+ }
67
+ /** Client tooltip: `Value` plus the dimension the tile encodes. */
68
+ tooltipFor(model, payload) {
69
+ var _a;
70
+ const { tile, group } = payload;
71
+ const rows = [
72
+ { key: "Value", value: formatTreemapValue(tile.value, model.mode) }
73
+ ];
74
+ if (model.mode === "grouped") {
75
+ if (group && model.categoryField) {
76
+ rows.push({ key: formatCapitalizedText(model.categoryField), value: group.label });
77
+ }
78
+ return { title: formatCapitalizedWords(tile.label), rows };
79
+ }
80
+ if (model.categoryField) {
81
+ const detail = (_a = model.axisDetails) == null ? void 0 : _a[model.categoryField];
82
+ rows.push({
83
+ key: (detail == null ? void 0 : detail.label) ?? model.categoryField,
84
+ value: formatValueWithUnit(tile.label, detail)
85
+ });
86
+ }
87
+ return { rows };
88
+ }
89
+ draw() {
90
+ var _a;
91
+ const root = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(".chart-root");
92
+ if (!root) return;
93
+ const model = this.parseData();
94
+ this._empty = model.mode === "single" ? !model.tiles.length : !model.groups.length;
95
+ this._rangeColors = !this._empty && model.mode === "single" ? model.rangeColors : [];
96
+ if (this._empty) {
97
+ root.replaceChildren();
98
+ return;
99
+ }
100
+ const theme = readThemeFromElement(this);
101
+ const { width, height } = getTreemapDimensions(root);
102
+ renderTreemapChart(root, {
103
+ model,
104
+ width,
105
+ height,
106
+ theme,
107
+ showTooltip: this.showTooltip,
108
+ onHover: this.showTooltip ? (payload) => {
109
+ const rect = this.getBoundingClientRect();
110
+ this._tooltip = {
111
+ x: payload.event.clientX - rect.left,
112
+ y: payload.event.clientY - rect.top,
113
+ ...this.tooltipFor(model, payload)
114
+ };
115
+ } : void 0,
116
+ onLeave: this.showTooltip ? () => {
117
+ this._tooltip = null;
118
+ } : void 0
119
+ });
120
+ }
121
+ renderLegend() {
122
+ if (!this.showLegend || !this._rangeColors.length) return nothing;
123
+ return renderPaletteLegend(this._rangeColors);
124
+ }
125
+ render() {
126
+ const title = this.headerTitle();
127
+ return html`
128
+ <div class="widget-shell" part="shell">
129
+ ${this.renderShellHeader(title)}
130
+ <div class="widget-body">
131
+ ${this.renderLegend()}
132
+ <div class="chart-root" part="chart" ?hidden=${this._empty}></div>
133
+ ${this._empty ? html`<div class="empty" part="empty">No data</div>` : nothing}
134
+ ${this._tooltip ? html`<div
135
+ class="tooltip"
136
+ part="tooltip"
137
+ style="left:${this._tooltip.x}px;top:${this._tooltip.y}px"
138
+ >
139
+ ${this._tooltip.title ? html`<div class="tooltip-title">${this._tooltip.title}</div>` : nothing}
140
+ ${this._tooltip.rows.map((row) => html`<div>${row.key}: ${row.value}</div>`)}
141
+ </div>` : nothing}
142
+ ${this.renderShellLabelTooltip()}
143
+ </div>
144
+ </div>
145
+ `;
146
+ }
147
+ };
148
+ Ui9000TreemapChart.styles = [treemapChartStyles, chartShellStyles];
149
+ __decorateClass([
150
+ property({ type: Boolean, attribute: "show-legend" })
151
+ ], Ui9000TreemapChart.prototype, "showLegend", 2);
152
+ __decorateClass([
153
+ property({ type: Boolean, attribute: "show-tooltip" })
154
+ ], Ui9000TreemapChart.prototype, "showTooltip", 2);
155
+ __decorateClass([
156
+ state()
157
+ ], Ui9000TreemapChart.prototype, "_tooltip", 2);
158
+ __decorateClass([
159
+ state()
160
+ ], Ui9000TreemapChart.prototype, "_empty", 2);
161
+ __decorateClass([
162
+ state()
163
+ ], Ui9000TreemapChart.prototype, "_rangeColors", 2);
164
+ Ui9000TreemapChart = __decorateClass([
165
+ customElement("ui9000-treemap-chart")
166
+ ], Ui9000TreemapChart);
167
+ function registerTreemapChart() {
168
+ if (!customElements.get("ui9000-treemap-chart")) {
169
+ customElements.define("ui9000-treemap-chart", Ui9000TreemapChart);
170
+ }
171
+ }
172
+ registerTreemapChart();
173
+ export {
174
+ Ui9000TreemapChart,
175
+ registerTreemapChart
176
+ };
177
+ //# sourceMappingURL=ui9000-treemap-chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui9000-treemap-chart.js","sources":["../../../../src/components/treemap-chart/element/ui9000-treemap-chart.ts"],"sourcesContent":["import { html, nothing, type PropertyValues } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { readThemeFromElement } from '../../../context/widget-context.js';\nimport { renderPaletteLegend } from '../../../element/chart-legend-render.js';\nimport { chartShellStyles, Ui9000ChartElement } from '../../../element/ui9000-chart-base.js';\nimport { getTreemapDimensions, parseJsonAttr } from '../../../utils/chart-helpers.js';\nimport { chartPropsChanged } from '../../../utils/lit-draw.js';\nimport { formatValueWithUnit } from '../../../utils/axis-units.js';\nimport { formatCapitalizedText, formatCapitalizedWords } from '../../../utils/format-text.js';\nimport { formatTreemapValue } from '../lib/format.js';\nimport { normalizeTreemapData } from '../lib/normalize.js';\nimport type { TreemapChartData, TreemapModel } from '../lib/types.js';\nimport { renderTreemapChart, type TreemapHoverPayload } from '../render/draw.js';\nimport { treemapChartStyles } from './styles.js';\n\ntype TooltipRow = { key: string; value: string };\n\n@customElement('ui9000-treemap-chart')\nexport class Ui9000TreemapChart extends Ui9000ChartElement {\n static override styles = [treemapChartStyles, chartShellStyles];\n\n @property({ type: Boolean, attribute: 'show-legend' })\n showLegend = true;\n\n @property({ type: Boolean, attribute: 'show-tooltip' })\n showTooltip = true;\n\n @state()\n private _tooltip: { x: number; y: number; title?: string; rows: TooltipRow[] } | null = null;\n\n @state()\n private _empty = false;\n\n @state()\n private _rangeColors: string[] = [];\n\n private _resizeObserver?: ResizeObserver;\n private _raf = 0;\n\n override connectedCallback(): void {\n super.connectedCallback();\n this._resizeObserver = new ResizeObserver(() => this.scheduleDraw());\n this._resizeObserver.observe(this);\n }\n\n override disconnectedCallback(): void {\n this._resizeObserver?.disconnect();\n cancelAnimationFrame(this._raf);\n super.disconnectedCallback();\n }\n\n /**\n * The palette legend only appears once the data is known, which shortens the\n * plot — observing the plot box (not just the host) redraws it at the size it\n * actually got.\n */\n override firstUpdated(): void {\n const root = this.shadowRoot?.querySelector('.chart-root');\n if (root) this._resizeObserver?.observe(root);\n }\n\n override updated(changed: PropertyValues): void {\n if (chartPropsChanged(changed)) this.scheduleDraw();\n }\n\n private scheduleDraw(): void {\n cancelAnimationFrame(this._raf);\n this._raf = requestAnimationFrame(() => this.draw());\n }\n\n private parseData(): TreemapModel {\n const raw = parseJsonAttr<TreemapChartData>(this.dataJson, null);\n return normalizeTreemapData(raw);\n }\n\n /** Client tooltip: `Value` plus the dimension the tile encodes. */\n private tooltipFor(model: TreemapModel, payload: TreemapHoverPayload): {\n title?: string;\n rows: TooltipRow[];\n } {\n const { tile, group } = payload;\n const rows: TooltipRow[] = [\n { key: 'Value', value: formatTreemapValue(tile.value, model.mode) },\n ];\n\n if (model.mode === 'grouped') {\n // The tile is a subgroup value, so the second row names the card it sits\n // in — the client labels it with `groupBy[0]` but prints the tile again.\n if (group && model.categoryField) {\n rows.push({ key: formatCapitalizedText(model.categoryField), value: group.label });\n }\n return { title: formatCapitalizedWords(tile.label), rows };\n }\n\n if (model.categoryField) {\n const detail = model.axisDetails?.[model.categoryField];\n rows.push({\n key: detail?.label ?? model.categoryField,\n value: formatValueWithUnit(tile.label, detail),\n });\n }\n return { rows };\n }\n\n private draw(): void {\n const root = this.shadowRoot?.querySelector('.chart-root') as HTMLElement | null;\n if (!root) return;\n\n const model = this.parseData();\n this._empty = model.mode === 'single' ? !model.tiles.length : !model.groups.length;\n // Grouped cards ramp their own colors, so the shared strip is single-mode only.\n this._rangeColors = !this._empty && model.mode === 'single' ? model.rangeColors : [];\n\n if (this._empty) {\n root.replaceChildren();\n return;\n }\n\n const theme = readThemeFromElement(this);\n const { width, height } = getTreemapDimensions(root);\n\n renderTreemapChart(root, {\n model,\n width,\n height,\n theme,\n showTooltip: this.showTooltip,\n onHover: this.showTooltip\n ? (payload) => {\n const rect = this.getBoundingClientRect();\n this._tooltip = {\n x: payload.event.clientX - rect.left,\n y: payload.event.clientY - rect.top,\n ...this.tooltipFor(model, payload),\n };\n }\n : undefined,\n onLeave: this.showTooltip\n ? () => {\n this._tooltip = null;\n }\n : undefined,\n });\n }\n\n private renderLegend() {\n if (!this.showLegend || !this._rangeColors.length) return nothing;\n return renderPaletteLegend(this._rangeColors);\n }\n\n override render() {\n const title = this.headerTitle();\n return html`\n <div class=\"widget-shell\" part=\"shell\">\n ${this.renderShellHeader(title)}\n <div class=\"widget-body\">\n ${this.renderLegend()}\n <div class=\"chart-root\" part=\"chart\" ?hidden=${this._empty}></div>\n ${this._empty ? html`<div class=\"empty\" part=\"empty\">No data</div>` : nothing}\n ${this._tooltip\n ? html`<div\n class=\"tooltip\"\n part=\"tooltip\"\n style=\"left:${this._tooltip.x}px;top:${this._tooltip.y}px\"\n >\n ${this._tooltip.title\n ? html`<div class=\"tooltip-title\">${this._tooltip.title}</div>`\n : nothing}\n ${this._tooltip.rows.map((row) => html`<div>${row.key}: ${row.value}</div>`)}\n </div>`\n : nothing}\n ${this.renderShellLabelTooltip()}\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ui9000-treemap-chart': Ui9000TreemapChart;\n }\n}\n\nexport function registerTreemapChart(): void {\n if (!customElements.get('ui9000-treemap-chart')) {\n customElements.define('ui9000-treemap-chart', Ui9000TreemapChart);\n }\n}\n\nregisterTreemapChart();\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAmBO,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AAA;"}
@@ -0,0 +1,5 @@
1
+ export { Ui9000TreemapChart, registerTreemapChart, } from './element/ui9000-treemap-chart.js';
2
+ export { renderTreemapChart, type RenderTreemapChartOptions, type TreemapHoverPayload, } from './render/index.js';
3
+ export { formatTreemapValue, hasLightColor, normalizeTreemapData, treemapColorForValue, treemapGridTemplate, treemapRangeColors, treemapValueRanges, type TreemapChartData, type TreemapGridTemplate, type TreemapGroupCard, type TreemapMode, type TreemapModel, type TreemapPoint, type TreemapSeries, type TreemapTile, } from './lib/index.js';
4
+ export { default as treemapChartMetadata } from './metadata.json';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/treemap-chart/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { registerTreemapChart } from "./element/ui9000-treemap-chart.js";
2
+ import { Ui9000TreemapChart } from "./element/ui9000-treemap-chart.js";
3
+ import { default as default2 } from "./metadata.json.js";
4
+ import { formatTreemapValue } from "./lib/format.js";
5
+ import { hasLightColor, treemapColorForValue, treemapRangeColors, treemapValueRanges } from "./lib/color.js";
6
+ import { normalizeTreemapData } from "./lib/normalize.js";
7
+ import { renderTreemapChart } from "./render/draw.js";
8
+ import { treemapGridTemplate } from "./lib/layout.js";
9
+ export {
10
+ Ui9000TreemapChart,
11
+ formatTreemapValue,
12
+ hasLightColor,
13
+ normalizeTreemapData,
14
+ registerTreemapChart,
15
+ renderTreemapChart,
16
+ default2 as treemapChartMetadata,
17
+ treemapColorForValue,
18
+ treemapGridTemplate,
19
+ treemapRangeColors,
20
+ treemapValueRanges
21
+ };
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,25 @@
1
+ /** Mirrors client `lightenColor` — mix `amount` of white into the color. */
2
+ export declare function lightenColor(color: string, amount: number): string;
3
+ /** Mirrors client `darkenColor` — mix `amount` of black into the color. */
4
+ export declare function darkenColor(color: string, amount: number): string;
5
+ /**
6
+ * Mirrors client `getTreemapRangeColors` — seven shades of the group color,
7
+ * from +55% white (low band) to −35% black (high band).
8
+ */
9
+ export declare function treemapRangeColors(baseColor: string): string[];
10
+ /**
11
+ * Mirrors client `hasLightColor` — perceived brightness over white,
12
+ * so the label flips to dark text on pale tiles.
13
+ */
14
+ export declare function hasLightColor(color: string): boolean;
15
+ /**
16
+ * Band edges for the color ramp. Client uses the widget `palette.range` when it
17
+ * carries at least two stops, otherwise `[0, ...generateBreakPoints(sorted)]`.
18
+ */
19
+ export declare function treemapValueRanges(values: number[], paletteRange?: number[] | null): number[];
20
+ /**
21
+ * Mirrors client `baseGetColorByValue` — the band whose `[start, end)` window
22
+ * holds the value (the last band is inclusive), clamped to the ramp ends.
23
+ */
24
+ export declare function treemapColorForValue(value: number | undefined, ranges: number[], rangeColors: string[], baseColor: string): string;
25
+ //# sourceMappingURL=color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../src/components/treemap-chart/lib/color.ts"],"names":[],"mappings":"AA0BA,4EAA4E;AAC5E,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGlE;AAED,2EAA2E;AAC3E,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGjE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAQ9D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAGpD;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,GAAG,MAAM,EAAE,CAI7F;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,MAAM,EAAE,MAAM,EAAE,EAChB,WAAW,EAAE,MAAM,EAAE,EACrB,SAAS,EAAE,MAAM,GAChB,MAAM,CAmBR"}
@@ -0,0 +1,67 @@
1
+ import { generateBreakPoints } from "../../../utils/fuse-palette.js";
2
+ import { FD } from "../../../utils/fusedash-visual.js";
3
+ function channels(hex) {
4
+ let clean = hex.replace("#", "");
5
+ if (clean.length === 3) {
6
+ clean = clean.split("").map((c) => c + c).join("");
7
+ }
8
+ return [
9
+ parseInt(clean.slice(0, 2), 16) || 0,
10
+ parseInt(clean.slice(2, 4), 16) || 0,
11
+ parseInt(clean.slice(4, 6), 16) || 0
12
+ ];
13
+ }
14
+ function toHex(r, g, b) {
15
+ const part = (v) => Math.max(0, Math.min(255, Math.round(v))).toString(16).padStart(2, "0");
16
+ return `#${part(r)}${part(g)}${part(b)}`;
17
+ }
18
+ function lightenColor(color, amount) {
19
+ const [r, g, b] = channels(color);
20
+ return toHex(r + (255 - r) * amount, g + (255 - g) * amount, b + (255 - b) * amount);
21
+ }
22
+ function darkenColor(color, amount) {
23
+ const [r, g, b] = channels(color);
24
+ return toHex(r * (1 - amount), g * (1 - amount), b * (1 - amount));
25
+ }
26
+ function treemapRangeColors(baseColor) {
27
+ const steps = FD.treemapRangeSteps;
28
+ const min = FD.treemapRangeMinShift;
29
+ const max = FD.treemapRangeMaxShift;
30
+ return Array.from({ length: steps }, (_, i) => {
31
+ const shift = min + (max - min) * (i / (steps - 1));
32
+ return shift < 0 ? darkenColor(baseColor, Math.abs(shift)) : lightenColor(baseColor, shift);
33
+ });
34
+ }
35
+ function hasLightColor(color) {
36
+ const [r, g, b] = channels(color);
37
+ return (r * 299 + g * 587 + b * 114) / 1e3 > 140;
38
+ }
39
+ function treemapValueRanges(values, paletteRange) {
40
+ if (Array.isArray(paletteRange) && paletteRange.length >= 2) return paletteRange;
41
+ const sorted = [...values].sort((a, b) => a - b);
42
+ return [0, ...generateBreakPoints(sorted)];
43
+ }
44
+ function treemapColorForValue(value, ranges, rangeColors, baseColor) {
45
+ const fallback = rangeColors[0] ?? baseColor;
46
+ if (typeof value !== "number" || !Number.isFinite(value)) return fallback;
47
+ if (ranges.length < 2) return fallback;
48
+ const lastIndex = ranges.length - 2;
49
+ const idx = ranges.slice(0, -1).findIndex((start, i) => {
50
+ const end = ranges[i + 1];
51
+ return i === lastIndex ? value >= start && value <= end : value >= start && value < end;
52
+ });
53
+ const lastColorIndex = Math.max(0, rangeColors.length - 1);
54
+ if (idx === -1) {
55
+ return value > ranges[ranges.length - 1] ? rangeColors[lastColorIndex] ?? baseColor : fallback;
56
+ }
57
+ return rangeColors[Math.min(idx, lastColorIndex)] ?? baseColor;
58
+ }
59
+ export {
60
+ darkenColor,
61
+ hasLightColor,
62
+ lightenColor,
63
+ treemapColorForValue,
64
+ treemapRangeColors,
65
+ treemapValueRanges
66
+ };
67
+ //# sourceMappingURL=color.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.js","sources":["../../../../src/components/treemap-chart/lib/color.ts"],"sourcesContent":["import { generateBreakPoints } from '../../../utils/fuse-palette.js';\nimport { FD } from '../../../utils/fusedash-visual.js';\n\nfunction channels(hex: string): [number, number, number] {\n let clean = hex.replace('#', '');\n if (clean.length === 3) {\n clean = clean\n .split('')\n .map((c) => c + c)\n .join('');\n }\n return [\n parseInt(clean.slice(0, 2), 16) || 0,\n parseInt(clean.slice(2, 4), 16) || 0,\n parseInt(clean.slice(4, 6), 16) || 0,\n ];\n}\n\nfunction toHex(r: number, g: number, b: number): string {\n const part = (v: number) =>\n Math.max(0, Math.min(255, Math.round(v)))\n .toString(16)\n .padStart(2, '0');\n return `#${part(r)}${part(g)}${part(b)}`;\n}\n\n/** Mirrors client `lightenColor` — mix `amount` of white into the color. */\nexport function lightenColor(color: string, amount: number): string {\n const [r, g, b] = channels(color);\n return toHex(r + (255 - r) * amount, g + (255 - g) * amount, b + (255 - b) * amount);\n}\n\n/** Mirrors client `darkenColor` — mix `amount` of black into the color. */\nexport function darkenColor(color: string, amount: number): string {\n const [r, g, b] = channels(color);\n return toHex(r * (1 - amount), g * (1 - amount), b * (1 - amount));\n}\n\n/**\n * Mirrors client `getTreemapRangeColors` — seven shades of the group color,\n * from +55% white (low band) to −35% black (high band).\n */\nexport function treemapRangeColors(baseColor: string): string[] {\n const steps = FD.treemapRangeSteps;\n const min = FD.treemapRangeMinShift;\n const max = FD.treemapRangeMaxShift;\n return Array.from({ length: steps }, (_, i) => {\n const shift = min + (max - min) * (i / (steps - 1));\n return shift < 0 ? darkenColor(baseColor, Math.abs(shift)) : lightenColor(baseColor, shift);\n });\n}\n\n/**\n * Mirrors client `hasLightColor` — perceived brightness over white,\n * so the label flips to dark text on pale tiles.\n */\nexport function hasLightColor(color: string): boolean {\n const [r, g, b] = channels(color);\n return (r * 299 + g * 587 + b * 114) / 1000 > 140;\n}\n\n/**\n * Band edges for the color ramp. Client uses the widget `palette.range` when it\n * carries at least two stops, otherwise `[0, ...generateBreakPoints(sorted)]`.\n */\nexport function treemapValueRanges(values: number[], paletteRange?: number[] | null): number[] {\n if (Array.isArray(paletteRange) && paletteRange.length >= 2) return paletteRange;\n const sorted = [...values].sort((a, b) => a - b);\n return [0, ...generateBreakPoints(sorted)];\n}\n\n/**\n * Mirrors client `baseGetColorByValue` — the band whose `[start, end)` window\n * holds the value (the last band is inclusive), clamped to the ramp ends.\n */\nexport function treemapColorForValue(\n value: number | undefined,\n ranges: number[],\n rangeColors: string[],\n baseColor: string,\n): string {\n const fallback = rangeColors[0] ?? baseColor;\n if (typeof value !== 'number' || !Number.isFinite(value)) return fallback;\n if (ranges.length < 2) return fallback;\n\n const lastIndex = ranges.length - 2;\n const idx = ranges.slice(0, -1).findIndex((start, i) => {\n const end = ranges[i + 1];\n return i === lastIndex ? value >= start && value <= end : value >= start && value < end;\n });\n const lastColorIndex = Math.max(0, rangeColors.length - 1);\n\n if (idx === -1) {\n return value > ranges[ranges.length - 1]\n ? (rangeColors[lastColorIndex] ?? baseColor)\n : fallback;\n }\n\n return rangeColors[Math.min(idx, lastColorIndex)] ?? baseColor;\n}\n"],"names":[],"mappings":";;AAGA,SAAS,SAAS,KAAuC;AACvD,MAAI,QAAQ,IAAI,QAAQ,KAAK,EAAE;AAC/B,MAAI,MAAM,WAAW,GAAG;AACtB,YAAQ,MACL,MAAM,EAAE,EACR,IAAI,CAAC,MAAM,IAAI,CAAC,EAChB,KAAK,EAAE;AAAA,EACZ;AACA,SAAO;AAAA,IACL,SAAS,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE,KAAK;AAAA,IACnC,SAAS,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE,KAAK;AAAA,IACnC,SAAS,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE,KAAK;AAAA,EAAA;AAEvC;AAEA,SAAS,MAAM,GAAW,GAAW,GAAmB;AACtD,QAAM,OAAO,CAAC,MACZ,KAAK,IAAI,GAAG,KAAK,IAAI,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,EACrC,SAAS,EAAE,EACX,SAAS,GAA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AAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,EAAG,QAAO;AACjE,MAAI,OAAO,SAAS,EAAG,QAAO;AAE9B,QAAM,YAAY,OAAO,SAAS;AAClC,QAAM,MAAM,OAAO,MAAM,GAAG,EAAE,EAAE,UAAU,CAAC,OAAO,MAAM;AACtD,UAAM,MAAM,OAAO,IAAI,CAAC;AACxB,WAAO,MAAM,YAAY,SAAS,SAAS,SAAS,MAAM,SAAS,SAAS,QAAQ;AAAA,EACtF,CAAC;AACD,QAAM,iBAAiB,KAAK,IAAI,GAAG,YAAY,SAAS,CAAC;AAEzD,MAAI,QAAQ,IAAI;AACd,WAAO,QAAQ,OAAO,OAAO,SAAS,CAAC,IAClC,YAAY,cAAc,KAAK,YAChC;AAAA,EACN;AAEA,SAAO,YAAY,KAAK,IAAI,KAAK,cAAc,CAAC,KAAK;AACvD;"}
@@ -0,0 +1,7 @@
1
+ import { TreemapMode } from './types.js';
2
+ /**
3
+ * Tile and tooltip value. FuseDash formats the single treemap with
4
+ * `formatCompactNumber(value, 2)` and each grouped card with `toFixed(2)`.
5
+ */
6
+ export declare function formatTreemapValue(value: number, mode: TreemapMode): string;
7
+ //# sourceMappingURL=format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../src/components/treemap-chart/lib/format.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,MAAM,CAG3E"}
@@ -0,0 +1,9 @@
1
+ import { formatCompactNumber } from "../../../utils/fusedash-visual.js";
2
+ function formatTreemapValue(value, mode) {
3
+ if (!Number.isFinite(value)) return "";
4
+ return mode === "grouped" ? value.toFixed(2) : formatCompactNumber(value, 2);
5
+ }
6
+ export {
7
+ formatTreemapValue
8
+ };
9
+ //# sourceMappingURL=format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.js","sources":["../../../../src/components/treemap-chart/lib/format.ts"],"sourcesContent":["import { formatCompactNumber } from '../../../utils/fusedash-visual.js';\nimport type { TreemapMode } from './types.js';\n\n/**\n * Tile and tooltip value. FuseDash formats the single treemap with\n * `formatCompactNumber(value, 2)` and each grouped card with `toFixed(2)`.\n */\nexport function formatTreemapValue(value: number, mode: TreemapMode): string {\n if (!Number.isFinite(value)) return '';\n return mode === 'grouped' ? value.toFixed(2) : formatCompactNumber(value, 2);\n}\n"],"names":[],"mappings":";AAOO,SAAS,mBAAmB,OAAe,MAA2B;AAC3E,MAAI,CAAC,OAAO,SAAS,KAAK,EAAG,QAAO;AACpC,SAAO,SAAS,YAAY,MAAM,QAAQ,CAAC,IAAI,oBAAoB,OAAO,CAAC;AAC7E;"}
@@ -0,0 +1,6 @@
1
+ export { normalizeTreemapData } from './normalize.js';
2
+ export { darkenColor, hasLightColor, lightenColor, treemapColorForValue, treemapRangeColors, treemapValueRanges, } from './color.js';
3
+ export { treemapGridTemplate, type TreemapGridTemplate } from './layout.js';
4
+ export { formatTreemapValue } from './format.js';
5
+ export type { TreemapChartData, TreemapGroupCard, TreemapLabelValue, TreemapMode, TreemapModel, TreemapPoint, TreemapSeries, TreemapTile, } from './types.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/treemap-chart/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACL,WAAW,EACX,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,WAAW,GACZ,MAAM,YAAY,CAAC"}
@@ -0,0 +1,18 @@
1
+ export interface TreemapGridTemplate {
2
+ /** `grid-template-areas` value; cards claim `_1`… in order */
3
+ areas: string;
4
+ /** `grid-template-rows` value — always explicit, so every row gets space */
5
+ rows: string;
6
+ }
7
+ /**
8
+ * Mirrors client `Treemap/style.ts getGridArea` — the grouped treemap packs 1–5
9
+ * cards into a fixed mosaic and falls back to a single column beyond that.
10
+ * Column count is implied by the areas string, exactly as in the client.
11
+ *
12
+ * Two fixes on top of the client: rows are explicit fractions (the client's
13
+ * `auto` rows collapse around the cards' zero-height plots), and the >5
14
+ * fallback emits one row per card with a height floor instead of a fixed 18,
15
+ * so a long list scrolls instead of being squashed into the top sliver.
16
+ */
17
+ export declare function treemapGridTemplate(itemsCount: number): TreemapGridTemplate;
18
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/components/treemap-chart/lib/layout.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IAClC,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,mBAAmB,CAW3E"}
@@ -0,0 +1,31 @@
1
+ import { FD } from "../../../utils/fusedash-visual.js";
2
+ function treemapGridTemplate(itemsCount) {
3
+ const areas = gridAreas(itemsCount);
4
+ if (itemsCount > 5) {
5
+ return {
6
+ areas,
7
+ rows: `repeat(${itemsCount}, minmax(${FD.treemapCardMinHeight}px, 1fr))`
8
+ };
9
+ }
10
+ return { areas, rows: `repeat(${areas.split('"').length >> 1}, 1fr)` };
11
+ }
12
+ function gridAreas(itemsCount) {
13
+ switch (itemsCount) {
14
+ case 1:
15
+ return '"_1"';
16
+ case 2:
17
+ return '"_1 _2"';
18
+ case 3:
19
+ return '"_1 _1 _2" "_1 _1 _3"';
20
+ case 4:
21
+ return '"_1 _2" "_1 _2" "_3 _4"';
22
+ case 5:
23
+ return '"_1 _1 _2" "_1 _1 _2" "_3 _4 _5"';
24
+ default:
25
+ return Array.from({ length: itemsCount }, (_, i) => `"_${i + 1}"`).join(" ");
26
+ }
27
+ }
28
+ export {
29
+ treemapGridTemplate
30
+ };
31
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.js","sources":["../../../../src/components/treemap-chart/lib/layout.ts"],"sourcesContent":["import { FD } from '../../../utils/fusedash-visual.js';\n\nexport interface TreemapGridTemplate {\n /** `grid-template-areas` value; cards claim `_1`… in order */\n areas: string;\n /** `grid-template-rows` value — always explicit, so every row gets space */\n rows: string;\n}\n\n/**\n * Mirrors client `Treemap/style.ts getGridArea` — the grouped treemap packs 1–5\n * cards into a fixed mosaic and falls back to a single column beyond that.\n * Column count is implied by the areas string, exactly as in the client.\n *\n * Two fixes on top of the client: rows are explicit fractions (the client's\n * `auto` rows collapse around the cards' zero-height plots), and the >5\n * fallback emits one row per card with a height floor instead of a fixed 18,\n * so a long list scrolls instead of being squashed into the top sliver.\n */\nexport function treemapGridTemplate(itemsCount: number): TreemapGridTemplate {\n const areas = gridAreas(itemsCount);\n if (itemsCount > 5) {\n return {\n areas,\n rows: `repeat(${itemsCount}, minmax(${FD.treemapCardMinHeight}px, 1fr))`,\n };\n }\n // Rows must be explicit fractions: the cards' plots have no intrinsic height,\n // so `auto` tracks collapse the bottom row of the mosaic to its header.\n return { areas, rows: `repeat(${areas.split('\"').length >> 1}, 1fr)` };\n}\n\nfunction gridAreas(itemsCount: number): string {\n switch (itemsCount) {\n case 1:\n return '\"_1\"';\n case 2:\n return '\"_1 _2\"';\n case 3:\n return '\"_1 _1 _2\" \"_1 _1 _3\"';\n case 4:\n return '\"_1 _2\" \"_1 _2\" \"_3 _4\"';\n case 5:\n return '\"_1 _1 _2\" \"_1 _1 _2\" \"_3 _4 _5\"';\n default:\n return Array.from({ length: itemsCount }, (_, i) => `\"_${i + 1}\"`).join(' ');\n }\n}\n"],"names":[],"mappings":";AAmBO,SAAS,oBAAoB,YAAyC;AAC3E,QAAM,QAAQ,UAAU,UAAU;AAClC,MAAI,aAAa,GAAG;AAClB,WAAO;AAAA,MACL;AAAA,MACA,MAAM,UAAU,UAAU,YAAY,GAAG,oBAAoB;AAAA,IAAA;AAAA,EAEjE;AAGA,SAAO,EAAE,OAAO,MAAM,UAAU,MAAM,MAAM,GAAG,EAAE,UAAU,CAAC,SAAA;AAC9D;AAEA,SAAS,UAAU,YAA4B;AAC7C,UAAQ,YAAA;AAAA,IACN,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO,MAAM,KAAK,EAAE,QAAQ,cAAc,CAAC,GAAG,MAAM,KAAK,IAAI,CAAC,GAAG,EAAE,KAAK,GAAG;AAAA,EAAA;AAEjF;"}
@@ -0,0 +1,4 @@
1
+ import { TreemapChartData, TreemapModel } from './types.js';
2
+ /** Normalize chat payloads and FuseDash widget mocks into treemap leaves. */
3
+ export declare function normalizeTreemapData(input: TreemapChartData): TreemapModel;
4
+ //# sourceMappingURL=normalize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../../src/components/treemap-chart/lib/normalize.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,gBAAgB,EAGhB,YAAY,EAIb,MAAM,YAAY,CAAC;AAmOpB,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,GAAG,YAAY,CAkB1E"}