@textbus/platform-browser 3.0.3 → 3.0.4

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.
@@ -57,7 +57,13 @@ export interface CompositionState {
57
57
  data: string;
58
58
  }
59
59
  export declare abstract class Input {
60
+ /**
61
+ * @experimental
62
+ */
60
63
  abstract composition: boolean;
64
+ /**
65
+ * @experimental
66
+ */
61
67
  abstract compositionState: CompositionState | null;
62
68
  abstract onReady: Promise<void>;
63
69
  abstract caret: Caret;
@@ -2217,7 +2217,9 @@ let NativeInput = class NativeInput extends Input {
2217
2217
  return null;
2218
2218
  }), filter(text => {
2219
2219
  return text;
2220
- })), this.isSafari ? new Observable() : fromEvent(input, 'compositionend').pipe(map(ev => {
2220
+ })), (!this.isMobileBrowser && this.isSafari) ? new Observable() : fromEvent(input, 'compositionend').pipe(filter(() => {
2221
+ return this.composition;
2222
+ }), map(ev => {
2221
2223
  isCompositionEnd = true;
2222
2224
  ev.preventDefault();
2223
2225
  return ev.data;
package/bundles/index.js CHANGED
@@ -2219,7 +2219,9 @@ exports.NativeInput = class NativeInput extends Input {
2219
2219
  return null;
2220
2220
  }), stream.filter(text => {
2221
2221
  return text;
2222
- })), this.isSafari ? new stream.Observable() : stream.fromEvent(input, 'compositionend').pipe(stream.map(ev => {
2222
+ })), (!this.isMobileBrowser && this.isSafari) ? new stream.Observable() : stream.fromEvent(input, 'compositionend').pipe(stream.filter(() => {
2223
+ return this.composition;
2224
+ }), stream.map(ev => {
2223
2225
  isCompositionEnd = true;
2224
2226
  ev.preventDefault();
2225
2227
  return ev.data;
@@ -60,12 +60,7 @@ export declare class Viewer extends Starter {
60
60
  /**
61
61
  * 获取编辑器所有资源
62
62
  */
63
- getResources(): {
64
- styleSheets: string[];
65
- styleSheet: string;
66
- links: Record<string, string>[];
67
- scripts: string[];
68
- };
63
+ getResources(): Resources;
69
64
  /**
70
65
  * 获取 HTML 格式的内容
71
66
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/platform-browser",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
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",
@@ -48,5 +48,5 @@
48
48
  "bugs": {
49
49
  "url": "https://github.com/textbus/textbus.git/issues"
50
50
  },
51
- "gitHead": "8087ffa86e0db3b8be429308ce81a3739b36fec6"
51
+ "gitHead": "6de95d0f7ff105c27834abd7e552f62bc109d5d8"
52
52
  }