@runopencode/rx-stencil 0.4.0
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/LICENSE +18 -0
- package/README.md +39 -0
- package/dist/cjs/index-5f6f12ab.js +1265 -0
- package/dist/cjs/index-5f6f12ab.js.map +1 -0
- package/dist/cjs/index.cjs.js +572 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/rx-async.cjs.entry.js +71 -0
- package/dist/cjs/rx-async.cjs.entry.js.map +1 -0
- package/dist/cjs/rx-stencil.cjs.js +25 -0
- package/dist/cjs/rx-stencil.cjs.js.map +1 -0
- package/dist/cjs/set-property-88176225.js +1167 -0
- package/dist/cjs/set-property-88176225.js.map +1 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/async/async.js +67 -0
- package/dist/collection/components/async/async.js.map +1 -0
- package/dist/collection/components/async/async.scss +3 -0
- package/dist/collection/index.js +3 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/rx/decorator/index.js +3 -0
- package/dist/collection/rx/decorator/index.js.map +1 -0
- package/dist/collection/rx/decorator/query-selector-all.js +41 -0
- package/dist/collection/rx/decorator/query-selector-all.js.map +1 -0
- package/dist/collection/rx/decorator/query-selector.js +54 -0
- package/dist/collection/rx/decorator/query-selector.js.map +1 -0
- package/dist/collection/rx/index.js +5 -0
- package/dist/collection/rx/index.js.map +1 -0
- package/dist/collection/rx/observable/index.js +4 -0
- package/dist/collection/rx/observable/index.js.map +1 -0
- package/dist/collection/rx/observable/mutation-observable.js +13 -0
- package/dist/collection/rx/observable/mutation-observable.js.map +1 -0
- package/dist/collection/rx/observable/property-observable.js +28 -0
- package/dist/collection/rx/observable/property-observable.js.map +1 -0
- package/dist/collection/rx/observable/render-observable.js +24 -0
- package/dist/collection/rx/observable/render-observable.js.map +1 -0
- package/dist/collection/rx/operator/index.js +4 -0
- package/dist/collection/rx/operator/index.js.map +1 -0
- package/dist/collection/rx/operator/schedule-render.js +23 -0
- package/dist/collection/rx/operator/schedule-render.js.map +1 -0
- package/dist/collection/rx/operator/to-property.js +19 -0
- package/dist/collection/rx/operator/to-property.js.map +1 -0
- package/dist/collection/rx/operator/until-disconnected.js +105 -0
- package/dist/collection/rx/operator/until-disconnected.js.map +1 -0
- package/dist/collection/rx/subscriber/index.js +2 -0
- package/dist/collection/rx/subscriber/index.js.map +1 -0
- package/dist/collection/rx/subscriber/set-property.js +16 -0
- package/dist/collection/rx/subscriber/set-property.js.map +1 -0
- package/dist/collection/utils/get-property-descriptor.js +18 -0
- package/dist/collection/utils/get-property-descriptor.js.map +1 -0
- package/dist/collection/utils/index.js +2 -0
- package/dist/collection/utils/index.js.map +1 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/index.js +562 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/rx-async.d.ts +11 -0
- package/dist/components/rx-async.js +86 -0
- package/dist/components/rx-async.js.map +1 -0
- package/dist/components/set-property.js +1150 -0
- package/dist/components/set-property.js.map +1 -0
- package/dist/esm/index-9102de09.js +1236 -0
- package/dist/esm/index-9102de09.js.map +1 -0
- package/dist/esm/index.js +561 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/rx-async.entry.js +67 -0
- package/dist/esm/rx-async.entry.js.map +1 -0
- package/dist/esm/rx-stencil.js +20 -0
- package/dist/esm/rx-stencil.js.map +1 -0
- package/dist/esm/set-property-7fa82bef.js +1150 -0
- package/dist/esm/set-property-7fa82bef.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/rx-stencil/index.esm.js +2 -0
- package/dist/rx-stencil/index.esm.js.map +1 -0
- package/dist/rx-stencil/p-01af4414.entry.js +2 -0
- package/dist/rx-stencil/p-01af4414.entry.js.map +1 -0
- package/dist/rx-stencil/p-0cd0b2da.js +2 -0
- package/dist/rx-stencil/p-0cd0b2da.js.map +1 -0
- package/dist/rx-stencil/p-8411601b.js +3 -0
- package/dist/rx-stencil/p-8411601b.js.map +1 -0
- package/dist/rx-stencil/rx-stencil.esm.js +2 -0
- package/dist/rx-stencil/rx-stencil.esm.js.map +1 -0
- package/dist/types/components/async/async.d.ts +10 -0
- package/dist/types/components.d.ts +41 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/rx/decorator/index.d.ts +2 -0
- package/dist/types/rx/decorator/query-selector-all.d.ts +22 -0
- package/dist/types/rx/decorator/query-selector.d.ts +30 -0
- package/dist/types/rx/index.d.ts +4 -0
- package/dist/types/rx/observable/index.d.ts +3 -0
- package/dist/types/rx/observable/mutation-observable.d.ts +2 -0
- package/dist/types/rx/observable/property-observable.d.ts +6 -0
- package/dist/types/rx/observable/render-observable.d.ts +8 -0
- package/dist/types/rx/operator/index.d.ts +3 -0
- package/dist/types/rx/operator/schedule-render.d.ts +12 -0
- package/dist/types/rx/operator/to-property.d.ts +9 -0
- package/dist/types/rx/operator/until-disconnected.d.ts +7 -0
- package/dist/types/rx/subscriber/index.d.ts +1 -0
- package/dist/types/rx/subscriber/set-property.d.ts +16 -0
- package/dist/types/stencil-public-runtime.d.ts +1652 -0
- package/dist/types/utils/get-property-descriptor.d.ts +7 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +21 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +42 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
/**
|
|
3
|
+
* Options for QuerySelector decorator.
|
|
4
|
+
*/
|
|
5
|
+
export type QuerySelectorOptions = {
|
|
6
|
+
/**
|
|
7
|
+
* If `true`, the element will be searched in the shadow root. Default is `false`.
|
|
8
|
+
*/
|
|
9
|
+
shadowRoot?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* If `true`, mutation observer instead of `renderObservable` from this package will
|
|
12
|
+
* be used to detect changes. Default is `false`.
|
|
13
|
+
*/
|
|
14
|
+
mutationObserver?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Observe all sub nodes of the given node and notify
|
|
18
|
+
* when any of them is removed and/or added.
|
|
19
|
+
*
|
|
20
|
+
* {@internal}
|
|
21
|
+
*/
|
|
22
|
+
export declare function observeSubNodes(target: Node): Observable<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Property decorator inspired by Angular's @ViewChild/@ContentChild.
|
|
25
|
+
*
|
|
26
|
+
* After each render, the decorated property will be set to the first element
|
|
27
|
+
* matching the given selector. If no element is found, the property will be
|
|
28
|
+
* set to null.
|
|
29
|
+
*/
|
|
30
|
+
export declare function QuerySelector<T extends HTMLElement = HTMLElement>(selector: string, options?: QuerySelectorOptions): any;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentInterface } from '../../stencil-public-runtime';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
/**
|
|
4
|
+
* Returns an observable that emits property value when the component property value changes.
|
|
5
|
+
*/
|
|
6
|
+
export declare function propertyObservable<T = any>(cmp: ComponentInterface, property: string): Observable<T>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentInterface } from '../../stencil-public-runtime';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
/**
|
|
4
|
+
* Returns an observable that emits when the component render()
|
|
5
|
+
* function is called. Value will be emitted after the next
|
|
6
|
+
* microtask (next tick).
|
|
7
|
+
*/
|
|
8
|
+
export declare function renderObservable(cmp: ComponentInterface): Observable<void>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentInterface } from '../../stencil-public-runtime';
|
|
2
|
+
import { MonoTypeOperatorFunction } from 'rxjs';
|
|
3
|
+
/**
|
|
4
|
+
* Schedule a render of the component. This is useful when you
|
|
5
|
+
* want to force a render of the component as result of changing
|
|
6
|
+
* the values of the component which are not tracked by Stencil,
|
|
7
|
+
* observables, for example.
|
|
8
|
+
*
|
|
9
|
+
* By default, the render is scheduled on the next tick, but you
|
|
10
|
+
* can disable this behavior by passing `false` as second argument.
|
|
11
|
+
*/
|
|
12
|
+
export declare function scheduleRender<T = unknown>(cmp: ComponentInterface, nextTick?: boolean): MonoTypeOperatorFunction<T>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentInterface } from '../../stencil-public-runtime';
|
|
2
|
+
import { MonoTypeOperatorFunction } from 'rxjs';
|
|
3
|
+
/**
|
|
4
|
+
* Use this function to tap into a value stream and flush value to
|
|
5
|
+
* component property. You may also use this function as subscription
|
|
6
|
+
* function (function will detect that value is passed instead of
|
|
7
|
+
* observable).
|
|
8
|
+
*/
|
|
9
|
+
export declare function toProperty<T = any>(cmp: ComponentInterface, property: string): MonoTypeOperatorFunction<T>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentInterface } from '../../stencil-public-runtime';
|
|
2
|
+
import { MonoTypeOperatorFunction } from 'rxjs';
|
|
3
|
+
/**
|
|
4
|
+
* Operator that unsubscribes from the source observable when
|
|
5
|
+
* the component is disconnected from DOM.
|
|
6
|
+
*/
|
|
7
|
+
export declare function untilDisconnected<T = unknown>(cmp: ComponentInterface): MonoTypeOperatorFunction<T>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SetPropertyOptions, setProperty, } from './set-property';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentInterface } from '../../stencil-public-runtime';
|
|
2
|
+
export type SetPropertyOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* Whether to schedule a render of the component after the
|
|
5
|
+
* property is updated. By default, this value is set to
|
|
6
|
+
* `false`, assuming that the property is annotated with
|
|
7
|
+
* either @State or @Prop decorator.
|
|
8
|
+
*/
|
|
9
|
+
scheduleRender?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Whether to schedule a render of the component on the next
|
|
12
|
+
* tick. By default, this value is set to `true`.
|
|
13
|
+
*/
|
|
14
|
+
nextTick?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare function setProperty<T = any>(cmp: ComponentInterface, property: string, options?: SetPropertyOptions): (value: T) => void;
|