react-native-terra-ui 0.7.2 → 0.8.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/CHANGELOG.md +28 -0
- package/README.md +1 -1
- package/lib/module/components/avatar/Avatar.js +20 -20
- package/lib/module/components/avatar/Avatar.js.map +1 -1
- package/lib/module/components/button/Button.js +11 -11
- package/lib/module/components/button/Button.js.map +1 -1
- package/lib/module/components/chip/Chip.js +32 -32
- package/lib/module/components/chip/Chip.js.map +1 -1
- package/lib/module/components/empty-state/EmptyState.js +3 -3
- package/lib/module/components/empty-state/EmptyState.js.map +1 -1
- package/lib/module/components/header/variants/LargeTitleHeader/index.js +30 -32
- package/lib/module/components/header/variants/LargeTitleHeader/index.js.map +1 -1
- package/lib/module/components/header/variants/TitleHeader/index.js +26 -18
- package/lib/module/components/header/variants/TitleHeader/index.js.map +1 -1
- package/lib/module/components/icon/Icon.js +3 -3
- package/lib/module/components/page-indicator/hooks/use-page-indicator-colors.js +2 -2
- package/lib/module/components/screen/Screen.js +63 -34
- package/lib/module/components/screen/Screen.js.map +1 -1
- package/lib/module/components/screen/ScreenContext.js +28 -9
- package/lib/module/components/screen/ScreenContext.js.map +1 -1
- package/lib/module/components/screen/ScreenFlatList.js +4 -162
- package/lib/module/components/screen/ScreenFlatList.js.map +1 -1
- package/lib/module/components/screen/ScreenList.js +81 -97
- package/lib/module/components/screen/ScreenList.js.map +1 -1
- package/lib/module/components/screen/ScreenScrollView.js +64 -115
- package/lib/module/components/screen/ScreenScrollView.js.map +1 -1
- package/lib/module/components/screen/hooks/use-screen-ref.js +18 -0
- package/lib/module/components/screen/hooks/use-screen-ref.js.map +1 -0
- package/lib/module/components/screen/hooks/use-screen-scroll-handler.js +19 -0
- package/lib/module/components/screen/hooks/use-screen-scroll-handler.js.map +1 -0
- package/lib/module/components/screen/index.js.map +1 -1
- package/lib/module/components/screen/parts/ScreenFrame.js +47 -0
- package/lib/module/components/screen/parts/ScreenFrame.js.map +1 -0
- package/lib/module/components/screen/parts/ScreenHeaderAppearance.js +43 -0
- package/lib/module/components/screen/parts/ScreenHeaderAppearance.js.map +1 -0
- package/lib/module/components/screen/parts/ScreenPlaceholder.js +11 -13
- package/lib/module/components/screen/parts/ScreenPlaceholder.js.map +1 -1
- package/lib/module/components/screen/parts/ScreenSafeArea.android.js +27 -0
- package/lib/module/components/screen/parts/ScreenSafeArea.android.js.map +1 -0
- package/lib/module/components/screen/parts/ScreenSafeArea.js +26 -0
- package/lib/module/components/screen/parts/ScreenSafeArea.js.map +1 -0
- package/lib/module/components/screen/utils.js +18 -9
- package/lib/module/components/screen/utils.js.map +1 -1
- package/lib/module/components/spinner/Spinner.js +2 -2
- package/lib/module/components/text/Text.js +1 -1
- package/lib/module/components/toast/Toast.js +13 -13
- package/lib/module/components/toast/Toast.js.map +1 -1
- package/lib/module/components/toolbar/Toolbar.js +2 -2
- package/lib/module/context/ThemeProvider.js +22 -39
- package/lib/module/context/ThemeProvider.js.map +1 -1
- package/lib/module/context/index.js +1 -1
- package/lib/module/context/index.js.map +1 -1
- package/lib/module/theme/breakpoints.js +1 -1
- package/lib/module/theme/define-config.js +21 -0
- package/lib/module/theme/define-config.js.map +1 -0
- package/lib/module/theme/diagnostics.js +13 -0
- package/lib/module/theme/diagnostics.js.map +1 -0
- package/lib/module/theme/errors.js +15 -0
- package/lib/module/theme/errors.js.map +1 -0
- package/lib/module/theme/index.js +7 -1
- package/lib/module/theme/index.js.map +1 -1
- package/lib/module/theme/legacy-tokens.js +119 -0
- package/lib/module/theme/legacy-tokens.js.map +1 -0
- package/lib/module/theme/registry.js +122 -130
- package/lib/module/theme/registry.js.map +1 -1
- package/lib/module/theme/resolve-config.js +346 -0
- package/lib/module/theme/resolve-config.js.map +1 -0
- package/lib/module/theme/runtime.js +57 -12
- package/lib/module/theme/runtime.js.map +1 -1
- package/lib/module/theme/screen-margin.js +6 -14
- package/lib/module/theme/screen-margin.js.map +1 -1
- package/lib/module/theme/screen-padding.js +17 -0
- package/lib/module/theme/screen-padding.js.map +1 -0
- package/lib/module/theme/selection-store.js +75 -0
- package/lib/module/theme/selection-store.js.map +1 -0
- package/lib/module/theme/theme.js +81 -36
- package/lib/module/theme/theme.js.map +1 -1
- package/lib/module/theme/tokens/canonical-color-keys.js +102 -0
- package/lib/module/theme/tokens/canonical-color-keys.js.map +1 -0
- package/lib/module/theme/tokens/dark.js +72 -88
- package/lib/module/theme/tokens/dark.js.map +1 -1
- package/lib/module/theme/tokens/light.js +69 -83
- package/lib/module/theme/tokens/light.js.map +1 -1
- package/lib/module/theme/tokens/primitives.js +14 -14
- package/lib/module/theme/tokens/primitives.js.map +1 -1
- package/lib/module/theme/tokens/validate.js +238 -0
- package/lib/module/theme/tokens/validate.js.map +1 -0
- package/lib/module/theme/unistyles-adapter.js +77 -0
- package/lib/module/theme/unistyles-adapter.js.map +1 -0
- package/lib/module/utils/accent-generator.js +476 -0
- package/lib/module/utils/accent-generator.js.map +1 -0
- package/lib/module/utils/accent-utils.js +52 -35
- package/lib/module/utils/accent-utils.js.map +1 -1
- package/lib/module/utils/color-utils.js +224 -7
- package/lib/module/utils/color-utils.js.map +1 -1
- package/lib/module/utils/deep-merge.js +1 -1
- package/lib/module/utils/deep-merge.js.map +1 -1
- package/lib/module/utils/resolve-theme-color.js +2 -2
- package/lib/typescript/src/components/chip/types.d.ts +1 -1
- package/lib/typescript/src/components/empty-state/EmptyState.d.ts +1 -1
- package/lib/typescript/src/components/empty-state/EmptyState.d.ts.map +1 -1
- package/lib/typescript/src/components/header/variants/LargeTitleHeader/index.d.ts +6 -5
- package/lib/typescript/src/components/header/variants/LargeTitleHeader/index.d.ts.map +1 -1
- package/lib/typescript/src/components/header/variants/TitleHeader/index.d.ts +11 -5
- package/lib/typescript/src/components/header/variants/TitleHeader/index.d.ts.map +1 -1
- package/lib/typescript/src/components/icon/Icon.d.ts +2 -2
- package/lib/typescript/src/components/screen/Screen.d.ts +45 -16
- package/lib/typescript/src/components/screen/Screen.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/ScreenContext.d.ts +42 -26
- package/lib/typescript/src/components/screen/ScreenContext.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/ScreenFlatList.d.ts +5 -46
- package/lib/typescript/src/components/screen/ScreenFlatList.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/ScreenList.d.ts +62 -50
- package/lib/typescript/src/components/screen/ScreenList.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/ScreenScrollView.d.ts +18 -58
- package/lib/typescript/src/components/screen/ScreenScrollView.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/hooks/use-screen-ref.d.ts +5 -0
- package/lib/typescript/src/components/screen/hooks/use-screen-ref.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/hooks/use-screen-scroll-handler.d.ts +53 -0
- package/lib/typescript/src/components/screen/hooks/use-screen-scroll-handler.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/index.d.ts +2 -2
- package/lib/typescript/src/components/screen/index.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/parts/ScreenFrame.d.ts +6 -0
- package/lib/typescript/src/components/screen/parts/ScreenFrame.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/parts/ScreenHeaderAppearance.d.ts +21 -0
- package/lib/typescript/src/components/screen/parts/ScreenHeaderAppearance.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/parts/ScreenPlaceholder.d.ts +6 -8
- package/lib/typescript/src/components/screen/parts/ScreenPlaceholder.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/parts/ScreenSafeArea.android.d.ts +7 -0
- package/lib/typescript/src/components/screen/parts/ScreenSafeArea.android.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/parts/ScreenSafeArea.d.ts +6 -0
- package/lib/typescript/src/components/screen/parts/ScreenSafeArea.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/types.d.ts +27 -32
- package/lib/typescript/src/components/screen/types.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/utils.d.ts +9 -8
- package/lib/typescript/src/components/screen/utils.d.ts.map +1 -1
- package/lib/typescript/src/components/text/Text.d.ts +1 -1
- package/lib/typescript/src/components/text/Text.d.ts.map +1 -1
- package/lib/typescript/src/components/toolbar/Toolbar.d.ts +2 -2
- package/lib/typescript/src/context/ThemeProvider.d.ts +29 -12
- package/lib/typescript/src/context/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/src/context/index.d.ts +1 -1
- package/lib/typescript/src/context/index.d.ts.map +1 -1
- package/lib/typescript/src/theme/breakpoints.d.ts +1 -1
- package/lib/typescript/src/theme/define-config.d.ts +23 -0
- package/lib/typescript/src/theme/define-config.d.ts.map +1 -0
- package/lib/typescript/src/theme/diagnostics.d.ts +4 -0
- package/lib/typescript/src/theme/diagnostics.d.ts.map +1 -0
- package/lib/typescript/src/theme/errors.d.ts +10 -0
- package/lib/typescript/src/theme/errors.d.ts.map +1 -0
- package/lib/typescript/src/theme/index.d.ts +10 -2
- package/lib/typescript/src/theme/index.d.ts.map +1 -1
- package/lib/typescript/src/theme/legacy-tokens.d.ts +187 -0
- package/lib/typescript/src/theme/legacy-tokens.d.ts.map +1 -0
- package/lib/typescript/src/theme/registry.d.ts +12 -17
- package/lib/typescript/src/theme/registry.d.ts.map +1 -1
- package/lib/typescript/src/theme/resolve-config.d.ts +99 -0
- package/lib/typescript/src/theme/resolve-config.d.ts.map +1 -0
- package/lib/typescript/src/theme/runtime.d.ts +25 -4
- package/lib/typescript/src/theme/runtime.d.ts.map +1 -1
- package/lib/typescript/src/theme/screen-margin.d.ts +6 -14
- package/lib/typescript/src/theme/screen-margin.d.ts.map +1 -1
- package/lib/typescript/src/theme/screen-padding.d.ts +15 -0
- package/lib/typescript/src/theme/screen-padding.d.ts.map +1 -0
- package/lib/typescript/src/theme/selection-store.d.ts +41 -0
- package/lib/typescript/src/theme/selection-store.d.ts.map +1 -0
- package/lib/typescript/src/theme/theme.d.ts +54 -1
- package/lib/typescript/src/theme/theme.d.ts.map +1 -1
- package/lib/typescript/src/theme/tokens/canonical-color-keys.d.ts +95 -0
- package/lib/typescript/src/theme/tokens/canonical-color-keys.d.ts.map +1 -0
- package/lib/typescript/src/theme/tokens/dark.d.ts +56 -63
- package/lib/typescript/src/theme/tokens/dark.d.ts.map +1 -1
- package/lib/typescript/src/theme/tokens/light.d.ts +56 -71
- package/lib/typescript/src/theme/tokens/light.d.ts.map +1 -1
- package/lib/typescript/src/theme/tokens/primitives.d.ts +11 -10
- package/lib/typescript/src/theme/tokens/primitives.d.ts.map +1 -1
- package/lib/typescript/src/theme/tokens/validate.d.ts +34 -0
- package/lib/typescript/src/theme/tokens/validate.d.ts.map +1 -0
- package/lib/typescript/src/theme/types.d.ts +166 -86
- package/lib/typescript/src/theme/types.d.ts.map +1 -1
- package/lib/typescript/src/theme/unistyles-adapter.d.ts +33 -0
- package/lib/typescript/src/theme/unistyles-adapter.d.ts.map +1 -0
- package/lib/typescript/src/utils/accent-generator.d.ts +103 -0
- package/lib/typescript/src/utils/accent-generator.d.ts.map +1 -0
- package/lib/typescript/src/utils/accent-utils.d.ts +15 -2
- package/lib/typescript/src/utils/accent-utils.d.ts.map +1 -1
- package/lib/typescript/src/utils/color-utils.d.ts +59 -2
- package/lib/typescript/src/utils/color-utils.d.ts.map +1 -1
- package/lib/typescript/src/utils/deep-merge.d.ts +1 -0
- package/lib/typescript/src/utils/deep-merge.d.ts.map +1 -1
- package/lib/typescript/src/utils/resolve-theme-color.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/avatar/Avatar.tsx +20 -20
- package/src/components/button/Button.tsx +11 -11
- package/src/components/chip/Chip.tsx +32 -32
- package/src/components/chip/types.ts +1 -1
- package/src/components/empty-state/EmptyState.tsx +4 -4
- package/src/components/header/variants/LargeTitleHeader/index.tsx +31 -30
- package/src/components/header/variants/TitleHeader/index.tsx +33 -22
- package/src/components/icon/Icon.tsx +4 -4
- package/src/components/page-indicator/hooks/use-page-indicator-colors.ts +2 -2
- package/src/components/screen/Screen.tsx +89 -43
- package/src/components/screen/ScreenContext.tsx +48 -28
- package/src/components/screen/ScreenFlatList.tsx +5 -191
- package/src/components/screen/ScreenList.tsx +197 -175
- package/src/components/screen/ScreenScrollView.tsx +92 -167
- package/src/components/screen/hooks/use-screen-ref.ts +24 -0
- package/src/components/screen/hooks/use-screen-scroll-handler.ts +31 -0
- package/src/components/screen/index.ts +8 -2
- package/src/components/screen/parts/ScreenFrame.tsx +49 -0
- package/src/components/screen/parts/ScreenHeaderAppearance.tsx +52 -0
- package/src/components/screen/parts/ScreenPlaceholder.tsx +16 -16
- package/src/components/screen/parts/ScreenSafeArea.android.tsx +22 -0
- package/src/components/screen/parts/ScreenSafeArea.tsx +20 -0
- package/src/components/screen/types.ts +29 -32
- package/src/components/screen/utils.ts +24 -11
- package/src/components/spinner/Spinner.tsx +2 -2
- package/src/components/text/Text.tsx +2 -2
- package/src/components/toast/Toast.tsx +13 -13
- package/src/components/toolbar/Toolbar.tsx +4 -4
- package/src/context/ThemeProvider.tsx +47 -51
- package/src/context/index.ts +1 -1
- package/src/theme/breakpoints.ts +1 -1
- package/src/theme/define-config.ts +27 -0
- package/src/theme/diagnostics.ts +11 -0
- package/src/theme/errors.ts +14 -0
- package/src/theme/index.ts +40 -1
- package/src/theme/legacy-tokens.ts +227 -0
- package/src/theme/registry.ts +119 -137
- package/src/theme/resolve-config.ts +406 -0
- package/src/theme/runtime.ts +52 -14
- package/src/theme/screen-margin.ts +6 -25
- package/src/theme/screen-padding.ts +26 -0
- package/src/theme/selection-store.ts +76 -0
- package/src/theme/theme.ts +104 -39
- package/src/theme/tokens/canonical-color-keys.ts +107 -0
- package/src/theme/tokens/dark.ts +91 -98
- package/src/theme/tokens/light.ts +88 -93
- package/src/theme/tokens/primitives.ts +14 -14
- package/src/theme/tokens/validate.ts +271 -0
- package/src/theme/types.ts +184 -95
- package/src/theme/unistyles-adapter.ts +75 -0
- package/src/utils/accent-generator.ts +530 -0
- package/src/utils/accent-utils.ts +66 -39
- package/src/utils/color-utils.ts +225 -8
- package/src/utils/deep-merge.ts +1 -1
- package/src/utils/resolve-theme-color.ts +2 -2
- package/lib/module/components/screen/parts/BottomSafeArea.js +0 -62
- package/lib/module/components/screen/parts/BottomSafeArea.js.map +0 -1
- package/lib/typescript/src/components/screen/parts/BottomSafeArea.d.ts +0 -30
- package/lib/typescript/src/components/screen/parts/BottomSafeArea.d.ts.map +0 -1
- package/src/components/screen/parts/BottomSafeArea.tsx +0 -59
|
@@ -1,67 +1,83 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import Animated, { type AnimatedRef, type ScrollHandlerProcessed, type SharedValue } from "react-native-reanimated";
|
|
3
|
-
import type {
|
|
3
|
+
import type { ScreenContentPadding, ScreenSafeArea } from "./types.js";
|
|
4
|
+
/** Internal animated ref shared by the screen's primary scroll container. */
|
|
4
5
|
export type ScreenScrollRef = AnimatedRef<Animated.ScrollView>;
|
|
5
|
-
/**
|
|
6
|
+
/** Local portal target for scrollable header content. */
|
|
6
7
|
export declare const SCREEN_HEADER_PORTAL_HOST = "screen-header";
|
|
8
|
+
/** Shared configuration and UI-thread scroll values returned by `useScreen`. */
|
|
7
9
|
export interface ScreenContextValue {
|
|
8
10
|
/**
|
|
9
|
-
* Which axes scroll containers pad with `layout.screen.
|
|
10
|
-
*
|
|
11
|
-
* via their own `margins` prop.
|
|
11
|
+
* Which axes scroll containers pad with `layout.screen.padding`.
|
|
12
|
+
* Each scroll container can override this with its own `contentPadding` prop.
|
|
12
13
|
*/
|
|
13
|
-
|
|
14
|
+
contentPadding: ScreenContentPadding;
|
|
15
|
+
/** Safe-area policy applied by the root; descendants must not reapply it. */
|
|
16
|
+
safeArea: ScreenSafeArea;
|
|
17
|
+
/** @deprecated Use contentPadding. */
|
|
18
|
+
margins: ScreenContentPadding;
|
|
14
19
|
/** Whether a `Screen.Header` is present. Used by scroll containers to add top inset. */
|
|
15
20
|
hasHeader: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Live vertical scroll offset of the screen's scroll container, driven by
|
|
18
|
-
* `Screen.ScrollView` / `Screen.FlatList`. Headers (and consumer UI) read it
|
|
19
|
-
* to animate on scroll.
|
|
20
|
-
*/
|
|
21
|
+
/** Vertical scroll offset, updated on the UI thread for header animations. */
|
|
21
22
|
scrollY: SharedValue<number>;
|
|
22
23
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* disables snap and collapse-range animations (`Header.Title` screens).
|
|
24
|
+
* Optional collapse distance for custom headers. Set via setHeaderCollapseHeight.
|
|
25
|
+
* Built-in headers derive their animation range from the theme.
|
|
26
26
|
*/
|
|
27
27
|
headerCollapseHeight: SharedValue<number>;
|
|
28
28
|
/**
|
|
29
|
-
* Native
|
|
30
|
-
*
|
|
29
|
+
* Native list snap offsets set by setHeaderCollapseHeight. Undefined by default.
|
|
30
|
+
* For Screen.ScrollView, pass these explicitly as snapToOffsets.
|
|
31
31
|
*/
|
|
32
32
|
headerSnapOffsets: number[] | undefined;
|
|
33
|
-
/**
|
|
33
|
+
/** Rounds the height and sets `[0, height]` snap offsets; nonpositive heights clear snapping. */
|
|
34
34
|
setHeaderCollapseHeight: (height: number) => void;
|
|
35
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Ref bound by ScrollView and FlatList containers, including `Screen.List`
|
|
37
|
+
* with FlatList. Custom list implementations do not bind this ref.
|
|
38
|
+
* Its declared ScrollView type does not expose FlatList-specific methods.
|
|
39
|
+
*/
|
|
36
40
|
scrollRef: ScreenScrollRef;
|
|
37
41
|
/** Scroll handler that mirrors offset into `scrollY`. */
|
|
38
42
|
scrollHandler: ScrollHandlerProcessed<Record<string, unknown>>;
|
|
43
|
+
/** Resolved background color shared with scroll containers. */
|
|
39
44
|
background?: string;
|
|
40
45
|
}
|
|
41
46
|
export declare const ScreenContext: import("react").Context<ScreenContextValue | null>;
|
|
47
|
+
/** Internal provider inputs resolved by the Screen root. */
|
|
42
48
|
export interface ScreenScrollProviderProps {
|
|
43
49
|
children: ReactNode;
|
|
44
|
-
/** Which axes scroll containers pad with `layout.screen.
|
|
45
|
-
|
|
50
|
+
/** Which axes scroll containers pad with `layout.screen.padding`. Default `'all'`. */
|
|
51
|
+
contentPadding?: ScreenContentPadding;
|
|
52
|
+
safeArea?: ScreenSafeArea;
|
|
46
53
|
/** Whether a `Screen.Header` child is present. Default false. */
|
|
47
54
|
hasHeader?: boolean;
|
|
55
|
+
/** Resolved background color shared with scroll containers. */
|
|
48
56
|
background?: string;
|
|
49
57
|
}
|
|
50
58
|
/**
|
|
51
59
|
* Owns the screen's shared scroll ref, offset, snap offsets, and header collapse
|
|
52
|
-
* metrics.
|
|
53
|
-
* scroll containers bind the ref via {@link useScreen}.
|
|
60
|
+
* metrics. Scroll containers bind the ref via {@link useScreen}.
|
|
54
61
|
*/
|
|
55
|
-
export declare function ScreenScrollProvider({ background, children,
|
|
62
|
+
export declare function ScreenScrollProvider({ background, children, contentPadding, safeArea, hasHeader, }: ScreenScrollProviderProps): import("react").JSX.Element;
|
|
56
63
|
/**
|
|
57
|
-
*
|
|
64
|
+
* Reads the nearest `Screen`'s configuration, shared scroll state, and ref.
|
|
65
|
+
* Read `scrollY.value` in Reanimated worklets to animate without React renders.
|
|
66
|
+
* The ref belongs to the primary scroll container, not the screen root.
|
|
58
67
|
*
|
|
59
68
|
* @example
|
|
60
69
|
* ```tsx
|
|
61
|
-
*
|
|
70
|
+
* function FadingContent() {
|
|
71
|
+
* const { scrollY } = useScreen();
|
|
72
|
+
* const style = useAnimatedStyle(() => ({
|
|
73
|
+
* opacity: interpolate(scrollY.value, [0, 100], [1, 0], "clamp"),
|
|
74
|
+
* }));
|
|
75
|
+
* return <Animated.View style={style}>{content}</Animated.View>;
|
|
76
|
+
* }
|
|
62
77
|
* ```
|
|
63
78
|
*
|
|
64
|
-
* @
|
|
79
|
+
* @returns The nearest Screen's configuration and scroll state.
|
|
80
|
+
* @throws Error when called outside a Screen provider.
|
|
65
81
|
*/
|
|
66
82
|
export declare function useScreen(): ScreenContextValue;
|
|
67
83
|
//# sourceMappingURL=ScreenContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/screen/ScreenContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAA8C,MAAM,OAAO,CAAC;AAElG,OAAO,QAAQ,EAAE,EACf,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAIjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"ScreenContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/screen/ScreenContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAA8C,MAAM,OAAO,CAAC;AAElG,OAAO,QAAQ,EAAE,EACf,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAIjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,YAAS,CAAC;AAEpE,6EAA6E;AAC7E,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAE/D,yDAAyD;AACzD,eAAO,MAAM,yBAAyB,kBAAkB,CAAC;AAEzD,gFAAgF;AAChF,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,cAAc,EAAE,oBAAoB,CAAC;IACrC,6EAA6E;IAC7E,QAAQ,EAAE,cAAc,CAAC;IACzB,sCAAsC;IACtC,OAAO,EAAE,oBAAoB,CAAC;IAC9B,wFAAwF;IACxF,SAAS,EAAE,OAAO,CAAC;IACnB,8EAA8E;IAC9E,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7B;;;OAGG;IACH,oBAAoB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1C;;;OAGG;IACH,iBAAiB,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACxC,iGAAiG;IACjG,uBAAuB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD;;;;OAIG;IACH,SAAS,EAAE,eAAe,CAAC;IAC3B,yDAAyD;IACzD,aAAa,EAAE,sBAAsB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAE/D,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,oDAAiD,CAAC;AAE5E,4DAA4D;AAC5D,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,SAAS,CAAC;IACpB,sFAAsF;IACtF,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,iEAAiE;IACjE,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,UAA0B,EAC1B,QAAQ,EACR,cAAsB,EACtB,QAAiB,EACjB,SAAiB,GAClB,EAAE,yBAAyB,+BAkD3B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,IAAI,kBAAkB,CAM9C"}
|
|
@@ -1,47 +1,6 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* scroll ref exactly as `Screen.FlatList` does, but also lets a screen swap in
|
|
7
|
-
* any other FlatList-shaped list (e.g. `FlashList`) via its `as` prop.
|
|
8
|
-
*/
|
|
9
|
-
export interface ScreenFlatListProps<T> extends Omit<FlatListProps<T>, "CellRendererComponent" | "horizontal">, ScreenScrollableProps {
|
|
10
|
-
/**
|
|
11
|
-
* Extra bottom padding on the list content — clearance for a tab bar or home
|
|
12
|
-
* indicator. Defaults to the `layout.screen.margin.y` token when margins are
|
|
13
|
-
* enabled, otherwise `0`.
|
|
14
|
-
*/
|
|
15
|
-
bottomInset?: number;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* `FlatList` variant of `Screen.ScrollView`: binds the screen's shared scroll
|
|
19
|
-
* ref, mirrors offset into `scrollY`, hosts the portal target above the list,
|
|
20
|
-
* and applies token-driven content padding.
|
|
21
|
-
*
|
|
22
|
-
* Shares `loading` / `LoadingComponent` / `EmptyComponent` / `margins` /
|
|
23
|
-
* `horizontal` with `Screen.ScrollView`, so a screen can swap one container for
|
|
24
|
-
* another without relearning its API.
|
|
25
|
-
*
|
|
26
|
-
* @deprecated Use {@link ScreenList} (`Screen.List`) instead — it renders
|
|
27
|
-
* `FlatList` by default and behaves identically, but also accepts an `as`
|
|
28
|
-
* prop for swapping in another list implementation later without changing
|
|
29
|
-
* the surrounding API.
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```tsx
|
|
33
|
-
* <Screen.FlatList data={items} renderItem={({ item }) => <Row item={item} />} />
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* @example Loading and empty placeholders
|
|
37
|
-
* ```tsx
|
|
38
|
-
* <Screen.FlatList
|
|
39
|
-
* data={items}
|
|
40
|
-
* loading={isLoading}
|
|
41
|
-
* EmptyComponent={<EmptyState icon="status.info" title="Nothing yet" fill />}
|
|
42
|
-
* renderItem={({ item }) => <Row item={item} />}
|
|
43
|
-
* />
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
|
-
export declare function ScreenFlatList<T>({ data, style, contentContainerStyle, ListHeaderComponent, ListFooterComponent, ListEmptyComponent, horizontal, loading, LoadingComponent, EmptyComponent, margins, bottomInset, onScroll, ...rest }: ScreenFlatListProps<T>): import("react").JSX.Element;
|
|
1
|
+
import { ScreenList, type ScreenListProps } from "./ScreenList.js";
|
|
2
|
+
/** @deprecated Use ScreenListProps. */
|
|
3
|
+
export type ScreenFlatListProps<T> = ScreenListProps<T>;
|
|
4
|
+
/** @deprecated Use Screen.List, which exposes the same native FlatList and ref. */
|
|
5
|
+
export declare const ScreenFlatList: typeof ScreenList;
|
|
47
6
|
//# sourceMappingURL=ScreenFlatList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenFlatList.d.ts","sourceRoot":"","sources":["../../../../../src/components/screen/ScreenFlatList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ScreenFlatList.d.ts","sourceRoot":"","sources":["../../../../../src/components/screen/ScreenFlatList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAc,CAAC;AAEhE,uCAAuC;AACvC,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;AACxD,mFAAmF;AACnF,eAAO,MAAM,cAAc,EAAE,OAAO,UAAuB,CAAC"}
|
|
@@ -1,65 +1,77 @@
|
|
|
1
|
-
import { type ComponentPropsWithoutRef, type ElementType, type ReactElement } from "react";
|
|
2
|
-
import { FlatList, type
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ElementType, type ReactElement, type RefAttributes } from "react";
|
|
2
|
+
import { FlatList, type FlatListProps, type ListRenderItem } from "react-native";
|
|
3
3
|
import type { ScreenScrollableProps } from "./types.js";
|
|
4
|
-
|
|
4
|
+
/** Minimal row information supported by custom list adapters. FlatList also supplies separators. */
|
|
5
5
|
export interface ScreenListRenderItemInfo<T> {
|
|
6
6
|
item: T;
|
|
7
7
|
index: number;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
/** Native viewability token with the item inferred from data. */
|
|
10
|
+
type NativeViewToken = Parameters<NonNullable<FlatListProps<unknown>["onViewableItemsChanged"]>>[0]["viewableItems"][number];
|
|
11
|
+
export type ScreenListViewToken<T> = Omit<NativeViewToken, "item"> & {
|
|
12
|
+
item: T;
|
|
13
|
+
};
|
|
14
|
+
type ViewabilityCallback<T> = (info: {
|
|
15
|
+
viewableItems: ScreenListViewToken<T>[];
|
|
16
|
+
changed: ScreenListViewToken<T>[];
|
|
17
|
+
}) => void;
|
|
18
|
+
type ListLayoutProps = ScreenScrollableProps & {
|
|
19
|
+
/** @deprecated Use extraBottomPadding. This replaces themed bottom padding; safeArea belongs to Screen. */
|
|
20
|
+
bottomInset?: number;
|
|
21
|
+
};
|
|
22
|
+
/** Native FlatList props with item inference retained across callbacks and refs. */
|
|
23
|
+
type NativeScreenListProps<T> = ListLayoutProps & Omit<FlatListProps<T>, keyof ListLayoutProps | "data" | "renderItem" | "onViewableItemsChanged" | "viewabilityConfigCallbackPairs"> & {
|
|
24
|
+
/** Native FlatList is used by default. */
|
|
25
|
+
as?: typeof FlatList;
|
|
26
|
+
/** Null, undefined, and empty data use the empty slot. */
|
|
23
27
|
data?: readonly T[] | null;
|
|
24
|
-
|
|
28
|
+
/** Render a row, including native separator helpers. */
|
|
29
|
+
renderItem: ListRenderItem<T>;
|
|
30
|
+
/** Item-typed native viewability callback. */
|
|
31
|
+
onViewableItemsChanged?: ViewabilityCallback<T> | null;
|
|
32
|
+
/** Item-typed native viewability callback/configuration pairs. */
|
|
33
|
+
viewabilityConfigCallbackPairs?: {
|
|
34
|
+
viewabilityConfig: NonNullable<FlatListProps<T>["viewabilityConfig"]>;
|
|
35
|
+
onViewableItemsChanged: ViewabilityCallback<T>;
|
|
36
|
+
}[];
|
|
37
|
+
};
|
|
38
|
+
/** Props an adapter must accept and forward to its scrollable list implementation. */
|
|
39
|
+
export type ScreenListAdapterProps<T> = Pick<FlatListProps<T>, "style" | "contentContainerStyle" | "onScroll" | "ListHeaderComponent" | "ListFooterComponent" | "ListEmptyComponent" | "horizontal" | "scrollEventThrottle" | "contentInsetAdjustmentBehavior" | "automaticallyAdjustContentInsets" | "automaticallyAdjustsScrollIndicatorInsets" | "showsVerticalScrollIndicator" | "snapToOffsets"> & {
|
|
40
|
+
data?: readonly T[] | null;
|
|
41
|
+
renderItem: (info: ScreenListRenderItemInfo<T>) => ReactElement | null;
|
|
25
42
|
keyExtractor?: (item: T, index: number) => string;
|
|
26
|
-
ListHeaderComponent?: ListHeaderComponent;
|
|
27
|
-
ListFooterComponent?: ListHeaderComponent;
|
|
28
|
-
ListEmptyComponent?: ListHeaderComponent;
|
|
29
|
-
style?: StyleProp<ViewStyle>;
|
|
30
|
-
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
31
|
-
onScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
32
|
-
/**
|
|
33
|
-
* Extra bottom padding on the list content — clearance for a tab bar or
|
|
34
|
-
* home indicator. Defaults to the `layout.screen.margin.y` token when
|
|
35
|
-
* margins are enabled, otherwise `0`.
|
|
36
|
-
*/
|
|
37
|
-
bottomInset?: number;
|
|
38
43
|
};
|
|
44
|
+
type AdapterKeys = "data" | "renderItem" | "onScroll" | "contentContainerStyle" | "ListHeaderComponent" | "ListFooterComponent" | "ListEmptyComponent";
|
|
45
|
+
/** Custom lists must accept the adapter contract and forward a ref for Reanimated. */
|
|
46
|
+
export type ScreenCustomListProps<T, As extends ElementType> = ListLayoutProps & ScreenListAdapterProps<T> & Omit<ComponentPropsWithoutRef<As>, keyof ListLayoutProps | keyof ScreenListAdapterProps<T>> & {
|
|
47
|
+
as: As & (As extends typeof FlatList ? never : AdapterKeys extends keyof ComponentPropsWithoutRef<As> ? readonly T[] extends NonNullable<ComponentPropsWithoutRef<As>["data"]> ? "ref" extends keyof ComponentPropsWithRef<As> ? unknown : never : never : never);
|
|
48
|
+
ref?: ComponentPropsWithRef<As>["ref"];
|
|
49
|
+
};
|
|
50
|
+
/** Screen list props, optionally parameterized by a custom adapter component. */
|
|
51
|
+
export type ScreenListProps<T = unknown, As extends ElementType = typeof FlatList> = As extends typeof FlatList ? NativeScreenListProps<T> : ScreenCustomListProps<T, As>;
|
|
52
|
+
interface ScreenListComponent {
|
|
53
|
+
<T>(props: ScreenListProps<T> & RefAttributes<FlatList<T>>): ReactElement | null;
|
|
54
|
+
<T, As extends ElementType>(props: ScreenCustomListProps<T, As>): ReactElement | null;
|
|
55
|
+
displayName?: string;
|
|
56
|
+
}
|
|
39
57
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* implementations by changing `as`, without relearning the surrounding API.
|
|
58
|
+
* Virtualized Screen content. FlatList is the default and its native ref and
|
|
59
|
+
* item callbacks retain their types. Native refreshing keeps rows visible;
|
|
60
|
+
* isLoading replaces them with loadingContent (a Spinner by default).
|
|
44
61
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
62
|
+
* Custom `as` components must implement ScreenListAdapterProps, forward their
|
|
63
|
+
* ref, and forward the supplied scroll events, styles, and header/footer slots.
|
|
64
|
+
* Their native ref is forwarded to callers; useScreen().scrollRef is FlatList-only here.
|
|
65
|
+
* JS onScroll receives nativeEvent data without SyntheticEvent methods.
|
|
49
66
|
*
|
|
50
|
-
* @example
|
|
67
|
+
* @example
|
|
51
68
|
* ```tsx
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* data={items}
|
|
57
|
-
* renderItem={({ item }) => <Row item={item} />}
|
|
58
|
-
* />
|
|
69
|
+
* <Screen safeArea="auto">
|
|
70
|
+
* <Screen.List data={items} renderItem={({ item }) => <Row item={item} />}
|
|
71
|
+
* isLoading={isLoading} refreshing={isRefreshing} onRefresh={refresh} />
|
|
72
|
+
* </Screen>
|
|
59
73
|
* ```
|
|
60
74
|
*/
|
|
61
|
-
export declare
|
|
62
|
-
export
|
|
63
|
-
var displayName: string;
|
|
64
|
-
}
|
|
75
|
+
export declare const ScreenList: ScreenListComponent;
|
|
76
|
+
export {};
|
|
65
77
|
//# sourceMappingURL=ScreenList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenList.d.ts","sourceRoot":"","sources":["../../../../../src/components/screen/ScreenList.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,
|
|
1
|
+
{"version":3,"file":"ScreenList.d.ts","sourceRoot":"","sources":["../../../../../src/components/screen/ScreenList.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,71 +1,31 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import { type ScrollViewProps } from "react-native";
|
|
3
|
-
import { type ScrollHandlerProcessed } from "react-native-reanimated";
|
|
2
|
+
import { type ScrollViewProps, type StyleProp, type ViewStyle } from "react-native";
|
|
4
3
|
import type { ScreenScrollableProps } from "./types.js";
|
|
4
|
+
/** Native ScrollView props plus Screen layout, placeholders, and worklet support. */
|
|
5
5
|
export interface ScreenScrollViewProps extends Omit<ScrollViewProps, "horizontal">, ScreenScrollableProps {
|
|
6
|
+
/** Content replaced while loading or empty. */
|
|
6
7
|
children?: ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* `onScroll` instead; it doesn't require writing a worklet.
|
|
12
|
-
*/
|
|
13
|
-
scrollHandler?: ScrollHandlerProcessed<Record<string, unknown>>;
|
|
8
|
+
/** Style the inner content View, excluding the header portal. */
|
|
9
|
+
contentStyle?: StyleProp<ViewStyle>;
|
|
10
|
+
/** Override empty-child detection, for example when a child component renders null. */
|
|
11
|
+
isEmpty?: boolean;
|
|
14
12
|
}
|
|
15
13
|
/**
|
|
16
|
-
* Scrollable content
|
|
17
|
-
*
|
|
18
|
-
* header content is injected), and applies token-driven content padding.
|
|
14
|
+
* Scrollable content with a header portal and shared scroll tracking.
|
|
15
|
+
* Must be inside Screen. The ref exposes native ScrollView methods.
|
|
19
16
|
*
|
|
20
|
-
*
|
|
21
|
-
* `
|
|
22
|
-
*
|
|
23
|
-
* thread alongside the screen's own handler, with no JS-thread round trip.
|
|
17
|
+
* `contentContainerStyle` styles the native container, including header content.
|
|
18
|
+
* Use `contentStyle` for the inner content only. `onScroll` receives nativeEvent
|
|
19
|
+
* data on JS, without SyntheticEvent methods; `scrollHandler` runs on the UI thread.
|
|
24
20
|
*
|
|
25
21
|
* @example
|
|
26
22
|
* ```tsx
|
|
27
|
-
* <Screen
|
|
28
|
-
* <Text>
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* @example Loading placeholder instead of a per-screen spinner branch
|
|
33
|
-
* ```tsx
|
|
34
|
-
* const { data, loading } = useQuery();
|
|
35
|
-
*
|
|
36
|
-
* <Screen.ScrollView loading={loading}>
|
|
37
|
-
* <Text>{data?.title}</Text>
|
|
38
|
-
* </Screen.ScrollView>
|
|
39
|
-
* ```
|
|
40
|
-
*
|
|
41
|
-
* @example Empty placeholder when there is nothing to render
|
|
42
|
-
* ```tsx
|
|
43
|
-
* <Screen.ScrollView EmptyComponent={<EmptyState icon="status.info" title="Nothing yet" fill />}>
|
|
44
|
-
* {items.map((item) => <Row key={item.id} item={item} />)}
|
|
45
|
-
* </Screen.ScrollView>
|
|
46
|
-
* ```
|
|
47
|
-
*
|
|
48
|
-
* @example Simple JS-side scroll callback
|
|
49
|
-
* ```tsx
|
|
50
|
-
* <Screen.ScrollView onScroll={(e) => console.log(e.nativeEvent.contentOffset.y)}>
|
|
51
|
-
* <Text>Scrollable content</Text>
|
|
52
|
-
* </Screen.ScrollView>
|
|
53
|
-
* ```
|
|
54
|
-
*
|
|
55
|
-
* @example Custom scroll-driven animation
|
|
56
|
-
* ```tsx
|
|
57
|
-
* const headerOpacity = useSharedValue(1);
|
|
58
|
-
* const scrollHandler = useAnimatedScrollHandler({
|
|
59
|
-
* onScroll: (event) => {
|
|
60
|
-
* headerOpacity.value = interpolate(event.contentOffset.y, [0, 100], [1, 0]);
|
|
61
|
-
* // Need a JS-side side effect too? Call scheduleOnRN(fn, ...args) here.
|
|
62
|
-
* },
|
|
63
|
-
* });
|
|
64
|
-
*
|
|
65
|
-
* <Screen.ScrollView scrollHandler={scrollHandler}>
|
|
66
|
-
* <Text>Scrollable content</Text>
|
|
67
|
-
* </Screen.ScrollView>
|
|
23
|
+
* <Screen safeArea="auto" contentPadding="x">
|
|
24
|
+
* <Screen.ScrollView isLoading={isLoading} emptyContent={<Text>Nothing yet</Text>}>
|
|
25
|
+
* {items.map(item => <Row key={item.id} item={item} />)}
|
|
26
|
+
* </Screen.ScrollView>
|
|
27
|
+
* </Screen>
|
|
68
28
|
* ```
|
|
69
29
|
*/
|
|
70
|
-
export declare
|
|
30
|
+
export declare const ScreenScrollView: import("react").ForwardRefExoticComponent<ScreenScrollViewProps & import("react").RefAttributes<import("react-native/types_generated/Libraries/Components/ScrollView/ScrollView").PublicScrollViewInstance>>;
|
|
71
31
|
//# sourceMappingURL=ScreenScrollView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenScrollView.d.ts","sourceRoot":"","sources":["../../../../../src/components/screen/ScreenScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ScreenScrollView.d.ts","sourceRoot":"","sources":["../../../../../src/components/screen/ScreenScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAChF,OAAO,EAAmB,KAAK,eAAe,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAW3G,OAAO,KAAK,EAAwB,qBAAqB,EAAE,MAAM,YAAS,CAAC;AAG3E,qFAAqF;AACrF,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,EAAE,qBAAqB;IACvG,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iEAAiE;IACjE,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,uFAAuF;IACvF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,8MA2D5B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Ref } from "react";
|
|
2
|
+
import type { ScreenScrollRef } from "../ScreenContext.js";
|
|
3
|
+
/** Bind the animated ref and the caller's native ref to the same instance. */
|
|
4
|
+
export declare function useScreenRef<T>(screenRef: ScreenScrollRef | undefined, ref: Ref<T> | undefined): (instance: T | null) => (() => void) | undefined;
|
|
5
|
+
//# sourceMappingURL=use-screen-ref.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-screen-ref.d.ts","sourceRoot":"","sources":["../../../../../../src/components/screen/hooks/use-screen-ref.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAe,MAAM,OAAO,CAAC;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAkB,CAAC;AAExD,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,CAAC,EAAE,SAAS,EAAE,eAAe,GAAG,SAAS,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,cAEhF,CAAC,GAAG,IAAI,8BAgBtB"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ScrollViewProps } from "react-native";
|
|
2
|
+
import { type ScrollHandlerProcessed } from "react-native-reanimated";
|
|
3
|
+
/** Keeps scroll tracking on the UI thread and schedules optional JS callbacks on RN. */
|
|
4
|
+
export declare function useScreenScrollHandler(screenScrollHandler: ScrollHandlerProcessed<Record<string, unknown>>, onScroll?: ScrollViewProps["onScroll"], externalScrollHandler?: ScrollHandlerProcessed<Record<string, unknown>>): (event: Readonly<{
|
|
5
|
+
bubbles: boolean | undefined;
|
|
6
|
+
cancelable: boolean | undefined;
|
|
7
|
+
currentTarget: number | import("react-native").HostInstance;
|
|
8
|
+
defaultPrevented: boolean | undefined;
|
|
9
|
+
dispatchConfig: Readonly<{
|
|
10
|
+
registrationName: string;
|
|
11
|
+
}>;
|
|
12
|
+
eventPhase: number | undefined;
|
|
13
|
+
preventDefault: () => void;
|
|
14
|
+
isDefaultPrevented: () => boolean;
|
|
15
|
+
stopPropagation: () => void;
|
|
16
|
+
isPropagationStopped: () => boolean;
|
|
17
|
+
isTrusted: boolean | undefined;
|
|
18
|
+
nativeEvent: Readonly<{
|
|
19
|
+
contentInset: Readonly<{
|
|
20
|
+
bottom: number;
|
|
21
|
+
left: number;
|
|
22
|
+
right: number;
|
|
23
|
+
top: number;
|
|
24
|
+
}>;
|
|
25
|
+
contentOffset: Readonly<{
|
|
26
|
+
y: number;
|
|
27
|
+
x: number;
|
|
28
|
+
}>;
|
|
29
|
+
contentSize: Readonly<{
|
|
30
|
+
height: number;
|
|
31
|
+
width: number;
|
|
32
|
+
}>;
|
|
33
|
+
layoutMeasurement: Readonly<{
|
|
34
|
+
height: number;
|
|
35
|
+
width: number;
|
|
36
|
+
}>;
|
|
37
|
+
velocity?: Readonly<{
|
|
38
|
+
y: number;
|
|
39
|
+
x: number;
|
|
40
|
+
}>;
|
|
41
|
+
zoomScale?: number;
|
|
42
|
+
responderIgnoreScroll?: boolean;
|
|
43
|
+
targetContentOffset?: Readonly<{
|
|
44
|
+
y: number;
|
|
45
|
+
x: number;
|
|
46
|
+
}>;
|
|
47
|
+
}>;
|
|
48
|
+
persist: () => void;
|
|
49
|
+
target: (number | undefined) | import("react-native").HostInstance;
|
|
50
|
+
timeStamp: number;
|
|
51
|
+
type: string | undefined;
|
|
52
|
+
}>, context?: Record<string, unknown> | undefined) => void;
|
|
53
|
+
//# sourceMappingURL=use-screen-scroll-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-screen-scroll-handler.d.ts","sourceRoot":"","sources":["../../../../../../src/components/screen/hooks/use-screen-scroll-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA2C,eAAe,EAAE,MAAM,cAAc,CAAC;AAE7F,OAAO,EACL,KAAK,sBAAsB,EAG5B,MAAM,yBAAyB,CAAC;AAGjC,wFAAwF;AACxF,wBAAgB,sBAAsB,CACpC,mBAAmB,EAAE,sBAAsB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACpE,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,EACtC,qBAAqB,CAAC,EAAE,sBAAsB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2DAiBxE"}
|
|
@@ -4,9 +4,9 @@ export type { ScreenContextValue } from "./ScreenContext.js";
|
|
|
4
4
|
export { useScreen } from "./ScreenContext.js";
|
|
5
5
|
export type { ScreenFlatListProps } from "./ScreenFlatList.js";
|
|
6
6
|
export { ScreenFlatList } from "./ScreenFlatList.js";
|
|
7
|
-
export type { ScreenListProps } from "./ScreenList.js";
|
|
7
|
+
export type { ScreenCustomListProps, ScreenListAdapterProps, ScreenListProps, ScreenListRenderItemInfo, ScreenListViewToken, } from "./ScreenList.js";
|
|
8
8
|
export { ScreenList } from "./ScreenList.js";
|
|
9
9
|
export type { ScreenScrollViewProps } from "./ScreenScrollView.js";
|
|
10
10
|
export { ScreenScrollView } from "./ScreenScrollView.js";
|
|
11
|
-
export type { ScreenMargins, ScreenScrollableProps } from "./types.js";
|
|
11
|
+
export type { ScreenContentPadding, ScreenMargins, ScreenSafeArea, ScreenScrollableProps } from "./types.js";
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/screen/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAU,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAU,CAAC;AAClC,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAiB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAiB,CAAC;AAC5C,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAkB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAkB,CAAC;AAClD,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/screen/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAU,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAU,CAAC;AAClC,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAiB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAiB,CAAC;AAC5C,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAkB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAkB,CAAC;AAClD,YAAY,EACV,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,EACf,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,iBAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAc,CAAC;AAC1C,YAAY,EAAE,qBAAqB,EAAE,MAAM,uBAAoB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAoB,CAAC;AACtD,YAAY,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,YAAS,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type PropsWithChildren } from "react";
|
|
2
|
+
import type { ScreenSafeAreaEdges } from "../types.js";
|
|
3
|
+
export declare function ScreenFrame({ children, edges }: PropsWithChildren<{
|
|
4
|
+
edges: ScreenSafeAreaEdges;
|
|
5
|
+
}>): import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=ScreenFrame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScreenFrame.d.ts","sourceRoot":"","sources":["../../../../../../src/components/screen/parts/ScreenFrame.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAqC,MAAM,OAAO,CAAC;AAMlF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAU,CAAC;AAIpD,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,iBAAiB,CAAC;IAAE,KAAK,EAAE,mBAAmB,CAAA;CAAE,CAAC,+BA0BjG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type Dispatch, type PropsWithChildren, type SetStateAction } from "react";
|
|
2
|
+
import type { useAnimatedStyle } from "react-native-reanimated";
|
|
3
|
+
type HeaderOpacityStyle = ReturnType<typeof useAnimatedStyle<{
|
|
4
|
+
opacity: number;
|
|
5
|
+
}>>;
|
|
6
|
+
interface HeaderBackground {
|
|
7
|
+
color: string;
|
|
8
|
+
animatedStyle?: HeaderOpacityStyle;
|
|
9
|
+
}
|
|
10
|
+
interface HeaderAppearance {
|
|
11
|
+
background: HeaderBackground | undefined;
|
|
12
|
+
setBackground: Dispatch<SetStateAction<HeaderBackground | undefined>>;
|
|
13
|
+
}
|
|
14
|
+
export declare const ScreenHeaderAppearanceContext: import("react").Context<HeaderAppearance | null>;
|
|
15
|
+
export declare function ScreenHeaderAppearanceProvider({ children }: PropsWithChildren): import("react").JSX.Element;
|
|
16
|
+
/** Only the designated header slot controls the screen's top safe-area color. */
|
|
17
|
+
export declare function ScreenHeaderAppearanceSlot({ children }: PropsWithChildren): import("react").JSX.Element;
|
|
18
|
+
/** Share the overlay's animated style so safe-area fading stays on the UI thread. */
|
|
19
|
+
export declare function useHeaderBackground(color: string, animatedStyle?: HeaderOpacityStyle): void;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=ScreenHeaderAppearance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScreenHeaderAppearance.d.ts","sourceRoot":"","sources":["../../../../../../src/components/screen/parts/ScreenHeaderAppearance.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAKpB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAAC;AAEnF,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,kBAAkB,CAAC;CACpC;AAED,UAAU,gBAAgB;IACxB,UAAU,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACzC,aAAa,EAAE,QAAQ,CAAC,cAAc,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAAC,CAAC;CACvE;AAED,eAAO,MAAM,6BAA6B,kDAA+C,CAAC;AAG1F,wBAAgB,8BAA8B,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,+BAM7E;AAED,iFAAiF;AACjF,wBAAgB,0BAA0B,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,+BAKzE;AAED,qFAAqF;AACrF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,kBAAkB,QAMpF"}
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import type { ReactElement, ReactNode } from "react";
|
|
2
2
|
import type { ScreenScrollableProps } from "../types.js";
|
|
3
3
|
/**
|
|
4
|
-
* Centres a
|
|
5
|
-
*
|
|
6
|
-
* hugging the top, which needs the content container to grow as well.
|
|
4
|
+
* Centres a placeholder in the available space. The parent must also grow
|
|
5
|
+
* to fill the viewport.
|
|
7
6
|
*/
|
|
8
7
|
export declare function ScreenPlaceholder({ children }: {
|
|
9
8
|
children: ReactNode;
|
|
10
9
|
}): import("react").JSX.Element;
|
|
11
|
-
interface
|
|
10
|
+
interface ScreenPlaceholderOptions extends Pick<ScreenScrollableProps, "isLoading" | "loadingContent" | "emptyContent"> {
|
|
12
11
|
/** Whether the container has nothing to render (empty `data`, no children). */
|
|
13
12
|
isEmpty: boolean;
|
|
14
13
|
}
|
|
15
14
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* flight there is nothing to be empty about yet.
|
|
15
|
+
* Resolves the loading or empty placeholder, or null to keep the content.
|
|
16
|
+
* Loading takes precedence over the empty state.
|
|
19
17
|
*/
|
|
20
|
-
export declare function renderScreenPlaceholder({
|
|
18
|
+
export declare function renderScreenPlaceholder({ isLoading, loadingContent, emptyContent, isEmpty, }: ScreenPlaceholderOptions): ReactElement | null;
|
|
21
19
|
export {};
|
|
22
20
|
//# sourceMappingURL=ScreenPlaceholder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenPlaceholder.d.ts","sourceRoot":"","sources":["../../../../../../src/components/screen/parts/ScreenPlaceholder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMrD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAU,CAAC;AAEtD
|
|
1
|
+
{"version":3,"file":"ScreenPlaceholder.d.ts","sourceRoot":"","sources":["../../../../../../src/components/screen/parts/ScreenPlaceholder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMrD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAU,CAAC;AAEtD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAEtE;AAED,UAAU,wBACR,SAAQ,IAAI,CAAC,qBAAqB,EAAE,WAAW,GAAG,gBAAgB,GAAG,cAAc,CAAC;IACpF,+EAA+E;IAC/E,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,cAAc,EACd,YAAY,EACZ,OAAO,GACR,EAAE,wBAAwB,GAAG,YAAY,GAAG,IAAI,CAUhD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PropsWithChildren } from "react";
|
|
2
|
+
import type { ScreenSafeAreaEdges } from "../types.js";
|
|
3
|
+
/** Android combines system and native interface insets and consumes the selected edges. */
|
|
4
|
+
export declare function ScreenSafeArea({ children, edges }: PropsWithChildren<{
|
|
5
|
+
edges: ScreenSafeAreaEdges;
|
|
6
|
+
}>): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=ScreenSafeArea.android.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScreenSafeArea.android.d.ts","sourceRoot":"","sources":["../../../../../../src/components/screen/parts/ScreenSafeArea.android.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAK9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAU,CAAC;AAOpD,2FAA2F;AAC3F,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,iBAAiB,CAAC;IAAE,KAAK,EAAE,mBAAmB,CAAA;CAAE,CAAC,+BAMpG"}
|