@tmagic/editor 1.8.0-beta.4 → 1.8.0-beta.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/es/components/CompareForm.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/ToolButton.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/es/fields/CodeSelectCol.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/es/fields/DataSourceFieldSelect/FieldSelect.vue_vue_type_script_setup_true_lang.js +8 -2
- package/dist/es/fields/DataSourceFields.vue_vue_type_script_setup_true_lang.js +25 -8
- package/dist/es/fields/DataSourceMethodSelect.vue_vue_type_script_setup_true_name_true_lang.js +6 -4
- package/dist/es/fields/DataSourceMethods.vue_vue_type_script_setup_true_lang.js +25 -12
- package/dist/es/fields/StyleSetter/components/Border.vue_vue_type_script_setup_true_lang.js +27 -5
- package/dist/es/index.js +6 -3
- package/dist/es/initService.js +1 -1
- package/dist/es/layouts/Framework.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/history-list/Bucket.vue_vue_type_script_setup_true_lang.js +19 -55
- package/dist/es/layouts/history-list/BucketTab.vue_vue_type_script_setup_true_lang.js +22 -39
- package/dist/es/layouts/history-list/GroupRow.vue_vue_type_script_setup_true_lang.js +149 -103
- package/dist/es/layouts/history-list/HistoryDiffDialog.vue_vue_type_script_setup_true_lang.js +32 -8
- package/dist/es/layouts/history-list/HistoryListPanel.vue_vue_type_script_setup_true_lang.js +335 -213
- package/dist/es/layouts/history-list/InitialRow.vue_vue_type_script_setup_true_lang.js +36 -7
- package/dist/es/layouts/history-list/PageTab.vue_vue_type_script_setup_true_lang.js +47 -60
- package/dist/es/layouts/history-list/composables.js +73 -32
- package/dist/es/layouts/page-bar/PageBar.vue_vue_type_script_setup_true_lang.js +4 -2
- package/dist/es/layouts/sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +5 -1
- package/dist/es/layouts/sidebar/data-source/DataSourceConfigPanel.vue_vue_type_script_setup_true_lang.js +16 -3
- package/dist/es/layouts/sidebar/data-source/DataSourceListPanel.vue_vue_type_script_setup_true_lang.js +23 -1
- package/dist/es/services/codeBlock.js +96 -37
- package/dist/es/services/dataSource.js +70 -26
- package/dist/es/services/editor.js +266 -104
- package/dist/es/services/history.js +271 -212
- package/dist/es/services/ui.js +3 -0
- package/dist/es/style.css +53 -7
- package/dist/es/utils/data-source/index.js +2 -0
- package/dist/es/utils/editor.js +103 -49
- package/dist/es/utils/history.js +232 -0
- package/dist/es/utils/indexed-db.js +86 -0
- package/dist/es/utils/undo-redo.js +60 -1
- package/dist/style.css +53 -7
- package/dist/tmagic-editor.umd.cjs +2064 -1000
- package/package.json +7 -7
- package/src/components/CompareForm.vue +3 -1
- package/src/components/ToolButton.vue +2 -2
- package/src/fields/CodeSelectCol.vue +7 -1
- package/src/fields/DataSourceFieldSelect/FieldSelect.vue +16 -2
- package/src/fields/DataSourceFields.vue +37 -8
- package/src/fields/DataSourceMethodSelect.vue +9 -4
- package/src/fields/DataSourceMethods.vue +42 -21
- package/src/fields/StyleSetter/components/Border.vue +15 -6
- package/src/index.ts +1 -0
- package/src/initService.ts +1 -1
- package/src/layouts/Framework.vue +1 -1
- package/src/layouts/history-list/Bucket.vue +34 -71
- package/src/layouts/history-list/BucketTab.vue +46 -54
- package/src/layouts/history-list/GroupRow.vue +146 -111
- package/src/layouts/history-list/HistoryDiffDialog.vue +94 -68
- package/src/layouts/history-list/HistoryListPanel.vue +298 -115
- package/src/layouts/history-list/InitialRow.vue +28 -9
- package/src/layouts/history-list/PageTab.vue +57 -51
- package/src/layouts/history-list/composables.ts +157 -36
- package/src/layouts/page-bar/PageBar.vue +4 -2
- package/src/layouts/sidebar/Sidebar.vue +6 -1
- package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +30 -2
- package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +26 -1
- package/src/services/codeBlock.ts +113 -37
- package/src/services/dataSource.ts +94 -40
- package/src/services/editor.ts +376 -136
- package/src/services/history.ts +306 -209
- package/src/services/ui.ts +7 -0
- package/src/theme/history-list-panel.scss +72 -5
- package/src/theme/page-bar.scss +0 -4
- package/src/theme/style-setter/border.scss +4 -1
- package/src/type.ts +183 -64
- package/src/utils/data-source/index.ts +2 -0
- package/src/utils/editor.ts +166 -60
- package/src/utils/history.ts +308 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/indexed-db.ts +122 -0
- package/src/utils/undo-redo.ts +88 -0
- package/types/index.d.ts +813 -302
package/types/index.d.ts
CHANGED
|
@@ -69,6 +69,16 @@ declare const canUsePluginMethods$7: {
|
|
|
69
69
|
type AsyncMethodName$4 = Writable<(typeof canUsePluginMethods$7)['async']>;
|
|
70
70
|
declare class CodeBlock extends BaseService {
|
|
71
71
|
private state;
|
|
72
|
+
/**
|
|
73
|
+
* 最近一次写入历史栈的代码块历史记录 uuid(单条写入场景:新增 / 更新)。
|
|
74
|
+
* 供 setCodeDslById(Sync)AndGetHistoryId 取回,普通方法不读取它。
|
|
75
|
+
*/
|
|
76
|
+
private lastPushedHistoryId;
|
|
77
|
+
/**
|
|
78
|
+
* deleteCodeDslByIds 一次删除多个代码块时,按写入顺序收集的历史记录 uuid 列表。
|
|
79
|
+
* 在 deleteCodeDslByIds 入口处重置,供 deleteCodeDslByIdsAndGetHistoryId 取回。
|
|
80
|
+
*/
|
|
81
|
+
private lastDeletedHistoryIds;
|
|
72
82
|
constructor();
|
|
73
83
|
/**
|
|
74
84
|
* 设置活动的代码块dsl数据源
|
|
@@ -184,6 +194,22 @@ declare class CodeBlock extends BaseService {
|
|
|
184
194
|
historyDescription,
|
|
185
195
|
historySource
|
|
186
196
|
}?: HistoryOpOptions): Promise<void>;
|
|
197
|
+
/**
|
|
198
|
+
* 下列 *AndGetHistoryId 方法与对应的写入方法行为完全一致,
|
|
199
|
+
* 返回值在 {@link DslOpWithHistoryIdsResult} 中同时包含原操作结果与本次写入的历史 uuid 列表,
|
|
200
|
+
* 可用于精确引用 / 定位该条历史记录(埋点、revert、跨端同步等)。
|
|
201
|
+
*
|
|
202
|
+
* 当本次操作未写入历史(doNotPushHistory 为 true、或无对应记录)时 historyIds 为 `[]`。
|
|
203
|
+
*/
|
|
204
|
+
/** 等价于 {@link setCodeDslById},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
205
|
+
setCodeDslByIdAndGetHistoryId(id: Id, codeConfig: Partial<CodeBlockContent>, options?: HistoryOpOptionsWithChangeRecords): Promise<DslOpWithHistoryIdsResult<void>>;
|
|
206
|
+
/** 等价于 {@link setCodeDslByIdSync},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
207
|
+
setCodeDslByIdSyncAndGetHistoryId(id: Id, codeConfig: Partial<CodeBlockContent>, force?: boolean, options?: HistoryOpOptionsWithChangeRecords): DslOpWithHistoryIdsResult<void>;
|
|
208
|
+
/**
|
|
209
|
+
* 等价于 {@link deleteCodeDslByIds},并额外返回本次写入的全部历史记录 uuid(按删除顺序)。
|
|
210
|
+
* 一次删除多个代码块会产生多条历史记录;未写入任何历史时 historyIds 为 `[]`。
|
|
211
|
+
*/
|
|
212
|
+
deleteCodeDslByIdsAndGetHistoryId(codeIds: Id[], options?: HistoryOpOptions): Promise<DslOpWithHistoryIdsResult<void>>;
|
|
187
213
|
setParamsColConfig(config: TableColumnConfig): void;
|
|
188
214
|
getParamsColConfig(): TableColumnConfig | undefined;
|
|
189
215
|
/**
|
|
@@ -227,6 +253,14 @@ declare class CodeBlock extends BaseService {
|
|
|
227
253
|
* @returns 反向后产生的新 step;目标不存在 / 未应用时返回 null
|
|
228
254
|
*/
|
|
229
255
|
revert(id: Id, index: number): Promise<CodeBlockStepValue | null>;
|
|
256
|
+
/**
|
|
257
|
+
* 通过历史记录 uuid 回滚代码块历史步骤,语义同 {@link revert},
|
|
258
|
+
* 仅无需调用方再传 codeBlockId 与 index:内部会按 uuid 在全部代码块栈中定位对应步骤后再回滚。
|
|
259
|
+
* 按数组顺序依次回滚,返回与入参同序的结果列表(某项失败时为 `null`)。
|
|
260
|
+
*
|
|
261
|
+
* @param uuids 目标历史记录的 uuid 列表,通常由 {@link setCodeDslByIdAndGetHistoryId} 等方法返回的 `historyIds`
|
|
262
|
+
*/
|
|
263
|
+
revertById(uuids: string[]): Promise<(CodeBlockStepValue | null)[]>;
|
|
230
264
|
/**
|
|
231
265
|
* 生成代码块唯一id
|
|
232
266
|
* @returns {Id} 代码块唯一id
|
|
@@ -268,7 +302,7 @@ declare class CodeBlock extends BaseService {
|
|
|
268
302
|
private applyHistoryStep;
|
|
269
303
|
}
|
|
270
304
|
type CodeBlockService = CodeBlock;
|
|
271
|
-
declare const _default$
|
|
305
|
+
declare const _default$38: CodeBlock;
|
|
272
306
|
//#endregion
|
|
273
307
|
//#region temp/packages/editor/src/services/componentList.d.ts
|
|
274
308
|
declare class ComponentList extends BaseService {
|
|
@@ -302,6 +336,12 @@ declare const canUsePluginMethods$6: {
|
|
|
302
336
|
type SyncMethodName$4 = Writable<(typeof canUsePluginMethods$6)['sync']>;
|
|
303
337
|
declare class DataSource extends BaseService {
|
|
304
338
|
private state;
|
|
339
|
+
/**
|
|
340
|
+
* 最近一次写入历史栈的数据源历史记录 uuid。
|
|
341
|
+
* 供 *AndGetHistoryId 系列方法在调用 add / update / remove 后取回本次产生的历史记录 id;
|
|
342
|
+
* 普通方法不读取它,调用前由 *AndGetHistoryId 重置为 null。
|
|
343
|
+
*/
|
|
344
|
+
private lastPushedHistoryId;
|
|
305
345
|
constructor();
|
|
306
346
|
set<K extends StateKey$1, T extends State$2[K]>(name: K, value: T): void;
|
|
307
347
|
get<K extends StateKey$1>(name: K): State$2[K];
|
|
@@ -361,6 +401,19 @@ declare class DataSource extends BaseService {
|
|
|
361
401
|
historyDescription,
|
|
362
402
|
historySource
|
|
363
403
|
}?: HistoryOpOptions): void;
|
|
404
|
+
/**
|
|
405
|
+
* 下列 *AndGetHistoryId 方法与对应的 add / update / remove 行为完全一致,
|
|
406
|
+
* 返回值在 {@link DslOpWithHistoryIdsResult} 中同时包含原操作结果与本次写入历史栈的 uuid 列表({@link DataSourceStepValue.uuid}),
|
|
407
|
+
* 可用于精确引用 / 定位该条历史记录(埋点、revert、跨端同步等)。
|
|
408
|
+
*
|
|
409
|
+
* 当本次操作未写入历史(doNotPushHistory 为 true、或无对应记录)时 historyIds 为 `[]`。
|
|
410
|
+
*/
|
|
411
|
+
/** 等价于 {@link add},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
412
|
+
addAndGetHistoryId(config: DataSourceSchema, options?: HistoryOpOptions): DslOpWithHistoryIdsResult<DataSourceSchema>;
|
|
413
|
+
/** 等价于 {@link update},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
414
|
+
updateAndGetHistoryId(config: DataSourceSchema, options?: HistoryOpOptionsWithChangeRecords): DslOpWithHistoryIdsResult<DataSourceSchema>;
|
|
415
|
+
/** 等价于 {@link remove},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
416
|
+
removeAndGetHistoryId(id: string, options?: HistoryOpOptions): DslOpWithHistoryIdsResult<void>;
|
|
364
417
|
/**
|
|
365
418
|
* 撤销指定数据源的最近一次变更。
|
|
366
419
|
*
|
|
@@ -401,6 +454,14 @@ declare class DataSource extends BaseService {
|
|
|
401
454
|
* @returns 反向后产生的新 step;目标不存在 / 未应用时返回 null
|
|
402
455
|
*/
|
|
403
456
|
revert(id: Id, index: number): DataSourceStepValue | null;
|
|
457
|
+
/**
|
|
458
|
+
* 通过历史记录 uuid 回滚数据源历史步骤,语义同 {@link revert},
|
|
459
|
+
* 仅无需调用方再传 dataSourceId 与 index:内部会按 uuid 在全部数据源栈中定位对应步骤后再回滚。
|
|
460
|
+
* 按数组顺序依次回滚,返回与入参同序的结果列表(某项失败时为 `null`)。
|
|
461
|
+
*
|
|
462
|
+
* @param uuids 目标历史记录的 uuid 列表,通常由 {@link addAndGetHistoryId} 等方法返回的 `historyIds`
|
|
463
|
+
*/
|
|
464
|
+
revertById(uuids: string[]): (DataSourceStepValue | null)[];
|
|
404
465
|
createId(): string;
|
|
405
466
|
getDataSourceById(id: string): DataSourceSchema | undefined;
|
|
406
467
|
resetState(): void;
|
|
@@ -439,7 +500,7 @@ declare class DataSource extends BaseService {
|
|
|
439
500
|
private applyHistoryStep;
|
|
440
501
|
}
|
|
441
502
|
type DataSourceService = DataSource;
|
|
442
|
-
declare const _default$
|
|
503
|
+
declare const _default$39: DataSource;
|
|
443
504
|
//#endregion
|
|
444
505
|
//#region temp/packages/editor/src/services/dep.d.ts
|
|
445
506
|
interface DepEvents {
|
|
@@ -492,19 +553,28 @@ declare class Dep extends BaseService {
|
|
|
492
553
|
private enqueueTask;
|
|
493
554
|
}
|
|
494
555
|
type DepService = Dep;
|
|
495
|
-
declare const _default$
|
|
556
|
+
declare const _default$41: Dep;
|
|
496
557
|
//#endregion
|
|
497
558
|
//#region temp/packages/editor/src/services/editor.d.ts
|
|
498
559
|
declare class Editor extends BaseService {
|
|
499
560
|
state: StoreState;
|
|
500
561
|
private selectionBeforeOp;
|
|
562
|
+
/**
|
|
563
|
+
* 最近一次 pushOpHistory 写入的历史记录 uuid。
|
|
564
|
+
* 供 *AndGetHistoryId 系列方法在调用普通操作后取回本次产生的历史记录 id;
|
|
565
|
+
* 普通操作不会读取它,调用前由 *AndGetHistoryId 重置为 null。
|
|
566
|
+
*/
|
|
567
|
+
private lastPushedHistoryId;
|
|
501
568
|
constructor();
|
|
502
569
|
/**
|
|
503
570
|
* 设置当前指点节点配置
|
|
504
571
|
* @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'pageLength' | 'pageFragmentLength
|
|
505
572
|
* @param value MNode
|
|
573
|
+
* @param options.historySource 设置 root 时,本次变更写入历史记录的「操作来源」(仅 name === 'root' 时生效)
|
|
506
574
|
*/
|
|
507
|
-
set<K extends StoreStateKey, T extends StoreState[K]>(name: K, value: T
|
|
575
|
+
set<K extends StoreStateKey, T extends StoreState[K]>(name: K, value: T, options?: {
|
|
576
|
+
historySource?: HistoryOpSource;
|
|
577
|
+
}): void;
|
|
508
578
|
/**
|
|
509
579
|
* 获取当前指点节点配置
|
|
510
580
|
* @param name 'root' | 'page' | 'parent' | 'node' | 'highlightNode' | 'nodes' | 'stage' | 'modifiedNodeIds' | 'pageLength' | 'pageFragmentLength'
|
|
@@ -601,9 +671,11 @@ declare class Editor extends BaseService {
|
|
|
601
671
|
historySource
|
|
602
672
|
}?: DslOpOptions): Promise<void>;
|
|
603
673
|
doUpdate(config: MNode, {
|
|
604
|
-
changeRecords
|
|
674
|
+
changeRecords,
|
|
675
|
+
historySource
|
|
605
676
|
}?: {
|
|
606
677
|
changeRecords?: ChangeRecord[];
|
|
678
|
+
historySource?: HistoryOpSource;
|
|
607
679
|
}): Promise<{
|
|
608
680
|
newNode: MNode;
|
|
609
681
|
oldNode: MNode;
|
|
@@ -725,6 +797,31 @@ declare class Editor extends BaseService {
|
|
|
725
797
|
historyDescription,
|
|
726
798
|
historySource
|
|
727
799
|
}?: DslOpOptions): Promise<void>;
|
|
800
|
+
/**
|
|
801
|
+
* 下列 *AndGetHistoryId 方法与对应的普通操作(add / remove / update ...)行为完全一致,
|
|
802
|
+
* 返回值在 {@link DslOpWithHistoryIdsResult} 中同时包含原操作结果与本次写入历史栈的 uuid 列表({@link StepValue.uuid}),
|
|
803
|
+
* 可用于精确引用 / 定位该条历史记录(埋点、revert、跨端同步等)。
|
|
804
|
+
*
|
|
805
|
+
* 当本次操作未写入历史(doNotPushHistory 为 true、或操作无实际变更 / 提前返回)时 historyIds 为 `[]`。
|
|
806
|
+
*/
|
|
807
|
+
/** 等价于 {@link add},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
808
|
+
addAndGetHistoryId(addNode: AddMNode | MNode[], parent?: MContainer | null, options?: DslOpOptions): Promise<DslOpWithHistoryIdsResult<MNode | MNode[]>>;
|
|
809
|
+
/** 等价于 {@link remove},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
810
|
+
removeAndGetHistoryId(nodeOrNodeList: MNode | MNode[], options?: DslOpOptions): Promise<DslOpWithHistoryIdsResult<void>>;
|
|
811
|
+
/** 等价于 {@link update},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
812
|
+
updateAndGetHistoryId(config: MNode | MNode[], data?: {
|
|
813
|
+
changeRecords?: ChangeRecord[];
|
|
814
|
+
changeRecordList?: ChangeRecord[][];
|
|
815
|
+
doNotPushHistory?: boolean;
|
|
816
|
+
historyDescription?: string;
|
|
817
|
+
historySource?: HistoryOpSource;
|
|
818
|
+
}): Promise<DslOpWithHistoryIdsResult<MNode | MNode[]>>;
|
|
819
|
+
/** 等价于 {@link moveLayer},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
820
|
+
moveLayerAndGetHistoryId(offset: number | LayerOffset, options?: DslOpOptions): Promise<DslOpWithHistoryIdsResult<void>>;
|
|
821
|
+
/** 等价于 {@link moveToContainer},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
822
|
+
moveToContainerAndGetHistoryId(config: MNode | MNode[], targetId: Id, options?: DslOpOptions): Promise<DslOpWithHistoryIdsResult<MNode | MNode[]>>;
|
|
823
|
+
/** 等价于 {@link dragTo},并额外返回本次写入历史记录的 uuid 列表(未入栈时 historyIds 为 `[]`)。 */
|
|
824
|
+
dragToAndGetHistoryId(config: MNode | MNode[], targetParent: MContainer, targetIndex: number, options?: DslOpOptions): Promise<DslOpWithHistoryIdsResult<void>>;
|
|
728
825
|
/**
|
|
729
826
|
* 撤销当前操作
|
|
730
827
|
* @returns 被撤销的操作
|
|
@@ -752,6 +849,14 @@ declare class Editor extends BaseService {
|
|
|
752
849
|
* @returns 反向后产生的新 step;目标不存在 / 未应用 / 反向失败时返回 null
|
|
753
850
|
*/
|
|
754
851
|
revertPageStep(index: number): Promise<StepValue | null>;
|
|
852
|
+
/**
|
|
853
|
+
* 通过历史记录 uuid 回滚当前页面的历史步骤,语义与 {@link revertPageStep} 完全一致,
|
|
854
|
+
* 仅入参从 index 改为 uuid 列表({@link StepValue.uuid})。按数组顺序依次回滚,
|
|
855
|
+
* 返回与入参同序的结果列表(某项失败时为 `null`)。
|
|
856
|
+
*
|
|
857
|
+
* @param uuids 目标历史记录的 uuid 列表,通常由 *AndGetHistoryId 方法返回的 `historyIds`
|
|
858
|
+
*/
|
|
859
|
+
revertPageStepById(uuids: string[]): Promise<(StepValue | null)[]>;
|
|
755
860
|
/**
|
|
756
861
|
* 跳转当前页面历史栈到指定游标位置。
|
|
757
862
|
*
|
|
@@ -776,6 +881,24 @@ declare class Editor extends BaseService {
|
|
|
776
881
|
emit<Name extends keyof EditorEvents, Param extends EditorEvents[Name]>(eventName: Name, ...args: Param): boolean;
|
|
777
882
|
private addModifiedNodeId;
|
|
778
883
|
private captureSelectionBeforeOp;
|
|
884
|
+
/**
|
|
885
|
+
* 比较「上一次 root」与「新 root」的页面 / 页面片,按页面粒度把整体替换拆成历史记录:
|
|
886
|
+
* - 新旧都存在且内容变化的页面 → 一条 `update`(整页快照替换,无 changeRecords);
|
|
887
|
+
* - 仅新 root 存在的页面 → 一条 `add`;
|
|
888
|
+
* - 仅旧 root 存在的页面 → 一条 `remove`。
|
|
889
|
+
*
|
|
890
|
+
* 每条记录落到对应页面自己的历史栈(与普通节点操作一致),并标记来源 `source`。
|
|
891
|
+
* 内容未变化的页面不产生记录,避免重复设置相同 DSL 时产生噪声。
|
|
892
|
+
*/
|
|
893
|
+
private pushRootDiffHistory;
|
|
894
|
+
/**
|
|
895
|
+
* 构造一条页面级「set root」历史记录(不携带选区 / modifiedNodeIds 上下文)并落到该页面自己的栈。
|
|
896
|
+
*
|
|
897
|
+
* 连续 set root 替换:若该页栈最新一条已是**同来源**的 set root 记录({@link StepValue.rootStep} 且 `source` 相同),
|
|
898
|
+
* 则用本次记录**替换**它而非新增,避免源码反复保存 / 外部重设 DSL 时堆积多条 root 记录;
|
|
899
|
+
* 来源不同则照常新增(initial 基线不是 rootStep,不在此列)。
|
|
900
|
+
*/
|
|
901
|
+
private pushPageDiffStep;
|
|
779
902
|
private pushOpHistory;
|
|
780
903
|
/**
|
|
781
904
|
* 应用历史操作(撤销 / 重做)
|
|
@@ -793,7 +916,7 @@ declare class Editor extends BaseService {
|
|
|
793
916
|
private selectedConfigExceptionHandler;
|
|
794
917
|
}
|
|
795
918
|
type EditorService = Editor;
|
|
796
|
-
declare const _default$
|
|
919
|
+
declare const _default$42: Editor;
|
|
797
920
|
//#endregion
|
|
798
921
|
//#region temp/packages/editor/src/services/events.d.ts
|
|
799
922
|
declare const canUsePluginMethods$5: {
|
|
@@ -815,14 +938,40 @@ declare class Events extends BaseService {
|
|
|
815
938
|
usePlugin(options: AsyncHookPlugin<AsyncMethodName$3, Events> & SyncHookPlugin<SyncMethodName$3, Events>): void;
|
|
816
939
|
}
|
|
817
940
|
type EventsService = Events;
|
|
818
|
-
declare const _default$
|
|
941
|
+
declare const _default$43: Events;
|
|
819
942
|
//#endregion
|
|
820
943
|
//#region temp/packages/editor/src/utils/undo-redo.d.ts
|
|
944
|
+
/**
|
|
945
|
+
* UndoRedo 栈的可序列化快照,用于持久化(如写入 IndexedDB)后再还原。
|
|
946
|
+
*/
|
|
947
|
+
interface SerializedUndoRedo<T = any> {
|
|
948
|
+
/** 栈内全部元素(按时间正序,索引 0 为最早一步)。 */
|
|
949
|
+
elementList: T[];
|
|
950
|
+
/** 游标位置(已应用步骤数量)。 */
|
|
951
|
+
listCursor: number;
|
|
952
|
+
/** 栈容量上限。 */
|
|
953
|
+
listMaxSize: number;
|
|
954
|
+
}
|
|
821
955
|
declare class UndoRedo<T = any> {
|
|
956
|
+
/**
|
|
957
|
+
* 由 {@link UndoRedo.serialize} 产出的快照重建一个 UndoRedo 实例。
|
|
958
|
+
* 游标会被夹紧到 [0, length] 区间,避免脏数据导致越界。
|
|
959
|
+
*
|
|
960
|
+
* @param options.isSavedStep 可选谓词:若提供,则把游标定位到「最近一条满足该谓词的记录」之后
|
|
961
|
+
* (即恢复到最近一个已保存点);找不到匹配记录时退回快照中的原游标。
|
|
962
|
+
*/
|
|
963
|
+
static fromSerialized<T = any>(data: SerializedUndoRedo<T>, options?: {
|
|
964
|
+
isSavedStep?: (element: T) => boolean;
|
|
965
|
+
}): UndoRedo<T>;
|
|
822
966
|
private elementList;
|
|
823
967
|
private listCursor;
|
|
824
968
|
private listMaxSize;
|
|
825
969
|
constructor(listMaxSize?: number);
|
|
970
|
+
/**
|
|
971
|
+
* 导出当前栈的可序列化快照(深克隆,避免外部改动污染内部状态)。
|
|
972
|
+
* 配合 {@link UndoRedo.fromSerialized} 可在持久化后完整还原撤销/重做栈。
|
|
973
|
+
*/
|
|
974
|
+
serialize(): SerializedUndoRedo<T>;
|
|
826
975
|
pushElement(element: T): void;
|
|
827
976
|
canUndo(): boolean;
|
|
828
977
|
/** 返回被撤销的操作 */
|
|
@@ -831,6 +980,19 @@ declare class UndoRedo<T = any> {
|
|
|
831
980
|
/** 返回被重做的操作 */
|
|
832
981
|
redo(): T | null;
|
|
833
982
|
getCurrentElement(): T | null;
|
|
983
|
+
/**
|
|
984
|
+
* 用 `element` 替换当前游标所在元素(cursor - 1),并丢弃其后的重做尾部(与 {@link pushElement} 的丢尾一致),
|
|
985
|
+
* 游标位置保持不变(元素数量不增)。cursor 为 0(无已应用元素)时不做任何操作并返回 false。
|
|
986
|
+
* 用于「连续同类记录合并」等就地替换最新一条的场景。
|
|
987
|
+
*/
|
|
988
|
+
replaceCurrentElement(element: T): boolean;
|
|
989
|
+
/**
|
|
990
|
+
* 对当前游标所在元素(cursor - 1)做就地更新;cursor 为 0(全部已撤销)时不做任何操作。
|
|
991
|
+
* 用于给「当前步骤」打标记(如标记为已保存)等元数据写入场景。
|
|
992
|
+
*/
|
|
993
|
+
updateCurrentElement(updater: (element: T) => void): void;
|
|
994
|
+
/** 对栈内全部元素做就地更新。用于批量清理元数据(如清空所有元素的已保存标记)。 */
|
|
995
|
+
updateElements(updater: (element: T, index: number) => void): void;
|
|
834
996
|
/**
|
|
835
997
|
* 返回栈内全部元素的浅克隆数组(按时间顺序,索引 0 为最早一步)。
|
|
836
998
|
* 仅用于历史面板等只读展示场景,不应直接修改返回值。
|
|
@@ -849,32 +1011,6 @@ declare class UndoRedo<T = any> {
|
|
|
849
1011
|
//#endregion
|
|
850
1012
|
//#region temp/packages/editor/src/services/history.d.ts
|
|
851
1013
|
declare class History extends BaseService {
|
|
852
|
-
/**
|
|
853
|
-
* 把单个代码块栈拆成若干 group:
|
|
854
|
-
* - 把"新增/删除"独立成组(语义上属于一次性事件,不应与 update 合并);
|
|
855
|
-
* - 连续 'update' 合并到同一组,组内 steps 顺序就是发生顺序。
|
|
856
|
-
*/
|
|
857
|
-
private static mergeCodeBlockSteps;
|
|
858
|
-
private static mergeDataSourceSteps;
|
|
859
|
-
/**
|
|
860
|
-
* 根据 old/new 是否为 null 推断 opType(与 push 时的约定一致)。
|
|
861
|
-
*/
|
|
862
|
-
private static detectOpType;
|
|
863
|
-
/**
|
|
864
|
-
* 把页面栈拆成若干 group:
|
|
865
|
-
* - 单节点的 'update' 按 targetId 与相邻同 targetId 的 update 合并到一个 group;
|
|
866
|
-
* - 'add' / 'remove' 始终独立成组(语义上是结构变更,不应被收纳进单节点修改组);
|
|
867
|
-
* - 多节点 'update'(如批量改属性)也独立成组(无明确单一目标,避免误合并)。
|
|
868
|
-
*/
|
|
869
|
-
private static mergePageSteps;
|
|
870
|
-
/**
|
|
871
|
-
* 解析 StepValue 中的"目标节点 id"用于合并:
|
|
872
|
-
* - 单节点 update:取唯一一项 updatedItems 的节点 id;
|
|
873
|
-
* - 其它情形(多节点 update / add / remove):返回 undefined,表示不参与合并。
|
|
874
|
-
*/
|
|
875
|
-
private static detectPageTargetId;
|
|
876
|
-
/** 解析 StepValue 中的目标节点可读名(用于 UI 展示)。 */
|
|
877
|
-
private static detectPageTargetName;
|
|
878
1014
|
state: {
|
|
879
1015
|
pageId?: Id | undefined;
|
|
880
1016
|
pageSteps: Record<Id, UndoRedo<StepValue>>;
|
|
@@ -888,6 +1024,27 @@ declare class History extends BaseService {
|
|
|
888
1024
|
resetPage(): void;
|
|
889
1025
|
changePage(page: MPage | MPageFragment): void;
|
|
890
1026
|
resetState(): void;
|
|
1027
|
+
/**
|
|
1028
|
+
* 为指定页面 / 页面片种入一条「初始基线」记录(如加载 DSL 时的「初始 / 加载」基线)。
|
|
1029
|
+
*
|
|
1030
|
+
* 该记录是一条 `opType: 'initial'` 的 {@link StepValue},作为页面历史栈 **index 0 的固定底线**:
|
|
1031
|
+
* - 它是一条真实入栈的 step(随栈一起持久化),但被钉为撤销/回滚的下限——cursor 永不低于它,
|
|
1032
|
+
* 因此不会被 undo / goto / revert 触达(详见 {@link undo} / {@link setCanUndoRedo});
|
|
1033
|
+
* - 历史面板把它过滤出分组列表(见 {@link getPageHistoryGroups}),改由底部「初始」行展示。
|
|
1034
|
+
*
|
|
1035
|
+
* 仅当目标页面栈为空时种入(保证 initial 一定位于 index 0);已存在 initial 底线时默认不重复种入,
|
|
1036
|
+
* 传 `force=true` 且栈为空时按新基线种入。
|
|
1037
|
+
*/
|
|
1038
|
+
setPageMarker(pageId: Id, options?: {
|
|
1039
|
+
name?: string;
|
|
1040
|
+
description?: string;
|
|
1041
|
+
source?: HistoryOpSource;
|
|
1042
|
+
}): StepValue | null;
|
|
1043
|
+
/**
|
|
1044
|
+
* 读取指定页面(缺省当前活动页)的初始基线 step(页面栈 index 0 且 `opType: 'initial'`);
|
|
1045
|
+
* 不存在时返回 undefined。
|
|
1046
|
+
*/
|
|
1047
|
+
getPageMarker(pageId?: Id): StepValue | undefined;
|
|
891
1048
|
/**
|
|
892
1049
|
* 把一条步骤推入指定页面的栈;不指定 pageId 时落到当前活动页。
|
|
893
1050
|
*
|
|
@@ -895,6 +1052,13 @@ declare class History extends BaseService {
|
|
|
895
1052
|
* 否则会把记录错误地落到操作发起页 / 当前激活页,破坏目标页 / 源页的撤销栈语义。
|
|
896
1053
|
*/
|
|
897
1054
|
push(state: StepValue, pageId?: Id): StepValue | null;
|
|
1055
|
+
/** 读取指定页面(缺省当前活动页)历史栈当前游标所在的 step(cursor - 1);无则返回 null。 */
|
|
1056
|
+
getCurrentPageStep(pageId?: Id): StepValue | null;
|
|
1057
|
+
/**
|
|
1058
|
+
* 用 `state` 替换指定页面栈当前游标所在的 step(并丢弃其后的重做尾部),游标不变。
|
|
1059
|
+
* 用于「连续 set root 记录合并」等就地替换最新一条的场景;替换成功后按需刷新 / 通知。
|
|
1060
|
+
*/
|
|
1061
|
+
replaceCurrentPageStep(state: StepValue, pageId?: Id): StepValue | null;
|
|
898
1062
|
/**
|
|
899
1063
|
* 推入一条代码块变更记录(与页面/节点完全无关),按 `codeBlockId` 维度独立一份 UndoRedo 栈。
|
|
900
1064
|
*
|
|
@@ -941,6 +1105,54 @@ declare class History extends BaseService {
|
|
|
941
1105
|
undo(): StepValue | null;
|
|
942
1106
|
redo(): StepValue | null;
|
|
943
1107
|
destroy(): void;
|
|
1108
|
+
/**
|
|
1109
|
+
* 清空指定页面(缺省当前活动页)的历史记录栈。
|
|
1110
|
+
* 仅删除撤销/重做记录,不会改动当前 DSL;清空后该页将无法再撤销/重做之前的操作。
|
|
1111
|
+
*/
|
|
1112
|
+
clearPage(pageId?: Id): void;
|
|
1113
|
+
/**
|
|
1114
|
+
* 清空数据源历史记录栈:传入 `dataSourceId` 仅清空该数据源,缺省清空全部数据源。
|
|
1115
|
+
* 仅删除撤销/重做记录,不会改动数据源本身。
|
|
1116
|
+
*/
|
|
1117
|
+
clearDataSource(dataSourceId?: Id): void;
|
|
1118
|
+
/**
|
|
1119
|
+
* 清空代码块历史记录栈:传入 `codeBlockId` 仅清空该代码块,缺省清空全部代码块。
|
|
1120
|
+
* 仅删除撤销/重做记录,不会改动代码块本身。
|
|
1121
|
+
*/
|
|
1122
|
+
clearCodeBlock(codeBlockId?: Id): void;
|
|
1123
|
+
/**
|
|
1124
|
+
* 标记「整份 DSL 已保存」:把页面 / 代码块 / 数据源所有栈当前游标所在的记录都标为 `saved`。
|
|
1125
|
+
* 适用于「整体落库」场景;若只保存了其中一类,请改用更细粒度的
|
|
1126
|
+
* {@link markPageSaved} / {@link markCodeBlockSaved} / {@link markDataSourceSaved}。
|
|
1127
|
+
*/
|
|
1128
|
+
markSaved(): void;
|
|
1129
|
+
/**
|
|
1130
|
+
* 标记指定页面(缺省为当前活动页)的历史栈当前记录为已保存。
|
|
1131
|
+
* 仅影响该页面自己的栈,不波及代码块 / 数据源 / 其它页面。
|
|
1132
|
+
*/
|
|
1133
|
+
markPageSaved(pageId?: Id): void;
|
|
1134
|
+
/** 标记指定代码块的历史栈当前记录为已保存,仅影响该代码块自己的栈。 */
|
|
1135
|
+
markCodeBlockSaved(codeBlockId: Id): void;
|
|
1136
|
+
/** 标记指定数据源的历史栈当前记录为已保存,仅影响该数据源自己的栈。 */
|
|
1137
|
+
markDataSourceSaved(dataSourceId: Id): void;
|
|
1138
|
+
/**
|
|
1139
|
+
* 把当前内存中的全部历史栈(页面 / 代码块 / 数据源)序列化后写入本地 IndexedDB。
|
|
1140
|
+
*
|
|
1141
|
+
* - 每个 UndoRedo 栈连同其游标、容量一并保存,恢复后可继续 undo/redo;
|
|
1142
|
+
* - `key` 用于区分不同活动页 / 项目(同一 store 下可保存多份快照),缺省为 `default`;
|
|
1143
|
+
* - 返回写入成功的快照对象,便于调用方记录 savedAt 等信息;
|
|
1144
|
+
* - 不支持 IndexedDB 的环境(如 SSR)会 reject。
|
|
1145
|
+
*/
|
|
1146
|
+
saveToIndexedDB(options?: HistoryPersistOptions): Promise<PersistedHistoryState>;
|
|
1147
|
+
/**
|
|
1148
|
+
* 从本地 IndexedDB 读取此前保存的历史快照并重建全部撤销/重做栈。
|
|
1149
|
+
*
|
|
1150
|
+
* - 读取到的每个栈都会经 {@link UndoRedo.fromSerialized} 还原(含游标),随后可直接 undo/redo;
|
|
1151
|
+
* - 会整体覆盖当前内存中的历史状态,并把活动页恢复为快照中的 pageId;
|
|
1152
|
+
* - 找不到对应记录时返回 null,且不改动当前状态;
|
|
1153
|
+
* - 不支持 IndexedDB 的环境(如 SSR)会 reject。
|
|
1154
|
+
*/
|
|
1155
|
+
restoreFromIndexedDB(options?: HistoryPersistOptions): Promise<PersistedHistoryState | null>;
|
|
944
1156
|
/**
|
|
945
1157
|
* 取出当前活动页的历史步骤平铺列表(包含已应用 + 已撤销)。
|
|
946
1158
|
* 列表按时间正序,最早一步在最前面。
|
|
@@ -955,11 +1167,8 @@ declare class History extends BaseService {
|
|
|
955
1167
|
*/
|
|
956
1168
|
getPageHistoryGroups(pageId?: Id): PageHistoryGroup[];
|
|
957
1169
|
/**
|
|
958
|
-
* 取出全部代码块的历史栈,按 codeBlockId
|
|
959
|
-
*
|
|
960
|
-
* - 这正是"代码块/数据源各自按 id 分栈"的天然表现,再叠加"连续修改同目标的相邻步骤合并展示"。
|
|
961
|
-
* - 合并后 group 暴露子步骤数组,UI 可展开查看每一步的 changeRecords。
|
|
962
|
-
* - applied 字段:组内最后一步是否处于已应用段。
|
|
1170
|
+
* 取出全部代码块的历史栈,按 codeBlockId 分桶展示。
|
|
1171
|
+
* 同一栈内每条操作记录独立成组,不做相邻 update 合并。
|
|
963
1172
|
*/
|
|
964
1173
|
getCodeBlockHistoryGroups(): CodeBlockHistoryGroup[];
|
|
965
1174
|
/**
|
|
@@ -988,7 +1197,28 @@ declare class History extends BaseService {
|
|
|
988
1197
|
applied: boolean;
|
|
989
1198
|
}[];
|
|
990
1199
|
/**
|
|
991
|
-
*
|
|
1200
|
+
* 按历史记录 uuid 在指定页面(默认当前活动页)的栈中查找其索引。
|
|
1201
|
+
* 找不到时返回 -1。供「按 uuid 回滚」等需要把 uuid 映射回 index 的场景使用。
|
|
1202
|
+
*/
|
|
1203
|
+
getPageStepIndexByUuid(uuid: string, pageId?: Id): number;
|
|
1204
|
+
/**
|
|
1205
|
+
* 按历史记录 uuid 在全部代码块栈中查找其所属 codeBlockId 与索引。
|
|
1206
|
+
* 找不到时返回 null。
|
|
1207
|
+
*/
|
|
1208
|
+
findCodeBlockStepLocationByUuid(uuid: string): {
|
|
1209
|
+
id: Id;
|
|
1210
|
+
index: number;
|
|
1211
|
+
} | null;
|
|
1212
|
+
/**
|
|
1213
|
+
* 按历史记录 uuid 在全部数据源栈中查找其所属 dataSourceId 与索引。
|
|
1214
|
+
* 找不到时返回 null。
|
|
1215
|
+
*/
|
|
1216
|
+
findDataSourceStepLocationByUuid(uuid: string): {
|
|
1217
|
+
id: Id;
|
|
1218
|
+
index: number;
|
|
1219
|
+
} | null;
|
|
1220
|
+
/**
|
|
1221
|
+
* 取出全部数据源的历史栈,按 dataSourceId 分桶展示。同上,每条操作独立成组。
|
|
992
1222
|
*/
|
|
993
1223
|
getDataSourceHistoryGroups(): DataSourceHistoryGroup[];
|
|
994
1224
|
/**
|
|
@@ -998,18 +1228,15 @@ declare class History extends BaseService {
|
|
|
998
1228
|
* 这样切到目标页时 Ctrl+Z 也能撤回该步骤。
|
|
999
1229
|
*/
|
|
1000
1230
|
private getUndoRedo;
|
|
1001
|
-
private setCanUndoRedo;
|
|
1002
|
-
/**
|
|
1003
|
-
* 按 id 获取(或创建)指定代码块的 UndoRedo 栈。
|
|
1004
|
-
*/
|
|
1005
|
-
private getCodeBlockUndoRedo;
|
|
1006
1231
|
/**
|
|
1007
|
-
*
|
|
1232
|
+
* 把基础 dbName 与当前 DSL(root app)的 id 拼成最终库名,实现不同应用历史隔离。
|
|
1233
|
+
* 取不到 app id(如尚未加载 DSL)时退回基础 dbName。
|
|
1008
1234
|
*/
|
|
1009
|
-
private
|
|
1235
|
+
private resolveDbName;
|
|
1236
|
+
private setCanUndoRedo;
|
|
1010
1237
|
}
|
|
1011
1238
|
type HistoryService = History;
|
|
1012
|
-
declare const _default$
|
|
1239
|
+
declare const _default$44: History;
|
|
1013
1240
|
//#endregion
|
|
1014
1241
|
//#region temp/packages/editor/src/services/keybinding.d.ts
|
|
1015
1242
|
declare class Keybinding extends BaseService {
|
|
@@ -1147,7 +1374,7 @@ declare class Props extends BaseService {
|
|
|
1147
1374
|
private setRelateId;
|
|
1148
1375
|
}
|
|
1149
1376
|
type PropsService = Props;
|
|
1150
|
-
declare const _default$
|
|
1377
|
+
declare const _default$46: Props;
|
|
1151
1378
|
//#endregion
|
|
1152
1379
|
//#region temp/packages/editor/src/services/stageOverlay.d.ts
|
|
1153
1380
|
declare const canUsePluginMethods$3: {
|
|
@@ -1174,7 +1401,7 @@ declare class StageOverlay extends BaseService {
|
|
|
1174
1401
|
private updateSelectStatus;
|
|
1175
1402
|
}
|
|
1176
1403
|
type StageOverlayService = StageOverlay;
|
|
1177
|
-
declare const _default$
|
|
1404
|
+
declare const _default$47: StageOverlay;
|
|
1178
1405
|
//#endregion
|
|
1179
1406
|
//#region temp/packages/editor/src/services/storage.d.ts
|
|
1180
1407
|
interface Options$1 {
|
|
@@ -1237,7 +1464,7 @@ declare class WebStorage extends BaseService {
|
|
|
1237
1464
|
private getValueAndProtocol;
|
|
1238
1465
|
}
|
|
1239
1466
|
type StorageService = WebStorage;
|
|
1240
|
-
declare const _default$
|
|
1467
|
+
declare const _default$48: WebStorage;
|
|
1241
1468
|
//#endregion
|
|
1242
1469
|
//#region temp/packages/editor/src/services/ui.d.ts
|
|
1243
1470
|
declare const canUsePluginMethods$1: {
|
|
@@ -1257,7 +1484,7 @@ declare class Ui extends BaseService {
|
|
|
1257
1484
|
private setStageRect;
|
|
1258
1485
|
}
|
|
1259
1486
|
type UiService = Ui;
|
|
1260
|
-
declare const _default$
|
|
1487
|
+
declare const _default$49: Ui;
|
|
1261
1488
|
//#endregion
|
|
1262
1489
|
//#region temp/packages/editor/src/type.d.ts
|
|
1263
1490
|
type EditorSlots = FrameworkSlots & WorkspaceSlots & SidebarSlots & PropsPanelSlots & {
|
|
@@ -1502,6 +1729,8 @@ interface UiState {
|
|
|
1502
1729
|
hideSlideBar: boolean;
|
|
1503
1730
|
/** 侧边栏面板配置 */
|
|
1504
1731
|
sideBarItems: SideComponent[];
|
|
1732
|
+
/** 当前激活的侧边栏面板 */
|
|
1733
|
+
sideBarActiveTabName: string;
|
|
1505
1734
|
navMenuRect: {
|
|
1506
1735
|
left: number;
|
|
1507
1736
|
top: number;
|
|
@@ -1519,6 +1748,7 @@ interface EditorNodeInfo {
|
|
|
1519
1748
|
node: MNode | null;
|
|
1520
1749
|
parent: MContainer | null;
|
|
1521
1750
|
page: MPage | MPageFragment | null;
|
|
1751
|
+
path: MNode[];
|
|
1522
1752
|
}
|
|
1523
1753
|
interface AddMNode {
|
|
1524
1754
|
type: string;
|
|
@@ -1569,6 +1799,9 @@ interface MenuButton {
|
|
|
1569
1799
|
items?: MenuButton[];
|
|
1570
1800
|
/** 唯一标识,用于高亮 */
|
|
1571
1801
|
id?: string | number;
|
|
1802
|
+
buttonProps?: {
|
|
1803
|
+
type?: string;
|
|
1804
|
+
};
|
|
1572
1805
|
}
|
|
1573
1806
|
interface MenuComponent {
|
|
1574
1807
|
type: 'component';
|
|
@@ -1783,7 +2016,13 @@ interface CodeParamStatement {
|
|
|
1783
2016
|
type?: string | TypeFunction<string>;
|
|
1784
2017
|
[key: string]: any;
|
|
1785
2018
|
}
|
|
1786
|
-
|
|
2019
|
+
/**
|
|
2020
|
+
* 历史记录操作类型:
|
|
2021
|
+
* - `add` / `remove` / `update`:普通可撤销/重做的节点变更;
|
|
2022
|
+
* - `initial`:页面「未修改的初始状态」基线(设置 root 时生成),作为页面栈 index 0 的固定底线 step。
|
|
2023
|
+
* 该 step 不可被撤销/回滚(cursor 不会低于它),仅用于历史面板底部的初始行展示。
|
|
2024
|
+
*/
|
|
2025
|
+
type HistoryOpType = 'add' | 'remove' | 'update' | 'initial';
|
|
1787
2026
|
/**
|
|
1788
2027
|
* 历史记录的「操作途径」——标记本次变更由哪条交互入口触发,仅用于历史面板展示 / 业务埋点,
|
|
1789
2028
|
* 不影响 undo/redo 行为。缺省(未传)时 UI 视为「未知」。
|
|
@@ -1804,42 +2043,57 @@ type HistoryOpType = 'add' | 'remove' | 'update';
|
|
|
1804
2043
|
*
|
|
1805
2044
|
* 通过 `(string & {})` 允许业务侧扩展自定义途径字符串,同时保留内置值的自动补全。
|
|
1806
2045
|
*/
|
|
1807
|
-
type HistoryOpSource = 'stage' | 'tree' | 'component-panel' | 'props' | 'code' | 'stage-contextmenu' | 'tree-contextmenu' | 'toolbar' | 'shortcut' | 'rollback' | 'api' | 'ai' | 'unknown' | (string & {});
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
2046
|
+
type HistoryOpSource = 'initial' | 'stage' | 'tree' | 'component-panel' | 'props' | 'code' | 'root-code' | 'stage-contextmenu' | 'tree-contextmenu' | 'toolbar' | 'shortcut' | 'rollback' | 'api' | 'ai' | 'sync' | 'unknown' | (string & {});
|
|
2047
|
+
/** *AndGetHistoryId 系列方法返回值:原操作结果 + 本次写入历史记录的 uuid 列表(未入栈时为 `[]`)。 */
|
|
2048
|
+
type DslOpWithHistoryIdsResult<T> = {
|
|
2049
|
+
result: T;
|
|
2050
|
+
historyIds: string[];
|
|
2051
|
+
};
|
|
2052
|
+
/**
|
|
2053
|
+
* 单条变更的 diff 描述,统一表达「页面节点 / 代码块 / 数据源」的变化内容,
|
|
2054
|
+
* 被 {@link StepValue} / {@link CodeBlockStepValue} / {@link DataSourceStepValue} 的 `diff` 复用。
|
|
2055
|
+
*
|
|
2056
|
+
* 按 `opType` 区分携带的字段:
|
|
2057
|
+
* - `add`:仅 `newSchema`(页面节点还带 `parentId` / `index`);
|
|
2058
|
+
* - `remove`:仅 `oldSchema`(页面节点还带 `parentId` / `index`);
|
|
2059
|
+
* - `update`:`oldSchema` + `newSchema`,并可带 `changeRecords` 做局部更新。
|
|
2060
|
+
*
|
|
2061
|
+
* 泛型 `T` 为变化内容的快照类型:页面节点为 `MNode`,代码块为 `CodeBlockContent`,数据源为 `DataSourceSchema`。
|
|
2062
|
+
*/
|
|
2063
|
+
interface StepDiffItem<T = unknown> {
|
|
2064
|
+
/** 变更后的内容快照。`opType` 为 `add` / `update` 时有,`remove` 时无。 */
|
|
2065
|
+
newSchema?: T;
|
|
2066
|
+
/** 变更前的内容快照。`opType` 为 `remove` / `update` 时有,`add` 时无。 */
|
|
2067
|
+
oldSchema?: T;
|
|
2068
|
+
/** 父节点 id。仅页面节点有(数据源 / 代码块没有父节点)。 */
|
|
1823
2069
|
parentId?: Id;
|
|
1824
|
-
/**
|
|
1825
|
-
|
|
1826
|
-
/** opType 'remove': 被删除的节点及其位置信息 */
|
|
1827
|
-
removedItems?: {
|
|
1828
|
-
node: MNode;
|
|
1829
|
-
parentId: Id;
|
|
1830
|
-
index: number;
|
|
1831
|
-
}[];
|
|
2070
|
+
/** 在父节点 items 数组中的索引。仅页面节点有(数据源 / 代码块无需排序)。 */
|
|
2071
|
+
index?: number;
|
|
1832
2072
|
/**
|
|
1833
|
-
* opType
|
|
1834
|
-
*
|
|
1835
|
-
* `changeRecords` 来自 form 端的 propPath/value 列表,撤销/重做时只对这些 propPath 做局部更新;
|
|
1836
|
-
* 缺省(未传 / 空数组)才退化为整节点替换。
|
|
2073
|
+
* form 端 propPath/value 变更列表,仅 `opType` 为 `update` 时有;
|
|
2074
|
+
* 撤销/重做时若有则按 propPath 局部更新,缺省才退化为整内容替换。
|
|
1837
2075
|
*/
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
2076
|
+
changeRecords?: ChangeRecord[];
|
|
2077
|
+
}
|
|
2078
|
+
/**
|
|
2079
|
+
* 历史记录条目公共字段,被 {@link StepValue} / {@link CodeBlockStepValue} / {@link DataSourceStepValue} 复用。
|
|
2080
|
+
*
|
|
2081
|
+
* 泛型 `T` 为 `diff` 中变化内容的快照类型(页面节点 `MNode` / 代码块 `CodeBlockContent` / 数据源 `DataSourceSchema`)。
|
|
2082
|
+
*/
|
|
2083
|
+
interface BaseStepValue<T = unknown> {
|
|
2084
|
+
/**
|
|
2085
|
+
* 历史记录唯一标识(uuid)。入栈时自动写入(若调用方未指定),
|
|
2086
|
+
* 用于精确定位 / 引用某一条历史记录(如 revert、埋点、跨端同步等)。
|
|
2087
|
+
* 注意与各自的 `id`(关联的页面 / 代码块 / 数据源 id)区分。
|
|
2088
|
+
*/
|
|
2089
|
+
uuid: string;
|
|
2090
|
+
/** 操作类型:新增 / 删除 / 更新(三类历史记录统一携带)。 */
|
|
2091
|
+
opType: HistoryOpType;
|
|
2092
|
+
/**
|
|
2093
|
+
* 本次变更的内容(统一 diff 表达),每项见 {@link StepDiffItem}。
|
|
2094
|
+
* 页面节点(add/remove 多节点、update 多节点)会有多项,代码块 / 数据源通常只有一项。
|
|
2095
|
+
*/
|
|
2096
|
+
diff: StepDiffItem<T>[];
|
|
1843
2097
|
/**
|
|
1844
2098
|
* 调用方可选传入的人类可读描述(如「调整按钮颜色」),用于历史面板展示。
|
|
1845
2099
|
* 不影响 undo/redo 行为;缺省时面板会根据节点 / propPath 自动生成描述。
|
|
@@ -1852,59 +2106,54 @@ interface StepValue {
|
|
|
1852
2106
|
*/
|
|
1853
2107
|
source?: HistoryOpSource;
|
|
1854
2108
|
/**
|
|
1855
|
-
*
|
|
2109
|
+
* 入栈时间戳(毫秒)。入栈时自动写入(若调用方未指定),仅用于历史面板展示。
|
|
1856
2110
|
*/
|
|
1857
2111
|
timestamp?: number;
|
|
2112
|
+
/**
|
|
2113
|
+
* 是否为「已保存」记录:DSL 落库(如保存到后端 / 本地)时由 historyService.markSaved 标记。
|
|
2114
|
+
* 同一栈内任意时刻最多只有一条记录为 true;从 IndexedDB 恢复时游标会被定位到最近一条已保存记录之后。
|
|
2115
|
+
*/
|
|
2116
|
+
saved?: boolean;
|
|
2117
|
+
/**
|
|
2118
|
+
* 是否为「整体设置 root」(set root)产生的记录(由 {@link Editor.pushRootDiffHistory} 写入)。
|
|
2119
|
+
* 用于「连续 set root 合并」:当某页栈最新一条已是 root 记录时,下一条 set root 会替换它而非新增,
|
|
2120
|
+
* 避免源码反复保存 / 外部重设 DSL 时堆积多条 root 记录。
|
|
2121
|
+
*/
|
|
2122
|
+
rootStep?: boolean;
|
|
2123
|
+
}
|
|
2124
|
+
interface StepValue extends BaseStepValue<MNode> {
|
|
2125
|
+
/** 页面信息 */
|
|
2126
|
+
data: {
|
|
2127
|
+
name: string;
|
|
2128
|
+
id: Id;
|
|
2129
|
+
};
|
|
2130
|
+
/** 操作前选中的节点 ID,用于撤销后恢复选择状态 */
|
|
2131
|
+
selectedBefore: Id[];
|
|
2132
|
+
/** 操作后选中的节点 ID,用于重做后恢复选择状态 */
|
|
2133
|
+
selectedAfter: Id[];
|
|
2134
|
+
modifiedNodeIds: Map<Id, Id>;
|
|
1858
2135
|
}
|
|
1859
2136
|
/**
|
|
1860
2137
|
* 代码块历史记录条目。按 codeBlock.id 分组保存到 historyState.codeBlockState。
|
|
1861
|
-
*
|
|
1862
|
-
* -
|
|
1863
|
-
* -
|
|
2138
|
+
* 变更内容统一由 `diff`(单项)表达,每项见 {@link StepDiffItem}:
|
|
2139
|
+
* - 新增(opType 'add'):仅 `newSchema`(新内容);
|
|
2140
|
+
* - 更新(opType 'update'):`oldSchema` + `newSchema`,并可带 `changeRecords` 做局部更新;
|
|
2141
|
+
* - 删除(opType 'remove'):仅 `oldSchema`(删除前内容)。
|
|
1864
2142
|
*/
|
|
1865
|
-
interface CodeBlockStepValue {
|
|
2143
|
+
interface CodeBlockStepValue extends BaseStepValue<CodeBlockContent> {
|
|
1866
2144
|
/** 关联的代码块 id */
|
|
1867
2145
|
id: Id;
|
|
1868
|
-
/** 变更前的代码块内容,新增时为 null */
|
|
1869
|
-
oldContent: CodeBlockContent | null;
|
|
1870
|
-
/** 变更后的代码块内容,删除时为 null */
|
|
1871
|
-
newContent: CodeBlockContent | null;
|
|
1872
|
-
/**
|
|
1873
|
-
* form 端 propPath/value 列表。撤销/重做时若有则按 propPath 局部更新;
|
|
1874
|
-
* 缺省才退化为整内容替换。新增/删除场景通常无 changeRecords。
|
|
1875
|
-
*/
|
|
1876
|
-
changeRecords?: ChangeRecord[];
|
|
1877
|
-
/** 调用方可选传入的人类可读描述,用于历史面板展示;不影响 undo/redo 行为。 */
|
|
1878
|
-
historyDescription?: string;
|
|
1879
|
-
/** 操作途径:标记本次变更由哪条交互入口触发,取值见 {@link HistoryOpSource};仅用于历史面板展示与埋点,不影响 undo/redo 行为。 */
|
|
1880
|
-
source?: HistoryOpSource;
|
|
1881
|
-
/** 入栈时间戳(毫秒),入栈时自动写入,仅用于历史面板展示。 */
|
|
1882
|
-
timestamp?: number;
|
|
1883
2146
|
}
|
|
1884
2147
|
/**
|
|
1885
2148
|
* 数据源历史记录条目。按 dataSource.id 分组保存到 historyState.dataSourceState。
|
|
1886
|
-
*
|
|
1887
|
-
* -
|
|
1888
|
-
* -
|
|
2149
|
+
* 变更内容统一由 `diff`(单项)表达,每项见 {@link StepDiffItem}:
|
|
2150
|
+
* - 新增(opType 'add'):仅 `newSchema`(新 schema);
|
|
2151
|
+
* - 更新(opType 'update'):`oldSchema` + `newSchema`,并可带 `changeRecords` 做局部更新;
|
|
2152
|
+
* - 删除(opType 'remove'):仅 `oldSchema`(删除前 schema)。
|
|
1889
2153
|
*/
|
|
1890
|
-
interface DataSourceStepValue {
|
|
2154
|
+
interface DataSourceStepValue extends BaseStepValue<DataSourceSchema> {
|
|
1891
2155
|
/** 关联的数据源 id */
|
|
1892
2156
|
id: Id;
|
|
1893
|
-
/** 变更前的数据源 schema,新增时为 null */
|
|
1894
|
-
oldSchema: DataSourceSchema | null;
|
|
1895
|
-
/** 变更后的数据源 schema,删除时为 null */
|
|
1896
|
-
newSchema: DataSourceSchema | null;
|
|
1897
|
-
/**
|
|
1898
|
-
* form 端 propPath/value 列表。撤销/重做时若有则按 propPath 局部更新;
|
|
1899
|
-
* 缺省才退化为整 schema 替换。新增/删除场景通常无 changeRecords。
|
|
1900
|
-
*/
|
|
1901
|
-
changeRecords?: ChangeRecord[];
|
|
1902
|
-
/** 调用方可选传入的人类可读描述,用于历史面板展示;不影响 undo/redo 行为。 */
|
|
1903
|
-
historyDescription?: string;
|
|
1904
|
-
/** 操作途径:标记本次变更由哪条交互入口触发,取值见 {@link HistoryOpSource};仅用于历史面板展示与埋点,不影响 undo/redo 行为。 */
|
|
1905
|
-
source?: HistoryOpSource;
|
|
1906
|
-
/** 入栈时间戳(毫秒),入栈时自动写入,仅用于历史面板展示。 */
|
|
1907
|
-
timestamp?: number;
|
|
1908
2157
|
}
|
|
1909
2158
|
interface HistoryState {
|
|
1910
2159
|
pageId?: Id;
|
|
@@ -1922,6 +2171,39 @@ interface HistoryState {
|
|
|
1922
2171
|
*/
|
|
1923
2172
|
dataSourceState: Record<Id, UndoRedo<DataSourceStepValue>>;
|
|
1924
2173
|
}
|
|
2174
|
+
/**
|
|
2175
|
+
* 历史记录的可持久化快照。由 historyService.saveToIndexedDB 写入 IndexedDB,
|
|
2176
|
+
* 再由 historyService.restoreFromIndexedDB 读出并重建各 UndoRedo 栈。
|
|
2177
|
+
*/
|
|
2178
|
+
interface PersistedHistoryState {
|
|
2179
|
+
/** 快照结构版本号,便于后续兼容升级。 */
|
|
2180
|
+
version: number;
|
|
2181
|
+
/** 保存时的活动页 id。 */
|
|
2182
|
+
pageId?: Id;
|
|
2183
|
+
/** 各页面历史栈的序列化快照,按 pageId 分组。 */
|
|
2184
|
+
pageSteps: Record<Id, SerializedUndoRedo<StepValue>>;
|
|
2185
|
+
/** 各代码块历史栈的序列化快照,按 codeBlockId 分组。 */
|
|
2186
|
+
codeBlockState: Record<Id, SerializedUndoRedo<CodeBlockStepValue>>;
|
|
2187
|
+
/** 各数据源历史栈的序列化快照,按 dataSourceId 分组。 */
|
|
2188
|
+
dataSourceState: Record<Id, SerializedUndoRedo<DataSourceStepValue>>;
|
|
2189
|
+
/** 保存时间戳(毫秒)。 */
|
|
2190
|
+
savedAt: number;
|
|
2191
|
+
}
|
|
2192
|
+
/** historyService 持久化相关 API 的可选配置。 */
|
|
2193
|
+
interface HistoryPersistOptions {
|
|
2194
|
+
/** IndexedDB 数据库名,默认 `tmagic-editor`(最终库名会拼上当前 DSL app id)。 */
|
|
2195
|
+
dbName?: string;
|
|
2196
|
+
/** objectStore 名,默认 `history`。 */
|
|
2197
|
+
storeName?: string;
|
|
2198
|
+
/** 记录 key,用于区分不同活动页 / 项目,默认 `default`。 */
|
|
2199
|
+
key?: IDBValidKey;
|
|
2200
|
+
/**
|
|
2201
|
+
* 显式指定用于库名隔离的 DSL app id。
|
|
2202
|
+
* 缺省时回退到当前 editorService 的 `root.id`;在「先恢复历史再 set root」场景下 root 尚未设置,
|
|
2203
|
+
* 需由调用方(如从待加载 DSL 取 id)显式传入,否则会读 / 写到未按 app 隔离的默认库。
|
|
2204
|
+
*/
|
|
2205
|
+
appId?: Id;
|
|
2206
|
+
}
|
|
1925
2207
|
/**
|
|
1926
2208
|
* 历史面板用:当前页面的一条历史步骤(包含位置和是否已应用)。
|
|
1927
2209
|
*/
|
|
@@ -2115,6 +2397,8 @@ type AsyncHookPlugin<T extends Array<string>, C extends Record<T[number], (...ar
|
|
|
2115
2397
|
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'>;
|
|
2116
2398
|
interface EventBusEvent {
|
|
2117
2399
|
'edit-data-source': [id: string];
|
|
2400
|
+
'edit-data-source-method': [id: string, methodName: string];
|
|
2401
|
+
'edit-data-source-field': [id: string, fieldPath: string[]];
|
|
2118
2402
|
'remove-data-source': [id: string];
|
|
2119
2403
|
'edit-code': [id: string];
|
|
2120
2404
|
}
|
|
@@ -2137,7 +2421,9 @@ interface PageBarSortOptions extends PartSortableOptions {
|
|
|
2137
2421
|
}
|
|
2138
2422
|
type CustomContentMenuFunction = (menus: (MenuButton | MenuComponent)[], type: 'layer' | 'data-source' | 'viewer' | 'code-block') => (MenuButton | MenuComponent)[];
|
|
2139
2423
|
interface EditorEvents {
|
|
2140
|
-
'root-change': [value: StoreState['root'], preValue?: StoreState['root']
|
|
2424
|
+
'root-change': [value: StoreState['root'], preValue?: StoreState['root'], options?: {
|
|
2425
|
+
historySource?: HistoryOpSource;
|
|
2426
|
+
}];
|
|
2141
2427
|
select: [node: MNode | null];
|
|
2142
2428
|
add: [nodes: MNode[]];
|
|
2143
2429
|
remove: [nodes: MNode[]];
|
|
@@ -2205,6 +2491,35 @@ interface DiffDialogPayload {
|
|
|
2205
2491
|
/** 用于标题展示的目标 id */
|
|
2206
2492
|
id?: string | number;
|
|
2207
2493
|
}
|
|
2494
|
+
/**
|
|
2495
|
+
* 一组「描述 + 可操作性」的判定函数集合。页面 / 数据源 / 代码块及业务自定义历史
|
|
2496
|
+
* 各自实现一份,作为整体注入,避免把 describe* / isStep* 拆成多个独立 props 反复透传。
|
|
2497
|
+
*/
|
|
2498
|
+
interface HistoryRowDescriptor<T extends BaseStepValue = BaseStepValue> {
|
|
2499
|
+
/** 组级描述文案生成器,接收一个 group,返回展示文本。 */
|
|
2500
|
+
describeGroup: (_group: any) => string;
|
|
2501
|
+
/** 单步描述文案生成器,接收一个 step,返回展示文本(合并组展开后的子步列表用)。 */
|
|
2502
|
+
describeStep: (_step: T) => string;
|
|
2503
|
+
/** 判断某个 step 是否可查看差异(前后值都存在)。不传则一律不展示差异入口。 */
|
|
2504
|
+
isStepDiffable?: (_step: T) => boolean;
|
|
2505
|
+
/** 判断某个 step 是否支持回滚(如更新需带 changeRecords)。不传则已应用即可回滚。 */
|
|
2506
|
+
isStepRevertable?: (_step: T) => boolean;
|
|
2507
|
+
}
|
|
2508
|
+
/**
|
|
2509
|
+
* 通用 bucket(数据源 / 代码块 / 业务自定义历史)的整体渲染配置。
|
|
2510
|
+
* 把原先散落在 Bucket / BucketTab 上的 title / prefix / describe* / isStep* / showInitial / gotoEnabled
|
|
2511
|
+
* 收敛成一个对象作为单一 prop 传递,调用方一次配齐、组件内部按需读取。
|
|
2512
|
+
*/
|
|
2513
|
+
interface HistoryBucketConfig<T extends BaseStepValue = BaseStepValue> extends HistoryRowDescriptor<T> {
|
|
2514
|
+
/** bucket 头部标题,例如 "数据源" / "代码块"。 */
|
|
2515
|
+
title: string;
|
|
2516
|
+
/** 子项 key 的命名空间前缀(`ds` 数据源 / `cb` 代码块 / 业务自定义如 `mod`)。 */
|
|
2517
|
+
prefix: string;
|
|
2518
|
+
/** 是否展示底部「回到初始状态」入口,默认 true。无 undo cursor 语义的自定义历史可传 false。 */
|
|
2519
|
+
showInitial?: boolean;
|
|
2520
|
+
/** 是否支持「跳转到该记录」(goto),默认 true。 */
|
|
2521
|
+
gotoEnabled?: boolean;
|
|
2522
|
+
}
|
|
2208
2523
|
//#endregion
|
|
2209
2524
|
//#region temp/packages/editor/src/hooks/use-code-block-edit.d.ts
|
|
2210
2525
|
declare const useCodeBlockEdit: (codeBlockService: Services["codeBlockService"]) => {
|
|
@@ -2228,8 +2543,8 @@ declare const useCodeBlockEdit: (codeBlockService: Services["codeBlockService"])
|
|
|
2228
2543
|
onClose?: (() => any) | undefined;
|
|
2229
2544
|
onSubmit?: ((values: CodeBlockContent, eventData: ContainerChangeEventData) => any) | undefined;
|
|
2230
2545
|
onOpen?: (() => any) | undefined;
|
|
2231
|
-
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
2232
2546
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
2547
|
+
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
2233
2548
|
}>, {
|
|
2234
2549
|
show(): Promise<void>;
|
|
2235
2550
|
hide(): Promise<void>;
|
|
@@ -2237,8 +2552,8 @@ declare const useCodeBlockEdit: (codeBlockService: Services["codeBlockService"])
|
|
|
2237
2552
|
close: () => any;
|
|
2238
2553
|
submit: (values: CodeBlockContent, eventData: ContainerChangeEventData) => any;
|
|
2239
2554
|
open: () => any;
|
|
2240
|
-
"update:width": (value: number) => any;
|
|
2241
2555
|
"update:visible": (value: boolean) => any;
|
|
2556
|
+
"update:width": (value: number) => any;
|
|
2242
2557
|
}, import("@vue/runtime-core").PublicProps, {}, false, {}, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, {}, any, import("@vue/runtime-core").ComponentProvideOptions, {
|
|
2243
2558
|
P: {};
|
|
2244
2559
|
B: {};
|
|
@@ -2260,8 +2575,8 @@ declare const useCodeBlockEdit: (codeBlockService: Services["codeBlockService"])
|
|
|
2260
2575
|
onClose?: (() => any) | undefined;
|
|
2261
2576
|
onSubmit?: ((values: CodeBlockContent, eventData: ContainerChangeEventData) => any) | undefined;
|
|
2262
2577
|
onOpen?: (() => any) | undefined;
|
|
2263
|
-
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
2264
2578
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
2579
|
+
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
2265
2580
|
}>, {
|
|
2266
2581
|
show(): Promise<void>;
|
|
2267
2582
|
hide(): Promise<void>;
|
|
@@ -2473,10 +2788,10 @@ declare const getRelativeStyle: (style?: Record<string, any>) => Record<string,
|
|
|
2473
2788
|
declare const getInitPositionStyle: (style: Record<string, any> | undefined, layout: Layout) => Record<string, any>;
|
|
2474
2789
|
declare const setChildrenLayout: (node: MContainer, layout: Layout) => MContainer;
|
|
2475
2790
|
declare const setLayout: (node: MNode, layout: Layout) => import("@tmagic/schema").MComponent | undefined;
|
|
2476
|
-
declare const change2Fixed: (node: MNode,
|
|
2791
|
+
declare const change2Fixed: (node: MNode, path: MNode[]) => {
|
|
2477
2792
|
[key: string]: any;
|
|
2478
2793
|
};
|
|
2479
|
-
declare const Fixed2Other: (node: MNode,
|
|
2794
|
+
declare const Fixed2Other: (node: MNode, path: MNode[], getLayout: (parent: MNode, node?: MNode) => Promise<Layout>) => Promise<Record<string, any>>;
|
|
2480
2795
|
declare const getGuideLineFromCache: (key: string) => number[];
|
|
2481
2796
|
declare const fixNodeLeft: (config: MNode, parent: MContainer, doc?: Document) => any;
|
|
2482
2797
|
declare const fixNodePosition: (config: MNode, parent: MContainer, stage: StageCore$1 | null) => import("@tmagic/schema").StyleSchema | undefined;
|
|
@@ -2504,7 +2819,7 @@ declare const resolveSelectedNode: (config: MNode | Id, getNodeInfoFn: (id: Id)
|
|
|
2504
2819
|
* @param getLayoutFn 获取父节点布局方式的回调函数
|
|
2505
2820
|
* @returns 处理后的节点配置(深拷贝)
|
|
2506
2821
|
*/
|
|
2507
|
-
declare const toggleFixedPosition: (dist: MNode, src: MNode,
|
|
2822
|
+
declare const toggleFixedPosition: (dist: MNode, src: MNode, path: MNode[], getLayoutFn: (parent: MNode, node?: MNode | null) => Promise<Layout>) => Promise<MNode>;
|
|
2508
2823
|
/**
|
|
2509
2824
|
* 根据键盘移动的偏移量计算节点的新样式
|
|
2510
2825
|
* 仅对 absolute 或 fixed 定位的节点生效;优先修改 top/left,若未设置则修改 bottom/right
|
|
@@ -2565,6 +2880,11 @@ interface DragClassification {
|
|
|
2565
2880
|
* @returns 分类结果,包含同容器索引列表和跨容器节点列表
|
|
2566
2881
|
*/
|
|
2567
2882
|
declare const classifyDragSources: (configs: MNode[], targetParent: MContainer, getNodeInfo: (id: Id, raw?: boolean) => EditorNodeInfo) => DragClassification;
|
|
2883
|
+
/**
|
|
2884
|
+
* 给「回滚」生成的新 step 用的简短描述生成器。
|
|
2885
|
+
* 与 UI 层 `describePageStep` 同义,但避免 service 反向依赖 layouts/,故放在此工具函数中。
|
|
2886
|
+
*/
|
|
2887
|
+
declare const describeStepForRevert: (step: StepValue) => string;
|
|
2568
2888
|
//#endregion
|
|
2569
2889
|
//#region temp/packages/editor/src/utils/operator.d.ts
|
|
2570
2890
|
/**
|
|
@@ -2664,6 +2984,133 @@ declare const updateStatus: (nodeStatusMap: Map<Id, LayerNodeStatus>, id: Id, st
|
|
|
2664
2984
|
/** 默认的组件树节点是否可展开的判断函数:当节点的子项中至少存在一个可见节点时认为可展开 */
|
|
2665
2985
|
declare const defaultIsExpandable: IsExpandableFunction;
|
|
2666
2986
|
//#endregion
|
|
2987
|
+
//#region temp/packages/editor/src/utils/indexed-db.d.ts
|
|
2988
|
+
/**
|
|
2989
|
+
* 一组极简的、基于原生 IndexedDB 的 Promise KV 工具,避免引入额外依赖。
|
|
2990
|
+
* 仅用于浏览器环境;在不支持 IndexedDB 的环境(如 SSR / 部分测试环境)下会 reject。
|
|
2991
|
+
*/
|
|
2992
|
+
/** 是否处于支持 IndexedDB 的环境。 */
|
|
2993
|
+
declare const isIndexedDBSupported: () => boolean;
|
|
2994
|
+
/**
|
|
2995
|
+
* 打开(必要时升级)数据库,确保目标 objectStore 存在后返回连接。
|
|
2996
|
+
*
|
|
2997
|
+
* 由于 objectStore 只能在 `onupgradeneeded` 内创建,这里先以当前版本打开,
|
|
2998
|
+
* 若发现 store 不存在则关闭连接、以更高版本重开来按需创建,兼容动态 storeName。
|
|
2999
|
+
*/
|
|
3000
|
+
declare const openIndexedDB: (dbName: string, storeName: string) => Promise<IDBDatabase>;
|
|
3001
|
+
/** 写入(覆盖)一条记录。value 通过结构化克隆存储,支持 Map / Set 等结构。 */
|
|
3002
|
+
declare const idbSet: (dbName: string, storeName: string, key: IDBValidKey, value: unknown) => Promise<void>;
|
|
3003
|
+
/** 读取一条记录,不存在时返回 undefined。 */
|
|
3004
|
+
declare const idbGet: <T = unknown>(dbName: string, storeName: string, key: IDBValidKey) => Promise<T | undefined>;
|
|
3005
|
+
/** 删除一条记录。 */
|
|
3006
|
+
declare const idbDelete: (dbName: string, storeName: string, key: IDBValidKey) => Promise<void>;
|
|
3007
|
+
//#endregion
|
|
3008
|
+
//#region temp/packages/editor/src/utils/history.d.ts
|
|
3009
|
+
/**
|
|
3010
|
+
* 「回滚」生成的新 step 简短描述。代码块 / 数据源共用。
|
|
3011
|
+
* 二者逻辑一致,仅展示名取值字段不同(代码块取 `name`,数据源取 `title`),
|
|
3012
|
+
* 因此通过 `getLabel` 注入取值方式。
|
|
3013
|
+
*
|
|
3014
|
+
* @param id 关联的代码块 / 数据源 id
|
|
3015
|
+
* @param diff 单条变更 diff(缺省视为空)
|
|
3016
|
+
* @param getLabel 从快照取展示名
|
|
3017
|
+
*/
|
|
3018
|
+
declare const describeRevertStep: <T extends object>(id: Id, {
|
|
3019
|
+
oldSchema,
|
|
3020
|
+
newSchema,
|
|
3021
|
+
changeRecords
|
|
3022
|
+
}: StepDiffItem<T> | undefined, getLabel: (schema: T) => string | undefined) => string;
|
|
3023
|
+
/**
|
|
3024
|
+
* 根据 old/new 是否为 null 推断 opType(与 push 时的约定一致)。
|
|
3025
|
+
*/
|
|
3026
|
+
declare const detectStackOpType: (oldVal: unknown, newVal: unknown) => "add" | "remove" | "update";
|
|
3027
|
+
/**
|
|
3028
|
+
* 构造一条代码块 / 数据源「按 id 分栈」的历史记录:两者除 payload 字段命名外完全一致。
|
|
3029
|
+
*
|
|
3030
|
+
* - `add`:oldValue = null;`remove`:newValue = null;`update`:两者都有,可带 changeRecords 做局部更新。
|
|
3031
|
+
* - 内容会做 cloneDeep 防止后续被外部引用篡改;opType 依据 old/new 是否为 null 推断。
|
|
3032
|
+
* - 仅负责构造 step 并返回,入栈与事件 emit 由各公共方法(pushCodeBlock / pushDataSource)自行处理。
|
|
3033
|
+
* - 不直接驱动业务 service,调用方负责实际写回。
|
|
3034
|
+
*/
|
|
3035
|
+
declare const createStackStep: <T, S extends BaseStepValue<T> & {
|
|
3036
|
+
id: Id;
|
|
3037
|
+
}>(id: Id, payload: {
|
|
3038
|
+
oldValue: T | null;
|
|
3039
|
+
newValue: T | null;
|
|
3040
|
+
changeRecords?: ChangeRecord[];
|
|
3041
|
+
historyDescription?: string;
|
|
3042
|
+
source?: HistoryOpSource;
|
|
3043
|
+
}) => S | null;
|
|
3044
|
+
declare const markStackSaved: <S extends {
|
|
3045
|
+
saved?: boolean;
|
|
3046
|
+
}>(undoRedo?: UndoRedo<S>) => void;
|
|
3047
|
+
/**
|
|
3048
|
+
* 把单个「按 id 分栈」的历史栈(代码块 / 数据源)拆成若干 group:
|
|
3049
|
+
* 每条操作记录独立成组,不做相邻 update 合并(与页面历史的合并策略不同)。
|
|
3050
|
+
*
|
|
3051
|
+
* 代码块与数据源除 `kind` 外结构完全一致,统一由本方法处理;`kind` 决定返回的具体分组类型。
|
|
3052
|
+
*/
|
|
3053
|
+
declare const mergeStackSteps: <S extends BaseStepValue, K extends "code-block" | "data-source">(kind: K, id: Id, list: S[], cursor: number) => {
|
|
3054
|
+
kind: K;
|
|
3055
|
+
id: Id;
|
|
3056
|
+
opType: HistoryOpType;
|
|
3057
|
+
steps: {
|
|
3058
|
+
step: S;
|
|
3059
|
+
index: number;
|
|
3060
|
+
applied: boolean;
|
|
3061
|
+
isCurrent?: boolean;
|
|
3062
|
+
}[];
|
|
3063
|
+
applied: boolean;
|
|
3064
|
+
isCurrent?: boolean;
|
|
3065
|
+
}[];
|
|
3066
|
+
/**
|
|
3067
|
+
* 把页面栈拆成若干 group:
|
|
3068
|
+
* - 单节点的 'update' 按 targetId 与相邻同 targetId 的 update 合并到一个 group;
|
|
3069
|
+
* - 'add' / 'remove' 始终独立成组(语义上是结构变更,不应被收纳进单节点修改组);
|
|
3070
|
+
* - 多节点 'update'(如批量改属性)也独立成组(无明确单一目标,避免误合并)。
|
|
3071
|
+
*/
|
|
3072
|
+
declare const mergePageSteps: (pageId: Id, list: StepValue[], cursor: number) => PageHistoryGroup[];
|
|
3073
|
+
/**
|
|
3074
|
+
* 解析 StepValue 中的"目标节点 id"用于合并:
|
|
3075
|
+
* - 单节点 update:取唯一一项 updatedItems 的节点 id;
|
|
3076
|
+
* - 其它情形(多节点 update / add / remove):返回 undefined,表示不参与合并。
|
|
3077
|
+
*/
|
|
3078
|
+
declare const detectPageTargetId: (step: StepValue) => Id | undefined;
|
|
3079
|
+
/** 解析 StepValue 中的目标节点可读名(用于 UI 展示)。 */
|
|
3080
|
+
declare const detectPageTargetName: (step: StepValue) => string | undefined;
|
|
3081
|
+
/**
|
|
3082
|
+
* 把 `Record<Id, UndoRedo>` 整体序列化为 `Record<Id, SerializedUndoRedo>`。
|
|
3083
|
+
*
|
|
3084
|
+
* 序列化(深克隆)的同一趟里,只把每条 step 中可能含函数的 `diff` 用 serialize-javascript 序列化成字符串,
|
|
3085
|
+
* 其余字段(uuid / opType / timestamp / `modifiedNodeIds` Map 等)原样保留,交给 IndexedDB 结构化克隆。
|
|
3086
|
+
* 这样既能写入函数,又避免序列化整份快照的开销;读取时再由 {@link parseStacksStepDiff} 还原 diff。
|
|
3087
|
+
* 不含 `diff` 的元素(如通用栈)原样透传。
|
|
3088
|
+
*/
|
|
3089
|
+
declare const serializeStacks: <T extends {
|
|
3090
|
+
diff?: unknown;
|
|
3091
|
+
}>(stacks: Record<Id, UndoRedo<T>>) => Record<Id, SerializedUndoRedo<T>>;
|
|
3092
|
+
/**
|
|
3093
|
+
* 把 `Record<Id, SerializedUndoRedo>` 整体还原为 `Record<Id, UndoRedo>`。
|
|
3094
|
+
* 还原时把每个栈的游标定位到最近一条已保存(`saved === true`)记录之后。
|
|
3095
|
+
*
|
|
3096
|
+
* 与 {@link serializeStacks} 相反:当传入 `parse`(parseDSL)时,把每条 step 中以字符串形式存储的 `diff`
|
|
3097
|
+
* 解析回真实对象(含函数);不含 `diff` 的元素(如通用栈)原样透传。
|
|
3098
|
+
*/
|
|
3099
|
+
declare const deserializeStacks: <T extends {
|
|
3100
|
+
saved?: boolean;
|
|
3101
|
+
}>(stacks?: Record<Id, ReturnType<UndoRedo<T>["serialize"]>>, parse?: (serialized: string) => unknown) => Record<Id, UndoRedo<T>>;
|
|
3102
|
+
/**
|
|
3103
|
+
* 按 id 从「按 id 分栈」的记录表(代码块 / 数据源)中获取(或创建)对应的 UndoRedo 栈。
|
|
3104
|
+
*/
|
|
3105
|
+
declare const getOrCreateStack: <T>(stacks: Record<Id, UndoRedo<T>>, id: Id) => UndoRedo<T>;
|
|
3106
|
+
/**
|
|
3107
|
+
* 撤销下限:当页面栈 index 0 是 `opType: 'initial'` 的基线 step 时为 1(基线不可被撤销),否则为 0。
|
|
3108
|
+
* 用于把 cursor 钉在基线之上,保证 undo / canUndo / goto 都不会越过初始基线。
|
|
3109
|
+
*/
|
|
3110
|
+
declare const undoFloor: (undoRedo: UndoRedo<StepValue>) => number;
|
|
3111
|
+
/** 将单次 push 产生的 history uuid(或 null)转为 *AndGetHistoryId 返回用的 uuid 列表。 */
|
|
3112
|
+
declare const getLastPushedHistoryIds: (historyId: string | null) => string[];
|
|
3113
|
+
//#endregion
|
|
2667
3114
|
//#region temp/packages/editor/src/utils/const.d.ts
|
|
2668
3115
|
/** 当uiService.get('uiSelectMode')为true,点击组件(包括任何形式,组件树/画布)时触发的事件名 */
|
|
2669
3116
|
declare const UI_SELECT_MODE_EVENT_NAME = "ui-select";
|
|
@@ -2679,7 +3126,7 @@ declare const H_GUIDE_LINE_STORAGE_KEY = "$MagicStageHorizontalGuidelinesData";
|
|
|
2679
3126
|
declare const V_GUIDE_LINE_STORAGE_KEY = "$MagicStageVerticalGuidelinesData";
|
|
2680
3127
|
//#endregion
|
|
2681
3128
|
//#region temp/packages/editor/src/utils/monaco-editor.d.ts
|
|
2682
|
-
declare const _default$
|
|
3129
|
+
declare const _default$45: () => Promise<typeof import("monaco-editor")>;
|
|
2683
3130
|
//#endregion
|
|
2684
3131
|
//#region temp/packages/form/src/schema.d.ts
|
|
2685
3132
|
interface ChangeRecord$1 {
|
|
@@ -3743,6 +4190,7 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3743
4190
|
disabledCodeBlock: boolean;
|
|
3744
4191
|
disabledMultiSelect: boolean;
|
|
3745
4192
|
alwaysMultiSelect: boolean;
|
|
4193
|
+
disabledFlashTip: boolean;
|
|
3746
4194
|
disabledPageFragment: boolean;
|
|
3747
4195
|
historyListExtraTabs: HistoryListExtraTab[];
|
|
3748
4196
|
disabledShowSrc: boolean;
|
|
@@ -3764,11 +4212,10 @@ declare const __VLS_base$12: import("@vue/runtime-core").DefineComponent<EditorP
|
|
|
3764
4212
|
datasourceConfigs: Record<string, import("@tmagic/form-schema").FormConfig>;
|
|
3765
4213
|
containerHighlightDuration: number;
|
|
3766
4214
|
containerHighlightType: import("@tmagic/stage").ContainerHighlightType;
|
|
3767
|
-
disabledFlashTip: boolean;
|
|
3768
4215
|
canSelect: (el: HTMLElement) => boolean | Promise<boolean>;
|
|
3769
4216
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3770
|
-
declare const __VLS_export$
|
|
3771
|
-
declare const _default$
|
|
4217
|
+
declare const __VLS_export$37: __VLS_WithSlots$12<typeof __VLS_base$12, __VLS_Slots$12>;
|
|
4218
|
+
declare const _default$34: typeof __VLS_export$37;
|
|
3772
4219
|
type __VLS_WithSlots$12<T, S> = T & {
|
|
3773
4220
|
new (): {
|
|
3774
4221
|
$slots: S;
|
|
@@ -3776,7 +4223,7 @@ type __VLS_WithSlots$12<T, S> = T & {
|
|
|
3776
4223
|
};
|
|
3777
4224
|
//#endregion
|
|
3778
4225
|
//#region temp/packages/editor/src/layouts/CodeEditor.vue.d.ts
|
|
3779
|
-
type __VLS_Props$
|
|
4226
|
+
type __VLS_Props$32 = {
|
|
3780
4227
|
initValues?: any;
|
|
3781
4228
|
modifiedValues?: any;
|
|
3782
4229
|
type?: 'diff';
|
|
@@ -3792,7 +4239,7 @@ type __VLS_Props$33 = {
|
|
|
3792
4239
|
};
|
|
3793
4240
|
editorCustomType?: string;
|
|
3794
4241
|
};
|
|
3795
|
-
declare const __VLS_export$
|
|
4242
|
+
declare const __VLS_export$36: import("@vue/runtime-core").DefineComponent<__VLS_Props$32, {
|
|
3796
4243
|
values: import("@vue/reactivity").Ref<string, string>;
|
|
3797
4244
|
getEditor(): Monaco.editor.IStandaloneCodeEditor | Monaco.editor.IStandaloneDiffEditor | null;
|
|
3798
4245
|
getVsEditor(): Monaco.editor.IStandaloneCodeEditor | null;
|
|
@@ -3803,7 +4250,7 @@ declare const __VLS_export$35: import("@vue/runtime-core").DefineComponent<__VLS
|
|
|
3803
4250
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3804
4251
|
save: (...args: any[]) => void;
|
|
3805
4252
|
initd: (...args: any[]) => void;
|
|
3806
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4253
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$32> & Readonly<{
|
|
3807
4254
|
onSave?: ((...args: any[]) => any) | undefined;
|
|
3808
4255
|
onInitd?: ((...args: any[]) => any) | undefined;
|
|
3809
4256
|
}>, {
|
|
@@ -3814,13 +4261,13 @@ declare const __VLS_export$35: import("@vue/runtime-core").DefineComponent<__VLS
|
|
|
3814
4261
|
autoSave: boolean;
|
|
3815
4262
|
disabledFullScreen: boolean;
|
|
3816
4263
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3817
|
-
declare const _default$
|
|
4264
|
+
declare const _default$33: typeof __VLS_export$36;
|
|
3818
4265
|
//#endregion
|
|
3819
4266
|
//#region temp/packages/editor/src/layouts/sidebar/ComponentListPanel.vue.d.ts
|
|
3820
4267
|
type __VLS_Slots$11 = ComponentListPanelSlots;
|
|
3821
4268
|
declare const __VLS_base$11: import("@vue/runtime-core").DefineComponent<{}, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
3822
|
-
declare const __VLS_export$
|
|
3823
|
-
declare const _default$6: typeof __VLS_export$
|
|
4269
|
+
declare const __VLS_export$35: __VLS_WithSlots$11<typeof __VLS_base$11, __VLS_Slots$11>;
|
|
4270
|
+
declare const _default$6: typeof __VLS_export$35;
|
|
3824
4271
|
type __VLS_WithSlots$11<T, S> = T & {
|
|
3825
4272
|
new (): {
|
|
3826
4273
|
$slots: S;
|
|
@@ -3829,7 +4276,7 @@ type __VLS_WithSlots$11<T, S> = T & {
|
|
|
3829
4276
|
//#endregion
|
|
3830
4277
|
//#region temp/packages/editor/src/layouts/sidebar/layer/LayerPanel.vue.d.ts
|
|
3831
4278
|
type __VLS_Slots$10 = LayerPanelSlots;
|
|
3832
|
-
type __VLS_Props$
|
|
4279
|
+
type __VLS_Props$31 = {
|
|
3833
4280
|
layerContentMenu: (MenuButton | MenuComponent)[];
|
|
3834
4281
|
indent?: number;
|
|
3835
4282
|
nextLevelIndentIncrement?: number;
|
|
@@ -3838,13 +4285,13 @@ type __VLS_Props$32 = {
|
|
|
3838
4285
|
canDropIn?: CanDropInFunction; /** 组件树节点双击前的钩子函数,返回 false 则阻止默认的双击行为 */
|
|
3839
4286
|
beforeNodeDblclick?: (_event: MouseEvent, _data: TreeNodeData) => Promise<boolean | void> | boolean | void;
|
|
3840
4287
|
};
|
|
3841
|
-
declare const __VLS_base$10: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
4288
|
+
declare const __VLS_base$10: import("@vue/runtime-core").DefineComponent<__VLS_Props$31, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3842
4289
|
"node-dblclick": (event: MouseEvent, data: TreeNodeData) => any;
|
|
3843
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4290
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$31> & Readonly<{
|
|
3844
4291
|
"onNode-dblclick"?: ((event: MouseEvent, data: TreeNodeData) => any) | undefined;
|
|
3845
4292
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3846
|
-
declare const __VLS_export$
|
|
3847
|
-
declare const _default$
|
|
4293
|
+
declare const __VLS_export$34: __VLS_WithSlots$10<typeof __VLS_base$10, __VLS_Slots$10>;
|
|
4294
|
+
declare const _default$26: typeof __VLS_export$34;
|
|
3848
4295
|
type __VLS_WithSlots$10<T, S> = T & {
|
|
3849
4296
|
new (): {
|
|
3850
4297
|
$slots: S;
|
|
@@ -3852,151 +4299,151 @@ type __VLS_WithSlots$10<T, S> = T & {
|
|
|
3852
4299
|
};
|
|
3853
4300
|
//#endregion
|
|
3854
4301
|
//#region temp/packages/editor/src/fields/CodeSelect.vue.d.ts
|
|
3855
|
-
type __VLS_Props$
|
|
3856
|
-
declare const __VLS_export$
|
|
4302
|
+
type __VLS_Props$30 = FieldProps<CodeSelectConfig>;
|
|
4303
|
+
declare const __VLS_export$33: import("@vue/runtime-core").DefineComponent<__VLS_Props$30, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3857
4304
|
change: (v: any, eventData: ContainerChangeEventData) => any;
|
|
3858
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4305
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$30> & Readonly<{
|
|
3859
4306
|
onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
|
|
3860
4307
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3861
|
-
declare const _default$3: typeof __VLS_export$
|
|
4308
|
+
declare const _default$3: typeof __VLS_export$33;
|
|
3862
4309
|
//#endregion
|
|
3863
4310
|
//#region temp/packages/editor/src/fields/CodeSelectCol.vue.d.ts
|
|
3864
|
-
type __VLS_Props$
|
|
3865
|
-
declare const __VLS_export$
|
|
4311
|
+
type __VLS_Props$29 = FieldProps<CodeSelectColConfig>;
|
|
4312
|
+
declare const __VLS_export$32: import("@vue/runtime-core").DefineComponent<__VLS_Props$29, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3866
4313
|
change: (v: any, eventData: ContainerChangeEventData) => any;
|
|
3867
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4314
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$29> & Readonly<{
|
|
3868
4315
|
onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
|
|
3869
4316
|
}>, {
|
|
3870
4317
|
disabled: boolean;
|
|
3871
4318
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3872
|
-
declare const _default$4: typeof __VLS_export$
|
|
4319
|
+
declare const _default$4: typeof __VLS_export$32;
|
|
3873
4320
|
//#endregion
|
|
3874
4321
|
//#region temp/packages/editor/src/fields/DataSourceFields.vue.d.ts
|
|
3875
|
-
type __VLS_Props$
|
|
4322
|
+
type __VLS_Props$28 = FieldProps<DataSourceFieldsConfig>;
|
|
3876
4323
|
type __VLS_ModelProps$4 = {
|
|
3877
4324
|
'width'?: number;
|
|
3878
4325
|
'visible'?: boolean;
|
|
3879
4326
|
'visible1'?: boolean;
|
|
3880
4327
|
};
|
|
3881
|
-
type __VLS_PublicProps$4 = __VLS_Props$
|
|
3882
|
-
declare const __VLS_export$
|
|
4328
|
+
type __VLS_PublicProps$4 = __VLS_Props$28 & __VLS_ModelProps$4;
|
|
4329
|
+
declare const __VLS_export$31: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$4, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3883
4330
|
change: (v: any, eventData?: ContainerChangeEventData | undefined) => any;
|
|
3884
|
-
"update:width": (value: number) => any;
|
|
3885
4331
|
"update:visible": (value: boolean) => any;
|
|
4332
|
+
"update:width": (value: number) => any;
|
|
3886
4333
|
"update:visible1": (value: boolean) => any;
|
|
3887
4334
|
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_PublicProps$4> & Readonly<{
|
|
3888
4335
|
onChange?: ((v: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
3889
|
-
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
3890
4336
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
4337
|
+
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
3891
4338
|
"onUpdate:visible1"?: ((value: boolean) => any) | undefined;
|
|
3892
4339
|
}>, {
|
|
3893
4340
|
disabled: boolean;
|
|
3894
4341
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3895
|
-
declare const _default$12: typeof __VLS_export$
|
|
4342
|
+
declare const _default$12: typeof __VLS_export$31;
|
|
3896
4343
|
//#endregion
|
|
3897
4344
|
//#region temp/packages/editor/src/fields/DataSourceMocks.vue.d.ts
|
|
3898
|
-
type __VLS_Props$
|
|
4345
|
+
type __VLS_Props$27 = FieldProps<DataSourceMocksConfig>;
|
|
3899
4346
|
type __VLS_ModelProps$3 = {
|
|
3900
4347
|
'width'?: number;
|
|
3901
4348
|
'visible'?: boolean;
|
|
3902
4349
|
};
|
|
3903
|
-
type __VLS_PublicProps$3 = __VLS_Props$
|
|
3904
|
-
declare const __VLS_export$
|
|
4350
|
+
type __VLS_PublicProps$3 = __VLS_Props$27 & __VLS_ModelProps$3;
|
|
4351
|
+
declare const __VLS_export$30: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$3, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3905
4352
|
change: (...args: any[]) => void;
|
|
3906
|
-
"update:width": (value: number) => void;
|
|
3907
4353
|
"update:visible": (value: boolean) => void;
|
|
4354
|
+
"update:width": (value: number) => void;
|
|
3908
4355
|
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_PublicProps$3> & Readonly<{
|
|
3909
4356
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
3910
|
-
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
3911
4357
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
4358
|
+
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
3912
4359
|
}>, {
|
|
3913
4360
|
disabled: boolean;
|
|
3914
4361
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3915
|
-
declare const _default$16: typeof __VLS_export$
|
|
4362
|
+
declare const _default$16: typeof __VLS_export$30;
|
|
3916
4363
|
//#endregion
|
|
3917
4364
|
//#region temp/packages/editor/src/fields/DataSourceMethods.vue.d.ts
|
|
3918
|
-
type __VLS_Props$
|
|
3919
|
-
declare const __VLS_export$
|
|
4365
|
+
type __VLS_Props$26 = FieldProps<DataSourceMethodsConfig>;
|
|
4366
|
+
declare const __VLS_export$29: import("@vue/runtime-core").DefineComponent<__VLS_Props$26, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3920
4367
|
change: (...args: any[]) => void;
|
|
3921
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4368
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$26> & Readonly<{
|
|
3922
4369
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
3923
4370
|
}>, {
|
|
3924
4371
|
disabled: boolean;
|
|
3925
4372
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3926
|
-
declare const _default$15: typeof __VLS_export$
|
|
4373
|
+
declare const _default$15: typeof __VLS_export$29;
|
|
3927
4374
|
//#endregion
|
|
3928
4375
|
//#region temp/packages/editor/src/fields/DataSourceInput.vue.d.ts
|
|
3929
|
-
type __VLS_Props$
|
|
3930
|
-
declare const __VLS_export$
|
|
4376
|
+
type __VLS_Props$25 = FieldProps<DataSourceInputConfig>;
|
|
4377
|
+
declare const __VLS_export$28: import("@vue/runtime-core").DefineComponent<__VLS_Props$25, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3931
4378
|
change: (value: string) => any;
|
|
3932
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4379
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$25> & Readonly<{
|
|
3933
4380
|
onChange?: ((value: string) => any) | undefined;
|
|
3934
4381
|
}>, {
|
|
3935
4382
|
disabled: boolean;
|
|
3936
4383
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3937
|
-
declare const _default$13: typeof __VLS_export$
|
|
4384
|
+
declare const _default$13: typeof __VLS_export$28;
|
|
3938
4385
|
//#endregion
|
|
3939
4386
|
//#region temp/packages/editor/src/fields/DataSourceSelect.vue.d.ts
|
|
3940
|
-
type __VLS_Props$
|
|
3941
|
-
declare const __VLS_export$
|
|
4387
|
+
type __VLS_Props$24 = FieldProps<DataSourceSelect>;
|
|
4388
|
+
declare const __VLS_export$27: import("@vue/runtime-core").DefineComponent<__VLS_Props$24, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3942
4389
|
change: (...args: any[]) => void;
|
|
3943
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4390
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$24> & Readonly<{
|
|
3944
4391
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
3945
4392
|
}>, {
|
|
3946
4393
|
disabled: boolean;
|
|
3947
4394
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3948
|
-
declare const _default$17: typeof __VLS_export$
|
|
4395
|
+
declare const _default$17: typeof __VLS_export$27;
|
|
3949
4396
|
//#endregion
|
|
3950
4397
|
//#region temp/packages/editor/src/fields/DataSourceMethodSelect.vue.d.ts
|
|
3951
|
-
type __VLS_Props$
|
|
3952
|
-
declare const __VLS_export$
|
|
4398
|
+
type __VLS_Props$23 = FieldProps<DataSourceMethodSelectConfig>;
|
|
4399
|
+
declare const __VLS_export$26: import("@vue/runtime-core").DefineComponent<__VLS_Props$23, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3953
4400
|
change: (...args: any[]) => void;
|
|
3954
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4401
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$23> & Readonly<{
|
|
3955
4402
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
3956
4403
|
}>, {
|
|
3957
4404
|
disabled: boolean;
|
|
3958
4405
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3959
|
-
declare const _default$14: typeof __VLS_export$
|
|
4406
|
+
declare const _default$14: typeof __VLS_export$26;
|
|
3960
4407
|
//#endregion
|
|
3961
4408
|
//#region temp/packages/editor/src/fields/DataSourceFieldSelect/Index.vue.d.ts
|
|
3962
|
-
type __VLS_Props$
|
|
3963
|
-
declare const __VLS_export$
|
|
4409
|
+
type __VLS_Props$22 = FieldProps<DataSourceFieldSelectConfig>;
|
|
4410
|
+
declare const __VLS_export$25: import("@vue/runtime-core").DefineComponent<__VLS_Props$22, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3964
4411
|
change: (...args: any[]) => void;
|
|
3965
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4412
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$22> & Readonly<{
|
|
3966
4413
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
3967
4414
|
}>, {
|
|
3968
4415
|
disabled: boolean;
|
|
3969
4416
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3970
|
-
declare const _default$11: typeof __VLS_export$
|
|
4417
|
+
declare const _default$11: typeof __VLS_export$25;
|
|
3971
4418
|
//#endregion
|
|
3972
4419
|
//#region temp/packages/editor/src/fields/EventSelect.vue.d.ts
|
|
3973
|
-
type __VLS_Props$
|
|
3974
|
-
declare const __VLS_export$
|
|
4420
|
+
type __VLS_Props$21 = FieldProps<EventSelectConfig>;
|
|
4421
|
+
declare const __VLS_export$24: import("@vue/runtime-core").DefineComponent<__VLS_Props$21, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3975
4422
|
change: (v: any, eventData?: ContainerChangeEventData | undefined) => any;
|
|
3976
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4423
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$21> & Readonly<{
|
|
3977
4424
|
onChange?: ((v: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
3978
4425
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3979
|
-
declare const _default$19: typeof __VLS_export$
|
|
4426
|
+
declare const _default$19: typeof __VLS_export$24;
|
|
3980
4427
|
//#endregion
|
|
3981
4428
|
//#region temp/packages/editor/src/fields/KeyValue.vue.d.ts
|
|
3982
|
-
type __VLS_Props$
|
|
3983
|
-
declare const __VLS_export$
|
|
4429
|
+
type __VLS_Props$20 = FieldProps<KeyValueConfig>;
|
|
4430
|
+
declare const __VLS_export$23: import("@vue/runtime-core").DefineComponent<__VLS_Props$20, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
3984
4431
|
change: (value: Record<string, any>) => any;
|
|
3985
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4432
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$20> & Readonly<{
|
|
3986
4433
|
onChange?: ((value: Record<string, any>) => any) | undefined;
|
|
3987
4434
|
}>, {
|
|
3988
4435
|
disabled: boolean;
|
|
3989
4436
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
3990
|
-
declare const _default$
|
|
4437
|
+
declare const _default$25: typeof __VLS_export$23;
|
|
3991
4438
|
//#endregion
|
|
3992
4439
|
//#region temp/packages/editor/src/layouts/sidebar/code-block/CodeBlockList.vue.d.ts
|
|
3993
4440
|
type __VLS_Slots$9 = CodeBlockListSlots;
|
|
3994
|
-
type __VLS_Props$
|
|
4441
|
+
type __VLS_Props$19 = {
|
|
3995
4442
|
indent?: number;
|
|
3996
4443
|
nextLevelIndentIncrement?: number;
|
|
3997
4444
|
customError?: (_id: Id, _errorType: CodeDeleteErrorType) => any;
|
|
3998
4445
|
};
|
|
3999
|
-
declare const __VLS_base$9: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
4446
|
+
declare const __VLS_base$9: import("@vue/runtime-core").DefineComponent<__VLS_Props$19, {
|
|
4000
4447
|
nodeStatusMap: import("@vue/reactivity").Ref<Map<Id, {
|
|
4001
4448
|
visible: boolean;
|
|
4002
4449
|
expand: boolean;
|
|
@@ -4020,15 +4467,15 @@ declare const __VLS_base$9: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4020
4467
|
}) => any;
|
|
4021
4468
|
edit: (id: string) => any;
|
|
4022
4469
|
"node-contextmenu": (event: MouseEvent, data: TreeNodeData) => any;
|
|
4023
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4470
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$19> & Readonly<{
|
|
4024
4471
|
onRemove?: ((id: string, args_1: {
|
|
4025
4472
|
historySource?: HistoryOpSource;
|
|
4026
4473
|
}) => any) | undefined;
|
|
4027
4474
|
onEdit?: ((id: string) => any) | undefined;
|
|
4028
4475
|
"onNode-contextmenu"?: ((event: MouseEvent, data: TreeNodeData) => any) | undefined;
|
|
4029
4476
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4030
|
-
declare const __VLS_export$
|
|
4031
|
-
declare const _default$1: typeof __VLS_export$
|
|
4477
|
+
declare const __VLS_export$22: __VLS_WithSlots$9<typeof __VLS_base$9, __VLS_Slots$9>;
|
|
4478
|
+
declare const _default$1: typeof __VLS_export$22;
|
|
4032
4479
|
type __VLS_WithSlots$9<T, S> = T & {
|
|
4033
4480
|
new (): {
|
|
4034
4481
|
$slots: S;
|
|
@@ -4037,15 +4484,15 @@ type __VLS_WithSlots$9<T, S> = T & {
|
|
|
4037
4484
|
//#endregion
|
|
4038
4485
|
//#region temp/packages/editor/src/layouts/sidebar/code-block/CodeBlockListPanel.vue.d.ts
|
|
4039
4486
|
type __VLS_Slots$8 = CodeBlockListPanelSlots;
|
|
4040
|
-
type __VLS_Props$
|
|
4487
|
+
type __VLS_Props$18 = {
|
|
4041
4488
|
indent?: number;
|
|
4042
4489
|
nextLevelIndentIncrement?: number;
|
|
4043
4490
|
customError?: (_id: Id, _errorType: CodeDeleteErrorType) => any;
|
|
4044
4491
|
customContentMenu: CustomContentMenuFunction;
|
|
4045
4492
|
};
|
|
4046
|
-
declare const __VLS_base$8: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
4047
|
-
declare const __VLS_export$
|
|
4048
|
-
declare const _default$2: typeof __VLS_export$
|
|
4493
|
+
declare const __VLS_base$8: import("@vue/runtime-core").DefineComponent<__VLS_Props$18, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$18> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4494
|
+
declare const __VLS_export$21: __VLS_WithSlots$8<typeof __VLS_base$8, __VLS_Slots$8>;
|
|
4495
|
+
declare const _default$2: typeof __VLS_export$21;
|
|
4049
4496
|
type __VLS_WithSlots$8<T, S> = T & {
|
|
4050
4497
|
new (): {
|
|
4051
4498
|
$slots: S;
|
|
@@ -4053,36 +4500,38 @@ type __VLS_WithSlots$8<T, S> = T & {
|
|
|
4053
4500
|
};
|
|
4054
4501
|
//#endregion
|
|
4055
4502
|
//#region temp/packages/editor/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue.d.ts
|
|
4056
|
-
type __VLS_Props$
|
|
4503
|
+
type __VLS_Props$17 = {
|
|
4057
4504
|
title?: string;
|
|
4058
4505
|
values: any;
|
|
4059
|
-
disabled: boolean;
|
|
4506
|
+
disabled: boolean; /** 打开后需要直接定位并打开的方法名,传入时默认激活「方法定义」tab */
|
|
4507
|
+
editMethodName?: string; /** 打开后需要直接定位并打开的字段路径,传入时默认激活「数据定义」tab */
|
|
4508
|
+
editFieldPath?: string[];
|
|
4060
4509
|
};
|
|
4061
4510
|
type __VLS_ModelProps$2 = {
|
|
4062
4511
|
'visible'?: boolean;
|
|
4063
4512
|
'width'?: number;
|
|
4064
4513
|
};
|
|
4065
|
-
type __VLS_PublicProps$2 = __VLS_Props$
|
|
4066
|
-
declare const __VLS_export$
|
|
4514
|
+
type __VLS_PublicProps$2 = __VLS_Props$17 & __VLS_ModelProps$2;
|
|
4515
|
+
declare const __VLS_export$20: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$2, {
|
|
4067
4516
|
show(): void;
|
|
4068
4517
|
hide(): void;
|
|
4069
4518
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4070
4519
|
close: () => any;
|
|
4071
4520
|
submit: (v: any, eventData: ContainerChangeEventData) => any;
|
|
4072
4521
|
open: (id: string) => any;
|
|
4073
|
-
"update:width": (value: number) => any;
|
|
4074
4522
|
"update:visible": (value: boolean) => any;
|
|
4523
|
+
"update:width": (value: number) => any;
|
|
4075
4524
|
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_PublicProps$2> & Readonly<{
|
|
4076
4525
|
onClose?: (() => any) | undefined;
|
|
4077
4526
|
onSubmit?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
|
|
4078
4527
|
onOpen?: ((id: string) => any) | undefined;
|
|
4079
|
-
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
4080
4528
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
4529
|
+
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
4081
4530
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4082
|
-
declare const _default$10: typeof __VLS_export$
|
|
4531
|
+
declare const _default$10: typeof __VLS_export$20;
|
|
4083
4532
|
//#endregion
|
|
4084
4533
|
//#region temp/packages/editor/src/layouts/sidebar/data-source/DataSourceAddButton.vue.d.ts
|
|
4085
|
-
type __VLS_Props$
|
|
4534
|
+
type __VLS_Props$16 = {
|
|
4086
4535
|
datasourceTypeList: {
|
|
4087
4536
|
text: string;
|
|
4088
4537
|
type: string;
|
|
@@ -4090,20 +4539,20 @@ type __VLS_Props$17 = {
|
|
|
4090
4539
|
addButtonConfig?: ButtonProps;
|
|
4091
4540
|
addButtonText?: string;
|
|
4092
4541
|
};
|
|
4093
|
-
declare const __VLS_export$
|
|
4542
|
+
declare const __VLS_export$19: import("@vue/runtime-core").DefineComponent<__VLS_Props$16, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
4094
4543
|
add: (type: string) => any;
|
|
4095
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
4544
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$16> & Readonly<{
|
|
4096
4545
|
onAdd?: ((type: string) => any) | undefined;
|
|
4097
4546
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
4098
|
-
declare const _default$9: typeof __VLS_export$
|
|
4547
|
+
declare const _default$9: typeof __VLS_export$19;
|
|
4099
4548
|
//#endregion
|
|
4100
4549
|
//#region temp/packages/editor/src/layouts/props-panel/PropsPanel.vue.d.ts
|
|
4101
4550
|
type __VLS_Slots$7 = PropsPanelSlots;
|
|
4102
|
-
type __VLS_Props$
|
|
4551
|
+
type __VLS_Props$15 = {
|
|
4103
4552
|
disabledShowSrc?: boolean;
|
|
4104
4553
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
4105
4554
|
};
|
|
4106
|
-
declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
4555
|
+
declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Props$15, {
|
|
4107
4556
|
getFormState(): FormState | undefined;
|
|
4108
4557
|
submit: (v: MNode, eventData?: ContainerChangeEventData) => Promise<void>;
|
|
4109
4558
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
@@ -4556,7 +5005,7 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
4556
5005
|
unmounted: () => any;
|
|
4557
5006
|
"submit-error": (e: any) => any;
|
|
4558
5007
|
"form-error": (e: any) => any;
|
|
4559
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
5008
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$15> & Readonly<{
|
|
4560
5009
|
onMounted?: ((internalInstance: {
|
|
4561
5010
|
$: import("@vue/runtime-core").ComponentInternalInstance;
|
|
4562
5011
|
$data: {};
|
|
@@ -5007,8 +5456,8 @@ declare const __VLS_base$7: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5007
5456
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
5008
5457
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
5009
5458
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5010
|
-
declare const __VLS_export$
|
|
5011
|
-
declare const _default$
|
|
5459
|
+
declare const __VLS_export$18: __VLS_WithSlots$7<typeof __VLS_base$7, __VLS_Slots$7>;
|
|
5460
|
+
declare const _default$30: typeof __VLS_export$18;
|
|
5012
5461
|
type __VLS_WithSlots$7<T, S> = T & {
|
|
5013
5462
|
new (): {
|
|
5014
5463
|
$slots: S;
|
|
@@ -5019,7 +5468,7 @@ type __VLS_WithSlots$7<T, S> = T & {
|
|
|
5019
5468
|
type __VLS_Slots$6 = {
|
|
5020
5469
|
'props-form-panel-header'(_props: {}): any;
|
|
5021
5470
|
};
|
|
5022
|
-
type __VLS_Props$
|
|
5471
|
+
type __VLS_Props$14 = {
|
|
5023
5472
|
config: FormConfig;
|
|
5024
5473
|
values: FormValue;
|
|
5025
5474
|
disabledShowSrc?: boolean;
|
|
@@ -5028,7 +5477,7 @@ type __VLS_Props$15 = {
|
|
|
5028
5477
|
labelPosition?: string;
|
|
5029
5478
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
5030
5479
|
};
|
|
5031
|
-
declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
5480
|
+
declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Props$14, {
|
|
5032
5481
|
configForm: Readonly<import("@vue/reactivity").ShallowRef<({
|
|
5033
5482
|
$: import("@vue/runtime-core").ComponentInternalInstance;
|
|
5034
5483
|
$data: {};
|
|
@@ -5213,15 +5662,15 @@ declare const __VLS_base$6: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5213
5662
|
submit: (values: any, eventData?: ContainerChangeEventData | undefined) => any;
|
|
5214
5663
|
"submit-error": (e: any) => any;
|
|
5215
5664
|
"form-error": (e: any) => any;
|
|
5216
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
5665
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$14> & Readonly<{
|
|
5217
5666
|
onMounted?: ((internalInstance: any) => any) | undefined;
|
|
5218
5667
|
onUnmounted?: (() => any) | undefined;
|
|
5219
5668
|
onSubmit?: ((values: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
|
|
5220
5669
|
"onSubmit-error"?: ((e: any) => any) | undefined;
|
|
5221
5670
|
"onForm-error"?: ((e: any) => any) | undefined;
|
|
5222
5671
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5223
|
-
declare const __VLS_export$
|
|
5224
|
-
declare const _default$
|
|
5672
|
+
declare const __VLS_export$17: __VLS_WithSlots$6<typeof __VLS_base$6, __VLS_Slots$6>;
|
|
5673
|
+
declare const _default$29: typeof __VLS_export$17;
|
|
5225
5674
|
type __VLS_WithSlots$6<T, S> = T & {
|
|
5226
5675
|
new (): {
|
|
5227
5676
|
$slots: S;
|
|
@@ -5229,20 +5678,20 @@ type __VLS_WithSlots$6<T, S> = T & {
|
|
|
5229
5678
|
};
|
|
5230
5679
|
//#endregion
|
|
5231
5680
|
//#region temp/packages/editor/src/components/ToolButton.vue.d.ts
|
|
5232
|
-
type __VLS_Props$
|
|
5681
|
+
type __VLS_Props$13 = {
|
|
5233
5682
|
data?: MenuButton | MenuComponent;
|
|
5234
5683
|
eventType?: 'mousedown' | 'mouseup' | 'click';
|
|
5235
5684
|
};
|
|
5236
|
-
declare const __VLS_export$
|
|
5685
|
+
declare const __VLS_export$16: import("@vue/runtime-core").DefineComponent<__VLS_Props$13, {
|
|
5237
5686
|
getElRef: () => Readonly<import("@vue/reactivity").ShallowRef<HTMLDivElement | null>>;
|
|
5238
|
-
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
5687
|
+
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$13> & Readonly<{}>, {
|
|
5239
5688
|
data: MenuButton | MenuComponent;
|
|
5240
5689
|
eventType: "mousedown" | "mouseup" | "click";
|
|
5241
5690
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5242
|
-
declare const _default$
|
|
5691
|
+
declare const _default$35: typeof __VLS_export$16;
|
|
5243
5692
|
//#endregion
|
|
5244
5693
|
//#region temp/packages/editor/src/components/ContentMenu.vue.d.ts
|
|
5245
|
-
type __VLS_Props$
|
|
5694
|
+
type __VLS_Props$12 = {
|
|
5246
5695
|
menuData?: (MenuButton | MenuComponent)[];
|
|
5247
5696
|
isSubMenu?: boolean;
|
|
5248
5697
|
active?: string | number;
|
|
@@ -5252,7 +5701,7 @@ declare var __VLS_7$1: {};
|
|
|
5252
5701
|
type __VLS_Slots$5 = {} & {
|
|
5253
5702
|
title?: (props: typeof __VLS_7$1) => any;
|
|
5254
5703
|
};
|
|
5255
|
-
declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
5704
|
+
declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Props$12, {
|
|
5256
5705
|
menu: Readonly<import("@vue/reactivity").ShallowRef<HTMLDivElement | null>>;
|
|
5257
5706
|
menuPosition: Ref<{
|
|
5258
5707
|
left: number;
|
|
@@ -5278,7 +5727,7 @@ declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5278
5727
|
mouseenter: () => any;
|
|
5279
5728
|
show: () => any;
|
|
5280
5729
|
hide: () => any;
|
|
5281
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
5730
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$12> & Readonly<{
|
|
5282
5731
|
onMouseenter?: (() => any) | undefined;
|
|
5283
5732
|
onShow?: (() => any) | undefined;
|
|
5284
5733
|
onHide?: (() => any) | undefined;
|
|
@@ -5287,8 +5736,8 @@ declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5287
5736
|
isSubMenu: boolean;
|
|
5288
5737
|
autoHide: boolean;
|
|
5289
5738
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5290
|
-
declare const __VLS_export$
|
|
5291
|
-
declare const _default$8: typeof __VLS_export$
|
|
5739
|
+
declare const __VLS_export$15: __VLS_WithSlots$5<typeof __VLS_base$5, __VLS_Slots$5>;
|
|
5740
|
+
declare const _default$8: typeof __VLS_export$15;
|
|
5292
5741
|
type __VLS_WithSlots$5<T, S> = T & {
|
|
5293
5742
|
new (): {
|
|
5294
5743
|
$slots: S;
|
|
@@ -5296,14 +5745,14 @@ type __VLS_WithSlots$5<T, S> = T & {
|
|
|
5296
5745
|
};
|
|
5297
5746
|
//#endregion
|
|
5298
5747
|
//#region temp/packages/editor/src/components/Icon.vue.d.ts
|
|
5299
|
-
type __VLS_Props$
|
|
5748
|
+
type __VLS_Props$11 = {
|
|
5300
5749
|
icon?: any;
|
|
5301
5750
|
};
|
|
5302
|
-
declare const __VLS_export$
|
|
5303
|
-
declare const _default$
|
|
5751
|
+
declare const __VLS_export$14: import("@vue/runtime-core").DefineComponent<__VLS_Props$11, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$11> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5752
|
+
declare const _default$24: typeof __VLS_export$14;
|
|
5304
5753
|
//#endregion
|
|
5305
5754
|
//#region temp/packages/editor/src/components/SplitView.vue.d.ts
|
|
5306
|
-
type __VLS_Props$
|
|
5755
|
+
type __VLS_Props$10 = {
|
|
5307
5756
|
width?: number;
|
|
5308
5757
|
left?: number;
|
|
5309
5758
|
right?: number;
|
|
@@ -5322,13 +5771,13 @@ type __VLS_Slots$4 = {} & {
|
|
|
5322
5771
|
} & {
|
|
5323
5772
|
right?: (props: typeof __VLS_19) => any;
|
|
5324
5773
|
};
|
|
5325
|
-
declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Props$
|
|
5774
|
+
declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Props$10, {
|
|
5326
5775
|
updateWidth(): void;
|
|
5327
5776
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
5328
5777
|
change: (...args: any[]) => void;
|
|
5329
5778
|
"update:left": (...args: any[]) => void;
|
|
5330
5779
|
"update:right": (...args: any[]) => void;
|
|
5331
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
5780
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$10> & Readonly<{
|
|
5332
5781
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
5333
5782
|
"onUpdate:left"?: ((...args: any[]) => any) | undefined;
|
|
5334
5783
|
"onUpdate:right"?: ((...args: any[]) => any) | undefined;
|
|
@@ -5337,8 +5786,8 @@ declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5337
5786
|
minRight: number;
|
|
5338
5787
|
minCenter: number;
|
|
5339
5788
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5340
|
-
declare const __VLS_export$
|
|
5341
|
-
declare const _default$
|
|
5789
|
+
declare const __VLS_export$13: __VLS_WithSlots$4<typeof __VLS_base$4, __VLS_Slots$4>;
|
|
5790
|
+
declare const _default$27: typeof __VLS_export$13;
|
|
5342
5791
|
type __VLS_WithSlots$4<T, S> = T & {
|
|
5343
5792
|
new (): {
|
|
5344
5793
|
$slots: S;
|
|
@@ -5355,8 +5804,8 @@ declare const __VLS_base$3: import("@vue/runtime-core").DefineComponent<{}, {},
|
|
|
5355
5804
|
}, string, import("@vue/runtime-core").PublicProps, Readonly<{}> & Readonly<{
|
|
5356
5805
|
onChange?: ((e: OnDrag$1<import("gesto").default>) => any) | undefined;
|
|
5357
5806
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
5358
|
-
declare const __VLS_export$
|
|
5359
|
-
declare const _default$
|
|
5807
|
+
declare const __VLS_export$12: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
|
|
5808
|
+
declare const _default$31: typeof __VLS_export$12;
|
|
5360
5809
|
type __VLS_WithSlots$3<T, S> = T & {
|
|
5361
5810
|
new (): {
|
|
5362
5811
|
$slots: S;
|
|
@@ -5364,7 +5813,7 @@ type __VLS_WithSlots$3<T, S> = T & {
|
|
|
5364
5813
|
};
|
|
5365
5814
|
//#endregion
|
|
5366
5815
|
//#region temp/packages/editor/src/components/CodeBlockEditor.vue.d.ts
|
|
5367
|
-
type __VLS_Props$
|
|
5816
|
+
type __VLS_Props$9 = {
|
|
5368
5817
|
content: Omit<CodeBlockContent, 'content'> & {
|
|
5369
5818
|
content: string;
|
|
5370
5819
|
};
|
|
@@ -5376,27 +5825,27 @@ type __VLS_ModelProps$1 = {
|
|
|
5376
5825
|
'width'?: number;
|
|
5377
5826
|
'visible'?: boolean;
|
|
5378
5827
|
};
|
|
5379
|
-
type __VLS_PublicProps$1 = __VLS_Props$
|
|
5380
|
-
declare const __VLS_export$
|
|
5828
|
+
type __VLS_PublicProps$1 = __VLS_Props$9 & __VLS_ModelProps$1;
|
|
5829
|
+
declare const __VLS_export$11: import("@vue/runtime-core").DefineComponent<__VLS_PublicProps$1, {
|
|
5381
5830
|
show(): Promise<void>;
|
|
5382
5831
|
hide(): Promise<void>;
|
|
5383
5832
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
5384
5833
|
close: () => any;
|
|
5385
5834
|
submit: (values: CodeBlockContent, eventData: ContainerChangeEventData) => any;
|
|
5386
5835
|
open: () => any;
|
|
5387
|
-
"update:width": (value: number) => any;
|
|
5388
5836
|
"update:visible": (value: boolean) => any;
|
|
5837
|
+
"update:width": (value: number) => any;
|
|
5389
5838
|
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_PublicProps$1> & Readonly<{
|
|
5390
5839
|
onClose?: (() => any) | undefined;
|
|
5391
5840
|
onSubmit?: ((values: CodeBlockContent, eventData: ContainerChangeEventData) => any) | undefined;
|
|
5392
5841
|
onOpen?: (() => any) | undefined;
|
|
5393
|
-
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
5394
5842
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
5843
|
+
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
5395
5844
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5396
|
-
declare const _default: typeof __VLS_export$
|
|
5845
|
+
declare const _default: typeof __VLS_export$11;
|
|
5397
5846
|
//#endregion
|
|
5398
5847
|
//#region temp/packages/editor/src/components/CompareForm.vue.d.ts
|
|
5399
|
-
type __VLS_Props$
|
|
5848
|
+
type __VLS_Props$8 = {
|
|
5400
5849
|
/** 当前值(修改后的值) */value: Partial<MNode> | Partial<DataSourceSchema> | Partial<CodeBlockContent> | Record<string, any>; /** 用于对比的旧值(修改前的值) */
|
|
5401
5850
|
lastValue?: Partial<MNode> | Partial<DataSourceSchema> | Partial<CodeBlockContent> | Record<string, any>;
|
|
5402
5851
|
/**
|
|
@@ -5428,61 +5877,121 @@ type __VLS_Props$9 = {
|
|
|
5428
5877
|
*/
|
|
5429
5878
|
loadConfig?: CompareFormLoadConfig;
|
|
5430
5879
|
};
|
|
5431
|
-
declare const __VLS_export$
|
|
5880
|
+
declare const __VLS_export$10: import("@vue/runtime-core").DefineComponent<__VLS_Props$8, {
|
|
5432
5881
|
form: ShallowRef<InstanceType<typeof MForm> | null>;
|
|
5433
5882
|
config: Ref<FormConfig>;
|
|
5434
5883
|
reload: () => Promise<void>;
|
|
5435
|
-
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$
|
|
5884
|
+
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$8> & Readonly<{}>, {
|
|
5436
5885
|
labelWidth: string;
|
|
5437
5886
|
category: CompareCategory;
|
|
5438
5887
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5439
|
-
declare const _default$5: typeof __VLS_export$
|
|
5888
|
+
declare const _default$5: typeof __VLS_export$10;
|
|
5440
5889
|
//#endregion
|
|
5441
|
-
//#region temp/packages/editor/src/layouts/history-list/
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5890
|
+
//#region temp/packages/editor/src/layouts/history-list/composables.d.ts
|
|
5891
|
+
/**
|
|
5892
|
+
* 通用 bucket 分组(数据源 / 代码块及业务自定义历史)在面板中的展示结构。
|
|
5893
|
+
* 由 Bucket / BucketTab 复用,step 类型通过泛型 T 收窄(约束为 {@link BaseStepValue})。
|
|
5894
|
+
*/
|
|
5895
|
+
interface HistoryBucketGroup<T extends BaseStepValue = BaseStepValue> {
|
|
5896
|
+
/** 组内最后一步是否已应用 */
|
|
5897
|
+
applied: boolean;
|
|
5898
|
+
/** 是否为当前所在的分组 */
|
|
5899
|
+
isCurrent?: boolean;
|
|
5900
|
+
/** 该分组的操作类型 */
|
|
5901
|
+
opType: HistoryOpType;
|
|
5902
|
+
/** 组内所有步骤 */
|
|
5903
|
+
steps: {
|
|
5904
|
+
index: number;
|
|
5452
5905
|
applied: boolean;
|
|
5453
5906
|
isCurrent?: boolean;
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5907
|
+
step: T;
|
|
5908
|
+
}[];
|
|
5909
|
+
}
|
|
5910
|
+
//#endregion
|
|
5911
|
+
//#region temp/packages/editor/src/layouts/history-list/Bucket.vue.d.ts
|
|
5912
|
+
declare const __VLS_export$9: <T extends BaseStepValue = BaseStepValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$1<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5913
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal$1<{
|
|
5914
|
+
/**
|
|
5915
|
+
* 该类历史的整体渲染配置(title / prefix / describe* / isStep* / showInitial / gotoEnabled)。
|
|
5916
|
+
* 由父组件按业务类型注入,组件内部按需读取,避免逐项透传多个 props。
|
|
5917
|
+
*/
|
|
5918
|
+
config: HistoryBucketConfig<T>; /** 当前 bucket 对应的目标 id(dataSource.id 或 codeBlock.id),同时用于组装子项的 key。 */
|
|
5919
|
+
bucketId: string | number; /** 当前 bucket 下的所有历史分组,按时间倒序展示(最近的操作在前)。 */
|
|
5920
|
+
groups: HistoryBucketGroup<T>[]; /** 共享的折叠状态表(key -> 是否展开,缺省或 true 为展开、false 为收起),由顶层 panel 统一维护以便跨 tab 复用。 */
|
|
5921
|
+
expanded: Record<string, boolean>;
|
|
5922
|
+
} & {
|
|
5923
|
+
onToggle?: ((_key: string) => any) | undefined;
|
|
5924
|
+
onGoto?: ((_bucketId: string | number, _index: number) => any) | undefined;
|
|
5925
|
+
"onDiff-step"?: ((_bucketId: string | number, _index: number) => any) | undefined;
|
|
5926
|
+
"onRevert-step"?: ((_bucketId: string | number, _index: number) => any) | undefined;
|
|
5927
|
+
"onGoto-initial"?: ((_bucketId: string | number) => any) | undefined;
|
|
5928
|
+
}> & (typeof globalThis extends {
|
|
5929
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
5930
|
+
} ? P : {});
|
|
5931
|
+
expose: (exposed: {}) => void;
|
|
5932
|
+
attrs: any;
|
|
5933
|
+
slots: {};
|
|
5934
|
+
emit: {
|
|
5935
|
+
(_e: "toggle", _key: string): void;
|
|
5936
|
+
(_e: "goto", _bucketId: string | number, _index: number): void;
|
|
5937
|
+
(_e: "goto-initial", _bucketId: string | number): void;
|
|
5938
|
+
(_e: "diff-step", _bucketId: string | number, _index: number): void;
|
|
5939
|
+
(_e: "revert-step", _bucketId: string | number, _index: number): void;
|
|
5940
|
+
};
|
|
5941
|
+
}>) => import("vue").VNode & {
|
|
5942
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
5943
|
+
};
|
|
5944
|
+
declare const _default$22: typeof __VLS_export$9;
|
|
5945
|
+
type __VLS_PrettifyLocal$1<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
|
|
5946
|
+
//#endregion
|
|
5947
|
+
//#region temp/packages/editor/src/layouts/history-list/BucketTab.vue.d.ts
|
|
5948
|
+
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<{
|
|
5949
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
5950
|
+
/**
|
|
5951
|
+
* 该类历史的整体渲染配置(title / prefix / describe* / isStep* / showInitial / gotoEnabled),
|
|
5952
|
+
* 由父组件按业务类型注入并整体透传给 Bucket,避免逐项透传多个 props。
|
|
5953
|
+
*/
|
|
5954
|
+
config: HistoryBucketConfig<T>;
|
|
5955
|
+
/**
|
|
5956
|
+
* 已按目标 id 聚拢成的 bucket 列表,每个 bucket 内部的 groups 已按时间倒序排好。
|
|
5957
|
+
* 空数组时显示空态。
|
|
5958
|
+
*/
|
|
5959
|
+
buckets: {
|
|
5960
|
+
id: string | number;
|
|
5961
|
+
groups: HistoryBucketGroup<T>[];
|
|
5460
5962
|
}[];
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5963
|
+
/**
|
|
5964
|
+
* 共享的折叠状态表(key -> 是否展开),由顶层 panel 统一维护。
|
|
5965
|
+
* key 形如 `${prefix}-${id}-${组内首步 index}`——以稳定的 step 索引而非展示位置标识分组,
|
|
5966
|
+
* 这样历史数据更新后已展开的分组状态仍能正确保持。
|
|
5967
|
+
*/
|
|
5968
|
+
expanded: Record<string, boolean>;
|
|
5969
|
+
} & {
|
|
5970
|
+
onClear?: (() => any) | undefined;
|
|
5971
|
+
onToggle?: ((_key: string) => any) | undefined;
|
|
5972
|
+
onGoto?: ((_targetId: string | number, _index: number) => any) | undefined;
|
|
5973
|
+
"onDiff-step"?: ((_targetId: string | number, _index: number) => any) | undefined;
|
|
5974
|
+
"onRevert-step"?: ((_targetId: string | number, _index: number) => any) | undefined;
|
|
5975
|
+
"onGoto-initial"?: ((_targetId: string | number) => any) | undefined;
|
|
5976
|
+
}> & (typeof globalThis extends {
|
|
5977
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
5978
|
+
} ? P : {});
|
|
5979
|
+
expose: (exposed: {}) => void;
|
|
5980
|
+
attrs: any;
|
|
5981
|
+
slots: {};
|
|
5982
|
+
emit: {
|
|
5983
|
+
(_e: "toggle", _key: string): void;
|
|
5984
|
+
(_e: "goto", _targetId: string | number, _index: number): void;
|
|
5985
|
+
(_e: "goto-initial", _targetId: string | number): void;
|
|
5986
|
+
(_e: "diff-step", _targetId: string | number, _index: number): void;
|
|
5987
|
+
(_e: "revert-step", _targetId: string | number, _index: number): void;
|
|
5988
|
+
(_e: "clear"): void;
|
|
5989
|
+
};
|
|
5990
|
+
}>) => import("vue").VNode & {
|
|
5991
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
5468
5992
|
};
|
|
5469
|
-
declare const
|
|
5470
|
-
|
|
5471
|
-
goto: (_bucketId: string | number, _index: number) => any;
|
|
5472
|
-
"diff-step": (_bucketId: string | number, _index: number) => any;
|
|
5473
|
-
"revert-step": (_bucketId: string | number, _index: number) => any;
|
|
5474
|
-
"goto-initial": (_bucketId: string | number) => any;
|
|
5475
|
-
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$8> & Readonly<{
|
|
5476
|
-
onToggle?: ((_key: string) => any) | undefined;
|
|
5477
|
-
onGoto?: ((_bucketId: string | number, _index: number) => any) | undefined;
|
|
5478
|
-
"onDiff-step"?: ((_bucketId: string | number, _index: number) => any) | undefined;
|
|
5479
|
-
"onRevert-step"?: ((_bucketId: string | number, _index: number) => any) | undefined;
|
|
5480
|
-
"onGoto-initial"?: ((_bucketId: string | number) => any) | undefined;
|
|
5481
|
-
}>, {
|
|
5482
|
-
gotoEnabled: boolean;
|
|
5483
|
-
showInitial: boolean;
|
|
5484
|
-
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5485
|
-
declare const _default$22: typeof __VLS_export$8;
|
|
5993
|
+
declare const _default$23: typeof __VLS_export$8;
|
|
5994
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
|
|
5486
5995
|
//#endregion
|
|
5487
5996
|
//#region temp/packages/editor/src/layouts/history-list/HistoryDiffDialog.vue.d.ts
|
|
5488
5997
|
type __VLS_Props$7 = {
|
|
@@ -5498,11 +6007,13 @@ type __VLS_Props$7 = {
|
|
|
5498
6007
|
*/
|
|
5499
6008
|
loadConfig?: CompareFormLoadConfig;
|
|
5500
6009
|
width?: string;
|
|
6010
|
+
isConfirm?: boolean;
|
|
5501
6011
|
onConfirm?: () => void;
|
|
5502
6012
|
selfDiffFieldTypes?: string[];
|
|
5503
6013
|
};
|
|
5504
6014
|
declare const __VLS_export$7: import("@vue/runtime-core").DefineComponent<__VLS_Props$7, {
|
|
5505
6015
|
open: (p: DiffDialogPayload) => void;
|
|
6016
|
+
confirm: (p: DiffDialogPayload) => Promise<boolean>;
|
|
5506
6017
|
close: () => void;
|
|
5507
6018
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
5508
6019
|
close: (...args: any[]) => void;
|
|
@@ -5540,13 +6051,13 @@ declare const __VLS_base$2: import("@vue/runtime-core").DefineComponent<__VLS_Pu
|
|
|
5540
6051
|
target: Readonly<import("@vue/reactivity").ShallowRef<HTMLDivElement | null>>;
|
|
5541
6052
|
titleEl: Readonly<import("@vue/reactivity").ShallowRef<HTMLDivElement | null>>;
|
|
5542
6053
|
}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
6054
|
+
"update:visible": (value: boolean) => any;
|
|
5543
6055
|
"update:width": (value: number) => any;
|
|
5544
6056
|
"update:height": (value: number) => any;
|
|
5545
|
-
"update:visible": (value: boolean) => any;
|
|
5546
6057
|
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
6058
|
+
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
5547
6059
|
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
5548
6060
|
"onUpdate:height"?: ((value: number) => any) | undefined;
|
|
5549
|
-
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
5550
6061
|
}>, {
|
|
5551
6062
|
title: string;
|
|
5552
6063
|
position: Position;
|
|
@@ -5602,7 +6113,7 @@ declare const __VLS_base$1: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5602
6113
|
indent: number;
|
|
5603
6114
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5604
6115
|
declare const __VLS_export$5: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
|
|
5605
|
-
declare const _default$
|
|
6116
|
+
declare const _default$36: typeof __VLS_export$5;
|
|
5606
6117
|
type __VLS_WithSlots$1<T, S> = T & {
|
|
5607
6118
|
new (): {
|
|
5608
6119
|
$slots: S;
|
|
@@ -5653,7 +6164,7 @@ declare const __VLS_base: import("@vue/runtime-core").DefineComponent<__VLS_Prop
|
|
|
5653
6164
|
isExpandable: IsExpandableFunction;
|
|
5654
6165
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5655
6166
|
declare const __VLS_export$4: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
5656
|
-
declare const _default$
|
|
6167
|
+
declare const _default$37: typeof __VLS_export$4;
|
|
5657
6168
|
type __VLS_WithSlots<T, S> = T & {
|
|
5658
6169
|
new (): {
|
|
5659
6170
|
$slots: S;
|
|
@@ -5669,7 +6180,7 @@ declare const __VLS_export$3: import("@vue/runtime-core").DefineComponent<__VLS_
|
|
|
5669
6180
|
}>, {
|
|
5670
6181
|
disabled: boolean;
|
|
5671
6182
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5672
|
-
declare const _default$
|
|
6183
|
+
declare const _default$28: typeof __VLS_export$3;
|
|
5673
6184
|
//#endregion
|
|
5674
6185
|
//#region temp/packages/editor/src/fields/DisplayConds.vue.d.ts
|
|
5675
6186
|
type __VLS_Props$2 = FieldProps<DisplayCondsConfig>;
|
|
@@ -5700,11 +6211,11 @@ declare const __VLS_export: import("@vue/runtime-core").DefineComponent<__VLS_Pr
|
|
|
5700
6211
|
onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
|
|
5701
6212
|
onAddDiffCount?: (() => any) | undefined;
|
|
5702
6213
|
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
5703
|
-
declare const _default$
|
|
6214
|
+
declare const _default$32: typeof __VLS_export;
|
|
5704
6215
|
//#endregion
|
|
5705
6216
|
//#region temp/packages/editor/src/plugin.d.ts
|
|
5706
|
-
declare const _default$
|
|
6217
|
+
declare const _default$40: {
|
|
5707
6218
|
install: (app: App, opt?: Partial<EditorInstallOptions | DesignPluginOptions | FormInstallOptions>) => void;
|
|
5708
6219
|
};
|
|
5709
6220
|
//#endregion
|
|
5710
|
-
export { AddMNode, AddPrefixToObject, AsyncAfterHook, AsyncBeforeHook, AsyncHookPlugin, AsyncMethodName, BeforeAdd, CODE_DRAFT_STORAGE_KEY, COPY_CODE_STORAGE_KEY, COPY_DS_STORAGE_KEY, COPY_STORAGE_KEY, CanDropInFunction, CanDropInScene, _default as CodeBlockEditor, CodeBlockHistoryGroup, _default$1 as CodeBlockList, _default$2 as CodeBlockListPanel, CodeBlockListPanelSlots, CodeBlockListSlots, CodeBlockStepValue, CodeDeleteErrorType, CodeDslItem, CodeParamStatement, CodeRelation, _default$3 as CodeSelect, _default$4 as CodeSelectCol, CodeState, ColumnLayout, CombineInfo, CompareCategory, _default$5 as CompareForm, CompareFormLoadConfig, CompareFormLoadConfigContext, ComponentGroup, ComponentGroupState, ComponentItem, _default$6 as ComponentListPanel, ComponentListPanelSlots, _default$7 as CondOpSelect, _default$8 as ContentMenu, CustomContentMenuFunction, DEFAULT_LEFT_COLUMN_WIDTH, DEFAULT_RIGHT_COLUMN_WIDTH, _default$9 as DataSourceAddButton, _default$10 as DataSourceConfigPanel, _default$11 as DataSourceFieldSelect, _default$12 as DataSourceFields, DataSourceHistoryGroup, _default$13 as DataSourceInput, DataSourceListSlots, _default$14 as DataSourceMethodSelect, _default$15 as DataSourceMethods, _default$16 as DataSourceMocks, _default$17 as DataSourceSelect, DataSourceStepValue, DatasourceTypeOption, DepTargetType, DiffDialogPayload, _default$18 as DisplayConds, DragClassification, DragType, DslOpOptions, EditorEvents, EditorInstallOptions, EditorNodeInfo, EditorSlots, EventBus, EventBusEvent, _default$19 as EventSelect, Fixed2Other, _default$20 as FloatingBox, FrameworkSlots, GetCodeBlockFormConfigOptions, GetColumnWidth, GetConfig, H_GUIDE_LINE_STORAGE_KEY, _default$21 as HistoryDiffDialog, _default$22 as HistoryListBucket, HistoryListExtraTab, HistoryOpOptions, HistoryOpOptionsWithChangeRecords, HistoryOpSource, HistoryOpType, HistoryState, _default$
|
|
6221
|
+
export { AddMNode, AddPrefixToObject, AsyncAfterHook, AsyncBeforeHook, AsyncHookPlugin, AsyncMethodName, BaseStepValue, BeforeAdd, CODE_DRAFT_STORAGE_KEY, COPY_CODE_STORAGE_KEY, COPY_DS_STORAGE_KEY, COPY_STORAGE_KEY, CanDropInFunction, CanDropInScene, _default as CodeBlockEditor, CodeBlockHistoryGroup, _default$1 as CodeBlockList, _default$2 as CodeBlockListPanel, CodeBlockListPanelSlots, CodeBlockListSlots, CodeBlockStepValue, CodeDeleteErrorType, CodeDslItem, CodeParamStatement, CodeRelation, _default$3 as CodeSelect, _default$4 as CodeSelectCol, CodeState, ColumnLayout, CombineInfo, CompareCategory, _default$5 as CompareForm, CompareFormLoadConfig, CompareFormLoadConfigContext, ComponentGroup, ComponentGroupState, ComponentItem, _default$6 as ComponentListPanel, ComponentListPanelSlots, _default$7 as CondOpSelect, _default$8 as ContentMenu, CustomContentMenuFunction, DEFAULT_LEFT_COLUMN_WIDTH, DEFAULT_RIGHT_COLUMN_WIDTH, _default$9 as DataSourceAddButton, _default$10 as DataSourceConfigPanel, _default$11 as DataSourceFieldSelect, _default$12 as DataSourceFields, DataSourceHistoryGroup, _default$13 as DataSourceInput, DataSourceListSlots, _default$14 as DataSourceMethodSelect, _default$15 as DataSourceMethods, _default$16 as DataSourceMocks, _default$17 as DataSourceSelect, DataSourceStepValue, DatasourceTypeOption, DepTargetType, DiffDialogPayload, _default$18 as DisplayConds, DragClassification, DragType, DslOpOptions, DslOpWithHistoryIdsResult, EditorEvents, EditorInstallOptions, EditorNodeInfo, EditorSlots, EventBus, EventBusEvent, _default$19 as EventSelect, Fixed2Other, _default$20 as FloatingBox, FrameworkSlots, GetCodeBlockFormConfigOptions, GetColumnWidth, GetConfig, H_GUIDE_LINE_STORAGE_KEY, HistoryBucketConfig, _default$21 as HistoryDiffDialog, _default$22 as HistoryListBucket, _default$23 as HistoryListBucketTab, HistoryListExtraTab, HistoryOpOptions, HistoryOpOptionsWithChangeRecords, HistoryOpSource, HistoryOpType, HistoryPersistOptions, HistoryRowDescriptor, HistoryState, _default$24 as Icon, IdleTask, IdleTaskEvents, IsExpandableFunction, KeyBindingCacheItem, KeyBindingCommand, KeyBindingItem, _default$25 as KeyValue, Keys, LEFT_COLUMN_WIDTH_STORAGE_KEY, LayerNodeSlots, LayerNodeStatus, LayerOffset, _default$26 as LayerPanel, LayerPanelSlots, Layout, _default$27 as LayoutContainer, _default$27 as SplitView, ListState, MIN_CENTER_COLUMN_WIDTH, MIN_LEFT_COLUMN_WIDTH, MIN_RIGHT_COLUMN_WIDTH, MenuBarData, MenuButton, MenuComponent, MenuItem, type OnDrag, PROPS_PANEL_WIDTH_STORAGE_KEY, PageBarSortOptions, _default$28 as PageFragmentSelect, PageHistoryGroup, PageHistoryStepEntry, PartSortableOptions, PastePosition, PersistedHistoryState, PropsFormConfigFunction, _default$29 as PropsFormPanel, PropsFormValueFunction, _default$30 as PropsPanel, PropsPanelSlots, PropsState, RIGHT_COLUMN_WIDTH_STORAGE_KEY, _default$31 as Resizer, ScrollViewer, ScrollViewerEvent, ScrollViewerSlots, SerializedUndoRedo, Services, SetColumnWidth, SideBarData, SideComponent, SideItem, SideItemKey, SidebarSlots, StageCore, StageOptions, StageOverlayState, StageRect, StageSlots, StepDiffItem, StepValue, StoreState, StoreStateKey, _default$32 as StyleSetter, SyncAfterHook, SyncBeforeHook, SyncHookPlugin, _default$33 as TMagicCodeEditor, _default$34 as TMagicEditor, _default$35 as ToolButton, _default$36 as Tree, _default$37 as TreeNode, TreeNodeData, UI_SELECT_MODE_EVENT_NAME, UiState, UndoRedo, V_GUIDE_LINE_STORAGE_KEY, WorkspaceSlots, advancedTabConfig, arrayOptions, beforePaste, buildChangeRecords, calcAlignCenterStyle, calcLayerTargetIndex, calcMoveStyle, canUsePluginMethods, change2Fixed, classifyDragSources, _default$38 as codeBlockService, collectRelatedNodes, createStackStep, _default$39 as dataSourceService, debug, _default$40 as default, defaultIsExpandable, _default$41 as depService, describeRevertStep, describeStepForRevert, deserializeStacks, designPlugin, detectPageTargetId, detectPageTargetName, detectStackOpType, displayTabConfig, editorNodeMergeCustomizer, _default$42 as editorService, eqOptions, error, eventTabConfig, _default$43 as eventsService, fillConfig, fixNodeLeft, fixNodePosition, formPlugin, generatePageName, generatePageNameByApp, getAddParent, getCascaderOptionsFromFields, getCodeBlockFormConfig, getDefaultConfig, getDisplayField, getEditorConfig, getFieldType, getFormConfig, getFormValue, getGuideLineFromCache, getInitPositionStyle, getLastPushedHistoryIds, getNodeIndex, getOrCreateStack, getPageFragmentList, getPageList, getPageNameList, getPositionInContainer, getRelativeStyle, _default$44 as historyService, idbDelete, idbGet, idbSet, info, isIncludeDataSource, isIndexedDBSupported, _default$45 as loadMonaco, log, markStackSaved, mergePageSteps, mergeStackSteps, moveItemsInContainer, numberOptions, openIndexedDB, _default$46 as propsService, resolveSelectedNode, serializeConfig, serializeStacks, setChildrenLayout, setEditorConfig, setLayout, _default$47 as stageOverlayService, _default$48 as storageService, styleTabConfig, tablePlugin, toggleFixedPosition, _default$49 as uiService, undoFloor, updateStatus, useCodeBlockEdit, useEditorContentHeight, useFilter, useFloatBox, useGetSo, useNextFloatBoxPosition, useNodeStatus, useServices, useStage, useWindowRect, warn };
|