@textbus/collaborate 4.0.0-alpha.44 → 4.0.0-alpha.46
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/bundles/index.esm.js +7 -7
- package/bundles/index.js +7 -7
- package/package.json +3 -3
package/bundles/index.esm.js
CHANGED
|
@@ -45,35 +45,35 @@ const collaborateErrorFn = makeError('Collaborate');
|
|
|
45
45
|
class SlotMap {
|
|
46
46
|
constructor() {
|
|
47
47
|
this.slotAndYTextMap = new WeakMap();
|
|
48
|
-
this.
|
|
48
|
+
this.yTextAndSlotMap = new WeakMap();
|
|
49
49
|
}
|
|
50
50
|
set(key, value) {
|
|
51
51
|
if (key instanceof Slot) {
|
|
52
52
|
this.slotAndYTextMap.set(key, value);
|
|
53
|
-
this.
|
|
53
|
+
this.yTextAndSlotMap.set(value, key);
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
56
|
this.slotAndYTextMap.set(value, key);
|
|
57
|
-
this.
|
|
57
|
+
this.yTextAndSlotMap.set(key, value);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
get(key) {
|
|
61
61
|
if (key instanceof Slot) {
|
|
62
62
|
return this.slotAndYTextMap.get(key) || null;
|
|
63
63
|
}
|
|
64
|
-
return this.
|
|
64
|
+
return this.yTextAndSlotMap.get(key) || null;
|
|
65
65
|
}
|
|
66
66
|
delete(key) {
|
|
67
67
|
if (key instanceof Slot) {
|
|
68
68
|
const v = this.slotAndYTextMap.get(key);
|
|
69
69
|
this.slotAndYTextMap.delete(key);
|
|
70
70
|
if (v) {
|
|
71
|
-
this.
|
|
71
|
+
this.yTextAndSlotMap.delete(v);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
else {
|
|
75
|
-
const v = this.
|
|
76
|
-
this.
|
|
75
|
+
const v = this.yTextAndSlotMap.get(key);
|
|
76
|
+
this.yTextAndSlotMap.delete(key);
|
|
77
77
|
if (v) {
|
|
78
78
|
this.slotAndYTextMap.delete(v);
|
|
79
79
|
}
|
package/bundles/index.js
CHANGED
|
@@ -47,35 +47,35 @@ const collaborateErrorFn = core.makeError('Collaborate');
|
|
|
47
47
|
class SlotMap {
|
|
48
48
|
constructor() {
|
|
49
49
|
this.slotAndYTextMap = new WeakMap();
|
|
50
|
-
this.
|
|
50
|
+
this.yTextAndSlotMap = new WeakMap();
|
|
51
51
|
}
|
|
52
52
|
set(key, value) {
|
|
53
53
|
if (key instanceof core.Slot) {
|
|
54
54
|
this.slotAndYTextMap.set(key, value);
|
|
55
|
-
this.
|
|
55
|
+
this.yTextAndSlotMap.set(value, key);
|
|
56
56
|
}
|
|
57
57
|
else {
|
|
58
58
|
this.slotAndYTextMap.set(value, key);
|
|
59
|
-
this.
|
|
59
|
+
this.yTextAndSlotMap.set(key, value);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
get(key) {
|
|
63
63
|
if (key instanceof core.Slot) {
|
|
64
64
|
return this.slotAndYTextMap.get(key) || null;
|
|
65
65
|
}
|
|
66
|
-
return this.
|
|
66
|
+
return this.yTextAndSlotMap.get(key) || null;
|
|
67
67
|
}
|
|
68
68
|
delete(key) {
|
|
69
69
|
if (key instanceof core.Slot) {
|
|
70
70
|
const v = this.slotAndYTextMap.get(key);
|
|
71
71
|
this.slotAndYTextMap.delete(key);
|
|
72
72
|
if (v) {
|
|
73
|
-
this.
|
|
73
|
+
this.yTextAndSlotMap.delete(v);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
else {
|
|
77
|
-
const v = this.
|
|
78
|
-
this.
|
|
77
|
+
const v = this.yTextAndSlotMap.get(key);
|
|
78
|
+
this.yTextAndSlotMap.delete(key);
|
|
79
79
|
if (v) {
|
|
80
80
|
this.slotAndYTextMap.delete(v);
|
|
81
81
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@textbus/collaborate",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.46",
|
|
4
4
|
"description": "Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.",
|
|
5
5
|
"main": "./bundles/index.js",
|
|
6
6
|
"module": "./bundles/index.esm.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@tanbo/stream": "^1.2.3",
|
|
29
|
-
"@textbus/core": "^4.0.0-alpha.
|
|
29
|
+
"@textbus/core": "^4.0.0-alpha.46",
|
|
30
30
|
"@viewfly/core": "^1.0.0-alpha.2",
|
|
31
31
|
"reflect-metadata": "^0.1.13",
|
|
32
32
|
"y-websocket": "^1.4.3",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"bugs": {
|
|
51
51
|
"url": "https://github.com/textbus/textbus.git/issues"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "7dfdc91ecd8ddef5746e9dd1f84f795c0529dc11"
|
|
54
54
|
}
|