@symbiote-native/blur 0.0.0-stage → 0.1.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 +21 -0
- package/README.md +217 -2
- package/build/angular/blur-target-view/index.android.d.ts +7 -0
- package/build/angular/blur-target-view/index.android.js +87 -0
- package/build/angular/blur-target-view/index.d.ts +1 -0
- package/build/angular/blur-target-view/index.ios.d.ts +6 -0
- package/build/angular/blur-target-view/index.ios.js +76 -0
- package/build/angular/blur-target-view/index.js +2 -0
- package/build/angular/blur-target-view/shared.d.ts +9 -0
- package/build/angular/blur-target-view/shared.js +64 -0
- package/build/angular/blur-view.d.ts +23 -0
- package/build/angular/blur-view.js +138 -0
- package/build/angular/index.d.ts +3 -0
- package/build/angular/index.js +4 -0
- package/build/core/blur.d.ts +53 -0
- package/build/core/blur.js +104 -0
- package/build/core/index.d.ts +1 -0
- package/build/core/index.js +1 -0
- package/build/react/blur.d.ts +18 -0
- package/build/react/blur.js +18 -0
- package/build/react/index.d.ts +3 -0
- package/build/react/index.js +3 -0
- package/build/solid/blur.d.ts +19 -0
- package/build/solid/blur.js +17 -0
- package/build/solid/index.d.ts +3 -0
- package/build/solid/index.js +3 -0
- package/build/svelte/blur-props.d.ts +13 -0
- package/build/svelte/blur-props.js +1 -0
- package/build/svelte/blur-target-view.svelte +14 -0
- package/build/svelte/blur-target-view.svelte.d.ts +4 -0
- package/build/svelte/blur-view.svelte +21 -0
- package/build/svelte/blur-view.svelte.d.ts +4 -0
- package/build/svelte/index.d.ts +4 -0
- package/build/svelte/index.js +4 -0
- package/build/vue/blur.d.ts +12 -0
- package/build/vue/blur.js +50 -0
- package/build/vue/index.d.ts +3 -0
- package/build/vue/index.js +3 -0
- package/build-ngc/angular/blur-target-view/index.android.d.ts +10 -0
- package/build-ngc/angular/blur-target-view/index.android.js +46 -0
- package/build-ngc/angular/blur-target-view/index.android.js.map +1 -0
- package/build-ngc/angular/blur-target-view/index.d.ts +1 -0
- package/build-ngc/angular/blur-target-view/index.ios.d.ts +9 -0
- package/build-ngc/angular/blur-target-view/index.ios.js +27 -0
- package/build-ngc/angular/blur-target-view/index.ios.js.map +1 -0
- package/build-ngc/angular/blur-target-view/index.js +3 -0
- package/build-ngc/angular/blur-target-view/index.js.map +1 -0
- package/build-ngc/angular/blur-target-view/shared.d.ts +12 -0
- package/build-ngc/angular/blur-target-view/shared.js +20 -0
- package/build-ngc/angular/blur-target-view/shared.js.map +1 -0
- package/build-ngc/angular/blur-view.d.ts +26 -0
- package/build-ngc/angular/blur-view.js +81 -0
- package/build-ngc/angular/blur-view.js.map +1 -0
- package/build-ngc/angular/index.d.ts +3 -0
- package/build-ngc/angular/index.js +5 -0
- package/build-ngc/angular/index.js.map +1 -0
- package/build-ngc/core/blur.d.ts +53 -0
- package/build-ngc/core/blur.js +105 -0
- package/build-ngc/core/blur.js.map +1 -0
- package/build-ngc/core/index.d.ts +1 -0
- package/build-ngc/core/index.js +2 -0
- package/build-ngc/core/index.js.map +1 -0
- package/native-link.json +12 -0
- package/package.json +145 -3
- package/src/angular/blur-target-view/index.android.ts +46 -0
- package/src/angular/blur-target-view/index.ios.ts +25 -0
- package/src/angular/blur-target-view/index.ts +2 -0
- package/src/angular/blur-target-view/shared.ts +22 -0
- package/src/angular/blur-view.ts +87 -0
- package/src/angular/index.ts +13 -0
- package/src/core/blur.ts +214 -0
- package/src/core/index.ts +15 -0
- package/src/react/blur.ts +49 -0
- package/src/react/index.ts +14 -0
- package/src/solid/blur.ts +60 -0
- package/src/solid/index.ts +14 -0
- package/src/svelte/blur-props.ts +18 -0
- package/src/svelte/blur-target-view.svelte +14 -0
- package/src/svelte/blur-view.svelte +21 -0
- package/src/svelte/index.ts +15 -0
- package/src/svelte/svelte-ambient.d.ts +6 -0
- package/src/svelte/svelte-compile.test-helper.ts +6 -0
- package/src/vue/blur.ts +82 -0
- package/src/vue/index.ts +14 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../../src/angular/blur-target-view/index.android.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;;AAE9C,MAAM,YAAY,GAAG,gDAAgD,CAAC;AAEtE,wFAAwF;AAexF,MAAM,OAAO,cAAe,SAAQ,kBAAkB;IAEnC,OAAO,CAAuB;IAE/C;QACE,KAAK,EAAE,CAAC;QACR,uBAAuB,CACrB,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,CACrB,CAAC;IACJ,CAAC;IAED,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;IACpC,CAAC;uGAfU,cAAc;2FAAd,cAAc,sJACE,UAAU,kEAR3B;;;;;oDAKwC,4DATxC,0BAA0B;;2FAWzB,cAAc;kBAd1B,SAAS;mBAAC;oBACT,QAAQ,EAAE,gBAAgB;oBAC1B,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,0BAA0B,CAAC;oBACrC,OAAO,EAAE,CAAC,gBAAgB,CAAC;oBAC3B,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,iEAAiE;oBACjE,QAAQ,EAAE;;;;;oDAKwC;iBACnD;;sBAEE,SAAS;uBAAC,MAAM,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BlurTargetView } from './index.ios';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BlurTargetViewBase } from './shared';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/** Angular twin of `expo-blur`'s `BlurTargetView`, a plain View on iOS */
|
|
4
|
+
export declare class BlurTargetView extends BlurTargetViewBase {
|
|
5
|
+
private readonly hostRef;
|
|
6
|
+
get nativeElement(): unknown;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BlurTargetView, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BlurTargetView, "BlurTargetView", never, {}, {}, never, ["*"], true, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, ElementRef, ViewChild, } from '@angular/core';
|
|
2
|
+
import { SymbioteHostPropsDirective, View } from '@symbiote-native/angular';
|
|
3
|
+
import { BlurTargetViewBase } from './shared';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/** Angular twin of `expo-blur`'s `BlurTargetView`, a plain View on iOS */
|
|
6
|
+
export class BlurTargetView extends BlurTargetViewBase {
|
|
7
|
+
hostRef;
|
|
8
|
+
get nativeElement() {
|
|
9
|
+
return this.hostRef.nativeElement;
|
|
10
|
+
}
|
|
11
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BlurTargetView, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
12
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: BlurTargetView, isStandalone: true, selector: "BlurTargetView", viewQueries: [{ propertyName: "hostRef", first: true, predicate: ["host"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: `<view #host [symbioteHostProps]="hostProps"><ng-content /></view>`, isInline: true, dependencies: [{ kind: "directive", type: SymbioteHostPropsDirective, selector: "[symbioteHostProps]", inputs: ["symbioteHostProps"], exportAs: ["symbioteHost"] }, { kind: "component", type: View, selector: "view" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
13
|
+
}
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BlurTargetView, decorators: [{
|
|
15
|
+
type: Component,
|
|
16
|
+
args: [{
|
|
17
|
+
selector: 'BlurTargetView',
|
|
18
|
+
standalone: true,
|
|
19
|
+
imports: [SymbioteHostPropsDirective, View],
|
|
20
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
21
|
+
template: `<view #host [symbioteHostProps]="hostProps"><ng-content /></view>`,
|
|
22
|
+
}]
|
|
23
|
+
}], propDecorators: { hostRef: [{
|
|
24
|
+
type: ViewChild,
|
|
25
|
+
args: ['host', { read: ElementRef, static: true }]
|
|
26
|
+
}] } });
|
|
27
|
+
//# sourceMappingURL=index.ios.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.ios.js","sourceRoot":"","sources":["../../../src/angular/blur-target-view/index.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,UAAU,EACV,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,0BAA0B,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;;AAE9C,0EAA0E;AAQ1E,MAAM,OAAO,cAAe,SAAQ,kBAAkB;IAEnC,OAAO,CAAuB;IAE/C,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;IACpC,CAAC;uGANU,cAAc;2FAAd,cAAc,sJACE,UAAU,kEAH3B,mEAAmE,4DAFnE,0BAA0B,2HAAE,IAAI;;2FAI/B,cAAc;kBAP1B,SAAS;mBAAC;oBACT,QAAQ,EAAE,gBAAgB;oBAC1B,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,0BAA0B,EAAE,IAAI,CAAC;oBAC3C,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,QAAQ,EAAE,mEAAmE;iBAC9E;;sBAEE,SAAS;uBAAC,MAAM,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/angular/blur-target-view/index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NativeViewBase } from '@symbiote-native/angular';
|
|
2
|
+
import type { IDescriptor } from '@symbiote-native/components';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare abstract class BlurTargetViewBase extends NativeViewBase {
|
|
5
|
+
/** Нужен свойству `blurTarget` у `BlurView`, чтобы найти host-узел */
|
|
6
|
+
abstract readonly nativeElement: unknown;
|
|
7
|
+
protected readonly propNames: readonly [];
|
|
8
|
+
protected renderView(props: object): IDescriptor;
|
|
9
|
+
get hostProps(): Record<string, unknown>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BlurTargetViewBase, never>;
|
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BlurTargetViewBase, never, never, {}, {}, never, never, true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Directive, Input } from '@angular/core';
|
|
2
|
+
import { NativeViewBase } from '@symbiote-native/angular';
|
|
3
|
+
import { renderBlurTargetView } from '../../core';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
// Платформы различаются только тегом в шаблоне, остальное общее
|
|
6
|
+
export class BlurTargetViewBase extends NativeViewBase {
|
|
7
|
+
propNames = [];
|
|
8
|
+
renderView(props) {
|
|
9
|
+
return renderBlurTargetView(props);
|
|
10
|
+
}
|
|
11
|
+
get hostProps() {
|
|
12
|
+
return this.descriptor?.props ?? {};
|
|
13
|
+
}
|
|
14
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BlurTargetViewBase, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
15
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BlurTargetViewBase, isStandalone: true, usesInheritance: true, ngImport: i0 });
|
|
16
|
+
}
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BlurTargetViewBase, decorators: [{
|
|
18
|
+
type: Directive
|
|
19
|
+
}] });
|
|
20
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/angular/blur-target-view/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;;AAElD,gEAAgE;AAEhE,MAAM,OAAgB,kBAAmB,SAAQ,cAAc;IAI1C,SAAS,GAC1B,EAA2D,CAAC;IAE3C,UAAU,CAAC,KAAa;QACzC,OAAO,oBAAoB,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC;IACtC,CAAC;uGAbmB,kBAAkB;2FAAlB,kBAAkB;;2FAAlB,kBAAkB;kBADvC,SAAS"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type AfterViewInit, type OnChanges, type OnDestroy, type SimpleChanges } from '@angular/core';
|
|
2
|
+
import { NativeViewBase } from '@symbiote-native/angular';
|
|
3
|
+
import type { IDescriptor } from '@symbiote-native/components';
|
|
4
|
+
import type { IBlurViewProps } from '../core';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/** Angular twin of `expo-blur`'s `BlurView`, the projected content paints over the blur */
|
|
7
|
+
export declare class BlurView extends NativeViewBase implements AfterViewInit, OnChanges, OnDestroy {
|
|
8
|
+
tint?: IBlurViewProps['tint'];
|
|
9
|
+
intensity?: IBlurViewProps['intensity'];
|
|
10
|
+
blurReductionFactor?: IBlurViewProps['blurReductionFactor'];
|
|
11
|
+
experimentalBlurMethod?: IBlurViewProps['experimentalBlurMethod'];
|
|
12
|
+
blurMethod?: IBlurViewProps['blurMethod'];
|
|
13
|
+
/** Template ref на `BlurTargetView`, его содержимое это фон для размытия */
|
|
14
|
+
blurTarget?: unknown;
|
|
15
|
+
protected readonly propNames: readonly ["tint", "intensity", "blurReductionFactor", "experimentalBlurMethod", "blurMethod"];
|
|
16
|
+
private blurTargetId;
|
|
17
|
+
private cancelWatch;
|
|
18
|
+
private isViewReady;
|
|
19
|
+
protected renderView(props: object): IDescriptor;
|
|
20
|
+
ngAfterViewInit(): void;
|
|
21
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
22
|
+
protected disposeView(): void;
|
|
23
|
+
private watchTarget;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BlurView, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BlurView, "BlurView", never, { "tint": { "alias": "tint"; "required": false; }; "intensity": { "alias": "intensity"; "required": false; }; "blurReductionFactor": { "alias": "blurReductionFactor"; "required": false; }; "experimentalBlurMethod": { "alias": "experimentalBlurMethod"; "required": false; }; "blurMethod": { "alias": "blurMethod"; "required": false; }; "blurTarget": { "alias": "blurTarget"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input, } from '@angular/core';
|
|
2
|
+
import { DescriptorHost, NativeViewBase, hostNodeOf, } from '@symbiote-native/angular';
|
|
3
|
+
import { renderBlurView, warnBlurProps, watchBlurTarget } from '../core';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/** Angular twin of `expo-blur`'s `BlurView`, the projected content paints over the blur */
|
|
6
|
+
export class BlurView extends NativeViewBase {
|
|
7
|
+
tint;
|
|
8
|
+
intensity;
|
|
9
|
+
blurReductionFactor;
|
|
10
|
+
experimentalBlurMethod;
|
|
11
|
+
blurMethod;
|
|
12
|
+
/** Template ref на `BlurTargetView`, его содержимое это фон для размытия */
|
|
13
|
+
blurTarget;
|
|
14
|
+
propNames = [
|
|
15
|
+
'tint',
|
|
16
|
+
'intensity',
|
|
17
|
+
'blurReductionFactor',
|
|
18
|
+
'experimentalBlurMethod',
|
|
19
|
+
'blurMethod',
|
|
20
|
+
];
|
|
21
|
+
blurTargetId;
|
|
22
|
+
cancelWatch = () => { };
|
|
23
|
+
isViewReady = false;
|
|
24
|
+
renderView(props) {
|
|
25
|
+
return renderBlurView(props, this.blurTargetId);
|
|
26
|
+
}
|
|
27
|
+
// Цель ставится при создании представления соседа, поэтому ждём `ngAfterViewInit`
|
|
28
|
+
ngAfterViewInit() {
|
|
29
|
+
this.isViewReady = true;
|
|
30
|
+
this.watchTarget();
|
|
31
|
+
warnBlurProps(Object.fromEntries(this.propNames.map(name => [name, Reflect.get(this, name)])), this.blurTarget !== undefined);
|
|
32
|
+
}
|
|
33
|
+
ngOnChanges(changes) {
|
|
34
|
+
super.ngOnChanges(changes);
|
|
35
|
+
if (this.isViewReady && 'blurTarget' in changes)
|
|
36
|
+
this.watchTarget();
|
|
37
|
+
}
|
|
38
|
+
disposeView() {
|
|
39
|
+
this.cancelWatch();
|
|
40
|
+
}
|
|
41
|
+
watchTarget() {
|
|
42
|
+
this.cancelWatch();
|
|
43
|
+
this.cancelWatch = watchBlurTarget(hostNodeOf(this.blurTarget), id => {
|
|
44
|
+
this.blurTargetId = id;
|
|
45
|
+
this.changeDetector.markForCheck();
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BlurView, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
49
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BlurView, isStandalone: true, selector: "BlurView", inputs: { tint: "tint", intensity: "intensity", blurReductionFactor: "blurReductionFactor", experimentalBlurMethod: "experimentalBlurMethod", blurMethod: "blurMethod", blurTarget: "blurTarget" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `@if (descriptor; as node) {
|
|
50
|
+
<symbiote-descriptor-host [node]="node"
|
|
51
|
+
><ng-content
|
|
52
|
+
/></symbiote-descriptor-host>
|
|
53
|
+
}`, isInline: true, dependencies: [{ kind: "component", type: DescriptorHost, selector: "symbiote-descriptor-host", inputs: ["node"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
54
|
+
}
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BlurView, decorators: [{
|
|
56
|
+
type: Component,
|
|
57
|
+
args: [{
|
|
58
|
+
selector: 'BlurView',
|
|
59
|
+
standalone: true,
|
|
60
|
+
imports: [DescriptorHost],
|
|
61
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
62
|
+
template: `@if (descriptor; as node) {
|
|
63
|
+
<symbiote-descriptor-host [node]="node"
|
|
64
|
+
><ng-content
|
|
65
|
+
/></symbiote-descriptor-host>
|
|
66
|
+
}`,
|
|
67
|
+
}]
|
|
68
|
+
}], propDecorators: { tint: [{
|
|
69
|
+
type: Input
|
|
70
|
+
}], intensity: [{
|
|
71
|
+
type: Input
|
|
72
|
+
}], blurReductionFactor: [{
|
|
73
|
+
type: Input
|
|
74
|
+
}], experimentalBlurMethod: [{
|
|
75
|
+
type: Input
|
|
76
|
+
}], blurMethod: [{
|
|
77
|
+
type: Input
|
|
78
|
+
}], blurTarget: [{
|
|
79
|
+
type: Input
|
|
80
|
+
}] } });
|
|
81
|
+
//# sourceMappingURL=blur-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blur-view.js","sourceRoot":"","sources":["../../src/angular/blur-view.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,KAAK,GAKN,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,cAAc,EACd,cAAc,EACd,UAAU,GACX,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;;AAGzE,2FAA2F;AAY3F,MAAM,OAAO,QACX,SAAQ,cAAc;IAGb,IAAI,CAA0B;IAC9B,SAAS,CAA+B;IACxC,mBAAmB,CAAyC;IAC5D,sBAAsB,CAA4C;IAClE,UAAU,CAAgC;IACnD,4EAA4E;IACnE,UAAU,CAAW;IAEF,SAAS,GAAG;QACtC,MAAM;QACN,WAAW;QACX,qBAAqB;QACrB,wBAAwB;QACxB,YAAY;KACkC,CAAC;IAEzC,YAAY,CAAqB;IACjC,WAAW,GAAG,GAAS,EAAE,GAAE,CAAC,CAAC;IAC7B,WAAW,GAAG,KAAK,CAAC;IAET,UAAU,CAAC,KAAa;QACzC,OAAO,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAClD,CAAC;IAED,kFAAkF;IAClF,eAAe;QACb,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,aAAa,CACX,MAAM,CAAC,WAAW,CAChB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAC5D,EACD,IAAI,CAAC,UAAU,KAAK,SAAS,CAC9B,CAAC;IACJ,CAAC;IAEQ,WAAW,CAAC,OAAsB;QACzC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAC3B,IAAI,IAAI,CAAC,WAAW,IAAI,YAAY,IAAI,OAAO;YAAE,IAAI,CAAC,WAAW,EAAE,CAAC;IACtE,CAAC;IAEkB,WAAW;QAC5B,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IAEO,WAAW;QACjB,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC,EAAE;YACnE,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;YACvB,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,CAAC;QACrC,CAAC,CAAC,CAAC;IACL,CAAC;uGAvDU,QAAQ;2FAAR,QAAQ,oTANT;;;;IAIR,4DANQ,cAAc;;2FAQb,QAAQ;kBAXpB,SAAS;mBAAC;oBACT,QAAQ,EAAE,UAAU;oBACpB,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,QAAQ,EAAE;;;;IAIR;iBACH;;sBAKE,KAAK;;sBACL,KAAK;;sBACL,KAAK;;sBACL,KAAK;;sBACL,KAAK;;sBAEL,KAAK"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// @symbiote-native/blur/angular: компоненты `BlurView` и `BlurTargetView` поверх общего ядра
|
|
2
|
+
export { BlurView } from './blur-view';
|
|
3
|
+
export { BlurTargetView } from './blur-target-view';
|
|
4
|
+
export { BLUR_MODULE_NAME, blurTargetViewName, blurViewName, } from '../core';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/angular/index.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAE7F,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,GAKb,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { IAccessibilityProps, IAriaProps, IDescriptor, IResponderProps } from '@symbiote-native/components';
|
|
2
|
+
import type { IStyleProp, ISymbioteEvent, IViewStyle } from '@symbiote-native/engine';
|
|
3
|
+
export declare const BLUR_MODULE_NAME = "ExpoBlur";
|
|
4
|
+
declare const BLUR_METHODS: readonly ["none", "dimezisBlurView", "dimezisBlurViewSdk31Plus"];
|
|
5
|
+
/** Метод размытия на Android: `none` это полупрозрачный view, остальные нативный BlurView */
|
|
6
|
+
export type IBlurMethod = (typeof BLUR_METHODS)[number];
|
|
7
|
+
export type IBlurTint = 'light' | 'dark' | 'default' | 'extraLight' | 'regular' | 'prominent' | 'systemUltraThinMaterial' | 'systemThinMaterial' | 'systemMaterial' | 'systemThickMaterial' | 'systemChromeMaterial' | 'systemUltraThinMaterialLight' | 'systemThinMaterialLight' | 'systemMaterialLight' | 'systemThickMaterialLight' | 'systemChromeMaterialLight' | 'systemUltraThinMaterialDark' | 'systemThinMaterialDark' | 'systemMaterialDark' | 'systemThickMaterialDark' | 'systemChromeMaterialDark';
|
|
8
|
+
type IViewSurface = IAccessibilityProps & IAriaProps & IResponderProps & {
|
|
9
|
+
style?: IStyleProp<IViewStyle>;
|
|
10
|
+
testID?: string;
|
|
11
|
+
nativeID?: string;
|
|
12
|
+
onLayout?: (event: ISymbioteEvent) => void;
|
|
13
|
+
};
|
|
14
|
+
export type IBlurViewProps = IViewSurface & {
|
|
15
|
+
/** @default 'default' */
|
|
16
|
+
tint?: IBlurTint;
|
|
17
|
+
/**
|
|
18
|
+
* Сила размытия от 1 до 100
|
|
19
|
+
* @default 50
|
|
20
|
+
*/
|
|
21
|
+
intensity?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Делитель силы размытия на Android
|
|
24
|
+
* @default 4
|
|
25
|
+
* @platform android
|
|
26
|
+
*/
|
|
27
|
+
blurReductionFactor?: number;
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Use `blurMethod` instead
|
|
30
|
+
* @platform android
|
|
31
|
+
*/
|
|
32
|
+
experimentalBlurMethod?: IBlurMethod;
|
|
33
|
+
/**
|
|
34
|
+
* @default 'none'
|
|
35
|
+
* @platform android
|
|
36
|
+
*/
|
|
37
|
+
blurMethod?: IBlurMethod;
|
|
38
|
+
};
|
|
39
|
+
export type IBlurTargetViewProps = IViewSurface;
|
|
40
|
+
export declare const blurViewName: () => string;
|
|
41
|
+
export declare const blurTargetViewName: () => string;
|
|
42
|
+
export declare const ensureBlurRegistered: () => boolean;
|
|
43
|
+
export declare const ensureBlurTargetRegistered: () => boolean;
|
|
44
|
+
/** Предупреждения из `componentDidMount` upstream, зовутся один раз при монтировании */
|
|
45
|
+
export declare function warnBlurProps(props: object, hasBlurTarget: boolean): void;
|
|
46
|
+
/**
|
|
47
|
+
* Отдаёт нативный тег цели размытия после её коммита, у не-узла отдаёт `undefined`
|
|
48
|
+
* Адаптер сам приводит свой ref к host-узлу, возвращённая функция отменяет ожидание
|
|
49
|
+
*/
|
|
50
|
+
export declare function watchBlurTarget(target: unknown, onId: (id: number | undefined) => void): () => void;
|
|
51
|
+
export declare function renderBlurView(props: object, blurTargetId: number | null | undefined): IDescriptor;
|
|
52
|
+
export declare function renderBlurTargetView(props: object): IDescriptor;
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// Ядро `BlurView` и `BlurTargetView`, порт `BlurView.tsx` из expo-blur
|
|
2
|
+
import { Platform, requireNativeViewManager } from 'expo-modules-core';
|
|
3
|
+
import { el } from '@symbiote-native/components';
|
|
4
|
+
import { defineExpoNativeViews, getNativeTag, isSymbioteNode, whenCommitted, } from '@symbiote-native/engine';
|
|
5
|
+
export const BLUR_MODULE_NAME = 'ExpoBlur';
|
|
6
|
+
const BLUR_VIEW_NAME = 'ExpoBlurView';
|
|
7
|
+
const BLUR_TARGET_VIEW_NAME = 'ExpoBlurTargetView';
|
|
8
|
+
const BLUR_METHODS = [
|
|
9
|
+
'none',
|
|
10
|
+
'dimezisBlurView',
|
|
11
|
+
'dimezisBlurViewSdk31Plus',
|
|
12
|
+
];
|
|
13
|
+
const DEFAULT_BLUR_METHOD = BLUR_METHODS[0];
|
|
14
|
+
// Эти ключи разбираются здесь, остальное уходит на View как есть
|
|
15
|
+
const BLUR_KEYS = new Set([
|
|
16
|
+
'tint',
|
|
17
|
+
'intensity',
|
|
18
|
+
'blurReductionFactor',
|
|
19
|
+
'experimentalBlurMethod',
|
|
20
|
+
'blurMethod',
|
|
21
|
+
]);
|
|
22
|
+
const ABSOLUTE_FILL = {
|
|
23
|
+
position: 'absolute',
|
|
24
|
+
left: 0,
|
|
25
|
+
right: 0,
|
|
26
|
+
top: 0,
|
|
27
|
+
bottom: 0,
|
|
28
|
+
};
|
|
29
|
+
const CONTAINER_STYLE = { backgroundColor: 'transparent' };
|
|
30
|
+
const DEPRECATED_METHOD_WARNING = 'The `experimentalBlurMethod` prop has been depracated. Please use the `blurMethod` prop instead.';
|
|
31
|
+
// Регистрация идёт при рендере: побочный эффект барреля теряется в release
|
|
32
|
+
const views = defineExpoNativeViews(requireNativeViewManager, BLUR_MODULE_NAME, {
|
|
33
|
+
blur: BLUR_VIEW_NAME,
|
|
34
|
+
target: BLUR_TARGET_VIEW_NAME,
|
|
35
|
+
});
|
|
36
|
+
export const blurViewName = views.blur.name;
|
|
37
|
+
export const blurTargetViewName = views.target.name;
|
|
38
|
+
export const ensureBlurRegistered = views.blur.ensureRegistered;
|
|
39
|
+
export const ensureBlurTargetRegistered = views.target.ensureRegistered;
|
|
40
|
+
function isBlurMethod(value) {
|
|
41
|
+
return BLUR_METHODS.some(method => method === value);
|
|
42
|
+
}
|
|
43
|
+
function blurMethodOf(props) {
|
|
44
|
+
const provided = Reflect.get(props, 'blurMethod');
|
|
45
|
+
const deprecated = Reflect.get(props, 'experimentalBlurMethod');
|
|
46
|
+
if (isBlurMethod(provided))
|
|
47
|
+
return provided;
|
|
48
|
+
return isBlurMethod(deprecated) ? deprecated : DEFAULT_BLUR_METHOD;
|
|
49
|
+
}
|
|
50
|
+
/** Предупреждения из `componentDidMount` upstream, зовутся один раз при монтировании */
|
|
51
|
+
export function warnBlurProps(props, hasBlurTarget) {
|
|
52
|
+
const method = blurMethodOf(props);
|
|
53
|
+
const isAndroidTarget = Platform.select({ android: true, default: false });
|
|
54
|
+
if (isAndroidTarget && method !== DEFAULT_BLUR_METHOD && !hasBlurTarget) {
|
|
55
|
+
console.warn(`You have selected the "${method}" blur method, but the \`blurTarget\` prop has not been configured. The blur view will fallback to "none" blur method to avoid errors. You can learn more about the new BlurView API at: https://docs.expo.dev/versions/latest/sdk/blur-view/`);
|
|
56
|
+
}
|
|
57
|
+
if (Reflect.get(props, 'experimentalBlurMethod') != null) {
|
|
58
|
+
console.warn(DEPRECATED_METHOD_WARNING);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Отдаёт нативный тег цели размытия после её коммита, у не-узла отдаёт `undefined`
|
|
63
|
+
* Адаптер сам приводит свой ref к host-узлу, возвращённая функция отменяет ожидание
|
|
64
|
+
*/
|
|
65
|
+
export function watchBlurTarget(target, onId) {
|
|
66
|
+
if (!isSymbioteNode(target)) {
|
|
67
|
+
onId(undefined);
|
|
68
|
+
return () => { };
|
|
69
|
+
}
|
|
70
|
+
return whenCommitted(target, () => onId(getNativeTag(target)));
|
|
71
|
+
}
|
|
72
|
+
// `object`, а не тип пропсов: Vue и Angular отдают нетипизированный набор атрибутов
|
|
73
|
+
export function renderBlurView(props, blurTargetId) {
|
|
74
|
+
const hostProps = Object.fromEntries(Object.entries(props).filter(([key]) => !BLUR_KEYS.has(key)));
|
|
75
|
+
const style = [CONTAINER_STYLE, Reflect.get(props, 'style')];
|
|
76
|
+
if (!ensureBlurRegistered()) {
|
|
77
|
+
console.warn('BlurView is not available on this platform');
|
|
78
|
+
return el('view', { ...hostProps, style });
|
|
79
|
+
}
|
|
80
|
+
const tint = Reflect.get(props, 'tint');
|
|
81
|
+
const intensity = Reflect.get(props, 'intensity');
|
|
82
|
+
const reduction = Reflect.get(props, 'blurReductionFactor');
|
|
83
|
+
const native = el(blurViewName(), {
|
|
84
|
+
...(blurTargetId === undefined ? {} : { blurTargetId }),
|
|
85
|
+
tint: tint ?? 'default',
|
|
86
|
+
intensity: intensity ?? 50,
|
|
87
|
+
blurReductionFactor: reduction ?? 4,
|
|
88
|
+
blurMethod: blurMethodOf(props),
|
|
89
|
+
style: ABSOLUTE_FILL,
|
|
90
|
+
});
|
|
91
|
+
return el('view', { ...hostProps, style }, [native]);
|
|
92
|
+
}
|
|
93
|
+
// Нативная цель размытия есть только на Android, на iOS это обычный View
|
|
94
|
+
export function renderBlurTargetView(props) {
|
|
95
|
+
const hostProps = { ...props };
|
|
96
|
+
if (!Platform.select({ android: true, default: false })) {
|
|
97
|
+
return el('view', hostProps);
|
|
98
|
+
}
|
|
99
|
+
if (!ensureBlurTargetRegistered()) {
|
|
100
|
+
console.warn('BlurTargetView is not available on this platform');
|
|
101
|
+
return el('view', hostProps);
|
|
102
|
+
}
|
|
103
|
+
return el(blurTargetViewName(), hostProps);
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=blur.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blur.js","sourceRoot":"","sources":["../../src/core/blur.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,OAAO,EAAE,QAAQ,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAC;AAOjD,OAAO,EACL,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,aAAa,GACd,MAAM,yBAAyB,CAAC;AAOjC,MAAM,CAAC,MAAM,gBAA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C,CAAC,CAAC;AACvD,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAChD,MAAM,SAAS,GAAG,EAAE,GAAG,KAAK,EAAE,CAAC;IAC/B,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;QACxD,OAAO,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC/B,CAAC;IACD,IAAI,CAAC,0BAA0B,EAAE,EAAE,CAAC;QAClC,OAAO,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;QACjE,OAAO,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,EAAE,CAAC,kBAAkB,EAAE,EAAE,SAAS,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BLUR_MODULE_NAME, blurTargetViewName, blurViewName, ensureBlurRegistered, ensureBlurTargetRegistered, renderBlurTargetView, renderBlurView, warnBlurProps, watchBlurTarget, type IBlurMethod, type IBlurTargetViewProps, type IBlurTint, type IBlurViewProps, } from './blur';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,0BAA0B,EAC1B,oBAAoB,EACpB,cAAc,EACd,aAAa,EACb,eAAe,GAKhB,MAAM,QAAQ,CAAC"}
|
package/native-link.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,148 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/blur",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "expo-blur wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, Svelte, Solid, and Angular adapters. A native view that blurs the content behind it, plus the Android blur target.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/OneEyed1366/symbiote-native.git",
|
|
9
|
+
"directory": "packages/blur"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/OneEyed1366/symbiote-native/tree/master/packages/blur#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/OneEyed1366/symbiote-native/issues"
|
|
14
|
+
},
|
|
15
|
+
"author": "Andrey Prokopenko <psevdoproger@gmail.com>",
|
|
16
|
+
"keywords": [
|
|
17
|
+
"react-native",
|
|
18
|
+
"symbiote-native",
|
|
19
|
+
"expo-blur",
|
|
20
|
+
"react",
|
|
21
|
+
"vue",
|
|
22
|
+
"svelte",
|
|
23
|
+
"solid",
|
|
24
|
+
"angular",
|
|
25
|
+
"blur-view",
|
|
26
|
+
"blur"
|
|
27
|
+
],
|
|
28
|
+
"type": "module",
|
|
29
|
+
"main": "./build/core/index.js",
|
|
30
|
+
"module": "./build/core/index.js",
|
|
31
|
+
"types": "./build/core/index.d.ts",
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./build/core/index.d.ts",
|
|
35
|
+
"default": "./build/core/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./vue": {
|
|
38
|
+
"types": "./build/vue/index.d.ts",
|
|
39
|
+
"default": "./build/vue/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./react": {
|
|
42
|
+
"types": "./build/react/index.d.ts",
|
|
43
|
+
"default": "./build/react/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./svelte": "./src/svelte/index.ts",
|
|
46
|
+
"./solid": {
|
|
47
|
+
"types": "./build/solid/index.d.ts",
|
|
48
|
+
"default": "./build/solid/index.js"
|
|
49
|
+
},
|
|
50
|
+
"./angular": {
|
|
51
|
+
"types": "./build-ngc/angular/index.d.ts",
|
|
52
|
+
"react-native": "./build-ngc/angular/index.js",
|
|
53
|
+
"default": "./src/angular/index.ts"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"files": [
|
|
57
|
+
"src",
|
|
58
|
+
"build",
|
|
59
|
+
"build-ngc",
|
|
60
|
+
"native-link.json",
|
|
61
|
+
"!src/**/*.test.*",
|
|
62
|
+
"!src/**/*.spec.*",
|
|
63
|
+
"!src/**/*.detox.*"
|
|
64
|
+
],
|
|
65
|
+
"publishConfig": {
|
|
66
|
+
"access": "public"
|
|
67
|
+
},
|
|
68
|
+
"dependencies": {
|
|
69
|
+
"expo-blur": "57.0.3",
|
|
70
|
+
"expo-modules-core": "57.0.20",
|
|
71
|
+
"@symbiote-native/components": "3.2.0"
|
|
72
|
+
},
|
|
73
|
+
"peerDependencies": {
|
|
74
|
+
"@angular/core": ">=20",
|
|
75
|
+
"@vue/runtime-core": "^3.5.13",
|
|
76
|
+
"react": ">=19.0.0",
|
|
77
|
+
"react-native": ">=0.86",
|
|
78
|
+
"solid-js": ">=1.9.0",
|
|
79
|
+
"svelte": ">=5.56.0",
|
|
80
|
+
"vue": ">=3.5.0",
|
|
81
|
+
"@symbiote-native/angular": "^3.3.0",
|
|
82
|
+
"@symbiote-native/engine": "^1.6.0",
|
|
83
|
+
"@symbiote-native/react": "^3.3.0",
|
|
84
|
+
"@symbiote-native/solid": "^3.2.0",
|
|
85
|
+
"@symbiote-native/svelte": "^3.2.0",
|
|
86
|
+
"@symbiote-native/vue": "^3.3.0"
|
|
87
|
+
},
|
|
88
|
+
"peerDependenciesMeta": {
|
|
89
|
+
"@symbiote-native/angular": {
|
|
90
|
+
"optional": true
|
|
91
|
+
},
|
|
92
|
+
"@symbiote-native/react": {
|
|
93
|
+
"optional": true
|
|
94
|
+
},
|
|
95
|
+
"@symbiote-native/solid": {
|
|
96
|
+
"optional": true
|
|
97
|
+
},
|
|
98
|
+
"@symbiote-native/svelte": {
|
|
99
|
+
"optional": true
|
|
100
|
+
},
|
|
101
|
+
"@symbiote-native/vue": {
|
|
102
|
+
"optional": true
|
|
103
|
+
},
|
|
104
|
+
"@angular/core": {
|
|
105
|
+
"optional": true
|
|
106
|
+
},
|
|
107
|
+
"@vue/runtime-core": {
|
|
108
|
+
"optional": true
|
|
109
|
+
},
|
|
110
|
+
"react": {
|
|
111
|
+
"optional": true
|
|
112
|
+
},
|
|
113
|
+
"solid-js": {
|
|
114
|
+
"optional": true
|
|
115
|
+
},
|
|
116
|
+
"svelte": {
|
|
117
|
+
"optional": true
|
|
118
|
+
},
|
|
119
|
+
"vue": {
|
|
120
|
+
"optional": true
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"devDependencies": {
|
|
124
|
+
"@angular/compiler": "~22.0.8",
|
|
125
|
+
"@angular/compiler-cli": "~22.0.8",
|
|
126
|
+
"@angular/core": "~22.0.8",
|
|
127
|
+
"@types/node": "^26.0.0",
|
|
128
|
+
"@types/react": "^19.2.0",
|
|
129
|
+
"@vue/runtime-core": "^3.5.13",
|
|
130
|
+
"react": "19.2.3",
|
|
131
|
+
"solid-js": "^1.9.14",
|
|
132
|
+
"svelte": "^5.56.0",
|
|
133
|
+
"typescript": "~6.0.0",
|
|
134
|
+
"@symbiote-native/angular": "3.3.0",
|
|
135
|
+
"@symbiote-native/engine": "1.6.0",
|
|
136
|
+
"@symbiote-native/react": "3.3.0",
|
|
137
|
+
"@symbiote-native/solid": "3.2.0",
|
|
138
|
+
"@symbiote-native/svelte": "3.2.0",
|
|
139
|
+
"@symbiote-native/test-utils": "0.4.7",
|
|
140
|
+
"@symbiote-native/vue": "3.3.0"
|
|
141
|
+
},
|
|
142
|
+
"scripts": {
|
|
143
|
+
"typecheck": "tsc --build",
|
|
144
|
+
"clean": "rm -rf build-ngc",
|
|
145
|
+
"ng:build": "pnpm run clean && ngc -p tsconfig.angular.json",
|
|
146
|
+
"format": "prettier --write \"src/**/*.{ts,tsx}\""
|
|
147
|
+
}
|
|
6
148
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
ElementRef,
|
|
5
|
+
NO_ERRORS_SCHEMA,
|
|
6
|
+
ViewChild,
|
|
7
|
+
} from '@angular/core';
|
|
8
|
+
import { warnIfViewNameIsDynamic } from '@symbiote-native/engine';
|
|
9
|
+
import { SymbioteHostPropsDirective } from '@symbiote-native/angular';
|
|
10
|
+
import { BLUR_MODULE_NAME } from '../../core';
|
|
11
|
+
import { BlurTargetViewBase } from './shared';
|
|
12
|
+
|
|
13
|
+
const TEMPLATE_TAG = 'ViewManagerAdapter_ExpoBlur_ExpoBlurTargetView';
|
|
14
|
+
|
|
15
|
+
/** Angular twin of `expo-blur`'s `BlurTargetView`, the native target view on Android */
|
|
16
|
+
@Component({
|
|
17
|
+
selector: 'BlurTargetView',
|
|
18
|
+
standalone: true,
|
|
19
|
+
imports: [SymbioteHostPropsDirective],
|
|
20
|
+
schemas: [NO_ERRORS_SCHEMA],
|
|
21
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22
|
+
// Имя тега это нативное имя view, его нельзя собрать динамически
|
|
23
|
+
template: `<ViewManagerAdapter_ExpoBlur_ExpoBlurTargetView
|
|
24
|
+
#host
|
|
25
|
+
[symbioteHostProps]="hostProps"
|
|
26
|
+
>
|
|
27
|
+
<ng-content />
|
|
28
|
+
</ViewManagerAdapter_ExpoBlur_ExpoBlurTargetView>`,
|
|
29
|
+
})
|
|
30
|
+
export class BlurTargetView extends BlurTargetViewBase {
|
|
31
|
+
@ViewChild('host', { read: ElementRef, static: true })
|
|
32
|
+
private readonly hostRef!: ElementRef<unknown>;
|
|
33
|
+
|
|
34
|
+
constructor() {
|
|
35
|
+
super();
|
|
36
|
+
warnIfViewNameIsDynamic(
|
|
37
|
+
TEMPLATE_TAG,
|
|
38
|
+
BLUR_MODULE_NAME,
|
|
39
|
+
'ExpoBlurTargetView',
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
get nativeElement(): unknown {
|
|
44
|
+
return this.hostRef.nativeElement;
|
|
45
|
+
}
|
|
46
|
+
}
|