@haluo/biz 2.0.36 → 2.0.37
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/haluo-biz.js +662 -706
- package/dist/haluo-biz.umd.cjs +679 -734
- package/dist/{squire-raw-97946106.js → squire-raw.ca3d11c8.js} +4 -18
- package/dist/style.css +46 -37
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
var COLOUR_CLASS = "colour";
|
|
15
15
|
var FONT_FAMILY_CLASS = "font";
|
|
16
16
|
var FONT_SIZE_CLASS = "size";
|
|
17
|
-
var ZWS = "
|
|
17
|
+
var ZWS = "\u200B";
|
|
18
18
|
var win = doc.defaultView;
|
|
19
19
|
var ua = navigator.userAgent;
|
|
20
20
|
var isAndroid = /Android/.test(ua);
|
|
@@ -44,17 +44,11 @@
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
var typeToBitArray = {
|
|
47
|
-
// ELEMENT_NODE
|
|
48
47
|
1: 1,
|
|
49
|
-
// ATTRIBUTE_NODE
|
|
50
48
|
2: 2,
|
|
51
|
-
// TEXT_NODE
|
|
52
49
|
3: 4,
|
|
53
|
-
// COMMENT_NODE
|
|
54
50
|
8: 128,
|
|
55
|
-
// DOCUMENT_NODE
|
|
56
51
|
9: 256,
|
|
57
|
-
// DOCUMENT_FRAGMENT_NODE
|
|
58
52
|
11: 1024
|
|
59
53
|
};
|
|
60
54
|
function TreeWalker(root, nodeType, filter) {
|
|
@@ -388,7 +382,7 @@
|
|
|
388
382
|
node.appendChild(fixer);
|
|
389
383
|
} catch (error) {
|
|
390
384
|
self.didError({
|
|
391
|
-
name: "Squire: fixCursor
|
|
385
|
+
name: "Squire: fixCursor \u2013\xA0" + error,
|
|
392
386
|
message: "Parent: " + node.nodeName + "/" + node.innerHTML + " appendChild: " + fixer.nodeName
|
|
393
387
|
});
|
|
394
388
|
}
|
|
@@ -734,8 +728,7 @@
|
|
|
734
728
|
block = getStartBlockOfRange(range, root);
|
|
735
729
|
firstBlockInFrag = getNextBlock(frag, frag);
|
|
736
730
|
replaceBlock = !!block && isEmptyBlock(block);
|
|
737
|
-
if (block && firstBlockInFrag && !replaceBlock &&
|
|
738
|
-
!getNearest(firstBlockInFrag, frag, "PRE") && !getNearest(firstBlockInFrag, frag, "TABLE")) {
|
|
731
|
+
if (block && firstBlockInFrag && !replaceBlock && !getNearest(firstBlockInFrag, frag, "PRE") && !getNearest(firstBlockInFrag, frag, "TABLE")) {
|
|
739
732
|
moveRangeBoundariesUpTree(range, block, block, root);
|
|
740
733
|
range.collapse(true);
|
|
741
734
|
container = range.endContainer;
|
|
@@ -751,10 +744,7 @@
|
|
|
751
744
|
container = nodeAfterSplit.parentNode;
|
|
752
745
|
offset = indexOf.call(container.childNodes, nodeAfterSplit);
|
|
753
746
|
}
|
|
754
|
-
if (
|
|
755
|
-
/* isBlock( container ) && */
|
|
756
|
-
offset !== getLength(container)
|
|
757
|
-
) {
|
|
747
|
+
if (offset !== getLength(container)) {
|
|
758
748
|
blockContentsAfterSplit = root.ownerDocument.createDocumentFragment();
|
|
759
749
|
while (node = container.childNodes[offset]) {
|
|
760
750
|
blockContentsAfterSplit.appendChild(node);
|
|
@@ -1803,11 +1793,9 @@
|
|
|
1803
1793
|
if (hasImage) {
|
|
1804
1794
|
this.fireEvent("dragover", {
|
|
1805
1795
|
dataTransfer: clipboardData,
|
|
1806
|
-
/* jshint loopfunc: true */
|
|
1807
1796
|
preventDefault: function() {
|
|
1808
1797
|
fireDrop = true;
|
|
1809
1798
|
}
|
|
1810
|
-
/* jshint loopfunc: false */
|
|
1811
1799
|
});
|
|
1812
1800
|
if (fireDrop) {
|
|
1813
1801
|
this.fireEvent("drop", {
|
|
@@ -2014,9 +2002,7 @@
|
|
|
2014
2002
|
leafNodeNames,
|
|
2015
2003
|
undo: {
|
|
2016
2004
|
documentSizeThreshold: -1,
|
|
2017
|
-
// -1 means no threshold
|
|
2018
2005
|
undoLimit: -1
|
|
2019
|
-
// -1 means no limit
|
|
2020
2006
|
},
|
|
2021
2007
|
isInsertedHTMLSanitized: true,
|
|
2022
2008
|
isSetHTMLSanitized: true,
|
package/dist/style.css
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
.m-colorPicker[data-v-b46fc003]{position:relative;text-align:left;font-size:14px;display:inline-block;outline:none}.m-colorPicker ul[data-v-b46fc003],.m-colorPicker li[data-v-b46fc003],.m-colorPicker ol[data-v-b46fc003]{list-style:none;margin:0;padding:0}.m-colorPicker .colorBtn[data-v-b46fc003]{width:15px;height:15px}.m-colorPicker .colorBtn.disabled[data-v-b46fc003]{cursor:no-drop}.m-colorPicker .box[data-v-b46fc003]{position:absolute;width:190px;background:#fff;border:1px solid #ddd;visibility:hidden;border-radius:2px;margin-top:2px;padding:10px 10px 5px;box-shadow:0 0 5px #00000026;opacity:0;transition:all .3s ease;box-sizing:content-box}.m-colorPicker .box h3[data-v-b46fc003]{margin:10px 0 5px;font-size:14px;font-weight:400;line-height:1;color:#333}.m-colorPicker .box input[data-v-b46fc003]{visibility:hidden;position:absolute;left:0;bottom:0}.m-colorPicker .box.open[data-v-b46fc003]{visibility:visible;opacity:1;z-index:1}.m-colorPicker .hd[data-v-b46fc003]{overflow:hidden;line-height:29px}.m-colorPicker .hd .colorView[data-v-b46fc003]{width:100px;height:30px;float:left;transition:background-color .3s ease}.m-colorPicker .hd .defaultColor[data-v-b46fc003]{width:80px;float:right;text-align:center;border:1px solid #ddd;cursor:pointer;color:#333}.m-colorPicker .tColor li[data-v-b46fc003]{width:15px;height:15px;display:inline-block;margin:0 2px;transition:all .3s ease}.m-colorPicker .tColor li[data-v-b46fc003]:hover{box-shadow:0 0 5px #0006;transform:scale(1.3)}.m-colorPicker .bColor li[data-v-b46fc003]{width:15px;display:inline-block;margin:0 2px}.m-colorPicker .bColor li li[data-v-b46fc003]{display:block;width:15px;height:15px;transition:all .3s ease;margin:0}.m-colorPicker .bColor li li[data-v-b46fc003]:hover{box-shadow:0 0 5px #0006;transform:scale(1.3)}
|
|
2
|
-
.m12[data-v-
|
|
1
|
+
.m-colorPicker[data-v-b46fc003]{position:relative;text-align:left;font-size:14px;display:inline-block;outline:none}.m-colorPicker ul[data-v-b46fc003],.m-colorPicker li[data-v-b46fc003],.m-colorPicker ol[data-v-b46fc003]{list-style:none;margin:0;padding:0}.m-colorPicker .colorBtn[data-v-b46fc003]{width:15px;height:15px}.m-colorPicker .colorBtn.disabled[data-v-b46fc003]{cursor:no-drop}.m-colorPicker .box[data-v-b46fc003]{position:absolute;width:190px;background:#fff;border:1px solid #ddd;visibility:hidden;border-radius:2px;margin-top:2px;padding:10px 10px 5px;box-shadow:0 0 5px #00000026;opacity:0;transition:all .3s ease;box-sizing:content-box}.m-colorPicker .box h3[data-v-b46fc003]{margin:10px 0 5px;font-size:14px;font-weight:400;line-height:1;color:#333}.m-colorPicker .box input[data-v-b46fc003]{visibility:hidden;position:absolute;left:0;bottom:0}.m-colorPicker .box.open[data-v-b46fc003]{visibility:visible;opacity:1;z-index:1}.m-colorPicker .hd[data-v-b46fc003]{overflow:hidden;line-height:29px}.m-colorPicker .hd .colorView[data-v-b46fc003]{width:100px;height:30px;float:left;transition:background-color .3s ease}.m-colorPicker .hd .defaultColor[data-v-b46fc003]{width:80px;float:right;text-align:center;border:1px solid #ddd;cursor:pointer;color:#333}.m-colorPicker .tColor li[data-v-b46fc003]{width:15px;height:15px;display:inline-block;margin:0 2px;transition:all .3s ease}.m-colorPicker .tColor li[data-v-b46fc003]:hover{box-shadow:0 0 5px #0006;-webkit-transform:scale(1.3);transform:scale(1.3)}.m-colorPicker .bColor li[data-v-b46fc003]{width:15px;display:inline-block;margin:0 2px}.m-colorPicker .bColor li li[data-v-b46fc003]{display:block;width:15px;height:15px;transition:all .3s ease;margin:0}.m-colorPicker .bColor li li[data-v-b46fc003]:hover{box-shadow:0 0 5px #0006;-webkit-transform:scale(1.3);transform:scale(1.3)}
|
|
2
|
+
.m12[data-v-24d161f2] {
|
|
3
3
|
margin: 0 12px;
|
|
4
4
|
}
|
|
5
|
-
.ml16[data-v-
|
|
5
|
+
.ml16[data-v-24d161f2] {
|
|
6
6
|
margin-left: 16px;
|
|
7
7
|
}
|
|
8
|
-
.mr12[data-v-
|
|
8
|
+
.mr12[data-v-24d161f2] {
|
|
9
9
|
margin-right: 12px;
|
|
10
10
|
}
|
|
11
|
-
.ml12[data-v-
|
|
11
|
+
.ml12[data-v-24d161f2] {
|
|
12
12
|
margin-left: 12px;
|
|
13
13
|
}
|
|
14
|
-
.mr18[data-v-
|
|
14
|
+
.mr18[data-v-24d161f2] {
|
|
15
15
|
margin-right: 18px;
|
|
16
16
|
}
|
|
17
|
-
.tools[data-v-
|
|
17
|
+
.tools[data-v-24d161f2] {
|
|
18
18
|
z-index: 2;
|
|
19
19
|
position: relative;
|
|
20
20
|
background: #FAFAFA;
|
|
21
21
|
}
|
|
22
|
-
.tools .tools-content[data-v-
|
|
22
|
+
.tools .tools-content[data-v-24d161f2] {
|
|
23
23
|
display: flex;
|
|
24
24
|
align-items: center;
|
|
25
25
|
}
|
|
26
|
-
.tools img[data-v-
|
|
26
|
+
.tools img[data-v-24d161f2] {
|
|
27
27
|
cursor: pointer;
|
|
28
28
|
}
|
|
29
|
-
.tools .box[data-v-
|
|
29
|
+
.tools .box[data-v-24d161f2] {
|
|
30
30
|
position: relative;
|
|
31
31
|
}
|
|
32
|
-
.tools .box .box-mask[data-v-
|
|
32
|
+
.tools .box .box-mask[data-v-24d161f2] {
|
|
33
33
|
width: 40px;
|
|
34
34
|
height: 40px;
|
|
35
35
|
background: black;
|
|
@@ -38,31 +38,32 @@
|
|
|
38
38
|
position: absolute;
|
|
39
39
|
pointer-events: none;
|
|
40
40
|
}
|
|
41
|
-
.tools .tools-title[data-v-
|
|
41
|
+
.tools .tools-title[data-v-24d161f2] {
|
|
42
42
|
color: #333333;
|
|
43
43
|
font-size: 18px;
|
|
44
44
|
display: flex;
|
|
45
45
|
align-items: center;
|
|
46
46
|
cursor: pointer;
|
|
47
47
|
}
|
|
48
|
-
.tools .disable[data-v-
|
|
48
|
+
.tools .disable[data-v-24d161f2] {
|
|
49
49
|
cursor: not-allowed;
|
|
50
|
-
filter: blur(0.6px);
|
|
50
|
+
-webkit-filter: blur(0.6px);
|
|
51
|
+
filter: blur(0.6px);
|
|
51
52
|
}
|
|
52
|
-
.tools .disable img[data-v-
|
|
53
|
+
.tools .disable img[data-v-24d161f2] {
|
|
53
54
|
cursor: not-allowed;
|
|
54
55
|
}
|
|
55
|
-
.tools .wrap[data-v-
|
|
56
|
+
.tools .wrap[data-v-24d161f2] {
|
|
56
57
|
position: relative;
|
|
57
58
|
}
|
|
58
|
-
.tools[data-v-
|
|
59
|
+
.tools[data-v-24d161f2] .m-colorPicker {
|
|
59
60
|
position: absolute;
|
|
60
61
|
width: 100%;
|
|
61
62
|
left: 0;
|
|
62
63
|
z-index: -1;
|
|
63
64
|
height: 100%;
|
|
64
65
|
}
|
|
65
|
-
.tools[data-v-
|
|
66
|
+
.tools[data-v-24d161f2] .m-colorPicker .colorBtn {
|
|
66
67
|
width: 100%;
|
|
67
68
|
height: 100%;
|
|
68
69
|
opacity: 0;
|
|
@@ -428,7 +429,8 @@
|
|
|
428
429
|
position: absolute;
|
|
429
430
|
top: 0;
|
|
430
431
|
right: 0;
|
|
431
|
-
transform: translate(50%, -50%);
|
|
432
|
+
-webkit-transform: translate(50%, -50%);
|
|
433
|
+
transform: translate(50%, -50%);
|
|
432
434
|
}
|
|
433
435
|
.insert-img .img-wrap {
|
|
434
436
|
display: flex;
|
|
@@ -475,7 +477,7 @@
|
|
|
475
477
|
color: #999999;
|
|
476
478
|
margin-bottom: 5px;
|
|
477
479
|
}
|
|
478
|
-
.article-item[data-v-
|
|
480
|
+
.article-item[data-v-45d58d86] {
|
|
479
481
|
-webkit-user-select: none;
|
|
480
482
|
-moz-user-select: none;
|
|
481
483
|
-ms-user-select: none;
|
|
@@ -488,7 +490,7 @@
|
|
|
488
490
|
width: 440px;
|
|
489
491
|
position: relative;
|
|
490
492
|
}
|
|
491
|
-
.article-item .icon[data-v-
|
|
493
|
+
.article-item .icon[data-v-45d58d86] {
|
|
492
494
|
width: 14px;
|
|
493
495
|
-webkit-user-select: none;
|
|
494
496
|
-moz-user-select: none;
|
|
@@ -498,9 +500,10 @@
|
|
|
498
500
|
top: 0;
|
|
499
501
|
right: 0;
|
|
500
502
|
color: #b7b7b7;
|
|
501
|
-
transform: translate(50%, -50%);
|
|
503
|
+
-webkit-transform: translate(50%, -50%);
|
|
504
|
+
transform: translate(50%, -50%);
|
|
502
505
|
}
|
|
503
|
-
.article-item img[data-v-
|
|
506
|
+
.article-item img[data-v-45d58d86] {
|
|
504
507
|
width: 80px;
|
|
505
508
|
height: 80px;
|
|
506
509
|
-o-object-fit: cover;
|
|
@@ -508,12 +511,12 @@
|
|
|
508
511
|
margin-right: 12px;
|
|
509
512
|
flex-shrink: 0;
|
|
510
513
|
}
|
|
511
|
-
.article-item .article-item_right[data-v-
|
|
514
|
+
.article-item .article-item_right[data-v-45d58d86] {
|
|
512
515
|
display: flex;
|
|
513
516
|
flex-direction: column;
|
|
514
517
|
justify-content: space-between;
|
|
515
518
|
}
|
|
516
|
-
.article-item .article-item_right .name[data-v-
|
|
519
|
+
.article-item .article-item_right .name[data-v-45d58d86] {
|
|
517
520
|
font-size: 16px;
|
|
518
521
|
margin-top: 5px;
|
|
519
522
|
line-height: 22px;
|
|
@@ -523,7 +526,7 @@
|
|
|
523
526
|
overflow: hidden;
|
|
524
527
|
text-overflow: ellipsis;
|
|
525
528
|
}
|
|
526
|
-
.article-item .article-item_right .score[data-v-
|
|
529
|
+
.article-item .article-item_right .score[data-v-45d58d86] {
|
|
527
530
|
color: #999999;
|
|
528
531
|
line-height: 17px;
|
|
529
532
|
font-size: 12px;
|
|
@@ -531,18 +534,18 @@
|
|
|
531
534
|
align-items: center;
|
|
532
535
|
margin-bottom: 6px;
|
|
533
536
|
}
|
|
534
|
-
.article-item .article-item_right .score span[data-v-
|
|
537
|
+
.article-item .article-item_right .score span[data-v-45d58d86]:nth-child(2) {
|
|
535
538
|
margin-left: 10px;
|
|
536
539
|
}
|
|
537
|
-
.article-item .article-item_right .score span[data-v-
|
|
540
|
+
.article-item .article-item_right .score span[data-v-45d58d86]:nth-child(3) {
|
|
538
541
|
margin-left: 10px;
|
|
539
542
|
}
|
|
540
|
-
.article-item .article-item_right .price[data-v-
|
|
543
|
+
.article-item .article-item_right .price[data-v-45d58d86] {
|
|
541
544
|
color: #ff5a25;
|
|
542
545
|
font-size: 16px;
|
|
543
546
|
margin-top: 6px;
|
|
544
547
|
}
|
|
545
|
-
.article-item .article-bg[data-v-
|
|
548
|
+
.article-item .article-bg[data-v-45d58d86] {
|
|
546
549
|
position: absolute;
|
|
547
550
|
width: 440px;
|
|
548
551
|
height: 60px;
|
|
@@ -557,7 +560,7 @@
|
|
|
557
560
|
-webkit-backdrop-filter: blur(3px);
|
|
558
561
|
backdrop-filter: blur(3px);
|
|
559
562
|
}
|
|
560
|
-
.article-item .article-bg-height[data-v-
|
|
563
|
+
.article-item .article-bg-height[data-v-45d58d86] {
|
|
561
564
|
height: 80px;
|
|
562
565
|
line-height: 80px;
|
|
563
566
|
}
|
|
@@ -683,7 +686,8 @@
|
|
|
683
686
|
width: 440px;
|
|
684
687
|
height: 100%;
|
|
685
688
|
left: 50%;
|
|
686
|
-
transform: translateX(-50%);
|
|
689
|
+
-webkit-transform: translateX(-50%);
|
|
690
|
+
transform: translateX(-50%);
|
|
687
691
|
line-height: 25px;
|
|
688
692
|
font-size: 18px;
|
|
689
693
|
z-index: 1;
|
|
@@ -714,7 +718,8 @@
|
|
|
714
718
|
color: #fff;
|
|
715
719
|
z-index: 1;
|
|
716
720
|
left: 50%;
|
|
717
|
-
transform: translateX(-50%);
|
|
721
|
+
-webkit-transform: translateX(-50%);
|
|
722
|
+
transform: translateX(-50%);
|
|
718
723
|
width: 90px;
|
|
719
724
|
line-height: 32px;
|
|
720
725
|
height: 32px;
|
|
@@ -741,7 +746,8 @@
|
|
|
741
746
|
line-height: 32px;
|
|
742
747
|
border-radius: 4px;
|
|
743
748
|
left: 50%;
|
|
744
|
-
transform: translateX(-50%);
|
|
749
|
+
-webkit-transform: translateX(-50%);
|
|
750
|
+
transform: translateX(-50%);
|
|
745
751
|
}
|
|
746
752
|
.editor #editor-content .halo-img-content .desc-input-wrap {
|
|
747
753
|
margin-top: 20px;
|
|
@@ -773,7 +779,8 @@
|
|
|
773
779
|
text-align: center;
|
|
774
780
|
position: absolute;
|
|
775
781
|
top: 0;
|
|
776
|
-
transform: translate(-40%, -50%);
|
|
782
|
+
-webkit-transform: translate(-40%, -50%);
|
|
783
|
+
transform: translate(-40%, -50%);
|
|
777
784
|
}
|
|
778
785
|
.editor #editor-content .halo-img-content .halo-picture-area {
|
|
779
786
|
display: inline-block;
|
|
@@ -786,7 +793,8 @@
|
|
|
786
793
|
}
|
|
787
794
|
.editor #editor-content .halo-img-content .no-upload,
|
|
788
795
|
.editor #editor-content .halo-img-content .upload-fail {
|
|
789
|
-
filter: brightness(0.5);
|
|
796
|
+
-webkit-filter: brightness(0.5);
|
|
797
|
+
filter: brightness(0.5);
|
|
790
798
|
}
|
|
791
799
|
.editor #editor-content .halo-select {
|
|
792
800
|
outline: 2px solid #1a74ff;
|
|
@@ -803,7 +811,8 @@
|
|
|
803
811
|
font-size: 18px;
|
|
804
812
|
left: calc(50% + 250px);
|
|
805
813
|
top: 0;
|
|
806
|
-
transform: translate(-50%, -50%);
|
|
814
|
+
-webkit-transform: translate(-50%, -50%);
|
|
815
|
+
transform: translate(-50%, -50%);
|
|
807
816
|
}
|
|
808
817
|
.editor #editor-content .video-cover-replace {
|
|
809
818
|
cursor: pointer;
|