@tmagic/editor 1.4.8 → 1.4.9

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.
Files changed (143) hide show
  1. package/package.json +11 -11
  2. package/src/Editor.vue +211 -0
  3. package/src/components/CodeBlockEditor.vue +268 -0
  4. package/src/components/CodeParams.vue +60 -0
  5. package/src/components/ContentMenu.vue +193 -0
  6. package/src/components/FloatingBox.vue +178 -0
  7. package/src/components/Icon.vue +27 -0
  8. package/src/components/Resizer.vue +23 -0
  9. package/src/components/ScrollBar.vue +151 -0
  10. package/src/components/ScrollViewer.vue +128 -0
  11. package/src/components/SearchInput.vue +37 -0
  12. package/src/components/SplitView.vue +186 -0
  13. package/src/components/ToolButton.vue +138 -0
  14. package/src/components/Tree.vue +71 -0
  15. package/src/components/TreeNode.vue +150 -0
  16. package/src/editorProps.ts +117 -0
  17. package/src/fields/Code.vue +50 -0
  18. package/src/fields/CodeLink.vue +80 -0
  19. package/src/fields/CodeSelect.vue +132 -0
  20. package/src/fields/CodeSelectCol.vue +139 -0
  21. package/src/fields/DataSourceFieldSelect.vue +149 -0
  22. package/src/fields/DataSourceFields.vue +323 -0
  23. package/src/fields/DataSourceInput.vue +339 -0
  24. package/src/fields/DataSourceMethodSelect.vue +153 -0
  25. package/src/fields/DataSourceMethods.vue +104 -0
  26. package/src/fields/DataSourceMocks.vue +255 -0
  27. package/src/fields/DataSourceSelect.vue +98 -0
  28. package/src/fields/EventSelect.vue +375 -0
  29. package/src/fields/KeyValue.vue +137 -0
  30. package/src/fields/PageFragmentSelect.vue +63 -0
  31. package/src/fields/UISelect.vue +135 -0
  32. package/src/hooks/index.ts +24 -0
  33. package/src/hooks/use-code-block-edit.ts +83 -0
  34. package/src/hooks/use-data-source-edit.ts +46 -0
  35. package/src/hooks/use-data-source-method.ts +100 -0
  36. package/src/hooks/use-editor-content-height.ts +26 -0
  37. package/src/hooks/use-filter.ts +55 -0
  38. package/src/hooks/use-float-box.ts +76 -0
  39. package/src/hooks/use-getso.ts +35 -0
  40. package/src/hooks/use-next-float-box-position.ts +29 -0
  41. package/src/hooks/use-node-status.ts +48 -0
  42. package/src/hooks/use-stage.ts +129 -0
  43. package/src/hooks/use-window-rect.ts +20 -0
  44. package/src/icons/AppManageIcon.vue +15 -0
  45. package/src/icons/CenterIcon.vue +13 -0
  46. package/src/icons/CodeIcon.vue +28 -0
  47. package/src/icons/FolderMinusIcon.vue +22 -0
  48. package/src/icons/PinIcon.vue +25 -0
  49. package/src/icons/PinnedIcon.vue +25 -0
  50. package/src/index.ts +118 -0
  51. package/src/initService.ts +448 -0
  52. package/src/layouts/AddPageBox.vue +55 -0
  53. package/src/layouts/CodeEditor.vue +226 -0
  54. package/src/layouts/Framework.vue +163 -0
  55. package/src/layouts/NavMenu.vue +200 -0
  56. package/src/layouts/PropsPanel.vue +131 -0
  57. package/src/layouts/page-bar/AddButton.vue +48 -0
  58. package/src/layouts/page-bar/PageBar.vue +159 -0
  59. package/src/layouts/page-bar/PageBarScrollContainer.vue +156 -0
  60. package/src/layouts/page-bar/SwitchTypeButton.vue +45 -0
  61. package/src/layouts/sidebar/ComponentListPanel.vue +134 -0
  62. package/src/layouts/sidebar/Sidebar.vue +278 -0
  63. package/src/layouts/sidebar/code-block/CodeBlockList.vue +160 -0
  64. package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +70 -0
  65. package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +84 -0
  66. package/src/layouts/sidebar/data-source/DataSourceList.vue +172 -0
  67. package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +106 -0
  68. package/src/layouts/sidebar/layer/LayerMenu.vue +128 -0
  69. package/src/layouts/sidebar/layer/LayerNodeTool.vue +32 -0
  70. package/src/layouts/sidebar/layer/LayerPanel.vue +119 -0
  71. package/src/layouts/sidebar/layer/use-click.ts +113 -0
  72. package/src/layouts/sidebar/layer/use-drag.ts +167 -0
  73. package/src/layouts/sidebar/layer/use-keybinding.ts +54 -0
  74. package/src/layouts/sidebar/layer/use-node-status.ts +114 -0
  75. package/src/layouts/workspace/Breadcrumb.vue +35 -0
  76. package/src/layouts/workspace/Workspace.vue +46 -0
  77. package/src/layouts/workspace/viewer/NodeListMenu.vue +115 -0
  78. package/src/layouts/workspace/viewer/Stage.vue +246 -0
  79. package/src/layouts/workspace/viewer/StageOverlay.vue +68 -0
  80. package/src/layouts/workspace/viewer/ViewerMenu.vue +145 -0
  81. package/src/services/BaseService.ts +230 -0
  82. package/src/services/codeBlock.ts +327 -0
  83. package/src/services/componentList.ts +58 -0
  84. package/src/services/dataSource.ts +216 -0
  85. package/src/services/dep.ts +152 -0
  86. package/src/services/editor.ts +1135 -0
  87. package/src/services/events.ts +93 -0
  88. package/src/services/history.ts +126 -0
  89. package/src/services/keybinding.ts +220 -0
  90. package/src/services/props.ts +286 -0
  91. package/src/services/stageOverlay.ts +212 -0
  92. package/src/services/storage.ts +155 -0
  93. package/src/services/ui.ts +156 -0
  94. package/src/shims-vue.d.ts +6 -0
  95. package/src/theme/breadcrumb.scss +6 -0
  96. package/src/theme/code-block.scss +6 -0
  97. package/src/theme/code-editor.scss +38 -0
  98. package/src/theme/common/var.scss +14 -0
  99. package/src/theme/component-list-panel.scss +95 -0
  100. package/src/theme/content-menu.scss +76 -0
  101. package/src/theme/data-source-field.scss +12 -0
  102. package/src/theme/data-source-fields.scss +13 -0
  103. package/src/theme/data-source-input.scss +18 -0
  104. package/src/theme/data-source-methods.scss +13 -0
  105. package/src/theme/data-source.scss +28 -0
  106. package/src/theme/event.scss +37 -0
  107. package/src/theme/floating-box.scss +32 -0
  108. package/src/theme/framework.scss +69 -0
  109. package/src/theme/icon.scss +12 -0
  110. package/src/theme/index.scss +10 -0
  111. package/src/theme/key-value.scss +20 -0
  112. package/src/theme/layer-panel.scss +26 -0
  113. package/src/theme/layout.scss +9 -0
  114. package/src/theme/nav-menu.scss +78 -0
  115. package/src/theme/page-bar.scss +89 -0
  116. package/src/theme/page-fragment-select.scss +14 -0
  117. package/src/theme/props-panel.scss +55 -0
  118. package/src/theme/resizer.scss +66 -0
  119. package/src/theme/ruler.scss +38 -0
  120. package/src/theme/search-input.scss +14 -0
  121. package/src/theme/sidebar.scss +79 -0
  122. package/src/theme/stage.scss +76 -0
  123. package/src/theme/theme.scss +27 -0
  124. package/src/theme/tree.scss +89 -0
  125. package/src/theme/workspace.scss +9 -0
  126. package/src/type.ts +749 -0
  127. package/src/utils/compose.ts +52 -0
  128. package/src/utils/config.ts +29 -0
  129. package/src/utils/content-menu.ts +95 -0
  130. package/src/utils/data-source/formConfigs/base.ts +30 -0
  131. package/src/utils/data-source/formConfigs/http.ts +60 -0
  132. package/src/utils/data-source/index.ts +243 -0
  133. package/src/utils/editor.ts +313 -0
  134. package/src/utils/idle-task.ts +72 -0
  135. package/src/utils/index.ts +24 -0
  136. package/src/utils/keybinding-config.ts +125 -0
  137. package/src/utils/logger.ts +47 -0
  138. package/src/utils/monaco-editor.ts +8 -0
  139. package/src/utils/operator.ts +106 -0
  140. package/src/utils/props.ts +504 -0
  141. package/src/utils/scroll-viewer.ts +165 -0
  142. package/src/utils/tree.ts +15 -0
  143. package/src/utils/undo-redo.ts +76 -0
@@ -0,0 +1,9 @@
1
+ .m-editor-layout {
2
+ width: 100%;
3
+ display: flex;
4
+ justify-self: space-between;
5
+
6
+ &:has(.m-editor-resizer-draging) {
7
+ overflow: hidden;
8
+ }
9
+ }
@@ -0,0 +1,78 @@
1
+ .m-editor-nav-menu {
2
+ display: flex;
3
+ z-index: 5;
4
+ -webkit-box-pack: justify;
5
+ justify-content: space-between;
6
+ -webkit-box-align: center;
7
+ align-items: center;
8
+ background-color: $--nav--background-color;
9
+ font-size: 19.2px;
10
+ color: $--nav-color;
11
+ font-weight: 400;
12
+ box-sizing: border-box;
13
+ margin: 0px;
14
+ flex: 0 0 $--nav-height;
15
+ border-bottom: 1px solid #d8dee8;
16
+
17
+ > div {
18
+ display: flex;
19
+ height: 100%;
20
+ z-index: 1;
21
+ align-items: center;
22
+ }
23
+
24
+ .menu-center {
25
+ justify-content: center;
26
+ }
27
+
28
+ .menu-right {
29
+ justify-content: flex-end;
30
+ }
31
+
32
+ .menu-item {
33
+ flex-direction: row;
34
+ -webkit-box-align: center;
35
+ align-items: center;
36
+ vertical-align: middle;
37
+ font-size: 14px;
38
+ line-height: 1;
39
+ height: 100%;
40
+ color: rgba(255, 255, 255, 0.7);
41
+ box-sizing: inherit;
42
+ z-index: 1;
43
+ display: flex !important;
44
+ transition: all 0.3s ease 0s;
45
+ border-bottom: 2px solid transparent;
46
+ margin: 0;
47
+
48
+ .is-disabled {
49
+ opacity: 0.5;
50
+ }
51
+
52
+ .is-text {
53
+ padding: 5px;
54
+ }
55
+
56
+ .is-text > i {
57
+ color: $--font-color;
58
+ }
59
+
60
+ .icon {
61
+ display: flex;
62
+ -webkit-box-align: center;
63
+ align-items: center;
64
+ height: 100%;
65
+ padding: 0px 8px;
66
+ }
67
+
68
+ .menu-item-text {
69
+ color: $--nav-color;
70
+ }
71
+
72
+ &.rule {
73
+ .el-icon {
74
+ transform: rotate(-90deg);
75
+ }
76
+ }
77
+ }
78
+ }
@@ -0,0 +1,89 @@
1
+ .m-editor-page-bar-tabs {
2
+ position: fixed;
3
+ bottom: 0;
4
+ left: 0;
5
+ width: 100%;
6
+
7
+ .tmagic-design-button.m-editor-page-bar-switch-type-button {
8
+ margin-left: 7px;
9
+ position: relative;
10
+ top: 1px;
11
+ border-radius: 3px 3px 0 0;
12
+ border: 1px solid $--border-color;
13
+ border-bottom: 1px solid transparent;
14
+
15
+ &.active {
16
+ background-color: #f3f3f3;
17
+ }
18
+ }
19
+ }
20
+
21
+ .m-editor-page-bar {
22
+ display: flex;
23
+ width: 100%;
24
+ height: $--page-bar-height;
25
+ line-height: $--page-bar-height;
26
+ color: $--font-color;
27
+ background-color: #f3f3f3;
28
+ border-top: 1px solid $--border-color;
29
+ z-index: 2;
30
+ overflow: hidden;
31
+
32
+ &-items {
33
+ display: flex;
34
+ transition: transform 0.3s;
35
+ }
36
+
37
+ &-item {
38
+ padding: 0 10px;
39
+ cursor: pointer;
40
+ border-right: 1px solid $--border-color;
41
+ display: flex;
42
+ justify-items: center;
43
+ align-items: center;
44
+ background-color: #f3f3f3;
45
+ white-space: nowrap;
46
+
47
+ &.active {
48
+ background-color: #fff;
49
+ cursor: text;
50
+
51
+ .m-editor-page-bar-menu-icon {
52
+ cursor: pointer;
53
+ }
54
+ }
55
+
56
+ &-icon {
57
+ position: relative;
58
+ z-index: 1;
59
+ }
60
+
61
+ &-title {
62
+ max-width: 150px;
63
+ text-overflow: ellipsis;
64
+ white-space: nowrap;
65
+ overflow: hidden;
66
+ }
67
+ }
68
+ }
69
+
70
+ .page-bar-popover {
71
+ &.el-popper.el-popover {
72
+ padding: 10px 0;
73
+ }
74
+
75
+ .menu-item {
76
+ cursor: pointer;
77
+ transition: all 0.2s ease 0s;
78
+ padding: 5px 14px;
79
+
80
+ .el-button--text,
81
+ i {
82
+ color: $--font-color;
83
+ }
84
+
85
+ &:hover {
86
+ background-color: $--hover-color;
87
+ }
88
+ }
89
+ }
@@ -0,0 +1,14 @@
1
+ .m-fields-page-fragment-select {
2
+ width: 100%;
3
+ .page-fragment-select-container {
4
+ width: 100%;
5
+ display: flex;
6
+ align-items: center;
7
+ .select {
8
+ flex: 1;
9
+ }
10
+ .icon {
11
+ margin-left: 10px;
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,55 @@
1
+ .m-editor-props-panel {
2
+ padding: 0 10px 50px 10px;
3
+
4
+ .m-editor-props-panel-src-icon {
5
+ position: absolute;
6
+ right: 15px;
7
+ bottom: 15px;
8
+ z-index: 30;
9
+ }
10
+
11
+ .m-editor-props-panel-src-code.magic-code-editor {
12
+ position: absolute;
13
+ left: 0;
14
+ top: 0;
15
+ z-index: 10;
16
+ }
17
+
18
+ &.small {
19
+ .el-form-item__label {
20
+ font-size: 12px;
21
+ }
22
+
23
+ .m-fieldset {
24
+ legend {
25
+ font-size: 12px;
26
+ }
27
+ }
28
+
29
+ .el-tabs__item {
30
+ font-size: 12px;
31
+ }
32
+ }
33
+
34
+ .el-input__wrapper {
35
+ border-radius: 0;
36
+ }
37
+
38
+ .m-fields-group-list {
39
+ .tmagic-design-table {
40
+ th {
41
+ font-size: 12px;
42
+ }
43
+ }
44
+ }
45
+ }
46
+
47
+ .m-editor-props-panel-popper {
48
+ &.small {
49
+ span,
50
+ a,
51
+ p {
52
+ font-size: 12px;
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,66 @@
1
+ .m-editor-resizer {
2
+ border-left: 1px solid transparent;
3
+ border-right: 1px solid transparent;
4
+ width: 8px;
5
+ margin: 0 -5px;
6
+ height: 100%;
7
+ opacity: 0.8;
8
+ background: padding-box #d8dee8;
9
+ box-sizing: border-box;
10
+ cursor: col-resize;
11
+ z-index: 1;
12
+ position: relative;
13
+
14
+ &:hover {
15
+ border-color: #d8dee8;
16
+
17
+ .icon-container {
18
+ visibility: visible;
19
+ opacity: 1;
20
+ }
21
+ }
22
+
23
+ &.m-editor-resizer-draging {
24
+ &::after {
25
+ content: "";
26
+ position: absolute;
27
+ width: 600px;
28
+ height: 100%;
29
+ left: 0;
30
+ }
31
+
32
+ &::before {
33
+ content: "";
34
+ position: absolute;
35
+ width: 600px;
36
+ height: 100%;
37
+ right: 0;
38
+ }
39
+ }
40
+
41
+ .icon-container {
42
+ visibility: hidden;
43
+ opacity: 0;
44
+ transition: opacity 0.4s;
45
+ width: 20px;
46
+ height: 120px;
47
+ line-height: 120px;
48
+ text-align: center;
49
+ background: #d8dee8;
50
+ position: absolute;
51
+ top: 50%;
52
+ left: 50%;
53
+ transform: translate(-50%, -50%);
54
+ cursor: pointer;
55
+ &.position-left {
56
+ transform: translate(calc(-100% - 4px), -50%);
57
+ }
58
+ &.position-right {
59
+ transform: translate(calc(100% + 4px), -50%);
60
+ }
61
+ }
62
+ .icon {
63
+ color: #fff;
64
+ font-size: 18px;
65
+ }
66
+ }
@@ -0,0 +1,38 @@
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
+ }
@@ -0,0 +1,14 @@
1
+ .tmagic-design-input.search-input {
2
+ background: #fff;
3
+ color: #bbbbbb;
4
+ padding: 10px;
5
+ position: absolute;
6
+ top: 0;
7
+ left: 0;
8
+ box-sizing: border-box;
9
+ z-index: 1;
10
+
11
+ .el-input__prefix {
12
+ padding: 7px;
13
+ }
14
+ }
@@ -0,0 +1,79 @@
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
+ }
@@ -0,0 +1,76 @@
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
+ }
@@ -0,0 +1,27 @@
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";
@@ -0,0 +1,89 @@
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
+ }
@@ -0,0 +1,9 @@
1
+ .m-editor-workspace {
2
+ height: 100%;
3
+ width: 100%;
4
+ user-select: none;
5
+
6
+ &:focus-visible {
7
+ outline: 0;
8
+ }
9
+ }