@validationcloud/fractal-ui 1.52.0 → 1.54.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 (119) hide show
  1. package/dist/components/echarts-renderer/calculate-title-layout.d.ts +8 -0
  2. package/dist/components/echarts-renderer/calculate-title-layout.test.d.ts +1 -0
  3. package/dist/components/echarts-renderer/detect-horizontal-bars.d.ts +13 -0
  4. package/dist/components/echarts-renderer/mavrik-chart.d.ts +19 -0
  5. package/dist/components/echarts-renderer/mavrik-theme-horizontal.json.d.ts +277 -0
  6. package/dist/components/echarts-renderer/mavrik-theme.d.ts +242 -0
  7. package/dist/components/echarts-renderer/mavrik-theme.json.d.ts +6 -2
  8. package/dist/components/echarts-renderer/sanitize-chart-options.d.ts +6 -0
  9. package/dist/components/echarts-renderer/use-chart-instance.d.ts +0 -1
  10. package/dist/components/echarts-renderer/watermark-graphic.d.ts +12 -0
  11. package/dist/components/select/select.d.ts +23 -0
  12. package/dist/index.d.ts +3 -1
  13. package/dist/index.js +67 -61
  14. package/dist/lib/render-mavrik-chart-to-image.d.ts +33 -0
  15. package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +527 -0
  16. package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +402 -0
  17. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +208 -0
  18. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +136 -0
  19. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +130 -0
  20. package/dist/node_modules/.pnpm/@radix-ui_number@1.1.1/node_modules/@radix-ui/number/dist/index.js +6 -0
  21. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.js +9 -0
  22. package/dist/node_modules/.pnpm/@radix-ui_react-arrow@1.1.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_d580df0584800d3ed24dd50bc4bb768c/node_modules/@radix-ui/react-arrow/dist/index.js +24 -0
  23. package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_re_965c21727754e936eeb7d35183788fa0/node_modules/@radix-ui/react-collection/dist/index.js +49 -0
  24. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.js +53 -0
  25. package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-direction/dist/index.js +10 -0
  26. package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.6_@types_react-dom@19.2.3_@types_react@19.2.6__@t_c6844451b48448597731ceee2c7ec947/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +128 -0
  27. package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.js +18 -0
  28. package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_r_1236dc37c73a65e17034434472fa319b/node_modules/@radix-ui/react-focus-scope/dist/index.js +137 -0
  29. package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-id/dist/index.js +13 -0
  30. package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.2.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_875fb0de6110028421a3e7790df757e0/node_modules/@radix-ui/react-popper/dist/index.js +219 -0
  31. package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.5_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_5324bcb5f7050b43e9225714ff37edcd/node_modules/@radix-ui/react-portal/dist/index.js +16 -0
  32. package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.0.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_87a4386c2964ee4c9c162dadc854f596/node_modules/@radix-ui/react-primitive/dist/index.js +35 -0
  33. package/dist/node_modules/.pnpm/@radix-ui_react-select@2.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_6ddc7a756051e26689ab8a69ff12c731/node_modules/@radix-ui/react-select/dist/index.js +821 -0
  34. package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.0_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-slot/dist/index.js +48 -0
  35. package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +10 -0
  36. package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +32 -0
  37. package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +14 -0
  38. package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
  39. package/dist/node_modules/.pnpm/@radix-ui_react-use-previous@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-previous/dist/index.js +8 -0
  40. package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-size/dist/index.js +27 -0
  41. package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.1.3_@types_react-dom@19.2.3_@types_react@19.2.6__@typ_06b3b0029799d875b5a80b38402a9c14/node_modules/@radix-ui/react-visually-hidden/dist/index.js +30 -0
  42. package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +52 -0
  43. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +7 -0
  44. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/component.js +71 -0
  45. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +7 -0
  46. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +25 -0
  47. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.js +11 -0
  48. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +112 -0
  49. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/UI.js +31 -0
  50. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +16 -0
  51. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +68 -0
  52. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
  53. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
  54. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0/node_modules/react-style-singleton/dist/es2015/component.js +11 -0
  55. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0/node_modules/react-style-singleton/dist/es2015/hook.js +15 -0
  56. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0/node_modules/react-style-singleton/dist/es2015/singleton.js +30 -0
  57. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +27 -0
  58. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es2015/assignRef.js +6 -0
  59. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +26 -0
  60. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es2015/useRef.js +25 -0
  61. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es2015/exports.js +18 -0
  62. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es2015/medium.js +67 -0
  63. package/dist/server.js +1 -1
  64. package/dist/src/assets/vc-logo.svg.js +4 -0
  65. package/dist/src/components/echarts-renderer/calculate-title-layout.js +72 -0
  66. package/dist/src/components/echarts-renderer/detect-horizontal-bars.js +13 -0
  67. package/dist/src/components/echarts-renderer/mavrik-chart.js +12 -0
  68. package/dist/src/components/echarts-renderer/mavrik-theme-horizontal.json.js +33 -0
  69. package/dist/src/components/echarts-renderer/mavrik-theme.js +23 -0
  70. package/dist/src/components/echarts-renderer/sanitize-chart-options.js +9 -0
  71. package/dist/src/components/echarts-renderer/use-chart-instance.js +63 -0
  72. package/dist/src/components/echarts-renderer/watermark-graphic.js +25 -0
  73. package/dist/src/components/select/select.js +105 -0
  74. package/dist/src/lib/render-chart-to-image.js +51 -0
  75. package/package.json +20 -15
  76. package/dist/components/echarts-renderer/mavrik-theme.js +0 -11
  77. package/dist/components/echarts-renderer/use-chart-instance.js +0 -46
  78. package/dist/lib/render-chart-to-image.js +0 -34
  79. /package/dist/{assets → src/assets}/animated-loader.svg.js +0 -0
  80. /package/dist/{assets → src/assets}/default-avatar.svg.js +0 -0
  81. /package/dist/{assets → src/assets}/not-found.svg.js +0 -0
  82. /package/dist/{components → src/components}/animated-loader/animated-loader.js +0 -0
  83. /package/dist/{components → src/components}/badge/badge.js +0 -0
  84. /package/dist/{components → src/components}/box/box.js +0 -0
  85. /package/dist/{components → src/components}/button/button.js +0 -0
  86. /package/dist/{components → src/components}/client-modal/client-modal.js +0 -0
  87. /package/dist/{components → src/components}/copy-button/copy-button.js +0 -0
  88. /package/dist/{components → src/components}/decorated-icon/decorated-icon.js +0 -0
  89. /package/dist/{components → src/components}/dropdown-menu/dropdown-menu.js +0 -0
  90. /package/dist/{components → src/components}/echarts-renderer/echarts-chart-option.js +0 -0
  91. /package/dist/{components → src/components}/echarts-renderer/echarts-renderer.js +0 -0
  92. /package/dist/{components → src/components}/echarts-renderer/echarts-theme-option.js +0 -0
  93. /package/dist/{components → src/components}/echarts-renderer/mavrik-theme.json.js +0 -0
  94. /package/dist/{components → src/components}/error-boundary/error-boundary.js +0 -0
  95. /package/dist/{components → src/components}/icon/icon.js +0 -0
  96. /package/dist/{components → src/components}/icon-button/icon-button.js +0 -0
  97. /package/dist/{components → src/components}/input-button/input-button.js +0 -0
  98. /package/dist/{components → src/components}/mount-svg-sprite/mount-svg-sprite.js +0 -0
  99. /package/dist/{components → src/components}/not-found-component/not-found-component.js +0 -0
  100. /package/dist/{components → src/components}/page-padding/page-padding.js +0 -0
  101. /package/dist/{components → src/components}/protocol-logo/protocol-logo.js +0 -0
  102. /package/dist/{components → src/components}/scroll-area/index.js +0 -0
  103. /package/dist/{components → src/components}/scroll-area/scroll-area-viewport.js +0 -0
  104. /package/dist/{components → src/components}/scroll-area/scroll-area.js +0 -0
  105. /package/dist/{components → src/components}/skeleton/skeleton.js +0 -0
  106. /package/dist/{components → src/components}/switch/switch.js +0 -0
  107. /package/dist/{components → src/components}/text-input/text-input.js +0 -0
  108. /package/dist/{components → src/components}/tooltip/tooltip.js +0 -0
  109. /package/dist/{components → src/components}/tooltip-provider/tooltip-provider.js +0 -0
  110. /package/dist/{components → src/components}/touch-target/touch-target.js +0 -0
  111. /package/dist/{components → src/components}/user-dropdown/user-dropdown.js +0 -0
  112. /package/dist/{components → src/components}/user-dropdown-mobile/user-dropdown-mobile.js +0 -0
  113. /package/dist/{hooks → src/hooks}/use-scroll-to-bottom.js +0 -0
  114. /package/dist/{internal → src/internal}/modal-header.js +0 -0
  115. /package/dist/{internal → src/internal}/modal.js +0 -0
  116. /package/dist/{internal → src/internal}/react-portal.js +0 -0
  117. /package/dist/{internal → src/internal}/round-button.js +0 -0
  118. /package/dist/{lib → src/lib}/tailwind-merge.js +0 -0
  119. /package/dist/{utils → src/utils}/disable-password-managers.js +0 -0
@@ -0,0 +1,30 @@
1
+ import { getNonce as o } from "../../../../../get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js";
2
+ function r() {
3
+ if (!document)
4
+ return null;
5
+ var t = document.createElement("style");
6
+ t.type = "text/css";
7
+ var e = o();
8
+ return e && t.setAttribute("nonce", e), t;
9
+ }
10
+ function l(t, e) {
11
+ t.styleSheet ? t.styleSheet.cssText = e : t.appendChild(document.createTextNode(e));
12
+ }
13
+ function a(t) {
14
+ var e = document.head || document.getElementsByTagName("head")[0];
15
+ e.appendChild(t);
16
+ }
17
+ var c = function() {
18
+ var t = 0, e = null;
19
+ return {
20
+ add: function(n) {
21
+ t == 0 && (e = r()) && (l(e, n), a(e)), t++;
22
+ },
23
+ remove: function() {
24
+ t--, !t && e && (e.parentNode && e.parentNode.removeChild(e), e = null);
25
+ }
26
+ };
27
+ };
28
+ export {
29
+ c as stylesheetSingleton
30
+ };
@@ -0,0 +1,27 @@
1
+ var p = function() {
2
+ return p = Object.assign || function(e) {
3
+ for (var n, r = 1, o = arguments.length; r < o; r++) {
4
+ n = arguments[r];
5
+ for (var a in n) Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
6
+ }
7
+ return e;
8
+ }, p.apply(this, arguments);
9
+ };
10
+ function c(t, e) {
11
+ var n = {};
12
+ for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
13
+ if (t != null && typeof Object.getOwnPropertySymbols == "function")
14
+ for (var o = 0, r = Object.getOwnPropertySymbols(t); o < r.length; o++)
15
+ e.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[o]) && (n[r[o]] = t[r[o]]);
16
+ return n;
17
+ }
18
+ function l(t, e, n) {
19
+ if (n || arguments.length === 2) for (var r = 0, o = e.length, a; r < o; r++)
20
+ (a || !(r in e)) && (a || (a = Array.prototype.slice.call(e, 0, r)), a[r] = e[r]);
21
+ return t.concat(a || Array.prototype.slice.call(e));
22
+ }
23
+ export {
24
+ p as __assign,
25
+ c as __rest,
26
+ l as __spreadArray
27
+ };
@@ -0,0 +1,6 @@
1
+ function i(n, t) {
2
+ return typeof n == "function" ? n(t) : n && (n.current = t), n;
3
+ }
4
+ export {
5
+ i as assignRef
6
+ };
@@ -0,0 +1,26 @@
1
+ import * as f from "react";
2
+ import { assignRef as o } from "./assignRef.js";
3
+ import { useCallbackRef as l } from "./useRef.js";
4
+ var s = typeof window < "u" ? f.useLayoutEffect : f.useEffect, c = /* @__PURE__ */ new WeakMap();
5
+ function v(e, m) {
6
+ var t = l(null, function(n) {
7
+ return e.forEach(function(u) {
8
+ return o(u, n);
9
+ });
10
+ });
11
+ return s(function() {
12
+ var n = c.get(t);
13
+ if (n) {
14
+ var u = new Set(n), r = new Set(e), i = t.current;
15
+ u.forEach(function(a) {
16
+ r.has(a) || o(a, null);
17
+ }), r.forEach(function(a) {
18
+ u.has(a) || o(a, i);
19
+ });
20
+ }
21
+ c.set(t, e);
22
+ }, [e]), t;
23
+ }
24
+ export {
25
+ v as useMergeRefs
26
+ };
@@ -0,0 +1,25 @@
1
+ import { useState as u } from "react";
2
+ function n(c, r) {
3
+ var e = u(function() {
4
+ return {
5
+ // value
6
+ value: c,
7
+ // last callback
8
+ callback: r,
9
+ // "memoized" public interface
10
+ facade: {
11
+ get current() {
12
+ return e.value;
13
+ },
14
+ set current(a) {
15
+ var t = e.value;
16
+ t !== a && (e.value = a, e.callback(a, t));
17
+ }
18
+ }
19
+ };
20
+ })[0];
21
+ return e.callback = r, e.facade;
22
+ }
23
+ export {
24
+ n as useCallbackRef
25
+ };
@@ -0,0 +1,18 @@
1
+ import { __rest as o, __assign as d } from "../../../../../tslib@2.8.1/node_modules/tslib/tslib.es6.js";
2
+ import * as n from "react";
3
+ var i = function(r) {
4
+ var e = r.sideCar, a = o(r, ["sideCar"]);
5
+ if (!e)
6
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
7
+ var t = e.read();
8
+ if (!t)
9
+ throw new Error("Sidecar medium not found");
10
+ return n.createElement(t, d({}, a));
11
+ };
12
+ i.isSideCarExport = !0;
13
+ function p(r, e) {
14
+ return r.useMedium(e), i;
15
+ }
16
+ export {
17
+ p as exportSidecar
18
+ };
@@ -0,0 +1,67 @@
1
+ import { __assign as d } from "../../../../../tslib@2.8.1/node_modules/tslib/tslib.es6.js";
2
+ function l(r) {
3
+ return r;
4
+ }
5
+ function h(r, t) {
6
+ t === void 0 && (t = l);
7
+ var e = [], o = !1, c = {
8
+ read: function() {
9
+ if (o)
10
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
11
+ return e.length ? e[e.length - 1] : r;
12
+ },
13
+ useMedium: function(u) {
14
+ var n = t(u, o);
15
+ return e.push(n), function() {
16
+ e = e.filter(function(i) {
17
+ return i !== n;
18
+ });
19
+ };
20
+ },
21
+ assignSyncMedium: function(u) {
22
+ for (o = !0; e.length; ) {
23
+ var n = e;
24
+ e = [], n.forEach(u);
25
+ }
26
+ e = {
27
+ push: function(i) {
28
+ return u(i);
29
+ },
30
+ filter: function() {
31
+ return e;
32
+ }
33
+ };
34
+ },
35
+ assignMedium: function(u) {
36
+ o = !0;
37
+ var n = [];
38
+ if (e.length) {
39
+ var i = e;
40
+ e = [], i.forEach(u), n = e;
41
+ }
42
+ var s = function() {
43
+ var f = n;
44
+ n = [], f.forEach(u);
45
+ }, a = function() {
46
+ return Promise.resolve().then(s);
47
+ };
48
+ a(), e = {
49
+ push: function(f) {
50
+ n.push(f), a();
51
+ },
52
+ filter: function(f) {
53
+ return n = n.filter(f), e;
54
+ }
55
+ };
56
+ }
57
+ };
58
+ return c;
59
+ }
60
+ function v(r) {
61
+ r === void 0 && (r = {});
62
+ var t = h(null);
63
+ return t.options = d({ async: !0, ssr: !1 }, r), t;
64
+ }
65
+ export {
66
+ v as createSidecarMedium
67
+ };
package/dist/server.js CHANGED
@@ -1,4 +1,4 @@
1
- import { renderChartToImage as o } from "./lib/render-chart-to-image.js";
1
+ import { renderChartToImage as o } from "./src/lib/render-chart-to-image.js";
2
2
  export {
3
3
  o as renderChartToImage
4
4
  };
@@ -0,0 +1,4 @@
1
+ const a = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='210'%20height='24'%20fill='none'%20viewBox='0%200%20210%2024'%3e%3cg%20fill='%23a7a9ad'%20fill-opacity='0.3'%3e%3cpath%20fill-rule='evenodd'%20d='M33.733%201.868h-21.67C6.438%201.868%201.878%206.404%201.878%2012s4.56%2010.132%2010.185%2010.132h21.67c5.625%200%2010.185-4.536%2010.185-10.132S39.358%201.868%2033.733%201.868M0%2012c0%206.627%205.4%2012%2012.063%2012h21.67c6.662%200%2012.063-5.373%2012.063-12s-5.4-12-12.063-12h-21.67C5.401%200%200%205.373%200%2012'%20clip-rule='evenodd'/%3e%3cpath%20fill-rule='evenodd'%20d='M33.734%205.174h-21.67C8.273%205.174%205.2%208.23%205.2%2012s3.073%206.826%206.863%206.826h21.67c3.79%200%206.862-3.056%206.862-6.826s-3.072-6.826-6.862-6.826M3.323%2012c0%204.802%203.912%208.695%208.74%208.695h21.67c4.827%200%208.74-3.893%208.74-8.695s-3.913-8.695-8.74-8.695h-21.67c-4.828%200-8.74%203.893-8.74%208.695'%20clip-rule='evenodd'/%3e%3cpath%20fill-rule='evenodd'%20d='M33.733%208.48h-21.67A3.53%203.53%200%200%200%208.523%2012a3.53%203.53%200%200%200%203.54%203.521h21.67a3.53%203.53%200%200%200%203.54-3.52%203.53%203.53%200%200%200-3.54-3.522M6.646%2012c0%202.976%202.425%205.39%205.417%205.39h21.67c2.992%200%205.418-2.414%205.418-5.39s-2.426-5.39-5.418-5.39h-21.67c-2.992%200-5.417%202.414-5.417%205.39'%20clip-rule='evenodd'/%3e%3cpath%20d='M58.45%2020.695h-2.77L48.592%203.327h2.7l5.773%2014.542%205.773-14.542h2.7zM73.986%2020.695h-2.06l-.14-1.482q-.64.81-1.617%201.262-.978.45-2.165.451-1.246%200-2.223-.486a3.86%203.86%200%200%201-1.537-1.332%203.4%203.4%200%200%201-.559-1.922q0-1.134.606-1.991.605-.868%201.653-1.355%201.047-.498%202.386-.498.838%200%201.699.197a6.6%206.6%200%200%201%201.571.556v-.429q0-.844-.442-1.447a2.7%202.7%200%200%200-1.187-.938%204.1%204.1%200%200%200-1.653-.324q-.802%200-1.641.278-.826.277-1.56.857l-.721-1.934a9.3%209.3%200%200%201%202.2-.95%208.3%208.3%200%200%201%202.257-.323q1.583%200%202.724.625a4.35%204.35%200%200%201%201.78%201.783q.63%201.146.63%202.71zm-5.517-1.783q.827%200%201.525-.336a2.93%202.93%200%200%200%201.129-.973q.442-.636.477-1.482v-.162a4.7%204.7%200%200%200-1.338-.683%204.6%204.6%200%200%200-1.502-.255q-1.176%200-1.955.556-.78.555-.78%201.424%200%20.544.314.984.326.43.873.683.56.244%201.257.244M77.988%2020.695h-2.54V2.864h2.54zM80.666%205.758q-.548%200-.92-.382a1.28%201.28%200%200%201-.373-.926q0-.545.373-.915.372-.382.92-.382.56%200%20.932.382.385.37.385.915t-.385.926q-.373.382-.932.382m1.188%2014.937h-2.388V9.116h2.388zM95.628%2020.695H93.52l-.128-1.656a5.7%205.7%200%200%201-1.909%201.39q-1.106.497-2.432.497-1.677%200-3.003-.787a5.7%205.7%200%200%201-2.095-2.154q-.757-1.365-.757-3.08%200-1.724.757-3.08a5.7%205.7%200%200%201%202.095-2.153q1.326-.787%203.003-.787%201.257%200%202.328.451a5.5%205.5%200%200%201%201.862%201.262V3.327h2.386zm-6.18-1.9q1.059%200%201.908-.486a3.75%203.75%200%200%200%201.374-1.32q.512-.833.512-1.898v-.394q0-1.065-.512-1.899a3.66%203.66%200%200%200-1.374-1.308q-.85-.475-1.908-.475-1.083%200-1.944.51a3.7%203.7%200%200%200-1.362%201.389q-.5.869-.5%201.98t.5%201.991a3.8%203.8%200%200%200%201.362%201.401q.861.51%201.944.51M107.269%2020.695h-2.061l-.139-1.482q-.64.81-1.618%201.262-.978.45-2.165.451-1.245%200-2.223-.486a3.86%203.86%200%200%201-1.536-1.332%203.4%203.4%200%200%201-.56-1.922q0-1.134.606-1.991.605-.868%201.653-1.355%201.047-.498%202.386-.498a7.6%207.6%200%200%201%201.699.197%206.6%206.6%200%200%201%201.571.556v-.429q0-.844-.442-1.447a2.7%202.7%200%200%200-1.187-.938%204.1%204.1%200%200%200-1.653-.324%205.166%205.166%200%200%200-3.2%201.135l-.722-1.934a9.3%209.3%200%200%201%202.2-.95%208.3%208.3%200%200%201%202.258-.323q1.583%200%202.723.625a4.35%204.35%200%200%201%201.781%201.783q.629%201.146.629%202.71zm-5.517-1.783q.826%200%201.524-.336a2.9%202.9%200%200%200%201.129-.973q.442-.636.477-1.482v-.162a4.6%204.6%200%200%200-1.338-.683%204.6%204.6%200%200%200-1.502-.255q-1.175%200-1.955.556-.78.555-.78%201.424%200%20.544.314.984.327.43.873.683.56.244%201.258.244M116.424%2020.405q-1.221.521-2.362.521t-2.002-.486a3.5%203.5%200%200%201-1.339-1.366q-.477-.892-.477-2.05v-5.789h-2.037V9.116h2.153V6.222h2.27v2.894h3.399v2.119h-3.399v5.35q0%201.018.547%201.62.558.59%201.432.59.734%200%201.455-.44zM118.58%205.758q-.548%200-.92-.382a1.28%201.28%200%200%201-.373-.926q0-.545.373-.915.372-.382.92-.382.56%200%20.932.382.385.37.385.915t-.385.926a1.25%201.25%200%200%201-.932.382m1.188%2014.937h-2.388V9.116h2.388zM127.257%2020.926q-1.746%200-3.143-.787a5.85%205.85%200%200%201-2.2-2.142q-.803-1.366-.803-3.092%200-1.713.803-3.068a5.8%205.8%200%200%201%202.2-2.153q1.397-.8%203.143-.8%201.757%200%203.142.8a5.76%205.76%200%200%201%202.177%202.153q.803%201.355.803%203.068%200%201.725-.803%203.092a5.8%205.8%200%200%201-2.177%202.142q-1.385.787-3.142.787m-.012-2.13q1.06%200%201.886-.51a3.7%203.7%200%200%200%201.315-1.39q.489-.88.489-2.002%200-1.1-.489-1.969a3.6%203.6%200%200%200-1.315-1.389q-.827-.52-1.886-.52-1.047%200-1.885.52a3.7%203.7%200%200%200-1.327%201.39q-.477.868-.477%201.968%200%201.123.477%202.003a3.8%203.8%200%200%200%201.327%201.39q.837.509%201.885.509M145.816%2020.695h-2.386v-6.287q0-1.54-.849-2.455-.839-.915-2.258-.915-1.466%200-2.363.973-.896.972-.896%202.582v6.102h-2.386V9.116h2.013l.082%201.864a4.25%204.25%200%200%201%201.676-1.551q1.035-.544%202.432-.544%202.294%200%203.609%201.377%201.326%201.379%201.326%203.798zM166.178%2018.483a8.7%208.7%200%200%201-2.888%201.887q-1.664.672-3.631.672t-3.632-.672a8.7%208.7%200%200%201-2.898-1.887%208.9%208.9%200%200%201-1.908-2.871q-.676-1.656-.676-3.601%200-1.957.676-3.601a8.7%208.7%200%200%201%201.908-2.872%208.7%208.7%200%200%201%202.898-1.887q1.665-.671%203.632-.671%201.955%200%203.619.683%201.677.671%202.875%201.864l-1.78%201.806a6.2%206.2%200%200%200-2.094-1.54q-1.212-.567-2.654-.567-1.397%200-2.573.51a6%206%200%200%200-2.049%201.423%206.6%206.6%200%200%200-1.361%202.154q-.478%201.239-.478%202.698t.478%202.698a6.7%206.7%200%200%200%201.361%202.165%206.2%206.2%200%200%200%202.049%201.424q1.175.498%202.573.498%201.442%200%202.654-.556a6.2%206.2%200%200%200%202.083-1.552zM170.092%2020.695h-2.54V2.864h2.54zM177.534%2020.926q-1.745%200-3.143-.787a5.84%205.84%200%200%201-2.199-2.142q-.803-1.366-.803-3.092%200-1.713.803-3.068a5.8%205.8%200%200%201%202.199-2.153q1.398-.8%203.143-.8%201.758%200%203.142.8a5.75%205.75%200%200%201%202.176%202.153q.804%201.355.803%203.068%200%201.725-.803%203.092a5.8%205.8%200%200%201-2.176%202.142q-1.384.787-3.142.787m-.013-2.13q1.06%200%201.887-.51a3.7%203.7%200%200%200%201.315-1.39q.488-.88.488-2.002%200-1.1-.488-1.969a3.6%203.6%200%200%200-1.315-1.389q-.827-.52-1.887-.52a3.5%203.5%200%200%200-1.885.52%203.7%203.7%200%200%200-1.326%201.39q-.477.868-.477%201.968%200%201.123.477%202.003a3.8%203.8%200%200%200%201.326%201.39%203.56%203.56%200%200%200%201.885.509M196.1%2020.695h-2.026l-.082-1.864q-.64%201.018-1.676%201.563-1.025.532-2.433.532-2.28%200-3.607-1.378-1.316-1.39-1.316-3.797V9.116h2.387v6.287q0%201.54.837%202.455.84.915%202.258.915%201.468%200%202.364-.973.907-.984.907-2.582V9.116h2.387zM209.84%2020.695h-2.106l-.129-1.656a5.7%205.7%200%200%201-1.908%201.39q-1.105.497-2.433.497-1.676%200-3.002-.787a5.7%205.7%200%200%201-2.096-2.154q-.756-1.365-.756-3.08%200-1.724.756-3.08a5.7%205.7%200%200%201%202.096-2.153q1.326-.787%203.002-.787%201.257%200%202.329.451a5.5%205.5%200%200%201%201.862%201.262V3.327h2.385zm-6.18-1.9q1.059%200%201.908-.486a3.74%203.74%200%200%200%201.374-1.32q.512-.833.513-1.898v-.394q0-1.065-.513-1.899a3.65%203.65%200%200%200-1.374-1.308q-.849-.475-1.908-.475-1.082%200-1.943.51a3.7%203.7%200%200%200-1.363%201.389q-.5.869-.499%201.98%200%201.111.499%201.991a3.8%203.8%200%200%200%201.363%201.401q.86.51%201.943.51'/%3e%3c/g%3e%3c/svg%3e";
2
+ export {
3
+ a as default
4
+ };
@@ -0,0 +1,72 @@
1
+ function s(r, n) {
2
+ if (typeof r == "number")
3
+ return r;
4
+ if (typeof r == "string") {
5
+ if (r.endsWith("%")) {
6
+ const t = parseFloat(r);
7
+ if (!Number.isNaN(t))
8
+ return t / 100 * n;
9
+ }
10
+ if (r.endsWith("px")) {
11
+ const t = parseFloat(r);
12
+ if (!Number.isNaN(t))
13
+ return t;
14
+ }
15
+ }
16
+ }
17
+ function d(r, n) {
18
+ const t = r.grid, i = n?.grid, e = r.title, l = n?.title;
19
+ let f;
20
+ (t && !Array.isArray(t) || i) && (f = {
21
+ left: (t && !Array.isArray(t) ? t.left : void 0) ?? i?.left,
22
+ right: (t && !Array.isArray(t) ? t.right : void 0) ?? i?.right
23
+ });
24
+ let T;
25
+ return (e && !Array.isArray(e) || l) && (T = {
26
+ left: (e && !Array.isArray(e) ? e.left : void 0) ?? l?.left,
27
+ padding: (e && !Array.isArray(e) ? e.padding : void 0) ?? l?.padding
28
+ }), { grid: f, title: T };
29
+ }
30
+ function A(r, n, t) {
31
+ const { grid: i, title: e } = d(r, n);
32
+ let l;
33
+ if (e?.left !== void 0) {
34
+ const T = s(e.left, t);
35
+ T !== void 0 ? l = T : typeof e.left == "string" && ["center", "left", "right"].includes(e.left) ? l = typeof e.padding == "number" ? e.padding : 5 : l = 5;
36
+ } else
37
+ i?.left !== void 0 ? l = s(i.left, t) ?? s("15%", t) ?? 0 : l = s("15%", t) ?? 0;
38
+ let f;
39
+ if (i?.right !== void 0)
40
+ f = s(i.right, t) ?? s("10%", t) ?? 0;
41
+ else if (i?.left !== void 0 && e?.left === void 0)
42
+ f = s("10%", t) ?? 0;
43
+ else if (e?.left !== void 0) {
44
+ const T = s(e.left, t);
45
+ T !== void 0 ? f = T : typeof e.left == "string" && ["center", "left", "right"].includes(e.left) ? f = typeof e.padding == "number" ? e.padding : 5 : f = s("10%", t) ?? 0;
46
+ } else
47
+ f = s("10%", t) ?? 0;
48
+ return t - l - f;
49
+ }
50
+ function o(r, n, t) {
51
+ const i = r.title;
52
+ if (!i || Array.isArray(i))
53
+ return r;
54
+ const e = i.text;
55
+ if (!e || typeof e != "string")
56
+ return r;
57
+ const l = A(r, t, n);
58
+ return l <= 0 ? r : {
59
+ ...r,
60
+ title: {
61
+ ...i,
62
+ textStyle: {
63
+ ...i.textStyle,
64
+ width: l,
65
+ overflow: "truncate"
66
+ }
67
+ }
68
+ };
69
+ }
70
+ export {
71
+ o as calculateTitleLayout
72
+ };
@@ -0,0 +1,13 @@
1
+ function x(e) {
2
+ const s = e.series;
3
+ if (!s || !(Array.isArray(s) ? s : [s]).some((r) => typeof r != "object" ? !1 : "type" in r && r.type === "bar")) return !1;
4
+ const t = e.xAxis, i = e.yAxis, o = Array.isArray(t) ? t[0] : t, y = Array.isArray(i) ? i[0] : i, n = (r) => {
5
+ if (!r || typeof r != "object") return !1;
6
+ const a = r;
7
+ return a.type === "category" || a.data !== void 0 && a.type === void 0;
8
+ }, A = n(y), f = n(o);
9
+ return A && !f;
10
+ }
11
+ export {
12
+ x as hasHorizontalBars
13
+ };
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import { jsx as a } from "react/jsx-runtime";
3
+ import { forwardRef as f, useMemo as i } from "react";
4
+ import { EChartsRenderer as s } from "./echarts-renderer.js";
5
+ import { selectMavrikTheme as c } from "./mavrik-theme.js";
6
+ const p = f(function({ option: r, className: e, ...t }, m) {
7
+ const o = i(() => c(r), [r]);
8
+ return /* @__PURE__ */ a(s, { ref: m, option: r, theme: o, className: e, ...t });
9
+ });
10
+ export {
11
+ p as MavrikChart
12
+ };
@@ -0,0 +1,33 @@
1
+ const o = [{ type: "linear", x: 0, y: 0, x2: 1, y2: 0, colorStops: [{ offset: 0, color: "#C14E64" }, { offset: 1, color: "#DF687D" }] }, { type: "linear", x: 0, y: 0, x2: 1, y2: 0, colorStops: [{ offset: 0, color: "#FFFFFF" }, { offset: 1, color: "#FFFFFF" }] }, { type: "linear", x: 0, y: 0, x2: 1, y2: 0, colorStops: [{ offset: 0, color: "#1E6FDA" }, { offset: 1, color: "#3F8CFF" }] }], e = "#242731", t = { fontFamily: "Poppins, sans-serif", fontWeight: 500 }, l = { top: 32, left: 32, textStyle: { color: "#FFFFFF", fontSize: 16, fontWeight: 600 }, subtextStyle: { color: "#A7A9AD" } }, r = { itemStyle: { borderWidth: 1 }, lineStyle: { width: 2 }, areaStyle: { opacity: 0.15 }, showSymbol: !1, symbolSize: 5, symbol: "circle", smooth: !1, sampling: "lttb" }, i = { barGap: "25%", barCategoryGap: "25%" }, a = { axisLine: { show: !0, lineStyle: { color: "#3A3D46", type: "dashed" } }, axisTick: { show: !1 }, axisLabel: { show: !0, color: "#A7A9AD", hideOverlap: !0 }, nameLocation: "middle", nameTextStyle: { color: "#A7A9AD", fontSize: 11, fontWeight: 400 }, splitLine: { show: !1 } }, s = { axisLine: { show: !1 }, axisTick: { show: !1 }, axisLabel: { show: !0, color: "#A7A9AD", hideOverlap: !0 }, nameLocation: "middle", nameTextStyle: { color: "#A7A9AD", fontSize: 11, fontWeight: 400 }, splitLine: { show: !0, lineStyle: { color: ["#3A3D46"], type: "dashed" } } }, n = { axisLine: { show: !1 }, axisTick: { show: !1 }, axisLabel: { show: !0, color: "#A7A9AD", hideOverlap: !0 }, nameLocation: "middle", nameTextStyle: { color: "#A7A9AD", fontSize: 11, fontWeight: 400 }, splitLine: { show: !0, lineStyle: { color: ["#3A3D46"], type: "dashed" } } }, c = { axisLine: { show: !0, lineStyle: { color: "#3A3D46" } }, axisTick: { show: !1 }, axisLabel: { show: !0, color: "#A7A9AD", hideOverlap: !0 }, nameLocation: "middle", nameTextStyle: { color: "#A7A9AD", fontSize: 11, fontWeight: 400 }, splitLine: { show: !1 } }, d = { top: 82, left: "auto", right: 32, icon: "circle", itemGap: 22, itemWidth: 12, itemHeight: 12, textStyle: { color: "#A7A9AD", fontSize: 11 } }, h = { top: 132, left: 32, right: 32, bottom: 32, outerBoundsMode: "same", outerBoundsContain: "axisLabel" }, A = { backgroundColor: "rgba(36, 39, 49, 0)", borderColor: "#3A3D46", borderRadius: 4, dataBackground: { lineStyle: { color: "#606060", width: 1 }, areaStyle: { color: "rgba(96, 96, 96, 0.3)" } }, selectedDataBackground: { lineStyle: { color: "#b36674", width: 1 }, areaStyle: { color: "rgba(164, 91, 105, 0.5)" } }, fillerColor: "rgba(82, 45, 52, 0.35)", handleStyle: { color: "#C14E64", borderColor: "#C14E64" }, moveHandleStyle: { color: "#b36674" }, brushStyle: { color: "rgba(95, 58, 65, 0.2)" }, emphasis: { handleStyle: { color: "rgb(209, 123, 140)", borderColor: "rgb(209, 123, 140)" } }, handleSize: "100%", textStyle: { color: "#A7A9AD" } }, y = { label: { color: "#A7A9AD" }, emphasis: { label: { color: "#FFFFFF" } } }, f = {
2
+ color: o,
3
+ backgroundColor: e,
4
+ textStyle: t,
5
+ title: l,
6
+ line: r,
7
+ bar: i,
8
+ categoryAxis: a,
9
+ valueAxis: s,
10
+ logAxis: n,
11
+ timeAxis: c,
12
+ legend: d,
13
+ grid: h,
14
+ dataZoom: A,
15
+ markPoint: y
16
+ };
17
+ export {
18
+ e as backgroundColor,
19
+ i as bar,
20
+ a as categoryAxis,
21
+ o as color,
22
+ A as dataZoom,
23
+ f as default,
24
+ h as grid,
25
+ d as legend,
26
+ r as line,
27
+ n as logAxis,
28
+ y as markPoint,
29
+ t as textStyle,
30
+ c as timeAxis,
31
+ l as title,
32
+ s as valueAxis
33
+ };
@@ -0,0 +1,23 @@
1
+ import { hasHorizontalBars as t } from "./detect-horizontal-bars.js";
2
+ import { isEChartsThemeOption as o } from "./echarts-theme-option.js";
3
+ import r from "./mavrik-theme-horizontal.json.js";
4
+ import i from "./mavrik-theme.json.js";
5
+ if (!o(i))
6
+ throw new Error("Invalid mavrik theme configuration");
7
+ if (!o(r))
8
+ throw new Error("Invalid mavrik horizontal theme configuration");
9
+ const e = {
10
+ name: "mavrik",
11
+ config: i
12
+ }, m = {
13
+ name: "mavrik-horizontal",
14
+ config: r
15
+ };
16
+ function l(n) {
17
+ return t(n) ? m : e;
18
+ }
19
+ export {
20
+ e as MAVRIK_THEME,
21
+ m as MAVRIK_THEME_HORIZONTAL,
22
+ l as selectMavrikTheme
23
+ };
@@ -0,0 +1,9 @@
1
+ const n = /* @__PURE__ */ new Set(["axisPointer"]);
2
+ function i(t) {
3
+ return Object.fromEntries(
4
+ Object.entries(t).filter(([e]) => !n.has(e))
5
+ );
6
+ }
7
+ export {
8
+ i as sanitizeChartOptions
9
+ };
@@ -0,0 +1,63 @@
1
+ "use client";
2
+ import { useRef as d, useState as I, useEffect as w, useCallback as W } from "react";
3
+ import { calculateTitleLayout as p } from "./calculate-title-layout.js";
4
+ import { sanitizeChartOptions as g } from "./sanitize-chart-options.js";
5
+ import { addWatermarkToOptions as h } from "./watermark-graphic.js";
6
+ const z = /* @__PURE__ */ new Set();
7
+ function D({ options: i, theme: t }) {
8
+ const e = d(null), c = d(null), O = d(i), m = d(t?.config), [y, R] = I(!1);
9
+ O.current = i, m.current = t?.config, w(() => {
10
+ const s = e.current;
11
+ if (!s) return;
12
+ let n = !0, r;
13
+ const C = new ResizeObserver((o) => {
14
+ const a = o[0], u = c.current;
15
+ if (!a || !u) return;
16
+ const f = a.contentRect.width, l = g(O.current), v = h(
17
+ p(l, f, m.current)
18
+ );
19
+ u.setOption(v), u.resize();
20
+ });
21
+ return C.observe(s), (async () => {
22
+ try {
23
+ const o = await import("echarts");
24
+ if (!n || !e.current) return;
25
+ t && !z.has(t.name) && (o.registerTheme(t.name, t.config), z.add(t.name));
26
+ const a = o.getInstanceByDom(e.current);
27
+ a && a.dispose(), r = o.init(e.current, t?.name, {
28
+ renderer: "svg"
29
+ }), c.current = r;
30
+ const u = e.current.clientWidth, f = g(i), l = h(
31
+ p(f, u, t?.config)
32
+ );
33
+ r.setOption(l), r.resize(), R(!0);
34
+ } catch (o) {
35
+ console.error("Failed to load echarts", o);
36
+ }
37
+ })(), () => {
38
+ n = !1, C.disconnect(), r && r.dispose(), c.current = null, R(!1);
39
+ };
40
+ }, [t, i]), w(() => {
41
+ if (!y || !c.current || !e.current) return;
42
+ const s = e.current.clientWidth, n = g(i), r = h(
43
+ p(n, s, t?.config)
44
+ );
45
+ c.current.setOption(r);
46
+ }, [y, i, t?.config]);
47
+ const b = W(async () => {
48
+ if (!c.current) return;
49
+ const s = c.current.getDataURL({
50
+ type: "png",
51
+ pixelRatio: 2,
52
+ backgroundColor: "#fff"
53
+ }), n = document.createElement("a");
54
+ n.download = `chart-${(/* @__PURE__ */ new Date()).toISOString()}.png`, n.href = s, document.body.appendChild(n), n.click(), document.body.removeChild(n);
55
+ }, []);
56
+ return {
57
+ containerRef: e,
58
+ downloadChart: b
59
+ };
60
+ }
61
+ export {
62
+ D as useChartInstance
63
+ };
@@ -0,0 +1,25 @@
1
+ import o from "../../assets/vc-logo.svg.js";
2
+ const a = 210, c = 24, i = {
3
+ type: "image",
4
+ left: "center",
5
+ top: "middle",
6
+ style: {
7
+ image: o,
8
+ width: a,
9
+ height: c
10
+ },
11
+ z: 100,
12
+ silent: !0
13
+ };
14
+ function s(r) {
15
+ const e = r.graphic;
16
+ let t;
17
+ return e === void 0 ? t = i : Array.isArray(e) ? t = [...e, i] : t = [e, i], {
18
+ ...r,
19
+ graphic: t
20
+ };
21
+ }
22
+ export {
23
+ i as WATERMARK_GRAPHIC,
24
+ s as addWatermarkToOptions
25
+ };
@@ -0,0 +1,105 @@
1
+ import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
+ import { SelectItem as p, SelectItemText as u, Select as m, SelectTrigger as x, SelectValue as b, SelectIcon as f, SelectPortal as y, SelectContent as S, SelectScrollUpButton as w, SelectViewport as v, SelectScrollDownButton as N } from "../../../node_modules/.pnpm/@radix-ui_react-select@2.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_6ddc7a756051e26689ab8a69ff12c731/node_modules/@radix-ui/react-select/dist/index.js";
3
+ import { forwardRef as i } from "react";
4
+ import { Icon as d } from "../icon/icon.js";
5
+ import { twMerge as a } from "../../lib/tailwind-merge.js";
6
+ const I = i(
7
+ ({ className: e, children: r, textValue: o, ...c }, s) => {
8
+ const l = o !== void 0 && o !== "";
9
+ return /* @__PURE__ */ n(
10
+ p,
11
+ {
12
+ className: a(
13
+ "tg-button-small text-neutral-40 data-highlighted:text-neutral-30 relative flex cursor-pointer items-center select-none data-disabled:pointer-events-none data-disabled:text-neutral-50 data-disabled:line-through data-highlighted:bg-(--bg-hover-color) data-highlighted:outline-none data-[state=checked]:text-white",
14
+ // corner radius:
15
+ "rounded-[calc(var(--content-radius)-(var(--content-padding)))]",
16
+ // padding:
17
+ "px-(--item-padding-x) py-(--item-padding-y)",
18
+ e
19
+ ),
20
+ textValue: o,
21
+ ...c,
22
+ ref: s,
23
+ children: [
24
+ /* @__PURE__ */ t(u, { children: /* @__PURE__ */ t("span", { children: l ? o : r }) }),
25
+ l && r
26
+ ]
27
+ }
28
+ );
29
+ }
30
+ );
31
+ I.displayName = "SelectItem";
32
+ const _ = i(
33
+ ({ variant: e = "primary", size: r = "large", placeholder: o, children: c, className: s, contentClassName: l, ...g }, h) => /* @__PURE__ */ n(m, { ...g, children: [
34
+ /* @__PURE__ */ n(
35
+ x,
36
+ {
37
+ ref: h,
38
+ className: a(
39
+ "group inline-flex items-center justify-between outline-none",
40
+ // size:
41
+ r === "small" && "tg-caption-bold h-8 gap-2 rounded-lg px-2 py-1.5",
42
+ r === "large" && "gap-r6 tg-button-small h-9 rounded-xl px-4 py-2",
43
+ // variants:
44
+ e === "primary" && "bg-neutral-60 focus:shadow-neutral-40 text-white",
45
+ e === "secondary" && "border-neutral-55 bg-neutral-70 text-neutral-40 border",
46
+ e === "ghost" && "text-neutral-40 h-auto bg-transparent p-0",
47
+ // :hover:
48
+ e === "primary" && "hover:bg-neutral-55",
49
+ e === "secondary" && "hover:text-neutral-30 hover:border-neutral-50",
50
+ e === "ghost" && "hover:text-neutral-10",
51
+ // :focus:
52
+ e === "primary" && "focus:shadow-[0_0_0_2px]",
53
+ e === "secondary" && "focus:border-neutral-10",
54
+ e === "ghost" && "focus:text-neutral-10",
55
+ s
56
+ ),
57
+ children: [
58
+ /* @__PURE__ */ t(b, { placeholder: o }),
59
+ /* @__PURE__ */ t(f, { children: /* @__PURE__ */ t(
60
+ d,
61
+ {
62
+ icon: "chevron",
63
+ className: a(
64
+ r === "small" && "size-2",
65
+ r === "large" && "-mr-1 size-3",
66
+ e === "primary" && "text-white",
67
+ e === "secondary" && "text-neutral-40 group-hover:text-neutral-30",
68
+ e === "ghost" && "text-neutral-40 group-hover:text-neutral-10 group-focus:text-neutral-10"
69
+ )
70
+ }
71
+ ) })
72
+ ]
73
+ }
74
+ ),
75
+ /* @__PURE__ */ t(y, { children: /* @__PURE__ */ n(
76
+ S,
77
+ {
78
+ className: a(
79
+ r === "small" && "[--content-padding:--spacing(1)] [--content-radius:--spacing(2.5)] [--item-padding-x:--spacing(2)] [--item-padding-y:--spacing(1.5)]",
80
+ r === "large" && "[--content-padding:--spacing(1.5)] [--content-radius:--spacing(4)] [--item-padding-x:--spacing(4)] [--item-padding-y:--spacing(2)]",
81
+ "rounded-(--content-radius)",
82
+ // variants:
83
+ e === "primary" && "[--bg-color:var(--color-neutral-60)] [--bg-hover-color:var(--color-neutral-55)]",
84
+ e === "secondary" && "[--bg-color:var(--color-neutral-70)] [--bg-hover-color:var(--color-neutral-60)]",
85
+ "text-neutral-40 max-h-(--radix-select-content-available-height) w-(--radix-select-trigger-width) overflow-hidden bg-(--bg-color) shadow-[0px_8px_20px_2px_rgba(0,0,0,0.40)]",
86
+ e === "ghost" && "bg-neutral-80 [--bg-hover-color:var(--color-neutral-60)]",
87
+ l
88
+ ),
89
+ position: "popper",
90
+ align: "end",
91
+ sideOffset: 4,
92
+ children: [
93
+ /* @__PURE__ */ t(w, { className: "flex h-6 cursor-default items-center justify-center bg-(--bg-color) text-white hover:bg-(--bg-hover-color)", children: /* @__PURE__ */ t(d, { icon: "chevron", className: "size-3 -scale-y-100 text-white" }) }),
94
+ /* @__PURE__ */ t(v, { className: "p-(--content-padding)", children: c }),
95
+ /* @__PURE__ */ t(N, { className: "flex h-6 cursor-default items-center justify-center bg-(--bg-color) text-white hover:bg-(--bg-hover-color)", children: /* @__PURE__ */ t(d, { icon: "chevron", className: "size-3 text-white" }) })
96
+ ]
97
+ }
98
+ ) })
99
+ ] })
100
+ );
101
+ _.displayName = "Select";
102
+ export {
103
+ _ as Select,
104
+ I as SelectItem
105
+ };
@@ -0,0 +1,51 @@
1
+ import { createCanvas as u } from "canvas";
2
+ import { randomUUID as l } from "node:crypto";
3
+ import { createRequire as d } from "node:module";
4
+ import { calculateTitleLayout as O } from "../components/echarts-renderer/calculate-title-layout.js";
5
+ import { addWatermarkToOptions as y } from "../components/echarts-renderer/watermark-graphic.js";
6
+ const T = d(import.meta.url), b = /* @__PURE__ */ new Set([
7
+ "aria",
8
+ // Tries to set DOM attributes which node-canvas doesn't implement
9
+ "toolbox",
10
+ // Export/zoom/reset buttons - not useful in static image
11
+ "dataZoom",
12
+ // Interactive range slider
13
+ "brush",
14
+ // Selection tool
15
+ "axisPointer"
16
+ // Crosshair on hover
17
+ ]);
18
+ function j(r) {
19
+ if (!r || typeof r != "object" || Array.isArray(r))
20
+ return { animation: !1 };
21
+ const t = Object.fromEntries(
22
+ Object.entries(r).filter(([e]) => !b.has(e))
23
+ );
24
+ return t.animation = !1, t;
25
+ }
26
+ function g({
27
+ option: r,
28
+ theme: t,
29
+ width: e = 800,
30
+ height: o = 600,
31
+ devicePixelRatio: c = 2
32
+ }) {
33
+ const n = T("echarts");
34
+ let a;
35
+ t && typeof t == "object" && (a = `theme-${l()}`, n.registerTheme(a, t));
36
+ const i = u(e, o), s = n.init(i, a, {
37
+ renderer: "canvas",
38
+ devicePixelRatio: c,
39
+ width: e,
40
+ height: o
41
+ });
42
+ try {
43
+ const m = j(r), f = O(m, e, t), p = y(f);
44
+ return s.setOption(p), i.toBuffer("image/png");
45
+ } finally {
46
+ s.dispose();
47
+ }
48
+ }
49
+ export {
50
+ g as renderChartToImage
51
+ };