Skip to content

Commit

Permalink
feat: add export
Browse files Browse the repository at this point in the history
  • Loading branch information
xuefei1313 committed Jan 15, 2025
1 parent 792cb04 commit bdf67c0
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 24 deletions.
2 changes: 1 addition & 1 deletion packages/vstory-core/src/character/character-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { ICharacterPickInfo, IStoryEvent } from '../interface/event';
import type { IStory } from '../interface/story';
import type { IStoryCanvas } from '../interface/canvas';
import type { IConfigProcess } from './config-transform/interface';
import type { IUpdateConfigParams } from './chart/interface/runtime';
import type { IUpdateConfigParams } from './common/interface';
import { getLayoutLine } from '../utils/layout';
import { foreachAllConstructor } from '../utils/type';
import { ThemeManager } from '../theme/theme-manager';
Expand Down
3 changes: 2 additions & 1 deletion packages/vstory-core/src/character/chart/character-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import { getChartModelWithEvent } from './utils/vchart-pick';
import type { ICharacterConfig, ICharacterInitOption } from '../../interface/dsl/dsl';
import type { IChartCharacterConfig } from '../../interface/dsl/chart';
import { getLayoutFromWidget } from '../../utils/layout';
import type { IChartCharacterRuntime, IUpdateConfigParams } from './interface/runtime';
import type { IChartCharacterRuntime } from './interface/runtime';
import type { IUpdateConfigParams } from '../common/interface';
import { ChartConfigProcess } from './chart-config-process';
import type { ICharacterChart } from './interface/character-chart';
import { mergeChartOption } from '../../utils/chart';
Expand Down
3 changes: 0 additions & 3 deletions packages/vstory-core/src/character/chart/interface/runtime.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { IVChart } from '@visactor/vchart';
import type { ICharacterConfig } from '../../../interface/dsl/dsl';
import type { ICharacterChart } from './character-chart';
export interface IChartCharacterRuntime {
readonly type: string;
Expand All @@ -16,5 +15,3 @@ export interface IChartCharacterRuntime {
export interface IChartCharacterRuntimeConstructor {
new (): IChartCharacterRuntime;
}

export type IUpdateConfigParams = Omit<Partial<ICharacterConfig>, 'id' | 'type'>;
3 changes: 3 additions & 0 deletions packages/vstory-core/src/character/common/interface.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import type { ICharacterConfig } from '../../interface/dsl/dsl';

export type IUpdateConfigParams = Omit<Partial<ICharacterConfig>, 'id' | 'type'>;
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { IGraphic } from '@visactor/vrender-core';
import { CharacterBase } from '../character-base';
import type { IComponentCharacterConfig } from '../../interface/dsl/component';
import type { IComponentCharacterRuntime, IUpdateConfigParams } from './interface/runtime';
import type { IComponentCharacterRuntime } from './interface/runtime';
import type { IUpdateConfigParams } from '../common/interface';
import type { ICharacterInitOption } from '../../interface/dsl/dsl';
import { ComponentConfigProcess } from './component-config-process';
import type { ICharacterComponent } from './interface/character-component';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { ICharacter } from '../../../interface/character';
import type { ICharacterConfig } from '../../../interface/dsl/dsl';
export interface IComponentCharacterRuntime {
readonly type: string;
// 应用config到attribute
Expand All @@ -9,5 +8,3 @@ export interface IComponentCharacterRuntime {
export interface IComponentCharacterRuntimeConstructor {
new (): IComponentCharacterRuntime;
}

export type IUpdateConfigParams = Omit<Partial<ICharacterConfig>, 'id' | 'type'>;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { cloneDeep, isValid, merge } from '@visactor/vutils';
import type { ICharacter } from '../../interface/character';
import { deepMergeWithDeletedAttr } from '../../utils/merge';
import type { IConfigProcess } from './interface';
import type { IUpdateConfigParams } from '../chart/interface/runtime';
import type { IUpdateConfigParams } from '../common/interface';

export class ConfigProcessBase implements IConfigProcess {
protected _character: ICharacter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ICharacter } from '../../interface/character';
import type { IUpdateConfigParams } from '../chart/interface/runtime';
import type { IUpdateConfigParams } from '../common/interface';

export interface IConfigProcess {
checkEnable: (diffConfig: IUpdateConfigParams, config: IUpdateConfigParams) => boolean;
Expand Down
3 changes: 2 additions & 1 deletion packages/vstory-core/src/character/table/character-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import { VTableGraphic } from './graphic/vtable-graphic';
import type { ICharacterConfig, ICharacterInitOption } from '../../interface/dsl/dsl';
import type { ITableCharacterConfig } from '../../interface/dsl/table';
import { getLayoutFromWidget } from '../../utils/layout';
import type { ITableCharacterRuntime, IUpdateConfigParams } from './interface/runtime';
import type { ITableCharacterRuntime } from './interface/runtime';
import { TableConfigProcess } from './table-config-process';
import type { ICharacterTable, IVTable } from './interface/character-table';
import { isArray } from '@visactor/vutils';
import type { IUpdateConfigParams } from '../common/interface';

export class CharacterTable<T extends ITableGraphicAttribute>
extends CharacterBase<ITableGraphicAttribute>
Expand Down
3 changes: 0 additions & 3 deletions packages/vstory-core/src/character/table/interface/runtime.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { ICharacterConfig } from '../../../interface/dsl/dsl';
import type { ICharacterTableRuntimeConfig, IVTable } from './character-table';
export interface ITableCharacterRuntime {
readonly type: string;
Expand All @@ -15,5 +14,3 @@ export interface ITableCharacterRuntime {
export interface ITableCharacterRuntimeConstructor {
new (): ITableCharacterRuntime;
}

export type IUpdateConfigParams = Omit<Partial<ICharacterConfig>, 'id' | 'type'>;
29 changes: 21 additions & 8 deletions packages/vstory-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,43 @@ export * from './module/character';
export * from './constants/character';

export * from './interface/action-processor';
export * from './interface/dsl/dsl';
export * from './interface/character';
export * from './interface/story';
export * from './interface/event';
export * from './core/processorRegistry';
export * from './tools/global-ticker';
export * from './interface/dsl/dsl';
export * from './interface/dsl/component';
export * from './interface/dsl/chart';
export * from './interface/dsl/common';
export * from './interface/dsl/table';

export * from './character/component/character-component';
export * from './character/component/graphic/BaseComponentWithText';
export * from './character/component/runtime/base';
export * from './character/component/interface/runtime';
export * from './character/component/interface/character-component';

export * from './character/chart';
export * from './character/chart/interface/character-chart';
export * from './character/chart/interface/runtime';
export * from './character/chart/interface/character-chart';
export * from './character/chart/utils/vchart-pick';
export * from './character/chart/runtime/utils';
export * from './character/common/utils/format';

export * from './interface/dsl/component';
export * from './interface/dsl/chart';
export * from './interface/dsl/common';
export * from './interface/dsl/table';
export * from './character/component/runtime/base';
export * from './character/component/interface/runtime';
export * from './character/component/interface/character-component';
export * from './utils/factory';

export * from './store';
export * from './theme/theme-manager';
export * from './theme/interface';
export * from './theme/builtin/default';

export * from './store';
export * from './utils/factory';
export * from './core/processorRegistry';
export * from './tools/global-ticker';

export { VChart } from '@visactor/vchart';
export * as VTable from '@visactor/vtable';

Expand Down

0 comments on commit bdf67c0

Please sign in to comment.