@tmagic/editor 1.2.12 → 1.2.14

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 (99) hide show
  1. package/dist/style.css +61 -39
  2. package/dist/tmagic-editor.js +890 -518
  3. package/dist/tmagic-editor.js.map +1 -1
  4. package/dist/tmagic-editor.umd.cjs +909 -544
  5. package/dist/tmagic-editor.umd.cjs.map +1 -1
  6. package/package.json +14 -13
  7. package/src/components/CodeDraftEditor.vue +20 -17
  8. package/src/components/ContentMenu.vue +1 -1
  9. package/src/components/FunctionEditor.vue +10 -10
  10. package/src/components/Layout.vue +1 -1
  11. package/src/components/ScrollViewer.vue +2 -2
  12. package/src/components/SearchInput.vue +26 -0
  13. package/src/fields/CodeSelect.vue +18 -101
  14. package/src/fields/CodeSelectCol.vue +21 -3
  15. package/src/fields/EventSelect.vue +5 -3
  16. package/src/fields/UISelect.vue +1 -1
  17. package/src/icons/AppManageIcon.vue +11 -0
  18. package/src/icons/CodeIcon.vue +35 -0
  19. package/src/layouts/AddPageBox.vue +3 -3
  20. package/src/layouts/Framework.vue +4 -4
  21. package/src/layouts/NavMenu.vue +2 -2
  22. package/src/layouts/PropsPanel.vue +1 -1
  23. package/src/layouts/sidebar/ComponentListPanel.vue +11 -12
  24. package/src/layouts/sidebar/LayerMenu.vue +2 -2
  25. package/src/layouts/sidebar/LayerPanel.vue +6 -15
  26. package/src/layouts/sidebar/Sidebar.vue +3 -3
  27. package/src/layouts/sidebar/code-block/CodeBlockEditor.vue +22 -10
  28. package/src/layouts/sidebar/code-block/CodeBlockList.vue +56 -51
  29. package/src/layouts/workspace/Breadcrumb.vue +1 -1
  30. package/src/layouts/workspace/PageBar.vue +2 -2
  31. package/src/layouts/workspace/PageBarScrollContainer.vue +3 -3
  32. package/src/layouts/workspace/Stage.vue +3 -3
  33. package/src/layouts/workspace/ViewerMenu.vue +4 -4
  34. package/src/layouts/workspace/Workspace.vue +1 -1
  35. package/src/services/BaseService.ts +1 -1
  36. package/src/services/codeBlock.ts +10 -13
  37. package/src/services/componentList.ts +1 -1
  38. package/src/services/editor.ts +6 -6
  39. package/src/services/events.ts +1 -1
  40. package/src/services/history.ts +2 -2
  41. package/src/services/props.ts +2 -2
  42. package/src/services/ui.ts +2 -2
  43. package/src/theme/code-block.scss +42 -11
  44. package/src/theme/component-list-panel.scss +0 -15
  45. package/src/theme/event.scss +12 -0
  46. package/src/theme/layer-panel.scss +0 -14
  47. package/src/theme/search-input.scss +14 -0
  48. package/src/theme/theme.scss +1 -0
  49. package/src/utils/config.ts +1 -1
  50. package/src/utils/dep.ts +2 -2
  51. package/src/utils/editor.ts +1 -1
  52. package/src/utils/operator.ts +4 -4
  53. package/src/utils/stage.ts +3 -3
  54. package/tsconfig.build.json +4 -1
  55. package/types/components/CodeDraftEditor.vue.d.ts +7 -4
  56. package/types/components/ContentMenu.vue.d.ts +3 -3
  57. package/types/components/FunctionEditor.vue.d.ts +140 -8
  58. package/types/components/Icon.vue.d.ts +2 -2
  59. package/types/components/Layout.vue.d.ts +28 -113
  60. package/types/components/ScrollBar.vue.d.ts +2 -2
  61. package/types/components/ScrollViewer.vue.d.ts +32 -135
  62. package/types/components/SearchInput.vue.d.ts +4 -0
  63. package/types/components/ToolButton.vue.d.ts +3 -3
  64. package/types/fields/Code.vue.d.ts +2 -2
  65. package/types/fields/CodeLink.vue.d.ts +2 -2
  66. package/types/fields/CodeSelect.vue.d.ts +8 -27
  67. package/types/fields/CodeSelectCol.vue.d.ts +3 -3
  68. package/types/fields/EventSelect.vue.d.ts +3 -3
  69. package/types/fields/UISelect.vue.d.ts +2 -2
  70. package/types/icons/AppManageIcon.vue.d.ts +2 -0
  71. package/types/icons/CodeIcon.vue.d.ts +2 -0
  72. package/types/layouts/CodeEditor.vue.d.ts +4 -4
  73. package/types/layouts/Framework.vue.d.ts +23 -74
  74. package/types/layouts/NavMenu.vue.d.ts +3 -3
  75. package/types/layouts/PropsPanel.vue.d.ts +11 -60
  76. package/types/layouts/Resizer.vue.d.ts +9 -54
  77. package/types/layouts/sidebar/ComponentListPanel.vue.d.ts +11 -50
  78. package/types/layouts/sidebar/LayerMenu.vue.d.ts +2 -2
  79. package/types/layouts/sidebar/LayerPanel.vue.d.ts +17 -60
  80. package/types/layouts/sidebar/Sidebar.vue.d.ts +39 -104
  81. package/types/layouts/sidebar/code-block/CodeBlockEditor.vue.d.ts +15 -58
  82. package/types/layouts/sidebar/code-block/CodeBlockList.vue.d.ts +21 -66
  83. package/types/layouts/workspace/PageBar.vue.d.ts +13 -52
  84. package/types/layouts/workspace/PageBarScrollContainer.vue.d.ts +8 -48
  85. package/types/layouts/workspace/Stage.vue.d.ts +2 -2
  86. package/types/layouts/workspace/ViewerMenu.vue.d.ts +3 -3
  87. package/types/layouts/workspace/Workspace.vue.d.ts +20 -63
  88. package/types/services/codeBlock.d.ts +4 -4
  89. package/types/services/componentList.d.ts +1 -1
  90. package/types/services/dep.d.ts +2 -2
  91. package/types/services/editor.d.ts +1 -1
  92. package/types/services/events.d.ts +1 -1
  93. package/types/services/history.d.ts +2 -2
  94. package/types/services/props.d.ts +78 -1
  95. package/types/services/storage.d.ts +1 -1
  96. package/types/services/ui.d.ts +2 -2
  97. package/types/type.d.ts +8 -8
  98. package/types/utils/operator.d.ts +1 -1
  99. package/types/utils/props.d.ts +78 -1
package/dist/style.css CHANGED
@@ -49,7 +49,20 @@
49
49
  }
50
50
  .m-editor-scroll-bar:hover.vertical .m-editor-scroll-bar-thumb, .m-editor-scroll-bar:focus.vertical .m-editor-scroll-bar-thumb {
51
51
  width: 11px;
52
- }.m-editor-nav-menu {
52
+ }.tmagic-design-input.search-input {
53
+ background: #fff;
54
+ color: #bbbbbb;
55
+ padding: 10px;
56
+ position: absolute;
57
+ top: 0;
58
+ left: 0;
59
+ box-sizing: border-box;
60
+ z-index: 1;
61
+ }
62
+ .tmagic-design-input.search-input .el-input__prefix {
63
+ padding: 7px;
64
+ }
65
+ .m-editor-nav-menu {
53
66
  display: flex;
54
67
  z-index: 5;
55
68
  -webkit-box-pack: justify;
@@ -201,7 +214,7 @@
201
214
  border: 0;
202
215
  height: auto;
203
216
  padding: 8px;
204
- color: rgb(255, 255, 255);
217
+ color: white;
205
218
  box-sizing: border-box;
206
219
  }
207
220
  .m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left.is-active {
@@ -222,7 +235,7 @@
222
235
  color: rgba(255, 255, 255, 0.6);
223
236
  }
224
237
  .m-editor-sidebar.el-tabs--left .el-tabs__header i:hover {
225
- color: rgb(255, 255, 255);
238
+ color: white;
226
239
  }
227
240
  .m-editor-sidebar.el-tabs--left .el-tabs__header .magic-editor-tab-panel-title {
228
241
  font-size: 12px;
@@ -255,18 +268,6 @@
255
268
  .magic-editor-layer-panel {
256
269
  background: #ffffff;
257
270
  }
258
- .magic-editor-layer-panel .search-input {
259
- background: #ffffff;
260
- color: #bbbbbb;
261
- padding: 10px;
262
- position: absolute;
263
- top: 0;
264
- left: 0;
265
- z-index: 1;
266
- }
267
- .magic-editor-layer-panel .search-input .el-input__prefix {
268
- padding: 7px;
269
- }
270
271
  .magic-editor-layer-panel .magic-editor-layer-tree {
271
272
  padding-top: 48px;
272
273
  }
@@ -330,19 +331,6 @@
330
331
  margin-top: 48px;
331
332
  background-color: #ffffff;
332
333
  }
333
- .ui-component-panel.tmagic-design-collapse .search-input {
334
- background: #fff;
335
- color: #bbbbbb;
336
- padding: 10px;
337
- position: absolute;
338
- top: 0;
339
- left: 0;
340
- box-sizing: border-box;
341
- z-index: 1;
342
- }
343
- .ui-component-panel.tmagic-design-collapse .search-input .el-input__prefix {
344
- padding: 7px;
345
- }
346
334
  .ui-component-panel.tmagic-design-collapse .tmagic-design-collapse-item > div:first-of-type {
347
335
  border-bottom: 1px solid #d9dbdd;
348
336
  margin-bottom: 10px;
@@ -629,19 +617,22 @@
629
617
  }
630
618
  .m-editor-code-block-list {
631
619
  height: 100%;
632
- margin-top: 5px;
620
+ }
621
+ .m-editor-code-block-list .magic-editor-layer-tree {
622
+ padding-top: 48px;
633
623
  }
634
624
  .m-editor-code-block-list .code-header-wrapper {
635
625
  display: flex;
636
626
  align-items: center;
637
627
  justify-content: center;
628
+ position: absolute;
629
+ top: 0;
630
+ width: 100%;
631
+ z-index: 1;
638
632
  }
639
- .m-editor-code-block-list .code-header-wrapper .code-filter-input {
640
- margin: 0 5px;
641
- }
642
- .m-editor-code-block-list .code-header-wrapper .code-filter-input-no-btn {
643
- margin-left: 5px;
644
- margin-right: 10px;
633
+ .m-editor-code-block-list .code-header-wrapper .search-input {
634
+ flex: 1;
635
+ position: relative;
645
636
  }
646
637
  .m-editor-code-block-list .code-header-wrapper .create-code-button {
647
638
  margin-left: 2px;
@@ -656,29 +647,48 @@
656
647
  }
657
648
  .m-editor-code-block-list .list-container .list-item {
658
649
  display: flex;
650
+ align-items: center;
659
651
  width: 100%;
652
+ align-items: center;
660
653
  }
661
654
  .m-editor-code-block-list .list-container .list-item .right-tool {
662
655
  display: flex;
663
656
  width: fit-content !important;
657
+ align-items: center;
658
+ margin-right: 10px;
664
659
  }
665
660
  .m-editor-code-block-list .list-container .list-item .right-tool .edit-icon {
666
661
  margin: 0 5px;
667
662
  }
663
+ .m-editor-code-block-list .list-container .list-item .codeIcon {
664
+ width: 20px;
665
+ height: 20px;
666
+ margin-right: 5px;
667
+ }
668
+ .m-editor-code-block-list .list-container .list-item .compIcon {
669
+ width: 15px;
670
+ height: 15px;
671
+ margin-right: 5px;
672
+ }
668
673
  .m-editor-code-block-list .list-container .list-item .code-name {
669
674
  white-space: nowrap;
670
675
  overflow: hidden;
671
676
  text-overflow: ellipsis;
672
677
  width: 0 !important;
673
678
  flex: 1;
674
- line-height: 18px;
679
+ line-height: 22px;
680
+ }
681
+ .m-editor-code-block-list .list-container .list-item .code-name.code {
682
+ color: #000;
683
+ }
684
+ .m-editor-code-block-list .list-container .list-item .code-name.hook {
685
+ color: #909399;
675
686
  }
676
687
  .m-fields-code-select {
677
688
  width: 100%;
678
689
  }
679
- .m-fields-code-select .edit-icon {
680
- cursor: pointer;
681
- margin-right: 5px;
690
+ .m-fields-code-select .el-card__header {
691
+ display: none;
682
692
  }
683
693
  .el-dialog.is-fullscreen.code-editor-dialog {
684
694
  overflow: hidden;
@@ -810,6 +820,18 @@
810
820
  .m-fields-code-select-col {
811
821
  width: 100%;
812
822
  }
823
+ .m-fields-code-select-col .code-select-container {
824
+ display: flex;
825
+ align-items: center;
826
+ }
827
+ .m-fields-code-select-col .code-select-container .select {
828
+ flex: 10 0 100px;
829
+ }
830
+ .m-fields-code-select-col .code-select-container .icon {
831
+ flex: 1 0 20px;
832
+ cursor: pointer;
833
+ margin-right: 5px;
834
+ }
813
835
  .m-editor-layout {
814
836
  width: 100%;
815
837
  display: flex;