@symbiote-native/glass-effect 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.
Files changed (78) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +205 -2
  3. package/build/angular/glass/index.android.d.ts +7 -0
  4. package/build/angular/glass/index.android.js +97 -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 +116 -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 +51 -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 +74 -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 +31 -0
  61. package/src/angular/glass/index.ios.ts +61 -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
@@ -0,0 +1,17 @@
1
+ // @symbiote-native/glass-effect/react: компоненты `GlassView` и `GlassContainer` поверх общего ядра
2
+
3
+ export { GlassContainer, GlassView } from './glass-effect';
4
+ export type {
5
+ IGlassContainerReactProps as IGlassContainerProps,
6
+ IGlassViewReactProps as IGlassViewProps,
7
+ } from './glass-effect';
8
+ export {
9
+ GLASS_EFFECT_MODULE_NAME,
10
+ glassContainerName,
11
+ glassViewName,
12
+ isGlassEffectAPIAvailable,
13
+ isLiquidGlassAvailable,
14
+ type IGlassColorScheme,
15
+ type IGlassEffectStyleConfig,
16
+ type IGlassStyle,
17
+ } from '../core';
@@ -0,0 +1,27 @@
1
+ import type { JSX } from 'solid-js';
2
+ import { defineDescriptorComponent } from '@symbiote-native/solid';
3
+ import type { IViewProps } from '@symbiote-native/solid';
4
+ import type { IClassNameValue } from '@symbiote-native/engine';
5
+ import { renderGlassContainer, renderGlassView } from '../core';
6
+ import type { IGlassContainerProps, IGlassViewProps } from '../core';
7
+
8
+ // Поверхность View как у `ViewProps` в upstream, дети и `class` свои у Solid
9
+ export type IGlassViewSolidProps = IGlassViewProps &
10
+ Omit<IViewProps, keyof IGlassViewProps | 'children'> & {
11
+ children?: JSX.Element;
12
+ class?: IClassNameValue;
13
+ };
14
+
15
+ export type IGlassContainerSolidProps = IGlassContainerProps &
16
+ Omit<IViewProps, keyof IGlassContainerProps | 'children'> & {
17
+ children?: JSX.Element;
18
+ class?: IClassNameValue;
19
+ };
20
+
21
+ /** Solid twin of `expo-glass-effect`'s `GlassView`, native on iOS and a plain View elsewhere */
22
+ export const GlassView =
23
+ defineDescriptorComponent<IGlassViewSolidProps>(renderGlassView);
24
+
25
+ /** Solid twin of `expo-glass-effect`'s `GlassContainer`, merges the glass views it holds */
26
+ export const GlassContainer =
27
+ defineDescriptorComponent<IGlassContainerSolidProps>(renderGlassContainer);
@@ -0,0 +1,17 @@
1
+ // @symbiote-native/glass-effect/solid: компоненты `GlassView` и `GlassContainer` поверх общего ядра
2
+
3
+ export { GlassContainer, GlassView } from './glass-effect';
4
+ export type {
5
+ IGlassContainerSolidProps as IGlassContainerProps,
6
+ IGlassViewSolidProps as IGlassViewProps,
7
+ } from './glass-effect';
8
+ export {
9
+ GLASS_EFFECT_MODULE_NAME,
10
+ glassContainerName,
11
+ glassViewName,
12
+ isGlassEffectAPIAvailable,
13
+ isLiquidGlassAvailable,
14
+ type IGlassColorScheme,
15
+ type IGlassEffectStyleConfig,
16
+ type IGlassStyle,
17
+ } from '../core';
@@ -0,0 +1,14 @@
1
+ <script lang="ts">
2
+ import DescriptorHost from '@symbiote-native/svelte/descriptor-host';
3
+ import { renderGlassContainer } from '../core';
4
+ import type { IGlassContainerSvelteProps } from './glass-props';
5
+
6
+ let {
7
+ children,
8
+ ref = $bindable(),
9
+ ...rest
10
+ }: IGlassContainerSvelteProps = $props();
11
+ const descriptor = $derived(renderGlassContainer({ ...rest }));
12
+ </script>
13
+
14
+ <DescriptorHost {descriptor} bind:ref {children} />
@@ -0,0 +1,18 @@
1
+ import type { Snippet } from 'svelte';
2
+ import type { IViewProps } from '@symbiote-native/svelte';
3
+ import type { IGlassContainerProps, IGlassViewProps } from '../core';
4
+
5
+ // Поверхность View как у `ViewProps` в upstream, дети идут сниппетом
6
+ export type IGlassViewSvelteProps = IGlassViewProps &
7
+ Omit<IViewProps, keyof IGlassViewProps | 'children'> & {
8
+ /** Host-ref через `bind:ref` */
9
+ ref?: unknown;
10
+ children?: Snippet;
11
+ };
12
+
13
+ export type IGlassContainerSvelteProps = IGlassContainerProps &
14
+ Omit<IViewProps, keyof IGlassContainerProps | 'children'> & {
15
+ /** Host-ref через `bind:ref` */
16
+ ref?: unknown;
17
+ children?: Snippet;
18
+ };
@@ -0,0 +1,10 @@
1
+ <script lang="ts">
2
+ import DescriptorHost from '@symbiote-native/svelte/descriptor-host';
3
+ import { renderGlassView } from '../core';
4
+ import type { IGlassViewSvelteProps } from './glass-props';
5
+
6
+ let { children, ref = $bindable(), ...rest }: IGlassViewSvelteProps = $props();
7
+ const descriptor = $derived(renderGlassView({ ...rest }));
8
+ </script>
9
+
10
+ <DescriptorHost {descriptor} bind:ref {children} />
@@ -0,0 +1,18 @@
1
+ // @symbiote-native/glass-effect/svelte: компоненты `GlassView` и `GlassContainer` поверх общего ядра
2
+
3
+ export { default as GlassContainer } from './glass-container.svelte';
4
+ export { default as GlassView } from './glass-view.svelte';
5
+ export type {
6
+ IGlassContainerSvelteProps as IGlassContainerProps,
7
+ IGlassViewSvelteProps as IGlassViewProps,
8
+ } from './glass-props';
9
+ export {
10
+ GLASS_EFFECT_MODULE_NAME,
11
+ glassContainerName,
12
+ glassViewName,
13
+ isGlassEffectAPIAvailable,
14
+ isLiquidGlassAvailable,
15
+ type IGlassColorScheme,
16
+ type IGlassEffectStyleConfig,
17
+ type IGlassStyle,
18
+ } from '../core';
@@ -0,0 +1,6 @@
1
+ // Pulls in svelte's ambient global declarations ($state/$effect/...) for this package's tsc
2
+ // program. adapters/svelte gets these for free because render.ts does a real value import from
3
+ // 'svelte' (any file in a program importing a module loads its ambient globals for the whole
4
+ // program); this package has no such import, so a triple-slash reference does the same job
5
+ // explicitly rather than relying on an incidental side-effect.
6
+ /// <reference types="svelte" />
@@ -0,0 +1,6 @@
1
+ // Re-exports the existing harness instead of another copy
2
+ export {
3
+ createSvelteHarness,
4
+ loadComponent,
5
+ type ISvelteHarness,
6
+ } from '../../../sqlite/src/svelte/svelte-compile.test-helper';
@@ -0,0 +1,39 @@
1
+ import { defineComponent, type VNode } from '@vue/runtime-core';
2
+ import { descriptorToVue, normalizeVueAttrs } from '@symbiote-native/vue';
3
+ import type { IViewProps } from '@symbiote-native/vue';
4
+ import { renderGlassContainer, renderGlassView } from '../core';
5
+ import type { IGlassContainerProps, IGlassViewProps } from '../core';
6
+
7
+ // Поверхность View как у `ViewProps` в upstream, дети идут слотом по умолчанию
8
+ export type IGlassViewVueProps = IGlassViewProps &
9
+ Omit<IViewProps, keyof IGlassViewProps>;
10
+
11
+ export type IGlassContainerVueProps = IGlassContainerProps &
12
+ Omit<IViewProps, keyof IGlassContainerProps>;
13
+
14
+ /** Vue twin of `expo-glass-effect`'s `GlassView`, native on iOS and a plain View elsewhere */
15
+ export const GlassView = defineComponent({
16
+ name: 'GlassView',
17
+ // Все атрибуты это пропсы нативного view, на обёртку ничего не должно просочиться
18
+ inheritAttrs: false,
19
+ setup(_props, { attrs, slots }) {
20
+ return (): VNode =>
21
+ descriptorToVue(
22
+ renderGlassView(normalizeVueAttrs(attrs)),
23
+ slots.default?.() ?? [],
24
+ );
25
+ },
26
+ });
27
+
28
+ /** Vue twin of `expo-glass-effect`'s `GlassContainer`, merges the glass views it holds */
29
+ export const GlassContainer = defineComponent({
30
+ name: 'GlassContainer',
31
+ inheritAttrs: false,
32
+ setup(_props, { attrs, slots }) {
33
+ return (): VNode =>
34
+ descriptorToVue(
35
+ renderGlassContainer(normalizeVueAttrs(attrs)),
36
+ slots.default?.() ?? [],
37
+ );
38
+ },
39
+ });
@@ -0,0 +1,17 @@
1
+ // @symbiote-native/glass-effect/vue: компоненты `GlassView` и `GlassContainer` поверх общего ядра
2
+
3
+ export { GlassContainer, GlassView } from './glass-effect';
4
+ export type {
5
+ IGlassContainerVueProps as IGlassContainerProps,
6
+ IGlassViewVueProps as IGlassViewProps,
7
+ } from './glass-effect';
8
+ export {
9
+ GLASS_EFFECT_MODULE_NAME,
10
+ glassContainerName,
11
+ glassViewName,
12
+ isGlassEffectAPIAvailable,
13
+ isLiquidGlassAvailable,
14
+ type IGlassColorScheme,
15
+ type IGlassEffectStyleConfig,
16
+ type IGlassStyle,
17
+ } from '../core';