@semcore/d3-chart 17.3.1 → 18.0.0-prerelease.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 (289) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/lib/cjs/Area.js +11 -11
  3. package/lib/cjs/Axis.js +55 -58
  4. package/lib/cjs/Axis.js.map +1 -1
  5. package/lib/cjs/Bar.js +16 -16
  6. package/lib/cjs/Bubble.js +14 -14
  7. package/lib/cjs/CompactHorizontalBar.js +16 -16
  8. package/lib/cjs/Donut.js +9 -9
  9. package/lib/cjs/Dots.js +14 -11
  10. package/lib/cjs/Dots.js.map +1 -1
  11. package/lib/cjs/HorizontalBar.js +16 -16
  12. package/lib/cjs/Hover.js +158 -39
  13. package/lib/cjs/Hover.js.map +1 -1
  14. package/lib/cjs/Line.js +9 -9
  15. package/lib/cjs/Plot.js +6 -4
  16. package/lib/cjs/Plot.js.map +1 -1
  17. package/lib/cjs/Radar.js +19 -19
  18. package/lib/cjs/RadialTree.js +12 -12
  19. package/lib/cjs/Reference.js +12 -12
  20. package/lib/cjs/ScatterPlot.js +9 -9
  21. package/lib/cjs/Tooltip.js +20 -11
  22. package/lib/cjs/Tooltip.js.map +1 -1
  23. package/lib/cjs/Venn.js +9 -9
  24. package/lib/cjs/a11y/PlotA11yModule.js +2 -2
  25. package/lib/cjs/a11y/PlotA11yView.js +2 -2
  26. package/lib/cjs/component/Chart/AbstractChart.js +139 -50
  27. package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
  28. package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
  29. package/lib/cjs/component/Chart/AreaChart.js +12 -10
  30. package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
  31. package/lib/cjs/component/Chart/AreaChart.type.js.map +1 -1
  32. package/lib/cjs/component/Chart/BarChart.js +9 -7
  33. package/lib/cjs/component/Chart/BarChart.js.map +1 -1
  34. package/lib/cjs/component/Chart/BarChart.type.js.map +1 -1
  35. package/lib/cjs/component/Chart/BubbleChart.js +21 -8
  36. package/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
  37. package/lib/cjs/component/Chart/BubbleChart.type.js.map +1 -1
  38. package/lib/cjs/component/Chart/CigaretteChart.js +33 -30
  39. package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
  40. package/lib/cjs/component/Chart/CigaretteChart.type.js.map +1 -1
  41. package/lib/cjs/component/Chart/CompactHorizontalBarChart.js +2 -1
  42. package/lib/cjs/component/Chart/CompactHorizontalBarChart.js.map +1 -1
  43. package/lib/cjs/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
  44. package/lib/cjs/component/Chart/DonutChart.js +5 -4
  45. package/lib/cjs/component/Chart/DonutChart.js.map +1 -1
  46. package/lib/cjs/component/Chart/DonutChart.type.js.map +1 -1
  47. package/lib/cjs/component/Chart/HistogramChart.js +6 -4
  48. package/lib/cjs/component/Chart/HistogramChart.js.map +1 -1
  49. package/lib/cjs/component/Chart/HistogramChart.type.js.map +1 -1
  50. package/lib/cjs/component/Chart/LineChart.js +9 -7
  51. package/lib/cjs/component/Chart/LineChart.js.map +1 -1
  52. package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
  53. package/lib/cjs/component/Chart/RadarChart.js +3 -2
  54. package/lib/cjs/component/Chart/RadarChart.js.map +1 -1
  55. package/lib/cjs/component/Chart/RadarChart.type.js.map +1 -1
  56. package/lib/cjs/component/Chart/ScatterPlotChart.js +19 -7
  57. package/lib/cjs/component/Chart/ScatterPlotChart.js.map +1 -1
  58. package/lib/cjs/component/Chart/ScatterPlotChart.type.js.map +1 -1
  59. package/lib/cjs/component/Chart/VennChart.js +6 -5
  60. package/lib/cjs/component/Chart/VennChart.js.map +1 -1
  61. package/lib/cjs/component/Chart/VennChart.type.js.map +1 -1
  62. package/lib/cjs/component/ChartLegend/BaseLegend.js +4 -2
  63. package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
  64. package/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -1
  65. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
  66. package/lib/cjs/component/ChartLegend/LegendFlex/legend-flex.shadow.css +2 -2
  67. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +23 -18
  68. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  69. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
  70. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  71. package/lib/cjs/component/ChartLegend/LegendItem/legend-item.shadow.css +16 -40
  72. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +12 -8
  73. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  74. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  75. package/lib/cjs/component/ChartLegend/LegendTable/legend-table.shadow.css +6 -2
  76. package/lib/cjs/style/abstract-chart.shadow.css +31 -1
  77. package/lib/cjs/style/area.shadow.css +6 -5
  78. package/lib/cjs/style/axis.shadow.css +2 -2
  79. package/lib/cjs/style/bar.shadow.css +7 -7
  80. package/lib/cjs/style/bubble.shadow.css +4 -4
  81. package/lib/cjs/style/donut.shadow.css +3 -3
  82. package/lib/cjs/style/dot.shadow.css +9 -3
  83. package/lib/cjs/style/hover.shadow.css +19 -1
  84. package/lib/cjs/style/line.shadow.css +4 -4
  85. package/lib/cjs/style/radar.shadow.css +5 -5
  86. package/lib/cjs/style/radial-tree.shadow.css +3 -3
  87. package/lib/cjs/style/reference.shadow.css +1 -1
  88. package/lib/cjs/style/scatterplot.shadow.css +1 -1
  89. package/lib/cjs/style/tooltip.shadow.css +23 -14
  90. package/lib/cjs/style/venn.shadow.css +3 -3
  91. package/lib/cjs/types/Hover.d.js.map +1 -1
  92. package/lib/cjs/utils/TextMeasurer.js +33 -0
  93. package/lib/cjs/utils/TextMeasurer.js.map +1 -0
  94. package/lib/es6/Area.js +11 -11
  95. package/lib/es6/Axis.js +55 -57
  96. package/lib/es6/Axis.js.map +1 -1
  97. package/lib/es6/Bar.js +16 -16
  98. package/lib/es6/Bubble.js +14 -14
  99. package/lib/es6/CompactHorizontalBar.js +16 -16
  100. package/lib/es6/Donut.js +9 -9
  101. package/lib/es6/Dots.js +14 -11
  102. package/lib/es6/Dots.js.map +1 -1
  103. package/lib/es6/HorizontalBar.js +16 -16
  104. package/lib/es6/Hover.js +158 -39
  105. package/lib/es6/Hover.js.map +1 -1
  106. package/lib/es6/Line.js +9 -9
  107. package/lib/es6/Plot.js +6 -4
  108. package/lib/es6/Plot.js.map +1 -1
  109. package/lib/es6/Radar.js +19 -19
  110. package/lib/es6/RadialTree.js +12 -12
  111. package/lib/es6/Reference.js +12 -12
  112. package/lib/es6/ScatterPlot.js +9 -9
  113. package/lib/es6/Tooltip.js +20 -11
  114. package/lib/es6/Tooltip.js.map +1 -1
  115. package/lib/es6/Venn.js +9 -9
  116. package/lib/es6/a11y/PlotA11yModule.js +2 -2
  117. package/lib/es6/a11y/PlotA11yView.js +2 -2
  118. package/lib/es6/component/Chart/AbstractChart.js +136 -48
  119. package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
  120. package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
  121. package/lib/es6/component/Chart/AreaChart.js +12 -10
  122. package/lib/es6/component/Chart/AreaChart.js.map +1 -1
  123. package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
  124. package/lib/es6/component/Chart/BarChart.js +9 -7
  125. package/lib/es6/component/Chart/BarChart.js.map +1 -1
  126. package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
  127. package/lib/es6/component/Chart/BubbleChart.js +22 -9
  128. package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
  129. package/lib/es6/component/Chart/BubbleChart.type.js.map +1 -1
  130. package/lib/es6/component/Chart/CigaretteChart.js +33 -30
  131. package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
  132. package/lib/es6/component/Chart/CigaretteChart.type.js.map +1 -1
  133. package/lib/es6/component/Chart/CompactHorizontalBarChart.js +2 -1
  134. package/lib/es6/component/Chart/CompactHorizontalBarChart.js.map +1 -1
  135. package/lib/es6/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
  136. package/lib/es6/component/Chart/DonutChart.js +5 -4
  137. package/lib/es6/component/Chart/DonutChart.js.map +1 -1
  138. package/lib/es6/component/Chart/DonutChart.type.js.map +1 -1
  139. package/lib/es6/component/Chart/HistogramChart.js +6 -4
  140. package/lib/es6/component/Chart/HistogramChart.js.map +1 -1
  141. package/lib/es6/component/Chart/HistogramChart.type.js.map +1 -1
  142. package/lib/es6/component/Chart/LineChart.js +9 -7
  143. package/lib/es6/component/Chart/LineChart.js.map +1 -1
  144. package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
  145. package/lib/es6/component/Chart/RadarChart.js +3 -2
  146. package/lib/es6/component/Chart/RadarChart.js.map +1 -1
  147. package/lib/es6/component/Chart/RadarChart.type.js.map +1 -1
  148. package/lib/es6/component/Chart/ScatterPlotChart.js +20 -8
  149. package/lib/es6/component/Chart/ScatterPlotChart.js.map +1 -1
  150. package/lib/es6/component/Chart/ScatterPlotChart.type.js.map +1 -1
  151. package/lib/es6/component/Chart/VennChart.js +6 -5
  152. package/lib/es6/component/Chart/VennChart.js.map +1 -1
  153. package/lib/es6/component/Chart/VennChart.type.js.map +1 -1
  154. package/lib/es6/component/ChartLegend/BaseLegend.js +4 -2
  155. package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
  156. package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
  157. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
  158. package/lib/es6/component/ChartLegend/LegendFlex/legend-flex.shadow.css +2 -2
  159. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +23 -18
  160. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  161. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
  162. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  163. package/lib/es6/component/ChartLegend/LegendItem/legend-item.shadow.css +16 -40
  164. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +12 -8
  165. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  166. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  167. package/lib/es6/component/ChartLegend/LegendTable/legend-table.shadow.css +6 -2
  168. package/lib/es6/style/abstract-chart.shadow.css +31 -1
  169. package/lib/es6/style/area.shadow.css +6 -5
  170. package/lib/es6/style/axis.shadow.css +2 -2
  171. package/lib/es6/style/bar.shadow.css +7 -7
  172. package/lib/es6/style/bubble.shadow.css +4 -4
  173. package/lib/es6/style/donut.shadow.css +3 -3
  174. package/lib/es6/style/dot.shadow.css +9 -3
  175. package/lib/es6/style/hover.shadow.css +19 -1
  176. package/lib/es6/style/line.shadow.css +4 -4
  177. package/lib/es6/style/radar.shadow.css +5 -5
  178. package/lib/es6/style/radial-tree.shadow.css +3 -3
  179. package/lib/es6/style/reference.shadow.css +1 -1
  180. package/lib/es6/style/scatterplot.shadow.css +1 -1
  181. package/lib/es6/style/tooltip.shadow.css +23 -14
  182. package/lib/es6/style/venn.shadow.css +3 -3
  183. package/lib/es6/types/Hover.d.js.map +1 -1
  184. package/lib/es6/utils/TextMeasurer.js +25 -0
  185. package/lib/es6/utils/TextMeasurer.js.map +1 -0
  186. package/lib/esm/Area.mjs +12 -12
  187. package/lib/esm/Axis.mjs +56 -58
  188. package/lib/esm/Bar.mjs +17 -17
  189. package/lib/esm/Bubble.mjs +15 -15
  190. package/lib/esm/CompactHorizontalBar.mjs +17 -17
  191. package/lib/esm/Donut.mjs +10 -10
  192. package/lib/esm/Dots.mjs +15 -12
  193. package/lib/esm/HorizontalBar.mjs +17 -17
  194. package/lib/esm/Hover.mjs +157 -40
  195. package/lib/esm/Line.mjs +10 -10
  196. package/lib/esm/Plot.mjs +7 -5
  197. package/lib/esm/Radar.mjs +20 -20
  198. package/lib/esm/RadialTree.mjs +13 -13
  199. package/lib/esm/Reference.mjs +13 -13
  200. package/lib/esm/ScatterPlot.mjs +10 -10
  201. package/lib/esm/Tooltip.mjs +21 -12
  202. package/lib/esm/Venn.mjs +10 -10
  203. package/lib/esm/a11y/PlotA11yModule.mjs +3 -3
  204. package/lib/esm/a11y/PlotA11yView.mjs +3 -3
  205. package/lib/esm/component/Chart/AbstractChart.mjs +150 -54
  206. package/lib/esm/component/Chart/AreaChart.mjs +12 -10
  207. package/lib/esm/component/Chart/BarChart.mjs +9 -7
  208. package/lib/esm/component/Chart/BubbleChart.mjs +29 -9
  209. package/lib/esm/component/Chart/CigaretteChart.mjs +33 -30
  210. package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +2 -1
  211. package/lib/esm/component/Chart/DonutChart.mjs +5 -4
  212. package/lib/esm/component/Chart/HistogramChart.mjs +6 -4
  213. package/lib/esm/component/Chart/LineChart.mjs +9 -7
  214. package/lib/esm/component/Chart/RadarChart.mjs +3 -2
  215. package/lib/esm/component/Chart/ScatterPlotChart.mjs +25 -8
  216. package/lib/esm/component/Chart/VennChart.mjs +6 -5
  217. package/lib/esm/component/ChartLegend/BaseLegend.mjs +4 -2
  218. package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +5 -5
  219. package/lib/esm/component/ChartLegend/LegendFlex/legend-flex.shadow.css +2 -2
  220. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +24 -19
  221. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.type.mjs +1 -1
  222. package/lib/esm/component/ChartLegend/LegendItem/legend-item.shadow.css +16 -40
  223. package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +13 -9
  224. package/lib/esm/component/ChartLegend/LegendTable/legend-table.shadow.css +6 -2
  225. package/lib/esm/style/abstract-chart.shadow.css +31 -1
  226. package/lib/esm/style/area.shadow.css +6 -5
  227. package/lib/esm/style/axis.shadow.css +2 -2
  228. package/lib/esm/style/bar.shadow.css +7 -7
  229. package/lib/esm/style/bubble.shadow.css +4 -4
  230. package/lib/esm/style/donut.shadow.css +3 -3
  231. package/lib/esm/style/dot.shadow.css +9 -3
  232. package/lib/esm/style/hover.shadow.css +19 -1
  233. package/lib/esm/style/line.shadow.css +4 -4
  234. package/lib/esm/style/radar.shadow.css +5 -5
  235. package/lib/esm/style/radial-tree.shadow.css +3 -3
  236. package/lib/esm/style/reference.shadow.css +1 -1
  237. package/lib/esm/style/scatterplot.shadow.css +1 -1
  238. package/lib/esm/style/tooltip.shadow.css +23 -14
  239. package/lib/esm/style/venn.shadow.css +3 -3
  240. package/lib/esm/utils/TextMeasurer.mjs +27 -0
  241. package/lib/types/Hover.d.ts +2 -0
  242. package/lib/types/component/Chart/AbstractChart.d.ts +11 -6
  243. package/lib/types/component/Chart/AbstractChart.d.ts.map +1 -1
  244. package/lib/types/component/Chart/AbstractChart.type.d.ts +20 -2
  245. package/lib/types/component/Chart/AbstractChart.type.d.ts.map +1 -1
  246. package/lib/types/component/Chart/AreaChart.d.ts.map +1 -1
  247. package/lib/types/component/Chart/AreaChart.type.d.ts +1 -0
  248. package/lib/types/component/Chart/AreaChart.type.d.ts.map +1 -1
  249. package/lib/types/component/Chart/BarChart.d.ts.map +1 -1
  250. package/lib/types/component/Chart/BarChart.type.d.ts +1 -0
  251. package/lib/types/component/Chart/BarChart.type.d.ts.map +1 -1
  252. package/lib/types/component/Chart/BubbleChart.d.ts.map +1 -1
  253. package/lib/types/component/Chart/BubbleChart.type.d.ts +2 -1
  254. package/lib/types/component/Chart/BubbleChart.type.d.ts.map +1 -1
  255. package/lib/types/component/Chart/CigaretteChart.type.d.ts +2 -1
  256. package/lib/types/component/Chart/CigaretteChart.type.d.ts.map +1 -1
  257. package/lib/types/component/Chart/CompactHorizontalBarChart.d.ts.map +1 -1
  258. package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +2 -1
  259. package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts.map +1 -1
  260. package/lib/types/component/Chart/DonutChart.d.ts.map +1 -1
  261. package/lib/types/component/Chart/DonutChart.type.d.ts +2 -1
  262. package/lib/types/component/Chart/DonutChart.type.d.ts.map +1 -1
  263. package/lib/types/component/Chart/HistogramChart.d.ts.map +1 -1
  264. package/lib/types/component/Chart/HistogramChart.type.d.ts +1 -0
  265. package/lib/types/component/Chart/HistogramChart.type.d.ts.map +1 -1
  266. package/lib/types/component/Chart/LineChart.d.ts.map +1 -1
  267. package/lib/types/component/Chart/LineChart.type.d.ts +1 -0
  268. package/lib/types/component/Chart/LineChart.type.d.ts.map +1 -1
  269. package/lib/types/component/Chart/RadarChart.d.ts.map +1 -1
  270. package/lib/types/component/Chart/RadarChart.type.d.ts +2 -1
  271. package/lib/types/component/Chart/RadarChart.type.d.ts.map +1 -1
  272. package/lib/types/component/Chart/ScatterPlotChart.d.ts.map +1 -1
  273. package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +2 -1
  274. package/lib/types/component/Chart/ScatterPlotChart.type.d.ts.map +1 -1
  275. package/lib/types/component/Chart/VennChart.d.ts.map +1 -1
  276. package/lib/types/component/Chart/VennChart.type.d.ts +2 -1
  277. package/lib/types/component/Chart/VennChart.type.d.ts.map +1 -1
  278. package/lib/types/component/ChartLegend/BaseLegend.d.ts +5 -1
  279. package/lib/types/component/ChartLegend/BaseLegend.d.ts.map +1 -1
  280. package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +1 -1
  281. package/lib/types/component/ChartLegend/LegendItem/LegendItem.d.ts.map +1 -1
  282. package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +3 -1
  283. package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts.map +1 -1
  284. package/lib/types/component/ChartLegend/LegendTable/LegendTable.d.ts.map +1 -1
  285. package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +2 -0
  286. package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts.map +1 -1
  287. package/lib/types/utils/TextMeasurer.d.ts +5 -0
  288. package/lib/types/utils/TextMeasurer.d.ts.map +1 -0
  289. package/package.json +15 -15
@@ -1 +1 @@
1
- {"version":3,"file":"Plot.js","names":["_core","require","_baseComponents","_i18nEnhance","_interopRequireDefault","_resolveColorEnhance","_eventEmitter","_react","_hints","_PlotA11yModule","_intergalacticDynamicLocales","_utils","style","sstyled","insert","PlotRoot","Component","constructor","props","_defineProperty2","default","uniqueId","React","createRef","dataHints","makeDataHintsContainer","makeDataHintsHandlers","dataStructureHints","e","scale","asProps","eventEmitter","emit","length","xScale","yScale","pX","pY","eventToPoint","rootRef","current","minX","maxX","range","maxY","minY","EventEmitter","setContext","data","width","height","locale","resolveColor","patterns","duration","yScaleDomain","domain","dataHintsHandler","setPointsDensity","Math","abs","$rootProps","size","plotId","render","_ref","_ref2","SPlot","Box","styles","Children","a11yAltTextConfig","label","getI18nText","ariaLabel","createElement","cn","assignProps","handlerMouseMove","handlerMouseLeave","PlotA11yModule","colorResolverEnhance","i18nEnhance","localizedMessages","_default","exports","createComponent"],"sources":["../../src/Plot.jsx"],"sourcesContent":["import { Box } from '@semcore/base-components';\nimport { createComponent, Component, Root, sstyled } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport colorResolverEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport EventEmitter from '@semcore/core/lib/utils/eventEmitter';\nimport React from 'react';\n\nimport { makeDataHintsHandlers, makeDataHintsContainer } from './a11y/hints';\nimport { PlotA11yModule } from './a11y/PlotA11yModule';\nimport style from './style/plot.shadow.css';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport { eventToPoint, uniqueId } from './utils';\n\nclass PlotRoot extends Component {\n static displayName = 'Plot';\n static style = style;\n\n constructor(props) {\n super(props);\n this.eventEmitter = props.eventEmitter || new EventEmitter();\n }\n\n static defaultProps = () => ({\n width: 0,\n height: 0,\n });\n\n static enhance = [colorResolverEnhance(), i18nEnhance(localizedMessages)];\n\n plotId = uniqueId();\n\n rootRef = React.createRef();\n\n dataStructureHints = this.props.dataHints || makeDataHintsContainer();\n dataHintsHandler = makeDataHintsHandlers(this.dataStructureHints);\n\n handlerMouseMove = (e) => {\n const { scale } = this.asProps;\n this.eventEmitter.emit('onMouseMoveRoot', e);\n\n if (scale && scale.length >= 2) {\n const [xScale, yScale] = scale;\n const [pX, pY] = eventToPoint(e, this.rootRef.current);\n const [minX, maxX] = xScale.range();\n const [maxY, minY] = yScale.range();\n\n if (pX >= minX && pX <= maxX && pY >= minY && pY <= maxY) {\n this.eventEmitter.emit('onMouseMoveChart', e, this.rootRef.current);\n } else {\n this.eventEmitter.emit('onMouseLeaveChart', e);\n }\n }\n };\n\n handlerMouseLeave = (e) => {\n this.eventEmitter.emit('onMouseLeaveRoot', e);\n this.eventEmitter.emit('onMouseLeaveChart', e);\n };\n\n setContext() {\n const { scale, data, width, height, locale, resolveColor, patterns, duration } = this.asProps;\n\n const yScaleDomain = scale?.[1]?.domain?.();\n if (yScaleDomain?.length && data?.length) {\n this.dataHintsHandler.setPointsDensity(\n data.length / width,\n Math.abs(yScaleDomain[1] - yScaleDomain[0]) / height,\n );\n }\n\n return {\n $rootProps: {\n size: [width, height],\n data: data,\n locale,\n scale: scale,\n eventEmitter: this.eventEmitter,\n rootRef: this.rootRef,\n dataHintsHandler: this.dataHintsHandler,\n resolveColor,\n patterns,\n duration,\n plotId: this.plotId,\n },\n };\n }\n\n render() {\n const SPlot = Root;\n const { styles, width, height, Children, data, a11yAltTextConfig, label, locale, getI18nText } =\n this.asProps;\n\n if (!width || !height) return null;\n\n const ariaLabel = label ?? getI18nText('d3Chart.Plot:aria-label');\n\n return sstyled(styles)(\n <SPlot\n render={Box}\n tag='svg'\n __excludeProps={['data', 'scale']}\n ref={this.rootRef}\n onMouseMove={this.handlerMouseMove}\n onMouseLeave={this.handlerMouseLeave}\n aria-label={ariaLabel}\n data-plot-id={this.plotId}\n >\n <Children />\n <foreignObject width='100%' height='100%' data-aria-only>\n <PlotA11yModule\n id={this.plotId}\n payload={data}\n plotLabel={label}\n locale={locale}\n plotRef={this.rootRef}\n hints={this.dataStructureHints}\n config={a11yAltTextConfig}\n />\n </foreignObject>\n </SPlot>,\n );\n }\n}\n\n/**\n * Plot\n *\n * {@link https://developer.semrush.com/intergalactic/data-display/d3-chart/d3-chart-api#plot|API} | {@link https://developer.semrush.com/intergalactic/data-display/d3-chart/d3-chart-code#chart-plot|Examples}\n */\nexport default createComponent(PlotRoot);\n"],"mappings":";;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AADA,IAAAC,eAAA,GAAAD,OAAA;AAEA,IAAAE,YAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,aAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,MAAA,GAAAH,sBAAA,CAAAH,OAAA;AAEA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,eAAA,GAAAR,OAAA;AAEA,IAAAS,4BAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AAAiD;AAAA,MAAAW,KAAA,8BAAAZ,KAAA,CAAAa,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;AAAA;AAEjD,MAAMC,QAAQ,SAASC,eAAS,CAAC;EAI/BC,WAAWA,CAACC,KAAK,EAAE;IACjB,KAAK,CAACA,KAAK,CAAC;IAAC,IAAAC,gBAAA,CAAAC,OAAA,kBAWN,IAAAC,eAAQ,EAAC,CAAC;IAAA,IAAAF,gBAAA,CAAAC,OAAA,gCAETE,cAAK,CAACC,SAAS,CAAC,CAAC;IAAA,IAAAJ,gBAAA,CAAAC,OAAA,8BAEN,IAAI,CAACF,KAAK,CAACM,SAAS,IAAI,IAAAC,6BAAsB,EAAC,CAAC;IAAA,IAAAN,gBAAA,CAAAC,OAAA,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AO;EAC3BkC,KAAK,EAAE,CAAC;EACRC,MAAM,EAAE;AACV,CAAC,CAAC;AAAA,IAAA/B,gBAAA,CAAAC,OAAA,EAZEL,QAAQ,aAcK,CAAC,IAAAkE,4BAAoB,EAAC,CAAC,EAAE,IAAAC,oBAAW,EAACC,8CAAiB,CAAC,CAAC;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAAjE,OAAA,GAsG5D,IAAAkE,qBAAe,EAACvE,QAAQ,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Plot.js","names":["_core","require","_baseComponents","_i18nEnhance","_interopRequireDefault","_resolveColorEnhance","_eventEmitter","_react","_hints","_PlotA11yModule","_intergalacticDynamicLocales","_utils","style","sstyled","insert","PlotRoot","Component","constructor","props","_defineProperty2","default","uniqueId","React","createRef","dataHints","makeDataHintsContainer","makeDataHintsHandlers","dataStructureHints","e","scale","asProps","eventEmitter","emit","length","xScale","yScale","pX","pY","eventToPoint","rootRef","current","minX","maxX","range","maxY","minY","isTickUnder","EventEmitter","setContext","data","width","height","locale","resolveColor","patterns","duration","yScaleDomain","domain","dataHintsHandler","setPointsDensity","Math","abs","$rootProps","size","plotId","render","_ref","_ref2","SPlot","Box","styles","Children","a11yAltTextConfig","label","getI18nText","ariaLabel","createElement","cn","assignProps","handlerMouseMove","handlerMouseLeave","PlotA11yModule","colorResolverEnhance","i18nEnhance","localizedMessages","_default","exports","createComponent"],"sources":["../../src/Plot.jsx"],"sourcesContent":["import { Box } from '@semcore/base-components';\nimport { createComponent, Component, Root, sstyled } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport colorResolverEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport EventEmitter from '@semcore/core/lib/utils/eventEmitter';\nimport React from 'react';\n\nimport { makeDataHintsHandlers, makeDataHintsContainer } from './a11y/hints';\nimport { PlotA11yModule } from './a11y/PlotA11yModule';\nimport style from './style/plot.shadow.css';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport { eventToPoint, uniqueId } from './utils';\n\nclass PlotRoot extends Component {\n static displayName = 'Plot';\n static style = style;\n\n constructor(props) {\n super(props);\n this.eventEmitter = props.eventEmitter || new EventEmitter();\n }\n\n static defaultProps = () => ({\n width: 0,\n height: 0,\n });\n\n static enhance = [colorResolverEnhance(), i18nEnhance(localizedMessages)];\n\n plotId = uniqueId();\n\n rootRef = React.createRef();\n\n dataStructureHints = this.props.dataHints || makeDataHintsContainer();\n dataHintsHandler = makeDataHintsHandlers(this.dataStructureHints);\n\n handlerMouseMove = (e) => {\n const { scale } = this.asProps;\n this.eventEmitter.emit('onMouseMoveRoot', e);\n\n if (scale && scale.length >= 2) {\n const [xScale, yScale] = scale;\n const [pX, pY] = eventToPoint(e, this.rootRef.current);\n const [minX, maxX] = xScale.range();\n const [maxY, minY] = yScale.range();\n\n if (pX >= minX && pX <= maxX && pY >= minY) {\n const isTickUnder = pY >= maxY;\n\n this.eventEmitter.emit('onMouseMoveChart', e, this.rootRef.current, isTickUnder);\n } else {\n this.eventEmitter.emit('onMouseLeaveChart', e);\n }\n }\n };\n\n handlerMouseLeave = (e) => {\n this.eventEmitter.emit('onMouseLeaveRoot', e);\n this.eventEmitter.emit('onMouseLeaveChart', e);\n };\n\n setContext() {\n const { scale, data, width, height, locale, resolveColor, patterns, duration } = this.asProps;\n\n const yScaleDomain = scale?.[1]?.domain?.();\n if (yScaleDomain?.length && data?.length) {\n this.dataHintsHandler.setPointsDensity(\n data.length / width,\n Math.abs(yScaleDomain[1] - yScaleDomain[0]) / height,\n );\n }\n\n return {\n $rootProps: {\n size: [width, height],\n data: data,\n locale,\n scale: scale,\n eventEmitter: this.eventEmitter,\n rootRef: this.rootRef,\n dataHintsHandler: this.dataHintsHandler,\n dataHints: this.dataStructureHints,\n resolveColor,\n patterns,\n duration,\n plotId: this.plotId,\n },\n };\n }\n\n render() {\n const SPlot = Root;\n const { styles, width, height, Children, data, a11yAltTextConfig, label, locale, getI18nText } =\n this.asProps;\n\n if (!width || !height) return null;\n\n const ariaLabel = label ?? getI18nText('d3Chart.Plot:aria-label');\n\n return sstyled(styles)(\n <SPlot\n render={Box}\n tag='svg'\n __excludeProps={['data', 'scale']}\n ref={this.rootRef}\n onMouseMove={this.handlerMouseMove}\n onMouseLeave={this.handlerMouseLeave}\n aria-label={ariaLabel}\n data-plot-id={this.plotId}\n >\n <Children />\n <foreignObject width='100%' height='100%' data-aria-only>\n <PlotA11yModule\n id={this.plotId}\n payload={data}\n plotLabel={label}\n locale={locale}\n plotRef={this.rootRef}\n hints={this.dataStructureHints}\n config={a11yAltTextConfig}\n />\n </foreignObject>\n </SPlot>,\n );\n }\n}\n\n/**\n * Plot\n *\n * {@link https://developer.semrush.com/intergalactic/data-display/d3-chart/d3-chart-api#plot|API} | {@link https://developer.semrush.com/intergalactic/data-display/d3-chart/d3-chart-code#chart-plot|Examples}\n */\nexport default createComponent(PlotRoot);\n"],"mappings":";;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AADA,IAAAC,eAAA,GAAAD,OAAA;AAEA,IAAAE,YAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,aAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,MAAA,GAAAH,sBAAA,CAAAH,OAAA;AAEA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,eAAA,GAAAR,OAAA;AAEA,IAAAS,4BAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AAAiD;AAAA,MAAAW,KAAA,8BAAAZ,KAAA,CAAAa,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;AAAA;AAEjD,MAAMC,QAAQ,SAASC,eAAS,CAAC;EAI/BC,WAAWA,CAACC,KAAK,EAAE;IACjB,KAAK,CAACA,KAAK,CAAC;IAAC,IAAAC,gBAAA,CAAAC,OAAA,kBAWN,IAAAC,eAAQ,E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,OAAO;MAAA,SACd,IAAI,CAACZ,kBAAkB;MAAA,UACtB6C;IAAiB,EAC1B,CACY,CACV,CAAC;EAEZ;AACF;;AAEA;AACA;AACA;AACA;AACA;AAJA,IAAArD,gBAAA,CAAAC,OAAA,EAlHML,QAAQ,iBACS,MAAM;AAAA,IAAAI,gBAAA,CAAAC,OAAA,EADvBL,QAAQ,WAEGH,KAAK;AAAA,IAAAO,gBAAA,CAAAC,OAAA,EAFhBL,QAAQ,kBASU,OAAO;EAC3BmC,KAAK,EAAE,CAAC;EACRC,MAAM,EAAE;AACV,CAAC,CAAC;AAAA,IAAAhC,gBAAA,CAAAC,OAAA,EAZEL,QAAQ,aAcK,CAAC,IAAAmE,4BAAoB,EAAC,CAAC,EAAE,IAAAC,oBAAW,EAACC,8CAAiB,CAAC,CAAC;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAAlE,OAAA,GAyG5D,IAAAmE,qBAAe,EAACxE,QAAQ,CAAC","ignoreList":[]}
package/lib/cjs/Radar.js CHANGED
@@ -21,27 +21,27 @@ var _Pattern = require("./Pattern");
21
21
  var _Tooltip = _interopRequireDefault(require("./Tooltip"));
22
22
  var _utils = require("./utils");
23
23
  /*!__reshadow-styles__:"./style/radar.shadow.css"*/
24
- const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SAxisLine_glazl_gg_,.___SAxisTick_glazl_gg_,.___SAxis_glazl_gg_{stroke:var(--intergalactic-chart-grid-line,oklch(.95 .002 180));stroke-width:1;fill:#0000}.___SAxisLine_glazl_gg_,.___SAxisTick_glazl_gg_{stroke-dasharray:2}.___SAxisLine_glazl_gg_.__active_glazl_gg_{stroke:var(--intergalactic-chart-grid-y-accent-hover-line,oklch(.88 .002 175.6))}.___SAxisLabel_glazl_gg_{text-anchor:middle;dominant-baseline:central;font-size:12px}.___SAxisLabel_glazl_gg_.__xDirection_glazl_gg_{text-anchor:var(--xDirection_glazl)}.___SAxisLabel_glazl_gg_.__yDirection_glazl_gg_{dominant-baseline:var(--yDirection_glazl)}.___SPolygon_glazl_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.58 .168 278.2));opacity:.2}.___SPolygon_glazl_gg_.__color_glazl_gg_{fill:var(--color_glazl)}.___SPolygon_glazl_gg_.__pattern_glazl_gg_.__color_glazl_gg_{fill:var(--pattern_glazl);stroke:var(--color_glazl);stroke-width:1px}.___SPolygonDot_glazl_gg_{stroke-width:2px;stroke:var(--intergalactic-chart-grid-border,#fff);r:6px;fill:var(--intergalactic-chart-palette-order-1,oklch(.58 .168 278.2))}.___SPolygonDot_glazl_gg_.__transparent_glazl_gg_{opacity:.3}.___SPolygonDot_glazl_gg_.__color_glazl_gg_{fill:var(--color_glazl)}.___SPolygonLine_glazl_gg_{stroke:var(--intergalactic-chart-palette-order-1,oklch(.58 .168 278.2));stroke-width:3;fill:#0000}.___SPolygonLine_glazl_gg_.__transparent_glazl_gg_{opacity:.3}.___SPolygonLine_glazl_gg_.__color_glazl_gg_{stroke:var(--color_glazl)}.___SPieRect_glazl_gg_{outline:none;fill:var(--intergalactic-chart-grid-bar-chart-hover,oklch(.177 .033 175.6/.028))}", /*__inner_css_end__*/"glazl_gg_"),
24
+ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SAxisLine_1hpm6_gg_,.___SAxisTick_1hpm6_gg_,.___SAxis_1hpm6_gg_{stroke:var(--intergalactic-chart-grid-line,oklch(.95 .002 180));stroke-width:1;fill:#0000}.___SAxisLine_1hpm6_gg_,.___SAxisTick_1hpm6_gg_{stroke-dasharray:2}.___SAxisLine_1hpm6_gg_.__active_1hpm6_gg_{stroke:var(--intergalactic-chart-grid-y-accent-hover-line,oklch(.88 .002 175.6))}.___SAxisLabel_1hpm6_gg_{text-anchor:middle;dominant-baseline:central;font-size:12px}.___SAxisLabel_1hpm6_gg_.__xDirection_1hpm6_gg_{text-anchor:var(--xDirection_1hpm6)}.___SAxisLabel_1hpm6_gg_.__yDirection_1hpm6_gg_{dominant-baseline:var(--yDirection_1hpm6)}.___SPolygon_1hpm6_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140));opacity:.2}.___SPolygon_1hpm6_gg_.__color_1hpm6_gg_{fill:var(--color_1hpm6)}.___SPolygon_1hpm6_gg_.__pattern_1hpm6_gg_.__color_1hpm6_gg_{fill:var(--pattern_1hpm6);stroke:var(--color_1hpm6);stroke-width:1px}.___SPolygonDot_1hpm6_gg_{stroke-width:2px;stroke:var(--intergalactic-chart-grid-border,#fff);r:6px;fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140))}.___SPolygonDot_1hpm6_gg_.__transparent_1hpm6_gg_{opacity:.3}.___SPolygonDot_1hpm6_gg_.__color_1hpm6_gg_{fill:var(--color_1hpm6)}.___SPolygonLine_1hpm6_gg_{stroke:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140));stroke-width:3;fill:#0000}.___SPolygonLine_1hpm6_gg_.__transparent_1hpm6_gg_{opacity:.3}.___SPolygonLine_1hpm6_gg_.__color_1hpm6_gg_{stroke:var(--color_1hpm6)}.___SPieRect_1hpm6_gg_{outline:none;fill:var(--intergalactic-chart-grid-bar-chart-hover,oklch(.177 .033 175.6/.042))}", /*__inner_css_end__*/"1hpm6_gg_"),
25
25
  /*__reshadow_css_end__*/
26
26
  {
27
- "__SAxis": "___SAxis_glazl_gg_",
28
- "__SAxisLine": "___SAxisLine_glazl_gg_",
29
- "__SAxisTick": "___SAxisTick_glazl_gg_",
30
- "_active": "__active_glazl_gg_",
31
- "__SAxisLabel": "___SAxisLabel_glazl_gg_",
32
- "_xDirection": "__xDirection_glazl_gg_",
33
- "--xDirection": "--xDirection_glazl",
34
- "_yDirection": "__yDirection_glazl_gg_",
35
- "--yDirection": "--yDirection_glazl",
36
- "__SPolygon": "___SPolygon_glazl_gg_",
37
- "_color": "__color_glazl_gg_",
38
- "--color": "--color_glazl",
39
- "_pattern": "__pattern_glazl_gg_",
40
- "--pattern": "--pattern_glazl",
41
- "__SPolygonDot": "___SPolygonDot_glazl_gg_",
42
- "_transparent": "__transparent_glazl_gg_",
43
- "__SPolygonLine": "___SPolygonLine_glazl_gg_",
44
- "__SPieRect": "___SPieRect_glazl_gg_"
27
+ "__SAxis": "___SAxis_1hpm6_gg_",
28
+ "__SAxisLine": "___SAxisLine_1hpm6_gg_",
29
+ "__SAxisTick": "___SAxisTick_1hpm6_gg_",
30
+ "_active": "__active_1hpm6_gg_",
31
+ "__SAxisLabel": "___SAxisLabel_1hpm6_gg_",
32
+ "_xDirection": "__xDirection_1hpm6_gg_",
33
+ "--xDirection": "--xDirection_1hpm6",
34
+ "_yDirection": "__yDirection_1hpm6_gg_",
35
+ "--yDirection": "--yDirection_1hpm6",
36
+ "__SPolygon": "___SPolygon_1hpm6_gg_",
37
+ "_color": "__color_1hpm6_gg_",
38
+ "--color": "--color_1hpm6",
39
+ "_pattern": "__pattern_1hpm6_gg_",
40
+ "--pattern": "--pattern_1hpm6",
41
+ "__SPolygonDot": "___SPolygonDot_1hpm6_gg_",
42
+ "_transparent": "__transparent_1hpm6_gg_",
43
+ "__SPolygonLine": "___SPolygonLine_1hpm6_gg_",
44
+ "__SPieRect": "___SPieRect_1hpm6_gg_"
45
45
  });
46
46
  const clampAngle = angle => {
47
47
  angle = angle % (2 * Math.PI);
@@ -17,20 +17,20 @@ var _createElement = _interopRequireDefault(require("./createElement"));
17
17
  var _Pattern = require("./Pattern");
18
18
  var _utils = require("./utils");
19
19
  /*!__reshadow-styles__:"./style/radial-tree.shadow.css"*/
20
- const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SRadian_1cg1e_gg_{cursor:pointer;fill:var(--intergalactic-text-large-info,oklch(.53 .157 279.2))}.___SLine_1cg1e_gg_{stroke:var(--intergalactic-text-large-info,oklch(.53 .157 279.2))}.___SLine_1cg1e_gg_.__stroke_1cg1e_gg_{stroke:var(--stroke_1cg1e)}.___SLine_1cg1e_gg_.__transparent_1cg1e_gg_{opacity:.3}.___SCap_1cg1e_gg_{transition:r .1s}.___SCap_1cg1e_gg_.__pattern_1cg1e_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:1px}.___SCap_1cg1e_gg_.__transparent_1cg1e_gg_,.___SIcon_1cg1e_gg_.__transparent_1cg1e_gg_{opacity:.3}.___SLabel_1cg1e_gg_{fill:var(--color_1cg1e)}.___SLabel_1cg1e_gg_.__transparent_1cg1e_gg_{opacity:.3}@media (hover:hover){.___SRadian_1cg1e_gg_:hover .___SLabel_1cg1e_gg_{cursor:pointer;filter:brightness(.6)}}@media (prefers-reduced-motion){.___SLineCap_1cg1e_gg_{transition:none}}", /*__inner_css_end__*/"1cg1e_gg_"),
20
+ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SRadian_ojwuj_gg_{cursor:pointer;fill:var(--intergalactic-text-large-info,oklch(.6 .166 277.7))}.___SLine_ojwuj_gg_{stroke:var(--intergalactic-text-large-info,oklch(.6 .166 277.7))}.___SLine_ojwuj_gg_.__stroke_ojwuj_gg_{stroke:var(--stroke_ojwuj)}.___SLine_ojwuj_gg_.__transparent_ojwuj_gg_{opacity:.3}.___SCap_ojwuj_gg_{transition:r .1s}.___SCap_ojwuj_gg_.__pattern_ojwuj_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:1px}.___SCap_ojwuj_gg_.__transparent_ojwuj_gg_,.___SIcon_ojwuj_gg_.__transparent_ojwuj_gg_{opacity:.3}.___SLabel_ojwuj_gg_{fill:var(--color_ojwuj)}.___SLabel_ojwuj_gg_.__transparent_ojwuj_gg_{opacity:.3}@media (hover:hover){.___SRadian_ojwuj_gg_:hover .___SLabel_ojwuj_gg_{cursor:pointer;filter:brightness(.6)}}@media (prefers-reduced-motion){.___SLineCap_ojwuj_gg_{transition:none}}", /*__inner_css_end__*/"ojwuj_gg_"),
21
21
  /*__reshadow_css_end__*/
22
22
  {
23
- "__SRadian": "___SRadian_1cg1e_gg_",
24
- "__SLine": "___SLine_1cg1e_gg_",
25
- "_stroke": "__stroke_1cg1e_gg_",
26
- "--stroke": "--stroke_1cg1e",
27
- "_transparent": "__transparent_1cg1e_gg_",
28
- "__SCap": "___SCap_1cg1e_gg_",
29
- "_pattern": "__pattern_1cg1e_gg_",
30
- "__SIcon": "___SIcon_1cg1e_gg_",
31
- "__SLabel": "___SLabel_1cg1e_gg_",
32
- "--color": "--color_1cg1e",
33
- "__SLineCap": "___SLineCap_1cg1e_gg_"
23
+ "__SRadian": "___SRadian_ojwuj_gg_",
24
+ "__SLine": "___SLine_ojwuj_gg_",
25
+ "_stroke": "__stroke_ojwuj_gg_",
26
+ "--stroke": "--stroke_ojwuj",
27
+ "_transparent": "__transparent_ojwuj_gg_",
28
+ "__SCap": "___SCap_ojwuj_gg_",
29
+ "_pattern": "__pattern_ojwuj_gg_",
30
+ "__SIcon": "___SIcon_ojwuj_gg_",
31
+ "__SLabel": "___SLabel_ojwuj_gg_",
32
+ "--color": "--color_ojwuj",
33
+ "__SLineCap": "___SLineCap_ojwuj_gg_"
34
34
  });
35
35
  const baseAngle = -Math.PI / 2; // The top vertical line
36
36
 
@@ -12,20 +12,20 @@ var _react = _interopRequireDefault(require("react"));
12
12
  var _createElement = _interopRequireDefault(require("./createElement"));
13
13
  var _utils = require("./utils");
14
14
  /*!__reshadow-styles__:"./style/reference.shadow.css"*/
15
- const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SReferenceLine_1xddn_gg_{fill:none;stroke:var(--intergalactic-chart-grid-y-accent-hover-line,oklch(.88 .002 175.6))}.___STitle_1xddn_gg_{font-size:var(--intergalactic-fs-100,12px);fill:var(--intergalactic-chart-grid-text-label,#00030095);transform-origin:var(--transform-origin_1xddn)}@media (color-gamut:p3){.___STitle_1xddn_gg_{fill:var(--intergalactic-chart-grid-text-label,oklch(.088 .026 147.7/.583))}}.___STitle_1xddn_gg_._position_top_1xddn_gg_{text-anchor:middle}.___STitle_1xddn_gg_._position_bottom_1xddn_gg_{text-anchor:middle;dominant-baseline:hanging}.___STitle_1xddn_gg_._position_left_1xddn_gg_,.___STitle_1xddn_gg_._position_right_1xddn_gg_{transform:rotate(-90deg);dominant-baseline:middle;text-anchor:middle}.___SBackground_1xddn_gg_{fill:var(--intergalactic-chart-grid-period-bg,oklch(.96 .001 180))}.___SStripes_1xddn_gg_{fill:var(--fill_1xddn)}.___SStripesPatternPath_1xddn_gg_{stroke:var(--intergalactic-chart-grid-period-pattern,oklch(.95 .002 180));stroke-width:1px}", /*__inner_css_end__*/"1xddn_gg_"),
15
+ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SReferenceLine_1ycra_gg_{fill:none;stroke:var(--intergalactic-chart-grid-y-accent-hover-line,oklch(.88 .002 175.6))}.___STitle_1ycra_gg_{font-size:var(--intergalactic-fs-100,12px);fill:var(--intergalactic-chart-grid-text-label,oklch(.097 .023 156.5/.468));transform-origin:var(--transform-origin_1ycra)}.___STitle_1ycra_gg_._position_top_1ycra_gg_{text-anchor:middle}.___STitle_1ycra_gg_._position_bottom_1ycra_gg_{text-anchor:middle;dominant-baseline:hanging}.___STitle_1ycra_gg_._position_left_1ycra_gg_,.___STitle_1ycra_gg_._position_right_1ycra_gg_{transform:rotate(-90deg);dominant-baseline:middle;text-anchor:middle}.___SBackground_1ycra_gg_{fill:var(--intergalactic-chart-grid-period-bg,oklch(.96 .001 180))}.___SStripes_1ycra_gg_{fill:var(--fill_1ycra)}.___SStripesPatternPath_1ycra_gg_{stroke:var(--intergalactic-chart-grid-period-pattern,oklch(.95 .002 180));stroke-width:1px}", /*__inner_css_end__*/"1ycra_gg_"),
16
16
  /*__reshadow_css_end__*/
17
17
  {
18
- "__SReferenceLine": "___SReferenceLine_1xddn_gg_",
19
- "__STitle": "___STitle_1xddn_gg_",
20
- "--transform-origin": "--transform-origin_1xddn",
21
- "_position_top": "_position_top_1xddn_gg_",
22
- "_position_bottom": "_position_bottom_1xddn_gg_",
23
- "_position_right": "_position_right_1xddn_gg_",
24
- "_position_left": "_position_left_1xddn_gg_",
25
- "__SBackground": "___SBackground_1xddn_gg_",
26
- "__SStripes": "___SStripes_1xddn_gg_",
27
- "--fill": "--fill_1xddn",
28
- "__SStripesPatternPath": "___SStripesPatternPath_1xddn_gg_"
18
+ "__SReferenceLine": "___SReferenceLine_1ycra_gg_",
19
+ "__STitle": "___STitle_1ycra_gg_",
20
+ "--transform-origin": "--transform-origin_1ycra",
21
+ "_position_top": "_position_top_1ycra_gg_",
22
+ "_position_bottom": "_position_bottom_1ycra_gg_",
23
+ "_position_right": "_position_right_1ycra_gg_",
24
+ "_position_left": "_position_left_1ycra_gg_",
25
+ "__SBackground": "___SBackground_1ycra_gg_",
26
+ "__SStripes": "___SStripes_1ycra_gg_",
27
+ "--fill": "--fill_1ycra",
28
+ "__SStripesPatternPath": "___SStripesPatternPath_1ycra_gg_"
29
29
  });
30
30
  const side2direction = {
31
31
  left: 'vertical',
@@ -16,17 +16,17 @@ var _Pattern = require("./Pattern");
16
16
  var _Tooltip = _interopRequireDefault(require("./Tooltip"));
17
17
  var _utils = require("./utils");
18
18
  /*!__reshadow-styles__:"./style/scatterplot.shadow.css"*/
19
- const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SScatterPlot_14nlj_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.58 .168 278.2));transition-property:cx,cy;transition-duration:var(--duration_14nlj);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SScatterPlot_14nlj_gg_:hover{opacity:.8}}.___SScatterPlot_14nlj_gg_.__color_14nlj_gg_{fill:var(--color_14nlj)}.___SScatterPlot_14nlj_gg_.__pattern_14nlj_gg_.__color_14nlj_gg_{fill:var(--pattern_14nlj);stroke:var(--color_14nlj);stroke-width:1px}.___SScatterPlot_14nlj_gg_.__transparent_14nlj_gg_{opacity:.3}.___SValue_14nlj_gg_{text-anchor:middle;font-size:var(--intergalactic-fs-50,10px);stroke:var(--intergalactic-chart-palette-order-9,oklch(.53 .157 279.2))}.___SValue_14nlj_gg_.__color_14nlj_gg_{stroke:var(--color_14nlj)}.___SValue_14nlj_gg_.__transparent_14nlj_gg_{opacity:.3}", /*__inner_css_end__*/"14nlj_gg_"),
19
+ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SScatterPlot_1kxs7_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140));transition-property:cx,cy;transition-duration:var(--duration_1kxs7);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SScatterPlot_1kxs7_gg_:hover{opacity:.8}}.___SScatterPlot_1kxs7_gg_.__color_1kxs7_gg_{fill:var(--color_1kxs7)}.___SScatterPlot_1kxs7_gg_.__pattern_1kxs7_gg_.__color_1kxs7_gg_{fill:var(--pattern_1kxs7);stroke:var(--color_1kxs7);stroke-width:1px}.___SScatterPlot_1kxs7_gg_.__transparent_1kxs7_gg_{opacity:.3}.___SValue_1kxs7_gg_{text-anchor:middle;font-size:var(--intergalactic-fs-50,10px);stroke:var(--intergalactic-chart-palette-order-9,oklch(.53 .157 279.2))}.___SValue_1kxs7_gg_.__color_1kxs7_gg_{stroke:var(--color_1kxs7)}.___SValue_1kxs7_gg_.__transparent_1kxs7_gg_{opacity:.3}", /*__inner_css_end__*/"1kxs7_gg_"),
20
20
  /*__reshadow_css_end__*/
21
21
  {
22
- "__SScatterPlot": "___SScatterPlot_14nlj_gg_",
23
- "_color": "__color_14nlj_gg_",
24
- "--color": "--color_14nlj",
25
- "_pattern": "__pattern_14nlj_gg_",
26
- "--pattern": "--pattern_14nlj",
27
- "_transparent": "__transparent_14nlj_gg_",
28
- "__SValue": "___SValue_14nlj_gg_",
29
- "--duration": "--duration_14nlj"
22
+ "__SScatterPlot": "___SScatterPlot_1kxs7_gg_",
23
+ "_color": "__color_1kxs7_gg_",
24
+ "--color": "--color_1kxs7",
25
+ "_pattern": "__pattern_1kxs7_gg_",
26
+ "--pattern": "--pattern_1kxs7",
27
+ "_transparent": "__transparent_1kxs7_gg_",
28
+ "__SValue": "___SValue_1kxs7_gg_",
29
+ "--duration": "--duration_1kxs7"
30
30
  });
31
31
  class ScatterPlotRoot extends _core.Component {
32
32
  constructor(...args) {
@@ -15,17 +15,20 @@ var _createElement = _interopRequireDefault(require("./createElement"));
15
15
  var _Pattern = require("./Pattern");
16
16
  var _utils = require("./utils");
17
17
  /*!__reshadow-styles__:"./style/tooltip.shadow.css"*/
18
- const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___STooltip_dy7ls_gg_{font-size:var(--intergalactic-fs-100,12px);line-height:var(--intergalactic-lh-100,133%);position:relative;background-color:var(--intergalactic-bg-primary-neutral,oklch(1 0 0));border-radius:var(--intergalactic-popper-rounded,6px);border:1px solid var(--intergalactic-border-secondary,#00151012);box-sizing:border-box;box-shadow:var(--intergalactic-box-shadow-popper,1px 1px 10px 0 #00151012);padding:var(--intergalactic-spacing-3x,12px)}@media (color-gamut:p3){.___STooltip_dy7ls_gg_{border:1px solid var(--intergalactic-border-secondary,oklch(.176 .033 175.7/.07));box-shadow:var(--intergalactic-box-shadow-popper,1px 1px 10px 0 oklch(.176 .033 175.7/.07))}}.___STitle_dy7ls_gg_{color:var(--intergalactic-text-secondary,#00030095);margin-bottom:var(--intergalactic-spacing-2x,8px)}@media (color-gamut:p3){.___STitle_dy7ls_gg_{color:var(--intergalactic-text-secondary,oklch(.088 .026 147.7/.583))}}.___SDotGroup_dy7ls_gg_{display:flex;align-items:center}.___SDot_dy7ls_gg_{margin-right:var(--intergalactic-spacing-2x,8px)}.___SDotCircle_dy7ls_gg_.__color_dy7ls_gg_{background-color:var(--color_dy7ls);width:8px;height:8px;border-radius:50%}.___SFooter_dy7ls_gg_{background:var(--intergalactic-bg-secondary-neutral,oklch(.98 .001 180));padding:var(--intergalactic-spacing-1x,4px) var(--intergalactic-spacing-3x,12px);border-radius:0 0 var(--intergalactic-rounded-medium,6px) var(--intergalactic-rounded-medium,6px);margin:var(--intergalactic-spacing-3x,12px) calc(var(--intergalactic-spacing-3x, 12px)*-1) calc(var(--intergalactic-spacing-3x, 12px)*-1)}", /*__inner_css_end__*/"dy7ls_gg_"),
18
+ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___STooltip_oee7t_gg_{font-size:var(--intergalactic-fs-100,12px);line-height:var(--intergalactic-lh-100,1.3334);font-feature-settings:\"tnum\";font-variant-numeric:tabular-nums;position:relative;color:var(--intergalactic-text-primary-invert,oklch(.999 .001 180/.949));background-color:var(--intergalactic-tooltip-bg-invert,oklch(.23 .01 140));border-radius:var(--intergalactic-popper-rounded,6px);border:1px solid var(--intergalactic-tooltip-border-invert,oklch(.4 .004 140));box-sizing:border-box;box-shadow:var(--intergalactic-box-shadow-popper,1px 1px 10px 0 #00151012);padding:var(--intergalactic-spacing-content-padding-medium,12px)}@media (color-gamut:p3){.___STooltip_oee7t_gg_{box-shadow:var(--intergalactic-box-shadow-popper,1px 1px 10px 0 oklch(.176 .033 175.7/.07))}}.___STitle_oee7t_gg_{color:var(--intergalactic-text-secondary-invert,oklch(.997 .004 165.9/.684));margin-bottom:var(--intergalactic-spacing-content-gap-large,8px)}.___SDotGroup_oee7t_gg_{display:flex;align-items:center}.___SDot_oee7t_gg_{margin-right:var(--intergalactic-spacing-content-gap-large,8px)}.___SDotCircle_oee7t_gg_.__color_oee7t_gg_.__lightness_oee7t_gg_{background-color:var(--color_oee7t);width:10px;height:10px;border-radius:50%;box-shadow:0 0 0 1px oklch(from var(--color_oee7t) calc(l + var(--lightness_oee7t)) c h)}.___SFooter_oee7t_gg_{background:var(--intergalactic-bg-secondary-invert,oklch(.969 .057 140/.118));color:var(--intergalactic-text-secondary-invert,oklch(.997 .004 165.9/.684));padding:var(--intergalactic-spacing-content-padding-xsmall,4px) var(--intergalactic-spacing-content-padding-medium,12px);border-radius:0 0 var(--intergalactic-rounded-medium,6px) var(--intergalactic-rounded-medium,6px);margin:var(--intergalactic-spacing-content-gap-xlarge,12px) calc(var(--intergalactic-spacing-content-gap-xlarge, 12px)*-1) calc(var(--intergalactic-spacing-content-gap-xlarge, 12px)*-1)}.___SDotPattern_oee7t_gg_{stroke-width:1px;stroke:oklch(from var(--intergalactic-chart-grid-border,#fff) l c h/.5)}", /*__inner_css_end__*/"oee7t_gg_"),
19
19
  /*__reshadow_css_end__*/
20
20
  {
21
- "__STooltip": "___STooltip_dy7ls_gg_",
22
- "__STitle": "___STitle_dy7ls_gg_",
23
- "__SDotGroup": "___SDotGroup_dy7ls_gg_",
24
- "__SDot": "___SDot_dy7ls_gg_",
25
- "__SDotCircle": "___SDotCircle_dy7ls_gg_",
26
- "_color": "__color_dy7ls_gg_",
27
- "--color": "--color_dy7ls",
28
- "__SFooter": "___SFooter_dy7ls_gg_"
21
+ "__STooltip": "___STooltip_oee7t_gg_",
22
+ "__STitle": "___STitle_oee7t_gg_",
23
+ "__SDotGroup": "___SDotGroup_oee7t_gg_",
24
+ "__SDot": "___SDot_oee7t_gg_",
25
+ "__SDotCircle": "___SDotCircle_oee7t_gg_",
26
+ "_color": "__color_oee7t_gg_",
27
+ "_lightness": "__lightness_oee7t_gg_",
28
+ "--color": "--color_oee7t",
29
+ "--lightness": "--lightness_oee7t",
30
+ "__SFooter": "___SFooter_oee7t_gg_",
31
+ "__SDotPattern": "___SDotPattern_oee7t_gg_"
29
32
  });
30
33
  /**
31
34
  * `TooltipDotRenderContext` is a hack to bypass problem that getDotProps doesn't work for D3 tooltip.
@@ -212,6 +215,10 @@ function Title(props) {
212
215
  }));
213
216
  }
214
217
  Title.style = style;
218
+ const CHART_PALETTE_ORDER_TO_LIGHTNESS = {
219
+ 'chart-palette-order-1': 0.35,
220
+ 'DEFAULT': 0.15
221
+ };
215
222
  function Dot(props) {
216
223
  var _ref4 = arguments[0],
217
224
  _ref8;
@@ -232,16 +239,18 @@ function Dot(props) {
232
239
  const SDotGroup = _baseComponents.Box;
233
240
  const SDot = _baseComponents.Box;
234
241
  const SDotCircle = _baseComponents.Box;
242
+ const SDotPattern = _Pattern.PatternSymbol;
235
243
  return _ref8 = (0, _core.sstyled)(styles), /*#__PURE__*/_react.default.createElement(SDotGroup, _ref8.cn("SDotGroup", {
236
244
  ...(0, _core.assignProps)({
237
245
  "use:color": undefined,
238
246
  "__excludeProps": ['data', 'scale']
239
247
  }, _ref4)
240
- }), patterns ? /*#__PURE__*/_react.default.createElement(SDot, _ref8.cn("SDot", {}), /*#__PURE__*/_react.default.createElement(_Pattern.PatternSymbol, _ref8.cn("PatternSymbol", {
248
+ }), patterns ? /*#__PURE__*/_react.default.createElement(SDot, _ref8.cn("SDot", {}), /*#__PURE__*/_react.default.createElement(SDotPattern, _ref8.cn("SDotPattern", {
241
249
  "color": resolveColor(color ?? defaultColor),
242
250
  "patternKey": color ?? defaultColor
243
251
  }))) : /*#__PURE__*/_react.default.createElement(SDot, _ref8.cn("SDot", {}), /*#__PURE__*/_react.default.createElement(SDotCircle, _ref8.cn("SDotCircle", {
244
- "color": resolveColor(color ?? defaultColor)
252
+ "color": resolveColor(color ?? defaultColor),
253
+ "lightness": CHART_PALETTE_ORDER_TO_LIGHTNESS[color ?? defaultColor] ?? CHART_PALETTE_ORDER_TO_LIGHTNESS.DEFAULT
245
254
  }))), /*#__PURE__*/_react.default.createElement(Children, _ref8.cn("Children", {})));
246
255
  }
247
256
  Dot.style = style;
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","names":["_core","require","_baseComponents","_findComponent","_interopRequireDefault","_useColorResolver","_react","_createElement","_Pattern","_utils","style","sstyled","insert","TooltipDotRenderContext","React","createContext","index","indexKeysCache","Set","TooltipRoot","Component","constructor","args","_defineProperty2","default","$visible","anchorProps","tooltipProps","x","y","e","onClick","asProps","xIndex","yIndex","state","getTriggerProps","hideHoverLine","getPopperProps","excludeAnchorProps","componentDidMount","eventEmitter","plotId","unsubscribe","push","subscribe","setState","visible","virtualElementPosition","virtualTriggerElement","setTimeout","setPopperTrigger","getBoundingClientRect","width","height","top","right","bottom","left","popper","current","update","componentWillUnmount","forEach","render","_ref","Children","children","tag","forcedAdvancedMode","_","other","advancedMode","findComponent","Tooltip","Trigger","displayName","Popper","renderContext","clear","patterns","createElement","Provider","value","assignProps","handlerCancel","allowedAutoPlacements","setTrigger","Fragment","handleTriggerClick","PopperTrigger","_ref2","arguments[0]","PopperPopper","props","_ref6","Element","STooltip","styles","useCallback","cn","Title","_ref3","_ref7","STitle","Box","Dot","_ref4","_ref8","color","resolveColor","useColorResolver","useContext","defaultColor","getChartDefaultColorName","key","has","add","SDotGroup","SDot","SDotCircle","undefined","PatternSymbol","Footer","_ref5","_ref9","SFooter","_default","exports"],"sources":["../../src/Tooltip.jsx"],"sourcesContent":["import { Popper, Box } from '@semcore/base-components';\nimport { Component, Root, sstyled } from '@semcore/core';\nimport findComponent from '@semcore/core/lib/utils/findComponent';\nimport { useColorResolver } from '@semcore/core/lib/utils/use/useColorResolver';\nimport React from 'react';\n\nimport createElement from './createElement';\nimport { PatternSymbol } from './Pattern';\nimport style from './style/tooltip.shadow.css';\nimport { getChartDefaultColorName } from './utils';\n\n/**\n * `TooltipDotRenderContext` is a hack to bypass problem that getDotProps doesn't work for D3 tooltip.\n * Probably it may be removed after migrating to a new core.\n */\nconst TooltipDotRenderContext = React.createContext({ index: -1, indexKeysCache: new Set() });\n\nclass TooltipRoot extends Component {\n static displayName = 'Tooltip';\n\n static style = style;\n\n state = {\n $visible: false,\n anchorProps: {},\n tooltipProps: {},\n };\n\n renderContext = { index: -1, indexKeysCache: new Set() };\n\n handlerCancel = () => false;\n\n getTriggerProps() {\n const { x, y, hideHoverLine } = this.asProps;\n return { x, y, hideHoverLine };\n }\n\n getPopperProps() {\n if (this.asProps.excludeAnchorProps) {\n return {\n $visible: this.state.$visible,\n ...this.state.tooltipProps,\n };\n }\n\n return {\n $visible: this.state.$visible,\n ...this.state.anchorProps,\n ...this.state.tooltipProps,\n };\n }\n\n virtualElementPosition = { x: 0, y: 0 };\n virtualTriggerElement = null;\n unsubscribe = [];\n componentDidMount() {\n const { eventEmitter, plotId } = this.asProps;\n\n this.unsubscribe.push(\n eventEmitter.subscribe(`setTooltipRenderingProps_${plotId}`, (anchorProps, tooltipProps) => {\n this.setState({ anchorProps, tooltipProps });\n }),\n eventEmitter.subscribe(`setTooltipVisible_${plotId}`, (visible) =>\n this.setState({ $visible: visible }),\n ),\n eventEmitter.subscribe(`setTooltipPosition_${plotId}`, (x, y) => {\n this.virtualElementPosition.x = x;\n this.virtualElementPosition.y = y;\n if (this.virtualTriggerElement === null) {\n this.virtualTriggerElement = {};\n setTimeout(() => {\n this.setPopperTrigger(this.virtualTriggerElement);\n }, 0);\n }\n this.virtualTriggerElement.getBoundingClientRect = () => {\n const { x, y } = this.virtualElementPosition;\n return { width: 0, height: 0, top: y, right: x, bottom: y, left: x };\n };\n this.popper.current?.update();\n }),\n );\n }\n\n componentWillUnmount() {\n this.unsubscribe.forEach((unsubscribe) => unsubscribe());\n }\n\n handleTriggerClick = (e) => {\n const { onClick } = this.asProps;\n const { xIndex, yIndex } = this.state.tooltipProps;\n\n const index = xIndex ?? yIndex;\n\n onClick?.(index, e);\n };\n\n render() {\n const { Children, children, tag, forcedAdvancedMode, onClick: _, ...other } = this.asProps;\n\n const advancedMode =\n forcedAdvancedMode ||\n !!findComponent(Children, [Tooltip.Trigger.displayName, Tooltip.Popper.displayName]);\n this.renderContext.index = -1;\n this.renderContext.indexKeysCache.clear();\n this.renderContext.patterns = this.asProps.patterns ?? this.state.tooltipProps.patterns;\n\n return (\n <TooltipDotRenderContext.Provider value={this.renderContext}>\n <Root\n render={Popper}\n visible={this.state.$visible}\n onFirstUpdate={this.handlerCancel}\n onOutsideClick={this.handlerCancel}\n interaction='none'\n explicitTriggerSet\n offset={8}\n flip={{ allowedAutoPlacements: ['left', 'right'] }}\n >\n {({ popper, setTrigger }) => {\n this.setPopperTrigger = setTrigger;\n this.popper = popper;\n this.popper.current?.update();\n return advancedMode\n ? (\n <Children />\n )\n : (\n <>\n {tag && <Tooltip.Trigger tag={tag} onClick={this.handleTriggerClick} />}\n <Tooltip.Popper {...other}>{children}</Tooltip.Popper>\n </>\n );\n }}\n </Root>\n </TooltipDotRenderContext.Provider>\n );\n }\n}\n\nfunction PopperTrigger() {\n return <Root render={Popper.Trigger} />;\n}\n\nfunction PopperPopper(props) {\n const { Element: STooltip, styles, $visible, x, y } = props;\n\n const handlerCancel = React.useCallback(() => false, []);\n\n if (!$visible) return null;\n\n return sstyled(styles)(\n <STooltip\n render={Popper.Popper}\n childrenPosition='inside'\n onMouseMove={handlerCancel}\n x={x}\n y={y}\n />,\n );\n}\nPopperPopper.style = style;\n\nfunction Title(props) {\n const STitle = Root;\n const { styles } = props;\n\n return sstyled(styles)(<STitle render={Box} __excludeProps={['data', 'scale']} />);\n}\nTitle.style = style;\n\nfunction Dot(props) {\n const { styles, color, Children } = props;\n const resolveColor = useColorResolver();\n const renderContext = React.useContext(TooltipDotRenderContext);\n const defaultColor = getChartDefaultColorName(renderContext.index);\n const patterns = props.patterns ?? renderContext.patterns;\n\n const key = Children;\n if (!renderContext.indexKeysCache.has(key)) {\n renderContext.indexKeysCache.add(key);\n renderContext.index += 1;\n }\n const SDotGroup = Root;\n const SDot = Box;\n const SDotCircle = Box;\n return sstyled(styles)(\n <SDotGroup render={Box} use:color={undefined} __excludeProps={['data', 'scale']}>\n {patterns\n ? (\n <SDot>\n <PatternSymbol\n color={resolveColor(color ?? defaultColor)}\n patternKey={color ?? defaultColor}\n />\n </SDot>\n )\n : (\n <SDot>\n <SDotCircle color={resolveColor(color ?? defaultColor)} />\n </SDot>\n )}\n <Children />\n </SDotGroup>,\n );\n}\nDot.style = style;\n\nfunction Footer(props) {\n const { styles } = props;\n const SFooter = Root;\n return sstyled(styles)(<SFooter render={Box} __excludeProps={['data', 'scale']} />);\n}\nFooter.style = style;\n\nconst Tooltip = createElement(TooltipRoot, {\n Trigger: PopperTrigger,\n Popper: PopperPopper,\n Title,\n Footer,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6C,OAAO,EAAAD,KAAA,CAAAzB,EAAA;IAAA,OAAApG,KAAA,CAAAoF,WAAA;MAAA,kBAA8B,CAAC,MAAM,EAAE,OAAO;IAAC,GAAAwC,KAAA;EAAA,EAAG,CAAC;AACpF;AACAD,MAAM,CAACjH,KAAK,GAAGA,KAAK;AAEpB,MAAMgE,OAAO,GAAG,IAAAO,sBAAa,EAAC9D,WAAW,EAAE;EACzCwD,OAAO,EAAEe,aAAa;EACtBb,MAAM,EAAEgB,YAAY;EACpBQ,KAAK;EACLsB,MAAM;EACNjB;AACF,CAAC,CAAC;AAAC,IAAAqB,QAAA,GAAAC,OAAA,CAAAxG,OAAA,GAEYkD,OAAO","ignoreList":[]}
1
+ {"version":3,"file":"Tooltip.js","names":["_core","require","_baseComponents","_findComponent","_interopRequireDefault","_useColorResolver","_react","_createElement","_Pattern","_utils","style","sstyled","insert","TooltipDotRenderContext","React","createContext","index","indexKeysCache","Set","TooltipRoot","Component","constructor","args","_defineProperty2","default","$visible","anchorProps","tooltipProps","x","y","e","onClick","asProps","xIndex","yIndex","state","getTriggerProps","hideHoverLine","getPopperProps","excludeAnchorProps","componentDidMount","eventEmitter","plotId","unsubscribe","push","subscribe","setState","visible","virtualElementPosition","virtualTriggerElement","setTimeout","setPopperTrigger","getBoundingClientRect","width","height","top","right","bottom","left","popper","current","update","componentWillUnmount","forEach","render","_ref","Children","children","tag","forcedAdvancedMode","_","other","advancedMode","findComponent","Tooltip","Trigger","displayName","Popper","renderContext","clear","patterns","createElement","Provider","value","assignProps","handlerCancel","allowedAutoPlacements","setTrigger","Fragment","handleTriggerClick","PopperTrigger","_ref2","arguments[0]","PopperPopper","props","_ref6","Element","STooltip","styles","useCallback","cn","Title","_ref3","_ref7","STitle","Box","CHART_PALETTE_ORDER_TO_LIGHTNESS","Dot","_ref4","_ref8","color","resolveColor","useColorResolver","useContext","defaultColor","getChartDefaultColorName","key","has","add","SDotGroup","SDot","SDotCircle","SDotPattern","PatternSymbol","undefined","DEFAULT","Footer","_ref5","_ref9","SFooter","_default","exports"],"sources":["../../src/Tooltip.jsx"],"sourcesContent":["import { Popper, Box } from '@semcore/base-components';\nimport { Component, Root, sstyled } from '@semcore/core';\nimport findComponent from '@semcore/core/lib/utils/findComponent';\nimport { useColorResolver } from '@semcore/core/lib/utils/use/useColorResolver';\nimport React from 'react';\n\nimport createElement from './createElement';\nimport { PatternSymbol } from './Pattern';\nimport style from './style/tooltip.shadow.css';\nimport { getChartDefaultColorName } from './utils';\n\n/**\n * `TooltipDotRenderContext` is a hack to bypass problem that getDotProps doesn't work for D3 tooltip.\n * Probably it may be removed after migrating to a new core.\n */\nconst TooltipDotRenderContext = React.createContext({ index: -1, indexKeysCache: new Set() });\n\nclass TooltipRoot extends Component {\n static displayName = 'Tooltip';\n\n static style = style;\n\n state = {\n $visible: false,\n anchorProps: {},\n tooltipProps: {},\n };\n\n renderContext = { index: -1, indexKeysCache: new Set() };\n\n handlerCancel = () => false;\n\n getTriggerProps() {\n const { x, y, hideHoverLine } = this.asProps;\n return { x, y, hideHoverLine };\n }\n\n getPopperProps() {\n if (this.asProps.excludeAnchorProps) {\n return {\n $visible: this.state.$visible,\n ...this.state.tooltipProps,\n };\n }\n\n return {\n $visible: this.state.$visible,\n ...this.state.anchorProps,\n ...this.state.tooltipProps,\n };\n }\n\n virtualElementPosition = { x: 0, y: 0 };\n virtualTriggerElement = null;\n unsubscribe = [];\n componentDidMount() {\n const { eventEmitter, plotId } = this.asProps;\n\n this.unsubscribe.push(\n eventEmitter.subscribe(`setTooltipRenderingProps_${plotId}`, (anchorProps, tooltipProps) => {\n this.setState({ anchorProps, tooltipProps });\n }),\n eventEmitter.subscribe(`setTooltipVisible_${plotId}`, (visible) =>\n this.setState({ $visible: visible }),\n ),\n eventEmitter.subscribe(`setTooltipPosition_${plotId}`, (x, y) => {\n this.virtualElementPosition.x = x;\n this.virtualElementPosition.y = y;\n if (this.virtualTriggerElement === null) {\n this.virtualTriggerElement = {};\n setTimeout(() => {\n this.setPopperTrigger(this.virtualTriggerElement);\n }, 0);\n }\n this.virtualTriggerElement.getBoundingClientRect = () => {\n const { x, y } = this.virtualElementPosition;\n return { width: 0, height: 0, top: y, right: x, bottom: y, left: x };\n };\n this.popper.current?.update();\n }),\n );\n }\n\n componentWillUnmount() {\n this.unsubscribe.forEach((unsubscribe) => unsubscribe());\n }\n\n handleTriggerClick = (e) => {\n const { onClick } = this.asProps;\n const { xIndex, yIndex } = this.state.tooltipProps;\n\n const index = xIndex ?? yIndex;\n\n onClick?.(index, e);\n };\n\n render() {\n const { Children, children, tag, forcedAdvancedMode, onClick: _, ...other } = this.asProps;\n\n const advancedMode =\n forcedAdvancedMode ||\n !!findComponent(Children, [Tooltip.Trigger.displayName, Tooltip.Popper.displayName]);\n this.renderContext.index = -1;\n this.renderContext.indexKeysCache.clear();\n this.renderContext.patterns = this.asProps.patterns ?? this.state.tooltipProps.patterns;\n\n return (\n <TooltipDotRenderContext.Provider value={this.renderContext}>\n <Root\n render={Popper}\n visible={this.state.$visible}\n onFirstUpdate={this.handlerCancel}\n onOutsideClick={this.handlerCancel}\n interaction='none'\n explicitTriggerSet\n offset={8}\n flip={{ allowedAutoPlacements: ['left', 'right'] }}\n >\n {({ popper, setTrigger }) => {\n this.setPopperTrigger = setTrigger;\n this.popper = popper;\n this.popper.current?.update();\n return advancedMode\n ? (\n <Children />\n )\n : (\n <>\n {tag && <Tooltip.Trigger tag={tag} onClick={this.handleTriggerClick} />}\n <Tooltip.Popper {...other}>{children}</Tooltip.Popper>\n </>\n );\n }}\n </Root>\n </TooltipDotRenderContext.Provider>\n );\n }\n}\n\nfunction PopperTrigger() {\n return <Root render={Popper.Trigger} />;\n}\n\nfunction PopperPopper(props) {\n const { Element: STooltip, styles, $visible, x, y } = props;\n\n const handlerCancel = React.useCallback(() => false, []);\n\n if (!$visible) return null;\n\n return sstyled(styles)(\n <STooltip\n render={Popper.Popper}\n childrenPosition='inside'\n onMouseMove={handlerCancel}\n x={x}\n y={y}\n />,\n );\n}\nPopperPopper.style = style;\n\nfunction Title(props) {\n const STitle = Root;\n const { styles } = props;\n\n return sstyled(styles)(<STitle render={Box} __excludeProps={['data', 'scale']} />);\n}\nTitle.style = style;\n\nconst CHART_PALETTE_ORDER_TO_LIGHTNESS = {\n 'chart-palette-order-1': 0.35,\n 'DEFAULT': 0.15,\n};\nfunction Dot(props) {\n const { styles, color, Children } = props;\n const resolveColor = useColorResolver();\n const renderContext = React.useContext(TooltipDotRenderContext);\n const defaultColor = getChartDefaultColorName(renderContext.index);\n const patterns = props.patterns ?? renderContext.patterns;\n\n const key = Children;\n if (!renderContext.indexKeysCache.has(key)) {\n renderContext.indexKeysCache.add(key);\n renderContext.index += 1;\n }\n const SDotGroup = Root;\n const SDot = Box;\n const SDotCircle = Box;\n const SDotPattern = PatternSymbol;\n\n return sstyled(styles)(\n <SDotGroup render={Box} use:color={undefined} __excludeProps={['data', 'scale']}>\n {patterns\n ? (\n <SDot>\n <SDotPattern\n color={resolveColor(color ?? defaultColor)}\n patternKey={color ?? defaultColor}\n />\n </SDot>\n )\n : (\n <SDot>\n <SDotCircle\n color={resolveColor(color ?? defaultColor)}\n lightness={CHART_PALETTE_ORDER_TO_LIGHTNESS[color ?? defaultColor] ?? CHART_PALETTE_ORDER_TO_LIGHTNESS.DEFAULT}\n />\n </SDot>\n )}\n <Children />\n </SDotGroup>,\n );\n}\nDot.style = style;\n\nfunction Footer(props) {\n const { styles } = props;\n const SFooter = Root;\n return sstyled(styles)(<SFooter render={Box} __excludeProps={['data', 'scale']} />);\n}\nFooter.style = style;\n\nconst Tooltip = createElement(TooltipRoot, {\n Trigger: PopperTrigger,\n Popper: PopperPopper,\n Title,\n Footer,\n Dot,\n});\n\nexport default Tooltip;\n"],"mappings":";;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AADA,IAAAC,eAAA,GAAAD,OAAA;AAEA,IAAAE,cAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,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CAAAyD,aAAA,CAACgD,OAAO,EAAAD,KAAA,CAAA5B,EAAA;IAAA,OAAApG,KAAA,CAAAoF,WAAA;MAAA,kBAA8B,CAAC,MAAM,EAAE,OAAO;IAAC,GAAA2C,KAAA;EAAA,EAAG,CAAC;AACpF;AACAD,MAAM,CAACpH,KAAK,GAAGA,KAAK;AAEpB,MAAMgE,OAAO,GAAG,IAAAO,sBAAa,EAAC9D,WAAW,EAAE;EACzCwD,OAAO,EAAEe,aAAa;EACtBb,MAAM,EAAEgB,YAAY;EACpBQ,KAAK;EACLyB,MAAM;EACNnB;AACF,CAAC,CAAC;AAAC,IAAAuB,QAAA,GAAAC,OAAA,CAAA3G,OAAA,GAEYkD,OAAO","ignoreList":[]}
package/lib/cjs/Venn.js CHANGED
@@ -19,17 +19,17 @@ var _Pattern = require("./Pattern");
19
19
  var _Tooltip = _interopRequireDefault(require("./Tooltip"));
20
20
  var _utils = require("./utils");
21
21
  /*!__reshadow-styles__:"./style/venn.shadow.css"*/
22
- const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SCircle_iqwwn_gg_{fill:var(--intergalactic-chart-palette-order-2,oklch(.82 .15 170));stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_iqwwn);transition-timing-function:ease-in-out}@media (hover:hover){.___SCircle_iqwwn_gg_:hover{fill-opacity:.7}}.___SCircle_iqwwn_gg_.__color_iqwwn_gg_{fill:var(--color_iqwwn)}.___SCircle_iqwwn_gg_.__pattern_iqwwn_gg_.__color_iqwwn_gg_{fill:var(--pattern_iqwwn);fill-opacity:.7;stroke:var(--color_iqwwn);stroke-width:1px}@media (hover:hover){.___SCircle_iqwwn_gg_.__pattern_iqwwn_gg_.__color_iqwwn_gg_:hover{fill-opacity:.85}}.___SCircle_iqwwn_gg_.__transparent_iqwwn_gg_{opacity:.3}.___SIntersection_iqwwn_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:0}@media (hover:hover){.___SIntersection_iqwwn_gg_:hover{fill-opacity:.1}}.___SIntersection_iqwwn_gg_.__transparent_iqwwn_gg_{opacity:.3}", /*__inner_css_end__*/"iqwwn_gg_"),
22
+ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SCircle_1gi52_gg_{fill:var(--intergalactic-chart-palette-order-2,oklch(.58 .168 278.2));stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_1gi52);transition-timing-function:ease-in-out}@media (hover:hover){.___SCircle_1gi52_gg_:hover{fill-opacity:.7}}.___SCircle_1gi52_gg_.__color_1gi52_gg_{fill:var(--color_1gi52)}.___SCircle_1gi52_gg_.__pattern_1gi52_gg_.__color_1gi52_gg_{fill:var(--pattern_1gi52);fill-opacity:.7;stroke:var(--color_1gi52);stroke-width:1px}@media (hover:hover){.___SCircle_1gi52_gg_.__pattern_1gi52_gg_.__color_1gi52_gg_:hover{fill-opacity:.85}}.___SCircle_1gi52_gg_.__transparent_1gi52_gg_{opacity:.3}.___SIntersection_1gi52_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:0}@media (hover:hover){.___SIntersection_1gi52_gg_:hover{fill-opacity:.1}}.___SIntersection_1gi52_gg_.__transparent_1gi52_gg_{opacity:.3}", /*__inner_css_end__*/"1gi52_gg_"),
23
23
  /*__reshadow_css_end__*/
24
24
  {
25
- "__SCircle": "___SCircle_iqwwn_gg_",
26
- "_color": "__color_iqwwn_gg_",
27
- "--color": "--color_iqwwn",
28
- "_transparent": "__transparent_iqwwn_gg_",
29
- "__SIntersection": "___SIntersection_iqwwn_gg_",
30
- "--duration": "--duration_iqwwn",
31
- "_pattern": "__pattern_iqwwn_gg_",
32
- "--pattern": "--pattern_iqwwn"
25
+ "__SCircle": "___SCircle_1gi52_gg_",
26
+ "_color": "__color_1gi52_gg_",
27
+ "--color": "--color_1gi52",
28
+ "_transparent": "__transparent_1gi52_gg_",
29
+ "__SIntersection": "___SIntersection_1gi52_gg_",
30
+ "--duration": "--duration_1gi52",
31
+ "_pattern": "__pattern_1gi52_gg_",
32
+ "--pattern": "--pattern_1gi52"
33
33
  });
34
34
  class VennRoot extends _core.Component {
35
35
  constructor(...args) {
@@ -14,10 +14,10 @@ var _react = _interopRequireDefault(require("react"));
14
14
  var _locale = require("./locale");
15
15
  var _intergalacticDynamicLocales = require("./translations/module/__intergalactic-dynamic-locales");
16
16
  /*!__reshadow-styles__:"../style/plotA11yModule.shadow.css"*/
17
- const styles = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SPlotA11yModule_cs6a2_gg_{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}", /*__inner_css_end__*/"cs6a2_gg_"),
17
+ const styles = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SPlotA11yModule_5qb0j_gg_{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}", /*__inner_css_end__*/"5qb0j_gg_"),
18
18
  /*__reshadow_css_end__*/
19
19
  {
20
- "__SPlotA11yModule": "___SPlotA11yModule_cs6a2_gg_"
20
+ "__SPlotA11yModule": "___SPlotA11yModule_5qb0j_gg_"
21
21
  });
22
22
  function PlotA11yModule(props) {
23
23
  var _ref = arguments[0],
@@ -16,10 +16,10 @@ var _intl = require("./intl");
16
16
  var _summarize = require("./summarize");
17
17
  var _intergalacticDynamicLocales = require("./translations/view/__intergalactic-dynamic-locales");
18
18
  /*!__reshadow-styles__:"../style/plotA11yView.shadow.css"*/
19
- const styles = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SPlotA11yView_2vwyq_gg_{position:relative;display:block;background-color:var(--intergalactic-bg-primary-neutral,oklch(1 0 0));color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899));border:3px solid var(--intergalactic-border-primary,#000c0829);font-size:var(--intergalactic-fs-50,10px);z-index:var(--intergalactic-z-index-overlay,500);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}@media (color-gamut:p3){.___SPlotA11yView_2vwyq_gg_{border:3px solid var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}.___SPlotA11yView_2vwyq_gg_ a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x,8px);display:block}.___SPlotA11yView_2vwyq_gg_ :is(table,td,th){border:1px solid var(--intergalactic-border-primary,#000c0829)}@media (color-gamut:p3){.___SPlotA11yView_2vwyq_gg_ :is(table,td,th){border:1px solid var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}", /*__inner_css_end__*/"2vwyq_gg_"),
19
+ const styles = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SPlotA11yView_25i2q_gg_{position:relative;display:block;background-color:var(--intergalactic-bg-primary-neutral,oklch(1 0 0));color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899));border:3px solid var(--intergalactic-border-primary,#000c0829);font-size:var(--intergalactic-fs-50,10px);z-index:var(--intergalactic-z-index-overlay,500);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}@media (color-gamut:p3){.___SPlotA11yView_25i2q_gg_{border:3px solid var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}.___SPlotA11yView_25i2q_gg_ a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x,8px);display:block}.___SPlotA11yView_25i2q_gg_ :is(table,td,th){border:1px solid var(--intergalactic-border-primary,#000c0829)}@media (color-gamut:p3){.___SPlotA11yView_25i2q_gg_ :is(table,td,th){border:1px solid var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}", /*__inner_css_end__*/"25i2q_gg_"),
20
20
  /*__reshadow_css_end__*/
21
21
  {
22
- "__SPlotA11yView": "___SPlotA11yView_2vwyq_gg_"
22
+ "__SPlotA11yView": "___SPlotA11yView_25i2q_gg_"
23
23
  });
24
24
  function PlotA11yView({
25
25
  id,