@xaui/native 0.9.1-alpha.15 → 0.9.1-alpha.17

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 (39) hide show
  1. package/dist/{chunk-PUER6Y4M.cjs → chunk-2UICXD3Q.cjs} +75 -381
  2. package/dist/chunk-4K3LZS7M.js +448 -0
  3. package/dist/chunk-5SU7FXWH.cjs +448 -0
  4. package/dist/chunk-6PZF4PI7.js +100 -0
  5. package/dist/chunk-6VTBGBPP.cjs +100 -0
  6. package/dist/{chunk-E3756MJC.js → chunk-ASXK7XU4.js} +16 -15
  7. package/dist/{chunk-DDYMIWLW.cjs → chunk-BHAHJHAI.cjs} +9 -5
  8. package/dist/{chunk-64L44HEI.js → chunk-F432IDIW.js} +89 -389
  9. package/dist/{chunk-NLFE3CRM.cjs → chunk-IZYRU7S2.cjs} +24 -23
  10. package/dist/{chunk-UOJBK5Z4.js → chunk-L3AQNVRN.js} +1 -1
  11. package/dist/{chunk-BAACHVM4.cjs → chunk-M2VYRHVS.cjs} +2 -2
  12. package/dist/{chunk-4O3PXFQ7.js → chunk-XQE5PXOD.js} +9 -5
  13. package/dist/components/button/index.cjs +4 -3
  14. package/dist/components/button/index.d.cts +3 -2
  15. package/dist/components/button/index.d.ts +3 -2
  16. package/dist/components/button/index.js +3 -2
  17. package/dist/components/typography/index.cjs +12 -0
  18. package/dist/components/typography/index.d.cts +115 -0
  19. package/dist/components/typography/index.d.ts +115 -0
  20. package/dist/components/typography/index.js +12 -0
  21. package/dist/create-recipe-3_ElpCYt.d.cts +117 -0
  22. package/dist/create-recipe-DImq1AZA.d.ts +117 -0
  23. package/dist/index.cjs +17 -7
  24. package/dist/index.d.cts +4 -2
  25. package/dist/index.d.ts +4 -2
  26. package/dist/index.js +21 -11
  27. package/dist/{create-recipe-DD9W6m9b.d.ts → pressable-feedback.type-C9kjAuVQ.d.cts} +3 -116
  28. package/dist/{create-recipe-BcUu9b2I.d.cts → pressable-feedback.type-KcPvFf6f.d.ts} +3 -116
  29. package/dist/system/index.cjs +5 -3
  30. package/dist/system/index.d.cts +5 -3
  31. package/dist/system/index.d.ts +5 -3
  32. package/dist/system/index.js +11 -9
  33. package/dist/theme/index.cjs +2 -2
  34. package/dist/theme/index.d.cts +6 -6
  35. package/dist/theme/index.d.ts +6 -6
  36. package/dist/theme/index.js +1 -1
  37. package/dist/{theme.type-C9bFJKFm.d.cts → theme.type-C2gNHpEx.d.cts} +1 -1
  38. package/dist/{theme.type-C9bFJKFm.d.ts → theme.type-C2gNHpEx.d.ts} +1 -1
  39. package/package.json +11 -1
@@ -0,0 +1,117 @@
1
+ import { ImageStyle, TextStyle, ViewStyle } from 'react-native';
2
+ import { X as XAUITheme, a as XAUIColors } from './theme.type-C2gNHpEx.js';
3
+
4
+ /**
5
+ * R13 — React Native mirrors a layout under RTL through the Start/End properties and only
6
+ * those. A props API is exactly where someone writes `paddingLeft` without thinking, so
7
+ * the type removes the temptation instead of leaving it to a review.
8
+ */
9
+ type DirectionalStyleKey = 'left' | 'right' | 'paddingLeft' | 'paddingRight' | 'marginLeft' | 'marginRight' | 'borderLeftWidth' | 'borderRightWidth' | 'borderLeftColor' | 'borderRightColor' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderBottomLeftRadius' | 'borderBottomRightRadius';
10
+ /**
11
+ * `pointerEvents` is a style key *and* a `View` prop. R14 says the component's own prop
12
+ * wins, so it stays the prop it has always been and is not exposed twice — the one name
13
+ * where the two vocabularies collide.
14
+ */
15
+ type ComponentOwnedStyleKey = 'pointerEvents';
16
+ /**
17
+ * The style keys of a node, exposed as props (R14). Not a maintained list: it derives
18
+ * from the React Native type, minus what R13 forbids.
19
+ *
20
+ * ```ts
21
+ * type CardProps = ViewStyleProps & { variant?: CardVariant }
22
+ * ```
23
+ */
24
+ type StyleProps<Style> = Omit<Style, DirectionalStyleKey | ComponentOwnedStyleKey>;
25
+ /** A root, or any slot that renders a view. */
26
+ type ViewStyleProps = StyleProps<ViewStyle>;
27
+ /** A text slot — `color`, `fontSize`, `letterSpacing`… */
28
+ type TextStyleProps = StyleProps<TextStyle>;
29
+ /** An image slot — `resizeMode`, `tintColor`… */
30
+ type ImageStyleProps = StyleProps<ImageStyle>;
31
+
32
+ /**
33
+ * A slot is a view or a text node, and a recipe writes one object per slot, so the two
34
+ * RN style shapes are merged rather than discriminated per slot.
35
+ */
36
+ type SlotStyle = ViewStyle & TextStyle;
37
+ type SlotStyles<Slot extends string> = Partial<Record<Slot, SlotStyle>>;
38
+ /** The roles a variant consumes. The variant names tokens; `paint` says where they land. */
39
+ type VariantRole = 'bg' | 'bgPressed' | 'fg' | 'border';
40
+ /** Token names per role — no colour value ever appears in a recipe. */
41
+ type VariantTokens = Partial<Record<VariantRole, keyof XAUIColors>>;
42
+ /** The same roles resolved: theme colours, or the slices of a raw `color`. */
43
+ type VariantColors = Partial<Record<VariantRole, string>>;
44
+ /**
45
+ * `disabled` is applied last of the three: a control that is both pressed and disabled
46
+ * has to read disabled.
47
+ */
48
+ type StateName = 'focused' | 'pressed' | 'disabled';
49
+ type States = Partial<Record<StateName, boolean>>;
50
+ /** Reads the theme and the variant's resolved colours; returns one style per slot. */
51
+ type StyleFn<Slot extends string> = (theme: XAUITheme, colors: VariantColors) => SlotStyles<Slot>;
52
+ /** Named axes of finite token values — `{ size: { sm: fn, md: fn } }`. */
53
+ type Axes<Slot extends string> = Record<string, Record<string, StyleFn<Slot>>>;
54
+ /** One value per axis, plus the variant. Missing keys fall back to `defaultVariants`. */
55
+ type Selection<Variant extends string, A extends Axes<string>> = {
56
+ variant?: Variant;
57
+ } & {
58
+ [Axis in keyof A]?: Extract<keyof A[Axis], string>;
59
+ };
60
+ type CompoundVariant<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
61
+ when: Selection<Variant, A>;
62
+ style: StyleFn<Slot>;
63
+ };
64
+ type RecipeConfig<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
65
+ /** Every slot the component publishes. Slots a recipe never styles resolve to `{}`. */
66
+ slots: readonly Slot[];
67
+ base?: StyleFn<Slot>;
68
+ variantTokens?: Record<Variant, VariantTokens>;
69
+ /** Where the variant's colours land — written once, and it holds for every variant. */
70
+ paint?: StyleFn<Slot>;
71
+ variants?: A;
72
+ compoundVariants?: ReadonlyArray<CompoundVariant<Slot, Variant, A>>;
73
+ states?: Partial<Record<StateName, StyleFn<Slot>>>;
74
+ /**
75
+ * `NoInfer`, because this is the one place a single variant name appears on its own:
76
+ * without it, inference reads `Variant` off `{ variant: 'primary' }` and narrows the
77
+ * whole recipe to that one value, so every other variant becomes a type error at the
78
+ * call site. `variantTokens` is the declaration; this only picks a default from it.
79
+ */
80
+ defaultVariants?: Selection<NoInfer<Variant>, A>;
81
+ };
82
+ /** Stable references: the same object for the same tokens, for the app's lifetime. */
83
+ type ResolvedStyles<Slot extends string> = Readonly<Record<Slot, SlotStyle>>;
84
+ /** A selection with `defaultVariants` already folded in, keyed by axis name. */
85
+ type ResolvedSelection = Readonly<Record<string, string | undefined>>;
86
+
87
+ type ResolveArgs<Variant extends string, A extends Axes<string>> = {
88
+ theme: XAUITheme;
89
+ selection?: Selection<Variant, A>;
90
+ states?: States;
91
+ };
92
+ type TintArgs<Variant extends string, A extends Axes<string>> = ResolveArgs<Variant, A> & {
93
+ color: string;
94
+ };
95
+ type Recipe<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
96
+ readonly slots: readonly Slot[];
97
+ /** The cached pass: stable `StyleSheet` references, keyed by tokens alone. */
98
+ resolve(args: ResolveArgs<Variant, A>): ResolvedStyles<Slot>;
99
+ /**
100
+ * The tint pass: the same functions run again with `color`'s slices in place of the
101
+ * theme's tokens. Uncached and allocating, and only ever called when `color` is set.
102
+ */
103
+ tint(args: TintArgs<Variant, A>): SlotStyles<Slot>;
104
+ };
105
+ /**
106
+ * A component's style, declared once. Resolution splits in two because the two halves
107
+ * have different lifetimes: everything keyed by a finite token is cached forever, and
108
+ * an arbitrary `color` is recomputed per render — which is what keeps the cache bounded
109
+ * by the number of token combinations rather than by the palette users invent.
110
+ *
111
+ * const styles = buttonRecipe.resolve({ theme, selection: { variant, size }, states })
112
+ * const tint = color ? buttonRecipe.tint({ theme, color, selection, states }) : undefined
113
+ * <View style={[styles.root, tint?.root, style]} />
114
+ */
115
+ declare function createRecipe<Slot extends string, Variant extends string, const A extends Axes<Slot>>(config: RecipeConfig<Slot, Variant, A>): Recipe<Slot, Variant, A>;
116
+
117
+ export { type Axes as A, type CompoundVariant as C, type DirectionalStyleKey as D, type ImageStyleProps as I, type Recipe as R, type Selection as S, type TintArgs as T, type ViewStyleProps as V, type ResolveArgs as a, type RecipeConfig as b, createRecipe as c, type ResolvedSelection as d, type ResolvedStyles as e, type SlotStyle as f, type SlotStyles as g, type StateName as h, type States as i, type StyleFn as j, type VariantColors as k, type VariantRole as l, type VariantTokens as m, type StyleProps as n, type TextStyleProps as o };
package/dist/index.cjs CHANGED
@@ -4,16 +4,17 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkNLFE3CRMcjs = require('./chunk-NLFE3CRM.cjs');
7
+ var _chunkIZYRU7S2cjs = require('./chunk-IZYRU7S2.cjs');
8
8
 
9
9
 
10
10
 
11
11
 
12
- var _chunkBAACHVM4cjs = require('./chunk-BAACHVM4.cjs');
12
+ var _chunk6VTBGBPPcjs = require('./chunk-6VTBGBPP.cjs');
13
13
 
14
14
 
15
15
 
16
16
 
17
+ var _chunkM2VYRHVScjs = require('./chunk-M2VYRHVS.cjs');
17
18
 
18
19
 
19
20
 
@@ -38,22 +39,28 @@ var _chunkBAACHVM4cjs = require('./chunk-BAACHVM4.cjs');
38
39
 
39
40
 
40
41
 
42
+ var _chunk2UICXD3Qcjs = require('./chunk-2UICXD3Q.cjs');
41
43
 
42
44
 
43
45
 
44
- var _chunkPUER6Y4Mcjs = require('./chunk-PUER6Y4M.cjs');
45
46
 
46
47
 
47
48
 
48
49
 
49
50
 
51
+ var _chunk5SU7FXWHcjs = require('./chunk-5SU7FXWH.cjs');
50
52
 
51
53
 
52
54
 
53
55
 
54
56
 
55
57
 
56
- var _chunkDDYMIWLWcjs = require('./chunk-DDYMIWLW.cjs');
58
+
59
+
60
+
61
+
62
+
63
+ var _chunkBHAHJHAIcjs = require('./chunk-BHAHJHAI.cjs');
57
64
 
58
65
 
59
66
 
@@ -90,7 +97,7 @@ function useControllableState({
90
97
  function useControlWarning(isControlled) {
91
98
  const wasControlled = _react.useRef.call(void 0, isControlled);
92
99
  if (wasControlled.current !== isControlled) {
93
- _chunkNLFE3CRMcjs.warnDev.call(void 0,
100
+ _chunkIZYRU7S2cjs.warnDev.call(void 0,
94
101
  `a component switched from ${wasControlled.current ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}. Decide for the life of the component: pass \`value\` always, or never. Passing \`undefined\` for a value you do control reads as "uncontrolled" here.`
95
102
  );
96
103
  wasControlled.current = isControlled;
@@ -100,7 +107,7 @@ function useControlWarning(isControlled) {
100
107
  // src/hooks/use-merged-ref.ts
101
108
 
102
109
  function useMergedRef(...refs) {
103
- return _react.useMemo.call(void 0, () => _chunkPUER6Y4Mcjs.mergeRefs.call(void 0, ...refs), refs);
110
+ return _react.useMemo.call(void 0, () => _chunk5SU7FXWHcjs.mergeRefs.call(void 0, ...refs), refs);
104
111
  }
105
112
 
106
113
  // src/hooks/use-previous.ts
@@ -168,4 +175,7 @@ function usePrevious(value) {
168
175
 
169
176
 
170
177
 
171
- exports.Button = _chunkNLFE3CRMcjs.Button; exports.FEEDBACK_OVERLAY = _chunkPUER6Y4Mcjs.FEEDBACK_OVERLAY; exports.HIGHLIGHT_DURATION = _chunkPUER6Y4Mcjs.HIGHLIGHT_DURATION; exports.HIGHLIGHT_OPACITY = _chunkPUER6Y4Mcjs.HIGHLIGHT_OPACITY; exports.Icon = _chunkPUER6Y4Mcjs.Icon; exports.IconContext = _chunkPUER6Y4Mcjs.IconContext; exports.PRESS_DURATION = _chunkPUER6Y4Mcjs.PRESS_DURATION; exports.PRESS_SCALE = _chunkPUER6Y4Mcjs.PRESS_SCALE; exports.Portal = _chunkBAACHVM4cjs.Portal; exports.PortalContext = _chunkBAACHVM4cjs.PortalContext; exports.PortalHost = _chunkBAACHVM4cjs.PortalHost; exports.PressableFeedback = _chunkPUER6Y4Mcjs.PressableFeedback; exports.RIPPLE_CONFIRM_DURATION = _chunkPUER6Y4Mcjs.RIPPLE_CONFIRM_DURATION; exports.RIPPLE_EXPAND_DURATION = _chunkPUER6Y4Mcjs.RIPPLE_EXPAND_DURATION; exports.RIPPLE_FADE_IN = _chunkPUER6Y4Mcjs.RIPPLE_FADE_IN; exports.RIPPLE_FADE_OUT = _chunkPUER6Y4Mcjs.RIPPLE_FADE_OUT; exports.RIPPLE_FADE_OUT_DELAY = _chunkPUER6Y4Mcjs.RIPPLE_FADE_OUT_DELAY; exports.RIPPLE_OPACITY = _chunkPUER6Y4Mcjs.RIPPLE_OPACITY; exports.RIPPLE_START_SCALE = _chunkPUER6Y4Mcjs.RIPPLE_START_SCALE; exports.SCALE_REFERENCE_WIDTH = _chunkPUER6Y4Mcjs.SCALE_REFERENCE_WIDTH; exports.Slot = _chunkPUER6Y4Mcjs.Slot; exports.ThemeContext = _chunk6N5JXRUZcjs.ThemeContext; exports.XAUIProvider = _chunkDDYMIWLWcjs.XAUIProvider; exports.buildRadius = _chunkDDYMIWLWcjs.buildRadius; exports.buildShadows = _chunkDDYMIWLWcjs.buildShadows; exports.buttonRecipe = _chunkNLFE3CRMcjs.buttonRecipe; exports.childrenToString = _chunkPUER6Y4Mcjs.childrenToString; exports.createRecipe = _chunkPUER6Y4Mcjs.createRecipe; exports.createSlotContext = _chunkPUER6Y4Mcjs.createSlotContext; exports.createTheme = _chunkDDYMIWLWcjs.createTheme; exports.defaultTheme = _chunkDDYMIWLWcjs.defaultTheme; exports.deriveColors = _chunkDDYMIWLWcjs.deriveColors; exports.deriveTint = _chunk6N5JXRUZcjs.deriveTint; exports.markOverlay = _chunkPUER6Y4Mcjs.markOverlay; exports.mergeProps = _chunkPUER6Y4Mcjs.mergeProps; exports.mergeRefs = _chunkPUER6Y4Mcjs.mergeRefs; exports.palette = _chunkDDYMIWLWcjs.palette; exports.pressScaleFor = _chunkPUER6Y4Mcjs.pressScaleFor; exports.primitives = _chunkDDYMIWLWcjs.primitives; exports.resolveAnimation = _chunkPUER6Y4Mcjs.resolveAnimation; exports.resolveSlotAnimation = _chunkPUER6Y4Mcjs.resolveSlotAnimation; exports.rippleRadiusFor = _chunkPUER6Y4Mcjs.rippleRadiusFor; exports.sourceKeys = _chunkDDYMIWLWcjs.sourceKeys; exports.tokens = _chunkDDYMIWLWcjs.tokens; exports.useButton = _chunkNLFE3CRMcjs.useButton; exports.useColorMode = _chunk6N5JXRUZcjs.useColorMode; exports.useControllableState = useControllableState; exports.useFeedback = _chunkPUER6Y4Mcjs.useFeedback; exports.useIconContext = _chunkPUER6Y4Mcjs.useIconContext; exports.useMergedRef = useMergedRef; exports.usePressState = _chunkNLFE3CRMcjs.usePressState; exports.usePrevious = usePrevious; exports.useStyleProps = _chunkPUER6Y4Mcjs.useStyleProps; exports.useThemeColor = _chunk6N5JXRUZcjs.useThemeColor; exports.useXAUITheme = _chunk6N5JXRUZcjs.useXAUITheme;
178
+
179
+
180
+
181
+ exports.Button = _chunkIZYRU7S2cjs.Button; exports.FEEDBACK_OVERLAY = _chunk2UICXD3Qcjs.FEEDBACK_OVERLAY; exports.HIGHLIGHT_DURATION = _chunk2UICXD3Qcjs.HIGHLIGHT_DURATION; exports.HIGHLIGHT_OPACITY = _chunk2UICXD3Qcjs.HIGHLIGHT_OPACITY; exports.Icon = _chunk2UICXD3Qcjs.Icon; exports.IconContext = _chunk2UICXD3Qcjs.IconContext; exports.PRESS_DURATION = _chunk2UICXD3Qcjs.PRESS_DURATION; exports.PRESS_SCALE = _chunk2UICXD3Qcjs.PRESS_SCALE; exports.Portal = _chunkM2VYRHVScjs.Portal; exports.PortalContext = _chunkM2VYRHVScjs.PortalContext; exports.PortalHost = _chunkM2VYRHVScjs.PortalHost; exports.PressableFeedback = _chunk2UICXD3Qcjs.PressableFeedback; exports.RIPPLE_CONFIRM_DURATION = _chunk2UICXD3Qcjs.RIPPLE_CONFIRM_DURATION; exports.RIPPLE_EXPAND_DURATION = _chunk2UICXD3Qcjs.RIPPLE_EXPAND_DURATION; exports.RIPPLE_FADE_IN = _chunk2UICXD3Qcjs.RIPPLE_FADE_IN; exports.RIPPLE_FADE_OUT = _chunk2UICXD3Qcjs.RIPPLE_FADE_OUT; exports.RIPPLE_FADE_OUT_DELAY = _chunk2UICXD3Qcjs.RIPPLE_FADE_OUT_DELAY; exports.RIPPLE_OPACITY = _chunk2UICXD3Qcjs.RIPPLE_OPACITY; exports.RIPPLE_START_SCALE = _chunk2UICXD3Qcjs.RIPPLE_START_SCALE; exports.SCALE_REFERENCE_WIDTH = _chunk2UICXD3Qcjs.SCALE_REFERENCE_WIDTH; exports.Slot = _chunk5SU7FXWHcjs.Slot; exports.TextSpan = _chunk6VTBGBPPcjs.TextSpan; exports.ThemeContext = _chunk6N5JXRUZcjs.ThemeContext; exports.Typography = _chunk6VTBGBPPcjs.Typography; exports.XAUIProvider = _chunkBHAHJHAIcjs.XAUIProvider; exports.buildRadius = _chunkBHAHJHAIcjs.buildRadius; exports.buildShadows = _chunkBHAHJHAIcjs.buildShadows; exports.buttonRecipe = _chunkIZYRU7S2cjs.buttonRecipe; exports.childrenToString = _chunk5SU7FXWHcjs.childrenToString; exports.createRecipe = _chunk5SU7FXWHcjs.createRecipe; exports.createSlotContext = _chunk5SU7FXWHcjs.createSlotContext; exports.createTheme = _chunkBHAHJHAIcjs.createTheme; exports.defaultTheme = _chunkBHAHJHAIcjs.defaultTheme; exports.deriveColors = _chunkBHAHJHAIcjs.deriveColors; exports.deriveTint = _chunk6N5JXRUZcjs.deriveTint; exports.markOverlay = _chunk2UICXD3Qcjs.markOverlay; exports.mergeProps = _chunk5SU7FXWHcjs.mergeProps; exports.mergeRefs = _chunk5SU7FXWHcjs.mergeRefs; exports.palette = _chunkBHAHJHAIcjs.palette; exports.pressScaleFor = _chunk2UICXD3Qcjs.pressScaleFor; exports.primitives = _chunkBHAHJHAIcjs.primitives; exports.resolveAnimation = _chunk2UICXD3Qcjs.resolveAnimation; exports.resolveSlotAnimation = _chunk2UICXD3Qcjs.resolveSlotAnimation; exports.rippleRadiusFor = _chunk2UICXD3Qcjs.rippleRadiusFor; exports.sourceKeys = _chunkBHAHJHAIcjs.sourceKeys; exports.tokens = _chunkBHAHJHAIcjs.tokens; exports.typographyRecipe = _chunk6VTBGBPPcjs.typographyRecipe; exports.useButton = _chunkIZYRU7S2cjs.useButton; exports.useColorMode = _chunk6N5JXRUZcjs.useColorMode; exports.useControllableState = useControllableState; exports.useFeedback = _chunk2UICXD3Qcjs.useFeedback; exports.useIconContext = _chunk2UICXD3Qcjs.useIconContext; exports.useMergedRef = useMergedRef; exports.usePressState = _chunkIZYRU7S2cjs.usePressState; exports.usePrevious = usePrevious; exports.useStyleProps = _chunk5SU7FXWHcjs.useStyleProps; exports.useThemeColor = _chunk6N5JXRUZcjs.useThemeColor; exports.useXAUITheme = _chunk6N5JXRUZcjs.useXAUITheme;
package/dist/index.d.cts CHANGED
@@ -1,11 +1,13 @@
1
1
  export { Button, ButtonContextValue, ButtonIconProps, ButtonLabelProps, ButtonProps, ButtonSize, ButtonSlot, ButtonSpinnerProps, ButtonVariant, buttonRecipe, useButton } from './components/button/index.cjs';
2
+ export { TextSpan, TextSpanProps, Typography, TypographyProps, TypographySlot, TypographyVariant, typographyRecipe } from './components/typography/index.cjs';
2
3
  import { RefCallback } from 'react';
3
4
  import { PossibleRef } from './system/index.cjs';
4
5
  export { AsChildProps, FEEDBACK_OVERLAY, HIGHLIGHT_DURATION, HIGHLIGHT_OPACITY, Icon, IconContext, MergeableProps, PRESS_DURATION, PRESS_SCALE, Portal, PortalContext, PortalHost, PortalHostProps, PortalMethods, PortalProps, PressableFeedback, PressableFeedbackHighlightProps, PressableFeedbackRippleProps, RIPPLE_CONFIRM_DURATION, RIPPLE_EXPAND_DURATION, RIPPLE_FADE_IN, RIPPLE_FADE_OUT, RIPPLE_FADE_OUT_DELAY, RIPPLE_OPACITY, RIPPLE_START_SCALE, SCALE_REFERENCE_WIDTH, Slot, SlotProps, childrenToString, createSlotContext, markOverlay, mergeProps, mergeRefs, pressScaleFor, resolveAnimation, resolveSlotAnimation, rippleRadiusFor, useFeedback, useIconContext, useStyleProps } from './system/index.cjs';
5
6
  import { GestureResponderEvent } from 'react-native';
6
- export { A as AnimationConfig, c as AnimationProp, i as Axes, C as CompoundVariant, D as DirectionalStyleKey, F as FeedbackContext, I as IconComponentProps, a as IconContextValue, b as IconProps, u as ImageStyleProps, P as PressableFeedbackProps, R as RadiusStyle, g as Recipe, j as RecipeConfig, h as ResolveArgs, d as ResolvedAnimation, k as ResolvedSelection, l as ResolvedStyles, e as RippleWave, m as Selection, S as SlotAnimation, n as SlotStyle, o as SlotStyles, p as StateName, q as States, r as StyleFn, v as StyleProps, w as TextStyleProps, T as TintArgs, V as VariantColors, s as VariantRole, t as VariantTokens, x as ViewStyleProps, f as createRecipe } from './create-recipe-BcUu9b2I.cjs';
7
+ export { A as AnimationConfig, c as AnimationProp, F as FeedbackContext, I as IconComponentProps, a as IconContextValue, b as IconProps, P as PressableFeedbackProps, R as RadiusStyle, d as ResolvedAnimation, e as RippleWave, S as SlotAnimation } from './pressable-feedback.type-C9kjAuVQ.cjs';
8
+ export { A as Axes, C as CompoundVariant, D as DirectionalStyleKey, I as ImageStyleProps, 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, n as StyleProps, o as TextStyleProps, T as TintArgs, k as VariantColors, l as VariantRole, m as VariantTokens, V as ViewStyleProps, c as createRecipe } from './create-recipe-3_ElpCYt.cjs';
7
9
  export { ColorModePreference, PaletteFamily, PaletteShade, ThemeContext, XAUIProvider, XAUIProviderProps, XAUITint, buildRadius, buildShadows, createTheme, defaultTheme, deriveColors, deriveTint, palette, primitives, sourceKeys, tokens, useColorMode, useThemeColor, useXAUITheme } from './theme/index.cjs';
8
- export { C as ColorMode, F as FontSizeKey, a as FontWeightKey, R as RadiusKey, S as Size, X as XAUIColors, b as XAUIDerivedColors, c as XAUIPrimitiveColors, d as XAUIRadius, e as XAUIShadow, f as XAUISourceColors, g as XAUITheme, h as XAUIThemeConfig, i as XAUIThemeSet } from './theme.type-C9bFJKFm.cjs';
10
+ export { C as ColorMode, F as FontSizeKey, b as FontWeightKey, R as RadiusKey, S as Size, a as XAUIColors, c as XAUIDerivedColors, d as XAUIPrimitiveColors, e as XAUIRadius, f as XAUIShadow, g as XAUISourceColors, X as XAUITheme, h as XAUIThemeConfig, i as XAUIThemeSet } from './theme.type-C2gNHpEx.cjs';
9
11
  import 'react-native-reanimated';
10
12
 
11
13
  type ControllableStateOptions<T> = {
package/dist/index.d.ts CHANGED
@@ -1,11 +1,13 @@
1
1
  export { Button, ButtonContextValue, ButtonIconProps, ButtonLabelProps, ButtonProps, ButtonSize, ButtonSlot, ButtonSpinnerProps, ButtonVariant, buttonRecipe, useButton } from './components/button/index.js';
2
+ export { TextSpan, TextSpanProps, Typography, TypographyProps, TypographySlot, TypographyVariant, typographyRecipe } from './components/typography/index.js';
2
3
  import { RefCallback } from 'react';
3
4
  import { PossibleRef } from './system/index.js';
4
5
  export { AsChildProps, FEEDBACK_OVERLAY, HIGHLIGHT_DURATION, HIGHLIGHT_OPACITY, Icon, IconContext, MergeableProps, PRESS_DURATION, PRESS_SCALE, Portal, PortalContext, PortalHost, PortalHostProps, PortalMethods, PortalProps, PressableFeedback, PressableFeedbackHighlightProps, PressableFeedbackRippleProps, RIPPLE_CONFIRM_DURATION, RIPPLE_EXPAND_DURATION, RIPPLE_FADE_IN, RIPPLE_FADE_OUT, RIPPLE_FADE_OUT_DELAY, RIPPLE_OPACITY, RIPPLE_START_SCALE, SCALE_REFERENCE_WIDTH, Slot, SlotProps, childrenToString, createSlotContext, markOverlay, mergeProps, mergeRefs, pressScaleFor, resolveAnimation, resolveSlotAnimation, rippleRadiusFor, useFeedback, useIconContext, useStyleProps } from './system/index.js';
5
6
  import { GestureResponderEvent } from 'react-native';
6
- export { A as AnimationConfig, c as AnimationProp, i as Axes, C as CompoundVariant, D as DirectionalStyleKey, F as FeedbackContext, I as IconComponentProps, a as IconContextValue, b as IconProps, u as ImageStyleProps, P as PressableFeedbackProps, R as RadiusStyle, g as Recipe, j as RecipeConfig, h as ResolveArgs, d as ResolvedAnimation, k as ResolvedSelection, l as ResolvedStyles, e as RippleWave, m as Selection, S as SlotAnimation, n as SlotStyle, o as SlotStyles, p as StateName, q as States, r as StyleFn, v as StyleProps, w as TextStyleProps, T as TintArgs, V as VariantColors, s as VariantRole, t as VariantTokens, x as ViewStyleProps, f as createRecipe } from './create-recipe-DD9W6m9b.js';
7
+ export { A as AnimationConfig, c as AnimationProp, F as FeedbackContext, I as IconComponentProps, a as IconContextValue, b as IconProps, P as PressableFeedbackProps, R as RadiusStyle, d as ResolvedAnimation, e as RippleWave, S as SlotAnimation } from './pressable-feedback.type-KcPvFf6f.js';
8
+ export { A as Axes, C as CompoundVariant, D as DirectionalStyleKey, I as ImageStyleProps, 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, n as StyleProps, o as TextStyleProps, T as TintArgs, k as VariantColors, l as VariantRole, m as VariantTokens, V as ViewStyleProps, c as createRecipe } from './create-recipe-DImq1AZA.js';
7
9
  export { ColorModePreference, PaletteFamily, PaletteShade, ThemeContext, XAUIProvider, XAUIProviderProps, XAUITint, buildRadius, buildShadows, createTheme, defaultTheme, deriveColors, deriveTint, palette, primitives, sourceKeys, tokens, useColorMode, useThemeColor, useXAUITheme } from './theme/index.js';
8
- export { C as ColorMode, F as FontSizeKey, a as FontWeightKey, R as RadiusKey, S as Size, X as XAUIColors, b as XAUIDerivedColors, c as XAUIPrimitiveColors, d as XAUIRadius, e as XAUIShadow, f as XAUISourceColors, g as XAUITheme, h as XAUIThemeConfig, i as XAUIThemeSet } from './theme.type-C9bFJKFm.js';
10
+ export { C as ColorMode, F as FontSizeKey, b as FontWeightKey, R as RadiusKey, S as Size, a as XAUIColors, c as XAUIDerivedColors, d as XAUIPrimitiveColors, e as XAUIRadius, f as XAUIShadow, g as XAUISourceColors, X as XAUITheme, h as XAUIThemeConfig, i as XAUIThemeSet } from './theme.type-C2gNHpEx.js';
9
11
  import 'react-native-reanimated';
10
12
 
11
13
  type ControllableStateOptions<T> = {
package/dist/index.js CHANGED
@@ -4,12 +4,17 @@ import {
4
4
  useButton,
5
5
  usePressState,
6
6
  warnDev
7
- } from "./chunk-E3756MJC.js";
7
+ } from "./chunk-ASXK7XU4.js";
8
+ import {
9
+ TextSpan,
10
+ Typography,
11
+ typographyRecipe
12
+ } from "./chunk-6PZF4PI7.js";
8
13
  import {
9
14
  Portal,
10
15
  PortalContext,
11
16
  PortalHost
12
- } from "./chunk-UOJBK5Z4.js";
17
+ } from "./chunk-L3AQNVRN.js";
13
18
  import {
14
19
  FEEDBACK_OVERLAY,
15
20
  HIGHLIGHT_DURATION,
@@ -27,21 +32,23 @@ import {
27
32
  RIPPLE_OPACITY,
28
33
  RIPPLE_START_SCALE,
29
34
  SCALE_REFERENCE_WIDTH,
30
- Slot,
31
- childrenToString,
32
- createRecipe,
33
- createSlotContext,
34
35
  markOverlay,
35
- mergeProps,
36
- mergeRefs,
37
36
  pressScaleFor,
38
37
  resolveAnimation,
39
38
  resolveSlotAnimation,
40
39
  rippleRadiusFor,
41
40
  useFeedback,
42
- useIconContext,
41
+ useIconContext
42
+ } from "./chunk-F432IDIW.js";
43
+ import {
44
+ Slot,
45
+ childrenToString,
46
+ createRecipe,
47
+ createSlotContext,
48
+ mergeProps,
49
+ mergeRefs,
43
50
  useStyleProps
44
- } from "./chunk-64L44HEI.js";
51
+ } from "./chunk-4K3LZS7M.js";
45
52
  import {
46
53
  XAUIProvider,
47
54
  buildRadius,
@@ -53,7 +60,7 @@ import {
53
60
  primitives,
54
61
  sourceKeys,
55
62
  tokens
56
- } from "./chunk-4O3PXFQ7.js";
63
+ } from "./chunk-XQE5PXOD.js";
57
64
  import {
58
65
  ThemeContext,
59
66
  deriveTint,
@@ -134,7 +141,9 @@ export {
134
141
  RIPPLE_START_SCALE,
135
142
  SCALE_REFERENCE_WIDTH,
136
143
  Slot,
144
+ TextSpan,
137
145
  ThemeContext,
146
+ Typography,
138
147
  XAUIProvider,
139
148
  buildRadius,
140
149
  buildShadows,
@@ -157,6 +166,7 @@ export {
157
166
  rippleRadiusFor,
158
167
  sourceKeys,
159
168
  tokens,
169
+ typographyRecipe,
160
170
  useButton,
161
171
  useColorMode,
162
172
  useControllableState,
@@ -1,35 +1,7 @@
1
1
  import { ComponentType, ReactNode } from 'react';
2
- import { ImageStyle, TextStyle, ViewStyle, ImageSourcePropType, StyleProp, PressableProps } from 'react-native';
2
+ import { ImageSourcePropType, StyleProp, ImageStyle, PressableProps, ViewStyle } from 'react-native';
3
+ import { I as ImageStyleProps, V as ViewStyleProps } from './create-recipe-3_ElpCYt.cjs';
3
4
  import { SharedValue } from 'react-native-reanimated';
4
- import { g as XAUITheme, X as XAUIColors } from './theme.type-C9bFJKFm.js';
5
-
6
- /**
7
- * R13 — React Native mirrors a layout under RTL through the Start/End properties and only
8
- * those. A props API is exactly where someone writes `paddingLeft` without thinking, so
9
- * the type removes the temptation instead of leaving it to a review.
10
- */
11
- type DirectionalStyleKey = 'left' | 'right' | 'paddingLeft' | 'paddingRight' | 'marginLeft' | 'marginRight' | 'borderLeftWidth' | 'borderRightWidth' | 'borderLeftColor' | 'borderRightColor' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderBottomLeftRadius' | 'borderBottomRightRadius';
12
- /**
13
- * `pointerEvents` is a style key *and* a `View` prop. R14 says the component's own prop
14
- * wins, so it stays the prop it has always been and is not exposed twice — the one name
15
- * where the two vocabularies collide.
16
- */
17
- type ComponentOwnedStyleKey = 'pointerEvents';
18
- /**
19
- * The style keys of a node, exposed as props (R14). Not a maintained list: it derives
20
- * from the React Native type, minus what R13 forbids.
21
- *
22
- * ```ts
23
- * type CardProps = ViewStyleProps & { variant?: CardVariant }
24
- * ```
25
- */
26
- type StyleProps<Style> = Omit<Style, DirectionalStyleKey | ComponentOwnedStyleKey>;
27
- /** A root, or any slot that renders a view. */
28
- type ViewStyleProps = StyleProps<ViewStyle>;
29
- /** A text slot — `color`, `fontSize`, `letterSpacing`… */
30
- type TextStyleProps = StyleProps<TextStyle>;
31
- /** An image slot — `resizeMode`, `tintColor`… */
32
- type ImageStyleProps = StyleProps<ImageStyle>;
33
5
 
34
6
  /**
35
7
  * The props Lucide, Ionicons and `react-native-vector-icons` all accept — the shape
@@ -192,89 +164,4 @@ type FeedbackContext = {
192
164
  waves?: readonly [RippleWave, RippleWave];
193
165
  };
194
166
 
195
- /**
196
- * A slot is a view or a text node, and a recipe writes one object per slot, so the two
197
- * RN style shapes are merged rather than discriminated per slot.
198
- */
199
- type SlotStyle = ViewStyle & TextStyle;
200
- type SlotStyles<Slot extends string> = Partial<Record<Slot, SlotStyle>>;
201
- /** The roles a variant consumes. The variant names tokens; `paint` says where they land. */
202
- type VariantRole = 'bg' | 'bgPressed' | 'fg' | 'border';
203
- /** Token names per role — no colour value ever appears in a recipe. */
204
- type VariantTokens = Partial<Record<VariantRole, keyof XAUIColors>>;
205
- /** The same roles resolved: theme colours, or the slices of a raw `color`. */
206
- type VariantColors = Partial<Record<VariantRole, string>>;
207
- /**
208
- * `disabled` is applied last of the three: a control that is both pressed and disabled
209
- * has to read disabled.
210
- */
211
- type StateName = 'focused' | 'pressed' | 'disabled';
212
- type States = Partial<Record<StateName, boolean>>;
213
- /** Reads the theme and the variant's resolved colours; returns one style per slot. */
214
- type StyleFn<Slot extends string> = (theme: XAUITheme, colors: VariantColors) => SlotStyles<Slot>;
215
- /** Named axes of finite token values — `{ size: { sm: fn, md: fn } }`. */
216
- type Axes<Slot extends string> = Record<string, Record<string, StyleFn<Slot>>>;
217
- /** One value per axis, plus the variant. Missing keys fall back to `defaultVariants`. */
218
- type Selection<Variant extends string, A extends Axes<string>> = {
219
- variant?: Variant;
220
- } & {
221
- [Axis in keyof A]?: Extract<keyof A[Axis], string>;
222
- };
223
- type CompoundVariant<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
224
- when: Selection<Variant, A>;
225
- style: StyleFn<Slot>;
226
- };
227
- type RecipeConfig<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
228
- /** Every slot the component publishes. Slots a recipe never styles resolve to `{}`. */
229
- slots: readonly Slot[];
230
- base?: StyleFn<Slot>;
231
- variantTokens?: Record<Variant, VariantTokens>;
232
- /** Where the variant's colours land — written once, and it holds for every variant. */
233
- paint?: StyleFn<Slot>;
234
- variants?: A;
235
- compoundVariants?: ReadonlyArray<CompoundVariant<Slot, Variant, A>>;
236
- states?: Partial<Record<StateName, StyleFn<Slot>>>;
237
- /**
238
- * `NoInfer`, because this is the one place a single variant name appears on its own:
239
- * without it, inference reads `Variant` off `{ variant: 'primary' }` and narrows the
240
- * whole recipe to that one value, so every other variant becomes a type error at the
241
- * call site. `variantTokens` is the declaration; this only picks a default from it.
242
- */
243
- defaultVariants?: Selection<NoInfer<Variant>, A>;
244
- };
245
- /** Stable references: the same object for the same tokens, for the app's lifetime. */
246
- type ResolvedStyles<Slot extends string> = Readonly<Record<Slot, SlotStyle>>;
247
- /** A selection with `defaultVariants` already folded in, keyed by axis name. */
248
- type ResolvedSelection = Readonly<Record<string, string | undefined>>;
249
-
250
- type ResolveArgs<Variant extends string, A extends Axes<string>> = {
251
- theme: XAUITheme;
252
- selection?: Selection<Variant, A>;
253
- states?: States;
254
- };
255
- type TintArgs<Variant extends string, A extends Axes<string>> = ResolveArgs<Variant, A> & {
256
- color: string;
257
- };
258
- type Recipe<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
259
- readonly slots: readonly Slot[];
260
- /** The cached pass: stable `StyleSheet` references, keyed by tokens alone. */
261
- resolve(args: ResolveArgs<Variant, A>): ResolvedStyles<Slot>;
262
- /**
263
- * The tint pass: the same functions run again with `color`'s slices in place of the
264
- * theme's tokens. Uncached and allocating, and only ever called when `color` is set.
265
- */
266
- tint(args: TintArgs<Variant, A>): SlotStyles<Slot>;
267
- };
268
- /**
269
- * A component's style, declared once. Resolution splits in two because the two halves
270
- * have different lifetimes: everything keyed by a finite token is cached forever, and
271
- * an arbitrary `color` is recomputed per render — which is what keeps the cache bounded
272
- * by the number of token combinations rather than by the palette users invent.
273
- *
274
- * const styles = buttonRecipe.resolve({ theme, selection: { variant, size }, states })
275
- * const tint = color ? buttonRecipe.tint({ theme, color, selection, states }) : undefined
276
- * <View style={[styles.root, tint?.root, style]} />
277
- */
278
- declare function createRecipe<Slot extends string, Variant extends string, const A extends Axes<Slot>>(config: RecipeConfig<Slot, Variant, A>): Recipe<Slot, Variant, A>;
279
-
280
- export { type AnimationConfig as A, type CompoundVariant as C, type DirectionalStyleKey as D, type FeedbackContext as F, type IconComponentProps as I, type PressableFeedbackProps as P, type RadiusStyle as R, type SlotAnimation as S, type TintArgs as T, type VariantColors as V, type IconContextValue as a, type IconProps as b, type AnimationProp as c, type ResolvedAnimation as d, type RippleWave as e, createRecipe as f, type Recipe as g, type ResolveArgs as h, type Axes as i, type RecipeConfig as j, type ResolvedSelection as k, type ResolvedStyles as l, type Selection as m, type SlotStyle as n, type SlotStyles as o, type StateName as p, type States as q, type StyleFn as r, type VariantRole as s, type VariantTokens as t, type ImageStyleProps as u, type StyleProps as v, type TextStyleProps as w, type ViewStyleProps as x };
167
+ export type { AnimationConfig as A, FeedbackContext as F, IconComponentProps as I, PressableFeedbackProps as P, RadiusStyle as R, SlotAnimation as S, IconContextValue as a, IconProps as b, AnimationProp as c, ResolvedAnimation as d, RippleWave as e };
@@ -1,35 +1,7 @@
1
1
  import { ComponentType, ReactNode } from 'react';
2
- import { ImageStyle, TextStyle, ViewStyle, ImageSourcePropType, StyleProp, PressableProps } from 'react-native';
2
+ import { ImageSourcePropType, StyleProp, ImageStyle, PressableProps, ViewStyle } from 'react-native';
3
+ import { I as ImageStyleProps, V as ViewStyleProps } from './create-recipe-DImq1AZA.js';
3
4
  import { SharedValue } from 'react-native-reanimated';
4
- import { g as XAUITheme, X as XAUIColors } from './theme.type-C9bFJKFm.cjs';
5
-
6
- /**
7
- * R13 — React Native mirrors a layout under RTL through the Start/End properties and only
8
- * those. A props API is exactly where someone writes `paddingLeft` without thinking, so
9
- * the type removes the temptation instead of leaving it to a review.
10
- */
11
- type DirectionalStyleKey = 'left' | 'right' | 'paddingLeft' | 'paddingRight' | 'marginLeft' | 'marginRight' | 'borderLeftWidth' | 'borderRightWidth' | 'borderLeftColor' | 'borderRightColor' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderBottomLeftRadius' | 'borderBottomRightRadius';
12
- /**
13
- * `pointerEvents` is a style key *and* a `View` prop. R14 says the component's own prop
14
- * wins, so it stays the prop it has always been and is not exposed twice — the one name
15
- * where the two vocabularies collide.
16
- */
17
- type ComponentOwnedStyleKey = 'pointerEvents';
18
- /**
19
- * The style keys of a node, exposed as props (R14). Not a maintained list: it derives
20
- * from the React Native type, minus what R13 forbids.
21
- *
22
- * ```ts
23
- * type CardProps = ViewStyleProps & { variant?: CardVariant }
24
- * ```
25
- */
26
- type StyleProps<Style> = Omit<Style, DirectionalStyleKey | ComponentOwnedStyleKey>;
27
- /** A root, or any slot that renders a view. */
28
- type ViewStyleProps = StyleProps<ViewStyle>;
29
- /** A text slot — `color`, `fontSize`, `letterSpacing`… */
30
- type TextStyleProps = StyleProps<TextStyle>;
31
- /** An image slot — `resizeMode`, `tintColor`… */
32
- type ImageStyleProps = StyleProps<ImageStyle>;
33
5
 
34
6
  /**
35
7
  * The props Lucide, Ionicons and `react-native-vector-icons` all accept — the shape
@@ -192,89 +164,4 @@ type FeedbackContext = {
192
164
  waves?: readonly [RippleWave, RippleWave];
193
165
  };
194
166
 
195
- /**
196
- * A slot is a view or a text node, and a recipe writes one object per slot, so the two
197
- * RN style shapes are merged rather than discriminated per slot.
198
- */
199
- type SlotStyle = ViewStyle & TextStyle;
200
- type SlotStyles<Slot extends string> = Partial<Record<Slot, SlotStyle>>;
201
- /** The roles a variant consumes. The variant names tokens; `paint` says where they land. */
202
- type VariantRole = 'bg' | 'bgPressed' | 'fg' | 'border';
203
- /** Token names per role — no colour value ever appears in a recipe. */
204
- type VariantTokens = Partial<Record<VariantRole, keyof XAUIColors>>;
205
- /** The same roles resolved: theme colours, or the slices of a raw `color`. */
206
- type VariantColors = Partial<Record<VariantRole, string>>;
207
- /**
208
- * `disabled` is applied last of the three: a control that is both pressed and disabled
209
- * has to read disabled.
210
- */
211
- type StateName = 'focused' | 'pressed' | 'disabled';
212
- type States = Partial<Record<StateName, boolean>>;
213
- /** Reads the theme and the variant's resolved colours; returns one style per slot. */
214
- type StyleFn<Slot extends string> = (theme: XAUITheme, colors: VariantColors) => SlotStyles<Slot>;
215
- /** Named axes of finite token values — `{ size: { sm: fn, md: fn } }`. */
216
- type Axes<Slot extends string> = Record<string, Record<string, StyleFn<Slot>>>;
217
- /** One value per axis, plus the variant. Missing keys fall back to `defaultVariants`. */
218
- type Selection<Variant extends string, A extends Axes<string>> = {
219
- variant?: Variant;
220
- } & {
221
- [Axis in keyof A]?: Extract<keyof A[Axis], string>;
222
- };
223
- type CompoundVariant<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
224
- when: Selection<Variant, A>;
225
- style: StyleFn<Slot>;
226
- };
227
- type RecipeConfig<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
228
- /** Every slot the component publishes. Slots a recipe never styles resolve to `{}`. */
229
- slots: readonly Slot[];
230
- base?: StyleFn<Slot>;
231
- variantTokens?: Record<Variant, VariantTokens>;
232
- /** Where the variant's colours land — written once, and it holds for every variant. */
233
- paint?: StyleFn<Slot>;
234
- variants?: A;
235
- compoundVariants?: ReadonlyArray<CompoundVariant<Slot, Variant, A>>;
236
- states?: Partial<Record<StateName, StyleFn<Slot>>>;
237
- /**
238
- * `NoInfer`, because this is the one place a single variant name appears on its own:
239
- * without it, inference reads `Variant` off `{ variant: 'primary' }` and narrows the
240
- * whole recipe to that one value, so every other variant becomes a type error at the
241
- * call site. `variantTokens` is the declaration; this only picks a default from it.
242
- */
243
- defaultVariants?: Selection<NoInfer<Variant>, A>;
244
- };
245
- /** Stable references: the same object for the same tokens, for the app's lifetime. */
246
- type ResolvedStyles<Slot extends string> = Readonly<Record<Slot, SlotStyle>>;
247
- /** A selection with `defaultVariants` already folded in, keyed by axis name. */
248
- type ResolvedSelection = Readonly<Record<string, string | undefined>>;
249
-
250
- type ResolveArgs<Variant extends string, A extends Axes<string>> = {
251
- theme: XAUITheme;
252
- selection?: Selection<Variant, A>;
253
- states?: States;
254
- };
255
- type TintArgs<Variant extends string, A extends Axes<string>> = ResolveArgs<Variant, A> & {
256
- color: string;
257
- };
258
- type Recipe<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
259
- readonly slots: readonly Slot[];
260
- /** The cached pass: stable `StyleSheet` references, keyed by tokens alone. */
261
- resolve(args: ResolveArgs<Variant, A>): ResolvedStyles<Slot>;
262
- /**
263
- * The tint pass: the same functions run again with `color`'s slices in place of the
264
- * theme's tokens. Uncached and allocating, and only ever called when `color` is set.
265
- */
266
- tint(args: TintArgs<Variant, A>): SlotStyles<Slot>;
267
- };
268
- /**
269
- * A component's style, declared once. Resolution splits in two because the two halves
270
- * have different lifetimes: everything keyed by a finite token is cached forever, and
271
- * an arbitrary `color` is recomputed per render — which is what keeps the cache bounded
272
- * by the number of token combinations rather than by the palette users invent.
273
- *
274
- * const styles = buttonRecipe.resolve({ theme, selection: { variant, size }, states })
275
- * const tint = color ? buttonRecipe.tint({ theme, color, selection, states }) : undefined
276
- * <View style={[styles.root, tint?.root, style]} />
277
- */
278
- declare function createRecipe<Slot extends string, Variant extends string, const A extends Axes<Slot>>(config: RecipeConfig<Slot, Variant, A>): Recipe<Slot, Variant, A>;
279
-
280
- export { type AnimationConfig as A, type CompoundVariant as C, type DirectionalStyleKey as D, type FeedbackContext as F, type IconComponentProps as I, type PressableFeedbackProps as P, type RadiusStyle as R, type SlotAnimation as S, type TintArgs as T, type VariantColors as V, type IconContextValue as a, type IconProps as b, type AnimationProp as c, type ResolvedAnimation as d, type RippleWave as e, createRecipe as f, type Recipe as g, type ResolveArgs as h, type Axes as i, type RecipeConfig as j, type ResolvedSelection as k, type ResolvedStyles as l, type Selection as m, type SlotStyle as n, type SlotStyles as o, type StateName as p, type States as q, type StyleFn as r, type VariantRole as s, type VariantTokens as t, type ImageStyleProps as u, type StyleProps as v, type TextStyleProps as w, type ViewStyleProps as x };
167
+ export type { AnimationConfig as A, FeedbackContext as F, IconComponentProps as I, PressableFeedbackProps as P, RadiusStyle as R, SlotAnimation as S, IconContextValue as a, IconProps as b, AnimationProp as c, ResolvedAnimation as d, RippleWave as e };
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkBAACHVM4cjs = require('../chunk-BAACHVM4.cjs');
5
+ var _chunkM2VYRHVScjs = require('../chunk-M2VYRHVS.cjs');
6
6
 
7
7
 
8
8
 
@@ -27,6 +27,7 @@ var _chunkBAACHVM4cjs = require('../chunk-BAACHVM4.cjs');
27
27
 
28
28
 
29
29
 
30
+ var _chunk2UICXD3Qcjs = require('../chunk-2UICXD3Q.cjs');
30
31
 
31
32
 
32
33
 
@@ -34,7 +35,8 @@ var _chunkBAACHVM4cjs = require('../chunk-BAACHVM4.cjs');
34
35
 
35
36
 
36
37
 
37
- var _chunkPUER6Y4Mcjs = require('../chunk-PUER6Y4M.cjs');
38
+
39
+ var _chunk5SU7FXWHcjs = require('../chunk-5SU7FXWH.cjs');
38
40
  require('../chunk-6N5JXRUZ.cjs');
39
41
 
40
42
 
@@ -70,4 +72,4 @@ require('../chunk-6N5JXRUZ.cjs');
70
72
 
71
73
 
72
74
 
73
- exports.FEEDBACK_OVERLAY = _chunkPUER6Y4Mcjs.FEEDBACK_OVERLAY; exports.HIGHLIGHT_DURATION = _chunkPUER6Y4Mcjs.HIGHLIGHT_DURATION; exports.HIGHLIGHT_OPACITY = _chunkPUER6Y4Mcjs.HIGHLIGHT_OPACITY; exports.Icon = _chunkPUER6Y4Mcjs.Icon; exports.IconContext = _chunkPUER6Y4Mcjs.IconContext; exports.PRESS_DURATION = _chunkPUER6Y4Mcjs.PRESS_DURATION; exports.PRESS_SCALE = _chunkPUER6Y4Mcjs.PRESS_SCALE; exports.Portal = _chunkBAACHVM4cjs.Portal; exports.PortalContext = _chunkBAACHVM4cjs.PortalContext; exports.PortalHost = _chunkBAACHVM4cjs.PortalHost; exports.PressableFeedback = _chunkPUER6Y4Mcjs.PressableFeedback; exports.RIPPLE_CONFIRM_DURATION = _chunkPUER6Y4Mcjs.RIPPLE_CONFIRM_DURATION; exports.RIPPLE_EXPAND_DURATION = _chunkPUER6Y4Mcjs.RIPPLE_EXPAND_DURATION; exports.RIPPLE_FADE_IN = _chunkPUER6Y4Mcjs.RIPPLE_FADE_IN; exports.RIPPLE_FADE_OUT = _chunkPUER6Y4Mcjs.RIPPLE_FADE_OUT; exports.RIPPLE_FADE_OUT_DELAY = _chunkPUER6Y4Mcjs.RIPPLE_FADE_OUT_DELAY; exports.RIPPLE_OPACITY = _chunkPUER6Y4Mcjs.RIPPLE_OPACITY; exports.RIPPLE_START_SCALE = _chunkPUER6Y4Mcjs.RIPPLE_START_SCALE; exports.SCALE_REFERENCE_WIDTH = _chunkPUER6Y4Mcjs.SCALE_REFERENCE_WIDTH; exports.Slot = _chunkPUER6Y4Mcjs.Slot; exports.childrenToString = _chunkPUER6Y4Mcjs.childrenToString; exports.createRecipe = _chunkPUER6Y4Mcjs.createRecipe; exports.createSlotContext = _chunkPUER6Y4Mcjs.createSlotContext; exports.markOverlay = _chunkPUER6Y4Mcjs.markOverlay; exports.mergeProps = _chunkPUER6Y4Mcjs.mergeProps; exports.mergeRefs = _chunkPUER6Y4Mcjs.mergeRefs; exports.pressScaleFor = _chunkPUER6Y4Mcjs.pressScaleFor; exports.resolveAnimation = _chunkPUER6Y4Mcjs.resolveAnimation; exports.resolveSlotAnimation = _chunkPUER6Y4Mcjs.resolveSlotAnimation; exports.rippleRadiusFor = _chunkPUER6Y4Mcjs.rippleRadiusFor; exports.useFeedback = _chunkPUER6Y4Mcjs.useFeedback; exports.useIconContext = _chunkPUER6Y4Mcjs.useIconContext; exports.useStyleProps = _chunkPUER6Y4Mcjs.useStyleProps;
75
+ exports.FEEDBACK_OVERLAY = _chunk2UICXD3Qcjs.FEEDBACK_OVERLAY; exports.HIGHLIGHT_DURATION = _chunk2UICXD3Qcjs.HIGHLIGHT_DURATION; exports.HIGHLIGHT_OPACITY = _chunk2UICXD3Qcjs.HIGHLIGHT_OPACITY; exports.Icon = _chunk2UICXD3Qcjs.Icon; exports.IconContext = _chunk2UICXD3Qcjs.IconContext; exports.PRESS_DURATION = _chunk2UICXD3Qcjs.PRESS_DURATION; exports.PRESS_SCALE = _chunk2UICXD3Qcjs.PRESS_SCALE; exports.Portal = _chunkM2VYRHVScjs.Portal; exports.PortalContext = _chunkM2VYRHVScjs.PortalContext; exports.PortalHost = _chunkM2VYRHVScjs.PortalHost; exports.PressableFeedback = _chunk2UICXD3Qcjs.PressableFeedback; exports.RIPPLE_CONFIRM_DURATION = _chunk2UICXD3Qcjs.RIPPLE_CONFIRM_DURATION; exports.RIPPLE_EXPAND_DURATION = _chunk2UICXD3Qcjs.RIPPLE_EXPAND_DURATION; exports.RIPPLE_FADE_IN = _chunk2UICXD3Qcjs.RIPPLE_FADE_IN; exports.RIPPLE_FADE_OUT = _chunk2UICXD3Qcjs.RIPPLE_FADE_OUT; exports.RIPPLE_FADE_OUT_DELAY = _chunk2UICXD3Qcjs.RIPPLE_FADE_OUT_DELAY; exports.RIPPLE_OPACITY = _chunk2UICXD3Qcjs.RIPPLE_OPACITY; exports.RIPPLE_START_SCALE = _chunk2UICXD3Qcjs.RIPPLE_START_SCALE; exports.SCALE_REFERENCE_WIDTH = _chunk2UICXD3Qcjs.SCALE_REFERENCE_WIDTH; exports.Slot = _chunk5SU7FXWHcjs.Slot; exports.childrenToString = _chunk5SU7FXWHcjs.childrenToString; exports.createRecipe = _chunk5SU7FXWHcjs.createRecipe; exports.createSlotContext = _chunk5SU7FXWHcjs.createSlotContext; exports.markOverlay = _chunk2UICXD3Qcjs.markOverlay; exports.mergeProps = _chunk5SU7FXWHcjs.mergeProps; exports.mergeRefs = _chunk5SU7FXWHcjs.mergeRefs; exports.pressScaleFor = _chunk2UICXD3Qcjs.pressScaleFor; exports.resolveAnimation = _chunk2UICXD3Qcjs.resolveAnimation; exports.resolveSlotAnimation = _chunk2UICXD3Qcjs.resolveSlotAnimation; exports.rippleRadiusFor = _chunk2UICXD3Qcjs.rippleRadiusFor; exports.useFeedback = _chunk2UICXD3Qcjs.useFeedback; exports.useIconContext = _chunk2UICXD3Qcjs.useIconContext; exports.useStyleProps = _chunk5SU7FXWHcjs.useStyleProps;
@@ -1,11 +1,13 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, Provider, Ref, RefCallback } from 'react';
3
- import { b as IconProps, a as IconContextValue, x as ViewStyleProps, S as SlotAnimation, F as FeedbackContext, c as AnimationProp, d as ResolvedAnimation } from '../create-recipe-BcUu9b2I.cjs';
4
- export { A as AnimationConfig, i as Axes, C as CompoundVariant, D as DirectionalStyleKey, I as IconComponentProps, u as ImageStyleProps, P as PressableFeedbackProps, R as RadiusStyle, g as Recipe, j as RecipeConfig, h as ResolveArgs, k as ResolvedSelection, l as ResolvedStyles, e as RippleWave, m as Selection, n as SlotStyle, o as SlotStyles, p as StateName, q as States, r as StyleFn, v as StyleProps, w as TextStyleProps, T as TintArgs, V as VariantColors, s as VariantRole, t as VariantTokens, f as createRecipe } from '../create-recipe-BcUu9b2I.cjs';
3
+ import { b as IconProps, a as IconContextValue, S as SlotAnimation, F as FeedbackContext, c as AnimationProp, d as ResolvedAnimation } from '../pressable-feedback.type-C9kjAuVQ.cjs';
4
+ export { A as AnimationConfig, I as IconComponentProps, P as PressableFeedbackProps, R as RadiusStyle, e as RippleWave } from '../pressable-feedback.type-C9kjAuVQ.cjs';
5
+ import { V as ViewStyleProps } from '../create-recipe-3_ElpCYt.cjs';
6
+ export { A as Axes, C as CompoundVariant, D as DirectionalStyleKey, I as ImageStyleProps, 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, n as StyleProps, o as TextStyleProps, T as TintArgs, k as VariantColors, l as VariantRole, m as VariantTokens, c as createRecipe } from '../create-recipe-3_ElpCYt.cjs';
5
7
  import * as react_native from 'react-native';
6
8
  import { StyleProp, ViewStyle } from 'react-native';
7
9
  import 'react-native-reanimated';
8
- import '../theme.type-C9bFJKFm.cjs';
10
+ import '../theme.type-C2gNHpEx.cjs';
9
11
 
10
12
  /**
11
13
  * The runtime half of R14. The type half lives in `system/style-props/`, and the two are