@antv/gpt-vis 1.3.0 → 1.3.2

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 CHANGED
@@ -123,7 +123,7 @@ gptVis.render({
123
123
 
124
124
  **Themes:**
125
125
 
126
- Three built-in themes, switchable via the `theme` property:
126
+ Built-in themes are switchable via the `theme` property. The original base themes keep their existing appearance:
127
127
 
128
128
  | Theme | Identifier | Background | Palette |
129
129
  | --------------- | ---------- | ---------- | ----------------------------------------------------- |
@@ -131,6 +131,29 @@ Three built-in themes, switchable via the `theme` property:
131
131
  | Dark | `dark` | `#141414` | `#5B6CFF` `#2DAF9E` `#F2B84B` `#EF6A6A` `#55A6D9` ... |
132
132
  | Academy | `academy` | `#FFF` | `#4e79a7` `#f28e2c` `#e15759` `#76b7b2` `#59a14f` ... |
133
133
 
134
+ The website's 10 gallery styles are also built in:
135
+
136
+ | Theme | Identifier |
137
+ | ----------------------------------------------- | -------------- |
138
+ | GPT-Vis | `gpt-vis` |
139
+ | Midnight | `midnight` |
140
+ | Paper | `paper` |
141
+ | Product | `product` |
142
+ | Neon Circuit | `neon-circuit` |
143
+ | Terra Print | `terra-print` |
144
+ | Mono Signal | `mono-signal` |
145
+ | Candy Pop | `candy-pop` |
146
+ | [Pop](https://github.com/microsoft/flint-chart) | `pop` |
147
+ | Bauhaus | `bauhaus` |
148
+
149
+ The branded `gpt-vis` preset is separate from the SDK's `default`.
150
+
151
+ ```typescript
152
+ const chart = new GPTVis({ container: '#chart', theme: 'pop' });
153
+ ```
154
+
155
+ Names work in the constructor, chart JSON, and Syntax (`theme pop`). Summary receives its theme through the constructor. The supported name type is `BuiltinThemeName`.
156
+
134
157
  ```javascript
135
158
  gptVis.render({
136
159
  type: 'line',
@@ -161,7 +184,7 @@ Precedence: **single-chart config > custom ThemeSpec > GPT-Vis built-in theme**.
161
184
 
162
185
  Explore [Theme Studio](https://gpt-vis.antv.vision/themes), read the [theme documentation](https://gpt-vis.antv.vision/docs#custom-themes), or use the [theme creation guide](./skills/chart-visualization/references/theme-creator.md) to generate a ThemeSpec from your brand references.
163
186
 
164
- Studio presets are ThemeSpec examples. Pass the object as `theme`; its `id` is metadata, not a registered theme name.
187
+ Unchanged Studio presets can be used by their built-in names. After customization, pass the full object as `theme`; a custom `id` is metadata and does not register a new name.
165
188
 
166
189
  **Custom Styles:**
167
190
 
@@ -24,5 +24,5 @@ export declare function getThemeObject(type: ChartType, theme?: VisualizationThe
24
24
  tooltipStyle: {
25
25
  [k: string]: any;
26
26
  };
27
- texture: "rough" | "default" | undefined;
27
+ texture: "default" | "rough" | undefined;
28
28
  };
@@ -0,0 +1,5 @@
1
+ import type { BuiltinThemeName, ThemeSpec } from '../types/theme';
2
+ /** Named themes shared by the SDK and website. Legacy base themes remain unchanged. */
3
+ export declare const THEME_PRESETS: readonly (ThemeSpec & {
4
+ id: BuiltinThemeName;
5
+ })[];