@tmagic/editor 1.8.0-beta.3 → 1.8.0-beta.5
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/es/components/CompareForm.vue_vue_type_script_setup_true_lang.js +15 -1
- package/dist/es/components/ToolButton.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/es/hooks/use-code-block-edit.js +6 -3
- package/dist/es/hooks/use-data-source-edit.js +5 -2
- package/dist/es/hooks/use-stage.js +6 -3
- package/dist/es/index.js +6 -3
- package/dist/es/initService.js +1 -1
- package/dist/es/layouts/Framework.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/NavMenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/history-list/Bucket.vue_vue_type_script_setup_true_lang.js +19 -51
- package/dist/es/layouts/history-list/BucketTab.vue_vue_type_script_setup_true_lang.js +22 -36
- package/dist/es/layouts/history-list/GroupRow.vue_vue_type_script_setup_true_lang.js +152 -93
- package/dist/es/layouts/history-list/HistoryDiffDialog.vue_vue_type_script_setup_true_lang.js +36 -10
- package/dist/es/layouts/history-list/HistoryListPanel.vue_vue_type_script_setup_true_lang.js +334 -208
- package/dist/es/layouts/history-list/InitialRow.vue_vue_type_script_setup_true_lang.js +28 -7
- package/dist/es/layouts/history-list/PageTab.vue_vue_type_script_setup_true_lang.js +47 -57
- package/dist/es/layouts/history-list/composables.js +118 -25
- package/dist/es/layouts/page-bar/PageBar.vue_vue_type_script_setup_true_lang.js +4 -2
- package/dist/es/layouts/props-panel/PropsPanel.vue_vue_type_script_setup_true_lang.js +5 -1
- package/dist/es/layouts/sidebar/ComponentListPanel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +5 -1
- package/dist/es/layouts/sidebar/code-block/CodeBlockList.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/es/layouts/sidebar/code-block/CodeBlockListPanel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/sidebar/code-block/useContentMenu.js +1 -1
- package/dist/es/layouts/sidebar/data-source/DataSourceListPanel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/sidebar/data-source/useContentMenu.js +1 -1
- package/dist/es/layouts/sidebar/layer/LayerMenu.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/es/layouts/sidebar/layer/LayerNodeTool.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/workspace/viewer/Stage.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/workspace/viewer/ViewerMenu.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/es/services/codeBlock.js +105 -42
- package/dist/es/services/dataSource.js +85 -35
- package/dist/es/services/editor.js +317 -122
- package/dist/es/services/history.js +270 -204
- package/dist/es/services/keybinding.js +3 -3
- package/dist/es/services/ui.js +3 -0
- package/dist/es/style.css +65 -10
- package/dist/es/utils/content-menu.js +17 -9
- package/dist/es/utils/editor.js +35 -1
- package/dist/es/utils/history.js +223 -0
- package/dist/es/utils/indexed-db.js +86 -0
- package/dist/es/utils/undo-redo.js +60 -1
- package/dist/style.css +65 -10
- package/dist/tmagic-editor.umd.cjs +2047 -954
- package/package.json +7 -7
- package/src/components/CompareForm.vue +21 -1
- package/src/components/ToolButton.vue +2 -2
- package/src/hooks/use-code-block-edit.ts +4 -3
- package/src/hooks/use-data-source-edit.ts +2 -2
- package/src/hooks/use-stage.ts +3 -3
- package/src/index.ts +1 -0
- package/src/initService.ts +1 -1
- package/src/layouts/Framework.vue +1 -1
- package/src/layouts/NavMenu.vue +1 -1
- package/src/layouts/history-list/Bucket.vue +34 -67
- package/src/layouts/history-list/BucketTab.vue +46 -51
- package/src/layouts/history-list/GroupRow.vue +150 -98
- package/src/layouts/history-list/HistoryDiffDialog.vue +96 -69
- package/src/layouts/history-list/HistoryListPanel.vue +298 -111
- package/src/layouts/history-list/InitialRow.vue +25 -9
- package/src/layouts/history-list/PageTab.vue +58 -48
- package/src/layouts/history-list/composables.ts +210 -29
- package/src/layouts/page-bar/PageBar.vue +4 -2
- package/src/layouts/props-panel/PropsPanel.vue +5 -1
- package/src/layouts/sidebar/ComponentListPanel.vue +9 -5
- package/src/layouts/sidebar/Sidebar.vue +6 -1
- package/src/layouts/sidebar/code-block/CodeBlockList.vue +5 -5
- package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +1 -1
- package/src/layouts/sidebar/code-block/useContentMenu.ts +1 -1
- package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +1 -1
- package/src/layouts/sidebar/data-source/useContentMenu.ts +1 -1
- package/src/layouts/sidebar/layer/LayerMenu.vue +19 -11
- package/src/layouts/sidebar/layer/LayerNodeTool.vue +7 -4
- package/src/layouts/workspace/viewer/Stage.vue +1 -1
- package/src/layouts/workspace/viewer/ViewerMenu.vue +8 -8
- package/src/services/codeBlock.ts +129 -35
- package/src/services/dataSource.ts +105 -34
- package/src/services/editor.ts +470 -157
- package/src/services/history.ts +312 -203
- package/src/services/keybinding.ts +3 -3
- package/src/services/ui.ts +7 -0
- package/src/theme/history-list-panel.scss +87 -6
- package/src/theme/page-bar.scss +0 -4
- package/src/theme/props-panel.scss +3 -3
- package/src/type.ts +221 -61
- package/src/utils/content-menu.ts +18 -9
- package/src/utils/editor.ts +41 -1
- package/src/utils/history.ts +298 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/indexed-db.ts +122 -0
- package/src/utils/undo-redo.ts +88 -0
- package/types/index.d.ts +871 -308
package/dist/style.css
CHANGED
|
@@ -592,7 +592,7 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
592
592
|
position: absolute;
|
|
593
593
|
top: 4px;
|
|
594
594
|
right: 4px;
|
|
595
|
-
z-index:
|
|
595
|
+
z-index: 2;
|
|
596
596
|
display: flex;
|
|
597
597
|
align-items: center;
|
|
598
598
|
height: 40px;
|
|
@@ -617,6 +617,23 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
617
617
|
padding: 0;
|
|
618
618
|
list-style: none;
|
|
619
619
|
}
|
|
620
|
+
.m-editor-history-list-popover .m-editor-history-list-toolbar {
|
|
621
|
+
display: flex;
|
|
622
|
+
align-items: center;
|
|
623
|
+
justify-content: flex-end;
|
|
624
|
+
padding: 0 4px 4px;
|
|
625
|
+
}
|
|
626
|
+
.m-editor-history-list-popover .m-editor-history-list-clear {
|
|
627
|
+
padding: 2px 8px;
|
|
628
|
+
border-radius: 4px;
|
|
629
|
+
font-size: 12px;
|
|
630
|
+
color: #f56c6c;
|
|
631
|
+
cursor: pointer;
|
|
632
|
+
user-select: none;
|
|
633
|
+
}
|
|
634
|
+
.m-editor-history-list-popover .m-editor-history-list-clear:hover {
|
|
635
|
+
background-color: rgba(245, 108, 108, 0.12);
|
|
636
|
+
}
|
|
620
637
|
.m-editor-history-list-popover .m-editor-history-list-item {
|
|
621
638
|
display: flex;
|
|
622
639
|
align-items: center;
|
|
@@ -750,12 +767,18 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
750
767
|
}
|
|
751
768
|
.m-editor-history-list-popover .m-editor-history-list-item-index {
|
|
752
769
|
flex: 0 0 auto;
|
|
770
|
+
min-width: 30px;
|
|
771
|
+
text-align: right;
|
|
753
772
|
color: #909399;
|
|
754
773
|
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
|
755
774
|
font-size: 11px;
|
|
756
775
|
font-weight: 400;
|
|
757
776
|
white-space: nowrap;
|
|
758
777
|
}
|
|
778
|
+
.m-editor-history-list-popover .m-editor-history-list-group.is-merged > .m-editor-history-list-group-head > .m-editor-history-list-item-index {
|
|
779
|
+
min-width: 0;
|
|
780
|
+
text-align: left;
|
|
781
|
+
}
|
|
759
782
|
.m-editor-history-list-popover .m-editor-history-list-item-time {
|
|
760
783
|
flex: 0 0 auto;
|
|
761
784
|
color: #a8abb2;
|
|
@@ -804,6 +827,30 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
804
827
|
text-overflow: ellipsis;
|
|
805
828
|
white-space: nowrap;
|
|
806
829
|
}
|
|
830
|
+
.m-editor-history-list-popover .m-editor-history-list-item-source {
|
|
831
|
+
flex: 0 0 auto;
|
|
832
|
+
padding: 0 6px;
|
|
833
|
+
border: 1px solid #dcdfe6;
|
|
834
|
+
border-radius: 8px;
|
|
835
|
+
font-size: 10px;
|
|
836
|
+
line-height: 14px;
|
|
837
|
+
color: #909399;
|
|
838
|
+
background-color: #f4f4f5;
|
|
839
|
+
white-space: nowrap;
|
|
840
|
+
font-weight: 400;
|
|
841
|
+
}
|
|
842
|
+
.m-editor-history-list-popover .m-editor-history-list-item-saved {
|
|
843
|
+
flex: 0 0 auto;
|
|
844
|
+
padding: 0 6px;
|
|
845
|
+
border-radius: 8px;
|
|
846
|
+
font-size: 10px;
|
|
847
|
+
line-height: 16px;
|
|
848
|
+
color: #fff;
|
|
849
|
+
background-color: #67c23a;
|
|
850
|
+
white-space: nowrap;
|
|
851
|
+
font-weight: 500;
|
|
852
|
+
letter-spacing: 0.2px;
|
|
853
|
+
}
|
|
807
854
|
.m-editor-history-list-popover .m-editor-history-list-item-merge {
|
|
808
855
|
flex: 0 0 auto;
|
|
809
856
|
padding: 0 8px;
|
|
@@ -815,6 +862,17 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
815
862
|
font-weight: 500;
|
|
816
863
|
letter-spacing: 0.2px;
|
|
817
864
|
}
|
|
865
|
+
.m-editor-history-list-popover .m-editor-history-list-item-actions {
|
|
866
|
+
display: none;
|
|
867
|
+
flex: 0 0 auto;
|
|
868
|
+
align-items: center;
|
|
869
|
+
gap: 6px;
|
|
870
|
+
}
|
|
871
|
+
.m-editor-history-list-popover .m-editor-history-list-group-head:hover > .m-editor-history-list-item-actions,
|
|
872
|
+
.m-editor-history-list-popover .m-editor-history-list-substeps > li:hover > .m-editor-history-list-item-actions,
|
|
873
|
+
.m-editor-history-list-popover .m-editor-history-list-initial:hover > .m-editor-history-list-item-actions {
|
|
874
|
+
display: flex;
|
|
875
|
+
}
|
|
818
876
|
.m-editor-history-list-popover .m-editor-history-list-item-diff {
|
|
819
877
|
flex: 0 0 auto;
|
|
820
878
|
padding: 0 6px;
|
|
@@ -835,13 +893,13 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
835
893
|
border-radius: 2px;
|
|
836
894
|
font-size: 10px;
|
|
837
895
|
line-height: 16px;
|
|
838
|
-
color: #
|
|
839
|
-
background-color: rgba(
|
|
896
|
+
color: #529b2e;
|
|
897
|
+
background-color: rgba(103, 194, 58, 0.12);
|
|
840
898
|
cursor: pointer;
|
|
841
899
|
user-select: none;
|
|
842
900
|
}
|
|
843
901
|
.m-editor-history-list-popover .m-editor-history-list-item-goto:hover {
|
|
844
|
-
background-color: rgba(
|
|
902
|
+
background-color: rgba(103, 194, 58, 0.24);
|
|
845
903
|
}
|
|
846
904
|
.m-editor-history-list-popover .m-editor-history-list-item-revert {
|
|
847
905
|
flex: 0 0 auto;
|
|
@@ -1384,9 +1442,6 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
1384
1442
|
transition: all 0.2s ease 0s;
|
|
1385
1443
|
padding: 5px 14px;
|
|
1386
1444
|
}
|
|
1387
|
-
.page-bar-popover .menu-item .tmagic-design-button {
|
|
1388
|
-
color: #313a40;
|
|
1389
|
-
}
|
|
1390
1445
|
.page-bar-popover .menu-item:hover {
|
|
1391
1446
|
background-color: #f3f5f9;
|
|
1392
1447
|
}
|
|
@@ -1452,7 +1507,7 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
1452
1507
|
position: absolute;
|
|
1453
1508
|
right: 15px;
|
|
1454
1509
|
bottom: 15px;
|
|
1455
|
-
z-index:
|
|
1510
|
+
z-index: 32;
|
|
1456
1511
|
opacity: 0.5;
|
|
1457
1512
|
}
|
|
1458
1513
|
.m-editor-props-panel .m-editor-props-panel-src-icon:hover {
|
|
@@ -1462,7 +1517,7 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
1462
1517
|
position: absolute;
|
|
1463
1518
|
right: 15px;
|
|
1464
1519
|
bottom: 60px;
|
|
1465
|
-
z-index:
|
|
1520
|
+
z-index: 31;
|
|
1466
1521
|
opacity: 0.5;
|
|
1467
1522
|
}
|
|
1468
1523
|
.m-editor-props-panel .m-editor-props-panel-style-icon:hover {
|
|
@@ -1472,7 +1527,7 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
1472
1527
|
position: absolute;
|
|
1473
1528
|
left: 0;
|
|
1474
1529
|
top: 0;
|
|
1475
|
-
z-index:
|
|
1530
|
+
z-index: 31;
|
|
1476
1531
|
}
|
|
1477
1532
|
.m-editor-props-panel .m-editor-resizer {
|
|
1478
1533
|
position: absolute;
|