@tmagic/editor 1.4.6 → 1.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +1 -1
- package/dist/tmagic-editor.js +636 -589
- package/dist/tmagic-editor.umd.cjs +634 -586
- package/package.json +15 -11
- package/types/editorProps.d.ts +0 -7
- package/types/layouts/PropsPanel.vue.d.ts +9 -9
- package/types/layouts/sidebar/layer/use-click.d.ts +1 -1
- package/types/services/codeBlock.d.ts +2 -1
- package/types/services/dataSource.d.ts +2 -1
- package/types/services/dep.d.ts +12 -2
- package/types/services/editor.d.ts +22 -4
- package/types/services/props.d.ts +7 -6
- package/types/type.d.ts +6 -0
- package/types/utils/editor.d.ts +1 -0
- package/types/utils/idle-task.d.ts +14 -0
- package/types/utils/operator.d.ts +2 -2
- package/src/Editor.vue +0 -211
- package/src/components/CodeBlockEditor.vue +0 -268
- package/src/components/CodeParams.vue +0 -60
- package/src/components/ContentMenu.vue +0 -193
- package/src/components/FloatingBox.vue +0 -178
- package/src/components/Icon.vue +0 -27
- package/src/components/Resizer.vue +0 -23
- package/src/components/ScrollBar.vue +0 -151
- package/src/components/ScrollViewer.vue +0 -128
- package/src/components/SearchInput.vue +0 -37
- package/src/components/SplitView.vue +0 -186
- package/src/components/ToolButton.vue +0 -138
- package/src/components/Tree.vue +0 -71
- package/src/components/TreeNode.vue +0 -148
- package/src/editorProps.ts +0 -124
- package/src/fields/Code.vue +0 -50
- package/src/fields/CodeLink.vue +0 -80
- package/src/fields/CodeSelect.vue +0 -132
- package/src/fields/CodeSelectCol.vue +0 -139
- package/src/fields/DataSourceFieldSelect.vue +0 -149
- package/src/fields/DataSourceFields.vue +0 -323
- package/src/fields/DataSourceInput.vue +0 -325
- package/src/fields/DataSourceMethodSelect.vue +0 -153
- package/src/fields/DataSourceMethods.vue +0 -104
- package/src/fields/DataSourceMocks.vue +0 -255
- package/src/fields/DataSourceSelect.vue +0 -98
- package/src/fields/EventSelect.vue +0 -301
- package/src/fields/KeyValue.vue +0 -137
- package/src/fields/PageFragmentSelect.vue +0 -63
- package/src/fields/UISelect.vue +0 -135
- package/src/hooks/index.ts +0 -24
- package/src/hooks/use-code-block-edit.ts +0 -83
- package/src/hooks/use-data-source-edit.ts +0 -46
- package/src/hooks/use-data-source-method.ts +0 -100
- package/src/hooks/use-editor-content-height.ts +0 -26
- package/src/hooks/use-filter.ts +0 -55
- package/src/hooks/use-float-box.ts +0 -76
- package/src/hooks/use-getso.ts +0 -35
- package/src/hooks/use-next-float-box-position.ts +0 -29
- package/src/hooks/use-node-status.ts +0 -48
- package/src/hooks/use-stage.ts +0 -129
- package/src/hooks/use-window-rect.ts +0 -20
- package/src/icons/AppManageIcon.vue +0 -15
- package/src/icons/CenterIcon.vue +0 -13
- package/src/icons/CodeIcon.vue +0 -28
- package/src/icons/FolderMinusIcon.vue +0 -22
- package/src/icons/PinIcon.vue +0 -25
- package/src/icons/PinnedIcon.vue +0 -25
- package/src/index.ts +0 -118
- package/src/initService.ts +0 -447
- package/src/layouts/AddPageBox.vue +0 -55
- package/src/layouts/CodeEditor.vue +0 -226
- package/src/layouts/Framework.vue +0 -163
- package/src/layouts/NavMenu.vue +0 -200
- package/src/layouts/PropsPanel.vue +0 -130
- package/src/layouts/page-bar/AddButton.vue +0 -48
- package/src/layouts/page-bar/PageBar.vue +0 -159
- package/src/layouts/page-bar/PageBarScrollContainer.vue +0 -156
- package/src/layouts/page-bar/SwitchTypeButton.vue +0 -45
- package/src/layouts/sidebar/ComponentListPanel.vue +0 -134
- package/src/layouts/sidebar/Sidebar.vue +0 -278
- package/src/layouts/sidebar/code-block/CodeBlockList.vue +0 -142
- package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +0 -70
- package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +0 -84
- package/src/layouts/sidebar/data-source/DataSourceList.vue +0 -160
- package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +0 -106
- package/src/layouts/sidebar/layer/LayerMenu.vue +0 -128
- package/src/layouts/sidebar/layer/LayerNodeTool.vue +0 -32
- package/src/layouts/sidebar/layer/LayerPanel.vue +0 -119
- package/src/layouts/sidebar/layer/use-click.ts +0 -110
- package/src/layouts/sidebar/layer/use-drag.ts +0 -161
- package/src/layouts/sidebar/layer/use-keybinding.ts +0 -54
- package/src/layouts/sidebar/layer/use-node-status.ts +0 -114
- package/src/layouts/workspace/Breadcrumb.vue +0 -35
- package/src/layouts/workspace/Workspace.vue +0 -46
- package/src/layouts/workspace/viewer/NodeListMenu.vue +0 -115
- package/src/layouts/workspace/viewer/Stage.vue +0 -246
- package/src/layouts/workspace/viewer/StageOverlay.vue +0 -68
- package/src/layouts/workspace/viewer/ViewerMenu.vue +0 -145
- package/src/services/BaseService.ts +0 -230
- package/src/services/codeBlock.ts +0 -324
- package/src/services/componentList.ts +0 -58
- package/src/services/dataSource.ts +0 -209
- package/src/services/dep.ts +0 -80
- package/src/services/editor.ts +0 -1087
- package/src/services/events.ts +0 -93
- package/src/services/history.ts +0 -126
- package/src/services/keybinding.ts +0 -220
- package/src/services/props.ts +0 -265
- package/src/services/stageOverlay.ts +0 -212
- package/src/services/storage.ts +0 -155
- package/src/services/ui.ts +0 -156
- package/src/shims-vue.d.ts +0 -6
- package/src/theme/breadcrumb.scss +0 -6
- package/src/theme/code-block.scss +0 -6
- package/src/theme/code-editor.scss +0 -38
- package/src/theme/common/var.scss +0 -14
- package/src/theme/component-list-panel.scss +0 -95
- package/src/theme/content-menu.scss +0 -76
- package/src/theme/data-source-field.scss +0 -12
- package/src/theme/data-source-fields.scss +0 -13
- package/src/theme/data-source-input.scss +0 -18
- package/src/theme/data-source-methods.scss +0 -13
- package/src/theme/data-source.scss +0 -28
- package/src/theme/event.scss +0 -37
- package/src/theme/floating-box.scss +0 -32
- package/src/theme/framework.scss +0 -69
- package/src/theme/icon.scss +0 -12
- package/src/theme/index.scss +0 -10
- package/src/theme/key-value.scss +0 -20
- package/src/theme/layer-panel.scss +0 -26
- package/src/theme/layout.scss +0 -9
- package/src/theme/nav-menu.scss +0 -78
- package/src/theme/page-bar.scss +0 -89
- package/src/theme/page-fragment-select.scss +0 -14
- package/src/theme/props-panel.scss +0 -55
- package/src/theme/resizer.scss +0 -66
- package/src/theme/ruler.scss +0 -38
- package/src/theme/search-input.scss +0 -14
- package/src/theme/sidebar.scss +0 -79
- package/src/theme/stage.scss +0 -76
- package/src/theme/theme.scss +0 -27
- package/src/theme/tree.scss +0 -89
- package/src/theme/workspace.scss +0 -9
- package/src/type.ts +0 -746
- package/src/utils/compose.ts +0 -52
- package/src/utils/config.ts +0 -29
- package/src/utils/content-menu.ts +0 -95
- package/src/utils/data-source/formConfigs/base.ts +0 -30
- package/src/utils/data-source/formConfigs/http.ts +0 -60
- package/src/utils/data-source/index.ts +0 -236
- package/src/utils/editor.ts +0 -294
- package/src/utils/index.ts +0 -24
- package/src/utils/keybinding-config.ts +0 -125
- package/src/utils/logger.ts +0 -47
- package/src/utils/monaco-editor.ts +0 -8
- package/src/utils/operator.ts +0 -106
- package/src/utils/props.ts +0 -504
- package/src/utils/scroll-viewer.ts +0 -165
- package/src/utils/tree.ts +0 -15
- package/src/utils/undo-redo.ts +0 -76
- package/tsconfig.build.json +0 -16
package/src/theme/ruler.scss
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
#ruler-container {
|
|
2
|
-
width: calc(100% + 40px);
|
|
3
|
-
position: absolute;
|
|
4
|
-
top: -40px;
|
|
5
|
-
left: -40px;
|
|
6
|
-
height: 40px;
|
|
7
|
-
z-index: 100000;
|
|
8
|
-
|
|
9
|
-
.moveable-line {
|
|
10
|
-
display: none;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.moveable-control.moveable-origin {
|
|
14
|
-
display: none;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
#ruler-container::after {
|
|
19
|
-
content: "";
|
|
20
|
-
position: absolute;
|
|
21
|
-
left: 100%;
|
|
22
|
-
top: 0;
|
|
23
|
-
width: calc(2000px - 100%);
|
|
24
|
-
height: 100%;
|
|
25
|
-
background-color: white;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
#horizontal {
|
|
29
|
-
width: 2000px;
|
|
30
|
-
max-width: fit-content;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
#vertical {
|
|
34
|
-
position: absolute;
|
|
35
|
-
height: 1000px;
|
|
36
|
-
top: 0;
|
|
37
|
-
left: 0;
|
|
38
|
-
}
|
package/src/theme/sidebar.scss
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
.m-editor-sidebar {
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100%;
|
|
4
|
-
|
|
5
|
-
.m-editor-sidebar-header {
|
|
6
|
-
background: $--sidebar-heder-background-color;
|
|
7
|
-
height: 100%;
|
|
8
|
-
width: 40px;
|
|
9
|
-
|
|
10
|
-
.m-editor-sidebar-header-item {
|
|
11
|
-
line-height: 15px;
|
|
12
|
-
height: auto;
|
|
13
|
-
padding: 8px;
|
|
14
|
-
color: rgb(255, 255, 255);
|
|
15
|
-
box-sizing: border-box;
|
|
16
|
-
cursor: pointer;
|
|
17
|
-
|
|
18
|
-
&.is-active {
|
|
19
|
-
background: $--sidebar-content-background-color;
|
|
20
|
-
|
|
21
|
-
i {
|
|
22
|
-
color: #353140;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.magic-editor-tab-panel-title {
|
|
26
|
-
color: #353140;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
i {
|
|
32
|
-
font-size: 25px;
|
|
33
|
-
color: rgba(255, 255, 255, 0.6);
|
|
34
|
-
|
|
35
|
-
&:hover {
|
|
36
|
-
color: rgb(255, 255, 255);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.magic-editor-tab-panel-title {
|
|
41
|
-
font-size: 12px;
|
|
42
|
-
white-space: normal;
|
|
43
|
-
user-select: none;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.m-editor-sidebar-content {
|
|
48
|
-
height: 100%;
|
|
49
|
-
width: calc(100% - 40px);
|
|
50
|
-
overflow: auto;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.fold-icon {
|
|
54
|
-
position: absolute;
|
|
55
|
-
bottom: 8px;
|
|
56
|
-
left: 0px;
|
|
57
|
-
width: 45px;
|
|
58
|
-
padding-left: 8px;
|
|
59
|
-
color: #fff;
|
|
60
|
-
font-size: 32px;
|
|
61
|
-
opacity: 0.8;
|
|
62
|
-
cursor: pointer;
|
|
63
|
-
|
|
64
|
-
&:hover {
|
|
65
|
-
background: rgba(0, 0, 0, 0.2);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.m-editor-slide-list-box {
|
|
71
|
-
> div {
|
|
72
|
-
&:first-child {
|
|
73
|
-
min-width: 240px;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
.m-form-box {
|
|
77
|
-
border-left: 1px solid #e0e0e0;
|
|
78
|
-
}
|
|
79
|
-
}
|
package/src/theme/stage.scss
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
.m-editor-stage {
|
|
2
|
-
position: relative;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: calc(100% - #{$--page-bar-height});
|
|
5
|
-
overflow: hidden;
|
|
6
|
-
display: flex;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
align-items: center;
|
|
9
|
-
|
|
10
|
-
&:focus-visible {
|
|
11
|
-
outline: none;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.m-editor-stage-container {
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: 100%;
|
|
18
|
-
z-index: 0;
|
|
19
|
-
position: relative;
|
|
20
|
-
transition: transform 0.3s;
|
|
21
|
-
box-sizing: content-box;
|
|
22
|
-
box-shadow: rgba(0, 0, 0, 0.04) 0px 3px 5px;
|
|
23
|
-
|
|
24
|
-
&::-webkit-scrollbar {
|
|
25
|
-
width: 0 !important;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.m-editor-stage-overlay {
|
|
30
|
-
position: absolute;
|
|
31
|
-
left: 0;
|
|
32
|
-
top: 0;
|
|
33
|
-
width: 100%;
|
|
34
|
-
height: 100%;
|
|
35
|
-
background-color: #fff;
|
|
36
|
-
display: flex;
|
|
37
|
-
z-index: 20;
|
|
38
|
-
overflow: auto;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.m-editor-stage-overlay-container {
|
|
42
|
-
position: relative;
|
|
43
|
-
flex-shrink: 0;
|
|
44
|
-
margin: auto;
|
|
45
|
-
box-shadow: rgba(0, 0, 0, 0.04) 0px 3px 5px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.m-editor-stage-overlay-close.tmagic-design-icon {
|
|
49
|
-
position: fixed;
|
|
50
|
-
right: 20px;
|
|
51
|
-
top: 10px;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.m-editor-stage-float-button {
|
|
55
|
-
cursor: pointer;
|
|
56
|
-
transform: translateY(-50%);
|
|
57
|
-
width: 12px;
|
|
58
|
-
font-size: 12px;
|
|
59
|
-
line-height: 1.2;
|
|
60
|
-
position: absolute;
|
|
61
|
-
left: 100%;
|
|
62
|
-
top: 50%;
|
|
63
|
-
padding: 5px;
|
|
64
|
-
background-color: #ffffff;
|
|
65
|
-
transition: background-color 0.2s;
|
|
66
|
-
color: rgba(0, 0, 0, 0.88);
|
|
67
|
-
box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
68
|
-
0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.m-editor-node-list-menu {
|
|
72
|
-
height: 100%;
|
|
73
|
-
width: 100%;
|
|
74
|
-
min-width: 300px;
|
|
75
|
-
max-height: 500px;
|
|
76
|
-
}
|
package/src/theme/theme.scss
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
@import "./search-input.scss";
|
|
2
|
-
@import "./nav-menu.scss";
|
|
3
|
-
@import "./framework.scss";
|
|
4
|
-
@import "./sidebar.scss";
|
|
5
|
-
@import "./layer-panel.scss";
|
|
6
|
-
@import "./component-list-panel.scss";
|
|
7
|
-
@import "./resizer.scss";
|
|
8
|
-
@import "./workspace.scss";
|
|
9
|
-
@import "./page-bar.scss";
|
|
10
|
-
@import "./props-panel.scss";
|
|
11
|
-
@import "./content-menu.scss";
|
|
12
|
-
@import "./stage.scss";
|
|
13
|
-
@import "./code-editor.scss";
|
|
14
|
-
@import "./icon.scss";
|
|
15
|
-
@import "./code-block.scss";
|
|
16
|
-
@import "./event.scss";
|
|
17
|
-
@import "./layout.scss";
|
|
18
|
-
@import "./breadcrumb.scss";
|
|
19
|
-
@import "./data-source.scss";
|
|
20
|
-
@import "./data-source-fields.scss";
|
|
21
|
-
@import "./data-source-methods.scss";
|
|
22
|
-
@import "./data-source-input.scss";
|
|
23
|
-
@import "./key-value.scss";
|
|
24
|
-
@import "./tree.scss";
|
|
25
|
-
@import "./floating-box.scss";
|
|
26
|
-
@import "./page-fragment-select.scss";
|
|
27
|
-
@import "./data-source-field.scss";
|
package/src/theme/tree.scss
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
.m-editor-tree {
|
|
2
|
-
$--node-height: 22px;
|
|
3
|
-
color: $--font-color;
|
|
4
|
-
font-size: 13px;
|
|
5
|
-
|
|
6
|
-
.m-editor-tree-node {
|
|
7
|
-
cursor: pointer;
|
|
8
|
-
white-space: nowrap;
|
|
9
|
-
|
|
10
|
-
.tree-node {
|
|
11
|
-
display: flex;
|
|
12
|
-
align-items: center;
|
|
13
|
-
|
|
14
|
-
&:hover {
|
|
15
|
-
background-color: $--hover-color;
|
|
16
|
-
color: $--font-color;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&.selected {
|
|
20
|
-
background-color: $--theme-color;
|
|
21
|
-
color: $--hover-color;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&.drag-inner {
|
|
25
|
-
.tree-node-content {
|
|
26
|
-
background-color: rgba($color: $--theme-color, $alpha: 0.5);
|
|
27
|
-
color: $--hover-color;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&.drag-before {
|
|
32
|
-
.tree-node-content {
|
|
33
|
-
border-top-color: rgba($color: $--theme-color, $alpha: 0.5);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&.drag-after {
|
|
38
|
-
.tree-node-content {
|
|
39
|
-
border-bottom-color: rgba($color: $--theme-color, $alpha: 0.5);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.expand-icon {
|
|
44
|
-
padding: 4px;
|
|
45
|
-
box-sizing: content-box;
|
|
46
|
-
font-size: 14px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.tree-node-content {
|
|
50
|
-
display: flex;
|
|
51
|
-
flex: 1;
|
|
52
|
-
justify-content: space-between;
|
|
53
|
-
height: $--node-height;
|
|
54
|
-
border-top: 2px solid transparent;
|
|
55
|
-
border-bottom: 2px solid transparent;
|
|
56
|
-
.tree-node-label {
|
|
57
|
-
line-height: $--node-height;
|
|
58
|
-
flex: 1;
|
|
59
|
-
width: 100px;
|
|
60
|
-
overflow: hidden;
|
|
61
|
-
text-overflow: ellipsis;
|
|
62
|
-
|
|
63
|
-
.disabled {
|
|
64
|
-
cursor: default;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.hook {
|
|
68
|
-
color: #999;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.tree-node-tool {
|
|
74
|
-
display: flex;
|
|
75
|
-
align-items: center;
|
|
76
|
-
|
|
77
|
-
.tmagic-design-icon {
|
|
78
|
-
margin-right: 10px;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.m-editor-tree-empty {
|
|
85
|
-
text-align: center;
|
|
86
|
-
color: #909399;
|
|
87
|
-
font-size: 14px;
|
|
88
|
-
}
|
|
89
|
-
}
|