mxcad-app 1.0.5 → 1.0.6

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/dist/index.d.ts CHANGED
@@ -1,3219 +1,26 @@
1
- import { AllowedComponentProps } from 'vue';
1
+ /// <reference path="./mxcad.d.ts" />
2
+ /// <reference path="./mxdraw.d.ts" />
3
+
2
4
  import { App } from 'vue';
3
- import { BaseSelection } from 'slate';
4
- import { ColorMethod } from 'mxcad';
5
- import { Component } from 'vue';
6
- import { ComponentCustomProps } from 'vue';
7
- import { ComponentOptionsBase } from 'vue';
8
- import { ComponentOptionsMixin } from 'vue';
9
- import { ComponentProvideOptions } from 'vue';
10
- import { ComputedRef } from 'vue';
11
- import { CreateComponentPublicInstanceWithMixins } from 'vue';
12
- import { default as default_2 } from 'event-emitter';
13
- import { DefineComponent } from 'vue';
14
- import { Editor } from 'slate';
15
- import { EventHookOn } from '@vueuse/shared';
16
- import { GlobalComponents } from 'vue';
17
- import { GlobalDirectives } from 'vue';
18
- import { History as History_2 } from 'slate-history';
19
- import { MarksStyleText } from 'mxcad';
20
- import { McDb } from 'mxcad';
21
- import { McObject } from 'mxcad';
22
- import { MenuSetting } from '@howdyjs/mouse-menu';
23
- import { MxCADBaseCustomText } from 'mxcad';
24
- import { MxCADPluginBase } from 'mxcad';
25
- import { MxcadUiConfig } from '../config/types/mxcadUiConfig';
26
- import { MxcadUiConfig as MxcadUiConfig_2 } from './types/mxcadUiConfig';
27
- import { MxMap } from 'mxcad';
28
- import { MxSketchesAndNotesUiConfig } from '../config/types/mxSketchesAndNotesUiConfig';
29
- import { Node as Node_2 } from 'slate';
30
- import { PublicProps } from 'vue';
31
- import { Ref } from 'vue';
32
- import { RemovableRef } from '@vueuse/shared';
33
- import { RendererElement } from 'vue';
34
- import { RendererNode } from 'vue';
35
- import { ShowLoading } from '../rendererTypes/renderer';
36
- import { Store } from 'pinia';
37
- import { StoreDefinition } from 'pinia';
38
- import { _UnwrapAll } from 'pinia';
39
- import { UseConfirmDialogRevealResult } from '@vueuse/core';
40
- import { VNode } from 'vue';
41
- import { VNodeProps } from 'vue';
42
- import { VoerkaI18nScope } from '@voerkai18n/runtime';
43
- import { VTabs } from 'vuetify/lib/components/index.mjs';
44
- import { VTooltip } from 'vuetify/lib/components/VTooltip/index.mjs';
45
- import { VWindow } from 'vuetify/lib/components/index.mjs';
46
- import { VWindowItem } from 'vuetify/lib/components/index.mjs';
47
-
48
- declare const __VLS_component: DefineComponent< {
49
- keyName?: string;
50
- colon?: boolean;
51
- noTextCaption?: boolean;
52
- }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
53
- keyName?: string;
54
- colon?: boolean;
55
- noTextCaption?: boolean;
56
- }> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
57
-
58
- declare function __VLS_template(): {
59
- slots: {
60
- default?(_: {}): any;
61
- };
62
- refs: {};
63
- attrs: Partial<{}>;
64
- };
65
-
66
- declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
67
-
68
- declare type __VLS_WithTemplateSlots<T, S> = T & {
69
- new (): {
70
- $slots: S;
71
- };
72
- };
73
5
 
74
6
  declare interface AppConfig {
75
7
  rootContainer: string | HTMLElement;
76
8
  }
77
9
 
78
- declare interface BindKeysProp {
79
- [key: string]: (e: KeyboardEvent) => any;
80
- }
81
-
82
- /** 定义浏览器缓存的变量Ref
83
- * @param val 值
84
- * @param 浏览器缓存的key键
85
- */
86
- declare function browserCacheRef<T>(val: T, cacheKey: string): Ref<T, T>;
87
-
88
- declare type BuildPowersOf2LengthArrays<N extends number, R extends never[][]> = R[0][N] extends never ? R : BuildPowersOf2LengthArrays<N, [[...R[0], ...R[0]], ...R]>;
89
-
90
- declare type CallRightClickMenuDisabledFun = ((rightMenuContext: RightMenuContext) => (boolean | void)) | undefined;
91
-
92
- declare type ColorIndex = RangeOf2<0, 256> | -1;
93
-
94
- declare type ColorType = typeof defaultColor;
95
-
96
- declare type ConcatLargestUntilDone<N extends number, R extends never[][], B extends never[]> = B["length"] extends N ? B : [...R[0], ...B][N] extends never ? ConcatLargestUntilDone<N, R extends [R[0], ...infer U] ? U extends never[][] ? U : never : never, B> : ConcatLargestUntilDone<N, R extends [R[0], ...infer U] ? U extends never[][] ? U : never : never, [...R[0], ...B]>;
97
-
98
- declare function createMxCADEditor<T extends Editor>(option?: Partial<CreateOption>): T & IMxCADEditor;
99
-
100
- declare interface CreateOption {
101
- plugins: PluginFnType[];
102
- }
103
-
104
- declare interface CustomTextPluginProps {
105
- onDbClick?: (node: MarksStyleText) => void;
106
- uiData?: {
107
- /** 图标 */
108
- icon?: string;
109
- /** 文本(字符) */
110
- text?: string;
111
- /** 提示 */
112
- tip?: string;
113
- /** 点击事件 */
114
- onClick?: () => void;
115
- };
116
- }
117
-
118
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
119
-
120
- declare const defaultColor: {
121
- color: string;
122
- name: string;
123
- index: ColorIndex;
124
- method: ColorMethod;
125
- n: number;
126
- };
127
-
128
- declare type DialogFooterBtnListType = {
129
- name: string;
130
- fun?: (...args: any[]) => void;
131
- primary?: boolean;
132
- labelProps?: InstanceType<typeof _default>["$props"];
133
- disabled?: () => boolean;
134
- }[];
135
-
136
- declare interface DrawerComponentInfo {
137
- isShow: Ref<boolean>;
138
- component: Component;
139
- title: string;
140
- cmd?: string | {
141
- cmd: string;
142
- call: (open: (width?: number) => void, props?: Ref) => void;
143
- }[];
144
- width?: number;
145
- onClose?: (closeAll: Function, leftDrawer: any, isClick?: boolean) => void;
146
- init?: Function;
147
- keyWhen?: () => boolean;
148
- }
149
-
150
- /**
151
- * 定义事件映射接口
152
- * 这里列举了所有可能的事件及其对应的数据类型
153
- */
154
- declare interface EventMap {
155
- 'databaseLayerUpdate': void;
156
- 'startOpenFile': void;
157
- }
158
-
159
10
  export declare const getApp: () => App<Element>;
160
11
 
161
12
  export declare const getRootContainer: () => HTMLElement;
162
13
 
163
- /** 快捷键描述 */
164
- declare interface IKey {
165
- ctrlKey?: boolean;
166
- shiftKey?: boolean;
167
- altKey?: boolean;
168
- metaKey?: boolean;
169
- keyCode: KeyboardEvent['code'] | '*';
170
- }
171
-
172
- /** 快捷键绑定 */
173
- declare interface IKeyBinding {
174
- /** 快捷键描述 */
175
- key: IKey | IKey[];
176
- /** 快捷键描述(Windows 版) 如果提供,且用户操作系统为 Windows,会使用 winKey,忽略 key*/
177
- winKey?: IKey | IKey[];
178
- /** 是否满足上下文 */
179
- when?: (ctx: IWhenCtx) => Promise<boolean> | boolean;
180
- /** 快捷键匹配后要执行的方法,返回true时阻止后续快捷键执行 */
181
- action: (e: KeyboardEvent, ctx: IWhenCtx) => boolean | void;
182
- /** 按键释放时要执行的方法,返回true时阻止后续快捷键执行 */
183
- releaseAction?: (e: KeyboardEvent, ctx: IWhenCtx) => boolean | void;
184
- /** 是否不阻止默认事件 */
185
- isNoPreventDefault?: boolean;
186
- /** 快捷键的额外信息 */
187
- info?: IKeyBindingInfo;
188
- /** 是否打开弹窗时也要运行快捷键 */
189
- isOpenDialogRun?: boolean;
190
- /** 是否在运行命令时也要运行快捷键 */
191
- isRunCommandRun?: boolean;
192
- }
193
-
194
- /** 快捷键绑定的额外息 */
195
- declare interface IKeyBindingInfo {
196
- /** 命令名称,如 'Mx_select_all' */
197
- command?: string;
198
- /** 显示名称,如 '全选' */
199
- label?: string;
200
- /** 描述,如 '选择所有可见对象' */
201
- description?: string;
202
- /** 分类 */
203
- category?: KeyBindingCategory;
204
- /** 是否为系统变量命令 */
205
- isSysVar?: boolean;
206
- }
207
-
208
- declare type IKeyBindingItem = IKeyBinding & {
209
- id: number;
210
- info?: IKeyBindingInfo;
211
- isSuspended?: boolean;
212
- };
213
-
214
- /**
215
- * 扩展slate Editor 接口
216
- */
217
- declare interface IMxCADEditor extends Editor {
218
- moveSelection(options: MoveSelectionOptions): boolean;
219
- history: History_2;
220
- undo: () => void;
221
- redo: () => void;
222
- getText: () => string;
223
- getSelectionText: () => string;
224
- isEmpty: () => boolean;
225
- clear: () => void;
226
- convertToUppercase: () => void;
227
- convertToLowercase: () => void;
228
- mergeParagraphs: () => void;
229
- on: (type: string, listener: default_2.EventListener) => void;
230
- off: (type: string, listener: default_2.EventListener) => void;
231
- once: (type: string, listener: default_2.EventListener) => void;
232
- emit: (type: string, ...args: any[]) => void;
233
- restoreSelection: () => void;
234
- isSelectedAll: () => boolean;
235
- selectAll: () => void;
236
- isParagraph: (node: Node_2) => boolean;
237
- setParagraphAlignment: (alignment: 'left' | 'center' | 'right' | 'justify' | 'distribute') => void;
238
- getParagraphAlignment: () => 'left' | 'center' | 'right' | 'justify' | 'distribute' | null;
239
- setParagraphProperty: (key: string, value: any) => void;
240
- getParagraphProperty: (key: string) => any;
241
- getMarks: () => Record<string, any> | null;
242
- addMark: (key: string, value: any) => void;
243
- removeMark: (key: string) => void;
244
- enableFormatPainter: () => void;
245
- disableFormatPainter: () => void;
246
- isFormatPainterActive: () => boolean;
247
- applyFormatPainter: (targetSelection: BaseSelection) => void;
248
- }
249
-
250
- /** 快捷键上下文 */
251
- declare interface IWhenCtx {
252
- /** 是否在运行命令中 */
253
- isRunCommand: boolean;
254
- /** 是否打开了对话框 */
255
- isOpenDialog: boolean;
256
- event: KeyboardEvent;
257
- }
258
-
259
- /** 快捷键分类 */
260
- declare type KeyBindingCategory = 'common' | 'draw' | 'edit' | 'view' | 'dim' | 'custom';
261
-
262
- /** 快捷键绑定管理器
263
- * @example
264
- * ```ts
265
- * const keyBindingManager = new KeyBindingManager();
266
- * keyBindingManager.register({
267
- * key: [{ keyCode: 'Backspace' }, { keyCode: 'Delete' }],
268
- * when: (ctx)=> !ctx.isRunCommand,
269
- * action: (e) => {},
270
- * info: {
271
- * commandId: 'Mx_select_all',
272
- * name: '全选',
273
- * description: '选择所有可见对象',
274
- * category: 'common'
275
- * }
276
- * })
277
- * ```
278
- */
279
- declare class KeyBindingManager {
280
- private keyBindingMap;
281
- private keyBindingInfoMap;
282
- private id;
283
- private isBound;
284
- private suspendedKeys;
285
- private isProcessing;
286
- constructor();
287
- /** 解析快捷键 */
288
- parseShortcut(shortcut: string): IKey;
289
- /**
290
- * 注册一个快捷键
291
- * @param keybinding 快捷键相关配置
292
- * @returns id 绑定的快捷键ID
293
- * */
294
- register(keybinding: IKeyBinding): number;
295
- /** 注销快捷键
296
- * @param 绑定的快捷键ID
297
- * @returns 是否注销成功
298
- */
299
- unregister(id: number): boolean;
300
- /**
301
- * 绑定一个高优先级快捷键绑定
302
- * */
303
- registerWithHighPrior(keybinding: IKeyBinding): number;
304
- /** 绑定原生键盘事件 */
305
- bindEvent(): void;
306
- private createHandAction;
307
- /** 找到匹配的快捷键配置 执行 action */
308
- private handAction;
309
- /** 查看快捷键是否精准匹配 */
310
- private isKeyMatch;
311
- /**
312
- * 暂停多个快捷键
313
- * @param ids 要暂停的快捷键ID数组
314
- */
315
- suspendKeys(ids: number[]): void;
316
- /**
317
- * 恢复多个快捷键
318
- * @param ids 要恢复的快捷键ID数组
319
- */
320
- resumeKeys(ids: number[]): void;
321
- /**
322
- * 暂停指定的快捷键
323
- */
324
- suspendKey(id: number): void;
325
- /**
326
- * 恢复指定的快捷键
327
- */
328
- resumeKey(id: number): void;
329
- /**
330
- * 暂停所有快捷键
331
- */
332
- suspendAllKeys(): void;
333
- /**
334
- * 恢复所有快捷键
335
- */
336
- resumeAllKeys(): void;
337
- /**
338
- * 检查快捷键是否被禁用
339
- */
340
- isKeySuspended(id: number): boolean;
341
- /**
342
- * 获取所有被禁用的快捷键ID
343
- */
344
- getSuspendedKeys(): number[];
345
- /**
346
- * 获取所有已注册的快捷键
347
- * @returns 已注册的快捷键列表
348
- */
349
- getRegisteredShortcuts(): Array<IKeyBindingItem>;
350
- /**
351
- * 更新已注册的快捷键
352
- * @param id 快捷键ID
353
- * @param updates 要更新的配置
354
- * @returns 是否更新成功
355
- */
356
- updateShortcut(id: number, updates: Partial<IKeyBinding>): boolean;
357
- /**
358
- * 更新快捷键信息
359
- * @param id 快捷键ID
360
- * @param info 要更新的信息
361
- */
362
- updateKeyBindingInfo(id: number, info: Partial<IKeyBindingInfo>): void;
363
- /**
364
- * 获取快捷键信息
365
- * @param id 快捷键ID
366
- */
367
- getKeyBindingInfo(id: number): IKeyBindingInfo | undefined;
368
- /**
369
- * 保存禁用状态到 localStorage
370
- */
371
- private saveSuspendedState;
372
- /**
373
- * 从 localStorage 加载禁用状态
374
- */
375
- private loadSuspendedState;
376
- registerWithId(id: number, keybinding: IKeyBinding): number;
377
- }
378
-
379
- declare type MenuData = UIConfigType["mMenuBarData"][number];
380
-
381
- declare type MenuListItem = Partial<MenuData["list"][number]> & {
382
- tab?: string;
383
- icon?: string;
384
- cmd?: string;
385
- endIcon?: string;
386
- list?: MenuListItem[];
387
- type?: string;
388
- commandOptions?: string[];
389
- };
390
-
391
- declare interface MessageFun {
392
- (message: string, duration?: number): () => void;
393
- success: (message: string, duration?: number) => () => void;
394
- warning: (message: string, duration?: number) => () => void;
395
- info: (message: string, duration?: number) => () => void;
396
- error: (message: string, duration?: number) => () => void;
397
- }
398
-
399
- declare interface MoveSelectionOptions {
400
- targetPath: number[];
401
- targetOffset: number;
402
- }
403
-
404
- /** 列表按钮数据类型 */
405
- declare type MxButtonListData = Partial<(UIConfigType["mLeftButtonBarData"]["buttonBarData"])[number] | (UIConfigType["mRightButtonBarData"]["buttonBarData"])[number] | (UIConfigType["mTitleButtonBarData"])[number] | (UIConfigType["mTopButtonBarData"])[number]>;
406
-
407
14
  declare namespace mxcadApp {
408
15
  export {
409
16
  runApp,
410
17
  getApp,
411
18
  getRootContainer,
412
- setStaticAssetPath,
413
- MxPluginContext_2 as MxPluginContext
19
+ setStaticAssetPath
414
20
  }
415
21
  }
416
22
  export default mxcadApp;
417
23
 
418
- declare class MxCADUIImplement {
419
- plugin: MxCADPluginBase;
420
- mxcad?: McObject;
421
- mxmap?: MxMap;
422
- constructor(mxcad?: McObject);
423
- getUploadFileConfig(): {
424
- baseUrl: string;
425
- saveDwgUrl: string;
426
- mxfilepath: string;
427
- saveUrl: string;
428
- printPdfUrl: string;
429
- cutDwgUrl: string;
430
- };
431
- getServerConfig(): any;
432
- init(plugin: MxCADPluginBase): void;
433
- uploadFile(uploadFile_call: (param: any) => void, isReloadFile?: boolean): Promise<void>;
434
- }
435
-
436
- /** 插件上下文 */
437
- declare const MxPluginContext_2: {
438
- getApp: () => App<Element>;
439
- /** 设置自定义数据属性栏的限制的个数 */
440
- setCustomDataListLength: (length: number) => void;
441
- /**
442
- * 设置如何展示对象特性侧边栏属性分类的方法 方法返回值为分类名称的数组
443
- * @param onGetCategoryNamesFun 传入的方法务必返回分类名称数组 如返回 ["自定义属性", "基础"] 则表示将自定义属性分类放在最前面
444
- * @template
445
- * ```ts
446
- * const onGetCategoryNamesFun = (categoryNames: string[])=> {
447
- * return categoryNames.sort((a, b)=> {
448
- * return a.localeCompare(b)
449
- * })
450
- * }
451
- * setOnGetCategoryNamesFun(onGetCategoryNamesFun)
452
- * ```
453
- * */
454
- setOnGetCategoryNamesFun: (onGetCategoryNamesFun: (categoryNames: string[]) => string[] | undefined) => void;
455
- /** pinia 全局数据 */
456
- store: {
457
- /** pinia Model 聚焦控制
458
- * @template
459
- * ```ts
460
- * const { setCommandFocus, } = MxPluginContext.useFocus()
461
- * setCommandFocus(false) // 关闭命令行输入框用户键盘输入自动聚焦 true 则开启自动聚焦
462
- * filterKeydownNotFocusCodes.add("ArrowUp") // 添加按下不允许自动聚焦命令行输入框的Code(按键事件对应的e.code的值)
463
- * ```
464
- **/
465
- useFocus: StoreDefinition<"focus", _UnwrapAll<Pick<{
466
- isCommandFocus: Ref<boolean, boolean>;
467
- setCommandFocus: (is: boolean) => void;
468
- setInputEl: (el: HTMLElement) => void;
469
- destroyInputAutoFocus: () => void;
470
- filterKeydownNotFocusCodes: Set<string>;
471
- inputEl: Ref<HTMLElement | undefined, HTMLElement | undefined>;
472
- }, "isCommandFocus" | "filterKeydownNotFocusCodes" | "inputEl">>, Pick<{
473
- isCommandFocus: Ref<boolean, boolean>;
474
- setCommandFocus: (is: boolean) => void;
475
- setInputEl: (el: HTMLElement) => void;
476
- destroyInputAutoFocus: () => void;
477
- filterKeydownNotFocusCodes: Set<string>;
478
- inputEl: Ref<HTMLElement | undefined, HTMLElement | undefined>;
479
- }, never>, Pick<{
480
- isCommandFocus: Ref<boolean, boolean>;
481
- setCommandFocus: (is: boolean) => void;
482
- setInputEl: (el: HTMLElement) => void;
483
- destroyInputAutoFocus: () => void;
484
- filterKeydownNotFocusCodes: Set<string>;
485
- inputEl: Ref<HTMLElement | undefined, HTMLElement | undefined>;
486
- }, "setCommandFocus" | "setInputEl" | "destroyInputAutoFocus">>;
487
- /** pinia Model 文本样式
488
- * @template
489
- * ```ts
490
- * const { initList } = MxPluginContext.useTextStyle()
491
- * 重新初始化文本样式列表
492
- * initList()
493
- * ```
494
- * */
495
- useTextStyle: StoreDefinition<"textStyle", _UnwrapAll<Pick<{
496
- list: Ref< {
497
- bigFontFileName: string;
498
- fileName: string;
499
- id: number;
500
- name: string;
501
- obliquingAngle: number;
502
- textSize: number;
503
- typeFace: string;
504
- xScale: number;
505
- isBigFont: boolean;
506
- }[], TextStyleJSON[] | {
507
- bigFontFileName: string;
508
- fileName: string;
509
- id: number;
510
- name: string;
511
- obliquingAngle: number;
512
- textSize: number;
513
- typeFace: string;
514
- xScale: number;
515
- isBigFont: boolean;
516
- }[]>;
517
- initList: () => void;
518
- current: Ref< {
519
- bigFontFileName: string;
520
- fileName: string;
521
- id: number;
522
- name: string;
523
- obliquingAngle: number;
524
- textSize: number;
525
- typeFace: string;
526
- xScale: number;
527
- isBigFont: boolean;
528
- }, TextStyleJSON | {
529
- bigFontFileName: string;
530
- fileName: string;
531
- id: number;
532
- name: string;
533
- obliquingAngle: number;
534
- textSize: number;
535
- typeFace: string;
536
- xScale: number;
537
- isBigFont: boolean;
538
- }>;
539
- index: Ref<number, number>;
540
- fontNames: ComputedRef<string[]>;
541
- fontStyles: ComputedRef<string[]>;
542
- newStyleName: Ref<string, string>;
543
- isUpdate: Ref<boolean, boolean>;
544
- init: () => void;
545
- setIndex: (i: number) => void;
546
- putCurrent: () => void;
547
- add: () => true | undefined;
548
- remove: () => void;
549
- apply: () => void;
550
- textStyles: ComputedRef<string[]>;
551
- txtFontNames: Ref<string[], string[]>;
552
- trueTypeFontNames: Ref<string[], string[]>;
553
- bigFontNames: Ref<string[], string[]>;
554
- }, "list" | "index" | "current" | "isUpdate" | "txtFontNames" | "trueTypeFontNames" | "bigFontNames" | "newStyleName">>, Pick<{
555
- list: Ref< {
556
- bigFontFileName: string;
557
- fileName: string;
558
- id: number;
559
- name: string;
560
- obliquingAngle: number;
561
- textSize: number;
562
- typeFace: string;
563
- xScale: number;
564
- isBigFont: boolean;
565
- }[], TextStyleJSON[] | {
566
- bigFontFileName: string;
567
- fileName: string;
568
- id: number;
569
- name: string;
570
- obliquingAngle: number;
571
- textSize: number;
572
- typeFace: string;
573
- xScale: number;
574
- isBigFont: boolean;
575
- }[]>;
576
- initList: () => void;
577
- current: Ref< {
578
- bigFontFileName: string;
579
- fileName: string;
580
- id: number;
581
- name: string;
582
- obliquingAngle: number;
583
- textSize: number;
584
- typeFace: string;
585
- xScale: number;
586
- isBigFont: boolean;
587
- }, TextStyleJSON | {
588
- bigFontFileName: string;
589
- fileName: string;
590
- id: number;
591
- name: string;
592
- obliquingAngle: number;
593
- textSize: number;
594
- typeFace: string;
595
- xScale: number;
596
- isBigFont: boolean;
597
- }>;
598
- index: Ref<number, number>;
599
- fontNames: ComputedRef<string[]>;
600
- fontStyles: ComputedRef<string[]>;
601
- newStyleName: Ref<string, string>;
602
- isUpdate: Ref<boolean, boolean>;
603
- init: () => void;
604
- setIndex: (i: number) => void;
605
- putCurrent: () => void;
606
- add: () => true | undefined;
607
- remove: () => void;
608
- apply: () => void;
609
- textStyles: ComputedRef<string[]>;
610
- txtFontNames: Ref<string[], string[]>;
611
- trueTypeFontNames: Ref<string[], string[]>;
612
- bigFontNames: Ref<string[], string[]>;
613
- }, "fontNames" | "fontStyles" | "textStyles">, Pick<{
614
- list: Ref< {
615
- bigFontFileName: string;
616
- fileName: string;
617
- id: number;
618
- name: string;
619
- obliquingAngle: number;
620
- textSize: number;
621
- typeFace: string;
622
- xScale: number;
623
- isBigFont: boolean;
624
- }[], TextStyleJSON[] | {
625
- bigFontFileName: string;
626
- fileName: string;
627
- id: number;
628
- name: string;
629
- obliquingAngle: number;
630
- textSize: number;
631
- typeFace: string;
632
- xScale: number;
633
- isBigFont: boolean;
634
- }[]>;
635
- initList: () => void;
636
- current: Ref< {
637
- bigFontFileName: string;
638
- fileName: string;
639
- id: number;
640
- name: string;
641
- obliquingAngle: number;
642
- textSize: number;
643
- typeFace: string;
644
- xScale: number;
645
- isBigFont: boolean;
646
- }, TextStyleJSON | {
647
- bigFontFileName: string;
648
- fileName: string;
649
- id: number;
650
- name: string;
651
- obliquingAngle: number;
652
- textSize: number;
653
- typeFace: string;
654
- xScale: number;
655
- isBigFont: boolean;
656
- }>;
657
- index: Ref<number, number>;
658
- fontNames: ComputedRef<string[]>;
659
- fontStyles: ComputedRef<string[]>;
660
- newStyleName: Ref<string, string>;
661
- isUpdate: Ref<boolean, boolean>;
662
- init: () => void;
663
- setIndex: (i: number) => void;
664
- putCurrent: () => void;
665
- add: () => true | undefined;
666
- remove: () => void;
667
- apply: () => void;
668
- textStyles: ComputedRef<string[]>;
669
- txtFontNames: Ref<string[], string[]>;
670
- trueTypeFontNames: Ref<string[], string[]>;
671
- bigFontNames: Ref<string[], string[]>;
672
- }, "add" | "init" | "setIndex" | "remove" | "putCurrent" | "apply" | "initList">>;
673
- /** pinia Model 图层
674
- * @template
675
- * ```ts
676
- * const { initLayerList } = MxPluginContext.useLayer()
677
- * 在通过mxcad 方法修改图层后可以 重新初始化图层列表 更新UI
678
- * initLayerList()
679
- * ```
680
- */
681
- useLayer: () => Store<"layer", _UnwrapAll<Pick<{
682
- list: Ref< {
683
- id: number;
684
- name: string;
685
- visible: boolean;
686
- freeze: boolean;
687
- lock: boolean;
688
- print: boolean;
689
- status: boolean;
690
- isSelect: boolean;
691
- color: {
692
- color: string;
693
- name: string;
694
- index: ColorIndex;
695
- method: ColorMethod;
696
- n: number;
697
- };
698
- lineType: {
699
- name: string;
700
- explain: string;
701
- appearance: string;
702
- id: number;
703
- value?: (null | string) | undefined;
704
- };
705
- lineWeight: McDb.LineWeight;
706
- }[], {
707
- id: number;
708
- name: string;
709
- visible: boolean;
710
- freeze: boolean;
711
- lock: boolean;
712
- print: boolean;
713
- status: boolean;
714
- isSelect: boolean;
715
- color: {
716
- color: string;
717
- name: string;
718
- index: ColorIndex;
719
- method: ColorMethod;
720
- n: number;
721
- };
722
- lineType: {
723
- name: string;
724
- explain: string;
725
- appearance: string;
726
- id: number;
727
- value?: (null | string) | undefined;
728
- };
729
- lineWeight: McDb.LineWeight;
730
- }[] | {
731
- id: number;
732
- name: string;
733
- visible: boolean;
734
- freeze: boolean;
735
- lock: boolean;
736
- print: boolean;
737
- status: boolean;
738
- isSelect: boolean;
739
- color: {
740
- color: string;
741
- name: string;
742
- index: ColorIndex;
743
- method: ColorMethod;
744
- n: number;
745
- };
746
- lineType: {
747
- name: string;
748
- explain: string;
749
- appearance: string;
750
- id: number;
751
- value?: (null | string) | undefined;
752
- };
753
- lineWeight: McDb.LineWeight;
754
- }[]>;
755
- index: Ref<number | number[], number | number[]>;
756
- currentLayer: Ref< {
757
- id: number;
758
- name: string;
759
- visible: boolean;
760
- freeze: boolean;
761
- lock: boolean;
762
- print: boolean;
763
- status: boolean;
764
- isSelect: boolean;
765
- color: {
766
- color: string;
767
- name: string;
768
- index: ColorIndex;
769
- method: ColorMethod;
770
- n: number;
771
- };
772
- lineType: {
773
- name: string;
774
- explain: string;
775
- appearance: string;
776
- id: number;
777
- value?: (null | string) | undefined;
778
- };
779
- lineWeight: McDb.LineWeight;
780
- } | undefined, {
781
- id: number;
782
- name: string;
783
- visible: boolean;
784
- freeze: boolean;
785
- lock: boolean;
786
- print: boolean;
787
- status: boolean;
788
- isSelect: boolean;
789
- color: {
790
- color: string;
791
- name: string;
792
- index: ColorIndex;
793
- method: ColorMethod;
794
- n: number;
795
- };
796
- lineType: {
797
- name: string;
798
- explain: string;
799
- appearance: string;
800
- id: number;
801
- value?: (null | string) | undefined;
802
- };
803
- lineWeight: McDb.LineWeight;
804
- } | undefined>;
805
- rootId: ComputedRef<number>;
806
- setIndex: (i: number | number[] | Ref<number | number[], number | number[]>) => void;
807
- getIndex: (_index?: ({
808
- id: number;
809
- name: string;
810
- visible: boolean;
811
- freeze: boolean;
812
- lock: boolean;
813
- print: boolean;
814
- status: boolean;
815
- isSelect: boolean;
816
- color: {
817
- color: string;
818
- name: string;
819
- index: ColorIndex;
820
- method: ColorMethod;
821
- n: number;
822
- };
823
- lineType: {
824
- name: string;
825
- explain: string;
826
- appearance: string;
827
- id: number;
828
- value?: (null | string) | undefined;
829
- };
830
- lineWeight: McDb.LineWeight;
831
- } | {
832
- id: number;
833
- name: string;
834
- visible: boolean;
835
- freeze: boolean;
836
- lock: boolean;
837
- print: boolean;
838
- status: boolean;
839
- isSelect: boolean;
840
- color: {
841
- color: string;
842
- name: string;
843
- index: ColorIndex;
844
- method: ColorMethod;
845
- n: number;
846
- };
847
- lineType: {
848
- name: string;
849
- explain: string;
850
- appearance: string;
851
- id: number;
852
- value?: (null | string) | undefined;
853
- };
854
- lineWeight: McDb.LineWeight;
855
- }[] | Ref< {
856
- id: number;
857
- name: string;
858
- visible: boolean;
859
- freeze: boolean;
860
- lock: boolean;
861
- print: boolean;
862
- status: boolean;
863
- isSelect: boolean;
864
- color: {
865
- color: string;
866
- name: string;
867
- index: ColorIndex;
868
- method: ColorMethod;
869
- n: number;
870
- };
871
- lineType: {
872
- name: string;
873
- explain: string;
874
- appearance: string;
875
- id: number;
876
- value?: (null | string) | undefined;
877
- };
878
- lineWeight: McDb.LineWeight;
879
- } | {
880
- id: number;
881
- name: string;
882
- visible: boolean;
883
- freeze: boolean;
884
- lock: boolean;
885
- print: boolean;
886
- status: boolean;
887
- isSelect: boolean;
888
- color: {
889
- color: string;
890
- name: string;
891
- index: ColorIndex;
892
- method: ColorMethod;
893
- n: number;
894
- };
895
- lineType: {
896
- name: string;
897
- explain: string;
898
- appearance: string;
899
- id: number;
900
- value?: (null | string) | undefined;
901
- };
902
- lineWeight: McDb.LineWeight;
903
- }[], {
904
- id: number;
905
- name: string;
906
- visible: boolean;
907
- freeze: boolean;
908
- lock: boolean;
909
- print: boolean;
910
- status: boolean;
911
- isSelect: boolean;
912
- color: {
913
- color: string;
914
- name: string;
915
- index: ColorIndex;
916
- method: ColorMethod;
917
- n: number;
918
- };
919
- lineType: {
920
- name: string;
921
- explain: string;
922
- appearance: string;
923
- id: number;
924
- value?: (null | string) | undefined;
925
- };
926
- lineWeight: McDb.LineWeight;
927
- } | {
928
- id: number;
929
- name: string;
930
- visible: boolean;
931
- freeze: boolean;
932
- lock: boolean;
933
- print: boolean;
934
- status: boolean;
935
- isSelect: boolean;
936
- color: {
937
- color: string;
938
- name: string;
939
- index: ColorIndex;
940
- method: ColorMethod;
941
- n: number;
942
- };
943
- lineType: {
944
- name: string;
945
- explain: string;
946
- appearance: string;
947
- id: number;
948
- value?: (null | string) | undefined;
949
- };
950
- lineWeight: McDb.LineWeight;
951
- }[]>) | (number | number[] | Ref<number | number[], number | number[]>)) => number | number[];
952
- add: (layerItem?: {
953
- id: number;
954
- name: string;
955
- visible: boolean;
956
- freeze: boolean;
957
- lock: boolean;
958
- print: boolean;
959
- status: boolean;
960
- isSelect: boolean;
961
- color: {
962
- color: string;
963
- name: string;
964
- index: ColorIndex;
965
- method: ColorMethod;
966
- n: number;
967
- };
968
- lineType: {
969
- name: string;
970
- explain: string;
971
- appearance: string;
972
- id: number;
973
- value?: (null | string) | undefined;
974
- };
975
- lineWeight: McDb.LineWeight;
976
- }) => {
977
- id: number;
978
- name: string;
979
- visible: boolean;
980
- freeze: boolean;
981
- lock: boolean;
982
- print: boolean;
983
- status: boolean;
984
- isSelect: boolean;
985
- color: {
986
- color: string;
987
- name: string;
988
- index: ColorIndex;
989
- method: ColorMethod;
990
- n: number;
991
- };
992
- lineType: {
993
- name: string;
994
- explain: string;
995
- appearance: string;
996
- id: number;
997
- value?: (null | string) | undefined;
998
- };
999
- lineWeight: McDb.LineWeight;
1000
- };
1001
- create: (options?: Partial<{
1002
- id: number;
1003
- name: string;
1004
- visible: boolean;
1005
- freeze: boolean;
1006
- lock: boolean;
1007
- print: boolean;
1008
- status: boolean;
1009
- isSelect: boolean;
1010
- color: {
1011
- color: string;
1012
- name: string;
1013
- index: ColorIndex;
1014
- method: ColorMethod;
1015
- n: number;
1016
- };
1017
- lineType: {
1018
- name: string;
1019
- explain: string;
1020
- appearance: string;
1021
- id: number;
1022
- value?: (null | string) | undefined;
1023
- };
1024
- lineWeight: McDb.LineWeight;
1025
- }>) => {
1026
- id: number;
1027
- name: string;
1028
- visible: boolean;
1029
- freeze: boolean;
1030
- lock: boolean;
1031
- print: boolean;
1032
- status: boolean;
1033
- isSelect: boolean;
1034
- color: {
1035
- color: string;
1036
- name: string;
1037
- index: ColorIndex;
1038
- method: ColorMethod;
1039
- n: number;
1040
- };
1041
- lineType: {
1042
- name: string;
1043
- explain: string;
1044
- appearance: string;
1045
- id: number;
1046
- value?: (null | string) | undefined;
1047
- };
1048
- lineWeight: McDb.LineWeight;
1049
- };
1050
- remove: (layers?: number | {
1051
- id: number;
1052
- name: string;
1053
- visible: boolean;
1054
- freeze: boolean;
1055
- lock: boolean;
1056
- print: boolean;
1057
- status: boolean;
1058
- isSelect: boolean;
1059
- color: {
1060
- color: string;
1061
- name: string;
1062
- index: ColorIndex;
1063
- method: ColorMethod;
1064
- n: number;
1065
- };
1066
- lineType: {
1067
- name: string;
1068
- explain: string;
1069
- appearance: string;
1070
- id: number;
1071
- value?: (null | string) | undefined;
1072
- };
1073
- lineWeight: McDb.LineWeight;
1074
- } | (number | {
1075
- id: number;
1076
- name: string;
1077
- visible: boolean;
1078
- freeze: boolean;
1079
- lock: boolean;
1080
- print: boolean;
1081
- status: boolean;
1082
- isSelect: boolean;
1083
- color: {
1084
- color: string;
1085
- name: string;
1086
- index: ColorIndex;
1087
- method: ColorMethod;
1088
- n: number;
1089
- };
1090
- lineType: {
1091
- name: string;
1092
- explain: string;
1093
- appearance: string;
1094
- id: number;
1095
- value?: (null | string) | undefined;
1096
- };
1097
- lineWeight: McDb.LineWeight;
1098
- })[] | Ref<number | {
1099
- id: number;
1100
- name: string;
1101
- visible: boolean;
1102
- freeze: boolean;
1103
- lock: boolean;
1104
- print: boolean;
1105
- status: boolean;
1106
- isSelect: boolean;
1107
- color: {
1108
- color: string;
1109
- name: string;
1110
- index: ColorIndex;
1111
- method: ColorMethod;
1112
- n: number;
1113
- };
1114
- lineType: {
1115
- name: string;
1116
- explain: string;
1117
- appearance: string;
1118
- id: number;
1119
- value?: (null | string) | undefined;
1120
- };
1121
- lineWeight: McDb.LineWeight;
1122
- } | (number | {
1123
- id: number;
1124
- name: string;
1125
- visible: boolean;
1126
- freeze: boolean;
1127
- lock: boolean;
1128
- print: boolean;
1129
- status: boolean;
1130
- isSelect: boolean;
1131
- color: {
1132
- color: string;
1133
- name: string;
1134
- index: ColorIndex;
1135
- method: ColorMethod;
1136
- n: number;
1137
- };
1138
- lineType: {
1139
- name: string;
1140
- explain: string;
1141
- appearance: string;
1142
- id: number;
1143
- value?: (null | string) | undefined;
1144
- };
1145
- lineWeight: McDb.LineWeight;
1146
- })[], number | {
1147
- id: number;
1148
- name: string;
1149
- visible: boolean;
1150
- freeze: boolean;
1151
- lock: boolean;
1152
- print: boolean;
1153
- status: boolean;
1154
- isSelect: boolean;
1155
- color: {
1156
- color: string;
1157
- name: string;
1158
- index: ColorIndex;
1159
- method: ColorMethod;
1160
- n: number;
1161
- };
1162
- lineType: {
1163
- name: string;
1164
- explain: string;
1165
- appearance: string;
1166
- id: number;
1167
- value?: (null | string) | undefined;
1168
- };
1169
- lineWeight: McDb.LineWeight;
1170
- } | (number | {
1171
- id: number;
1172
- name: string;
1173
- visible: boolean;
1174
- freeze: boolean;
1175
- lock: boolean;
1176
- print: boolean;
1177
- status: boolean;
1178
- isSelect: boolean;
1179
- color: {
1180
- color: string;
1181
- name: string;
1182
- index: ColorIndex;
1183
- method: ColorMethod;
1184
- n: number;
1185
- };
1186
- lineType: {
1187
- name: string;
1188
- explain: string;
1189
- appearance: string;
1190
- id: number;
1191
- value?: (null | string) | undefined;
1192
- };
1193
- lineWeight: McDb.LineWeight;
1194
- })[]>, type?: "index" | "id" | "this") => {
1195
- id: number;
1196
- name: string;
1197
- visible: boolean;
1198
- freeze: boolean;
1199
- lock: boolean;
1200
- print: boolean;
1201
- status: boolean;
1202
- isSelect: boolean;
1203
- color: {
1204
- color: string;
1205
- name: string;
1206
- index: ColorIndex;
1207
- method: ColorMethod;
1208
- n: number;
1209
- };
1210
- lineType: {
1211
- name: string;
1212
- explain: string;
1213
- appearance: string;
1214
- id: number;
1215
- value?: (null | string) | undefined;
1216
- };
1217
- lineWeight: McDb.LineWeight;
1218
- }[] | undefined;
1219
- toggle: (key: keyof Pick<{
1220
- id: number;
1221
- name: string;
1222
- visible: boolean;
1223
- freeze: boolean;
1224
- lock: boolean;
1225
- print: boolean;
1226
- status: boolean;
1227
- isSelect: boolean;
1228
- color: {
1229
- color: string;
1230
- name: string;
1231
- index: ColorIndex;
1232
- method: ColorMethod;
1233
- n: number;
1234
- };
1235
- lineType: {
1236
- name: string;
1237
- explain: string;
1238
- appearance: string;
1239
- id: number;
1240
- value?: (null | string) | undefined;
1241
- };
1242
- lineWeight: McDb.LineWeight;
1243
- }, "freeze" | "lock" | "print" | "visible" | "isSelect">, i?: number | number[] | Ref<number | number[], number | number[]>) => boolean | (boolean | undefined)[] | undefined;
1244
- setValue: (key: "id" | "name" | "lineWeight" | "color" | "visible" | "lineType" | "freeze" | "lock" | "print" | "status" | "isSelect", v: string | number | boolean | {
1245
- color: string;
1246
- name: string;
1247
- index: ColorIndex;
1248
- method: ColorMethod;
1249
- n: number;
1250
- } | {
1251
- name: string;
1252
- explain: string;
1253
- appearance: string;
1254
- id: number;
1255
- value?: (null | string) | undefined;
1256
- } | (string | number | boolean | {
1257
- color: string;
1258
- name: string;
1259
- index: ColorIndex;
1260
- method: ColorMethod;
1261
- n: number;
1262
- } | {
1263
- name: string;
1264
- explain: string;
1265
- appearance: string;
1266
- id: number;
1267
- value?: (null | string) | undefined;
1268
- })[] | Ref<string | number | boolean | {
1269
- color: string;
1270
- name: string;
1271
- index: ColorIndex;
1272
- method: ColorMethod;
1273
- n: number;
1274
- } | {
1275
- name: string;
1276
- explain: string;
1277
- appearance: string;
1278
- id: number;
1279
- value?: (null | string) | undefined;
1280
- } | (string | number | boolean | {
1281
- color: string;
1282
- name: string;
1283
- index: ColorIndex;
1284
- method: ColorMethod;
1285
- n: number;
1286
- } | {
1287
- name: string;
1288
- explain: string;
1289
- appearance: string;
1290
- id: number;
1291
- value?: (null | string) | undefined;
1292
- })[], string | number | boolean | {
1293
- color: string;
1294
- name: string;
1295
- index: ColorIndex;
1296
- method: ColorMethod;
1297
- n: number;
1298
- } | {
1299
- name: string;
1300
- explain: string;
1301
- appearance: string;
1302
- id: number;
1303
- value?: (null | string) | undefined;
1304
- } | (string | number | boolean | {
1305
- color: string;
1306
- name: string;
1307
- index: ColorIndex;
1308
- method: ColorMethod;
1309
- n: number;
1310
- } | {
1311
- name: string;
1312
- explain: string;
1313
- appearance: string;
1314
- id: number;
1315
- value?: (null | string) | undefined;
1316
- })[]>, i?: number | number[] | Ref<number | number[], number | number[]>, isSave?: boolean) => (string | number | boolean | {
1317
- color: string;
1318
- name: string;
1319
- index: ColorIndex;
1320
- method: ColorMethod;
1321
- n: number;
1322
- } | {
1323
- name: string;
1324
- explain: string;
1325
- appearance: string;
1326
- id: number;
1327
- value?: (null | string) | undefined;
1328
- })[];
1329
- putCurrent: (val?: {
1330
- id: number;
1331
- name: string;
1332
- visible: boolean;
1333
- freeze: boolean;
1334
- lock: boolean;
1335
- print: boolean;
1336
- status: boolean;
1337
- isSelect: boolean;
1338
- color: {
1339
- color: string;
1340
- name: string;
1341
- index: ColorIndex;
1342
- method: ColorMethod;
1343
- n: number;
1344
- };
1345
- lineType: {
1346
- name: string;
1347
- explain: string;
1348
- appearance: string;
1349
- id: number;
1350
- value?: (null | string) | undefined;
1351
- };
1352
- lineWeight: McDb.LineWeight;
1353
- } | number, isSave?: boolean) => void;
1354
- parseJSON: (jsonText?: string) => void;
1355
- stringifyJSON: () => string;
1356
- initLayerList: () => void;
1357
- initCurrentLayer: (layerName?: string) => void;
1358
- setLayerList: (jsonText: string) => Promise<void>;
1359
- recoveryLayerStateHistory: () => void;
1360
- }, "list" | "index" | "currentLayer">>, Pick<{
1361
- list: Ref< {
1362
- id: number;
1363
- name: string;
1364
- visible: boolean;
1365
- freeze: boolean;
1366
- lock: boolean;
1367
- print: boolean;
1368
- status: boolean;
1369
- isSelect: boolean;
1370
- color: {
1371
- color: string;
1372
- name: string;
1373
- index: ColorIndex;
1374
- method: ColorMethod;
1375
- n: number;
1376
- };
1377
- lineType: {
1378
- name: string;
1379
- explain: string;
1380
- appearance: string;
1381
- id: number;
1382
- value?: (null | string) | undefined;
1383
- };
1384
- lineWeight: McDb.LineWeight;
1385
- }[], {
1386
- id: number;
1387
- name: string;
1388
- visible: boolean;
1389
- freeze: boolean;
1390
- lock: boolean;
1391
- print: boolean;
1392
- status: boolean;
1393
- isSelect: boolean;
1394
- color: {
1395
- color: string;
1396
- name: string;
1397
- index: ColorIndex;
1398
- method: ColorMethod;
1399
- n: number;
1400
- };
1401
- lineType: {
1402
- name: string;
1403
- explain: string;
1404
- appearance: string;
1405
- id: number;
1406
- value?: (null | string) | undefined;
1407
- };
1408
- lineWeight: McDb.LineWeight;
1409
- }[] | {
1410
- id: number;
1411
- name: string;
1412
- visible: boolean;
1413
- freeze: boolean;
1414
- lock: boolean;
1415
- print: boolean;
1416
- status: boolean;
1417
- isSelect: boolean;
1418
- color: {
1419
- color: string;
1420
- name: string;
1421
- index: ColorIndex;
1422
- method: ColorMethod;
1423
- n: number;
1424
- };
1425
- lineType: {
1426
- name: string;
1427
- explain: string;
1428
- appearance: string;
1429
- id: number;
1430
- value?: (null | string) | undefined;
1431
- };
1432
- lineWeight: McDb.LineWeight;
1433
- }[]>;
1434
- index: Ref<number | number[], number | number[]>;
1435
- currentLayer: Ref< {
1436
- id: number;
1437
- name: string;
1438
- visible: boolean;
1439
- freeze: boolean;
1440
- lock: boolean;
1441
- print: boolean;
1442
- status: boolean;
1443
- isSelect: boolean;
1444
- color: {
1445
- color: string;
1446
- name: string;
1447
- index: ColorIndex;
1448
- method: ColorMethod;
1449
- n: number;
1450
- };
1451
- lineType: {
1452
- name: string;
1453
- explain: string;
1454
- appearance: string;
1455
- id: number;
1456
- value?: (null | string) | undefined;
1457
- };
1458
- lineWeight: McDb.LineWeight;
1459
- } | undefined, {
1460
- id: number;
1461
- name: string;
1462
- visible: boolean;
1463
- freeze: boolean;
1464
- lock: boolean;
1465
- print: boolean;
1466
- status: boolean;
1467
- isSelect: boolean;
1468
- color: {
1469
- color: string;
1470
- name: string;
1471
- index: ColorIndex;
1472
- method: ColorMethod;
1473
- n: number;
1474
- };
1475
- lineType: {
1476
- name: string;
1477
- explain: string;
1478
- appearance: string;
1479
- id: number;
1480
- value?: (null | string) | undefined;
1481
- };
1482
- lineWeight: McDb.LineWeight;
1483
- } | undefined>;
1484
- rootId: ComputedRef<number>;
1485
- setIndex: (i: number | number[] | Ref<number | number[], number | number[]>) => void;
1486
- getIndex: (_index?: ({
1487
- id: number;
1488
- name: string;
1489
- visible: boolean;
1490
- freeze: boolean;
1491
- lock: boolean;
1492
- print: boolean;
1493
- status: boolean;
1494
- isSelect: boolean;
1495
- color: {
1496
- color: string;
1497
- name: string;
1498
- index: ColorIndex;
1499
- method: ColorMethod;
1500
- n: number;
1501
- };
1502
- lineType: {
1503
- name: string;
1504
- explain: string;
1505
- appearance: string;
1506
- id: number;
1507
- value?: (null | string) | undefined;
1508
- };
1509
- lineWeight: McDb.LineWeight;
1510
- } | {
1511
- id: number;
1512
- name: string;
1513
- visible: boolean;
1514
- freeze: boolean;
1515
- lock: boolean;
1516
- print: boolean;
1517
- status: boolean;
1518
- isSelect: boolean;
1519
- color: {
1520
- color: string;
1521
- name: string;
1522
- index: ColorIndex;
1523
- method: ColorMethod;
1524
- n: number;
1525
- };
1526
- lineType: {
1527
- name: string;
1528
- explain: string;
1529
- appearance: string;
1530
- id: number;
1531
- value?: (null | string) | undefined;
1532
- };
1533
- lineWeight: McDb.LineWeight;
1534
- }[] | Ref< {
1535
- id: number;
1536
- name: string;
1537
- visible: boolean;
1538
- freeze: boolean;
1539
- lock: boolean;
1540
- print: boolean;
1541
- status: boolean;
1542
- isSelect: boolean;
1543
- color: {
1544
- color: string;
1545
- name: string;
1546
- index: ColorIndex;
1547
- method: ColorMethod;
1548
- n: number;
1549
- };
1550
- lineType: {
1551
- name: string;
1552
- explain: string;
1553
- appearance: string;
1554
- id: number;
1555
- value?: (null | string) | undefined;
1556
- };
1557
- lineWeight: McDb.LineWeight;
1558
- } | {
1559
- id: number;
1560
- name: string;
1561
- visible: boolean;
1562
- freeze: boolean;
1563
- lock: boolean;
1564
- print: boolean;
1565
- status: boolean;
1566
- isSelect: boolean;
1567
- color: {
1568
- color: string;
1569
- name: string;
1570
- index: ColorIndex;
1571
- method: ColorMethod;
1572
- n: number;
1573
- };
1574
- lineType: {
1575
- name: string;
1576
- explain: string;
1577
- appearance: string;
1578
- id: number;
1579
- value?: (null | string) | undefined;
1580
- };
1581
- lineWeight: McDb.LineWeight;
1582
- }[], {
1583
- id: number;
1584
- name: string;
1585
- visible: boolean;
1586
- freeze: boolean;
1587
- lock: boolean;
1588
- print: boolean;
1589
- status: boolean;
1590
- isSelect: boolean;
1591
- color: {
1592
- color: string;
1593
- name: string;
1594
- index: ColorIndex;
1595
- method: ColorMethod;
1596
- n: number;
1597
- };
1598
- lineType: {
1599
- name: string;
1600
- explain: string;
1601
- appearance: string;
1602
- id: number;
1603
- value?: (null | string) | undefined;
1604
- };
1605
- lineWeight: McDb.LineWeight;
1606
- } | {
1607
- id: number;
1608
- name: string;
1609
- visible: boolean;
1610
- freeze: boolean;
1611
- lock: boolean;
1612
- print: boolean;
1613
- status: boolean;
1614
- isSelect: boolean;
1615
- color: {
1616
- color: string;
1617
- name: string;
1618
- index: ColorIndex;
1619
- method: ColorMethod;
1620
- n: number;
1621
- };
1622
- lineType: {
1623
- name: string;
1624
- explain: string;
1625
- appearance: string;
1626
- id: number;
1627
- value?: (null | string) | undefined;
1628
- };
1629
- lineWeight: McDb.LineWeight;
1630
- }[]>) | (number | number[] | Ref<number | number[], number | number[]>)) => number | number[];
1631
- add: (layerItem?: {
1632
- id: number;
1633
- name: string;
1634
- visible: boolean;
1635
- freeze: boolean;
1636
- lock: boolean;
1637
- print: boolean;
1638
- status: boolean;
1639
- isSelect: boolean;
1640
- color: {
1641
- color: string;
1642
- name: string;
1643
- index: ColorIndex;
1644
- method: ColorMethod;
1645
- n: number;
1646
- };
1647
- lineType: {
1648
- name: string;
1649
- explain: string;
1650
- appearance: string;
1651
- id: number;
1652
- value?: (null | string) | undefined;
1653
- };
1654
- lineWeight: McDb.LineWeight;
1655
- }) => {
1656
- id: number;
1657
- name: string;
1658
- visible: boolean;
1659
- freeze: boolean;
1660
- lock: boolean;
1661
- print: boolean;
1662
- status: boolean;
1663
- isSelect: boolean;
1664
- color: {
1665
- color: string;
1666
- name: string;
1667
- index: ColorIndex;
1668
- method: ColorMethod;
1669
- n: number;
1670
- };
1671
- lineType: {
1672
- name: string;
1673
- explain: string;
1674
- appearance: string;
1675
- id: number;
1676
- value?: (null | string) | undefined;
1677
- };
1678
- lineWeight: McDb.LineWeight;
1679
- };
1680
- create: (options?: Partial<{
1681
- id: number;
1682
- name: string;
1683
- visible: boolean;
1684
- freeze: boolean;
1685
- lock: boolean;
1686
- print: boolean;
1687
- status: boolean;
1688
- isSelect: boolean;
1689
- color: {
1690
- color: string;
1691
- name: string;
1692
- index: ColorIndex;
1693
- method: ColorMethod;
1694
- n: number;
1695
- };
1696
- lineType: {
1697
- name: string;
1698
- explain: string;
1699
- appearance: string;
1700
- id: number;
1701
- value?: (null | string) | undefined;
1702
- };
1703
- lineWeight: McDb.LineWeight;
1704
- }>) => {
1705
- id: number;
1706
- name: string;
1707
- visible: boolean;
1708
- freeze: boolean;
1709
- lock: boolean;
1710
- print: boolean;
1711
- status: boolean;
1712
- isSelect: boolean;
1713
- color: {
1714
- color: string;
1715
- name: string;
1716
- index: ColorIndex;
1717
- method: ColorMethod;
1718
- n: number;
1719
- };
1720
- lineType: {
1721
- name: string;
1722
- explain: string;
1723
- appearance: string;
1724
- id: number;
1725
- value?: (null | string) | undefined;
1726
- };
1727
- lineWeight: McDb.LineWeight;
1728
- };
1729
- remove: (layers?: number | {
1730
- id: number;
1731
- name: string;
1732
- visible: boolean;
1733
- freeze: boolean;
1734
- lock: boolean;
1735
- print: boolean;
1736
- status: boolean;
1737
- isSelect: boolean;
1738
- color: {
1739
- color: string;
1740
- name: string;
1741
- index: ColorIndex;
1742
- method: ColorMethod;
1743
- n: number;
1744
- };
1745
- lineType: {
1746
- name: string;
1747
- explain: string;
1748
- appearance: string;
1749
- id: number;
1750
- value?: (null | string) | undefined;
1751
- };
1752
- lineWeight: McDb.LineWeight;
1753
- } | (number | {
1754
- id: number;
1755
- name: string;
1756
- visible: boolean;
1757
- freeze: boolean;
1758
- lock: boolean;
1759
- print: boolean;
1760
- status: boolean;
1761
- isSelect: boolean;
1762
- color: {
1763
- color: string;
1764
- name: string;
1765
- index: ColorIndex;
1766
- method: ColorMethod;
1767
- n: number;
1768
- };
1769
- lineType: {
1770
- name: string;
1771
- explain: string;
1772
- appearance: string;
1773
- id: number;
1774
- value?: (null | string) | undefined;
1775
- };
1776
- lineWeight: McDb.LineWeight;
1777
- })[] | Ref<number | {
1778
- id: number;
1779
- name: string;
1780
- visible: boolean;
1781
- freeze: boolean;
1782
- lock: boolean;
1783
- print: boolean;
1784
- status: boolean;
1785
- isSelect: boolean;
1786
- color: {
1787
- color: string;
1788
- name: string;
1789
- index: ColorIndex;
1790
- method: ColorMethod;
1791
- n: number;
1792
- };
1793
- lineType: {
1794
- name: string;
1795
- explain: string;
1796
- appearance: string;
1797
- id: number;
1798
- value?: (null | string) | undefined;
1799
- };
1800
- lineWeight: McDb.LineWeight;
1801
- } | (number | {
1802
- id: number;
1803
- name: string;
1804
- visible: boolean;
1805
- freeze: boolean;
1806
- lock: boolean;
1807
- print: boolean;
1808
- status: boolean;
1809
- isSelect: boolean;
1810
- color: {
1811
- color: string;
1812
- name: string;
1813
- index: ColorIndex;
1814
- method: ColorMethod;
1815
- n: number;
1816
- };
1817
- lineType: {
1818
- name: string;
1819
- explain: string;
1820
- appearance: string;
1821
- id: number;
1822
- value?: (null | string) | undefined;
1823
- };
1824
- lineWeight: McDb.LineWeight;
1825
- })[], number | {
1826
- id: number;
1827
- name: string;
1828
- visible: boolean;
1829
- freeze: boolean;
1830
- lock: boolean;
1831
- print: boolean;
1832
- status: boolean;
1833
- isSelect: boolean;
1834
- color: {
1835
- color: string;
1836
- name: string;
1837
- index: ColorIndex;
1838
- method: ColorMethod;
1839
- n: number;
1840
- };
1841
- lineType: {
1842
- name: string;
1843
- explain: string;
1844
- appearance: string;
1845
- id: number;
1846
- value?: (null | string) | undefined;
1847
- };
1848
- lineWeight: McDb.LineWeight;
1849
- } | (number | {
1850
- id: number;
1851
- name: string;
1852
- visible: boolean;
1853
- freeze: boolean;
1854
- lock: boolean;
1855
- print: boolean;
1856
- status: boolean;
1857
- isSelect: boolean;
1858
- color: {
1859
- color: string;
1860
- name: string;
1861
- index: ColorIndex;
1862
- method: ColorMethod;
1863
- n: number;
1864
- };
1865
- lineType: {
1866
- name: string;
1867
- explain: string;
1868
- appearance: string;
1869
- id: number;
1870
- value?: (null | string) | undefined;
1871
- };
1872
- lineWeight: McDb.LineWeight;
1873
- })[]>, type?: "index" | "id" | "this") => {
1874
- id: number;
1875
- name: string;
1876
- visible: boolean;
1877
- freeze: boolean;
1878
- lock: boolean;
1879
- print: boolean;
1880
- status: boolean;
1881
- isSelect: boolean;
1882
- color: {
1883
- color: string;
1884
- name: string;
1885
- index: ColorIndex;
1886
- method: ColorMethod;
1887
- n: number;
1888
- };
1889
- lineType: {
1890
- name: string;
1891
- explain: string;
1892
- appearance: string;
1893
- id: number;
1894
- value?: (null | string) | undefined;
1895
- };
1896
- lineWeight: McDb.LineWeight;
1897
- }[] | undefined;
1898
- toggle: (key: keyof Pick<{
1899
- id: number;
1900
- name: string;
1901
- visible: boolean;
1902
- freeze: boolean;
1903
- lock: boolean;
1904
- print: boolean;
1905
- status: boolean;
1906
- isSelect: boolean;
1907
- color: {
1908
- color: string;
1909
- name: string;
1910
- index: ColorIndex;
1911
- method: ColorMethod;
1912
- n: number;
1913
- };
1914
- lineType: {
1915
- name: string;
1916
- explain: string;
1917
- appearance: string;
1918
- id: number;
1919
- value?: (null | string) | undefined;
1920
- };
1921
- lineWeight: McDb.LineWeight;
1922
- }, "freeze" | "lock" | "print" | "visible" | "isSelect">, i?: number | number[] | Ref<number | number[], number | number[]>) => boolean | (boolean | undefined)[] | undefined;
1923
- setValue: (key: "id" | "name" | "lineWeight" | "color" | "visible" | "lineType" | "freeze" | "lock" | "print" | "status" | "isSelect", v: string | number | boolean | {
1924
- color: string;
1925
- name: string;
1926
- index: ColorIndex;
1927
- method: ColorMethod;
1928
- n: number;
1929
- } | {
1930
- name: string;
1931
- explain: string;
1932
- appearance: string;
1933
- id: number;
1934
- value?: (null | string) | undefined;
1935
- } | (string | number | boolean | {
1936
- color: string;
1937
- name: string;
1938
- index: ColorIndex;
1939
- method: ColorMethod;
1940
- n: number;
1941
- } | {
1942
- name: string;
1943
- explain: string;
1944
- appearance: string;
1945
- id: number;
1946
- value?: (null | string) | undefined;
1947
- })[] | Ref<string | number | boolean | {
1948
- color: string;
1949
- name: string;
1950
- index: ColorIndex;
1951
- method: ColorMethod;
1952
- n: number;
1953
- } | {
1954
- name: string;
1955
- explain: string;
1956
- appearance: string;
1957
- id: number;
1958
- value?: (null | string) | undefined;
1959
- } | (string | number | boolean | {
1960
- color: string;
1961
- name: string;
1962
- index: ColorIndex;
1963
- method: ColorMethod;
1964
- n: number;
1965
- } | {
1966
- name: string;
1967
- explain: string;
1968
- appearance: string;
1969
- id: number;
1970
- value?: (null | string) | undefined;
1971
- })[], string | number | boolean | {
1972
- color: string;
1973
- name: string;
1974
- index: ColorIndex;
1975
- method: ColorMethod;
1976
- n: number;
1977
- } | {
1978
- name: string;
1979
- explain: string;
1980
- appearance: string;
1981
- id: number;
1982
- value?: (null | string) | undefined;
1983
- } | (string | number | boolean | {
1984
- color: string;
1985
- name: string;
1986
- index: ColorIndex;
1987
- method: ColorMethod;
1988
- n: number;
1989
- } | {
1990
- name: string;
1991
- explain: string;
1992
- appearance: string;
1993
- id: number;
1994
- value?: (null | string) | undefined;
1995
- })[]>, i?: number | number[] | Ref<number | number[], number | number[]>, isSave?: boolean) => (string | number | boolean | {
1996
- color: string;
1997
- name: string;
1998
- index: ColorIndex;
1999
- method: ColorMethod;
2000
- n: number;
2001
- } | {
2002
- name: string;
2003
- explain: string;
2004
- appearance: string;
2005
- id: number;
2006
- value?: (null | string) | undefined;
2007
- })[];
2008
- putCurrent: (val?: {
2009
- id: number;
2010
- name: string;
2011
- visible: boolean;
2012
- freeze: boolean;
2013
- lock: boolean;
2014
- print: boolean;
2015
- status: boolean;
2016
- isSelect: boolean;
2017
- color: {
2018
- color: string;
2019
- name: string;
2020
- index: ColorIndex;
2021
- method: ColorMethod;
2022
- n: number;
2023
- };
2024
- lineType: {
2025
- name: string;
2026
- explain: string;
2027
- appearance: string;
2028
- id: number;
2029
- value?: (null | string) | undefined;
2030
- };
2031
- lineWeight: McDb.LineWeight;
2032
- } | number, isSave?: boolean) => void;
2033
- parseJSON: (jsonText?: string) => void;
2034
- stringifyJSON: () => string;
2035
- initLayerList: () => void;
2036
- initCurrentLayer: (layerName?: string) => void;
2037
- setLayerList: (jsonText: string) => Promise<void>;
2038
- recoveryLayerStateHistory: () => void;
2039
- }, "rootId">, Pick<{
2040
- list: Ref< {
2041
- id: number;
2042
- name: string;
2043
- visible: boolean;
2044
- freeze: boolean;
2045
- lock: boolean;
2046
- print: boolean;
2047
- status: boolean;
2048
- isSelect: boolean;
2049
- color: {
2050
- color: string;
2051
- name: string;
2052
- index: ColorIndex;
2053
- method: ColorMethod;
2054
- n: number;
2055
- };
2056
- lineType: {
2057
- name: string;
2058
- explain: string;
2059
- appearance: string;
2060
- id: number;
2061
- value?: (null | string) | undefined;
2062
- };
2063
- lineWeight: McDb.LineWeight;
2064
- }[], {
2065
- id: number;
2066
- name: string;
2067
- visible: boolean;
2068
- freeze: boolean;
2069
- lock: boolean;
2070
- print: boolean;
2071
- status: boolean;
2072
- isSelect: boolean;
2073
- color: {
2074
- color: string;
2075
- name: string;
2076
- index: ColorIndex;
2077
- method: ColorMethod;
2078
- n: number;
2079
- };
2080
- lineType: {
2081
- name: string;
2082
- explain: string;
2083
- appearance: string;
2084
- id: number;
2085
- value?: (null | string) | undefined;
2086
- };
2087
- lineWeight: McDb.LineWeight;
2088
- }[] | {
2089
- id: number;
2090
- name: string;
2091
- visible: boolean;
2092
- freeze: boolean;
2093
- lock: boolean;
2094
- print: boolean;
2095
- status: boolean;
2096
- isSelect: boolean;
2097
- color: {
2098
- color: string;
2099
- name: string;
2100
- index: ColorIndex;
2101
- method: ColorMethod;
2102
- n: number;
2103
- };
2104
- lineType: {
2105
- name: string;
2106
- explain: string;
2107
- appearance: string;
2108
- id: number;
2109
- value?: (null | string) | undefined;
2110
- };
2111
- lineWeight: McDb.LineWeight;
2112
- }[]>;
2113
- index: Ref<number | number[], number | number[]>;
2114
- currentLayer: Ref< {
2115
- id: number;
2116
- name: string;
2117
- visible: boolean;
2118
- freeze: boolean;
2119
- lock: boolean;
2120
- print: boolean;
2121
- status: boolean;
2122
- isSelect: boolean;
2123
- color: {
2124
- color: string;
2125
- name: string;
2126
- index: ColorIndex;
2127
- method: ColorMethod;
2128
- n: number;
2129
- };
2130
- lineType: {
2131
- name: string;
2132
- explain: string;
2133
- appearance: string;
2134
- id: number;
2135
- value?: (null | string) | undefined;
2136
- };
2137
- lineWeight: McDb.LineWeight;
2138
- } | undefined, {
2139
- id: number;
2140
- name: string;
2141
- visible: boolean;
2142
- freeze: boolean;
2143
- lock: boolean;
2144
- print: boolean;
2145
- status: boolean;
2146
- isSelect: boolean;
2147
- color: {
2148
- color: string;
2149
- name: string;
2150
- index: ColorIndex;
2151
- method: ColorMethod;
2152
- n: number;
2153
- };
2154
- lineType: {
2155
- name: string;
2156
- explain: string;
2157
- appearance: string;
2158
- id: number;
2159
- value?: (null | string) | undefined;
2160
- };
2161
- lineWeight: McDb.LineWeight;
2162
- } | undefined>;
2163
- rootId: ComputedRef<number>;
2164
- setIndex: (i: number | number[] | Ref<number | number[], number | number[]>) => void;
2165
- getIndex: (_index?: ({
2166
- id: number;
2167
- name: string;
2168
- visible: boolean;
2169
- freeze: boolean;
2170
- lock: boolean;
2171
- print: boolean;
2172
- status: boolean;
2173
- isSelect: boolean;
2174
- color: {
2175
- color: string;
2176
- name: string;
2177
- index: ColorIndex;
2178
- method: ColorMethod;
2179
- n: number;
2180
- };
2181
- lineType: {
2182
- name: string;
2183
- explain: string;
2184
- appearance: string;
2185
- id: number;
2186
- value?: (null | string) | undefined;
2187
- };
2188
- lineWeight: McDb.LineWeight;
2189
- } | {
2190
- id: number;
2191
- name: string;
2192
- visible: boolean;
2193
- freeze: boolean;
2194
- lock: boolean;
2195
- print: boolean;
2196
- status: boolean;
2197
- isSelect: boolean;
2198
- color: {
2199
- color: string;
2200
- name: string;
2201
- index: ColorIndex;
2202
- method: ColorMethod;
2203
- n: number;
2204
- };
2205
- lineType: {
2206
- name: string;
2207
- explain: string;
2208
- appearance: string;
2209
- id: number;
2210
- value?: (null | string) | undefined;
2211
- };
2212
- lineWeight: McDb.LineWeight;
2213
- }[] | Ref< {
2214
- id: number;
2215
- name: string;
2216
- visible: boolean;
2217
- freeze: boolean;
2218
- lock: boolean;
2219
- print: boolean;
2220
- status: boolean;
2221
- isSelect: boolean;
2222
- color: {
2223
- color: string;
2224
- name: string;
2225
- index: ColorIndex;
2226
- method: ColorMethod;
2227
- n: number;
2228
- };
2229
- lineType: {
2230
- name: string;
2231
- explain: string;
2232
- appearance: string;
2233
- id: number;
2234
- value?: (null | string) | undefined;
2235
- };
2236
- lineWeight: McDb.LineWeight;
2237
- } | {
2238
- id: number;
2239
- name: string;
2240
- visible: boolean;
2241
- freeze: boolean;
2242
- lock: boolean;
2243
- print: boolean;
2244
- status: boolean;
2245
- isSelect: boolean;
2246
- color: {
2247
- color: string;
2248
- name: string;
2249
- index: ColorIndex;
2250
- method: ColorMethod;
2251
- n: number;
2252
- };
2253
- lineType: {
2254
- name: string;
2255
- explain: string;
2256
- appearance: string;
2257
- id: number;
2258
- value?: (null | string) | undefined;
2259
- };
2260
- lineWeight: McDb.LineWeight;
2261
- }[], {
2262
- id: number;
2263
- name: string;
2264
- visible: boolean;
2265
- freeze: boolean;
2266
- lock: boolean;
2267
- print: boolean;
2268
- status: boolean;
2269
- isSelect: boolean;
2270
- color: {
2271
- color: string;
2272
- name: string;
2273
- index: ColorIndex;
2274
- method: ColorMethod;
2275
- n: number;
2276
- };
2277
- lineType: {
2278
- name: string;
2279
- explain: string;
2280
- appearance: string;
2281
- id: number;
2282
- value?: (null | string) | undefined;
2283
- };
2284
- lineWeight: McDb.LineWeight;
2285
- } | {
2286
- id: number;
2287
- name: string;
2288
- visible: boolean;
2289
- freeze: boolean;
2290
- lock: boolean;
2291
- print: boolean;
2292
- status: boolean;
2293
- isSelect: boolean;
2294
- color: {
2295
- color: string;
2296
- name: string;
2297
- index: ColorIndex;
2298
- method: ColorMethod;
2299
- n: number;
2300
- };
2301
- lineType: {
2302
- name: string;
2303
- explain: string;
2304
- appearance: string;
2305
- id: number;
2306
- value?: (null | string) | undefined;
2307
- };
2308
- lineWeight: McDb.LineWeight;
2309
- }[]>) | (number | number[] | Ref<number | number[], number | number[]>)) => number | number[];
2310
- add: (layerItem?: {
2311
- id: number;
2312
- name: string;
2313
- visible: boolean;
2314
- freeze: boolean;
2315
- lock: boolean;
2316
- print: boolean;
2317
- status: boolean;
2318
- isSelect: boolean;
2319
- color: {
2320
- color: string;
2321
- name: string;
2322
- index: ColorIndex;
2323
- method: ColorMethod;
2324
- n: number;
2325
- };
2326
- lineType: {
2327
- name: string;
2328
- explain: string;
2329
- appearance: string;
2330
- id: number;
2331
- value?: (null | string) | undefined;
2332
- };
2333
- lineWeight: McDb.LineWeight;
2334
- }) => {
2335
- id: number;
2336
- name: string;
2337
- visible: boolean;
2338
- freeze: boolean;
2339
- lock: boolean;
2340
- print: boolean;
2341
- status: boolean;
2342
- isSelect: boolean;
2343
- color: {
2344
- color: string;
2345
- name: string;
2346
- index: ColorIndex;
2347
- method: ColorMethod;
2348
- n: number;
2349
- };
2350
- lineType: {
2351
- name: string;
2352
- explain: string;
2353
- appearance: string;
2354
- id: number;
2355
- value?: (null | string) | undefined;
2356
- };
2357
- lineWeight: McDb.LineWeight;
2358
- };
2359
- create: (options?: Partial<{
2360
- id: number;
2361
- name: string;
2362
- visible: boolean;
2363
- freeze: boolean;
2364
- lock: boolean;
2365
- print: boolean;
2366
- status: boolean;
2367
- isSelect: boolean;
2368
- color: {
2369
- color: string;
2370
- name: string;
2371
- index: ColorIndex;
2372
- method: ColorMethod;
2373
- n: number;
2374
- };
2375
- lineType: {
2376
- name: string;
2377
- explain: string;
2378
- appearance: string;
2379
- id: number;
2380
- value?: (null | string) | undefined;
2381
- };
2382
- lineWeight: McDb.LineWeight;
2383
- }>) => {
2384
- id: number;
2385
- name: string;
2386
- visible: boolean;
2387
- freeze: boolean;
2388
- lock: boolean;
2389
- print: boolean;
2390
- status: boolean;
2391
- isSelect: boolean;
2392
- color: {
2393
- color: string;
2394
- name: string;
2395
- index: ColorIndex;
2396
- method: ColorMethod;
2397
- n: number;
2398
- };
2399
- lineType: {
2400
- name: string;
2401
- explain: string;
2402
- appearance: string;
2403
- id: number;
2404
- value?: (null | string) | undefined;
2405
- };
2406
- lineWeight: McDb.LineWeight;
2407
- };
2408
- remove: (layers?: number | {
2409
- id: number;
2410
- name: string;
2411
- visible: boolean;
2412
- freeze: boolean;
2413
- lock: boolean;
2414
- print: boolean;
2415
- status: boolean;
2416
- isSelect: boolean;
2417
- color: {
2418
- color: string;
2419
- name: string;
2420
- index: ColorIndex;
2421
- method: ColorMethod;
2422
- n: number;
2423
- };
2424
- lineType: {
2425
- name: string;
2426
- explain: string;
2427
- appearance: string;
2428
- id: number;
2429
- value?: (null | string) | undefined;
2430
- };
2431
- lineWeight: McDb.LineWeight;
2432
- } | (number | {
2433
- id: number;
2434
- name: string;
2435
- visible: boolean;
2436
- freeze: boolean;
2437
- lock: boolean;
2438
- print: boolean;
2439
- status: boolean;
2440
- isSelect: boolean;
2441
- color: {
2442
- color: string;
2443
- name: string;
2444
- index: ColorIndex;
2445
- method: ColorMethod;
2446
- n: number;
2447
- };
2448
- lineType: {
2449
- name: string;
2450
- explain: string;
2451
- appearance: string;
2452
- id: number;
2453
- value?: (null | string) | undefined;
2454
- };
2455
- lineWeight: McDb.LineWeight;
2456
- })[] | Ref<number | {
2457
- id: number;
2458
- name: string;
2459
- visible: boolean;
2460
- freeze: boolean;
2461
- lock: boolean;
2462
- print: boolean;
2463
- status: boolean;
2464
- isSelect: boolean;
2465
- color: {
2466
- color: string;
2467
- name: string;
2468
- index: ColorIndex;
2469
- method: ColorMethod;
2470
- n: number;
2471
- };
2472
- lineType: {
2473
- name: string;
2474
- explain: string;
2475
- appearance: string;
2476
- id: number;
2477
- value?: (null | string) | undefined;
2478
- };
2479
- lineWeight: McDb.LineWeight;
2480
- } | (number | {
2481
- id: number;
2482
- name: string;
2483
- visible: boolean;
2484
- freeze: boolean;
2485
- lock: boolean;
2486
- print: boolean;
2487
- status: boolean;
2488
- isSelect: boolean;
2489
- color: {
2490
- color: string;
2491
- name: string;
2492
- index: ColorIndex;
2493
- method: ColorMethod;
2494
- n: number;
2495
- };
2496
- lineType: {
2497
- name: string;
2498
- explain: string;
2499
- appearance: string;
2500
- id: number;
2501
- value?: (null | string) | undefined;
2502
- };
2503
- lineWeight: McDb.LineWeight;
2504
- })[], number | {
2505
- id: number;
2506
- name: string;
2507
- visible: boolean;
2508
- freeze: boolean;
2509
- lock: boolean;
2510
- print: boolean;
2511
- status: boolean;
2512
- isSelect: boolean;
2513
- color: {
2514
- color: string;
2515
- name: string;
2516
- index: ColorIndex;
2517
- method: ColorMethod;
2518
- n: number;
2519
- };
2520
- lineType: {
2521
- name: string;
2522
- explain: string;
2523
- appearance: string;
2524
- id: number;
2525
- value?: (null | string) | undefined;
2526
- };
2527
- lineWeight: McDb.LineWeight;
2528
- } | (number | {
2529
- id: number;
2530
- name: string;
2531
- visible: boolean;
2532
- freeze: boolean;
2533
- lock: boolean;
2534
- print: boolean;
2535
- status: boolean;
2536
- isSelect: boolean;
2537
- color: {
2538
- color: string;
2539
- name: string;
2540
- index: ColorIndex;
2541
- method: ColorMethod;
2542
- n: number;
2543
- };
2544
- lineType: {
2545
- name: string;
2546
- explain: string;
2547
- appearance: string;
2548
- id: number;
2549
- value?: (null | string) | undefined;
2550
- };
2551
- lineWeight: McDb.LineWeight;
2552
- })[]>, type?: "index" | "id" | "this") => {
2553
- id: number;
2554
- name: string;
2555
- visible: boolean;
2556
- freeze: boolean;
2557
- lock: boolean;
2558
- print: boolean;
2559
- status: boolean;
2560
- isSelect: boolean;
2561
- color: {
2562
- color: string;
2563
- name: string;
2564
- index: ColorIndex;
2565
- method: ColorMethod;
2566
- n: number;
2567
- };
2568
- lineType: {
2569
- name: string;
2570
- explain: string;
2571
- appearance: string;
2572
- id: number;
2573
- value?: (null | string) | undefined;
2574
- };
2575
- lineWeight: McDb.LineWeight;
2576
- }[] | undefined;
2577
- toggle: (key: keyof Pick<{
2578
- id: number;
2579
- name: string;
2580
- visible: boolean;
2581
- freeze: boolean;
2582
- lock: boolean;
2583
- print: boolean;
2584
- status: boolean;
2585
- isSelect: boolean;
2586
- color: {
2587
- color: string;
2588
- name: string;
2589
- index: ColorIndex;
2590
- method: ColorMethod;
2591
- n: number;
2592
- };
2593
- lineType: {
2594
- name: string;
2595
- explain: string;
2596
- appearance: string;
2597
- id: number;
2598
- value?: (null | string) | undefined;
2599
- };
2600
- lineWeight: McDb.LineWeight;
2601
- }, "freeze" | "lock" | "print" | "visible" | "isSelect">, i?: number | number[] | Ref<number | number[], number | number[]>) => boolean | (boolean | undefined)[] | undefined;
2602
- setValue: (key: "id" | "name" | "lineWeight" | "color" | "visible" | "lineType" | "freeze" | "lock" | "print" | "status" | "isSelect", v: string | number | boolean | {
2603
- color: string;
2604
- name: string;
2605
- index: ColorIndex;
2606
- method: ColorMethod;
2607
- n: number;
2608
- } | {
2609
- name: string;
2610
- explain: string;
2611
- appearance: string;
2612
- id: number;
2613
- value?: (null | string) | undefined;
2614
- } | (string | number | boolean | {
2615
- color: string;
2616
- name: string;
2617
- index: ColorIndex;
2618
- method: ColorMethod;
2619
- n: number;
2620
- } | {
2621
- name: string;
2622
- explain: string;
2623
- appearance: string;
2624
- id: number;
2625
- value?: (null | string) | undefined;
2626
- })[] | Ref<string | number | boolean | {
2627
- color: string;
2628
- name: string;
2629
- index: ColorIndex;
2630
- method: ColorMethod;
2631
- n: number;
2632
- } | {
2633
- name: string;
2634
- explain: string;
2635
- appearance: string;
2636
- id: number;
2637
- value?: (null | string) | undefined;
2638
- } | (string | number | boolean | {
2639
- color: string;
2640
- name: string;
2641
- index: ColorIndex;
2642
- method: ColorMethod;
2643
- n: number;
2644
- } | {
2645
- name: string;
2646
- explain: string;
2647
- appearance: string;
2648
- id: number;
2649
- value?: (null | string) | undefined;
2650
- })[], string | number | boolean | {
2651
- color: string;
2652
- name: string;
2653
- index: ColorIndex;
2654
- method: ColorMethod;
2655
- n: number;
2656
- } | {
2657
- name: string;
2658
- explain: string;
2659
- appearance: string;
2660
- id: number;
2661
- value?: (null | string) | undefined;
2662
- } | (string | number | boolean | {
2663
- color: string;
2664
- name: string;
2665
- index: ColorIndex;
2666
- method: ColorMethod;
2667
- n: number;
2668
- } | {
2669
- name: string;
2670
- explain: string;
2671
- appearance: string;
2672
- id: number;
2673
- value?: (null | string) | undefined;
2674
- })[]>, i?: number | number[] | Ref<number | number[], number | number[]>, isSave?: boolean) => (string | number | boolean | {
2675
- color: string;
2676
- name: string;
2677
- index: ColorIndex;
2678
- method: ColorMethod;
2679
- n: number;
2680
- } | {
2681
- name: string;
2682
- explain: string;
2683
- appearance: string;
2684
- id: number;
2685
- value?: (null | string) | undefined;
2686
- })[];
2687
- putCurrent: (val?: {
2688
- id: number;
2689
- name: string;
2690
- visible: boolean;
2691
- freeze: boolean;
2692
- lock: boolean;
2693
- print: boolean;
2694
- status: boolean;
2695
- isSelect: boolean;
2696
- color: {
2697
- color: string;
2698
- name: string;
2699
- index: ColorIndex;
2700
- method: ColorMethod;
2701
- n: number;
2702
- };
2703
- lineType: {
2704
- name: string;
2705
- explain: string;
2706
- appearance: string;
2707
- id: number;
2708
- value?: (null | string) | undefined;
2709
- };
2710
- lineWeight: McDb.LineWeight;
2711
- } | number, isSave?: boolean) => void;
2712
- parseJSON: (jsonText?: string) => void;
2713
- stringifyJSON: () => string;
2714
- initLayerList: () => void;
2715
- initCurrentLayer: (layerName?: string) => void;
2716
- setLayerList: (jsonText: string) => Promise<void>;
2717
- recoveryLayerStateHistory: () => void;
2718
- }, "add" | "toggle" | "setIndex" | "getIndex" | "create" | "remove" | "setValue" | "putCurrent" | "parseJSON" | "stringifyJSON" | "initLayerList" | "initCurrentLayer" | "setLayerList" | "recoveryLayerStateHistory">>;
2719
- };
2720
- /** 获取UI配置 */
2721
- getUiConfig: () => Promise<Partial<MxcadUiConfig>>;
2722
- /** 获取草图与注释的UI配置 */
2723
- getSketchAndAnnotationUiConfig: () => Promise<Partial<MxSketchesAndNotesUiConfig>>;
2724
- /** 工具函数 */
2725
- utils: {
2726
- browserCacheRef: typeof browserCacheRef;
2727
- getLogoImgSrc: () => string;
2728
- };
2729
- /** 主题hooks*/
2730
- useTheme: () => {
2731
- toggleTheme: () => void;
2732
- setIsDark: (is: boolean) => "light" | "dark";
2733
- isDark: RemovableRef<boolean>;
2734
- };
2735
- /** 显示的文件名称 */
2736
- useFileName: () => {
2737
- fileName: Ref<string, string>;
2738
- setFileName: (name: string) => void;
2739
- };
2740
- /** 设置用户信息 */
2741
- useUserInfo: () => {
2742
- userInfo: Ref<UserInfo | undefined, UserInfo | undefined>;
2743
- getUserInfoString: (userInfo?: UserInfo) => string;
2744
- };
2745
- /**
2746
- * 添加侧边栏组件
2747
- * @param name 组件名称
2748
- * @param componentInfo 组件信息
2749
- * @abstract 通过设置uiConfig 配置 显示在左侧还是右侧
2750
- * */
2751
- addDrawerComponent(name: string, componentInfo: DrawerComponentInfo): void;
2752
- components: {
2753
- MxBtnList: DefineComponent< {
2754
- list?: MxButtonListData[];
2755
- location?: VTooltip["location"];
2756
- }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2757
- change: (data?: MxButtonListData | undefined) => any;
2758
- }, string, PublicProps, Readonly<{
2759
- list?: MxButtonListData[];
2760
- location?: VTooltip["location"];
2761
- }> & Readonly<{
2762
- onChange?: ((data?: MxButtonListData | undefined) => any) | undefined;
2763
- }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
2764
- MxColorSelect: DefineComponent< {
2765
- isStoreColor?: boolean;
2766
- modelValue?: string | ReturnType<(options?: Partial<ColorType>) => {
2767
- color: string;
2768
- name: string;
2769
- index: ColorIndex;
2770
- method: ColorMethod;
2771
- n: number;
2772
- }>;
2773
- }, {
2774
- color: Ref< {
2775
- color: string;
2776
- name: string;
2777
- index: ColorIndex;
2778
- method: ColorMethod;
2779
- n: number;
2780
- } | undefined, {
2781
- color: string;
2782
- name: string;
2783
- index: ColorIndex;
2784
- method: ColorMethod;
2785
- n: number;
2786
- } | undefined>;
2787
- colors: Ref< {
2788
- color: string;
2789
- name: string;
2790
- index: ColorIndex;
2791
- method: ColorMethod;
2792
- n: number;
2793
- }[], {
2794
- color: string;
2795
- name: string;
2796
- index: ColorIndex;
2797
- method: ColorMethod;
2798
- n: number;
2799
- }[]>;
2800
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2801
- change: (value: {
2802
- color: string;
2803
- name: string;
2804
- index: ColorIndex;
2805
- method: ColorMethod;
2806
- n: number;
2807
- }) => any;
2808
- "update:model-value": (value: {
2809
- color: string;
2810
- name: string;
2811
- index: ColorIndex;
2812
- method: ColorMethod;
2813
- n: number;
2814
- }) => any;
2815
- }, string, PublicProps, Readonly<{
2816
- isStoreColor?: boolean;
2817
- modelValue?: string | ReturnType<(options?: Partial<ColorType>) => {
2818
- color: string;
2819
- name: string;
2820
- index: ColorIndex;
2821
- method: ColorMethod;
2822
- n: number;
2823
- }>;
2824
- }> & Readonly<{
2825
- onChange?: ((value: {
2826
- color: string;
2827
- name: string;
2828
- index: ColorIndex;
2829
- method: ColorMethod;
2830
- n: number;
2831
- }) => any) | undefined;
2832
- "onUpdate:model-value"?: ((value: {
2833
- color: string;
2834
- name: string;
2835
- index: ColorIndex;
2836
- method: ColorMethod;
2837
- n: number;
2838
- }) => any) | undefined;
2839
- }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
2840
- MxDialog: {
2841
- new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
2842
- title?: string;
2843
- logo?: string;
2844
- cardClass?: string;
2845
- cardTextClass?: string;
2846
- cardActionClass?: string;
2847
- footerBtnList?: DialogFooterBtnListType;
2848
- modelValue?: boolean;
2849
- keys?: BindKeysProp;
2850
- isShowCloseBtn?: boolean;
2851
- }> & Readonly<{
2852
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
2853
- onClickClose?: (() => any) | undefined;
2854
- }>, {
2855
- getMoveX: () => number;
2856
- getMoveY: () => number;
2857
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2858
- "update:modelValue": (value: boolean) => any;
2859
- clickClose: () => any;
2860
- }, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly<{
2861
- title?: string;
2862
- logo?: string;
2863
- cardClass?: string;
2864
- cardTextClass?: string;
2865
- cardActionClass?: string;
2866
- footerBtnList?: DialogFooterBtnListType;
2867
- modelValue?: boolean;
2868
- keys?: BindKeysProp;
2869
- isShowCloseBtn?: boolean;
2870
- }> & Readonly<{
2871
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
2872
- onClickClose?: (() => any) | undefined;
2873
- }>, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
2874
- P: {};
2875
- B: {};
2876
- D: {};
2877
- C: {};
2878
- M: {};
2879
- Defaults: {};
2880
- }, Readonly<{
2881
- title?: string;
2882
- logo?: string;
2883
- cardClass?: string;
2884
- cardTextClass?: string;
2885
- cardActionClass?: string;
2886
- footerBtnList?: DialogFooterBtnListType;
2887
- modelValue?: boolean;
2888
- keys?: BindKeysProp;
2889
- isShowCloseBtn?: boolean;
2890
- }> & Readonly<{
2891
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
2892
- onClickClose?: (() => any) | undefined;
2893
- }>, {
2894
- getMoveX: () => number;
2895
- getMoveY: () => number;
2896
- }, {}, {}, {}, {}>;
2897
- __isFragment?: never;
2898
- __isTeleport?: never;
2899
- __isSuspense?: never;
2900
- } & ComponentOptionsBase<Readonly<{
2901
- title?: string;
2902
- logo?: string;
2903
- cardClass?: string;
2904
- cardTextClass?: string;
2905
- cardActionClass?: string;
2906
- footerBtnList?: DialogFooterBtnListType;
2907
- modelValue?: boolean;
2908
- keys?: BindKeysProp;
2909
- isShowCloseBtn?: boolean;
2910
- }> & Readonly<{
2911
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
2912
- onClickClose?: (() => any) | undefined;
2913
- }>, {
2914
- getMoveX: () => number;
2915
- getMoveY: () => number;
2916
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2917
- "update:modelValue": (value: boolean) => any;
2918
- clickClose: () => any;
2919
- }, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
2920
- $slots: {
2921
- header?(_: {}): any;
2922
- "header-icon"?(_: {}): any;
2923
- default?(_: {}): any;
2924
- actions?(_: {}): any;
2925
- };
2926
- });
2927
- MxMenu: {
2928
- new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
2929
- list?: MenuListItem[];
2930
- title?: string;
2931
- isChildren?: boolean;
2932
- cmd?: string;
2933
- icon?: string;
2934
- }> & Readonly<{
2935
- onChange?: ((data?: MenuListItem | undefined) => any) | undefined;
2936
- onOnKeyShowMenu?: (() => any) | undefined;
2937
- }>, {
2938
- isShowMenu: Ref<boolean, boolean>;
2939
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2940
- change: (data?: MenuListItem | undefined) => any;
2941
- onKeyShowMenu: () => any;
2942
- }, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly<{
2943
- list?: MenuListItem[];
2944
- title?: string;
2945
- isChildren?: boolean;
2946
- cmd?: string;
2947
- icon?: string;
2948
- }> & Readonly<{
2949
- onChange?: ((data?: MenuListItem | undefined) => any) | undefined;
2950
- onOnKeyShowMenu?: (() => any) | undefined;
2951
- }>, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
2952
- P: {};
2953
- B: {};
2954
- D: {};
2955
- C: {};
2956
- M: {};
2957
- Defaults: {};
2958
- }, Readonly<{
2959
- list?: MenuListItem[];
2960
- title?: string;
2961
- isChildren?: boolean;
2962
- cmd?: string;
2963
- icon?: string;
2964
- }> & Readonly<{
2965
- onChange?: ((data?: MenuListItem | undefined) => any) | undefined;
2966
- onOnKeyShowMenu?: (() => any) | undefined;
2967
- }>, {
2968
- isShowMenu: Ref<boolean, boolean>;
2969
- }, {}, {}, {}, {}>;
2970
- __isFragment?: never;
2971
- __isTeleport?: never;
2972
- __isSuspense?: never;
2973
- } & ComponentOptionsBase<Readonly<{
2974
- list?: MenuListItem[];
2975
- title?: string;
2976
- isChildren?: boolean;
2977
- cmd?: string;
2978
- icon?: string;
2979
- }> & Readonly<{
2980
- onChange?: ((data?: MenuListItem | undefined) => any) | undefined;
2981
- onOnKeyShowMenu?: (() => any) | undefined;
2982
- }>, {
2983
- isShowMenu: Ref<boolean, boolean>;
2984
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2985
- change: (data?: MenuListItem | undefined) => any;
2986
- onKeyShowMenu: () => any;
2987
- }, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
2988
- $slots: {
2989
- activator?(_: {
2990
- [x: string]: any;
2991
- }): any;
2992
- };
2993
- });
2994
- MxTabsWindow: DefineComponent< {
2995
- modelValue?: number | null;
2996
- items: {
2997
- tab: string | any;
2998
- component: () => VNode<RendererNode, RendererElement, {
2999
- [key: string]: any;
3000
- }>;
3001
- }[];
3002
- height?: number | string;
3003
- tabsProps?: InstanceType<VTabs>["$props"];
3004
- windowProps?: InstanceType<VWindow>["$props"];
3005
- windowItemProps?: InstanceType<VWindowItem>["$props"];
3006
- isTabMinWidthAuto?: boolean;
3007
- }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
3008
- "update:modelValue": (tab?: any) => any;
3009
- }, string, PublicProps, Readonly<{
3010
- modelValue?: number | null;
3011
- items: {
3012
- tab: string | any;
3013
- component: () => VNode<RendererNode, RendererElement, {
3014
- [key: string]: any;
3015
- }>;
3016
- }[];
3017
- height?: number | string;
3018
- tabsProps?: InstanceType<VTabs>["$props"];
3019
- windowProps?: InstanceType<VWindow>["$props"];
3020
- windowItemProps?: InstanceType<VWindowItem>["$props"];
3021
- isTabMinWidthAuto?: boolean;
3022
- }> & Readonly<{
3023
- "onUpdate:modelValue"?: ((tab?: any) => any) | undefined;
3024
- }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
3025
- TextEllipsis: DefineComponent< {
3026
- text: string;
3027
- width?: number;
3028
- size?: number;
3029
- family?: string;
3030
- sliceNum?: number;
3031
- }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
3032
- text: string;
3033
- width?: number;
3034
- size?: number;
3035
- family?: string;
3036
- sliceNum?: number;
3037
- }> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
3038
- };
3039
- addCommand: (cmd: string, fun: Function) => void;
3040
- callCommand: <T = any>(cmd: string, data?: T, options?: string[]) => boolean;
3041
- getMxCADUIImplement: () => MxCADUIImplement;
3042
- useLoading: () => {
3043
- showLoading: ShowLoading;
3044
- hideLoading: () => void;
3045
- };
3046
- useMessage: () => MessageFun;
3047
- useDialogIsShow: <RevealData = any, ConfirmData = any, CancelData = any>(is?: boolean, cmd?: string, cmdFun?: Function) => {
3048
- isRevealed: ComputedRef<boolean>;
3049
- reveal: (data?: RevealData | undefined) => Promise<UseConfirmDialogRevealResult<ConfirmData, CancelData>>;
3050
- confirm: (data?: ConfirmData | undefined) => void;
3051
- cancel: (data?: CancelData | undefined) => void;
3052
- onReveal: EventHookOn<RevealData>;
3053
- onConfirm: EventHookOn<ConfirmData>;
3054
- onCancel: EventHookOn<CancelData>;
3055
- isShow: Ref<boolean, boolean>;
3056
- showDialog: (is?: boolean, data?: RevealData, delay?: number) => Promise<UseConfirmDialogRevealResult<ConfirmData, CancelData> | undefined>;
3057
- };
3058
- /** 注册事件监听器 */
3059
- on: {
3060
- (event: "databaseLayerUpdate", handler: (payload: EventMap["databaseLayerUpdate"]) => void): void;
3061
- (event: "startOpenFile", handler: (payload: EventMap["startOpenFile"]) => void): void;
3062
- <E extends keyof EventMap>(event: E, handler: (payload: EventMap[E]) => void): void;
3063
- };
3064
- /** 移除事件监听器 */
3065
- off: <E extends keyof EventMap>(event: E, handler: (payload: EventMap[E]) => void) => void;
3066
- /** 触发事件 */
3067
- emit: <E extends keyof EventMap>(event: E, payload?: EventMap[E] | undefined) => void;
3068
- /** 注册一次性事件监听器 */
3069
- once: <E extends keyof EventMap>(event: E, handler: (payload: EventMap[E]) => void) => void;
3070
- /** 显示动态输入选项菜单 */
3071
- showDynamicInputMenu: (is: boolean) => void;
3072
- /** 隐藏动态输入提示"或"字 */
3073
- hideDynamicInputOrWord: (is: boolean) => void;
3074
- /** 设置右键点击时是否禁用右键菜单的自定义回调函数,如果回调函数返回true则不显示菜单, 您可以自由设置显示的菜单的内容(只会触发一次), 也可以控制用户输入
3075
- * @returns 返回一个函数,用于清除这次设置
3076
- * @template
3077
- * ```ts
3078
- * setCallRightClickMenuDisabledFun((rightMenuContext)=> {
3079
- * // 按下右键弹出菜单前检查是否需要显示菜单
3080
- * // 你可以选择在下一次菜单触发菜单(点击右键前)显示自定义的菜单选项
3081
- * // rightMenuContext.setRightMenuListData([{
3082
- * // label: t("新建"),
3083
- * // tips: "New",
3084
- * // fn() {
3085
- * // callCommand("Mx_NewFile")
3086
- * // }
3087
- * // }])
3088
- * // 如果当前正在绘制图形,要求提供选项,那么右键检查菜单是否显示时,触发E选项 效果就是右键直接选择了E选项 这个时候返回true
3089
- * rightMenuContext.sendUserInput("E")
3090
- * return true
3091
- * })
3092
- * ```
3093
- *
3094
- */
3095
- setCallRightClickMenuDisabledFun: (fun: CallRightClickMenuDisabledFun) => () => void;
3096
- /**
3097
- * 注册MxCAD多行文本自定义文本插件
3098
- *
3099
- *
3100
- * @param customTextPlugin 自定义文本插件类的实例
3101
- * @param props 插件配置项,包含onDbClick回调和uiData界面数据
3102
- * @returns 返回一个函数,用于插入或更新自定义文本
3103
- * @template
3104
- * ```ts
3105
- * import { MxCADMText, McDbCircle, McGePoint3d, MxCADBaseCustomText, MxCADCustomTextCalculateData, CreateData, McDbEntity } from "mxcad";
3106
- * const getEntity = (entity: MxCADMText, textNode: MarksStyleText) => {
3107
- * const circle = new McDbCircle();
3108
- * circle.radius = (textNode?.fontSize ? textNode.fontSize : 1) * entity.textBaseHeight / 2
3109
- * circle.center = new McGePoint3d(0, 0, 0)
3110
- * return circle
3111
- * }
3112
- * class MxCADTest extends MxCADBaseCustomText {
3113
- * type = "MxCADTestText"
3114
- * calculate(entity: MxCADMText, textNode: MarksStyleText): MxCADCustomTextCalculateData {
3115
- * const circle = getEntity(entity, textNode)
3116
- *
3117
- * const box = circle.getBoundingBox()
3118
- * const width = box.maxPt.x - box.minPt.x
3119
- * const height = box.maxPt.y - box.minPt.y
3120
- *
3121
- * return {
3122
- * width,
3123
- * height
3124
- * }
3125
- * }
3126
- *
3127
- * create(entity: MxCADMText, textNode: MarksStyleText, calculateData: MxCADCustomTextCalculateData, renderData: CreateData): (McDbEntity | McDbCustomEntity)[] {
3128
- * const circle = getEntity(entity, textNode)
3129
- * circle.center = renderData.position.clone()
3130
- * .addvec(McGeVector3d.kXAxis.clone().mult(calculateData.height / 2))
3131
- * .addvec(McGeVector3d.kYAxis.clone().negate().mult(calculateData.width / 2))
3132
- * return [circle]
3133
- * }
3134
- * constructor() {
3135
- * super()
3136
- * }
3137
- * }
3138
- * const insertTest = registerEditorCustomTextPlugin(new MxCADTest(), {
3139
- * onDbClick: (node) => {
3140
- * console.log("双击了测试节点:", node)
3141
- * },
3142
- * uiData: {
3143
- * icon: "$mdi-shape-square-plus",
3144
- * text: "测试",
3145
- * onClick: () => {
3146
- * insertTest({ name: "测试文本", value: 100 })
3147
- * }
3148
- * }
3149
- * })
3150
- * ```
3151
- */
3152
- registerEditorCustomTextPlugin: (customTextPlugin: MxCADBaseCustomText, props?: CustomTextPluginProps) => (props: any, isUpdate?: boolean) => void;
3153
- /**
3154
- * 获取编辑器实例(集成项目本身使用的单例)
3155
- * @returns 返回编辑器实例
3156
- */
3157
- getMxCADMTextEditor: () => IMxCADEditor;
3158
- /**
3159
- * 创建编辑器实例
3160
- * @returns 返回编辑器实例
3161
- */
3162
- createMxCADMTextEditor: typeof createMxCADEditor;
3163
- /** 快捷键管理器
3164
- * @template
3165
- * ```ts
3166
- * keyBindingManager.register({
3167
- * key: {
3168
- * keyCode: "F7"
3169
- * },
3170
- * action() {
3171
- * console.log("快捷键被按下")
3172
- * },
3173
- * info: {
3174
- * label: "快捷键",
3175
- * command: 'Mx_Grid',
3176
- * category: 'common',
3177
- * description: "切换栅格模式"
3178
- * }
3179
- * })
3180
- * ```
3181
- */
3182
- keyBindingManager: KeyBindingManager;
3183
- /**
3184
- * 光标颜色
3185
- * @template
3186
- * ```ts
3187
- * const { cursorColor } = MxPluginContext
3188
- * cursorColor.value = "#000000"
3189
- * ```
3190
- * */
3191
- cursorColor: Ref<string, string>;
3192
- /** 获取语言文件加载地址 */
3193
- getLoaderLanguageUrl: (language: string, scope: VoerkaI18nScope) => string;
3194
- };
3195
- export { MxPluginContext_2 as MxPluginContext }
3196
-
3197
- declare type PluginFnType = <T extends IMxCADEditor>(editor: T) => T;
3198
-
3199
- declare type RangeOf<N extends number> = Partial<TupleOf<unknown, N>>["length"];
3200
-
3201
- /** 限制数值范围 */
3202
- declare type RangeOf2<From extends number, To extends number> = Exclude<RangeOf<To>, RangeOf<From>> | From;
3203
-
3204
- declare type Replace<R extends any[], T> = {
3205
- [K in keyof R]: T;
3206
- };
3207
-
3208
- declare interface RightMenuContext {
3209
- /** 自由设置菜单选项属性 */
3210
- setRightMenuListData: (setting: MenuSetting[]) => void;
3211
- /** 应用程序默认的菜单机制 返回值为默认是否显示菜单 true 表示不显示菜单 */
3212
- applyDefaultMenu: () => boolean;
3213
- /** 发送用户输入 (相当于用户在命令行输入内容然后回车) 例如可以控制用户的命令选项和内容*/
3214
- sendUserInput: (input: string) => void;
3215
- }
3216
-
3217
24
  export declare const runApp: (config?: AppConfig) => void;
3218
25
 
3219
26
  /**
@@ -3222,26 +29,6 @@ export declare const runApp: (config?: AppConfig) => void;
3222
29
  */
3223
30
  export declare function setStaticAssetPath(url: string): void;
3224
31
 
3225
- declare interface TextStyleJSON {
3226
- bigFontFileName: string;
3227
- fileName: string;
3228
- id: number;
3229
- name: string;
3230
- obliquingAngle: number;
3231
- textSize: number;
3232
- typeFace: string;
3233
- xScale: number;
3234
- isBigFont: boolean;
3235
- }
3236
-
3237
- declare type TupleOf<T, N extends number> = number extends N ? T[] : {
3238
- [K in N]: BuildPowersOf2LengthArrays<K, [[never]]> extends infer U ? U extends never[][] ? Replace<ConcatLargestUntilDone<K, U, []>, T> : never : never;
3239
- }[N];
3240
-
3241
- declare type UIConfigType = MxcadUiConfig_2;
3242
-
3243
- declare interface UserInfo { username: string, vip: number }
3244
-
3245
32
  export { }
3246
33
 
3247
34
 
@@ -3298,6 +85,17 @@ declare module "@/editor/core" {
3298
85
  }
3299
86
 
3300
87
 
88
+ declare module '@tiptap/core' {
89
+ interface Commands<ReturnType> {
90
+ Underline: {
91
+ setUnderline: () => ReturnType;
92
+ unsetUnderline: () => ReturnType;
93
+ toggleUnderline: () => ReturnType;
94
+ };
95
+ }
96
+ }
97
+
98
+
3301
99
  declare module '@tiptap/core' {
3302
100
  interface Commands<ReturnType> {
3303
101
  fontSize: {
@@ -3316,16 +114,16 @@ declare module '@tiptap/core' {
3316
114
 
3317
115
  declare module '@tiptap/core' {
3318
116
  interface Commands<ReturnType> {
3319
- Strike: {
117
+ Overline: {
3320
118
  /**
3321
119
  * Set the font size attribute
3322
120
  */
3323
- setStrike: () => ReturnType;
121
+ setOverline: () => ReturnType;
3324
122
  /**
3325
123
  * Unset the font size attribute
3326
124
  */
3327
- unsetStrike: () => ReturnType;
3328
- toggleStrike: () => ReturnType;
125
+ unsetOverline: () => ReturnType;
126
+ toggleOverline: () => ReturnType;
3329
127
  };
3330
128
  }
3331
129
  }
@@ -3333,16 +131,16 @@ declare module '@tiptap/core' {
3333
131
 
3334
132
  declare module '@tiptap/core' {
3335
133
  interface Commands<ReturnType> {
3336
- Overline: {
134
+ Strike: {
3337
135
  /**
3338
136
  * Set the font size attribute
3339
137
  */
3340
- setOverline: () => ReturnType;
138
+ setStrike: () => ReturnType;
3341
139
  /**
3342
140
  * Unset the font size attribute
3343
141
  */
3344
- unsetOverline: () => ReturnType;
3345
- toggleOverline: () => ReturnType;
142
+ unsetStrike: () => ReturnType;
143
+ toggleStrike: () => ReturnType;
3346
144
  };
3347
145
  }
3348
146
  }
@@ -3372,14 +170,3 @@ declare module '@tiptap/core' {
3372
170
  };
3373
171
  }
3374
172
  }
3375
-
3376
-
3377
- declare module '@tiptap/core' {
3378
- interface Commands<ReturnType> {
3379
- Underline: {
3380
- setUnderline: () => ReturnType;
3381
- unsetUnderline: () => ReturnType;
3382
- toggleUnderline: () => ReturnType;
3383
- };
3384
- }
3385
- }