@symbiote-native/splash-screen 3.0.3 → 3.2.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 +21 -4
- package/build/angular/index.d.ts +1 -1
- package/build/angular/services/hide-animation.service/index.js +15 -14
- package/build/core/hide-animation-controller.d.ts +3 -1
- package/build/core/hide-animation-controller.js +35 -2
- package/build/core/index.d.ts +1 -1
- package/build/core/native-module.js +18 -0
- package/build/core/types.d.ts +6 -0
- package/build/react/hooks/use-hide-animation/index.js +14 -18
- package/build/react/index.d.ts +1 -1
- package/build/solid/index.d.ts +3 -0
- package/build/solid/index.js +8 -0
- package/build/solid/primitives/create-hide-animation.d.ts +3 -0
- package/build/solid/primitives/create-hide-animation.js +24 -0
- package/build/svelte/index.d.ts +3 -0
- package/build/svelte/index.js +7 -0
- package/build/svelte/runes/use-hide-animation.svelte.d.ts +4 -0
- package/build/svelte/runes/use-hide-animation.svelte.js +24 -0
- package/build/vue/composables/use-hide-animation/index.js +11 -12
- package/build/vue/index.d.ts +1 -1
- package/build-ngc/angular/index.d.ts +1 -1
- package/build-ngc/angular/services/hide-animation.service/index.js +18 -17
- package/build-ngc/angular/services/hide-animation.service/index.js.map +1 -1
- package/build-ngc/core/hide-animation-controller.d.ts +3 -1
- package/build-ngc/core/hide-animation-controller.js +35 -2
- package/build-ngc/core/hide-animation-controller.js.map +1 -1
- package/build-ngc/core/index.d.ts +1 -1
- package/build-ngc/core/native-module.js +18 -0
- package/build-ngc/core/native-module.js.map +1 -1
- package/build-ngc/core/types.d.ts +6 -0
- package/package.json +43 -15
- package/src/angular/index.ts +8 -1
- package/src/angular/services/hide-animation.service/index.ts +23 -14
- package/src/core/hide-animation-controller.ts +45 -3
- package/src/core/index.ts +2 -0
- package/src/core/native-module.ts +21 -1
- package/src/core/types.ts +23 -1
- package/src/react/hooks/use-hide-animation/index.ts +16 -21
- package/src/react/index.ts +8 -1
- package/src/solid/index.ts +17 -0
- package/src/solid/primitives/create-hide-animation.ts +37 -0
- package/src/svelte/index.ts +16 -0
- package/src/svelte/runes/use-hide-animation.svelte.ts +41 -0
- package/src/svelte/svelte-ambient.d.ts +6 -0
- package/src/vue/composables/use-hide-animation/index.ts +12 -12
- package/src/vue/index.ts +8 -1
- package/symbiote-splash-screen.podspec +8 -0
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
// Vue lifecycle wiring over the framework-agnostic HideAnimationController + style
|
|
2
|
-
// computation (core/). A
|
|
3
|
-
//
|
|
4
|
-
// reactivity tracks whatever reactive refs the getter reads
|
|
5
|
-
// watchEffect/computed below on their change, mirroring
|
|
6
|
-
//
|
|
2
|
+
// computation (core/). A composable's setup body runs ONCE (unlike a React hook, which
|
|
3
|
+
// re-runs every render), so this takes a config GETTER, not a plain value — Vue's
|
|
4
|
+
// reactivity tracks whatever reactive refs the getter reads and re-runs the
|
|
5
|
+
// watchEffect/computed below on their change, mirroring a React consumer passing a fresh
|
|
6
|
+
// config object every render.
|
|
7
7
|
//
|
|
8
|
-
// The controller is a plain local, not a Vue ref:
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
8
|
+
// The controller is a plain local, not a Vue ref: only its methods are called, so wrapping
|
|
9
|
+
// it would only add an unnecessary reactive Proxy — same identity discipline as
|
|
10
|
+
// `use-color-scheme.ts`'s subscription handle. It also carries the native constants, read once in
|
|
11
|
+
// its constructor — so a missing RNBootSplash throws straight out of setup, on purpose.
|
|
12
12
|
import { computed, watchEffect, type ComputedRef } from '@vue/runtime-core';
|
|
13
13
|
import {
|
|
14
14
|
computeHideAnimationStyles,
|
|
15
|
-
getHideAnimationConstants,
|
|
16
15
|
HideAnimationController,
|
|
17
16
|
type IHideAnimationConfig,
|
|
18
17
|
type IHideAnimationResult,
|
|
@@ -22,11 +21,12 @@ export function useHideAnimation(
|
|
|
22
21
|
getConfig: () => IHideAnimationConfig,
|
|
23
22
|
): ComputedRef<IHideAnimationResult> {
|
|
24
23
|
const controller = new HideAnimationController(getConfig());
|
|
25
|
-
const constants = getHideAnimationConstants();
|
|
26
24
|
|
|
27
25
|
watchEffect(() => {
|
|
28
26
|
controller.updateConfig(getConfig());
|
|
29
27
|
});
|
|
30
28
|
|
|
31
|
-
return computed(() =>
|
|
29
|
+
return computed(() =>
|
|
30
|
+
computeHideAnimationStyles(getConfig(), controller.constants, controller),
|
|
31
|
+
);
|
|
32
32
|
}
|
package/src/vue/index.ts
CHANGED
|
@@ -6,4 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
export { hide, isVisible } from '../core';
|
|
8
8
|
export { useHideAnimation } from './composables/use-hide-animation';
|
|
9
|
-
export type {
|
|
9
|
+
export type {
|
|
10
|
+
IHideAnimationConfig,
|
|
11
|
+
IHideAnimationFailure,
|
|
12
|
+
IHideAnimationFailureStage,
|
|
13
|
+
IHideAnimationResult,
|
|
14
|
+
IManifest,
|
|
15
|
+
IHideConfig,
|
|
16
|
+
} from '../core';
|
|
@@ -17,6 +17,14 @@ native_splash_screen_root = File.dirname(native_splash_screen_package_json)
|
|
|
17
17
|
# NSClassFromString crash on first launch, not a build error. Fix: vendor (copy) the native iOS
|
|
18
18
|
# sources into a gitignored folder next to this podspec on every `pod install`, and point
|
|
19
19
|
# source_files at that copy (a purely-downward relative pattern).
|
|
20
|
+
#
|
|
21
|
+
# CONSEQUENCE, and it looks like something else entirely: this copy is made at PODSPEC
|
|
22
|
+
# EVALUATION time, i.e. during `pod install` — nothing in package.json regenerates it. So any
|
|
23
|
+
# `npm install` that replaces this package's folder in an example app (the routine
|
|
24
|
+
# pack-a-tarball-and-reinstall loop) deletes `.rn-bootsplash`, and the NEXT iOS build dies with
|
|
25
|
+
# Build input file cannot be found: '.../splash-screen/.rn-bootsplash/ios/RNBootSplash.mm'
|
|
26
|
+
# buried under hundreds of lines of clang argument dumps. It reads like a corrupt install; it is
|
|
27
|
+
# not. Fix: re-run `pod install` in that app's ios/ directory.
|
|
20
28
|
vendored_dir = File.join(__dir__, '.rn-bootsplash')
|
|
21
29
|
|
|
22
30
|
FileUtils.rm_rf(vendored_dir)
|