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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/dist/chunk-2EGR4LWD.js +145 -0
  2. package/dist/chunk-2NRZKJG7.js +531 -0
  3. package/dist/chunk-2PMXMKS5.js +67 -0
  4. package/dist/chunk-2XPG2243.js +586 -0
  5. package/dist/chunk-36PRYGAM.js +13 -0
  6. package/dist/chunk-3E7CDKFO.cjs +696 -0
  7. package/dist/chunk-3GFRSZYR.js +54 -0
  8. package/dist/chunk-423RQBOX.js +21 -0
  9. package/dist/chunk-4CUZZWFW.js +92 -0
  10. package/dist/chunk-4GTAZM2C.js +174 -0
  11. package/dist/chunk-4KFKWBN5.cjs +89 -0
  12. package/dist/{chunk-3QBT3Q65.cjs → chunk-57SJ4LJF.cjs} +7 -2
  13. package/dist/chunk-5R26NM4M.cjs +402 -0
  14. package/dist/chunk-5VKYNBNA.js +607 -0
  15. package/dist/chunk-64MXEVT3.js +66 -0
  16. package/dist/chunk-6DOLGZVV.cjs +147 -0
  17. package/dist/chunk-6L2TS2R3.cjs +92 -0
  18. package/dist/chunk-6UEZJRVI.js +669 -0
  19. package/dist/chunk-734MFAX4.js +27 -0
  20. package/dist/chunk-73RKQC5X.js +104 -0
  21. package/dist/chunk-7DPL3ZDS.cjs +21 -0
  22. package/dist/chunk-7EIHHOHP.cjs +42 -0
  23. package/dist/chunk-7GHM4GKL.cjs +119 -0
  24. package/dist/chunk-7YF5NAHQ.cjs +74 -0
  25. package/dist/{chunk-X2K2FX3W.js → chunk-A3EGFI6T.js} +6 -1
  26. package/dist/chunk-ABAGZTXZ.cjs +736 -0
  27. package/dist/{chunk-AW63PTQ4.cjs → chunk-ACAPTWE3.cjs} +85 -81
  28. package/dist/chunk-AMCSSOJT.cjs +104 -0
  29. package/dist/chunk-BA2DBSAN.js +102 -0
  30. package/dist/chunk-BRRXFOBY.js +431 -0
  31. package/dist/chunk-C5YLPCFC.cjs +293 -0
  32. package/dist/chunk-DA3OKXHV.cjs +700 -0
  33. package/dist/chunk-DD4276RF.js +366 -0
  34. package/dist/chunk-DG2I4PJG.js +701 -0
  35. package/dist/chunk-DHGLGSH6.js +661 -0
  36. package/dist/chunk-DIBUQ46Y.js +346 -0
  37. package/dist/chunk-EGLLDKN6.js +9 -0
  38. package/dist/chunk-EJQCQPET.cjs +9 -0
  39. package/dist/chunk-EKS3W46M.cjs +66 -0
  40. package/dist/chunk-EZEYMLO3.js +402 -0
  41. package/dist/chunk-F6CQ6CBI.cjs +112 -0
  42. package/dist/chunk-F6W3JQ7K.js +42 -0
  43. package/dist/chunk-FHUYHV6J.js +89 -0
  44. package/dist/chunk-FNEUOBCV.cjs +174 -0
  45. package/dist/chunk-G7P3ERYF.cjs +478 -0
  46. package/dist/chunk-GA6PBWNT.js +147 -0
  47. package/dist/chunk-GFUZ3MUT.cjs +455 -0
  48. package/dist/chunk-GGW43Q37.cjs +1 -0
  49. package/dist/chunk-GTR5X65M.cjs +27 -0
  50. package/dist/chunk-H4E4HDEP.cjs +13 -0
  51. package/dist/chunk-H7DS4IO7.js +198 -0
  52. package/dist/chunk-HDVVZG4S.cjs +198 -0
  53. package/dist/chunk-IKJVLJKT.js +151 -0
  54. package/dist/chunk-J3MB4PI5.cjs +531 -0
  55. package/dist/chunk-K72UDPVN.js +119 -0
  56. package/dist/chunk-KCMYU7WF.js +86 -0
  57. package/dist/chunk-LRN3RNDO.js +940 -0
  58. package/dist/chunk-LTX6TB5I.js +124 -0
  59. package/dist/chunk-LUPCPLND.cjs +145 -0
  60. package/dist/chunk-M63GFNKV.js +194 -0
  61. package/dist/chunk-N3KTZMPG.js +293 -0
  62. package/dist/chunk-NCTOTTVW.js +13 -0
  63. package/dist/chunk-NWGLP6JX.cjs +410 -0
  64. package/dist/chunk-R73XQK7X.cjs +314 -0
  65. package/dist/chunk-RU7JCMWC.cjs +881 -0
  66. package/dist/chunk-SNIHUKDA.cjs +184 -0
  67. package/dist/chunk-T5FV5F7A.cjs +607 -0
  68. package/dist/chunk-TDTUAIFF.cjs +153 -0
  69. package/dist/chunk-TJ74XVZN.cjs +431 -0
  70. package/dist/chunk-TK44VBIE.cjs +194 -0
  71. package/dist/chunk-UAWBAD4E.cjs +346 -0
  72. package/dist/chunk-UFTCTTKK.js +381 -0
  73. package/dist/chunk-WDDXU3OH.cjs +67 -0
  74. package/dist/chunk-WFEMJCXO.cjs +13 -0
  75. package/dist/chunk-WHJTBTYM.js +0 -0
  76. package/dist/{chunk-2KXQATVL.js → chunk-WKCQ6VGW.js} +59 -55
  77. package/dist/chunk-XFPQFCEK.js +455 -0
  78. package/dist/chunk-XSQPVDFH.cjs +60 -0
  79. package/dist/chunk-XTC2SLFT.js +153 -0
  80. package/dist/chunk-XV735BSA.cjs +366 -0
  81. package/dist/chunk-XWNG2U4K.cjs +124 -0
  82. package/dist/chunk-YGYYJ3LQ.js +314 -0
  83. package/dist/chunk-YVHT2UVW.js +74 -0
  84. package/dist/chunk-ZFOOJK37.cjs +86 -0
  85. package/dist/close-button.type-BUYuoSt2.d.ts +36 -0
  86. package/dist/close-button.type-CHsgZ3wO.d.cts +36 -0
  87. package/dist/components/accordion/index.cjs +35 -0
  88. package/dist/components/accordion/index.d.cts +299 -0
  89. package/dist/components/accordion/index.d.ts +299 -0
  90. package/dist/components/accordion/index.js +35 -0
  91. package/dist/components/alert/index.cjs +20 -0
  92. package/dist/components/alert/index.d.cts +169 -0
  93. package/dist/components/alert/index.d.ts +169 -0
  94. package/dist/components/alert/index.js +20 -0
  95. package/dist/components/avatar/index.cjs +16 -0
  96. package/dist/components/avatar/index.d.cts +131 -0
  97. package/dist/components/avatar/index.d.ts +131 -0
  98. package/dist/components/avatar/index.js +16 -0
  99. package/dist/components/badge/index.cjs +15 -0
  100. package/dist/components/badge/index.d.cts +157 -0
  101. package/dist/components/badge/index.d.ts +157 -0
  102. package/dist/components/badge/index.js +15 -0
  103. package/dist/components/button/index.cjs +22 -0
  104. package/dist/components/button/index.d.cts +613 -0
  105. package/dist/components/button/index.d.ts +613 -0
  106. package/dist/components/button/index.js +22 -0
  107. package/dist/components/card/index.cjs +22 -0
  108. package/dist/components/card/index.d.cts +620 -0
  109. package/dist/components/card/index.d.ts +620 -0
  110. package/dist/components/card/index.js +22 -0
  111. package/dist/components/checkbox/index.cjs +26 -0
  112. package/dist/components/checkbox/index.d.cts +1136 -0
  113. package/dist/components/checkbox/index.d.ts +1136 -0
  114. package/dist/components/checkbox/index.js +26 -0
  115. package/dist/components/chip/index.cjs +20 -0
  116. package/dist/components/chip/index.d.cts +608 -0
  117. package/dist/components/chip/index.d.ts +608 -0
  118. package/dist/components/chip/index.js +20 -0
  119. package/dist/components/divider/index.cjs +13 -0
  120. package/dist/components/divider/index.d.cts +117 -0
  121. package/dist/components/divider/index.d.ts +117 -0
  122. package/dist/components/divider/index.js +13 -0
  123. package/dist/components/field-group/index.cjs +27 -0
  124. package/dist/components/field-group/index.d.cts +270 -0
  125. package/dist/components/field-group/index.d.ts +270 -0
  126. package/dist/components/field-group/index.js +27 -0
  127. package/dist/components/input-otp/index.cjs +29 -0
  128. package/dist/components/input-otp/index.d.cts +325 -0
  129. package/dist/components/input-otp/index.d.ts +325 -0
  130. package/dist/components/input-otp/index.js +29 -0
  131. package/dist/components/menu/index.cjs +49 -0
  132. package/dist/components/menu/index.d.cts +351 -0
  133. package/dist/components/menu/index.d.ts +351 -0
  134. package/dist/components/menu/index.js +49 -0
  135. package/dist/components/popover/index.cjs +38 -0
  136. package/dist/components/popover/index.d.cts +254 -0
  137. package/dist/components/popover/index.d.ts +254 -0
  138. package/dist/components/popover/index.js +38 -0
  139. package/dist/components/radio/index.cjs +26 -0
  140. package/dist/components/radio/index.d.cts +1102 -0
  141. package/dist/components/radio/index.d.ts +1102 -0
  142. package/dist/components/radio/index.js +26 -0
  143. package/dist/components/select/index.cjs +50 -0
  144. package/dist/components/select/index.d.cts +498 -0
  145. package/dist/components/select/index.d.ts +498 -0
  146. package/dist/components/select/index.js +50 -0
  147. package/dist/components/skeleton/index.cjs +11 -0
  148. package/dist/components/skeleton/index.d.cts +111 -0
  149. package/dist/components/skeleton/index.d.ts +111 -0
  150. package/dist/components/skeleton/index.js +11 -0
  151. package/dist/components/spinner/index.cjs +17 -0
  152. package/dist/components/spinner/index.d.cts +104 -0
  153. package/dist/components/spinner/index.d.ts +104 -0
  154. package/dist/components/spinner/index.js +17 -0
  155. package/dist/components/switch/index.cjs +27 -0
  156. package/dist/components/switch/index.d.cts +1154 -0
  157. package/dist/components/switch/index.d.ts +1154 -0
  158. package/dist/components/switch/index.js +27 -0
  159. package/dist/components/text-area/index.cjs +14 -0
  160. package/dist/components/text-area/index.d.cts +73 -0
  161. package/dist/components/text-area/index.d.ts +73 -0
  162. package/dist/components/text-area/index.js +14 -0
  163. package/dist/components/text-field/index.cjs +25 -0
  164. package/dist/components/text-field/index.d.cts +205 -0
  165. package/dist/components/text-field/index.d.ts +205 -0
  166. package/dist/components/text-field/index.js +25 -0
  167. package/dist/components/typography/index.cjs +15 -0
  168. package/dist/components/typography/index.d.cts +116 -0
  169. package/dist/components/typography/index.d.ts +116 -0
  170. package/dist/components/typography/index.js +15 -0
  171. package/dist/components/view/index.cjs +17 -0
  172. package/dist/components/view/index.d.cts +152 -0
  173. package/dist/components/view/index.d.ts +152 -0
  174. package/dist/components/view/index.js +17 -0
  175. package/dist/create-recipe-BdVd2ffi.d.ts +114 -0
  176. package/dist/create-recipe-dC7wMfnj.d.cts +114 -0
  177. package/dist/icon.type-Kml72iSz.d.ts +73 -0
  178. package/dist/icon.type-d_i9ma-i.d.cts +73 -0
  179. package/dist/index.cjs +400 -4
  180. package/dist/index.d.cts +118 -4
  181. package/dist/index.d.ts +118 -4
  182. package/dist/index.js +423 -27
  183. package/dist/placement-DHa0Rrh1.d.cts +38 -0
  184. package/dist/placement-DHa0Rrh1.d.ts +38 -0
  185. package/dist/pressable-feedback.type-BA2C9sSz.d.cts +127 -0
  186. package/dist/pressable-feedback.type-Bs4dQlGj.d.ts +127 -0
  187. package/dist/style-props.type-CfnoGEP7.d.cts +31 -0
  188. package/dist/style-props.type-CfnoGEP7.d.ts +31 -0
  189. package/dist/system/index.cjs +73 -4
  190. package/dist/system/index.d.cts +379 -193
  191. package/dist/system/index.d.ts +379 -193
  192. package/dist/system/index.js +87 -18
  193. package/dist/text-field.type-0l73acce.d.ts +167 -0
  194. package/dist/text-field.type-DBh06DU5.d.cts +167 -0
  195. package/dist/theme/index.cjs +5 -3
  196. package/dist/theme/index.d.cts +55 -24
  197. package/dist/theme/index.d.ts +55 -24
  198. package/dist/theme/index.js +4 -2
  199. package/dist/{theme.type-C9bFJKFm.d.cts → theme.type-C2gNHpEx.d.cts} +1 -1
  200. package/dist/{theme.type-C9bFJKFm.d.ts → theme.type-C2gNHpEx.d.ts} +1 -1
  201. package/package.json +254 -18
  202. package/dist/chunk-ECDWSSHJ.js +0 -688
  203. package/dist/chunk-IYFGO523.cjs +0 -688
@@ -0,0 +1,184 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ function _interopRequireDefault(obj) {
7
+ return obj && obj.__esModule ? obj : {
8
+ default: obj
9
+ };
10
+ }
11
+ function _optionalChain(ops) {
12
+ let lastAccessLHS = undefined;
13
+ let value = ops[0];
14
+ let i = 1;
15
+ while (i < ops.length) {
16
+ const op = ops[i];
17
+ const fn = ops[i + 1];
18
+ i += 2;
19
+ if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
20
+ return undefined;
21
+ }
22
+ if (op === 'access' || op === 'optionalAccess') {
23
+ lastAccessLHS = value;
24
+ value = fn(value);
25
+ } else if (op === 'call' || op === 'optionalCall') {
26
+ value = fn((...args) => value.call(lastAccessLHS, ...args));
27
+ lastAccessLHS = undefined;
28
+ }
29
+ }
30
+ return value;
31
+ }
32
+ var _chunkFNEUOBCVcjs = require('./chunk-FNEUOBCV.cjs');
33
+ var _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
34
+ var _chunkTK44VBIEcjs = require('./chunk-TK44VBIE.cjs');
35
+
36
+ // src/components/skeleton/skeleton.tsx
37
+ var _react = require('react');
38
+ var _reactnative = require('react-native');
39
+ var _reactnativereanimated = require('react-native-reanimated');
40
+ var _reactnativereanimated2 = _interopRequireDefault(_reactnativereanimated);
41
+
42
+ // src/components/skeleton/skeleton.recipe.ts
43
+ var SLOTS = ["root"];
44
+ var VARIANT_TOKENS = {
45
+ default: {
46
+ bg: "default"
47
+ }
48
+ };
49
+ var skeletonRecipe = _chunkFNEUOBCVcjs.createRecipe.call(void 0, {
50
+ slots: SLOTS,
51
+ base: () => ({
52
+ // Squircle corners, free on Android and what keeps a `full` radius from reading as a
53
+ // stadium at small sizes. Nothing else: a skeleton has no size of its own — see the
54
+ // component for why R14 is the whole sizing API here.
55
+ root: {
56
+ borderCurve: "continuous"
57
+ }
58
+ }),
59
+ variantTokens: VARIANT_TOKENS,
60
+ paint: (_theme, colors) => ({
61
+ root: {
62
+ backgroundColor: colors.bg
63
+ }
64
+ }),
65
+ variants: {
66
+ radius: _chunkFNEUOBCVcjs.radiusAxis.call(void 0, "root")
67
+ },
68
+ /**
69
+ * `md` is the block, and `full` is what an avatar placeholder passes. There is no `size`
70
+ * default because there is no `size`: the caller gives the block its dimensions with
71
+ * R14's `width` and `height`, because only they know the shape of the thing that is
72
+ * missing.
73
+ */
74
+ /**
75
+ * `variant` is named here and nowhere else: there is one, the caller cannot choose it,
76
+ * and the recipe still needs it selected for `paint` and the tint to resolve.
77
+ */
78
+ defaultVariants: {
79
+ variant: "default",
80
+ radius: "md"
81
+ }
82
+ });
83
+
84
+ // src/components/skeleton/skeleton.tsx
85
+ var _jsxruntime = require('react/jsx-runtime');
86
+ var PULSE_DURATION = 1e3;
87
+ var PULSE_MIN_OPACITY = 0.5;
88
+ var Skeleton = _react.forwardRef.call(void 0, function Skeleton2({
89
+ radius,
90
+ color,
91
+ isLoading = true,
92
+ animation = true,
93
+ children,
94
+ style,
95
+ ...props
96
+ }, ref) {
97
+ const theme = _chunk57SJ4LJFcjs.useXAUITheme.call(void 0);
98
+ const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
99
+ const selection = {
100
+ radius
101
+ };
102
+ const styles = skeletonRecipe.resolve({
103
+ theme,
104
+ selection
105
+ });
106
+ const tint = color ? skeletonRecipe.tint({
107
+ theme,
108
+ color,
109
+ selection
110
+ }) : void 0;
111
+ if (!isLoading) return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, {
112
+ children
113
+ });
114
+ const blockProps = {
115
+ // A block stands in for content that is not there. Announcing its absence is `busy`
116
+ // on whatever region is loading, not a stop on each rectangle. Both stay overridable
117
+ // (R9) for the caller whose skeleton really is the whole screen.
118
+ accessibilityElementsHidden: true,
119
+ importantForAccessibility: "no-hide-descendants",
120
+ ...rest
121
+ };
122
+ const blockStyle = [styles.root, _optionalChain([tint, 'optionalAccess', _ => _.root]), styleProps, style];
123
+ if (!animation) return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.View, {
124
+ ref,
125
+ ...blockProps,
126
+ style: blockStyle
127
+ });
128
+ return /* @__PURE__ */_jsxruntime.jsx.call(void 0, PulsingBlock, {
129
+ ref,
130
+ ...blockProps,
131
+ style: blockStyle
132
+ });
133
+ });
134
+ Skeleton.displayName = "XAUI.Skeleton";
135
+ const _worklet_8636613549176_init_data = {
136
+ code: "function chunkSNIHUKDACjs1(){const{opacity}=this.__closure;return{opacity:opacity.value};}",
137
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-SNIHUKDA.cjs",
138
+ sourceMap: "{\"version\":3,\"names\":[\"chunkSNIHUKDACjs1\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-SNIHUKDA.cjs\"],\"mappings\":\"AAyF+E,SAAAA,iBAAMA,CAAA,QAAAC,OAAA,OAAAC,SAAA,CAE/E,MAAO,CAAED,OAAO,CAAEA,OAAO,CAACE,KAAM,CAAC,CACnC\",\"ignoreList\":[]}"
139
+ };
140
+ var PulsingBlock = _react.forwardRef.call(void 0, function PulsingBlock2({
141
+ style,
142
+ ...props
143
+ }, ref) {
144
+ const opacity = _reactnativereanimated.useSharedValue.call(void 0, 1);
145
+ _react.useEffect.call(void 0, () => {
146
+ opacity.value = _reactnativereanimated.withRepeat.call(void 0, _reactnativereanimated.withTiming.call(void 0, PULSE_MIN_OPACITY, {
147
+ duration: PULSE_DURATION,
148
+ easing: _reactnativereanimated.Easing.inOut(_reactnativereanimated.Easing.ease)
149
+ }), -1,
150
+ // Reversed, so the block breathes rather than snapping back to full at each turn.
151
+ true);
152
+ return () => _reactnativereanimated.cancelAnimation.call(void 0, opacity);
153
+ }, [opacity]);
154
+ const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkSNIHUKDACjs1Factory({
155
+ _worklet_8636613549176_init_data,
156
+ opacity
157
+ }) {
158
+ const _e = [new global.Error(), -2, -27];
159
+ const chunkSNIHUKDACjs1 = function () {
160
+ return {
161
+ opacity: opacity.value
162
+ };
163
+ };
164
+ chunkSNIHUKDACjs1.__closure = {
165
+ opacity
166
+ };
167
+ chunkSNIHUKDACjs1.__workletHash = 8636613549176;
168
+ chunkSNIHUKDACjs1.__pluginVersion = "0.7.4";
169
+ chunkSNIHUKDACjs1.__initData = _worklet_8636613549176_init_data;
170
+ chunkSNIHUKDACjs1.__stackDetails = _e;
171
+ return chunkSNIHUKDACjs1;
172
+ }({
173
+ _worklet_8636613549176_init_data,
174
+ opacity
175
+ }), [opacity]);
176
+ return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnativereanimated2.default.View, {
177
+ ref,
178
+ ...props,
179
+ style: [style, animatedStyle]
180
+ });
181
+ });
182
+ PulsingBlock.displayName = "XAUI.Skeleton.Block";
183
+ exports.skeletonRecipe = skeletonRecipe;
184
+ exports.Skeleton = Skeleton;