@xaui/native 0.9.1-alpha.91 → 0.9.1-alpha.93

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.
Files changed (86) hide show
  1. package/dist/chunk-2SHWOFQV.js +495 -0
  2. package/dist/chunk-3A5RK2R7.js +40 -0
  3. package/dist/chunk-6JAGPPZU.cjs +788 -0
  4. package/dist/chunk-7NQL5DXY.js +302 -0
  5. package/dist/chunk-FTPPUTWL.cjs +40 -0
  6. package/dist/chunk-GGP2ERSV.js +487 -0
  7. package/dist/chunk-LKRQUQZQ.cjs +487 -0
  8. package/dist/chunk-OPLPLFGK.cjs +493 -0
  9. package/dist/{chunk-LIEXFWTN.js → chunk-P5M5URAB.js} +29 -126
  10. package/dist/chunk-XWIPLZTD.cjs +302 -0
  11. package/dist/components/carousel/index.cjs +3 -2
  12. package/dist/components/carousel/index.js +2 -1
  13. package/dist/components/index.d.cts +3 -0
  14. package/dist/components/index.d.ts +3 -0
  15. package/dist/components/number-pad/index.cjs +40 -0
  16. package/dist/components/number-pad/index.d.cts +60 -0
  17. package/dist/components/number-pad/index.d.ts +60 -0
  18. package/dist/components/number-pad/index.js +40 -0
  19. package/dist/components/number-pad/number-pad-action.d.cts +24 -0
  20. package/dist/components/number-pad/number-pad-action.d.ts +24 -0
  21. package/dist/components/number-pad/number-pad-backspace.d.cts +18 -0
  22. package/dist/components/number-pad/number-pad-backspace.d.ts +18 -0
  23. package/dist/components/number-pad/number-pad-cell.d.cts +7 -0
  24. package/dist/components/number-pad/number-pad-cell.d.ts +7 -0
  25. package/dist/components/number-pad/number-pad-icon.d.cts +13 -0
  26. package/dist/components/number-pad/number-pad-icon.d.ts +13 -0
  27. package/dist/components/number-pad/number-pad-key.d.cts +24 -0
  28. package/dist/components/number-pad/number-pad-key.d.ts +24 -0
  29. package/dist/components/number-pad/number-pad-label.d.cts +14 -0
  30. package/dist/components/number-pad/number-pad-label.d.ts +14 -0
  31. package/dist/components/number-pad/number-pad.context.d.cts +18 -0
  32. package/dist/components/number-pad/number-pad.context.d.ts +18 -0
  33. package/dist/components/number-pad/number-pad.d.cts +57 -0
  34. package/dist/components/number-pad/number-pad.d.ts +57 -0
  35. package/dist/components/number-pad/number-pad.recipe.d.cts +11 -0
  36. package/dist/components/number-pad/number-pad.recipe.d.ts +11 -0
  37. package/dist/components/number-pad/number-pad.style.d.cts +13 -0
  38. package/dist/components/number-pad/number-pad.style.d.ts +13 -0
  39. package/dist/components/number-pad/number-pad.type.d.cts +135 -0
  40. package/dist/components/number-pad/number-pad.type.d.ts +135 -0
  41. package/dist/components/number-pad/number-pad.utils.d.cts +34 -0
  42. package/dist/components/number-pad/number-pad.utils.d.ts +34 -0
  43. package/dist/components/pager/index.cjs +33 -0
  44. package/dist/components/pager/index.d.cts +60 -0
  45. package/dist/components/pager/index.d.ts +60 -0
  46. package/dist/components/pager/index.js +33 -0
  47. package/dist/components/pager/pager-content.d.cts +24 -0
  48. package/dist/components/pager/pager-content.d.ts +24 -0
  49. package/dist/components/pager/pager-indicator.d.cts +47 -0
  50. package/dist/components/pager/pager-indicator.d.ts +47 -0
  51. package/dist/components/pager/pager-page.d.cts +16 -0
  52. package/dist/components/pager/pager-page.d.ts +16 -0
  53. package/dist/components/pager/pager.context.d.cts +7 -0
  54. package/dist/components/pager/pager.context.d.ts +7 -0
  55. package/dist/components/pager/pager.d.cts +70 -0
  56. package/dist/components/pager/pager.d.ts +70 -0
  57. package/dist/components/pager/pager.recipe.d.cts +33 -0
  58. package/dist/components/pager/pager.recipe.d.ts +33 -0
  59. package/dist/components/pager/pager.type.d.cts +107 -0
  60. package/dist/components/pager/pager.type.d.ts +107 -0
  61. package/dist/components/rating/index.cjs +30 -0
  62. package/dist/components/rating/index.d.cts +41 -0
  63. package/dist/components/rating/index.d.ts +41 -0
  64. package/dist/components/rating/index.js +30 -0
  65. package/dist/components/rating/rating-icon.d.cts +16 -0
  66. package/dist/components/rating/rating-icon.d.ts +16 -0
  67. package/dist/components/rating/rating-item.d.cts +23 -0
  68. package/dist/components/rating/rating-item.d.ts +23 -0
  69. package/dist/components/rating/rating-star.d.cts +19 -0
  70. package/dist/components/rating/rating-star.d.ts +19 -0
  71. package/dist/components/rating/rating.context.d.cts +16 -0
  72. package/dist/components/rating/rating.context.d.ts +16 -0
  73. package/dist/components/rating/rating.d.cts +59 -0
  74. package/dist/components/rating/rating.d.ts +59 -0
  75. package/dist/components/rating/rating.recipe.d.cts +11 -0
  76. package/dist/components/rating/rating.recipe.d.ts +11 -0
  77. package/dist/components/rating/rating.style.d.cts +24 -0
  78. package/dist/components/rating/rating.style.d.ts +24 -0
  79. package/dist/components/rating/rating.type.d.cts +108 -0
  80. package/dist/components/rating/rating.type.d.ts +108 -0
  81. package/dist/components/rating/rating.utils.d.cts +28 -0
  82. package/dist/components/rating/rating.utils.d.ts +28 -0
  83. package/dist/index.cjs +91 -28
  84. package/dist/index.js +148 -85
  85. package/package.json +31 -1
  86. package/dist/chunk-K5UO3HBW.cjs +0 -1007
@@ -0,0 +1,47 @@
1
+ import { View } from 'react-native';
2
+ /**
3
+ * Which page the reader is on.
4
+ *
5
+ * With no children it draws one dot per page, which is what it is for. Children are the long
6
+ * form — a subset, a label beside them, a shape of your own:
7
+ *
8
+ * ```tsx
9
+ * <Pager.Indicator>
10
+ * {steps.map((step, index) => (
11
+ * <Pager.Dot key={step.id} index={index} />
12
+ * ))}
13
+ * </Pager.Indicator>
14
+ * ```
15
+ *
16
+ * It sits **in the flow**, under the pages. A caller who wants it over them says so —
17
+ * `position="absolute" bottom={16} start={0} end={0}` — which is what the style props are
18
+ * for; absolute by default would have made the common case the one that needs undoing.
19
+ */
20
+ export declare const PagerIndicator: import("react").ForwardRefExoticComponent<Omit<import("react-native").ViewProps, "style"> & Omit<import("../..").ViewStyleProps, keyof import("react-native").ViewProps> & {
21
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
22
+ children?: import("react").ReactNode;
23
+ } & import("react").RefAttributes<View>>;
24
+ /**
25
+ * One dot.
26
+ *
27
+ * **It changes colour, it does not stretch.** That is the difference from
28
+ * `Carousel.Dot`, and it is deliberate rather than a simplification: a page control is a
29
+ * fixed row of marks saying how many screens there are and which one you are on, and a mark
30
+ * that grows makes the row's arithmetic move under a reader who is counting it. The
31
+ * carousel's pill is a *progress* indicator over a series; this is a position among screens.
32
+ *
33
+ * **It follows the drag rather than the settle.** The colour is interpolated from the live
34
+ * scroll offset on the UI thread, so it travels while the finger is still down — which is
35
+ * what makes a reader believe the dots are attached to the thing they are moving. Reading
36
+ * the settled index instead would make it jump once per gesture, after the fact.
37
+ *
38
+ * **A screen reader hears "3 of 5" rather than a label**, through `accessibilityValue`. A dot
39
+ * has no text of its own, and inventing one would be picking a language on behalf of every
40
+ * app that installs this.
41
+ */
42
+ export declare const PagerDot: import("react").ForwardRefExoticComponent<Omit<import("react-native").ViewProps, "style"> & Omit<import("../..").ViewStyleProps, keyof import("react-native").ViewProps> & {
43
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
44
+ children?: import("react").ReactNode;
45
+ } & {
46
+ index: number;
47
+ } & import("react").RefAttributes<View>>;
@@ -0,0 +1,16 @@
1
+ import { View } from 'react-native';
2
+ /**
3
+ * One page.
4
+ *
5
+ * Its size is the **track's**, on both axes, measured rather than given — which is the whole
6
+ * difference between this and a `Carousel.Item`, whose width is a *division* of the track by
7
+ * `itemsPerView` and the gaps. A page given a size in points is a page that is wrong on the
8
+ * next screen.
9
+ *
10
+ * It clips, so content drawn to its edges stops at them instead of bleeding onto the page
11
+ * beside it while the track is mid-travel.
12
+ */
13
+ export declare const PagerPage: import("react").ForwardRefExoticComponent<Omit<import("react-native").ViewProps, "style"> & Omit<import("../..").ViewStyleProps, keyof import("react-native").ViewProps> & {
14
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
15
+ children?: import("react").ReactNode;
16
+ } & import("react").RefAttributes<View>>;
@@ -0,0 +1,16 @@
1
+ import { View } from 'react-native';
2
+ /**
3
+ * One page.
4
+ *
5
+ * Its size is the **track's**, on both axes, measured rather than given — which is the whole
6
+ * difference between this and a `Carousel.Item`, whose width is a *division* of the track by
7
+ * `itemsPerView` and the gaps. A page given a size in points is a page that is wrong on the
8
+ * next screen.
9
+ *
10
+ * It clips, so content drawn to its edges stops at them instead of bleeding onto the page
11
+ * beside it while the track is mid-travel.
12
+ */
13
+ export declare const PagerPage: import("react").ForwardRefExoticComponent<Omit<import("react-native").ViewProps, "style"> & Omit<import("../..").ViewStyleProps, keyof import("react-native").ViewProps> & {
14
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
15
+ children?: import("react").ReactNode;
16
+ } & import("react").RefAttributes<View>>;
@@ -0,0 +1,7 @@
1
+ import type { PagerContextValue } from './pager.type';
2
+ /**
3
+ * R10 — `usePager` is exported so a control beside the pager can drive it (`goTo`) or read
4
+ * where it is, and so a caller can write their own indicator against the same live `offset`
5
+ * the built-in dots read. Outside a `<Pager>` it throws by name.
6
+ */
7
+ export declare const PagerProvider: import("react").Provider<PagerContextValue | null>, usePager: () => PagerContextValue;
@@ -0,0 +1,7 @@
1
+ import type { PagerContextValue } from './pager.type';
2
+ /**
3
+ * R10 — `usePager` is exported so a control beside the pager can drive it (`goTo`) or read
4
+ * where it is, and so a caller can write their own indicator against the same live `offset`
5
+ * the built-in dots read. Outside a `<Pager>` it throws by name.
6
+ */
7
+ export declare const PagerProvider: import("react").Provider<PagerContextValue | null>, usePager: () => PagerContextValue;
@@ -0,0 +1,70 @@
1
+ import { View } from 'react-native';
2
+ /**
3
+ * Whole pages, one at a time — the onboarding flow, the full-screen feed, the gallery a
4
+ * reader swipes through.
5
+ *
6
+ * ```tsx
7
+ * <Pager>
8
+ * <Pager.Content>
9
+ * <Pager.Page><Welcome /></Pager.Page>
10
+ * <Pager.Page><Permissions /></Pager.Page>
11
+ * <Pager.Page><Done /></Pager.Page>
12
+ * </Pager.Content>
13
+ *
14
+ * <Pager.Indicator />
15
+ * </Pager>
16
+ * ```
17
+ *
18
+ * **A page is the track, measured.** Not a prop, and not a fraction of one: a pager's page
19
+ * is the viewport it sits in, on both axes, so it is measured once and handed down. That is
20
+ * also what separates this from the `Carousel`, whose slides are a *division* of the track
21
+ * and which therefore has `itemsPerView`, `peek` and a gap to divide it by.
22
+ *
23
+ * **It has no height of its own** — give it one, `flex={1}` to fill a screen or
24
+ * `height={320}` inside a scroll view. A `flex: 1` in the recipe would have overridden an
25
+ * explicit `height` through RN's zero flex-basis, which is the trap the recipe explains.
26
+ *
27
+ * **It pages rather than snapping.** `pagingEnabled` is React Native's own whole-viewport
28
+ * paging, which is exactly this component's job and exactly what the `Carousel` cannot use.
29
+ *
30
+ * **The pages are yours and the dots are the library's.** `variant`, `color` and `size`
31
+ * reach the dots and nothing else — a pager of screens and a pager of photographs want
32
+ * opposite things inside a page, and the caller is the one who knows which this is.
33
+ *
34
+ * `usePager()` publishes `goTo`, the settled `index` and the live `offset`, so a "Skip"
35
+ * button beside the pager costs no state and an indicator of your own follows the drag.
36
+ */
37
+ export declare const PagerRoot: import("react").ForwardRefExoticComponent<{
38
+ variant?: import("./pager.type").PagerVariant;
39
+ size?: import("./pager.type").PagerSize;
40
+ color?: string;
41
+ orientation?: import("./pager.type").PagerOrientation;
42
+ index?: number;
43
+ defaultIndex?: number;
44
+ onIndexChange?: (index: number) => void;
45
+ isDisabled?: boolean;
46
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
47
+ children?: import("react").ReactNode;
48
+ } & Omit<import("react-native").ViewProps, keyof {
49
+ variant?: import("./pager.type").PagerVariant;
50
+ size?: import("./pager.type").PagerSize;
51
+ color?: string;
52
+ orientation?: import("./pager.type").PagerOrientation;
53
+ index?: number;
54
+ defaultIndex?: number;
55
+ onIndexChange?: (index: number) => void;
56
+ isDisabled?: boolean;
57
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
58
+ children?: import("react").ReactNode;
59
+ }> & Omit<import("../..").ViewStyleProps, keyof {
60
+ variant?: import("./pager.type").PagerVariant;
61
+ size?: import("./pager.type").PagerSize;
62
+ color?: string;
63
+ orientation?: import("./pager.type").PagerOrientation;
64
+ index?: number;
65
+ defaultIndex?: number;
66
+ onIndexChange?: (index: number) => void;
67
+ isDisabled?: boolean;
68
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
69
+ children?: import("react").ReactNode;
70
+ }> & import("react").RefAttributes<View>>;
@@ -0,0 +1,70 @@
1
+ import { View } from 'react-native';
2
+ /**
3
+ * Whole pages, one at a time — the onboarding flow, the full-screen feed, the gallery a
4
+ * reader swipes through.
5
+ *
6
+ * ```tsx
7
+ * <Pager>
8
+ * <Pager.Content>
9
+ * <Pager.Page><Welcome /></Pager.Page>
10
+ * <Pager.Page><Permissions /></Pager.Page>
11
+ * <Pager.Page><Done /></Pager.Page>
12
+ * </Pager.Content>
13
+ *
14
+ * <Pager.Indicator />
15
+ * </Pager>
16
+ * ```
17
+ *
18
+ * **A page is the track, measured.** Not a prop, and not a fraction of one: a pager's page
19
+ * is the viewport it sits in, on both axes, so it is measured once and handed down. That is
20
+ * also what separates this from the `Carousel`, whose slides are a *division* of the track
21
+ * and which therefore has `itemsPerView`, `peek` and a gap to divide it by.
22
+ *
23
+ * **It has no height of its own** — give it one, `flex={1}` to fill a screen or
24
+ * `height={320}` inside a scroll view. A `flex: 1` in the recipe would have overridden an
25
+ * explicit `height` through RN's zero flex-basis, which is the trap the recipe explains.
26
+ *
27
+ * **It pages rather than snapping.** `pagingEnabled` is React Native's own whole-viewport
28
+ * paging, which is exactly this component's job and exactly what the `Carousel` cannot use.
29
+ *
30
+ * **The pages are yours and the dots are the library's.** `variant`, `color` and `size`
31
+ * reach the dots and nothing else — a pager of screens and a pager of photographs want
32
+ * opposite things inside a page, and the caller is the one who knows which this is.
33
+ *
34
+ * `usePager()` publishes `goTo`, the settled `index` and the live `offset`, so a "Skip"
35
+ * button beside the pager costs no state and an indicator of your own follows the drag.
36
+ */
37
+ export declare const PagerRoot: import("react").ForwardRefExoticComponent<{
38
+ variant?: import("./pager.type").PagerVariant;
39
+ size?: import("./pager.type").PagerSize;
40
+ color?: string;
41
+ orientation?: import("./pager.type").PagerOrientation;
42
+ index?: number;
43
+ defaultIndex?: number;
44
+ onIndexChange?: (index: number) => void;
45
+ isDisabled?: boolean;
46
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
47
+ children?: import("react").ReactNode;
48
+ } & Omit<import("react-native").ViewProps, keyof {
49
+ variant?: import("./pager.type").PagerVariant;
50
+ size?: import("./pager.type").PagerSize;
51
+ color?: string;
52
+ orientation?: import("./pager.type").PagerOrientation;
53
+ index?: number;
54
+ defaultIndex?: number;
55
+ onIndexChange?: (index: number) => void;
56
+ isDisabled?: boolean;
57
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
58
+ children?: import("react").ReactNode;
59
+ }> & Omit<import("../..").ViewStyleProps, keyof {
60
+ variant?: import("./pager.type").PagerVariant;
61
+ size?: import("./pager.type").PagerSize;
62
+ color?: string;
63
+ orientation?: import("./pager.type").PagerOrientation;
64
+ index?: number;
65
+ defaultIndex?: number;
66
+ onIndexChange?: (index: number) => void;
67
+ isDisabled?: boolean;
68
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
69
+ children?: import("react").ReactNode;
70
+ }> & import("react").RefAttributes<View>>;
@@ -0,0 +1,33 @@
1
+ import type { SlotStyles } from '../../system/recipe';
2
+ import type { XAUITheme } from '../../theme/theme.type';
3
+ import type { PagerSlot, PagerVariant } from './pager.type';
4
+ /**
5
+ * How far behind the current dot the others sit.
6
+ *
7
+ * **Opacity, not a second colour**, and this is the load-bearing decision in the file. A
8
+ * neutral fill for the unfilled dots — the `Carousel`'s answer, which this copied first — has
9
+ * to contrast with whatever the current one happens to be, and it cannot: `tertiary` puts
10
+ * `surface` against `default`, which is `#ffffff` on `#e4e4e7` in light and two
11
+ * near-identical greys in dark. The variant that exists for a pager over an image was the one
12
+ * whose indicator could not be read.
13
+ *
14
+ * One colour at two opacities cannot collapse like that, whatever the variant, whichever the
15
+ * colour mode, and for any raw `color` a caller invents. It is also what iOS's own page
16
+ * control does.
17
+ *
18
+ * 0.3 rather than 0.5: the dots are seven points across, and at half strength a small mark
19
+ * reads as the current one seen through something rather than as a mark behind it.
20
+ */
21
+ export declare const DOT_REST_OPACITY = 0.3;
22
+ export declare const pagerRecipe: import("../..").Recipe<"content" | "root" | "dot" | "indicator" | "page", PagerVariant, {
23
+ readonly size: {
24
+ readonly xs: (theme: XAUITheme) => SlotStyles<PagerSlot>;
25
+ readonly sm: (theme: XAUITheme) => SlotStyles<PagerSlot>;
26
+ readonly md: (theme: XAUITheme) => SlotStyles<PagerSlot>;
27
+ readonly lg: (theme: XAUITheme) => SlotStyles<PagerSlot>;
28
+ };
29
+ readonly orientation: {
30
+ readonly horizontal: () => SlotStyles<PagerSlot>;
31
+ readonly vertical: () => SlotStyles<PagerSlot>;
32
+ };
33
+ }>;
@@ -0,0 +1,33 @@
1
+ import type { SlotStyles } from '../../system/recipe';
2
+ import type { XAUITheme } from '../../theme/theme.type';
3
+ import type { PagerSlot, PagerVariant } from './pager.type';
4
+ /**
5
+ * How far behind the current dot the others sit.
6
+ *
7
+ * **Opacity, not a second colour**, and this is the load-bearing decision in the file. A
8
+ * neutral fill for the unfilled dots — the `Carousel`'s answer, which this copied first — has
9
+ * to contrast with whatever the current one happens to be, and it cannot: `tertiary` puts
10
+ * `surface` against `default`, which is `#ffffff` on `#e4e4e7` in light and two
11
+ * near-identical greys in dark. The variant that exists for a pager over an image was the one
12
+ * whose indicator could not be read.
13
+ *
14
+ * One colour at two opacities cannot collapse like that, whatever the variant, whichever the
15
+ * colour mode, and for any raw `color` a caller invents. It is also what iOS's own page
16
+ * control does.
17
+ *
18
+ * 0.3 rather than 0.5: the dots are seven points across, and at half strength a small mark
19
+ * reads as the current one seen through something rather than as a mark behind it.
20
+ */
21
+ export declare const DOT_REST_OPACITY = 0.3;
22
+ export declare const pagerRecipe: import("../..").Recipe<"content" | "root" | "dot" | "indicator" | "page", PagerVariant, {
23
+ readonly size: {
24
+ readonly xs: (theme: XAUITheme) => SlotStyles<PagerSlot>;
25
+ readonly sm: (theme: XAUITheme) => SlotStyles<PagerSlot>;
26
+ readonly md: (theme: XAUITheme) => SlotStyles<PagerSlot>;
27
+ readonly lg: (theme: XAUITheme) => SlotStyles<PagerSlot>;
28
+ };
29
+ readonly orientation: {
30
+ readonly horizontal: () => SlotStyles<PagerSlot>;
31
+ readonly vertical: () => SlotStyles<PagerSlot>;
32
+ };
33
+ }>;
@@ -0,0 +1,107 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ScrollViewProps, StyleProp, ViewProps, ViewStyle } from 'react-native';
3
+ import type Animated from 'react-native-reanimated';
4
+ import type { AnimatedRef, SharedValue } from 'react-native-reanimated';
5
+ import type { ViewStyleProps } from '../../system/style-props';
6
+ import type { Size } from '../../theme/theme.type';
7
+ export type PagerSlot = 'root' | 'content' | 'page' | 'indicator' | 'dot' | 'dotActive';
8
+ /**
9
+ * Which way the pages travel. `horizontal` is the onboarding flow and the gallery;
10
+ * `vertical` is the full-screen feed.
11
+ *
12
+ * It is the axis rather than a direction, so it needs no RTL branch: a horizontal pager
13
+ * mirrors with its scroll view, which is React Native's own behaviour.
14
+ */
15
+ export type PagerOrientation = 'horizontal' | 'vertical';
16
+ /**
17
+ * Three, and none of them an intent — a pager reports nothing, it is a way of arranging
18
+ * what does. They name **which colour the current dot takes**, because the dots are the
19
+ * only thing this component paints:
20
+ *
21
+ * - `primary` — the accent. The onboarding flow's answer.
22
+ * - `secondary` — the neutral foreground, for a pager on a plain page.
23
+ * - `tertiary` — the raised surface, which on a light theme is white: the pager over a
24
+ * photograph, where an accent dot disappears into whatever is behind it.
25
+ *
26
+ * `ghost` is absent rather than forgotten. A dot with no fill is not a dot, which is the
27
+ * reason `InputOTP` has no `ghost` either — a box that is not a box is not a box.
28
+ */
29
+ export type PagerVariant = 'primary' | 'secondary' | 'tertiary';
30
+ export type PagerSize = Size;
31
+ type PagerOwnProps = {
32
+ variant?: PagerVariant;
33
+ /** The dots' diameter and the gap between them. Never a page's size. */
34
+ size?: PagerSize;
35
+ /** A raw value (R7) for the current dot. The pages are yours and it never reaches them. */
36
+ color?: string;
37
+ /** @default 'horizontal' */
38
+ orientation?: PagerOrientation;
39
+ /** Which page is shown. Present means controlled. */
40
+ index?: number;
41
+ /** Where it starts when uncontrolled. */
42
+ defaultIndex?: number;
43
+ onIndexChange?: (index: number) => void;
44
+ /** Locks the swipe and the dots. */
45
+ isDisabled?: boolean;
46
+ style?: StyleProp<ViewStyle>;
47
+ children?: ReactNode;
48
+ };
49
+ /** R14 — the pager's own props, `View`'s, and every `ViewStyle` key neither claims. */
50
+ export type PagerProps = PagerOwnProps & Omit<ViewProps, keyof PagerOwnProps | 'style'> & Omit<ViewStyleProps, keyof PagerOwnProps>;
51
+ /** `ScrollView`'s own props win over the `ViewStyle` keys of the same name (R14). */
52
+ export type PagerContentProps = Omit<ScrollViewProps, 'style' | 'children'> & Omit<ViewStyleProps, keyof ScrollViewProps> & {
53
+ style?: StyleProp<ViewStyle>;
54
+ children?: ReactNode;
55
+ };
56
+ /** `View`'s own props win over the `ViewStyle` keys of the same name (R14). */
57
+ export type PagerViewSlotProps = Omit<ViewProps, 'style'> & Omit<ViewStyleProps, keyof ViewProps> & {
58
+ style?: StyleProp<ViewStyle>;
59
+ children?: ReactNode;
60
+ };
61
+ export type PagerDotProps = PagerViewSlotProps & {
62
+ /** Which page this dot stands for. */
63
+ index: number;
64
+ };
65
+ /** How big the track measured — a page is exactly this, on both axes. */
66
+ export type PagerTrackSize = {
67
+ width: number;
68
+ height: number;
69
+ };
70
+ /** R5 — resolved styles and measured numbers, never a token for a slot to resolve again. */
71
+ export type PagerContextValue = {
72
+ contentStyle: StyleProp<ViewStyle>;
73
+ pageStyle: StyleProp<ViewStyle>;
74
+ indicatorStyle: StyleProp<ViewStyle>;
75
+ /**
76
+ * One colour for every dot. What tells the current one from the rest is its opacity, which
77
+ * the dot animates itself — so there is no second colour in here to keep in contrast with
78
+ * the first, and no pair that can collapse into one.
79
+ */
80
+ dotStyle: StyleProp<ViewStyle>;
81
+ orientation: PagerOrientation;
82
+ /** The settled page. */
83
+ index: number;
84
+ /** How many pages the track was given, counted by the track itself. */
85
+ count: number;
86
+ setCount: (count: number) => void;
87
+ /**
88
+ * The track's own size, measured — **the track's, not the root's**. The indicator sits in
89
+ * the flow under the pages, so the root is taller than the box a page has to fill, and a
90
+ * page sized to the root would overflow it by exactly the dots.
91
+ *
92
+ * Zero until it has laid out, which is why the track draws nothing before then.
93
+ */
94
+ track: PagerTrackSize;
95
+ setTrack: (size: PagerTrackSize) => void;
96
+ /** How far one page travels — the track's size on the paging axis. */
97
+ step: number;
98
+ /** Where the track is, live, on the UI thread. */
99
+ offset: SharedValue<number>;
100
+ /** Moves the track and lets its own settle report back. */
101
+ goTo: (index: number) => void;
102
+ /** What the track calls when it crosses onto another page. */
103
+ onSettle: (index: number) => void;
104
+ trackRef: AnimatedRef<Animated.ScrollView>;
105
+ isDisabled: boolean;
106
+ };
107
+ export {};
@@ -0,0 +1,107 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ScrollViewProps, StyleProp, ViewProps, ViewStyle } from 'react-native';
3
+ import type Animated from 'react-native-reanimated';
4
+ import type { AnimatedRef, SharedValue } from 'react-native-reanimated';
5
+ import type { ViewStyleProps } from '../../system/style-props';
6
+ import type { Size } from '../../theme/theme.type';
7
+ export type PagerSlot = 'root' | 'content' | 'page' | 'indicator' | 'dot' | 'dotActive';
8
+ /**
9
+ * Which way the pages travel. `horizontal` is the onboarding flow and the gallery;
10
+ * `vertical` is the full-screen feed.
11
+ *
12
+ * It is the axis rather than a direction, so it needs no RTL branch: a horizontal pager
13
+ * mirrors with its scroll view, which is React Native's own behaviour.
14
+ */
15
+ export type PagerOrientation = 'horizontal' | 'vertical';
16
+ /**
17
+ * Three, and none of them an intent — a pager reports nothing, it is a way of arranging
18
+ * what does. They name **which colour the current dot takes**, because the dots are the
19
+ * only thing this component paints:
20
+ *
21
+ * - `primary` — the accent. The onboarding flow's answer.
22
+ * - `secondary` — the neutral foreground, for a pager on a plain page.
23
+ * - `tertiary` — the raised surface, which on a light theme is white: the pager over a
24
+ * photograph, where an accent dot disappears into whatever is behind it.
25
+ *
26
+ * `ghost` is absent rather than forgotten. A dot with no fill is not a dot, which is the
27
+ * reason `InputOTP` has no `ghost` either — a box that is not a box is not a box.
28
+ */
29
+ export type PagerVariant = 'primary' | 'secondary' | 'tertiary';
30
+ export type PagerSize = Size;
31
+ type PagerOwnProps = {
32
+ variant?: PagerVariant;
33
+ /** The dots' diameter and the gap between them. Never a page's size. */
34
+ size?: PagerSize;
35
+ /** A raw value (R7) for the current dot. The pages are yours and it never reaches them. */
36
+ color?: string;
37
+ /** @default 'horizontal' */
38
+ orientation?: PagerOrientation;
39
+ /** Which page is shown. Present means controlled. */
40
+ index?: number;
41
+ /** Where it starts when uncontrolled. */
42
+ defaultIndex?: number;
43
+ onIndexChange?: (index: number) => void;
44
+ /** Locks the swipe and the dots. */
45
+ isDisabled?: boolean;
46
+ style?: StyleProp<ViewStyle>;
47
+ children?: ReactNode;
48
+ };
49
+ /** R14 — the pager's own props, `View`'s, and every `ViewStyle` key neither claims. */
50
+ export type PagerProps = PagerOwnProps & Omit<ViewProps, keyof PagerOwnProps | 'style'> & Omit<ViewStyleProps, keyof PagerOwnProps>;
51
+ /** `ScrollView`'s own props win over the `ViewStyle` keys of the same name (R14). */
52
+ export type PagerContentProps = Omit<ScrollViewProps, 'style' | 'children'> & Omit<ViewStyleProps, keyof ScrollViewProps> & {
53
+ style?: StyleProp<ViewStyle>;
54
+ children?: ReactNode;
55
+ };
56
+ /** `View`'s own props win over the `ViewStyle` keys of the same name (R14). */
57
+ export type PagerViewSlotProps = Omit<ViewProps, 'style'> & Omit<ViewStyleProps, keyof ViewProps> & {
58
+ style?: StyleProp<ViewStyle>;
59
+ children?: ReactNode;
60
+ };
61
+ export type PagerDotProps = PagerViewSlotProps & {
62
+ /** Which page this dot stands for. */
63
+ index: number;
64
+ };
65
+ /** How big the track measured — a page is exactly this, on both axes. */
66
+ export type PagerTrackSize = {
67
+ width: number;
68
+ height: number;
69
+ };
70
+ /** R5 — resolved styles and measured numbers, never a token for a slot to resolve again. */
71
+ export type PagerContextValue = {
72
+ contentStyle: StyleProp<ViewStyle>;
73
+ pageStyle: StyleProp<ViewStyle>;
74
+ indicatorStyle: StyleProp<ViewStyle>;
75
+ /**
76
+ * One colour for every dot. What tells the current one from the rest is its opacity, which
77
+ * the dot animates itself — so there is no second colour in here to keep in contrast with
78
+ * the first, and no pair that can collapse into one.
79
+ */
80
+ dotStyle: StyleProp<ViewStyle>;
81
+ orientation: PagerOrientation;
82
+ /** The settled page. */
83
+ index: number;
84
+ /** How many pages the track was given, counted by the track itself. */
85
+ count: number;
86
+ setCount: (count: number) => void;
87
+ /**
88
+ * The track's own size, measured — **the track's, not the root's**. The indicator sits in
89
+ * the flow under the pages, so the root is taller than the box a page has to fill, and a
90
+ * page sized to the root would overflow it by exactly the dots.
91
+ *
92
+ * Zero until it has laid out, which is why the track draws nothing before then.
93
+ */
94
+ track: PagerTrackSize;
95
+ setTrack: (size: PagerTrackSize) => void;
96
+ /** How far one page travels — the track's size on the paging axis. */
97
+ step: number;
98
+ /** Where the track is, live, on the UI thread. */
99
+ offset: SharedValue<number>;
100
+ /** Moves the track and lets its own settle report back. */
101
+ goTo: (index: number) => void;
102
+ /** What the track calls when it crosses onto another page. */
103
+ onSettle: (index: number) => void;
104
+ trackRef: AnimatedRef<Animated.ScrollView>;
105
+ isDisabled: boolean;
106
+ };
107
+ export {};
@@ -0,0 +1,30 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+ var _chunkXWIPLZTDcjs = require('../../chunk-XWIPLZTD.cjs');
10
+ require('../../chunk-7EIHHOHP.cjs');
11
+ require('../../chunk-OW4N2C3M.cjs');
12
+ require('../../chunk-7DPL3ZDS.cjs');
13
+ require('../../chunk-GSZDN6EZ.cjs');
14
+ require('../../chunk-FHNIGHN5.cjs');
15
+ require('../../chunk-SL3V7R2Y.cjs');
16
+ require('../../chunk-TVJXC4HY.cjs');
17
+ require('../../chunk-CDRGTUYF.cjs');
18
+ require('../../chunk-H4E4HDEP.cjs');
19
+ require('../../chunk-EJQCQPET.cjs');
20
+ require('../../chunk-IIAQISBG.cjs');
21
+ require('../../chunk-TK44VBIE.cjs');
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+ exports.Rating = _chunkXWIPLZTDcjs.Rating; exports.RatingIcon = _chunkXWIPLZTDcjs.RatingIcon; exports.RatingItem = _chunkXWIPLZTDcjs.RatingItem; exports.RatingRoot = _chunkXWIPLZTDcjs.RatingRoot; exports.ratingRecipe = _chunkXWIPLZTDcjs.ratingRecipe; exports.useRating = _chunkXWIPLZTDcjs.useRating; exports.useRatingLayer = _chunkXWIPLZTDcjs.useRatingLayer;
@@ -0,0 +1,41 @@
1
+ import { RatingIcon } from './rating-icon';
2
+ export declare const Rating: import("react").ForwardRefExoticComponent<{
3
+ variant?: import("./rating.type").RatingVariant;
4
+ size?: import("./rating.type").RatingSize;
5
+ color?: string;
6
+ max?: number;
7
+ value?: number;
8
+ defaultValue?: number;
9
+ onValueChange?: (value: number) => void;
10
+ precision?: number;
11
+ isReadOnly?: boolean;
12
+ isDisabled?: boolean;
13
+ children?: import("react").ReactNode;
14
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
15
+ } & Omit<import("react-native").ViewProps, "style" | "children"> & Omit<import("../..").ViewStyleProps, keyof {
16
+ variant?: import("./rating.type").RatingVariant;
17
+ size?: import("./rating.type").RatingSize;
18
+ color?: string;
19
+ max?: number;
20
+ value?: number;
21
+ defaultValue?: number;
22
+ onValueChange?: (value: number) => void;
23
+ precision?: number;
24
+ isReadOnly?: boolean;
25
+ isDisabled?: boolean;
26
+ children?: import("react").ReactNode;
27
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
28
+ }> & import("react").RefAttributes<import("react-native").View>> & {
29
+ Item: import("react").ForwardRefExoticComponent<Omit<import("../..").PressableFeedbackProps, "isPressed" | "style" | "children" | "layout"> & {
30
+ index: number;
31
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle> | ((state: import("react-native").PressableStateCallbackType) => import("react-native").StyleProp<import("react-native").ViewStyle>);
32
+ children?: import("react").ReactNode;
33
+ } & import("react").RefAttributes<import("react-native").View>>;
34
+ Icon: typeof RatingIcon;
35
+ };
36
+ export { RatingRoot } from './rating';
37
+ export { RatingIcon } from './rating-icon';
38
+ export { RatingItem } from './rating-item';
39
+ export { useRating, useRatingLayer } from './rating.context';
40
+ export { ratingRecipe } from './rating.recipe';
41
+ export type { RatingContextValue, RatingIconProps, RatingItemProps, RatingLayerContextValue, RatingProps, RatingSize, RatingSlot, RatingTone, RatingVariant, } from './rating.type';
@@ -0,0 +1,41 @@
1
+ import { RatingIcon } from './rating-icon';
2
+ export declare const Rating: import("react").ForwardRefExoticComponent<{
3
+ variant?: import("./rating.type").RatingVariant;
4
+ size?: import("./rating.type").RatingSize;
5
+ color?: string;
6
+ max?: number;
7
+ value?: number;
8
+ defaultValue?: number;
9
+ onValueChange?: (value: number) => void;
10
+ precision?: number;
11
+ isReadOnly?: boolean;
12
+ isDisabled?: boolean;
13
+ children?: import("react").ReactNode;
14
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
15
+ } & Omit<import("react-native").ViewProps, "style" | "children"> & Omit<import("../..").ViewStyleProps, keyof {
16
+ variant?: import("./rating.type").RatingVariant;
17
+ size?: import("./rating.type").RatingSize;
18
+ color?: string;
19
+ max?: number;
20
+ value?: number;
21
+ defaultValue?: number;
22
+ onValueChange?: (value: number) => void;
23
+ precision?: number;
24
+ isReadOnly?: boolean;
25
+ isDisabled?: boolean;
26
+ children?: import("react").ReactNode;
27
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
28
+ }> & import("react").RefAttributes<import("react-native").View>> & {
29
+ Item: import("react").ForwardRefExoticComponent<Omit<import("../..").PressableFeedbackProps, "isPressed" | "style" | "children" | "layout"> & {
30
+ index: number;
31
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle> | ((state: import("react-native").PressableStateCallbackType) => import("react-native").StyleProp<import("react-native").ViewStyle>);
32
+ children?: import("react").ReactNode;
33
+ } & import("react").RefAttributes<import("react-native").View>>;
34
+ Icon: typeof RatingIcon;
35
+ };
36
+ export { RatingRoot } from './rating';
37
+ export { RatingIcon } from './rating-icon';
38
+ export { RatingItem } from './rating-item';
39
+ export { useRating, useRatingLayer } from './rating.context';
40
+ export { ratingRecipe } from './rating.recipe';
41
+ export type { RatingContextValue, RatingIconProps, RatingItemProps, RatingLayerContextValue, RatingProps, RatingSize, RatingSlot, RatingTone, RatingVariant, } from './rating.type';