@textbus/platform-browser 3.7.7 → 3.7.9
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 +17 -8
- package/bundles/index.js +17 -8
- 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
|
}
|
@@ -1889,8 +1898,11 @@ let MagicInput = class MagicInput extends Input {
|
|
1889
1898
|
if (text) {
|
1890
1899
|
this.commander.write(text);
|
1891
1900
|
}
|
1901
|
+
const startSlot = this.selection.startSlot;
|
1902
|
+
if (startSlot) {
|
1903
|
+
startSlot.changeMarker.forceMarkDirtied();
|
1904
|
+
}
|
1892
1905
|
if (isCompositionEnd) {
|
1893
|
-
const startSlot = this.selection.startSlot;
|
1894
1906
|
if (startSlot) {
|
1895
1907
|
const event = new Event(startSlot, null);
|
1896
1908
|
invokeListener(startSlot.parent, 'onCompositionEnd', event);
|
@@ -2712,12 +2724,9 @@ class Viewer extends Starter {
|
|
2712
2724
|
}
|
2713
2725
|
this.destroyed = true;
|
2714
2726
|
this.subs.forEach(i => i.unsubscribe());
|
2715
|
-
|
2716
|
-
|
2717
|
-
|
2718
|
-
types.forEach(i => {
|
2719
|
-
this.get(i).destroy();
|
2720
|
-
});
|
2727
|
+
this.get(Input).destroy();
|
2728
|
+
this.get(SelectionBridge).destroy();
|
2729
|
+
this.get(CollaborateCursor).destroy();
|
2721
2730
|
super.destroy();
|
2722
2731
|
(_a = this.workbench.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.workbench);
|
2723
2732
|
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
|
}
|
@@ -1891,8 +1900,11 @@ exports.MagicInput = class MagicInput extends Input {
|
|
1891
1900
|
if (text) {
|
1892
1901
|
this.commander.write(text);
|
1893
1902
|
}
|
1903
|
+
const startSlot = this.selection.startSlot;
|
1904
|
+
if (startSlot) {
|
1905
|
+
startSlot.changeMarker.forceMarkDirtied();
|
1906
|
+
}
|
1894
1907
|
if (isCompositionEnd) {
|
1895
|
-
const startSlot = this.selection.startSlot;
|
1896
1908
|
if (startSlot) {
|
1897
1909
|
const event = new core.Event(startSlot, null);
|
1898
1910
|
core.invokeListener(startSlot.parent, 'onCompositionEnd', event);
|
@@ -2714,12 +2726,9 @@ class Viewer extends core.Starter {
|
|
2714
2726
|
}
|
2715
2727
|
this.destroyed = true;
|
2716
2728
|
this.subs.forEach(i => i.unsubscribe());
|
2717
|
-
|
2718
|
-
|
2719
|
-
|
2720
|
-
types.forEach(i => {
|
2721
|
-
this.get(i).destroy();
|
2722
|
-
});
|
2729
|
+
this.get(Input).destroy();
|
2730
|
+
this.get(exports.SelectionBridge).destroy();
|
2731
|
+
this.get(exports.CollaborateCursor).destroy();
|
2723
2732
|
super.destroy();
|
2724
2733
|
(_a = this.workbench.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.workbench);
|
2725
2734
|
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.9",
|
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": "1ab36c9b889c8f70f02fc56d6397c837a3b06bf4"
|
52
52
|
}
|