@haluo/biz 2.0.50 → 2.0.51-beta.1
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 +41 -39
- package/dist/haluo-biz.js +865 -622
- package/dist/haluo-biz.umd.cjs +888 -634
- package/dist/{squire-raw.85a430e7.js → squire-raw-1aaeff0b.js} +18 -4
- package/dist/style.css +28 -28
- package/package.json +48 -48
|
@@ -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;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;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,31 +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
50
|
filter: blur(0.6px);
|
|
51
51
|
}
|
|
52
|
-
.tools .disable img[data-v-
|
|
52
|
+
.tools .disable img[data-v-50235bb8] {
|
|
53
53
|
cursor: not-allowed;
|
|
54
54
|
}
|
|
55
|
-
.tools .wrap[data-v-
|
|
55
|
+
.tools .wrap[data-v-50235bb8] {
|
|
56
56
|
position: relative;
|
|
57
57
|
}
|
|
58
|
-
.tools[data-v-
|
|
58
|
+
.tools[data-v-50235bb8] .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-
|
|
65
|
+
.tools[data-v-50235bb8] .m-colorPicker .colorBtn {
|
|
66
66
|
width: 100%;
|
|
67
67
|
height: 100%;
|
|
68
68
|
opacity: 0;
|
|
@@ -559,7 +559,7 @@
|
|
|
559
559
|
color: #999999;
|
|
560
560
|
margin-bottom: 5px;
|
|
561
561
|
}
|
|
562
|
-
.article-item[data-v-
|
|
562
|
+
.article-item[data-v-4ebe06df] {
|
|
563
563
|
-webkit-user-select: none;
|
|
564
564
|
-moz-user-select: none;
|
|
565
565
|
-ms-user-select: none;
|
|
@@ -572,7 +572,7 @@
|
|
|
572
572
|
width: 440px;
|
|
573
573
|
position: relative;
|
|
574
574
|
}
|
|
575
|
-
.article-item .icon[data-v-
|
|
575
|
+
.article-item .icon[data-v-4ebe06df] {
|
|
576
576
|
width: 14px;
|
|
577
577
|
-webkit-user-select: none;
|
|
578
578
|
-moz-user-select: none;
|
|
@@ -584,7 +584,7 @@
|
|
|
584
584
|
color: #b7b7b7;
|
|
585
585
|
transform: translate(50%, -50%);
|
|
586
586
|
}
|
|
587
|
-
.article-item img[data-v-
|
|
587
|
+
.article-item img[data-v-4ebe06df] {
|
|
588
588
|
width: 80px;
|
|
589
589
|
height: 80px;
|
|
590
590
|
-o-object-fit: cover;
|
|
@@ -592,12 +592,12 @@
|
|
|
592
592
|
margin-right: 12px;
|
|
593
593
|
flex-shrink: 0;
|
|
594
594
|
}
|
|
595
|
-
.article-item .article-item_right[data-v-
|
|
595
|
+
.article-item .article-item_right[data-v-4ebe06df] {
|
|
596
596
|
display: flex;
|
|
597
597
|
flex-direction: column;
|
|
598
598
|
justify-content: space-between;
|
|
599
599
|
}
|
|
600
|
-
.article-item .article-item_right .name[data-v-
|
|
600
|
+
.article-item .article-item_right .name[data-v-4ebe06df] {
|
|
601
601
|
font-size: 16px;
|
|
602
602
|
margin-top: 5px;
|
|
603
603
|
line-height: 22px;
|
|
@@ -607,7 +607,7 @@
|
|
|
607
607
|
overflow: hidden;
|
|
608
608
|
text-overflow: ellipsis;
|
|
609
609
|
}
|
|
610
|
-
.article-item .article-item_right .score[data-v-
|
|
610
|
+
.article-item .article-item_right .score[data-v-4ebe06df] {
|
|
611
611
|
color: #999999;
|
|
612
612
|
line-height: 17px;
|
|
613
613
|
font-size: 12px;
|
|
@@ -615,18 +615,18 @@
|
|
|
615
615
|
align-items: center;
|
|
616
616
|
margin-bottom: 6px;
|
|
617
617
|
}
|
|
618
|
-
.article-item .article-item_right .score span[data-v-
|
|
618
|
+
.article-item .article-item_right .score span[data-v-4ebe06df]:nth-child(2) {
|
|
619
619
|
margin-left: 10px;
|
|
620
620
|
}
|
|
621
|
-
.article-item .article-item_right .score span[data-v-
|
|
621
|
+
.article-item .article-item_right .score span[data-v-4ebe06df]:nth-child(3) {
|
|
622
622
|
margin-left: 10px;
|
|
623
623
|
}
|
|
624
|
-
.article-item .article-item_right .price[data-v-
|
|
624
|
+
.article-item .article-item_right .price[data-v-4ebe06df] {
|
|
625
625
|
color: #ff5a25;
|
|
626
626
|
font-size: 16px;
|
|
627
627
|
margin-top: 6px;
|
|
628
628
|
}
|
|
629
|
-
.article-item .article-bg[data-v-
|
|
629
|
+
.article-item .article-bg[data-v-4ebe06df] {
|
|
630
630
|
position: absolute;
|
|
631
631
|
width: 440px;
|
|
632
632
|
height: 60px;
|
|
@@ -641,7 +641,7 @@
|
|
|
641
641
|
-webkit-backdrop-filter: blur(3px);
|
|
642
642
|
backdrop-filter: blur(3px);
|
|
643
643
|
}
|
|
644
|
-
.article-item .article-bg-height[data-v-
|
|
644
|
+
.article-item .article-bg-height[data-v-4ebe06df] {
|
|
645
645
|
height: 80px;
|
|
646
646
|
line-height: 80px;
|
|
647
647
|
}
|
package/package.json
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@haluo/biz",
|
|
3
|
-
"description": "rich text",
|
|
4
|
-
"version": "2.0.
|
|
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
|
-
"pub": "npm publish",
|
|
23
|
-
"pub:next": "npm publish --tag=next",
|
|
24
|
-
"v:next": "npm version prerelease --preid=next"
|
|
25
|
-
},
|
|
26
|
-
"dependencies": {
|
|
27
|
-
"element-plus": "^2.2.28",
|
|
28
|
-
"uuid": "^9.0.0",
|
|
29
|
-
"vue": "^3.2.36",
|
|
30
|
-
"vuedraggable": "^4.1.0"
|
|
31
|
-
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@element-plus/icons-vue": "^2.0.10",
|
|
34
|
-
"@haluo/util": "^1.0.24",
|
|
35
|
-
"@types/node": "^18.7.18",
|
|
36
|
-
"@types/uuid": "^9.0.0",
|
|
37
|
-
"@vitejs/plugin-vue": "^4.0.0",
|
|
38
|
-
"autoprefixer": "^10.4.11",
|
|
39
|
-
"less": "^4.1.3",
|
|
40
|
-
"typescript": "^4.6.4",
|
|
41
|
-
"vite": "^4.0.0",
|
|
42
|
-
"vite-plugin-dts": "^1.5.0",
|
|
43
|
-
"vue-tsc": "^0.40.4"
|
|
44
|
-
},
|
|
45
|
-
"peerDependencies": {
|
|
46
|
-
"vue": "^3.x"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@haluo/biz",
|
|
3
|
+
"description": "rich text",
|
|
4
|
+
"version": "2.0.51-beta.1",
|
|
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
|
+
"pub": "npm publish",
|
|
23
|
+
"pub:next": "npm publish --tag=next",
|
|
24
|
+
"v:next": "npm version prerelease --preid=next"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"element-plus": "^2.2.28",
|
|
28
|
+
"uuid": "^9.0.0",
|
|
29
|
+
"vue": "^3.2.36",
|
|
30
|
+
"vuedraggable": "^4.1.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@element-plus/icons-vue": "^2.0.10",
|
|
34
|
+
"@haluo/util": "^1.0.24",
|
|
35
|
+
"@types/node": "^18.7.18",
|
|
36
|
+
"@types/uuid": "^9.0.0",
|
|
37
|
+
"@vitejs/plugin-vue": "^4.0.0",
|
|
38
|
+
"autoprefixer": "^10.4.11",
|
|
39
|
+
"less": "^4.1.3",
|
|
40
|
+
"typescript": "^4.6.4",
|
|
41
|
+
"vite": "^4.0.0",
|
|
42
|
+
"vite-plugin-dts": "^1.5.0",
|
|
43
|
+
"vue-tsc": "^0.40.4"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"vue": "^3.x"
|
|
47
|
+
}
|
|
48
|
+
}
|