@tmagic/editor 1.5.22 → 1.6.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/dist/style.css +2 -9
- package/dist/tmagic-editor.js +3662 -1728
- package/dist/tmagic-editor.umd.cjs +3655 -1721
- package/package.json +10 -10
- package/src/Editor.vue +5 -0
- package/src/editorProps.ts +2 -3
- package/src/fields/DataSourceFields.vue +1 -1
- package/src/fields/DataSourceMethods.vue +1 -1
- package/src/hooks/index.ts +1 -1
- package/src/hooks/use-filter.ts +6 -4
- package/src/hooks/use-stage.ts +1 -0
- package/src/index.ts +1 -1
- package/src/initService.ts +64 -11
- package/src/layouts/page-bar/PageBarScrollContainer.vue +2 -1
- package/src/layouts/props-panel/FormPanel.vue +6 -1
- package/src/layouts/props-panel/PropsPanel.vue +6 -0
- package/src/layouts/workspace/viewer/Stage.vue +4 -29
- package/src/layouts/workspace/viewer/StageOverlay.vue +25 -6
- package/src/services/BaseService.ts +18 -9
- package/src/services/codeBlock.ts +1 -1
- package/src/services/componentList.ts +1 -1
- package/src/services/dep.ts +1 -1
- package/src/services/editor.ts +1 -1
- package/src/services/events.ts +1 -1
- package/src/services/history.ts +1 -1
- package/src/services/keybinding.ts +12 -0
- package/src/services/props.ts +1 -1
- package/src/services/stageOverlay.ts +1 -1
- package/src/services/ui.ts +1 -1
- package/src/theme/stage.scss +6 -11
- package/src/type.ts +4 -4
- package/src/utils/config.ts +1 -1
- package/src/utils/editor.ts +1 -1
- package/src/utils/index.ts +1 -1
- package/src/utils/logger.ts +1 -1
- package/src/utils/props.ts +16 -2
- package/src/utils/undo-redo.ts +1 -1
- package/types/index.d.ts +65 -145
package/src/theme/stage.scss
CHANGED
|
@@ -35,22 +35,15 @@
|
|
|
35
35
|
width: 100%;
|
|
36
36
|
height: 100%;
|
|
37
37
|
background-color: #fff;
|
|
38
|
-
display: flex;
|
|
39
38
|
z-index: 20;
|
|
40
|
-
overflow: auto;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.m-editor-stage-overlay-container {
|
|
44
|
-
position: relative;
|
|
45
|
-
flex-shrink: 0;
|
|
46
|
-
margin: auto;
|
|
47
|
-
box-shadow: rgba(0, 0, 0, 0.04) 0px 3px 5px;
|
|
48
39
|
}
|
|
49
40
|
|
|
50
41
|
.m-editor-stage-overlay-close.tmagic-design-icon {
|
|
51
42
|
position: fixed;
|
|
52
43
|
right: 20px;
|
|
53
44
|
top: 10px;
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
z-index: 1;
|
|
54
47
|
}
|
|
55
48
|
|
|
56
49
|
.m-editor-stage-float-button {
|
|
@@ -66,8 +59,10 @@
|
|
|
66
59
|
background-color: #ffffff;
|
|
67
60
|
transition: background-color 0.2s;
|
|
68
61
|
color: rgba(0, 0, 0, 0.88);
|
|
69
|
-
box-shadow:
|
|
70
|
-
0
|
|
62
|
+
box-shadow:
|
|
63
|
+
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
64
|
+
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
65
|
+
0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
|
71
66
|
}
|
|
72
67
|
|
|
73
68
|
.m-editor-node-list-menu {
|
package/src/type.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Tencent is pleased to support the open source community by making TMagicEditor available.
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2025 Tencent. All rights reserved.
|
|
5
5
|
*
|
|
6
6
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
* you may not use this file except in compliance with the License.
|
|
@@ -26,9 +26,8 @@ import type { FormConfig, TableColumnConfig } from '@tmagic/form';
|
|
|
26
26
|
import type StageCore from '@tmagic/stage';
|
|
27
27
|
import type {
|
|
28
28
|
ContainerHighlightType,
|
|
29
|
-
|
|
29
|
+
CustomizeMoveableOptions,
|
|
30
30
|
GuidesOptions,
|
|
31
|
-
MoveableOptions,
|
|
32
31
|
RenderType,
|
|
33
32
|
UpdateDragEl,
|
|
34
33
|
} from '@tmagic/stage';
|
|
@@ -157,13 +156,14 @@ export interface StageOptions {
|
|
|
157
156
|
containerHighlightType?: ContainerHighlightType;
|
|
158
157
|
disabledDragStart?: boolean;
|
|
159
158
|
render?: (stage: StageCore) => HTMLDivElement | void | Promise<HTMLDivElement | void>;
|
|
160
|
-
moveableOptions?:
|
|
159
|
+
moveableOptions?: CustomizeMoveableOptions;
|
|
161
160
|
canSelect?: (el: HTMLElement) => boolean | Promise<boolean>;
|
|
162
161
|
isContainer?: (el: HTMLElement) => boolean | Promise<boolean>;
|
|
163
162
|
updateDragEl?: UpdateDragEl;
|
|
164
163
|
renderType?: RenderType;
|
|
165
164
|
guidesOptions?: Partial<GuidesOptions>;
|
|
166
165
|
disabledMultiSelect?: boolean;
|
|
166
|
+
disabledRule?: boolean;
|
|
167
167
|
zoom?: number;
|
|
168
168
|
}
|
|
169
169
|
|
package/src/utils/config.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Tencent is pleased to support the open source community by making TMagicEditor available.
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2025 Tencent. All rights reserved.
|
|
5
5
|
*
|
|
6
6
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
* you may not use this file except in compliance with the License.
|
package/src/utils/editor.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Tencent is pleased to support the open source community by making TMagicEditor available.
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2025 Tencent. All rights reserved.
|
|
5
5
|
*
|
|
6
6
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
* you may not use this file except in compliance with the License.
|
package/src/utils/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Tencent is pleased to support the open source community by making TMagicEditor available.
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2025 Tencent. All rights reserved.
|
|
5
5
|
*
|
|
6
6
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
* you may not use this file except in compliance with the License.
|
package/src/utils/logger.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Tencent is pleased to support the open source community by making TMagicEditor available.
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2025 Tencent. All rights reserved.
|
|
5
5
|
*
|
|
6
6
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
* you may not use this file except in compliance with the License.
|
package/src/utils/props.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/*
|
|
3
3
|
* Tencent is pleased to support the open source community by making TMagicEditor available.
|
|
4
4
|
*
|
|
5
|
-
* Copyright (C)
|
|
5
|
+
* Copyright (C) 2025 Tencent. All rights reserved.
|
|
6
6
|
*
|
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
8
|
* you may not use this file except in compliance with the License.
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import { NODE_CONDS_KEY } from '@tmagic/core';
|
|
20
|
+
import { NODE_CONDS_KEY, NODE_DISABLE_CODE_BLOCK_KEY, NODE_DISABLE_DATA_SOURCE_KEY } from '@tmagic/core';
|
|
21
21
|
import { tMagicMessage } from '@tmagic/design';
|
|
22
22
|
import type { FormConfig, FormState, TabConfig, TabPaneConfig } from '@tmagic/form';
|
|
23
23
|
|
|
@@ -123,6 +123,20 @@ export const advancedTabConfig: TabPaneConfig = {
|
|
|
123
123
|
title: '高级',
|
|
124
124
|
lazy: true,
|
|
125
125
|
items: [
|
|
126
|
+
{
|
|
127
|
+
name: NODE_DISABLE_CODE_BLOCK_KEY,
|
|
128
|
+
text: '禁用代码块',
|
|
129
|
+
type: 'switch',
|
|
130
|
+
defaultValue: false,
|
|
131
|
+
extra: '开启后,配置的代码块将不会被执行',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: NODE_DISABLE_DATA_SOURCE_KEY,
|
|
135
|
+
text: '禁用数据源',
|
|
136
|
+
type: 'switch',
|
|
137
|
+
defaultValue: false,
|
|
138
|
+
extra: '开启后,组件内配置的数据源相关配置将不会被编译,显隐条件将失效',
|
|
139
|
+
},
|
|
126
140
|
{
|
|
127
141
|
name: 'created',
|
|
128
142
|
text: 'created',
|
package/src/utils/undo-redo.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Tencent is pleased to support the open source community by making TMagicEditor available.
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2025 Tencent. All rights reserved.
|
|
5
5
|
*
|
|
6
6
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
* you may not use this file except in compliance with the License.
|