@tmagic/editor 1.0.0-beta.9 → 1.0.0-rc.11
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/README.md +1 -0
- package/dist/style.css +72 -36
- package/dist/tmagic-editor.es.js +1555 -2080
- package/dist/tmagic-editor.es.js.map +1 -1
- package/dist/tmagic-editor.umd.js +1555 -2082
- package/dist/tmagic-editor.umd.js.map +1 -1
- package/dist/types/src/Editor.vue.d.ts +50 -2
- package/dist/types/src/fields/Code.vue.d.ts +4 -4
- package/dist/types/src/fields/CodeLink.vue.d.ts +1 -3
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/layouts/CodeEditor.vue.d.ts +13 -4
- package/dist/types/src/layouts/Framework.vue.d.ts +15 -3
- package/dist/types/src/layouts/PropsPanel.vue.d.ts +4 -5
- package/dist/types/src/layouts/sidebar/ComponentListPanel.vue.d.ts +2 -1
- package/dist/types/src/layouts/sidebar/Sidebar.vue.d.ts +2 -3
- package/dist/types/src/layouts/sidebar/TabPane.vue.d.ts +14 -0
- package/dist/types/src/layouts/workspace/Workspace.vue.d.ts +5 -32
- package/dist/types/src/services/BaseService.d.ts +5 -2
- package/dist/types/src/services/editor.d.ts +11 -5
- package/dist/types/src/services/history.d.ts +2 -18
- package/dist/types/src/services/props.d.ts +8 -2
- package/dist/types/src/services/ui.d.ts +2 -0
- package/dist/types/src/type.d.ts +24 -9
- package/dist/types/src/utils/editor.d.ts +4 -9
- package/dist/types/src/utils/polyfills.d.ts +0 -0
- package/dist/types/src/utils/props.d.ts +10 -1
- package/package.json +35 -12
- package/src/Editor.vue +44 -9
- package/src/components/ContentMenu.vue +140 -0
- package/src/components/ScrollViewer.vue +1 -1
- package/src/components/ToolButton.vue +69 -30
- package/src/fields/UISelect.vue +14 -6
- package/src/index.ts +2 -0
- package/src/layouts/CodeEditor.vue +20 -13
- package/src/layouts/Framework.vue +20 -7
- package/src/layouts/PropsPanel.vue +5 -4
- package/src/layouts/sidebar/ComponentListPanel.vue +25 -3
- package/src/layouts/sidebar/LayerMenu.vue +93 -95
- package/src/layouts/sidebar/LayerPanel.vue +31 -54
- package/src/layouts/sidebar/Sidebar.vue +13 -52
- package/src/layouts/sidebar/TabPane.vue +68 -0
- package/src/layouts/workspace/PageBar.vue +136 -13
- package/src/layouts/workspace/Stage.vue +62 -104
- package/src/layouts/workspace/ViewerMenu.vue +119 -67
- package/src/layouts/workspace/Workspace.vue +124 -46
- package/src/services/BaseService.ts +71 -23
- package/src/services/editor.ts +196 -52
- package/src/services/history.ts +7 -0
- package/src/services/props.ts +64 -9
- package/src/services/ui.ts +35 -5
- package/src/theme/common/var.scss +1 -0
- package/src/theme/component-list-panel.scss +2 -0
- package/src/theme/content-menu.scss +33 -26
- package/src/theme/layer-panel.scss +2 -1
- package/src/theme/nav-menu.scss +6 -2
- package/src/theme/page-bar.scss +36 -3
- package/src/theme/props-panel.scss +19 -17
- package/src/theme/workspace.scss +4 -0
- package/src/type.ts +26 -9
- package/src/utils/editor.ts +35 -55
- package/src/utils/polyfills.ts +8 -0
- package/src/utils/props.ts +51 -8
- package/LICENSE +0 -5432
- package/dist/types/src/components/ToolButton.vue.d.ts +0 -35
- package/dist/types/src/fields/UISelect.vue.d.ts +0 -32
- package/dist/types/src/layouts/sidebar/LayerMenu.vue.d.ts +0 -31
- package/dist/types/src/layouts/sidebar/LayerPanel.vue.d.ts +0 -979
- package/dist/types/src/layouts/workspace/PageBar.vue.d.ts +0 -11
- package/dist/types/src/layouts/workspace/Stage.vue.d.ts +0 -193
- package/dist/types/src/layouts/workspace/ViewerMenu.vue.d.ts +0 -18
- package/tsconfig.json +0 -9
- package/vite.config.ts +0 -30
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# [文档](https://tencent.github.io/tmagic-editor/docs/)
|
package/dist/style.css
CHANGED
|
@@ -48,12 +48,15 @@
|
|
|
48
48
|
display: flex !important;
|
|
49
49
|
transition: all 0.3s ease 0s;
|
|
50
50
|
border-bottom: 2px solid transparent;
|
|
51
|
-
margin: 0
|
|
51
|
+
margin: 0;
|
|
52
52
|
}
|
|
53
53
|
.m-editor-nav-menu .menu-item .is-disabled {
|
|
54
54
|
opacity: 0.5;
|
|
55
55
|
}
|
|
56
|
-
.m-editor-nav-menu .menu-item .
|
|
56
|
+
.m-editor-nav-menu .menu-item .is-text {
|
|
57
|
+
padding: 5px;
|
|
58
|
+
}
|
|
59
|
+
.m-editor-nav-menu .menu-item .is-text,
|
|
57
60
|
.m-editor-nav-menu .menu-item i {
|
|
58
61
|
color: #070303;
|
|
59
62
|
}
|
|
@@ -153,7 +156,7 @@
|
|
|
153
156
|
border: 0;
|
|
154
157
|
height: auto;
|
|
155
158
|
padding: 8px;
|
|
156
|
-
color:
|
|
159
|
+
color: rgb(255, 255, 255);
|
|
157
160
|
box-sizing: border-box;
|
|
158
161
|
}
|
|
159
162
|
.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left.is-active {
|
|
@@ -174,7 +177,7 @@
|
|
|
174
177
|
color: rgba(255, 255, 255, 0.6);
|
|
175
178
|
}
|
|
176
179
|
.m-editor-sidebar.el-tabs--left .el-tabs__header i:hover {
|
|
177
|
-
color:
|
|
180
|
+
color: rgb(255, 255, 255);
|
|
178
181
|
}
|
|
179
182
|
.m-editor-sidebar.el-tabs--left .el-tabs__header .magic-editor-tab-panel-title {
|
|
180
183
|
font-size: 12px;
|
|
@@ -251,6 +254,7 @@
|
|
|
251
254
|
}
|
|
252
255
|
.magic-editor-layer-panel .cus-tree-node {
|
|
253
256
|
width: 100%;
|
|
257
|
+
overflow: hidden;
|
|
254
258
|
}
|
|
255
259
|
.magic-editor-layer-panel .cus-tree-node-hover {
|
|
256
260
|
background-color: #f3f5f9;
|
|
@@ -286,6 +290,7 @@
|
|
|
286
290
|
top: 0;
|
|
287
291
|
left: 0;
|
|
288
292
|
box-sizing: border-box;
|
|
293
|
+
z-index: 1;
|
|
289
294
|
}
|
|
290
295
|
.ui-component-panel .search-input .el-input__prefix {
|
|
291
296
|
padding: 10px;
|
|
@@ -327,6 +332,7 @@
|
|
|
327
332
|
color: #070303;
|
|
328
333
|
flex-direction: column;
|
|
329
334
|
width: 42px;
|
|
335
|
+
cursor: pointer;
|
|
330
336
|
}
|
|
331
337
|
.ui-component-panel .el-collapse-item__wrap .component-item i {
|
|
332
338
|
font-size: 20px;
|
|
@@ -408,6 +414,9 @@
|
|
|
408
414
|
width: 100%;
|
|
409
415
|
user-select: none;
|
|
410
416
|
}
|
|
417
|
+
.m-editor-workspace:focus-visible {
|
|
418
|
+
outline: 0;
|
|
419
|
+
}
|
|
411
420
|
.m-editor-page-bar {
|
|
412
421
|
position: fixed;
|
|
413
422
|
bottom: 0;
|
|
@@ -416,91 +425,118 @@
|
|
|
416
425
|
width: 100%;
|
|
417
426
|
height: 32px;
|
|
418
427
|
line-height: 32px;
|
|
419
|
-
background-color: #f3f3f3;
|
|
420
428
|
color: #070303;
|
|
429
|
+
background-color: #f3f3f3;
|
|
421
430
|
border-top: 1px solid #d9dbdd;
|
|
422
431
|
z-index: 2;
|
|
423
432
|
overflow: hidden;
|
|
424
433
|
}
|
|
425
|
-
.m-editor-page-bar
|
|
434
|
+
.m-editor-page-bar-items {
|
|
435
|
+
display: flex;
|
|
436
|
+
transition: transform 0.3s;
|
|
437
|
+
}
|
|
438
|
+
.m-editor-page-bar-item {
|
|
426
439
|
padding: 0 10px;
|
|
427
440
|
cursor: pointer;
|
|
428
441
|
border-right: 1px solid #d9dbdd;
|
|
429
442
|
display: flex;
|
|
430
443
|
justify-items: center;
|
|
431
444
|
align-items: center;
|
|
445
|
+
background-color: #f3f3f3;
|
|
446
|
+
white-space: nowrap;
|
|
432
447
|
}
|
|
433
|
-
.m-editor-page-bar
|
|
448
|
+
.m-editor-page-bar-item.active {
|
|
434
449
|
background-color: #fff;
|
|
435
450
|
cursor: text;
|
|
436
451
|
}
|
|
437
|
-
.m-editor-page-bar
|
|
452
|
+
.m-editor-page-bar-item.active .m-editor-page-bar-menu-icon {
|
|
438
453
|
cursor: pointer;
|
|
439
454
|
}
|
|
440
|
-
.m-editor-page-bar
|
|
455
|
+
.m-editor-page-bar-item-icon {
|
|
456
|
+
position: relative;
|
|
457
|
+
z-index: 1;
|
|
458
|
+
}
|
|
459
|
+
.m-editor-page-bar-item-title {
|
|
441
460
|
max-width: 150px;
|
|
442
461
|
text-overflow: ellipsis;
|
|
443
462
|
white-space: nowrap;
|
|
444
463
|
overflow: hidden;
|
|
445
464
|
}
|
|
465
|
+
.page-bar-popover.el-popper.el-popover {
|
|
466
|
+
padding: 10px 0;
|
|
467
|
+
}
|
|
468
|
+
.page-bar-popover .menu-item {
|
|
469
|
+
cursor: pointer;
|
|
470
|
+
transition: all 0.2s ease 0s;
|
|
471
|
+
padding: 5px 14px;
|
|
472
|
+
}
|
|
473
|
+
.page-bar-popover .menu-item .el-button--text,
|
|
474
|
+
.page-bar-popover .menu-item i {
|
|
475
|
+
color: #070303;
|
|
476
|
+
}
|
|
477
|
+
.page-bar-popover .menu-item:hover {
|
|
478
|
+
background-color: #f3f5f9;
|
|
479
|
+
}
|
|
446
480
|
.m-editor-props-panel {
|
|
447
481
|
padding: 0 10px;
|
|
448
482
|
}
|
|
449
|
-
.m-editor-props-panel .el-form-item__label {
|
|
483
|
+
.m-editor-props-panel.small .el-form-item__label {
|
|
450
484
|
font-size: 12px;
|
|
451
485
|
}
|
|
452
|
-
.m-editor-props-panel .m-fieldset legend {
|
|
486
|
+
.m-editor-props-panel.small .m-fieldset legend {
|
|
453
487
|
font-size: 12px;
|
|
454
488
|
}
|
|
455
|
-
.m-editor-props-panel .el-tabs__item {
|
|
489
|
+
.m-editor-props-panel.small .el-tabs__item {
|
|
456
490
|
font-size: 12px;
|
|
457
491
|
}
|
|
458
|
-
.m-editor-props-panel
|
|
459
|
-
|
|
460
|
-
.m-editor-props-panel p {
|
|
461
|
-
font-size: 12px;
|
|
492
|
+
.m-editor-props-panel .el-input__wrapper {
|
|
493
|
+
border-radius: 0;
|
|
462
494
|
}
|
|
463
|
-
.m-editor-props-panel-popper span,
|
|
464
|
-
.m-editor-props-panel-popper a,
|
|
465
|
-
.m-editor-props-panel-popper p {
|
|
495
|
+
.m-editor-props-panel-popper.small span,
|
|
496
|
+
.m-editor-props-panel-popper.small a,
|
|
497
|
+
.m-editor-props-panel-popper.small p {
|
|
466
498
|
font-size: 12px;
|
|
467
499
|
}
|
|
468
500
|
.magic-editor-content-menu {
|
|
469
501
|
position: fixed;
|
|
470
502
|
font-size: 12px;
|
|
471
503
|
background: #fff;
|
|
472
|
-
color: #333;
|
|
473
504
|
box-shadow: 0 2px 8px 2px rgba(68, 73, 77, 0.16);
|
|
474
505
|
z-index: 9999;
|
|
475
506
|
transform-origin: 0% 0%;
|
|
476
507
|
font-weight: 600;
|
|
477
508
|
padding: 4px 0px;
|
|
509
|
+
overflow: auto;
|
|
510
|
+
max-height: 100%;
|
|
478
511
|
}
|
|
479
|
-
.magic-editor-content-menu .
|
|
480
|
-
width: 100%;
|
|
481
|
-
height: 0;
|
|
482
|
-
border-color: rgba(155, 155, 155, 0.1);
|
|
483
|
-
}
|
|
484
|
-
.magic-editor-content-menu .subMenu {
|
|
485
|
-
position: absolute;
|
|
486
|
-
right: 0;
|
|
487
|
-
transform: translate(100%, 0);
|
|
488
|
-
background-color: #fff;
|
|
512
|
+
.magic-editor-content-menu .menu-item {
|
|
489
513
|
color: #333;
|
|
490
|
-
box-shadow: 0 2px 8px 2px rgba(68, 73, 77, 0.16);
|
|
491
|
-
top: 0;
|
|
492
|
-
height: 223px;
|
|
493
|
-
}
|
|
494
|
-
.magic-editor-content-menu-item {
|
|
495
514
|
display: flex;
|
|
496
515
|
-webkit-box-align: center;
|
|
497
516
|
align-items: center;
|
|
498
517
|
cursor: pointer;
|
|
499
518
|
min-width: 140px;
|
|
500
519
|
transition: all 0.2s ease 0s;
|
|
501
|
-
padding:
|
|
520
|
+
padding: 5px 14px;
|
|
502
521
|
border-left: 2px solid transparent;
|
|
503
522
|
}
|
|
523
|
+
.magic-editor-content-menu .menu-item .el-button {
|
|
524
|
+
width: 100%;
|
|
525
|
+
justify-content: flex-start;
|
|
526
|
+
}
|
|
527
|
+
.magic-editor-content-menu .menu-item .el-button--text,
|
|
528
|
+
.magic-editor-content-menu .menu-item i {
|
|
529
|
+
color: #070303;
|
|
530
|
+
}
|
|
531
|
+
.magic-editor-content-menu .menu-item.divider {
|
|
532
|
+
padding: 0 14px;
|
|
533
|
+
}
|
|
534
|
+
.magic-editor-content-menu .menu-item.divider .el-divider {
|
|
535
|
+
margin: 0;
|
|
536
|
+
}
|
|
537
|
+
.magic-editor-content-menu .menu-item:hover {
|
|
538
|
+
background-color: #f3f5f9;
|
|
539
|
+
}
|
|
504
540
|
.m-editor-stage {
|
|
505
541
|
position: relative;
|
|
506
542
|
width: 100%;
|