@antv/gpt-vis 1.0.2 → 1.3.1

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 (172) hide show
  1. package/README.md +53 -7
  2. package/README.zh-CN.md +32 -9
  3. package/dist/cjs/index.d.ts +1 -1
  4. package/dist/cjs/theme/g2.d.ts +9 -0
  5. package/dist/cjs/theme/g2.js +605 -0
  6. package/dist/cjs/theme/g6.d.ts +28 -0
  7. package/dist/cjs/theme/g6.js +124 -0
  8. package/dist/cjs/theme/merge.d.ts +2 -0
  9. package/dist/cjs/theme/merge.js +49 -0
  10. package/dist/cjs/theme/presets.d.ts +5 -0
  11. package/dist/cjs/theme/presets.js +663 -0
  12. package/dist/cjs/theme/resolve.d.ts +7 -0
  13. package/dist/cjs/theme/resolve.js +59 -0
  14. package/dist/cjs/theme/shared.d.ts +7 -0
  15. package/dist/cjs/theme/shared.js +61 -0
  16. package/dist/cjs/theme/summary.d.ts +11 -0
  17. package/dist/cjs/theme/summary.js +61 -0
  18. package/dist/cjs/theme/table.d.ts +13 -0
  19. package/dist/cjs/theme/table.js +121 -0
  20. package/dist/cjs/types/index.d.ts +8 -5
  21. package/dist/cjs/types/theme.d.ts +109 -0
  22. package/dist/cjs/types/theme.js +17 -0
  23. package/dist/cjs/util/animation.js +6 -1
  24. package/dist/cjs/util/components.d.ts +20 -0
  25. package/dist/cjs/util/components.js +40 -0
  26. package/dist/cjs/util/crosshair-axis-labels.d.ts +1 -2
  27. package/dist/cjs/util/crosshair-axis-labels.js +17 -0
  28. package/dist/cjs/util/index.d.ts +0 -2
  29. package/dist/cjs/util/index.js +1 -5
  30. package/dist/cjs/util/interaction.d.ts +4 -3
  31. package/dist/cjs/util/interaction.js +14 -1
  32. package/dist/cjs/util/tokens.d.ts +4 -3
  33. package/dist/cjs/util/tokens.js +9 -6
  34. package/dist/cjs/vis/area/index.d.ts +3 -6
  35. package/dist/cjs/vis/area/index.js +43 -30
  36. package/dist/cjs/vis/bar/index.d.ts +5 -5
  37. package/dist/cjs/vis/bar/index.js +34 -20
  38. package/dist/cjs/vis/boxplot/index.d.ts +4 -5
  39. package/dist/cjs/vis/boxplot/index.js +36 -23
  40. package/dist/cjs/vis/column/index.d.ts +5 -5
  41. package/dist/cjs/vis/column/index.js +38 -26
  42. package/dist/cjs/vis/dual-axes/index.d.ts +3 -4
  43. package/dist/cjs/vis/dual-axes/index.js +70 -52
  44. package/dist/cjs/vis/fishbone-diagram/index.d.ts +4 -10
  45. package/dist/cjs/vis/fishbone-diagram/index.js +43 -28
  46. package/dist/cjs/vis/flow-diagram/index.d.ts +4 -6
  47. package/dist/cjs/vis/flow-diagram/index.js +21 -22
  48. package/dist/cjs/vis/funnel/index.d.ts +3 -5
  49. package/dist/cjs/vis/funnel/index.js +63 -42
  50. package/dist/cjs/vis/histogram/index.d.ts +4 -6
  51. package/dist/cjs/vis/histogram/index.js +17 -19
  52. package/dist/cjs/vis/indented-tree/index.d.ts +4 -6
  53. package/dist/cjs/vis/indented-tree/index.js +58 -34
  54. package/dist/cjs/vis/line/index.d.ts +3 -6
  55. package/dist/cjs/vis/line/index.js +43 -22
  56. package/dist/cjs/vis/liquid/index.d.ts +4 -6
  57. package/dist/cjs/vis/liquid/index.js +22 -17
  58. package/dist/cjs/vis/mindmap/index.d.ts +4 -6
  59. package/dist/cjs/vis/mindmap/index.js +43 -25
  60. package/dist/cjs/vis/network-graph/index.d.ts +4 -6
  61. package/dist/cjs/vis/network-graph/index.js +26 -20
  62. package/dist/cjs/vis/organization-chart/index.d.ts +4 -6
  63. package/dist/cjs/vis/organization-chart/index.js +39 -33
  64. package/dist/cjs/vis/pie/index.d.ts +3 -5
  65. package/dist/cjs/vis/pie/index.js +45 -26
  66. package/dist/cjs/vis/radar/index.d.ts +3 -6
  67. package/dist/cjs/vis/radar/index.js +32 -24
  68. package/dist/cjs/vis/sankey/index.d.ts +4 -6
  69. package/dist/cjs/vis/sankey/index.js +17 -7
  70. package/dist/cjs/vis/scatter/index.d.ts +3 -5
  71. package/dist/cjs/vis/scatter/index.js +32 -19
  72. package/dist/cjs/vis/summary/index.js +5 -6
  73. package/dist/cjs/vis/table/index.d.ts +4 -2
  74. package/dist/cjs/vis/table/index.js +46 -4
  75. package/dist/cjs/vis/treemap/index.d.ts +4 -6
  76. package/dist/cjs/vis/treemap/index.js +11 -7
  77. package/dist/cjs/vis/venn/index.d.ts +4 -6
  78. package/dist/cjs/vis/venn/index.js +18 -16
  79. package/dist/cjs/vis/violin/index.d.ts +4 -5
  80. package/dist/cjs/vis/violin/index.js +35 -27
  81. package/dist/cjs/vis/waterfall/index.d.ts +4 -4
  82. package/dist/cjs/vis/waterfall/index.js +48 -39
  83. package/dist/cjs/vis/word-cloud/index.d.ts +3 -5
  84. package/dist/cjs/vis/word-cloud/index.js +18 -12
  85. package/dist/esm/index.d.ts +1 -1
  86. package/dist/esm/theme/g2.d.ts +9 -0
  87. package/dist/esm/theme/g2.js +504 -0
  88. package/dist/esm/theme/g6.d.ts +28 -0
  89. package/dist/esm/theme/g6.js +84 -0
  90. package/dist/esm/theme/merge.d.ts +2 -0
  91. package/dist/esm/theme/merge.js +36 -0
  92. package/dist/esm/theme/presets.d.ts +5 -0
  93. package/dist/esm/theme/presets.js +1070 -0
  94. package/dist/esm/theme/resolve.d.ts +7 -0
  95. package/dist/esm/theme/resolve.js +31 -0
  96. package/dist/esm/theme/shared.d.ts +7 -0
  97. package/dist/esm/theme/shared.js +21 -0
  98. package/dist/esm/theme/summary.d.ts +11 -0
  99. package/dist/esm/theme/summary.js +45 -0
  100. package/dist/esm/theme/table.d.ts +13 -0
  101. package/dist/esm/theme/table.js +112 -0
  102. package/dist/esm/types/index.d.ts +8 -5
  103. package/dist/esm/types/theme.d.ts +109 -0
  104. package/dist/esm/types/theme.js +1 -0
  105. package/dist/esm/util/animation.js +12 -2
  106. package/dist/esm/util/components.d.ts +20 -0
  107. package/dist/esm/util/components.js +57 -1
  108. package/dist/esm/util/crosshair-axis-labels.d.ts +1 -2
  109. package/dist/esm/util/crosshair-axis-labels.js +18 -0
  110. package/dist/esm/util/index.d.ts +0 -2
  111. package/dist/esm/util/index.js +1 -3
  112. package/dist/esm/util/interaction.d.ts +4 -3
  113. package/dist/esm/util/interaction.js +18 -1
  114. package/dist/esm/util/tokens.d.ts +4 -3
  115. package/dist/esm/util/tokens.js +9 -6
  116. package/dist/esm/vis/area/index.d.ts +3 -6
  117. package/dist/esm/vis/area/index.js +53 -45
  118. package/dist/esm/vis/bar/index.d.ts +5 -5
  119. package/dist/esm/vis/bar/index.js +38 -27
  120. package/dist/esm/vis/boxplot/index.d.ts +4 -5
  121. package/dist/esm/vis/boxplot/index.js +47 -29
  122. package/dist/esm/vis/column/index.d.ts +5 -5
  123. package/dist/esm/vis/column/index.js +46 -36
  124. package/dist/esm/vis/dual-axes/index.d.ts +3 -4
  125. package/dist/esm/vis/dual-axes/index.js +68 -58
  126. package/dist/esm/vis/fishbone-diagram/index.d.ts +4 -10
  127. package/dist/esm/vis/fishbone-diagram/index.js +52 -27
  128. package/dist/esm/vis/flow-diagram/index.d.ts +4 -6
  129. package/dist/esm/vis/flow-diagram/index.js +28 -23
  130. package/dist/esm/vis/funnel/index.d.ts +3 -5
  131. package/dist/esm/vis/funnel/index.js +63 -54
  132. package/dist/esm/vis/histogram/index.d.ts +4 -6
  133. package/dist/esm/vis/histogram/index.js +28 -21
  134. package/dist/esm/vis/indented-tree/index.d.ts +4 -6
  135. package/dist/esm/vis/indented-tree/index.js +59 -52
  136. package/dist/esm/vis/line/index.d.ts +3 -6
  137. package/dist/esm/vis/line/index.js +44 -32
  138. package/dist/esm/vis/liquid/index.d.ts +4 -6
  139. package/dist/esm/vis/liquid/index.js +28 -21
  140. package/dist/esm/vis/mindmap/index.d.ts +4 -6
  141. package/dist/esm/vis/mindmap/index.js +32 -28
  142. package/dist/esm/vis/network-graph/index.d.ts +4 -6
  143. package/dist/esm/vis/network-graph/index.js +37 -22
  144. package/dist/esm/vis/organization-chart/index.d.ts +4 -6
  145. package/dist/esm/vis/organization-chart/index.js +47 -36
  146. package/dist/esm/vis/pie/index.d.ts +3 -5
  147. package/dist/esm/vis/pie/index.js +42 -26
  148. package/dist/esm/vis/radar/index.d.ts +3 -6
  149. package/dist/esm/vis/radar/index.js +28 -20
  150. package/dist/esm/vis/sankey/index.d.ts +4 -6
  151. package/dist/esm/vis/sankey/index.js +20 -10
  152. package/dist/esm/vis/scatter/index.d.ts +3 -5
  153. package/dist/esm/vis/scatter/index.js +32 -21
  154. package/dist/esm/vis/summary/index.js +5 -7
  155. package/dist/esm/vis/table/index.d.ts +4 -2
  156. package/dist/esm/vis/table/index.js +41 -4
  157. package/dist/esm/vis/treemap/index.d.ts +4 -6
  158. package/dist/esm/vis/treemap/index.js +16 -11
  159. package/dist/esm/vis/venn/index.d.ts +4 -6
  160. package/dist/esm/vis/venn/index.js +24 -16
  161. package/dist/esm/vis/violin/index.d.ts +4 -5
  162. package/dist/esm/vis/violin/index.js +45 -37
  163. package/dist/esm/vis/waterfall/index.d.ts +4 -4
  164. package/dist/esm/vis/waterfall/index.js +46 -36
  165. package/dist/esm/vis/word-cloud/index.d.ts +3 -5
  166. package/dist/esm/vis/word-cloud/index.js +24 -17
  167. package/dist/umd/index.min.js +1 -1
  168. package/package.json +1 -1
  169. package/dist/cjs/util/theme.d.ts +0 -20
  170. package/dist/cjs/util/theme.js +0 -372
  171. package/dist/esm/util/theme.d.ts +0 -20
  172. package/dist/esm/util/theme.js +0 -326
@@ -0,0 +1,663 @@
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/presets.ts
20
+ var presets_exports = {};
21
+ __export(presets_exports, {
22
+ THEME_PRESETS: () => THEME_PRESETS
23
+ });
24
+ module.exports = __toCommonJS(presets_exports);
25
+ function createPreset(id, label, description, colors, options = {}) {
26
+ const { dark = false, serif = false, radius = 6, product = false } = options;
27
+ const fontFamily = serif ? 'Georgia, "Times New Roman", serif' : product ? '-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif' : "Alibaba PuHuiTi, sans-serif";
28
+ const inverse = dark ? "#101827" : product ? colors.text : "#ffffff";
29
+ return {
30
+ id,
31
+ label,
32
+ description,
33
+ baseTheme: dark ? "dark" : serif ? "academy" : "default",
34
+ tokens: {
35
+ colorDefault: colors.palette[0],
36
+ colorBackground: colors.background,
37
+ colorSurface: colors.surface,
38
+ colorText: colors.text,
39
+ colorTextSecondary: colors.secondary,
40
+ colorTextInverse: inverse,
41
+ colorStroke: colors.stroke,
42
+ colorPositive: colors.positive,
43
+ colorNegative: colors.negative,
44
+ colorNeutral: colors.secondary,
45
+ category10: colors.palette,
46
+ fontFamily,
47
+ fontSize: 11,
48
+ fontWeight: 400,
49
+ lineHeight: 22,
50
+ spacingSmall: 6,
51
+ spacingMedium: 12,
52
+ lineWidth: serif ? 1 : 2,
53
+ radius
54
+ },
55
+ style: {
56
+ title: {
57
+ titleFontSize: 16,
58
+ titleFontWeight: serif ? 500 : product ? 600 : 700,
59
+ spacing: 5
60
+ },
61
+ axis: { line: serif, tick: serif, gridLineWidth: 0.5, gridLineDash: serif ? [2, 3] : [0, 0] },
62
+ mark: {
63
+ line: { lineCap: serif ? "butt" : "round" },
64
+ area: { shape: serif ? "area" : "smooth", fillOpacity: serif ? 0.1 : product ? 0.12 : 0.2 },
65
+ point: {
66
+ size: serif ? 3 : 4,
67
+ shape: serif ? "hollow" : "point",
68
+ stroke: colors.background
69
+ },
70
+ interval: { stroke: colors.background },
71
+ treemap: { stroke: colors.background },
72
+ liquid: {
73
+ contentFontSize: 28
74
+ },
75
+ sankey: { nodeStroke: colors.background, nodeLineWidth: 1, linkFillOpacity: 0.25 }
76
+ },
77
+ table: {
78
+ header: {
79
+ backgroundColor: product ? colors.surface : colors.palette[0],
80
+ fill: product ? colors.text : inverse,
81
+ fontWeight: 700
82
+ }
83
+ },
84
+ summary: { fontSize: 15, lineHeight: 27 }
85
+ },
86
+ charts: {
87
+ line: { style: { mark: { line: { shape: serif ? "line" : "smooth" } } } },
88
+ area: { style: { mark: { line: { shape: serif ? "line" : "smooth" } } } },
89
+ pie: { style: { mark: { interval: { stroke: colors.background, lineWidth: 3 } } } },
90
+ radar: { style: { mark: { line: { shape: "line" } } } }
91
+ }
92
+ };
93
+ }
94
+ var THEME_PRESETS = [
95
+ createPreset("gpt-vis", "GPT-Vis", "Clear, expressive, and ready for your next idea.", {
96
+ background: "#ffffff",
97
+ surface: "#f5f3ff",
98
+ text: "#23272f",
99
+ secondary: "#626478",
100
+ stroke: "#d9d7e6",
101
+ palette: [
102
+ "#7047eb",
103
+ "#3b9bb7",
104
+ "#f0af54",
105
+ "#e87787",
106
+ "#6baa8f",
107
+ "#a68ae0",
108
+ "#cf8253",
109
+ "#6379b9",
110
+ "#a99b53",
111
+ "#8b94a5"
112
+ ],
113
+ positive: "#278160",
114
+ negative: "#c64d64"
115
+ }),
116
+ createPreset(
117
+ "midnight",
118
+ "Midnight",
119
+ "Luminous data. A quieter kind of dark.",
120
+ {
121
+ background: "#141b2b",
122
+ surface: "#1d283b",
123
+ text: "#edf2fa",
124
+ secondary: "#a8b8d0",
125
+ stroke: "#3b4a65",
126
+ palette: [
127
+ "#a99aff",
128
+ "#6fd3de",
129
+ "#edbd76",
130
+ "#ee93ae",
131
+ "#8bd3a8",
132
+ "#77a8ef",
133
+ "#d4a2e8",
134
+ "#c7d989",
135
+ "#f0a888",
136
+ "#a6b9d0"
137
+ ],
138
+ positive: "#8bd3a8",
139
+ negative: "#ee93ae"
140
+ },
141
+ { dark: true }
142
+ ),
143
+ createPreset(
144
+ "paper",
145
+ "Paper",
146
+ "Thoughtful typography for considered research.",
147
+ {
148
+ background: "#fcfbf8",
149
+ surface: "#f2efe8",
150
+ text: "#302f2b",
151
+ secondary: "#706b60",
152
+ stroke: "#d8d2c6",
153
+ palette: [
154
+ "#486b86",
155
+ "#a45e4a",
156
+ "#819272",
157
+ "#b89650",
158
+ "#867394",
159
+ "#5f9697",
160
+ "#c08773",
161
+ "#8b929c",
162
+ "#aa8c7b",
163
+ "#71875e"
164
+ ],
165
+ positive: "#547a4d",
166
+ negative: "#ad4d47"
167
+ },
168
+ { serif: true, radius: 0 }
169
+ ),
170
+ createPreset(
171
+ "product",
172
+ "Product",
173
+ "Fresh sky blue, soft surfaces, and a modern product feel.",
174
+ {
175
+ background: "#f8fcff",
176
+ surface: "#e8f4fd",
177
+ text: "#17324d",
178
+ secondary: "#526e85",
179
+ stroke: "#c8dfef",
180
+ palette: [
181
+ "#38bdf8",
182
+ "#3b82f6",
183
+ "#2dd4bf",
184
+ "#818cf8",
185
+ "#fbbf24",
186
+ "#f472b6",
187
+ "#4ade80",
188
+ "#22d3ee",
189
+ "#a5b4fc",
190
+ "#94a3b8"
191
+ ],
192
+ positive: "#15803d",
193
+ negative: "#be123c"
194
+ },
195
+ { product: true, radius: 12 }
196
+ ),
197
+ {
198
+ id: "neon-circuit",
199
+ label: "Neon Circuit",
200
+ description: "Midnight circuitry, electric cyan, hot magenta, and precise monospace type.",
201
+ baseTheme: "dark",
202
+ tokens: {
203
+ colorDefault: "#22d3ee",
204
+ colorBackground: "#080d1a",
205
+ colorSurface: "#111c30",
206
+ colorText: "#e8f6ff",
207
+ colorTextSecondary: "#a4b8d0",
208
+ colorTextInverse: "#080d1a",
209
+ colorStroke: "#415977",
210
+ colorPositive: "#4ade80",
211
+ colorNegative: "#fb7185",
212
+ colorNeutral: "#a4b8d0",
213
+ category10: [
214
+ "#22d3ee",
215
+ "#f472b6",
216
+ "#a3e635",
217
+ "#a78bfa",
218
+ "#facc15",
219
+ "#60a5fa",
220
+ "#fb923c",
221
+ "#2dd4bf",
222
+ "#fb7185",
223
+ "#c4b5fd"
224
+ ],
225
+ category20: [
226
+ "#22d3ee",
227
+ "#f472b6",
228
+ "#a3e635",
229
+ "#a78bfa",
230
+ "#facc15",
231
+ "#60a5fa",
232
+ "#fb923c",
233
+ "#2dd4bf",
234
+ "#fb7185",
235
+ "#c4b5fd",
236
+ "#67e8f9",
237
+ "#f9a8d4",
238
+ "#bef264",
239
+ "#c084fc",
240
+ "#fde68a",
241
+ "#93c5fd",
242
+ "#fdba74",
243
+ "#5eead4",
244
+ "#fda4af",
245
+ "#e9d5ff"
246
+ ],
247
+ fontFamily: '"SFMono-Regular", Consolas, "Liberation Mono", monospace',
248
+ fontSize: 11,
249
+ fontWeight: 500,
250
+ lineHeight: 20,
251
+ spacingSmall: 6,
252
+ spacingMedium: 12,
253
+ lineWidth: 2,
254
+ radius: 2
255
+ },
256
+ style: {
257
+ title: { titleFontWeight: 700, spacing: 6 },
258
+ axis: { line: true, tick: false, gridLineWidth: 0.5, gridLineDash: [2, 4] },
259
+ mark: {
260
+ line: { shape: "hv", lineCap: "square" },
261
+ area: { shape: "hv", fillOpacity: 0.22 },
262
+ point: { shape: "diamond", size: 4, stroke: "#080d1a" },
263
+ interval: { stroke: "#080d1a" },
264
+ treemap: { stroke: "#080d1a" },
265
+ liquid: { shape: "rect", contentFontSize: 30, contentFontWeight: 700 },
266
+ sankey: { linkFillOpacity: 0.35, nodeStroke: "#080d1a", linkLineWidth: 0 }
267
+ },
268
+ node: { fillOpacity: 0.16, stroke: "#22d3ee", labelFill: "#e8f6ff" },
269
+ edge: { stroke: "#7898bc", lineDash: [4, 3] },
270
+ table: { header: { fill: "#22d3ee", backgroundColor: "#172640", fontWeight: 700 } },
271
+ summary: {
272
+ fontSize: 14,
273
+ lineHeight: 25,
274
+ colorHeadingBase: "#22d3ee",
275
+ colorMetricValue: "#f472b6"
276
+ }
277
+ },
278
+ charts: {
279
+ area: { style: { mark: { line: { shape: "hv" } } } },
280
+ radar: { style: { mark: { line: { shape: "line" } } } },
281
+ pie: { style: { mark: { interval: { radius: 0, lineWidth: 3 } } } },
282
+ "network-graph": { style: { node: { type: "hexagon" }, edge: { type: "line" } } }
283
+ }
284
+ },
285
+ {
286
+ id: "terra-print",
287
+ label: "Terra Print",
288
+ description: "Warm paper, terracotta ink, serif headlines, and crisp print-like geometry.",
289
+ baseTheme: "academy",
290
+ tokens: {
291
+ colorDefault: "#a33b28",
292
+ colorBackground: "#fff7e8",
293
+ colorSurface: "#f3e5cf",
294
+ colorText: "#36291f",
295
+ colorTextSecondary: "#75624f",
296
+ colorTextInverse: "#fff7e8",
297
+ colorStroke: "#c9b79b",
298
+ colorPositive: "#466343",
299
+ colorNegative: "#a33b28",
300
+ colorNeutral: "#75624f",
301
+ category10: [
302
+ "#a33b28",
303
+ "#426459",
304
+ "#8e681e",
305
+ "#695075",
306
+ "#335975",
307
+ "#a54d60",
308
+ "#6b7040",
309
+ "#805039",
310
+ "#4c6675",
311
+ "#775641"
312
+ ],
313
+ fontFamily: 'Georgia, "Times New Roman", serif',
314
+ fontSize: 12,
315
+ fontWeight: 400,
316
+ lineHeight: 23,
317
+ spacingSmall: 5,
318
+ spacingMedium: 12,
319
+ lineWidth: 1,
320
+ radius: 0
321
+ },
322
+ style: {
323
+ title: { titleFontSize: 19, titleFontWeight: 700, titleFill: "#a33b28", spacing: 7 },
324
+ axis: { line: true, tick: true, gridLineDash: [2, 4], gridLineWidth: 0.5 },
325
+ mark: {
326
+ line: { lineWidth: 2, lineCap: "butt" },
327
+ area: { shape: "area", fillOpacity: 0.13 },
328
+ point: { shape: "hollowCircle", size: 4, lineWidth: 1.5 },
329
+ interval: { stroke: "#fff7e8", lineWidth: 1 },
330
+ treemap: { stroke: "#fff7e8", lineWidth: 2 },
331
+ liquid: { shape: "rect", contentFontSize: 30, contentFontWeight: 700 },
332
+ sankey: { nodeStroke: "#fff7e8", linkFillOpacity: 0.25 }
333
+ },
334
+ node: { fillOpacity: 0.18, stroke: "#a33b28", labelFill: "#36291f" },
335
+ edge: { stroke: "#937b62", lineWidth: 1 },
336
+ table: {
337
+ header: { backgroundColor: "#a33b28", fill: "#fff7e8", fontWeight: 700 },
338
+ cell: { backgroundColor: "#fff7e8", padding: [10, 12] },
339
+ border: { color: "#b7a081", width: 1, radius: 0 }
340
+ },
341
+ summary: { fontSize: 15, lineHeight: 28, colorHeadingBase: "#a33b28" }
342
+ },
343
+ charts: {
344
+ line: { style: { mark: { line: { shape: "line" } } } },
345
+ area: { style: { mark: { line: { shape: "line" } } } },
346
+ pie: { style: { mark: { interval: { lineWidth: 3 } } } },
347
+ "network-graph": { style: { node: { type: "rect" }, edge: { type: "line" } } },
348
+ "fishbone-diagram": { style: { texture: "rough" } }
349
+ }
350
+ },
351
+ {
352
+ id: "mono-signal",
353
+ label: "Mono Signal",
354
+ description: "Black ink, white space, monospaced detail, and precise technical outlines.",
355
+ baseTheme: "default",
356
+ tokens: {
357
+ colorDefault: "#18181b",
358
+ colorBackground: "#ffffff",
359
+ colorSurface: "#f4f4f5",
360
+ colorText: "#18181b",
361
+ colorTextSecondary: "#62626a",
362
+ colorTextInverse: "#ffffff",
363
+ colorStroke: "#b4b4bc",
364
+ colorPositive: "#28704a",
365
+ colorNegative: "#b33737",
366
+ colorNeutral: "#62626a",
367
+ category10: [
368
+ "#18181b",
369
+ "#64748b",
370
+ "#404040",
371
+ "#737373",
372
+ "#334155",
373
+ "#52525b",
374
+ "#475569",
375
+ "#71717a",
376
+ "#3f3f46",
377
+ "#78716c"
378
+ ],
379
+ fontFamily: '"SFMono-Regular", Consolas, "Liberation Mono", monospace',
380
+ fontSize: 11,
381
+ fontWeight: 400,
382
+ lineHeight: 21,
383
+ spacingSmall: 4,
384
+ spacingMedium: 10,
385
+ lineWidth: 1,
386
+ radius: 0
387
+ },
388
+ style: {
389
+ title: { titleFontSize: 16, titleFontWeight: 700, spacing: 8 },
390
+ axis: { line: true, tick: true, grid: false, tickLength: 3 },
391
+ legend: { itemMarkerSize: 7, itemLabelFontSize: 10 },
392
+ mark: {
393
+ line: { shape: "hv", lineWidth: 1.5, lineCap: "square" },
394
+ area: { shape: "hv", fillOpacity: 0.12 },
395
+ point: { shape: "hollowSquare", size: 4, lineWidth: 1.5 },
396
+ interval: { stroke: "#ffffff", lineWidth: 1 },
397
+ treemap: { stroke: "#ffffff", lineWidth: 2 },
398
+ liquid: { shape: "rect", contentFontSize: 28 },
399
+ sankey: { linkFillOpacity: 0.18, nodeStroke: "#ffffff" }
400
+ },
401
+ node: { fillOpacity: 0.12, stroke: "#18181b", lineWidth: 1.5 },
402
+ edge: { stroke: "#71717a", lineDash: [3, 3], lineWidth: 1 },
403
+ table: {
404
+ header: { backgroundColor: "#18181b", fill: "#ffffff", fontWeight: 700 },
405
+ cell: { backgroundColor: "#ffffff", padding: [9, 10] },
406
+ border: { color: "#18181b", width: 1, radius: 0 }
407
+ },
408
+ summary: { fontSize: 13, lineHeight: 25, colorHeadingBase: "#18181b" }
409
+ },
410
+ charts: {
411
+ area: { style: { mark: { line: { shape: "hv" } } } },
412
+ radar: { style: { mark: { line: { shape: "line" } } } },
413
+ pie: { style: { mark: { interval: { lineWidth: 3 } } } },
414
+ "network-graph": { style: { node: { type: "diamond" }, edge: { type: "line" } } }
415
+ }
416
+ },
417
+ {
418
+ id: "candy-pop",
419
+ label: "Candy Pop",
420
+ description: "Candy colors, bold outlines, rounded bars, and playful geometric details.",
421
+ baseTheme: "default",
422
+ tokens: {
423
+ colorDefault: "#f6a3cb",
424
+ colorBackground: "#fff9f1",
425
+ colorSurface: "#fff0db",
426
+ colorText: "#292440",
427
+ colorTextSecondary: "#706079",
428
+ colorTextInverse: "#292440",
429
+ colorStroke: "#b4a3b9",
430
+ colorPositive: "#28704a",
431
+ colorNegative: "#b33753",
432
+ colorNeutral: "#706079",
433
+ category10: [
434
+ "#f6a3cb",
435
+ "#8dc9f5",
436
+ "#f6d766",
437
+ "#a9deb2",
438
+ "#c3b0ed",
439
+ "#f5b58a",
440
+ "#86d8d1",
441
+ "#d5cc89",
442
+ "#b3c0f3",
443
+ "#e8b6db"
444
+ ],
445
+ fontFamily: '"Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif',
446
+ fontSize: 12,
447
+ fontWeight: 500,
448
+ lineHeight: 23,
449
+ spacingSmall: 6,
450
+ spacingMedium: 12,
451
+ lineWidth: 2,
452
+ radius: 14
453
+ },
454
+ style: {
455
+ title: { titleFontSize: 18, titleFontWeight: 800, spacing: 6 },
456
+ axis: { line: false, tick: false, gridLineDash: [2, 5], gridLineWidth: 0.75 },
457
+ mark: {
458
+ line: { shape: "smooth", lineWidth: 3, lineCap: "round" },
459
+ area: { shape: "smooth", fillOpacity: 0.35 },
460
+ point: { shape: "triangle", size: 5, stroke: "#292440", lineWidth: 1.5 },
461
+ interval: { stroke: "#292440", lineWidth: 1.5 },
462
+ treemap: { stroke: "#292440", lineWidth: 1.5, radius: 8 },
463
+ liquid: { shape: "circle", contentFill: "#292440", contentFontSize: 32 },
464
+ sankey: { nodeStroke: "#292440", nodeLineWidth: 1.5, linkFillOpacity: 0.45 }
465
+ },
466
+ node: { fillOpacity: 1, stroke: "#292440", labelFill: "#292440", lineWidth: 2 },
467
+ edge: { stroke: "#7c6d91", lineWidth: 2 },
468
+ table: {
469
+ header: { backgroundColor: "#f6a3cb", fill: "#292440", fontWeight: 700 },
470
+ cell: { backgroundColor: "#fff9f1", padding: [10, 12] },
471
+ border: { color: "#292440", width: 2, radius: 14 }
472
+ },
473
+ summary: {
474
+ fontSize: 15,
475
+ lineHeight: 28,
476
+ colorHeadingBase: "#292440",
477
+ colorMetricValue: "#87406e"
478
+ }
479
+ },
480
+ charts: {
481
+ area: { style: { mark: { line: { shape: "smooth" } } } },
482
+ radar: { style: { mark: { line: { shape: "line" } } } },
483
+ pie: { style: { mark: { interval: { radius: 5, lineWidth: 2 } } } },
484
+ "network-graph": { style: { node: { type: "hexagon" }, edge: { type: "quadratic" } } }
485
+ }
486
+ },
487
+ {
488
+ // Adapted from Flint Chart. Copyright (c) Microsoft Corporation. MIT License.
489
+ // See the license notice at the top of this file.
490
+ // Visual reference: https://github.com/microsoft/flint-chart/blob/main/packages/flint-js/src/core/theme/presets/pop.ts
491
+ // Adapted to GPT-Vis appearance fields, including relationship graphs, Table and Summary.
492
+ id: "pop",
493
+ label: "Pop",
494
+ description: "Warm white, vivid contrasting colors, yellow accents, heavy black outlines, and bold display type.",
495
+ baseTheme: "default",
496
+ tokens: {
497
+ colorDefault: "#f04493",
498
+ colorBackground: "#fffdf5",
499
+ colorSurface: "#fff5cf",
500
+ colorText: "#111111",
501
+ colorTextSecondary: "#5f0047",
502
+ colorTextInverse: "#fffdf5",
503
+ colorStroke: "#111111",
504
+ colorPositive: "#166534",
505
+ colorNegative: "#a90055",
506
+ colorNeutral: "#111111",
507
+ category10: ["#ff6aaf", "#42cbe8", "#ff9752", "#b49aee", "#78ce93", "#f4d449"],
508
+ fontFamily: '"Arial Black", "Helvetica Neue", Arial, sans-serif',
509
+ fontSize: 11,
510
+ fontWeight: 700,
511
+ lineHeight: 22,
512
+ spacingSmall: 7,
513
+ spacingMedium: 12,
514
+ lineWidth: 3,
515
+ radius: 0
516
+ },
517
+ style: {
518
+ title: {
519
+ titleFontSize: 21,
520
+ titleFontWeight: 900,
521
+ titleFill: "#111111",
522
+ spacing: 8
523
+ },
524
+ axis: {
525
+ line: true,
526
+ lineLineWidth: 3,
527
+ tick: false,
528
+ gridStroke: "#ddd7c9",
529
+ gridLineWidth: 0.5,
530
+ gridLineDash: [0, 0]
531
+ },
532
+ legend: { itemMarkerSize: 9, itemLabelFontWeight: 700 },
533
+ mark: {
534
+ line: { shape: "line", lineWidth: 6, lineCap: "square", lineJoin: "miter" },
535
+ area: { shape: "area", fillOpacity: 0.25 },
536
+ point: { shape: "point", size: 6, stroke: "#111111", lineWidth: 2 },
537
+ interval: { stroke: "#111111", lineWidth: 3, radius: 0 },
538
+ treemap: { stroke: "#111111", lineWidth: 3, radius: 0 },
539
+ liquid: {
540
+ shape: "rect",
541
+ contentFill: "#111111",
542
+ contentFontSize: 36,
543
+ contentFontWeight: 900
544
+ },
545
+ sankey: { linkFillOpacity: 0.75, nodeStroke: "#111111", nodeLineWidth: 3 }
546
+ },
547
+ node: { fillOpacity: 1, stroke: "#111111", labelFill: "#111111", lineWidth: 3 },
548
+ edge: { stroke: "#111111", lineWidth: 3 },
549
+ table: {
550
+ header: { backgroundColor: "#f4d449", fill: "#111111", fontWeight: 900 },
551
+ cell: { backgroundColor: "#fffdf5", padding: [10, 12] },
552
+ border: { color: "#111111", width: 3, radius: 0 }
553
+ },
554
+ summary: {
555
+ fontSize: 15,
556
+ lineHeight: 28,
557
+ colorHeadingBase: "#111111",
558
+ colorMetricValue: "#a90055"
559
+ }
560
+ },
561
+ charts: {
562
+ line: { style: { mark: { line: { shape: "line" } } } },
563
+ area: { style: { mark: { line: { shape: "line" } } } },
564
+ pie: { style: { mark: { interval: { radius: 0, stroke: "#111111", lineWidth: 3 } } } },
565
+ "network-graph": { style: { node: { type: "rect" }, edge: { type: "line" } } }
566
+ }
567
+ },
568
+ {
569
+ id: "bauhaus",
570
+ label: "Bauhaus",
571
+ description: "Bold primary colors, sharp geometry, black outlines, and confident sans-serif typography.",
572
+ baseTheme: "default",
573
+ tokens: {
574
+ colorDefault: "#2055c9",
575
+ colorBackground: "#ffffff",
576
+ colorSurface: "#f2f1ed",
577
+ colorText: "#191919",
578
+ colorTextSecondary: "#595954",
579
+ colorTextInverse: "#ffffff",
580
+ colorStroke: "#c9c9c2",
581
+ colorPositive: "#24754b",
582
+ colorNegative: "#bd3434",
583
+ colorNeutral: "#595954",
584
+ category10: [
585
+ "#2055c9",
586
+ "#d43c30",
587
+ "#b78100",
588
+ "#252525",
589
+ "#287b66",
590
+ "#8154a2",
591
+ "#b95120",
592
+ "#4f758a"
593
+ ],
594
+ fontFamily: "Arial, sans-serif",
595
+ fontSize: 11,
596
+ fontWeight: 500,
597
+ lineHeight: 21,
598
+ spacingSmall: 6,
599
+ spacingMedium: 12,
600
+ lineWidth: 1.5,
601
+ radius: 0
602
+ },
603
+ style: {
604
+ title: { titleFontSize: 20, titleFontWeight: 700, spacing: 6 },
605
+ axis: {
606
+ gridLineWidth: 0.5,
607
+ line: true,
608
+ lineStroke: "#292929",
609
+ lineLineWidth: 1,
610
+ tick: true,
611
+ tickLength: 4,
612
+ gridStroke: "#deded8",
613
+ gridLineDash: [0, 0]
614
+ },
615
+ legend: { itemMarkerSize: 9, itemSpacing: [6, 6, 3] },
616
+ mark: {
617
+ line: { shape: "line", lineWidth: 3, lineCap: "butt", lineJoin: "miter" },
618
+ area: { shape: "area", fillOpacity: 0.16 },
619
+ point: { shape: "square", size: 4, stroke: "#191919", lineWidth: 1 },
620
+ interval: { stroke: "#191919", lineWidth: 1, fillOpacity: 1 },
621
+ treemap: { stroke: "#ffffff", lineWidth: 3, radius: 0 },
622
+ liquid: {
623
+ shape: "rect",
624
+ contentFill: "#191919",
625
+ contentFontSize: 32,
626
+ contentFontWeight: 700,
627
+ outlineStroke: "#191919",
628
+ outlineBorder: 2
629
+ },
630
+ sankey: { nodeStroke: "#191919", nodeLineWidth: 1, linkFillOpacity: 0.3 }
631
+ },
632
+ node: {
633
+ fillOpacity: 0.14,
634
+ labelFill: "#191919",
635
+ stroke: "#191919",
636
+ lineWidth: 1.5,
637
+ labelFontWeight: 600
638
+ },
639
+ edge: { stroke: "#595954", lineWidth: 1.5 },
640
+ table: {
641
+ header: { backgroundColor: "#2055c9", fill: "#ffffff", fontWeight: 700 },
642
+ cell: { backgroundColor: "#ffffff", padding: [9, 12], lineHeight: 20 },
643
+ border: { color: "#191919", width: 1.5, style: "solid", radius: 0 }
644
+ },
645
+ summary: {
646
+ fontSize: 14,
647
+ lineHeight: 26,
648
+ colorHeadingBase: "#191919",
649
+ colorMetricValue: "#2055c9"
650
+ }
651
+ },
652
+ charts: {
653
+ radar: { style: { mark: { line: { shape: "line" } } } },
654
+ waterfall: { style: { palette: ["#24754b", "#bd3434", "#2055c9"] } },
655
+ pie: { style: { mark: { interval: { stroke: "#ffffff", lineWidth: 3, radius: 0 } } } },
656
+ "network-graph": { style: { node: { type: "rect" }, edge: { type: "line" } } }
657
+ }
658
+ }
659
+ ];
660
+ // Annotate the CommonJS export names for ESM import in node:
661
+ 0 && (module.exports = {
662
+ THEME_PRESETS
663
+ });
@@ -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
+ };