@textbus/platform-browser 3.7.6 → 3.7.8
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 +14 -7
- package/bundles/index.js +14 -7
- package/package.json +5 -5
package/bundles/index.esm.js
CHANGED
@@ -118,6 +118,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
118
118
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
119
119
|
PERFORMANCE OF THIS SOFTWARE.
|
120
120
|
***************************************************************************** */
|
121
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
122
|
+
|
121
123
|
|
122
124
|
function __decorate(decorators, target, key, desc) {
|
123
125
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
@@ -142,7 +144,12 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
142
144
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
143
145
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
144
146
|
});
|
145
|
-
}
|
147
|
+
}
|
148
|
+
|
149
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
150
|
+
var e = new Error(message);
|
151
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
152
|
+
};
|
146
153
|
|
147
154
|
/**
|
148
155
|
* 编辑器可选项依赖注入 token
|
@@ -313,6 +320,7 @@ let SelectionBridge = class SelectionBridge {
|
|
313
320
|
// hack end
|
314
321
|
}
|
315
322
|
destroy() {
|
323
|
+
this.subs.forEach(i => i.unsubscribe());
|
316
324
|
this.sub.unsubscribe();
|
317
325
|
}
|
318
326
|
getPositionByRange(abstractSelection) {
|
@@ -1494,6 +1502,7 @@ class ExperimentalCaret {
|
|
1494
1502
|
}
|
1495
1503
|
destroy() {
|
1496
1504
|
clearTimeout(this.timer);
|
1505
|
+
// this.caret.
|
1497
1506
|
this.subscription.unsubscribe();
|
1498
1507
|
this.subs.forEach(i => i.unsubscribe());
|
1499
1508
|
}
|
@@ -1788,6 +1797,7 @@ let MagicInput = class MagicInput extends Input {
|
|
1788
1797
|
}), fromEvent(textarea, 'compositionend').subscribe(() => {
|
1789
1798
|
isWriting = false;
|
1790
1799
|
}), fromEvent(textarea, 'beforeinput').subscribe(ev => {
|
1800
|
+
this.ignoreComposition = false;
|
1791
1801
|
if (this.isSafari) {
|
1792
1802
|
if (ev.inputType === 'insertFromComposition') {
|
1793
1803
|
isIgnore = true;
|
@@ -2711,12 +2721,9 @@ class Viewer extends Starter {
|
|
2711
2721
|
}
|
2712
2722
|
this.destroyed = true;
|
2713
2723
|
this.subs.forEach(i => i.unsubscribe());
|
2714
|
-
|
2715
|
-
|
2716
|
-
|
2717
|
-
types.forEach(i => {
|
2718
|
-
this.get(i).destroy();
|
2719
|
-
});
|
2724
|
+
this.get(Input).destroy();
|
2725
|
+
this.get(SelectionBridge).destroy();
|
2726
|
+
this.get(CollaborateCursor).destroy();
|
2720
2727
|
super.destroy();
|
2721
2728
|
(_a = this.workbench.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.workbench);
|
2722
2729
|
this.resourceNodes.forEach(node => {
|
package/bundles/index.js
CHANGED
@@ -120,6 +120,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
120
120
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
121
121
|
PERFORMANCE OF THIS SOFTWARE.
|
122
122
|
***************************************************************************** */
|
123
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
124
|
+
|
123
125
|
|
124
126
|
function __decorate(decorators, target, key, desc) {
|
125
127
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
@@ -144,7 +146,12 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
144
146
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
145
147
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
146
148
|
});
|
147
|
-
}
|
149
|
+
}
|
150
|
+
|
151
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
152
|
+
var e = new Error(message);
|
153
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
154
|
+
};
|
148
155
|
|
149
156
|
/**
|
150
157
|
* 编辑器可选项依赖注入 token
|
@@ -315,6 +322,7 @@ exports.SelectionBridge = class SelectionBridge {
|
|
315
322
|
// hack end
|
316
323
|
}
|
317
324
|
destroy() {
|
325
|
+
this.subs.forEach(i => i.unsubscribe());
|
318
326
|
this.sub.unsubscribe();
|
319
327
|
}
|
320
328
|
getPositionByRange(abstractSelection) {
|
@@ -1496,6 +1504,7 @@ class ExperimentalCaret {
|
|
1496
1504
|
}
|
1497
1505
|
destroy() {
|
1498
1506
|
clearTimeout(this.timer);
|
1507
|
+
// this.caret.
|
1499
1508
|
this.subscription.unsubscribe();
|
1500
1509
|
this.subs.forEach(i => i.unsubscribe());
|
1501
1510
|
}
|
@@ -1790,6 +1799,7 @@ exports.MagicInput = class MagicInput extends Input {
|
|
1790
1799
|
}), stream.fromEvent(textarea, 'compositionend').subscribe(() => {
|
1791
1800
|
isWriting = false;
|
1792
1801
|
}), stream.fromEvent(textarea, 'beforeinput').subscribe(ev => {
|
1802
|
+
this.ignoreComposition = false;
|
1793
1803
|
if (this.isSafari) {
|
1794
1804
|
if (ev.inputType === 'insertFromComposition') {
|
1795
1805
|
isIgnore = true;
|
@@ -2713,12 +2723,9 @@ class Viewer extends core.Starter {
|
|
2713
2723
|
}
|
2714
2724
|
this.destroyed = true;
|
2715
2725
|
this.subs.forEach(i => i.unsubscribe());
|
2716
|
-
|
2717
|
-
|
2718
|
-
|
2719
|
-
types.forEach(i => {
|
2720
|
-
this.get(i).destroy();
|
2721
|
-
});
|
2726
|
+
this.get(Input).destroy();
|
2727
|
+
this.get(exports.SelectionBridge).destroy();
|
2728
|
+
this.get(exports.CollaborateCursor).destroy();
|
2722
2729
|
super.destroy();
|
2723
2730
|
(_a = this.workbench.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.workbench);
|
2724
2731
|
this.resourceNodes.forEach(node => {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@textbus/platform-browser",
|
3
|
-
"version": "3.7.
|
3
|
+
"version": "3.7.8",
|
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",
|
@@ -25,9 +25,9 @@
|
|
25
25
|
"typescript editor"
|
26
26
|
],
|
27
27
|
"dependencies": {
|
28
|
-
"@tanbo/di": "^1.1.
|
29
|
-
"@tanbo/stream": "^1.2.
|
30
|
-
"@textbus/core": "^3.7.
|
28
|
+
"@tanbo/di": "^1.1.8",
|
29
|
+
"@tanbo/stream": "^1.2.5",
|
30
|
+
"@textbus/core": "^3.7.8",
|
31
31
|
"reflect-metadata": "^0.1.13"
|
32
32
|
},
|
33
33
|
"devDependencies": {
|
@@ -48,5 +48,5 @@
|
|
48
48
|
"bugs": {
|
49
49
|
"url": "https://github.com/textbus/textbus.git/issues"
|
50
50
|
},
|
51
|
-
"gitHead": "
|
51
|
+
"gitHead": "1e3aa0095dd5ec6747e771be93b2dcefc9717025"
|
52
52
|
}
|