@textbus/platform-browser 3.3.5 → 3.3.6
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 -6
 - package/bundles/index.js +17 -6
 - package/package.json +3 -3
 
    
        package/bundles/index.esm.js
    CHANGED
    
    | 
         @@ -2231,7 +2231,20 @@ let NativeInput = class NativeInput extends Input { 
     | 
|
| 
       2231 
2231 
     | 
    
         
             
                            case 'deleteCompositionText':
         
     | 
| 
       2232 
2232 
     | 
    
         
             
                                this.composition = false;
         
     | 
| 
       2233 
2233 
     | 
    
         
             
                                break;
         
     | 
| 
       2234 
     | 
    
         
            -
                            case 'deleteContentBackward':
         
     | 
| 
      
 2234 
     | 
    
         
            +
                            case 'deleteContentBackward': {
         
     | 
| 
      
 2235 
     | 
    
         
            +
                                this.composition = false;
         
     | 
| 
      
 2236 
     | 
    
         
            +
                                const range = ev.getTargetRanges()[0];
         
     | 
| 
      
 2237 
     | 
    
         
            +
                                if (!range) {
         
     | 
| 
      
 2238 
     | 
    
         
            +
                                    break;
         
     | 
| 
      
 2239 
     | 
    
         
            +
                                }
         
     | 
| 
      
 2240 
     | 
    
         
            +
                                const location = this.renderer.getLocationByNativeNode(range.startContainer);
         
     | 
| 
      
 2241 
     | 
    
         
            +
                                const startSlot = this.selection.startSlot;
         
     | 
| 
      
 2242 
     | 
    
         
            +
                                if (startSlot) {
         
     | 
| 
      
 2243 
     | 
    
         
            +
                                    this.selection.setBaseAndExtent(startSlot, location.startIndex + range.startOffset, startSlot, location.startIndex + range.endOffset);
         
     | 
| 
      
 2244 
     | 
    
         
            +
                                    this.commander.delete();
         
     | 
| 
      
 2245 
     | 
    
         
            +
                                }
         
     | 
| 
      
 2246 
     | 
    
         
            +
                                break;
         
     | 
| 
      
 2247 
     | 
    
         
            +
                            }
         
     | 
| 
       2235 
2248 
     | 
    
         
             
                            case 'insertReplacementText': {
         
     | 
| 
       2236 
2249 
     | 
    
         
             
                                this.composition = false;
         
     | 
| 
       2237 
2250 
     | 
    
         
             
                                const range = ev.getTargetRanges()[0];
         
     | 
| 
         @@ -2239,11 +2252,9 @@ let NativeInput = class NativeInput extends Input { 
     | 
|
| 
       2239 
2252 
     | 
    
         
             
                                const startSlot = this.selection.startSlot;
         
     | 
| 
       2240 
2253 
     | 
    
         
             
                                this.selection.setBaseAndExtent(startSlot, location.startIndex + range.startOffset, startSlot, location.startIndex + range.endOffset);
         
     | 
| 
       2241 
2254 
     | 
    
         
             
                                this.commander.delete();
         
     | 
| 
       2242 
     | 
    
         
            -
                                 
     | 
| 
       2243 
     | 
    
         
            -
             
     | 
| 
       2244 
     | 
    
         
            -
                                     
     | 
| 
       2245 
     | 
    
         
            -
                                        this.commander.write(text);
         
     | 
| 
       2246 
     | 
    
         
            -
                                    }
         
     | 
| 
      
 2255 
     | 
    
         
            +
                                const text = ((_a = ev.dataTransfer) === null || _a === void 0 ? void 0 : _a.getData('text')) || ev.data || null;
         
     | 
| 
      
 2256 
     | 
    
         
            +
                                if (text) {
         
     | 
| 
      
 2257 
     | 
    
         
            +
                                    this.commander.write(text);
         
     | 
| 
       2247 
2258 
     | 
    
         
             
                                }
         
     | 
| 
       2248 
2259 
     | 
    
         
             
                                break;
         
     | 
| 
       2249 
2260 
     | 
    
         
             
                            }
         
     | 
    
        package/bundles/index.js
    CHANGED
    
    | 
         @@ -2233,7 +2233,20 @@ exports.NativeInput = class NativeInput extends Input { 
     | 
|
| 
       2233 
2233 
     | 
    
         
             
                            case 'deleteCompositionText':
         
     | 
| 
       2234 
2234 
     | 
    
         
             
                                this.composition = false;
         
     | 
| 
       2235 
2235 
     | 
    
         
             
                                break;
         
     | 
| 
       2236 
     | 
    
         
            -
                            case 'deleteContentBackward':
         
     | 
| 
      
 2236 
     | 
    
         
            +
                            case 'deleteContentBackward': {
         
     | 
| 
      
 2237 
     | 
    
         
            +
                                this.composition = false;
         
     | 
| 
      
 2238 
     | 
    
         
            +
                                const range = ev.getTargetRanges()[0];
         
     | 
| 
      
 2239 
     | 
    
         
            +
                                if (!range) {
         
     | 
| 
      
 2240 
     | 
    
         
            +
                                    break;
         
     | 
| 
      
 2241 
     | 
    
         
            +
                                }
         
     | 
| 
      
 2242 
     | 
    
         
            +
                                const location = this.renderer.getLocationByNativeNode(range.startContainer);
         
     | 
| 
      
 2243 
     | 
    
         
            +
                                const startSlot = this.selection.startSlot;
         
     | 
| 
      
 2244 
     | 
    
         
            +
                                if (startSlot) {
         
     | 
| 
      
 2245 
     | 
    
         
            +
                                    this.selection.setBaseAndExtent(startSlot, location.startIndex + range.startOffset, startSlot, location.startIndex + range.endOffset);
         
     | 
| 
      
 2246 
     | 
    
         
            +
                                    this.commander.delete();
         
     | 
| 
      
 2247 
     | 
    
         
            +
                                }
         
     | 
| 
      
 2248 
     | 
    
         
            +
                                break;
         
     | 
| 
      
 2249 
     | 
    
         
            +
                            }
         
     | 
| 
       2237 
2250 
     | 
    
         
             
                            case 'insertReplacementText': {
         
     | 
| 
       2238 
2251 
     | 
    
         
             
                                this.composition = false;
         
     | 
| 
       2239 
2252 
     | 
    
         
             
                                const range = ev.getTargetRanges()[0];
         
     | 
| 
         @@ -2241,11 +2254,9 @@ exports.NativeInput = class NativeInput extends Input { 
     | 
|
| 
       2241 
2254 
     | 
    
         
             
                                const startSlot = this.selection.startSlot;
         
     | 
| 
       2242 
2255 
     | 
    
         
             
                                this.selection.setBaseAndExtent(startSlot, location.startIndex + range.startOffset, startSlot, location.startIndex + range.endOffset);
         
     | 
| 
       2243 
2256 
     | 
    
         
             
                                this.commander.delete();
         
     | 
| 
       2244 
     | 
    
         
            -
                                 
     | 
| 
       2245 
     | 
    
         
            -
             
     | 
| 
       2246 
     | 
    
         
            -
                                     
     | 
| 
       2247 
     | 
    
         
            -
                                        this.commander.write(text);
         
     | 
| 
       2248 
     | 
    
         
            -
                                    }
         
     | 
| 
      
 2257 
     | 
    
         
            +
                                const text = ((_a = ev.dataTransfer) === null || _a === void 0 ? void 0 : _a.getData('text')) || ev.data || null;
         
     | 
| 
      
 2258 
     | 
    
         
            +
                                if (text) {
         
     | 
| 
      
 2259 
     | 
    
         
            +
                                    this.commander.write(text);
         
     | 
| 
       2249 
2260 
     | 
    
         
             
                                }
         
     | 
| 
       2250 
2261 
     | 
    
         
             
                                break;
         
     | 
| 
       2251 
2262 
     | 
    
         
             
                            }
         
     | 
    
        package/package.json
    CHANGED
    
    | 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            {
         
     | 
| 
       2 
2 
     | 
    
         
             
              "name": "@textbus/platform-browser",
         
     | 
| 
       3 
     | 
    
         
            -
              "version": "3.3. 
     | 
| 
      
 3 
     | 
    
         
            +
              "version": "3.3.6",
         
     | 
| 
       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",
         
     | 
| 
         @@ -27,7 +27,7 @@ 
     | 
|
| 
       27 
27 
     | 
    
         
             
              "dependencies": {
         
     | 
| 
       28 
28 
     | 
    
         
             
                "@tanbo/di": "^1.1.5",
         
     | 
| 
       29 
29 
     | 
    
         
             
                "@tanbo/stream": "^1.2.0",
         
     | 
| 
       30 
     | 
    
         
            -
                "@textbus/core": "^3.3. 
     | 
| 
      
 30 
     | 
    
         
            +
                "@textbus/core": "^3.3.6",
         
     | 
| 
       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": "6de0789f760d7d4680342951468fb0753457e586"
         
     | 
| 
       52 
52 
     | 
    
         
             
            }
         
     |