@visactor/vchart-types 2.1.0-alpha.12 → 2.1.0-alpha.13

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.
@@ -2,6 +2,7 @@ import type { IApp, IColor, IStageParams, IStage, ILayer, IOption3D, ITicker } f
2
2
  import type { IPerformanceHook, RenderMode } from '../../typings/spec/common';
3
3
  import type { IBoundsLike } from '@visactor/vutils';
4
4
  import type { StringOrNumber } from '../../typings';
5
+ import type { SharedVRenderAppOption } from '../stage-app';
5
6
  export declare enum LayoutState {
6
7
  before = "before",
7
8
  layouting = "layouting",
@@ -43,6 +44,7 @@ export interface IRenderOption {
43
44
  canvasControled?: boolean;
44
45
  stage?: IStage;
45
46
  app?: IApp;
47
+ sharedVRenderApp?: SharedVRenderAppOption;
46
48
  layer?: ILayer;
47
49
  beforeRender?: IStageParams['beforeRender'];
48
50
  afterRender?: IStageParams['afterRender'];
@@ -1,9 +1,23 @@
1
1
  import type { IApp, IStage, IStageParams } from '@visactor/vrender-core';
2
2
  import { type RenderMode } from '../typings/spec/common';
3
+ type VRenderAppEnv = 'browser' | 'node' | 'feishu' | 'tt' | 'wx' | 'lynx' | 'harmony';
4
+ type VRenderSharedAppKey = string | symbol;
5
+ export type SharedVRenderAppOption = {
6
+ key: VRenderSharedAppKey;
7
+ };
8
+ export type ResolveVRenderAppOptions = {
9
+ app?: IApp;
10
+ mode?: RenderMode;
11
+ modeParams?: unknown;
12
+ sharedVRenderApp?: SharedVRenderAppOption;
13
+ };
3
14
  export type ResolvedVRenderApp = {
4
15
  app: IApp;
5
16
  releaseAppRef?: () => void;
6
17
  };
18
+ export declare const getVRenderAppEnv: (mode?: RenderMode) => VRenderAppEnv;
19
+ export declare const getVRenderAppEnvParams: (mode?: RenderMode, modeParams?: unknown) => unknown;
7
20
  export declare const getDefaultVRenderApp: (mode?: RenderMode) => IApp;
8
- export declare const resolveVRenderApp: (app: IApp | undefined, mode?: RenderMode) => ResolvedVRenderApp;
21
+ export declare const resolveVRenderApp: (appOrOptions?: IApp | ResolveVRenderAppOptions, mode?: RenderMode) => ResolvedVRenderApp;
9
22
  export declare const createStageFromApp: (app: IApp, params: Partial<IStageParams>) => IStage;
23
+ export {};
@@ -1,9 +1,11 @@
1
+ import type { DataView } from '@visactor/vdataset';
1
2
  import type { IComponent } from '../../../interface';
2
- import type { IAggrType, IMarkerPositionsSpec, IDataPointSpec, IMarkerSpec, IDataPos, IDataPosCallback, IMarkerLabelSpec, IMarkerCrossSeriesSpec, OffsetPoint, MarkerStateValue, MarkerStateCallback, IMarkerSupportSeries } from '../../interface';
3
+ import type { IAggrType, IMarkerAttributeContext, IMarkerPositionsSpec, IDataPointSpec, IMarkerSpec, IDataPos, IDataPosCallback, IMarkerLabelSpec, IMarkerCrossSeriesSpec, OffsetPoint, MarkerStateValue, MarkerStateCallback, IMarkerSupportSeries } from '../../interface';
3
4
  import type { IRegressType } from '../../mark-area/interface';
4
5
  import type { IMarkLineTheme } from './theme';
5
6
  import type { Datum, ILineMarkSpec, IPoint } from '../../../../typings';
6
7
  import type { BaseMarkerAnimation, MarkCommonLineAnimationType } from '@visactor/vrender-components';
8
+ import type { IRegion } from '../../../../region/interface';
7
9
  export type IMarkLine = IComponent;
8
10
  export type IMarkLineSpec = (IMarkerSpec & (IMarkLineXSpec | IMarkLineYSpec | IMarkLineXYSpec | IMarkLineXYY1Spec | IMarkLineYXX1Spec | IMarkLineAngleSpec | IMarkLineRadiusSpec | IMarkLineAngRadRad1Spec | IMarkLineRadAngAng1Spec | IMarkLineAngRadSpec | IMarkLineCoordinateSpec | IMarkerPositionsSpec) & IMarkLineTheme & BaseMarkerAnimation<MarkCommonLineAnimationType>) | (IStepMarkLineSpec & BaseMarkerAnimation<MarkCommonLineAnimationType>);
9
11
  export interface IMarkLineXSpec extends IMarkerCrossSeriesSpec {
@@ -64,7 +66,12 @@ export type IMarkLineCoordinateSpec = {
64
66
  export type IStepMarkLineSpec = IMarkerSpec & {
65
67
  type: 'type-step';
66
68
  connectDirection: 'top' | 'bottom' | 'left' | 'right';
67
- expandDistance?: number | string;
69
+ expandDistance?: number | string | ((markerData: DataView, context: IMarkerAttributeContext & {
70
+ region: IRegion;
71
+ startRegion: IRegion;
72
+ endRegion: IRegion;
73
+ coordinatePoints: IPoint[];
74
+ }) => number | string);
68
75
  label?: IMarkerLabelSpec;
69
76
  line?: {
70
77
  multiSegment?: boolean;