@xaui/native 0.9.1-alpha.2 → 0.9.1-alpha.21

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 (65) hide show
  1. package/dist/chunk-2WMVDMFV.cjs +62 -0
  2. package/dist/chunk-33QILJJH.cjs +143 -0
  3. package/dist/chunk-4NE3SLTM.cjs +695 -0
  4. package/dist/{chunk-M7P46XKI.cjs → chunk-57SJ4LJF.cjs} +33 -3
  5. package/dist/chunk-5LC6KVL3.cjs +68 -0
  6. package/dist/{chunk-RBNCR5KB.js → chunk-A3EGFI6T.js} +31 -1
  7. package/dist/chunk-APCBIHLR.cjs +507 -0
  8. package/dist/chunk-BPBY7ON7.cjs +451 -0
  9. package/dist/chunk-EVXZGNPA.cjs +303 -0
  10. package/dist/chunk-EXX6ATAS.js +303 -0
  11. package/dist/chunk-GGW42MY4.js +20 -0
  12. package/dist/chunk-IBRVMLUF.js +668 -0
  13. package/dist/chunk-ISVUXVFL.js +471 -0
  14. package/dist/chunk-JL27KVRT.js +68 -0
  15. package/dist/chunk-JXLRHKCQ.js +143 -0
  16. package/dist/chunk-MC7SY2QH.cjs +20 -0
  17. package/dist/{chunk-RCP3SD26.js → chunk-N7C4UNUL.js} +2 -126
  18. package/dist/chunk-RMLFMRWL.js +102 -0
  19. package/dist/chunk-RRRGLRRP.cjs +28 -0
  20. package/dist/chunk-SGHP76GU.js +28 -0
  21. package/dist/{chunk-PBVPOX7D.js → chunk-TUJBDS5M.js} +30 -63
  22. package/dist/chunk-UBA6AEY6.cjs +102 -0
  23. package/dist/{chunk-NHPQQQ7P.cjs → chunk-UL263KGM.cjs} +56 -89
  24. package/dist/{chunk-B755PRVJ.cjs → chunk-UVO4GFSW.cjs} +3 -127
  25. package/dist/chunk-XHZBXYVU.js +62 -0
  26. package/dist/chunk-YRCUALUQ.js +451 -0
  27. package/dist/components/button/index.cjs +17 -0
  28. package/dist/components/button/index.d.cts +659 -0
  29. package/dist/components/button/index.d.ts +659 -0
  30. package/dist/components/button/index.js +17 -0
  31. package/dist/components/card/index.cjs +20 -0
  32. package/dist/components/card/index.d.cts +620 -0
  33. package/dist/components/card/index.d.ts +620 -0
  34. package/dist/components/card/index.js +20 -0
  35. package/dist/components/typography/index.cjs +14 -0
  36. package/dist/components/typography/index.d.cts +116 -0
  37. package/dist/components/typography/index.d.ts +116 -0
  38. package/dist/components/typography/index.js +14 -0
  39. package/dist/components/view/index.cjs +16 -0
  40. package/dist/components/view/index.d.cts +152 -0
  41. package/dist/components/view/index.d.ts +152 -0
  42. package/dist/components/view/index.js +16 -0
  43. package/dist/create-recipe-CC3NNCqF.d.ts +94 -0
  44. package/dist/create-recipe-CPBFg7ym.d.cts +94 -0
  45. package/dist/icon.type-BkcEPJbK.d.ts +73 -0
  46. package/dist/icon.type-Cs1tMX0W.d.cts +73 -0
  47. package/dist/index.cjs +167 -5
  48. package/dist/index.d.cts +79 -4
  49. package/dist/index.d.ts +79 -4
  50. package/dist/index.js +171 -9
  51. package/dist/pressable-feedback.type-DsvWZXWC.d.ts +127 -0
  52. package/dist/pressable-feedback.type-wfeiJz5m.d.cts +127 -0
  53. package/dist/style-props.type-B1BG5TCm.d.cts +31 -0
  54. package/dist/style-props.type-B1BG5TCm.d.ts +31 -0
  55. package/dist/system/index.cjs +66 -3
  56. package/dist/system/index.d.cts +301 -75
  57. package/dist/system/index.d.ts +301 -75
  58. package/dist/system/index.js +68 -5
  59. package/dist/theme/index.cjs +4 -3
  60. package/dist/theme/index.d.cts +27 -15
  61. package/dist/theme/index.d.ts +27 -15
  62. package/dist/theme/index.js +7 -6
  63. package/dist/{theme.type-B3ODSLbB.d.cts → theme.type-C2gNHpEx.d.cts} +8 -2
  64. package/dist/{theme.type-B3ODSLbB.d.ts → theme.type-C2gNHpEx.d.ts} +8 -2
  65. package/package.json +74 -18
@@ -1,86 +1,123 @@
1
- import { g as XAUITheme, X as XAUIColors } from '../theme.type-B3ODSLbB.cjs';
2
- import { ViewStyle, TextStyle } from 'react-native';
3
1
  import * as react from 'react';
4
2
  import { ReactNode, Provider, Ref, RefCallback } from 'react';
3
+ import { b as IconProps, a as IconContextValue } from '../icon.type-Cs1tMX0W.cjs';
4
+ export { I as IconComponentProps } from '../icon.type-Cs1tMX0W.cjs';
5
+ import { V as ViewStyleProps } from '../style-props.type-B1BG5TCm.cjs';
6
+ export { D as DirectionalStyleKey, I as ImageStyleProps, S as StyleProps, T as TextStyleProps } from '../style-props.type-B1BG5TCm.cjs';
7
+ import { S as SlotAnimation, F as FeedbackContext, a as AnimationProp, b as ResolvedAnimation } from '../pressable-feedback.type-wfeiJz5m.cjs';
8
+ export { A as AnimationConfig, P as PressableFeedbackProps, R as RadiusStyle, c as RippleWave } from '../pressable-feedback.type-wfeiJz5m.cjs';
9
+ import * as react_native from 'react-native';
10
+ import { StyleProp, ViewStyle } from 'react-native';
11
+ export { A as Axes, C as CompoundVariant, R as Recipe, b as RecipeConfig, a as ResolveArgs, d as ResolvedSelection, e as ResolvedStyles, S as Selection, f as SlotStyle, g as SlotStyles, h as StateName, i as States, j as StyleFn, T as TintArgs, V as VariantColors, k as VariantRole, l as VariantTokens, c as createRecipe } from '../create-recipe-CPBFg7ym.cjs';
12
+ import 'react-native-reanimated';
13
+ import '../theme.type-C2gNHpEx.cjs';
5
14
 
6
15
  /**
7
- * A slot is a view or a text node, and a recipe writes one object per slot, so the two
8
- * RN style shapes are merged rather than discriminated per slot.
9
- */
10
- type SlotStyle = ViewStyle & TextStyle;
11
- type SlotStyles<Slot extends string> = Partial<Record<Slot, SlotStyle>>;
12
- /** The roles a variant consumes. The variant names tokens; `paint` says where they land. */
13
- type VariantRole = 'bg' | 'bgPressed' | 'fg' | 'border';
14
- /** Token names per role — no colour value ever appears in a recipe. */
15
- type VariantTokens = Partial<Record<VariantRole, keyof XAUIColors>>;
16
- /** The same roles resolved: theme colours, or the slices of a raw `color`. */
17
- type VariantColors = Partial<Record<VariantRole, string>>;
18
- /**
19
- * `disabled` is applied last of the three: a control that is both pressed and disabled
20
- * has to read disabled.
21
- */
22
- type StateName = 'focused' | 'pressed' | 'disabled';
23
- type States = Partial<Record<StateName, boolean>>;
24
- /** Reads the theme and the variant's resolved colours; returns one style per slot. */
25
- type StyleFn<Slot extends string> = (theme: XAUITheme, colors: VariantColors) => SlotStyles<Slot>;
26
- /** Named axes of finite token values — `{ size: { sm: fn, md: fn } }`. */
27
- type Axes<Slot extends string> = Record<string, Record<string, StyleFn<Slot>>>;
28
- /** One value per axis, plus the variant. Missing keys fall back to `defaultVariants`. */
29
- type Selection<Variant extends string, A extends Axes<string>> = {
30
- variant?: Variant;
31
- } & {
32
- [Axis in keyof A]?: Extract<keyof A[Axis], string>;
33
- };
34
- type CompoundVariant<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
35
- when: Selection<Variant, A>;
36
- style: StyleFn<Slot>;
37
- };
38
- type RecipeConfig<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
39
- /** Every slot the component publishes. Slots a recipe never styles resolve to `{}`. */
40
- slots: readonly Slot[];
41
- base?: StyleFn<Slot>;
42
- variantTokens?: Record<Variant, VariantTokens>;
43
- /** Where the variant's colours land — written once, and it holds for every variant. */
44
- paint?: StyleFn<Slot>;
45
- variants?: A;
46
- compoundVariants?: ReadonlyArray<CompoundVariant<Slot, Variant, A>>;
47
- states?: Partial<Record<StateName, StyleFn<Slot>>>;
48
- defaultVariants?: Selection<Variant, A>;
49
- };
50
- /** Stable references: the same object for the same tokens, for the app's lifetime. */
51
- type ResolvedStyles<Slot extends string> = Readonly<Record<Slot, SlotStyle>>;
52
- /** A selection with `defaultVariants` already folded in, keyed by axis name. */
53
- type ResolvedSelection = Readonly<Record<string, string | undefined>>;
54
-
55
- type ResolveArgs<Variant extends string, A extends Axes<string>> = {
56
- theme: XAUITheme;
57
- selection?: Selection<Variant, A>;
58
- states?: States;
16
+ * The runtime half of R14. The type half lives in `system/style-props/`, and the two are
17
+ * pinned to each other by a compile-time check there: a React Native upgrade that adds or
18
+ * removes a style key fails `type-check` with the key's name rather than drifting.
19
+ *
20
+ * One set for the three style types rather than one per node. A caller cannot write
21
+ * `fontSize` on a view slot that slot's props are typed `ViewStyleProps` so the split
22
+ * never has to know which node it runs for, and every component shares one table.
23
+ */
24
+ 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"];
25
+ type StylePropKey = (typeof STYLE_PROP_KEYS)[number];
26
+ /** What `splitStyleProps` takes out of a props object. */
27
+ type StylePropsOf<P> = Pick<P, Extract<keyof P, StylePropKey>>;
28
+ /** What it leaves in it. */
29
+ type RestPropsOf<P> = Omit<P, StylePropKey>;
30
+
31
+ /**
32
+ * `splitStyleProps`, memoized on the values (R14). A component calls it on what is left
33
+ * after destructuring its own props, applies the style half between the tint and its
34
+ * `style`, and forwards the rest:
35
+ *
36
+ * ```tsx
37
+ * const [styleProps, rest] = useStyleProps(props)
38
+ * <Pressable style={[styles.root, tint, styleProps, style]} {...rest} />
39
+ * ```
40
+ *
41
+ * The identity is stable while the values are, which is what a memoized child or an
42
+ * animated style depends on. It is keyed on a hash rather than on the object, because the
43
+ * object is a fresh rest-spread on every render and would never hit.
44
+ */
45
+ declare function useStyleProps<P extends object>(props: P): [StylePropsOf<P>, RestPropsOf<P>];
46
+
47
+ /**
48
+ * The gap nobody else closes: an icon is a third-party component, so a slot context does
49
+ * not reach it and every call site ends up computing the colour by hand.
50
+ *
51
+ * ```tsx
52
+ * <Button variant="danger">
53
+ * <Button.Icon as={TrashIcon} /> {/* colour and size inherited, nothing to pass *\/}
54
+ * <Button.Label>Supprimer</Button.Label>
55
+ * </Button>
56
+ * ```
57
+ *
58
+ * Three accepted forms — a component through `as`, a raw SVG as children, or an image
59
+ * through `source` — and the resolution is the same for all three: an explicit prop, else
60
+ * what the surrounding slot published, else the theme.
61
+ *
62
+ * The props are taken whole rather than destructured, because they are a union: which
63
+ * keys exist depends on the form, and narrowing is what lets `style` be reachable in the
64
+ * one branch that renders a node and unwritable in the two that do not.
65
+ */
66
+ declare function Icon(props: IconProps): react.JSX.Element;
67
+ declare namespace Icon {
68
+ var displayName: string;
69
+ }
70
+
71
+ /**
72
+ * Not a `createSlotContext`: that one throws outside its parent, and an `Icon` has to
73
+ * work on its own as much as inside a `Button`. An empty context is the honest default —
74
+ * nothing inherited, so the theme decides.
75
+ */
76
+ declare const IconContext: react.Context<IconContextValue>;
77
+ declare function useIconContext(): IconContextValue;
78
+
79
+ type PortalProps = {
80
+ children: ReactNode;
59
81
  };
60
- type TintArgs<Variant extends string, A extends Axes<string>> = ResolveArgs<Variant, A> & {
61
- color: string;
82
+ /**
83
+ * Renders its children into the nearest `PortalHost` instead of where it sits. What
84
+ * `Dialog`, `Sheet`, `Drawer` and `Snackbar` are built on: an overlay has to escape the
85
+ * clipping and stacking of whatever container happened to hold the trigger.
86
+ *
87
+ * Both halves run in layout effects rather than effects, which is deliberate: the content
88
+ * lands in the same commit as the trigger's, so an overlay neither shows one frame late
89
+ * nor survives one frame past the unmount that closed it. The unpublish sits in its own
90
+ * effect so that it does not depend on `children` — a re-publish then keeps the portal's
91
+ * place in the host's order instead of dropping it and re-adding it at the end.
92
+ */
93
+ declare function Portal({ children }: PortalProps): null;
94
+ declare namespace Portal {
95
+ var displayName: string;
96
+ }
97
+
98
+ type PortalMethods = {
99
+ addPortal: (key: string, element: ReactNode) => void;
100
+ removePortal: (key: string) => void;
62
101
  };
63
- type Recipe<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
64
- readonly slots: readonly Slot[];
65
- /** The cached pass: stable `StyleSheet` references, keyed by tokens alone. */
66
- resolve(args: ResolveArgs<Variant, A>): ResolvedStyles<Slot>;
67
- /**
68
- * The tint pass: the same functions run again with `color`'s slices in place of the
69
- * theme's tokens. Uncached and allocating, and only ever called when `color` is set.
70
- */
71
- tint(args: TintArgs<Variant, A>): SlotStyles<Slot>;
102
+ /**
103
+ * `null` outside a host, and `Portal` treats that as "render nothing" rather than
104
+ * throwing: an app that forgot `PortalHost` should lose its overlays, not crash on the
105
+ * first `Dialog`.
106
+ */
107
+ declare const PortalContext: react.Context<PortalMethods | null>;
108
+
109
+ /** R14 — it renders a view of its own, so it takes that view's style keys as props. */
110
+ type PortalHostProps = ViewStyleProps & {
111
+ children: ReactNode;
72
112
  };
73
113
  /**
74
- * A component's style, declared once. Resolution splits in two because the two halves
75
- * have different lifetimes: everything keyed by a finite token is cached forever, and
76
- * an arbitrary `color` is recomputed per render — which is what keeps the cache bounded
77
- * by the number of token combinations rather than by the palette users invent.
78
- *
79
- * const styles = buttonRecipe.resolve({ theme, selection: { variant, size }, states })
80
- * const tint = color ? buttonRecipe.tint({ theme, color, selection, states }) : undefined
81
- * <View style={[styles.root, tint?.root, style]} />
114
+ * Where every `Portal` in the tree below renders. Mounted once, at the root of the app,
115
+ * above navigation an overlay that renders inside a screen is clipped by it.
82
116
  */
83
- declare function createRecipe<Slot extends string, Variant extends string, const A extends Axes<Slot>>(config: RecipeConfig<Slot, Variant, A>): Recipe<Slot, Variant, A>;
117
+ declare function PortalHost({ children, ...props }: PortalHostProps): react.JSX.Element;
118
+ declare namespace PortalHost {
119
+ var displayName: string;
120
+ }
84
121
 
85
122
  /**
86
123
  * R3: the string a root should wrap in its default text slot, or `null` when it should
@@ -171,4 +208,193 @@ type SlotProps = MergeableProps & {
171
208
  */
172
209
  declare const Slot: react.ForwardRefExoticComponent<Omit<SlotProps, "ref"> & react.RefAttributes<unknown>>;
173
210
 
174
- export { type AsChildProps, type Axes, type CompoundVariant, type MergeableProps, type PossibleRef, type Recipe, type RecipeConfig, type ResolveArgs, type ResolvedSelection, type ResolvedStyles, type Selection, Slot, 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 };
211
+ type PressableFeedbackHighlightProps = ViewStyleProps & {
212
+ style?: StyleProp<ViewStyle>;
213
+ animation?: SlotAnimation;
214
+ /**
215
+ * The content the wash sits under. Optional: `<Highlight />` on its own is an overlay
216
+ * among the root's other children, and the root hoists it so order does not matter.
217
+ */
218
+ children?: ReactNode;
219
+ };
220
+ /**
221
+ * The press wash: one flat overlay fading in under the finger.
222
+ *
223
+ * It is a **neutral** wash, not the variant's pressed colour. A component picks one or
224
+ * the other — this overlay, or a `pressed` state in its recipe swapping `bg` for
225
+ * `bgPressed` — never both, or a pressed button darkens twice.
226
+ *
227
+ * **Wrapping is the readable form**, and it costs nothing:
228
+ *
229
+ * ```tsx
230
+ * <PressableFeedback style={{ flexDirection: 'row', gap: 8 }}>
231
+ * <PressableFeedback.Highlight>
232
+ * <Icon />
233
+ * <Label />
234
+ * </PressableFeedback.Highlight>
235
+ * </PressableFeedback>
236
+ * ```
237
+ *
238
+ * The children are **not** put inside a box. They are returned as siblings of the wash in
239
+ * a fragment, which has no presence in the host tree — so the root's `flexDirection`,
240
+ * `gap` and `alignItems` still reach the icon and the label directly, and the rendered
241
+ * tree is identical to writing the wash as a bare sibling. A real wrapping `View` would
242
+ * have made the root's layout apply to the wrapper instead, and would have added the depth
243
+ * §8 removed.
244
+ */
245
+ declare function PressableFeedbackHighlight({ style, animation: override, children, ...props }: PressableFeedbackHighlightProps): react.JSX.Element;
246
+ declare namespace PressableFeedbackHighlight {
247
+ var displayName: string;
248
+ }
249
+
250
+ type PressableFeedbackRippleProps = ViewStyleProps & {
251
+ /** Applies to the wave itself, not to the container that clips it. */
252
+ style?: StyleProp<ViewStyle>;
253
+ animation?: SlotAnimation;
254
+ /**
255
+ * The content the wave washes under. Optional: `<Ripple />` on its own is an overlay
256
+ * among the root's other children, and the root hoists it so order does not matter.
257
+ */
258
+ children?: ReactNode;
259
+ };
260
+ /**
261
+ * A circle washing outwards from where the finger landed.
262
+ *
263
+ * **The root drives it, this only draws it.** The root is the touch surface: touches on a
264
+ * component's own children — a button's label — bubble up to the `Pressable`, and never to
265
+ * this overlay, which is their sibling rather than their parent. An overlay owning the
266
+ * handlers works on the padding and does nothing on the text, which is the kind of bug that
267
+ * looks like a rendering problem.
268
+ *
269
+ * Its ink and its corners come from the root, which reads both off its own style — only
270
+ * the root knows what the wave sits on, or what shape it has to stay inside.
271
+ *
272
+ * **Wrapping is the readable form**, and it costs nothing:
273
+ *
274
+ * ```tsx
275
+ * <PressableFeedback style={{ flexDirection: 'row', gap: 8 }}>
276
+ * <PressableFeedback.Ripple>
277
+ * <Icon />
278
+ * <Label />
279
+ * </PressableFeedback.Ripple>
280
+ * </PressableFeedback>
281
+ * ```
282
+ *
283
+ * The children are **not** put inside a box. They come back as siblings of the wave's
284
+ * container in a fragment, which has no presence in the host tree — so the root's
285
+ * `flexDirection`, `gap` and `alignItems` still reach the icon and the label directly, and
286
+ * the rendered tree is identical to writing the wave as a bare sibling. Written on its own,
287
+ * `<Ripple />` is that bare sibling, and the root hoists it so order does not matter.
288
+ *
289
+ * The motion is Material's `InkRipple`, and the parts that matter are the ones that are not
290
+ * obvious: the ink is **independent of the expansion**, the circle **starts at 30%** of its
291
+ * target rather than at a point, the target is **half the diagonal**, and the centre
292
+ * **travels** from the finger to the middle of the control. The constants carry the why.
293
+ */
294
+ declare function PressableFeedbackRipple({ style, animation: override, children, ...props }: PressableFeedbackRippleProps): react.JSX.Element;
295
+ declare namespace PressableFeedbackRipple {
296
+ var displayName: string;
297
+ }
298
+
299
+ declare const useFeedback: () => FeedbackContext;
300
+
301
+ /**
302
+ * What marks a component as a press overlay.
303
+ *
304
+ * `Symbol.for` rather than a boolean field or an identity check against our own two
305
+ * components: the registry is global, so two copies of `@xaui/native` in one tree still
306
+ * agree on what an overlay is, and a third party writing their own overlay — anything that
307
+ * reads `useFeedback()` and paints under the content — opts into the same treatment
308
+ * instead of being a second-class citizen.
309
+ */
310
+ declare const FEEDBACK_OVERLAY: unique symbol;
311
+ /** Tags a component so `PressableFeedback` paints it under its content. */
312
+ declare function markOverlay<T extends object>(component: T): T;
313
+
314
+ /**
315
+ * How far a control shrinks under the finger — **before** the width coefficient below.
316
+ *
317
+ * The v0 tree shrank everything to a flat `0.975`, which is why a wide button read as
318
+ * lurching: a ratio applied to a 360pt row moves nine points, and the same ratio on a
319
+ * 96pt chip moves two. What the eye reads is the displacement, not the ratio.
320
+ */
321
+ declare const PRESS_SCALE = 0.985;
322
+ declare const PRESS_DURATION = 300;
323
+ /**
324
+ * The width at which `PRESS_SCALE` is applied as written. Wider controls shrink
325
+ * proportionally less, narrower ones more, so the movement stays roughly constant in
326
+ * points across a 96pt chip and a full-width button.
327
+ */
328
+ declare const SCALE_REFERENCE_WIDTH = 300;
329
+ /** The scale a control of `width` should reach when pressed. */
330
+ declare function pressScaleFor(width: number): number;
331
+ /** How far the wash goes at full press, and how long it takes to get there. */
332
+ declare const HIGHLIGHT_OPACITY = 0.1;
333
+ declare const HIGHLIGHT_DURATION = 200;
334
+ /**
335
+ * The ripple, taken from Material's reference implementation (`InkRipple`) rather than
336
+ * approximated. Four of its numbers are load-bearing and none of them is obvious:
337
+ *
338
+ * - **The opacity is not tied to the expansion.** It reaches full ink in 75ms and stays
339
+ * there while the circle keeps growing. Tying the two — the obvious thing to write —
340
+ * means the ink is faintest exactly when the circle is small enough to be read as a
341
+ * circle, which is why such a ripple looks like nothing at all.
342
+ * - **The circle starts at 30% of its target**, not at a point. A wave from a dot spends
343
+ * its visible life too small to see.
344
+ * - **The target radius is half the diagonal**, which is what covers the box. Larger and
345
+ * the edge leaves the control before the eye catches it, so the effect reads as the
346
+ * surface tinting rather than as something spreading.
347
+ * - **The centre travels** from the finger to the middle of the control as it opens, which
348
+ * is what makes it settle into the control instead of flooding out of a corner.
349
+ *
350
+ * The expansion runs a full second while the finger is down, and finishes in 225ms once it
351
+ * lifts — the wave catches up rather than being cut.
352
+ */
353
+ declare const RIPPLE_OPACITY = 0.1;
354
+ declare const RIPPLE_START_SCALE = 0.3;
355
+ declare const RIPPLE_EXPAND_DURATION = 1000;
356
+ declare const RIPPLE_CONFIRM_DURATION = 225;
357
+ declare const RIPPLE_FADE_IN = 75;
358
+ declare const RIPPLE_FADE_OUT_DELAY = 225;
359
+ declare const RIPPLE_FADE_OUT = 150;
360
+ /** Half the diagonal covers the box from its centre; the 5 is Material's own overshoot. */
361
+ declare function rippleRadiusFor(width: number, height: number): number;
362
+ /**
363
+ * One shape out of four accepted ones, so the components read a record instead of
364
+ * re-deciding what `'disable-all'` meant.
365
+ *
366
+ * `inheritedDisableAll` comes from an ancestor that asked for it, and it wins: a list
367
+ * that switched its rows' animations off cannot be overridden by a row.
368
+ */
369
+ declare function resolveAnimation(animation: AnimationProp | undefined, inheritedDisableAll?: boolean): ResolvedAnimation;
370
+ type ResolvedSlotAnimation = {
371
+ enabled: boolean;
372
+ duration: number;
373
+ opacity: number;
374
+ };
375
+ /**
376
+ * A slot's own `animation` over the root's blanket one, with the root winning when it
377
+ * switched everything off — `animation="disable-all"` on an ancestor cannot be undone by
378
+ * an overlay that asks nicely.
379
+ */
380
+ declare function resolveSlotAnimation(override: SlotAnimation | undefined, enabledByRoot: boolean, defaultOpacity: number, defaultDuration?: number): ResolvedSlotAnimation;
381
+
382
+ /**
383
+ * The root scales; what else happens under the finger is **composed**, not named by a
384
+ * prop. An overlay a caller can reach is an overlay a caller can place, style and switch
385
+ * off — and it is the only shape that survives `asChild`, where the caller's own element
386
+ * is the pressable and there is no sibling for the primitive to inject.
387
+ */
388
+ declare const PressableFeedback: react.ForwardRefExoticComponent<Omit<react_native.PressableProps, "style" | "children" | "disabled"> & ViewStyleProps & {
389
+ isPressed?: boolean;
390
+ isDisabled?: boolean;
391
+ asChild?: boolean;
392
+ animation?: AnimationProp;
393
+ style?: react_native.StyleProp<react_native.ViewStyle>;
394
+ children?: react.ReactNode;
395
+ } & react.RefAttributes<react_native.View>> & {
396
+ Highlight: typeof PressableFeedbackHighlight;
397
+ Ripple: typeof PressableFeedbackRipple;
398
+ };
399
+
400
+ export { AnimationProp, type AsChildProps, FEEDBACK_OVERLAY, FeedbackContext, HIGHLIGHT_DURATION, HIGHLIGHT_OPACITY, Icon, IconContext, IconContextValue, IconProps, type MergeableProps, PRESS_DURATION, PRESS_SCALE, Portal, PortalContext, PortalHost, type PortalHostProps, type PortalMethods, type PortalProps, type PossibleRef, PressableFeedback, type PressableFeedbackHighlightProps, 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, Slot, SlotAnimation, type SlotProps, ViewStyleProps, childrenToString, createSlotContext, markOverlay, mergeProps, mergeRefs, pressScaleFor, resolveAnimation, resolveSlotAnimation, rippleRadiusFor, useFeedback, useIconContext, useStyleProps };