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

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.
@@ -38,8 +38,50 @@ function _optionalChain(ops) {
38
38
  }
39
39
  var _chunk6N5JXRUZcjs = require('./chunk-6N5JXRUZ.cjs');
40
40
 
41
- // src/system/icon/icon-context.ts
41
+ // src/system/style-props/use-style-props.ts
42
42
  var _react = require('react');
43
+
44
+ // src/utils/style-props.ts
45
+ var STYLE_PROP_KEYS = [
46
+ // Flex and layout
47
+ "alignContent", "alignItems", "alignSelf", "aspectRatio", "boxSizing", "columnGap", "direction", "display", "flex", "flexBasis", "flexDirection", "flexGrow", "flexShrink", "flexWrap", "gap", "justifyContent", "overflow", "rowGap",
48
+ // Position
49
+ "bottom", "end", "inset", "insetBlock", "insetBlockEnd", "insetBlockStart", "insetInline", "insetInlineEnd", "insetInlineStart", "position", "start", "top", "zIndex",
50
+ // Margin
51
+ "margin", "marginBlock", "marginBlockEnd", "marginBlockStart", "marginBottom", "marginEnd", "marginHorizontal", "marginInline", "marginInlineEnd", "marginInlineStart", "marginStart", "marginTop", "marginVertical",
52
+ // Padding
53
+ "padding", "paddingBlock", "paddingBlockEnd", "paddingBlockStart", "paddingBottom", "paddingEnd", "paddingHorizontal", "paddingInline", "paddingInlineEnd", "paddingInlineStart", "paddingStart", "paddingTop", "paddingVertical",
54
+ // Size
55
+ "height", "maxHeight", "maxWidth", "minHeight", "minWidth", "width",
56
+ // Border
57
+ "borderBlockColor", "borderBlockEndColor", "borderBlockStartColor", "borderBottomColor", "borderBottomEndRadius", "borderBottomStartRadius", "borderBottomWidth", "borderColor", "borderCurve", "borderEndColor", "borderEndEndRadius", "borderEndStartRadius", "borderEndWidth", "borderRadius", "borderStartColor", "borderStartEndRadius", "borderStartStartRadius", "borderStartWidth", "borderStyle", "borderTopColor", "borderTopEndRadius", "borderTopStartRadius", "borderTopWidth", "borderWidth",
58
+ // Fill, shadow, and the rest of a box's paint
59
+ "backfaceVisibility", "backgroundColor", "boxShadow", "cursor", "elevation", "experimental_backgroundImage", "filter", "isolation", "mixBlendMode", "opacity", "outlineColor", "outlineOffset", "outlineStyle", "outlineWidth", "shadowColor", "shadowOffset", "shadowOpacity", "shadowRadius",
60
+ // Transform
61
+ "rotation", "scaleX", "scaleY", "transform", "transformMatrix", "transformOrigin", "translateX", "translateY",
62
+ // Text — a text slot only
63
+ "color", "fontFamily", "fontSize", "fontStyle", "fontVariant", "fontWeight", "includeFontPadding", "letterSpacing", "lineHeight", "textAlign", "textAlignVertical", "textDecorationColor", "textDecorationLine", "textDecorationStyle", "textShadowColor", "textShadowOffset", "textShadowRadius", "textTransform", "userSelect", "verticalAlign", "writingDirection",
64
+ // Image — an image slot only
65
+ "objectFit", "overlayColor", "resizeMode", "tintColor"];
66
+ var STYLE_PROP_KEY_SET = new Set(STYLE_PROP_KEYS);
67
+ function splitStyleProps(props) {
68
+ const styleProps = {};
69
+ const rest = {};
70
+ for (const [key, value] of Object.entries(props)) {
71
+ if (STYLE_PROP_KEY_SET.has(key)) styleProps[key] = value;else rest[key] = value;
72
+ }
73
+ return [styleProps, rest];
74
+ }
75
+
76
+ // src/system/style-props/use-style-props.ts
77
+ function useStyleProps(props) {
78
+ const [styleProps, rest] = splitStyleProps(props);
79
+ const key = _chunk6N5JXRUZcjs.stableHash.call(void 0, styleProps);
80
+ return [_react.useMemo.call(void 0, () => styleProps, [key]), rest];
81
+ }
82
+
83
+ // src/system/icon/icon-context.ts
84
+
43
85
  var IconContext = _react.createContext.call(void 0, {});
44
86
  IconContext.displayName = "XAUI.Icon.Context";
45
87
  function useIconContext() {
@@ -56,10 +98,12 @@ function Icon({
56
98
  source,
57
99
  size,
58
100
  color,
59
- style
101
+ style,
102
+ ...props
60
103
  }) {
61
104
  const inherited = useIconContext();
62
105
  const theme = _chunk6N5JXRUZcjs.useXAUITheme.call(void 0);
106
+ const [styleProps] = useStyleProps(props);
63
107
  const resolvedSize = _nullishCoalesce(_nullishCoalesce(size, () => inherited.size), () => theme.fontSizes.md);
64
108
  const resolvedColor = _nullishCoalesce(_nullishCoalesce(color, () => inherited.color), () => theme.colors.foreground);
65
109
  if (Component) {
@@ -82,7 +126,7 @@ function Icon({
82
126
  width: resolvedSize,
83
127
  height: resolvedSize,
84
128
  tintColor: resolvedColor
85
- }, style]
129
+ }, styleProps, style]
86
130
  });
87
131
  }
88
132
  throw new Error("XAUI: Icon needs one of `as` (an icon component), a raw SVG element as its child, or `source` (an image). It renders nothing on its own.");
@@ -199,47 +243,6 @@ function refOf(element) {
199
243
  return _nullishCoalesce(fromProps, () => fromElement);
200
244
  }
201
245
 
202
- // src/system/style-props/use-style-props.ts
203
-
204
- // src/utils/style-props.ts
205
- var STYLE_PROP_KEYS = [
206
- // Flex and layout
207
- "alignContent", "alignItems", "alignSelf", "aspectRatio", "boxSizing", "columnGap", "direction", "display", "flex", "flexBasis", "flexDirection", "flexGrow", "flexShrink", "flexWrap", "gap", "justifyContent", "overflow", "rowGap",
208
- // Position
209
- "bottom", "end", "inset", "insetBlock", "insetBlockEnd", "insetBlockStart", "insetInline", "insetInlineEnd", "insetInlineStart", "position", "start", "top", "zIndex",
210
- // Margin
211
- "margin", "marginBlock", "marginBlockEnd", "marginBlockStart", "marginBottom", "marginEnd", "marginHorizontal", "marginInline", "marginInlineEnd", "marginInlineStart", "marginStart", "marginTop", "marginVertical",
212
- // Padding
213
- "padding", "paddingBlock", "paddingBlockEnd", "paddingBlockStart", "paddingBottom", "paddingEnd", "paddingHorizontal", "paddingInline", "paddingInlineEnd", "paddingInlineStart", "paddingStart", "paddingTop", "paddingVertical",
214
- // Size
215
- "height", "maxHeight", "maxWidth", "minHeight", "minWidth", "width",
216
- // Border
217
- "borderBlockColor", "borderBlockEndColor", "borderBlockStartColor", "borderBottomColor", "borderBottomEndRadius", "borderBottomStartRadius", "borderBottomWidth", "borderColor", "borderCurve", "borderEndColor", "borderEndEndRadius", "borderEndStartRadius", "borderEndWidth", "borderRadius", "borderStartColor", "borderStartEndRadius", "borderStartStartRadius", "borderStartWidth", "borderStyle", "borderTopColor", "borderTopEndRadius", "borderTopStartRadius", "borderTopWidth", "borderWidth",
218
- // Fill, shadow, and the rest of a box's paint
219
- "backfaceVisibility", "backgroundColor", "boxShadow", "cursor", "elevation", "experimental_backgroundImage", "filter", "isolation", "mixBlendMode", "opacity", "outlineColor", "outlineOffset", "outlineStyle", "outlineWidth", "shadowColor", "shadowOffset", "shadowOpacity", "shadowRadius",
220
- // Transform
221
- "rotation", "scaleX", "scaleY", "transform", "transformMatrix", "transformOrigin", "translateX", "translateY",
222
- // Text — a text slot only
223
- "color", "fontFamily", "fontSize", "fontStyle", "fontVariant", "fontWeight", "includeFontPadding", "letterSpacing", "lineHeight", "textAlign", "textAlignVertical", "textDecorationColor", "textDecorationLine", "textDecorationStyle", "textShadowColor", "textShadowOffset", "textShadowRadius", "textTransform", "userSelect", "verticalAlign", "writingDirection",
224
- // Image — an image slot only
225
- "objectFit", "overlayColor", "resizeMode", "tintColor"];
226
- var STYLE_PROP_KEY_SET = new Set(STYLE_PROP_KEYS);
227
- function splitStyleProps(props) {
228
- const styleProps = {};
229
- const rest = {};
230
- for (const [key, value] of Object.entries(props)) {
231
- if (STYLE_PROP_KEY_SET.has(key)) styleProps[key] = value;else rest[key] = value;
232
- }
233
- return [styleProps, rest];
234
- }
235
-
236
- // src/system/style-props/use-style-props.ts
237
- function useStyleProps(props) {
238
- const [styleProps, rest] = splitStyleProps(props);
239
- const key = _chunk6N5JXRUZcjs.stableHash.call(void 0, styleProps);
240
- return [_react.useMemo.call(void 0, () => styleProps, [key]), rest];
241
- }
242
-
243
246
  // src/system/pressable-feedback/pressable-feedback-context.ts
244
247
 
245
248
  var [FeedbackProvider, useFeedback] = createSlotContext("PressableFeedback");
@@ -249,13 +252,13 @@ var DisableAllContext = _react.createContext.call(void 0, false);
249
252
  var PRESS_SCALE = 0.985;
250
253
  var PRESS_DURATION = 300;
251
254
  var SCALE_REFERENCE_WIDTH = 300;
252
- const _worklet_876271243075_init_data = {
253
- code: "function pressScaleFor_chunkIVVFYUDWCjs1(width){const{SCALE_REFERENCE_WIDTH,PRESS_SCALE}=this.__closure;const coefficient=width>0?SCALE_REFERENCE_WIDTH/width:1;return 1-(1-PRESS_SCALE)*coefficient;}",
254
- location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-IVVFYUDW.cjs",
255
- sourceMap: "{\"version\":3,\"names\":[\"pressScaleFor_chunkIVVFYUDWCjs1\",\"width\",\"SCALE_REFERENCE_WIDTH\",\"PRESS_SCALE\",\"__closure\",\"coefficient\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-IVVFYUDW.cjs\"],\"mappings\":\"AAwWA,SAAAA,+BAA8BA,CAAAC,KAAA,QAAAC,qBAAA,CAAAC,WAAA,OAAAC,SAAA,CAE5B,KAAM,CAAAC,WAAW,CAAGJ,KAAK,CAAG,CAAC,CAAGC,qBAAqB,CAAGD,KAAK,CAAG,CAAC,CACjE,MAAO,EAAC,CAAG,CAAC,CAAC,CAAGE,WAAW,EAAIE,WAAW,CAC5C\",\"ignoreList\":[]}"
255
+ const _worklet_3638762147639_init_data = {
256
+ code: "function pressScaleFor_chunkPUER6Y4MCjs1(width){const{SCALE_REFERENCE_WIDTH,PRESS_SCALE}=this.__closure;const coefficient=width>0?SCALE_REFERENCE_WIDTH/width:1;return 1-(1-PRESS_SCALE)*coefficient;}",
257
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-PUER6Y4M.cjs",
258
+ sourceMap: "{\"version\":3,\"names\":[\"pressScaleFor_chunkPUER6Y4MCjs1\",\"width\",\"SCALE_REFERENCE_WIDTH\",\"PRESS_SCALE\",\"__closure\",\"coefficient\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-PUER6Y4M.cjs\"],\"mappings\":\"AA2WA,SAAAA,+BAA8BA,CAAAC,KAAA,QAAAC,qBAAA,CAAAC,WAAA,OAAAC,SAAA,CAE5B,KAAM,CAAAC,WAAW,CAAGJ,KAAK,CAAG,CAAC,CAAGC,qBAAqB,CAAGD,KAAK,CAAG,CAAC,CACjE,MAAO,EAAC,CAAG,CAAC,CAAC,CAAGE,WAAW,EAAIE,WAAW,CAC5C\",\"ignoreList\":[]}"
256
259
  };
257
- const pressScaleFor = function pressScaleFor_chunkIVVFYUDWCjs1Factory({
258
- _worklet_876271243075_init_data,
260
+ const pressScaleFor = function pressScaleFor_chunkPUER6Y4MCjs1Factory({
261
+ _worklet_3638762147639_init_data,
259
262
  SCALE_REFERENCE_WIDTH,
260
263
  PRESS_SCALE
261
264
  }) {
@@ -268,13 +271,13 @@ const pressScaleFor = function pressScaleFor_chunkIVVFYUDWCjs1Factory({
268
271
  SCALE_REFERENCE_WIDTH,
269
272
  PRESS_SCALE
270
273
  };
271
- pressScaleFor.__workletHash = 876271243075;
274
+ pressScaleFor.__workletHash = 3638762147639;
272
275
  pressScaleFor.__pluginVersion = "0.7.4";
273
- pressScaleFor.__initData = _worklet_876271243075_init_data;
276
+ pressScaleFor.__initData = _worklet_3638762147639_init_data;
274
277
  pressScaleFor.__stackDetails = _e;
275
278
  return pressScaleFor;
276
279
  }({
277
- _worklet_876271243075_init_data,
280
+ _worklet_3638762147639_init_data,
278
281
  SCALE_REFERENCE_WIDTH,
279
282
  PRESS_SCALE
280
283
  });
@@ -287,26 +290,26 @@ var RIPPLE_CONFIRM_DURATION = 225;
287
290
  var RIPPLE_FADE_IN = 75;
288
291
  var RIPPLE_FADE_OUT_DELAY = 225;
289
292
  var RIPPLE_FADE_OUT = 150;
290
- const _worklet_15154597410360_init_data = {
291
- code: "function rippleRadiusFor_chunkIVVFYUDWCjs2(width,height){return Math.sqrt(width*width+height*height)/2+5;}",
292
- location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-IVVFYUDW.cjs",
293
- sourceMap: "{\"version\":3,\"names\":[\"rippleRadiusFor_chunkIVVFYUDWCjs2\",\"width\",\"height\",\"Math\",\"sqrt\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-IVVFYUDW.cjs\"],\"mappings\":\"AAsXA,SAAAA,iCAAwCA,CAAAC,KAAA,CAAAC,MAAA,EAEtC,MAAO,CAAAC,IAAI,CAACC,IAAI,CAACH,KAAK,CAAGA,KAAK,CAAGC,MAAM,CAAGA,MAAM,CAAC,CAAG,CAAC,CAAG,CAAC,CAC3D\",\"ignoreList\":[]}"
293
+ const _worklet_15335127470860_init_data = {
294
+ code: "function rippleRadiusFor_chunkPUER6Y4MCjs2(width,height){return Math.sqrt(width*width+height*height)/2+5;}",
295
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-PUER6Y4M.cjs",
296
+ sourceMap: "{\"version\":3,\"names\":[\"rippleRadiusFor_chunkPUER6Y4MCjs2\",\"width\",\"height\",\"Math\",\"sqrt\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-PUER6Y4M.cjs\"],\"mappings\":\"AAyXA,SAAAA,iCAAwCA,CAAAC,KAAA,CAAAC,MAAA,EAEtC,MAAO,CAAAC,IAAI,CAACC,IAAI,CAACH,KAAK,CAAGA,KAAK,CAAGC,MAAM,CAAGA,MAAM,CAAC,CAAG,CAAC,CAAG,CAAC,CAC3D\",\"ignoreList\":[]}"
294
297
  };
295
- const rippleRadiusFor = function rippleRadiusFor_chunkIVVFYUDWCjs2Factory({
296
- _worklet_15154597410360_init_data
298
+ const rippleRadiusFor = function rippleRadiusFor_chunkPUER6Y4MCjs2Factory({
299
+ _worklet_15335127470860_init_data
297
300
  }) {
298
301
  const _e = [new global.Error(), 1, -27];
299
302
  const rippleRadiusFor = function (width, height) {
300
303
  return Math.sqrt(width * width + height * height) / 2 + 5;
301
304
  };
302
305
  rippleRadiusFor.__closure = {};
303
- rippleRadiusFor.__workletHash = 15154597410360;
306
+ rippleRadiusFor.__workletHash = 15335127470860;
304
307
  rippleRadiusFor.__pluginVersion = "0.7.4";
305
- rippleRadiusFor.__initData = _worklet_15154597410360_init_data;
308
+ rippleRadiusFor.__initData = _worklet_15335127470860_init_data;
306
309
  rippleRadiusFor.__stackDetails = _e;
307
310
  return rippleRadiusFor;
308
311
  }({
309
- _worklet_15154597410360_init_data
312
+ _worklet_15335127470860_init_data
310
313
  });
311
314
  var ALL_OFF = {
312
315
  scale: false,
@@ -398,6 +401,15 @@ function partitionOverlays(children) {
398
401
  content: all.filter(node => !isBareOverlay(node))
399
402
  };
400
403
  }
404
+ function feedbackChildren(children, asChild) {
405
+ if (asChild) return children;
406
+ const {
407
+ overlays,
408
+ content
409
+ } = partitionOverlays(children);
410
+ if (overlays === null) return content;
411
+ return _react.createElement.call(void 0, _react.Fragment, null, overlays, content);
412
+ }
401
413
 
402
414
  // src/system/pressable-feedback/pressable-feedback.tsx
403
415
 
@@ -426,14 +438,17 @@ var AnimatedPressable = _reactnativereanimated2.default.createAnimatedComponent(
426
438
  var AnimatedSlot = _reactnativereanimated2.default.createAnimatedComponent(Slot);
427
439
  var PressableFeedback = _react.forwardRef.call(void 0, function PressableFeedback2({
428
440
  animation,
429
- ...rest
441
+ style,
442
+ ...props
430
443
  }, ref) {
431
444
  const inheritedDisableAll = _react.useContext.call(void 0, DisableAllContext);
432
445
  const resolved = resolveAnimation(animation, inheritedDisableAll);
446
+ const [styleProps, rest] = useStyleProps(props);
433
447
  const Feedback = resolved.none ? StaticFeedback : AnimatedFeedback;
434
448
  const body = /* @__PURE__ */_jsxruntime.jsx.call(void 0, Feedback, {
435
449
  ref,
436
450
  animation: resolved,
451
+ style: [styleProps, style],
437
452
  ...rest
438
453
  });
439
454
  return resolved.disableAll ? /* @__PURE__ */_jsxruntime.jsx.call(void 0, DisableAllContext.Provider, {
@@ -457,25 +472,21 @@ var StaticFeedback = _react.forwardRef.call(void 0, function StaticFeedback2({
457
472
  ...surface
458
473
  }), [isPressed, animation, surface]);
459
474
  const Root = asChild ? Slot : _reactnative.Pressable;
460
- const {
461
- overlays,
462
- content
463
- } = partitionOverlays(children);
464
475
  return /* @__PURE__ */_jsxruntime.jsx.call(void 0, FeedbackProvider, {
465
476
  value: context,
466
- children: /* @__PURE__ */_jsxruntime.jsxs.call(void 0, Root, {
477
+ children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, Root, {
467
478
  ref,
468
479
  style,
469
480
  disabled: isDisabled,
470
481
  ...rest,
471
- children: [overlays, content]
482
+ children: feedbackChildren(children, asChild)
472
483
  })
473
484
  });
474
485
  });
475
- const _worklet_7067782382362_init_data = {
476
- code: "function chunkIVVFYUDWCjs3(){const{animation,pressedScale,progress}=this.__closure;if(!animation.scale)return{};return{transform:[{scale:1-(1-pressedScale.value)*progress.value}]};}",
477
- location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-IVVFYUDW.cjs",
478
- sourceMap: "{\"version\":3,\"names\":[\"chunkIVVFYUDWCjs3\",\"animation\",\"pressedScale\",\"progress\",\"__closure\",\"scale\",\"transform\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-IVVFYUDW.cjs\"],\"mappings\":\"AA0hB6E,SAAAA,iBAAMA,CAAA,QAAAC,SAAA,CAAAC,YAAA,CAAAC,QAAA,OAAAC,SAAA,CAE/E,GAAI,CAACH,SAAS,CAACI,KAAK,CAAE,MAAO,CAAC,CAAC,CAC/B,MAAO,CAAEC,SAAS,CAAE,CAAC,CAAED,KAAK,CAAE,CAAC,CAAG,CAAC,CAAC,CAAGH,YAAY,CAACK,KAAK,EAAIJ,QAAQ,CAACI,KAAM,CAAC,CAAE,CAAC,CAClF\",\"ignoreList\":[]}"
486
+ const _worklet_14386231340974_init_data = {
487
+ code: "function chunkPUER6Y4MCjs3(){const{animation,pressedScale,progress}=this.__closure;if(!animation.scale)return{};return{transform:[{scale:1-(1-pressedScale.value)*progress.value}]};}",
488
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-PUER6Y4M.cjs",
489
+ sourceMap: "{\"version\":3,\"names\":[\"chunkPUER6Y4MCjs3\",\"animation\",\"pressedScale\",\"progress\",\"__closure\",\"scale\",\"transform\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-PUER6Y4M.cjs\"],\"mappings\":\"AAwiB6E,SAAAA,iBAAMA,CAAA,QAAAC,SAAA,CAAAC,YAAA,CAAAC,QAAA,OAAAC,SAAA,CAE/E,GAAI,CAACH,SAAS,CAACI,KAAK,CAAE,MAAO,CAAC,CAAC,CAC/B,MAAO,CAAEC,SAAS,CAAE,CAAC,CAAED,KAAK,CAAE,CAAC,CAAG,CAAC,CAAC,CAAGH,YAAY,CAACK,KAAK,EAAIJ,QAAQ,CAACI,KAAM,CAAC,CAAE,CAAC,CAClF\",\"ignoreList\":[]}"
479
490
  };
480
491
  var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2({
481
492
  isPressed = false,
@@ -504,14 +515,14 @@ var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2
504
515
  });
505
516
  }, [isPressed, progress]);
506
517
  const pressedScale = _reactnativereanimated.useDerivedValue.call(void 0, () => pressScaleFor(size.value.width));
507
- const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkIVVFYUDWCjs3Factory({
508
- _worklet_7067782382362_init_data,
518
+ const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkPUER6Y4MCjs3Factory({
519
+ _worklet_14386231340974_init_data,
509
520
  animation,
510
521
  pressedScale,
511
522
  progress
512
523
  }) {
513
524
  const _e = [new global.Error(), -4, -27];
514
- const chunkIVVFYUDWCjs3 = function () {
525
+ const chunkPUER6Y4MCjs3 = function () {
515
526
  if (!animation.scale) return {};
516
527
  return {
517
528
  transform: [{
@@ -519,18 +530,18 @@ var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2
519
530
  }]
520
531
  };
521
532
  };
522
- chunkIVVFYUDWCjs3.__closure = {
533
+ chunkPUER6Y4MCjs3.__closure = {
523
534
  animation,
524
535
  pressedScale,
525
536
  progress
526
537
  };
527
- chunkIVVFYUDWCjs3.__workletHash = 7067782382362;
528
- chunkIVVFYUDWCjs3.__pluginVersion = "0.7.4";
529
- chunkIVVFYUDWCjs3.__initData = _worklet_7067782382362_init_data;
530
- chunkIVVFYUDWCjs3.__stackDetails = _e;
531
- return chunkIVVFYUDWCjs3;
538
+ chunkPUER6Y4MCjs3.__workletHash = 14386231340974;
539
+ chunkPUER6Y4MCjs3.__pluginVersion = "0.7.4";
540
+ chunkPUER6Y4MCjs3.__initData = _worklet_14386231340974_init_data;
541
+ chunkPUER6Y4MCjs3.__stackDetails = _e;
542
+ return chunkPUER6Y4MCjs3;
532
543
  }({
533
- _worklet_7067782382362_init_data,
544
+ _worklet_14386231340974_init_data,
534
545
  animation,
535
546
  pressedScale,
536
547
  progress
@@ -595,13 +606,9 @@ var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2
595
606
  _optionalChain([onLayout, 'optionalCall', _6 => _6(event)]);
596
607
  };
597
608
  const Root = asChild ? AnimatedSlot : AnimatedPressable;
598
- const {
599
- overlays,
600
- content
601
- } = partitionOverlays(children);
602
609
  return /* @__PURE__ */_jsxruntime.jsx.call(void 0, FeedbackProvider, {
603
610
  value: context,
604
- children: /* @__PURE__ */_jsxruntime.jsxs.call(void 0, Root, {
611
+ children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, Root, {
605
612
  ref,
606
613
  style: [style, animatedStyle],
607
614
  disabled: isDisabled,
@@ -610,7 +617,7 @@ var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2
610
617
  onTouchEnd: handleTouchEnd,
611
618
  onTouchCancel: handleTouchCancel,
612
619
  ...rest,
613
- children: [overlays, content]
620
+ children: feedbackChildren(children, asChild)
614
621
  })
615
622
  });
616
623
  });
@@ -641,7 +648,8 @@ function useSurface(style) {
641
648
  function PressableFeedbackHighlight({
642
649
  style,
643
650
  animation: override,
644
- children
651
+ children,
652
+ ...props
645
653
  }) {
646
654
  const {
647
655
  isPressed,
@@ -650,11 +658,12 @@ function PressableFeedbackHighlight({
650
658
  ink,
651
659
  corners
652
660
  } = useFeedback();
661
+ const [styleProps] = useStyleProps(props);
653
662
  const settings = resolveSlotAnimation(override, animation.highlight, HIGHLIGHT_OPACITY, HIGHLIGHT_DURATION);
654
663
  const base = [_reactnative.StyleSheet.absoluteFillObject, {
655
664
  backgroundColor: ink,
656
665
  pointerEvents: "none"
657
- }, corners, style];
666
+ }, corners, styleProps, style];
658
667
  if (!progress || !settings.enabled) {
659
668
  return /* @__PURE__ */_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, {
660
669
  children: [/* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.View, {
@@ -674,10 +683,10 @@ function PressableFeedbackHighlight({
674
683
  }
675
684
  PressableFeedbackHighlight.displayName = "XAUI.PressableFeedback.Highlight";
676
685
  markOverlay(PressableFeedbackHighlight);
677
- const _worklet_10691781134764_init_data = {
678
- code: "function chunkIVVFYUDWCjs4(){const{shown,opacity}=this.__closure;return{opacity:shown.value*opacity};}",
679
- location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-IVVFYUDW.cjs",
680
- sourceMap: "{\"version\":3,\"names\":[\"chunkIVVFYUDWCjs4\",\"shown\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-IVVFYUDW.cjs\"],\"mappings\":\"AAyqB6E,SAAAA,iBAAMA,CAAA,QAAAC,KAAA,CAAAC,OAAA,OAAAC,SAAA,CAE/E,MAAO,CAAED,OAAO,CAAED,KAAK,CAACG,KAAK,CAAGF,OAAQ,CAAC,CAC3C\",\"ignoreList\":[]}"
686
+ const _worklet_9533806899672_init_data = {
687
+ code: "function chunkPUER6Y4MCjs4(){const{shown,opacity}=this.__closure;return{opacity:shown.value*opacity};}",
688
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-PUER6Y4M.cjs",
689
+ sourceMap: "{\"version\":3,\"names\":[\"chunkPUER6Y4MCjs4\",\"shown\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-PUER6Y4M.cjs\"],\"mappings\":\"AAsrB6E,SAAAA,iBAAMA,CAAA,QAAAC,KAAA,CAAAC,OAAA,OAAAC,SAAA,CAE/E,MAAO,CAAED,OAAO,CAAED,KAAK,CAACG,KAAK,CAAGF,OAAQ,CAAC,CAC3C\",\"ignoreList\":[]}"
681
690
  };
682
691
  function AnimatedHighlight({
683
692
  base,
@@ -693,28 +702,28 @@ function AnimatedHighlight({
693
702
  duration
694
703
  });
695
704
  }, [isPressed, shown, duration]);
696
- const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkIVVFYUDWCjs4Factory({
697
- _worklet_10691781134764_init_data,
705
+ const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkPUER6Y4MCjs4Factory({
706
+ _worklet_9533806899672_init_data,
698
707
  shown,
699
708
  opacity
700
709
  }) {
701
710
  const _e = [new global.Error(), -3, -27];
702
- const chunkIVVFYUDWCjs4 = function () {
711
+ const chunkPUER6Y4MCjs4 = function () {
703
712
  return {
704
713
  opacity: shown.value * opacity
705
714
  };
706
715
  };
707
- chunkIVVFYUDWCjs4.__closure = {
716
+ chunkPUER6Y4MCjs4.__closure = {
708
717
  shown,
709
718
  opacity
710
719
  };
711
- chunkIVVFYUDWCjs4.__workletHash = 10691781134764;
712
- chunkIVVFYUDWCjs4.__pluginVersion = "0.7.4";
713
- chunkIVVFYUDWCjs4.__initData = _worklet_10691781134764_init_data;
714
- chunkIVVFYUDWCjs4.__stackDetails = _e;
715
- return chunkIVVFYUDWCjs4;
720
+ chunkPUER6Y4MCjs4.__workletHash = 9533806899672;
721
+ chunkPUER6Y4MCjs4.__pluginVersion = "0.7.4";
722
+ chunkPUER6Y4MCjs4.__initData = _worklet_9533806899672_init_data;
723
+ chunkPUER6Y4MCjs4.__stackDetails = _e;
724
+ return chunkPUER6Y4MCjs4;
716
725
  }({
717
- _worklet_10691781134764_init_data,
726
+ _worklet_9533806899672_init_data,
718
727
  shown,
719
728
  opacity
720
729
  }), [shown, opacity]);
@@ -728,7 +737,8 @@ function AnimatedHighlight({
728
737
  function PressableFeedbackRipple({
729
738
  style,
730
739
  animation: override,
731
- children
740
+ children,
741
+ ...props
732
742
  }) {
733
743
  const {
734
744
  animation,
@@ -736,6 +746,8 @@ function PressableFeedbackRipple({
736
746
  ink,
737
747
  corners
738
748
  } = useFeedback();
749
+ const [styleProps] = useStyleProps(props);
750
+ const waveStyle = [styleProps, style];
739
751
  const settings = resolveSlotAnimation(override, animation.ripple, RIPPLE_OPACITY);
740
752
  const [size, setSize] = _react.useState.call(void 0, {
741
753
  width: 0,
@@ -768,17 +780,17 @@ function PressableFeedbackRipple({
768
780
  },
769
781
  color: ink,
770
782
  opacity: settings.opacity,
771
- style
783
+ style: waveStyle
772
784
  }, index))
773
785
  }), children]
774
786
  });
775
787
  }
776
788
  PressableFeedbackRipple.displayName = "XAUI.PressableFeedback.Ripple";
777
789
  markOverlay(PressableFeedbackRipple);
778
- const _worklet_10425801678593_init_data = {
779
- code: "function chunkIVVFYUDWCjs5(){const{wave,RIPPLE_START_SCALE,center,opacity,radius}=this.__closure;const t=wave.expand.value;const from=wave.origin.value;const scale=RIPPLE_START_SCALE+(1-RIPPLE_START_SCALE)*t;const x=from.x+(center.x-from.x)*t;const y=from.y+(center.y-from.y)*t;return{opacity:wave.alpha.value*opacity,transform:[{translateX:x-radius},{translateY:y-radius},{scale:scale}]};}",
780
- location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-IVVFYUDW.cjs",
781
- sourceMap: "{\"version\":3,\"names\":[\"chunkIVVFYUDWCjs5\",\"wave\",\"RIPPLE_START_SCALE\",\"center\",\"opacity\",\"radius\",\"__closure\",\"t\",\"expand\",\"value\",\"from\",\"origin\",\"scale\",\"x\",\"y\",\"alpha\",\"transform\",\"translateX\",\"translateY\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-IVVFYUDW.cjs\"],\"mappings\":\"AAsuB6E,SAAAA,iBAAMA,CAAA,QAAAC,IAAA,CAAAC,kBAAA,CAAAC,MAAA,CAAAC,OAAA,CAAAC,MAAA,OAAAC,SAAA,CAE/E,KAAM,CAAAC,CAAC,CAAGN,IAAI,CAACO,MAAM,CAACC,KAAK,CAC3B,KAAM,CAAAC,IAAI,CAAGT,IAAI,CAACU,MAAM,CAACF,KAAK,CAC9B,KAAM,CAAAG,KAAK,CAAGV,kBAAkB,CAAG,CAAC,CAAC,CAAGA,kBAAkB,EAAIK,CAAC,CAC/D,KAAM,CAAAM,CAAC,CAAGH,IAAI,CAACG,CAAC,CAAG,CAACV,MAAM,CAACU,CAAC,CAAGH,IAAI,CAACG,CAAC,EAAIN,CAAC,CAC1C,KAAM,CAAAO,CAAC,CAAGJ,IAAI,CAACI,CAAC,CAAG,CAACX,MAAM,CAACW,CAAC,CAAGJ,IAAI,CAACI,CAAC,EAAIP,CAAC,CAC1C,MAAO,CAELH,OAAO,CAAEH,IAAI,CAACc,KAAK,CAACN,KAAK,CAAGL,OAAO,CACnCY,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEJ,CAAC,CAAGR,MAAO,CAAC,CAAE,CAAEa,UAAU,CAAEJ,CAAC,CAAGT,MAAO,CAAC,CAAE,CAAEO,KAAA,CAAAA,KAAM,CAAC,CAC/E,CAAC,CACH\",\"ignoreList\":[]}"
790
+ const _worklet_2787827463541_init_data = {
791
+ code: "function chunkPUER6Y4MCjs5(){const{wave,RIPPLE_START_SCALE,center,opacity,radius}=this.__closure;const t=wave.expand.value;const from=wave.origin.value;const scale=RIPPLE_START_SCALE+(1-RIPPLE_START_SCALE)*t;const x=from.x+(center.x-from.x)*t;const y=from.y+(center.y-from.y)*t;return{opacity:wave.alpha.value*opacity,transform:[{translateX:x-radius},{translateY:y-radius},{scale:scale}]};}",
792
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-PUER6Y4M.cjs",
793
+ sourceMap: "{\"version\":3,\"names\":[\"chunkPUER6Y4MCjs5\",\"wave\",\"RIPPLE_START_SCALE\",\"center\",\"opacity\",\"radius\",\"__closure\",\"t\",\"expand\",\"value\",\"from\",\"origin\",\"scale\",\"x\",\"y\",\"alpha\",\"transform\",\"translateX\",\"translateY\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-PUER6Y4M.cjs\"],\"mappings\":\"AAsvB6E,SAAAA,iBAAMA,CAAA,QAAAC,IAAA,CAAAC,kBAAA,CAAAC,MAAA,CAAAC,OAAA,CAAAC,MAAA,OAAAC,SAAA,CAE/E,KAAM,CAAAC,CAAC,CAAGN,IAAI,CAACO,MAAM,CAACC,KAAK,CAC3B,KAAM,CAAAC,IAAI,CAAGT,IAAI,CAACU,MAAM,CAACF,KAAK,CAC9B,KAAM,CAAAG,KAAK,CAAGV,kBAAkB,CAAG,CAAC,CAAC,CAAGA,kBAAkB,EAAIK,CAAC,CAC/D,KAAM,CAAAM,CAAC,CAAGH,IAAI,CAACG,CAAC,CAAG,CAACV,MAAM,CAACU,CAAC,CAAGH,IAAI,CAACG,CAAC,EAAIN,CAAC,CAC1C,KAAM,CAAAO,CAAC,CAAGJ,IAAI,CAACI,CAAC,CAAG,CAACX,MAAM,CAACW,CAAC,CAAGJ,IAAI,CAACI,CAAC,EAAIP,CAAC,CAC1C,MAAO,CAELH,OAAO,CAAEH,IAAI,CAACc,KAAK,CAACN,KAAK,CAAGL,OAAO,CACnCY,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEJ,CAAC,CAAGR,MAAO,CAAC,CAAE,CAAEa,UAAU,CAAEJ,CAAC,CAAGT,MAAO,CAAC,CAAE,CAAEO,KAAA,CAAAA,KAAM,CAAC,CAC/E,CAAC,CACH\",\"ignoreList\":[]}"
782
794
  };
783
795
  function RippleWave({
784
796
  wave,
@@ -788,8 +800,8 @@ function RippleWave({
788
800
  opacity,
789
801
  style
790
802
  }) {
791
- const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkIVVFYUDWCjs5Factory({
792
- _worklet_10425801678593_init_data,
803
+ const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkPUER6Y4MCjs5Factory({
804
+ _worklet_2787827463541_init_data,
793
805
  wave,
794
806
  RIPPLE_START_SCALE,
795
807
  center,
@@ -797,7 +809,7 @@ function RippleWave({
797
809
  radius
798
810
  }) {
799
811
  const _e = [new global.Error(), -6, -27];
800
- const chunkIVVFYUDWCjs5 = function () {
812
+ const chunkPUER6Y4MCjs5 = function () {
801
813
  const t = wave.expand.value;
802
814
  const from = wave.origin.value;
803
815
  const scale = RIPPLE_START_SCALE + (1 - RIPPLE_START_SCALE) * t;
@@ -815,20 +827,20 @@ function RippleWave({
815
827
  }]
816
828
  };
817
829
  };
818
- chunkIVVFYUDWCjs5.__closure = {
830
+ chunkPUER6Y4MCjs5.__closure = {
819
831
  wave,
820
832
  RIPPLE_START_SCALE,
821
833
  center,
822
834
  opacity,
823
835
  radius
824
836
  };
825
- chunkIVVFYUDWCjs5.__workletHash = 10425801678593;
826
- chunkIVVFYUDWCjs5.__pluginVersion = "0.7.4";
827
- chunkIVVFYUDWCjs5.__initData = _worklet_10425801678593_init_data;
828
- chunkIVVFYUDWCjs5.__stackDetails = _e;
829
- return chunkIVVFYUDWCjs5;
837
+ chunkPUER6Y4MCjs5.__workletHash = 2787827463541;
838
+ chunkPUER6Y4MCjs5.__pluginVersion = "0.7.4";
839
+ chunkPUER6Y4MCjs5.__initData = _worklet_2787827463541_init_data;
840
+ chunkPUER6Y4MCjs5.__stackDetails = _e;
841
+ return chunkPUER6Y4MCjs5;
830
842
  }({
831
- _worklet_10425801678593_init_data,
843
+ _worklet_2787827463541_init_data,
832
844
  wave,
833
845
  RIPPLE_START_SCALE,
834
846
  center,
@@ -1012,6 +1024,7 @@ function apply(fns, theme, colors) {
1012
1024
  }
1013
1025
  return merged;
1014
1026
  }
1027
+ exports.useStyleProps = useStyleProps;
1015
1028
  exports.IconContext = IconContext;
1016
1029
  exports.useIconContext = useIconContext;
1017
1030
  exports.Icon = Icon;
@@ -1020,7 +1033,6 @@ exports.createSlotContext = createSlotContext;
1020
1033
  exports.mergeRefs = mergeRefs;
1021
1034
  exports.mergeProps = mergeProps;
1022
1035
  exports.Slot = Slot;
1023
- exports.useStyleProps = useStyleProps;
1024
1036
  exports.useFeedback = useFeedback;
1025
1037
  exports.PRESS_SCALE = PRESS_SCALE;
1026
1038
  exports.PRESS_DURATION = PRESS_DURATION;
@@ -1,3 +1,7 @@
1
+ import {
2
+ useStyleProps
3
+ } from "./chunk-64L44HEI.js";
4
+
1
5
  // src/system/portal/portal.tsx
2
6
  import { useContext, useId, useLayoutEffect } from "react";
3
7
 
@@ -26,7 +30,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
26
30
  var styles = StyleSheet.create({
27
31
  container: { flex: 1 }
28
32
  });
29
- function PortalHost({ children }) {
33
+ function PortalHost({ children, ...props }) {
34
+ const [styleProps] = useStyleProps(props);
30
35
  const [portals, setPortals] = useState(/* @__PURE__ */ new Map());
31
36
  const addPortal = useCallback((key, element) => {
32
37
  setPortals((current) => new Map(current).set(key, element));
@@ -43,7 +48,7 @@ function PortalHost({ children }) {
43
48
  () => ({ addPortal, removePortal }),
44
49
  [addPortal, removePortal]
45
50
  );
46
- return /* @__PURE__ */ jsx(PortalContext.Provider, { value: methods, children: /* @__PURE__ */ jsxs(View, { style: styles.container, children: [
51
+ return /* @__PURE__ */ jsx(PortalContext.Provider, { value: methods, children: /* @__PURE__ */ jsxs(View, { style: [styles.container, styleProps], children: [
47
52
  children,
48
53
  Array.from(portals, ([key, element]) => /* @__PURE__ */ jsx(Fragment, { children: element }, key))
49
54
  ] }) });
@@ -2,11 +2,11 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkMLJ543GPcjs = require('../../chunk-MLJ543GP.cjs');
6
- require('../../chunk-IVVFYUDW.cjs');
5
+ var _chunkNLFE3CRMcjs = require('../../chunk-NLFE3CRM.cjs');
6
+ require('../../chunk-PUER6Y4M.cjs');
7
7
  require('../../chunk-6N5JXRUZ.cjs');
8
8
 
9
9
 
10
10
 
11
11
 
12
- exports.Button = _chunkMLJ543GPcjs.Button; exports.buttonRecipe = _chunkMLJ543GPcjs.buttonRecipe; exports.useButton = _chunkMLJ543GPcjs.useButton;
12
+ exports.Button = _chunkNLFE3CRMcjs.Button; exports.buttonRecipe = _chunkNLFE3CRMcjs.buttonRecipe; exports.useButton = _chunkNLFE3CRMcjs.useButton;