@antv/gpt-vis 1.0.1 → 1.3.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/README.md +113 -36
- package/README.zh-CN.md +113 -36
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/theme/g2.d.ts +9 -0
- package/dist/cjs/theme/g2.js +605 -0
- package/dist/cjs/theme/g6.d.ts +28 -0
- package/dist/cjs/theme/g6.js +124 -0
- package/dist/cjs/theme/merge.d.ts +2 -0
- package/dist/cjs/theme/merge.js +49 -0
- package/dist/cjs/theme/resolve.d.ts +7 -0
- package/dist/cjs/theme/resolve.js +58 -0
- package/dist/cjs/theme/shared.d.ts +7 -0
- package/dist/cjs/theme/shared.js +61 -0
- package/dist/cjs/theme/summary.d.ts +11 -0
- package/dist/cjs/theme/summary.js +61 -0
- package/dist/cjs/theme/table.d.ts +13 -0
- package/dist/cjs/theme/table.js +121 -0
- package/dist/cjs/types/index.d.ts +8 -5
- package/dist/cjs/types/theme.d.ts +107 -0
- package/dist/cjs/types/theme.js +17 -0
- package/dist/cjs/util/animation.js +6 -1
- package/dist/cjs/util/components.d.ts +20 -0
- package/dist/cjs/util/components.js +40 -0
- package/dist/cjs/util/crosshair-axis-labels.d.ts +7 -2
- package/dist/cjs/util/crosshair-axis-labels.js +144 -30
- package/dist/cjs/util/html.d.ts +1 -0
- package/dist/cjs/util/html.js +29 -0
- package/dist/cjs/util/index.d.ts +0 -2
- package/dist/cjs/util/index.js +1 -5
- package/dist/cjs/util/interaction.d.ts +4 -3
- package/dist/cjs/util/interaction.js +14 -1
- package/dist/cjs/util/tokens.d.ts +4 -3
- package/dist/cjs/util/tokens.js +13 -10
- package/dist/cjs/vis/area/index.d.ts +3 -6
- package/dist/cjs/vis/area/index.js +43 -30
- package/dist/cjs/vis/bar/index.d.ts +5 -5
- package/dist/cjs/vis/bar/index.js +34 -20
- package/dist/cjs/vis/boxplot/index.d.ts +4 -5
- package/dist/cjs/vis/boxplot/index.js +36 -23
- package/dist/cjs/vis/column/index.d.ts +5 -5
- package/dist/cjs/vis/column/index.js +38 -26
- package/dist/cjs/vis/dual-axes/index.d.ts +3 -4
- package/dist/cjs/vis/dual-axes/index.js +87 -51
- package/dist/cjs/vis/fishbone-diagram/index.d.ts +4 -10
- package/dist/cjs/vis/fishbone-diagram/index.js +43 -28
- package/dist/cjs/vis/flow-diagram/index.d.ts +4 -6
- package/dist/cjs/vis/flow-diagram/index.js +21 -22
- package/dist/cjs/vis/funnel/index.d.ts +3 -6
- package/dist/cjs/vis/funnel/index.js +77 -58
- package/dist/cjs/vis/histogram/index.d.ts +4 -6
- package/dist/cjs/vis/histogram/index.js +17 -19
- package/dist/cjs/vis/indented-tree/index.d.ts +4 -6
- package/dist/cjs/vis/indented-tree/index.js +58 -34
- package/dist/cjs/vis/line/index.d.ts +3 -6
- package/dist/cjs/vis/line/index.js +43 -22
- package/dist/cjs/vis/liquid/index.d.ts +4 -6
- package/dist/cjs/vis/liquid/index.js +22 -17
- package/dist/cjs/vis/mindmap/index.d.ts +4 -6
- package/dist/cjs/vis/mindmap/index.js +43 -25
- package/dist/cjs/vis/network-graph/index.d.ts +4 -6
- package/dist/cjs/vis/network-graph/index.js +26 -20
- package/dist/cjs/vis/organization-chart/index.d.ts +4 -6
- package/dist/cjs/vis/organization-chart/index.js +39 -33
- package/dist/cjs/vis/pie/index.d.ts +3 -5
- package/dist/cjs/vis/pie/index.js +45 -26
- package/dist/cjs/vis/radar/index.d.ts +3 -6
- package/dist/cjs/vis/radar/index.js +32 -24
- package/dist/cjs/vis/sankey/index.d.ts +4 -6
- package/dist/cjs/vis/sankey/index.js +17 -7
- package/dist/cjs/vis/scatter/index.d.ts +3 -5
- package/dist/cjs/vis/scatter/index.js +32 -19
- package/dist/cjs/vis/summary/index.js +5 -6
- package/dist/cjs/vis/table/index.d.ts +4 -2
- package/dist/cjs/vis/table/index.js +56 -8
- package/dist/cjs/vis/treemap/index.d.ts +4 -6
- package/dist/cjs/vis/treemap/index.js +11 -7
- package/dist/cjs/vis/venn/index.d.ts +4 -6
- package/dist/cjs/vis/venn/index.js +18 -16
- package/dist/cjs/vis/violin/index.d.ts +4 -5
- package/dist/cjs/vis/violin/index.js +35 -27
- package/dist/cjs/vis/waterfall/index.d.ts +4 -4
- package/dist/cjs/vis/waterfall/index.js +48 -39
- package/dist/cjs/vis/word-cloud/index.d.ts +3 -5
- package/dist/cjs/vis/word-cloud/index.js +18 -12
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/theme/g2.d.ts +9 -0
- package/dist/esm/theme/g2.js +504 -0
- package/dist/esm/theme/g6.d.ts +28 -0
- package/dist/esm/theme/g6.js +84 -0
- package/dist/esm/theme/merge.d.ts +2 -0
- package/dist/esm/theme/merge.js +36 -0
- package/dist/esm/theme/resolve.d.ts +7 -0
- package/dist/esm/theme/resolve.js +27 -0
- package/dist/esm/theme/shared.d.ts +7 -0
- package/dist/esm/theme/shared.js +21 -0
- package/dist/esm/theme/summary.d.ts +11 -0
- package/dist/esm/theme/summary.js +45 -0
- package/dist/esm/theme/table.d.ts +13 -0
- package/dist/esm/theme/table.js +112 -0
- package/dist/esm/types/index.d.ts +8 -5
- package/dist/esm/types/theme.d.ts +107 -0
- package/dist/esm/types/theme.js +1 -0
- package/dist/esm/util/animation.js +12 -2
- package/dist/esm/util/components.d.ts +20 -0
- package/dist/esm/util/components.js +57 -1
- package/dist/esm/util/crosshair-axis-labels.d.ts +7 -2
- package/dist/esm/util/crosshair-axis-labels.js +156 -35
- package/dist/esm/util/html.d.ts +1 -0
- package/dist/esm/util/html.js +3 -0
- package/dist/esm/util/index.d.ts +0 -2
- package/dist/esm/util/index.js +1 -3
- package/dist/esm/util/interaction.d.ts +4 -3
- package/dist/esm/util/interaction.js +18 -1
- package/dist/esm/util/tokens.d.ts +4 -3
- package/dist/esm/util/tokens.js +13 -10
- package/dist/esm/vis/area/index.d.ts +3 -6
- package/dist/esm/vis/area/index.js +53 -45
- package/dist/esm/vis/bar/index.d.ts +5 -5
- package/dist/esm/vis/bar/index.js +38 -27
- package/dist/esm/vis/boxplot/index.d.ts +4 -5
- package/dist/esm/vis/boxplot/index.js +47 -29
- package/dist/esm/vis/column/index.d.ts +5 -5
- package/dist/esm/vis/column/index.js +46 -36
- package/dist/esm/vis/dual-axes/index.d.ts +3 -4
- package/dist/esm/vis/dual-axes/index.js +97 -57
- package/dist/esm/vis/fishbone-diagram/index.d.ts +4 -10
- package/dist/esm/vis/fishbone-diagram/index.js +52 -27
- package/dist/esm/vis/flow-diagram/index.d.ts +4 -6
- package/dist/esm/vis/flow-diagram/index.js +28 -23
- package/dist/esm/vis/funnel/index.d.ts +3 -6
- package/dist/esm/vis/funnel/index.js +78 -68
- package/dist/esm/vis/histogram/index.d.ts +4 -6
- package/dist/esm/vis/histogram/index.js +28 -21
- package/dist/esm/vis/indented-tree/index.d.ts +4 -6
- package/dist/esm/vis/indented-tree/index.js +59 -52
- package/dist/esm/vis/line/index.d.ts +3 -6
- package/dist/esm/vis/line/index.js +44 -32
- package/dist/esm/vis/liquid/index.d.ts +4 -6
- package/dist/esm/vis/liquid/index.js +28 -21
- package/dist/esm/vis/mindmap/index.d.ts +4 -6
- package/dist/esm/vis/mindmap/index.js +32 -28
- package/dist/esm/vis/network-graph/index.d.ts +4 -6
- package/dist/esm/vis/network-graph/index.js +37 -22
- package/dist/esm/vis/organization-chart/index.d.ts +4 -6
- package/dist/esm/vis/organization-chart/index.js +47 -36
- package/dist/esm/vis/pie/index.d.ts +3 -5
- package/dist/esm/vis/pie/index.js +42 -26
- package/dist/esm/vis/radar/index.d.ts +3 -6
- package/dist/esm/vis/radar/index.js +28 -20
- package/dist/esm/vis/sankey/index.d.ts +4 -6
- package/dist/esm/vis/sankey/index.js +20 -10
- package/dist/esm/vis/scatter/index.d.ts +3 -5
- package/dist/esm/vis/scatter/index.js +32 -21
- package/dist/esm/vis/summary/index.js +5 -7
- package/dist/esm/vis/table/index.d.ts +4 -2
- package/dist/esm/vis/table/index.js +48 -11
- package/dist/esm/vis/treemap/index.d.ts +4 -6
- package/dist/esm/vis/treemap/index.js +16 -11
- package/dist/esm/vis/venn/index.d.ts +4 -6
- package/dist/esm/vis/venn/index.js +24 -16
- package/dist/esm/vis/violin/index.d.ts +4 -5
- package/dist/esm/vis/violin/index.js +45 -37
- package/dist/esm/vis/waterfall/index.d.ts +4 -4
- package/dist/esm/vis/waterfall/index.js +46 -36
- package/dist/esm/vis/word-cloud/index.d.ts +3 -5
- package/dist/esm/vis/word-cloud/index.js +24 -17
- package/dist/umd/index.min.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/util/theme.d.ts +0 -20
- package/dist/cjs/util/theme.js +0 -372
- package/dist/esm/util/theme.d.ts +0 -20
- package/dist/esm/util/theme.js +0 -326
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/theme/g6.ts
|
|
20
|
+
var g6_exports = {};
|
|
21
|
+
__export(g6_exports, {
|
|
22
|
+
getThemeObject: () => getThemeObject
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(g6_exports);
|
|
25
|
+
var import_tokens = require("../util/tokens");
|
|
26
|
+
var import_merge = require("./merge");
|
|
27
|
+
var import_resolve = require("./resolve");
|
|
28
|
+
var import_shared = require("./shared");
|
|
29
|
+
var ELEMENT_KEYS = [
|
|
30
|
+
"stroke",
|
|
31
|
+
"strokeOpacity",
|
|
32
|
+
"lineWidth",
|
|
33
|
+
"lineDash",
|
|
34
|
+
"opacity",
|
|
35
|
+
"shadowColor",
|
|
36
|
+
"shadowBlur",
|
|
37
|
+
"shadowOffsetX",
|
|
38
|
+
"shadowOffsetY",
|
|
39
|
+
"radius",
|
|
40
|
+
"labelFill",
|
|
41
|
+
"labelFontFamily",
|
|
42
|
+
"labelFontSize",
|
|
43
|
+
"labelFontWeight"
|
|
44
|
+
];
|
|
45
|
+
var TITLE_KEYS = [
|
|
46
|
+
"align",
|
|
47
|
+
"spacing",
|
|
48
|
+
"titleFill",
|
|
49
|
+
"titleFillOpacity",
|
|
50
|
+
"titleFontFamily",
|
|
51
|
+
"titleFontSize",
|
|
52
|
+
"titleFontWeight",
|
|
53
|
+
"subtitleFill",
|
|
54
|
+
"subtitleFillOpacity",
|
|
55
|
+
"subtitleFontFamily",
|
|
56
|
+
"subtitleFontSize",
|
|
57
|
+
"subtitleFontWeight"
|
|
58
|
+
];
|
|
59
|
+
function getThemeObject(type, theme, localStyle) {
|
|
60
|
+
var _a, _b;
|
|
61
|
+
const { baseTheme, tokens: t, styles } = (0, import_resolve.resolveTheme)(type, theme, localStyle);
|
|
62
|
+
const text = {
|
|
63
|
+
labelFontFamily: t.fontFamily,
|
|
64
|
+
labelFontSize: t.fontSize,
|
|
65
|
+
labelFontWeight: t.fontWeight
|
|
66
|
+
};
|
|
67
|
+
const paint = { stroke: t.colorStroke, lineWidth: t.lineWidth, radius: t.radius };
|
|
68
|
+
const style = (0, import_merge.mergeTheme)(
|
|
69
|
+
{
|
|
70
|
+
node: { ...paint, ...text, labelFill: t.colorText },
|
|
71
|
+
edge: {
|
|
72
|
+
stroke: t.colorStroke,
|
|
73
|
+
lineWidth: t.lineWidth,
|
|
74
|
+
...text,
|
|
75
|
+
labelFill: t.colorTextSecondary
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
...styles
|
|
79
|
+
);
|
|
80
|
+
const nodeStyle = (0, import_shared.pickStyle)(style.node, [...ELEMENT_KEYS, "fill", "fillOpacity"]);
|
|
81
|
+
const edgeStyle = (0, import_shared.pickStyle)(style.edge, ELEMENT_KEYS);
|
|
82
|
+
const nodeType = (_a = style.node) == null ? void 0 : _a.type;
|
|
83
|
+
const edgeType = (_b = style.edge) == null ? void 0 : _b.type;
|
|
84
|
+
const values = (0, import_tokens.getChartVisualTokens)(baseTheme);
|
|
85
|
+
return {
|
|
86
|
+
baseTheme,
|
|
87
|
+
theme: baseTheme === "dark" ? "dark" : "light",
|
|
88
|
+
colors: (0, import_shared.normalizePalette)(style.palette, baseTheme),
|
|
89
|
+
backgroundColor: style.backgroundColor || values.background,
|
|
90
|
+
node: {
|
|
91
|
+
type: type === "network-graph" && ["circle", "diamond", "ellipse", "hexagon", "rect", "star", "triangle"].includes(
|
|
92
|
+
String(nodeType)
|
|
93
|
+
) ? String(nodeType) : void 0,
|
|
94
|
+
style: nodeStyle
|
|
95
|
+
},
|
|
96
|
+
edge: {
|
|
97
|
+
type: type === "network-graph" && ["line", "polyline", "quadratic", "cubic"].includes(String(edgeType)) ? String(edgeType) : void 0,
|
|
98
|
+
style: edgeStyle
|
|
99
|
+
},
|
|
100
|
+
titleStyle: {
|
|
101
|
+
titleFill: baseTheme === "dark" ? "#e0e6ed" : "#000",
|
|
102
|
+
titleFontFamily: "sans-serif",
|
|
103
|
+
subtitleFill: values.textSecondary,
|
|
104
|
+
...(0, import_shared.pickStyle)(style.title, TITLE_KEYS)
|
|
105
|
+
},
|
|
106
|
+
tooltipStyle: (0, import_shared.pickStyle)({
|
|
107
|
+
background: t.colorSurface,
|
|
108
|
+
color: t.colorText,
|
|
109
|
+
borderColor: t.colorStroke,
|
|
110
|
+
borderWidth: t.lineWidth === void 0 ? void 0 : `${t.lineWidth}px`,
|
|
111
|
+
borderRadius: t.radius === void 0 ? void 0 : `${t.radius}px`,
|
|
112
|
+
fontFamily: t.fontFamily,
|
|
113
|
+
fontSize: t.fontSize === void 0 ? void 0 : `${t.fontSize}px`,
|
|
114
|
+
fontWeight: t.fontWeight,
|
|
115
|
+
lineHeight: t.lineHeight === void 0 ? void 0 : `${t.lineHeight}px`,
|
|
116
|
+
padding: t.spacingSmall === void 0 && t.spacingMedium === void 0 ? void 0 : `${t.spacingSmall ?? 8}px ${t.spacingMedium ?? 10}px`
|
|
117
|
+
}),
|
|
118
|
+
texture: style.texture
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
122
|
+
0 && (module.exports = {
|
|
123
|
+
getThemeObject
|
|
124
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/theme/merge.ts
|
|
20
|
+
var merge_exports = {};
|
|
21
|
+
__export(merge_exports, {
|
|
22
|
+
mergeTheme: () => mergeTheme
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(merge_exports);
|
|
25
|
+
function mergeTheme(...sources) {
|
|
26
|
+
const result = {};
|
|
27
|
+
for (const source of sources) {
|
|
28
|
+
for (const [key, value] of Object.entries(source ?? {})) {
|
|
29
|
+
if (value === void 0 || key === "__proto__" || key === "constructor" || key === "prototype")
|
|
30
|
+
continue;
|
|
31
|
+
if (Array.isArray(value)) {
|
|
32
|
+
result[key] = [...value];
|
|
33
|
+
} else if (value && typeof value === "object") {
|
|
34
|
+
const previous = result[key];
|
|
35
|
+
result[key] = mergeTheme(
|
|
36
|
+
previous && typeof previous === "object" && !Array.isArray(previous) ? previous : void 0,
|
|
37
|
+
value
|
|
38
|
+
);
|
|
39
|
+
} else {
|
|
40
|
+
result[key] = value;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
mergeTheme
|
|
49
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ChartType, ThemeStyle, VisualizationTheme } from '../types';
|
|
2
|
+
/** Keep the override layers in order; each renderer expands only its own tokens. */
|
|
3
|
+
export declare function resolveTheme(type: ChartType, theme?: VisualizationTheme, localStyle?: ThemeStyle): {
|
|
4
|
+
baseTheme: "light" | "dark" | "academy";
|
|
5
|
+
tokens: import("../types").ThemeTokens;
|
|
6
|
+
styles: (ThemeStyle | undefined)[];
|
|
7
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/theme/resolve.ts
|
|
20
|
+
var resolve_exports = {};
|
|
21
|
+
__export(resolve_exports, {
|
|
22
|
+
resolveTheme: () => resolveTheme
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(resolve_exports);
|
|
25
|
+
function resolveTheme(type, theme, localStyle) {
|
|
26
|
+
var _a, _b;
|
|
27
|
+
const spec = typeof theme === "object" ? theme : void 0;
|
|
28
|
+
const tokens = (spec == null ? void 0 : spec.tokens) ?? {};
|
|
29
|
+
const name = (spec == null ? void 0 : spec.baseTheme) ?? (typeof theme === "string" ? theme : "default");
|
|
30
|
+
const baseTheme = name === "dark" || name === "academy" ? name : "light";
|
|
31
|
+
return {
|
|
32
|
+
baseTheme,
|
|
33
|
+
tokens,
|
|
34
|
+
styles: [
|
|
35
|
+
{
|
|
36
|
+
backgroundColor: tokens.colorBackground,
|
|
37
|
+
palette: tokens.category10 ?? tokens.category20 ?? (tokens.colorDefault ? [tokens.colorDefault] : void 0),
|
|
38
|
+
title: {
|
|
39
|
+
titleFill: tokens.colorText,
|
|
40
|
+
subtitleFill: tokens.colorTextSecondary,
|
|
41
|
+
titleFontFamily: tokens.fontFamily,
|
|
42
|
+
subtitleFontFamily: tokens.fontFamily,
|
|
43
|
+
titleFontSize: tokens.fontSize === void 0 ? void 0 : tokens.fontSize + 4,
|
|
44
|
+
subtitleFontSize: tokens.fontSize,
|
|
45
|
+
titleFontWeight: tokens.fontWeight,
|
|
46
|
+
spacing: tokens.spacingMedium
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
spec == null ? void 0 : spec.style,
|
|
50
|
+
(_b = (_a = spec == null ? void 0 : spec.charts) == null ? void 0 : _a[type]) == null ? void 0 : _b.style,
|
|
51
|
+
localStyle
|
|
52
|
+
]
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
+
0 && (module.exports = {
|
|
57
|
+
resolveTheme
|
|
58
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const DEFAULT_COLOR_PALETTE: string[];
|
|
2
|
+
export declare const ACADEMY_COLOR_PALETTE: string[];
|
|
3
|
+
export declare const normalizePalette: (palette: string | string[] | undefined, theme: string) => string[];
|
|
4
|
+
/** Renderer field whitelists consume appearance fields only. */
|
|
5
|
+
export declare const pickStyle: (style: Record<string, any> | undefined, keys?: readonly string[]) => {
|
|
6
|
+
[k: string]: any;
|
|
7
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/theme/shared.ts
|
|
20
|
+
var shared_exports = {};
|
|
21
|
+
__export(shared_exports, {
|
|
22
|
+
ACADEMY_COLOR_PALETTE: () => ACADEMY_COLOR_PALETTE,
|
|
23
|
+
DEFAULT_COLOR_PALETTE: () => DEFAULT_COLOR_PALETTE,
|
|
24
|
+
normalizePalette: () => normalizePalette,
|
|
25
|
+
pickStyle: () => pickStyle
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(shared_exports);
|
|
28
|
+
var DEFAULT_COLOR_PALETTE = [
|
|
29
|
+
"#5B6CFF",
|
|
30
|
+
"#2DAF9E",
|
|
31
|
+
"#F2B84B",
|
|
32
|
+
"#EF6A6A",
|
|
33
|
+
"#55A6D9",
|
|
34
|
+
"#3AA76D",
|
|
35
|
+
"#F58A57",
|
|
36
|
+
"#8B6FD6",
|
|
37
|
+
"#D96C9B"
|
|
38
|
+
];
|
|
39
|
+
var ACADEMY_COLOR_PALETTE = [
|
|
40
|
+
"#4e79a7",
|
|
41
|
+
"#f28e2c",
|
|
42
|
+
"#e15759",
|
|
43
|
+
"#76b7b2",
|
|
44
|
+
"#59a14f",
|
|
45
|
+
"#edc949",
|
|
46
|
+
"#af7aa1",
|
|
47
|
+
"#ff9da7",
|
|
48
|
+
"#9c755f",
|
|
49
|
+
"#bab0ab"
|
|
50
|
+
];
|
|
51
|
+
var normalizePalette = (palette, theme) => palette && (!Array.isArray(palette) || palette.length) ? Array.isArray(palette) ? [...palette] : [palette] : [...theme === "academy" ? ACADEMY_COLOR_PALETTE : DEFAULT_COLOR_PALETTE];
|
|
52
|
+
var pickStyle = (style, keys = Object.keys(style ?? {})) => Object.fromEntries(
|
|
53
|
+
keys.filter((key) => (style == null ? void 0 : style[key]) !== void 0).map((key) => [key, style[key]])
|
|
54
|
+
);
|
|
55
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
+
0 && (module.exports = {
|
|
57
|
+
ACADEMY_COLOR_PALETTE,
|
|
58
|
+
DEFAULT_COLOR_PALETTE,
|
|
59
|
+
normalizePalette,
|
|
60
|
+
pickStyle
|
|
61
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ThemeStyle, VisualizationTheme } from '../types';
|
|
2
|
+
export declare function getThemeObject(type: 'summary', theme?: VisualizationTheme, localStyle?: ThemeStyle): {
|
|
3
|
+
theme: "light" | "dark";
|
|
4
|
+
backgrounds: {
|
|
5
|
+
light: string;
|
|
6
|
+
dark: string;
|
|
7
|
+
};
|
|
8
|
+
summary: {
|
|
9
|
+
[k: string]: any;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/theme/summary.ts
|
|
20
|
+
var summary_exports = {};
|
|
21
|
+
__export(summary_exports, {
|
|
22
|
+
getThemeObject: () => getThemeObject
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(summary_exports);
|
|
25
|
+
var import_tokens = require("../util/tokens");
|
|
26
|
+
var import_merge = require("./merge");
|
|
27
|
+
var import_resolve = require("./resolve");
|
|
28
|
+
var import_shared = require("./shared");
|
|
29
|
+
function getThemeObject(type, theme, localStyle) {
|
|
30
|
+
const { baseTheme, tokens: t, styles } = (0, import_resolve.resolveTheme)(type, theme, localStyle);
|
|
31
|
+
const summary = {
|
|
32
|
+
fontFamily: t.fontFamily,
|
|
33
|
+
fontSize: t.fontSize,
|
|
34
|
+
lineHeight: t.lineHeight,
|
|
35
|
+
borderColor: t.colorStroke,
|
|
36
|
+
colorBase: t.colorText,
|
|
37
|
+
colorEntityBase: t.colorText,
|
|
38
|
+
colorHeadingBase: t.colorText,
|
|
39
|
+
colorPositive: t.colorPositive,
|
|
40
|
+
colorNegative: t.colorNegative,
|
|
41
|
+
colorConclusion: t.colorText,
|
|
42
|
+
colorDimensionValue: t.colorText,
|
|
43
|
+
colorMetricName: t.colorText,
|
|
44
|
+
colorMetricValue: t.colorDefault,
|
|
45
|
+
colorOtherValue: t.colorNeutral,
|
|
46
|
+
colorLink: t.colorDefault
|
|
47
|
+
};
|
|
48
|
+
const style = (0, import_merge.mergeTheme)({ summary }, ...styles);
|
|
49
|
+
return {
|
|
50
|
+
theme: baseTheme === "dark" ? "dark" : "light",
|
|
51
|
+
backgrounds: {
|
|
52
|
+
light: style.backgroundColor ?? "",
|
|
53
|
+
dark: style.backgroundColor ?? (0, import_tokens.getChartVisualTokens)("dark").background
|
|
54
|
+
},
|
|
55
|
+
summary: (0, import_shared.pickStyle)(style.summary, Object.keys(summary))
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
59
|
+
0 && (module.exports = {
|
|
60
|
+
getThemeObject
|
|
61
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ThemeStyle, VisualizationTheme } from '../types';
|
|
2
|
+
export declare function getThemeObject(type: 'table', theme?: VisualizationTheme, localStyle?: ThemeStyle): {
|
|
3
|
+
theme: "light" | "dark";
|
|
4
|
+
backgroundColor: string | undefined;
|
|
5
|
+
title: Record<string, string>;
|
|
6
|
+
subtitle: Record<string, string>;
|
|
7
|
+
header: Record<string, string>;
|
|
8
|
+
cell: Record<string, string>;
|
|
9
|
+
border: {
|
|
10
|
+
table: Record<string, string>;
|
|
11
|
+
cell: Record<string, string>;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/theme/table.ts
|
|
20
|
+
var table_exports = {};
|
|
21
|
+
__export(table_exports, {
|
|
22
|
+
getThemeObject: () => getThemeObject
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(table_exports);
|
|
25
|
+
var import_merge = require("./merge");
|
|
26
|
+
var import_resolve = require("./resolve");
|
|
27
|
+
function getThemeObject(type, theme, localStyle) {
|
|
28
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
29
|
+
const { baseTheme, tokens: t, styles } = (0, import_resolve.resolveTheme)(type, theme, localStyle);
|
|
30
|
+
const cell = {
|
|
31
|
+
fontFamily: t.fontFamily,
|
|
32
|
+
fontSize: t.fontSize,
|
|
33
|
+
fontWeight: t.fontWeight,
|
|
34
|
+
fill: t.colorText,
|
|
35
|
+
backgroundColor: t.colorSurface,
|
|
36
|
+
padding: t.spacingMedium
|
|
37
|
+
};
|
|
38
|
+
const style = (0, import_merge.mergeTheme)(
|
|
39
|
+
{
|
|
40
|
+
table: {
|
|
41
|
+
header: cell,
|
|
42
|
+
cell,
|
|
43
|
+
border: { color: t.colorStroke, width: t.lineWidth, radius: t.radius }
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
...styles
|
|
47
|
+
);
|
|
48
|
+
const title = style.title ?? {};
|
|
49
|
+
return {
|
|
50
|
+
theme: baseTheme === "dark" ? "dark" : "light",
|
|
51
|
+
backgroundColor: style.backgroundColor,
|
|
52
|
+
title: compactStyle({
|
|
53
|
+
color: title.titleFill,
|
|
54
|
+
opacity: (_a = title.titleFillOpacity) == null ? void 0 : _a.toString(),
|
|
55
|
+
fontFamily: title.titleFontFamily,
|
|
56
|
+
fontSize: toPixels(title.titleFontSize),
|
|
57
|
+
fontWeight: (_b = title.titleFontWeight) == null ? void 0 : _b.toString(),
|
|
58
|
+
textAlign: title.align
|
|
59
|
+
}),
|
|
60
|
+
subtitle: compactStyle({
|
|
61
|
+
color: title.subtitleFill,
|
|
62
|
+
opacity: (_c = title.subtitleFillOpacity) == null ? void 0 : _c.toString(),
|
|
63
|
+
fontFamily: title.subtitleFontFamily,
|
|
64
|
+
fontSize: toPixels(title.subtitleFontSize),
|
|
65
|
+
fontWeight: (_d = title.subtitleFontWeight) == null ? void 0 : _d.toString(),
|
|
66
|
+
marginTop: toPixels(title.spacing),
|
|
67
|
+
textAlign: title.align
|
|
68
|
+
}),
|
|
69
|
+
header: adaptTableCellStyle((_e = style.table) == null ? void 0 : _e.header),
|
|
70
|
+
cell: adaptTableCellStyle((_f = style.table) == null ? void 0 : _f.cell),
|
|
71
|
+
border: adaptTableBorderStyle((_g = style.table) == null ? void 0 : _g.border)
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
var toPixels = (value) => value === void 0 ? void 0 : `${value}px`;
|
|
75
|
+
var toPadding = (value) => {
|
|
76
|
+
if (value === void 0)
|
|
77
|
+
return void 0;
|
|
78
|
+
if (typeof value === "number")
|
|
79
|
+
return toPixels(value);
|
|
80
|
+
return value.map(toPixels).join(" ");
|
|
81
|
+
};
|
|
82
|
+
var compactStyle = (style) => Object.fromEntries(
|
|
83
|
+
Object.entries(style).filter((entry) => !!entry[1])
|
|
84
|
+
);
|
|
85
|
+
var adaptTableCellStyle = (style) => {
|
|
86
|
+
var _a;
|
|
87
|
+
return compactStyle({
|
|
88
|
+
color: style == null ? void 0 : style.fill,
|
|
89
|
+
backgroundColor: style == null ? void 0 : style.backgroundColor,
|
|
90
|
+
padding: toPadding(style == null ? void 0 : style.padding),
|
|
91
|
+
fontFamily: style == null ? void 0 : style.fontFamily,
|
|
92
|
+
fontSize: toPixels(style == null ? void 0 : style.fontSize),
|
|
93
|
+
fontWeight: (_a = style == null ? void 0 : style.fontWeight) == null ? void 0 : _a.toString(),
|
|
94
|
+
fontStyle: style == null ? void 0 : style.fontStyle,
|
|
95
|
+
lineHeight: toPixels(style == null ? void 0 : style.lineHeight)
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
var adaptTableBorderStyle = (style) => {
|
|
99
|
+
if (!style)
|
|
100
|
+
return { table: {}, cell: {} };
|
|
101
|
+
const width = toPixels(style.width ?? 1);
|
|
102
|
+
const lineStyle = style.style ?? "solid";
|
|
103
|
+
const color = style.color ?? "currentColor";
|
|
104
|
+
return {
|
|
105
|
+
table: compactStyle({
|
|
106
|
+
borderColor: color,
|
|
107
|
+
borderWidth: width,
|
|
108
|
+
borderStyle: lineStyle,
|
|
109
|
+
borderRadius: toPixels(style.radius)
|
|
110
|
+
}),
|
|
111
|
+
cell: compactStyle({
|
|
112
|
+
borderBottomColor: color,
|
|
113
|
+
borderBottomWidth: width,
|
|
114
|
+
borderBottomStyle: lineStyle
|
|
115
|
+
})
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
119
|
+
0 && (module.exports = {
|
|
120
|
+
getThemeObject
|
|
121
|
+
});
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { ThemeSpec } from './theme';
|
|
2
|
+
export type { ChartType, ThemeSpec, ThemeStyle, ThemeTokens } from './theme';
|
|
3
|
+
/** Built-in visualization themes supported by GPT-Vis. */
|
|
4
|
+
export type VisualizationTheme = 'default' | 'light' | 'dark' | 'academy' | ThemeSpec;
|
|
5
|
+
/** Common construction options shared by every visualization. */
|
|
6
6
|
export interface VisualizationOptions {
|
|
7
7
|
container: string | HTMLElement;
|
|
8
8
|
width?: number;
|
|
9
9
|
height?: number;
|
|
10
|
+
/** A built-in theme name or reusable ThemeSpec. Defaults to `default`. */
|
|
10
11
|
theme?: VisualizationTheme;
|
|
12
|
+
/** Whether to render the outer wrapper. Defaults to `false`. */
|
|
11
13
|
wrapper?: boolean;
|
|
14
|
+
/** Locale used by user-facing labels and number formatting. */
|
|
12
15
|
locale?: string;
|
|
13
16
|
}
|
|
14
17
|
/**
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
export type ChartType = 'area' | 'bar' | 'boxplot' | 'column' | 'dual-axes' | 'fishbone-diagram' | 'flow-diagram' | 'funnel' | 'histogram' | 'indented-tree' | 'line' | 'liquid' | 'mindmap' | 'network-graph' | 'organization-chart' | 'pie' | 'radar' | 'sankey' | 'scatter' | 'summary' | 'table' | 'treemap' | 'venn' | 'violin' | 'waterfall' | 'word-cloud';
|
|
2
|
+
/** Reusable visual theme. Local chart config takes precedence over this spec. */
|
|
3
|
+
export interface ThemeSpec {
|
|
4
|
+
/** Stable identifier; does not register a theme name. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Human-readable theme name. */
|
|
7
|
+
label: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
baseTheme?: string;
|
|
10
|
+
tokens?: ThemeTokens;
|
|
11
|
+
/** Shared visual overrides, applied after token expansion. */
|
|
12
|
+
style?: ThemeStyle;
|
|
13
|
+
/** Additional visual overrides for individual chart types. */
|
|
14
|
+
charts?: Partial<Record<ChartType, {
|
|
15
|
+
style?: ThemeStyle;
|
|
16
|
+
}>>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Visual style namespaces. Each adapter consumes the supported appearance fields;
|
|
20
|
+
* data, layout and behavior remain part of the chart configuration.
|
|
21
|
+
*/
|
|
22
|
+
export interface ThemeStyle {
|
|
23
|
+
backgroundColor?: string;
|
|
24
|
+
palette?: string[];
|
|
25
|
+
title?: Record<string, unknown>;
|
|
26
|
+
axis?: Record<string, unknown>;
|
|
27
|
+
legend?: Record<string, unknown>;
|
|
28
|
+
label?: Record<string, unknown>;
|
|
29
|
+
mark?: {
|
|
30
|
+
line?: Record<string, unknown>;
|
|
31
|
+
area?: Record<string, unknown>;
|
|
32
|
+
point?: Record<string, unknown>;
|
|
33
|
+
interval?: Record<string, unknown>;
|
|
34
|
+
box?: Record<string, unknown>;
|
|
35
|
+
connector?: Record<string, unknown>;
|
|
36
|
+
path?: Record<string, unknown>;
|
|
37
|
+
density?: Record<string, unknown>;
|
|
38
|
+
link?: Record<string, unknown>;
|
|
39
|
+
liquid?: Record<string, unknown>;
|
|
40
|
+
treemap?: Record<string, unknown>;
|
|
41
|
+
sankey?: Record<string, unknown>;
|
|
42
|
+
wordCloud?: Record<string, unknown>;
|
|
43
|
+
};
|
|
44
|
+
node?: Record<string, unknown>;
|
|
45
|
+
edge?: Record<string, unknown>;
|
|
46
|
+
table?: {
|
|
47
|
+
header?: Record<string, unknown>;
|
|
48
|
+
cell?: Record<string, unknown>;
|
|
49
|
+
border?: Record<string, unknown>;
|
|
50
|
+
};
|
|
51
|
+
summary?: Record<string, unknown>;
|
|
52
|
+
/** Fishbone drawing texture. */
|
|
53
|
+
texture?: 'rough' | 'default';
|
|
54
|
+
/** @deprecated Line, Area and Radar: use `mark.line.lineWidth`. */
|
|
55
|
+
lineWidth?: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* High-frequency seed tokens for authoring a GPT-Vis theme.
|
|
59
|
+
*
|
|
60
|
+
* Names reuse G2, G6 and T8 terminology where it is stable and semantic.
|
|
61
|
+
* Renderer adapters expand these seeds into concrete component and mark styles.
|
|
62
|
+
*/
|
|
63
|
+
export interface ThemeTokens {
|
|
64
|
+
/** Primary series or emphasis color. Matches G2's seed token name. */
|
|
65
|
+
colorDefault?: string;
|
|
66
|
+
/** Canvas background. Matches G2's seed token name. */
|
|
67
|
+
colorBackground?: string;
|
|
68
|
+
/** Table/Liquid surfaces and existing tooltip backgrounds. */
|
|
69
|
+
colorSurface?: string;
|
|
70
|
+
/** Primary text color across G2 components, G6 labels, Table and T8. */
|
|
71
|
+
colorText?: string;
|
|
72
|
+
/** Secondary text used by subtitles, axes and supporting copy. */
|
|
73
|
+
colorTextSecondary?: string;
|
|
74
|
+
/** Text displayed on a contrasting filled surface. */
|
|
75
|
+
colorTextInverse?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Base structural stroke color. The resolver derives axes, grids, borders,
|
|
78
|
+
* nodes and edges from this value. The name matches G2's seed token.
|
|
79
|
+
*/
|
|
80
|
+
colorStroke?: string;
|
|
81
|
+
/** Positive semantic color. Matches T8's seed token name. */
|
|
82
|
+
colorPositive?: string;
|
|
83
|
+
/** Negative semantic color. Matches T8's seed token name. */
|
|
84
|
+
colorNegative?: string;
|
|
85
|
+
/** Neutral semantic color for unchanged or unknown status. */
|
|
86
|
+
colorNeutral?: string;
|
|
87
|
+
/** Primary categorical palette. Matches G2's theme field and seed token name. */
|
|
88
|
+
category10?: string[];
|
|
89
|
+
/** Extended categorical palette. Matches G2's theme field and seed token name. */
|
|
90
|
+
category20?: string[];
|
|
91
|
+
/** Base font family. Matches T8 and renderer text style names. */
|
|
92
|
+
fontFamily?: string;
|
|
93
|
+
/** Base font size in pixels. Matches T8 and renderer text style names. */
|
|
94
|
+
fontSize?: number;
|
|
95
|
+
/** Base font weight. Matches renderer text style names. */
|
|
96
|
+
fontWeight?: number | 'normal' | 'bold';
|
|
97
|
+
/** Line height in pixels for G2 labels/legend text, Summary and existing tooltips. */
|
|
98
|
+
lineHeight?: number;
|
|
99
|
+
/** Compact gap in pixels: axis labels, legend spacing and tooltip vertical padding. */
|
|
100
|
+
spacingSmall?: number;
|
|
101
|
+
/** Roomier gap in pixels: title/subtitle, axes, legends, table cells and tooltip horizontal padding. */
|
|
102
|
+
spacingMedium?: number;
|
|
103
|
+
/** Default mark and structural line width. */
|
|
104
|
+
lineWidth?: number;
|
|
105
|
+
/** Default corner radius for intervals, nodes and surfaces. */
|
|
106
|
+
radius?: number;
|
|
107
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/types/theme.ts
|
|
16
|
+
var theme_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(theme_exports);
|