@tmagic/editor 1.3.6 → 1.3.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/LICENSE +5432 -0
- package/dist/style.css +34 -11
- package/dist/tmagic-editor.js +1360 -957
- package/dist/tmagic-editor.js.map +1 -1
- package/dist/tmagic-editor.umd.cjs +1382 -977
- package/dist/tmagic-editor.umd.cjs.map +1 -1
- package/package.json +17 -17
- package/src/Editor.vue +15 -7
- package/src/components/CodeBlockEditor.vue +2 -2
- package/src/components/ContentMenu.vue +5 -5
- package/src/components/ScrollBar.vue +2 -2
- package/src/components/ScrollViewer.vue +2 -2
- package/src/components/SplitView.vue +2 -2
- package/src/components/Tree.vue +1 -1
- package/src/components/TreeNode.vue +3 -3
- package/src/editorProps.ts +14 -4
- package/src/fields/PageFragmentSelect.vue +63 -0
- package/src/hooks/use-getso.ts +2 -2
- package/src/hooks/use-stage.ts +18 -1
- package/src/index.ts +3 -0
- package/src/initService.ts +15 -5
- package/src/layouts/AddPageBox.vue +16 -4
- package/src/layouts/CodeEditor.vue +2 -2
- package/src/layouts/Framework.vue +19 -3
- package/src/layouts/PropsPanel.vue +9 -7
- package/src/layouts/page-bar/AddButton.vue +48 -0
- package/src/layouts/page-bar/PageBar.vue +158 -0
- package/src/layouts/{workspace → page-bar}/PageBarScrollContainer.vue +61 -35
- package/src/layouts/page-bar/SwitchTypeButton.vue +45 -0
- package/src/layouts/sidebar/Sidebar.vue +2 -0
- package/src/layouts/sidebar/layer/LayerMenu.vue +39 -27
- package/src/layouts/sidebar/layer/LayerPanel.vue +7 -1
- package/src/layouts/sidebar/layer/use-click.ts +5 -3
- package/src/layouts/sidebar/layer/use-keybinding.ts +8 -8
- package/src/layouts/sidebar/layer/use-node-status.ts +3 -3
- package/src/layouts/workspace/Workspace.vue +6 -7
- package/src/layouts/workspace/viewer/NodeListMenu.vue +2 -2
- package/src/layouts/workspace/viewer/Stage.vue +12 -5
- package/src/layouts/workspace/viewer/ViewerMenu.vue +93 -80
- package/src/services/dataSource.ts +17 -0
- package/src/services/dep.ts +4 -0
- package/src/services/editor.ts +66 -35
- package/src/services/history.ts +6 -2
- package/src/services/keybinding.ts +48 -13
- package/src/theme/code-block.scss +0 -16
- package/src/theme/page-bar.scss +18 -1
- package/src/theme/page-fragment-select.scss +14 -0
- package/src/theme/theme.scss +1 -0
- package/src/theme/tree.scss +6 -0
- package/src/type.ts +23 -7
- package/src/utils/content-menu.ts +2 -2
- package/src/utils/editor.ts +22 -15
- package/src/utils/operator.ts +4 -4
- package/types/components/ToolButton.vue.d.ts +2 -2
- package/types/editorProps.d.ts +11 -2
- package/types/fields/PageFragmentSelect.vue.d.ts +31 -0
- package/types/index.d.ts +1 -0
- package/types/layouts/AddPageBox.vue.d.ts +14 -1
- package/types/layouts/Framework.vue.d.ts +14 -1
- package/types/layouts/PropsPanel.vue.d.ts +19 -10
- package/types/layouts/page-bar/AddButton.vue.d.ts +16 -0
- package/types/layouts/page-bar/PageBar.vue.d.ts +28 -0
- package/types/layouts/page-bar/PageBarScrollContainer.vue.d.ts +24 -0
- package/types/layouts/page-bar/SwitchTypeButton.vue.d.ts +20 -0
- package/types/layouts/sidebar/Sidebar.vue.d.ts +2 -0
- package/types/layouts/sidebar/layer/LayerMenu.vue.d.ts +22 -3
- package/types/layouts/sidebar/layer/LayerPanel.vue.d.ts +2 -0
- package/types/layouts/sidebar/layer/use-click.d.ts +25 -3
- package/types/layouts/sidebar/layer/use-keybinding.d.ts +1 -1
- package/types/layouts/workspace/Workspace.vue.d.ts +2 -0
- package/types/layouts/workspace/viewer/Stage.vue.d.ts +2 -0
- package/types/layouts/workspace/viewer/ViewerMenu.vue.d.ts +8 -0
- package/types/services/dataSource.d.ts +2 -0
- package/types/services/dep.d.ts +1 -0
- package/types/services/editor.d.ts +3 -2
- package/types/services/history.d.ts +3 -2
- package/types/services/keybinding.d.ts +21 -1
- package/types/type.d.ts +26 -12
- package/types/utils/editor.d.ts +9 -7
- package/src/layouts/workspace/PageBar.vue +0 -87
- package/types/layouts/workspace/PageBar.vue.d.ts +0 -15
- package/types/layouts/workspace/PageBarScrollContainer.vue.d.ts +0 -9
package/dist/style.css
CHANGED
|
@@ -418,10 +418,24 @@
|
|
|
418
418
|
.m-editor-workspace:focus-visible {
|
|
419
419
|
outline: 0;
|
|
420
420
|
}
|
|
421
|
-
.m-editor-page-bar {
|
|
421
|
+
.m-editor-page-bar-tabs {
|
|
422
422
|
position: fixed;
|
|
423
423
|
bottom: 0;
|
|
424
424
|
left: 0;
|
|
425
|
+
width: 100%;
|
|
426
|
+
}
|
|
427
|
+
.m-editor-page-bar-tabs .tmagic-design-button.m-editor-page-bar-switch-type-button {
|
|
428
|
+
margin-left: 7px;
|
|
429
|
+
position: relative;
|
|
430
|
+
top: 1px;
|
|
431
|
+
border-radius: 3px 3px 0 0;
|
|
432
|
+
border: 1px solid #d9dbdd;
|
|
433
|
+
border-bottom: 1px solid transparent;
|
|
434
|
+
}
|
|
435
|
+
.m-editor-page-bar-tabs .tmagic-design-button.m-editor-page-bar-switch-type-button.active {
|
|
436
|
+
background-color: #f3f3f3;
|
|
437
|
+
}
|
|
438
|
+
.m-editor-page-bar {
|
|
425
439
|
display: flex;
|
|
426
440
|
width: 100%;
|
|
427
441
|
height: 32px;
|
|
@@ -644,16 +658,6 @@
|
|
|
644
658
|
.m-editor-code-block-list {
|
|
645
659
|
height: 100%;
|
|
646
660
|
}
|
|
647
|
-
.m-editor-code-block-list .list-container .list-item .codeIcon {
|
|
648
|
-
width: 22px;
|
|
649
|
-
height: 22px;
|
|
650
|
-
margin-right: 5px;
|
|
651
|
-
}
|
|
652
|
-
.m-editor-code-block-list .list-container .list-item .compIcon {
|
|
653
|
-
width: 22px;
|
|
654
|
-
height: 22px;
|
|
655
|
-
margin-right: 5px;
|
|
656
|
-
}
|
|
657
661
|
.m-fields-code-select {
|
|
658
662
|
width: 100%;
|
|
659
663
|
}
|
|
@@ -897,6 +901,11 @@
|
|
|
897
901
|
.m-editor-tree .m-editor-tree-node .tree-node .tree-node-tool .tmagic-design-icon {
|
|
898
902
|
margin-right: 10px;
|
|
899
903
|
}
|
|
904
|
+
.m-editor-tree .m-editor-tree-empty {
|
|
905
|
+
text-align: center;
|
|
906
|
+
color: #909399;
|
|
907
|
+
font-size: 14px;
|
|
908
|
+
}
|
|
900
909
|
.m-editor-float-box {
|
|
901
910
|
position: absolute;
|
|
902
911
|
background-color: #fff;
|
|
@@ -924,6 +933,20 @@
|
|
|
924
933
|
.m-editor-floating-box-moveable {
|
|
925
934
|
opacity: 0;
|
|
926
935
|
}
|
|
936
|
+
.m-fields-page-fragment-select {
|
|
937
|
+
width: 100%;
|
|
938
|
+
}
|
|
939
|
+
.m-fields-page-fragment-select .page-fragment-select-container {
|
|
940
|
+
width: 100%;
|
|
941
|
+
display: flex;
|
|
942
|
+
align-items: center;
|
|
943
|
+
}
|
|
944
|
+
.m-fields-page-fragment-select .page-fragment-select-container .select {
|
|
945
|
+
flex: 1;
|
|
946
|
+
}
|
|
947
|
+
.m-fields-page-fragment-select .page-fragment-select-container .icon {
|
|
948
|
+
margin-left: 10px;
|
|
949
|
+
}
|
|
927
950
|
.fade-enter-active,
|
|
928
951
|
.fade-leave-active {
|
|
929
952
|
transition: opacity 0.5s;
|