@textbus/platform-browser 3.7.7 → 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.
@@ -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
  }
@@ -2712,12 +2721,9 @@ class Viewer extends Starter {
2712
2721
  }
2713
2722
  this.destroyed = true;
2714
2723
  this.subs.forEach(i => i.unsubscribe());
2715
- const types = [
2716
- Input
2717
- ];
2718
- types.forEach(i => {
2719
- this.get(i).destroy();
2720
- });
2724
+ this.get(Input).destroy();
2725
+ this.get(SelectionBridge).destroy();
2726
+ this.get(CollaborateCursor).destroy();
2721
2727
  super.destroy();
2722
2728
  (_a = this.workbench.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.workbench);
2723
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
  }
@@ -2714,12 +2723,9 @@ class Viewer extends core.Starter {
2714
2723
  }
2715
2724
  this.destroyed = true;
2716
2725
  this.subs.forEach(i => i.unsubscribe());
2717
- const types = [
2718
- Input
2719
- ];
2720
- types.forEach(i => {
2721
- this.get(i).destroy();
2722
- });
2726
+ this.get(Input).destroy();
2727
+ this.get(exports.SelectionBridge).destroy();
2728
+ this.get(exports.CollaborateCursor).destroy();
2723
2729
  super.destroy();
2724
2730
  (_a = this.workbench.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.workbench);
2725
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.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.5",
29
- "@tanbo/stream": "^1.2.0",
30
- "@textbus/core": "^3.7.1",
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": "f778970701d92b72c4ea88d4583c33a27b339dd8"
51
+ "gitHead": "1e3aa0095dd5ec6747e771be93b2dcefc9717025"
52
52
  }