react-native-theme-transition 1.0.6 → 2.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 +55 -43
- package/README.npm.md +55 -43
- package/dist/constants.d.ts +1 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +4 -0
- package/dist/constants.js.map +1 -1
- package/dist/createThemeTransition.d.ts +6 -18
- package/dist/createThemeTransition.d.ts.map +1 -1
- package/dist/createThemeTransition.js +37 -35
- package/dist/createThemeTransition.js.map +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/overlay/SkiaOverlay.d.ts +17 -0
- package/dist/overlay/SkiaOverlay.d.ts.map +1 -0
- package/dist/overlay/SkiaOverlay.js +297 -0
- package/dist/overlay/SkiaOverlay.js.map +1 -0
- package/dist/overlay/captureView.d.ts +7 -0
- package/dist/overlay/captureView.d.ts.map +1 -0
- package/dist/overlay/captureView.js +31 -0
- package/dist/overlay/captureView.js.map +1 -0
- package/dist/overlay/resolveOrigin.d.ts +8 -0
- package/dist/overlay/resolveOrigin.d.ts.map +1 -0
- package/dist/overlay/resolveOrigin.js +68 -0
- package/dist/overlay/resolveOrigin.js.map +1 -0
- package/dist/overlay/types.d.ts +15 -0
- package/dist/overlay/types.d.ts.map +1 -0
- package/dist/overlay/types.js +61 -0
- package/dist/overlay/types.js.map +1 -0
- package/dist/setThemeDecision.d.ts +14 -0
- package/dist/setThemeDecision.d.ts.map +1 -0
- package/dist/setThemeDecision.js +27 -0
- package/dist/setThemeDecision.js.map +1 -0
- package/dist/transitionEngine.d.ts +48 -17
- package/dist/transitionEngine.d.ts.map +1 -1
- package/dist/transitionEngine.js +279 -208
- package/dist/transitionEngine.js.map +1 -1
- package/dist/transitionMeta.d.ts +136 -0
- package/dist/transitionMeta.d.ts.map +1 -0
- package/dist/transitionMeta.js +131 -0
- package/dist/transitionMeta.js.map +1 -0
- package/dist/types.d.ts +254 -193
- package/dist/types.d.ts.map +1 -1
- package/dist/validateSetThemeOptions.d.ts +15 -0
- package/dist/validateSetThemeOptions.d.ts.map +1 -0
- package/dist/validateSetThemeOptions.js +54 -0
- package/dist/validateSetThemeOptions.js.map +1 -0
- package/package.json +14 -6
- package/src/constants.ts +6 -0
- package/src/createThemeTransition.ts +57 -39
- package/src/index.ts +12 -9
- package/src/overlay/SkiaOverlay.tsx +629 -0
- package/src/overlay/captureView.ts +32 -0
- package/src/overlay/resolveOrigin.ts +81 -0
- package/src/overlay/types.ts +83 -0
- package/src/setThemeDecision.ts +48 -0
- package/src/transitionEngine.tsx +390 -247
- package/src/transitionMeta.ts +176 -0
- package/src/types.ts +272 -193
- package/src/validateSetThemeOptions.ts +76 -0
- package/dist/hooks/useTheme.d.ts +0 -14
- package/dist/hooks/useTheme.d.ts.map +0 -1
- package/dist/hooks/useTheme.js +0 -46
- package/dist/hooks/useTheme.js.map +0 -1
- package/src/hooks/useTheme.ts +0 -72
package/dist/types.d.ts
CHANGED
|
@@ -1,284 +1,345 @@
|
|
|
1
|
+
import type { View } from 'react-native';
|
|
2
|
+
import type { TransitionType } from './transitionMeta';
|
|
1
3
|
/**
|
|
2
|
-
*
|
|
4
|
+
* Supported transition names.
|
|
3
5
|
*
|
|
4
|
-
* @
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* @see https://react-native-theme-transition.vercel.app/docs/types#transitiontype
|
|
7
|
+
*/
|
|
8
|
+
export type { TransitionType };
|
|
9
|
+
/**
|
|
10
|
+
* A flat record of theme tokens. Keys are token names, values are
|
|
11
|
+
* React Native color strings. Every theme in a configuration must
|
|
12
|
+
* declare the same set of keys.
|
|
13
|
+
*
|
|
14
|
+
* @see https://react-native-theme-transition.vercel.app/docs/types#themedefinition
|
|
8
15
|
*/
|
|
9
16
|
export type ThemeDefinition = Record<string, string>;
|
|
10
17
|
/**
|
|
11
|
-
*
|
|
18
|
+
* Explicit origin point for a reveal transition, in React Native
|
|
19
|
+
* density-independent points relative to the provider's root view.
|
|
20
|
+
* Both `x` and `y` must be finite numbers; the engine throws on `NaN`
|
|
21
|
+
* or `Infinity` to prevent silent geometry corruption inside the
|
|
22
|
+
* overlay's bounding-radius math.
|
|
12
23
|
*
|
|
13
|
-
* @
|
|
24
|
+
* @see https://react-native-theme-transition.vercel.app/docs/types#transitionorigin
|
|
14
25
|
*/
|
|
15
|
-
export
|
|
26
|
+
export interface TransitionOrigin {
|
|
27
|
+
/** Horizontal offset from the left edge of the provider, in points. Must be finite. */
|
|
28
|
+
x: number;
|
|
29
|
+
/** Vertical offset from the top edge of the provider, in points. Must be finite. */
|
|
30
|
+
y: number;
|
|
31
|
+
}
|
|
16
32
|
/**
|
|
17
|
-
*
|
|
33
|
+
* Origin for a reveal transition. Either an explicit
|
|
34
|
+
* {@link TransitionOrigin} or a React ref whose center is measured
|
|
35
|
+
* just before the animation starts. A ref that has unmounted or
|
|
36
|
+
* returns no coordinates falls back to the center of the screen.
|
|
18
37
|
*
|
|
19
|
-
* @
|
|
38
|
+
* @see https://react-native-theme-transition.vercel.app/docs/types#originspec
|
|
20
39
|
*/
|
|
40
|
+
export type OriginSpec = TransitionOrigin | React.RefObject<View | null>;
|
|
41
|
+
/** Union of the theme names declared in `T`. */
|
|
42
|
+
export type ThemeNames<T extends Record<string, ThemeDefinition>> = keyof T & string;
|
|
43
|
+
/** Union of the token names shared across every theme in `T`. */
|
|
21
44
|
export type TokenNames<T extends Record<string, ThemeDefinition>> = keyof T[ThemeNames<T>] & string;
|
|
45
|
+
/** Binary OS color scheme. Never `'unspecified'`. */
|
|
46
|
+
export type ColorScheme = 'light' | 'dark';
|
|
22
47
|
/**
|
|
23
|
-
* Maps OS color schemes
|
|
48
|
+
* Maps OS color schemes to theme names. Required when your themes are
|
|
49
|
+
* not literally named `'light'` and `'dark'` and you want to use
|
|
50
|
+
* `initialTheme="system"` or `setTheme('system')`.
|
|
24
51
|
*
|
|
25
|
-
* @
|
|
26
|
-
* Required when your themes are not named `'light'` and `'dark'`.
|
|
27
|
-
* Both keys must be provided.
|
|
28
|
-
*
|
|
29
|
-
* @typeParam Names - Union of theme name strings.
|
|
52
|
+
* @see https://react-native-theme-transition.vercel.app/docs/types#systemthememap
|
|
30
53
|
*/
|
|
31
|
-
export type SystemThemeMap<Names extends string> = Record<
|
|
54
|
+
export type SystemThemeMap<Names extends string> = Record<ColorScheme, Names>;
|
|
32
55
|
/**
|
|
33
56
|
* Configuration for {@link createThemeTransition}.
|
|
34
57
|
*
|
|
35
|
-
* @
|
|
58
|
+
* @see https://react-native-theme-transition.vercel.app/docs/api/create-theme-transition
|
|
36
59
|
*/
|
|
37
60
|
export interface ThemeTransitionConfig<T extends Record<string, ThemeDefinition>> {
|
|
38
61
|
/**
|
|
39
|
-
* All available themes keyed by name.
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* Every theme must share the exact same token keys. Mismatched keys
|
|
43
|
-
* cause a runtime error at initialization.
|
|
44
|
-
* The name `'system'` is reserved and cannot be used as a theme name.
|
|
62
|
+
* All available themes keyed by name. Every theme must share the
|
|
63
|
+
* same token keys; mismatches throw at initialization. The name
|
|
64
|
+
* `'system'` is reserved.
|
|
45
65
|
*/
|
|
46
66
|
themes: T;
|
|
47
67
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
68
|
+
* Whether theme changes animate by default. When `false`, every
|
|
69
|
+
* `setTheme` call switches instantly unless the caller passes
|
|
70
|
+
* `{ animated: true }`.
|
|
71
|
+
*
|
|
72
|
+
* @default true
|
|
50
73
|
*/
|
|
51
|
-
|
|
74
|
+
animated?: boolean;
|
|
52
75
|
/**
|
|
53
|
-
*
|
|
76
|
+
* Default transition kind. Override per call via
|
|
77
|
+
* `setTheme(name, { transition })`.
|
|
54
78
|
*
|
|
55
|
-
* @
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
79
|
+
* @default 'fade'
|
|
80
|
+
*/
|
|
81
|
+
transition?: TransitionType;
|
|
82
|
+
/**
|
|
83
|
+
* Maps OS appearance to your theme names. Required when your themes
|
|
84
|
+
* are not named `'light'` and `'dark'` and you want to use
|
|
85
|
+
* `'system'` mode. Complements
|
|
86
|
+
* {@link ThemeTransitionConfig.darkThemes}.
|
|
59
87
|
*/
|
|
60
88
|
systemThemeMap?: SystemThemeMap<ThemeNames<T>>;
|
|
61
89
|
/**
|
|
62
|
-
* Theme names that
|
|
90
|
+
* Theme names that should register as a dark color scheme with the
|
|
91
|
+
* OS via `Appearance.setColorScheme`. Only needed with two or more
|
|
92
|
+
* dark themes; otherwise derived from
|
|
93
|
+
* {@link ThemeTransitionConfig.systemThemeMap} (or `['dark']` if
|
|
94
|
+
* neither is provided). Must contain at least one entry when
|
|
95
|
+
* supplied; the engine throws on an empty array. Omit the field to
|
|
96
|
+
* fall back to the default.
|
|
63
97
|
*
|
|
64
|
-
* @
|
|
65
|
-
*
|
|
66
|
-
* native UI elements (alerts, date pickers, keyboards) in sync with
|
|
67
|
-
* the active theme. Themes listed here get `'dark'`; all others get `'light'`.
|
|
68
|
-
* In system mode, `'unspecified'` is used so the OS drives the appearance.
|
|
69
|
-
*
|
|
70
|
-
* **Do not call `Appearance.setColorScheme` yourself** — the library manages
|
|
71
|
-
* it internally. Calling it manually can corrupt state on Android.
|
|
72
|
-
*
|
|
73
|
-
* @default `[systemThemeMap.dark]` if `systemThemeMap` is provided, otherwise `['dark']`.
|
|
98
|
+
* @see https://react-native-theme-transition.vercel.app/docs/api/create-theme-transition#darkthemes
|
|
99
|
+
* @throws Error if supplied as an empty array, or if any entry is not a known theme name.
|
|
74
100
|
*/
|
|
75
101
|
darkThemes?: ThemeNames<T>[];
|
|
76
102
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* @remarks
|
|
80
|
-
* Fires for all animated transitions, including system-driven ones.
|
|
81
|
-
* Does not fire for instant switches (`animated: false`).
|
|
103
|
+
* Fires when an animated transition begins, before snapshot capture.
|
|
82
104
|
*
|
|
83
|
-
* @param themeName -
|
|
105
|
+
* @param themeName - Theme becoming active.
|
|
106
|
+
* @see https://react-native-theme-transition.vercel.app/docs/guides/callbacks
|
|
84
107
|
*/
|
|
85
108
|
onTransitionStart?: (themeName: ThemeNames<T>) => void;
|
|
86
109
|
/**
|
|
87
|
-
*
|
|
110
|
+
* Fires after an animated transition completes and the overlay is
|
|
111
|
+
* removed.
|
|
88
112
|
*
|
|
89
|
-
* @
|
|
90
|
-
*
|
|
91
|
-
|
|
113
|
+
* @param themeName - Theme that is now active.
|
|
114
|
+
* @see https://react-native-theme-transition.vercel.app/docs/guides/callbacks
|
|
115
|
+
*/
|
|
116
|
+
onTransitionEnd?: (themeName: ThemeNames<T>) => void;
|
|
117
|
+
/**
|
|
118
|
+
* Fires whenever the active theme changes, regardless of path. The
|
|
119
|
+
* only callback guaranteed to fire on every code path. In `'system'`
|
|
120
|
+
* mode it can fire twice for a single `setTheme` call if the OS
|
|
121
|
+
* appearance changes while the transition is still in flight.
|
|
92
122
|
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
|
|
96
|
-
|
|
123
|
+
* @param themeName - Theme that is now active.
|
|
124
|
+
* @see https://react-native-theme-transition.vercel.app/docs/guides/callbacks
|
|
125
|
+
*/
|
|
126
|
+
onThemeChange?: (themeName: ThemeNames<T>) => void;
|
|
127
|
+
}
|
|
128
|
+
/** Common fields shared by every variant in {@link SetThemeOptions}. */
|
|
129
|
+
interface BaseSetThemeOptions<Names extends string> {
|
|
130
|
+
/**
|
|
131
|
+
* Whether to animate this specific change. `false` switches
|
|
132
|
+
* instantly, with no snapshot or overlay. When omitted, inherits
|
|
133
|
+
* {@link ThemeTransitionConfig.animated} (which itself defaults to
|
|
134
|
+
* `true`).
|
|
135
|
+
*/
|
|
136
|
+
animated?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Duration in milliseconds. Overrides the per-transition default.
|
|
139
|
+
* Must be a non-negative finite number; the engine throws on `NaN`,
|
|
140
|
+
* `Infinity`, or negative values.
|
|
97
141
|
*
|
|
98
|
-
* @
|
|
142
|
+
* @default 350 for `fade`, `circularReveal`, `wipe`, `slide`, `split`; 800 for `heart`, `star`; 750 for `pixelize`, `dissolve`
|
|
143
|
+
* @throws Error if not a non-negative finite number.
|
|
99
144
|
*/
|
|
100
|
-
|
|
145
|
+
duration?: number;
|
|
101
146
|
/**
|
|
102
|
-
*
|
|
147
|
+
* Easing function. Accepts any Reanimated `EasingFunction`, a
|
|
148
|
+
* worklet-safe `(t: number) => number`.
|
|
103
149
|
*
|
|
104
|
-
* @
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
150
|
+
* @default Easing.out(Easing.cubic)
|
|
151
|
+
*/
|
|
152
|
+
easing?: (t: number) => number;
|
|
153
|
+
/**
|
|
154
|
+
* Per-call start callback. Fires after
|
|
155
|
+
* {@link ThemeTransitionConfig.onTransitionStart} and only when the
|
|
156
|
+
* change is animated.
|
|
108
157
|
*
|
|
109
|
-
* @param themeName -
|
|
158
|
+
* @param themeName - Theme becoming active.
|
|
110
159
|
*/
|
|
111
|
-
|
|
160
|
+
onTransitionStart?: (themeName: Names) => void;
|
|
161
|
+
/**
|
|
162
|
+
* Per-call end callback. Fires after
|
|
163
|
+
* {@link ThemeTransitionConfig.onTransitionEnd}. Skipped on
|
|
164
|
+
* capture-failure fallbacks.
|
|
165
|
+
*
|
|
166
|
+
* @param themeName - Theme that is now active.
|
|
167
|
+
*/
|
|
168
|
+
onTransitionEnd?: (themeName: Names) => void;
|
|
112
169
|
}
|
|
113
170
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
* @typeParam Names - Union of theme name strings.
|
|
171
|
+
* Fade. The old snapshot's opacity drops to zero, revealing the new
|
|
172
|
+
* theme. Default transition; the `transition` field can be omitted.
|
|
117
173
|
*/
|
|
118
|
-
|
|
174
|
+
interface FadeVariant {
|
|
175
|
+
transition?: 'fade';
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Reveal. A shape (circle, heart, star) grows from a point,
|
|
179
|
+
* uncovering the new theme.
|
|
180
|
+
*/
|
|
181
|
+
interface RevealVariant {
|
|
182
|
+
transition: 'circularReveal' | 'heart' | 'star';
|
|
119
183
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* @remarks
|
|
123
|
-
* When `false`, the theme switches instantly without capturing a screenshot
|
|
124
|
-
* or showing an overlay.
|
|
125
|
-
*
|
|
126
|
-
* @default true
|
|
184
|
+
* Point or ref where the shape expands from (or shrinks into when
|
|
185
|
+
* `inverted`). Falls back to the center of the screen.
|
|
127
186
|
*/
|
|
128
|
-
|
|
187
|
+
origin?: OriginSpec;
|
|
129
188
|
/**
|
|
130
|
-
*
|
|
189
|
+
* Reverse the direction. The new theme fills the screen and the old
|
|
190
|
+
* theme shrinks inside the shape until it vanishes.
|
|
131
191
|
*
|
|
132
|
-
* @
|
|
133
|
-
|
|
134
|
-
|
|
192
|
+
* @default false
|
|
193
|
+
*/
|
|
194
|
+
inverted?: boolean;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Wipe and slide. Directional reveal; `direction` names where the
|
|
198
|
+
* motion is heading. The new theme always enters from the opposite
|
|
199
|
+
* edge and moves toward `direction`.
|
|
200
|
+
*/
|
|
201
|
+
interface WipeVariant {
|
|
202
|
+
transition: 'wipe' | 'slide';
|
|
203
|
+
/**
|
|
204
|
+
* Cardinal direction the motion is heading.
|
|
135
205
|
*
|
|
136
|
-
* @
|
|
206
|
+
* @default 'right'
|
|
137
207
|
*/
|
|
138
|
-
|
|
208
|
+
direction?: 'left' | 'right' | 'up' | 'down';
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Split. The screen splits in two and each half animates. With
|
|
212
|
+
* `inverted: false` the halves part outward from the centerline like
|
|
213
|
+
* curtains. With `inverted: true` they close inward from the edges
|
|
214
|
+
* like shutters.
|
|
215
|
+
*/
|
|
216
|
+
interface SplitVariant {
|
|
217
|
+
transition: 'split';
|
|
139
218
|
/**
|
|
140
|
-
*
|
|
219
|
+
* How the screen is divided. `'left-right'` splits vertically;
|
|
220
|
+
* `'top-bottom'` splits horizontally.
|
|
141
221
|
*
|
|
142
|
-
* @
|
|
143
|
-
|
|
144
|
-
|
|
222
|
+
* @default 'left-right'
|
|
223
|
+
*/
|
|
224
|
+
mode?: 'left-right' | 'top-bottom';
|
|
225
|
+
/**
|
|
226
|
+
* Reverse the animation. `false` parts outward from the center;
|
|
227
|
+
* `true` closes inward from the edges.
|
|
145
228
|
*
|
|
146
|
-
*
|
|
147
|
-
|
|
148
|
-
|
|
229
|
+
* @default false
|
|
230
|
+
*/
|
|
231
|
+
inverted?: boolean;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Pixelize. Both old and new snapshots crossfade through a shared
|
|
235
|
+
* pixel grid that peaks at the midpoint.
|
|
236
|
+
*/
|
|
237
|
+
interface PixelizeVariant {
|
|
238
|
+
transition: 'pixelize';
|
|
239
|
+
/**
|
|
240
|
+
* Maximum pixel block size in points at the animation's midpoint.
|
|
241
|
+
* Higher values give a chunkier mosaic. Must be a finite number
|
|
242
|
+
* `>= 2`; the engine throws on smaller, `NaN`, or `Infinity` values.
|
|
149
243
|
*
|
|
150
|
-
* @
|
|
244
|
+
* @default 52
|
|
245
|
+
* @throws Error if not a finite number `>= 2`.
|
|
151
246
|
*/
|
|
152
|
-
|
|
247
|
+
blockSize?: number;
|
|
153
248
|
}
|
|
154
249
|
/**
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
* @typeParam Names - Union of theme name strings.
|
|
250
|
+
* Dissolve. The old snapshot disintegrates via a noise threshold; as
|
|
251
|
+
* `progress` rises, more cells turn transparent until the new theme is
|
|
252
|
+
* fully visible.
|
|
159
253
|
*/
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
colors: Record<Tokens, string>;
|
|
163
|
-
/** Name of the currently active theme (resolved, never `'system'`). */
|
|
164
|
-
name: Names;
|
|
254
|
+
interface DissolveVariant {
|
|
255
|
+
transition: 'dissolve';
|
|
165
256
|
/**
|
|
166
|
-
*
|
|
257
|
+
* Noise cell size in points. Higher values give bigger, more
|
|
258
|
+
* visible specks; lower values give finer sand. Must be a finite
|
|
259
|
+
* number `>= 1`; the engine throws on smaller, `NaN`, or `Infinity`
|
|
260
|
+
* values.
|
|
167
261
|
*
|
|
168
|
-
* @
|
|
169
|
-
* @
|
|
170
|
-
* @returns `true` if the theme change was accepted, `false` if rejected
|
|
171
|
-
* (already transitioning or same theme).
|
|
262
|
+
* @default 5
|
|
263
|
+
* @throws Error if not a finite number `>= 1`.
|
|
172
264
|
*/
|
|
173
|
-
|
|
174
|
-
/** `true` while a cross-fade transition overlay is visible. */
|
|
175
|
-
isTransitioning: boolean;
|
|
265
|
+
noiseSize?: number;
|
|
176
266
|
}
|
|
177
267
|
/**
|
|
178
|
-
*
|
|
179
|
-
*
|
|
268
|
+
* Options for {@link UseThemeResult.setTheme}. The `transition` field
|
|
269
|
+
* selects a variant and determines which extra fields are valid for
|
|
270
|
+
* that variant.
|
|
180
271
|
*
|
|
181
|
-
* @
|
|
272
|
+
* @see https://react-native-theme-transition.vercel.app/docs/types#setthemeoptions
|
|
182
273
|
*/
|
|
183
|
-
export
|
|
184
|
-
|
|
185
|
-
|
|
274
|
+
export type SetThemeOptions<Names extends string = string> = BaseSetThemeOptions<Names> & (FadeVariant | RevealVariant | WipeVariant | SplitVariant | PixelizeVariant | DissolveVariant);
|
|
275
|
+
/**
|
|
276
|
+
* Return value of {@link ThemeTransitionAPI.useTheme}. Two orthogonal
|
|
277
|
+
* concepts: `theme` (what is currently painted, always concrete) and
|
|
278
|
+
* `preference` (what the user explicitly picked, can be `'system'`).
|
|
279
|
+
*
|
|
280
|
+
* @see https://react-native-theme-transition.vercel.app/docs/api/use-theme
|
|
281
|
+
*/
|
|
282
|
+
export interface UseThemeResult<Tokens extends string, Names extends string> {
|
|
186
283
|
/**
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
284
|
+
* The theme currently painted on screen. Always a concrete theme,
|
|
285
|
+
* never `'system'`.
|
|
286
|
+
*/
|
|
287
|
+
theme: {
|
|
288
|
+
/** Name of the painted theme. Always concrete. */
|
|
289
|
+
name: Names;
|
|
290
|
+
/** Resolved color tokens for the painted theme. */
|
|
291
|
+
colors: Record<Tokens, string>;
|
|
292
|
+
/**
|
|
293
|
+
* Binary light or dark classification, derived from
|
|
294
|
+
* {@link ThemeTransitionConfig.darkThemes}.
|
|
295
|
+
*/
|
|
296
|
+
scheme: ColorScheme;
|
|
297
|
+
};
|
|
298
|
+
/**
|
|
299
|
+
* The theme the user explicitly picked. May be `'system'`. Mirrors
|
|
300
|
+
* the last argument passed to {@link UseThemeResult.setTheme}.
|
|
301
|
+
*/
|
|
302
|
+
preference: Names | 'system';
|
|
303
|
+
/** `true` while a transition overlay is visible. */
|
|
304
|
+
isTransitioning: boolean;
|
|
305
|
+
/**
|
|
306
|
+
* Change the user's {@link UseThemeResult.preference}.
|
|
194
307
|
*
|
|
195
|
-
* @param
|
|
308
|
+
* @param name - Concrete theme name, or `'system'` to follow the OS.
|
|
309
|
+
* @param options - Per-call transition configuration.
|
|
310
|
+
* @returns `'accepted'` if the change will apply, `'ignored'` if rejected (same preference or transition in flight).
|
|
311
|
+
* @see https://react-native-theme-transition.vercel.app/docs/api/use-theme#settheme
|
|
196
312
|
*/
|
|
197
|
-
|
|
313
|
+
setTheme: (name: Names | 'system', options?: SetThemeOptions<Names>) => 'accepted' | 'ignored';
|
|
198
314
|
}
|
|
199
315
|
/**
|
|
200
316
|
* Public API returned by {@link createThemeTransition}.
|
|
201
317
|
*
|
|
202
|
-
* @
|
|
318
|
+
* @see https://react-native-theme-transition.vercel.app/docs/api/create-theme-transition
|
|
203
319
|
*/
|
|
204
320
|
export interface ThemeTransitionAPI<T extends Record<string, ThemeDefinition>> {
|
|
205
321
|
/**
|
|
206
322
|
* Provider that supplies animated theme colors via context.
|
|
207
323
|
*
|
|
208
|
-
* @
|
|
209
|
-
* Place this as high as possible in the component tree (ideally wrapping
|
|
210
|
-
* navigation) so the screenshot can capture the entire screen.
|
|
324
|
+
* @see https://react-native-theme-transition.vercel.app/docs/api/provider
|
|
211
325
|
*/
|
|
212
|
-
ThemeTransitionProvider:
|
|
326
|
+
ThemeTransitionProvider: (props: {
|
|
327
|
+
/** Your app tree. */
|
|
213
328
|
children: React.ReactNode;
|
|
214
329
|
/**
|
|
215
|
-
* Theme to render on the first frame.
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
* Pass `'system'` to read the OS appearance synchronously (zero-flash)
|
|
219
|
-
* and subscribe to changes. For custom theme names, provide
|
|
220
|
-
* {@link ThemeTransitionConfig.systemThemeMap | systemThemeMap} in the config.
|
|
330
|
+
* Theme to render on the first frame. Read once on mount, like
|
|
331
|
+
* the initializer of `useState`; later changes to this prop are
|
|
332
|
+
* ignored.
|
|
221
333
|
*/
|
|
222
334
|
initialTheme: ThemeNames<T> | 'system';
|
|
223
|
-
}
|
|
335
|
+
}) => React.ReactNode;
|
|
224
336
|
/**
|
|
225
|
-
* Hook
|
|
226
|
-
*
|
|
227
|
-
* @remarks
|
|
228
|
-
* **Without arguments** — returns theme colors, name, `setTheme`, and
|
|
229
|
-
* `isTransitioning`. Use this in any component that reads or changes the theme.
|
|
230
|
-
*
|
|
231
|
-
* **With `{ initialSelection }`** — also returns `selected` and `select` for
|
|
232
|
-
* building theme selection UIs (button groups, toggles, checkmark lists) with
|
|
233
|
-
* transition-safe timing. On iOS (especially 120Hz ProMotion), calling
|
|
234
|
-
* `setTheme` synchronously after a UI state update can cause the screenshot
|
|
235
|
-
* to capture the old state, producing visible flickering. The `select`
|
|
236
|
-
* function handles this automatically by deferring `setTheme` to the next
|
|
237
|
-
* animation frame.
|
|
238
|
-
*
|
|
239
|
-
* `initialSelection` sets the starting value of `selected` (read once, like
|
|
240
|
-
* `useState`). When omitted, defaults to the current theme name from context.
|
|
337
|
+
* Hook that returns the {@link UseThemeResult} for the nearest
|
|
338
|
+
* provider.
|
|
241
339
|
*
|
|
242
|
-
* @throws
|
|
243
|
-
*
|
|
244
|
-
* @example
|
|
245
|
-
* ```tsx
|
|
246
|
-
* // Reading theme colors in any component
|
|
247
|
-
* const { colors, name } = useTheme();
|
|
248
|
-
* ```
|
|
249
|
-
*
|
|
250
|
-
* @example
|
|
251
|
-
* ```tsx
|
|
252
|
-
* // Building a theme selection UI
|
|
253
|
-
* function ThemePicker() {
|
|
254
|
-
* const { selected, select, colors, isTransitioning } = useTheme({ initialSelection: 'system' });
|
|
255
|
-
* return (
|
|
256
|
-
* <View style={{ flexDirection: 'row', gap: 8 }}>
|
|
257
|
-
* {(['system', 'light', 'dark'] as const).map((option) => (
|
|
258
|
-
* <Pressable
|
|
259
|
-
* key={option}
|
|
260
|
-
* onPress={() => select(option)}
|
|
261
|
-
* disabled={isTransitioning}
|
|
262
|
-
* style={{ backgroundColor: option === selected ? colors.primary : 'transparent' }}
|
|
263
|
-
* >
|
|
264
|
-
* <Text>{option}</Text>
|
|
265
|
-
* </Pressable>
|
|
266
|
-
* ))}
|
|
267
|
-
* </View>
|
|
268
|
-
* );
|
|
269
|
-
* }
|
|
270
|
-
* ```
|
|
340
|
+
* @throws Error if called outside a `ThemeTransitionProvider`.
|
|
341
|
+
* @see https://react-native-theme-transition.vercel.app/docs/api/use-theme
|
|
271
342
|
*/
|
|
272
|
-
useTheme:
|
|
273
|
-
/** Returns current theme state and controls. */
|
|
274
|
-
(): UseThemeResult<TokenNames<T>, ThemeNames<T>>;
|
|
275
|
-
/**
|
|
276
|
-
* Returns theme state, controls, and selection tracking with transition-safe timing.
|
|
277
|
-
* @param options.initialSelection - Starting value for `selected`. Defaults to the current theme name.
|
|
278
|
-
*/
|
|
279
|
-
(options: {
|
|
280
|
-
initialSelection?: ThemeNames<T> | 'system';
|
|
281
|
-
}): UseThemeResult<TokenNames<T>, ThemeNames<T>> & ThemeSelectionResult<ThemeNames<T>>;
|
|
282
|
-
};
|
|
343
|
+
useTheme: () => UseThemeResult<TokenNames<T>, ThemeNames<T>>;
|
|
283
344
|
}
|
|
284
345
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEtD;;;;GAIG;AACH,YAAY,EAAE,cAAc,EAAE,CAAA;AAE9B;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAEpD;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uFAAuF;IACvF,CAAC,EAAE,MAAM,CAAA;IACT,oFAAoF;IACpF,CAAC,EAAE,MAAM,CAAA;CACV;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG,gBAAgB,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,CAAA;AAExE,gDAAgD;AAChD,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,IAAI,MAAM,CAAC,GAAG,MAAM,CAAA;AAEpF,iEAAiE;AACjE,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,IAAI,MAAM,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAA;AAEnG,qDAAqD;AACrD,MAAM,MAAM,WAAW,GAAG,OAA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G;IACH,KAAK,EAAE;QACL,kDAAkD;QAClD,IAAI,EAAE,KAAK,CAAA;QACX,mDAAmD;QACnD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAC9B;;;WAGG;QACH,MAAM,EAAE,WAAW,CAAA;KACpB,CAAA;IAED;;;OAGG;IACH,UAAU,EAAE,KAAK,GAAG,QAAQ,CAAA;IAE5B,oDAAoD;IACpD,eAAe,EAAE,OAAO,CAAA;IAExB;;;;;;;OAOG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,EAAE,OAAO,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,UAAU,GAAG,SAAS,CAAA;CAC/F;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC;IAC3E;;;;OAIG;IACH,uBAAuB,EAAE,CAAC,KAAK,EAAE;QAC/B,qBAAqB;QACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;QACzB;;;;WAIG;QACH,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAA;KACvC,KAAK,KAAK,CAAC,SAAS,CAAA;IAErB;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;CAC7D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure runtime validator for the per-call options passed to `setTheme`.
|
|
3
|
+
* Throws a descriptive `Error` if any numeric option falls outside its
|
|
4
|
+
* supported range, so user-visible failure modes (silent NaN propagation
|
|
5
|
+
* into shaders, negative-duration timers, etc.) surface immediately at
|
|
6
|
+
* the call site instead of producing broken animations.
|
|
7
|
+
*
|
|
8
|
+
* Extracted as a pure helper so the bounds can be unit-tested without
|
|
9
|
+
* mounting the provider.
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=validateSetThemeOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateSetThemeOptions.d.ts","sourceRoot":"","sources":["../src/validateSetThemeOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure runtime validator for the per-call options passed to `setTheme`.
|
|
3
|
+
* Throws a descriptive `Error` if any numeric option falls outside its
|
|
4
|
+
* supported range, so user-visible failure modes (silent NaN propagation
|
|
5
|
+
* into shaders, negative-duration timers, etc.) surface immediately at
|
|
6
|
+
* the call site instead of producing broken animations.
|
|
7
|
+
*
|
|
8
|
+
* Extracted as a pure helper so the bounds can be unit-tested without
|
|
9
|
+
* mounting the provider.
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
import { TAG } from './constants';
|
|
15
|
+
import { isOriginRef } from './overlay/resolveOrigin';
|
|
16
|
+
/** @internal */
|
|
17
|
+
function isValidNumber(value) {
|
|
18
|
+
return typeof value === 'number' && Number.isFinite(value);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Throws if any numeric option in `options` is out of range. Returns
|
|
22
|
+
* silently otherwise. Safe to call with `undefined`.
|
|
23
|
+
*
|
|
24
|
+
* @throws Error if any numeric option is `NaN`, `Infinity`, or outside its supported range.
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export function validateSetThemeOptions(options) {
|
|
28
|
+
if (!options)
|
|
29
|
+
return;
|
|
30
|
+
if (options.duration !== undefined) {
|
|
31
|
+
if (!isValidNumber(options.duration) || options.duration < 0) {
|
|
32
|
+
throw new Error(`${TAG} \`duration\` must be a non-negative finite number. Got ${String(options.duration)}.`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (options.blockSize !== undefined) {
|
|
36
|
+
if (!isValidNumber(options.blockSize) || options.blockSize < 2) {
|
|
37
|
+
throw new Error(`${TAG} \`blockSize\` must be a finite number >= 2. Got ${String(options.blockSize)}.`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (options.noiseSize !== undefined) {
|
|
41
|
+
if (!isValidNumber(options.noiseSize) || options.noiseSize < 1) {
|
|
42
|
+
throw new Error(`${TAG} \`noiseSize\` must be a finite number >= 1. Got ${String(options.noiseSize)}.`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
// Refs are validated at measurement time inside `resolveOrigin`,
|
|
46
|
+
// which falls back to the screen center if measurement fails. Only
|
|
47
|
+
// explicit coordinate pairs are checked here.
|
|
48
|
+
if (options.origin && !isOriginRef(options.origin)) {
|
|
49
|
+
if (!isValidNumber(options.origin.x) || !isValidNumber(options.origin.y)) {
|
|
50
|
+
throw new Error(`${TAG} \`origin\` coordinates must be finite numbers. Got {x: ${String(options.origin.x)}, y: ${String(options.origin.y)}}.`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=validateSetThemeOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateSetThemeOptions.js","sourceRoot":"","sources":["../src/validateSetThemeOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAWrD,gBAAgB;AAChB,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC5D,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAuC;IAC7E,IAAI,CAAC,OAAO;QAA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