@xaui/native 0.9.1-alpha.36 → 0.9.1-alpha.38

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 (153) hide show
  1. package/dist/{chunk-B6OKVLC7.js → chunk-26OGEFQI.js} +4 -4
  2. package/dist/{chunk-V5IVMZQJ.js → chunk-2PMXMKS5.js} +13 -8
  3. package/dist/{chunk-QZO57TPX.js → chunk-346QBNUD.js} +4 -4
  4. package/dist/{chunk-PPWXLZGL.js → chunk-3GFRSZYR.js} +15 -23
  5. package/dist/{chunk-GPZSTEEI.cjs → chunk-3JXI2IHV.cjs} +17 -17
  6. package/dist/{chunk-ISPOIMGX.cjs → chunk-4KFKWBN5.cjs} +26 -5
  7. package/dist/{chunk-N2U63JUX.cjs → chunk-4KSKQD37.cjs} +10 -10
  8. package/dist/{chunk-ZU3XQZ63.cjs → chunk-54CWXA34.cjs} +66 -66
  9. package/dist/{chunk-EFPWXJAJ.cjs → chunk-66FOASTP.cjs} +16 -16
  10. package/dist/{chunk-E5ZW7MBW.js → chunk-6CO6FM67.js} +17 -17
  11. package/dist/{chunk-54FJOKAN.cjs → chunk-7GHM4GKL.cjs} +25 -25
  12. package/dist/{chunk-2L7FOIWY.cjs → chunk-7TOG4TVU.cjs} +26 -26
  13. package/dist/{chunk-6N5ZCEAB.cjs → chunk-A7YB7YWX.cjs} +10 -10
  14. package/dist/{chunk-FVKIQBHS.cjs → chunk-AAVCMCJ3.cjs} +4 -4
  15. package/dist/{chunk-HQVVQGYV.cjs → chunk-ACAPTWE3.cjs} +16 -12
  16. package/dist/{chunk-LCDHTLSG.cjs → chunk-BNFIFRQA.cjs} +7 -7
  17. package/dist/{chunk-6U5IUUAR.js → chunk-DY3SUG5P.js} +5 -5
  18. package/dist/{chunk-RSGIJ6RI.js → chunk-EYD4H4X6.js} +2 -2
  19. package/dist/{chunk-DL2PGB5G.js → chunk-FBCWNXZC.js} +59 -59
  20. package/dist/{chunk-OWE5IID7.js → chunk-FHUYHV6J.js} +28 -7
  21. package/dist/{chunk-K7GAHNMJ.js → chunk-HA6BFY3A.js} +6 -6
  22. package/dist/{chunk-MFXZHLOU.cjs → chunk-HOI5425P.cjs} +16 -16
  23. package/dist/{chunk-VWATEE5O.js → chunk-IKJVLJKT.js} +15 -15
  24. package/dist/{chunk-YXPYOOHU.js → chunk-K72UDPVN.js} +27 -27
  25. package/dist/{chunk-2LNE4PWB.cjs → chunk-KSUV74BE.cjs} +5 -5
  26. package/dist/{chunk-UCW25LL6.js → chunk-LIUO6D3D.js} +76 -76
  27. package/dist/{chunk-U3HFQHGZ.js → chunk-LTX6TB5I.js} +4 -4
  28. package/dist/{chunk-OSCW7I4H.js → chunk-M63GFNKV.js} +19 -4
  29. package/dist/chunk-MESKS6AI.js +0 -0
  30. package/dist/{chunk-SAGMDVFU.js → chunk-MXGER5PI.js} +5 -5
  31. package/dist/{chunk-GHKJ6MUH.cjs → chunk-NCCRQK3P.cjs} +14 -14
  32. package/dist/chunk-NCTOTTVW.js +13 -0
  33. package/dist/chunk-OJCCV65P.cjs +1 -0
  34. package/dist/chunk-Q3MQ7S2D.cjs +476 -0
  35. package/dist/{chunk-CVCE7TW5.js → chunk-QZ24MZRX.js} +4 -4
  36. package/dist/{chunk-5GMU7ESV.js → chunk-R7BU4CPS.js} +3 -3
  37. package/dist/chunk-RAWGK2XK.cjs +971 -0
  38. package/dist/{chunk-PGQWUASE.cjs → chunk-RKCWYUGA.cjs} +6 -6
  39. package/dist/{chunk-3YZSUDZ2.js → chunk-S2WNWMNT.js} +4 -4
  40. package/dist/{chunk-XARBUUIE.cjs → chunk-S4QUM4EE.cjs} +12 -12
  41. package/dist/{chunk-OMV5MUTM.js → chunk-SACDOFGF.js} +16 -16
  42. package/dist/{chunk-FYCDRRJ2.cjs → chunk-SIP5J7HU.cjs} +25 -25
  43. package/dist/{chunk-AQXNEV6J.cjs → chunk-SNIHUKDA.cjs} +16 -16
  44. package/dist/{chunk-2OZPOWFB.js → chunk-SZLXPF3G.js} +4 -4
  45. package/dist/{chunk-RPOKLFRB.cjs → chunk-TDTUAIFF.cjs} +12 -12
  46. package/dist/{chunk-2SCE7TFZ.cjs → chunk-TGMVEHV7.cjs} +68 -68
  47. package/dist/{chunk-K3AVOT6L.cjs → chunk-TK44VBIE.cjs} +22 -7
  48. package/dist/{chunk-KZVHC4FL.js → chunk-TRETQZEW.js} +7 -7
  49. package/dist/{chunk-AZRMOWRG.cjs → chunk-URA25DU4.cjs} +10 -10
  50. package/dist/{chunk-BAPXLO5N.js → chunk-USF6EWYR.js} +7 -7
  51. package/dist/{chunk-TE7KVFE4.cjs → chunk-VZK3NLBH.cjs} +11 -11
  52. package/dist/{chunk-5BNIIDQD.cjs → chunk-WDDXU3OH.cjs} +14 -9
  53. package/dist/chunk-WFEMJCXO.cjs +13 -0
  54. package/dist/{chunk-JB5XANQY.js → chunk-WKCQ6VGW.js} +15 -11
  55. package/dist/{chunk-DOLWSO7A.js → chunk-XNMZQSY5.js} +5 -5
  56. package/dist/{chunk-K4TWKF5U.cjs → chunk-XSQPVDFH.cjs} +15 -25
  57. package/dist/{chunk-4XFEEBPU.js → chunk-XTC2SLFT.js} +2 -2
  58. package/dist/{chunk-ADQVA2FQ.cjs → chunk-XWNG2U4K.cjs} +5 -5
  59. package/dist/chunk-ZF6KIHXH.js +591 -0
  60. package/dist/chunk-ZNZ7HVRW.js +1106 -0
  61. package/dist/components/accordion/index.cjs +34 -0
  62. package/dist/components/accordion/index.d.cts +299 -0
  63. package/dist/components/accordion/index.d.ts +299 -0
  64. package/dist/components/accordion/index.js +34 -0
  65. package/dist/components/alert/index.cjs +7 -8
  66. package/dist/components/alert/index.d.cts +2 -2
  67. package/dist/components/alert/index.d.ts +2 -2
  68. package/dist/components/alert/index.js +6 -7
  69. package/dist/components/avatar/index.cjs +5 -6
  70. package/dist/components/avatar/index.d.cts +2 -2
  71. package/dist/components/avatar/index.d.ts +2 -2
  72. package/dist/components/avatar/index.js +4 -5
  73. package/dist/components/badge/index.cjs +4 -5
  74. package/dist/components/badge/index.d.cts +1 -1
  75. package/dist/components/badge/index.d.ts +1 -1
  76. package/dist/components/badge/index.js +3 -4
  77. package/dist/components/button/index.cjs +8 -8
  78. package/dist/components/button/index.d.cts +41 -41
  79. package/dist/components/button/index.d.ts +41 -41
  80. package/dist/components/button/index.js +7 -7
  81. package/dist/components/card/index.cjs +5 -6
  82. package/dist/components/card/index.d.cts +43 -43
  83. package/dist/components/card/index.d.ts +43 -43
  84. package/dist/components/card/index.js +4 -5
  85. package/dist/components/checkbox/index.cjs +5 -6
  86. package/dist/components/checkbox/index.d.cts +82 -82
  87. package/dist/components/checkbox/index.d.ts +82 -82
  88. package/dist/components/checkbox/index.js +4 -5
  89. package/dist/components/chip/index.cjs +7 -8
  90. package/dist/components/chip/index.d.cts +42 -42
  91. package/dist/components/chip/index.d.ts +42 -42
  92. package/dist/components/chip/index.js +6 -7
  93. package/dist/components/divider/index.cjs +4 -5
  94. package/dist/components/divider/index.d.cts +3 -3
  95. package/dist/components/divider/index.d.ts +3 -3
  96. package/dist/components/divider/index.js +3 -4
  97. package/dist/components/field-group/index.cjs +6 -7
  98. package/dist/components/field-group/index.d.cts +2 -2
  99. package/dist/components/field-group/index.d.ts +2 -2
  100. package/dist/components/field-group/index.js +5 -6
  101. package/dist/components/input-otp/index.cjs +4 -5
  102. package/dist/components/input-otp/index.d.cts +2 -2
  103. package/dist/components/input-otp/index.d.ts +2 -2
  104. package/dist/components/input-otp/index.js +3 -4
  105. package/dist/components/radio/index.cjs +5 -6
  106. package/dist/components/radio/index.d.cts +82 -82
  107. package/dist/components/radio/index.d.ts +82 -82
  108. package/dist/components/radio/index.js +4 -5
  109. package/dist/components/select/index.cjs +48 -0
  110. package/dist/components/select/index.d.cts +509 -0
  111. package/dist/components/select/index.d.ts +509 -0
  112. package/dist/components/select/index.js +48 -0
  113. package/dist/components/skeleton/index.cjs +3 -4
  114. package/dist/components/skeleton/index.d.cts +1 -1
  115. package/dist/components/skeleton/index.d.ts +1 -1
  116. package/dist/components/skeleton/index.js +2 -3
  117. package/dist/components/spinner/index.cjs +5 -5
  118. package/dist/components/spinner/index.d.cts +1 -1
  119. package/dist/components/spinner/index.d.ts +1 -1
  120. package/dist/components/spinner/index.js +4 -4
  121. package/dist/components/switch/index.cjs +5 -6
  122. package/dist/components/switch/index.d.cts +81 -81
  123. package/dist/components/switch/index.d.ts +81 -81
  124. package/dist/components/switch/index.js +4 -5
  125. package/dist/components/text-area/index.cjs +5 -6
  126. package/dist/components/text-area/index.js +4 -5
  127. package/dist/components/text-field/index.cjs +4 -5
  128. package/dist/components/text-field/index.d.cts +3 -3
  129. package/dist/components/text-field/index.d.ts +3 -3
  130. package/dist/components/text-field/index.js +3 -4
  131. package/dist/components/typography/index.cjs +4 -5
  132. package/dist/components/typography/index.d.cts +5 -5
  133. package/dist/components/typography/index.d.ts +5 -5
  134. package/dist/components/typography/index.js +3 -4
  135. package/dist/components/view/index.cjs +4 -5
  136. package/dist/components/view/index.d.cts +3 -3
  137. package/dist/components/view/index.d.ts +3 -3
  138. package/dist/components/view/index.js +3 -4
  139. package/dist/index.cjs +91 -31
  140. package/dist/index.d.cts +3 -1
  141. package/dist/index.d.ts +3 -1
  142. package/dist/index.js +125 -65
  143. package/dist/system/index.cjs +13 -11
  144. package/dist/system/index.d.cts +61 -35
  145. package/dist/system/index.d.ts +61 -35
  146. package/dist/system/index.js +13 -11
  147. package/dist/theme/index.cjs +4 -3
  148. package/dist/theme/index.d.cts +21 -1
  149. package/dist/theme/index.d.ts +21 -1
  150. package/dist/theme/index.js +3 -2
  151. package/package.json +21 -1
  152. package/dist/chunk-FJ5TLRT3.js +0 -21
  153. package/dist/chunk-HT7H35GU.cjs +0 -21
@@ -8,8 +8,7 @@ import { R as RadiusKey, X as XAUITheme } from '../theme.type-C2gNHpEx.js';
8
8
  import { a as StyleFn, h as SlotStyle } from '../create-recipe-BdVd2ffi.js';
9
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
10
  export { C as CloseButtonProps } from '../close-button.type-BUYuoSt2.js';
11
- import { a as IconProps, I as IconContextValue } from '../icon.type-Kml72iSz.js';
12
- export { b as IconComponentProps } from '../icon.type-Kml72iSz.js';
11
+ import { b as IconComponentProps, a as IconProps, I as IconContextValue } from '../icon.type-Kml72iSz.js';
13
12
  import { V as ViewStyleProps } from '../style-props.type-CfnoGEP7.js';
14
13
  export { D as DirectionalStyleKey, I as ImageStyleProps, S as StyleProps, T as TextStyleProps } from '../style-props.type-CfnoGEP7.js';
15
14
  import 'react-native-reanimated';
@@ -46,6 +45,20 @@ type RestPropsOf<P> = Omit<P, StylePropKey>;
46
45
  */
47
46
  declare function useStyleProps<P extends object>(props: P): [StylePropsOf<P>, RestPropsOf<P>];
48
47
 
48
+ /**
49
+ * The chevron the library ships, rather than requiring one from the caller: a control
50
+ * whose whole affordance is "there is more under here" cannot be written without it, and
51
+ * asking for an icon package to draw one arrow is a peer dependency for a chevron.
52
+ *
53
+ * It sits in `system/` because two components draw it — `Select` turns it half a turn
54
+ * when its list opens, `Accordion` when its panel does. §2 bis: promotion at the second
55
+ * use, never by anticipation.
56
+ */
57
+ declare function ChevronDownIcon({ size, color, }: IconComponentProps): react.JSX.Element;
58
+ declare namespace ChevronDownIcon {
59
+ var displayName: string;
60
+ }
61
+
49
62
  /**
50
63
  * The gap nobody else closes: an icon is a third-party component, so a slot context does
51
64
  * not reach it and every call site ends up computing the colour by hand.
@@ -78,6 +91,36 @@ declare namespace Icon {
78
91
  declare const IconContext: react.Context<IconContextValue>;
79
92
  declare function useIconContext(): IconContextValue;
80
93
 
94
+ /**
95
+ * The `radius` axis, which is the same ten lines in every component that has one — a key
96
+ * of the radius scale, applied to one slot, overriding whatever `size` chose.
97
+ *
98
+ * It is written here rather than a third time in a recipe because that is the rule §2 bis
99
+ * states: extract at the second use, and by the end of P3 this axis exists in a dozen
100
+ * components. Nothing about it is component-specific except which slot carries the corner.
101
+ *
102
+ * ```ts
103
+ * variants: { size: { … }, radius: radiusAxis('root') }
104
+ * ```
105
+ *
106
+ * **More than one slot when a second node has to square off with the first.** A `Switch`
107
+ * whose track lost its capsule and kept a circular knob is half-rounded, so the axis moves
108
+ * both: `radiusAxis('track', 'thumb')`.
109
+ *
110
+ * The same named corner on each, not an inset-corrected one. Nesting rules would say the
111
+ * inner radius is the outer less the gap, but here that reaches zero before the outer does
112
+ * — at `xs` a 3pt track would hold a sharp-cornered knob — and two matched corners read
113
+ * better than one correct one.
114
+ *
115
+ * Variadic rather than an array because every call but that one passes a single slot, and
116
+ * `radiusAxis('root')` reads better than `radiusAxis(['root'])`.
117
+ *
118
+ * The return type is a full `Record<RadiusKey, …>` rather than a partial one, so
119
+ * `createRecipe` still infers `radius="3xl"` as the axis's value union and a typo in a
120
+ * caller's `radius` is a type error rather than a silently ignored key.
121
+ */
122
+ declare function radiusAxis<Slot extends string>(...slots: Slot[]): Record<RadiusKey, StyleFn<Slot>>;
123
+
81
124
  type PortalProps = {
82
125
  children: ReactNode;
83
126
  };
@@ -100,6 +143,19 @@ declare namespace Portal {
100
143
  type PortalMethods = {
101
144
  addPortal: (key: string, element: ReactNode) => void;
102
145
  removePortal: (key: string) => void;
146
+ /**
147
+ * Where the host's own view sits in the window, in points.
148
+ *
149
+ * An overlay is measured against a trigger that reports window coordinates, but it is
150
+ * rendered inside this host — so it is laid out against the host's origin, not the
151
+ * window's. Anything the two differ by (a status bar, a safe-area inset, a host mounted
152
+ * below a header) is exactly the distance the overlay would be wrong by. Subtracting it
153
+ * is what makes `measureInWindow` on the trigger mean the same thing on both sides.
154
+ */
155
+ origin: {
156
+ x: number;
157
+ y: number;
158
+ };
103
159
  };
104
160
  /**
105
161
  * `null` outside a host, and `Portal` treats that as "render nothing" rather than
@@ -298,7 +354,7 @@ declare function resolveSlotAnimation(override: SlotAnimation | undefined, enabl
298
354
  * off — and it is the only shape that survives `asChild`, where the caller's own element
299
355
  * is the pressable and there is no sibling for the primitive to inject.
300
356
  */
301
- declare const PressableFeedback: react.ForwardRefExoticComponent<Omit<react_native.PressableProps, "disabled" | "style" | "children"> & ViewStyleProps & {
357
+ declare const PressableFeedback: react.ForwardRefExoticComponent<Omit<react_native.PressableProps, "style" | "children" | "disabled"> & ViewStyleProps & {
302
358
  isPressed?: boolean;
303
359
  isDisabled?: boolean;
304
360
  asChild?: boolean;
@@ -310,36 +366,6 @@ declare const PressableFeedback: react.ForwardRefExoticComponent<Omit<react_nati
310
366
  Ripple: typeof PressableFeedbackRipple;
311
367
  };
312
368
 
313
- /**
314
- * The `radius` axis, which is the same ten lines in every component that has one — a key
315
- * of the radius scale, applied to one slot, overriding whatever `size` chose.
316
- *
317
- * It is written here rather than a third time in a recipe because that is the rule §2 bis
318
- * states: extract at the second use, and by the end of P3 this axis exists in a dozen
319
- * components. Nothing about it is component-specific except which slot carries the corner.
320
- *
321
- * ```ts
322
- * variants: { size: { … }, radius: radiusAxis('root') }
323
- * ```
324
- *
325
- * **More than one slot when a second node has to square off with the first.** A `Switch`
326
- * whose track lost its capsule and kept a circular knob is half-rounded, so the axis moves
327
- * both: `radiusAxis('track', 'thumb')`.
328
- *
329
- * The same named corner on each, not an inset-corrected one. Nesting rules would say the
330
- * inner radius is the outer less the gap, but here that reaches zero before the outer does
331
- * — at `xs` a 3pt track would hold a sharp-cornered knob — and two matched corners read
332
- * better than one correct one.
333
- *
334
- * Variadic rather than an array because every call but that one passes a single slot, and
335
- * `radiusAxis('root')` reads better than `radiusAxis(['root'])`.
336
- *
337
- * The return type is a full `Record<RadiusKey, …>` rather than a partial one, so
338
- * `createRecipe` still infers `radius="3xl"` as the axis's value union and a typo in a
339
- * caller's `radius` is a type error rather than a silently ignored key.
340
- */
341
- declare function radiusAxis<Slot extends string>(...slots: Slot[]): Record<RadiusKey, StyleFn<Slot>>;
342
-
343
369
  type SelectionFillProps = {
344
370
  /** Whether the control is on. The fill is the answer, and the mark rides on it. */
345
371
  isVisible: boolean;
@@ -492,7 +518,7 @@ declare const CloseButton: react.ForwardRefExoticComponent<{
492
518
  baseStyle?: react_native.StyleProp<react_native.ViewStyle>;
493
519
  glyphStyle?: react_native.StyleProp<react_native.ViewStyle>;
494
520
  style?: react_native.StyleProp<react_native.ViewStyle> | ((state: react_native.PressableStateCallbackType) => react_native.StyleProp<react_native.ViewStyle>);
495
- } & Omit<PressableFeedbackProps, "isPressed" | "style" | "children"> & react.RefAttributes<View>>;
521
+ } & Omit<PressableFeedbackProps, "style" | "children" | "isPressed"> & react.RefAttributes<View>>;
496
522
 
497
523
  /** The two slots a component publishes for a `CloseButton`: its box and one cross bar. */
498
524
  type CloseButtonSlots = {
@@ -516,4 +542,4 @@ type CloseButtonSlots = {
516
542
  */
517
543
  declare function closeButtonBase(theme: XAUITheme): CloseButtonSlots;
518
544
 
519
- export { AnimationProp, type AsChildProps, CloseButton, type CloseButtonSlots, 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, 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, childrenToString, closeButtonBase, createSlotContext, markOverlay, mergeProps, mergeRefs, pressScaleFor, radiusAxis, resolveAnimation, resolveSlotAnimation, rippleRadiusFor, useFeedback, useIconContext, useStyleProps };
545
+ export { AnimationProp, type AsChildProps, ChevronDownIcon, CloseButton, type CloseButtonSlots, FEEDBACK_OVERLAY, FeedbackContext, HIGHLIGHT_DURATION, HIGHLIGHT_OPACITY, 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, childrenToString, closeButtonBase, createSlotContext, markOverlay, mergeProps, mergeRefs, pressScaleFor, radiusAxis, resolveAnimation, resolveSlotAnimation, rippleRadiusFor, useFeedback, useIconContext, useStyleProps };
@@ -1,20 +1,22 @@
1
+ import "../chunk-MESKS6AI.js";
1
2
  import {
2
3
  Portal,
3
4
  PortalContext,
4
5
  PortalHost
5
- } from "../chunk-V5IVMZQJ.js";
6
- import {
7
- SelectionFill
8
- } from "../chunk-BA2DBSAN.js";
6
+ } from "../chunk-2PMXMKS5.js";
9
7
  import {
10
8
  CloseButton,
11
9
  closeButtonBase
12
- } from "../chunk-RSGIJ6RI.js";
10
+ } from "../chunk-EYD4H4X6.js";
13
11
  import {
12
+ ChevronDownIcon,
14
13
  Icon,
15
14
  IconContext,
16
15
  useIconContext
17
- } from "../chunk-OWE5IID7.js";
16
+ } from "../chunk-FHUYHV6J.js";
17
+ import {
18
+ SelectionFill
19
+ } from "../chunk-BA2DBSAN.js";
18
20
  import {
19
21
  FEEDBACK_OVERLAY,
20
22
  HIGHLIGHT_DURATION,
@@ -36,7 +38,7 @@ import {
36
38
  resolveSlotAnimation,
37
39
  rippleRadiusFor,
38
40
  useFeedback
39
- } from "../chunk-UCW25LL6.js";
41
+ } from "../chunk-LIUO6D3D.js";
40
42
  import "../chunk-423RQBOX.js";
41
43
  import "../chunk-EGLLDKN6.js";
42
44
  import {
@@ -44,7 +46,7 @@ import {
44
46
  childrenToString,
45
47
  createSlotContext,
46
48
  mergeProps
47
- } from "../chunk-YXPYOOHU.js";
49
+ } from "../chunk-K72UDPVN.js";
48
50
  import {
49
51
  mergeRefs
50
52
  } from "../chunk-36PRYGAM.js";
@@ -52,12 +54,12 @@ import {
52
54
  createRecipe,
53
55
  radiusAxis
54
56
  } from "../chunk-4GTAZM2C.js";
57
+ import "../chunk-A3EGFI6T.js";
55
58
  import {
56
59
  useStyleProps
57
- } from "../chunk-OSCW7I4H.js";
58
- import "../chunk-A3EGFI6T.js";
59
- import "../chunk-FJ5TLRT3.js";
60
+ } from "../chunk-M63GFNKV.js";
60
61
  export {
62
+ ChevronDownIcon,
61
63
  CloseButton,
62
64
  FEEDBACK_OVERLAY,
63
65
  HIGHLIGHT_DURATION,
@@ -9,7 +9,8 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkHQVVQGYVcjs = require('../chunk-HQVVQGYV.cjs');
12
+ var _chunkACAPTWE3cjs = require('../chunk-ACAPTWE3.cjs');
13
+ require('../chunk-WDDXU3OH.cjs');
13
14
 
14
15
 
15
16
 
@@ -17,7 +18,7 @@ var _chunkHQVVQGYVcjs = require('../chunk-HQVVQGYV.cjs');
17
18
 
18
19
 
19
20
  var _chunk57SJ4LJFcjs = require('../chunk-57SJ4LJF.cjs');
20
- require('../chunk-HT7H35GU.cjs');
21
+ require('../chunk-TK44VBIE.cjs');
21
22
 
22
23
 
23
24
 
@@ -34,4 +35,4 @@ require('../chunk-HT7H35GU.cjs');
34
35
 
35
36
 
36
37
 
37
- exports.ThemeContext = _chunk57SJ4LJFcjs.ThemeContext; exports.XAUIProvider = _chunkHQVVQGYVcjs.XAUIProvider; exports.buildRadius = _chunkHQVVQGYVcjs.buildRadius; exports.buildShadows = _chunkHQVVQGYVcjs.buildShadows; exports.createTheme = _chunkHQVVQGYVcjs.createTheme; exports.defaultTheme = _chunkHQVVQGYVcjs.defaultTheme; exports.deriveColors = _chunkHQVVQGYVcjs.deriveColors; exports.deriveTint = _chunk57SJ4LJFcjs.deriveTint; exports.palette = _chunkHQVVQGYVcjs.palette; exports.primitives = _chunkHQVVQGYVcjs.primitives; exports.sourceKeys = _chunkHQVVQGYVcjs.sourceKeys; exports.tokens = _chunkHQVVQGYVcjs.tokens; exports.useColorMode = _chunk57SJ4LJFcjs.useColorMode; exports.useThemeColor = _chunk57SJ4LJFcjs.useThemeColor; exports.useXAUITheme = _chunk57SJ4LJFcjs.useXAUITheme;
38
+ exports.ThemeContext = _chunk57SJ4LJFcjs.ThemeContext; exports.XAUIProvider = _chunkACAPTWE3cjs.XAUIProvider; exports.buildRadius = _chunkACAPTWE3cjs.buildRadius; exports.buildShadows = _chunkACAPTWE3cjs.buildShadows; exports.createTheme = _chunkACAPTWE3cjs.createTheme; exports.defaultTheme = _chunkACAPTWE3cjs.defaultTheme; exports.deriveColors = _chunkACAPTWE3cjs.deriveColors; exports.deriveTint = _chunk57SJ4LJFcjs.deriveTint; exports.palette = _chunkACAPTWE3cjs.palette; exports.primitives = _chunkACAPTWE3cjs.primitives; exports.sourceKeys = _chunkACAPTWE3cjs.sourceKeys; exports.tokens = _chunkACAPTWE3cjs.tokens; exports.useColorMode = _chunk57SJ4LJFcjs.useColorMode; exports.useThemeColor = _chunk57SJ4LJFcjs.useThemeColor; exports.useXAUITheme = _chunk57SJ4LJFcjs.useXAUITheme;
@@ -12,6 +12,14 @@ type XAUIProviderProps = {
12
12
  theme?: XAUIThemeSet;
13
13
  /** Controlled: the library owns neither the state nor its persistence. */
14
14
  colorMode?: ColorModePreference;
15
+ /**
16
+ * Mounts the `PortalHost` overlays render into. Set false only to mount one yourself,
17
+ * somewhere the provider cannot reach — under a gesture root, say. Without a host
18
+ * anywhere, `Portal` renders nothing and overlays are silently absent.
19
+ *
20
+ * @default true
21
+ */
22
+ hasPortalHost?: boolean;
15
23
  };
16
24
 
17
25
  /**
@@ -20,8 +28,14 @@ type XAUIProviderProps = {
20
28
  * `theme` is expected to come from `createTheme` at module level. The provider selects a
21
29
  * mode from an already-resolved set rather than memoizing on the prop's identity — which
22
30
  * is what the v0 provider did, rebuilding every style in the app on each parent render.
31
+ *
32
+ * It also mounts the `PortalHost` every overlay renders into. That is here rather than in
33
+ * the app because forgetting it is silent: `Portal` renders nothing outside a host, so a
34
+ * select would open onto an empty screen with no error to read. An app that needs the
35
+ * host somewhere else — under a gesture root, or inside its own navigation container —
36
+ * sets `hasPortalHost={false}` and mounts one itself.
23
37
  */
24
- declare function XAUIProvider({ children, theme, colorMode, }: XAUIProviderProps): react.JSX.Element;
38
+ declare function XAUIProvider({ children, theme, colorMode, hasPortalHost, }: XAUIProviderProps): react.JSX.Element;
25
39
 
26
40
  /**
27
41
  * Build a theme once, at module level:
@@ -391,6 +405,12 @@ declare function buildRadius(base: number): XAUIRadius;
391
405
  /**
392
406
  * Three roles, not an sm→xl scale — which is what lets dark mode drop the surface shadow
393
407
  * entirely instead of shipping a scale that reads as dirt on a dark background.
408
+ *
409
+ * `overlay` was heavier: a 24-point blur eight points down at 16 of Android's elevation.
410
+ * Android draws elevation on its own curve and draws it strongly, so a panel that read as
411
+ * lifted on iOS read as detached on Android — a dark halo the width of the gap between it
412
+ * and the field it came out of. Half the elevation and two thirds of the blur still say
413
+ * "above the page" without the panel looking cut out of it.
394
414
  */
395
415
  declare function buildShadows(mode: ColorMode): XAUITheme['shadows'];
396
416
 
@@ -12,6 +12,14 @@ type XAUIProviderProps = {
12
12
  theme?: XAUIThemeSet;
13
13
  /** Controlled: the library owns neither the state nor its persistence. */
14
14
  colorMode?: ColorModePreference;
15
+ /**
16
+ * Mounts the `PortalHost` overlays render into. Set false only to mount one yourself,
17
+ * somewhere the provider cannot reach — under a gesture root, say. Without a host
18
+ * anywhere, `Portal` renders nothing and overlays are silently absent.
19
+ *
20
+ * @default true
21
+ */
22
+ hasPortalHost?: boolean;
15
23
  };
16
24
 
17
25
  /**
@@ -20,8 +28,14 @@ type XAUIProviderProps = {
20
28
  * `theme` is expected to come from `createTheme` at module level. The provider selects a
21
29
  * mode from an already-resolved set rather than memoizing on the prop's identity — which
22
30
  * is what the v0 provider did, rebuilding every style in the app on each parent render.
31
+ *
32
+ * It also mounts the `PortalHost` every overlay renders into. That is here rather than in
33
+ * the app because forgetting it is silent: `Portal` renders nothing outside a host, so a
34
+ * select would open onto an empty screen with no error to read. An app that needs the
35
+ * host somewhere else — under a gesture root, or inside its own navigation container —
36
+ * sets `hasPortalHost={false}` and mounts one itself.
23
37
  */
24
- declare function XAUIProvider({ children, theme, colorMode, }: XAUIProviderProps): react.JSX.Element;
38
+ declare function XAUIProvider({ children, theme, colorMode, hasPortalHost, }: XAUIProviderProps): react.JSX.Element;
25
39
 
26
40
  /**
27
41
  * Build a theme once, at module level:
@@ -391,6 +405,12 @@ declare function buildRadius(base: number): XAUIRadius;
391
405
  /**
392
406
  * Three roles, not an sm→xl scale — which is what lets dark mode drop the surface shadow
393
407
  * entirely instead of shipping a scale that reads as dirt on a dark background.
408
+ *
409
+ * `overlay` was heavier: a 24-point blur eight points down at 16 of Android's elevation.
410
+ * Android draws elevation on its own curve and draws it strongly, so a panel that read as
411
+ * lifted on iOS read as detached on Android — a dark halo the width of the gap between it
412
+ * and the field it came out of. Half the elevation and two thirds of the blur still say
413
+ * "above the page" without the panel looking cut out of it.
394
414
  */
395
415
  declare function buildShadows(mode: ColorMode): XAUITheme['shadows'];
396
416
 
@@ -9,7 +9,8 @@ import {
9
9
  primitives,
10
10
  sourceKeys,
11
11
  tokens
12
- } from "../chunk-JB5XANQY.js";
12
+ } from "../chunk-WKCQ6VGW.js";
13
+ import "../chunk-2PMXMKS5.js";
13
14
  import {
14
15
  ThemeContext,
15
16
  deriveTint,
@@ -17,7 +18,7 @@ import {
17
18
  useThemeColor,
18
19
  useXAUITheme
19
20
  } from "../chunk-A3EGFI6T.js";
20
- import "../chunk-FJ5TLRT3.js";
21
+ import "../chunk-M63GFNKV.js";
21
22
  export {
22
23
  ThemeContext,
23
24
  XAUIProvider,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaui/native",
3
- "version": "0.9.1-alpha.36",
3
+ "version": "0.9.1-alpha.38",
4
4
  "description": "Composition-first React Native UI components with native animations powered by Reanimated",
5
5
  "keywords": [
6
6
  "react-native",
@@ -27,6 +27,16 @@
27
27
  "default": "./dist/index.cjs"
28
28
  }
29
29
  },
30
+ "./accordion": {
31
+ "import": {
32
+ "types": "./dist/components/accordion/index.d.ts",
33
+ "default": "./dist/components/accordion/index.js"
34
+ },
35
+ "require": {
36
+ "types": "./dist/components/accordion/index.d.cts",
37
+ "default": "./dist/components/accordion/index.cjs"
38
+ }
39
+ },
30
40
  "./alert": {
31
41
  "import": {
32
42
  "types": "./dist/components/alert/index.d.ts",
@@ -137,6 +147,16 @@
137
147
  "default": "./dist/components/radio/index.cjs"
138
148
  }
139
149
  },
150
+ "./select": {
151
+ "import": {
152
+ "types": "./dist/components/select/index.d.ts",
153
+ "default": "./dist/components/select/index.js"
154
+ },
155
+ "require": {
156
+ "types": "./dist/components/select/index.d.cts",
157
+ "default": "./dist/components/select/index.cjs"
158
+ }
159
+ },
140
160
  "./skeleton": {
141
161
  "import": {
142
162
  "types": "./dist/components/skeleton/index.d.ts",
@@ -1,21 +0,0 @@
1
- // src/utils/stable-hash.ts
2
- function canonical(value) {
3
- if (value === null || typeof value !== "object")
4
- return JSON.stringify(value) ?? "null";
5
- if (Array.isArray(value)) return `[${value.map(canonical).join(",")}]`;
6
- const entries = Object.entries(value).filter(([, v]) => typeof v !== "function").sort(([a], [b]) => a < b ? -1 : 1).map(([k, v]) => `${JSON.stringify(k)}:${canonical(v)}`);
7
- return `{${entries.join(",")}}`;
8
- }
9
- function stableHash(value) {
10
- const input = canonical(value);
11
- let hash = 2166136261;
12
- for (let i = 0; i < input.length; i++) {
13
- hash ^= input.charCodeAt(i);
14
- hash = Math.imul(hash, 16777619) >>> 0;
15
- }
16
- return hash.toString(36);
17
- }
18
-
19
- export {
20
- stableHash
21
- };
@@ -1,21 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/utils/stable-hash.ts
2
- function canonical(value) {
3
- if (value === null || typeof value !== "object")
4
- return _nullishCoalesce(JSON.stringify(value), () => ( "null"));
5
- if (Array.isArray(value)) return `[${value.map(canonical).join(",")}]`;
6
- const entries = Object.entries(value).filter(([, v]) => typeof v !== "function").sort(([a], [b]) => a < b ? -1 : 1).map(([k, v]) => `${JSON.stringify(k)}:${canonical(v)}`);
7
- return `{${entries.join(",")}}`;
8
- }
9
- function stableHash(value) {
10
- const input = canonical(value);
11
- let hash = 2166136261;
12
- for (let i = 0; i < input.length; i++) {
13
- hash ^= input.charCodeAt(i);
14
- hash = Math.imul(hash, 16777619) >>> 0;
15
- }
16
- return hash.toString(36);
17
- }
18
-
19
-
20
-
21
- exports.stableHash = stableHash;