@validationcloud/fractal-ui 1.58.0 → 1.59.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 (26) hide show
  1. package/dist/charts.d.ts +2 -2
  2. package/dist/charts.js +18 -22
  3. package/dist/components/echarts-renderer/chart-theme.d.ts +6 -0
  4. package/dist/components/echarts-renderer/chart-theme.js +8 -0
  5. package/dist/components/echarts-renderer/echarts-renderer.d.ts +3 -8
  6. package/dist/components/echarts-renderer/echarts-theme-option.d.ts +4 -4
  7. package/dist/components/echarts-renderer/mavrik-theme-horizontal.json.d.ts +13 -0
  8. package/dist/components/echarts-renderer/mavrik-theme-horizontal.json.js +34 -32
  9. package/dist/components/echarts-renderer/mavrik-theme.d.ts +4 -493
  10. package/dist/components/echarts-renderer/mavrik-theme.js +12 -19
  11. package/dist/components/echarts-renderer/mavrik-theme.json.d.ts +13 -0
  12. package/dist/components/echarts-renderer/mavrik-theme.json.js +34 -32
  13. package/dist/components/echarts-renderer/merge-theme-graphic-into-options.d.ts +9 -0
  14. package/dist/components/echarts-renderer/merge-theme-graphic-into-options.js +10 -0
  15. package/dist/components/echarts-renderer/use-chart-instance.d.ts +2 -5
  16. package/dist/components/echarts-renderer/use-chart-instance.js +46 -43
  17. package/dist/lib/render-chart-to-image.d.ts +4 -9
  18. package/dist/lib/render-chart-to-image.js +53 -43
  19. package/dist/lib/render-mavrik-chart-to-image.d.ts +1 -2
  20. package/dist/lib/render-mavrik-chart-to-image.js +15 -17
  21. package/dist/lib/render-mavrik-chart-to-image.test.d.ts +1 -0
  22. package/package.json +1 -1
  23. package/dist/assets/vc-logo.svg.js +0 -4
  24. package/dist/components/echarts-renderer/echarts-theme-option.js +0 -9
  25. package/dist/components/echarts-renderer/watermark-graphic.d.ts +0 -12
  26. package/dist/components/echarts-renderer/watermark-graphic.js +0 -25
@@ -0,0 +1,10 @@
1
+ function g(r, a) {
2
+ const c = r.graphic === void 0 ? [] : Array.isArray(r.graphic) ? r.graphic : [r.graphic], i = a === void 0 ? [] : Array.isArray(a) ? a : [a];
3
+ return {
4
+ ...r,
5
+ graphic: [...c, ...i]
6
+ };
7
+ }
8
+ export {
9
+ g as mergeThemeGraphicIntoOptions
10
+ };
@@ -1,11 +1,8 @@
1
1
  import { EChartsOption } from 'echarts';
2
- import { EChartsThemeOption } from './echarts-theme-option';
2
+ import { ChartTheme } from './chart-theme';
3
3
  export type UseChartInstanceProps = {
4
4
  options: EChartsOption;
5
- theme?: {
6
- name: string;
7
- config: EChartsThemeOption;
8
- };
5
+ theme?: ChartTheme;
9
6
  };
10
7
  export type UseChartInstanceReturn = {
11
8
  containerRef: React.RefObject<HTMLDivElement | null>;
@@ -1,63 +1,66 @@
1
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;
2
+ import { useRef as d, useState as k, useEffect as b, useCallback as S } from "react";
3
+ import { calculateTitleLayout as l } from "./calculate-title-layout.js";
4
+ import { mergeThemeGraphicIntoOptions as h } from "./merge-theme-graphic-into-options.js";
5
+ import { sanitizeChartOptions as O } from "./sanitize-chart-options.js";
6
+ const v = /* @__PURE__ */ new Set();
7
+ function M({ options: o, theme: n }) {
8
+ const r = d(null), c = d(null), R = d(o), y = d(n?.config), m = d(n?.config.graphic), [C, w] = k(!1);
9
+ R.current = o, y.current = n?.config, m.current = n?.config.graphic, b(() => {
10
+ const s = r.current;
11
11
  if (!s) return;
12
- let n = !0, r;
13
- const C = new ResizeObserver((o) => {
14
- const a = o[0], u = c.current;
12
+ let t = !0, e;
13
+ const z = new ResizeObserver((i) => {
14
+ const a = i[0], u = c.current;
15
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();
16
+ const f = a.contentRect.width, g = O(R.current), p = l(g, f, y.current);
17
+ u.setOption(h(p, m.current), {
18
+ replaceMerge: ["graphic"]
19
+ }), u.resize();
20
20
  });
21
- return C.observe(s), (async () => {
21
+ return z.observe(s), (async () => {
22
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, {
23
+ const i = await import("echarts");
24
+ if (!t || !r.current) return;
25
+ if (n && !v.has(n.name)) {
26
+ const { graphic: p, ...W } = n.config;
27
+ i.registerTheme(n.name, W), v.add(n.name);
28
+ }
29
+ const a = i.getInstanceByDom(r.current);
30
+ a && a.dispose(), e = i.init(r.current, n?.name, {
28
31
  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);
32
+ }), c.current = e;
33
+ const u = r.current.clientWidth, f = O(o), g = l(f, u, n?.config);
34
+ e.setOption(h(g, n?.config.graphic), {
35
+ replaceMerge: ["graphic"]
36
+ }), e.resize(), w(!0);
37
+ } catch (i) {
38
+ console.error("Failed to load echarts", i);
36
39
  }
37
40
  })(), () => {
38
- n = !1, C.disconnect(), r && r.dispose(), c.current = null, R(!1);
41
+ t = !1, z.disconnect(), e && e.dispose(), c.current = null, w(!1);
39
42
  };
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 () => {
43
+ }, [n, o]), b(() => {
44
+ if (!C || !c.current || !r.current) return;
45
+ const s = r.current.clientWidth, t = O(o), e = l(t, s, n?.config);
46
+ c.current.setOption(h(e, n?.config.graphic), {
47
+ replaceMerge: ["graphic"]
48
+ });
49
+ }, [C, o, n?.config, n?.config.graphic]);
50
+ const I = S(async () => {
48
51
  if (!c.current) return;
49
52
  const s = c.current.getDataURL({
50
53
  type: "png",
51
54
  pixelRatio: 2,
52
55
  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);
56
+ }), t = document.createElement("a");
57
+ t.download = `chart-${(/* @__PURE__ */ new Date()).toISOString()}.png`, t.href = s, document.body.appendChild(t), t.click(), document.body.removeChild(t);
55
58
  }, []);
56
59
  return {
57
- containerRef: e,
58
- downloadChart: b
60
+ containerRef: r,
61
+ downloadChart: I
59
62
  };
60
63
  }
61
64
  export {
62
- D as useChartInstance
65
+ M as useChartInstance
63
66
  };
@@ -1,3 +1,5 @@
1
+ import { ChartTheme } from '../components/echarts-renderer/chart-theme';
2
+ import { EChartsThemeOption } from '../components/echarts-renderer/echarts-theme-option';
1
3
  /** Font family registration for server-side chart rendering */
2
4
  export interface FontRegistration {
3
5
  /** Font family name (e.g., 'Poppins', 'Inter') */
@@ -7,19 +9,12 @@ export interface FontRegistration {
7
9
  }
8
10
  export interface RenderChartToImageOptions {
9
11
  option: unknown;
10
- theme?: Record<string, unknown>;
12
+ theme?: EChartsThemeOption | ChartTheme;
11
13
  /**
12
14
  * Fonts to register before rendering. Each font family is registered once
13
15
  * and cached for subsequent renders.
14
16
  */
15
17
  fonts?: FontRegistration[];
16
- /**
17
- * Adds Validation Cloud watermark graphic to the chart option before rendering.
18
- *
19
- * Note: The default is `false` because some server-side image backends can be
20
- * inconsistent when decoding SVG images.
21
- */
22
- includeWatermark?: boolean;
23
18
  width?: number;
24
19
  height?: number;
25
20
  devicePixelRatio?: number;
@@ -44,4 +39,4 @@ export interface RenderChartToImageOptions {
44
39
  * });
45
40
  * ```
46
41
  */
47
- export declare function renderChartToImage({ option, theme, fonts, includeWatermark, width, height, devicePixelRatio, }: RenderChartToImageOptions): Buffer;
42
+ export declare function renderChartToImage({ option, theme, fonts, width, height, devicePixelRatio, }: RenderChartToImageOptions): Buffer;
@@ -1,31 +1,32 @@
1
1
  import * as p from "echarts";
2
- import { randomUUID as h } from "node:crypto";
3
- import { writeFileSync as O, mkdtempSync as T } from "node:fs";
4
- import { tmpdir as b } from "node:os";
5
- import d from "node:path";
6
- import { Image as j, Canvas as F, FontLibrary as S } from "skia-canvas";
7
- import { calculateTitleLayout as I } from "../components/echarts-renderer/calculate-title-layout.js";
8
- import { addWatermarkToOptions as C } from "../components/echarts-renderer/watermark-graphic.js";
9
- globalThis.Image = j;
10
- const u = /* @__PURE__ */ new Set();
11
- let f;
12
- function w() {
13
- return f || (f = T(d.join(b(), "chart-fonts-"))), f;
2
+ import { randomUUID as y } from "node:crypto";
3
+ import { writeFileSync as b, mkdtempSync as O } from "node:fs";
4
+ import { tmpdir as j } from "node:os";
5
+ import T from "node:path";
6
+ import { Image as C, Canvas as F, FontLibrary as I } from "skia-canvas";
7
+ import { calculateTitleLayout as S } from "../components/echarts-renderer/calculate-title-layout.js";
8
+ import { isChartTheme as $ } from "../components/echarts-renderer/chart-theme.js";
9
+ import { mergeThemeGraphicIntoOptions as w } from "../components/echarts-renderer/merge-theme-graphic-into-options.js";
10
+ globalThis.Image = C;
11
+ const d = /* @__PURE__ */ new Set();
12
+ let l;
13
+ function A() {
14
+ return l || (l = O(T.join(j(), "chart-fonts-"))), l;
14
15
  }
15
- function A(r) {
16
- for (const t of r)
17
- if (!u.has(t.family))
16
+ function D(e) {
17
+ for (const t of e)
18
+ if (!d.has(t.family))
18
19
  try {
19
- const e = w(), i = t.data.map((o, n) => {
20
- const a = d.join(e, `${t.family}-${String(n)}.ttf`);
21
- return O(a, o), a;
20
+ const r = A(), n = t.data.map((s, m) => {
21
+ const i = T.join(r, `${t.family}-${String(m)}.ttf`);
22
+ return b(i, s), i;
22
23
  });
23
- S.use(t.family, i), u.add(t.family);
24
- } catch (e) {
25
- console.warn(`Failed to register ${t.family} fonts, charts will use fallback font:`, e);
24
+ I.use(t.family, n), d.add(t.family);
25
+ } catch (r) {
26
+ console.warn(`Failed to register ${t.family} fonts, charts will use fallback font:`, r);
26
27
  }
27
28
  }
28
- const D = /* @__PURE__ */ new Set([
29
+ const E = /* @__PURE__ */ new Set([
29
30
  "aria",
30
31
  // Tries to set DOM attributes which node-canvas doesn't implement
31
32
  "toolbox",
@@ -37,39 +38,48 @@ const D = /* @__PURE__ */ new Set([
37
38
  "axisPointer"
38
39
  // Crosshair on hover
39
40
  ]);
40
- function E(r) {
41
- if (!r || typeof r != "object" || Array.isArray(r))
41
+ function G(e) {
42
+ if (!e || typeof e != "object" || Array.isArray(e))
42
43
  return { animation: !1 };
43
44
  const t = Object.fromEntries(
44
- Object.entries(r).filter(([e]) => !D.has(e))
45
+ Object.entries(e).filter(([r]) => !E.has(r))
45
46
  );
46
47
  return t.animation = !1, t;
47
48
  }
48
- function L({
49
- option: r,
49
+ function M({
50
+ option: e,
50
51
  theme: t,
51
- fonts: e,
52
- includeWatermark: i = !1,
53
- width: o = 800,
54
- height: n = 600,
55
- devicePixelRatio: a = 2
52
+ fonts: r,
53
+ width: n = 800,
54
+ height: s = 600,
55
+ devicePixelRatio: m = 2
56
56
  }) {
57
- e?.length && A(e);
58
- let s;
59
- t && typeof t == "object" && (s = `theme-${h()}`, p.registerTheme(s, t));
60
- const m = new F(o, n), c = p.init(m, s, {
57
+ r?.length && D(r);
58
+ let i, o, f;
59
+ const a = t;
60
+ if (a && typeof a == "object")
61
+ if ($(a)) {
62
+ i = `theme-${y()}`, o = a.config, f = o.graphic;
63
+ const { graphic: h, ...c } = o;
64
+ p.registerTheme(i, c);
65
+ } else {
66
+ i = `theme-${y()}`, o = a, f = o.graphic;
67
+ const { graphic: h, ...c } = o;
68
+ p.registerTheme(i, c);
69
+ }
70
+ const g = new F(n, s), u = p.init(g, i, {
61
71
  renderer: "canvas",
62
- devicePixelRatio: a,
63
- width: o,
64
- height: n
72
+ devicePixelRatio: m,
73
+ width: n,
74
+ height: s
65
75
  });
66
76
  try {
67
- const y = E(r), l = I(y, o, t), g = i ? C(l) : l;
68
- return c.setOption(g), m.toBufferSync("png");
77
+ const h = G(e), c = S(h, n, o);
78
+ return u.setOption(w(c, f), { replaceMerge: ["graphic"] }), g.toBufferSync("png");
69
79
  } finally {
70
- c.dispose();
80
+ u.dispose();
71
81
  }
72
82
  }
73
83
  export {
74
- L as renderChartToImage
84
+ M as renderChartToImage
75
85
  };
@@ -1,7 +1,6 @@
1
1
  import { EChartsOption } from 'echarts';
2
2
  export interface RenderMavrikChartToImageOptions {
3
3
  option: EChartsOption;
4
- includeWatermark?: boolean;
5
4
  width?: number;
6
5
  height?: number;
7
6
  devicePixelRatio?: number;
@@ -31,4 +30,4 @@ export interface RenderMavrikChartToImageOptions {
31
30
  * });
32
31
  * ```
33
32
  */
34
- export declare function renderMavrikChartToImage({ option, includeWatermark, width, height, devicePixelRatio, }: RenderMavrikChartToImageOptions): Buffer;
33
+ export declare function renderMavrikChartToImage({ option, width, height, devicePixelRatio, }: RenderMavrikChartToImageOptions): Buffer;
@@ -1,28 +1,26 @@
1
- import { selectMavrikTheme as n } from "../components/echarts-renderer/mavrik-theme.js";
2
- import { PoppinsRegular as p, PoppinsMedium as a, PoppinsSemiBold as s, PoppinsBold as f } from "./font-data.js";
1
+ import { selectMavrikTheme as t } from "../components/echarts-renderer/mavrik-theme.js";
2
+ import { PoppinsRegular as n, PoppinsMedium as p, PoppinsSemiBold as a, PoppinsBold as s } from "./font-data.js";
3
3
  import { renderChartToImage as P } from "./render-chart-to-image.js";
4
- const d = {
4
+ const f = {
5
5
  family: "Poppins",
6
- data: [p, a, s, f]
6
+ data: [n, p, a, s]
7
7
  };
8
- function g({
8
+ function l({
9
9
  option: e,
10
- includeWatermark: o = !1,
11
- width: r = 800,
12
- height: i = 600,
13
- devicePixelRatio: m = 2
10
+ width: o = 800,
11
+ height: r = 600,
12
+ devicePixelRatio: i = 2
14
13
  }) {
15
- const t = n(e);
14
+ const m = t(e);
16
15
  return P({
17
16
  option: e,
18
- theme: t.config,
19
- fonts: [d],
20
- includeWatermark: o,
21
- width: r,
22
- height: i,
23
- devicePixelRatio: m
17
+ theme: m.config,
18
+ fonts: [f],
19
+ width: o,
20
+ height: r,
21
+ devicePixelRatio: i
24
22
  });
25
23
  }
26
24
  export {
27
- g as renderMavrikChartToImage
25
+ l as renderMavrikChartToImage
28
26
  };
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@validationcloud/fractal-ui",
3
3
  "private": false,
4
- "version": "1.58.0",
4
+ "version": "1.59.0",
5
5
  "module": "./dist/index.js",
6
6
  "type": "module",
7
7
  "files": [
@@ -1,4 +0,0 @@
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
- };
@@ -1,9 +0,0 @@
1
- import { z as t } from "zod";
2
- const n = t.object({}).catchall(t.unknown());
3
- function s(e) {
4
- return n.safeParse(e).success;
5
- }
6
- export {
7
- n as EChartsThemeOption,
8
- s as isEChartsThemeOption
9
- };
@@ -1,12 +0,0 @@
1
- import { GraphicComponentOption } from 'echarts';
2
- /**
3
- * Watermark graphic element for ECharts charts.
4
- * This is applied via setOption(), not via theme (themes don't properly merge graphic components).
5
- */
6
- export declare const WATERMARK_GRAPHIC: GraphicComponentOption;
7
- /**
8
- * Merges watermark graphic into existing ECharts options.
9
- */
10
- export declare function addWatermarkToOptions<T extends {
11
- graphic?: GraphicComponentOption | GraphicComponentOption[];
12
- }>(options: T): T;
@@ -1,25 +0,0 @@
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
- };