UNPKG

@visactor/vrender-core

Version:

```typescript import { xxx } from '@visactor/vrender-core'; ```

23 lines (22 loc) 2.17 kB
import type { IGraphic, IStage } from '../../interface'; import type { CompiledStateDefinition, StateDefinitionsInput } from './state-definition'; export interface SharedStateScope<T extends Record<string, any> = Record<string, any>> { ownerStage?: IStage; parentScope?: SharedStateScope<T>; themeStateDefinitions?: StateDefinitionsInput<T>; localStateDefinitions?: StateDefinitionsInput<T>; effectiveSourceDefinitions: StateDefinitionsInput<T>; effectiveCompiledDefinitions: Map<string, CompiledStateDefinition<T>>; revision: number; parentRevisionAtBuild?: number; dirty: boolean; subtreeActiveDescendants: Set<IGraphic>; } export declare function createRootSharedStateScope<T extends Record<string, any> = Record<string, any>>(stage: IStage, themeStateDefinitions?: StateDefinitionsInput<T>): SharedStateScope<T>; export declare function createGroupSharedStateScope<T extends Record<string, any> = Record<string, any>>(group: IGraphic, parentScope?: SharedStateScope<T>, localStateDefinitions?: StateDefinitionsInput<T>): SharedStateScope<T>; export declare function setSharedStateScopeParent<T extends Record<string, any> = Record<string, any>>(scope: SharedStateScope<T>, parentScope?: SharedStateScope<T>): boolean; export declare function setSharedStateScopeLocalDefinitions<T extends Record<string, any> = Record<string, any>>(scope: SharedStateScope<T>, localStateDefinitions?: StateDefinitionsInput<T>): boolean; export declare function setRootSharedStateScopeThemeDefinitions<T extends Record<string, any> = Record<string, any>>(scope: SharedStateScope<T>, themeStateDefinitions?: StateDefinitionsInput<T>): boolean; export declare function rebuildSharedStateScope<T extends Record<string, any> = Record<string, any>>(scope: SharedStateScope<T>, revision?: number): SharedStateScope<T>; export declare function ensureSharedStateScopeFresh<T extends Record<string, any> = Record<string, any>>(scope?: SharedStateScope<T>): SharedStateScope<T> | undefined; export declare function collectSharedStateScopeChain<T extends Record<string, any> = Record<string, any>>(scope?: SharedStateScope<T>): SharedStateScope<T>[];