@vvfx/artis 0.0.1-alpha.0
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.
- package/LICENSE +22 -0
- package/dist/artis/artis.d.ts +44 -0
- package/dist/artis/base-artis.d.ts +520 -0
- package/dist/artis/canvas-layer-order.d.ts +19 -0
- package/dist/artis/create-info-to-schema.d.ts +21 -0
- package/dist/artis/index.d.ts +15 -0
- package/dist/artis/operations/index.d.ts +3 -0
- package/dist/artis/operations/operations.d.ts +362 -0
- package/dist/artis/operations/scene-operations.d.ts +26 -0
- package/dist/artis/operations/types.d.ts +39 -0
- package/dist/artis/scene-artis.d.ts +386 -0
- package/dist/artis/screenshot-service.d.ts +83 -0
- package/dist/artis/types.d.ts +130 -0
- package/dist/artis/wiring/index.d.ts +17 -0
- package/dist/artis/wiring/register-commands.d.ts +44 -0
- package/dist/artis/wiring/setup-commands.d.ts +5 -0
- package/dist/artis/wiring/setup-event-bindings.d.ts +16 -0
- package/dist/artis/wiring/setup-keybindings.d.ts +38 -0
- package/dist/artis/wiring/setup-plugins.d.ts +5 -0
- package/dist/artis/wiring/wiring-context.d.ts +34 -0
- package/dist/artis-sdk/artis-sdk.d.ts +1117 -0
- package/dist/artis-sdk/index.d.ts +1 -0
- package/dist/core/asset/asset-manager.d.ts +288 -0
- package/dist/core/asset/index.d.ts +3 -0
- package/dist/core/command/command-service.d.ts +315 -0
- package/dist/core/command/commands/composite-command.d.ts +45 -0
- package/dist/core/command/commands/frame-layout-command.d.ts +81 -0
- package/dist/core/command/commands/frame-layout-mode-command.d.ts +55 -0
- package/dist/core/command/commands/frame-move-in-command.d.ts +54 -0
- package/dist/core/command/commands/frame-move-out-command.d.ts +54 -0
- package/dist/core/command/commands/group-children-detach-command.d.ts +28 -0
- package/dist/core/command/commands/index.d.ts +98 -0
- package/dist/core/command/commands/item-align-command.d.ts +52 -0
- package/dist/core/command/commands/item-create-command.d.ts +66 -0
- package/dist/core/command/commands/item-delete-command.d.ts +40 -0
- package/dist/core/command/commands/item-distribute-command.d.ts +53 -0
- package/dist/core/command/commands/item-group-command.d.ts +41 -0
- package/dist/core/command/commands/item-reorder-command.d.ts +41 -0
- package/dist/core/command/commands/item-replace-source-command.d.ts +48 -0
- package/dist/core/command/commands/item-set-font-family-command.d.ts +46 -0
- package/dist/core/command/commands/item-set-generator-resource-command.d.ts +40 -0
- package/dist/core/command/commands/item-transform-command.d.ts +51 -0
- package/dist/core/command/commands/item-ungroup-command.d.ts +34 -0
- package/dist/core/command/commands/item-update-property-by-create-info-command.d.ts +41 -0
- package/dist/core/command/commands/item-update-property-command.d.ts +82 -0
- package/dist/core/command/commands/mask-commit-command.d.ts +53 -0
- package/dist/core/command/commands/page-auto-layout-command.d.ts +53 -0
- package/dist/core/command/commands/picture-cut-commit-command.d.ts +43 -0
- package/dist/core/command/commands/picture-expand-commit-command.d.ts +35 -0
- package/dist/core/command/commands/scene-switch-command.d.ts +35 -0
- package/dist/core/command/commands/selection-set-command.d.ts +38 -0
- package/dist/core/command/commands/sprite-image-command.d.ts +36 -0
- package/dist/core/command/commands/sprite-text-edit-commit-command.d.ts +43 -0
- package/dist/core/command/commands/state-hand-command.d.ts +14 -0
- package/dist/core/command/commands/state-image-cut-command.d.ts +14 -0
- package/dist/core/command/commands/state-image-expand-command.d.ts +14 -0
- package/dist/core/command/commands/state-image-mask-command.d.ts +15 -0
- package/dist/core/command/commands/state-image-text-edit-command.d.ts +14 -0
- package/dist/core/command/commands/state-item-create-command.d.ts +34 -0
- package/dist/core/command/commands/state-move-command.d.ts +14 -0
- package/dist/core/command/commands/state-switch-command-base.d.ts +41 -0
- package/dist/core/command/commands/text-move-command.d.ts +47 -0
- package/dist/core/command/commands/text-rotate-command.d.ts +52 -0
- package/dist/core/command/commands/text-scale-command.d.ts +56 -0
- package/dist/core/command/commands/text-update-content-command.d.ts +51 -0
- package/dist/core/command/commands/transform-move-command.d.ts +56 -0
- package/dist/core/command/commands/transform-move-with-frame-change-command.d.ts +80 -0
- package/dist/core/command/commands/transform-move-with-layout-command.d.ts +56 -0
- package/dist/core/command/commands/transform-rotate-command.d.ts +51 -0
- package/dist/core/command/commands/transform-scale-command.d.ts +54 -0
- package/dist/core/command/commands/video-play-command.d.ts +28 -0
- package/dist/core/command/commands/video-source-command.d.ts +39 -0
- package/dist/core/command/commands/viewport-fit-to-box-command.d.ts +37 -0
- package/dist/core/command/commands/viewport-fit-to-items-command.d.ts +43 -0
- package/dist/core/command/commands/viewport-move-command.d.ts +34 -0
- package/dist/core/command/commands/viewport-zoom-command.d.ts +35 -0
- package/dist/core/command/index.d.ts +5 -0
- package/dist/core/command/registry.d.ts +246 -0
- package/dist/core/command/types.d.ts +124 -0
- package/dist/core/element-registry/element-facade.d.ts +35 -0
- package/dist/core/element-registry/element-identity-strategy.d.ts +75 -0
- package/dist/core/element-registry/element-registry.d.ts +72 -0
- package/dist/core/element-registry/index.d.ts +5 -0
- package/dist/core/element-registry/types.d.ts +15 -0
- package/dist/core/gizmo/gizmo-bootstrap.d.ts +70 -0
- package/dist/core/gizmo/gizmo-command-binder.d.ts +55 -0
- package/dist/core/gizmo/gizmo-config-override.d.ts +24 -0
- package/dist/core/gizmo/gizmo-registry.d.ts +39 -0
- package/dist/core/gizmo/index.d.ts +19 -0
- package/dist/core/gizmo/register-gizmo-command-bindings.d.ts +20 -0
- package/dist/core/gizmo/state-gizmo-controller.d.ts +20 -0
- package/dist/core/history/history-manager.d.ts +174 -0
- package/dist/core/history/index.d.ts +1 -0
- package/dist/core/index.d.ts +25 -0
- package/dist/core/item/base-item.d.ts +154 -0
- package/dist/core/item/card-item.d.ts +91 -0
- package/dist/core/item/default-item-schema.d.ts +20 -0
- package/dist/core/item/effects-item.d.ts +99 -0
- package/dist/core/item/frame-item.d.ts +153 -0
- package/dist/core/item/generator-item.d.ts +114 -0
- package/dist/core/item/group-item.d.ts +51 -0
- package/dist/core/item/index.d.ts +25 -0
- package/dist/core/item/sprite-item.d.ts +80 -0
- package/dist/core/item/text-item.d.ts +171 -0
- package/dist/core/item/types.d.ts +158 -0
- package/dist/core/item/video-item.d.ts +120 -0
- package/dist/core/keybinding/index.d.ts +11 -0
- package/dist/core/keybinding/key-binding-controller.d.ts +44 -0
- package/dist/core/keybinding/key-binding-registry.d.ts +92 -0
- package/dist/core/keybinding/key-binding-store.d.ts +29 -0
- package/dist/core/keybinding/key-matcher.d.ts +24 -0
- package/dist/core/keybinding/types.d.ts +84 -0
- package/dist/core/plugin/index.d.ts +3 -0
- package/dist/core/plugin/io-plugin.d.ts +167 -0
- package/dist/core/plugin/plugin-system.d.ts +77 -0
- package/dist/core/predict/align-predict.d.ts +20 -0
- package/dist/core/predict/base/box-ops.d.ts +40 -0
- package/dist/core/predict/base/index.d.ts +14 -0
- package/dist/core/predict/base/parent-coord.d.ts +29 -0
- package/dist/core/predict/base/schema-box.d.ts +21 -0
- package/dist/core/predict/distribute-predict.d.ts +19 -0
- package/dist/core/predict/frame-layout-predict.d.ts +24 -0
- package/dist/core/predict/index.d.ts +12 -0
- package/dist/core/preferences/index.d.ts +2 -0
- package/dist/core/preferences/user-preferences-manager.d.ts +130 -0
- package/dist/core/quality/error-monitor/error-monitor-facade.d.ts +73 -0
- package/dist/core/quality/error-monitor/error-monitor.d.ts +106 -0
- package/dist/core/quality/error-monitor/index.d.ts +4 -0
- package/dist/core/quality/error-monitor/types.d.ts +198 -0
- package/dist/core/quality/index.d.ts +3 -0
- package/dist/core/quality/perf-monitor/index.d.ts +5 -0
- package/dist/core/quality/perf-monitor/perf-monitor-facade.d.ts +45 -0
- package/dist/core/quality/perf-monitor/perf-monitor.d.ts +60 -0
- package/dist/core/quality/perf-monitor/types.d.ts +66 -0
- package/dist/core/quality/stability-monitor/index.d.ts +5 -0
- package/dist/core/quality/stability-monitor/stability-monitor-facade.d.ts +50 -0
- package/dist/core/quality/stability-monitor/stability-monitor.d.ts +61 -0
- package/dist/core/quality/stability-monitor/types.d.ts +69 -0
- package/dist/core/renderer/background-controller.d.ts +56 -0
- package/dist/core/renderer/index.d.ts +5 -0
- package/dist/core/renderer/player-adapter.d.ts +129 -0
- package/dist/core/renderer/renderer.d.ts +134 -0
- package/dist/core/service/frame-service.d.ts +116 -0
- package/dist/core/service/index.d.ts +9 -0
- package/dist/core/service/interaction-providers.d.ts +20 -0
- package/dist/core/service/interaction-service.d.ts +211 -0
- package/dist/core/service/item-asset-service.d.ts +120 -0
- package/dist/core/service/item-creator-service.d.ts +211 -0
- package/dist/core/service/item-service.d.ts +641 -0
- package/dist/core/service/item-sync-service.d.ts +66 -0
- package/dist/core/service/json-scene-sync-service.d.ts +140 -0
- package/dist/core/service/refresh-animation-base-service.d.ts +1 -0
- package/dist/core/service/scene-data-assembler.d.ts +166 -0
- package/dist/core/service/view-service.d.ts +202 -0
- package/dist/core/state/base-state.d.ts +28 -0
- package/dist/core/state/index.d.ts +6 -0
- package/dist/core/state/presets.d.ts +25 -0
- package/dist/core/state/state-manager.d.ts +50 -0
- package/dist/core/state/types.d.ts +52 -0
- package/dist/core/store/index.d.ts +3 -0
- package/dist/core/store/scene-store.d.ts +194 -0
- package/dist/core/store/store.d.ts +36 -0
- package/dist/core/types/artis-config.d.ts +186 -0
- package/dist/core/types/artis-events.d.ts +101 -0
- package/dist/core/types/frame.d.ts +3 -0
- package/dist/core/types/generator.d.ts +28 -0
- package/dist/core/types/index.d.ts +15 -0
- package/dist/core/types/item-create-info.d.ts +205 -0
- package/dist/core/types/item-property.d.ts +149 -0
- package/dist/core/types/item-reorder.d.ts +12 -0
- package/dist/core/types/item-schema.d.ts +263 -0
- package/dist/core/types/item-set-property.d.ts +48 -0
- package/dist/core/types/page.d.ts +40 -0
- package/dist/core/types/sdk.d.ts +28 -0
- package/dist/core/types/view.d.ts +39 -0
- package/dist/helper/exporter/config.d.ts +18 -0
- package/dist/helper/exporter/const.d.ts +71 -0
- package/dist/helper/exporter/export-media.d.ts +189 -0
- package/dist/helper/exporter/exporter.d.ts +58 -0
- package/dist/helper/exporter/index.d.ts +2 -0
- package/dist/helper/exporter/types.d.ts +194 -0
- package/dist/helper/exporter/utils.d.ts +71 -0
- package/dist/helper/exporter/wav-audio.d.ts +35 -0
- package/dist/helper/html-overlay/anchor-navigation-runtime.d.ts +1 -0
- package/dist/helper/html-overlay/auto-height-layout.d.ts +16 -0
- package/dist/helper/html-overlay/auto-height-runtime.d.ts +40 -0
- package/dist/helper/html-overlay/document-runtime.d.ts +18 -0
- package/dist/helper/html-overlay/document-transform.d.ts +46 -0
- package/dist/helper/html-overlay/dom-order.d.ts +5 -0
- package/dist/helper/html-overlay/host-message-runtime.d.ts +15 -0
- package/dist/helper/html-overlay/html-capture-runtime.d.ts +12 -0
- package/dist/helper/html-overlay/html-card-service.d.ts +287 -0
- package/dist/helper/html-overlay/html-viewport-style.d.ts +6 -0
- package/dist/helper/html-overlay/index.d.ts +1 -0
- package/dist/helper/html-overlay/inline-script-json.d.ts +1 -0
- package/dist/helper/html-overlay/mime-utils.d.ts +13 -0
- package/dist/helper/html-overlay/overlay-transform.d.ts +30 -0
- package/dist/helper/html-overlay/path-utils.d.ts +34 -0
- package/dist/helper/html-overlay/runtime-context.d.ts +2 -0
- package/dist/helper/html-overlay/shell-runtime.d.ts +13 -0
- package/dist/helper/index.d.ts +5 -0
- package/dist/helper/scene-builder.d.ts +111 -0
- package/dist/helper/screen-shot.d.ts +51 -0
- package/dist/helper/size-adapt.d.ts +88 -0
- package/dist/index.cjs +69350 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.mjs +68963 -0
- package/dist/index.mjs.map +1 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/player.d.ts +9 -0
- package/dist/utils/background-manager.d.ts +76 -0
- package/dist/utils/common-utils.d.ts +39 -0
- package/dist/utils/container-size.d.ts +7 -0
- package/dist/utils/find-player-item.d.ts +9 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/json-data-utils.d.ts +198 -0
- package/dist/utils/layout-utils.d.ts +144 -0
- package/dist/utils/pixel-box-utils.d.ts +26 -0
- package/dist/utils/player-data-utils.d.ts +9 -0
- package/dist/utils/player-utils.d.ts +42 -0
- package/dist/utils/replay-utils.d.ts +22 -0
- package/dist/utils/types.d.ts +130 -0
- package/package.json +66 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import type { SpriteItemProperty, TextItemProperty, VideoItemProperty, GeneratorItemProperty, GroupItemProperty, EffectsItemProperty, FrameItemProperty, CardItemProperty } from '../types';
|
|
2
|
+
import { spec } from '../../shared';
|
|
3
|
+
/**
|
|
4
|
+
* ArtisItem 基础选项接口
|
|
5
|
+
* 支持扩展属性,允许添加任意额外属性
|
|
6
|
+
*/
|
|
7
|
+
export type ArtisItemOptions = {
|
|
8
|
+
/**
|
|
9
|
+
* 元素ID
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
/**
|
|
13
|
+
* Player 维度 VFXItem ID(运行时 GUID,不落盘——决策 D2)。
|
|
14
|
+
* 未传时构造兜底回退到 id(assembler 导入路径依赖);createXxx / loadEffectsAsset
|
|
15
|
+
* 创建 VFXItem 后取 getInstanceId() 回填到 ArtisItem.vfxItemId。
|
|
16
|
+
*/
|
|
17
|
+
vfxItemId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* 元素名称
|
|
20
|
+
*/
|
|
21
|
+
name: string;
|
|
22
|
+
/**
|
|
23
|
+
* 父节点ID
|
|
24
|
+
*/
|
|
25
|
+
parentId?: string;
|
|
26
|
+
/**
|
|
27
|
+
* 子元素ID列表
|
|
28
|
+
*/
|
|
29
|
+
children?: string[];
|
|
30
|
+
/**
|
|
31
|
+
* 元素生命周期
|
|
32
|
+
*/
|
|
33
|
+
duration?: number;
|
|
34
|
+
/**
|
|
35
|
+
* 元素生命周期延时
|
|
36
|
+
*/
|
|
37
|
+
delay?: number;
|
|
38
|
+
/**
|
|
39
|
+
* 可视状态
|
|
40
|
+
*/
|
|
41
|
+
visible?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* 元素结束行为
|
|
44
|
+
*/
|
|
45
|
+
endBehavior?: spec.EndBehavior;
|
|
46
|
+
/**
|
|
47
|
+
* 是否处于锁定状态
|
|
48
|
+
*/
|
|
49
|
+
isLocked?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* 关键属性是否可编辑
|
|
52
|
+
*/
|
|
53
|
+
isCoreEditable?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* 扩展属性存储(属性名 -> 属性值)
|
|
56
|
+
*/
|
|
57
|
+
extension?: Record<string, any>;
|
|
58
|
+
/**
|
|
59
|
+
* 允许任意额外属性(用于兼容旧代码)
|
|
60
|
+
*/
|
|
61
|
+
[extraProp: string]: any;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Sprite ArtisItem 选项
|
|
65
|
+
*/
|
|
66
|
+
export type SpriteItemOptions = ArtisItemOptions & {
|
|
67
|
+
/**
|
|
68
|
+
* 元素属性
|
|
69
|
+
*/
|
|
70
|
+
property?: Partial<SpriteItemProperty>;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Text ArtisItem 选项
|
|
74
|
+
*/
|
|
75
|
+
export type TextItemOptions = ArtisItemOptions & {
|
|
76
|
+
/**
|
|
77
|
+
* 元素属性
|
|
78
|
+
*/
|
|
79
|
+
property?: Partial<TextItemProperty>;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Video ArtisItem 选项
|
|
83
|
+
*/
|
|
84
|
+
export type VideoItemOptions = ArtisItemOptions & {
|
|
85
|
+
/**
|
|
86
|
+
* 元素属性
|
|
87
|
+
*/
|
|
88
|
+
property?: Partial<VideoItemProperty>;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Group ArtisItem 选项(空节点/组)
|
|
92
|
+
*/
|
|
93
|
+
export type GroupItemOptions = ArtisItemOptions & {
|
|
94
|
+
/**
|
|
95
|
+
* 元素属性
|
|
96
|
+
*/
|
|
97
|
+
property?: Partial<GroupItemProperty>;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Generator ArtisItem 选项(资源生成器)
|
|
101
|
+
* 支持 image 和 video 两种生成器类型
|
|
102
|
+
* 使用 GeneratorItemProperty 包含 generatorType
|
|
103
|
+
*/
|
|
104
|
+
export type GeneratorItemOptions = ArtisItemOptions & {
|
|
105
|
+
/**
|
|
106
|
+
* 元素属性(包含 generatorType)
|
|
107
|
+
*/
|
|
108
|
+
property?: Partial<GeneratorItemProperty>;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Effects 特效产物 ArtisItem 选项
|
|
112
|
+
*/
|
|
113
|
+
export type EffectsItemOptions = ArtisItemOptions & {
|
|
114
|
+
property?: Partial<EffectsItemProperty>;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Frame 画板元素 ArtisItem 选项
|
|
118
|
+
*/
|
|
119
|
+
export type FrameItemOptions = ArtisItemOptions & {
|
|
120
|
+
/**
|
|
121
|
+
* 元素属性
|
|
122
|
+
*/
|
|
123
|
+
property?: Partial<FrameItemProperty>;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* ArtisItem 类型(独立于 spec.ItemType)
|
|
127
|
+
* 包含所有 SDK 层级的元素类型,包括虚拟类型如 generator
|
|
128
|
+
*/
|
|
129
|
+
export declare enum ArtisItemType {
|
|
130
|
+
SPRITE = "sprite",
|
|
131
|
+
TEXT = "text",
|
|
132
|
+
VIDEO = "video",
|
|
133
|
+
GROUP = "group",
|
|
134
|
+
GENERATOR = "generator",
|
|
135
|
+
EFFECTS = "effects",
|
|
136
|
+
FRAME = "frame",
|
|
137
|
+
CARD = "card"
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* ArtisItemType 与 spec.ItemType 的映射关系
|
|
141
|
+
*/
|
|
142
|
+
export declare const ArtisItemTypeToSpecItemType: Record<ArtisItemType, spec.ItemType>;
|
|
143
|
+
/**
|
|
144
|
+
* Card 卡片元素 ArtisItem 选项
|
|
145
|
+
* 在 Player 中以 SpriteItem 形式渲染
|
|
146
|
+
*/
|
|
147
|
+
export type CardItemOptions = ArtisItemOptions & {
|
|
148
|
+
/**
|
|
149
|
+
* 元素属性(包含 cardType)
|
|
150
|
+
*/
|
|
151
|
+
property?: Partial<CardItemProperty>;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* 根据 ArtisItemType 获取对应的 spec.ItemType
|
|
155
|
+
* @param sdkItemType ArtisItem 类型
|
|
156
|
+
* @returns 对应的 spec.ItemType
|
|
157
|
+
*/
|
|
158
|
+
export declare function getSpecItemType(sdkItemType: ArtisItemType): spec.ItemType;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { type VideoItemProperty, type VideoItemSchema } from '../types';
|
|
2
|
+
import { ArtisItemType, type VideoItemOptions } from './types';
|
|
3
|
+
import { BaseItem } from './base-item';
|
|
4
|
+
/**
|
|
5
|
+
* 视频元素 ArtisItem 类
|
|
6
|
+
* 支持属性扩展
|
|
7
|
+
*/
|
|
8
|
+
export declare class VideoItem extends BaseItem {
|
|
9
|
+
/**
|
|
10
|
+
* 元素类型
|
|
11
|
+
*/
|
|
12
|
+
readonly type = ArtisItemType.VIDEO;
|
|
13
|
+
/**
|
|
14
|
+
* 元素属性
|
|
15
|
+
*/
|
|
16
|
+
property: VideoItemProperty;
|
|
17
|
+
constructor(options: VideoItemOptions);
|
|
18
|
+
/**
|
|
19
|
+
* 尺寸模式:'auto'=随资源自适应,'fixed'=尺寸定死。auto→fixed 由 ItemService 在显式设尺寸时翻转。
|
|
20
|
+
*/
|
|
21
|
+
get sizeMode(): 'auto' | 'fixed';
|
|
22
|
+
/**
|
|
23
|
+
* 视频地址
|
|
24
|
+
*/
|
|
25
|
+
get video(): string;
|
|
26
|
+
/**
|
|
27
|
+
* 设置视频地址
|
|
28
|
+
* @param value 视频地址
|
|
29
|
+
*/
|
|
30
|
+
set video(value: string);
|
|
31
|
+
/**
|
|
32
|
+
* 位置
|
|
33
|
+
*/
|
|
34
|
+
get position(): [number, number];
|
|
35
|
+
/**
|
|
36
|
+
* 设置位置
|
|
37
|
+
* @param value 位置坐标 [x, y]
|
|
38
|
+
*/
|
|
39
|
+
set position(value: [number, number]);
|
|
40
|
+
/**
|
|
41
|
+
* 宽度
|
|
42
|
+
*/
|
|
43
|
+
get width(): number;
|
|
44
|
+
/**
|
|
45
|
+
* 设置宽度
|
|
46
|
+
* @param value 宽度
|
|
47
|
+
*/
|
|
48
|
+
set width(value: number);
|
|
49
|
+
/**
|
|
50
|
+
* 高度
|
|
51
|
+
*/
|
|
52
|
+
get height(): number;
|
|
53
|
+
/**
|
|
54
|
+
* 设置高度
|
|
55
|
+
* @param value 高度
|
|
56
|
+
*/
|
|
57
|
+
set height(value: number);
|
|
58
|
+
/**
|
|
59
|
+
* 旋转(二维旋转角度)
|
|
60
|
+
*/
|
|
61
|
+
get rotation(): number;
|
|
62
|
+
/**
|
|
63
|
+
* 设置旋转角度(二维)
|
|
64
|
+
* @param value 旋转角度
|
|
65
|
+
*/
|
|
66
|
+
set rotation(value: number);
|
|
67
|
+
/**
|
|
68
|
+
* 是否静音
|
|
69
|
+
*/
|
|
70
|
+
get muted(): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* 设置是否静音
|
|
73
|
+
* @param state 是否静音
|
|
74
|
+
*/
|
|
75
|
+
set muted(state: boolean);
|
|
76
|
+
/**
|
|
77
|
+
* 是否为透明视频(默认 false:普通视频。true 时按左右分屏 alpha 合成渲染透明视频)
|
|
78
|
+
*/
|
|
79
|
+
get transparent(): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* 设置是否为透明视频
|
|
82
|
+
* @param state 是否透明
|
|
83
|
+
*/
|
|
84
|
+
set transparent(state: boolean);
|
|
85
|
+
/**
|
|
86
|
+
* 播放音量
|
|
87
|
+
*/
|
|
88
|
+
get volume(): number;
|
|
89
|
+
/**
|
|
90
|
+
* 设置播放音量
|
|
91
|
+
* @param value 音量
|
|
92
|
+
*/
|
|
93
|
+
set volume(value: number);
|
|
94
|
+
/**
|
|
95
|
+
* 播放速率
|
|
96
|
+
*/
|
|
97
|
+
get playbackRate(): number;
|
|
98
|
+
/**
|
|
99
|
+
* 设置播放速率
|
|
100
|
+
* @param value 播放速率
|
|
101
|
+
*/
|
|
102
|
+
set playbackRate(value: number);
|
|
103
|
+
/**
|
|
104
|
+
* 转换为 VideoItemSchema
|
|
105
|
+
* @param withParent 是否包含父节点ID
|
|
106
|
+
* @returns VideoItemSchema 对象
|
|
107
|
+
*/
|
|
108
|
+
toSchema(withParent?: boolean): VideoItemSchema;
|
|
109
|
+
/**
|
|
110
|
+
* 克隆 ArtisItem
|
|
111
|
+
* @returns 新的 VideoItem 实例
|
|
112
|
+
*/
|
|
113
|
+
clone(): VideoItem;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* 类型守卫:检查是否是 VideoItem
|
|
117
|
+
* @param obj 待检查对象
|
|
118
|
+
* @returns 是否是 VideoItem 实例
|
|
119
|
+
*/
|
|
120
|
+
export declare function isVideoItem(obj: any): obj is VideoItem;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* core/keybinding - 快捷键系统
|
|
3
|
+
*
|
|
4
|
+
* 快捷键 = 按键 → 指令 映射层,复用 CommandService。与 command/gizmo/preferences 同级 core 子模块。
|
|
5
|
+
* 跨模块只 import 被引用子模块 barrel,避开顶层 core/index 循环依赖。
|
|
6
|
+
*/
|
|
7
|
+
export type { PlatformKey, KeyBindingScope, KeyCombo, KeyBindingSpec, StoredBindingEntry, ProfileEntries, StoredProfileMap, KeyBindingChange, KeyBindingEvents, KeyBindingStore, } from './types';
|
|
8
|
+
export { KeyBindingController } from './key-binding-controller';
|
|
9
|
+
export { DuplicateComboError, MissingKeyBindingError } from './key-binding-registry';
|
|
10
|
+
export { createKeyComboFromEvent, matchCombo, comboToString, parseCombo, } from './key-matcher';
|
|
11
|
+
export { LocalStorageKeyBindingStore } from './key-binding-store';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { CommandService } from '../command';
|
|
2
|
+
import type { KeyBindingStore, KeyBindingSpec, KeyCombo, PlatformKey } from './types';
|
|
3
|
+
import { KeyBindingRegistry } from './key-binding-registry';
|
|
4
|
+
import type { GestureHandler } from '@vvfx/gizmo';
|
|
5
|
+
/** 探测平台主修饰符:mac 系用 meta,其余用 ctrl。 */
|
|
6
|
+
export declare function detectPlatformKey(): PlatformKey;
|
|
7
|
+
/**
|
|
8
|
+
* KeyBindingController - 对外门面 + 装配点
|
|
9
|
+
*
|
|
10
|
+
* 持有 KeyBindingRegistry,探测平台修饰符,构造期即订阅 GestureHandler 转发的 runtime keyDown:命中注册组合即执行对应
|
|
11
|
+
* command/handler。
|
|
12
|
+
* 对外暴露 artis.keybinding.* 命名空间方法,委托 registry。
|
|
13
|
+
*/
|
|
14
|
+
export type KeyBindingControllerOptions = {
|
|
15
|
+
commandService: CommandService;
|
|
16
|
+
store: KeyBindingStore;
|
|
17
|
+
/** 订阅 runtime Control 经 GestureHandler 转发的 keyDown。 */
|
|
18
|
+
gestureHandler: GestureHandler;
|
|
19
|
+
platformKey?: PlatformKey;
|
|
20
|
+
};
|
|
21
|
+
export declare class KeyBindingController {
|
|
22
|
+
private readonly _registry;
|
|
23
|
+
private readonly _off;
|
|
24
|
+
constructor(options: KeyBindingControllerOptions);
|
|
25
|
+
/** 解订 keyDown 监听,供 dispose/切场景清理。 */
|
|
26
|
+
dispose(): void;
|
|
27
|
+
get registry(): KeyBindingRegistry;
|
|
28
|
+
register(spec: KeyBindingSpec): void;
|
|
29
|
+
unregister(id: string): void;
|
|
30
|
+
setKey(id: string, combo: KeyCombo): void;
|
|
31
|
+
resetKey(id: string): void;
|
|
32
|
+
enable(id: string): void;
|
|
33
|
+
disable(id: string): void;
|
|
34
|
+
pauseAll(): void;
|
|
35
|
+
resumeAll(): void;
|
|
36
|
+
getAll(): KeyBindingSpec[];
|
|
37
|
+
getActiveProfile(): string;
|
|
38
|
+
getProfiles(): string[];
|
|
39
|
+
switchProfile(profileId: string): void;
|
|
40
|
+
saveProfile(profileId: string): void;
|
|
41
|
+
deleteProfile(profileId: string): void;
|
|
42
|
+
/** 订阅注册表变更(UI 监听刷新)。返回解订函数。 */
|
|
43
|
+
on(cb: (change: import('./types').KeyBindingChange) => void): () => void;
|
|
44
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KeyBindingRegistry - 运行时注册表 + 控制面 + profile
|
|
3
|
+
*
|
|
4
|
+
* 维护「id → 绑定」表,按 active profile 应用持久化 override,在按键时解析命中并执行。
|
|
5
|
+
*
|
|
6
|
+
* 关键语义:
|
|
7
|
+
* - 冲突检测精确化为「同 combo + 同 scope」报错({@link DuplicateComboError})。不同 scope 的同一 combo 可共存,
|
|
8
|
+
* 因为运行时互斥(global 仅非文本态触发、editing 仅文本态触发),用于 Esc 这类「一键两态」复用。
|
|
9
|
+
* - resolve 在文本编辑态(activeElement 为 textarea/input/contenteditable)跳过 global 绑定、仅放行 editing 绑定,
|
|
10
|
+
* 避免与 textarea 抢键。
|
|
11
|
+
* - 执行(commandId 或 handler)失败只 console.error,不上抛,避免污染键盘链路。
|
|
12
|
+
*/
|
|
13
|
+
import { EventEmitter } from '../../shared';
|
|
14
|
+
import type { CommandService } from '../command';
|
|
15
|
+
import type { KeyBindingEvents, KeyBindingSpec, KeyBindingStore, PlatformKey } from './types';
|
|
16
|
+
import { type KeyInputEvent } from './key-matcher';
|
|
17
|
+
/** 同 combo + 同 scope 被其它 id 占用时抛出。 */
|
|
18
|
+
export declare class DuplicateComboError extends Error {
|
|
19
|
+
readonly combo: string;
|
|
20
|
+
readonly existingId: string;
|
|
21
|
+
constructor(combo: string, existingId: string);
|
|
22
|
+
}
|
|
23
|
+
/** 无此 id 时由操作抛出。 */
|
|
24
|
+
export declare class MissingKeyBindingError extends Error {
|
|
25
|
+
constructor(id: string);
|
|
26
|
+
}
|
|
27
|
+
/** 构造参数。 */
|
|
28
|
+
export type KeyBindingRegistryOptions = {
|
|
29
|
+
store: KeyBindingStore;
|
|
30
|
+
commandService: CommandService;
|
|
31
|
+
platformKey: PlatformKey;
|
|
32
|
+
};
|
|
33
|
+
export declare class KeyBindingRegistry extends EventEmitter<KeyBindingEvents> {
|
|
34
|
+
private readonly _store;
|
|
35
|
+
private readonly _commandService;
|
|
36
|
+
private readonly _platformKey;
|
|
37
|
+
/** 注册的全部 spec(含默认 combo),按 id 索引。 */
|
|
38
|
+
private readonly _specs;
|
|
39
|
+
/** active profile 的持久化 override,按 id 索引。 */
|
|
40
|
+
private _overrides;
|
|
41
|
+
private _activeProfile;
|
|
42
|
+
/** 全局暂停标记(运行态,不持久化,播放态禁交互用)。 */
|
|
43
|
+
private _paused;
|
|
44
|
+
constructor(options: KeyBindingRegistryOptions);
|
|
45
|
+
/**
|
|
46
|
+
* 注册绑定。同 id 覆盖允许;若该 combo 在同 scope 被其它 id 占用则抛 {@link DuplicateComboError}。
|
|
47
|
+
* builtin 标记由 spec.builtin 携带;外部注册不带 builtin。
|
|
48
|
+
*/
|
|
49
|
+
register(spec: KeyBindingSpec): void;
|
|
50
|
+
/** 注销绑定。builtin 降级为 disable(标记persist),非 builtin 真删。 */
|
|
51
|
+
unregister(id: string): void;
|
|
52
|
+
/** 改某 id 的键位。让出旧 combo→校验新 combo(同 scope 被占则抛错)→持久化。 */
|
|
53
|
+
setKey(id: string, combo: KeyBindingSpec['combo']): void;
|
|
54
|
+
/** 还原默认键位并清该 id 的持久化 override(builtin 适用;非 builtin 抛错)。 */
|
|
55
|
+
resetKey(id: string): void;
|
|
56
|
+
enable(id: string): void;
|
|
57
|
+
disable(id: string): void;
|
|
58
|
+
pauseAll(): void;
|
|
59
|
+
resumeAll(): void;
|
|
60
|
+
/** 返回当前 profile 下所有绑定的有效形态(应用 override 后),供 UI 展示。 */
|
|
61
|
+
getAll(): KeyBindingSpec[];
|
|
62
|
+
getActiveProfile(): string;
|
|
63
|
+
/** 列出已存 profile,至少含 'default'。 */
|
|
64
|
+
getProfiles(): string[];
|
|
65
|
+
/** 切换 active profile:重建 override 表,刷新文档态。 */
|
|
66
|
+
switchProfile(profileId: string): void;
|
|
67
|
+
/** 把当前 profile 的 override 另存为新 profile。 */
|
|
68
|
+
saveProfile(profileId: string): void;
|
|
69
|
+
/** 删除 profile('default' 拒绝;若删的是 active 则切回 default)。 */
|
|
70
|
+
deleteProfile(profileId: string): void;
|
|
71
|
+
/**
|
|
72
|
+
* 解析键盘事件:命中首个 enabled 且 scope 允许的绑定则执行,返回 true。
|
|
73
|
+
* 文本编辑态跳过 global、仅放行 editing。执行异常 console.error 不上抛。
|
|
74
|
+
*/
|
|
75
|
+
resolve(event: KeyInputEvent): boolean;
|
|
76
|
+
private _execute;
|
|
77
|
+
/** 校验 combo 在同 scope 未被其它 id 占用。 */
|
|
78
|
+
private _assertComboFree;
|
|
79
|
+
private _effective;
|
|
80
|
+
private _effectiveSpec;
|
|
81
|
+
private _setDisabled;
|
|
82
|
+
private _setOverride;
|
|
83
|
+
private _reloadOverrides;
|
|
84
|
+
private _serializeOverrides;
|
|
85
|
+
private _persistProfile;
|
|
86
|
+
private _emit;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* 判断当前是否处于文本编辑上下文(textarea/input/contenteditable)。
|
|
90
|
+
* 用于 resolve 在文本态跳过 global 绑定、放行 editing 绑定。
|
|
91
|
+
*/
|
|
92
|
+
export declare function isInTextEditingContext(): boolean;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KeyBindingStore 默认实现 - 基于 localStorage 的多 profile 持久化。
|
|
3
|
+
*
|
|
4
|
+
* 持久化范围:profileId → { id → { combo, disabled? } };activeProfile 单独存储。
|
|
5
|
+
* 隐私模式 / SSR 等无 localStorage 环境下退化为内存 Map,保证不崩、当 session 有效。
|
|
6
|
+
*/
|
|
7
|
+
import type { KeyBindingStore, ProfileEntries, StoredProfileMap } from './types';
|
|
8
|
+
/**
|
|
9
|
+
* 基于 localStorage 的默认持久化实现。
|
|
10
|
+
* 若 localStorage 不可用(隐私模式 / SSR),自动委托内存后端。
|
|
11
|
+
*/
|
|
12
|
+
export declare class LocalStorageKeyBindingStore implements KeyBindingStore {
|
|
13
|
+
private _memory;
|
|
14
|
+
private readonly _profilesKey;
|
|
15
|
+
private readonly _activeProfileKey;
|
|
16
|
+
constructor(profilesKey?: string, activeProfileKey?: string);
|
|
17
|
+
/** localStorage 不可用时退化到内存后端。 */
|
|
18
|
+
private fallback;
|
|
19
|
+
loadAll(): StoredProfileMap;
|
|
20
|
+
saveProfile(profileId: string, entries: ProfileEntries): void;
|
|
21
|
+
deleteProfile(profileId: string): void;
|
|
22
|
+
/** 读取当前盘上 profile map,按本次写入项合并(空 entries 视为删除该项)后返回待落盘全量。 */
|
|
23
|
+
private _mergedProfiles;
|
|
24
|
+
/** 整块落盘 profiles map;localStorage 不可用或写失败时走 fallback。 */
|
|
25
|
+
private _writeProfiles;
|
|
26
|
+
listProfiles(): string[];
|
|
27
|
+
getActiveProfile(): string;
|
|
28
|
+
setActiveProfile(profileId: string): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KeyMatcher - 键位归一与匹配
|
|
3
|
+
*
|
|
4
|
+
* 1. createKeyComboFromEvent:把原生 KeyboardEvent 归一为平台无关的 KeyCombo
|
|
5
|
+
* (key 小写、ctrl 修饰符按 platformKey 映射)。
|
|
6
|
+
* 2. matchCombo:判断事件是否命中某组合。
|
|
7
|
+
* 3. comboToString / parseCombo:组合与字符串互逆,供注册表反查与内置表声明。
|
|
8
|
+
*
|
|
9
|
+
* 修饰符顺序约定为 ctrl, alt, shift,comboString 形如 'meta+z' / 'delete' / 'shift+/'。
|
|
10
|
+
*/
|
|
11
|
+
import type { KeyCombo, PlatformKey } from './types';
|
|
12
|
+
import { InputEventKey } from '@galacean/effects';
|
|
13
|
+
export type KeyInputEvent = KeyboardEvent | InputEventKey;
|
|
14
|
+
/**
|
|
15
|
+
* 把原生键盘事件归一为 KeyCombo。
|
|
16
|
+
* key 经归一化,修饰符合并到平台无关的 `ctrl`(mac=metaKey / win=ctrlKey)。
|
|
17
|
+
*/
|
|
18
|
+
export declare function createKeyComboFromEvent(e: KeyInputEvent, platformKey: PlatformKey): KeyCombo;
|
|
19
|
+
/** 判断原生事件是否命中某组合。 */
|
|
20
|
+
export declare function matchCombo(e: KeyInputEvent, spec: KeyCombo, platformKey: PlatformKey): boolean;
|
|
21
|
+
/** 把组合序列化为字符串,如 'ctrl+shift+z' / 'delete' / ' '。 */
|
|
22
|
+
export declare function comboToString(combo: KeyCombo): string;
|
|
23
|
+
/** 把字符串解析回组合。平台无关:修饰符一律用 'ctrl' 抽象位(platformKey 仅在匹配事件时使用)。 */
|
|
24
|
+
export declare function parseCombo(str: string): KeyCombo;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 快捷键系统 - 类型定义
|
|
3
|
+
*
|
|
4
|
+
* 快捷键本质是「按键 → 指令」的映射层,复用既有 CommandService:键位命中后走
|
|
5
|
+
* `commandService.execute(commandId, ...args)`,或经 handler 旁路(undo/redo 等非命令动作)。
|
|
6
|
+
*
|
|
7
|
+
* 设计要点:
|
|
8
|
+
* - `KeyCombo` 用平台无关的抽象修饰符 `ctrl`:mac 下匹配 `metaKey`、win 下匹配
|
|
9
|
+
* `ctrlKey`,具体由 KeyMatcher 按 `platformKey` 解释,不进 spec,避免耦合平台。
|
|
10
|
+
* - 同一 combo 在同一 profile 内被其它 id 占用即报错(DuplicateComboError),不做抢占共存。
|
|
11
|
+
* - 键位配置按 profile 隔离,支持多套交互配置(见 KeyBindingStore)。
|
|
12
|
+
*/
|
|
13
|
+
/** 平台修饰符键:mac 用 'meta',其余用 'ctrl'。决定 KeyCombo.ctrl 匹配哪个原生按键。 */
|
|
14
|
+
export type PlatformKey = 'ctrl' | 'meta';
|
|
15
|
+
/** 快捷键作用域。'editing' 仅在文本编辑态放行;'global' 在文本态自动跳过(不抢 textarea 按键)。 */
|
|
16
|
+
export type KeyBindingScope = 'global' | 'editing';
|
|
17
|
+
/** 归一化后的按键组合。ctrl 在 mac=metaKey、win=ctrlKey,由 matcher 按 platformKey 解释。 */
|
|
18
|
+
export type KeyCombo = {
|
|
19
|
+
/** KeyboardEvent.key 小写归一,如 'delete' / 'z' / '=' / '/' / ' ' */
|
|
20
|
+
key: string;
|
|
21
|
+
/** 主修饰符(平台无关):mac 下匹配 metaKey、win 下匹配 ctrlKey */
|
|
22
|
+
ctrl?: boolean;
|
|
23
|
+
alt?: boolean;
|
|
24
|
+
shift?: boolean;
|
|
25
|
+
};
|
|
26
|
+
/** 单个 profile 内某条 binding 的持久化项。只存改后的键位与禁用标记,不存 handler/command。 */
|
|
27
|
+
export type StoredBindingEntry = {
|
|
28
|
+
/** 改后的键位;缺省表示沿用 spec 默认 combo(仅记录 disabled 时可为空)。 */
|
|
29
|
+
combo?: KeyCombo;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
};
|
|
32
|
+
/** 单个 profile 的全部 overrides,按 id 索引。 */
|
|
33
|
+
export type ProfileEntries = Record<string, StoredBindingEntry>;
|
|
34
|
+
/** 全部 profile 的存储形态:profileId → { id → override }。 */
|
|
35
|
+
export type StoredProfileMap = Record<string, ProfileEntries>;
|
|
36
|
+
/** 快捷键绑定规格:注册时传入,描述「某 id 在某键位触发什么」。 */
|
|
37
|
+
export type KeyBindingSpec = {
|
|
38
|
+
/** 逻辑指令标识,如 'item.delete' / 'edit.undo' / 'myapp.custom',可被外部引用、改键、禁用 */
|
|
39
|
+
id: string;
|
|
40
|
+
/** 当前生效键位(可被 setKey 覆盖并持久化到 active profile) */
|
|
41
|
+
combo: KeyCombo;
|
|
42
|
+
/** 走 CommandService 的路径(与 handler 二选一;二者都有时 commandId 优先) */
|
|
43
|
+
commandId?: string;
|
|
44
|
+
/** execute 透传参数(单参对象;静态 args 场景;需运行时上下文的场景请用 handler) */
|
|
45
|
+
args?: Record<string, unknown>;
|
|
46
|
+
/** 非 command 旁路:undo/redo、退出文本编辑等,或需动态取选中元素的内置绑定 */
|
|
47
|
+
handler?: () => void;
|
|
48
|
+
/** 临时关闭开关(运行态,不进 profile 持久化,仅 disabled 标记持久化) */
|
|
49
|
+
enabled?: boolean;
|
|
50
|
+
/** 作用域:'global' 默认;'editing' 仅文本编辑态放行 */
|
|
51
|
+
scope?: KeyBindingScope;
|
|
52
|
+
/** 内置标记:unregister 降级为 disable,resetKey 还原默认 */
|
|
53
|
+
builtin?: boolean;
|
|
54
|
+
/** UI 展示用标签 */
|
|
55
|
+
label?: string;
|
|
56
|
+
};
|
|
57
|
+
/** 注册表 / profile 变更事件负载。 */
|
|
58
|
+
export type KeyBindingChange = {
|
|
59
|
+
type: 'register' | 'unregister' | 'setKey' | 'resetKey' | 'enable' | 'disable' | 'pauseAll' | 'resumeAll' | 'switchProfile' | 'saveProfile' | 'deleteProfile';
|
|
60
|
+
id?: string;
|
|
61
|
+
profileId?: string;
|
|
62
|
+
};
|
|
63
|
+
/** 快捷键事件订阅表(@galacean EventEmitter 要求值为参数元组数组)。 */
|
|
64
|
+
export type KeyBindingEvents = {
|
|
65
|
+
change: [KeyBindingChange];
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* 持久化层抽象(默认 localStorage 实现)。
|
|
69
|
+
* 宿主可注入自定义 Store(远程配置中心等),便于平台支持多套交互配置。
|
|
70
|
+
* 只持久化 profile→{id→combo/disabled},不存 handler/commandId(注册期确定,存了有反序列化风险)。
|
|
71
|
+
*/
|
|
72
|
+
export interface KeyBindingStore {
|
|
73
|
+
/** 读取全部 profile 的 overrides。 */
|
|
74
|
+
loadAll(): StoredProfileMap;
|
|
75
|
+
/** 写入(或覆盖)单个 profile。 */
|
|
76
|
+
saveProfile(profileId: string, entries: ProfileEntries): void;
|
|
77
|
+
/** 删除某个 profile('default' 由实现拒绝)。 */
|
|
78
|
+
deleteProfile(profileId: string): void;
|
|
79
|
+
/** 列出已存的 profileId。 */
|
|
80
|
+
listProfiles(): string[];
|
|
81
|
+
/** 当前激活 profile(单独持久化,刷新后回到上次)。 */
|
|
82
|
+
getActiveProfile(): string;
|
|
83
|
+
setActiveProfile(profileId: string): void;
|
|
84
|
+
}
|