iflow-engine 1.0.6 → 1.0.8

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.
Files changed (110) hide show
  1. package/dist/assets/hdr/001.hdr +0 -0
  2. package/dist/assets/svg/rotate-orbit.svg +1 -0
  3. package/dist/assets/viewcube/cn_back.png +0 -0
  4. package/dist/assets/viewcube/cn_bottom.png +0 -0
  5. package/dist/assets/viewcube/cn_front.png +0 -0
  6. package/dist/assets/viewcube/cn_left.png +0 -0
  7. package/dist/assets/viewcube/cn_right.png +0 -0
  8. package/dist/assets/viewcube/cn_top.png +0 -0
  9. package/dist/assets/viewcube/home.png +0 -0
  10. package/dist/draco/DRACOLoader.js +739 -0
  11. package/dist/draco/draco_decoder.js +52 -0
  12. package/dist/draco/draco_decoder.wasm +0 -0
  13. package/dist/draco/draco_encoder.js +33 -0
  14. package/dist/draco/draco_wasm_wrapper.js +104 -0
  15. package/dist/engine/src/bim-engine.d.ts +51 -0
  16. package/dist/engine/src/components/ai-chat/index.d.ts +202 -0
  17. package/dist/engine/src/components/ai-chat/types.d.ts +133 -0
  18. package/dist/engine/src/components/button-group/index.d.ts +89 -0
  19. package/dist/engine/src/components/button-group/index.type.d.ts +84 -0
  20. package/dist/engine/src/components/button-group/toolbar/buttons/ai-chat/index.d.ts +2 -0
  21. package/dist/engine/src/components/button-group/toolbar/buttons/fullscreen/index.d.ts +2 -0
  22. package/dist/engine/src/components/button-group/toolbar/buttons/home/index.d.ts +2 -0
  23. package/dist/engine/src/components/button-group/toolbar/buttons/info/icon.d.ts +1 -0
  24. package/dist/engine/src/components/button-group/toolbar/buttons/info/index.d.ts +2 -0
  25. package/dist/engine/src/components/button-group/toolbar/buttons/map/index.d.ts +2 -0
  26. package/dist/engine/src/components/button-group/toolbar/buttons/measure/index.d.ts +2 -0
  27. package/dist/engine/src/components/button-group/toolbar/buttons/property/index.d.ts +2 -0
  28. package/dist/engine/src/components/button-group/toolbar/buttons/section/section-axis/index.d.ts +2 -0
  29. package/dist/engine/src/components/button-group/toolbar/buttons/section/section-box/index.d.ts +2 -0
  30. package/dist/engine/src/components/button-group/toolbar/buttons/section/section-menu/index.d.ts +2 -0
  31. package/dist/engine/src/components/button-group/toolbar/buttons/section/section-plane/index.d.ts +2 -0
  32. package/dist/engine/src/components/button-group/toolbar/buttons/setting/index.d.ts +2 -0
  33. package/dist/engine/src/components/button-group/toolbar/buttons/walk/walk-bird/index.d.ts +2 -0
  34. package/dist/engine/src/components/button-group/toolbar/buttons/walk/walk-menu/index.d.ts +2 -0
  35. package/dist/engine/src/components/button-group/toolbar/buttons/walk/walk-person/index.d.ts +2 -0
  36. package/dist/engine/src/components/button-group/toolbar/buttons/zoom-box/index.d.ts +2 -0
  37. package/dist/engine/src/components/button-group/toolbar/index.d.ts +4 -0
  38. package/dist/engine/src/components/collapse/index.d.ts +21 -0
  39. package/dist/engine/src/components/collapse/types.d.ts +34 -0
  40. package/dist/engine/src/components/description/index.d.ts +25 -0
  41. package/dist/engine/src/components/description/types.d.ts +43 -0
  42. package/dist/engine/src/components/dialog/index.d.ts +87 -0
  43. package/dist/engine/src/components/dialog/index.type.d.ts +57 -0
  44. package/dist/engine/src/components/engine/index.d.ts +436 -0
  45. package/dist/engine/src/components/engine/types.d.ts +31 -0
  46. package/dist/engine/src/components/measure-panel/index.d.ts +185 -0
  47. package/dist/engine/src/components/measure-panel/types.d.ts +87 -0
  48. package/dist/engine/src/components/menu/buttons/four.d.ts +2 -0
  49. package/dist/engine/src/components/menu/buttons/home.d.ts +2 -0
  50. package/dist/engine/src/components/menu/buttons/info.d.ts +2 -0
  51. package/dist/engine/src/components/menu/buttons/second.d.ts +2 -0
  52. package/dist/engine/src/components/menu/index.d.ts +57 -0
  53. package/dist/engine/src/components/menu/item.d.ts +12 -0
  54. package/dist/engine/src/components/menu/types.d.ts +34 -0
  55. package/dist/engine/src/components/right-key/index.d.ts +55 -0
  56. package/dist/engine/src/components/right-key/types.d.ts +20 -0
  57. package/dist/engine/src/components/section-axis-panel/index.d.ts +88 -0
  58. package/dist/engine/src/components/section-axis-panel/types.d.ts +31 -0
  59. package/dist/engine/src/components/section-box-panel/index.d.ts +53 -0
  60. package/dist/engine/src/components/section-box-panel/types.d.ts +60 -0
  61. package/dist/engine/src/components/section-plane-panel/index.d.ts +48 -0
  62. package/dist/engine/src/components/section-plane-panel/types.d.ts +22 -0
  63. package/dist/engine/src/components/tab/index.d.ts +64 -0
  64. package/dist/engine/src/components/tab/index.type.d.ts +35 -0
  65. package/dist/engine/src/components/tree/index.d.ts +71 -0
  66. package/dist/engine/src/components/tree/tree-node.d.ts +60 -0
  67. package/dist/engine/src/components/tree/types.d.ts +74 -0
  68. package/dist/engine/src/components/walk-control-panel/index.d.ts +46 -0
  69. package/dist/engine/src/components/walk-control-panel/types.d.ts +64 -0
  70. package/dist/engine/src/components/walk-path-panel/index.d.ts +102 -0
  71. package/dist/engine/src/components/walk-path-panel/types.d.ts +22 -0
  72. package/dist/engine/src/components/walk-plan-view-panel/index.d.ts +16 -0
  73. package/dist/engine/src/core/base-dialog-manager.d.ts +57 -0
  74. package/dist/engine/src/core/base-manager.d.ts +31 -0
  75. package/dist/engine/src/core/event-emitter.d.ts +36 -0
  76. package/dist/engine/src/core/manager-registry.d.ts +89 -0
  77. package/dist/engine/src/index.d.ts +10 -0
  78. package/dist/engine/src/locales/en-US.d.ts +2 -0
  79. package/dist/engine/src/locales/types.d.ts +236 -0
  80. package/dist/engine/src/locales/zh-CN.d.ts +2 -0
  81. package/dist/engine/src/managers/ai-chat-manager.d.ts +86 -0
  82. package/dist/engine/src/managers/button-group-manager.d.ts +35 -0
  83. package/dist/engine/src/managers/component-detail-manager.d.ts +24 -0
  84. package/dist/engine/src/managers/construct-tree-manager-btn.d.ts +89 -0
  85. package/dist/engine/src/managers/dialog-manager.d.ts +12 -0
  86. package/dist/engine/src/managers/engine-info-dialog-manager.d.ts +12 -0
  87. package/dist/engine/src/managers/engine-manager.d.ts +242 -0
  88. package/dist/engine/src/managers/measure-dialog-manager.d.ts +24 -0
  89. package/dist/engine/src/managers/right-key-manager.d.ts +34 -0
  90. package/dist/engine/src/managers/section-axis-dialog-manager.d.ts +55 -0
  91. package/dist/engine/src/managers/section-box-dialog-manager.d.ts +58 -0
  92. package/dist/engine/src/managers/section-plane-dialog-manager.d.ts +35 -0
  93. package/dist/engine/src/managers/toolbar-manager.d.ts +81 -0
  94. package/dist/engine/src/managers/walk-control-manager.d.ts +21 -0
  95. package/dist/engine/src/managers/walk-path-dialog-manager.d.ts +33 -0
  96. package/dist/engine/src/managers/walk-plan-view-dialog-manager.d.ts +33 -0
  97. package/dist/engine/src/services/locale.d.ts +35 -0
  98. package/dist/engine/src/services/theme.d.ts +35 -0
  99. package/dist/engine/src/themes/presets.d.ts +15 -0
  100. package/dist/engine/src/themes/types.d.ts +261 -0
  101. package/dist/engine/src/types/component.d.ts +27 -0
  102. package/dist/engine/src/types/events.d.ts +104 -0
  103. package/dist/engine/src/types/measure.d.ts +57 -0
  104. package/dist/engine/src/utils/icon-manager.d.ts +10 -0
  105. package/dist/iflow-engine.es.js +16816 -11998
  106. package/dist/iflow-engine.es.js.map +1 -1
  107. package/dist/iflow-engine.umd.js +2264 -173
  108. package/dist/iflow-engine.umd.js.map +1 -1
  109. package/package.json +3 -3
  110. package/dist/index.d.ts +0 -1963
package/dist/index.d.ts DELETED
@@ -1,1963 +0,0 @@
1
- /**
2
- * 对话框管理器抽象基类
3
- * 子类需要实现 dialogId、dialogTitle 和 createContent 方法
4
- */
5
- declare abstract class BaseDialogManager extends BaseManager {
6
- /** 对话框实例 */
7
- protected dialog: BimDialog | null;
8
- /** 对话框是否可见 */
9
- protected isVisible: boolean;
10
- /** 对话框唯一标识(子类必须实现) */
11
- protected abstract get dialogId(): string;
12
- /** 对话框标题,支持国际化 key(子类必须实现) */
13
- protected abstract get dialogTitle(): string;
14
- /** 对话框宽度,默认 300 */
15
- protected get dialogWidth(): number;
16
- /** 对话框高度,默认 'auto' 自适应 */
17
- protected get dialogHeight(): number | 'auto';
18
- /** 对话框选项,默认可拖拽不可缩放 */
19
- protected get dialogOptions(): DialogManagerOptions;
20
- /** 创建对话框内容(子类必须实现) */
21
- protected abstract createContent(): HTMLElement;
22
- /** 对话框关闭时的回调,子类可重写 */
23
- protected onDialogClose(): void;
24
- /** 对话框创建后的回调,子类可重写 */
25
- protected onDialogCreated(): void;
26
- /** 销毁前的回调,子类可重写 */
27
- protected onBeforeDestroy(): void;
28
- /**
29
- * 获取对话框位置
30
- * 默认定位在容器右侧居中,子类可重写
31
- */
32
- protected getDialogPosition(): {
33
- x: number;
34
- y: number;
35
- };
36
- /** 显示对话框 */
37
- show(): void;
38
- /** 隐藏对话框 */
39
- hide(): void;
40
- /** 切换对话框显示状态 */
41
- toggle(): void;
42
- /** 获取对话框是否打开 */
43
- isOpen(): boolean;
44
- /** 销毁对话框 */
45
- protected destroyDialog(): void;
46
- /** 销毁管理器 */
47
- destroy(): void;
48
- }
49
-
50
- /**
51
- * Manager 抽象基类
52
- * - 自动获取 Registry 实例
53
- * - 自动管理事件订阅的清理
54
- */
55
- declare abstract class BaseManager {
56
- /** 注册表实例 */
57
- protected registry: ManagerRegistry;
58
- /** 事件订阅列表,用于自动清理 */
59
- private subscriptions;
60
- constructor();
61
- /**
62
- * 订阅事件(自动追踪,destroy 时自动取消)
63
- * @param event 事件名称
64
- * @param handler 事件处理函数
65
- */
66
- protected subscribe<K extends keyof EngineEvents>(event: K, handler: (payload: EngineEvents[K]) => void): void;
67
- /**
68
- * 发送事件
69
- * @param event 事件名称
70
- * @param payload 事件数据
71
- */
72
- protected emit<K extends keyof EngineEvents>(event: K, payload: EngineEvents[K]): void;
73
- /**
74
- * 销毁 Manager,清理所有订阅
75
- * 子类应该调用 super.destroy()
76
- */
77
- destroy(): void;
78
- }
79
-
80
- declare class BimButtonGroup implements IBimComponent {
81
- private container;
82
- private options;
83
- private groups;
84
- private activeBtnIds;
85
- private btnRefs;
86
- private dropdownElement;
87
- private hoverTimeout;
88
- private customColors;
89
- private unsubscribeLocale;
90
- private unsubscribeTheme;
91
- private readonly DEFAULT_ICON;
92
- constructor(options: ButtonGroupOptions);
93
- protected emit<K extends keyof EngineEvents>(event: K, payload: EngineEvents[K]): void;
94
- private initContainer;
95
- /**
96
- * 设置事件拦截,防止事件冒泡到下层元素(如 3D 引擎)
97
- */
98
- private setupEventInterception;
99
- private updatePosition;
100
- /**
101
- * 应用样式到容器
102
- */
103
- private applyStyles;
104
- /**
105
- * 设置主题的primary颜色(用于边框等)
106
- */
107
- private setPrimaryColor;
108
- /**
109
- * 设置主题颜色
110
- * 只会应用到没有被用户自定义的颜色属性上
111
- */
112
- setTheme(theme: ThemeConfig): void;
113
- /**
114
- * 应用主题系统的 CSS 变量到容器
115
- * 供 glass-pill 等样式变体使用
116
- */
117
- private applyThemeCssVars;
118
- /**
119
- * 同步 CSS 变量到所有 dropdown 元素
120
- * dropdown 被添加到 body,无法继承容器的 CSS 变量
121
- */
122
- private syncDropdownCssVars;
123
- /**
124
- * 直接设置颜色(强制覆盖)
125
- * 设置的颜色会被标记为自定义,后续的 setTheme 不会覆盖它们
126
- */
127
- setColors(colors: ButtonGroupColors): void;
128
- init(): Promise<void>;
129
- setLocales(): void;
130
- addGroup(groupId: string, beforeGroupId?: string): void;
131
- addButton(config: ButtonConfig): void;
132
- private findButton;
133
- render(): void;
134
- private renderGroup;
135
- private renderButton;
136
- /**
137
- * 设置按钮的激活状态
138
- * @param id 按钮 ID
139
- * @param active 可选,如果不传则切换(toggle)当前状态
140
- */
141
- setBtnActive(id: string, active?: boolean): void;
142
- private handleClick;
143
- /**
144
- * 互斥关闭同范围内的其它已激活按钮,并触发它们的 onClick
145
- * @param button 当前被激活的按钮
146
- */
147
- private deactivateExclusiveSiblings;
148
- private handleMouseEnter;
149
- private handleMouseLeave;
150
- private showDropdown;
151
- private renderDropdownItem;
152
- private closeDropdown;
153
- private updateButtonState;
154
- private getIcon;
155
- updateButtonVisibility(id: string, visible: boolean): void;
156
- setShowLabel(show: boolean): void;
157
- private updateLabelsVisibility;
158
- private findButtonById;
159
- setBackgroundColor(color: string): void;
160
- private isVisible;
161
- destroy(): void;
162
- }
163
-
164
- /**
165
- * 通用弹窗组件类
166
- * 支持拖拽、缩放、自定义内容和位置。
167
- */
168
- declare class BimDialog implements IBimComponent {
169
- private element;
170
- private options;
171
- private container;
172
- private header;
173
- private contentArea;
174
- private _isDestroyed;
175
- private _isInitialized;
176
- private unsubscribeTheme;
177
- private unsubscribeLocale;
178
- private rafId;
179
- /**
180
- * 构造函数
181
- * @param options 弹窗配置选项
182
- */
183
- constructor(options: DialogOptions);
184
- /**
185
- * 设置主题
186
- * @param theme 全局主题配置
187
- */
188
- setTheme(theme: ThemeConfig): void;
189
- /**
190
- * 初始化组件功能 (接口实现)
191
- */
192
- init(): void;
193
- setLocales(): void;
194
- /**
195
- * 创建弹窗的 DOM 结构
196
- */
197
- private createDom;
198
- /**
199
- * 设置元素尺寸
200
- */
201
- private setSize;
202
- /**
203
- * 根据内容自动调整弹窗宽度
204
- * @param recenter 是否重新计算定位(例如保持居中),默认 true
205
- */
206
- fitWidth(recenter?: boolean): void;
207
- /**
208
- * 根据内容自动调整弹窗高度
209
- *
210
- * 设计说明:
211
- * - 主要用于“内容展开/收起”场景(比如测量面板展开后,Dialog 高度跟随变化)
212
- * - 默认不改变用户拖拽后的当前位置,只做边界夹紧,避免弹窗超出容器
213
- *
214
- * @param recenter 是否根据 options.position 重新定位(默认 false)
215
- */
216
- fitHeight(recenter?: boolean): void;
217
- /**
218
- * 边界夹紧:保持当前 left/top 不变的前提下,确保弹窗不超出容器
219
- * 说明:用于 fitHeight / fitWidth 后的“尺寸变化”场景,避免弹窗被裁切。
220
- */
221
- private clampToContainer;
222
- /**
223
- * 初始化弹窗位置
224
- */
225
- private initPosition;
226
- /**
227
- * 初始化拖拽功能 (性能优化 + 解决粘手)
228
- */
229
- private initDrag;
230
- /**
231
- * 初始化缩放功能 (性能优化 + 解决粘手)
232
- */
233
- private initResize;
234
- /**
235
- * 动态设置内容
236
- * @param content 内容元素或 HTML 字符串
237
- */
238
- setContent(content: HTMLElement | string): void;
239
- /**
240
- * 关闭弹窗并销毁
241
- */
242
- close(): void;
243
- /**
244
- * 销毁组件 (接口实现)
245
- */
246
- destroy(): void;
247
- }
248
-
249
- export declare class BimEngine {
250
- container: HTMLElement;
251
- private wrapper;
252
- private registry;
253
- toolbar: ToolbarManager | null;
254
- constructTreeBtn: ConstructTreeManagerBtn | null;
255
- buttonGroup: ButtonGroupManager | null;
256
- dialog: DialogManager | null;
257
- engine: EngineManager | null;
258
- rightKey: RightKeyManager | null;
259
- propertyPanel: PropertyPanelManager | null;
260
- measure: MeasureDialogManager | null;
261
- sectionPlane: SectionPlaneDialogManager | null;
262
- sectionAxis: SectionAxisDialogManager | null;
263
- sectionBox: SectionBoxDialogManager | null;
264
- walkControl: WalkControlManager | null;
265
- map: MapDialogManager | null;
266
- constructor(container: HTMLElement | string, options?: {
267
- locale?: LocaleType;
268
- theme?: ThemeType;
269
- });
270
- emit<K extends keyof EngineEvents>(event: K, payload: EngineEvents[K]): void;
271
- on<K extends keyof EngineEvents>(event: K, listener: (payload: EngineEvents[K]) => void): () => void;
272
- setLocale(locale: LocaleType): void;
273
- getLocale(): LocaleType;
274
- setTheme(theme: 'dark' | 'light'): void;
275
- setCustomTheme(theme: ThemeConfig): void;
276
- private init;
277
- private updateTheme;
278
- destroy(): void;
279
- }
280
-
281
- /**
282
- * 树节点类
283
- * 负责渲染单个节点、处理交互和递归
284
- */
285
- declare class BimTreeNode {
286
- config: TreeNodeConfig;
287
- element: HTMLElement;
288
- children: BimTreeNode[];
289
- parent: BimTreeNode | null;
290
- checkState: TreeNodeCheckState;
291
- private contentEl;
292
- private switcherEl;
293
- private checkboxEl;
294
- private titleEl;
295
- private actionsEl;
296
- private childrenContainer;
297
- private onExpandChange;
298
- private onCheckChange;
299
- private onNodeClick;
300
- private renderActions?;
301
- constructor(config: TreeNodeConfig, options: TreeOptions, callbacks: {
302
- onExpand: (n: BimTreeNode) => void;
303
- onCheck: (n: BimTreeNode) => void;
304
- onClick: (n: BimTreeNode) => void;
305
- });
306
- /**
307
- * 创建节点 DOM
308
- */
309
- private createDom;
310
- /**
311
- * 设置高亮选中状态 (Select 模式下)
312
- */
313
- setSelected(selected: boolean): void;
314
- /**
315
- * 更新显示文本 (国际化支持) -> 移除国际化,直接显示
316
- */
317
- updateLabel(): void;
318
- /**
319
- * 切换展开状态
320
- */
321
- toggleExpand(force?: boolean): void;
322
- /**
323
- * 切换选中状态 (用户点击)
324
- */
325
- toggleCheck(): void;
326
- /**
327
- * 设置选中状态 (API调用或联动)
328
- * @param state 新状态
329
- * @param fireEvent 是否触发事件
330
- */
331
- setChecked(state: TreeNodeCheckState, fireEvent?: boolean): void;
332
- /**
333
- * 更新复选框 UI 样式
334
- */
335
- updateCheckboxUI(): void;
336
- /**
337
- * 添加子节点实例
338
- */
339
- appendChild(childNode: BimTreeNode): void;
340
- /**
341
- * 销毁
342
- */
343
- destroy(): void;
344
- }
345
-
346
- /**
347
- * Blur Token
348
- * CSS backdrop-filter blur value (e.g., '24px')
349
- */
350
- declare type BlurToken = string;
351
-
352
- /** 按钮内部文字图标排列 */
353
- declare type ButtonAlign = 'vertical' | 'horizontal';
354
-
355
- /** 按钮配置 */
356
- export declare interface ButtonConfig {
357
- id: string;
358
- type: ButtonType;
359
- label: string;
360
- icon?: string;
361
- keepActive?: boolean;
362
- /**
363
- * 是否互斥(开关互斥)
364
- *
365
- * 行为说明:
366
- * - 当按钮从“未激活”切换到“激活”时,如果该按钮开启了 exclusive,
367
- * 会自动关闭同互斥范围内的其它已激活按钮,并触发它们的 onClick(用于执行关闭逻辑)。
368
- * - 一级按钮:互斥范围 = 同 groupId 下的一级按钮
369
- * - 二级按钮:互斥范围 = 同 groupId 且同 parentId 下的二级按钮
370
- *
371
- * 注意:该能力通常与 keepActive 搭配使用。
372
- */
373
- exclusive?: boolean;
374
- isActive?: boolean;
375
- disabled?: boolean;
376
- onClick?: (button: OptButton) => void;
377
- children?: ButtonConfig[];
378
- groupId?: string;
379
- parentId?: string;
380
- /** 按钮内部图标文字排列 (默认 vertical,即图标在上) */
381
- align?: ButtonAlign;
382
- /** 图标大小 (正方形,单位 px,默认 32) */
383
- iconSize?: number;
384
- /** 按钮最小宽度 (单位 px,默认 50) */
385
- minWidth?: number;
386
- }
387
-
388
- declare interface ButtonGroupColors {
389
- backgroundColor?: string;
390
- btnBackgroundColor?: string;
391
- btnHoverColor?: string;
392
- btnActiveColor?: string;
393
- iconColor?: string;
394
- iconActiveColor?: string;
395
- textColor?: string;
396
- textActiveColor?: string;
397
- }
398
-
399
- /**
400
- * 按钮组管理器
401
- * 统一管理多个按钮组的创建、主题更新和销毁
402
- */
403
- declare class ButtonGroupManager extends BaseManager {
404
- /** 按钮组映射表 */
405
- private groups;
406
- /** 容器元素 */
407
- private container;
408
- constructor(container: HTMLElement);
409
- /**
410
- * 创建按钮组
411
- * @param id 按钮组 ID
412
- * @param options 按钮组配置
413
- * @returns 按钮组实例
414
- */
415
- create(id: string, options: Omit<ButtonGroupOptions, 'container'>): BimButtonGroup;
416
- /**
417
- * 获取按钮组
418
- * @param id 按钮组 ID
419
- * @returns 按钮组实例
420
- */
421
- get(id: string): BimButtonGroup | undefined;
422
- /**
423
- * 更新所有按钮组的主题
424
- * @param theme 主题配置
425
- */
426
- updateTheme(theme: ThemeConfig): void;
427
- /** 销毁管理器和所有按钮组 */
428
- destroy(): void;
429
- }
430
-
431
- export declare interface ButtonGroupOptions extends ButtonGroupColors {
432
- container: HTMLElement | string;
433
- /** 样式类型 (默认 'default') */
434
- type?: ButtonGroupType;
435
- /** 屏幕位置 (如 top-left) */
436
- position?: GroupPosition;
437
- /** 按钮组排列方向 (默认 row) */
438
- direction?: GroupDirection;
439
- /** 按钮内部图标文字排列 (默认 vertical) */
440
- align?: ButtonAlign;
441
- /** 菜单展开方向 */
442
- expand?: ExpandDirection;
443
- showLabel?: boolean;
444
- visibility?: Record<string, boolean>;
445
- className?: string;
446
- }
447
-
448
- /** 按钮组样式类型 */
449
- declare type ButtonGroupType = 'default' | 'glass-pill';
450
-
451
- declare type ButtonType = 'button' | 'menu';
452
-
453
- /**
454
- * 角色模型类型
455
- */
456
- declare type CharacterModel = 'office-male' | 'construction-worker';
457
-
458
- export declare interface CollapseItemConfig {
459
- /** 唯一标识符 */
460
- id: string;
461
- /** 标题文本的翻译键 (例如 'panel.attributes') */
462
- title: string;
463
- /** 内容: HTML字符串 或 HTMLElement */
464
- content: string | HTMLElement;
465
- /** 标题栏左侧图标 (SVG 字符串, 可选) */
466
- icon?: string;
467
- /** 标题栏右侧额外内容 (可选) */
468
- extra?: string | HTMLElement;
469
- /** 是否禁用 */
470
- disabled?: boolean;
471
- /** 自定义类名 */
472
- className?: string;
473
- }
474
-
475
- export declare interface CollapseOptions {
476
- /** 挂载容器 */
477
- container: HTMLElement | string;
478
- /** 面板项列表 */
479
- items: CollapseItemConfig[];
480
- /** 是否开启手风琴模式 (默认 false) */
481
- accordion?: boolean;
482
- /** 初始展开的面板 ID 列表 */
483
- activeIds?: string[];
484
- /** 是否显示边框 (默认 true) */
485
- bordered?: boolean;
486
- /** 是否幽灵模式 (默认 false) */
487
- ghost?: boolean;
488
- /** 自定义类名 */
489
- className?: string;
490
- /** 切换面板时的回调 */
491
- onChange?: (activeIds: string[]) => void;
492
- }
493
-
494
- /**
495
- * BIM Engine SDK - Unified Theme System
496
- *
497
- * Design Principles:
498
- * 1. Semantic naming - colors describe PURPOSE, not appearance
499
- * 2. Hierarchical structure - organized by category for scalability
500
- * 3. Complete coverage - all UI states and component needs
501
- * 4. Accessibility - ensures proper contrast ratios
502
- * 5. Glassmorphism support - includes transparency and blur values
503
- *
504
- * Color Palette Reference: Tailwind CSS (slate, blue, red, green, amber)
505
- */
506
- /**
507
- * Semantic Color Token
508
- * Represents a single color value with optional transparency
509
- */
510
- declare type ColorToken = string;
511
-
512
- /**
513
- * 构件树管理器
514
- * 管理左上角的构件树按钮和对话框
515
- */
516
- declare class ConstructTreeManagerBtn extends BaseManager {
517
- /** 按钮组实例 */
518
- private toolbar;
519
- /** 按钮容器元素 */
520
- private toolbarContainer;
521
- /** 主容器元素 */
522
- private container;
523
- /** 构件树对话框实例 */
524
- private dialog;
525
- constructor(container: HTMLElement);
526
- /** 初始化按钮 */
527
- private init;
528
- /** 打开构件树对话框 */
529
- openConstructTreeDialog(): void;
530
- /** 刷新渲染 */
531
- refresh(): void;
532
- /** 销毁管理器 */
533
- destroy(): void;
534
- /**
535
- * 添加按钮组
536
- * @param groupId 组 ID
537
- * @param beforeGroupId 插入位置
538
- */
539
- addGroup(groupId: string, beforeGroupId?: string): void;
540
- /**
541
- * 添加按钮
542
- * @param config 按钮配置
543
- */
544
- addButton(config: ButtonConfig): void;
545
- /**
546
- * 设置按钮可见性
547
- * @param id 按钮 ID
548
- * @param v 是否可见
549
- */
550
- setButtonVisibility(id: string, v: boolean): void;
551
- /**
552
- * 设置是否显示标签
553
- * @param show 是否显示
554
- */
555
- setShowLabel(show: boolean): void;
556
- /**
557
- * 设置按钮组可见性
558
- * @param visible 是否可见
559
- */
560
- setVisible(visible: boolean): void;
561
- /**
562
- * 设置背景颜色
563
- * @param color 颜色值
564
- */
565
- setBackgroundColor(color: string): void;
566
- /**
567
- * 设置按钮组颜色
568
- * @param colors 颜色配置
569
- */
570
- setColors(colors: ButtonGroupColors): void;
571
- }
572
-
573
- /**
574
- * 描述列表项配置
575
- */
576
- export declare interface DescriptionItem {
577
- /** 标签文本 (直接显示,组件内部不翻译) */
578
- label: string;
579
- /** 内容文本或元素 */
580
- value: string | HTMLElement;
581
- /** 行级自定义标签颜色 */
582
- labelColor?: string;
583
- /** 行级自定义内容颜色 */
584
- valueColor?: string;
585
- /** 自定义类名 */
586
- className?: string;
587
- }
588
-
589
- /**
590
- * 描述列表组件配置
591
- */
592
- export declare interface DescriptionOptions {
593
- /** 挂载容器 */
594
- container: HTMLElement | string;
595
- /** 数据项列表 */
596
- items: DescriptionItem[];
597
- /**
598
- * 是否显示边框 (默认 false)
599
- * 开启后,将显示行间分割线以及 Key-Value 之间的纵向分割线
600
- */
601
- bordered?: boolean;
602
- /** 标签固定宽度 (例如 '80px'),若不设置则自适应 */
603
- labelWidth?: string;
604
- /** 全局标签颜色 */
605
- labelColor?: string;
606
- /** 全局内容颜色 */
607
- valueColor?: string;
608
- /** 全局字体大小 */
609
- fontSize?: string;
610
- /** 标签内边距 (默认 '0 4px') */
611
- labelPadding?: string;
612
- /** 内容内边距 (默认 '0 4px') */
613
- valuePadding?: string;
614
- /** 自定义类名 */
615
- className?: string;
616
- }
617
-
618
- /**
619
- * 弹窗颜色配置
620
- */
621
- declare interface DialogColors {
622
- /** 窗体背景颜色,默认 rgba(17, 17, 17, 0.95) */
623
- backgroundColor?: string;
624
- /** 标题栏背景颜色,默认 #2a2a2a */
625
- headerBackgroundColor?: string;
626
- /** 标题文字颜色,默认 #fff */
627
- titleColor?: string;
628
- /** 内容文字颜色,默认 #ccc */
629
- textColor?: string;
630
- /** 边框颜色,默认 #444 */
631
- borderColor?: string;
632
- }
633
-
634
- /**
635
- * 对话框管理器
636
- * 统一管理对话框的创建、主题更新和销毁
637
- */
638
- declare class DialogManager extends BaseManager {
639
- /** 容器元素 */
640
- private container;
641
- /** 活跃的对话框列表 */
642
- private activeDialogs;
643
- constructor(container: HTMLElement);
644
- /**
645
- * 创建对话框
646
- * @param options 对话框配置选项
647
- * @returns 对话框实例
648
- */
649
- create(options: Omit<DialogOptions, 'container'>): BimDialog;
650
- /** 显示信息对话框 */
651
- showInfoDialog(): void;
652
- /**
653
- * 更新所有对话框的主题
654
- * @param theme 主题配置
655
- */
656
- updateTheme(theme: ThemeConfig): void;
657
- /** 销毁管理器和所有对话框 */
658
- destroy(): void;
659
- }
660
-
661
- /** 对话框配置选项 */
662
- declare interface DialogManagerOptions {
663
- /** 是否可拖拽 */
664
- draggable?: boolean;
665
- /** 是否可调整大小 */
666
- resizable?: boolean;
667
- }
668
-
669
- /**
670
- * 弹窗配置选项接口
671
- */
672
- export declare interface DialogOptions extends DialogColors {
673
- /** 弹窗挂载的父容器 */
674
- container: HTMLElement;
675
- /** 弹窗标题 */
676
- title?: string;
677
- /** 弹窗内容,支持 HTML 字符串或 HTMLElement */
678
- content?: HTMLElement | string;
679
- /** 弹窗宽度,数字(像素)或字符串(如 '50%') */
680
- width?: number | string;
681
- /** 弹窗高度 */
682
- height?: number | string;
683
- /** 弹窗位置 */
684
- position?: DialogPosition;
685
- /** 是否可拖拽 */
686
- draggable?: boolean;
687
- /** 是否可调整大小 */
688
- resizable?: boolean;
689
- /** 最小宽度限制 */
690
- minWidth?: number;
691
- /** 最小高度限制 */
692
- minHeight?: number;
693
- /** 关闭时的回调函数 */
694
- onClose?: () => void;
695
- /** 打开时的回调函数 */
696
- onOpen?: () => void;
697
- /** 弹窗唯一标识 ID (可选) */
698
- id?: string;
699
- }
700
-
701
- /**
702
- * 弹窗位置类型定义
703
- * 可以是预设的字符串位置(如 'center', 'top-left' 等),
704
- * 也可以是具体的坐标对象 { x, y }
705
- */
706
- export declare type DialogPosition = 'center' | 'top-left' | 'top-center' | 'top-right' | 'left-center' | 'right-center' | 'bottom-left' | 'bottom-center' | 'bottom-right' | {
707
- x: number;
708
- y: number;
709
- };
710
-
711
- export declare interface EngineEvents {
712
- 'ui:open-dialog': {
713
- id: string;
714
- data?: any;
715
- };
716
- 'ui:close-dialog': {
717
- id: string;
718
- };
719
- 'engine:model-loaded': {
720
- url: string;
721
- };
722
- 'engine:object-clicked': {
723
- objectId: string;
724
- position: {
725
- x: number;
726
- y: number;
727
- z: number;
728
- };
729
- };
730
- 'ui:tree-node-check': {
731
- id: string;
732
- checked: boolean;
733
- node: any;
734
- };
735
- 'ui:tree-node-select': {
736
- id: string;
737
- selected: boolean;
738
- node: any;
739
- };
740
- 'ui:tree-node-expand': {
741
- id: string;
742
- expanded: boolean;
743
- };
744
- 'ui:collapse-change': {
745
- activeIds: string[];
746
- };
747
- 'sys:theme-changed': {
748
- theme: string;
749
- };
750
- 'sys:locale-changed': {
751
- locale: string;
752
- };
753
- 'walk:path-mode-toggle': {
754
- isActive: boolean;
755
- };
756
- 'walk:walk-mode-toggle': {
757
- isActive: boolean;
758
- };
759
- 'walk:plan-view-toggle': {
760
- isActive: boolean;
761
- };
762
- 'walk:speed-change': {
763
- speed: number;
764
- };
765
- 'walk:gravity-toggle': {
766
- enabled: boolean;
767
- };
768
- 'walk:collision-toggle': {
769
- enabled: boolean;
770
- };
771
- 'map:opened': {};
772
- 'map:closed': {};
773
- }
774
-
775
- /**
776
- * 3D 引擎管理器
777
- * 封装底层 3D 引擎,提供模型加载、相机控制、测量等功能
778
- */
779
- declare class EngineManager extends BaseManager {
780
- /** 容器元素 */
781
- private container;
782
- /** 引擎实例 */
783
- private engineInstance;
784
- /** 右键菜单管理器 */
785
- rightKey: RightKeyManager | null;
786
- constructor(container: HTMLElement);
787
- /**
788
- * 初始化 3D 引擎
789
- * @param options 引擎配置选项
790
- * @returns 是否初始化成功
791
- */
792
- initialize(options?: Omit<EngineOptions, 'container'>): boolean;
793
- /**
794
- * 检查引擎是否已初始化
795
- * @returns 是否已初始化
796
- */
797
- isInitialized(): boolean;
798
- /**
799
- * 加载模型
800
- * @param url 模型 URL
801
- * @param options 加载选项
802
- */
803
- loadModel(url: string, options?: ModelLoadOptions): void;
804
- /**
805
- * 获取底层引擎实例
806
- * @returns 引擎实例
807
- */
808
- getEngine(): any;
809
- /** 相机回到初始位置 */
810
- CameraGoHome(): void;
811
- /** 暂停渲染 */
812
- pauseRendering(): void;
813
- /** 恢复渲染 */
814
- resumeRendering(): void;
815
- /**
816
- * 激活测量模式
817
- * @param mode 测量模式
818
- */
819
- activateMeasure(mode: MeasureMode): void;
820
- /** 停用测量模式 */
821
- deactivateMeasure(): void;
822
- /**
823
- * 获取当前测量类型
824
- * @returns 当前测量模式
825
- */
826
- getCurrentMeasureType(): MeasureMode | null;
827
- /** 销毁引擎管理器 */
828
- destroy(): void;
829
- }
830
-
831
- /**
832
- * 引擎配置选项
833
- * 用于 Engine 组件的初始化
834
- */
835
- export declare interface EngineOptions {
836
- /** 容器元素 */
837
- container: HTMLElement;
838
- /** 背景颜色(十六进制数字如 0x333333,或 CSS 字符串如 'linear-gradient(...)') */
839
- backgroundColor?: number | string;
840
- /** WebGL 版本 */
841
- version?: 'v1' | 'v2';
842
- /** 是否显示性能统计 */
843
- showStats?: boolean;
844
- /** 是否显示视图立方体 */
845
- showViewCube?: boolean;
846
- }
847
-
848
- /** 二级菜单展开方向 */
849
- declare type ExpandDirection = 'up' | 'down' | 'left' | 'right';
850
-
851
- /** 按钮组排列方向 (Flex-direction) */
852
- declare type GroupDirection = 'row' | 'column';
853
-
854
- /** 弹窗/按钮组位置 */
855
- declare type GroupPosition = 'center' | 'top-left' | 'top-center' | 'top-right' | 'left-center' | 'right-center' | 'bottom-left' | 'bottom-center' | 'bottom-right' | {
856
- x: number;
857
- y: number;
858
- } | 'static';
859
-
860
- /**
861
- * BIM 引擎组件通用接口
862
- * 所有受引擎管理的 UI 组件都必须实现此接口
863
- */
864
- export declare interface IBimComponent {
865
- /**
866
- * 初始化组件
867
- * 用于创建 DOM、绑定事件、加载资源等
868
- * 支持同步或异步操作
869
- */
870
- init(): void | Promise<void>;
871
- /**
872
- * 设置主题
873
- * 组件应在此方法中将 ThemeConfig 映射为自身的 CSS 变量或样式
874
- */
875
- setTheme(theme: ThemeConfig): void;
876
- /**
877
- * 设置语言
878
- */
879
- setLocales(): void;
880
- /**
881
- * 销毁组件
882
- * 清理 DOM 事件监听、定时器和引用
883
- */
884
- destroy(): void;
885
- }
886
-
887
- /**
888
- * 语言��码类型
889
- */
890
- declare type LocaleType = 'zh-CN' | 'en-US';
891
-
892
- /**
893
- * Manager 注册表 - 单例模式
894
- * 提供所有 Manager 的全局访问点,替代 engine 层层传递
895
- */
896
- declare class ManagerRegistry {
897
- /** 单例实例 */
898
- private static instance;
899
- /** 事件发射器 */
900
- private eventEmitter;
901
- /** 主容器元素 */
902
- container: HTMLElement | null;
903
- /** 包装容器元素 */
904
- wrapper: HTMLElement | null;
905
- /** 工具栏管理器 */
906
- toolbar: ToolbarManager | null;
907
- /** 对话框管理器 */
908
- dialog: DialogManager | null;
909
- /** 3D 引擎管理器 */
910
- engine3d: EngineManager | null;
911
- /** 按钮组管理器 */
912
- buttonGroup: ButtonGroupManager | null;
913
- /** 右键菜单管理器 */
914
- rightKey: RightKeyManager | null;
915
- /** 构件树管理器 */
916
- constructTree: ConstructTreeManagerBtn | null;
917
- /** 属性面板管理器 */
918
- propertyPanel: PropertyPanelManager | null;
919
- /** 测量对话框管理器 */
920
- measure: MeasureDialogManager | null;
921
- /** 漫游控制管理器 */
922
- walkControl: WalkControlManager | null;
923
- /** 地图对话框管理器 */
924
- map: MapDialogManager | null;
925
- /** 拾取面剖切对话框管理器 */
926
- sectionPlane: SectionPlaneDialogManager | null;
927
- /** 轴向剖切对话框管理器 */
928
- sectionAxis: SectionAxisDialogManager | null;
929
- /** 剖切盒对话框管理器 */
930
- sectionBox: SectionBoxDialogManager | null;
931
- /** 漫游路径对话框管理器 */
932
- walkPath: WalkPathDialogManager | null;
933
- /** 漫游平面图对话框管理器 */
934
- walkPlanView: WalkPlanViewDialogManager | null;
935
- private constructor();
936
- /** 获取单例实例 */
937
- static getInstance(): ManagerRegistry;
938
- /** 重置单例(用于测试或重新初始化) */
939
- static reset(): void;
940
- /**
941
- * 发送事件
942
- * @param event 事件名称
943
- * @param payload 事件数据
944
- */
945
- emit<K extends keyof EngineEvents>(event: K, payload: EngineEvents[K]): void;
946
- /**
947
- * 订阅事件
948
- * @param event 事件名称
949
- * @param listener 事件处理函数
950
- * @returns 取消订阅的函数
951
- */
952
- on<K extends keyof EngineEvents>(event: K, listener: (payload: EngineEvents[K]) => void): () => void;
953
- /**
954
- * 取消订阅事件
955
- * @param event 事件名称
956
- * @param listener 事件处理函数
957
- */
958
- off<K extends keyof EngineEvents>(event: K, listener: (payload: EngineEvents[K]) => void): void;
959
- /** 清除所有事件监听器 */
960
- clearEvents(): void;
961
- }
962
-
963
- /**
964
- * 地图对话框管理器
965
- * 继承自 BaseDialogManager,提供地图面板的对话框管理功能
966
- */
967
- declare class MapDialogManager extends BaseDialogManager {
968
- /** 地图面板实例 */
969
- private panel;
970
- /** 对话框唯一标识 */
971
- protected get dialogId(): string;
972
- /** 对话框标题(国际化 key) */
973
- protected get dialogTitle(): string;
974
- /** 对话框宽度 */
975
- protected get dialogWidth(): number;
976
- /** 对话框高度 */
977
- protected get dialogHeight(): number;
978
- /** 初始化 */
979
- init(): void;
980
- /**
981
- * 获取对话框位置
982
- * 定位在容器左下角
983
- */
984
- protected getDialogPosition(): {
985
- x: number;
986
- y: number;
987
- };
988
- /** 创建对话框内容 */
989
- protected createContent(): HTMLElement;
990
- /** 对话框创建后的回调 */
991
- protected onDialogCreated(): void;
992
- /** 对话框关闭时的回调 */
993
- protected onDialogClose(): void;
994
- /** 销毁前的清理 */
995
- protected onBeforeDestroy(): void;
996
- /** 隐藏对话框 */
997
- hide(): void;
998
- }
999
-
1000
- /**
1001
- * 测量配置项(由组件内部维护默认值,并读取/写入缓存)
1002
- */
1003
- declare interface MeasureConfig {
1004
- unit: MeasureUnit;
1005
- precision: MeasurePrecision;
1006
- }
1007
-
1008
- /**
1009
- * 测量对话框管理器
1010
- * 继承自 BaseDialogManager,提供测量工具的对话框管理功能
1011
- */
1012
- declare class MeasureDialogManager extends BaseDialogManager {
1013
- /** 测量面板实例 */
1014
- private panel;
1015
- /** 测量配置(单位、精度等) */
1016
- private config;
1017
- /** 对话框唯一标识 */
1018
- protected get dialogId(): string;
1019
- /** 对话框标题(国际化 key) */
1020
- protected get dialogTitle(): string;
1021
- /** 对话框宽度 */
1022
- protected get dialogWidth(): number;
1023
- /**
1024
- * 创建对话框内容
1025
- * 初始化测量面板并设置回调
1026
- */
1027
- protected createContent(): HTMLElement;
1028
- /** 对话框创建后的回调,自适应高度 */
1029
- protected onDialogCreated(): void;
1030
- /** 对话框关闭时的回调,取消工具栏按钮激活状态 */
1031
- protected onDialogClose(): void;
1032
- /** 销毁前的清理,停用测量功能并销毁面板 */
1033
- protected onBeforeDestroy(): void;
1034
- /**
1035
- * 获取当前激活的测量模式
1036
- * @returns 当前测量模式,如 'distance'、'angle' 等
1037
- */
1038
- getActiveMode(): MeasureMode | null;
1039
- /**
1040
- * 切换测量模式
1041
- * @param mode 目标测量模式
1042
- */
1043
- switchMode(mode: MeasureMode): void;
1044
- /**
1045
- * 设置测量结果
1046
- * @param result 测量结果对象
1047
- */
1048
- setMeasureResult(result: MeasureResult | null): void;
1049
- /**
1050
- * 获取测量配置
1051
- * @returns 测量配置副本
1052
- */
1053
- getConfig(): MeasureConfig | null;
1054
- /**
1055
- * 设置测量配置
1056
- * @param partial 部分配置
1057
- * @param persist 是否持久化
1058
- */
1059
- setConfig(partial: Partial<MeasureConfig>, persist?: boolean): void;
1060
- /** 清除所有测量结果 */
1061
- clearAll(): void;
1062
- /** 打开测量设置面板 */
1063
- openSettings(): void;
1064
- }
1065
-
1066
- /**
1067
- * 测量相关的通用类型定义
1068
- *
1069
- * 说明:
1070
- * - 这些类型定义在通用 types 目录下,避免组件间直接耦合
1071
- * - Engine 组件、MeasurePanel 组件、Manager 都可以引用这些类型
1072
- */
1073
- /**
1074
- * 测量方式(8 种)
1075
- *
1076
- * 说明:
1077
- * - id 采用英文驼峰/小写,便于程序内部使用
1078
- * - 显示名称必须通过国际化 key 获取(见 locales)
1079
- */
1080
- declare type MeasureMode = 'distance' | 'minDistance' | 'angle' | 'elevation' | 'volume' | 'laserDistance' | 'slope' | 'spaceVolume';
1081
-
1082
- /**
1083
- * 精度(小数位数)
1084
- * - 0 -> 0
1085
- * - 1 -> 0.0
1086
- * - 2 -> 0.00
1087
- * - 3 -> 0.000
1088
- */
1089
- declare type MeasurePrecision = 0 | 1 | 2 | 3;
1090
-
1091
- /**
1092
- * 测量结果数据
1093
- *
1094
- * 说明:
1095
- * - 真实测量未实现,因此结果由外部通过 setResult 传入。
1096
- * - 不同测量方式对应不同字段;未传入则 UI 显示 “--”。
1097
- */
1098
- declare interface MeasureResult {
1099
- /** 距离(单位:mm) */
1100
- distanceMm?: number;
1101
- /** 最小距离(单位:mm) */
1102
- minDistanceMm?: number;
1103
- /** 角度(单位:deg) */
1104
- angleDeg?: number;
1105
- /** 标高(单位:mm) */
1106
- elevationMm?: number;
1107
- /** 体积(单位:m³) */
1108
- volumeM3?: number;
1109
- /** 激光测距(单位:mm) */
1110
- laserDistanceMm?: number;
1111
- /** 坡度(单位:%) */
1112
- slopePercent?: number;
1113
- /** 空间体积(单位:m³) */
1114
- spaceVolumeM3?: number;
1115
- /** 可选:展示测量点/结果点坐标(单位由引擎侧定义,这里只负责显示) */
1116
- xyz?: MeasureXYZ;
1117
- }
1118
-
1119
- /**
1120
- * 距离/标高等“长度类”单位
1121
- */
1122
- declare type MeasureUnit = 'm' | 'cm' | 'mm' | 'km';
1123
-
1124
- /**
1125
- * 3D 坐标(可选展示)
1126
- */
1127
- declare interface MeasureXYZ {
1128
- x: number;
1129
- y: number;
1130
- z: number;
1131
- }
1132
-
1133
- /**
1134
- * 菜单项配置接口 (用于简化的对象配置)
1135
- */
1136
- declare interface MenuItemConfig {
1137
- id: string;
1138
- label: string;
1139
- onClick?: () => void;
1140
- icon?: string;
1141
- group?: string;
1142
- order?: number;
1143
- children?: MenuItemConfig[];
1144
- disabled?: boolean;
1145
- visible?: boolean;
1146
- }
1147
-
1148
- /**
1149
- * 模型加载选项
1150
- * 用于配置模型的位置、旋转和缩放
1151
- */
1152
- export declare interface ModelLoadOptions {
1153
- /** 模型初始位置 [x, y, z] */
1154
- position?: [number, number, number];
1155
- /** 模型初始旋转 [x, y, z](弧度) */
1156
- rotation?: [number, number, number];
1157
- /** 模型初始缩放 [x, y, z] */
1158
- scale?: [number, number, number];
1159
- /** 模型 ID(可选,如果不提供则自动生成) */
1160
- id?: string;
1161
- }
1162
-
1163
- /**
1164
- * 节点点击行为类型
1165
- */
1166
- export declare type NodeClickAction = 'select' | 'expand';
1167
-
1168
- declare interface OptButton extends ButtonConfig {
1169
- children?: OptButton[];
1170
- }
1171
-
1172
- /**
1173
- * 属性面板管理器
1174
- * 显示选中构件的属性信息和材质信息
1175
- */
1176
- declare class PropertyPanelManager extends BaseManager {
1177
- /** 对话框 ID */
1178
- private dialogId;
1179
- /** 对话框实例 */
1180
- private dialog;
1181
- constructor();
1182
- /** 初始化,监听打开事件 */
1183
- init(): void;
1184
- /** 显示属性面板 */
1185
- show(): void;
1186
- /** 创建属性标签页内容 */
1187
- private createPropsTabContent;
1188
- /** 创建材质标签页内容 */
1189
- private createMaterialTabContent;
1190
- /** 创建基本信息内容 */
1191
- private createBaseInfoContent;
1192
- /** 创建高级信息内容 */
1193
- private createAdvancedInfoContent;
1194
- /** 创建材质内容 */
1195
- private createMaterialContent;
1196
- /**
1197
- * 检查面板是否打开
1198
- * @returns 是否打开
1199
- */
1200
- isOpen(): boolean;
1201
- /** 隐藏面板 */
1202
- hide(): void;
1203
- /** 销毁管理器 */
1204
- destroy(): void;
1205
- }
1206
-
1207
- /**
1208
- * 右键菜单管理器
1209
- * 支持注册多个上下文处理器,动态生成右键菜单
1210
- */
1211
- declare class RightKeyManager extends BaseManager {
1212
- /** 容器元素 */
1213
- private container;
1214
- /** 右键面板实例 */
1215
- private rightKeyPanel;
1216
- /** 上下文处理器列表 */
1217
- private contextHandlers;
1218
- constructor(container: HTMLElement);
1219
- /** 销毁管理器 */
1220
- destroy(): void;
1221
- /**
1222
- * 注册上下文处理器
1223
- * @param handler 处理器函数,返回菜单项配置
1224
- */
1225
- registerHandler(handler: (e: MouseEvent) => MenuItemConfig[] | null): void;
1226
- /**
1227
- * 显示菜单
1228
- * @param x 横坐标
1229
- * @param y 纵坐标
1230
- * @param items 菜单项配置
1231
- * @param groupOrder 分组顺序
1232
- */
1233
- showMenu(x: number, y: number, items: MenuItemConfig[], groupOrder?: string[]): void;
1234
- /** 隐藏菜单 */
1235
- hide(): void;
1236
- /** 处理右键点击事件 */
1237
- private handleContextMenu;
1238
- }
1239
-
1240
- /**
1241
- * 轴向类型
1242
- */
1243
- declare type SectionAxis = 'x' | 'y' | 'z';
1244
-
1245
- /**
1246
- * 轴向剖切对话框管理器
1247
- * 继承自 BaseDialogManager,提供 X/Y/Z 轴向剖切的对话框管理功能
1248
- */
1249
- declare class SectionAxisDialogManager extends BaseDialogManager {
1250
- /** 轴向剖切面板实例 */
1251
- private panel;
1252
- /** 对话框唯一标识 */
1253
- protected get dialogId(): string;
1254
- /** 对话框标题(国际化 key) */
1255
- protected get dialogTitle(): string;
1256
- /** 对话框宽度 */
1257
- protected get dialogWidth(): number;
1258
- /**
1259
- * 获取对话框位置
1260
- * 定位在容器右下角
1261
- */
1262
- protected getDialogPosition(): {
1263
- x: number;
1264
- y: number;
1265
- };
1266
- /**
1267
- * 创建对话框内容
1268
- * 初始化轴向剖切面板并设置回调
1269
- */
1270
- protected createContent(): HTMLElement;
1271
- /** 对话框创建后的回调,自适应高度 */
1272
- protected onDialogCreated(): void;
1273
- /** 对话框关闭时的回调,取消工具栏按钮激活状态 */
1274
- protected onDialogClose(): void;
1275
- /** 销毁前的清理,销毁面板实例 */
1276
- protected onBeforeDestroy(): void;
1277
- /**
1278
- * 获取剖切面隐藏状态
1279
- * @returns 是否隐藏
1280
- */
1281
- getHiddenState(): boolean;
1282
- /**
1283
- * 设置剖切面隐藏状态
1284
- * @param isHidden 是否隐藏
1285
- */
1286
- setHiddenState(isHidden: boolean): void;
1287
- /**
1288
- * 获取当前激活的剖切轴向
1289
- * @returns 当前轴向 'x' | 'y' | 'z'
1290
- */
1291
- getActiveAxis(): SectionAxis;
1292
- /**
1293
- * 设置剖切轴向
1294
- * @param axis 目标轴向
1295
- */
1296
- setActiveAxis(axis: SectionAxis): void;
1297
- }
1298
-
1299
- /**
1300
- * 剖切盒轴向范围
1301
- */
1302
- declare interface SectionBoxAxisRange {
1303
- /** 最小值(0-100的百分比) */
1304
- min: number;
1305
- /** 最大值(0-100的百分比) */
1306
- max: number;
1307
- }
1308
-
1309
- /**
1310
- * 剖切盒对话框管理器
1311
- * 继承自 BaseDialogManager,提供六面体剖切盒的对话框管理功能
1312
- */
1313
- declare class SectionBoxDialogManager extends BaseDialogManager {
1314
- /** 剖切盒面板实例 */
1315
- private panel;
1316
- /** 对话框唯一标识 */
1317
- protected get dialogId(): string;
1318
- /** 对话框标题(国际化 key) */
1319
- protected get dialogTitle(): string;
1320
- /** 对话框宽度 */
1321
- protected get dialogWidth(): number;
1322
- /**
1323
- * 获取对话框位置
1324
- * 定位在容器右下角
1325
- */
1326
- protected getDialogPosition(): {
1327
- x: number;
1328
- y: number;
1329
- };
1330
- /**
1331
- * 创建对话框内容
1332
- * 初始化剖切盒面板并设置回调
1333
- */
1334
- protected createContent(): HTMLElement;
1335
- /** 对话框创建后的回调,自适应高度 */
1336
- protected onDialogCreated(): void;
1337
- /** 对话框关闭时的回调,取消工具栏按钮激活状态 */
1338
- protected onDialogClose(): void;
1339
- /** 销毁前的清理,销毁面板实例 */
1340
- protected onBeforeDestroy(): void;
1341
- /**
1342
- * 获取剖切盒隐藏状态
1343
- * @returns 是否隐藏
1344
- */
1345
- getHiddenState(): boolean;
1346
- /**
1347
- * 设置剖切盒隐藏状态
1348
- * @param isHidden 是否隐藏
1349
- */
1350
- setHiddenState(isHidden: boolean): void;
1351
- /**
1352
- * 获取剖切盒反向状态
1353
- * @returns 是否反向(显示盒内/盒外)
1354
- */
1355
- getReversedState(): boolean;
1356
- /**
1357
- * 设置剖切盒反向状态
1358
- * @param isReversed 是否反向
1359
- */
1360
- setReversedState(isReversed: boolean): void;
1361
- /**
1362
- * 获取剖切盒范围
1363
- * @returns 六面体范围 { minX, maxX, minY, maxY, minZ, maxZ }
1364
- */
1365
- getRange(): SectionBoxRange | null;
1366
- /**
1367
- * 设置剖切盒范围
1368
- * @param range 部分或全部范围值
1369
- */
1370
- setRange(range: Partial<SectionBoxRange>): void;
1371
- }
1372
-
1373
- /**
1374
- * 剖切盒范围数据
1375
- */
1376
- declare interface SectionBoxRange {
1377
- /** X轴范围 */
1378
- x: SectionBoxAxisRange;
1379
- /** Y轴范围 */
1380
- y: SectionBoxAxisRange;
1381
- /** Z轴范围 */
1382
- z: SectionBoxAxisRange;
1383
- }
1384
-
1385
- /**
1386
- * 拾取面剖切对话框管理器
1387
- * 继承自 BaseDialogManager,提供拾取面剖切功能的对话框管理
1388
- */
1389
- declare class SectionPlaneDialogManager extends BaseDialogManager {
1390
- /** 剖切面板实例 */
1391
- private panel;
1392
- /** 对话框唯一标识 */
1393
- protected get dialogId(): string;
1394
- /** 对话框标题(国际化 key) */
1395
- protected get dialogTitle(): string;
1396
- /** 对话框宽度 */
1397
- protected get dialogWidth(): number;
1398
- /** 对话框高度 */
1399
- protected get dialogHeight(): number;
1400
- /** 初始化 */
1401
- init(): void;
1402
- /**
1403
- * 获取对话框位置
1404
- * 定位在容器右下角
1405
- */
1406
- protected getDialogPosition(): {
1407
- x: number;
1408
- y: number;
1409
- };
1410
- /** 创建对话框内容 */
1411
- protected createContent(): HTMLElement;
1412
- /** 对话框关闭时的回调 */
1413
- protected onDialogClose(): void;
1414
- /** 销毁前的清理 */
1415
- protected onBeforeDestroy(): void;
1416
- }
1417
-
1418
- /**
1419
- * Shadow Token
1420
- * CSS box-shadow value
1421
- */
1422
- declare type ShadowToken = string;
1423
-
1424
- /**
1425
- * Complete Theme Configuration Interface
1426
- *
1427
- * All colors use semantic naming to describe their purpose.
1428
- * Components should map these to their internal CSS variables.
1429
- */
1430
- export declare interface ThemeConfig {
1431
- /** Theme identifier: 'dark' | 'light' | custom name */
1432
- name: string;
1433
- /** Primary brand color - used for key actions, links, active states */
1434
- primary: ColorToken;
1435
- /** Primary color on hover */
1436
- primaryHover: ColorToken;
1437
- /** Primary color when pressed/active */
1438
- primaryActive: ColorToken;
1439
- /** Subtle primary for backgrounds (e.g., selected row) */
1440
- primarySubtle: ColorToken;
1441
- /** Success color - confirmations, completed states */
1442
- success: ColorToken;
1443
- /** Success color on hover */
1444
- successHover: ColorToken;
1445
- /** Subtle success for backgrounds */
1446
- successSubtle: ColorToken;
1447
- /** Warning color - caution, pending states */
1448
- warning: ColorToken;
1449
- /** Warning color on hover */
1450
- warningHover: ColorToken;
1451
- /** Subtle warning for backgrounds */
1452
- warningSubtle: ColorToken;
1453
- /** Danger/Error color - destructive actions, errors */
1454
- danger: ColorToken;
1455
- /** Danger color on hover */
1456
- dangerHover: ColorToken;
1457
- /** Subtle danger for backgrounds */
1458
- dangerSubtle: ColorToken;
1459
- /** Info color - informational states */
1460
- info: ColorToken;
1461
- /** Info color on hover */
1462
- infoHover: ColorToken;
1463
- /** Subtle info for backgrounds */
1464
- infoSubtle: ColorToken;
1465
- /** Base/canvas background - the deepest layer (app background) */
1466
- bgBase: ColorToken;
1467
- /** Elevated surface - panels, cards, dialogs floating above base */
1468
- bgElevated: ColorToken;
1469
- /** Overlay background - modals, dropdowns, popovers */
1470
- bgOverlay: ColorToken;
1471
- /** Inset/recessed background - inputs, wells, sunken areas */
1472
- bgInset: ColorToken;
1473
- /**
1474
- * Glassmorphism surface - semi-transparent with blur
1475
- * Used for floating toolbars, modern panels
1476
- */
1477
- bgGlass: ColorToken;
1478
- /** Glassmorphism blur amount */
1479
- bgGlassBlur: BlurToken;
1480
- /** Primary text - headings, body text, high emphasis */
1481
- textPrimary: ColorToken;
1482
- /** Secondary text - descriptions, labels, medium emphasis */
1483
- textSecondary: ColorToken;
1484
- /** Tertiary text - placeholders, hints, low emphasis */
1485
- textTertiary: ColorToken;
1486
- /** Disabled text - inactive elements */
1487
- textDisabled: ColorToken;
1488
- /** Inverted text - text on primary/dark backgrounds */
1489
- textInverse: ColorToken;
1490
- /** Link text color */
1491
- textLink: ColorToken;
1492
- /** Link text on hover */
1493
- textLinkHover: ColorToken;
1494
- /** Default icon color */
1495
- iconDefault: ColorToken;
1496
- /** Icon on hover */
1497
- iconHover: ColorToken;
1498
- /** Active/selected icon */
1499
- iconActive: ColorToken;
1500
- /** Disabled icon */
1501
- iconDisabled: ColorToken;
1502
- /** Inverted icon (on colored backgrounds) */
1503
- iconInverse: ColorToken;
1504
- /** Default border - inputs, cards, containers */
1505
- borderDefault: ColorToken;
1506
- /** Subtle border - dividers, separators */
1507
- borderSubtle: ColorToken;
1508
- /** Strong border - focus rings, emphasis */
1509
- borderStrong: ColorToken;
1510
- /** Disabled border */
1511
- borderDisabled: ColorToken;
1512
- /** Divider color - horizontal/vertical separators */
1513
- divider: ColorToken;
1514
- /**
1515
- * Component Background States
1516
- * Used for buttons, list items, interactive elements
1517
- */
1518
- /** Default component background (often transparent) */
1519
- componentBg: ColorToken;
1520
- /** Component background on hover */
1521
- componentBgHover: ColorToken;
1522
- /** Component background when pressed */
1523
- componentBgActive: ColorToken;
1524
- /** Component background when selected */
1525
- componentBgSelected: ColorToken;
1526
- /** Disabled component background */
1527
- componentBgDisabled: ColorToken;
1528
- /** Focus ring color */
1529
- focusRing: ColorToken;
1530
- /** Focus ring offset color (for contrast) */
1531
- focusRingOffset: ColorToken;
1532
- /** Selection background (text selection, highlighted items) */
1533
- selectionBg: ColorToken;
1534
- /** Selection text color */
1535
- selectionText: ColorToken;
1536
- /** Small shadow - subtle elevation (buttons, small cards) */
1537
- shadowSm: ShadowToken;
1538
- /** Medium shadow - moderate elevation (dropdowns, popovers) */
1539
- shadowMd: ShadowToken;
1540
- /** Large shadow - high elevation (modals, dialogs) */
1541
- shadowLg: ShadowToken;
1542
- /** Extra large shadow - maximum elevation */
1543
- shadowXl: ShadowToken;
1544
- /** Glow shadow for active/highlighted elements */
1545
- shadowGlow: ShadowToken;
1546
- /** Scrollbar track background */
1547
- scrollbarTrack: ColorToken;
1548
- /** Scrollbar thumb */
1549
- scrollbarThumb: ColorToken;
1550
- /** Scrollbar thumb on hover */
1551
- scrollbarThumbHover: ColorToken;
1552
- /** 浮动容器背景 (支持 rgba 实现毛玻璃效果) */
1553
- floatingBg: ColorToken;
1554
- /** 浮动容器边框 */
1555
- floatingBorder: ColorToken;
1556
- /** 浮动容器阴影 */
1557
- floatingShadow: ShadowToken;
1558
- /** 浮动按钮背景 */
1559
- floatingBtnBg: ColorToken;
1560
- /** 浮动按钮边框 */
1561
- floatingBtnBorder: ColorToken;
1562
- /** 浮动按钮阴影 */
1563
- floatingBtnShadow: ShadowToken;
1564
- /** 浮动按钮悬停背景 */
1565
- floatingBtnBgHover: ColorToken;
1566
- /** 浮动按钮悬停阴影 */
1567
- floatingBtnShadowHover: ShadowToken;
1568
- /** 浮动组件图标颜色 */
1569
- floatingIconColor: ColorToken;
1570
- /** 浮动组件图标悬停颜色 */
1571
- floatingIconColorHover: ColorToken;
1572
- /** 面板背景 (支持毛玻璃) */
1573
- panelBg: ColorToken;
1574
- /** 面板边框 */
1575
- panelBorder: ColorToken;
1576
- /** 面板 Header 背景 */
1577
- panelHeaderBg: ColorToken;
1578
- /** 面板圆角 */
1579
- panelRadius: string;
1580
- /** Tab 容器背景 */
1581
- tabBg: ColorToken;
1582
- /** Tab 项背景 */
1583
- tabItemBg: ColorToken;
1584
- /** Tab 项悬停背景 */
1585
- tabItemBgHover: ColorToken;
1586
- /** Tab 激活项背景 */
1587
- tabItemBgActive: ColorToken;
1588
- /** Tab 激活项文字颜色 */
1589
- tabItemTextActive: ColorToken;
1590
- /**
1591
- * Component-specific overrides
1592
- * Only define these when absolutely necessary
1593
- */
1594
- overrides?: {
1595
- /** Dialog specific colors */
1596
- dialog?: {
1597
- headerBg?: ColorToken;
1598
- footerBg?: ColorToken;
1599
- };
1600
- /** Toolbar specific colors */
1601
- toolbar?: {
1602
- bg?: ColorToken;
1603
- buttonBg?: ColorToken;
1604
- buttonBgHover?: ColorToken;
1605
- buttonBgActive?: ColorToken;
1606
- };
1607
- /** Input specific colors */
1608
- input?: {
1609
- bg?: ColorToken;
1610
- bgFocus?: ColorToken;
1611
- placeholder?: ColorToken;
1612
- };
1613
- };
1614
- }
1615
-
1616
- /**
1617
- * Theme type definition
1618
- */
1619
- export declare type ThemeType = 'dark' | 'light' | 'custom';
1620
-
1621
- /**
1622
- * 工具栏管理器
1623
- * 提供工具栏按钮的添加、显示/隐藏、主题更新等功能
1624
- */
1625
- declare class ToolbarManager extends BaseManager {
1626
- /** 工具栏实例 */
1627
- private toolbar;
1628
- /** 工具栏容器元素 */
1629
- private toolbarContainer;
1630
- /** 主容器元素 */
1631
- private container;
1632
- constructor(container: HTMLElement);
1633
- /** 初始化工具栏 */
1634
- private init;
1635
- /**
1636
- * 更新工具栏主题
1637
- * @param theme 主题配置
1638
- */
1639
- updateTheme(theme: ThemeConfig): void;
1640
- /** 刷新工具栏渲染 */
1641
- refresh(): void;
1642
- /** 销毁工具栏 */
1643
- destroy(): void;
1644
- /**
1645
- * 添加按钮组
1646
- * @param groupId 组 ID
1647
- * @param beforeGroupId 插入到指定组之前
1648
- */
1649
- addGroup(groupId: string, beforeGroupId?: string): void;
1650
- /**
1651
- * 添加按钮
1652
- * @param config 按钮配置
1653
- */
1654
- addButton(config: ButtonConfig): void;
1655
- /**
1656
- * 设置按钮可见性
1657
- * @param id 按钮 ID
1658
- * @param v 是否可见
1659
- */
1660
- setButtonVisibility(id: string, v: boolean): void;
1661
- /**
1662
- * 设置是否显示标签
1663
- * @param show 是否显示
1664
- */
1665
- setShowLabel(show: boolean): void;
1666
- /**
1667
- * 设置按钮激活状态
1668
- * @param id 按钮 ID
1669
- * @param active 是否激活
1670
- */
1671
- setBtnActive(id: string, active?: boolean): void;
1672
- /**
1673
- * 设置工具栏可见性
1674
- * @param visible 是否可见
1675
- */
1676
- setVisible(visible: boolean): void;
1677
- /**
1678
- * 设置背景颜色
1679
- * @param color 颜色值
1680
- */
1681
- setBackgroundColor(color: string): void;
1682
- /**
1683
- * 设置按钮组颜色
1684
- * @param colors 颜色配置
1685
- */
1686
- setColors(colors: ButtonGroupColors): void;
1687
- /** 隐藏工具栏 */
1688
- hide(): void;
1689
- /** 显示工具栏 */
1690
- show(): void;
1691
- /**
1692
- * 获取工具栏容器
1693
- * @returns 容器元素
1694
- */
1695
- getContainer(): HTMLElement | null;
1696
- }
1697
-
1698
- /**
1699
- * 节点勾选状态枚举
1700
- */
1701
- export declare enum TreeNodeCheckState {
1702
- Unchecked = 0,
1703
- Checked = 1,
1704
- Indeterminate = 2
1705
- }
1706
-
1707
- /**
1708
- * 树节点配置接口
1709
- */
1710
- export declare interface TreeNodeConfig {
1711
- /** 唯一标识符 */
1712
- id: string;
1713
- /** 显示文本的翻译键 */
1714
- label: string;
1715
- /** 节点图标 (SVG string 或 URL) */
1716
- icon?: string;
1717
- /** 子节点列表 */
1718
- children?: TreeNodeConfig[];
1719
- /** 初始展开状态 (默认 false) */
1720
- expanded?: boolean;
1721
- /** 初始选中状态 (默认 false) */
1722
- checked?: boolean;
1723
- /** 是否禁用 (默认 false) */
1724
- disabled?: boolean;
1725
- /** 自定义业务数据 */
1726
- data?: any;
1727
- /** 是否是叶子节点 (用于异步加载场景,暂留接口) */
1728
- isLeaf?: boolean;
1729
- /** 点击整行的行为 (默认 'select') */
1730
- clickAction?: NodeClickAction;
1731
- }
1732
-
1733
- /**
1734
- * 树组件配置选项
1735
- */
1736
- export declare interface TreeOptions {
1737
- /** 树的数据源 */
1738
- data: TreeNodeConfig[];
1739
- /** 是否显示复选框 (默认 true) */
1740
- checkable?: boolean;
1741
- /**
1742
- * 父子节点选中状态是否关联 (默认 true)
1743
- * true: 选中父选子,子全选自动选父
1744
- * false: 独立选中
1745
- */
1746
- checkStrictly?: boolean;
1747
- /** 默认展开所有节点 (默认 false) */
1748
- defaultExpandAll?: boolean;
1749
- /** 缩进宽度 (像素,默认 24) */
1750
- indent?: number;
1751
- /** 是否启用搜索功能 (默认 false) */
1752
- enableSearch?: boolean;
1753
- /** 搜索框占位符 */
1754
- searchPlaceholder?: string;
1755
- /** 节点勾选回调 */
1756
- onNodeCheck?: (node: BimTreeNode) => void;
1757
- /** 节点选择回调 */
1758
- onNodeSelect?: (node: BimTreeNode) => void;
1759
- /** 节点展开/折叠回调 */
1760
- onNodeExpand?: (node: BimTreeNode) => void;
1761
- /**
1762
- * 选中时显示的自定义操作栏渲染函数
1763
- * 返回 HTML 字符串或 HTMLElement
1764
- */
1765
- renderActions?: (node: TreeNodeConfig) => HTMLElement | string;
1766
- }
1767
-
1768
- /**
1769
- * 漫游控制管理器
1770
- * 提供第一人称漫游、路径漫游等功能的控制界面
1771
- */
1772
- declare class WalkControlManager extends BaseManager {
1773
- /** 漫游控制面板实例 */
1774
- panel: WalkControlPanel | null;
1775
- /** 路径漫游对话框管理器 */
1776
- private pathManager;
1777
- constructor();
1778
- /** 初始化管理器 */
1779
- init(): void;
1780
- /** 显示漫游控制面板 */
1781
- show(): void;
1782
- /** 隐藏漫游控制面板 */
1783
- hide(): void;
1784
- /** 销毁管理器 */
1785
- destroy(): void;
1786
- }
1787
-
1788
- /**
1789
- * 漫游控制模式
1790
- */
1791
- declare type WalkControlMode = 'none' | 'path' | 'walk';
1792
-
1793
- declare class WalkControlPanel implements IBimComponent {
1794
- element: HTMLElement;
1795
- private options;
1796
- private state;
1797
- private planViewBtn;
1798
- private pathModeBtn;
1799
- private walkModeBtn;
1800
- private settingsContainer;
1801
- private speedControl;
1802
- private speedDecreaseBtn;
1803
- private speedIncreaseBtn;
1804
- private speedDisplay;
1805
- private gravityCheckbox;
1806
- private gravityLabel;
1807
- private collisionCheckbox;
1808
- private collisionLabel;
1809
- private characterModelSelect;
1810
- private characterModelLabel;
1811
- private walkModeSelect;
1812
- private walkModeLabel;
1813
- private exitBtn;
1814
- private unsubscribeLocale;
1815
- private unsubscribeTheme;
1816
- constructor(options?: WalkControlPanelOptions);
1817
- init(): void;
1818
- setPlanViewActive(active: boolean): void;
1819
- setPathModeActive(active: boolean): void;
1820
- getState(): WalkControlState;
1821
- private createPanel;
1822
- private createLeftButtons;
1823
- private createSettingsContainer;
1824
- private createSpeedControl;
1825
- private createIconButton;
1826
- private createExitButton;
1827
- private setMode;
1828
- private updateButtonStates;
1829
- private updateSettingsView;
1830
- private updateSpeedDisplay;
1831
- private updateSpeedButtonStates;
1832
- private getIconSVG;
1833
- setLocales(): void;
1834
- setTheme(theme: ThemeConfig): void;
1835
- destroy(): void;
1836
- }
1837
-
1838
- /**
1839
- * 漫游控制面板配置选项
1840
- */
1841
- declare interface WalkControlPanelOptions {
1842
- /** 平面图切换回调 */
1843
- onPlanViewToggle?: (isActive: boolean) => void;
1844
- /** 路径漫游模式切换回调 */
1845
- onPathModeToggle?: (isActive: boolean) => void;
1846
- /** 漫游模式切换回调 */
1847
- onWalkModeToggle?: (isActive: boolean) => void;
1848
- /** 速度变化回调 */
1849
- onSpeedChange?: (speed: number) => void;
1850
- /** 重力切换回调 */
1851
- onGravityToggle?: (enabled: boolean) => void;
1852
- /** 碰撞切换回调 */
1853
- onCollisionToggle?: (enabled: boolean) => void;
1854
- /** 角色模型变化回调 */
1855
- onCharacterModelChange?: (model: CharacterModel) => void;
1856
- /** 行走模式变化回调 */
1857
- onWalkModeChange?: (mode: WalkMode) => void;
1858
- /** 退出回调 */
1859
- onExit?: () => void;
1860
- /** 默认速度 (0-100) */
1861
- defaultSpeed?: number;
1862
- /** 默认重力状态 */
1863
- defaultGravity?: boolean;
1864
- /** 默认碰撞状态 */
1865
- defaultCollision?: boolean;
1866
- /** 默认角色模型 */
1867
- defaultCharacterModel?: CharacterModel;
1868
- /** 默认行走模式 */
1869
- defaultWalkMode?: WalkMode;
1870
- }
1871
-
1872
- /**
1873
- * 漫游控制状态
1874
- */
1875
- declare interface WalkControlState {
1876
- /** 当前模式 */
1877
- mode: WalkControlMode;
1878
- /** 平面图是否激活 */
1879
- isPlanViewActive: boolean;
1880
- /** 移动速度 (0-100) */
1881
- speed: number;
1882
- /** 重力是否启用 */
1883
- gravity: boolean;
1884
- /** 碰撞是否启用 */
1885
- collision: boolean;
1886
- /** 当前角色模型 */
1887
- characterModel: CharacterModel;
1888
- /** 当前行走模式 */
1889
- walkMode: WalkMode;
1890
- }
1891
-
1892
- /**
1893
- * 行走模式类型
1894
- */
1895
- declare type WalkMode = 'walk' | 'run';
1896
-
1897
- /**
1898
- * 漫游路径对话框管理器
1899
- * 继承自 BaseDialogManager,提供漫游路径配置的对话框管理功能
1900
- */
1901
- declare class WalkPathDialogManager extends BaseDialogManager {
1902
- /** 漫游路径面板实例 */
1903
- private panel;
1904
- /** 对话框唯一标识 */
1905
- protected get dialogId(): string;
1906
- /** 对话框标题(国际化 key) */
1907
- protected get dialogTitle(): string;
1908
- /** 对话框宽度 */
1909
- protected get dialogWidth(): number;
1910
- /** 对话框高度 */
1911
- protected get dialogHeight(): number;
1912
- /** 初始化 */
1913
- init(): void;
1914
- /**
1915
- * 获取对话框位置
1916
- * 定位在容器右侧居中
1917
- */
1918
- protected getDialogPosition(): {
1919
- x: number;
1920
- y: number;
1921
- };
1922
- /** 创建对话框内容 */
1923
- protected createContent(): HTMLElement;
1924
- /** 对话框关闭时的回调 */
1925
- protected onDialogClose(): void;
1926
- /** 销毁前的清理 */
1927
- protected onBeforeDestroy(): void;
1928
- }
1929
-
1930
- /**
1931
- * 漫游平面图对话框管理器
1932
- * 继承自 BaseDialogManager,提供漫游平面图的对话框管理功能
1933
- */
1934
- declare class WalkPlanViewDialogManager extends BaseDialogManager {
1935
- /** 漫游平面图面板实例 */
1936
- private panel;
1937
- /** 对话框唯一标识 */
1938
- protected get dialogId(): string;
1939
- /** 对话框标题(国际化 key) */
1940
- protected get dialogTitle(): string;
1941
- /** 对话框宽度 */
1942
- protected get dialogWidth(): number;
1943
- /** 对话框高度 */
1944
- protected get dialogHeight(): number;
1945
- /** 初始化 */
1946
- init(): void;
1947
- /**
1948
- * 获取对话框位置
1949
- * 定位在容器左下角
1950
- */
1951
- protected getDialogPosition(): {
1952
- x: number;
1953
- y: number;
1954
- };
1955
- /** 创建对话框内容 */
1956
- protected createContent(): HTMLElement;
1957
- /** 对话框关闭时的回调 */
1958
- protected onDialogClose(): void;
1959
- /** 销毁前的清理 */
1960
- protected onBeforeDestroy(): void;
1961
- }
1962
-
1963
- export { }