@tmagic/editor 1.8.0-beta.22 → 1.8.0-beta.23

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/types/index.d.ts CHANGED
@@ -16,7 +16,6 @@ export * from "@tmagic/table";
16
16
  export * from "@tmagic/stage";
17
17
  export * from "@tmagic/design";
18
18
  export * from "@tmagic/utils";
19
-
20
19
  //#region temp/packages/editor/src/services/BaseService.d.ts
21
20
  /**
22
21
  * 对Class进行扩展
@@ -108,12 +107,7 @@ declare class CodeBlock extends BaseService {
108
107
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
109
108
  * @returns {void}
110
109
  */
111
- setCodeDslById(id: Id, codeConfig: Partial<CodeBlockContent>, {
112
- changeRecords,
113
- doNotPushHistory,
114
- historyDescription,
115
- historySource
116
- }?: HistoryOpOptionsWithChangeRecords): Promise<void>;
110
+ setCodeDslById(id: Id, codeConfig: Partial<CodeBlockContent>, { changeRecords, doNotPushHistory, historyDescription, historySource }?: HistoryOpOptionsWithChangeRecords): Promise<void>;
117
111
  /**
118
112
  * 为了兼容历史原因
119
113
  * 设置代码块ID和代码内容到源dsl
@@ -126,12 +120,7 @@ declare class CodeBlock extends BaseService {
126
120
  * @param options.historyDescription 入栈时附带的人类可读描述,用于历史面板展示
127
121
  * @returns {void}
128
122
  */
129
- setCodeDslByIdSync(id: Id, codeConfig: Partial<CodeBlockContent>, force?: boolean, {
130
- changeRecords,
131
- doNotPushHistory,
132
- historyDescription,
133
- historySource
134
- }?: HistoryOpOptionsWithChangeRecords): void;
123
+ setCodeDslByIdSync(id: Id, codeConfig: Partial<CodeBlockContent>, force?: boolean, { changeRecords, doNotPushHistory, historyDescription, historySource }?: HistoryOpOptionsWithChangeRecords): void;
135
124
  /**
136
125
  * 根据代码块id数组获取代码dsl
137
126
  * @param {string[]} ids 代码块id数组
@@ -189,11 +178,7 @@ declare class CodeBlock extends BaseService {
189
178
  * @param options 可选配置
190
179
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
191
180
  */
192
- deleteCodeDslByIds(codeIds: Id[], {
193
- doNotPushHistory,
194
- historyDescription,
195
- historySource
196
- }?: HistoryOpOptions): Promise<void>;
181
+ deleteCodeDslByIds(codeIds: Id[], { doNotPushHistory, historyDescription, historySource }?: HistoryOpOptions): Promise<void>;
197
182
  /**
198
183
  * 下列 *AndGetHistoryId 方法与对应的写入方法行为完全一致,
199
184
  * 返回值在 {@link DslOpWithHistoryIdsResult} 中同时包含原操作结果与本次写入的历史 uuid 列表,
@@ -361,11 +346,7 @@ declare class DataSource extends BaseService {
361
346
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
362
347
  * @param options.historyDescription 入栈时附带的人类可读描述,用于历史面板展示
363
348
  */
364
- add(config: DataSourceSchema, {
365
- doNotPushHistory,
366
- historyDescription,
367
- historySource
368
- }?: HistoryOpOptions): {
349
+ add(config: DataSourceSchema, { doNotPushHistory, historyDescription, historySource }?: HistoryOpOptions): {
369
350
  id: string;
370
351
  type: string;
371
352
  title?: string;
@@ -384,12 +365,7 @@ declare class DataSource extends BaseService {
384
365
  * @param data.doNotPushHistory 是否不写入历史记录(默认 false)
385
366
  * @param data.historyDescription 入栈时附带的人类可读描述,用于历史面板展示
386
367
  */
387
- update(config: DataSourceSchema, {
388
- changeRecords,
389
- doNotPushHistory,
390
- historyDescription,
391
- historySource
392
- }?: HistoryOpOptionsWithChangeRecords): DataSourceSchema;
368
+ update(config: DataSourceSchema, { changeRecords, doNotPushHistory, historyDescription, historySource }?: HistoryOpOptionsWithChangeRecords): DataSourceSchema;
393
369
  /**
394
370
  * 删除数据源
395
371
  * @param id 数据源 id
@@ -397,11 +373,7 @@ declare class DataSource extends BaseService {
397
373
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
398
374
  * @param options.historyDescription 入栈时附带的人类可读描述,用于历史面板展示
399
375
  */
400
- remove(id: string, {
401
- doNotPushHistory,
402
- historyDescription,
403
- historySource
404
- }?: HistoryOpOptions): void;
376
+ remove(id: string, { doNotPushHistory, historyDescription, historySource }?: HistoryOpOptions): void;
405
377
  /**
406
378
  * 下列 *AndGetHistoryId 方法与对应的 add / update / remove 行为完全一致,
407
379
  * 返回值在 {@link DslOpWithHistoryIdsResult} 中同时包含原操作结果与本次写入历史栈的 uuid 列表({@link DataSourceStepValue.uuid}),
@@ -685,17 +657,8 @@ declare class Editor extends BaseService {
685
657
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
686
658
  * @returns 添加后的节点
687
659
  */
688
- add(addNode: AddMNode | MNode[], parent?: MContainer | null, {
689
- doNotSelect,
690
- doNotSwitchPage,
691
- doNotPushHistory,
692
- historyDescription,
693
- historySource
694
- }?: DslOpOptions): Promise<MNode | MNode[]>;
695
- doRemove(node: MNode, {
696
- doNotSelect,
697
- doNotSwitchPage
698
- }?: DslOpOptions): Promise<void>;
660
+ add(addNode: AddMNode | MNode[], parent?: MContainer | null, { doNotSelect, doNotSwitchPage, doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<MNode | MNode[]>;
661
+ doRemove(node: MNode, { doNotSelect, doNotSwitchPage }?: DslOpOptions): Promise<void>;
699
662
  /**
700
663
  * 删除组件
701
664
  * @param {Object} node 要删除的节点或节点集合
@@ -704,18 +667,8 @@ declare class Editor extends BaseService {
704
667
  * @param options.doNotSwitchPage 删除后是否不切换当前页面(默认 false;删除页面 / 页面片段时为 true 会跳过自动切换到首个剩余页面)
705
668
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
706
669
  */
707
- remove(nodeOrNodeList: MNode | MNode[], {
708
- doNotSelect,
709
- doNotSwitchPage,
710
- doNotPushHistory,
711
- historyDescription,
712
- historySource
713
- }?: DslOpOptions): Promise<void>;
714
- doUpdate(config: MNode, {
715
- changeRecords,
716
- historySource,
717
- replace
718
- }?: {
670
+ remove(nodeOrNodeList: MNode | MNode[], { doNotSelect, doNotSwitchPage, doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<void>;
671
+ doUpdate(config: MNode, { changeRecords, historySource, replace }?: {
719
672
  changeRecords?: ChangeRecord[];
720
673
  historySource?: HistoryOpSource;
721
674
  replace?: boolean;
@@ -767,11 +720,7 @@ declare class Editor extends BaseService {
767
720
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
768
721
  * @returns void
769
722
  */
770
- sort(id1: Id, id2: Id, {
771
- doNotSelect,
772
- doNotPushHistory,
773
- historySource
774
- }?: DslOpOptions): Promise<void>;
723
+ sort(id1: Id, id2: Id, { doNotSelect, doNotPushHistory, historySource }?: DslOpOptions): Promise<void>;
775
724
  /**
776
725
  * 将组件节点配置存储到localStorage中
777
726
  * @param config 组件节点配置
@@ -794,13 +743,7 @@ declare class Editor extends BaseService {
794
743
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
795
744
  * @returns 添加后的组件节点配置
796
745
  */
797
- paste(position?: PastePosition, collectorOptions?: TargetOptions, {
798
- doNotSelect,
799
- doNotSwitchPage,
800
- doNotPushHistory,
801
- historyDescription,
802
- historySource
803
- }?: DslOpOptions): Promise<MNode | MNode[] | void>;
746
+ paste(position?: PastePosition, collectorOptions?: TargetOptions, { doNotSelect, doNotSwitchPage, doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<MNode | MNode[] | void>;
804
747
  doPaste(config: MNode[], position?: PastePosition): Promise<MNode[]>;
805
748
  doAlignCenter(config: MNode): Promise<MNode>;
806
749
  /**
@@ -812,23 +755,14 @@ declare class Editor extends BaseService {
812
755
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
813
756
  * @returns 当前组件节点配置
814
757
  */
815
- alignCenter(config: MNode | MNode[], {
816
- doNotSelect,
817
- doNotPushHistory,
818
- historyDescription,
819
- historySource
820
- }?: DslOpOptions): Promise<MNode | MNode[]>;
758
+ alignCenter(config: MNode | MNode[], { doNotSelect, doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<MNode | MNode[]>;
821
759
  /**
822
760
  * 移动当前选中节点位置
823
761
  * @param offset 偏移量
824
762
  * @param options 可选配置
825
763
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
826
764
  */
827
- moveLayer(offset: number | LayerOffset, {
828
- doNotPushHistory,
829
- historyDescription,
830
- historySource
831
- }?: DslOpOptions): Promise<void>;
765
+ moveLayer(offset: number | LayerOffset, { doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<void>;
832
766
  /**
833
767
  * 移动一个或多个节点到指定容器中。
834
768
  *
@@ -843,18 +777,8 @@ declare class Editor extends BaseService {
843
777
  * @param options.doNotSwitchPage 移动后是否不切换当前页面(默认 false;目标容器位于其它页面时为 true 会跳过自动选中以避免页面切换)
844
778
  * @param options.doNotPushHistory 是否不写入历史记录(默认 false)
845
779
  */
846
- moveToContainer(config: MNode | MNode[], targetId: Id, {
847
- doNotSelect,
848
- doNotSwitchPage,
849
- doNotPushHistory,
850
- historyDescription,
851
- historySource
852
- }?: DslOpOptions): Promise<MNode | MNode[]>;
853
- dragTo(config: MNode | MNode[], targetParent: MContainer, targetIndex: number, {
854
- doNotPushHistory,
855
- historyDescription,
856
- historySource
857
- }?: DslOpOptions): Promise<void>;
780
+ moveToContainer(config: MNode | MNode[], targetId: Id, { doNotSelect, doNotSwitchPage, doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<MNode | MNode[]>;
781
+ dragTo(config: MNode | MNode[], targetParent: MContainer, targetIndex: number, { doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<void>;
858
782
  /**
859
783
  * 下列 *AndGetHistoryId 方法与对应的普通操作(add / remove / update ...)行为完全一致,
860
784
  * 返回值在 {@link DslOpWithHistoryIdsResult} 中同时包含原操作结果与本次写入历史栈的 uuid 列表({@link StepValue.uuid}),
@@ -926,11 +850,7 @@ declare class Editor extends BaseService {
926
850
  * @returns 实际移动到的最终游标位置
927
851
  */
928
852
  gotoPageStep(targetCursor: number): Promise<number>;
929
- move(left: number, top: number, {
930
- doNotPushHistory,
931
- historyDescription,
932
- historySource
933
- }?: DslOpOptions): Promise<void>;
853
+ move(left: number, top: number, { doNotPushHistory, historyDescription, historySource }?: DslOpOptions): Promise<void>;
934
854
  resetState(): void;
935
855
  destroy(): void;
936
856
  resetModifiedNodeId(): void;
@@ -1459,10 +1379,7 @@ declare class Props extends BaseService {
1459
1379
  * @param type 组件类型
1460
1380
  * @returns 组件初始值
1461
1381
  */
1462
- getPropsValue(componentType: string, {
1463
- inputEvent,
1464
- ...defaultValue
1465
- }?: Record<string, any>): Promise<any>;
1382
+ getPropsValue(componentType: string, { inputEvent, ...defaultValue }?: Record<string, any>): Promise<any>;
1466
1383
  hasPropsValue(type: string): boolean;
1467
1384
  createId(type: string | number): string;
1468
1385
  /**
@@ -2027,7 +1944,9 @@ interface SideComponent extends MenuComponent {
2027
1944
  beforeClick?: (config: SideComponent) => boolean | Promise<boolean>;
2028
1945
  /** 组件扩展参数 */
2029
1946
  boxComponentConfig?: {
2030
- /** Vue3组件 */component?: any; /** 传入组件的props对象 */
1947
+ /** Vue3组件 */
1948
+ component?: any;
1949
+ /** 传入组件的props对象 */
2031
1950
  props?: Record<string, any>;
2032
1951
  };
2033
1952
  }
@@ -2193,14 +2112,19 @@ interface ScrollViewerEvent {
2193
2112
  scrollWidth: number;
2194
2113
  }
2195
2114
  type CodeState = {
2196
- /** 代码块DSL数据源 */codeDsl: CodeBlockDSL | null; /** 代码块是否可编辑 */
2197
- editable: boolean; /** list模式下左侧展示的代码列表 */
2198
- combineIds: string[]; /** 为业务逻辑预留的不可删除的代码块列表,由业务逻辑维护(如代码块上线后不可删除) */
2115
+ /** 代码块DSL数据源 */
2116
+ codeDsl: CodeBlockDSL | null;
2117
+ /** 代码块是否可编辑 */
2118
+ editable: boolean;
2119
+ /** list模式下左侧展示的代码列表 */
2120
+ combineIds: string[];
2121
+ /** 为业务逻辑预留的不可删除的代码块列表,由业务逻辑维护(如代码块上线后不可删除) */
2199
2122
  undeletableList: Id[];
2200
2123
  paramsColConfig?: TableColumnConfig;
2201
2124
  };
2202
2125
  type CodeRelation = {
2203
- /** 组件id:[代码id1,代码id2] */[compId: Id]: Id[];
2126
+ /** 组件id:[代码id1,代码id2] */
2127
+ [compId: Id]: Id[];
2204
2128
  };
2205
2129
  interface CodeDslItem {
2206
2130
  /** 代码块id */
@@ -2600,7 +2524,13 @@ interface TreeNodeData {
2600
2524
  /** 判断组件树节点是否可展开(即是否要展示为拥有子节点的形态)的函数 */
2601
2525
  type IsExpandableFunction = (_data: TreeNodeData, _nodeStatusMap: Map<Id, LayerNodeStatus>) => boolean;
2602
2526
  /** canDropIn 的调用场景 */
2603
- type CanDropInScene = /** 在"已选组件"面板的组件树中拖动节点 */'layer' /** 在画布上拖动已有组件(被拖动组件本身已经存在于画布中,sourceIds 包含其 id) */ | 'stage-drag' /** 从组件列表拖入新组件到画布(被拖入的组件尚不存在,sourceIds 为空数组) */ | 'stage-add';
2527
+ type CanDropInScene =
2528
+ /** 在"已选组件"面板的组件树中拖动节点 */
2529
+ 'layer' |
2530
+ /** 在画布上拖动已有组件(被拖动组件本身已经存在于画布中,sourceIds 包含其 id) */
2531
+ 'stage-drag' |
2532
+ /** 从组件列表拖入新组件到画布(被拖入的组件尚不存在,sourceIds 为空数组) */
2533
+ 'stage-add';
2604
2534
  /**
2605
2535
  * 判断当前正在拖动的源节点是否可以拖入目标节点内部的函数
2606
2536
  * @param _sourceIds 当前正在拖动的源节点 id 列表
@@ -2619,11 +2549,11 @@ type CanDropInScene = /** 在"已选组件"面板的组件树中拖动节点 */'
2619
2549
  * - 其他(`true` / `void` / `undefined`):按原 targetId 正常拖入
2620
2550
  */
2621
2551
  type CanDropInFunction = (_sourceIds: Id[], _targetId: Id, _scene: CanDropInScene) => Id | boolean | void;
2622
- type AsyncBeforeHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (...args: Parameters<C[K]>) => Promise<Parameters<C[K]>> | Parameters<C[K]> };
2623
- type AsyncAfterHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (result: Awaited<ReturnType<C[K]>>, ...args: Parameters<C[K]>) => ReturnType<C[K]> | Awaited<ReturnType<C[K]>> };
2624
- type SyncBeforeHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (...args: Parameters<C[K]>) => Parameters<C[K]> };
2625
- type SyncAfterHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (result: ReturnType<C[K]>, ...args: Parameters<C[K]>) => ReturnType<C[K]> };
2626
- type AddPrefixToObject<T, P extends string> = { [K in keyof T as K extends string ? `${P}${K}` : never]: T[K] };
2552
+ type AsyncBeforeHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (...args: Parameters<C[K]>) => Promise<Parameters<C[K]>> | Parameters<C[K]>; };
2553
+ type AsyncAfterHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (result: Awaited<ReturnType<C[K]>>, ...args: Parameters<C[K]>) => ReturnType<C[K]> | Awaited<ReturnType<C[K]>>; };
2554
+ type SyncBeforeHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (...args: Parameters<C[K]>) => Parameters<C[K]>; };
2555
+ type SyncAfterHook<Value extends Array<string>, C extends Record<Value[number], (...args: any) => any>> = { [K in Value[number]]?: (result: ReturnType<C[K]>, ...args: Parameters<C[K]>) => ReturnType<C[K]>; };
2556
+ type AddPrefixToObject<T, P extends string> = { [K in keyof T as K extends string ? `${P}${K}` : never]: T[K]; };
2627
2557
  type AsyncHookPlugin<T extends Array<string>, C extends Record<T[number], (...args: any) => any>> = AddPrefixToObject<PascalCasedProperties<AsyncBeforeHook<T, C>>, 'before'> & AddPrefixToObject<PascalCasedProperties<AsyncAfterHook<T, C>>, 'after'>;
2628
2558
  type SyncHookPlugin<T extends Array<string>, C extends Record<T[number], (...args: any) => any>> = AddPrefixToObject<PascalCasedProperties<SyncBeforeHook<T, C>>, 'before'> & AddPrefixToObject<PascalCasedProperties<SyncAfterHook<T, C>>, 'after'>;
2629
2559
  interface EventBusEvent {
@@ -2661,8 +2591,8 @@ interface ContentMenuTarget {
2661
2591
  data?: TreeNodeData;
2662
2592
  }
2663
2593
  type ContentMenuType = 'layer' | 'data-source' | 'viewer' | 'code-block';
2664
- type CustomContentMenuFunction = (menus: (MenuButton | MenuComponent)[], type: ContentMenuType, /** 读取当前右键目标;数据源 / 代码块面板会传入,图层 / 画布一般不需要 */
2665
-
2594
+ type CustomContentMenuFunction = (menus: (MenuButton | MenuComponent)[], type: ContentMenuType,
2595
+ /** 读取当前右键目标;数据源 / 代码块面板会传入,图层 / 画布一般不需要 */
2666
2596
  getTarget?: () => ContentMenuTarget | null) => (MenuButton | MenuComponent)[];
2667
2597
  interface EditorEvents {
2668
2598
  'root-change': [value: StoreState['root'], preValue?: StoreState['root'], options?: {
@@ -3000,9 +2930,7 @@ declare const useCodeBlockEdit: (codeBlockService: Services["codeBlockService"])
3000
2930
  }, {}, {}, {}, {}> | null>>;
3001
2931
  createCodeBlock: () => Promise<void>;
3002
2932
  editCode: (id: string) => Promise<void>;
3003
- deleteCode: (key: string, {
3004
- historySource
3005
- }?: {
2933
+ deleteCode: (key: string, { historySource }?: {
3006
2934
  historySource?: HistoryOpSource;
3007
2935
  }) => Promise<void>;
3008
2936
  submitCodeBlockHandler: (values: CodeBlockContent, eventData?: ContainerChangeEventData) => Promise<void>;
@@ -3142,11 +3070,7 @@ declare const displayTabConfig: TabPaneConfig<DisplayCondsConfig>;
3142
3070
  * @param config 组件属性配置
3143
3071
  * @returns Object
3144
3072
  */
3145
- declare const fillConfig: (config?: FormConfig, {
3146
- labelWidth,
3147
- disabledDataSource,
3148
- disabledCodeBlock
3149
- }?: {
3073
+ declare const fillConfig: (config?: FormConfig, { labelWidth, disabledDataSource, disabledCodeBlock }?: {
3150
3074
  labelWidth?: string;
3151
3075
  disabledDataSource?: boolean;
3152
3076
  disabledCodeBlock?: boolean;
@@ -3449,10 +3373,7 @@ declare class ScrollViewer extends EventEmitter {
3449
3373
  constructor(options: ScrollViewerOptions);
3450
3374
  destroy(): void;
3451
3375
  setZoom(zoom: number): void;
3452
- scrollTo({
3453
- left,
3454
- top
3455
- }: {
3376
+ scrollTo({ left, top }: {
3456
3377
  left?: number;
3457
3378
  top?: number;
3458
3379
  }): void;
@@ -3498,11 +3419,7 @@ declare const idbDelete: (dbName: string, storeName: string, key: IDBValidKey) =
3498
3419
  * @param diff 单条变更 diff(缺省视为空)
3499
3420
  * @param getLabel 从快照取展示名
3500
3421
  */
3501
- declare const describeRevertStep: <T extends object>(id: Id, {
3502
- oldSchema,
3503
- newSchema,
3504
- changeRecords
3505
- }: StepDiffItem<T> | undefined, getLabel: (schema: T) => string | undefined) => string;
3422
+ declare const describeRevertStep: <T extends object>(id: Id, { oldSchema, newSchema, changeRecords }: StepDiffItem<T> | undefined, getLabel: (schema: T) => string | undefined) => string;
3506
3423
  /**
3507
3424
  * 根据 old/new 是否为 null 推断 opType(与 push 时的约定一致)。
3508
3425
  */
@@ -3518,7 +3435,8 @@ declare const detectStackOpType: (oldVal: unknown, newVal: unknown) => "add" | "
3518
3435
  declare const createStackStep: <T, S extends BaseStepValue<T>>(id: Id, payload: Omit<BaseStepValue<T>, "uuid" | "data" | "opType" | "diff" | "timestamp" | "saved"> & {
3519
3436
  oldValue: T | null;
3520
3437
  newValue: T | null;
3521
- changeRecords?: ChangeRecord[]; /** 展示名(缺省时从快照 name / title 推断)。 */
3438
+ changeRecords?: ChangeRecord[];
3439
+ /** 展示名(缺省时从快照 name / title 推断)。 */
3522
3440
  name?: string;
3523
3441
  }) => S | null;
3524
3442
  declare const markStackSaved: <S extends {
@@ -4890,9 +4808,12 @@ type __VLS_Props$33 = {
4890
4808
  layerContentMenu: (MenuButton | MenuComponent)[];
4891
4809
  indent?: number;
4892
4810
  nextLevelIndentIncrement?: number;
4893
- customContentMenu: CustomContentMenuFunction; /** 自定义判断组件树节点是否可展开(即是否要展示为拥有子节点的形态)的函数 */
4894
- isExpandable?: IsExpandableFunction; /** 自定义判断当前拖动节点是否可以拖入目标节点内部的函数,返回 false 则禁止拖入 */
4895
- canDropIn?: CanDropInFunction; /** 组件树节点双击前的钩子函数,返回 false 则阻止默认的双击行为 */
4811
+ customContentMenu: CustomContentMenuFunction;
4812
+ /** 自定义判断组件树节点是否可展开(即是否要展示为拥有子节点的形态)的函数 */
4813
+ isExpandable?: IsExpandableFunction;
4814
+ /** 自定义判断当前拖动节点是否可以拖入目标节点内部的函数,返回 false 则禁止拖入 */
4815
+ canDropIn?: CanDropInFunction;
4816
+ /** 组件树节点双击前的钩子函数,返回 false 则阻止默认的双击行为 */
4896
4817
  beforeNodeDblclick?: (_event: MouseEvent, _data: TreeNodeData) => Promise<boolean | void> | boolean | void;
4897
4818
  };
4898
4819
  declare const __VLS_base$10: import("@vue/runtime-core").DefineComponent<__VLS_Props$33, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
@@ -5071,9 +4992,7 @@ declare const __VLS_base$9: import("@vue/runtime-core").DefineComponent<__VLS_Pr
5071
4992
  draggable: boolean;
5072
4993
  }> & Omit<Map<Id, LayerNodeStatus>, keyof Map<any, any>>)>;
5073
4994
  filter: (text: string | string[]) => void;
5074
- deleteCode: (id: string, {
5075
- historySource
5076
- }?: {
4995
+ deleteCode: (id: string, { historySource }?: {
5077
4996
  historySource?: HistoryOpSource;
5078
4997
  }) => Promise<void>;
5079
4998
  }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
@@ -5118,8 +5037,10 @@ type __VLS_WithSlots$8<T, S> = T & {
5118
5037
  type __VLS_Props$18 = {
5119
5038
  title?: string;
5120
5039
  values: any;
5121
- disabled: boolean; /** 打开后需要直接定位并打开的方法名,传入时默认激活「方法定义」tab */
5122
- editMethodName?: string; /** 打开后需要直接定位并打开的字段路径,传入时默认激活「数据定义」tab */
5040
+ disabled: boolean;
5041
+ /** 打开后需要直接定位并打开的方法名,传入时默认激活「方法定义」tab */
5042
+ editMethodName?: string;
5043
+ /** 打开后需要直接定位并打开的字段路径,传入时默认激活「数据定义」tab */
5123
5044
  editFieldPath?: string[];
5124
5045
  };
5125
5046
  type __VLS_ModelProps$2 = {
@@ -6551,7 +6472,9 @@ declare const _default: typeof __VLS_export$12;
6551
6472
  //#endregion
6552
6473
  //#region temp/packages/editor/src/components/CompareForm.vue.d.ts
6553
6474
  type __VLS_Props$9 = CompareFormBaseProps & {
6554
- /** 用于对比的旧值(修改前的值) */lastValue?: CompareFormBaseProps['value']; /** 需要走 self diff 的字段类型(例如 mod-cond)。 */
6475
+ /** 用于对比的旧值(修改前的值) */
6476
+ lastValue?: CompareFormBaseProps['value'];
6477
+ /** 需要走 self diff 的字段类型(例如 mod-cond)。 */
6555
6478
  selfDiffFieldTypes?: string[];
6556
6479
  };
6557
6480
  declare const __VLS_export$11: import("@vue/runtime-core").DefineComponent<__VLS_Props$9, {
@@ -6566,7 +6489,8 @@ declare const _default$5: typeof __VLS_export$11;
6566
6489
  //#endregion
6567
6490
  //#region temp/packages/editor/src/components/ViewForm.vue.d.ts
6568
6491
  type __VLS_Props$8 = CompareFormBaseProps & {
6569
- /** 是否禁用表单(默认只读展示)。 */disabled?: boolean;
6492
+ /** 是否禁用表单(默认只读展示)。 */
6493
+ disabled?: boolean;
6570
6494
  };
6571
6495
  declare const __VLS_export$10: import("@vue/runtime-core").DefineComponent<__VLS_Props$8, {
6572
6496
  form: ShallowRef<InstanceType<typeof MForm> | null>;
@@ -6612,9 +6536,12 @@ declare const __VLS_export$9: <T extends BaseStepValue = BaseStepValue>(__VLS_pr
6612
6536
  * 该类历史的整体渲染配置(title / prefix / describe* / isStep* / showInitial / gotoEnabled)。
6613
6537
  * 由父组件按业务类型注入,组件内部按需读取,避免逐项透传多个 props。
6614
6538
  */
6615
- config: HistoryBucketConfig<T>; /** 当前 bucket 对应的目标 id(dataSource.id 或 codeBlock.id),同时用于组装子项的 key。 */
6616
- bucketId: string | number; /** 当前 bucket 下的所有历史分组,按时间倒序展示(最近的操作在前)。 */
6617
- groups: HistoryBucketGroup<T>[]; /** 共享的折叠状态表(key -> 是否展开,缺省或 true 为展开、false 为收起),由顶层 panel 统一维护以便跨 tab 复用。 */
6539
+ config: HistoryBucketConfig<T>;
6540
+ /** 当前 bucket 对应的目标 id(dataSource.id codeBlock.id),同时用于组装子项的 key。 */
6541
+ bucketId: string | number;
6542
+ /** 当前 bucket 下的所有历史分组,按时间倒序展示(最近的操作在前)。 */
6543
+ groups: HistoryBucketGroup<T>[];
6544
+ /** 共享的折叠状态表(key -> 是否展开,缺省或 true 为展开、false 为收起),由顶层 panel 统一维护以便跨 tab 复用。 */
6618
6545
  expanded: Record<string, boolean>;
6619
6546
  } & {
6620
6547
  onToggle?: ((_key: string) => any) | undefined;
@@ -6639,7 +6566,7 @@ declare const __VLS_export$9: <T extends BaseStepValue = BaseStepValue>(__VLS_pr
6639
6566
  __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
6640
6567
  };
6641
6568
  declare const _default$22: typeof __VLS_export$9;
6642
- type __VLS_PrettifyLocal$1<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
6569
+ type __VLS_PrettifyLocal$1<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
6643
6570
  //#endregion
6644
6571
  //#region temp/packages/editor/src/layouts/history-list/BucketTab.vue.d.ts
6645
6572
  declare const __VLS_export$8: <T extends BaseStepValue = BaseStepValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
@@ -6688,11 +6615,12 @@ declare const __VLS_export$8: <T extends BaseStepValue = BaseStepValue>(__VLS_pr
6688
6615
  __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
6689
6616
  };
6690
6617
  declare const _default$23: typeof __VLS_export$8;
6691
- type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
6618
+ type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
6692
6619
  //#endregion
6693
6620
  //#region temp/packages/editor/src/layouts/history-list/HistoryDiffDialog.vue.d.ts
6694
6621
  type __VLS_Props$7 = {
6695
- /** 编辑器服务集合,由调用方传入(不再通过 inject('services') 获取)。 */services?: Services;
6622
+ /** 编辑器服务集合,由调用方传入(不再通过 inject('services') 获取)。 */
6623
+ services?: Services;
6696
6624
  /**
6697
6625
  * 来自 Editor 顶层的 `extendFormState`,用于扩展 MForm.formState。
6698
6626
  * 透传给 CompareForm,从而让差异对比时表单 item 中依赖业务上下文的
@@ -6704,7 +6632,8 @@ type __VLS_Props$7 = {
6704
6632
  * 取配置逻辑,可通过 `ctx.defaultLoadConfig()` 复用默认结果再做二次加工。
6705
6633
  */
6706
6634
  loadConfig?: CompareFormLoadConfig;
6707
- width?: string; /** 差异对比表单内组件的尺寸(透传给 CompareForm 的 `size`),可选 'large' | 'default' | 'small'。 */
6635
+ width?: string;
6636
+ /** 差异对比表单内组件的尺寸(透传给 CompareForm 的 `size`),可选 'large' | 'default' | 'small'。 */
6708
6637
  size?: FieldSize;
6709
6638
  isConfirm?: boolean;
6710
6639
  onConfirm?: () => void;
@@ -6778,8 +6707,10 @@ interface Position {
6778
6707
  type __VLS_Props$6 = {
6779
6708
  position?: Position;
6780
6709
  title?: string;
6781
- bodyStyle?: CSSProperties; /** 浮窗初始样式,会与内部计算样式合并,外部传入优先 */
6782
- initialStyle?: CSSProperties; /** 用于约束浮窗 left 的容器宽度,传入时按宽度收敛 left,避免超出右边界;默认取视窗宽度 */
6710
+ bodyStyle?: CSSProperties;
6711
+ /** 浮窗初始样式,会与内部计算样式合并,外部传入优先 */
6712
+ initialStyle?: CSSProperties;
6713
+ /** 用于约束浮窗 left 的容器宽度,传入时按宽度收敛 left,避免超出右边界;默认取视窗宽度 */
6783
6714
  frameworkWidth?: number;
6784
6715
  beforeClose?: (_done: (_cancel?: boolean) => void) => void;
6785
6716
  };
@@ -6838,7 +6769,8 @@ type __VLS_Props$5 = {
6838
6769
  nodeStatusMap: Map<Id, LayerNodeStatus>;
6839
6770
  indent?: number;
6840
6771
  nextLevelIndentIncrement?: number;
6841
- emptyText?: string; /** 自定义判断节点是否可展开(即是否要展示为拥有子节点的形态)的函数 */
6772
+ emptyText?: string;
6773
+ /** 自定义判断节点是否可展开(即是否要展示为拥有子节点的形态)的函数 */
6842
6774
  isExpandable?: IsExpandableFunction;
6843
6775
  };
6844
6776
  declare const __VLS_base$1: import("@vue/runtime-core").DefineComponent<__VLS_Props$5, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
@@ -6889,7 +6821,8 @@ type __VLS_Props$4 = {
6889
6821
  parentsId?: Id[];
6890
6822
  nodeStatusMap: Map<Id, LayerNodeStatus>;
6891
6823
  indent?: number;
6892
- nextLevelIndentIncrement?: number; /** 自定义判断节点是否可展开(即是否要展示为拥有子节点的形态)的函数 */
6824
+ nextLevelIndentIncrement?: number;
6825
+ /** 自定义判断节点是否可展开(即是否要展示为拥有子节点的形态)的函数 */
6893
6826
  isExpandable?: IsExpandableFunction;
6894
6827
  };
6895
6828
  declare const __VLS_base: import("@vue/runtime-core").DefineComponent<__VLS_Props$4, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {