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

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 (141) hide show
  1. package/dist/{chunk-V5IVMZQJ.js → chunk-2PMXMKS5.js} +13 -8
  2. package/dist/{chunk-FVKIQBHS.cjs → chunk-3P6M2R4S.cjs} +6 -6
  3. package/dist/{chunk-RPOKLFRB.cjs → chunk-437QULXO.cjs} +7 -7
  4. package/dist/{chunk-BAPXLO5N.js → chunk-4PTWZCOK.js} +9 -9
  5. package/dist/{chunk-E5ZW7MBW.js → chunk-5PPNDKRX.js} +16 -16
  6. package/dist/{chunk-K7GAHNMJ.js → chunk-6G3XWPNP.js} +5 -5
  7. package/dist/{chunk-ISPOIMGX.cjs → chunk-7B3UBUC6.cjs} +3 -3
  8. package/dist/{chunk-5GMU7ESV.js → chunk-7LSY4WFL.js} +2 -2
  9. package/dist/{chunk-HQVVQGYV.cjs → chunk-ACAPTWE3.cjs} +16 -12
  10. package/dist/{chunk-2L7FOIWY.cjs → chunk-AP6RVIIK.cjs} +21 -21
  11. package/dist/{chunk-SAGMDVFU.js → chunk-BORJJYDW.js} +4 -4
  12. package/dist/{chunk-ADQVA2FQ.cjs → chunk-C5VDFRAD.cjs} +3 -3
  13. package/dist/{chunk-FYCDRRJ2.cjs → chunk-CUQTAPBU.cjs} +22 -22
  14. package/dist/{chunk-GPZSTEEI.cjs → chunk-DKH6BNPF.cjs} +15 -15
  15. package/dist/{chunk-2SCE7TFZ.cjs → chunk-DRMT346W.cjs} +64 -64
  16. package/dist/chunk-DVDQSW7U.cjs +1006 -0
  17. package/dist/{chunk-U3HFQHGZ.js → chunk-E3X5ODKQ.js} +3 -3
  18. package/dist/{chunk-RSGIJ6RI.js → chunk-EOJ5MYAQ.js} +5 -5
  19. package/dist/{chunk-MFXZHLOU.cjs → chunk-FTQHDJYL.cjs} +14 -14
  20. package/dist/{chunk-GHKJ6MUH.cjs → chunk-GTT4NHS2.cjs} +11 -11
  21. package/dist/{chunk-OWE5IID7.js → chunk-HXW4ANVB.js} +3 -3
  22. package/dist/{chunk-N2U63JUX.cjs → chunk-IGLKACSR.cjs} +7 -7
  23. package/dist/{chunk-VWATEE5O.js → chunk-IKJVLJKT.js} +15 -15
  24. package/dist/{chunk-AZRMOWRG.cjs → chunk-ITURCQMQ.cjs} +7 -7
  25. package/dist/{chunk-PGQWUASE.cjs → chunk-JB5LGQ54.cjs} +3 -3
  26. package/dist/{chunk-4XFEEBPU.js → chunk-JDSE4TQL.js} +1 -1
  27. package/dist/{chunk-6U5IUUAR.js → chunk-JXNFOOKC.js} +7 -7
  28. package/dist/{chunk-6N5ZCEAB.cjs → chunk-LEWW24RQ.cjs} +7 -7
  29. package/dist/{chunk-OSCW7I4H.js → chunk-M63GFNKV.js} +19 -4
  30. package/dist/chunk-MESKS6AI.js +0 -0
  31. package/dist/{chunk-CVCE7TW5.js → chunk-NKPTXTTS.js} +3 -3
  32. package/dist/{chunk-2LNE4PWB.cjs → chunk-NTD3NPRX.cjs} +3 -3
  33. package/dist/{chunk-2OZPOWFB.js → chunk-O3A3DBSZ.js} +3 -3
  34. package/dist/chunk-OJCCV65P.cjs +1 -0
  35. package/dist/{chunk-B6OKVLC7.js → chunk-OULTSBKU.js} +3 -3
  36. package/dist/{chunk-TE7KVFE4.cjs → chunk-P747CRAY.cjs} +9 -9
  37. package/dist/{chunk-DL2PGB5G.js → chunk-RGKWNK4T.js} +58 -58
  38. package/dist/{chunk-DOLWSO7A.js → chunk-RVRVGG73.js} +4 -4
  39. package/dist/{chunk-3YZSUDZ2.js → chunk-SMW6ZWMH.js} +3 -3
  40. package/dist/{chunk-AQXNEV6J.cjs → chunk-SNIHUKDA.cjs} +16 -16
  41. package/dist/{chunk-OMV5MUTM.js → chunk-SO5UAGIU.js} +15 -15
  42. package/dist/{chunk-KZVHC4FL.js → chunk-TDYPY2J7.js} +8 -8
  43. package/dist/{chunk-QZO57TPX.js → chunk-TJHYSSBZ.js} +3 -3
  44. package/dist/{chunk-K3AVOT6L.cjs → chunk-TK44VBIE.cjs} +22 -7
  45. package/dist/{chunk-ZU3XQZ63.cjs → chunk-UBOXW5WO.cjs} +63 -63
  46. package/dist/{chunk-UCW25LL6.js → chunk-UGF35NSE.js} +75 -75
  47. package/dist/{chunk-LCDHTLSG.cjs → chunk-VFTT3Q4B.cjs} +4 -4
  48. package/dist/{chunk-5BNIIDQD.cjs → chunk-WDDXU3OH.cjs} +14 -9
  49. package/dist/{chunk-JB5XANQY.js → chunk-WKCQ6VGW.js} +15 -11
  50. package/dist/{chunk-XARBUUIE.cjs → chunk-WVLSQO6K.cjs} +9 -9
  51. package/dist/chunk-XWY4DF37.js +1143 -0
  52. package/dist/{chunk-EFPWXJAJ.cjs → chunk-ZJWEVFAO.cjs} +12 -12
  53. package/dist/components/alert/index.cjs +7 -8
  54. package/dist/components/alert/index.d.cts +1 -1
  55. package/dist/components/alert/index.d.ts +1 -1
  56. package/dist/components/alert/index.js +6 -7
  57. package/dist/components/avatar/index.cjs +4 -5
  58. package/dist/components/avatar/index.d.cts +3 -3
  59. package/dist/components/avatar/index.d.ts +3 -3
  60. package/dist/components/avatar/index.js +3 -4
  61. package/dist/components/badge/index.cjs +3 -4
  62. package/dist/components/badge/index.d.cts +1 -1
  63. package/dist/components/badge/index.d.ts +1 -1
  64. package/dist/components/badge/index.js +2 -3
  65. package/dist/components/button/index.cjs +6 -7
  66. package/dist/components/button/index.d.cts +168 -168
  67. package/dist/components/button/index.d.ts +168 -168
  68. package/dist/components/button/index.js +5 -6
  69. package/dist/components/card/index.cjs +5 -6
  70. package/dist/components/card/index.d.cts +169 -169
  71. package/dist/components/card/index.d.ts +169 -169
  72. package/dist/components/card/index.js +4 -5
  73. package/dist/components/checkbox/index.cjs +5 -6
  74. package/dist/components/checkbox/index.d.cts +336 -336
  75. package/dist/components/checkbox/index.d.ts +336 -336
  76. package/dist/components/checkbox/index.js +4 -5
  77. package/dist/components/chip/index.cjs +7 -8
  78. package/dist/components/chip/index.d.cts +169 -169
  79. package/dist/components/chip/index.d.ts +169 -169
  80. package/dist/components/chip/index.js +6 -7
  81. package/dist/components/divider/index.cjs +3 -4
  82. package/dist/components/divider/index.d.cts +1 -1
  83. package/dist/components/divider/index.d.ts +1 -1
  84. package/dist/components/divider/index.js +2 -3
  85. package/dist/components/field-group/index.cjs +5 -6
  86. package/dist/components/field-group/index.d.cts +6 -6
  87. package/dist/components/field-group/index.d.ts +6 -6
  88. package/dist/components/field-group/index.js +4 -5
  89. package/dist/components/input-otp/index.cjs +3 -4
  90. package/dist/components/input-otp/index.d.cts +1 -1
  91. package/dist/components/input-otp/index.d.ts +1 -1
  92. package/dist/components/input-otp/index.js +2 -3
  93. package/dist/components/radio/index.cjs +5 -6
  94. package/dist/components/radio/index.d.cts +336 -336
  95. package/dist/components/radio/index.d.ts +336 -336
  96. package/dist/components/radio/index.js +4 -5
  97. package/dist/components/select/index.cjs +47 -0
  98. package/dist/components/select/index.d.cts +519 -0
  99. package/dist/components/select/index.d.ts +519 -0
  100. package/dist/components/select/index.js +47 -0
  101. package/dist/components/skeleton/index.cjs +3 -4
  102. package/dist/components/skeleton/index.d.cts +1 -1
  103. package/dist/components/skeleton/index.d.ts +1 -1
  104. package/dist/components/skeleton/index.js +2 -3
  105. package/dist/components/spinner/index.cjs +4 -5
  106. package/dist/components/spinner/index.d.cts +1 -1
  107. package/dist/components/spinner/index.d.ts +1 -1
  108. package/dist/components/spinner/index.js +3 -4
  109. package/dist/components/switch/index.cjs +5 -6
  110. package/dist/components/switch/index.d.cts +338 -338
  111. package/dist/components/switch/index.d.ts +338 -338
  112. package/dist/components/switch/index.js +4 -5
  113. package/dist/components/text-area/index.cjs +4 -5
  114. package/dist/components/text-area/index.js +3 -4
  115. package/dist/components/text-field/index.cjs +3 -4
  116. package/dist/components/text-field/index.d.cts +3 -3
  117. package/dist/components/text-field/index.d.ts +3 -3
  118. package/dist/components/text-field/index.js +2 -3
  119. package/dist/components/typography/index.cjs +3 -4
  120. package/dist/components/typography/index.d.cts +2 -2
  121. package/dist/components/typography/index.d.ts +2 -2
  122. package/dist/components/typography/index.js +2 -3
  123. package/dist/components/view/index.cjs +3 -4
  124. package/dist/components/view/index.d.cts +6 -6
  125. package/dist/components/view/index.d.ts +6 -6
  126. package/dist/components/view/index.js +2 -3
  127. package/dist/index.cjs +64 -28
  128. package/dist/index.d.cts +1 -0
  129. package/dist/index.d.ts +1 -0
  130. package/dist/index.js +80 -44
  131. package/dist/system/index.cjs +10 -10
  132. package/dist/system/index.d.cts +15 -2
  133. package/dist/system/index.d.ts +15 -2
  134. package/dist/system/index.js +8 -8
  135. package/dist/theme/index.cjs +4 -3
  136. package/dist/theme/index.d.cts +21 -1
  137. package/dist/theme/index.d.ts +21 -1
  138. package/dist/theme/index.js +3 -2
  139. package/package.json +11 -1
  140. package/dist/chunk-FJ5TLRT3.js +0 -21
  141. package/dist/chunk-HT7H35GU.cjs +0 -21
@@ -100,6 +100,19 @@ declare namespace Portal {
100
100
  type PortalMethods = {
101
101
  addPortal: (key: string, element: ReactNode) => void;
102
102
  removePortal: (key: string) => void;
103
+ /**
104
+ * Where the host's own view sits in the window, in points.
105
+ *
106
+ * An overlay is measured against a trigger that reports window coordinates, but it is
107
+ * rendered inside this host — so it is laid out against the host's origin, not the
108
+ * window's. Anything the two differ by (a status bar, a safe-area inset, a host mounted
109
+ * below a header) is exactly the distance the overlay would be wrong by. Subtracting it
110
+ * is what makes `measureInWindow` on the trigger mean the same thing on both sides.
111
+ */
112
+ origin: {
113
+ x: number;
114
+ y: number;
115
+ };
103
116
  };
104
117
  /**
105
118
  * `null` outside a host, and `Portal` treats that as "render nothing" rather than
@@ -298,7 +311,7 @@ declare function resolveSlotAnimation(override: SlotAnimation | undefined, enabl
298
311
  * off — and it is the only shape that survives `asChild`, where the caller's own element
299
312
  * is the pressable and there is no sibling for the primitive to inject.
300
313
  */
301
- declare const PressableFeedback: react.ForwardRefExoticComponent<Omit<react_native.PressableProps, "disabled" | "style" | "children"> & ViewStyleProps & {
314
+ declare const PressableFeedback: react.ForwardRefExoticComponent<Omit<react_native.PressableProps, "style" | "children" | "disabled"> & ViewStyleProps & {
302
315
  isPressed?: boolean;
303
316
  isDisabled?: boolean;
304
317
  asChild?: boolean;
@@ -492,7 +505,7 @@ declare const CloseButton: react.ForwardRefExoticComponent<{
492
505
  baseStyle?: react_native.StyleProp<react_native.ViewStyle>;
493
506
  glyphStyle?: react_native.StyleProp<react_native.ViewStyle>;
494
507
  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>>;
508
+ } & Omit<PressableFeedbackProps, "style" | "children" | "isPressed"> & react.RefAttributes<View>>;
496
509
 
497
510
  /** The two slots a component publishes for a `CloseButton`: its box and one cross bar. */
498
511
  type CloseButtonSlots = {
@@ -100,6 +100,19 @@ declare namespace Portal {
100
100
  type PortalMethods = {
101
101
  addPortal: (key: string, element: ReactNode) => void;
102
102
  removePortal: (key: string) => void;
103
+ /**
104
+ * Where the host's own view sits in the window, in points.
105
+ *
106
+ * An overlay is measured against a trigger that reports window coordinates, but it is
107
+ * rendered inside this host — so it is laid out against the host's origin, not the
108
+ * window's. Anything the two differ by (a status bar, a safe-area inset, a host mounted
109
+ * below a header) is exactly the distance the overlay would be wrong by. Subtracting it
110
+ * is what makes `measureInWindow` on the trigger mean the same thing on both sides.
111
+ */
112
+ origin: {
113
+ x: number;
114
+ y: number;
115
+ };
103
116
  };
104
117
  /**
105
118
  * `null` outside a host, and `Portal` treats that as "render nothing" rather than
@@ -298,7 +311,7 @@ declare function resolveSlotAnimation(override: SlotAnimation | undefined, enabl
298
311
  * off — and it is the only shape that survives `asChild`, where the caller's own element
299
312
  * is the pressable and there is no sibling for the primitive to inject.
300
313
  */
301
- declare const PressableFeedback: react.ForwardRefExoticComponent<Omit<react_native.PressableProps, "disabled" | "style" | "children"> & ViewStyleProps & {
314
+ declare const PressableFeedback: react.ForwardRefExoticComponent<Omit<react_native.PressableProps, "style" | "children" | "disabled"> & ViewStyleProps & {
302
315
  isPressed?: boolean;
303
316
  isDisabled?: boolean;
304
317
  asChild?: boolean;
@@ -492,7 +505,7 @@ declare const CloseButton: react.ForwardRefExoticComponent<{
492
505
  baseStyle?: react_native.StyleProp<react_native.ViewStyle>;
493
506
  glyphStyle?: react_native.StyleProp<react_native.ViewStyle>;
494
507
  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>>;
508
+ } & Omit<PressableFeedbackProps, "style" | "children" | "isPressed"> & react.RefAttributes<View>>;
496
509
 
497
510
  /** The two slots a component publishes for a `CloseButton`: its box and one cross bar. */
498
511
  type CloseButtonSlots = {
@@ -1,20 +1,21 @@
1
+ import "../chunk-MESKS6AI.js";
1
2
  import {
2
3
  Portal,
3
4
  PortalContext,
4
5
  PortalHost
5
- } from "../chunk-V5IVMZQJ.js";
6
+ } from "../chunk-2PMXMKS5.js";
6
7
  import {
7
8
  SelectionFill
8
9
  } from "../chunk-BA2DBSAN.js";
9
10
  import {
10
11
  CloseButton,
11
12
  closeButtonBase
12
- } from "../chunk-RSGIJ6RI.js";
13
+ } from "../chunk-EOJ5MYAQ.js";
13
14
  import {
14
15
  Icon,
15
16
  IconContext,
16
17
  useIconContext
17
- } from "../chunk-OWE5IID7.js";
18
+ } from "../chunk-HXW4ANVB.js";
18
19
  import {
19
20
  FEEDBACK_OVERLAY,
20
21
  HIGHLIGHT_DURATION,
@@ -36,9 +37,9 @@ import {
36
37
  resolveSlotAnimation,
37
38
  rippleRadiusFor,
38
39
  useFeedback
39
- } from "../chunk-UCW25LL6.js";
40
- import "../chunk-423RQBOX.js";
40
+ } from "../chunk-UGF35NSE.js";
41
41
  import "../chunk-EGLLDKN6.js";
42
+ import "../chunk-423RQBOX.js";
42
43
  import {
43
44
  Slot,
44
45
  childrenToString,
@@ -52,11 +53,10 @@ import {
52
53
  createRecipe,
53
54
  radiusAxis
54
55
  } from "../chunk-4GTAZM2C.js";
56
+ import "../chunk-A3EGFI6T.js";
55
57
  import {
56
58
  useStyleProps
57
- } from "../chunk-OSCW7I4H.js";
58
- import "../chunk-A3EGFI6T.js";
59
- import "../chunk-FJ5TLRT3.js";
59
+ } from "../chunk-M63GFNKV.js";
60
60
  export {
61
61
  CloseButton,
62
62
  FEEDBACK_OVERLAY,
@@ -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.37",
4
4
  "description": "Composition-first React Native UI components with native animations powered by Reanimated",
5
5
  "keywords": [
6
6
  "react-native",
@@ -137,6 +137,16 @@
137
137
  "default": "./dist/components/radio/index.cjs"
138
138
  }
139
139
  },
140
+ "./select": {
141
+ "import": {
142
+ "types": "./dist/components/select/index.d.ts",
143
+ "default": "./dist/components/select/index.js"
144
+ },
145
+ "require": {
146
+ "types": "./dist/components/select/index.d.cts",
147
+ "default": "./dist/components/select/index.cjs"
148
+ }
149
+ },
140
150
  "./skeleton": {
141
151
  "import": {
142
152
  "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;