@haluo/biz 2.0.43 → 2.0.44

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.
@@ -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 – " + error,
385
+ name: "Squire: fixCursor \u2013\xA0" + error,
392
386
  message: "Parent: " + node.nodeName + "/" + node.innerHTML + " appendChild: " + fixer.nodeName
393
387
  });
394
388
  }
@@ -723,8 +717,7 @@
723
717
  block = getStartBlockOfRange(range, root);
724
718
  firstBlockInFrag = getNextBlock(frag, frag);
725
719
  replaceBlock = !!block && isEmptyBlock(block);
726
- if (block && firstBlockInFrag && !replaceBlock && // Don't merge table cells or PRE elements into block
727
- !getNearest(firstBlockInFrag, frag, "PRE") && !getNearest(firstBlockInFrag, frag, "TABLE")) {
720
+ if (block && firstBlockInFrag && !replaceBlock && !getNearest(firstBlockInFrag, frag, "PRE") && !getNearest(firstBlockInFrag, frag, "TABLE")) {
728
721
  moveRangeBoundariesUpTree(range, block, block, root);
729
722
  range.collapse(true);
730
723
  container = range.endContainer;
@@ -740,10 +733,7 @@
740
733
  container = nodeAfterSplit.parentNode;
741
734
  offset = indexOf.call(container.childNodes, nodeAfterSplit);
742
735
  }
743
- if (
744
- /* isBlock( container ) && */
745
- offset !== getLength(container)
746
- ) {
736
+ if (offset !== getLength(container)) {
747
737
  blockContentsAfterSplit = root.ownerDocument.createDocumentFragment();
748
738
  while (node = container.childNodes[offset]) {
749
739
  blockContentsAfterSplit.appendChild(node);
@@ -1792,11 +1782,9 @@
1792
1782
  if (hasImage) {
1793
1783
  this.fireEvent("dragover", {
1794
1784
  dataTransfer: clipboardData,
1795
- /* jshint loopfunc: true */
1796
1785
  preventDefault: function() {
1797
1786
  fireDrop = true;
1798
1787
  }
1799
- /* jshint loopfunc: false */
1800
1788
  });
1801
1789
  if (fireDrop) {
1802
1790
  this.fireEvent("drop", {
@@ -2003,9 +1991,7 @@
2003
1991
  leafNodeNames,
2004
1992
  undo: {
2005
1993
  documentSizeThreshold: -1,
2006
- // -1 means no threshold
2007
1994
  undoLimit: -1
2008
- // -1 means no limit
2009
1995
  },
2010
1996
  isInsertedHTMLSanitized: true,
2011
1997
  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-50235bb8] {
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-50235bb8] {
5
+ .ml16[data-v-24d161f2] {
6
6
  margin-left: 16px;
7
7
  }
8
- .mr12[data-v-50235bb8] {
8
+ .mr12[data-v-24d161f2] {
9
9
  margin-right: 12px;
10
10
  }
11
- .ml12[data-v-50235bb8] {
11
+ .ml12[data-v-24d161f2] {
12
12
  margin-left: 12px;
13
13
  }
14
- .mr18[data-v-50235bb8] {
14
+ .mr18[data-v-24d161f2] {
15
15
  margin-right: 18px;
16
16
  }
17
- .tools[data-v-50235bb8] {
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-50235bb8] {
22
+ .tools .tools-content[data-v-24d161f2] {
23
23
  display: flex;
24
24
  align-items: center;
25
25
  }
26
- .tools img[data-v-50235bb8] {
26
+ .tools img[data-v-24d161f2] {
27
27
  cursor: pointer;
28
28
  }
29
- .tools .box[data-v-50235bb8] {
29
+ .tools .box[data-v-24d161f2] {
30
30
  position: relative;
31
31
  }
32
- .tools .box .box-mask[data-v-50235bb8] {
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-50235bb8] {
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-50235bb8] {
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-50235bb8] {
53
+ .tools .disable img[data-v-24d161f2] {
53
54
  cursor: not-allowed;
54
55
  }
55
- .tools .wrap[data-v-50235bb8] {
56
+ .tools .wrap[data-v-24d161f2] {
56
57
  position: relative;
57
58
  }
58
- .tools[data-v-50235bb8] .m-colorPicker {
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-50235bb8] .m-colorPicker .colorBtn {
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;
@@ -559,7 +561,7 @@
559
561
  color: #999999;
560
562
  margin-bottom: 5px;
561
563
  }
562
- .article-item[data-v-4ebe06df] {
564
+ .article-item[data-v-45d58d86] {
563
565
  -webkit-user-select: none;
564
566
  -moz-user-select: none;
565
567
  -ms-user-select: none;
@@ -572,7 +574,7 @@
572
574
  width: 440px;
573
575
  position: relative;
574
576
  }
575
- .article-item .icon[data-v-4ebe06df] {
577
+ .article-item .icon[data-v-45d58d86] {
576
578
  width: 14px;
577
579
  -webkit-user-select: none;
578
580
  -moz-user-select: none;
@@ -582,9 +584,10 @@
582
584
  top: 0;
583
585
  right: 0;
584
586
  color: #b7b7b7;
585
- transform: translate(50%, -50%);
587
+ -webkit-transform: translate(50%, -50%);
588
+ transform: translate(50%, -50%);
586
589
  }
587
- .article-item img[data-v-4ebe06df] {
590
+ .article-item img[data-v-45d58d86] {
588
591
  width: 80px;
589
592
  height: 80px;
590
593
  -o-object-fit: cover;
@@ -592,12 +595,12 @@
592
595
  margin-right: 12px;
593
596
  flex-shrink: 0;
594
597
  }
595
- .article-item .article-item_right[data-v-4ebe06df] {
598
+ .article-item .article-item_right[data-v-45d58d86] {
596
599
  display: flex;
597
600
  flex-direction: column;
598
601
  justify-content: space-between;
599
602
  }
600
- .article-item .article-item_right .name[data-v-4ebe06df] {
603
+ .article-item .article-item_right .name[data-v-45d58d86] {
601
604
  font-size: 16px;
602
605
  margin-top: 5px;
603
606
  line-height: 22px;
@@ -607,7 +610,7 @@
607
610
  overflow: hidden;
608
611
  text-overflow: ellipsis;
609
612
  }
610
- .article-item .article-item_right .score[data-v-4ebe06df] {
613
+ .article-item .article-item_right .score[data-v-45d58d86] {
611
614
  color: #999999;
612
615
  line-height: 17px;
613
616
  font-size: 12px;
@@ -615,18 +618,18 @@
615
618
  align-items: center;
616
619
  margin-bottom: 6px;
617
620
  }
618
- .article-item .article-item_right .score span[data-v-4ebe06df]:nth-child(2) {
621
+ .article-item .article-item_right .score span[data-v-45d58d86]:nth-child(2) {
619
622
  margin-left: 10px;
620
623
  }
621
- .article-item .article-item_right .score span[data-v-4ebe06df]:nth-child(3) {
624
+ .article-item .article-item_right .score span[data-v-45d58d86]:nth-child(3) {
622
625
  margin-left: 10px;
623
626
  }
624
- .article-item .article-item_right .price[data-v-4ebe06df] {
627
+ .article-item .article-item_right .price[data-v-45d58d86] {
625
628
  color: #ff5a25;
626
629
  font-size: 16px;
627
630
  margin-top: 6px;
628
631
  }
629
- .article-item .article-bg[data-v-4ebe06df] {
632
+ .article-item .article-bg[data-v-45d58d86] {
630
633
  position: absolute;
631
634
  width: 440px;
632
635
  height: 60px;
@@ -641,7 +644,7 @@
641
644
  -webkit-backdrop-filter: blur(3px);
642
645
  backdrop-filter: blur(3px);
643
646
  }
644
- .article-item .article-bg-height[data-v-4ebe06df] {
647
+ .article-item .article-bg-height[data-v-45d58d86] {
645
648
  height: 80px;
646
649
  line-height: 80px;
647
650
  }
@@ -763,7 +766,8 @@
763
766
  width: 440px;
764
767
  height: 100%;
765
768
  left: 50%;
766
- transform: translateX(-50%);
769
+ -webkit-transform: translateX(-50%);
770
+ transform: translateX(-50%);
767
771
  line-height: 25px;
768
772
  font-size: 18px;
769
773
  z-index: 1;
@@ -794,7 +798,8 @@
794
798
  color: #fff;
795
799
  z-index: 1;
796
800
  left: 50%;
797
- transform: translateX(-50%);
801
+ -webkit-transform: translateX(-50%);
802
+ transform: translateX(-50%);
798
803
  width: 90px;
799
804
  line-height: 32px;
800
805
  height: 32px;
@@ -821,7 +826,8 @@
821
826
  line-height: 32px;
822
827
  border-radius: 4px;
823
828
  left: 50%;
824
- transform: translateX(-50%);
829
+ -webkit-transform: translateX(-50%);
830
+ transform: translateX(-50%);
825
831
  }
826
832
  .editor #editor-content .halo-img-content .desc-input-wrap {
827
833
  margin-top: 20px;
@@ -853,7 +859,8 @@
853
859
  text-align: center;
854
860
  position: absolute;
855
861
  top: 0;
856
- transform: translate(-40%, -50%);
862
+ -webkit-transform: translate(-40%, -50%);
863
+ transform: translate(-40%, -50%);
857
864
  }
858
865
  .editor #editor-content .halo-img-content .halo-picture-area {
859
866
  display: inline-block;
@@ -866,7 +873,8 @@
866
873
  }
867
874
  .editor #editor-content .halo-img-content .no-upload,
868
875
  .editor #editor-content .halo-img-content .upload-fail {
869
- filter: brightness(0.5);
876
+ -webkit-filter: brightness(0.5);
877
+ filter: brightness(0.5);
870
878
  }
871
879
  .editor #editor-content .halo-modify-content {
872
880
  position: relative;
@@ -883,7 +891,8 @@
883
891
  width: 440px;
884
892
  height: 100%;
885
893
  left: 50%;
886
- transform: translateX(-50%);
894
+ -webkit-transform: translateX(-50%);
895
+ transform: translateX(-50%);
887
896
  line-height: 25px;
888
897
  font-size: 18px;
889
898
  z-index: 1;
@@ -914,7 +923,8 @@
914
923
  color: #fff;
915
924
  z-index: 1;
916
925
  left: 50%;
917
- transform: translateX(-50%);
926
+ -webkit-transform: translateX(-50%);
927
+ transform: translateX(-50%);
918
928
  width: 90px;
919
929
  line-height: 32px;
920
930
  height: 32px;
@@ -946,7 +956,8 @@
946
956
  }
947
957
  .editor #editor-content .halo-modify-content .no-upload,
948
958
  .editor #editor-content .halo-modify-content .upload-fail {
949
- filter: brightness(0.5);
959
+ -webkit-filter: brightness(0.5);
960
+ filter: brightness(0.5);
950
961
  }
951
962
  .editor #editor-content .halo-select {
952
963
  outline: 2px solid #1a74ff;
@@ -963,7 +974,8 @@
963
974
  font-size: 18px;
964
975
  left: calc(50% + 250px);
965
976
  top: 0;
966
- transform: translate(-50%, -50%);
977
+ -webkit-transform: translate(-50%, -50%);
978
+ transform: translate(-50%, -50%);
967
979
  }
968
980
  .editor #editor-content .video-cover-replace {
969
981
  cursor: pointer;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@haluo/biz",
3
3
  "description": "rich text",
4
- "version": "2.0.43",
4
+ "version": "2.0.44",
5
5
  "type": "module",
6
6
  "module": "./dist/haluo-biz.js",
7
7
  "main": "./dist/haluo-biz.umd.cjs",