@validationcloud/fractal-ui 1.57.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 (32) 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/font-data.d.ts +17 -0
  18. package/dist/lib/font-data.js +19 -0
  19. package/dist/lib/render-chart-to-image.d.ts +14 -7
  20. package/dist/lib/render-chart-to-image.js +57 -55
  21. package/dist/lib/render-mavrik-chart-to-image.d.ts +1 -2
  22. package/dist/lib/render-mavrik-chart-to-image.js +19 -15
  23. package/dist/lib/render-mavrik-chart-to-image.test.d.ts +1 -0
  24. package/package.json +4 -3
  25. package/dist/assets/vc-logo.svg.js +0 -4
  26. package/dist/components/echarts-renderer/echarts-theme-option.js +0 -9
  27. package/dist/components/echarts-renderer/watermark-graphic.d.ts +0 -12
  28. package/dist/components/echarts-renderer/watermark-graphic.js +0 -25
  29. package/dist/fonts/Poppins-Bold.ttf +0 -0
  30. package/dist/fonts/Poppins-Medium.ttf +0 -0
  31. package/dist/fonts/Poppins-Regular.ttf +0 -0
  32. package/dist/fonts/Poppins-SemiBold.ttf +0 -0
@@ -1,13 +1,20 @@
1
+ import { ChartTheme } from '../components/echarts-renderer/chart-theme';
2
+ import { EChartsThemeOption } from '../components/echarts-renderer/echarts-theme-option';
3
+ /** Font family registration for server-side chart rendering */
4
+ export interface FontRegistration {
5
+ /** Font family name (e.g., 'Poppins', 'Inter') */
6
+ family: string;
7
+ /** Font data buffers for each weight/style variant */
8
+ data: readonly Buffer[];
9
+ }
1
10
  export interface RenderChartToImageOptions {
2
11
  option: unknown;
3
- theme?: Record<string, unknown>;
12
+ theme?: EChartsThemeOption | ChartTheme;
4
13
  /**
5
- * Adds Validation Cloud watermark graphic to the chart option before rendering.
6
- *
7
- * Note: The default is `false` because some server-side image backends can be
8
- * inconsistent when decoding SVG images.
14
+ * Fonts to register before rendering. Each font family is registered once
15
+ * and cached for subsequent renders.
9
16
  */
10
- includeWatermark?: boolean;
17
+ fonts?: FontRegistration[];
11
18
  width?: number;
12
19
  height?: number;
13
20
  devicePixelRatio?: number;
@@ -32,4 +39,4 @@ export interface RenderChartToImageOptions {
32
39
  * });
33
40
  * ```
34
41
  */
35
- export declare function renderChartToImage({ option, theme, includeWatermark, width, height, devicePixelRatio, }: RenderChartToImageOptions): Buffer;
42
+ export declare function renderChartToImage({ option, theme, fonts, width, height, devicePixelRatio, }: RenderChartToImageOptions): Buffer;
@@ -1,40 +1,32 @@
1
1
  import * as p from "echarts";
2
2
  import { randomUUID as y } from "node:crypto";
3
- import e from "node:path";
4
- import { fileURLToPath as O } from "node:url";
5
- import { Image as b, Canvas as g, FontLibrary as h } from "skia-canvas";
6
- import { calculateTitleLayout as j } from "../components/echarts-renderer/calculate-title-layout.js";
7
- import { addWatermarkToOptions as P } from "../components/echarts-renderer/watermark-graphic.js";
8
- globalThis.Image = b;
9
- let s = !1;
10
- function T() {
11
- if (!s)
12
- try {
13
- const t = e.dirname(O(import.meta.url)), r = [
14
- // dist/src/lib -> dist/fonts (packaged) OR src/lib -> src/fonts (dev)
15
- e.resolve(t, "../../fonts"),
16
- // dist/lib -> dist/fonts (packaged)
17
- e.resolve(t, "../fonts")
18
- ];
19
- let n;
20
- for (const o of r)
21
- try {
22
- h.use("Poppins", [
23
- e.join(o, "Poppins-Regular.ttf"),
24
- e.join(o, "Poppins-Medium.ttf"),
25
- e.join(o, "Poppins-SemiBold.ttf"),
26
- e.join(o, "Poppins-Bold.ttf")
27
- ]), s = !0;
28
- return;
29
- } catch (a) {
30
- n = a;
31
- }
32
- throw n;
33
- } catch (t) {
34
- console.warn("Failed to register Poppins fonts, charts will use fallback font:", t), s = !0;
35
- }
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;
15
+ }
16
+ function D(e) {
17
+ for (const t of e)
18
+ if (!d.has(t.family))
19
+ try {
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;
23
+ });
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);
27
+ }
36
28
  }
37
- const I = /* @__PURE__ */ new Set([
29
+ const E = /* @__PURE__ */ new Set([
38
30
  "aria",
39
31
  // Tries to set DOM attributes which node-canvas doesn't implement
40
32
  "toolbox",
@@ -46,38 +38,48 @@ const I = /* @__PURE__ */ new Set([
46
38
  "axisPointer"
47
39
  // Crosshair on hover
48
40
  ]);
49
- function v(t) {
50
- if (!t || typeof t != "object" || Array.isArray(t))
41
+ function G(e) {
42
+ if (!e || typeof e != "object" || Array.isArray(e))
51
43
  return { animation: !1 };
52
- const r = Object.fromEntries(
53
- Object.entries(t).filter(([n]) => !I.has(n))
44
+ const t = Object.fromEntries(
45
+ Object.entries(e).filter(([r]) => !E.has(r))
54
46
  );
55
- return r.animation = !1, r;
47
+ return t.animation = !1, t;
56
48
  }
57
- function S({
58
- option: t,
59
- theme: r,
60
- includeWatermark: n = !1,
61
- width: o = 800,
62
- height: a = 600,
49
+ function M({
50
+ option: e,
51
+ theme: t,
52
+ fonts: r,
53
+ width: n = 800,
54
+ height: s = 600,
63
55
  devicePixelRatio: m = 2
64
56
  }) {
65
- T();
66
- let i;
67
- r && typeof r == "object" && (i = `theme-${y()}`, p.registerTheme(i, r));
68
- const f = new g(o, a), c = p.init(f, i, {
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, {
69
71
  renderer: "canvas",
70
72
  devicePixelRatio: m,
71
- width: o,
72
- height: a
73
+ width: n,
74
+ height: s
73
75
  });
74
76
  try {
75
- const u = v(t), l = j(u, o, r), d = n ? P(l) : l;
76
- return c.setOption(d), f.toBufferSync("png");
77
+ const h = G(e), c = S(h, n, o);
78
+ return u.setOption(w(c, f), { replaceMerge: ["graphic"] }), g.toBufferSync("png");
77
79
  } finally {
78
- c.dispose();
80
+ u.dispose();
79
81
  }
80
82
  }
81
83
  export {
82
- S as renderChartToImage
84
+ M as renderChartToImage
83
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,22 +1,26 @@
1
- import { selectMavrikTheme as n } from "../components/echarts-renderer/mavrik-theme.js";
2
- import { renderChartToImage as f } from "./render-chart-to-image.js";
3
- function c({
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
+ import { renderChartToImage as P } from "./render-chart-to-image.js";
4
+ const f = {
5
+ family: "Poppins",
6
+ data: [n, p, a, s]
7
+ };
8
+ function l({
4
9
  option: e,
5
- includeWatermark: r = !1,
6
- width: t = 800,
7
- height: m = 600,
8
- devicePixelRatio: o = 2
10
+ width: o = 800,
11
+ height: r = 600,
12
+ devicePixelRatio: i = 2
9
13
  }) {
10
- const a = n(e);
11
- return f({
14
+ const m = t(e);
15
+ return P({
12
16
  option: e,
13
- theme: a.config,
14
- includeWatermark: r,
15
- width: t,
16
- height: m,
17
- devicePixelRatio: o
17
+ theme: m.config,
18
+ fonts: [f],
19
+ width: o,
20
+ height: r,
21
+ devicePixelRatio: i
18
22
  });
19
23
  }
20
24
  export {
21
- c as renderMavrikChartToImage
25
+ l as renderMavrikChartToImage
22
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.57.0",
4
+ "version": "1.59.0",
5
5
  "module": "./dist/index.js",
6
6
  "type": "module",
7
7
  "files": [
@@ -18,7 +18,7 @@
18
18
  "url": "https://github.com/validationcloud/fractal-ui/issues"
19
19
  },
20
20
  "scripts": {
21
- "prebuild": "pnpm run generate:theme",
21
+ "prebuild": "pnpm run generate:theme && pnpm run generate:fonts",
22
22
  "build": "vite build",
23
23
  "lint": "eslint",
24
24
  "storybook": "storybook dev -p 6006",
@@ -28,7 +28,8 @@
28
28
  "typecheck": "tsc -b --noEmit",
29
29
  "test": "vitest run",
30
30
  "prepublishOnly": "pnpm build",
31
- "generate:theme": "node --experimental-transform-types scripts/generate-mavrik-theme.ts && prettier --write src/components/echarts-renderer/mavrik-theme*.json"
31
+ "generate:theme": "node --experimental-transform-types scripts/generate-mavrik-theme.ts && prettier --write src/components/echarts-renderer/mavrik-theme*.json",
32
+ "generate:fonts": "node --experimental-transform-types scripts/generate-font-data.ts && prettier --write src/lib/font-data.ts"
32
33
  },
33
34
  "exports": {
34
35
  ".": {
@@ -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
- };
Binary file
Binary file
Binary file
Binary file