@textbus/platform-browser 4.0.0-alpha.59 → 4.0.0-alpha.60

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.
@@ -27,6 +27,7 @@ export declare class BrowserModule implements Module {
27
27
  config: ViewOptions;
28
28
  providers: Provider[];
29
29
  private workbench;
30
+ private textbus?;
30
31
  constructor(config: ViewOptions);
31
32
  /**
32
33
  * 解析 HTML 并返回一个组件实例
@@ -44,5 +45,6 @@ export declare class BrowserModule implements Module {
44
45
  readDocumentByComponentLiteral(data: ComponentLiteral, rootComponent: ComponentConstructor, textbus: Textbus): Component;
45
46
  setup(textbus: Textbus): () => void;
46
47
  onAfterStartup(textbus: Textbus): void;
48
+ onDestroy(textbus: Textbus): void;
47
49
  private static createLayout;
48
50
  }
@@ -2203,6 +2203,7 @@ class BrowserModule {
2203
2203
  return registry.createComponentByFactory(data, rootComponent);
2204
2204
  }
2205
2205
  setup(textbus) {
2206
+ this.textbus = textbus;
2206
2207
  const host = this.config.renderTo();
2207
2208
  if (!(host instanceof HTMLElement)) {
2208
2209
  throw browserErrorFn('view container is not a HTMLElement');
@@ -2220,6 +2221,11 @@ class BrowserModule {
2220
2221
  textbus.focus();
2221
2222
  }
2222
2223
  }
2224
+ onDestroy(textbus) {
2225
+ textbus.get(Input).destroy();
2226
+ textbus.get(SelectionBridge).destroy();
2227
+ textbus.get(CollaborateCursor).destroy();
2228
+ }
2223
2229
  static createLayout() {
2224
2230
  const mask = createElement('div', {
2225
2231
  attrs: {
package/bundles/index.js CHANGED
@@ -2205,6 +2205,7 @@ class BrowserModule {
2205
2205
  return registry.createComponentByFactory(data, rootComponent);
2206
2206
  }
2207
2207
  setup(textbus) {
2208
+ this.textbus = textbus;
2208
2209
  const host = this.config.renderTo();
2209
2210
  if (!(host instanceof HTMLElement)) {
2210
2211
  throw browserErrorFn('view container is not a HTMLElement');
@@ -2222,6 +2223,11 @@ class BrowserModule {
2222
2223
  textbus.focus();
2223
2224
  }
2224
2225
  }
2226
+ onDestroy(textbus) {
2227
+ textbus.get(Input).destroy();
2228
+ textbus.get(exports.SelectionBridge).destroy();
2229
+ textbus.get(exports.CollaborateCursor).destroy();
2230
+ }
2225
2231
  static createLayout() {
2226
2232
  const mask = createElement('div', {
2227
2233
  attrs: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/platform-browser",
3
- "version": "4.0.0-alpha.59",
3
+ "version": "4.0.0-alpha.60",
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,8 +26,8 @@
26
26
  ],
27
27
  "dependencies": {
28
28
  "@tanbo/stream": "^1.2.4",
29
- "@textbus/collaborate": "^4.0.0-alpha.59",
30
- "@textbus/core": "^4.0.0-alpha.59",
29
+ "@textbus/collaborate": "^4.0.0-alpha.60",
30
+ "@textbus/core": "^4.0.0-alpha.60",
31
31
  "@viewfly/core": "^1.0.0-alpha.10"
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": "444feba7873584e9ad3611f374d197e6f2933823"
51
+ "gitHead": "bae80846bc8c26754af661e35dea236db237aeeb"
52
52
  }