@haluo/biz 2.0.39 → 2.0.40

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
  }
@@ -405,6 +399,17 @@
405
399
  child = children[i];
406
400
  isBR = child.nodeName === "BR";
407
401
  if (!isBR && isInline(child)) {
402
+ if (child.classList && child.classList.contains("halo-picture-area")) {
403
+ return;
404
+ }
405
+ if (!wrapper) {
406
+ wrapper = createElement(
407
+ doc2,
408
+ config.blockTag,
409
+ config.blockAttributes
410
+ );
411
+ }
412
+ wrapper.appendChild(child);
408
413
  i -= 1;
409
414
  l -= 1;
410
415
  } else if (isBR || wrapper) {
@@ -723,8 +728,7 @@
723
728
  block = getStartBlockOfRange(range, root);
724
729
  firstBlockInFrag = getNextBlock(frag, frag);
725
730
  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")) {
731
+ if (block && firstBlockInFrag && !replaceBlock && !getNearest(firstBlockInFrag, frag, "PRE") && !getNearest(firstBlockInFrag, frag, "TABLE")) {
728
732
  moveRangeBoundariesUpTree(range, block, block, root);
729
733
  range.collapse(true);
730
734
  container = range.endContainer;
@@ -740,10 +744,7 @@
740
744
  container = nodeAfterSplit.parentNode;
741
745
  offset = indexOf.call(container.childNodes, nodeAfterSplit);
742
746
  }
743
- if (
744
- /* isBlock( container ) && */
745
- offset !== getLength(container)
746
- ) {
747
+ if (offset !== getLength(container)) {
747
748
  blockContentsAfterSplit = root.ownerDocument.createDocumentFragment();
748
749
  while (node = container.childNodes[offset]) {
749
750
  blockContentsAfterSplit.appendChild(node);
@@ -1792,11 +1793,9 @@
1792
1793
  if (hasImage) {
1793
1794
  this.fireEvent("dragover", {
1794
1795
  dataTransfer: clipboardData,
1795
- /* jshint loopfunc: true */
1796
1796
  preventDefault: function() {
1797
1797
  fireDrop = true;
1798
1798
  }
1799
- /* jshint loopfunc: false */
1800
1799
  });
1801
1800
  if (fireDrop) {
1802
1801
  this.fireEvent("drop", {
@@ -2003,9 +2002,7 @@
2003
2002
  leafNodeNames,
2004
2003
  undo: {
2005
2004
  documentSizeThreshold: -1,
2006
- // -1 means no threshold
2007
2005
  undoLimit: -1
2008
- // -1 means no limit
2009
2006
  },
2010
2007
  isInsertedHTMLSanitized: true,
2011
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-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;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-52e48332] {
3
3
  margin: 0 12px;
4
4
  }
5
- .ml16[data-v-50235bb8] {
5
+ .ml16[data-v-52e48332] {
6
6
  margin-left: 16px;
7
7
  }
8
- .mr12[data-v-50235bb8] {
8
+ .mr12[data-v-52e48332] {
9
9
  margin-right: 12px;
10
10
  }
11
- .ml12[data-v-50235bb8] {
11
+ .ml12[data-v-52e48332] {
12
12
  margin-left: 12px;
13
13
  }
14
- .mr18[data-v-50235bb8] {
14
+ .mr18[data-v-52e48332] {
15
15
  margin-right: 18px;
16
16
  }
17
- .tools[data-v-50235bb8] {
17
+ .tools[data-v-52e48332] {
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-52e48332] {
23
23
  display: flex;
24
24
  align-items: center;
25
25
  }
26
- .tools img[data-v-50235bb8] {
26
+ .tools img[data-v-52e48332] {
27
27
  cursor: pointer;
28
28
  }
29
- .tools .box[data-v-50235bb8] {
29
+ .tools .box[data-v-52e48332] {
30
30
  position: relative;
31
31
  }
32
- .tools .box .box-mask[data-v-50235bb8] {
32
+ .tools .box .box-mask[data-v-52e48332] {
33
33
  width: 40px;
34
34
  height: 40px;
35
35
  background: black;
@@ -38,31 +38,31 @@
38
38
  position: absolute;
39
39
  pointer-events: none;
40
40
  }
41
- .tools .tools-title[data-v-50235bb8] {
41
+ .tools .tools-title[data-v-52e48332] {
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-52e48332] {
49
49
  cursor: not-allowed;
50
50
  filter: blur(0.6px);
51
51
  }
52
- .tools .disable img[data-v-50235bb8] {
52
+ .tools .disable img[data-v-52e48332] {
53
53
  cursor: not-allowed;
54
54
  }
55
- .tools .wrap[data-v-50235bb8] {
55
+ .tools .wrap[data-v-52e48332] {
56
56
  position: relative;
57
57
  }
58
- .tools[data-v-50235bb8] .m-colorPicker {
58
+ .tools[data-v-52e48332] .m-colorPicker {
59
59
  position: absolute;
60
60
  width: 100%;
61
61
  left: 0;
62
62
  z-index: -1;
63
63
  height: 100%;
64
64
  }
65
- .tools[data-v-50235bb8] .m-colorPicker .colorBtn {
65
+ .tools[data-v-52e48332] .m-colorPicker .colorBtn {
66
66
  width: 100%;
67
67
  height: 100%;
68
68
  opacity: 0;
@@ -462,90 +462,6 @@
462
462
  margin-top: 12px;
463
463
  text-align: center;
464
464
  }
465
- /**
466
- * Created by wanghui on 2017-04-21.
467
- *
468
- */
469
- .topic-popover-mask {
470
- position: fixed;
471
- top: 0;
472
- left: 0;
473
- right: 0;
474
- bottom: 0;
475
- z-index: 999;
476
- background: transparent;
477
- }
478
- .topic-popover {
479
- position: fixed;
480
- z-index: 9999;
481
- background: #fff;
482
- border-radius: 4px;
483
- box-sizing: border-box;
484
- box-shadow: 0 4px 17px rgba(0, 0, 0, 0.12);
485
- width: 430px;
486
- height: 286px;
487
- overflow-y: auto;
488
- }
489
- .topic-popover .topic-popover-content .topic-tabs {
490
- display: flex;
491
- border-bottom: 1px solid #f0f0f0;
492
- background: #fafafa;
493
- }
494
- .topic-popover .topic-popover-content .topic-tabs .topic-tab {
495
- flex: 1;
496
- padding: 12px 16px;
497
- text-align: center;
498
- font-size: 14px;
499
- color: #666;
500
- cursor: pointer;
501
- border-bottom: 2px solid transparent;
502
- transition: all 0.2s;
503
- }
504
- .topic-popover .topic-popover-content .topic-tabs .topic-tab:hover {
505
- color: #FF3C08;
506
- background: #f5f5f5;
507
- }
508
- .topic-popover .topic-popover-content .topic-tabs .topic-tab.active {
509
- color: #FF3C08;
510
- border-bottom-color: #FF3C08;
511
- background: #fff;
512
- }
513
- .topic-popover .topic-popover-content .topic-search-header {
514
- padding: 12px 16px;
515
- border-bottom: 1px solid #f0f0f0;
516
- background: #fafafa;
517
- }
518
- .topic-popover .topic-popover-content .topic-search-header .topic-search-title {
519
- font-size: 14px;
520
- color: #333;
521
- font-weight: 500;
522
- }
523
- .topic-popover .topic-popover-content .topic-list-container {
524
- max-height: 240px;
525
- overflow-y: auto;
526
- }
527
- .topic-popover .topic-popover-content .topic-list-container .topic-list .topic-item {
528
- padding: 12px 16px;
529
- font-size: 14px;
530
- color: #333;
531
- cursor: pointer;
532
- border-bottom: 1px solid #f8f8f8;
533
- transition: background-color 0.2s;
534
- }
535
- .topic-popover .topic-popover-content .topic-list-container .topic-list .topic-item:hover {
536
- background: #f5f5f5;
537
- color: #FF3C08;
538
- }
539
- .topic-popover .topic-popover-content .topic-list-container .topic-list .topic-item:last-child {
540
- border-bottom: none;
541
- }
542
- .topic-popover .topic-popover-content .topic-list-container .topic-list .topic-loading,
543
- .topic-popover .topic-popover-content .topic-list-container .topic-list .topic-empty {
544
- padding: 20px 16px;
545
- text-align: center;
546
- font-size: 14px;
547
- color: #999;
548
- }
549
465
  .collect-article_lable {
550
466
  font-size: 14px;
551
467
  color: #333333;
@@ -559,7 +475,7 @@
559
475
  color: #999999;
560
476
  margin-bottom: 5px;
561
477
  }
562
- .article-item[data-v-4ebe06df] {
478
+ .article-item[data-v-1c406a11] {
563
479
  -webkit-user-select: none;
564
480
  -moz-user-select: none;
565
481
  -ms-user-select: none;
@@ -572,7 +488,7 @@
572
488
  width: 440px;
573
489
  position: relative;
574
490
  }
575
- .article-item .icon[data-v-4ebe06df] {
491
+ .article-item .icon[data-v-1c406a11] {
576
492
  width: 14px;
577
493
  -webkit-user-select: none;
578
494
  -moz-user-select: none;
@@ -584,7 +500,7 @@
584
500
  color: #b7b7b7;
585
501
  transform: translate(50%, -50%);
586
502
  }
587
- .article-item img[data-v-4ebe06df] {
503
+ .article-item img[data-v-1c406a11] {
588
504
  width: 80px;
589
505
  height: 80px;
590
506
  -o-object-fit: cover;
@@ -592,12 +508,12 @@
592
508
  margin-right: 12px;
593
509
  flex-shrink: 0;
594
510
  }
595
- .article-item .article-item_right[data-v-4ebe06df] {
511
+ .article-item .article-item_right[data-v-1c406a11] {
596
512
  display: flex;
597
513
  flex-direction: column;
598
514
  justify-content: space-between;
599
515
  }
600
- .article-item .article-item_right .name[data-v-4ebe06df] {
516
+ .article-item .article-item_right .name[data-v-1c406a11] {
601
517
  font-size: 16px;
602
518
  margin-top: 5px;
603
519
  line-height: 22px;
@@ -607,7 +523,7 @@
607
523
  overflow: hidden;
608
524
  text-overflow: ellipsis;
609
525
  }
610
- .article-item .article-item_right .score[data-v-4ebe06df] {
526
+ .article-item .article-item_right .score[data-v-1c406a11] {
611
527
  color: #999999;
612
528
  line-height: 17px;
613
529
  font-size: 12px;
@@ -615,18 +531,18 @@
615
531
  align-items: center;
616
532
  margin-bottom: 6px;
617
533
  }
618
- .article-item .article-item_right .score span[data-v-4ebe06df]:nth-child(2) {
534
+ .article-item .article-item_right .score span[data-v-1c406a11]:nth-child(2) {
619
535
  margin-left: 10px;
620
536
  }
621
- .article-item .article-item_right .score span[data-v-4ebe06df]:nth-child(3) {
537
+ .article-item .article-item_right .score span[data-v-1c406a11]:nth-child(3) {
622
538
  margin-left: 10px;
623
539
  }
624
- .article-item .article-item_right .price[data-v-4ebe06df] {
540
+ .article-item .article-item_right .price[data-v-1c406a11] {
625
541
  color: #ff5a25;
626
542
  font-size: 16px;
627
543
  margin-top: 6px;
628
544
  }
629
- .article-item .article-bg[data-v-4ebe06df] {
545
+ .article-item .article-bg[data-v-1c406a11] {
630
546
  position: absolute;
631
547
  width: 440px;
632
548
  height: 60px;
@@ -641,7 +557,7 @@
641
557
  -webkit-backdrop-filter: blur(3px);
642
558
  backdrop-filter: blur(3px);
643
559
  }
644
- .article-item .article-bg-height[data-v-4ebe06df] {
560
+ .article-item .article-bg-height[data-v-1c406a11] {
645
561
  height: 80px;
646
562
  line-height: 80px;
647
563
  }
@@ -656,6 +572,10 @@
656
572
  }
657
573
  .editor mdd-topic {
658
574
  pointer-events: none;
575
+ -webkit-user-select: none;
576
+ -moz-user-select: none;
577
+ -ms-user-select: none;
578
+ user-select: none;
659
579
  color: #5288F6;
660
580
  }
661
581
  .editor ol,
package/package.json CHANGED
@@ -1,47 +1,47 @@
1
- {
2
- "name": "@haluo/biz",
3
- "description": "rich text",
4
- "version": "2.0.39",
5
- "type": "module",
6
- "module": "./dist/haluo-biz.js",
7
- "main": "./dist/haluo-biz.umd.cjs",
8
- "exports": {
9
- ".": {
10
- "import": "./dist/haluo-biz.js",
11
- "require": "./dist/haluo-biz.umd.cjs"
12
- },
13
- "./dist/style.css": "./dist/style.css"
14
- },
15
- "files": [
16
- "dist"
17
- ],
18
- "scripts": {
19
- "dev": "vite",
20
- "build": "vue-tsc --noEmit && vite build",
21
- "build:watch": "vue-tsc --noEmit && vite build --watch",
22
- "preview": "vite preview",
23
- "pub": "npm publish"
24
- },
25
- "dependencies": {
26
- "element-plus": "^2.2.28",
27
- "uuid": "^9.0.0",
28
- "vue": "^3.2.36",
29
- "vuedraggable": "^4.1.0"
30
- },
31
- "devDependencies": {
32
- "@element-plus/icons-vue": "^2.0.10",
33
- "@haluo/util": "^1.0.24",
34
- "@types/node": "^18.7.18",
35
- "@types/uuid": "^9.0.0",
36
- "@vitejs/plugin-vue": "^4.0.0",
37
- "autoprefixer": "^10.4.11",
38
- "less": "^4.1.3",
39
- "typescript": "^4.6.4",
40
- "vite": "^4.0.0",
41
- "vite-plugin-dts": "^1.5.0",
42
- "vue-tsc": "^0.40.4"
43
- },
44
- "peerDependencies": {
45
- "vue": "^3.x"
46
- }
47
- }
1
+ {
2
+ "name": "@haluo/biz",
3
+ "description": "rich text",
4
+ "version": "2.0.40",
5
+ "type": "module",
6
+ "module": "./dist/haluo-biz.js",
7
+ "main": "./dist/haluo-biz.umd.cjs",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/haluo-biz.js",
11
+ "require": "./dist/haluo-biz.umd.cjs"
12
+ },
13
+ "./dist/style.css": "./dist/style.css"
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "scripts": {
19
+ "dev": "vite",
20
+ "build": "vue-tsc --noEmit && vite build",
21
+ "build:watch": "vue-tsc --noEmit && vite build --watch",
22
+ "preview": "vite preview",
23
+ "pub": "npm publish"
24
+ },
25
+ "dependencies": {
26
+ "element-plus": "^2.2.28",
27
+ "uuid": "^9.0.0",
28
+ "vue": "^3.2.36",
29
+ "vuedraggable": "^4.1.0"
30
+ },
31
+ "devDependencies": {
32
+ "@element-plus/icons-vue": "^2.0.10",
33
+ "@haluo/util": "^1.0.24",
34
+ "@types/node": "^18.7.18",
35
+ "@types/uuid": "^9.0.0",
36
+ "@vitejs/plugin-vue": "^4.0.0",
37
+ "autoprefixer": "^10.4.11",
38
+ "less": "^4.1.3",
39
+ "typescript": "^4.6.4",
40
+ "vite": "^4.0.0",
41
+ "vite-plugin-dts": "^1.5.0",
42
+ "vue-tsc": "^0.40.4"
43
+ },
44
+ "peerDependencies": {
45
+ "vue": "^3.x"
46
+ }
47
+ }