@textbus/adapter-viewfly 4.2.0 → 4.2.2
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 +15 -2
- package/bundles/index.js +13 -0
- package/bundles/viewfly-adapter.d.ts +2 -1
- package/package.json +4 -4
    
        package/bundles/index.esm.js
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            export { NodeViewAdapter as ViewflyVDomAdapter } from '@textbus/platform-node';
         | 
| 2 | 
            -
            import { makeError, VElement, VTextNode, merge } from '@textbus/core';
         | 
| 3 | 
            -
            import { createDynamicRef, DynamicRef, jsx, withAnnotation, getCurrentInstance, onUpdated } from '@viewfly/core';
         | 
| 2 | 
            +
            import { makeError, VElement, VTextNode, merge, Adapter } from '@textbus/core';
         | 
| 3 | 
            +
            import { createDynamicRef, DynamicRef, jsx, withAnnotation, getCurrentInstance, onUpdated, ReflectiveInjector } from '@viewfly/core';
         | 
| 4 4 | 
             
            import { DomAdapter } from '@textbus/platform-browser';
         | 
| 5 5 |  | 
| 6 6 | 
             
            const adapterError = makeError('ViewflyDOMRenderer');
         | 
| @@ -124,6 +124,19 @@ class ViewflyAdapter extends DomAdapter { | |
| 124 124 | 
             
                        });
         | 
| 125 125 | 
             
                    });
         | 
| 126 126 | 
             
                }
         | 
| 127 | 
            +
                render(rootComponent, injector) {
         | 
| 128 | 
            +
                    const childInjector = new ReflectiveInjector(injector, [{
         | 
| 129 | 
            +
                            provide: Adapter,
         | 
| 130 | 
            +
                            useValue: this
         | 
| 131 | 
            +
                        }, {
         | 
| 132 | 
            +
                            provide: DomAdapter,
         | 
| 133 | 
            +
                            useValue: this
         | 
| 134 | 
            +
                        }, {
         | 
| 135 | 
            +
                            provide: ViewflyAdapter,
         | 
| 136 | 
            +
                            useValue: this
         | 
| 137 | 
            +
                        }]);
         | 
| 138 | 
            +
                    return super.render(rootComponent, childInjector);
         | 
| 139 | 
            +
                }
         | 
| 127 140 | 
             
                copy() {
         | 
| 128 141 | 
             
                    document.execCommand('copy');
         | 
| 129 142 | 
             
                }
         | 
    
        package/bundles/index.js
    CHANGED
    
    | @@ -126,6 +126,19 @@ class ViewflyAdapter extends platformBrowser.DomAdapter { | |
| 126 126 | 
             
                        });
         | 
| 127 127 | 
             
                    });
         | 
| 128 128 | 
             
                }
         | 
| 129 | 
            +
                render(rootComponent, injector) {
         | 
| 130 | 
            +
                    const childInjector = new core$1.ReflectiveInjector(injector, [{
         | 
| 131 | 
            +
                            provide: core.Adapter,
         | 
| 132 | 
            +
                            useValue: this
         | 
| 133 | 
            +
                        }, {
         | 
| 134 | 
            +
                            provide: platformBrowser.DomAdapter,
         | 
| 135 | 
            +
                            useValue: this
         | 
| 136 | 
            +
                        }, {
         | 
| 137 | 
            +
                            provide: ViewflyAdapter,
         | 
| 138 | 
            +
                            useValue: this
         | 
| 139 | 
            +
                        }]);
         | 
| 140 | 
            +
                    return super.render(rootComponent, childInjector);
         | 
| 141 | 
            +
                }
         | 
| 129 142 | 
             
                copy() {
         | 
| 130 143 | 
             
                    document.execCommand('copy');
         | 
| 131 144 | 
             
                }
         | 
| @@ -1,5 +1,5 @@ | |
| 1 1 | 
             
            import { Component, ViewMount } from '@textbus/core';
         | 
| 2 | 
            -
            import { ComponentSetup, DynamicRef, ViewFlyNode } from '@viewfly/core';
         | 
| 2 | 
            +
            import { ComponentSetup, DynamicRef, Injector, ViewFlyNode } from '@viewfly/core';
         | 
| 3 3 | 
             
            import { DomAdapter } from '@textbus/platform-browser';
         | 
| 4 4 | 
             
            export interface ViewComponentProps<T extends Component> {
         | 
| 5 5 | 
             
                component: T;
         | 
| @@ -12,5 +12,6 @@ export declare class ViewflyAdapter extends DomAdapter<ViewFlyNode, ViewFlyNode> | |
| 12 12 | 
             
                private components;
         | 
| 13 13 | 
             
                private componentRefs;
         | 
| 14 14 | 
             
                constructor(components: ViewflyAdapterComponents, mount: ViewMount<ViewFlyNode, Element>);
         | 
| 15 | 
            +
                render(rootComponent: Component, injector: Injector): void | (() => void);
         | 
| 15 16 | 
             
                copy(): void;
         | 
| 16 17 | 
             
            }
         | 
    
        package/package.json
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            {
         | 
| 2 2 | 
             
              "name": "@textbus/adapter-viewfly",
         | 
| 3 | 
            -
              "version": "4.2. | 
| 3 | 
            +
              "version": "4.2.2",
         | 
| 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,9 +26,9 @@ | |
| 26 26 | 
             
              ],
         | 
| 27 27 | 
             
              "dependencies": {
         | 
| 28 28 | 
             
                "@tanbo/stream": "^1.2.5",
         | 
| 29 | 
            -
                "@textbus/core": "^4.2. | 
| 30 | 
            -
                "@textbus/platform-browser": "^4.2. | 
| 31 | 
            -
                "@textbus/platform-node": "^4.2. | 
| 29 | 
            +
                "@textbus/core": "^4.2.1",
         | 
| 30 | 
            +
                "@textbus/platform-browser": "^4.2.2",
         | 
| 31 | 
            +
                "@textbus/platform-node": "^4.2.1",
         | 
| 32 32 | 
             
                "@viewfly/core": "^1.0.5",
         | 
| 33 33 | 
             
                "@viewfly/platform-browser": "^1.0.5"
         | 
| 34 34 | 
             
              },
         |