@symbiote-native/splash-screen 3.1.0 → 4.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.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  A wrapper package for [SymbioteNative](../../README.md) that makes
4
4
  [`react-native-bootsplash`](https://github.com/zoontek/react-native-bootsplash) usable from
5
- **every** adapter — React, Vue, and Angular — not just React. Unlike a native-*view* wrapper
5
+ **every** adapter — React, Vue, Svelte, Solid, and Angular — not just React. Unlike a native-_view_ wrapper
6
6
  (see `@symbiote-native/slider`), bootsplash exposes an imperative TurboModule (`hide`/`isVisible`)
7
7
  plus a React hook (`useHideAnimation`) that composes a fade-out overlay from plain `View`/`Image`
8
8
  primitives — there is no `ViewConfig` to register, only lifecycle to port per adapter.
@@ -26,6 +26,9 @@ src/core/ hide()/isVisible() (re-exported as-is — zero React upstream),
26
26
  react-native-bootsplash's useHideAnimation body, framework-agnostic
27
27
  src/react/ @symbiote-native/splash-screen/react — useHideAnimation hook
28
28
  src/vue/ @symbiote-native/splash-screen/vue — useHideAnimation composable
29
+ src/svelte/ @symbiote-native/splash-screen/svelte — useHideAnimation rune
30
+ src/solid/ @symbiote-native/splash-screen/solid — createHideAnimation primitive (Solid
31
+ reserves `use*` for consuming existing state)
29
32
  src/angular/ @symbiote-native/splash-screen/angular — HideAnimationService (signals)
30
33
  ```
31
34
 
@@ -109,6 +112,25 @@ import { hide } from '@symbiote-native/splash-screen/angular';
109
112
  // call once from the root component's constructor/ngOnInit.
110
113
  ```
111
114
 
115
+ ```svelte
116
+ <!-- Svelte — examples/svelte/App.svelte -->
117
+ <script lang="ts">
118
+ import { hide } from '@symbiote-native/splash-screen/svelte';
119
+
120
+ $effect(() => {
121
+ hide();
122
+ });
123
+ </script>
124
+ ```
125
+
126
+ ```tsx
127
+ // Solid
128
+ import { onMount } from 'solid-js';
129
+ import { hide } from '@symbiote-native/splash-screen/solid';
130
+
131
+ onMount(() => void hide());
132
+ ```
133
+
112
134
  For a fade transition gated on real readiness (layout committed + logo/brand images loaded +
113
135
  your own `ready` flag) instead of an immediate `hide()`, use `useHideAnimation` — it returns the
114
136
  same `{ container, logo, brand }` prop bags upstream's hook does, which you bind onto your own
@@ -128,7 +150,7 @@ const { container, logo } = useHideAnimation({
128
150
  ```
129
151
 
130
152
  See the docs-site package page (`docs/packages/splash-screen`) for the full config surface and
131
- the Vue/Angular equivalents.
153
+ the Vue/Svelte/Solid/Angular equivalents.
132
154
 
133
155
  ## API
134
156
 
@@ -162,14 +184,20 @@ useHideAnimation(config: IHideAnimationConfig): IHideAnimationResult
162
184
  // @symbiote-native/splash-screen/vue — setup runs once, so a getter
163
185
  useHideAnimation(getConfig: () => IHideAnimationConfig): ComputedRef<IHideAnimationResult>
164
186
 
187
+ // @symbiote-native/splash-screen/svelte — the script body runs once, so a getter
188
+ useHideAnimation(getConfig: () => IHideAnimationConfig): { readonly current: IHideAnimationResult }
189
+
190
+ // @symbiote-native/splash-screen/solid — the component body runs once, so an accessor
191
+ createHideAnimation(config: Accessor<IHideAnimationConfig>): Accessor<IHideAnimationResult>
192
+
165
193
  // @symbiote-native/splash-screen/angular — inject(HideAnimationService), connect() once
166
194
  connect(getConfig: () => IHideAnimationConfig): Signal<IHideAnimationResult>
167
195
  ```
168
196
 
169
197
  ## Test it
170
198
 
171
- Headless hook/composable tests live next to each adapter entry
172
- (`src/{react,vue}/{hooks,composables}/use-hide-animation.test.{ts,tsx}`) and mock
199
+ Headless lifecycle-wrapper tests live next to each adapter entry
200
+ (`src/{react,vue,svelte,solid}/{hooks,composables,runes,primitives}/*hide-animation*.test.{ts,tsx}`) and mock
173
201
  `react-native-bootsplash`'s `hide`/`isVisible` plus a fake `__turboModuleProxy` for
174
202
  `getConstants()`, so they run without a real Fabric host. Native asset generation and the
175
203
  Android/iOS wiring above are verified on-device (see the parent [README](../../README.md) for the
@@ -32,7 +32,7 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
32
32
  }
33
33
  return useValue ? value : void 0;
34
34
  };
35
- import { computed, effect, inject, Injectable, Injector } from '@angular/core';
35
+ import { computed, effect, inject, Injectable, Injector, } from '@angular/core';
36
36
  import { computeHideAnimationStyles, HideAnimationController, } from '../../../core/index.js';
37
37
  // Angular twin of React's `useHideAnimation` hook and Vue's `useHideAnimation` composable.
38
38
  // Angular has no per-instance hook, so `connect()` stands in for it: call it ONCE (typically
@@ -64,7 +64,9 @@ let HideAnimationService = (() => {
64
64
  // is a build error, and a splash quietly stuck in light mode would ship unnoticed.
65
65
  connect(getConfig) {
66
66
  const controller = new HideAnimationController(getConfig());
67
- effect(() => controller.updateConfig(getConfig()), { injector: this.injector });
67
+ effect(() => controller.updateConfig(getConfig()), {
68
+ injector: this.injector,
69
+ });
68
70
  return computed(() => computeHideAnimationStyles(getConfig(), controller.constants, controller));
69
71
  }
70
72
  };
@@ -0,0 +1,3 @@
1
+ export { hide, isVisible } from '../core';
2
+ export { createHideAnimation } from './primitives/create-hide-animation';
3
+ export type { IHideAnimationConfig, IHideAnimationFailure, IHideAnimationFailureStage, IHideAnimationResult, IManifest, IHideConfig, } from '../core';
@@ -0,0 +1,8 @@
1
+ // @symbiote-native/splash-screen/solid: the Solid entry over the framework-agnostic core.
2
+ // hide/isVisible carry zero lifecycle and are re-exported verbatim; createHideAnimation wraps
3
+ // HideAnimationController + computeHideAnimationStyles with Solid's own reactivity
4
+ // (primitives/create-hide-animation.ts) — mirrors the lifecycle-bucket naming convention of
5
+ // adapters/solid/src/primitives (never `hooks`/`composables`/`runes`, those are React's, Vue's
6
+ // and Svelte's terms).
7
+ export { hide, isVisible } from '../core/index.js';
8
+ export { createHideAnimation } from './primitives/create-hide-animation.js';
@@ -0,0 +1,3 @@
1
+ import { type Accessor } from 'solid-js';
2
+ import { type IHideAnimationConfig, type IHideAnimationResult } from '../../core';
3
+ export declare function createHideAnimation(config: Accessor<IHideAnimationConfig>): Accessor<IHideAnimationResult>;
@@ -0,0 +1,24 @@
1
+ // Solid lifecycle wiring over the framework-agnostic HideAnimationController + style computation
2
+ // (core/) — the Solid twin of React's useHideAnimation hook, Vue's composable and Svelte's rune.
3
+ //
4
+ // `primitives/` and `create*`, never `hooks/`+`use*`: Solid's ecosystem calls a composable
5
+ // reactive function a PRIMITIVE and reserves `use*` for consuming something that already exists.
6
+ // Full rationale in adapters/solid/src/primitives/create-color-scheme.ts.
7
+ //
8
+ // Takes a config ACCESSOR, not a plain value, and returns one: a Solid component body runs ONCE
9
+ // (like Vue's setup, unlike a React hook re-running every render), so a plain config would freeze
10
+ // at its boot value and `ready` flipping true would never be seen. The effect below re-syncs the
11
+ // controller on every signal the accessor reads, mirroring Vue's watchEffect.
12
+ //
13
+ // The controller stays a plain local, never a signal: only its methods are called. It also carries
14
+ // the native constants, read once in its constructor — so a missing RNBootSplash throws straight
15
+ // out of the primitive body, on purpose.
16
+ import { createEffect, createMemo } from 'solid-js';
17
+ import { computeHideAnimationStyles, HideAnimationController, } from '../../core/index.js';
18
+ export function createHideAnimation(config) {
19
+ const controller = new HideAnimationController(config());
20
+ createEffect(() => {
21
+ controller.updateConfig(config());
22
+ });
23
+ return createMemo(() => computeHideAnimationStyles(config(), controller.constants, controller));
24
+ }
@@ -1,4 +1,4 @@
1
- import { computed, effect, inject, Injectable, Injector } from '@angular/core';
1
+ import { computed, effect, inject, Injectable, Injector, } from '@angular/core';
2
2
  import { computeHideAnimationStyles, HideAnimationController, } from '../../../core';
3
3
  import * as i0 from "@angular/core";
4
4
  // Angular twin of React's `useHideAnimation` hook and Vue's `useHideAnimation` composable.
@@ -18,7 +18,9 @@ export class HideAnimationService {
18
18
  // is a build error, and a splash quietly stuck in light mode would ship unnoticed.
19
19
  connect(getConfig) {
20
20
  const controller = new HideAnimationController(getConfig());
21
- effect(() => controller.updateConfig(getConfig()), { injector: this.injector });
21
+ effect(() => controller.updateConfig(getConfig()), {
22
+ injector: this.injector,
23
+ });
22
24
  return computed(() => computeHideAnimationStyles(getConfig(), controller.constants, controller));
23
25
  }
24
26
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: HideAnimationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/angular/services/hide-animation.service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAe,MAAM,eAAe,CAAC;AAC5F,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,GAGxB,MAAM,eAAe,CAAC;;AAEvB,2FAA2F;AAC3F,6FAA6F;AAC7F,6FAA6F;AAC7F,2FAA2F;AAC3F,EAAE;AACF,wFAAwF;AACxF,gFAAgF;AAEhF,MAAM,OAAO,oBAAoB;IAC/B,2FAA2F;IAC3F,4FAA4F;IAC5F,qFAAqF;IACpE,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE7C,0FAA0F;IAC1F,4FAA4F;IAC5F,mFAAmF;IACnF,OAAO,CAAC,SAAqC;QAC3C,MAAM,UAAU,GAAG,IAAI,uBAAuB,CAAC,SAAS,EAAE,CAAC,CAAC;QAE5D,MAAM,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAEhF,OAAO,QAAQ,CAAC,GAAG,EAAE,CACnB,0BAA0B,CAAC,SAAS,EAAE,EAAE,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,CAC1E,CAAC;IACJ,CAAC;uGAjBU,oBAAoB;2GAApB,oBAAoB,cADP,MAAM;;2FACnB,oBAAoB;kBADhC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/angular/services/hide-animation.service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,MAAM,EACN,MAAM,EACN,UAAU,EACV,QAAQ,GAET,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,GAGxB,MAAM,eAAe,CAAC;;AAEvB,2FAA2F;AAC3F,6FAA6F;AAC7F,6FAA6F;AAC7F,2FAA2F;AAC3F,EAAE;AACF,wFAAwF;AACxF,gFAAgF;AAEhF,MAAM,OAAO,oBAAoB;IAC/B,2FAA2F;IAC3F,4FAA4F;IAC5F,qFAAqF;IACpE,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE7C,0FAA0F;IAC1F,4FAA4F;IAC5F,mFAAmF;IACnF,OAAO,CAAC,SAAqC;QAC3C,MAAM,UAAU,GAAG,IAAI,uBAAuB,CAAC,SAAS,EAAE,CAAC,CAAC;QAE5D,MAAM,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,EAAE;YACjD,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC,GAAG,EAAE,CACnB,0BAA0B,CAAC,SAAS,EAAE,EAAE,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,CAC1E,CAAC;IACJ,CAAC;uGAnBU,oBAAoB;2GAApB,oBAAoB,cADP,MAAM;;2FACnB,oBAAoB;kBADhC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"hide-animation-controller.js","sourceRoot":"","sources":["../../src/core/hide-animation-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAa5D,kFAAkF;AAClF,wFAAwF;AACxF,2FAA2F;AAC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OAAO,EAAE,CAAC;YAClB,CAAC,CAAC;iBACD,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;gBACxB,qFAAqF;gBACrF,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;YAClD,CAAC,CAAC,CAAC;QACP,CAAC;IACH,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"native-module.js","sourceRoot":"","sources":["../../src/core/native-module.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,gFAAgF;AAChF,wFAAwF;AACxF,qFAAqF;AACrF,yFAAyF;AACzF,oFAAoF;AACpF,4DAA4D;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAGnE,MAAM,0BAA0B,GAAG,cAAc,CAAC;AAMlD,kFAAkF;AAClF,EAAE;AACF,gGAAgG;AAChG,gGAAgG;AAChG,4FAA4F;AAC5F,8FAA8F;AAC9F,mGAAmG;AACnG,2EAA2E;AAC3E,EAAE;AACF,0FAA0F;AAC1F,kGAAkG;AAClG,+FAA+F;AAC/F,mFAAmF;AACnF,EAAE;AACF,6FAA6F;AAC7F,mGAAmG;AACnG,kGAAkG;AAClG,gCAAgC;AAChC,MAAM,UAAU,yBAAyB;IACvC,OAAO,wBAAwB,CAAoB,0BAA0B,CAAC,CAAC,YAAY,EAAE,CAAC;AAChG,CAAC"}
1
+ {"version":3,"file":"native-module.js","sourceRoot":"","sources":["../../src/core/native-module.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,gFAAgF;AAChF,wFAAwF;AACxF,qFAAqF;AACrF,yFAAyF;AACzF,oFAAoF;AACpF,4DAA4D;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAGnE,MAAM,0BAA0B,GAAG,cAAc,CAAC;AAMlD,kFAAkF;AAClF,EAAE;AACF,gGAAgG;AAChG,gGAAgG;AAChG,4FAA4F;AAC5F,8FAA8F;AAC9F,mGAAmG;AACnG,2EAA2E;AAC3E,EAAE;AACF,0FAA0F;AAC1F,kGAAkG;AAClG,+FAA+F;AAC/F,mFAAmF;AACnF,EAAE;AACF,6FAA6F;AAC7F,mGAAmG;AACnG,kGAAkG;AAClG,gCAAgC;AAChC,MAAM,UAAU,yBAAyB;IACvC,OAAO,wBAAwB,CAC7B,0BAA0B,CAC3B,CAAC,YAAY,EAAE,CAAC;AACnB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,18 @@
1
1
  {
2
2
  "name": "@symbiote-native/splash-screen",
3
- "version": "3.1.0",
4
- "description": "Third-party splash-screen native module wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, and Angular adapters.",
3
+ "version": "4.0.0",
4
+ "description": "Third-party splash-screen native module wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, Svelte, Solid, and Angular adapters.",
5
+ "keywords": [
6
+ "react-native",
7
+ "symbiote-native",
8
+ "react",
9
+ "vue",
10
+ "svelte",
11
+ "solid",
12
+ "angular",
13
+ "splash-screen",
14
+ "bootsplash"
15
+ ],
5
16
  "license": "MIT",
6
17
  "repository": {
7
18
  "type": "git",
@@ -37,6 +48,10 @@
37
48
  "types": "./build/svelte/index.d.ts",
38
49
  "default": "./build/svelte/index.js"
39
50
  },
51
+ "./solid": {
52
+ "types": "./build/solid/index.d.ts",
53
+ "default": "./build/solid/index.js"
54
+ },
40
55
  "./angular": {
41
56
  "types": "./build-ngc/angular/index.d.ts",
42
57
  "react-native": "./build-ngc/angular/index.js",
@@ -69,20 +84,22 @@
69
84
  "dependencies": {
70
85
  "react-native-bootsplash": "7.3.2",
71
86
  "react-native-is-edge-to-edge": "^1.3.1",
72
- "@symbiote-native/components": "0.4.0"
87
+ "@symbiote-native/components": "1.0.0"
73
88
  },
74
89
  "peerDependencies": {
75
- "@symbiote-native/angular": ">=0.6.2",
76
- "@symbiote-native/engine": ">=0.1.7",
77
- "@symbiote-native/react": ">=0.2.8",
78
- "@symbiote-native/svelte": ">=0.1.0",
79
- "@symbiote-native/vue": ">=0.3.8",
80
90
  "@angular/core": ">=20",
81
91
  "@vue/runtime-core": "^3.5.13",
82
92
  "react": ">=19.0.0",
83
93
  "react-native": ">=0.86",
94
+ "solid-js": ">=1.9.0",
84
95
  "svelte": ">=5.0.0",
85
- "vue": ">=3.5.0"
96
+ "vue": ">=3.5.0",
97
+ "@symbiote-native/angular": "^1.0.0",
98
+ "@symbiote-native/engine": "^0.4.0",
99
+ "@symbiote-native/react": "^1.0.0",
100
+ "@symbiote-native/solid": "^1.0.0",
101
+ "@symbiote-native/svelte": "^1.0.0",
102
+ "@symbiote-native/vue": "^1.0.0"
86
103
  },
87
104
  "peerDependenciesMeta": {
88
105
  "@symbiote-native/angular": {
@@ -91,6 +108,9 @@
91
108
  "@symbiote-native/react": {
92
109
  "optional": true
93
110
  },
111
+ "@symbiote-native/solid": {
112
+ "optional": true
113
+ },
94
114
  "@symbiote-native/svelte": {
95
115
  "optional": true
96
116
  },
@@ -106,6 +126,9 @@
106
126
  "react": {
107
127
  "optional": true
108
128
  },
129
+ "solid-js": {
130
+ "optional": true
131
+ },
109
132
  "svelte": {
110
133
  "optional": true
111
134
  },
@@ -121,14 +144,16 @@
121
144
  "@types/react": "^19.2.0",
122
145
  "@vue/runtime-core": "^3.5.13",
123
146
  "react": "19.2.3",
147
+ "solid-js": "^1.9.14",
124
148
  "svelte": "^5.56.0",
125
149
  "typescript": "~6.0.0",
126
- "@symbiote-native/angular": "0.7.0",
127
- "@symbiote-native/engine": "0.2.0",
128
- "@symbiote-native/react": "0.3.0",
129
- "@symbiote-native/svelte": "0.2.0",
130
- "@symbiote-native/test-utils": "0.1.6",
131
- "@symbiote-native/vue": "0.4.0"
150
+ "@symbiote-native/angular": "1.0.0",
151
+ "@symbiote-native/engine": "0.4.0",
152
+ "@symbiote-native/react": "1.0.0",
153
+ "@symbiote-native/solid": "1.0.0",
154
+ "@symbiote-native/svelte": "1.0.0",
155
+ "@symbiote-native/test-utils": "0.3.0",
156
+ "@symbiote-native/vue": "1.0.0"
132
157
  },
133
158
  "scripts": {
134
159
  "typecheck": "tsc --build",
@@ -1,4 +1,11 @@
1
- import { computed, effect, inject, Injectable, Injector, type Signal } from '@angular/core';
1
+ import {
2
+ computed,
3
+ effect,
4
+ inject,
5
+ Injectable,
6
+ Injector,
7
+ type Signal,
8
+ } from '@angular/core';
2
9
  import {
3
10
  computeHideAnimationStyles,
4
11
  HideAnimationController,
@@ -26,7 +33,9 @@ export class HideAnimationService {
26
33
  connect(getConfig: () => IHideAnimationConfig): Signal<IHideAnimationResult> {
27
34
  const controller = new HideAnimationController(getConfig());
28
35
 
29
- effect(() => controller.updateConfig(getConfig()), { injector: this.injector });
36
+ effect(() => controller.updateConfig(getConfig()), {
37
+ injector: this.injector,
38
+ });
30
39
 
31
40
  return computed(() =>
32
41
  computeHideAnimationStyles(getConfig(), controller.constants, controller),
@@ -1,7 +1,11 @@
1
1
  import { dlog } from '@symbiote-native/engine';
2
2
  import { hide } from './hide';
3
3
  import { getHideAnimationConstants } from './native-module';
4
- import type { IHideAnimationConfig, IHideAnimationConstants, IHideAnimationFailure } from './types';
4
+ import type {
5
+ IHideAnimationConfig,
6
+ IHideAnimationConstants,
7
+ IHideAnimationFailure,
8
+ } from './types';
5
9
 
6
10
  type IReadinessState = {
7
11
  layoutReady: boolean;
@@ -35,7 +39,9 @@ export class HideAnimationController {
35
39
  // dlog is DEBUG-gated, so it is the developer's seam, not the report: config.onError is the
36
40
  // channel the app actually hears about this on.
37
41
  private readonly reportFailure = (failure: IHideAnimationFailure): void => {
38
- dlog(`splash-screen: hide animation degraded at "${failure.stage}": ${String(failure.error)}`);
42
+ dlog(
43
+ `splash-screen: hide animation degraded at "${failure.stage}": ${String(failure.error)}`,
44
+ );
39
45
  this.readiness.onError?.(failure);
40
46
  };
41
47
 
@@ -33,5 +33,7 @@ type IRNBootSplashSpec = {
33
33
  // throw never reaches the app. That is a defect in THAT adapter, tracked separately — it is not a
34
34
  // reason to stop throwing here.
35
35
  export function getHideAnimationConstants(): IHideAnimationConstants {
36
- return getEnforcingNativeModule<IRNBootSplashSpec>(RN_BOOT_SPLASH_MODULE_NAME).getConstants();
36
+ return getEnforcingNativeModule<IRNBootSplashSpec>(
37
+ RN_BOOT_SPLASH_MODULE_NAME,
38
+ ).getConstants();
37
39
  }
package/src/core/types.ts CHANGED
@@ -1,4 +1,7 @@
1
- import type { IImageSourceProp, IResizeMode } from '@symbiote-native/components';
1
+ import type {
2
+ IImageSourceProp,
3
+ IResizeMode,
4
+ } from '@symbiote-native/components';
2
5
  import type { IStyleProp, IViewStyle } from '@symbiote-native/engine';
3
6
 
4
7
  export type IHideConfig = {
@@ -18,7 +18,9 @@ import {
18
18
  type IHideAnimationResult,
19
19
  } from '../../../core';
20
20
 
21
- export function useHideAnimation(config: IHideAnimationConfig): IHideAnimationResult {
21
+ export function useHideAnimation(
22
+ config: IHideAnimationConfig,
23
+ ): IHideAnimationResult {
22
24
  const controllerRef = useRef<HideAnimationController | null>(null);
23
25
  if (controllerRef.current == null) {
24
26
  controllerRef.current = new HideAnimationController(config);
@@ -0,0 +1,17 @@
1
+ // @symbiote-native/splash-screen/solid: the Solid entry over the framework-agnostic core.
2
+ // hide/isVisible carry zero lifecycle and are re-exported verbatim; createHideAnimation wraps
3
+ // HideAnimationController + computeHideAnimationStyles with Solid's own reactivity
4
+ // (primitives/create-hide-animation.ts) — mirrors the lifecycle-bucket naming convention of
5
+ // adapters/solid/src/primitives (never `hooks`/`composables`/`runes`, those are React's, Vue's
6
+ // and Svelte's terms).
7
+
8
+ export { hide, isVisible } from '../core';
9
+ export { createHideAnimation } from './primitives/create-hide-animation';
10
+ export type {
11
+ IHideAnimationConfig,
12
+ IHideAnimationFailure,
13
+ IHideAnimationFailureStage,
14
+ IHideAnimationResult,
15
+ IManifest,
16
+ IHideConfig,
17
+ } from '../core';
@@ -0,0 +1,37 @@
1
+ // Solid lifecycle wiring over the framework-agnostic HideAnimationController + style computation
2
+ // (core/) — the Solid twin of React's useHideAnimation hook, Vue's composable and Svelte's rune.
3
+ //
4
+ // `primitives/` and `create*`, never `hooks/`+`use*`: Solid's ecosystem calls a composable
5
+ // reactive function a PRIMITIVE and reserves `use*` for consuming something that already exists.
6
+ // Full rationale in adapters/solid/src/primitives/create-color-scheme.ts.
7
+ //
8
+ // Takes a config ACCESSOR, not a plain value, and returns one: a Solid component body runs ONCE
9
+ // (like Vue's setup, unlike a React hook re-running every render), so a plain config would freeze
10
+ // at its boot value and `ready` flipping true would never be seen. The effect below re-syncs the
11
+ // controller on every signal the accessor reads, mirroring Vue's watchEffect.
12
+ //
13
+ // The controller stays a plain local, never a signal: only its methods are called. It also carries
14
+ // the native constants, read once in its constructor — so a missing RNBootSplash throws straight
15
+ // out of the primitive body, on purpose.
16
+
17
+ import { createEffect, createMemo, type Accessor } from 'solid-js';
18
+ import {
19
+ computeHideAnimationStyles,
20
+ HideAnimationController,
21
+ type IHideAnimationConfig,
22
+ type IHideAnimationResult,
23
+ } from '../../core';
24
+
25
+ export function createHideAnimation(
26
+ config: Accessor<IHideAnimationConfig>,
27
+ ): Accessor<IHideAnimationResult> {
28
+ const controller = new HideAnimationController(config());
29
+
30
+ createEffect(() => {
31
+ controller.updateConfig(config());
32
+ });
33
+
34
+ return createMemo(() =>
35
+ computeHideAnimationStyles(config(), controller.constants, controller),
36
+ );
37
+ }
@@ -26,7 +26,11 @@ export function useHideAnimation(getConfig: () => IHideAnimationConfig): {
26
26
  $effect(() => {
27
27
  const config = getConfig();
28
28
  controller.updateConfig(config);
29
- result = computeHideAnimationStyles(config, controller.constants, controller);
29
+ result = computeHideAnimationStyles(
30
+ config,
31
+ controller.constants,
32
+ controller,
33
+ );
30
34
  });
31
35
 
32
36
  return {
@@ -26,5 +26,7 @@ export function useHideAnimation(
26
26
  controller.updateConfig(getConfig());
27
27
  });
28
28
 
29
- return computed(() => computeHideAnimationStyles(getConfig(), controller.constants, controller));
29
+ return computed(() =>
30
+ computeHideAnimationStyles(getConfig(), controller.constants, controller),
31
+ );
30
32
  }