@adelin-io/cli 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.
- package/README.md +76 -2
- package/authoring-release.json +174 -0
- package/package.json +30 -4
- package/runtime-integrity.json +9 -0
- package/scripts/adelin.mjs +7768 -0
- package/scripts/assemble-checkout.mjs +93 -0
- package/scripts/local-save.mjs +513 -0
- package/scripts/materialize.mjs +319 -0
- package/scripts/runtime.mjs +8950 -0
- package/scripts/typecheck.mjs +72 -0
- package/scripts/workspace-state.mjs +183 -0
- package/skill/README.md +77 -0
- package/skill/SKILL.md +100 -0
- package/skill/authoring/access.md +193 -0
- package/skill/authoring/analytics.md +20 -0
- package/skill/authoring/app-memory.md +128 -0
- package/skill/authoring/app-requirements.md +99 -0
- package/skill/authoring/app-structure.md +265 -0
- package/skill/authoring/assets.md +117 -0
- package/skill/authoring/auth.md +261 -0
- package/skill/authoring/content-binding.md +26 -0
- package/skill/authoring/i18n.md +184 -0
- package/skill/authoring/language.md +503 -0
- package/skill/authoring/local-workflow.md +1665 -0
- package/skill/authoring/offline/connectivity.md +50 -0
- package/skill/authoring/offline/example.md +102 -0
- package/skill/authoring/offline/history-sync.md +39 -0
- package/skill/authoring/offline/index.md +29 -0
- package/skill/authoring/offline/package-storage.md +37 -0
- package/skill/authoring/offline/platforms.md +35 -0
- package/skill/authoring/offline/startup-navigation.md +53 -0
- package/skill/authoring/platform-files.md +616 -0
- package/skill/authoring/player/casting.md +47 -0
- package/skill/authoring/player/controls.md +95 -0
- package/skill/authoring/player/downloads.md +90 -0
- package/skill/authoring/player/drm.md +31 -0
- package/skill/authoring/player/index.md +39 -0
- package/skill/authoring/player/live-dvr.md +33 -0
- package/skill/authoring/player/platforms.md +47 -0
- package/skill/authoring/player/playback.md +42 -0
- package/skill/authoring/player/tracks-subtitles.md +32 -0
- package/skill/authoring/profiles.md +213 -0
- package/skill/authoring/remote-keys.md +139 -0
- package/skill/authoring/search.md +27 -0
- package/skill/authoring/store.md +85 -0
- package/skill/authoring/tv-text-entry.md +146 -0
- package/skill/design/approved/README.md +14 -0
- package/skill/design/approved/vesper-phone-home.jpg +0 -0
- package/skill/design/approved/vesper-tv-detail.jpg +0 -0
- package/skill/design/approved/vesper-tv-home.jpg +0 -0
- package/skill/design/design-guide.md +610 -0
- package/skill/design/edge-to-edge.md +66 -0
- package/skill/design/icons.md +50 -0
- package/skill/design/responsive-layout.md +175 -0
- package/skill/design/safe-area.md +221 -0
- package/skill/design/streaming-playbook.md +131 -0
- package/skill/design/visual-review.md +150 -0
- package/skill/examples/README.md +24 -0
- package/skill/examples/cinema/DESIGN.md +58 -0
- package/skill/examples/cinema/app.tsx +17 -0
- package/skill/examples/cinema/assets/logo.png +0 -0
- package/skill/examples/cinema/components/Action.tsx +40 -0
- package/skill/examples/cinema/components/Action.tv.tsx +44 -0
- package/skill/examples/cinema/components/CatalogGrid.tsx +31 -0
- package/skill/examples/cinema/components/ContinueRail.tsx +98 -0
- package/skill/examples/cinema/components/Feedback.tsx +28 -0
- package/skill/examples/cinema/components/Field.tsx +41 -0
- package/skill/examples/cinema/components/LibraryRail.tsx +46 -0
- package/skill/examples/cinema/components/PlayAction.tsx +29 -0
- package/skill/examples/cinema/components/Root.tsx +59 -0
- package/skill/examples/cinema/components/Shell.tsx +70 -0
- package/skill/examples/cinema/components/Tab.tsx +22 -0
- package/skill/examples/cinema/components/TitleCard.tsx +68 -0
- package/skill/examples/cinema/components/TitleMeta.tsx +36 -0
- package/skill/examples/cinema/locales/en.ts +211 -0
- package/skill/examples/cinema/locales/lt.ts +211 -0
- package/skill/examples/cinema/preview/phone-home.jpg +0 -0
- package/skill/examples/cinema/preview/tv-detail.jpg +0 -0
- package/skill/examples/cinema/preview/tv-home.jpg +0 -0
- package/skill/examples/cinema/screens/portrait/Account.tsx +110 -0
- package/skill/examples/cinema/screens/portrait/Browse.tsx +73 -0
- package/skill/examples/cinema/screens/portrait/Detail.tsx +159 -0
- package/skill/examples/cinema/screens/portrait/Home.tsx +196 -0
- package/skill/examples/cinema/screens/portrait/Player.tsx +299 -0
- package/skill/examples/cinema/screens/portrait/Search.tsx +46 -0
- package/skill/examples/cinema/screens/portrait/Search.tv.tsx +55 -0
- package/skill/examples/cinema/screens/portrait/SignIn.tsx +101 -0
- package/skill/examples/cinema/screens/portrait/SignUp.tsx +106 -0
- package/skill/examples/cinema/store.tsx +132 -0
- package/skill/examples/cinema/theme.ts +32 -0
- package/skill/examples/documentary/DESIGN.md +33 -0
- package/skill/examples/documentary/app.tsx +17 -0
- package/skill/examples/documentary/components/Action.tsx +43 -0
- package/skill/examples/documentary/components/CatalogGrid.tsx +47 -0
- package/skill/examples/documentary/components/Feedback.tsx +27 -0
- package/skill/examples/documentary/components/Field.tsx +33 -0
- package/skill/examples/documentary/components/LibraryRail.tsx +47 -0
- package/skill/examples/documentary/components/Root.tsx +62 -0
- package/skill/examples/documentary/components/Shell.tsx +93 -0
- package/skill/examples/documentary/components/StoryCard.tsx +53 -0
- package/skill/examples/documentary/components/StoryMeta.tsx +22 -0
- package/skill/examples/documentary/preview/phone-home.jpg +0 -0
- package/skill/examples/documentary/preview/tv-detail.jpg +0 -0
- package/skill/examples/documentary/preview/tv-home.jpg +0 -0
- package/skill/examples/documentary/screens/portrait/Account.tsx +97 -0
- package/skill/examples/documentary/screens/portrait/Browse.tsx +71 -0
- package/skill/examples/documentary/screens/portrait/Detail.tsx +133 -0
- package/skill/examples/documentary/screens/portrait/Home.tsx +89 -0
- package/skill/examples/documentary/screens/portrait/Player.tsx +116 -0
- package/skill/examples/documentary/screens/portrait/Search.tsx +48 -0
- package/skill/examples/documentary/screens/portrait/SignIn.tsx +96 -0
- package/skill/examples/documentary/screens/portrait/SignUp.tsx +101 -0
- package/skill/examples/documentary/store.tsx +115 -0
- package/skill/examples/documentary/theme.ts +20 -0
- package/skill/examples/series/DESIGN.md +55 -0
- package/skill/examples/series/app.tsx +17 -0
- package/skill/examples/series/components/Action.tsx +42 -0
- package/skill/examples/series/components/CatalogGrid.tsx +43 -0
- package/skill/examples/series/components/ContinueRail.tsx +78 -0
- package/skill/examples/series/components/Feedback.tsx +26 -0
- package/skill/examples/series/components/Field.tsx +34 -0
- package/skill/examples/series/components/LibraryRail.tsx +38 -0
- package/skill/examples/series/components/OutcomeNote.tsx +28 -0
- package/skill/examples/series/components/PlayAction.tsx +29 -0
- package/skill/examples/series/components/RestoreAction.tsx +33 -0
- package/skill/examples/series/components/Root.tsx +75 -0
- package/skill/examples/series/components/SaveTitle.tsx +34 -0
- package/skill/examples/series/components/Shell.tsx +75 -0
- package/skill/examples/series/components/TitleCard.tsx +62 -0
- package/skill/examples/series/components/UnlockAction.tsx +10 -0
- package/skill/examples/series/preview/phone-home.jpg +0 -0
- package/skill/examples/series/preview/tv-detail.jpg +0 -0
- package/skill/examples/series/preview/tv-home.jpg +0 -0
- package/skill/examples/series/screens/portrait/Account.tsx +125 -0
- package/skill/examples/series/screens/portrait/Browse.tsx +61 -0
- package/skill/examples/series/screens/portrait/Detail.tsx +231 -0
- package/skill/examples/series/screens/portrait/Home.tsx +109 -0
- package/skill/examples/series/screens/portrait/MyList.tsx +44 -0
- package/skill/examples/series/screens/portrait/Plans.tsx +131 -0
- package/skill/examples/series/screens/portrait/Player.tsx +138 -0
- package/skill/examples/series/screens/portrait/Profiles.tsx +103 -0
- package/skill/examples/series/screens/portrait/Search.tsx +50 -0
- package/skill/examples/series/screens/portrait/SignIn.tsx +94 -0
- package/skill/examples/series/screens/portrait/SignUp.tsx +100 -0
- package/skill/examples/series/store.tsx +192 -0
- package/skill/examples/series/theme.ts +32 -0
- package/skill/guides/final-pricing-capabilities.md +13 -0
- package/skill/reference/api.md +842 -0
- package/skill/reference/components.md +1782 -0
- package/skill/reference/packages.md +24 -0
- package/skill/scripts/assemble-checkout.mjs +93 -0
- package/skill/scripts/local-save.mjs +513 -0
- package/skill/scripts/materialize.mjs +319 -0
- package/skill/scripts/workspace-state.mjs +183 -0
- package/types/adelin-access.d.ts +70 -0
- package/types/adelin-analytics.d.ts +5 -0
- package/types/adelin-assets.d.ts +26 -0
- package/types/adelin-auth.d.ts +37 -0
- package/types/adelin-content.d.ts +112 -0
- package/types/adelin-device.d.ts +195 -0
- package/types/adelin-downloads.d.ts +47 -0
- package/types/adelin-env.d.ts +8 -0
- package/types/adelin-globals.d.ts +19 -0
- package/types/adelin-i18n.d.ts +31 -0
- package/types/adelin-native-stack.d.ts +178 -0
- package/types/adelin-navigation.d.ts +264 -0
- package/types/adelin-profiles.d.ts +51 -0
- package/types/adelin-react.d.ts +49 -0
- package/types/adelin-reanimated.d.ts +376 -0
- package/types/adelin-storage.d.ts +9 -0
- package/types/adelin-store.d.ts +74 -0
- package/types/adelin-ui.d.ts +1518 -0
- package/types/adelin-utils.d.ts +7 -0
- package/types/adelin-worklets.d.ts +15 -0
- package/workspace-tsconfig.json +53 -0
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
// AUTO-GENERATED by descriptor-dialect generate-catalog.ts — DO NOT EDIT.
|
|
2
|
+
// Regenerate with `pnpm --filter @adelin/descriptor-dialect generate:catalog`.
|
|
3
|
+
|
|
4
|
+
declare module "@adelin/reanimated" {
|
|
5
|
+
import type { ImageProps, ImageStyle, ReactNode, ScrollViewProps, StyleProp, TextProps, TextStyle, ViewProps, ViewStyle } from "@adelin/ui";
|
|
6
|
+
/** A value animated off the JavaScript thread: read and write `.value`, or `.get()` / `.set(v)`. */
|
|
7
|
+
export interface SharedValue<T> {
|
|
8
|
+
value: T;
|
|
9
|
+
get(): T;
|
|
10
|
+
set(value: T | ((value: T) => T)): void;
|
|
11
|
+
/** Changes the value in place on the UI thread; the modifier must start with 'worklet'. */
|
|
12
|
+
modify(modifier?: (value: T) => T, forceUpdate?: boolean): void;
|
|
13
|
+
}
|
|
14
|
+
/** A shared value computed by useDerivedValue; read it, never assign it. */
|
|
15
|
+
export interface DerivedValue<T> {
|
|
16
|
+
readonly value: T;
|
|
17
|
+
get(): T;
|
|
18
|
+
}
|
|
19
|
+
export type AnimatableValue = number | string | number[];
|
|
20
|
+
/** Runs on the animation thread when an animation ends; `finished` is false when it was cancelled. */
|
|
21
|
+
export type AnimationCallback = (finished?: boolean, current?: AnimatableValue) => void;
|
|
22
|
+
/** What useAnimatedStyle returns; only the style of an Animated component takes it. */
|
|
23
|
+
export type AnimatedStyle = { readonly __adelinAnimatedStyle: true };
|
|
24
|
+
export type AnimatedStyleProp<S> = StyleProp<S | AnimatedStyle>;
|
|
25
|
+
/** A ref from useAnimatedRef, passed as `ref` to an Animated component. */
|
|
26
|
+
export interface AnimatedRef<T = unknown> {
|
|
27
|
+
readonly current: T | null;
|
|
28
|
+
}
|
|
29
|
+
/** Props every Animated component takes on top of its base component's. */
|
|
30
|
+
export type AnimatedComponentProps<P, S> = Omit<P, "style"> & {
|
|
31
|
+
style?: AnimatedStyleProp<S>;
|
|
32
|
+
animatedProps?: Partial<P>;
|
|
33
|
+
entering?: LayoutAnimation;
|
|
34
|
+
exiting?: LayoutAnimation;
|
|
35
|
+
layout?: LayoutAnimation;
|
|
36
|
+
ref?: AnimatedRef<unknown>;
|
|
37
|
+
};
|
|
38
|
+
export type AnimatedScrollViewProps = AnimatedComponentProps<Omit<ScrollViewProps, "onScroll">, ViewStyle> & {
|
|
39
|
+
onScroll?: ScrollHandlerProcessed | ScrollViewProps["onScroll"];
|
|
40
|
+
};
|
|
41
|
+
export function createAnimatedComponent<P extends object>(component: (props: P) => ReactNode): (props: AnimatedComponentProps<P, ViewStyle | TextStyle>) => ReactNode;
|
|
42
|
+
const Animated: {
|
|
43
|
+
View: (props: AnimatedComponentProps<ViewProps, ViewStyle>) => ReactNode;
|
|
44
|
+
Text: (props: AnimatedComponentProps<TextProps, TextStyle>) => ReactNode;
|
|
45
|
+
Image: (props: AnimatedComponentProps<ImageProps, ImageStyle>) => ReactNode;
|
|
46
|
+
ScrollView: (props: AnimatedScrollViewProps) => ReactNode;
|
|
47
|
+
createAnimatedComponent: typeof createAnimatedComponent;
|
|
48
|
+
/** @deprecated Does nothing in Reanimated 4; delete the call. */
|
|
49
|
+
addWhitelistedNativeProps(props: Record<string, boolean>): void;
|
|
50
|
+
/** @deprecated Does nothing in Reanimated 4; delete the call. */
|
|
51
|
+
addWhitelistedUIProps(props: Record<string, boolean>): void;
|
|
52
|
+
};
|
|
53
|
+
export default Animated;
|
|
54
|
+
// --- Shared values ---
|
|
55
|
+
export function useSharedValue<T>(initialValue: T): SharedValue<T>;
|
|
56
|
+
/** A shared value created outside any component; its starting value must be fixed. */
|
|
57
|
+
export function makeMutable<T>(initialValue: T): SharedValue<T>;
|
|
58
|
+
export function isSharedValue<T = unknown>(value: unknown): value is SharedValue<T>;
|
|
59
|
+
/** The updater is a worklet; it may call helpers that start with 'worklet'. */
|
|
60
|
+
export function useAnimatedStyle(updater: () => Record<string, unknown>, deps?: readonly unknown[]): AnimatedStyle;
|
|
61
|
+
export function useDerivedValue<T>(updater: () => T, deps?: readonly unknown[]): DerivedValue<T>;
|
|
62
|
+
export function useAnimatedReaction<T>(prepare: () => T, react: (current: T, previous: T | null) => void, deps?: readonly unknown[]): void;
|
|
63
|
+
/** A worklet that may change the props object the updater returned, before it is applied. */
|
|
64
|
+
export type AnimatedPropsAdapter = (props: Record<string, unknown>) => void;
|
|
65
|
+
export function useAnimatedProps<T extends object>(
|
|
66
|
+
updater: () => Partial<T>,
|
|
67
|
+
deps?: readonly unknown[] | null,
|
|
68
|
+
adapters?: AnimatedPropsAdapter | AnimatedPropsAdapter[] | null,
|
|
69
|
+
): Partial<T>;
|
|
70
|
+
/** @deprecated Pass the adapter function itself to useAnimatedProps. */
|
|
71
|
+
export function createAnimatedPropAdapter(adapter: AnimatedPropsAdapter, nativeProps?: string[]): AnimatedPropsAdapter;
|
|
72
|
+
/** @deprecated Use scheduleOnRN from @adelin/worklets. */
|
|
73
|
+
export function runOnJS<Args extends unknown[], R>(fn: (...args: Args) => R): (...args: Args) => void;
|
|
74
|
+
/** @deprecated Use scheduleOnUI from @adelin/worklets. */
|
|
75
|
+
export function runOnUI<Args extends unknown[], R>(worklet: (...args: Args) => R): (...args: Args) => void;
|
|
76
|
+
// --- Animations ---
|
|
77
|
+
/** A curve for withTiming: an Easing member, or a worklet of progress from 0 to 1. */
|
|
78
|
+
export type EasingFunction = (t: number) => number;
|
|
79
|
+
export type EasingFunctionFactory = { factory: () => EasingFunction };
|
|
80
|
+
export const Easing: {
|
|
81
|
+
linear: EasingFunction;
|
|
82
|
+
ease: EasingFunction;
|
|
83
|
+
quad: EasingFunction;
|
|
84
|
+
cubic: EasingFunction;
|
|
85
|
+
sin: EasingFunction;
|
|
86
|
+
circle: EasingFunction;
|
|
87
|
+
exp: EasingFunction;
|
|
88
|
+
bounce: EasingFunction;
|
|
89
|
+
poly(n: number): EasingFunction;
|
|
90
|
+
elastic(bounciness?: number): EasingFunction;
|
|
91
|
+
back(s?: number): EasingFunction;
|
|
92
|
+
bezier(x1: number, y1: number, x2: number, y2: number): EasingFunctionFactory;
|
|
93
|
+
bezierFn(x1: number, y1: number, x2: number, y2: number): EasingFunction;
|
|
94
|
+
steps(n?: number, roundToNextStep?: boolean): EasingFunction;
|
|
95
|
+
in(easing: EasingFunction): EasingFunction;
|
|
96
|
+
out(easing: EasingFunction): EasingFunction;
|
|
97
|
+
inOut(easing: EasingFunction): EasingFunction;
|
|
98
|
+
};
|
|
99
|
+
/** How an animation treats the device's reduce-motion setting. */
|
|
100
|
+
export const ReduceMotion: { readonly System: "system"; readonly Always: "always"; readonly Never: "never" };
|
|
101
|
+
export type ReduceMotion = "system" | "always" | "never";
|
|
102
|
+
export interface WithTimingConfig {
|
|
103
|
+
duration?: number;
|
|
104
|
+
easing?: EasingFunction | EasingFunctionFactory;
|
|
105
|
+
reduceMotion?: ReduceMotion;
|
|
106
|
+
}
|
|
107
|
+
export interface WithSpringConfig {
|
|
108
|
+
duration?: number;
|
|
109
|
+
dampingRatio?: number;
|
|
110
|
+
damping?: number;
|
|
111
|
+
stiffness?: number;
|
|
112
|
+
mass?: number;
|
|
113
|
+
velocity?: number;
|
|
114
|
+
overshootClamping?: boolean;
|
|
115
|
+
energyThreshold?: number;
|
|
116
|
+
clamp?: { min?: number; max?: number };
|
|
117
|
+
reduceMotion?: ReduceMotion;
|
|
118
|
+
}
|
|
119
|
+
/** Animations are assigned to a shared value's `.value`, returned from an animated style, or nested in one another. */
|
|
120
|
+
export function withTiming<T extends AnimatableValue>(toValue: T, config?: WithTimingConfig, callback?: AnimationCallback): T;
|
|
121
|
+
export function withSpring<T extends AnimatableValue>(toValue: T, config?: WithSpringConfig, callback?: AnimationCallback): T;
|
|
122
|
+
export function withDelay<T>(delayMs: number, animation: T, reduceMotion?: ReduceMotion): T;
|
|
123
|
+
export function withSequence<T>(reduceMotion: ReduceMotion, ...animations: [T, ...T[]]): T;
|
|
124
|
+
export function withSequence<T>(...animations: [T, ...T[]]): T;
|
|
125
|
+
/** A count of 0 or less runs forever; `reverse` alternates direction. */
|
|
126
|
+
export function withRepeat<T>(animation: T, numberOfReps?: number, reverse?: boolean, callback?: AnimationCallback, reduceMotion?: ReduceMotion): T;
|
|
127
|
+
export function withClamp<T extends number | string>(config: { min?: T; max?: T }, animation: T): T;
|
|
128
|
+
export function cancelAnimation<T>(sharedValue: SharedValue<T>): void;
|
|
129
|
+
export const Reanimated3DefaultSpringConfig: { readonly damping: 10; readonly mass: 1; readonly stiffness: 100 };
|
|
130
|
+
export const Reanimated3DefaultSpringConfigWithDuration: { readonly duration: 1333; readonly dampingRatio: 0.5 };
|
|
131
|
+
export const WigglySpringConfig: { readonly damping: 90; readonly mass: 4; readonly stiffness: 900 };
|
|
132
|
+
export const WigglySpringConfigWithDuration: { readonly duration: 550; readonly dampingRatio: 0.75 };
|
|
133
|
+
export const GentleSpringConfig: { readonly damping: 120; readonly mass: 4; readonly stiffness: 900 };
|
|
134
|
+
export const GentleSpringConfigWithDuration: { readonly duration: 550; readonly dampingRatio: 1 };
|
|
135
|
+
export const SnappySpringConfig: { readonly damping: 110; readonly mass: 4; readonly stiffness: 900; readonly overshootClamping: true };
|
|
136
|
+
export const SnappySpringConfigWithDuration: { readonly duration: 550; readonly dampingRatio: 0.92; readonly overshootClamping: true };
|
|
137
|
+
// --- Interpolation ---
|
|
138
|
+
export const Extrapolation: { readonly CLAMP: "clamp"; readonly EXTEND: "extend"; readonly IDENTITY: "identity" };
|
|
139
|
+
export type Extrapolation = "clamp" | "extend" | "identity";
|
|
140
|
+
/** @deprecated Use Extrapolation. */
|
|
141
|
+
export const Extrapolate: { readonly CLAMP: "clamp"; readonly EXTEND: "extend"; readonly IDENTITY: "identity" };
|
|
142
|
+
/** Ranges are written in place, the same length and at least two items. */
|
|
143
|
+
export interface ExtrapolationConfig { extrapolateLeft?: Extrapolation; extrapolateRight?: Extrapolation }
|
|
144
|
+
export function interpolate(value: number, inputRange: readonly number[], outputRange: readonly number[], extrapolation?: Extrapolation | ExtrapolationConfig): number;
|
|
145
|
+
export interface InterpolationOptions { gamma?: number; useCorrectedHSVInterpolation?: boolean }
|
|
146
|
+
export function interpolateColor(value: number, inputRange: readonly number[], outputRange: readonly string[], colorSpace?: "RGB" | "HSV" | "LAB", options?: InterpolationOptions): string;
|
|
147
|
+
export function clamp(value: number, min: number, max: number): number;
|
|
148
|
+
/** "white" or "black", whichever has the greater contrast on `color`. */
|
|
149
|
+
export function contrastColor(color: string | number): "white" | "black";
|
|
150
|
+
/** `color` as `[r, g, b, a]`, each from 0 to 1. */
|
|
151
|
+
export function convertToRGBA(color: unknown): [number, number, number, number];
|
|
152
|
+
/** True for a string Reanimated reads as a colour. */
|
|
153
|
+
export function isColor(value: unknown): value is string;
|
|
154
|
+
// --- Entering, exiting and layout animations ---
|
|
155
|
+
interface BuilderBase<Self> {
|
|
156
|
+
duration(durationMs: number): Self;
|
|
157
|
+
delay(delayMs: number): Self;
|
|
158
|
+
withCallback(callback: (finished: boolean) => void): Self;
|
|
159
|
+
reduceMotion(reduceMotion: ReduceMotion): Self;
|
|
160
|
+
/** @deprecated Use .delay(…) with Math.random(). */
|
|
161
|
+
randomDelay(): Self;
|
|
162
|
+
}
|
|
163
|
+
interface ConfigBuilder<Self> extends BuilderBase<Self> {
|
|
164
|
+
easing(easing: EasingFunction | EasingFunctionFactory): Self;
|
|
165
|
+
rotate(degree: string): Self;
|
|
166
|
+
springify(durationMs?: number): Self;
|
|
167
|
+
dampingRatio(value: number): Self;
|
|
168
|
+
damping(value: number): Self;
|
|
169
|
+
mass(value: number): Self;
|
|
170
|
+
stiffness(value: number): Self;
|
|
171
|
+
overshootClamping(value: boolean): Self;
|
|
172
|
+
energyThreshold(value: number): Self;
|
|
173
|
+
/** @deprecated Use .energyThreshold(…). */
|
|
174
|
+
restDisplacementThreshold(value: number): Self;
|
|
175
|
+
/** @deprecated Use .energyThreshold(…). */
|
|
176
|
+
restSpeedThreshold(value: number): Self;
|
|
177
|
+
}
|
|
178
|
+
/** A ready-made entering or exiting animation such as FadeIn; chain settings: FadeIn.duration(300).springify(). */
|
|
179
|
+
export interface EntryExitAnimation extends ConfigBuilder<EntryExitAnimation> {
|
|
180
|
+
withInitialValues(values: Record<string, unknown>): EntryExitAnimation;
|
|
181
|
+
withTargetValues(values: Record<string, unknown>): EntryExitAnimation;
|
|
182
|
+
}
|
|
183
|
+
export interface LinearTransitionAnimation extends ConfigBuilder<LinearTransitionAnimation> {}
|
|
184
|
+
export interface SimpleTransitionAnimation extends BuilderBase<SimpleTransitionAnimation> {}
|
|
185
|
+
export interface SequencedTransitionAnimation extends BuilderBase<SequencedTransitionAnimation> {
|
|
186
|
+
reverse(): SequencedTransitionAnimation;
|
|
187
|
+
}
|
|
188
|
+
export interface CurvedTransitionAnimation extends BuilderBase<CurvedTransitionAnimation> {
|
|
189
|
+
easingX(easing: EasingFunction | EasingFunctionFactory): CurvedTransitionAnimation;
|
|
190
|
+
easingY(easing: EasingFunction | EasingFunctionFactory): CurvedTransitionAnimation;
|
|
191
|
+
easingWidth(easing: EasingFunction | EasingFunctionFactory): CurvedTransitionAnimation;
|
|
192
|
+
easingHeight(easing: EasingFunction | EasingFunctionFactory): CurvedTransitionAnimation;
|
|
193
|
+
}
|
|
194
|
+
export interface EntryExitTransitionAnimation extends BuilderBase<EntryExitTransitionAnimation> {
|
|
195
|
+
entering(animation: EntryExitAnimation | KeyframeAnimation): EntryExitTransitionAnimation;
|
|
196
|
+
exiting(animation: EntryExitAnimation | KeyframeAnimation): EntryExitTransitionAnimation;
|
|
197
|
+
}
|
|
198
|
+
/** Steps keyed 0–100 (or from and to), each a style with an optional easing into it. */
|
|
199
|
+
export type KeyframeSteps = Record<string | number, Record<string, unknown> & { easing?: EasingFunction | EasingFunctionFactory }>;
|
|
200
|
+
export interface KeyframeAnimation {
|
|
201
|
+
duration(durationMs: number): KeyframeAnimation;
|
|
202
|
+
delay(delayMs: number): KeyframeAnimation;
|
|
203
|
+
reduceMotion(reduceMotion: ReduceMotion): KeyframeAnimation;
|
|
204
|
+
withCallback(callback: (finished: boolean) => void): KeyframeAnimation;
|
|
205
|
+
}
|
|
206
|
+
export const Keyframe: new (steps: KeyframeSteps) => KeyframeAnimation;
|
|
207
|
+
export type LayoutAnimation =
|
|
208
|
+
| EntryExitAnimation
|
|
209
|
+
| LinearTransitionAnimation
|
|
210
|
+
| SimpleTransitionAnimation
|
|
211
|
+
| SequencedTransitionAnimation
|
|
212
|
+
| CurvedTransitionAnimation
|
|
213
|
+
| EntryExitTransitionAnimation
|
|
214
|
+
| KeyframeAnimation;
|
|
215
|
+
export const FadeIn: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
216
|
+
export const FadeInRight: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
217
|
+
export const FadeInLeft: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
218
|
+
export const FadeInUp: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
219
|
+
export const FadeInDown: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
220
|
+
export const FadeOut: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
221
|
+
export const FadeOutRight: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
222
|
+
export const FadeOutLeft: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
223
|
+
export const FadeOutUp: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
224
|
+
export const FadeOutDown: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
225
|
+
export const SlideInRight: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
226
|
+
export const SlideInLeft: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
227
|
+
export const SlideOutRight: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
228
|
+
export const SlideOutLeft: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
229
|
+
export const SlideInUp: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
230
|
+
export const SlideInDown: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
231
|
+
export const SlideOutUp: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
232
|
+
export const SlideOutDown: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
233
|
+
export const ZoomIn: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
234
|
+
export const ZoomInRotate: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
235
|
+
export const ZoomInLeft: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
236
|
+
export const ZoomInRight: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
237
|
+
export const ZoomInUp: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
238
|
+
export const ZoomInDown: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
239
|
+
export const ZoomInEasyUp: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
240
|
+
export const ZoomInEasyDown: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
241
|
+
export const ZoomOut: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
242
|
+
export const ZoomOutRotate: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
243
|
+
export const ZoomOutLeft: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
244
|
+
export const ZoomOutRight: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
245
|
+
export const ZoomOutUp: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
246
|
+
export const ZoomOutDown: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
247
|
+
export const ZoomOutEasyUp: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
248
|
+
export const ZoomOutEasyDown: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
249
|
+
export const BounceIn: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
250
|
+
export const BounceInDown: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
251
|
+
export const BounceInUp: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
252
|
+
export const BounceInLeft: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
253
|
+
export const BounceInRight: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
254
|
+
export const BounceOut: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
255
|
+
export const BounceOutDown: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
256
|
+
export const BounceOutUp: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
257
|
+
export const BounceOutLeft: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
258
|
+
export const BounceOutRight: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
259
|
+
export const FlipInXUp: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
260
|
+
export const FlipInYLeft: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
261
|
+
export const FlipInXDown: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
262
|
+
export const FlipInYRight: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
263
|
+
export const FlipInEasyX: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
264
|
+
export const FlipInEasyY: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
265
|
+
export const FlipOutXUp: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
266
|
+
export const FlipOutYLeft: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
267
|
+
export const FlipOutXDown: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
268
|
+
export const FlipOutYRight: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
269
|
+
export const FlipOutEasyX: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
270
|
+
export const FlipOutEasyY: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
271
|
+
export const LightSpeedInRight: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
272
|
+
export const LightSpeedInLeft: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
273
|
+
export const LightSpeedOutRight: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
274
|
+
export const LightSpeedOutLeft: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
275
|
+
export const PinwheelIn: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
276
|
+
export const PinwheelOut: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
277
|
+
export const RollInLeft: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
278
|
+
export const RollInRight: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
279
|
+
export const RollOutLeft: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
280
|
+
export const RollOutRight: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
281
|
+
export const RotateInDownLeft: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
282
|
+
export const RotateInDownRight: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
283
|
+
export const RotateInUpLeft: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
284
|
+
export const RotateInUpRight: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
285
|
+
export const RotateOutDownLeft: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
286
|
+
export const RotateOutDownRight: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
287
|
+
export const RotateOutUpLeft: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
288
|
+
export const RotateOutUpRight: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
289
|
+
export const StretchInX: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
290
|
+
export const StretchInY: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
291
|
+
export const StretchOutX: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
292
|
+
export const StretchOutY: EntryExitAnimation & (new () => EntryExitAnimation);
|
|
293
|
+
export const LinearTransition: LinearTransitionAnimation & (new () => LinearTransitionAnimation);
|
|
294
|
+
/** @deprecated Use LinearTransition. */
|
|
295
|
+
export const Layout: LinearTransitionAnimation & (new () => LinearTransitionAnimation);
|
|
296
|
+
export const FadingTransition: SimpleTransitionAnimation & (new () => SimpleTransitionAnimation);
|
|
297
|
+
export const JumpingTransition: SimpleTransitionAnimation & (new () => SimpleTransitionAnimation);
|
|
298
|
+
export const SequencedTransition: SequencedTransitionAnimation & (new () => SequencedTransitionAnimation);
|
|
299
|
+
export const CurvedTransition: CurvedTransitionAnimation & (new () => CurvedTransitionAnimation);
|
|
300
|
+
export const EntryExitTransition: EntryExitTransitionAnimation & (new () => EntryExitTransitionAnimation);
|
|
301
|
+
/** Skips the entering or exiting animations of everything inside it. */
|
|
302
|
+
export const LayoutAnimationConfig: (props: { skipEntering?: boolean; skipExiting?: boolean; children?: ReactNode }) => ReactNode;
|
|
303
|
+
/** Sets the reduce-motion mode for the whole app while it is shown; it takes no children. */
|
|
304
|
+
export const ReducedMotionConfig: (props: { mode: ReduceMotion }) => ReactNode;
|
|
305
|
+
export function useReducedMotion(): boolean;
|
|
306
|
+
// --- CSS animations and transitions ---
|
|
307
|
+
export type CSSKeyframes = { readonly __adelinKeyframes: true };
|
|
308
|
+
export type CSSTimingFunction = { readonly __adelinTimingFunction: true };
|
|
309
|
+
export const css: {
|
|
310
|
+
/** Steps keyed by percentage, or from and to; pass the result as animationName. */
|
|
311
|
+
keyframes(steps: Record<string, Record<string, unknown>>): CSSKeyframes;
|
|
312
|
+
create<T extends Record<string, Record<string, unknown>>>(styles: T): T;
|
|
313
|
+
};
|
|
314
|
+
export function cubicBezier(x1: number, y1: number, x2: number, y2: number): CSSTimingFunction;
|
|
315
|
+
export function linear(...points: (number | [number, ...`${number}%`[]])[]): CSSTimingFunction;
|
|
316
|
+
export function steps(stepsNumber: number, modifier?: "jump-start" | "start" | "jump-end" | "end" | "jump-none" | "jump-both"): CSSTimingFunction;
|
|
317
|
+
// --- Scrolling, measuring and frames ---
|
|
318
|
+
export interface ScrollEvent {
|
|
319
|
+
eventName: string;
|
|
320
|
+
contentOffset: { x: number; y: number };
|
|
321
|
+
contentSize: { width: number; height: number };
|
|
322
|
+
layoutMeasurement: { width: number; height: number };
|
|
323
|
+
}
|
|
324
|
+
export type ScrollHandler<C extends Record<string, unknown> = Record<string, unknown>> = (event: ScrollEvent, context: C) => void;
|
|
325
|
+
export interface ScrollHandlers<C extends Record<string, unknown> = Record<string, unknown>> {
|
|
326
|
+
onScroll?: ScrollHandler<C>;
|
|
327
|
+
onBeginDrag?: ScrollHandler<C>;
|
|
328
|
+
onEndDrag?: ScrollHandler<C>;
|
|
329
|
+
onMomentumBegin?: ScrollHandler<C>;
|
|
330
|
+
onMomentumEnd?: ScrollHandler<C>;
|
|
331
|
+
}
|
|
332
|
+
/** What useAnimatedScrollHandler returns; pass it as onScroll of Animated.ScrollView. */
|
|
333
|
+
export type ScrollHandlerProcessed = { readonly __adelinScrollHandler: true };
|
|
334
|
+
export function useAnimatedScrollHandler<C extends Record<string, unknown> = Record<string, unknown>>(
|
|
335
|
+
handlers: ScrollHandler<C> | ScrollHandlers<C>,
|
|
336
|
+
deps?: readonly unknown[],
|
|
337
|
+
): ScrollHandlerProcessed;
|
|
338
|
+
/** One onScroll handler running each non-null handler in order; each keeps its own context. */
|
|
339
|
+
/** A worklet run for each named scroll event (onScroll, onScrollBeginDrag, onScrollEndDrag, onMomentumScrollBegin, onMomentumScrollEnd). */
|
|
340
|
+
export function useEvent(handler: (event: ScrollEvent) => void, eventNames?: readonly string[], rebuild?: boolean): ScrollHandlerProcessed;
|
|
341
|
+
export function useComposedEventHandler(handlers: (ScrollHandlerProcessed | null)[]): ScrollHandlerProcessed;
|
|
342
|
+
export function useAnimatedRef<T = unknown>(): AnimatedRef<T>;
|
|
343
|
+
/** The scroll offset of the Animated.ScrollView given `ref`, kept current as it scrolls. */
|
|
344
|
+
export function useScrollOffset(animatedRef: AnimatedRef<unknown>, providedOffset?: SharedValue<number>): SharedValue<number>;
|
|
345
|
+
/** @deprecated Use useScrollOffset. */
|
|
346
|
+
export function useScrollViewOffset(animatedRef: AnimatedRef<unknown>): SharedValue<number>;
|
|
347
|
+
export interface MeasuredDimensions {
|
|
348
|
+
x: number;
|
|
349
|
+
y: number;
|
|
350
|
+
width: number;
|
|
351
|
+
height: number;
|
|
352
|
+
pageX: number;
|
|
353
|
+
pageY: number;
|
|
354
|
+
}
|
|
355
|
+
/** Only measures inside a worklet; null anywhere else or before layout. */
|
|
356
|
+
export function measure(animatedRef: AnimatedRef<unknown>): MeasuredDimensions | null;
|
|
357
|
+
export function scrollTo(animatedRef: AnimatedRef<unknown>, x: number, y: number, animated: boolean): void;
|
|
358
|
+
export interface FrameInfo {
|
|
359
|
+
timestamp: number;
|
|
360
|
+
timeSincePreviousFrame: number | null;
|
|
361
|
+
timeSinceFirstFrame: number;
|
|
362
|
+
}
|
|
363
|
+
export interface FrameCallback {
|
|
364
|
+
setActive(isActive: boolean): void;
|
|
365
|
+
readonly isActive: boolean;
|
|
366
|
+
readonly callbackId: number;
|
|
367
|
+
}
|
|
368
|
+
export function useFrameCallback(callback: (frame: FrameInfo) => void, autostart?: boolean): FrameCallback;
|
|
369
|
+
// --- Reanimated 3 leftovers ---
|
|
370
|
+
/** @deprecated Does nothing in Reanimated 4; delete the call. */
|
|
371
|
+
export function enableLayoutAnimations(flag: boolean): void;
|
|
372
|
+
/** @deprecated Always false in Reanimated 4. */
|
|
373
|
+
export function isReanimated3(): boolean;
|
|
374
|
+
/** @deprecated Always false in Reanimated 4. */
|
|
375
|
+
export function isConfigured(): boolean;
|
|
376
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Persistent key-value storage for an Adelin workspace.
|
|
2
|
+
declare module "@adelin/storage" {
|
|
3
|
+
type DialectValue = import("@adelin/content").DialectValue;
|
|
4
|
+
export const storage: {
|
|
5
|
+
get(key: string): Promise<DialectValue>;
|
|
6
|
+
set(key: string, value: unknown): Promise<void>;
|
|
7
|
+
remove(key: string): Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// The Redux-shaped app store; `RootState` is filled in by the workspace's `adelin-env.d.ts`.
|
|
2
|
+
declare module "@adelin/store" {
|
|
3
|
+
/** The whole store's state, augmented per workspace from `store.tsx`. */
|
|
4
|
+
export interface RootState {}
|
|
5
|
+
|
|
6
|
+
export interface PayloadAction<P = unknown> {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: P;
|
|
9
|
+
}
|
|
10
|
+
/** A creator for one action type. */
|
|
11
|
+
export interface ActionCreator<P> {
|
|
12
|
+
(payload?: P): PayloadAction<P>;
|
|
13
|
+
type: string;
|
|
14
|
+
}
|
|
15
|
+
export type CaseReducer<S> = (state: S, action: PayloadAction<any>) => S | void;
|
|
16
|
+
|
|
17
|
+
type PayloadOf<F> = F extends (state: any, action: infer A) => any
|
|
18
|
+
? A extends { payload: infer P } ? P : unknown
|
|
19
|
+
: unknown;
|
|
20
|
+
|
|
21
|
+
/** A thunk lifecycle creator; its actions carry the thunk's argument as `meta.arg`. */
|
|
22
|
+
export interface ThunkCaseCreator<P, A> extends ActionCreator<P> {
|
|
23
|
+
readonly __arg: A;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface ActionReducerMapBuilder<S> {
|
|
27
|
+
addCase<P, A>(
|
|
28
|
+
action: ThunkCaseCreator<P, A>,
|
|
29
|
+
reducer: (state: S, action: PayloadAction<P> & { meta: { arg: A } }) => S | void,
|
|
30
|
+
): ActionReducerMapBuilder<S>;
|
|
31
|
+
addCase<P>(
|
|
32
|
+
action: ActionCreator<P>,
|
|
33
|
+
reducer: (state: S, action: PayloadAction<P>) => S | void,
|
|
34
|
+
): ActionReducerMapBuilder<S>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface Slice<N extends string, S, R> {
|
|
38
|
+
name: N;
|
|
39
|
+
reducer: (state: S | undefined, action: { type: string }) => S;
|
|
40
|
+
actions: { [K in keyof R]: (payload?: PayloadOf<R[K]>) => unknown };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function createSlice<N extends string, S, R extends Record<string, CaseReducer<S>>>(options: {
|
|
44
|
+
name: N;
|
|
45
|
+
initialState: S;
|
|
46
|
+
reducers: R;
|
|
47
|
+
extraReducers?: (builder: ActionReducerMapBuilder<S>) => void;
|
|
48
|
+
}): Slice<N, S, R>;
|
|
49
|
+
|
|
50
|
+
/** An async action: call it to dispatch, match its lifecycle with the three creators. */
|
|
51
|
+
export interface AsyncThunk<T, A> {
|
|
52
|
+
(...args: undefined extends A ? [arg?: A] : [arg: A]): ThunkAction<T>;
|
|
53
|
+
pending: ThunkCaseCreator<undefined, A>;
|
|
54
|
+
fulfilled: ThunkCaseCreator<T, A>;
|
|
55
|
+
rejected: ThunkCaseCreator<unknown, A>;
|
|
56
|
+
}
|
|
57
|
+
export function createAsyncThunk<T, A = void>(type: string, payload: (arg: A) => Promise<T>): AsyncThunk<T, A>;
|
|
58
|
+
|
|
59
|
+
/** Maps a store module's exported slices to their state, keyed by slice name. */
|
|
60
|
+
export type SliceStates<M> = {
|
|
61
|
+
[K in keyof M as M[K] extends { name: infer N extends string; reducer: (...a: any[]) => unknown }
|
|
62
|
+
? N
|
|
63
|
+
: never]: M[K] extends { reducer: (...a: any[]) => infer S } ? S : never;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export function useSelector<T>(select: (s: RootState) => T): T;
|
|
67
|
+
export interface ThunkAction<T> { readonly result?: T }
|
|
68
|
+
export interface Dispatch {
|
|
69
|
+
<T>(action: ThunkAction<T>): Promise<PayloadAction<T>> & { unwrap(): Promise<T> };
|
|
70
|
+
(action: unknown): void;
|
|
71
|
+
}
|
|
72
|
+
export function useDispatch(): Dispatch;
|
|
73
|
+
export const appDispatch: ReturnType<typeof useDispatch>;
|
|
74
|
+
}
|