@haluo/biz 2.0.51 → 2.0.52
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 +2 -0
- package/dist/haluo-biz.js +901 -690
- package/dist/haluo-biz.umd.cjs +924 -702
- package/dist/{squire-raw.3e73a64b.js → squire-raw-1aaeff0b.js} +18 -4
- package/dist/style.css +47 -52
- 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 = "";
|
|
18
18
|
var win = doc.defaultView;
|
|
19
19
|
var ua = navigator.userAgent;
|
|
20
20
|
var isAndroid = /Android/.test(ua);
|
|
@@ -44,11 +44,17 @@
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
var typeToBitArray = {
|
|
47
|
+
// ELEMENT_NODE
|
|
47
48
|
1: 1,
|
|
49
|
+
// ATTRIBUTE_NODE
|
|
48
50
|
2: 2,
|
|
51
|
+
// TEXT_NODE
|
|
49
52
|
3: 4,
|
|
53
|
+
// COMMENT_NODE
|
|
50
54
|
8: 128,
|
|
55
|
+
// DOCUMENT_NODE
|
|
51
56
|
9: 256,
|
|
57
|
+
// DOCUMENT_FRAGMENT_NODE
|
|
52
58
|
11: 1024
|
|
53
59
|
};
|
|
54
60
|
function TreeWalker(root, nodeType, filter) {
|
|
@@ -382,7 +388,7 @@
|
|
|
382
388
|
node.appendChild(fixer);
|
|
383
389
|
} catch (error) {
|
|
384
390
|
self.didError({
|
|
385
|
-
name: "Squire: fixCursor
|
|
391
|
+
name: "Squire: fixCursor – " + error,
|
|
386
392
|
message: "Parent: " + node.nodeName + "/" + node.innerHTML + " appendChild: " + fixer.nodeName
|
|
387
393
|
});
|
|
388
394
|
}
|
|
@@ -717,7 +723,8 @@
|
|
|
717
723
|
block = getStartBlockOfRange(range, root);
|
|
718
724
|
firstBlockInFrag = getNextBlock(frag, frag);
|
|
719
725
|
replaceBlock = !!block && isEmptyBlock(block);
|
|
720
|
-
if (block && firstBlockInFrag && !replaceBlock &&
|
|
726
|
+
if (block && firstBlockInFrag && !replaceBlock && // Don't merge table cells or PRE elements into block
|
|
727
|
+
!getNearest(firstBlockInFrag, frag, "PRE") && !getNearest(firstBlockInFrag, frag, "TABLE")) {
|
|
721
728
|
moveRangeBoundariesUpTree(range, block, block, root);
|
|
722
729
|
range.collapse(true);
|
|
723
730
|
container = range.endContainer;
|
|
@@ -733,7 +740,10 @@
|
|
|
733
740
|
container = nodeAfterSplit.parentNode;
|
|
734
741
|
offset = indexOf.call(container.childNodes, nodeAfterSplit);
|
|
735
742
|
}
|
|
736
|
-
if (
|
|
743
|
+
if (
|
|
744
|
+
/* isBlock( container ) && */
|
|
745
|
+
offset !== getLength(container)
|
|
746
|
+
) {
|
|
737
747
|
blockContentsAfterSplit = root.ownerDocument.createDocumentFragment();
|
|
738
748
|
while (node = container.childNodes[offset]) {
|
|
739
749
|
blockContentsAfterSplit.appendChild(node);
|
|
@@ -1782,9 +1792,11 @@
|
|
|
1782
1792
|
if (hasImage) {
|
|
1783
1793
|
this.fireEvent("dragover", {
|
|
1784
1794
|
dataTransfer: clipboardData,
|
|
1795
|
+
/* jshint loopfunc: true */
|
|
1785
1796
|
preventDefault: function() {
|
|
1786
1797
|
fireDrop = true;
|
|
1787
1798
|
}
|
|
1799
|
+
/* jshint loopfunc: false */
|
|
1788
1800
|
});
|
|
1789
1801
|
if (fireDrop) {
|
|
1790
1802
|
this.fireEvent("drop", {
|
|
@@ -1991,7 +2003,9 @@
|
|
|
1991
2003
|
leafNodeNames,
|
|
1992
2004
|
undo: {
|
|
1993
2005
|
documentSizeThreshold: -1,
|
|
2006
|
+
// -1 means no threshold
|
|
1994
2007
|
undoLimit: -1
|
|
2008
|
+
// -1 means no limit
|
|
1995
2009
|
},
|
|
1996
2010
|
isInsertedHTMLSanitized: true,
|
|
1997
2011
|
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
|
|
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;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-50235bb8] {
|
|
3
3
|
margin: 0 12px;
|
|
4
4
|
}
|
|
5
|
-
.ml16[data-v-
|
|
5
|
+
.ml16[data-v-50235bb8] {
|
|
6
6
|
margin-left: 16px;
|
|
7
7
|
}
|
|
8
|
-
.mr12[data-v-
|
|
8
|
+
.mr12[data-v-50235bb8] {
|
|
9
9
|
margin-right: 12px;
|
|
10
10
|
}
|
|
11
|
-
.ml12[data-v-
|
|
11
|
+
.ml12[data-v-50235bb8] {
|
|
12
12
|
margin-left: 12px;
|
|
13
13
|
}
|
|
14
|
-
.mr18[data-v-
|
|
14
|
+
.mr18[data-v-50235bb8] {
|
|
15
15
|
margin-right: 18px;
|
|
16
16
|
}
|
|
17
|
-
.tools[data-v-
|
|
17
|
+
.tools[data-v-50235bb8] {
|
|
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-50235bb8] {
|
|
23
23
|
display: flex;
|
|
24
24
|
align-items: center;
|
|
25
25
|
}
|
|
26
|
-
.tools img[data-v-
|
|
26
|
+
.tools img[data-v-50235bb8] {
|
|
27
27
|
cursor: pointer;
|
|
28
28
|
}
|
|
29
|
-
.tools .box[data-v-
|
|
29
|
+
.tools .box[data-v-50235bb8] {
|
|
30
30
|
position: relative;
|
|
31
31
|
}
|
|
32
|
-
.tools .box .box-mask[data-v-
|
|
32
|
+
.tools .box .box-mask[data-v-50235bb8] {
|
|
33
33
|
width: 40px;
|
|
34
34
|
height: 40px;
|
|
35
35
|
background: black;
|
|
@@ -38,32 +38,31 @@
|
|
|
38
38
|
position: absolute;
|
|
39
39
|
pointer-events: none;
|
|
40
40
|
}
|
|
41
|
-
.tools .tools-title[data-v-
|
|
41
|
+
.tools .tools-title[data-v-50235bb8] {
|
|
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-50235bb8] {
|
|
49
49
|
cursor: not-allowed;
|
|
50
|
-
|
|
51
|
-
filter: blur(0.6px);
|
|
50
|
+
filter: blur(0.6px);
|
|
52
51
|
}
|
|
53
|
-
.tools .disable img[data-v-
|
|
52
|
+
.tools .disable img[data-v-50235bb8] {
|
|
54
53
|
cursor: not-allowed;
|
|
55
54
|
}
|
|
56
|
-
.tools .wrap[data-v-
|
|
55
|
+
.tools .wrap[data-v-50235bb8] {
|
|
57
56
|
position: relative;
|
|
58
57
|
}
|
|
59
|
-
.tools[data-v-
|
|
58
|
+
.tools[data-v-50235bb8] .m-colorPicker {
|
|
60
59
|
position: absolute;
|
|
61
60
|
width: 100%;
|
|
62
61
|
left: 0;
|
|
63
62
|
z-index: -1;
|
|
64
63
|
height: 100%;
|
|
65
64
|
}
|
|
66
|
-
.tools[data-v-
|
|
65
|
+
.tools[data-v-50235bb8] .m-colorPicker .colorBtn {
|
|
67
66
|
width: 100%;
|
|
68
67
|
height: 100%;
|
|
69
68
|
opacity: 0;
|
|
@@ -429,8 +428,7 @@
|
|
|
429
428
|
position: absolute;
|
|
430
429
|
top: 0;
|
|
431
430
|
right: 0;
|
|
432
|
-
|
|
433
|
-
transform: translate(50%, -50%);
|
|
431
|
+
transform: translate(50%, -50%);
|
|
434
432
|
}
|
|
435
433
|
.insert-img .img-wrap {
|
|
436
434
|
display: flex;
|
|
@@ -527,6 +525,9 @@
|
|
|
527
525
|
overflow-y: auto;
|
|
528
526
|
}
|
|
529
527
|
.topic-popover .topic-popover-content .topic-list-container .topic-list .topic-item {
|
|
528
|
+
display: flex;
|
|
529
|
+
align-items: center;
|
|
530
|
+
justify-content: space-between;
|
|
530
531
|
padding: 12px 16px;
|
|
531
532
|
font-size: 14px;
|
|
532
533
|
color: #333;
|
|
@@ -534,6 +535,10 @@
|
|
|
534
535
|
border-bottom: 1px solid #f8f8f8;
|
|
535
536
|
transition: background-color 0.2s;
|
|
536
537
|
}
|
|
538
|
+
.topic-popover .topic-popover-content .topic-list-container .topic-list .topic-item span:nth-child(2) {
|
|
539
|
+
font-size: 12px;
|
|
540
|
+
color: gainsboro;
|
|
541
|
+
}
|
|
537
542
|
.topic-popover .topic-popover-content .topic-list-container .topic-list .topic-item:hover {
|
|
538
543
|
background: #f5f5f5;
|
|
539
544
|
color: #FF3C08;
|
|
@@ -561,7 +566,7 @@
|
|
|
561
566
|
color: #999999;
|
|
562
567
|
margin-bottom: 5px;
|
|
563
568
|
}
|
|
564
|
-
.article-item[data-v-
|
|
569
|
+
.article-item[data-v-4ebe06df] {
|
|
565
570
|
-webkit-user-select: none;
|
|
566
571
|
-moz-user-select: none;
|
|
567
572
|
-ms-user-select: none;
|
|
@@ -574,7 +579,7 @@
|
|
|
574
579
|
width: 440px;
|
|
575
580
|
position: relative;
|
|
576
581
|
}
|
|
577
|
-
.article-item .icon[data-v-
|
|
582
|
+
.article-item .icon[data-v-4ebe06df] {
|
|
578
583
|
width: 14px;
|
|
579
584
|
-webkit-user-select: none;
|
|
580
585
|
-moz-user-select: none;
|
|
@@ -584,10 +589,9 @@
|
|
|
584
589
|
top: 0;
|
|
585
590
|
right: 0;
|
|
586
591
|
color: #b7b7b7;
|
|
587
|
-
|
|
588
|
-
transform: translate(50%, -50%);
|
|
592
|
+
transform: translate(50%, -50%);
|
|
589
593
|
}
|
|
590
|
-
.article-item img[data-v-
|
|
594
|
+
.article-item img[data-v-4ebe06df] {
|
|
591
595
|
width: 80px;
|
|
592
596
|
height: 80px;
|
|
593
597
|
-o-object-fit: cover;
|
|
@@ -595,12 +599,12 @@
|
|
|
595
599
|
margin-right: 12px;
|
|
596
600
|
flex-shrink: 0;
|
|
597
601
|
}
|
|
598
|
-
.article-item .article-item_right[data-v-
|
|
602
|
+
.article-item .article-item_right[data-v-4ebe06df] {
|
|
599
603
|
display: flex;
|
|
600
604
|
flex-direction: column;
|
|
601
605
|
justify-content: space-between;
|
|
602
606
|
}
|
|
603
|
-
.article-item .article-item_right .name[data-v-
|
|
607
|
+
.article-item .article-item_right .name[data-v-4ebe06df] {
|
|
604
608
|
font-size: 16px;
|
|
605
609
|
margin-top: 5px;
|
|
606
610
|
line-height: 22px;
|
|
@@ -610,7 +614,7 @@
|
|
|
610
614
|
overflow: hidden;
|
|
611
615
|
text-overflow: ellipsis;
|
|
612
616
|
}
|
|
613
|
-
.article-item .article-item_right .score[data-v-
|
|
617
|
+
.article-item .article-item_right .score[data-v-4ebe06df] {
|
|
614
618
|
color: #999999;
|
|
615
619
|
line-height: 17px;
|
|
616
620
|
font-size: 12px;
|
|
@@ -618,18 +622,18 @@
|
|
|
618
622
|
align-items: center;
|
|
619
623
|
margin-bottom: 6px;
|
|
620
624
|
}
|
|
621
|
-
.article-item .article-item_right .score span[data-v-
|
|
625
|
+
.article-item .article-item_right .score span[data-v-4ebe06df]:nth-child(2) {
|
|
622
626
|
margin-left: 10px;
|
|
623
627
|
}
|
|
624
|
-
.article-item .article-item_right .score span[data-v-
|
|
628
|
+
.article-item .article-item_right .score span[data-v-4ebe06df]:nth-child(3) {
|
|
625
629
|
margin-left: 10px;
|
|
626
630
|
}
|
|
627
|
-
.article-item .article-item_right .price[data-v-
|
|
631
|
+
.article-item .article-item_right .price[data-v-4ebe06df] {
|
|
628
632
|
color: #ff5a25;
|
|
629
633
|
font-size: 16px;
|
|
630
634
|
margin-top: 6px;
|
|
631
635
|
}
|
|
632
|
-
.article-item .article-bg[data-v-
|
|
636
|
+
.article-item .article-bg[data-v-4ebe06df] {
|
|
633
637
|
position: absolute;
|
|
634
638
|
width: 440px;
|
|
635
639
|
height: 60px;
|
|
@@ -644,7 +648,7 @@
|
|
|
644
648
|
-webkit-backdrop-filter: blur(3px);
|
|
645
649
|
backdrop-filter: blur(3px);
|
|
646
650
|
}
|
|
647
|
-
.article-item .article-bg-height[data-v-
|
|
651
|
+
.article-item .article-bg-height[data-v-4ebe06df] {
|
|
648
652
|
height: 80px;
|
|
649
653
|
line-height: 80px;
|
|
650
654
|
}
|
|
@@ -766,8 +770,7 @@
|
|
|
766
770
|
width: 440px;
|
|
767
771
|
height: 100%;
|
|
768
772
|
left: 50%;
|
|
769
|
-
|
|
770
|
-
transform: translateX(-50%);
|
|
773
|
+
transform: translateX(-50%);
|
|
771
774
|
line-height: 25px;
|
|
772
775
|
font-size: 18px;
|
|
773
776
|
z-index: 1;
|
|
@@ -798,8 +801,7 @@
|
|
|
798
801
|
color: #fff;
|
|
799
802
|
z-index: 1;
|
|
800
803
|
left: 50%;
|
|
801
|
-
|
|
802
|
-
transform: translateX(-50%);
|
|
804
|
+
transform: translateX(-50%);
|
|
803
805
|
width: 90px;
|
|
804
806
|
line-height: 32px;
|
|
805
807
|
height: 32px;
|
|
@@ -826,8 +828,7 @@
|
|
|
826
828
|
line-height: 32px;
|
|
827
829
|
border-radius: 4px;
|
|
828
830
|
left: 50%;
|
|
829
|
-
|
|
830
|
-
transform: translateX(-50%);
|
|
831
|
+
transform: translateX(-50%);
|
|
831
832
|
}
|
|
832
833
|
.editor #editor-content .halo-img-content .desc-input-wrap {
|
|
833
834
|
margin-top: 20px;
|
|
@@ -859,8 +860,7 @@
|
|
|
859
860
|
text-align: center;
|
|
860
861
|
position: absolute;
|
|
861
862
|
top: 0;
|
|
862
|
-
|
|
863
|
-
transform: translate(-40%, -50%);
|
|
863
|
+
transform: translate(-40%, -50%);
|
|
864
864
|
}
|
|
865
865
|
.editor #editor-content .halo-img-content .halo-picture-area {
|
|
866
866
|
display: inline-block;
|
|
@@ -873,8 +873,7 @@
|
|
|
873
873
|
}
|
|
874
874
|
.editor #editor-content .halo-img-content .no-upload,
|
|
875
875
|
.editor #editor-content .halo-img-content .upload-fail {
|
|
876
|
-
|
|
877
|
-
filter: brightness(0.5);
|
|
876
|
+
filter: brightness(0.5);
|
|
878
877
|
}
|
|
879
878
|
.editor #editor-content .halo-modify-content {
|
|
880
879
|
position: relative;
|
|
@@ -891,8 +890,7 @@
|
|
|
891
890
|
width: 440px;
|
|
892
891
|
height: 100%;
|
|
893
892
|
left: 50%;
|
|
894
|
-
|
|
895
|
-
transform: translateX(-50%);
|
|
893
|
+
transform: translateX(-50%);
|
|
896
894
|
line-height: 25px;
|
|
897
895
|
font-size: 18px;
|
|
898
896
|
z-index: 1;
|
|
@@ -923,8 +921,7 @@
|
|
|
923
921
|
color: #fff;
|
|
924
922
|
z-index: 1;
|
|
925
923
|
left: 50%;
|
|
926
|
-
|
|
927
|
-
transform: translateX(-50%);
|
|
924
|
+
transform: translateX(-50%);
|
|
928
925
|
width: 90px;
|
|
929
926
|
line-height: 32px;
|
|
930
927
|
height: 32px;
|
|
@@ -956,8 +953,7 @@
|
|
|
956
953
|
}
|
|
957
954
|
.editor #editor-content .halo-modify-content .no-upload,
|
|
958
955
|
.editor #editor-content .halo-modify-content .upload-fail {
|
|
959
|
-
|
|
960
|
-
filter: brightness(0.5);
|
|
956
|
+
filter: brightness(0.5);
|
|
961
957
|
}
|
|
962
958
|
.editor #editor-content .halo-select {
|
|
963
959
|
outline: 2px solid #1a74ff;
|
|
@@ -974,8 +970,7 @@
|
|
|
974
970
|
font-size: 18px;
|
|
975
971
|
left: calc(50% + 250px);
|
|
976
972
|
top: 0;
|
|
977
|
-
|
|
978
|
-
transform: translate(-50%, -50%);
|
|
973
|
+
transform: translate(-50%, -50%);
|
|
979
974
|
}
|
|
980
975
|
.editor #editor-content .video-cover-replace {
|
|
981
976
|
cursor: pointer;
|