@visactor/vchart-types 2.0.23-alpha.8 → 2.0.23-alpha.9

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.
@@ -31,7 +31,7 @@ export interface ITreemapSeriesSpec extends Omit<ISeriesSpec, 'data'>, IAnimatio
31
31
  padding?: TreemapOptions['labelPadding'];
32
32
  };
33
33
  }
34
- export interface ITreemapSeriesTheme extends ICartesianSeriesTheme {
34
+ export interface ITreemapSeriesTheme extends Omit<ICartesianSeriesTheme, 'label'> {
35
35
  gapWidth?: TreemapOptions['padding'];
36
36
  nodePadding?: TreemapOptions['padding'];
37
37
  [SeriesMarkNameEnum.leaf]?: Partial<IMarkTheme<IRectMarkSpec>>;
@@ -221,10 +221,11 @@ export interface IMarkStateTheme<T> extends Record<string, T> {
221
221
  selected?: T;
222
222
  selected_reverse?: T;
223
223
  }
224
+ type ConvertToThemeMarkStyleSpec<T> = T extends Record<string, any> ? Partial<ConvertToMarkStyleSpec<T>> : never;
224
225
  export type IMarkTheme<T> = {
225
226
  visible?: boolean;
226
- style?: T;
227
- state?: IMarkStateTheme<T>;
227
+ style?: ConvertToThemeMarkStyleSpec<T>;
228
+ state?: IMarkStateTheme<ConvertToThemeMarkStyleSpec<T>>;
228
229
  interactive?: boolean;
229
230
  };
230
231
  export interface IPerformanceHook {
@@ -310,3 +311,4 @@ export type IRichTextFormatMethod<T extends any[]> = (...args: T) => {
310
311
  text: IRichTextCharacter[];
311
312
  } | IRichTextCharacter[];
312
313
  export type IFormatMethod<T extends any[]> = (...args: T) => ReturnType<ITextFormatMethod<T>> | ReturnType<IRichTextFormatMethod<T>>;
314
+ export {};
@@ -1,6 +1,9 @@
1
- import type { ISeriesSpec } from '../../typings';
1
+ interface IFunctionTransformRegistry {
2
+ getFunction: (key: string) => unknown;
3
+ }
2
4
  export declare function specTransform(spec: unknown, special?: {
3
5
  [key: string]: (v: unknown) => unknown;
4
6
  }): unknown;
5
- export declare function functionTransform(spec: ISeriesSpec, VChart: any): any;
7
+ export declare function functionTransform(value: unknown, registry: IFunctionTransformRegistry): any;
6
8
  export declare function transformFunctionAttribute(att: unknown, ...args: unknown[]): any;
9
+ export {};