@symbiote-native/glass-effect 0.0.0-stage → 0.0.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.
Files changed (78) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +46 -2
  3. package/build/angular/glass/index.android.d.ts +7 -0
  4. package/build/angular/glass/index.android.js +93 -0
  5. package/build/angular/glass/index.d.ts +1 -0
  6. package/build/angular/glass/index.ios.d.ts +9 -0
  7. package/build/angular/glass/index.ios.js +112 -0
  8. package/build/angular/glass/index.js +2 -0
  9. package/build/angular/glass/shared.d.ts +16 -0
  10. package/build/angular/glass/shared.js +121 -0
  11. package/build/angular/index.d.ts +2 -0
  12. package/build/angular/index.js +3 -0
  13. package/build/core/glass-effect.d.ts +62 -0
  14. package/build/core/glass-effect.js +71 -0
  15. package/build/core/index.d.ts +1 -0
  16. package/build/core/index.js +1 -0
  17. package/build/react/glass-effect.d.ts +17 -0
  18. package/build/react/glass-effect.js +14 -0
  19. package/build/react/index.d.ts +3 -0
  20. package/build/react/index.js +3 -0
  21. package/build/solid/glass-effect.d.ts +16 -0
  22. package/build/solid/glass-effect.js +6 -0
  23. package/build/solid/index.d.ts +3 -0
  24. package/build/solid/index.js +3 -0
  25. package/build/svelte/glass-container.svelte +14 -0
  26. package/build/svelte/glass-container.svelte.d.ts +4 -0
  27. package/build/svelte/glass-props.d.ts +13 -0
  28. package/build/svelte/glass-props.js +1 -0
  29. package/build/svelte/glass-view.svelte +10 -0
  30. package/build/svelte/glass-view.svelte.d.ts +4 -0
  31. package/build/svelte/index.d.ts +4 -0
  32. package/build/svelte/index.js +4 -0
  33. package/build/vue/glass-effect.d.ts +9 -0
  34. package/build/vue/glass-effect.js +20 -0
  35. package/build/vue/index.d.ts +3 -0
  36. package/build/vue/index.js +3 -0
  37. package/build-ngc/angular/glass/index.android.d.ts +12 -0
  38. package/build-ngc/angular/glass/index.android.js +43 -0
  39. package/build-ngc/angular/glass/index.android.js.map +1 -0
  40. package/build-ngc/angular/glass/index.d.ts +1 -0
  41. package/build-ngc/angular/glass/index.ios.d.ts +14 -0
  42. package/build-ngc/angular/glass/index.ios.js +66 -0
  43. package/build-ngc/angular/glass/index.ios.js.map +1 -0
  44. package/build-ngc/angular/glass/index.js +3 -0
  45. package/build-ngc/angular/glass/index.js.map +1 -0
  46. package/build-ngc/angular/glass/shared.d.ts +21 -0
  47. package/build-ngc/angular/glass/shared.js +50 -0
  48. package/build-ngc/angular/glass/shared.js.map +1 -0
  49. package/build-ngc/angular/index.d.ts +2 -0
  50. package/build-ngc/angular/index.js +4 -0
  51. package/build-ngc/angular/index.js.map +1 -0
  52. package/build-ngc/core/glass-effect.d.ts +62 -0
  53. package/build-ngc/core/glass-effect.js +72 -0
  54. package/build-ngc/core/glass-effect.js.map +1 -0
  55. package/build-ngc/core/index.d.ts +1 -0
  56. package/build-ngc/core/index.js +2 -0
  57. package/build-ngc/core/index.js.map +1 -0
  58. package/native-link.json +5 -0
  59. package/package.json +145 -3
  60. package/src/angular/glass/index.android.ts +27 -0
  61. package/src/angular/glass/index.ios.ts +57 -0
  62. package/src/angular/glass/index.ts +2 -0
  63. package/src/angular/glass/shared.ts +38 -0
  64. package/src/angular/index.ts +15 -0
  65. package/src/core/glass-effect.ts +160 -0
  66. package/src/core/index.ts +16 -0
  67. package/src/react/glass-effect.ts +34 -0
  68. package/src/react/index.ts +17 -0
  69. package/src/solid/glass-effect.ts +27 -0
  70. package/src/solid/index.ts +17 -0
  71. package/src/svelte/glass-container.svelte +14 -0
  72. package/src/svelte/glass-props.ts +18 -0
  73. package/src/svelte/glass-view.svelte +10 -0
  74. package/src/svelte/index.ts +18 -0
  75. package/src/svelte/svelte-ambient.d.ts +6 -0
  76. package/src/svelte/svelte-compile.test-helper.ts +6 -0
  77. package/src/vue/glass-effect.ts +39 -0
  78. package/src/vue/index.ts +17 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 A. Prokopenko
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,47 @@
1
- # Temporary Holding Version
1
+ # @symbiote-native/glass-effect
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [`expo-glass-effect`](https://docs.expo.dev/versions/latest/sdk/glass-effect/) for **every**
4
+ [SymbioteNative](../../README.md) adapter: React, Vue, Svelte, Solid and Angular. Liquid Glass
5
+ native views on iOS 26, a plain `View` everywhere else.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npx @symbiote-native/cli new my-app --glass-effect # new app
11
+ npx @symbiote-native/cli add --glass-effect # existing app
12
+ ```
13
+
14
+ Manual: `npm install @symbiote-native/glass-effect`, then wire `expo-modules-autolinking` once per
15
+ app. Never install `expo-glass-effect` or the `expo` meta-package yourself.
16
+
17
+ ## Usage
18
+
19
+ ```tsx
20
+ import {
21
+ GlassContainer,
22
+ GlassView,
23
+ isLiquidGlassAvailable,
24
+ } from '@symbiote-native/glass-effect/react';
25
+
26
+ <GlassContainer spacing={8}>
27
+ <GlassView glassEffectStyle="clear" tintColor="rgba(255, 59, 48, 0.7)" isInteractive>
28
+ <Text>Glass</Text>
29
+ </GlassView>
30
+ </GlassContainer>;
31
+ ```
32
+
33
+ Same props on every adapter: `glassEffectStyle` (`regular`, `clear`, `none` or a config with
34
+ `animate`), `tintColor`, `isInteractive`, `colorScheme`, `spacing` on the container, and the View
35
+ surface. Check `isLiquidGlassAvailable()` and `isGlassEffectAPIAvailable()` before relying on the
36
+ effect: some iOS 26 betas lack the API and crash.
37
+
38
+ ## Layout
39
+
40
+ On iOS the native view is the root and the children sit inside it. Elsewhere both components are
41
+ a plain `View` without the glass props. Angular keeps one file set per platform
42
+ (`index.ios.ts`, `index.android.ts`) because a template spells the native tag statically, so an
43
+ `__expo_app_identifier__` suffix makes it warn instead of render.
44
+
45
+ ## Not ported
46
+
47
+ Nothing: the upstream package has no web or Android variant beyond the plain `View`.
@@ -0,0 +1,7 @@
1
+ import { GlassContainerBase, GlassViewBase } from './shared';
2
+ /** Angular twin of `expo-glass-effect`'s `GlassView`, a plain View off iOS */
3
+ export declare class GlassView extends GlassViewBase {
4
+ }
5
+ /** Angular twin of `expo-glass-effect`'s `GlassContainer`, a plain View off iOS */
6
+ export declare class GlassContainer extends GlassContainerBase {
7
+ }
@@ -0,0 +1,93 @@
1
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
3
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
4
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
5
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
6
+ var _, done = false;
7
+ for (var i = decorators.length - 1; i >= 0; i--) {
8
+ var context = {};
9
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
10
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
11
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
12
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
13
+ if (kind === "accessor") {
14
+ if (result === void 0) continue;
15
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
16
+ if (_ = accept(result.get)) descriptor.get = _;
17
+ if (_ = accept(result.set)) descriptor.set = _;
18
+ if (_ = accept(result.init)) initializers.unshift(_);
19
+ }
20
+ else if (_ = accept(result)) {
21
+ if (kind === "field") initializers.unshift(_);
22
+ else descriptor[key] = _;
23
+ }
24
+ }
25
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
26
+ done = true;
27
+ };
28
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
29
+ var useValue = arguments.length > 2;
30
+ for (var i = 0; i < initializers.length; i++) {
31
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
32
+ }
33
+ return useValue ? value : void 0;
34
+ };
35
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
36
+ import { DescriptorHost } from '@symbiote-native/angular';
37
+ import { GlassContainerBase, GlassViewBase } from './shared.js';
38
+ /** Angular twin of `expo-glass-effect`'s `GlassView`, a plain View off iOS */
39
+ let GlassView = (() => {
40
+ let _classDecorators = [Component({
41
+ selector: 'GlassView',
42
+ standalone: true,
43
+ imports: [DescriptorHost],
44
+ changeDetection: ChangeDetectionStrategy.OnPush,
45
+ template: `@if (descriptor; as node) {
46
+ <symbiote-descriptor-host [node]="node"><ng-content /></symbiote-descriptor-host>
47
+ }`,
48
+ })];
49
+ let _classDescriptor;
50
+ let _classExtraInitializers = [];
51
+ let _classThis;
52
+ let _classSuper = GlassViewBase;
53
+ var GlassView = class extends _classSuper {
54
+ static { _classThis = this; }
55
+ static {
56
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
57
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
58
+ GlassView = _classThis = _classDescriptor.value;
59
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
60
+ __runInitializers(_classThis, _classExtraInitializers);
61
+ }
62
+ };
63
+ return GlassView = _classThis;
64
+ })();
65
+ export { GlassView };
66
+ /** Angular twin of `expo-glass-effect`'s `GlassContainer`, a plain View off iOS */
67
+ let GlassContainer = (() => {
68
+ let _classDecorators = [Component({
69
+ selector: 'GlassContainer',
70
+ standalone: true,
71
+ imports: [DescriptorHost],
72
+ changeDetection: ChangeDetectionStrategy.OnPush,
73
+ template: `@if (descriptor; as node) {
74
+ <symbiote-descriptor-host [node]="node"><ng-content /></symbiote-descriptor-host>
75
+ }`,
76
+ })];
77
+ let _classDescriptor;
78
+ let _classExtraInitializers = [];
79
+ let _classThis;
80
+ let _classSuper = GlassContainerBase;
81
+ var GlassContainer = class extends _classSuper {
82
+ static { _classThis = this; }
83
+ static {
84
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
85
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
86
+ GlassContainer = _classThis = _classDescriptor.value;
87
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
88
+ __runInitializers(_classThis, _classExtraInitializers);
89
+ }
90
+ };
91
+ return GlassContainer = _classThis;
92
+ })();
93
+ export { GlassContainer };
@@ -0,0 +1 @@
1
+ export { GlassContainer, GlassView } from './index.ios';
@@ -0,0 +1,9 @@
1
+ import { GlassContainerBase, GlassViewBase } from './shared';
2
+ /** Angular twin of `expo-glass-effect`'s `GlassView`, content goes inside the native view */
3
+ export declare class GlassView extends GlassViewBase {
4
+ constructor();
5
+ }
6
+ /** Angular twin of `expo-glass-effect`'s `GlassContainer`, merges the glass views it holds */
7
+ export declare class GlassContainer extends GlassContainerBase {
8
+ constructor();
9
+ }
@@ -0,0 +1,112 @@
1
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
3
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
4
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
5
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
6
+ var _, done = false;
7
+ for (var i = decorators.length - 1; i >= 0; i--) {
8
+ var context = {};
9
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
10
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
11
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
12
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
13
+ if (kind === "accessor") {
14
+ if (result === void 0) continue;
15
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
16
+ if (_ = accept(result.get)) descriptor.get = _;
17
+ if (_ = accept(result.set)) descriptor.set = _;
18
+ if (_ = accept(result.init)) initializers.unshift(_);
19
+ }
20
+ else if (_ = accept(result)) {
21
+ if (kind === "field") initializers.unshift(_);
22
+ else descriptor[key] = _;
23
+ }
24
+ }
25
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
26
+ done = true;
27
+ };
28
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
29
+ var useValue = arguments.length > 2;
30
+ for (var i = 0; i < initializers.length; i++) {
31
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
32
+ }
33
+ return useValue ? value : void 0;
34
+ };
35
+ import { ChangeDetectionStrategy, Component, NO_ERRORS_SCHEMA, } from '@angular/core';
36
+ import { SymbioteHostPropsDirective } from '@symbiote-native/angular';
37
+ import { warnIfViewNameIsDynamic } from '@symbiote-native/engine';
38
+ import { GLASS_EFFECT_MODULE_NAME } from '../../core/index.js';
39
+ import { GlassContainerBase, GlassViewBase } from './shared.js';
40
+ const VIEW_TAG = 'ViewManagerAdapter_ExpoGlassEffect_GlassView';
41
+ const CONTAINER_TAG = 'ViewManagerAdapter_ExpoGlassEffect_GlassContainer';
42
+ /** Angular twin of `expo-glass-effect`'s `GlassView`, content goes inside the native view */
43
+ let GlassView = (() => {
44
+ let _classDecorators = [Component({
45
+ selector: 'GlassView',
46
+ standalone: true,
47
+ imports: [SymbioteHostPropsDirective],
48
+ schemas: [NO_ERRORS_SCHEMA],
49
+ changeDetection: ChangeDetectionStrategy.OnPush,
50
+ // Имя тега это нативное имя view, его нельзя собрать динамически
51
+ template: `@if (descriptor; as node) {
52
+ <ViewManagerAdapter_ExpoGlassEffect_GlassView [symbioteHostProps]="node.props">
53
+ <ng-content />
54
+ </ViewManagerAdapter_ExpoGlassEffect_GlassView>
55
+ }`,
56
+ })];
57
+ let _classDescriptor;
58
+ let _classExtraInitializers = [];
59
+ let _classThis;
60
+ let _classSuper = GlassViewBase;
61
+ var GlassView = class extends _classSuper {
62
+ static { _classThis = this; }
63
+ static {
64
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
65
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
66
+ GlassView = _classThis = _classDescriptor.value;
67
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
68
+ __runInitializers(_classThis, _classExtraInitializers);
69
+ }
70
+ constructor() {
71
+ super();
72
+ warnIfViewNameIsDynamic(VIEW_TAG, GLASS_EFFECT_MODULE_NAME, 'GlassView');
73
+ }
74
+ };
75
+ return GlassView = _classThis;
76
+ })();
77
+ export { GlassView };
78
+ /** Angular twin of `expo-glass-effect`'s `GlassContainer`, merges the glass views it holds */
79
+ let GlassContainer = (() => {
80
+ let _classDecorators = [Component({
81
+ selector: 'GlassContainer',
82
+ standalone: true,
83
+ imports: [SymbioteHostPropsDirective],
84
+ schemas: [NO_ERRORS_SCHEMA],
85
+ changeDetection: ChangeDetectionStrategy.OnPush,
86
+ template: `@if (descriptor; as node) {
87
+ <ViewManagerAdapter_ExpoGlassEffect_GlassContainer [symbioteHostProps]="node.props">
88
+ <ng-content />
89
+ </ViewManagerAdapter_ExpoGlassEffect_GlassContainer>
90
+ }`,
91
+ })];
92
+ let _classDescriptor;
93
+ let _classExtraInitializers = [];
94
+ let _classThis;
95
+ let _classSuper = GlassContainerBase;
96
+ var GlassContainer = class extends _classSuper {
97
+ static { _classThis = this; }
98
+ static {
99
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
100
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
101
+ GlassContainer = _classThis = _classDescriptor.value;
102
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
103
+ __runInitializers(_classThis, _classExtraInitializers);
104
+ }
105
+ constructor() {
106
+ super();
107
+ warnIfViewNameIsDynamic(CONTAINER_TAG, GLASS_EFFECT_MODULE_NAME, 'GlassContainer');
108
+ }
109
+ };
110
+ return GlassContainer = _classThis;
111
+ })();
112
+ export { GlassContainer };
@@ -0,0 +1,2 @@
1
+ // Базовая точка для headless и tsc, Metro берёт `index.ios` или `index.android`
2
+ export { GlassContainer, GlassView } from './index.ios.js';
@@ -0,0 +1,16 @@
1
+ import { NativeViewBase } from '@symbiote-native/angular';
2
+ import type { IDescriptor } from '@symbiote-native/components';
3
+ import type { IGlassContainerProps, IGlassViewProps } from '../../core';
4
+ export declare abstract class GlassViewBase extends NativeViewBase {
5
+ glassEffectStyle?: IGlassViewProps['glassEffectStyle'];
6
+ tintColor?: IGlassViewProps['tintColor'];
7
+ isInteractive?: IGlassViewProps['isInteractive'];
8
+ colorScheme?: IGlassViewProps['colorScheme'];
9
+ protected readonly propNames: readonly ["glassEffectStyle", "tintColor", "isInteractive", "colorScheme"];
10
+ protected renderView(props: object): IDescriptor;
11
+ }
12
+ export declare abstract class GlassContainerBase extends NativeViewBase {
13
+ spacing?: IGlassContainerProps['spacing'];
14
+ protected readonly propNames: readonly ["spacing"];
15
+ protected renderView(props: object): IDescriptor;
16
+ }
@@ -0,0 +1,121 @@
1
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
3
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
4
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
5
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
6
+ var _, done = false;
7
+ for (var i = decorators.length - 1; i >= 0; i--) {
8
+ var context = {};
9
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
10
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
11
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
12
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
13
+ if (kind === "accessor") {
14
+ if (result === void 0) continue;
15
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
16
+ if (_ = accept(result.get)) descriptor.get = _;
17
+ if (_ = accept(result.set)) descriptor.set = _;
18
+ if (_ = accept(result.init)) initializers.unshift(_);
19
+ }
20
+ else if (_ = accept(result)) {
21
+ if (kind === "field") initializers.unshift(_);
22
+ else descriptor[key] = _;
23
+ }
24
+ }
25
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
26
+ done = true;
27
+ };
28
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
29
+ var useValue = arguments.length > 2;
30
+ for (var i = 0; i < initializers.length; i++) {
31
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
32
+ }
33
+ return useValue ? value : void 0;
34
+ };
35
+ import { Directive, Input } from '@angular/core';
36
+ import { NativeViewBase } from '@symbiote-native/angular';
37
+ import { renderGlassContainer, renderGlassView } from '../../core/index.js';
38
+ // Inputs и сборка дескриптора общие, платформы различаются только шаблоном
39
+ let GlassViewBase = (() => {
40
+ let _classDecorators = [Directive()];
41
+ let _classDescriptor;
42
+ let _classExtraInitializers = [];
43
+ let _classThis;
44
+ let _classSuper = NativeViewBase;
45
+ let _glassEffectStyle_decorators;
46
+ let _glassEffectStyle_initializers = [];
47
+ let _glassEffectStyle_extraInitializers = [];
48
+ let _tintColor_decorators;
49
+ let _tintColor_initializers = [];
50
+ let _tintColor_extraInitializers = [];
51
+ let _isInteractive_decorators;
52
+ let _isInteractive_initializers = [];
53
+ let _isInteractive_extraInitializers = [];
54
+ let _colorScheme_decorators;
55
+ let _colorScheme_initializers = [];
56
+ let _colorScheme_extraInitializers = [];
57
+ var GlassViewBase = class extends _classSuper {
58
+ static { _classThis = this; }
59
+ static {
60
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
61
+ _glassEffectStyle_decorators = [Input()];
62
+ _tintColor_decorators = [Input()];
63
+ _isInteractive_decorators = [Input()];
64
+ _colorScheme_decorators = [Input()];
65
+ __esDecorate(null, null, _glassEffectStyle_decorators, { kind: "field", name: "glassEffectStyle", static: false, private: false, access: { has: obj => "glassEffectStyle" in obj, get: obj => obj.glassEffectStyle, set: (obj, value) => { obj.glassEffectStyle = value; } }, metadata: _metadata }, _glassEffectStyle_initializers, _glassEffectStyle_extraInitializers);
66
+ __esDecorate(null, null, _tintColor_decorators, { kind: "field", name: "tintColor", static: false, private: false, access: { has: obj => "tintColor" in obj, get: obj => obj.tintColor, set: (obj, value) => { obj.tintColor = value; } }, metadata: _metadata }, _tintColor_initializers, _tintColor_extraInitializers);
67
+ __esDecorate(null, null, _isInteractive_decorators, { kind: "field", name: "isInteractive", static: false, private: false, access: { has: obj => "isInteractive" in obj, get: obj => obj.isInteractive, set: (obj, value) => { obj.isInteractive = value; } }, metadata: _metadata }, _isInteractive_initializers, _isInteractive_extraInitializers);
68
+ __esDecorate(null, null, _colorScheme_decorators, { kind: "field", name: "colorScheme", static: false, private: false, access: { has: obj => "colorScheme" in obj, get: obj => obj.colorScheme, set: (obj, value) => { obj.colorScheme = value; } }, metadata: _metadata }, _colorScheme_initializers, _colorScheme_extraInitializers);
69
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
70
+ GlassViewBase = _classThis = _classDescriptor.value;
71
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
72
+ __runInitializers(_classThis, _classExtraInitializers);
73
+ }
74
+ glassEffectStyle = __runInitializers(this, _glassEffectStyle_initializers, void 0);
75
+ tintColor = (__runInitializers(this, _glassEffectStyle_extraInitializers), __runInitializers(this, _tintColor_initializers, void 0));
76
+ isInteractive = (__runInitializers(this, _tintColor_extraInitializers), __runInitializers(this, _isInteractive_initializers, void 0));
77
+ colorScheme = (__runInitializers(this, _isInteractive_extraInitializers), __runInitializers(this, _colorScheme_initializers, void 0));
78
+ propNames = (__runInitializers(this, _colorScheme_extraInitializers), [
79
+ 'glassEffectStyle',
80
+ 'tintColor',
81
+ 'isInteractive',
82
+ 'colorScheme',
83
+ ]);
84
+ renderView(props) {
85
+ return renderGlassView(props);
86
+ }
87
+ };
88
+ return GlassViewBase = _classThis;
89
+ })();
90
+ export { GlassViewBase };
91
+ let GlassContainerBase = (() => {
92
+ let _classDecorators = [Directive()];
93
+ let _classDescriptor;
94
+ let _classExtraInitializers = [];
95
+ let _classThis;
96
+ let _classSuper = NativeViewBase;
97
+ let _spacing_decorators;
98
+ let _spacing_initializers = [];
99
+ let _spacing_extraInitializers = [];
100
+ var GlassContainerBase = class extends _classSuper {
101
+ static { _classThis = this; }
102
+ static {
103
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
104
+ _spacing_decorators = [Input()];
105
+ __esDecorate(null, null, _spacing_decorators, { kind: "field", name: "spacing", static: false, private: false, access: { has: obj => "spacing" in obj, get: obj => obj.spacing, set: (obj, value) => { obj.spacing = value; } }, metadata: _metadata }, _spacing_initializers, _spacing_extraInitializers);
106
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
107
+ GlassContainerBase = _classThis = _classDescriptor.value;
108
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
109
+ __runInitializers(_classThis, _classExtraInitializers);
110
+ }
111
+ spacing = __runInitializers(this, _spacing_initializers, void 0);
112
+ propNames = (__runInitializers(this, _spacing_extraInitializers), [
113
+ 'spacing',
114
+ ]);
115
+ renderView(props) {
116
+ return renderGlassContainer(props);
117
+ }
118
+ };
119
+ return GlassContainerBase = _classThis;
120
+ })();
121
+ export { GlassContainerBase };
@@ -0,0 +1,2 @@
1
+ export { GlassContainer, GlassView } from './glass';
2
+ export { GLASS_EFFECT_MODULE_NAME, glassContainerName, glassViewName, isGlassEffectAPIAvailable, isLiquidGlassAvailable, type IGlassColorScheme, type IGlassContainerProps, type IGlassEffectStyleConfig, type IGlassStyle, type IGlassViewProps, } from '../core';
@@ -0,0 +1,3 @@
1
+ // @symbiote-native/glass-effect/angular: компоненты `GlassView` и `GlassContainer` поверх общего ядра
2
+ export { GlassContainer, GlassView } from './glass';
3
+ export { GLASS_EFFECT_MODULE_NAME, glassContainerName, glassViewName, isGlassEffectAPIAvailable, isLiquidGlassAvailable, } from '../core/index.js';
@@ -0,0 +1,62 @@
1
+ import type { IAccessibilityProps, IAriaProps, IDescriptor, IResponderProps } from '@symbiote-native/components';
2
+ import type { IColorValue, IStyleProp, ISymbioteEvent, IViewStyle } from '@symbiote-native/engine';
3
+ export declare const GLASS_EFFECT_MODULE_NAME = "ExpoGlassEffect";
4
+ export type IGlassStyle = 'clear' | 'regular' | 'none';
5
+ export type IGlassEffectStyleConfig = {
6
+ /** The glass effect style to apply */
7
+ style: IGlassStyle;
8
+ /**
9
+ * Whether to animate the style change
10
+ * @default false
11
+ */
12
+ animate?: boolean;
13
+ /** Duration of the animation in seconds, the system default when omitted */
14
+ animationDuration?: number;
15
+ };
16
+ export type IGlassColorScheme = 'auto' | 'light' | 'dark';
17
+ type IViewSurface = IAccessibilityProps & IAriaProps & IResponderProps & {
18
+ style?: IStyleProp<IViewStyle>;
19
+ testID?: string;
20
+ nativeID?: string;
21
+ onLayout?: (event: ISymbioteEvent) => void;
22
+ };
23
+ export type IGlassViewProps = IViewSurface & {
24
+ /**
25
+ * A style name or a config object that controls the animation
26
+ * @default 'regular'
27
+ */
28
+ glassEffectStyle?: IGlassStyle | IGlassEffectStyleConfig;
29
+ tintColor?: IColorValue;
30
+ /**
31
+ * @default false
32
+ */
33
+ isInteractive?: boolean;
34
+ /**
35
+ * Overrides the system appearance when the app has its own theme toggle
36
+ * @default 'auto'
37
+ */
38
+ colorScheme?: IGlassColorScheme;
39
+ };
40
+ export type IGlassContainerProps = IViewSurface & {
41
+ /** The distance at which glass elements start affecting each other */
42
+ spacing?: number;
43
+ };
44
+ export declare const glassViewName: () => string;
45
+ export declare const glassContainerName: () => string;
46
+ export declare const ensureGlassViewRegistered: () => boolean;
47
+ export declare const ensureGlassContainerRegistered: () => boolean;
48
+ export declare function renderGlassView(props: object): IDescriptor;
49
+ export declare function renderGlassContainer(props: object): IDescriptor;
50
+ /**
51
+ * Whether the app renders with the Liquid Glass design, component availability only
52
+ * Accessibility settings can still limit the effect, see `AccessibilityInfo`
53
+ * @platform ios
54
+ */
55
+ export declare function isLiquidGlassAvailable(): boolean;
56
+ /**
57
+ * Whether the Liquid Glass API exists at runtime, some iOS 26 betas lack it and crash
58
+ * Check before using `GlassView` and `GlassContainer`
59
+ * @platform ios
60
+ */
61
+ export declare function isGlassEffectAPIAvailable(): boolean;
62
+ export {};
@@ -0,0 +1,71 @@
1
+ // Ядро `GlassView` и `GlassContainer`, порт expo-glass-effect, нативное только на iOS
2
+ import { Platform, requireNativeModule, requireNativeViewManager, } from 'expo-modules-core';
3
+ import { el } from '@symbiote-native/components';
4
+ import { defineExpoNativeViews } from '@symbiote-native/engine';
5
+ export const GLASS_EFFECT_MODULE_NAME = 'ExpoGlassEffect';
6
+ const GLASS_VIEW_NAME = 'GlassView';
7
+ const GLASS_CONTAINER_NAME = 'GlassContainer';
8
+ // Эти ключи имеют смысл только у нативного view, у обычного View их быть не должно
9
+ const GLASS_VIEW_KEYS = new Set([
10
+ 'glassEffectStyle',
11
+ 'tintColor',
12
+ 'isInteractive',
13
+ 'colorScheme',
14
+ ]);
15
+ const GLASS_CONTAINER_KEYS = new Set(['spacing']);
16
+ // Регистрация идёт при рендере: побочный эффект барреля теряется в release
17
+ const views = defineExpoNativeViews(requireNativeViewManager, GLASS_EFFECT_MODULE_NAME, { glass: GLASS_VIEW_NAME, container: GLASS_CONTAINER_NAME });
18
+ export const glassViewName = views.glass.name;
19
+ export const glassContainerName = views.container.name;
20
+ export const ensureGlassViewRegistered = views.glass.ensureRegistered;
21
+ export const ensureGlassContainerRegistered = views.container.ensureRegistered;
22
+ function runsOnIos() {
23
+ return Platform.select({ ios: true, default: false });
24
+ }
25
+ function withoutKeys(props, keys) {
26
+ return Object.fromEntries(Object.entries(props).filter(([key]) => !keys.has(key)));
27
+ }
28
+ // `object`, а не тип пропсов: Vue и Angular отдают нетипизированный набор атрибутов
29
+ export function renderGlassView(props) {
30
+ if (!runsOnIos())
31
+ return el('view', withoutKeys(props, GLASS_VIEW_KEYS));
32
+ if (!ensureGlassViewRegistered()) {
33
+ console.warn('GlassView is not available on this platform');
34
+ return el('view', withoutKeys(props, GLASS_VIEW_KEYS));
35
+ }
36
+ return el(glassViewName(), { ...props });
37
+ }
38
+ export function renderGlassContainer(props) {
39
+ if (!runsOnIos()) {
40
+ return el('view', withoutKeys(props, GLASS_CONTAINER_KEYS));
41
+ }
42
+ if (!ensureGlassContainerRegistered()) {
43
+ console.warn('GlassContainer is not available on this platform');
44
+ return el('view', withoutKeys(props, GLASS_CONTAINER_KEYS));
45
+ }
46
+ return el(glassContainerName(), { ...props });
47
+ }
48
+ let isLiquidGlass;
49
+ let isGlassApi;
50
+ /**
51
+ * Whether the app renders with the Liquid Glass design, component availability only
52
+ * Accessibility settings can still limit the effect, see `AccessibilityInfo`
53
+ * @platform ios
54
+ */
55
+ export function isLiquidGlassAvailable() {
56
+ if (!runsOnIos())
57
+ return false;
58
+ isLiquidGlass ??= !!Reflect.get(requireNativeModule(GLASS_EFFECT_MODULE_NAME), 'isLiquidGlassAvailable');
59
+ return isLiquidGlass;
60
+ }
61
+ /**
62
+ * Whether the Liquid Glass API exists at runtime, some iOS 26 betas lack it and crash
63
+ * Check before using `GlassView` and `GlassContainer`
64
+ * @platform ios
65
+ */
66
+ export function isGlassEffectAPIAvailable() {
67
+ if (!runsOnIos())
68
+ return false;
69
+ isGlassApi ??= !!Reflect.get(requireNativeModule(GLASS_EFFECT_MODULE_NAME), 'isGlassEffectAPIAvailable');
70
+ return isGlassApi;
71
+ }
@@ -0,0 +1 @@
1
+ export { GLASS_EFFECT_MODULE_NAME, ensureGlassContainerRegistered, ensureGlassViewRegistered, glassContainerName, glassViewName, isGlassEffectAPIAvailable, isLiquidGlassAvailable, renderGlassContainer, renderGlassView, type IGlassColorScheme, type IGlassContainerProps, type IGlassEffectStyleConfig, type IGlassStyle, type IGlassViewProps, } from './glass-effect';
@@ -0,0 +1 @@
1
+ export { GLASS_EFFECT_MODULE_NAME, ensureGlassContainerRegistered, ensureGlassViewRegistered, glassContainerName, glassViewName, isGlassEffectAPIAvailable, isLiquidGlassAvailable, renderGlassContainer, renderGlassView, } from './glass-effect.js';
@@ -0,0 +1,17 @@
1
+ import type { ReactElement, ReactNode, RefObject } from 'react';
2
+ import type { IHostInstance, IViewProps } from '@symbiote-native/react';
3
+ import type { IGlassContainerProps, IGlassViewProps } from '../core';
4
+ export type IGlassViewReactProps = IGlassViewProps & Omit<IViewProps, keyof IGlassViewProps | 'children' | 'ref'> & {
5
+ ref?: RefObject<IHostInstance | null>;
6
+ children?: ReactNode;
7
+ className?: string;
8
+ };
9
+ export type IGlassContainerReactProps = IGlassContainerProps & Omit<IViewProps, keyof IGlassContainerProps | 'children' | 'ref'> & {
10
+ ref?: RefObject<IHostInstance | null>;
11
+ children?: ReactNode;
12
+ className?: string;
13
+ };
14
+ /** React twin of `expo-glass-effect`'s `GlassView`, native on iOS and a plain View elsewhere */
15
+ export declare function GlassView(props: IGlassViewReactProps): ReactElement;
16
+ /** React twin of `expo-glass-effect`'s `GlassContainer`, merges the glass views it holds */
17
+ export declare function GlassContainer(props: IGlassContainerReactProps): ReactElement;
@@ -0,0 +1,14 @@
1
+ import { createElement } from 'react';
2
+ import { renderGlassContainer, renderGlassView } from '../core/index.js';
3
+ /** React twin of `expo-glass-effect`'s `GlassView`, native on iOS and a plain View elsewhere */
4
+ export function GlassView(props) {
5
+ const { children, ...rest } = props;
6
+ const descriptor = renderGlassView(rest);
7
+ return createElement(descriptor.type, descriptor.props, children);
8
+ }
9
+ /** React twin of `expo-glass-effect`'s `GlassContainer`, merges the glass views it holds */
10
+ export function GlassContainer(props) {
11
+ const { children, ...rest } = props;
12
+ const descriptor = renderGlassContainer(rest);
13
+ return createElement(descriptor.type, descriptor.props, children);
14
+ }
@@ -0,0 +1,3 @@
1
+ export { GlassContainer, GlassView } from './glass-effect';
2
+ export type { IGlassContainerReactProps as IGlassContainerProps, IGlassViewReactProps as IGlassViewProps, } from './glass-effect';
3
+ export { GLASS_EFFECT_MODULE_NAME, glassContainerName, glassViewName, isGlassEffectAPIAvailable, isLiquidGlassAvailable, type IGlassColorScheme, type IGlassEffectStyleConfig, type IGlassStyle, } from '../core';
@@ -0,0 +1,3 @@
1
+ // @symbiote-native/glass-effect/react: компоненты `GlassView` и `GlassContainer` поверх общего ядра
2
+ export { GlassContainer, GlassView } from './glass-effect.js';
3
+ export { GLASS_EFFECT_MODULE_NAME, glassContainerName, glassViewName, isGlassEffectAPIAvailable, isLiquidGlassAvailable, } from '../core/index.js';