@neo4j-ndl/react-charts 2.1.21 → 2.2.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 (209) hide show
  1. package/lib/LICENSES.txt +0 -295
  2. package/lib/NOTICE.txt +1383 -1392
  3. package/lib/{esm/charts/index.js → cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/defineProperty.js} +13 -5
  4. package/lib/cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectSpread2.js +46 -0
  5. package/lib/{esm/charts/tests/ChartWrapperWithTooltipFormatter.js → cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutProperties.js} +12 -13
  6. package/lib/{esm/index.js → cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutPropertiesLoose.js} +13 -2
  7. package/lib/cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/toPrimitive.js +35 -0
  8. package/lib/{esm/charts/utils/chart-types.js → cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/toPropertyKey.js} +10 -2
  9. package/lib/cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/typeof.js +37 -0
  10. package/lib/cjs/_virtual/_rolldown/runtime.js +44 -0
  11. package/lib/cjs/charts/Chart.js +121 -111
  12. package/lib/cjs/charts/Chart.js.map +1 -1
  13. package/lib/cjs/charts/ChartContainer.js +67 -62
  14. package/lib/cjs/charts/ChartContainer.js.map +1 -1
  15. package/lib/cjs/charts/ChartEmpty.js +45 -30
  16. package/lib/cjs/charts/ChartEmpty.js.map +1 -1
  17. package/lib/cjs/charts/ChartRender.js +112 -87
  18. package/lib/cjs/charts/ChartRender.js.map +1 -1
  19. package/lib/cjs/charts/ChartTooltip.js +111 -65
  20. package/lib/cjs/charts/ChartTooltip.js.map +1 -1
  21. package/lib/cjs/charts/Legend.js +81 -69
  22. package/lib/cjs/charts/Legend.js.map +1 -1
  23. package/lib/cjs/charts/LegendItem.js +83 -62
  24. package/lib/cjs/charts/LegendItem.js.map +1 -1
  25. package/lib/cjs/charts/LegendLayout.js +330 -348
  26. package/lib/cjs/charts/LegendLayout.js.map +1 -1
  27. package/lib/cjs/charts/hooks/use-chart-instance.js +115 -122
  28. package/lib/cjs/charts/hooks/use-chart-instance.js.map +1 -1
  29. package/lib/cjs/charts/hooks/use-chart-option.js +79 -80
  30. package/lib/cjs/charts/hooks/use-chart-option.js.map +1 -1
  31. package/lib/cjs/charts/hooks/use-chart-refs.js +47 -44
  32. package/lib/cjs/charts/hooks/use-chart-refs.js.map +1 -1
  33. package/lib/cjs/charts/hooks/use-chart-zoom.js +102 -127
  34. package/lib/cjs/charts/hooks/use-chart-zoom.js.map +1 -1
  35. package/lib/cjs/charts/hooks/use-legend-interactions.js +127 -132
  36. package/lib/cjs/charts/hooks/use-legend-interactions.js.map +1 -1
  37. package/lib/cjs/charts/hooks/use-legend-series.js +143 -174
  38. package/lib/cjs/charts/hooks/use-legend-series.js.map +1 -1
  39. package/lib/cjs/charts/hooks/use-legend-visibility.js +66 -85
  40. package/lib/cjs/charts/hooks/use-legend-visibility.js.map +1 -1
  41. package/lib/cjs/charts/index.js +31 -40
  42. package/lib/cjs/charts/index.js.map +1 -1
  43. package/lib/cjs/charts/themes/ndl-echarts-theme.js +136 -168
  44. package/lib/cjs/charts/themes/ndl-echarts-theme.js.map +1 -1
  45. package/lib/cjs/charts/utils/aria-description.js +150 -214
  46. package/lib/cjs/charts/utils/aria-description.js.map +1 -1
  47. package/lib/cjs/charts/utils/build-chart-option.js +166 -174
  48. package/lib/cjs/charts/utils/build-chart-option.js.map +1 -1
  49. package/lib/cjs/charts/utils/chart-tooltip-formatter.js +156 -172
  50. package/lib/cjs/charts/utils/chart-tooltip-formatter.js.map +1 -1
  51. package/lib/cjs/charts/utils/chart-types.js +25 -20
  52. package/lib/cjs/charts/utils/chart-types.js.map +1 -1
  53. package/lib/cjs/charts/utils/defaults.js +69 -67
  54. package/lib/cjs/charts/utils/defaults.js.map +1 -1
  55. package/lib/cjs/charts/utils/format-utils.js +55 -66
  56. package/lib/cjs/charts/utils/format-utils.js.map +1 -1
  57. package/lib/cjs/charts/utils/legend-layout.js +54 -53
  58. package/lib/cjs/charts/utils/legend-layout.js.map +1 -1
  59. package/lib/cjs/charts/utils/legend-utils.js +82 -121
  60. package/lib/cjs/charts/utils/legend-utils.js.map +1 -1
  61. package/lib/cjs/charts/utils/scatter-tooltip-points.js +191 -266
  62. package/lib/cjs/charts/utils/scatter-tooltip-points.js.map +1 -1
  63. package/lib/cjs/charts/utils/threshold.js +89 -102
  64. package/lib/cjs/charts/utils/threshold.js.map +1 -1
  65. package/lib/cjs/charts/utils/user-option-utils.js +419 -347
  66. package/lib/cjs/charts/utils/user-option-utils.js.map +1 -1
  67. package/lib/cjs/index.js +31 -35
  68. package/lib/cjs/index.js.map +1 -1
  69. package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/defineProperty.mjs +11 -0
  70. package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectSpread2.mjs +24 -0
  71. package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutProperties.mjs +12 -0
  72. package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutPropertiesLoose.mjs +11 -0
  73. package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/toPrimitive.mjs +13 -0
  74. package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/toPropertyKey.mjs +8 -0
  75. package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/typeof.mjs +10 -0
  76. package/lib/esm/charts/Chart.mjs +123 -0
  77. package/lib/esm/charts/Chart.mjs.map +1 -0
  78. package/lib/esm/charts/ChartContainer.mjs +71 -0
  79. package/lib/esm/charts/ChartContainer.mjs.map +1 -0
  80. package/lib/esm/charts/ChartEmpty.mjs +46 -0
  81. package/lib/esm/charts/ChartEmpty.mjs.map +1 -0
  82. package/lib/esm/charts/ChartRender.mjs +113 -0
  83. package/lib/esm/charts/ChartRender.mjs.map +1 -0
  84. package/lib/esm/charts/ChartTooltip.mjs +109 -0
  85. package/lib/esm/charts/ChartTooltip.mjs.map +1 -0
  86. package/lib/esm/charts/Legend.mjs +82 -0
  87. package/lib/esm/charts/Legend.mjs.map +1 -0
  88. package/lib/esm/charts/LegendItem.mjs +82 -0
  89. package/lib/esm/charts/LegendItem.mjs.map +1 -0
  90. package/lib/esm/charts/LegendLayout.mjs +337 -0
  91. package/lib/esm/charts/LegendLayout.mjs.map +1 -0
  92. package/lib/esm/charts/hooks/use-chart-instance.mjs +119 -0
  93. package/lib/esm/charts/hooks/use-chart-instance.mjs.map +1 -0
  94. package/lib/esm/charts/hooks/use-chart-option.mjs +79 -0
  95. package/lib/esm/charts/hooks/use-chart-option.mjs.map +1 -0
  96. package/lib/esm/charts/hooks/use-chart-refs.mjs +49 -0
  97. package/lib/esm/charts/hooks/use-chart-refs.mjs.map +1 -0
  98. package/lib/esm/charts/hooks/use-chart-zoom.mjs +102 -0
  99. package/lib/esm/charts/hooks/use-chart-zoom.mjs.map +1 -0
  100. package/lib/esm/charts/hooks/use-legend-interactions.mjs +138 -0
  101. package/lib/esm/charts/hooks/use-legend-interactions.mjs.map +1 -0
  102. package/lib/esm/charts/hooks/use-legend-series.mjs +151 -0
  103. package/lib/esm/charts/hooks/use-legend-series.mjs.map +1 -0
  104. package/lib/esm/charts/hooks/use-legend-visibility.mjs +67 -0
  105. package/lib/esm/charts/hooks/use-legend-visibility.mjs.map +1 -0
  106. package/lib/esm/charts/index.mjs +27 -0
  107. package/lib/esm/charts/index.mjs.map +1 -0
  108. package/lib/esm/charts/themes/ndl-echarts-theme.mjs +139 -0
  109. package/lib/esm/charts/themes/ndl-echarts-theme.mjs.map +1 -0
  110. package/lib/esm/charts/utils/aria-description.mjs +162 -0
  111. package/lib/esm/charts/utils/aria-description.mjs.map +1 -0
  112. package/lib/esm/charts/utils/build-chart-option.mjs +184 -0
  113. package/lib/esm/charts/utils/build-chart-option.mjs.map +1 -0
  114. package/lib/esm/charts/utils/chart-tooltip-formatter.mjs +159 -0
  115. package/lib/esm/charts/utils/chart-tooltip-formatter.mjs.map +1 -0
  116. package/lib/esm/charts/utils/chart-types.mjs +24 -0
  117. package/lib/esm/charts/utils/chart-types.mjs.map +1 -0
  118. package/lib/esm/charts/utils/defaults.mjs +73 -0
  119. package/lib/esm/charts/utils/defaults.mjs.map +1 -0
  120. package/lib/esm/charts/utils/format-utils.mjs +61 -0
  121. package/lib/esm/charts/utils/format-utils.mjs.map +1 -0
  122. package/lib/esm/charts/utils/legend-layout.mjs +57 -0
  123. package/lib/esm/charts/utils/legend-layout.mjs.map +1 -0
  124. package/lib/esm/charts/utils/legend-utils.mjs +90 -0
  125. package/lib/esm/charts/utils/legend-utils.mjs.map +1 -0
  126. package/lib/esm/charts/utils/scatter-tooltip-points.mjs +215 -0
  127. package/lib/esm/charts/utils/scatter-tooltip-points.mjs.map +1 -0
  128. package/lib/esm/charts/utils/threshold.mjs +92 -0
  129. package/lib/esm/charts/utils/threshold.mjs.map +1 -0
  130. package/lib/esm/charts/utils/user-option-utils.mjs +445 -0
  131. package/lib/esm/charts/utils/user-option-utils.mjs.map +1 -0
  132. package/lib/esm/index.mjs +27 -0
  133. package/lib/esm/index.mjs.map +1 -0
  134. package/package.json +12 -16
  135. package/skills/ndl-react-charts/SKILL.md +2 -2
  136. package/lib/cjs/charts/tests/ChartWrapperWithTooltipFormatter.js +0 -38
  137. package/lib/cjs/charts/tests/ChartWrapperWithTooltipFormatter.js.map +0 -1
  138. package/lib/cjs/charts/tests/ChartZoomHarness.js +0 -113
  139. package/lib/cjs/charts/tests/ChartZoomHarness.js.map +0 -1
  140. package/lib/cjs/charts/tests/HorizontalBarWithVerticalSlider.js +0 -78
  141. package/lib/cjs/charts/tests/HorizontalBarWithVerticalSlider.js.map +0 -1
  142. package/lib/cjs/charts/tests/PieChartWithRerender.js +0 -46
  143. package/lib/cjs/charts/tests/PieChartWithRerender.js.map +0 -1
  144. package/lib/cjs/charts/tests/chart-test-utils.js +0 -527
  145. package/lib/cjs/charts/tests/chart-test-utils.js.map +0 -1
  146. package/lib/esm/charts/Chart.js +0 -114
  147. package/lib/esm/charts/Chart.js.map +0 -1
  148. package/lib/esm/charts/ChartContainer.js +0 -67
  149. package/lib/esm/charts/ChartContainer.js.map +0 -1
  150. package/lib/esm/charts/ChartEmpty.js +0 -33
  151. package/lib/esm/charts/ChartEmpty.js.map +0 -1
  152. package/lib/esm/charts/ChartRender.js +0 -89
  153. package/lib/esm/charts/ChartRender.js.map +0 -1
  154. package/lib/esm/charts/ChartTooltip.js +0 -64
  155. package/lib/esm/charts/ChartTooltip.js.map +0 -1
  156. package/lib/esm/charts/Legend.js +0 -71
  157. package/lib/esm/charts/Legend.js.map +0 -1
  158. package/lib/esm/charts/LegendItem.js +0 -61
  159. package/lib/esm/charts/LegendItem.js.map +0 -1
  160. package/lib/esm/charts/LegendLayout.js +0 -323
  161. package/lib/esm/charts/LegendLayout.js.map +0 -1
  162. package/lib/esm/charts/hooks/use-chart-instance.js +0 -128
  163. package/lib/esm/charts/hooks/use-chart-instance.js.map +0 -1
  164. package/lib/esm/charts/hooks/use-chart-option.js +0 -82
  165. package/lib/esm/charts/hooks/use-chart-option.js.map +0 -1
  166. package/lib/esm/charts/hooks/use-chart-refs.js +0 -48
  167. package/lib/esm/charts/hooks/use-chart-refs.js.map +0 -1
  168. package/lib/esm/charts/hooks/use-chart-zoom.js +0 -129
  169. package/lib/esm/charts/hooks/use-chart-zoom.js.map +0 -1
  170. package/lib/esm/charts/hooks/use-legend-interactions.js +0 -145
  171. package/lib/esm/charts/hooks/use-legend-interactions.js.map +0 -1
  172. package/lib/esm/charts/hooks/use-legend-series.js +0 -184
  173. package/lib/esm/charts/hooks/use-legend-series.js.map +0 -1
  174. package/lib/esm/charts/hooks/use-legend-visibility.js +0 -87
  175. package/lib/esm/charts/hooks/use-legend-visibility.js.map +0 -1
  176. package/lib/esm/charts/index.js.map +0 -1
  177. package/lib/esm/charts/tests/ChartWrapperWithTooltipFormatter.js.map +0 -1
  178. package/lib/esm/charts/tests/ChartZoomHarness.js +0 -109
  179. package/lib/esm/charts/tests/ChartZoomHarness.js.map +0 -1
  180. package/lib/esm/charts/tests/HorizontalBarWithVerticalSlider.js +0 -74
  181. package/lib/esm/charts/tests/HorizontalBarWithVerticalSlider.js.map +0 -1
  182. package/lib/esm/charts/tests/PieChartWithRerender.js +0 -43
  183. package/lib/esm/charts/tests/PieChartWithRerender.js.map +0 -1
  184. package/lib/esm/charts/tests/chart-test-utils.js +0 -500
  185. package/lib/esm/charts/tests/chart-test-utils.js.map +0 -1
  186. package/lib/esm/charts/themes/ndl-echarts-theme.js +0 -172
  187. package/lib/esm/charts/themes/ndl-echarts-theme.js.map +0 -1
  188. package/lib/esm/charts/utils/aria-description.js +0 -228
  189. package/lib/esm/charts/utils/aria-description.js.map +0 -1
  190. package/lib/esm/charts/utils/build-chart-option.js +0 -193
  191. package/lib/esm/charts/utils/build-chart-option.js.map +0 -1
  192. package/lib/esm/charts/utils/chart-tooltip-formatter.js +0 -177
  193. package/lib/esm/charts/utils/chart-tooltip-formatter.js.map +0 -1
  194. package/lib/esm/charts/utils/chart-types.js.map +0 -1
  195. package/lib/esm/charts/utils/defaults.js +0 -73
  196. package/lib/esm/charts/utils/defaults.js.map +0 -1
  197. package/lib/esm/charts/utils/format-utils.js +0 -74
  198. package/lib/esm/charts/utils/format-utils.js.map +0 -1
  199. package/lib/esm/charts/utils/legend-layout.js +0 -59
  200. package/lib/esm/charts/utils/legend-layout.js.map +0 -1
  201. package/lib/esm/charts/utils/legend-utils.js +0 -131
  202. package/lib/esm/charts/utils/legend-utils.js.map +0 -1
  203. package/lib/esm/charts/utils/scatter-tooltip-points.js +0 -291
  204. package/lib/esm/charts/utils/scatter-tooltip-points.js.map +0 -1
  205. package/lib/esm/charts/utils/threshold.js +0 -106
  206. package/lib/esm/charts/utils/threshold.js.map +0 -1
  207. package/lib/esm/charts/utils/user-option-utils.js +0 -374
  208. package/lib/esm/charts/utils/user-option-utils.js.map +0 -1
  209. package/lib/esm/index.js.map +0 -1
@@ -1,43 +1,34 @@
1
1
  "use strict";
2
+ Object.defineProperties(exports, {
3
+ __esModule: { value: true },
4
+ [Symbol.toStringTag]: { value: "Module" }
5
+ });
6
+ const require_charts_Chart = require("./Chart.js");
7
+ const require_charts_ChartEmpty = require("./ChartEmpty.js");
8
+ const require_charts_utils_defaults = require("./utils/defaults.js");
9
+ // src/charts/index.ts
2
10
  /*!
3
- *
4
- * Copyright (c) "Neo4j"
5
- * Neo4j Sweden AB [http://neo4j.com]
6
- *
7
- * This file is part of Neo4j.
8
- *
9
- * Neo4j is free software: you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation, either version 3 of the License, or
12
- * (at your option) any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU General Public License
20
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
- */
22
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
23
- if (k2 === undefined) k2 = k;
24
- var desc = Object.getOwnPropertyDescriptor(m, k);
25
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
26
- desc = { enumerable: true, get: function() { return m[k]; } };
27
- }
28
- Object.defineProperty(o, k2, desc);
29
- }) : (function(o, m, k, k2) {
30
- if (k2 === undefined) k2 = k;
31
- o[k2] = m[k];
32
- }));
33
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
34
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
35
- };
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.defaultThresholdLineSeriesOption = void 0;
38
- __exportStar(require("./Chart"), exports);
39
- __exportStar(require("./ChartEmpty"), exports);
40
- // Export utils and types that were previously exported from Chart.tsx. Not sure that they are needed, but keeping them to not be breaking.
41
- var defaults_1 = require("./utils/defaults");
42
- Object.defineProperty(exports, "defaultThresholdLineSeriesOption", { enumerable: true, get: function () { return defaults_1.defaultThresholdLineSeriesOption; } });
11
+ *
12
+ * Copyright (c) "Neo4j"
13
+ * Neo4j Sweden AB [http://neo4j.com]
14
+ *
15
+ * This file is part of Neo4j.
16
+ *
17
+ * Neo4j is free software: you can redistribute it and/or modify
18
+ * it under the terms of the GNU General Public License as published by
19
+ * the Free Software Foundation, either version 3 of the License, or
20
+ * (at your option) any later version.
21
+ *
22
+ * This program is distributed in the hope that it will be useful,
23
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
+ * GNU General Public License for more details.
26
+ *
27
+ * You should have received a copy of the GNU General Public License
28
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
29
+ */
30
+ exports.Chart = require_charts_Chart.Chart;
31
+ exports.ChartEmpty = require_charts_ChartEmpty.ChartEmpty;
32
+ exports.defaultThresholdLineSeriesOption = require_charts_utils_defaults.defaultThresholdLineSeriesOption;
33
+
43
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/charts/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;AAEH,0CAAwB;AACxB,+CAA6B;AAC7B,2IAA2I;AAC3I,6CAAoE;AAA3D,4HAAA,gCAAgC,OAAA","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport * from './Chart';\nexport * from './ChartEmpty';\n// Export utils and types that were previously exported from Chart.tsx. Not sure that they are needed, but keeping them to not be breaking.\nexport { defaultThresholdLineSeriesOption } from './utils/defaults';\nexport { type TooltipValueContext } from './utils/chart-tooltip-formatter';\nexport {\n type ChartEmptyProps,\n type ChartZoomEntry,\n type ThresholdLineSeriesOption,\n type Values,\n type SeriesOption,\n type EchartsSeries,\n type NeedleSeries,\n} from './utils/chart-types';\n"]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/charts/index.ts"],"sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport * from './Chart';\nexport * from './ChartEmpty';\n// Export utils and types that were previously exported from Chart.tsx. Not sure that they are needed, but keeping them to not be breaking.\nexport { defaultThresholdLineSeriesOption } from './utils/defaults';\nexport { type TooltipValueContext } from './utils/chart-tooltip-formatter';\nexport {\n type ChartEmptyProps,\n type ChartZoomEntry,\n type ThresholdLineSeriesOption,\n type Values,\n type SeriesOption,\n type EchartsSeries,\n type NeedleSeries,\n} from './utils/chart-types';\n"],"mappings":""}
@@ -1,176 +1,144 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ndlEchartsTheme = void 0;
2
+ Object.defineProperties(exports, {
3
+ __esModule: { value: true },
4
+ [Symbol.toStringTag]: { value: "Module" }
5
+ });
6
+ let _neo4j_ndl_base = require("@neo4j-ndl/base");
7
+ // src/charts/themes/ndl-echarts-theme.ts
4
8
  /*!
5
- *
6
- * Copyright (c) "Neo4j"
7
- * Neo4j Sweden AB [http://neo4j.com]
8
- *
9
- * This file is part of Neo4j.
10
- *
11
- * Neo4j is free software: you can redistribute it and/or modify
12
- * it under the terms of the GNU General Public License as published by
13
- * the Free Software Foundation, either version 3 of the License, or
14
- * (at your option) any later version.
15
- *
16
- * This program is distributed in the hope that it will be useful,
17
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
- * GNU General Public License for more details.
20
- *
21
- * You should have received a copy of the GNU General Public License
22
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
23
- */
24
- // oxlint-disable sort-keys
25
- const base_1 = require("@neo4j-ndl/base");
9
+ *
10
+ * Copyright (c) "Neo4j"
11
+ * Neo4j Sweden AB [http://neo4j.com]
12
+ *
13
+ * This file is part of Neo4j.
14
+ *
15
+ * Neo4j is free software: you can redistribute it and/or modify
16
+ * it under the terms of the GNU General Public License as published by
17
+ * the Free Software Foundation, either version 3 of the License, or
18
+ * (at your option) any later version.
19
+ *
20
+ * This program is distributed in the hope that it will be useful,
21
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
+ * GNU General Public License for more details.
24
+ *
25
+ * You should have received a copy of the GNU General Public License
26
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
27
+ */
26
28
  const axisCommon = (theme) => ({
27
- axisLabel: {
28
- color: base_1.tokens.theme[theme].color.neutral.text.weaker,
29
- fontFamily: base_1.tokens.typography['body-small'].fontFamily,
30
- fontSize: base_1.tokens.typography['body-small'].fontSize,
31
- },
32
- nameGap: 8,
33
- nameMoveOverlap: true,
34
- nameTextStyle: {
35
- color: base_1.tokens.theme[theme].color.neutral.text.default,
36
- fontFamily: base_1.tokens.typography['body-medium'].fontFamily,
37
- fontSize: base_1.tokens.typography['body-medium'].fontSize,
38
- fontWeight: base_1.tokens.typography['body-medium'].fontWeight,
39
- lineHeight: base_1.tokens.typography['body-medium'].lineHeight,
40
- },
41
- axisLine: {
42
- lineStyle: {
43
- cap: 'square',
44
- color: base_1.tokens.theme[theme].color.neutral.border.strong,
45
- width: 2,
46
- },
47
- },
48
- axisTick: {
49
- length: 8,
50
- lineStyle: {
51
- color: base_1.tokens.theme[theme].color.neutral.border.strong,
52
- width: 1,
53
- },
54
- show: true,
55
- },
56
- minorSplitLine: {
57
- lineStyle: {
58
- color: base_1.tokens.theme[theme].color.neutral.border.weak,
59
- },
60
- },
61
- splitArea: {
62
- areaStyle: {
63
- color: [base_1.tokens.theme[theme].color.neutral.hover, 'transparent'],
64
- },
65
- },
66
- splitLine: {
67
- lineStyle: {
68
- color: base_1.tokens.theme[theme].color.neutral.border.weak,
69
- },
70
- },
29
+ axisLabel: {
30
+ color: _neo4j_ndl_base.tokens.theme[theme].color.neutral.text.weaker,
31
+ fontFamily: _neo4j_ndl_base.tokens.typography["body-small"].fontFamily,
32
+ fontSize: _neo4j_ndl_base.tokens.typography["body-small"].fontSize
33
+ },
34
+ nameGap: 8,
35
+ nameMoveOverlap: true,
36
+ nameTextStyle: {
37
+ color: _neo4j_ndl_base.tokens.theme[theme].color.neutral.text.default,
38
+ fontFamily: _neo4j_ndl_base.tokens.typography["body-medium"].fontFamily,
39
+ fontSize: _neo4j_ndl_base.tokens.typography["body-medium"].fontSize,
40
+ fontWeight: _neo4j_ndl_base.tokens.typography["body-medium"].fontWeight,
41
+ lineHeight: _neo4j_ndl_base.tokens.typography["body-medium"].lineHeight
42
+ },
43
+ axisLine: { lineStyle: {
44
+ cap: "square",
45
+ color: _neo4j_ndl_base.tokens.theme[theme].color.neutral.border.strong,
46
+ width: 2
47
+ } },
48
+ axisTick: {
49
+ length: 8,
50
+ lineStyle: {
51
+ color: _neo4j_ndl_base.tokens.theme[theme].color.neutral.border.strong,
52
+ width: 1
53
+ },
54
+ show: true
55
+ },
56
+ minorSplitLine: { lineStyle: { color: _neo4j_ndl_base.tokens.theme[theme].color.neutral.border.weak } },
57
+ splitArea: { areaStyle: { color: [_neo4j_ndl_base.tokens.theme[theme].color.neutral.hover, "transparent"] } },
58
+ splitLine: { lineStyle: { color: _neo4j_ndl_base.tokens.theme[theme].color.neutral.border.weak } }
71
59
  });
72
60
  const ndlEchartsTheme = (theme, palette) => {
73
- return {
74
- darkMode: theme === 'dark',
75
- color: palette !== null && palette !== void 0 ? palette : Object.values(base_1.tokens.categorical),
76
- backgroundColor: 'transparent',
77
- axisPointer: {
78
- crossStyle: {
79
- color: base_1.tokens.theme[theme].color.neutral.border.strong,
80
- },
81
- label: {
82
- color: base_1.tokens.theme[theme].color.neutral.text.weaker,
83
- },
84
- lineStyle: {
85
- color: base_1.tokens.theme[theme].color.neutral.border.strong,
86
- },
87
- },
88
- // We use a custom legend so this does not affect anything
89
- legend: {},
90
- textStyle: {
91
- color: base_1.tokens.theme[theme].color.neutral.text.weaker,
92
- },
93
- // We are not using the echarts title so this does not affect anything
94
- title: {},
95
- toolbox: {},
96
- dataZoom: {
97
- backgroundColor: 'transparent',
98
- borderColor: base_1.tokens.theme[theme].color.neutral.border.weak,
99
- borderRadius: parseInt(base_1.tokens.borderRadius.sm.replace('px', '')),
100
- dataBackground: {
101
- areaStyle: {
102
- color: base_1.tokens.theme[theme].color.neutral.bg.default,
103
- opacity: 1,
104
- },
105
- lineStyle: {
106
- color: base_1.tokens.theme[theme].color.neutral.border.weak,
107
- opacity: 1,
108
- width: 1,
109
- },
110
- },
111
- emphasis: {
112
- handleLabel: {},
113
- handleStyle: {
114
- borderColor: base_1.tokens.theme[theme].color.neutral.border.strong,
115
- color: base_1.tokens.theme[theme].color.neutral.bg.strong,
116
- opacity: 1,
117
- },
118
- moveHandleStyle: {
119
- borderColor: base_1.tokens.theme[theme].color.neutral.border.strong,
120
- color: base_1.tokens.theme[theme].color.neutral.border.strong,
121
- opacity: 1,
122
- },
123
- },
124
- fillerColor: `rgb( from ${base_1.tokens.theme[theme].color.neutral.hover} r g b / 0.1)`,
125
- handleIcon: 'M2 0.5h4s1.5 0 1.5 1.5v16s0 1.5 -1.5 1.5h-4s-1.5 0 -1.5 -1.5v-16s0 -1.5 1.5 -1.5',
126
- handleSize: '80%',
127
- handleStyle: {
128
- borderColor: base_1.tokens.theme[theme].color.neutral.border.strong,
129
- color: base_1.tokens.theme[theme].color.neutral.bg.weak,
130
- // borderRadius: 0, // Doesn't work
131
- },
132
- moveHandleSize: 6,
133
- moveHandleStyle: {
134
- backgroundColor: base_1.tokens.theme[theme].color.neutral.bg.strong,
135
- color: base_1.tokens.theme[theme].color.neutral.bg.strong,
136
- opacity: 1, // 0.3,
137
- },
138
- selectedDataBackground: {
139
- areaStyle: {
140
- color: base_1.tokens.theme[theme].color.neutral.bg['on-bg-weak'],
141
- opacity: 1,
142
- shadowBlur: 0,
143
- },
144
- lineStyle: {
145
- color: base_1.tokens.theme[theme].color.neutral.border.strong,
146
- opacity: 1,
147
- width: 1,
148
- },
149
- },
150
- textStyle: {
151
- color: base_1.tokens.theme[theme].color.neutral.text.weaker,
152
- },
153
- },
154
- // Not implemented
155
- visualMap: {},
156
- // Not implemented
157
- timeline: {},
158
- // Not implemented
159
- calendar: {},
160
- timeAxis: axisCommon(theme),
161
- logAxis: axisCommon(theme),
162
- valueAxis: axisCommon(theme),
163
- categoryAxis: axisCommon(theme),
164
- line: {
165
- symbol: 'circle',
166
- },
167
- // Not implemented
168
- graph: {},
169
- // Not implemented
170
- gauge: {},
171
- // Not implemented
172
- candlestick: {},
173
- };
61
+ return {
62
+ darkMode: theme === "dark",
63
+ color: palette !== null && palette !== void 0 ? palette : Object.values(_neo4j_ndl_base.tokens.categorical),
64
+ backgroundColor: "transparent",
65
+ axisPointer: {
66
+ crossStyle: { color: _neo4j_ndl_base.tokens.theme[theme].color.neutral.border.strong },
67
+ label: { color: _neo4j_ndl_base.tokens.theme[theme].color.neutral.text.weaker },
68
+ lineStyle: { color: _neo4j_ndl_base.tokens.theme[theme].color.neutral.border.strong }
69
+ },
70
+ legend: {},
71
+ textStyle: { color: _neo4j_ndl_base.tokens.theme[theme].color.neutral.text.weaker },
72
+ title: {},
73
+ toolbox: {},
74
+ dataZoom: {
75
+ backgroundColor: "transparent",
76
+ borderColor: _neo4j_ndl_base.tokens.theme[theme].color.neutral.border.weak,
77
+ borderRadius: parseInt(_neo4j_ndl_base.tokens.borderRadius.sm.replace("px", "")),
78
+ dataBackground: {
79
+ areaStyle: {
80
+ color: _neo4j_ndl_base.tokens.theme[theme].color.neutral.bg.default,
81
+ opacity: 1
82
+ },
83
+ lineStyle: {
84
+ color: _neo4j_ndl_base.tokens.theme[theme].color.neutral.border.weak,
85
+ opacity: 1,
86
+ width: 1
87
+ }
88
+ },
89
+ emphasis: {
90
+ handleLabel: {},
91
+ handleStyle: {
92
+ borderColor: _neo4j_ndl_base.tokens.theme[theme].color.neutral.border.strong,
93
+ color: _neo4j_ndl_base.tokens.theme[theme].color.neutral.bg.strong,
94
+ opacity: 1
95
+ },
96
+ moveHandleStyle: {
97
+ borderColor: _neo4j_ndl_base.tokens.theme[theme].color.neutral.border.strong,
98
+ color: _neo4j_ndl_base.tokens.theme[theme].color.neutral.border.strong,
99
+ opacity: 1
100
+ }
101
+ },
102
+ fillerColor: `rgb( from ${_neo4j_ndl_base.tokens.theme[theme].color.neutral.hover} r g b / 0.1)`,
103
+ handleIcon: "M2 0.5h4s1.5 0 1.5 1.5v16s0 1.5 -1.5 1.5h-4s-1.5 0 -1.5 -1.5v-16s0 -1.5 1.5 -1.5",
104
+ handleSize: "80%",
105
+ handleStyle: {
106
+ borderColor: _neo4j_ndl_base.tokens.theme[theme].color.neutral.border.strong,
107
+ color: _neo4j_ndl_base.tokens.theme[theme].color.neutral.bg.weak
108
+ },
109
+ moveHandleSize: 6,
110
+ moveHandleStyle: {
111
+ backgroundColor: _neo4j_ndl_base.tokens.theme[theme].color.neutral.bg.strong,
112
+ color: _neo4j_ndl_base.tokens.theme[theme].color.neutral.bg.strong,
113
+ opacity: 1
114
+ },
115
+ selectedDataBackground: {
116
+ areaStyle: {
117
+ color: _neo4j_ndl_base.tokens.theme[theme].color.neutral.bg["on-bg-weak"],
118
+ opacity: 1,
119
+ shadowBlur: 0
120
+ },
121
+ lineStyle: {
122
+ color: _neo4j_ndl_base.tokens.theme[theme].color.neutral.border.strong,
123
+ opacity: 1,
124
+ width: 1
125
+ }
126
+ },
127
+ textStyle: { color: _neo4j_ndl_base.tokens.theme[theme].color.neutral.text.weaker }
128
+ },
129
+ visualMap: {},
130
+ timeline: {},
131
+ calendar: {},
132
+ timeAxis: axisCommon(theme),
133
+ logAxis: axisCommon(theme),
134
+ valueAxis: axisCommon(theme),
135
+ categoryAxis: axisCommon(theme),
136
+ line: { symbol: "circle" },
137
+ graph: {},
138
+ gauge: {},
139
+ candlestick: {}
140
+ };
174
141
  };
175
142
  exports.ndlEchartsTheme = ndlEchartsTheme;
143
+
176
144
  //# sourceMappingURL=ndl-echarts-theme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ndl-echarts-theme.js","sourceRoot":"","sources":["../../../../src/charts/themes/ndl-echarts-theme.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,2BAA2B;AAC3B,0CAAyC;AAIzC,MAAM,UAAU,GAAG,CAAC,KAAuB,EAAE,EAAE,CAAC,CAAC;IAC/C,SAAS,EAAE;QACT,KAAK,EAAE,aAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM;Q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C5B,YAAY,EAAE,UAAU,CAAC,KAAK,CAAC;QAC/B,IAAI,EAAE;YACJ,MAAM,EAAE,QAAQ;SACjB;QACD,kBAAkB;QAClB,KAAK,EAAE,EAAE;QACT,kBAAkB;QAClB,KAAK,EAAE,EAAE;QACT,kBAAkB;QAClB,WAAW,EAAE,EAAE;KAChB,CAAC;AACJ,CAAC,CAAC;AA7GW,QAAA,eAAe,mBA6G1B","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n// oxlint-disable sort-keys\nimport { tokens } from '@neo4j-ndl/base';\n\nimport { type HexColor } from '../utils/chart-types';\n\nconst axisCommon = (theme: 'light' | 'dark') => ({\n axisLabel: {\n color: tokens.theme[theme].color.neutral.text.weaker,\n fontFamily: tokens.typography['body-small'].fontFamily,\n fontSize: tokens.typography['body-small'].fontSize,\n },\n nameGap: 8,\n nameMoveOverlap: true,\n nameTextStyle: {\n color: tokens.theme[theme].color.neutral.text.default,\n fontFamily: tokens.typography['body-medium'].fontFamily,\n fontSize: tokens.typography['body-medium'].fontSize,\n fontWeight: tokens.typography['body-medium'].fontWeight,\n lineHeight: tokens.typography['body-medium'].lineHeight,\n },\n axisLine: {\n lineStyle: {\n cap: 'square',\n color: tokens.theme[theme].color.neutral.border.strong,\n width: 2,\n },\n },\n axisTick: {\n length: 8,\n lineStyle: {\n color: tokens.theme[theme].color.neutral.border.strong,\n width: 1,\n },\n show: true,\n },\n minorSplitLine: {\n lineStyle: {\n color: tokens.theme[theme].color.neutral.border.weak,\n },\n },\n splitArea: {\n areaStyle: {\n color: [tokens.theme[theme].color.neutral.hover, 'transparent'],\n },\n },\n splitLine: {\n lineStyle: {\n color: tokens.theme[theme].color.neutral.border.weak,\n },\n },\n});\n\nexport const ndlEchartsTheme = (\n theme: 'light' | 'dark',\n palette?: HexColor[],\n) => {\n return {\n darkMode: theme === 'dark',\n color: palette ?? Object.values(tokens.categorical),\n backgroundColor: 'transparent',\n\n axisPointer: {\n crossStyle: {\n color: tokens.theme[theme].color.neutral.border.strong,\n },\n label: {\n color: tokens.theme[theme].color.neutral.text.weaker,\n },\n lineStyle: {\n color: tokens.theme[theme].color.neutral.border.strong,\n },\n },\n // We use a custom legend so this does not affect anything\n legend: {},\n textStyle: {\n color: tokens.theme[theme].color.neutral.text.weaker,\n },\n // We are not using the echarts title so this does not affect anything\n title: {},\n toolbox: {},\n\n dataZoom: {\n backgroundColor: 'transparent',\n borderColor: tokens.theme[theme].color.neutral.border.weak,\n borderRadius: parseInt(tokens.borderRadius.sm.replace('px', '')),\n dataBackground: {\n areaStyle: {\n color: tokens.theme[theme].color.neutral.bg.default,\n opacity: 1,\n },\n lineStyle: {\n color: tokens.theme[theme].color.neutral.border.weak,\n opacity: 1,\n width: 1,\n },\n },\n emphasis: {\n handleLabel: {},\n handleStyle: {\n borderColor: tokens.theme[theme].color.neutral.border.strong,\n color: tokens.theme[theme].color.neutral.bg.strong,\n opacity: 1,\n },\n moveHandleStyle: {\n borderColor: tokens.theme[theme].color.neutral.border.strong,\n color: tokens.theme[theme].color.neutral.border.strong,\n opacity: 1,\n },\n },\n fillerColor: `rgb( from ${tokens.theme[theme].color.neutral.hover} r g b / 0.1)`,\n handleIcon:\n 'M2 0.5h4s1.5 0 1.5 1.5v16s0 1.5 -1.5 1.5h-4s-1.5 0 -1.5 -1.5v-16s0 -1.5 1.5 -1.5',\n handleSize: '80%',\n handleStyle: {\n borderColor: tokens.theme[theme].color.neutral.border.strong,\n color: tokens.theme[theme].color.neutral.bg.weak,\n\n // borderRadius: 0, // Doesn't work\n },\n moveHandleSize: 6,\n moveHandleStyle: {\n backgroundColor: tokens.theme[theme].color.neutral.bg.strong,\n color: tokens.theme[theme].color.neutral.bg.strong,\n opacity: 1, // 0.3,\n },\n selectedDataBackground: {\n areaStyle: {\n color: tokens.theme[theme].color.neutral.bg['on-bg-weak'],\n opacity: 1,\n shadowBlur: 0,\n },\n lineStyle: {\n color: tokens.theme[theme].color.neutral.border.strong,\n opacity: 1,\n width: 1,\n },\n },\n textStyle: {\n color: tokens.theme[theme].color.neutral.text.weaker,\n },\n },\n // Not implemented\n visualMap: {},\n // Not implemented\n timeline: {},\n // Not implemented\n calendar: {},\n timeAxis: axisCommon(theme),\n logAxis: axisCommon(theme),\n valueAxis: axisCommon(theme),\n categoryAxis: axisCommon(theme),\n line: {\n symbol: 'circle',\n },\n // Not implemented\n graph: {},\n // Not implemented\n gauge: {},\n // Not implemented\n candlestick: {},\n };\n};\n"]}
1
+ {"version":3,"file":"ndl-echarts-theme.js","names":["tokens"],"sources":["../../../../src/charts/themes/ndl-echarts-theme.ts"],"sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n// oxlint-disable sort-keys\nimport { tokens } from '@neo4j-ndl/base';\n\nimport { type HexColor } from '../utils/chart-types';\n\nconst axisCommon = (theme: 'light' | 'dark') => ({\n axisLabel: {\n color: tokens.theme[theme].color.neutral.text.weaker,\n fontFamily: tokens.typography['body-small'].fontFamily,\n fontSize: tokens.typography['body-small'].fontSize,\n },\n nameGap: 8,\n nameMoveOverlap: true,\n nameTextStyle: {\n color: tokens.theme[theme].color.neutral.text.default,\n fontFamily: tokens.typography['body-medium'].fontFamily,\n fontSize: tokens.typography['body-medium'].fontSize,\n fontWeight: tokens.typography['body-medium'].fontWeight,\n lineHeight: tokens.typography['body-medium'].lineHeight,\n },\n axisLine: {\n lineStyle: {\n cap: 'square',\n color: tokens.theme[theme].color.neutral.border.strong,\n width: 2,\n },\n },\n axisTick: {\n length: 8,\n lineStyle: {\n color: tokens.theme[theme].color.neutral.border.strong,\n width: 1,\n },\n show: true,\n },\n minorSplitLine: {\n lineStyle: {\n color: tokens.theme[theme].color.neutral.border.weak,\n },\n },\n splitArea: {\n areaStyle: {\n color: [tokens.theme[theme].color.neutral.hover, 'transparent'],\n },\n },\n splitLine: {\n lineStyle: {\n color: tokens.theme[theme].color.neutral.border.weak,\n },\n },\n});\n\nexport const ndlEchartsTheme = (\n theme: 'light' | 'dark',\n palette?: HexColor[],\n) => {\n return {\n darkMode: theme === 'dark',\n color: palette ?? Object.values(tokens.categorical),\n backgroundColor: 'transparent',\n\n axisPointer: {\n crossStyle: {\n color: tokens.theme[theme].color.neutral.border.strong,\n },\n label: {\n color: tokens.theme[theme].color.neutral.text.weaker,\n },\n lineStyle: {\n color: tokens.theme[theme].color.neutral.border.strong,\n },\n },\n // We use a custom legend so this does not affect anything\n legend: {},\n textStyle: {\n color: tokens.theme[theme].color.neutral.text.weaker,\n },\n // We are not using the echarts title so this does not affect anything\n title: {},\n toolbox: {},\n\n dataZoom: {\n backgroundColor: 'transparent',\n borderColor: tokens.theme[theme].color.neutral.border.weak,\n borderRadius: parseInt(tokens.borderRadius.sm.replace('px', '')),\n dataBackground: {\n areaStyle: {\n color: tokens.theme[theme].color.neutral.bg.default,\n opacity: 1,\n },\n lineStyle: {\n color: tokens.theme[theme].color.neutral.border.weak,\n opacity: 1,\n width: 1,\n },\n },\n emphasis: {\n handleLabel: {},\n handleStyle: {\n borderColor: tokens.theme[theme].color.neutral.border.strong,\n color: tokens.theme[theme].color.neutral.bg.strong,\n opacity: 1,\n },\n moveHandleStyle: {\n borderColor: tokens.theme[theme].color.neutral.border.strong,\n color: tokens.theme[theme].color.neutral.border.strong,\n opacity: 1,\n },\n },\n fillerColor: `rgb( from ${tokens.theme[theme].color.neutral.hover} r g b / 0.1)`,\n handleIcon:\n 'M2 0.5h4s1.5 0 1.5 1.5v16s0 1.5 -1.5 1.5h-4s-1.5 0 -1.5 -1.5v-16s0 -1.5 1.5 -1.5',\n handleSize: '80%',\n handleStyle: {\n borderColor: tokens.theme[theme].color.neutral.border.strong,\n color: tokens.theme[theme].color.neutral.bg.weak,\n\n // borderRadius: 0, // Doesn't work\n },\n moveHandleSize: 6,\n moveHandleStyle: {\n backgroundColor: tokens.theme[theme].color.neutral.bg.strong,\n color: tokens.theme[theme].color.neutral.bg.strong,\n opacity: 1, // 0.3,\n },\n selectedDataBackground: {\n areaStyle: {\n color: tokens.theme[theme].color.neutral.bg['on-bg-weak'],\n opacity: 1,\n shadowBlur: 0,\n },\n lineStyle: {\n color: tokens.theme[theme].color.neutral.border.strong,\n opacity: 1,\n width: 1,\n },\n },\n textStyle: {\n color: tokens.theme[theme].color.neutral.text.weaker,\n },\n },\n // Not implemented\n visualMap: {},\n // Not implemented\n timeline: {},\n // Not implemented\n calendar: {},\n timeAxis: axisCommon(theme),\n logAxis: axisCommon(theme),\n valueAxis: axisCommon(theme),\n categoryAxis: axisCommon(theme),\n line: {\n symbol: 'circle',\n },\n // Not implemented\n graph: {},\n // Not implemented\n gauge: {},\n // Not implemented\n candlestick: {},\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAM,cAAc,WAA6B;CAC/C,WAAW;EACT,OAAOA,gBAAAA,OAAO,MAAM,MAAM,CAAC,MAAM,QAAQ,KAAK;EAC9C,YAAYA,gB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