@validationcloud/fractal-ui 1.54.0 → 1.56.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.
- package/dist/charts.d.ts +9 -0
- package/dist/charts.js +25 -0
- package/dist/components/collapsible/collapsible.d.ts +14 -0
- package/dist/components/echarts-renderer/mavrik-theme-horizontal.json.d.ts +15 -0
- package/dist/components/echarts-renderer/mavrik-theme.d.ts +30 -0
- package/dist/components/echarts-renderer/mavrik-theme.json.d.ts +15 -0
- package/dist/components/echarts-renderer/sanitize-chart-options-for-static-rendering.d.ts +9 -0
- package/dist/fonts/OFL.txt +93 -0
- package/dist/fonts/Poppins-Bold.ttf +0 -0
- package/dist/fonts/Poppins-Medium.ttf +0 -0
- package/dist/fonts/Poppins-Regular.ttf +0 -0
- package/dist/fonts/Poppins-SemiBold.ttf +0 -0
- package/dist/index.d.ts +1 -6
- package/dist/index.js +56 -67
- package/dist/lib/get-echarts-module.d.ts +1 -0
- package/dist/lib/render-chart-to-image.d.ts +22 -1
- package/dist/lib/render-mavrik-chart-to-image.d.ts +2 -1
- package/dist/server.d.ts +2 -0
- package/dist/server.js +5 -1
- package/dist/src/components/collapsible/collapsible.js +29 -0
- package/dist/src/components/echarts-renderer/mavrik-theme-horizontal.json.js +10 -8
- package/dist/src/components/echarts-renderer/mavrik-theme.js +15 -13
- package/dist/src/components/echarts-renderer/mavrik-theme.json.js +10 -8
- package/dist/src/components/echarts-renderer/sanitize-chart-options-for-static-rendering.js +21 -0
- package/dist/src/lib/get-echarts-module.js +8 -0
- package/dist/src/lib/render-chart-to-image.js +61 -28
- package/dist/src/lib/render-mavrik-chart-to-image.js +22 -0
- package/dist/styles/animation.css +40 -0
- package/package.json +11 -10
package/dist/charts.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { EChartsRenderer, type EChartsRendererProps, type EChartsRendererRef, type EChartsOption, } from './components/echarts-renderer/echarts-renderer';
|
|
2
|
+
export { EChartsThemeOption, isEChartsThemeOption } from './components/echarts-renderer/echarts-theme-option';
|
|
3
|
+
export { EChartsChartOption, isEChartsChartOption } from './components/echarts-renderer/echarts-chart-option';
|
|
4
|
+
export { useChartInstance, type UseChartInstanceProps, type UseChartInstanceReturn, } from './components/echarts-renderer/use-chart-instance';
|
|
5
|
+
export { MavrikChart, type MavrikChartProps } from './components/echarts-renderer/mavrik-chart';
|
|
6
|
+
export { MAVRIK_THEME, MAVRIK_THEME_HORIZONTAL, selectMavrikTheme, type MavrikTheme, } from './components/echarts-renderer/mavrik-theme';
|
|
7
|
+
export { hasHorizontalBars } from './components/echarts-renderer/detect-horizontal-bars';
|
|
8
|
+
export { addWatermarkToOptions, WATERMARK_GRAPHIC } from './components/echarts-renderer/watermark-graphic';
|
|
9
|
+
export { sanitizeChartOptionsForStaticRendering } from './components/echarts-renderer/sanitize-chart-options-for-static-rendering';
|
package/dist/charts.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { EChartsRenderer as o } from "./src/components/echarts-renderer/echarts-renderer.js";
|
|
2
|
+
import { EChartsThemeOption as a, isEChartsThemeOption as i } from "./src/components/echarts-renderer/echarts-theme-option.js";
|
|
3
|
+
import { EChartsChartOption as s, isEChartsChartOption as h } from "./src/components/echarts-renderer/echarts-chart-option.js";
|
|
4
|
+
import { useChartInstance as n } from "./src/components/echarts-renderer/use-chart-instance.js";
|
|
5
|
+
import { MavrikChart as E } from "./src/components/echarts-renderer/mavrik-chart.js";
|
|
6
|
+
import { MAVRIK_THEME as x, MAVRIK_THEME_HORIZONTAL as O, selectMavrikTheme as R } from "./src/components/echarts-renderer/mavrik-theme.js";
|
|
7
|
+
import { hasHorizontalBars as M } from "./src/components/echarts-renderer/detect-horizontal-bars.js";
|
|
8
|
+
import { WATERMARK_GRAPHIC as H, addWatermarkToOptions as I } from "./src/components/echarts-renderer/watermark-graphic.js";
|
|
9
|
+
import { sanitizeChartOptionsForStaticRendering as _ } from "./src/components/echarts-renderer/sanitize-chart-options-for-static-rendering.js";
|
|
10
|
+
export {
|
|
11
|
+
s as EChartsChartOption,
|
|
12
|
+
o as EChartsRenderer,
|
|
13
|
+
a as EChartsThemeOption,
|
|
14
|
+
x as MAVRIK_THEME,
|
|
15
|
+
O as MAVRIK_THEME_HORIZONTAL,
|
|
16
|
+
E as MavrikChart,
|
|
17
|
+
H as WATERMARK_GRAPHIC,
|
|
18
|
+
I as addWatermarkToOptions,
|
|
19
|
+
M as hasHorizontalBars,
|
|
20
|
+
h as isEChartsChartOption,
|
|
21
|
+
i as isEChartsThemeOption,
|
|
22
|
+
_ as sanitizeChartOptionsForStaticRendering,
|
|
23
|
+
R as selectMavrikTheme,
|
|
24
|
+
n as useChartInstance
|
|
25
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Collapsible as CollapsiblePrimitive } from 'radix-ui';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export declare const Collapsible: React.ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export declare const CollapsibleTrigger: React.ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
/**
|
|
6
|
+
* CollapsibleContent is a wrapper around Radix's Collapsible.Content component.
|
|
7
|
+
* It applies project-specific animations to the content based on the orientation.
|
|
8
|
+
* @param orientation - The orientation of the collapsible content.
|
|
9
|
+
*/
|
|
10
|
+
type CollapsibleContentProps = {
|
|
11
|
+
orientation?: 'horizontal' | 'vertical';
|
|
12
|
+
} & React.ComponentProps<typeof CollapsiblePrimitive.Content>;
|
|
13
|
+
export declare const CollapsibleContent: React.ForwardRefExoticComponent<Omit<CollapsibleContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export {};
|
|
@@ -270,6 +270,21 @@ declare const _default: {
|
|
|
270
270
|
"color": "#FFFFFF"
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
|
+
},
|
|
274
|
+
"tooltip": {
|
|
275
|
+
"backgroundColor": "transparent",
|
|
276
|
+
"padding": 10,
|
|
277
|
+
"borderRadius": 8,
|
|
278
|
+
"borderColor": "#50525A",
|
|
279
|
+
"borderWidth": 1,
|
|
280
|
+
"textStyle": {
|
|
281
|
+
"color": "#FCFCFC",
|
|
282
|
+
"fontFamily": "Poppins, sans-serif",
|
|
283
|
+
"fontSize": 11,
|
|
284
|
+
"fontStyle": "normal",
|
|
285
|
+
"fontWeight": 500
|
|
286
|
+
},
|
|
287
|
+
"extraCssText": "letter-spacing: 0.22px; box-shadow: 0 14px 11px -4px rgba(0, 0, 0, 0.30), 0 -4px 4px 0 rgba(0, 0, 0, 0.04) inset; background: radial-gradient(ellipse at 25% 0%, rgba(217, 217, 217, 0.12) 0%, transparent 60%), #1A1D1F;"
|
|
273
288
|
}
|
|
274
289
|
}
|
|
275
290
|
;
|
|
@@ -229,6 +229,21 @@ export declare const MAVRIK_THEME: {
|
|
|
229
229
|
};
|
|
230
230
|
};
|
|
231
231
|
};
|
|
232
|
+
tooltip: {
|
|
233
|
+
backgroundColor: string;
|
|
234
|
+
padding: number;
|
|
235
|
+
borderRadius: number;
|
|
236
|
+
borderColor: string;
|
|
237
|
+
borderWidth: number;
|
|
238
|
+
textStyle: {
|
|
239
|
+
color: string;
|
|
240
|
+
fontFamily: string;
|
|
241
|
+
fontSize: number;
|
|
242
|
+
fontStyle: string;
|
|
243
|
+
fontWeight: number;
|
|
244
|
+
};
|
|
245
|
+
extraCssText: string;
|
|
246
|
+
};
|
|
232
247
|
};
|
|
233
248
|
};
|
|
234
249
|
/** Mavrik theme variant with horizontal gradients (for horizontal bar charts) */
|
|
@@ -461,6 +476,21 @@ export declare const MAVRIK_THEME_HORIZONTAL: {
|
|
|
461
476
|
};
|
|
462
477
|
};
|
|
463
478
|
};
|
|
479
|
+
tooltip: {
|
|
480
|
+
backgroundColor: string;
|
|
481
|
+
padding: number;
|
|
482
|
+
borderRadius: number;
|
|
483
|
+
borderColor: string;
|
|
484
|
+
borderWidth: number;
|
|
485
|
+
textStyle: {
|
|
486
|
+
color: string;
|
|
487
|
+
fontFamily: string;
|
|
488
|
+
fontSize: number;
|
|
489
|
+
fontStyle: string;
|
|
490
|
+
fontWeight: number;
|
|
491
|
+
};
|
|
492
|
+
extraCssText: string;
|
|
493
|
+
};
|
|
464
494
|
};
|
|
465
495
|
};
|
|
466
496
|
export type MavrikTheme = typeof MAVRIK_THEME | typeof MAVRIK_THEME_HORIZONTAL;
|
|
@@ -270,6 +270,21 @@ declare const _default: {
|
|
|
270
270
|
"color": "#FFFFFF"
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
|
+
},
|
|
274
|
+
"tooltip": {
|
|
275
|
+
"backgroundColor": "transparent",
|
|
276
|
+
"padding": 10,
|
|
277
|
+
"borderRadius": 8,
|
|
278
|
+
"borderColor": "#50525A",
|
|
279
|
+
"borderWidth": 1,
|
|
280
|
+
"textStyle": {
|
|
281
|
+
"color": "#FCFCFC",
|
|
282
|
+
"fontFamily": "Poppins, sans-serif",
|
|
283
|
+
"fontSize": 11,
|
|
284
|
+
"fontStyle": "normal",
|
|
285
|
+
"fontWeight": 500
|
|
286
|
+
},
|
|
287
|
+
"extraCssText": "letter-spacing: 0.22px; box-shadow: 0 14px 11px -4px rgba(0, 0, 0, 0.30), 0 -4px 4px 0 rgba(0, 0, 0, 0.04) inset; background: radial-gradient(ellipse at 25% 0%, rgba(217, 217, 217, 0.12) 0%, transparent 60%), #1A1D1F;"
|
|
273
288
|
}
|
|
274
289
|
}
|
|
275
290
|
;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EChartsOption } from 'echarts';
|
|
2
|
+
/**
|
|
3
|
+
* Removes interactive components from chart options for static/image rendering.
|
|
4
|
+
* Also disables animation since it's not useful in static images.
|
|
5
|
+
*
|
|
6
|
+
* Use this function when rendering charts to static images (PNG, SVG exports)
|
|
7
|
+
* either server-side with skia-canvas or for client-side image exports.
|
|
8
|
+
*/
|
|
9
|
+
export declare function sanitizeChartOptionsForStaticRendering(option: EChartsOption): EChartsOption;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2020 The Poppins Project Authors (https://github.com/itfoundry/Poppins)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://openfontlicense.org
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -2,13 +2,8 @@ export { AnimatedLoader } from './components/animated-loader/animated-loader';
|
|
|
2
2
|
export { Badge } from './components/badge/badge';
|
|
3
3
|
export { Box } from './components/box/box';
|
|
4
4
|
export { Button } from './components/button/button';
|
|
5
|
-
export { EChartsRenderer, type EChartsRendererProps, type EChartsRendererRef, type EChartsOption, } from './components/echarts-renderer/echarts-renderer';
|
|
6
|
-
export { EChartsThemeOption, isEChartsThemeOption } from './components/echarts-renderer/echarts-theme-option';
|
|
7
|
-
export { EChartsChartOption, isEChartsChartOption } from './components/echarts-renderer/echarts-chart-option';
|
|
8
|
-
export { useChartInstance, type UseChartInstanceProps, type UseChartInstanceReturn, } from './components/echarts-renderer/use-chart-instance';
|
|
9
|
-
export { MavrikChart, type MavrikChartProps } from './components/echarts-renderer/mavrik-chart';
|
|
10
|
-
export { MAVRIK_THEME, MAVRIK_THEME_HORIZONTAL } from './components/echarts-renderer/mavrik-theme';
|
|
11
5
|
export { ClientModal } from './components/client-modal/client-modal';
|
|
6
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger } from './components/collapsible/collapsible';
|
|
12
7
|
export { CopyButton } from './components/copy-button/copy-button';
|
|
13
8
|
export { DecoratedIcon } from './components/decorated-icon/decorated-icon';
|
|
14
9
|
export { DropdownMenu, DropdownMenuItem } from './components/dropdown-menu/dropdown-menu';
|
package/dist/index.js
CHANGED
|
@@ -1,75 +1,64 @@
|
|
|
1
|
-
import { AnimatedLoader as
|
|
1
|
+
import { AnimatedLoader as e } from "./src/components/animated-loader/animated-loader.js";
|
|
2
2
|
import { Badge as p } from "./src/components/badge/badge.js";
|
|
3
3
|
import { Box as x } from "./src/components/box/box.js";
|
|
4
4
|
import { Button as n } from "./src/components/button/button.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import { TouchTarget as uo } from "./src/components/touch-target/touch-target.js";
|
|
31
|
-
import { twMerge as lo } from "./src/lib/tailwind-merge.js";
|
|
32
|
-
import { UserDropdown as so } from "./src/components/user-dropdown/user-dropdown.js";
|
|
33
|
-
import { UserDropdownMobile as Io } from "./src/components/user-dropdown-mobile/user-dropdown-mobile.js";
|
|
34
|
-
import { useScrollToBottom as To } from "./src/hooks/use-scroll-to-bottom.js";
|
|
5
|
+
import { ClientModal as d } from "./src/components/client-modal/client-modal.js";
|
|
6
|
+
import { Collapsible as i, CollapsibleContent as u, CollapsibleTrigger as c } from "./src/components/collapsible/collapsible.js";
|
|
7
|
+
import { CopyButton as B } from "./src/components/copy-button/copy-button.js";
|
|
8
|
+
import { DecoratedIcon as C } from "./src/components/decorated-icon/decorated-icon.js";
|
|
9
|
+
import { DropdownMenu as T, DropdownMenuItem as s } from "./src/components/dropdown-menu/dropdown-menu.js";
|
|
10
|
+
import { ErrorBoundary as M } from "./src/components/error-boundary/error-boundary.js";
|
|
11
|
+
import { ScrollArea as b } from "./src/components/scroll-area/index.js";
|
|
12
|
+
import { Icon as h } from "./src/components/icon/icon.js";
|
|
13
|
+
import { IconButton as y } from "./src/components/icon-button/icon-button.js";
|
|
14
|
+
import { InputButton as L } from "./src/components/input-button/input-button.js";
|
|
15
|
+
import { MountSvgSprite as k } from "./src/components/mount-svg-sprite/mount-svg-sprite.js";
|
|
16
|
+
import { NotFoundComponent as F } from "./src/components/not-found-component/not-found-component.js";
|
|
17
|
+
import { PagePadding as j } from "./src/components/page-padding/page-padding.js";
|
|
18
|
+
import { ProtocolLogo as z } from "./src/components/protocol-logo/protocol-logo.js";
|
|
19
|
+
import { Select as H, SelectItem as J } from "./src/components/select/select.js";
|
|
20
|
+
import { Skeleton as O } from "./src/components/skeleton/skeleton.js";
|
|
21
|
+
import { Switch as R } from "./src/components/switch/switch.js";
|
|
22
|
+
import { TextInput as W } from "./src/components/text-input/text-input.js";
|
|
23
|
+
import { Tooltip as Y } from "./src/components/tooltip/tooltip.js";
|
|
24
|
+
import { TooltipProvider as _ } from "./src/components/tooltip-provider/tooltip-provider.js";
|
|
25
|
+
import { TouchTarget as oo } from "./src/components/touch-target/touch-target.js";
|
|
26
|
+
import { twMerge as eo } from "./src/lib/tailwind-merge.js";
|
|
27
|
+
import { UserDropdown as po } from "./src/components/user-dropdown/user-dropdown.js";
|
|
28
|
+
import { UserDropdownMobile as xo } from "./src/components/user-dropdown-mobile/user-dropdown-mobile.js";
|
|
29
|
+
import { useScrollToBottom as no } from "./src/hooks/use-scroll-to-bottom.js";
|
|
35
30
|
export {
|
|
36
|
-
|
|
31
|
+
e as AnimatedLoader,
|
|
37
32
|
p as Badge,
|
|
38
33
|
x as Box,
|
|
39
34
|
n as Button,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
Io as UserDropdownMobile,
|
|
70
|
-
s as isEChartsChartOption,
|
|
71
|
-
h as isEChartsThemeOption,
|
|
72
|
-
lo as twMerge,
|
|
73
|
-
I as useChartInstance,
|
|
74
|
-
To as useScrollToBottom
|
|
35
|
+
d as ClientModal,
|
|
36
|
+
i as Collapsible,
|
|
37
|
+
u as CollapsibleContent,
|
|
38
|
+
c as CollapsibleTrigger,
|
|
39
|
+
B as CopyButton,
|
|
40
|
+
C as DecoratedIcon,
|
|
41
|
+
T as DropdownMenu,
|
|
42
|
+
s as DropdownMenuItem,
|
|
43
|
+
M as ErrorBoundary,
|
|
44
|
+
h as Icon,
|
|
45
|
+
y as IconButton,
|
|
46
|
+
L as InputButton,
|
|
47
|
+
k as MountSvgSprite,
|
|
48
|
+
F as NotFoundComponent,
|
|
49
|
+
j as PagePadding,
|
|
50
|
+
z as ProtocolLogo,
|
|
51
|
+
b as ScrollArea,
|
|
52
|
+
H as Select,
|
|
53
|
+
J as SelectItem,
|
|
54
|
+
O as Skeleton,
|
|
55
|
+
R as Switch,
|
|
56
|
+
W as TextInput,
|
|
57
|
+
Y as Tooltip,
|
|
58
|
+
_ as TooltipProvider,
|
|
59
|
+
oo as TouchTarget,
|
|
60
|
+
po as UserDropdown,
|
|
61
|
+
xo as UserDropdownMobile,
|
|
62
|
+
eo as twMerge,
|
|
63
|
+
no as useScrollToBottom
|
|
75
64
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getEChartsModule(): typeof import('echarts');
|
|
@@ -1,6 +1,26 @@
|
|
|
1
|
+
import { EChartsInitOpts } from 'echarts';
|
|
2
|
+
/**
|
|
3
|
+
* Minimal ECharts interface for server-side rendering.
|
|
4
|
+
* Only includes the methods needed by renderChartToImage.
|
|
5
|
+
*/
|
|
6
|
+
export interface EChartsModule {
|
|
7
|
+
registerTheme: (name: string, theme: Record<string, unknown>) => void;
|
|
8
|
+
init: (dom?: any, theme?: string | Record<string, unknown> | null, opts?: EChartsInitOpts) => EChartsInstance;
|
|
9
|
+
}
|
|
10
|
+
interface EChartsInstance {
|
|
11
|
+
setOption: (option: unknown) => void;
|
|
12
|
+
dispose: () => void;
|
|
13
|
+
}
|
|
1
14
|
export interface RenderChartToImageOptions {
|
|
2
15
|
option: unknown;
|
|
3
16
|
theme?: Record<string, unknown>;
|
|
17
|
+
/**
|
|
18
|
+
* Adds Validation Cloud watermark graphic to the chart option before rendering.
|
|
19
|
+
*
|
|
20
|
+
* Note: The default is `false` because some server-side image backends can be
|
|
21
|
+
* inconsistent when decoding SVG images.
|
|
22
|
+
*/
|
|
23
|
+
includeWatermark?: boolean;
|
|
4
24
|
width?: number;
|
|
5
25
|
height?: number;
|
|
6
26
|
devicePixelRatio?: number;
|
|
@@ -25,4 +45,5 @@ export interface RenderChartToImageOptions {
|
|
|
25
45
|
* });
|
|
26
46
|
* ```
|
|
27
47
|
*/
|
|
28
|
-
export declare function renderChartToImage({ option, theme, width, height, devicePixelRatio, }: RenderChartToImageOptions): Buffer;
|
|
48
|
+
export declare function renderChartToImage({ option, theme, includeWatermark, width, height, devicePixelRatio, }: RenderChartToImageOptions): Buffer;
|
|
49
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EChartsOption } from 'echarts';
|
|
2
2
|
export interface RenderMavrikChartToImageOptions {
|
|
3
3
|
option: EChartsOption;
|
|
4
|
+
includeWatermark?: boolean;
|
|
4
5
|
width?: number;
|
|
5
6
|
height?: number;
|
|
6
7
|
devicePixelRatio?: number;
|
|
@@ -30,4 +31,4 @@ export interface RenderMavrikChartToImageOptions {
|
|
|
30
31
|
* });
|
|
31
32
|
* ```
|
|
32
33
|
*/
|
|
33
|
-
export declare function renderMavrikChartToImage({ option, width, height, devicePixelRatio, }: RenderMavrikChartToImageOptions): Buffer;
|
|
34
|
+
export declare function renderMavrikChartToImage({ option, includeWatermark, width, height, devicePixelRatio, }: RenderMavrikChartToImageOptions): Buffer;
|
package/dist/server.d.ts
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
1
|
export { renderChartToImage, type RenderChartToImageOptions } from './lib/render-chart-to-image';
|
|
2
|
+
export { renderMavrikChartToImage, type RenderMavrikChartToImageOptions } from './lib/render-mavrik-chart-to-image';
|
|
3
|
+
export { sanitizeChartOptionsForStaticRendering } from './components/echarts-renderer/sanitize-chart-options-for-static-rendering';
|
package/dist/server.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { renderChartToImage as o } from "./src/lib/render-chart-to-image.js";
|
|
2
|
+
import { renderMavrikChartToImage as a } from "./src/lib/render-mavrik-chart-to-image.js";
|
|
3
|
+
import { sanitizeChartOptionsForStaticRendering as n } from "./src/components/echarts-renderer/sanitize-chart-options-for-static-rendering.js";
|
|
2
4
|
export {
|
|
3
|
-
o as renderChartToImage
|
|
5
|
+
o as renderChartToImage,
|
|
6
|
+
a as renderMavrikChartToImage,
|
|
7
|
+
n as sanitizeChartOptionsForStaticRendering
|
|
4
8
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Collapsible as t } from "radix-ui";
|
|
3
|
+
import { forwardRef as s } from "react";
|
|
4
|
+
import { twMerge as r } from "../../lib/tailwind-merge.js";
|
|
5
|
+
const p = s(
|
|
6
|
+
({ className: a, ...e }, l) => /* @__PURE__ */ o(t.Root, { ref: l, className: r(a), ...e })
|
|
7
|
+
);
|
|
8
|
+
p.displayName = "Collapsible";
|
|
9
|
+
const n = s(({ className: a, ...e }, l) => /* @__PURE__ */ o(t.Trigger, { ref: l, className: r(a), ...e }));
|
|
10
|
+
n.displayName = "CollapsibleTrigger";
|
|
11
|
+
const m = s(({ className: a, orientation: e = "vertical", ...l }, i) => /* @__PURE__ */ o(
|
|
12
|
+
t.Content,
|
|
13
|
+
{
|
|
14
|
+
ref: i,
|
|
15
|
+
className: r(
|
|
16
|
+
"overflow-hidden",
|
|
17
|
+
e === "vertical" && "data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",
|
|
18
|
+
e === "horizontal" && "data-[state=closed]:animate-collapsible-in data-[state=open]:animate-collapsible-out",
|
|
19
|
+
a
|
|
20
|
+
),
|
|
21
|
+
...l
|
|
22
|
+
}
|
|
23
|
+
));
|
|
24
|
+
m.displayName = "CollapsibleContent";
|
|
25
|
+
export {
|
|
26
|
+
p as Collapsible,
|
|
27
|
+
m as CollapsibleContent,
|
|
28
|
+
n as CollapsibleTrigger
|
|
29
|
+
};
|
|
@@ -1,33 +1,35 @@
|
|
|
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" },
|
|
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" }, a = { barGap: "25%", barCategoryGap: "25%" }, i = { 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" } }, f = { label: { color: "#A7A9AD" }, emphasis: { label: { color: "#FFFFFF" } } }, y = { backgroundColor: "transparent", padding: 10, borderRadius: 8, borderColor: "#50525A", borderWidth: 1, textStyle: { color: "#FCFCFC", fontFamily: "Poppins, sans-serif", fontSize: 11, fontStyle: "normal", fontWeight: 500 }, extraCssText: "letter-spacing: 0.22px; box-shadow: 0 14px 11px -4px rgba(0, 0, 0, 0.30), 0 -4px 4px 0 rgba(0, 0, 0, 0.04) inset; background: radial-gradient(ellipse at 25% 0%, rgba(217, 217, 217, 0.12) 0%, transparent 60%), #1A1D1F;" }, p = {
|
|
2
2
|
color: o,
|
|
3
3
|
backgroundColor: e,
|
|
4
4
|
textStyle: t,
|
|
5
5
|
title: l,
|
|
6
6
|
line: r,
|
|
7
|
-
bar:
|
|
8
|
-
categoryAxis:
|
|
7
|
+
bar: a,
|
|
8
|
+
categoryAxis: i,
|
|
9
9
|
valueAxis: s,
|
|
10
10
|
logAxis: n,
|
|
11
11
|
timeAxis: c,
|
|
12
12
|
legend: d,
|
|
13
13
|
grid: h,
|
|
14
14
|
dataZoom: A,
|
|
15
|
-
markPoint:
|
|
15
|
+
markPoint: f,
|
|
16
|
+
tooltip: y
|
|
16
17
|
};
|
|
17
18
|
export {
|
|
18
19
|
e as backgroundColor,
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
a as bar,
|
|
21
|
+
i as categoryAxis,
|
|
21
22
|
o as color,
|
|
22
23
|
A as dataZoom,
|
|
23
|
-
|
|
24
|
+
p as default,
|
|
24
25
|
h as grid,
|
|
25
26
|
d as legend,
|
|
26
27
|
r as line,
|
|
27
28
|
n as logAxis,
|
|
28
|
-
|
|
29
|
+
f as markPoint,
|
|
29
30
|
t as textStyle,
|
|
30
31
|
c as timeAxis,
|
|
31
32
|
l as title,
|
|
33
|
+
y as tooltip,
|
|
32
34
|
s as valueAxis
|
|
33
35
|
};
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import { hasHorizontalBars as
|
|
2
|
-
import { isEChartsThemeOption as
|
|
1
|
+
import { hasHorizontalBars as e } from "./detect-horizontal-bars.js";
|
|
2
|
+
import { isEChartsThemeOption as m } from "./echarts-theme-option.js";
|
|
3
3
|
import r from "./mavrik-theme-horizontal.json.js";
|
|
4
4
|
import i from "./mavrik-theme.json.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
function t(o, n) {
|
|
6
|
+
if (!m(n))
|
|
7
|
+
throw new Error(`Invalid ECharts theme configuration JSON: ${o}`);
|
|
8
|
+
}
|
|
9
|
+
t("mavrik-theme.json", i);
|
|
10
|
+
t("mavrik-theme-horizontal.json", r);
|
|
11
|
+
const a = {
|
|
10
12
|
name: "mavrik",
|
|
11
13
|
config: i
|
|
12
|
-
},
|
|
14
|
+
}, h = {
|
|
13
15
|
name: "mavrik-horizontal",
|
|
14
16
|
config: r
|
|
15
17
|
};
|
|
16
|
-
function
|
|
17
|
-
return
|
|
18
|
+
function E(o) {
|
|
19
|
+
return e(o) ? h : a;
|
|
18
20
|
}
|
|
19
21
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
a as MAVRIK_THEME,
|
|
23
|
+
h as MAVRIK_THEME_HORIZONTAL,
|
|
24
|
+
E as selectMavrikTheme
|
|
23
25
|
};
|
|
@@ -1,33 +1,35 @@
|
|
|
1
|
-
const o = [{ type: "linear", x: 0, y: 0, x2: 0, y2: 1, colorStops: [{ offset: 0, color: "#C14E64" }, { offset: 1, color: "#DF687D" }] }, { type: "linear", x: 0, y: 0, x2: 0, y2: 1, colorStops: [{ offset: 0, color: "#FFFFFF" }, { offset: 1, color: "#FFFFFF" }] }, { type: "linear", x: 0, y: 0, x2: 0, y2: 1, 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" },
|
|
1
|
+
const o = [{ type: "linear", x: 0, y: 0, x2: 0, y2: 1, colorStops: [{ offset: 0, color: "#C14E64" }, { offset: 1, color: "#DF687D" }] }, { type: "linear", x: 0, y: 0, x2: 0, y2: 1, colorStops: [{ offset: 0, color: "#FFFFFF" }, { offset: 1, color: "#FFFFFF" }] }, { type: "linear", x: 0, y: 0, x2: 0, y2: 1, 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" }, a = { barGap: "25%", barCategoryGap: "25%" }, i = { 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" } }, f = { label: { color: "#A7A9AD" }, emphasis: { label: { color: "#FFFFFF" } } }, y = { backgroundColor: "transparent", padding: 10, borderRadius: 8, borderColor: "#50525A", borderWidth: 1, textStyle: { color: "#FCFCFC", fontFamily: "Poppins, sans-serif", fontSize: 11, fontStyle: "normal", fontWeight: 500 }, extraCssText: "letter-spacing: 0.22px; box-shadow: 0 14px 11px -4px rgba(0, 0, 0, 0.30), 0 -4px 4px 0 rgba(0, 0, 0, 0.04) inset; background: radial-gradient(ellipse at 25% 0%, rgba(217, 217, 217, 0.12) 0%, transparent 60%), #1A1D1F;" }, p = {
|
|
2
2
|
color: o,
|
|
3
3
|
backgroundColor: e,
|
|
4
4
|
textStyle: t,
|
|
5
5
|
title: l,
|
|
6
6
|
line: r,
|
|
7
|
-
bar:
|
|
8
|
-
categoryAxis:
|
|
7
|
+
bar: a,
|
|
8
|
+
categoryAxis: i,
|
|
9
9
|
valueAxis: s,
|
|
10
10
|
logAxis: n,
|
|
11
11
|
timeAxis: c,
|
|
12
12
|
legend: d,
|
|
13
13
|
grid: h,
|
|
14
14
|
dataZoom: A,
|
|
15
|
-
markPoint:
|
|
15
|
+
markPoint: f,
|
|
16
|
+
tooltip: y
|
|
16
17
|
};
|
|
17
18
|
export {
|
|
18
19
|
e as backgroundColor,
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
a as bar,
|
|
21
|
+
i as categoryAxis,
|
|
21
22
|
o as color,
|
|
22
23
|
A as dataZoom,
|
|
23
|
-
|
|
24
|
+
p as default,
|
|
24
25
|
h as grid,
|
|
25
26
|
d as legend,
|
|
26
27
|
r as line,
|
|
27
28
|
n as logAxis,
|
|
28
|
-
|
|
29
|
+
f as markPoint,
|
|
29
30
|
t as textStyle,
|
|
30
31
|
c as timeAxis,
|
|
31
32
|
l as title,
|
|
33
|
+
y as tooltip,
|
|
32
34
|
s as valueAxis
|
|
33
35
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const n = /* @__PURE__ */ new Set([
|
|
2
|
+
"aria",
|
|
3
|
+
// Tries to set DOM attributes (not supported by skia-canvas)
|
|
4
|
+
"toolbox",
|
|
5
|
+
// Export/zoom/reset buttons
|
|
6
|
+
"dataZoom",
|
|
7
|
+
// Interactive range slider
|
|
8
|
+
"brush",
|
|
9
|
+
// Selection tool
|
|
10
|
+
"axisPointer"
|
|
11
|
+
// Crosshair on hover
|
|
12
|
+
]);
|
|
13
|
+
function o(e) {
|
|
14
|
+
const t = Object.fromEntries(
|
|
15
|
+
Object.entries(e).filter(([i]) => !n.has(i))
|
|
16
|
+
);
|
|
17
|
+
return t.animation = !1, t;
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
o as sanitizeChartOptionsForStaticRendering
|
|
21
|
+
};
|
|
@@ -1,9 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { randomUUID as y } from "node:crypto";
|
|
2
|
+
import e from "node:path";
|
|
3
|
+
import { fileURLToPath as g } from "node:url";
|
|
4
|
+
import { Image as h, Canvas as O, FontLibrary as b } from "skia-canvas";
|
|
5
|
+
import { calculateTitleLayout as j } from "../components/echarts-renderer/calculate-title-layout.js";
|
|
6
|
+
import { addWatermarkToOptions as P } from "../components/echarts-renderer/watermark-graphic.js";
|
|
7
|
+
import { getEChartsModule as T } from "./get-echarts-module.js";
|
|
8
|
+
globalThis.Image = h;
|
|
9
|
+
let s = !1;
|
|
10
|
+
function C() {
|
|
11
|
+
if (!s)
|
|
12
|
+
try {
|
|
13
|
+
const t = e.dirname(g(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
|
+
b.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
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const E = /* @__PURE__ */ new Set([
|
|
7
38
|
"aria",
|
|
8
39
|
// Tries to set DOM attributes which node-canvas doesn't implement
|
|
9
40
|
"toolbox",
|
|
@@ -15,37 +46,39 @@ const T = d(import.meta.url), b = /* @__PURE__ */ new Set([
|
|
|
15
46
|
"axisPointer"
|
|
16
47
|
// Crosshair on hover
|
|
17
48
|
]);
|
|
18
|
-
function
|
|
19
|
-
if (!
|
|
49
|
+
function I(t) {
|
|
50
|
+
if (!t || typeof t != "object" || Array.isArray(t))
|
|
20
51
|
return { animation: !1 };
|
|
21
|
-
const
|
|
22
|
-
Object.entries(
|
|
52
|
+
const r = Object.fromEntries(
|
|
53
|
+
Object.entries(t).filter(([n]) => !E.has(n))
|
|
23
54
|
);
|
|
24
|
-
return
|
|
55
|
+
return r.animation = !1, r;
|
|
25
56
|
}
|
|
26
|
-
function
|
|
27
|
-
option:
|
|
28
|
-
theme:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
57
|
+
function w({
|
|
58
|
+
option: t,
|
|
59
|
+
theme: r,
|
|
60
|
+
includeWatermark: n = !1,
|
|
61
|
+
width: o = 800,
|
|
62
|
+
height: a = 600,
|
|
63
|
+
devicePixelRatio: m = 2
|
|
32
64
|
}) {
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
65
|
+
const f = T();
|
|
66
|
+
C();
|
|
67
|
+
let i;
|
|
68
|
+
r && typeof r == "object" && (i = `theme-${y()}`, f.registerTheme(i, r));
|
|
69
|
+
const c = new O(o, a), l = f.init(c, i, {
|
|
37
70
|
renderer: "canvas",
|
|
38
|
-
devicePixelRatio:
|
|
39
|
-
width:
|
|
40
|
-
height:
|
|
71
|
+
devicePixelRatio: m,
|
|
72
|
+
width: o,
|
|
73
|
+
height: a
|
|
41
74
|
});
|
|
42
75
|
try {
|
|
43
|
-
const
|
|
44
|
-
return
|
|
76
|
+
const u = I(t), p = j(u, o, r), d = n ? P(p) : p;
|
|
77
|
+
return l.setOption(d), c.toBufferSync("png");
|
|
45
78
|
} finally {
|
|
46
|
-
|
|
79
|
+
l.dispose();
|
|
47
80
|
}
|
|
48
81
|
}
|
|
49
82
|
export {
|
|
50
|
-
|
|
83
|
+
w as renderChartToImage
|
|
51
84
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
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({
|
|
4
|
+
option: e,
|
|
5
|
+
includeWatermark: r = !1,
|
|
6
|
+
width: t = 800,
|
|
7
|
+
height: m = 600,
|
|
8
|
+
devicePixelRatio: o = 2
|
|
9
|
+
}) {
|
|
10
|
+
const a = n(e);
|
|
11
|
+
return f({
|
|
12
|
+
option: e,
|
|
13
|
+
theme: a.config,
|
|
14
|
+
includeWatermark: r,
|
|
15
|
+
width: t,
|
|
16
|
+
height: m,
|
|
17
|
+
devicePixelRatio: o
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
c as renderMavrikChartToImage
|
|
22
|
+
};
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
--animate-tooltip-enter: fade-in 150ms ease-out, scale-up-50 100ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
9
9
|
--animate-tooltip-delayed-enter: fade-in 150ms ease-out, scale-up-50 400ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
10
10
|
--animate-tooltip-exit: fade-out 100ms ease-in, scale-down-50 100ms ease-in;
|
|
11
|
+
--animate-collapsible-down: collapsible-slide-down 150ms ease-out;
|
|
12
|
+
--animate-collapsible-up: collapsible-slide-up 150ms ease-out;
|
|
13
|
+
--animate-collapsible-in: collapsible-slide-in 150ms ease-out;
|
|
14
|
+
--animate-collapsible-out: collapsible-slide-out 150ms ease-out;
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
@keyframes fade-in {
|
|
@@ -81,3 +85,39 @@
|
|
|
81
85
|
transform: translateX(100%);
|
|
82
86
|
}
|
|
83
87
|
}
|
|
88
|
+
|
|
89
|
+
@keyframes collapsible-slide-down {
|
|
90
|
+
from {
|
|
91
|
+
height: 0;
|
|
92
|
+
}
|
|
93
|
+
to {
|
|
94
|
+
height: var(--radix-collapsible-content-height);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@keyframes collapsible-slide-up {
|
|
99
|
+
from {
|
|
100
|
+
height: var(--radix-collapsible-content-height);
|
|
101
|
+
}
|
|
102
|
+
to {
|
|
103
|
+
height: 0;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@keyframes collapsible-slide-in {
|
|
108
|
+
from {
|
|
109
|
+
width: var(--radix-collapsible-content-width);
|
|
110
|
+
}
|
|
111
|
+
to {
|
|
112
|
+
width: 0;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@keyframes collapsible-slide-out {
|
|
117
|
+
from {
|
|
118
|
+
width: 0;
|
|
119
|
+
}
|
|
120
|
+
to {
|
|
121
|
+
width: var(--radix-collapsible-content-width);
|
|
122
|
+
}
|
|
123
|
+
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@validationcloud/fractal-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.56.0",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
|
-
"dist"
|
|
8
|
+
"dist",
|
|
9
|
+
"dist/fonts"
|
|
9
10
|
],
|
|
10
11
|
"license": "MIT",
|
|
11
12
|
"repository": {
|
|
@@ -34,6 +35,10 @@
|
|
|
34
35
|
"types": "./dist/index.d.ts",
|
|
35
36
|
"import": "./dist/index.js"
|
|
36
37
|
},
|
|
38
|
+
"./charts": {
|
|
39
|
+
"types": "./dist/charts.d.ts",
|
|
40
|
+
"import": "./dist/charts.js"
|
|
41
|
+
},
|
|
37
42
|
"./server": {
|
|
38
43
|
"types": "./dist/server.d.ts",
|
|
39
44
|
"import": "./dist/server.js"
|
|
@@ -46,6 +51,7 @@
|
|
|
46
51
|
},
|
|
47
52
|
"dependencies": {
|
|
48
53
|
"@radix-ui/react-select": "^2.1.7",
|
|
54
|
+
"echarts": "^6",
|
|
49
55
|
"radix-ui": "^1",
|
|
50
56
|
"react": "^19",
|
|
51
57
|
"react-dom": "^19",
|
|
@@ -66,9 +72,8 @@
|
|
|
66
72
|
"@types/react": "^19",
|
|
67
73
|
"@types/react-dom": "^19",
|
|
68
74
|
"@vitejs/plugin-react": "^5.1.2",
|
|
69
|
-
"canvas": "^3.
|
|
75
|
+
"skia-canvas": "^3.0.8",
|
|
70
76
|
"culori": "^4.0.2",
|
|
71
|
-
"echarts": "^6.0.0",
|
|
72
77
|
"eslint": "^9.39.1",
|
|
73
78
|
"eslint-config-prettier": "^10.1.8",
|
|
74
79
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
@@ -92,8 +97,7 @@
|
|
|
92
97
|
},
|
|
93
98
|
"peerDependencies": {
|
|
94
99
|
"@radix-ui/react-compose-refs": "^1",
|
|
95
|
-
"canvas": "^3",
|
|
96
|
-
"echarts": "^6",
|
|
100
|
+
"skia-canvas": "^3",
|
|
97
101
|
"radix-ui": "^1",
|
|
98
102
|
"react": "^19",
|
|
99
103
|
"react-dom": "^19",
|
|
@@ -102,10 +106,7 @@
|
|
|
102
106
|
"zod": "^4"
|
|
103
107
|
},
|
|
104
108
|
"peerDependenciesMeta": {
|
|
105
|
-
"canvas": {
|
|
106
|
-
"optional": true
|
|
107
|
-
},
|
|
108
|
-
"echarts": {
|
|
109
|
+
"skia-canvas": {
|
|
109
110
|
"optional": true
|
|
110
111
|
}
|
|
111
112
|
}
|