@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.
@@ -1,4 +1,6 @@
1
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
+ /** Stable names accepted by the constructor, chart JSON, and visualization Syntax. */
3
+ export type BuiltinThemeName = 'default' | 'light' | 'dark' | 'academy' | 'gpt-vis' | 'midnight' | 'paper' | 'product' | 'neon-circuit' | 'terra-print' | 'mono-signal' | 'candy-pop' | 'pop' | 'bauhaus';
2
4
  /** Reusable visual theme. Local chart config takes precedence over this spec. */
3
5
  export interface ThemeSpec {
4
6
  /** Stable identifier; does not register a theme name. */
@@ -33,6 +33,8 @@ var MIN_WIDTH_MULTIPLIER = 1.1;
33
33
  var TABLE_STYLES = `
34
34
  .${SCOPE_ID} {
35
35
  font-family: ${FONT_FAMILY};
36
+ line-height: normal;
37
+ overflow-wrap: normal;
36
38
  overflow: auto;
37
39
  height: 100%;
38
40
  padding: 16px;
@@ -104,7 +104,7 @@ function createVisWrapper(container, config = {}) {
104
104
  <div class="gpt-vis-wrapper-chart">
105
105
  <div class="gpt-vis-wrapper-chart-container"></div>
106
106
  </div>
107
- <div class="gpt-vis-wrapper-code gpt-vis-wrapper-tab-hide">${syntaxString}</div>
107
+ <div class="gpt-vis-wrapper-code gpt-vis-wrapper-tab-hide"></div>
108
108
  </div>
109
109
  </div>
110
110
  `;
@@ -114,6 +114,7 @@ function createVisWrapper(container, config = {}) {
114
114
  const codeTabButton = wrapperContainer.querySelector('[data-tab="code"]');
115
115
  const chartWrapper = wrapperContainer.querySelector(".gpt-vis-wrapper-chart");
116
116
  const codeContainer = wrapperContainer.querySelector(".gpt-vis-wrapper-code");
117
+ codeContainer.textContent = syntaxString;
117
118
  const chartContainer = wrapperContainer.querySelector(
118
119
  ".gpt-vis-wrapper-chart-container"
119
120
  );
@@ -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
+ })[];