@xaui/native 0.9.1-alpha.4 → 0.9.1-alpha.40

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 (203) hide show
  1. package/dist/chunk-2EGR4LWD.js +145 -0
  2. package/dist/chunk-2NRZKJG7.js +531 -0
  3. package/dist/chunk-2PMXMKS5.js +67 -0
  4. package/dist/chunk-2XPG2243.js +586 -0
  5. package/dist/chunk-36PRYGAM.js +13 -0
  6. package/dist/chunk-3E7CDKFO.cjs +696 -0
  7. package/dist/chunk-3GFRSZYR.js +54 -0
  8. package/dist/chunk-423RQBOX.js +21 -0
  9. package/dist/chunk-4CUZZWFW.js +92 -0
  10. package/dist/chunk-4GTAZM2C.js +174 -0
  11. package/dist/chunk-4KFKWBN5.cjs +89 -0
  12. package/dist/{chunk-3QBT3Q65.cjs → chunk-57SJ4LJF.cjs} +7 -2
  13. package/dist/chunk-5R26NM4M.cjs +402 -0
  14. package/dist/chunk-5VKYNBNA.js +607 -0
  15. package/dist/chunk-64MXEVT3.js +66 -0
  16. package/dist/chunk-6DOLGZVV.cjs +147 -0
  17. package/dist/chunk-6L2TS2R3.cjs +92 -0
  18. package/dist/chunk-6UEZJRVI.js +669 -0
  19. package/dist/chunk-734MFAX4.js +27 -0
  20. package/dist/chunk-73RKQC5X.js +104 -0
  21. package/dist/chunk-7DPL3ZDS.cjs +21 -0
  22. package/dist/chunk-7EIHHOHP.cjs +42 -0
  23. package/dist/chunk-7GHM4GKL.cjs +119 -0
  24. package/dist/chunk-7YF5NAHQ.cjs +74 -0
  25. package/dist/{chunk-X2K2FX3W.js → chunk-A3EGFI6T.js} +6 -1
  26. package/dist/chunk-ABAGZTXZ.cjs +736 -0
  27. package/dist/{chunk-AW63PTQ4.cjs → chunk-ACAPTWE3.cjs} +85 -81
  28. package/dist/chunk-AMCSSOJT.cjs +104 -0
  29. package/dist/chunk-BA2DBSAN.js +102 -0
  30. package/dist/chunk-BRRXFOBY.js +431 -0
  31. package/dist/chunk-C5YLPCFC.cjs +293 -0
  32. package/dist/chunk-DA3OKXHV.cjs +700 -0
  33. package/dist/chunk-DD4276RF.js +366 -0
  34. package/dist/chunk-DG2I4PJG.js +701 -0
  35. package/dist/chunk-DHGLGSH6.js +661 -0
  36. package/dist/chunk-DIBUQ46Y.js +346 -0
  37. package/dist/chunk-EGLLDKN6.js +9 -0
  38. package/dist/chunk-EJQCQPET.cjs +9 -0
  39. package/dist/chunk-EKS3W46M.cjs +66 -0
  40. package/dist/chunk-EZEYMLO3.js +402 -0
  41. package/dist/chunk-F6CQ6CBI.cjs +112 -0
  42. package/dist/chunk-F6W3JQ7K.js +42 -0
  43. package/dist/chunk-FHUYHV6J.js +89 -0
  44. package/dist/chunk-FNEUOBCV.cjs +174 -0
  45. package/dist/chunk-G7P3ERYF.cjs +478 -0
  46. package/dist/chunk-GA6PBWNT.js +147 -0
  47. package/dist/chunk-GFUZ3MUT.cjs +455 -0
  48. package/dist/chunk-GGW43Q37.cjs +1 -0
  49. package/dist/chunk-GTR5X65M.cjs +27 -0
  50. package/dist/chunk-H4E4HDEP.cjs +13 -0
  51. package/dist/chunk-H7DS4IO7.js +198 -0
  52. package/dist/chunk-HDVVZG4S.cjs +198 -0
  53. package/dist/chunk-IKJVLJKT.js +151 -0
  54. package/dist/chunk-J3MB4PI5.cjs +531 -0
  55. package/dist/chunk-K72UDPVN.js +119 -0
  56. package/dist/chunk-KCMYU7WF.js +86 -0
  57. package/dist/chunk-LRN3RNDO.js +940 -0
  58. package/dist/chunk-LTX6TB5I.js +124 -0
  59. package/dist/chunk-LUPCPLND.cjs +145 -0
  60. package/dist/chunk-M63GFNKV.js +194 -0
  61. package/dist/chunk-N3KTZMPG.js +293 -0
  62. package/dist/chunk-NCTOTTVW.js +13 -0
  63. package/dist/chunk-NWGLP6JX.cjs +410 -0
  64. package/dist/chunk-R73XQK7X.cjs +314 -0
  65. package/dist/chunk-RU7JCMWC.cjs +881 -0
  66. package/dist/chunk-SNIHUKDA.cjs +184 -0
  67. package/dist/chunk-T5FV5F7A.cjs +607 -0
  68. package/dist/chunk-TDTUAIFF.cjs +153 -0
  69. package/dist/chunk-TJ74XVZN.cjs +431 -0
  70. package/dist/chunk-TK44VBIE.cjs +194 -0
  71. package/dist/chunk-UAWBAD4E.cjs +346 -0
  72. package/dist/chunk-UFTCTTKK.js +381 -0
  73. package/dist/chunk-WDDXU3OH.cjs +67 -0
  74. package/dist/chunk-WFEMJCXO.cjs +13 -0
  75. package/dist/chunk-WHJTBTYM.js +0 -0
  76. package/dist/{chunk-2KXQATVL.js → chunk-WKCQ6VGW.js} +59 -55
  77. package/dist/chunk-XFPQFCEK.js +455 -0
  78. package/dist/chunk-XSQPVDFH.cjs +60 -0
  79. package/dist/chunk-XTC2SLFT.js +153 -0
  80. package/dist/chunk-XV735BSA.cjs +366 -0
  81. package/dist/chunk-XWNG2U4K.cjs +124 -0
  82. package/dist/chunk-YGYYJ3LQ.js +314 -0
  83. package/dist/chunk-YVHT2UVW.js +74 -0
  84. package/dist/chunk-ZFOOJK37.cjs +86 -0
  85. package/dist/close-button.type-BUYuoSt2.d.ts +36 -0
  86. package/dist/close-button.type-CHsgZ3wO.d.cts +36 -0
  87. package/dist/components/accordion/index.cjs +35 -0
  88. package/dist/components/accordion/index.d.cts +299 -0
  89. package/dist/components/accordion/index.d.ts +299 -0
  90. package/dist/components/accordion/index.js +35 -0
  91. package/dist/components/alert/index.cjs +20 -0
  92. package/dist/components/alert/index.d.cts +169 -0
  93. package/dist/components/alert/index.d.ts +169 -0
  94. package/dist/components/alert/index.js +20 -0
  95. package/dist/components/avatar/index.cjs +16 -0
  96. package/dist/components/avatar/index.d.cts +131 -0
  97. package/dist/components/avatar/index.d.ts +131 -0
  98. package/dist/components/avatar/index.js +16 -0
  99. package/dist/components/badge/index.cjs +15 -0
  100. package/dist/components/badge/index.d.cts +157 -0
  101. package/dist/components/badge/index.d.ts +157 -0
  102. package/dist/components/badge/index.js +15 -0
  103. package/dist/components/button/index.cjs +22 -0
  104. package/dist/components/button/index.d.cts +613 -0
  105. package/dist/components/button/index.d.ts +613 -0
  106. package/dist/components/button/index.js +22 -0
  107. package/dist/components/card/index.cjs +22 -0
  108. package/dist/components/card/index.d.cts +620 -0
  109. package/dist/components/card/index.d.ts +620 -0
  110. package/dist/components/card/index.js +22 -0
  111. package/dist/components/checkbox/index.cjs +26 -0
  112. package/dist/components/checkbox/index.d.cts +1136 -0
  113. package/dist/components/checkbox/index.d.ts +1136 -0
  114. package/dist/components/checkbox/index.js +26 -0
  115. package/dist/components/chip/index.cjs +20 -0
  116. package/dist/components/chip/index.d.cts +608 -0
  117. package/dist/components/chip/index.d.ts +608 -0
  118. package/dist/components/chip/index.js +20 -0
  119. package/dist/components/divider/index.cjs +13 -0
  120. package/dist/components/divider/index.d.cts +117 -0
  121. package/dist/components/divider/index.d.ts +117 -0
  122. package/dist/components/divider/index.js +13 -0
  123. package/dist/components/field-group/index.cjs +27 -0
  124. package/dist/components/field-group/index.d.cts +270 -0
  125. package/dist/components/field-group/index.d.ts +270 -0
  126. package/dist/components/field-group/index.js +27 -0
  127. package/dist/components/input-otp/index.cjs +29 -0
  128. package/dist/components/input-otp/index.d.cts +325 -0
  129. package/dist/components/input-otp/index.d.ts +325 -0
  130. package/dist/components/input-otp/index.js +29 -0
  131. package/dist/components/menu/index.cjs +49 -0
  132. package/dist/components/menu/index.d.cts +351 -0
  133. package/dist/components/menu/index.d.ts +351 -0
  134. package/dist/components/menu/index.js +49 -0
  135. package/dist/components/popover/index.cjs +38 -0
  136. package/dist/components/popover/index.d.cts +254 -0
  137. package/dist/components/popover/index.d.ts +254 -0
  138. package/dist/components/popover/index.js +38 -0
  139. package/dist/components/radio/index.cjs +26 -0
  140. package/dist/components/radio/index.d.cts +1102 -0
  141. package/dist/components/radio/index.d.ts +1102 -0
  142. package/dist/components/radio/index.js +26 -0
  143. package/dist/components/select/index.cjs +50 -0
  144. package/dist/components/select/index.d.cts +498 -0
  145. package/dist/components/select/index.d.ts +498 -0
  146. package/dist/components/select/index.js +50 -0
  147. package/dist/components/skeleton/index.cjs +11 -0
  148. package/dist/components/skeleton/index.d.cts +111 -0
  149. package/dist/components/skeleton/index.d.ts +111 -0
  150. package/dist/components/skeleton/index.js +11 -0
  151. package/dist/components/spinner/index.cjs +17 -0
  152. package/dist/components/spinner/index.d.cts +104 -0
  153. package/dist/components/spinner/index.d.ts +104 -0
  154. package/dist/components/spinner/index.js +17 -0
  155. package/dist/components/switch/index.cjs +27 -0
  156. package/dist/components/switch/index.d.cts +1154 -0
  157. package/dist/components/switch/index.d.ts +1154 -0
  158. package/dist/components/switch/index.js +27 -0
  159. package/dist/components/text-area/index.cjs +14 -0
  160. package/dist/components/text-area/index.d.cts +73 -0
  161. package/dist/components/text-area/index.d.ts +73 -0
  162. package/dist/components/text-area/index.js +14 -0
  163. package/dist/components/text-field/index.cjs +25 -0
  164. package/dist/components/text-field/index.d.cts +205 -0
  165. package/dist/components/text-field/index.d.ts +205 -0
  166. package/dist/components/text-field/index.js +25 -0
  167. package/dist/components/typography/index.cjs +15 -0
  168. package/dist/components/typography/index.d.cts +116 -0
  169. package/dist/components/typography/index.d.ts +116 -0
  170. package/dist/components/typography/index.js +15 -0
  171. package/dist/components/view/index.cjs +17 -0
  172. package/dist/components/view/index.d.cts +152 -0
  173. package/dist/components/view/index.d.ts +152 -0
  174. package/dist/components/view/index.js +17 -0
  175. package/dist/create-recipe-BdVd2ffi.d.ts +114 -0
  176. package/dist/create-recipe-dC7wMfnj.d.cts +114 -0
  177. package/dist/icon.type-Kml72iSz.d.ts +73 -0
  178. package/dist/icon.type-d_i9ma-i.d.cts +73 -0
  179. package/dist/index.cjs +400 -4
  180. package/dist/index.d.cts +118 -4
  181. package/dist/index.d.ts +118 -4
  182. package/dist/index.js +423 -27
  183. package/dist/placement-DHa0Rrh1.d.cts +38 -0
  184. package/dist/placement-DHa0Rrh1.d.ts +38 -0
  185. package/dist/pressable-feedback.type-BA2C9sSz.d.cts +127 -0
  186. package/dist/pressable-feedback.type-Bs4dQlGj.d.ts +127 -0
  187. package/dist/style-props.type-CfnoGEP7.d.cts +31 -0
  188. package/dist/style-props.type-CfnoGEP7.d.ts +31 -0
  189. package/dist/system/index.cjs +73 -4
  190. package/dist/system/index.d.cts +379 -193
  191. package/dist/system/index.d.ts +379 -193
  192. package/dist/system/index.js +87 -18
  193. package/dist/text-field.type-0l73acce.d.ts +167 -0
  194. package/dist/text-field.type-DBh06DU5.d.cts +167 -0
  195. package/dist/theme/index.cjs +5 -3
  196. package/dist/theme/index.d.cts +55 -24
  197. package/dist/theme/index.d.ts +55 -24
  198. package/dist/theme/index.js +4 -2
  199. package/dist/{theme.type-C9bFJKFm.d.cts → theme.type-C2gNHpEx.d.cts} +1 -1
  200. package/dist/{theme.type-C9bFJKFm.d.ts → theme.type-C2gNHpEx.d.ts} +1 -1
  201. package/package.json +254 -18
  202. package/dist/chunk-ECDWSSHJ.js +0 -688
  203. package/dist/chunk-IYFGO523.cjs +0 -688
@@ -1,9 +1,126 @@
1
+ import * as react_native from 'react-native';
2
+ import { StyleProp, ViewStyle, View } from 'react-native';
1
3
  import * as react from 'react';
2
4
  import { ReactNode, Provider, Ref, RefCallback } from 'react';
3
- import * as react_native from 'react-native';
4
- import { PressableProps, StyleProp, ViewStyle, TextStyle } from 'react-native';
5
- import { SharedValue } from 'react-native-reanimated';
6
- import { g as XAUITheme, X as XAUIColors } from '../theme.type-C9bFJKFm.js';
5
+ import { S as SlotAnimation, F as FeedbackContext, a as AnimationProp, b as ResolvedAnimation, P as PressableFeedbackProps } from '../pressable-feedback.type-Bs4dQlGj.js';
6
+ export { A as AnimationConfig, R as RadiusStyle, c as RippleWave } from '../pressable-feedback.type-Bs4dQlGj.js';
7
+ import { R as RadiusKey, X as XAUITheme } from '../theme.type-C2gNHpEx.js';
8
+ import { a as StyleFn, h as SlotStyle } from '../create-recipe-BdVd2ffi.js';
9
+ export { A as Axes, C as CompoundVariant, R as Recipe, d as RecipeConfig, b as ResolveArgs, e as ResolvedSelection, f as ResolvedStyles, g as Selection, S as SlotStyles, i as StateName, j as States, T as TintArgs, V as VariantColors, k as VariantRole, l as VariantTokens, c as createRecipe } from '../create-recipe-BdVd2ffi.js';
10
+ export { C as CloseButtonProps } from '../close-button.type-BUYuoSt2.js';
11
+ import { b as IconComponentProps, a as IconProps, I as IconContextValue } from '../icon.type-Kml72iSz.js';
12
+ import { V as ViewStyleProps } from '../style-props.type-CfnoGEP7.js';
13
+ export { D as DirectionalStyleKey, I as ImageStyleProps, S as StyleProps, T as TextStyleProps } from '../style-props.type-CfnoGEP7.js';
14
+ import * as react_native_reanimated from 'react-native-reanimated';
15
+ import { P as Placement } from '../placement-DHa0Rrh1.js';
16
+
17
+ /**
18
+ * The runtime half of R14. The type half lives in `system/style-props/`, and the two are
19
+ * pinned to each other by a compile-time check there: a React Native upgrade that adds or
20
+ * removes a style key fails `type-check` with the key's name rather than drifting.
21
+ *
22
+ * One set for the three style types rather than one per node. A caller cannot write
23
+ * `fontSize` on a view slot — that slot's props are typed `ViewStyleProps` — so the split
24
+ * never has to know which node it runs for, and every component shares one table.
25
+ */
26
+ declare const STYLE_PROP_KEYS: readonly ["alignContent", "alignItems", "alignSelf", "aspectRatio", "boxSizing", "columnGap", "direction", "display", "flex", "flexBasis", "flexDirection", "flexGrow", "flexShrink", "flexWrap", "gap", "justifyContent", "overflow", "rowGap", "bottom", "end", "inset", "insetBlock", "insetBlockEnd", "insetBlockStart", "insetInline", "insetInlineEnd", "insetInlineStart", "position", "start", "top", "zIndex", "margin", "marginBlock", "marginBlockEnd", "marginBlockStart", "marginBottom", "marginEnd", "marginHorizontal", "marginInline", "marginInlineEnd", "marginInlineStart", "marginStart", "marginTop", "marginVertical", "padding", "paddingBlock", "paddingBlockEnd", "paddingBlockStart", "paddingBottom", "paddingEnd", "paddingHorizontal", "paddingInline", "paddingInlineEnd", "paddingInlineStart", "paddingStart", "paddingTop", "paddingVertical", "height", "maxHeight", "maxWidth", "minHeight", "minWidth", "width", "borderBlockColor", "borderBlockEndColor", "borderBlockStartColor", "borderBottomColor", "borderBottomEndRadius", "borderBottomStartRadius", "borderBottomWidth", "borderColor", "borderCurve", "borderEndColor", "borderEndEndRadius", "borderEndStartRadius", "borderEndWidth", "borderRadius", "borderStartColor", "borderStartEndRadius", "borderStartStartRadius", "borderStartWidth", "borderStyle", "borderTopColor", "borderTopEndRadius", "borderTopStartRadius", "borderTopWidth", "borderWidth", "backfaceVisibility", "backgroundColor", "boxShadow", "cursor", "elevation", "experimental_backgroundImage", "filter", "isolation", "mixBlendMode", "opacity", "outlineColor", "outlineOffset", "outlineStyle", "outlineWidth", "shadowColor", "shadowOffset", "shadowOpacity", "shadowRadius", "rotation", "scaleX", "scaleY", "transform", "transformMatrix", "transformOrigin", "translateX", "translateY", "color", "fontFamily", "fontSize", "fontStyle", "fontVariant", "fontWeight", "includeFontPadding", "letterSpacing", "lineHeight", "textAlign", "textAlignVertical", "textDecorationColor", "textDecorationLine", "textDecorationStyle", "textShadowColor", "textShadowOffset", "textShadowRadius", "textTransform", "userSelect", "verticalAlign", "writingDirection", "objectFit", "overlayColor", "resizeMode", "tintColor"];
27
+ type StylePropKey = (typeof STYLE_PROP_KEYS)[number];
28
+ /** What `splitStyleProps` takes out of a props object. */
29
+ type StylePropsOf<P> = Pick<P, Extract<keyof P, StylePropKey>>;
30
+ /** What it leaves in it. */
31
+ type RestPropsOf<P> = Omit<P, StylePropKey>;
32
+
33
+ /**
34
+ * `splitStyleProps`, memoized on the values (R14). A component calls it on what is left
35
+ * after destructuring its own props, applies the style half between the tint and its
36
+ * `style`, and forwards the rest:
37
+ *
38
+ * ```tsx
39
+ * const [styleProps, rest] = useStyleProps(props)
40
+ * <Pressable style={[styles.root, tint, styleProps, style]} {...rest} />
41
+ * ```
42
+ *
43
+ * The identity is stable while the values are, which is what a memoized child or an
44
+ * animated style depends on. It is keyed on a hash rather than on the object, because the
45
+ * object is a fresh rest-spread on every render and would never hit.
46
+ */
47
+ declare function useStyleProps<P extends object>(props: P): [StylePropsOf<P>, RestPropsOf<P>];
48
+
49
+ /**
50
+ * The chevron the library ships, rather than requiring one from the caller: a control
51
+ * whose whole affordance is "there is more under here" cannot be written without it, and
52
+ * asking for an icon package to draw one arrow is a peer dependency for a chevron.
53
+ *
54
+ * It sits in `system/` because two components draw it — `Select` turns it half a turn
55
+ * when its list opens, `Accordion` when its panel does. §2 bis: promotion at the second
56
+ * use, never by anticipation.
57
+ */
58
+ declare function ChevronDownIcon({ size, color, }: IconComponentProps): react.JSX.Element;
59
+ declare namespace ChevronDownIcon {
60
+ var displayName: string;
61
+ }
62
+
63
+ /**
64
+ * The gap nobody else closes: an icon is a third-party component, so a slot context does
65
+ * not reach it and every call site ends up computing the colour by hand.
66
+ *
67
+ * ```tsx
68
+ * <Button variant="danger">
69
+ * <Button.Icon as={TrashIcon} /> {/* colour and size inherited, nothing to pass *\/}
70
+ * <Button.Label>Supprimer</Button.Label>
71
+ * </Button>
72
+ * ```
73
+ *
74
+ * Three accepted forms — a component through `as`, a raw SVG as children, or an image
75
+ * through `source` — and the resolution is the same for all three: an explicit prop, else
76
+ * what the surrounding slot published, else the theme.
77
+ *
78
+ * The props are taken whole rather than destructured, because they are a union: which
79
+ * keys exist depends on the form, and narrowing is what lets `style` be reachable in the
80
+ * one branch that renders a node and unwritable in the two that do not.
81
+ */
82
+ declare function Icon(props: IconProps): react.JSX.Element;
83
+ declare namespace Icon {
84
+ var displayName: string;
85
+ }
86
+
87
+ /**
88
+ * Not a `createSlotContext`: that one throws outside its parent, and an `Icon` has to
89
+ * work on its own as much as inside a `Button`. An empty context is the honest default —
90
+ * nothing inherited, so the theme decides.
91
+ */
92
+ declare const IconContext: react.Context<IconContextValue>;
93
+ declare function useIconContext(): IconContextValue;
94
+
95
+ /**
96
+ * The `radius` axis, which is the same ten lines in every component that has one — a key
97
+ * of the radius scale, applied to one slot, overriding whatever `size` chose.
98
+ *
99
+ * It is written here rather than a third time in a recipe because that is the rule §2 bis
100
+ * states: extract at the second use, and by the end of P3 this axis exists in a dozen
101
+ * components. Nothing about it is component-specific except which slot carries the corner.
102
+ *
103
+ * ```ts
104
+ * variants: { size: { … }, radius: radiusAxis('root') }
105
+ * ```
106
+ *
107
+ * **More than one slot when a second node has to square off with the first.** A `Switch`
108
+ * whose track lost its capsule and kept a circular knob is half-rounded, so the axis moves
109
+ * both: `radiusAxis('track', 'thumb')`.
110
+ *
111
+ * The same named corner on each, not an inset-corrected one. Nesting rules would say the
112
+ * inner radius is the outer less the gap, but here that reaches zero before the outer does
113
+ * — at `xs` a 3pt track would hold a sharp-cornered knob — and two matched corners read
114
+ * better than one correct one.
115
+ *
116
+ * Variadic rather than an array because every call but that one passes a single slot, and
117
+ * `radiusAxis('root')` reads better than `radiusAxis(['root'])`.
118
+ *
119
+ * The return type is a full `Record<RadiusKey, …>` rather than a partial one, so
120
+ * `createRecipe` still infers `radius="3xl"` as the axis's value union and a typo in a
121
+ * caller's `radius` is a type error rather than a silently ignored key.
122
+ */
123
+ declare function radiusAxis<Slot extends string>(...slots: Slot[]): Record<RadiusKey, StyleFn<Slot>>;
7
124
 
8
125
  type PortalProps = {
9
126
  children: ReactNode;
@@ -27,6 +144,19 @@ declare namespace Portal {
27
144
  type PortalMethods = {
28
145
  addPortal: (key: string, element: ReactNode) => void;
29
146
  removePortal: (key: string) => void;
147
+ /**
148
+ * Where the host's own view sits in the window, in points.
149
+ *
150
+ * An overlay is measured against a trigger that reports window coordinates, but it is
151
+ * rendered inside this host — so it is laid out against the host's origin, not the
152
+ * window's. Anything the two differ by (a status bar, a safe-area inset, a host mounted
153
+ * below a header) is exactly the distance the overlay would be wrong by. Subtracting it
154
+ * is what makes `measureInWindow` on the trigger mean the same thing on both sides.
155
+ */
156
+ origin: {
157
+ x: number;
158
+ y: number;
159
+ };
30
160
  };
31
161
  /**
32
162
  * `null` outside a host, and `Portal` treats that as "render nothing" rather than
@@ -35,137 +165,103 @@ type PortalMethods = {
35
165
  */
36
166
  declare const PortalContext: react.Context<PortalMethods | null>;
37
167
 
38
- type PortalHostProps = {
168
+ /** R14 it renders a view of its own, so it takes that view's style keys as props. */
169
+ type PortalHostProps = ViewStyleProps & {
39
170
  children: ReactNode;
40
171
  };
41
172
  /**
42
173
  * Where every `Portal` in the tree below renders. Mounted once, at the root of the app,
43
174
  * above navigation — an overlay that renders inside a screen is clipped by it.
44
175
  */
45
- declare function PortalHost({ children }: PortalHostProps): react.JSX.Element;
176
+ declare function PortalHost({ children, ...props }: PortalHostProps): react.JSX.Element;
46
177
  declare namespace PortalHost {
47
178
  var displayName: string;
48
179
  }
49
180
 
50
- /**
51
- * What the root does under the finger. `scale-highlight` and `scale-ripple` mount their
52
- * overlay themselves; `scale` mounts none, which is what a root picks when it renders its
53
- * own `<PressableFeedback.Highlight>` to style it (R1: no prop reaches into another
54
- * component's insides).
55
- */
56
- type FeedbackVariant = 'scale-highlight' | 'scale-ripple' | 'scale' | 'none';
57
- type AnimationConfig = {
58
- scale?: boolean;
59
- highlight?: boolean;
60
- ripple?: boolean;
61
- };
62
- /**
63
- * `false` and `'disabled'` turn this component's animations off. `'disable-all'` turns
64
- * them off for its descendants too — a long list kills every row's worklets with one
65
- * prop instead of threading it down. An object switches them off one at a time.
66
- */
67
- type AnimationProp = boolean | 'disabled' | 'disable-all' | AnimationConfig;
68
- /** `animation` once normalised — what the components actually read. */
69
- type ResolvedAnimation = {
70
- scale: boolean;
71
- highlight: boolean;
72
- ripple: boolean;
73
- /** True when every sub-animation is off: the branch that mounts no worklet at all. */
74
- none: boolean;
75
- /** Propagated to descendants through context. */
76
- disableAll: boolean;
77
- };
78
- type PressableFeedbackProps = Omit<PressableProps, 'style' | 'children' | 'disabled'> & {
79
- /** Controlled: the root owns the state, because its recipe resolves on it (R5). */
80
- isPressed?: boolean;
81
- /** R8: `disabled` is not part of the public vocabulary, `isX` is. */
82
- isDisabled?: boolean;
83
- /**
84
- * Merge into the single child instead of rendering a pressable (R12) — **keeping the
85
- * feedback**. Swapping this component out for a bare `Slot` would silently drop the
86
- * touch feedback of every `asChild` control.
87
- */
88
- asChild?: boolean;
89
- feedbackVariant?: FeedbackVariant;
90
- animation?: AnimationProp;
181
+ type PressableFeedbackHighlightProps = ViewStyleProps & {
91
182
  style?: StyleProp<ViewStyle>;
183
+ animation?: SlotAnimation;
92
184
  /**
93
- * `Pressable`'s function form is dropped on purpose. It exists to hand the press state
94
- * to children; here the root above already owns that state and this publishes it
95
- * through context, so the function form would be a second, quieter source of truth.
185
+ * The content the wash sits under. Optional: `<Highlight />` on its own is an overlay
186
+ * among the root's other children, and the root hoists it so order does not matter.
96
187
  */
97
188
  children?: ReactNode;
98
189
  };
99
- /**
100
- * A slot's own animation, overriding the blanket one on the root. `false` switches that
101
- * slot off; the object tunes it. Deliberately two knobs rather than a full timing
102
- * surface — anything past this is a different animation, and that is a component's job,
103
- * not a prop's.
104
- */
105
- type SlotAnimation = boolean | {
106
- /** Milliseconds. Falls back to the shared press timing. */
107
- duration?: number;
108
- /** How far the overlay goes at full press, 0 to 1. */
109
- opacity?: number;
110
- };
111
- type FeedbackContext = {
112
- isPressed: boolean;
113
- animation: ResolvedAnimation;
114
- /** Absent on the static branch, where nothing animates and no worklet is mounted. */
115
- progress?: SharedValue<number>;
116
- /**
117
- * Bumped on every press-in. The ripple starts from this rather than from a `useEffect`
118
- * on `isPressed`: a one-shot driven by a boolean depends on React re-rendering between
119
- * the two touch events, and starting it from the event that carries the coordinates is
120
- * both simpler and impossible to miss.
121
- */
122
- pressCount?: SharedValue<number>;
123
- /** Where the finger landed, and how big the root is — the ripple needs both. */
124
- origin?: SharedValue<{
125
- x: number;
126
- y: number;
127
- }>;
128
- size?: SharedValue<{
129
- width: number;
130
- height: number;
131
- }>;
132
- };
133
-
134
- type PressableFeedbackHighlightProps = {
135
- style?: StyleProp<ViewStyle>;
136
- /** Overrides the blanket `animation` on the root, for this overlay only. */
137
- animation?: SlotAnimation;
138
- };
139
190
  /**
140
191
  * The press wash: one flat overlay fading in under the finger.
141
192
  *
142
193
  * It is a **neutral** wash, not the variant's pressed colour. A component picks one or
143
194
  * the other — this overlay, or a `pressed` state in its recipe swapping `bg` for
144
195
  * `bgPressed` — never both, or a pressed button darkens twice.
196
+ *
197
+ * **Wrapping is the readable form**, and it costs nothing:
198
+ *
199
+ * ```tsx
200
+ * <PressableFeedback style={{ flexDirection: 'row', gap: 8 }}>
201
+ * <PressableFeedback.Highlight>
202
+ * <Icon />
203
+ * <Label />
204
+ * </PressableFeedback.Highlight>
205
+ * </PressableFeedback>
206
+ * ```
207
+ *
208
+ * The children are **not** put inside a box. They are returned as siblings of the wash in
209
+ * a fragment, which has no presence in the host tree — so the root's `flexDirection`,
210
+ * `gap` and `alignItems` still reach the icon and the label directly, and the rendered
211
+ * tree is identical to writing the wash as a bare sibling. A real wrapping `View` would
212
+ * have made the root's layout apply to the wrapper instead, and would have added the depth
213
+ * §8 removed.
145
214
  */
146
- declare function PressableFeedbackHighlight({ style, animation: override, }: PressableFeedbackHighlightProps): react.JSX.Element;
215
+ declare function PressableFeedbackHighlight({ style, animation: override, children, ...props }: PressableFeedbackHighlightProps): react.JSX.Element;
147
216
  declare namespace PressableFeedbackHighlight {
148
217
  var displayName: string;
149
218
  }
150
219
 
151
- type PressableFeedbackRippleProps = {
220
+ type PressableFeedbackRippleProps = ViewStyleProps & {
221
+ /** Applies to the wave itself, not to the container that clips it. */
152
222
  style?: StyleProp<ViewStyle>;
153
- /** Overrides the blanket `animation` on the root, for this overlay only. */
154
223
  animation?: SlotAnimation;
224
+ /**
225
+ * The content the wave washes under. Optional: `<Ripple />` on its own is an overlay
226
+ * among the root's other children, and the root hoists it so order does not matter.
227
+ */
228
+ children?: ReactNode;
155
229
  };
156
230
  /**
157
231
  * A circle washing outwards from where the finger landed.
158
232
  *
159
- * It is a **one-shot, independent of how long the press lasts**: the wave runs its course
160
- * and ends, the way a ripple in water does. Tying it to the press would leave a disc
161
- * parked on the control for as long as a finger rests there.
233
+ * **The root drives it, this only draws it.** The root is the touch surface: touches on a
234
+ * component's own children a button's label bubble up to the `Pressable`, and never to
235
+ * this overlay, which is their sibling rather than their parent. An overlay owning the
236
+ * handlers works on the padding and does nothing on the text, which is the kind of bug that
237
+ * looks like a rendering problem.
238
+ *
239
+ * Its ink and its corners come from the root, which reads both off its own style — only
240
+ * the root knows what the wave sits on, or what shape it has to stay inside.
241
+ *
242
+ * **Wrapping is the readable form**, and it costs nothing:
162
243
  *
163
- * It needs the root to clip — `PressableFeedback` sets `overflow: 'hidden'` when it
164
- * mounts one and it renders nothing on the static branch: a ripple that cannot expand
165
- * is a coloured disc sitting on the control, which reads as a defect rather than as
166
- * reduced motion.
244
+ * ```tsx
245
+ * <PressableFeedback style={{ flexDirection: 'row', gap: 8 }}>
246
+ * <PressableFeedback.Ripple>
247
+ * <Icon />
248
+ * <Label />
249
+ * </PressableFeedback.Ripple>
250
+ * </PressableFeedback>
251
+ * ```
252
+ *
253
+ * The children are **not** put inside a box. They come back as siblings of the wave's
254
+ * container in a fragment, which has no presence in the host tree — so the root's
255
+ * `flexDirection`, `gap` and `alignItems` still reach the icon and the label directly, and
256
+ * the rendered tree is identical to writing the wave as a bare sibling. Written on its own,
257
+ * `<Ripple />` is that bare sibling, and the root hoists it so order does not matter.
258
+ *
259
+ * The motion is Material's `InkRipple`, and the parts that matter are the ones that are not
260
+ * obvious: the ink is **independent of the expansion**, the circle **starts at 30%** of its
261
+ * target rather than at a point, the target is **half the diagonal**, and the centre
262
+ * **travels** from the finger to the middle of the control. The constants carry the why.
167
263
  */
168
- declare function PressableFeedbackRipple({ style, animation: override, }: PressableFeedbackRippleProps): react.JSX.Element | null;
264
+ declare function PressableFeedbackRipple({ style, animation: override, children, ...props }: PressableFeedbackRippleProps): react.JSX.Element;
169
265
  declare namespace PressableFeedbackRipple {
170
266
  var displayName: string;
171
267
  }
@@ -173,24 +269,66 @@ declare namespace PressableFeedbackRipple {
173
269
  declare const useFeedback: () => FeedbackContext;
174
270
 
175
271
  /**
176
- * The values the v0 tree shipped with (`Animated.spring` to `0.975`, `bounciness: 0`,
177
- * over roughly 100ms). Kept identical on purpose: the touch feedback is the part of a
178
- * library users feel rather than read, and changing its timing in a rewrite would be a
179
- * regression nobody asked for. `bounciness: 0` is why a duration replaces the spring
180
- * a spring with no bounce is a curve.
272
+ * What marks a component as a press overlay.
273
+ *
274
+ * `Symbol.for` rather than a boolean field or an identity check against our own two
275
+ * components: the registry is global, so two copies of `@xaui/native` in one tree still
276
+ * agree on what an overlay is, and a third party writing their own overlay — anything that
277
+ * reads `useFeedback()` and paints under the content — opts into the same treatment
278
+ * instead of being a second-class citizen.
181
279
  */
182
- declare const PRESS_SCALE = 0.975;
183
- declare const PRESS_DURATION = 100;
184
- declare const RELEASE_DURATION = 150;
185
- /** How far the wash and the ripple go at full press. */
186
- declare const HIGHLIGHT_OPACITY = 0.08;
187
- declare const RIPPLE_OPACITY = 0.12;
188
- declare const RIPPLE_DURATION = 350;
280
+ declare const FEEDBACK_OVERLAY: unique symbol;
281
+ /** Tags a component so `PressableFeedback` paints it under its content. */
282
+ declare function markOverlay<T extends object>(component: T): T;
283
+
189
284
  /**
190
- * The circle's radius as a multiple of the control's diagonal. Above 1 it covers from
191
- * any point on the control, so where the finger landed never enters the calculation.
285
+ * How far a control shrinks under the finger **before** the width coefficient below.
286
+ *
287
+ * The v0 tree shrank everything to a flat `0.975`, which is why a wide button read as
288
+ * lurching: a ratio applied to a 360pt row moves nine points, and the same ratio on a
289
+ * 96pt chip moves two. What the eye reads is the displacement, not the ratio.
192
290
  */
193
- declare const RIPPLE_COVERAGE = 1.25;
291
+ declare const PRESS_SCALE = 0.985;
292
+ declare const PRESS_DURATION = 300;
293
+ /**
294
+ * The width at which `PRESS_SCALE` is applied as written. Wider controls shrink
295
+ * proportionally less, narrower ones more, so the movement stays roughly constant in
296
+ * points across a 96pt chip and a full-width button.
297
+ */
298
+ declare const SCALE_REFERENCE_WIDTH = 300;
299
+ /** The scale a control of `width` should reach when pressed. */
300
+ declare function pressScaleFor(width: number): number;
301
+ /** How far the wash goes at full press, and how long it takes to get there. */
302
+ declare const HIGHLIGHT_OPACITY = 0.1;
303
+ declare const HIGHLIGHT_DURATION = 200;
304
+ /**
305
+ * The ripple, taken from Material's reference implementation (`InkRipple`) rather than
306
+ * approximated. Four of its numbers are load-bearing and none of them is obvious:
307
+ *
308
+ * - **The opacity is not tied to the expansion.** It reaches full ink in 75ms and stays
309
+ * there while the circle keeps growing. Tying the two — the obvious thing to write —
310
+ * means the ink is faintest exactly when the circle is small enough to be read as a
311
+ * circle, which is why such a ripple looks like nothing at all.
312
+ * - **The circle starts at 30% of its target**, not at a point. A wave from a dot spends
313
+ * its visible life too small to see.
314
+ * - **The target radius is half the diagonal**, which is what covers the box. Larger and
315
+ * the edge leaves the control before the eye catches it, so the effect reads as the
316
+ * surface tinting rather than as something spreading.
317
+ * - **The centre travels** from the finger to the middle of the control as it opens, which
318
+ * is what makes it settle into the control instead of flooding out of a corner.
319
+ *
320
+ * The expansion runs a full second while the finger is down, and finishes in 225ms once it
321
+ * lifts — the wave catches up rather than being cut.
322
+ */
323
+ declare const RIPPLE_OPACITY = 0.1;
324
+ declare const RIPPLE_START_SCALE = 0.3;
325
+ declare const RIPPLE_EXPAND_DURATION = 1000;
326
+ declare const RIPPLE_CONFIRM_DURATION = 225;
327
+ declare const RIPPLE_FADE_IN = 75;
328
+ declare const RIPPLE_FADE_OUT_DELAY = 225;
329
+ declare const RIPPLE_FADE_OUT = 150;
330
+ /** Half the diagonal covers the box from its centre; the 5 is Material's own overshoot. */
331
+ declare function rippleRadiusFor(width: number, height: number): number;
194
332
  /**
195
333
  * One shape out of four accepted ones, so the components read a record instead of
196
334
  * re-deciding what `'disable-all'` meant.
@@ -211,11 +349,16 @@ type ResolvedSlotAnimation = {
211
349
  */
212
350
  declare function resolveSlotAnimation(override: SlotAnimation | undefined, enabledByRoot: boolean, defaultOpacity: number, defaultDuration?: number): ResolvedSlotAnimation;
213
351
 
214
- declare const PressableFeedback: react.ForwardRefExoticComponent<Omit<react_native.PressableProps, "children" | "style" | "disabled"> & {
352
+ /**
353
+ * The root scales; what else happens under the finger is **composed**, not named by a
354
+ * prop. An overlay a caller can reach is an overlay a caller can place, style and switch
355
+ * off — and it is the only shape that survives `asChild`, where the caller's own element
356
+ * is the pressable and there is no sibling for the primitive to inject.
357
+ */
358
+ declare const PressableFeedback: react.ForwardRefExoticComponent<Omit<react_native.PressableProps, "style" | "children" | "disabled"> & ViewStyleProps & {
215
359
  isPressed?: boolean;
216
360
  isDisabled?: boolean;
217
361
  asChild?: boolean;
218
- feedbackVariant?: FeedbackVariant;
219
362
  animation?: AnimationProp;
220
363
  style?: react_native.StyleProp<react_native.ViewStyle>;
221
364
  children?: react.ReactNode;
@@ -224,84 +367,38 @@ declare const PressableFeedback: react.ForwardRefExoticComponent<Omit<react_nati
224
367
  Ripple: typeof PressableFeedbackRipple;
225
368
  };
226
369
 
227
- /**
228
- * A slot is a view or a text node, and a recipe writes one object per slot, so the two
229
- * RN style shapes are merged rather than discriminated per slot.
230
- */
231
- type SlotStyle = ViewStyle & TextStyle;
232
- type SlotStyles<Slot extends string> = Partial<Record<Slot, SlotStyle>>;
233
- /** The roles a variant consumes. The variant names tokens; `paint` says where they land. */
234
- type VariantRole = 'bg' | 'bgPressed' | 'fg' | 'border';
235
- /** Token names per role — no colour value ever appears in a recipe. */
236
- type VariantTokens = Partial<Record<VariantRole, keyof XAUIColors>>;
237
- /** The same roles resolved: theme colours, or the slices of a raw `color`. */
238
- type VariantColors = Partial<Record<VariantRole, string>>;
239
- /**
240
- * `disabled` is applied last of the three: a control that is both pressed and disabled
241
- * has to read disabled.
242
- */
243
- type StateName = 'focused' | 'pressed' | 'disabled';
244
- type States = Partial<Record<StateName, boolean>>;
245
- /** Reads the theme and the variant's resolved colours; returns one style per slot. */
246
- type StyleFn<Slot extends string> = (theme: XAUITheme, colors: VariantColors) => SlotStyles<Slot>;
247
- /** Named axes of finite token values — `{ size: { sm: fn, md: fn } }`. */
248
- type Axes<Slot extends string> = Record<string, Record<string, StyleFn<Slot>>>;
249
- /** One value per axis, plus the variant. Missing keys fall back to `defaultVariants`. */
250
- type Selection<Variant extends string, A extends Axes<string>> = {
251
- variant?: Variant;
252
- } & {
253
- [Axis in keyof A]?: Extract<keyof A[Axis], string>;
254
- };
255
- type CompoundVariant<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
256
- when: Selection<Variant, A>;
257
- style: StyleFn<Slot>;
258
- };
259
- type RecipeConfig<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
260
- /** Every slot the component publishes. Slots a recipe never styles resolve to `{}`. */
261
- slots: readonly Slot[];
262
- base?: StyleFn<Slot>;
263
- variantTokens?: Record<Variant, VariantTokens>;
264
- /** Where the variant's colours land — written once, and it holds for every variant. */
265
- paint?: StyleFn<Slot>;
266
- variants?: A;
267
- compoundVariants?: ReadonlyArray<CompoundVariant<Slot, Variant, A>>;
268
- states?: Partial<Record<StateName, StyleFn<Slot>>>;
269
- defaultVariants?: Selection<Variant, A>;
370
+ type SelectionFillProps = {
371
+ /** Whether the control is on. The fill is the answer, and the mark rides on it. */
372
+ isVisible: boolean;
373
+ /** The resolved style of the host component's `fill` slot (R5). */
374
+ style: StyleProp<ViewStyle>;
375
+ /** `false` shows the fill without the fade and the scale, and mounts no worklet. */
376
+ animation?: boolean;
377
+ /** The mark a check, a dash, a dot. It appears with the fill, never before it. */
378
+ children?: ReactNode;
270
379
  };
271
- /** Stable references: the same object for the same tokens, for the app's lifetime. */
272
- type ResolvedStyles<Slot extends string> = Readonly<Record<Slot, SlotStyle>>;
273
- /** A selection with `defaultVariants` already folded in, keyed by axis name. */
274
- type ResolvedSelection = Readonly<Record<string, string | undefined>>;
275
380
 
276
- type ResolveArgs<Variant extends string, A extends Axes<string>> = {
277
- theme: XAUITheme;
278
- selection?: Selection<Variant, A>;
279
- states?: States;
280
- };
281
- type TintArgs<Variant extends string, A extends Axes<string>> = ResolveArgs<Variant, A> & {
282
- color: string;
283
- };
284
- type Recipe<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
285
- readonly slots: readonly Slot[];
286
- /** The cached pass: stable `StyleSheet` references, keyed by tokens alone. */
287
- resolve(args: ResolveArgs<Variant, A>): ResolvedStyles<Slot>;
288
- /**
289
- * The tint pass: the same functions run again with `color`'s slices in place of the
290
- * theme's tokens. Uncached and allocating, and only ever called when `color` is set.
291
- */
292
- tint(args: TintArgs<Variant, A>): SlotStyles<Slot>;
293
- };
294
381
  /**
295
- * A component's style, declared once. Resolution splits in two because the two halves
296
- * have different lifetimes: everything keyed by a finite token is cached forever, and
297
- * an arbitrary `color` is recomputed per render — which is what keeps the cache bounded
298
- * by the number of token combinations rather than by the palette users invent.
299
- *
300
- * const styles = buttonRecipe.resolve({ theme, selection: { variant, size }, states })
301
- * const tint = color ? buttonRecipe.tint({ theme, color, selection, states }) : undefined
302
- * <View style={[styles.root, tint?.root, style]} />
382
+ * The colour a control takes when it is on, and the mark that arrives with it — the
383
+ * `Checkbox`'s check on its accent square, the `Radio`'s dot in its accent circle.
384
+ *
385
+ * It is a node of its own rather than a background on the box, because it has to fade and
386
+ * grow in **without taking the border with it**, and the mark has to ride along: a check
387
+ * arriving before its background reads as a glitch rather than as an animation.
388
+ *
389
+ * ```tsx
390
+ * <SelectionFill isVisible={isSelected} style={fillStyle} animation={animation}>
391
+ * <Check />
392
+ * </SelectionFill>
393
+ * ```
394
+ *
395
+ * The style is the host component's own resolved `fill` slot (R5) — this owns the motion
396
+ * and nothing else, which is what lets two components share it without sharing a recipe.
303
397
  */
304
- declare function createRecipe<Slot extends string, Variant extends string, const A extends Axes<Slot>>(config: RecipeConfig<Slot, Variant, A>): Recipe<Slot, Variant, A>;
398
+ declare function SelectionFill({ isVisible, style, animation, children, }: SelectionFillProps): react.JSX.Element | null;
399
+ declare namespace SelectionFill {
400
+ var displayName: string;
401
+ }
305
402
 
306
403
  /**
307
404
  * R3: the string a root should wrap in its default text slot, or `null` when it should
@@ -392,4 +489,93 @@ type SlotProps = MergeableProps & {
392
489
  */
393
490
  declare const Slot: react.ForwardRefExoticComponent<Omit<SlotProps, "ref"> & react.RefAttributes<unknown>>;
394
491
 
395
- export { type AnimationConfig, type AnimationProp, type AsChildProps, type Axes, type CompoundVariant, type FeedbackContext, type FeedbackVariant, HIGHLIGHT_OPACITY, type MergeableProps, PRESS_DURATION, PRESS_SCALE, Portal, PortalContext, PortalHost, type PortalHostProps, type PortalMethods, type PortalProps, type PossibleRef, PressableFeedback, type PressableFeedbackHighlightProps, type PressableFeedbackProps, type PressableFeedbackRippleProps, RELEASE_DURATION, RIPPLE_COVERAGE, RIPPLE_DURATION, RIPPLE_OPACITY, type Recipe, type RecipeConfig, type ResolveArgs, type ResolvedAnimation, type ResolvedSelection, type ResolvedStyles, type Selection, Slot, type SlotAnimation, type SlotProps, type SlotStyle, type SlotStyles, type StateName, type States, type StyleFn, type TintArgs, type VariantColors, type VariantRole, type VariantTokens, childrenToString, createRecipe, createSlotContext, mergeProps, mergeRefs, resolveAnimation, resolveSlotAnimation, useFeedback };
492
+ /**
493
+ * A panel that grows out of the thing that opened it.
494
+ *
495
+ * It starts slightly small and offset **towards** the trigger, so the motion points back
496
+ * at what opened it: a panel below enters upwards, one above enters downwards, one beside
497
+ * enters sideways. That is the only reason placement reaches the animation at all.
498
+ *
499
+ * Shared by the `Select` and the `Popover`, which is the second use §2 bis waits for. It
500
+ * lives in `system/` rather than in `utils/` because a `Keyframe` is Reanimated's, and
501
+ * `utils/` has to stay importable by a test that never mounts anything.
502
+ */
503
+ declare function anchoredEntering(placement: Placement): react_native_reanimated.ReanimatedKeyframe;
504
+ /**
505
+ * The mirror, shorter. Closing is an acknowledgement rather than an arrival, and a
506
+ * dismissal that takes as long as the opening feels like the control is arguing.
507
+ */
508
+ declare function anchoredExiting(placement: Placement): react_native_reanimated.ReanimatedKeyframe;
509
+ declare const overlayEntering: react_native_reanimated.ReanimatedKeyframe;
510
+ declare const overlayExiting: react_native_reanimated.ReanimatedKeyframe;
511
+
512
+ /**
513
+ * The chevron's turn, shared by the `Select` and the `Accordion`.
514
+ *
515
+ * HeroUI's numbers. Heavily damped against a very high stiffness: it arrives in about a
516
+ * fifth of a second and does not overshoot, which is what a turn of 180 degrees needs —
517
+ * an oscillating chevron reads as a bug rather than as motion.
518
+ */
519
+ declare const INDICATOR_SPRING: {
520
+ readonly damping: 140;
521
+ readonly stiffness: 1000;
522
+ readonly mass: 4;
523
+ };
524
+ /** Degrees. Down when closed, up when open, turning anticlockwise as HeroUI's does. */
525
+ declare const INDICATOR_ROTATION: readonly [0, -180];
526
+
527
+ /**
528
+ * The dismiss affordance shared by everything that can be dismissed — `Chip.Close`,
529
+ * `Alert.Close`, and the `Dialog`, `Snackbar` and `Sheet` of P5. Each of those is a
530
+ * five-line call site handing it the styles its own recipe resolved:
531
+ *
532
+ * ```tsx
533
+ * const { closeStyle, closeGlyphStyle, isDisabled } = useChip()
534
+ *
535
+ * <CloseButton
536
+ * name="Chip.Close"
537
+ * baseStyle={closeStyle}
538
+ * glyphStyle={closeGlyphStyle}
539
+ * isDisabled={isDisabled}
540
+ * />
541
+ * ```
542
+ *
543
+ * **It owns its press state**, unlike every other pressable in the library, where the
544
+ * component root owns it because its recipe resolves on it. Here the surrounding
545
+ * component is usually not a control at all, and where it is, the two are different
546
+ * targets: pressing the cross must not read as pressing the chip around it.
547
+ *
548
+ * With no children it draws its own cross from two bars a quarter turn apart, so a
549
+ * dismissible component works in a project that has installed no icon set.
550
+ */
551
+ declare const CloseButton: react.ForwardRefExoticComponent<{
552
+ name: string;
553
+ children?: react.ReactNode;
554
+ baseStyle?: react_native.StyleProp<react_native.ViewStyle>;
555
+ glyphStyle?: react_native.StyleProp<react_native.ViewStyle>;
556
+ style?: react_native.StyleProp<react_native.ViewStyle> | ((state: react_native.PressableStateCallbackType) => react_native.StyleProp<react_native.ViewStyle>);
557
+ } & Omit<PressableFeedbackProps, "style" | "children" | "isPressed"> & react.RefAttributes<View>>;
558
+
559
+ /** The two slots a component publishes for a `CloseButton`: its box and one cross bar. */
560
+ type CloseButtonSlots = {
561
+ close: SlotStyle;
562
+ closeGlyph: SlotStyle;
563
+ };
564
+ /**
565
+ * The cross's own geometry, for the `base` of any recipe that hosts a `CloseButton`:
566
+ *
567
+ * ```ts
568
+ * base: theme => ({ ...closeButtonBase(theme), root: { … } })
569
+ * ```
570
+ *
571
+ * The bar's thickness and the box's centring belong to the button rather than to the
572
+ * component around it, so they are written once here. What stays in the recipe is what is
573
+ * genuinely the component's: the size of the box and the length of the bar, both of which
574
+ * follow that component's own scale.
575
+ *
576
+ * Two bars are rendered, rotated a quarter turn apart, which is why only one is described
577
+ * and why it is positioned absolutely — they overlap at the centre of the box.
578
+ */
579
+ declare function closeButtonBase(theme: XAUITheme): CloseButtonSlots;
580
+
581
+ export { AnimationProp, type AsChildProps, ChevronDownIcon, CloseButton, type CloseButtonSlots, FEEDBACK_OVERLAY, FeedbackContext, HIGHLIGHT_DURATION, HIGHLIGHT_OPACITY, INDICATOR_ROTATION, INDICATOR_SPRING, Icon, IconComponentProps, IconContext, IconContextValue, IconProps, type MergeableProps, PRESS_DURATION, PRESS_SCALE, Portal, PortalContext, PortalHost, type PortalHostProps, type PortalMethods, type PortalProps, type PossibleRef, PressableFeedback, type PressableFeedbackHighlightProps, PressableFeedbackProps, type PressableFeedbackRippleProps, RIPPLE_CONFIRM_DURATION, RIPPLE_EXPAND_DURATION, RIPPLE_FADE_IN, RIPPLE_FADE_OUT, RIPPLE_FADE_OUT_DELAY, RIPPLE_OPACITY, RIPPLE_START_SCALE, ResolvedAnimation, SCALE_REFERENCE_WIDTH, SelectionFill, type SelectionFillProps, Slot, SlotAnimation, type SlotProps, SlotStyle, StyleFn, ViewStyleProps, anchoredEntering, anchoredExiting, childrenToString, closeButtonBase, createSlotContext, markOverlay, mergeProps, mergeRefs, overlayEntering, overlayExiting, pressScaleFor, radiusAxis, resolveAnimation, resolveSlotAnimation, rippleRadiusFor, useFeedback, useIconContext, useStyleProps };