@xaui/native 0.9.1-alpha.12 → 0.9.1-alpha.14

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.
@@ -36,10 +36,52 @@ function _optionalChain(ops) {
36
36
  }
37
37
  return value;
38
38
  }
39
- var _chunkFDUI4IAMcjs = require('./chunk-FDUI4IAM.cjs');
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
- const theme = _chunkFDUI4IAMcjs.useXAUITheme.call(void 0);
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 = _chunkFDUI4IAMcjs.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_6699857654336_init_data = {
253
- code: "function pressScaleFor_chunkGZIOB63OCjs1(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-GZIOB63O.cjs",
255
- sourceMap: "{\"version\":3,\"names\":[\"pressScaleFor_chunkGZIOB63OCjs1\",\"width\",\"SCALE_REFERENCE_WIDTH\",\"PRESS_SCALE\",\"__closure\",\"coefficient\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-GZIOB63O.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_13558288134681_init_data = {
256
+ code: "function pressScaleFor_chunkGRXC6J5MCjs1(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-GRXC6J5M.cjs",
258
+ sourceMap: "{\"version\":3,\"names\":[\"pressScaleFor_chunkGRXC6J5MCjs1\",\"width\",\"SCALE_REFERENCE_WIDTH\",\"PRESS_SCALE\",\"__closure\",\"coefficient\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-GRXC6J5M.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_chunkGZIOB63OCjs1Factory({
258
- _worklet_6699857654336_init_data,
260
+ const pressScaleFor = function pressScaleFor_chunkGRXC6J5MCjs1Factory({
261
+ _worklet_13558288134681_init_data,
259
262
  SCALE_REFERENCE_WIDTH,
260
263
  PRESS_SCALE
261
264
  }) {
@@ -268,13 +271,13 @@ const pressScaleFor = function pressScaleFor_chunkGZIOB63OCjs1Factory({
268
271
  SCALE_REFERENCE_WIDTH,
269
272
  PRESS_SCALE
270
273
  };
271
- pressScaleFor.__workletHash = 6699857654336;
274
+ pressScaleFor.__workletHash = 13558288134681;
272
275
  pressScaleFor.__pluginVersion = "0.7.4";
273
- pressScaleFor.__initData = _worklet_6699857654336_init_data;
276
+ pressScaleFor.__initData = _worklet_13558288134681_init_data;
274
277
  pressScaleFor.__stackDetails = _e;
275
278
  return pressScaleFor;
276
279
  }({
277
- _worklet_6699857654336_init_data,
280
+ _worklet_13558288134681_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_8377068516475_init_data = {
291
- code: "function rippleRadiusFor_chunkGZIOB63OCjs2(width,height){return Math.sqrt(width*width+height*height)/2+5;}",
292
- location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-GZIOB63O.cjs",
293
- sourceMap: "{\"version\":3,\"names\":[\"rippleRadiusFor_chunkGZIOB63OCjs2\",\"width\",\"height\",\"Math\",\"sqrt\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-GZIOB63O.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_4996986896354_init_data = {
294
+ code: "function rippleRadiusFor_chunkGRXC6J5MCjs2(width,height){return Math.sqrt(width*width+height*height)/2+5;}",
295
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-GRXC6J5M.cjs",
296
+ sourceMap: "{\"version\":3,\"names\":[\"rippleRadiusFor_chunkGRXC6J5MCjs2\",\"width\",\"height\",\"Math\",\"sqrt\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-GRXC6J5M.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_chunkGZIOB63OCjs2Factory({
296
- _worklet_8377068516475_init_data
298
+ const rippleRadiusFor = function rippleRadiusFor_chunkGRXC6J5MCjs2Factory({
299
+ _worklet_4996986896354_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 = 8377068516475;
306
+ rippleRadiusFor.__workletHash = 4996986896354;
304
307
  rippleRadiusFor.__pluginVersion = "0.7.4";
305
- rippleRadiusFor.__initData = _worklet_8377068516475_init_data;
308
+ rippleRadiusFor.__initData = _worklet_4996986896354_init_data;
306
309
  rippleRadiusFor.__stackDetails = _e;
307
310
  return rippleRadiusFor;
308
311
  }({
309
- _worklet_8377068516475_init_data
312
+ _worklet_4996986896354_init_data
310
313
  });
311
314
  var ALL_OFF = {
312
315
  scale: false,
@@ -406,8 +409,8 @@ var _reactnativereanimated2 = _interopRequireDefault(_reactnativereanimated);
406
409
 
407
410
  // src/system/pressable-feedback/pressable-feedback.surface.ts
408
411
  function inkFor(background, colors) {
409
- if (typeof background !== "string" || !_chunkFDUI4IAMcjs.isHex.call(void 0, background)) return colors.foreground;
410
- return _chunkFDUI4IAMcjs.contrastOn.call(void 0, background, colors.snow, colors.eclipse);
412
+ if (typeof background !== "string" || !_chunk6N5JXRUZcjs.isHex.call(void 0, background)) return colors.foreground;
413
+ return _chunk6N5JXRUZcjs.contrastOn.call(void 0, background, colors.snow, colors.eclipse);
411
414
  }
412
415
  var RADIUS_KEYS = ["borderRadius", "borderStartStartRadius", "borderStartEndRadius", "borderEndStartRadius", "borderEndEndRadius"];
413
416
  function radiusFrom(style) {
@@ -426,14 +429,17 @@ var AnimatedPressable = _reactnativereanimated2.default.createAnimatedComponent(
426
429
  var AnimatedSlot = _reactnativereanimated2.default.createAnimatedComponent(Slot);
427
430
  var PressableFeedback = _react.forwardRef.call(void 0, function PressableFeedback2({
428
431
  animation,
429
- ...rest
432
+ style,
433
+ ...props
430
434
  }, ref) {
431
435
  const inheritedDisableAll = _react.useContext.call(void 0, DisableAllContext);
432
436
  const resolved = resolveAnimation(animation, inheritedDisableAll);
437
+ const [styleProps, rest] = useStyleProps(props);
433
438
  const Feedback = resolved.none ? StaticFeedback : AnimatedFeedback;
434
439
  const body = /* @__PURE__ */_jsxruntime.jsx.call(void 0, Feedback, {
435
440
  ref,
436
441
  animation: resolved,
442
+ style: [styleProps, style],
437
443
  ...rest
438
444
  });
439
445
  return resolved.disableAll ? /* @__PURE__ */_jsxruntime.jsx.call(void 0, DisableAllContext.Provider, {
@@ -472,10 +478,10 @@ var StaticFeedback = _react.forwardRef.call(void 0, function StaticFeedback2({
472
478
  })
473
479
  });
474
480
  });
475
- const _worklet_15173624129561_init_data = {
476
- code: "function chunkGZIOB63OCjs3(){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-GZIOB63O.cjs",
478
- sourceMap: "{\"version\":3,\"names\":[\"chunkGZIOB63OCjs3\",\"animation\",\"pressedScale\",\"progress\",\"__closure\",\"scale\",\"transform\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-GZIOB63O.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\":[]}"
481
+ const _worklet_1474706883776_init_data = {
482
+ code: "function chunkGRXC6J5MCjs3(){const{animation,pressedScale,progress}=this.__closure;if(!animation.scale)return{};return{transform:[{scale:1-(1-pressedScale.value)*progress.value}]};}",
483
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-GRXC6J5M.cjs",
484
+ sourceMap: "{\"version\":3,\"names\":[\"chunkGRXC6J5MCjs3\",\"animation\",\"pressedScale\",\"progress\",\"__closure\",\"scale\",\"transform\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-GRXC6J5M.cjs\"],\"mappings\":\"AAsiB6E,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
485
  };
480
486
  var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2({
481
487
  isPressed = false,
@@ -504,14 +510,14 @@ var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2
504
510
  });
505
511
  }, [isPressed, progress]);
506
512
  const pressedScale = _reactnativereanimated.useDerivedValue.call(void 0, () => pressScaleFor(size.value.width));
507
- const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkGZIOB63OCjs3Factory({
508
- _worklet_15173624129561_init_data,
513
+ const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkGRXC6J5MCjs3Factory({
514
+ _worklet_1474706883776_init_data,
509
515
  animation,
510
516
  pressedScale,
511
517
  progress
512
518
  }) {
513
519
  const _e = [new global.Error(), -4, -27];
514
- const chunkGZIOB63OCjs3 = function () {
520
+ const chunkGRXC6J5MCjs3 = function () {
515
521
  if (!animation.scale) return {};
516
522
  return {
517
523
  transform: [{
@@ -519,18 +525,18 @@ var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2
519
525
  }]
520
526
  };
521
527
  };
522
- chunkGZIOB63OCjs3.__closure = {
528
+ chunkGRXC6J5MCjs3.__closure = {
523
529
  animation,
524
530
  pressedScale,
525
531
  progress
526
532
  };
527
- chunkGZIOB63OCjs3.__workletHash = 15173624129561;
528
- chunkGZIOB63OCjs3.__pluginVersion = "0.7.4";
529
- chunkGZIOB63OCjs3.__initData = _worklet_15173624129561_init_data;
530
- chunkGZIOB63OCjs3.__stackDetails = _e;
531
- return chunkGZIOB63OCjs3;
533
+ chunkGRXC6J5MCjs3.__workletHash = 1474706883776;
534
+ chunkGRXC6J5MCjs3.__pluginVersion = "0.7.4";
535
+ chunkGRXC6J5MCjs3.__initData = _worklet_1474706883776_init_data;
536
+ chunkGRXC6J5MCjs3.__stackDetails = _e;
537
+ return chunkGRXC6J5MCjs3;
532
538
  }({
533
- _worklet_15173624129561_init_data,
539
+ _worklet_1474706883776_init_data,
534
540
  animation,
535
541
  pressedScale,
536
542
  progress
@@ -626,7 +632,7 @@ function useWave() {
626
632
  };
627
633
  }
628
634
  function useSurface(style) {
629
- const theme = _chunkFDUI4IAMcjs.useXAUITheme.call(void 0);
635
+ const theme = _chunk6N5JXRUZcjs.useXAUITheme.call(void 0);
630
636
  return _react.useMemo.call(void 0, () => {
631
637
  const flat = _reactnative.StyleSheet.flatten(style);
632
638
  return {
@@ -641,7 +647,8 @@ function useSurface(style) {
641
647
  function PressableFeedbackHighlight({
642
648
  style,
643
649
  animation: override,
644
- children
650
+ children,
651
+ ...props
645
652
  }) {
646
653
  const {
647
654
  isPressed,
@@ -650,11 +657,12 @@ function PressableFeedbackHighlight({
650
657
  ink,
651
658
  corners
652
659
  } = useFeedback();
660
+ const [styleProps] = useStyleProps(props);
653
661
  const settings = resolveSlotAnimation(override, animation.highlight, HIGHLIGHT_OPACITY, HIGHLIGHT_DURATION);
654
662
  const base = [_reactnative.StyleSheet.absoluteFillObject, {
655
663
  backgroundColor: ink,
656
664
  pointerEvents: "none"
657
- }, corners, style];
665
+ }, corners, styleProps, style];
658
666
  if (!progress || !settings.enabled) {
659
667
  return /* @__PURE__ */_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, {
660
668
  children: [/* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.View, {
@@ -674,10 +682,10 @@ function PressableFeedbackHighlight({
674
682
  }
675
683
  PressableFeedbackHighlight.displayName = "XAUI.PressableFeedback.Highlight";
676
684
  markOverlay(PressableFeedbackHighlight);
677
- const _worklet_6996900026671_init_data = {
678
- code: "function chunkGZIOB63OCjs4(){const{shown,opacity}=this.__closure;return{opacity:shown.value*opacity};}",
679
- location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-GZIOB63O.cjs",
680
- sourceMap: "{\"version\":3,\"names\":[\"chunkGZIOB63OCjs4\",\"shown\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-GZIOB63O.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\":[]}"
685
+ const _worklet_11151204612214_init_data = {
686
+ code: "function chunkGRXC6J5MCjs4(){const{shown,opacity}=this.__closure;return{opacity:shown.value*opacity};}",
687
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-GRXC6J5M.cjs",
688
+ sourceMap: "{\"version\":3,\"names\":[\"chunkGRXC6J5MCjs4\",\"shown\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-GRXC6J5M.cjs\"],\"mappings\":\"AAwrB6E,SAAAA,iBAAMA,CAAA,QAAAC,KAAA,CAAAC,OAAA,OAAAC,SAAA,CAE/E,MAAO,CAAED,OAAO,CAAED,KAAK,CAACG,KAAK,CAAGF,OAAQ,CAAC,CAC3C\",\"ignoreList\":[]}"
681
689
  };
682
690
  function AnimatedHighlight({
683
691
  base,
@@ -693,28 +701,28 @@ function AnimatedHighlight({
693
701
  duration
694
702
  });
695
703
  }, [isPressed, shown, duration]);
696
- const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkGZIOB63OCjs4Factory({
697
- _worklet_6996900026671_init_data,
704
+ const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkGRXC6J5MCjs4Factory({
705
+ _worklet_11151204612214_init_data,
698
706
  shown,
699
707
  opacity
700
708
  }) {
701
709
  const _e = [new global.Error(), -3, -27];
702
- const chunkGZIOB63OCjs4 = function () {
710
+ const chunkGRXC6J5MCjs4 = function () {
703
711
  return {
704
712
  opacity: shown.value * opacity
705
713
  };
706
714
  };
707
- chunkGZIOB63OCjs4.__closure = {
715
+ chunkGRXC6J5MCjs4.__closure = {
708
716
  shown,
709
717
  opacity
710
718
  };
711
- chunkGZIOB63OCjs4.__workletHash = 6996900026671;
712
- chunkGZIOB63OCjs4.__pluginVersion = "0.7.4";
713
- chunkGZIOB63OCjs4.__initData = _worklet_6996900026671_init_data;
714
- chunkGZIOB63OCjs4.__stackDetails = _e;
715
- return chunkGZIOB63OCjs4;
719
+ chunkGRXC6J5MCjs4.__workletHash = 11151204612214;
720
+ chunkGRXC6J5MCjs4.__pluginVersion = "0.7.4";
721
+ chunkGRXC6J5MCjs4.__initData = _worklet_11151204612214_init_data;
722
+ chunkGRXC6J5MCjs4.__stackDetails = _e;
723
+ return chunkGRXC6J5MCjs4;
716
724
  }({
717
- _worklet_6996900026671_init_data,
725
+ _worklet_11151204612214_init_data,
718
726
  shown,
719
727
  opacity
720
728
  }), [shown, opacity]);
@@ -728,7 +736,8 @@ function AnimatedHighlight({
728
736
  function PressableFeedbackRipple({
729
737
  style,
730
738
  animation: override,
731
- children
739
+ children,
740
+ ...props
732
741
  }) {
733
742
  const {
734
743
  animation,
@@ -736,6 +745,8 @@ function PressableFeedbackRipple({
736
745
  ink,
737
746
  corners
738
747
  } = useFeedback();
748
+ const [styleProps] = useStyleProps(props);
749
+ const waveStyle = [styleProps, style];
739
750
  const settings = resolveSlotAnimation(override, animation.ripple, RIPPLE_OPACITY);
740
751
  const [size, setSize] = _react.useState.call(void 0, {
741
752
  width: 0,
@@ -768,17 +779,17 @@ function PressableFeedbackRipple({
768
779
  },
769
780
  color: ink,
770
781
  opacity: settings.opacity,
771
- style
782
+ style: waveStyle
772
783
  }, index))
773
784
  }), children]
774
785
  });
775
786
  }
776
787
  PressableFeedbackRipple.displayName = "XAUI.PressableFeedback.Ripple";
777
788
  markOverlay(PressableFeedbackRipple);
778
- const _worklet_7523284106050_init_data = {
779
- code: "function chunkGZIOB63OCjs5(){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-GZIOB63O.cjs",
781
- sourceMap: "{\"version\":3,\"names\":[\"chunkGZIOB63OCjs5\",\"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-GZIOB63O.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\":[]}"
789
+ const _worklet_9063586545627_init_data = {
790
+ code: "function chunkGRXC6J5MCjs5(){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}]};}",
791
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-GRXC6J5M.cjs",
792
+ sourceMap: "{\"version\":3,\"names\":[\"chunkGRXC6J5MCjs5\",\"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-GRXC6J5M.cjs\"],\"mappings\":\"AAwvB6E,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
793
  };
783
794
  function RippleWave({
784
795
  wave,
@@ -788,8 +799,8 @@ function RippleWave({
788
799
  opacity,
789
800
  style
790
801
  }) {
791
- const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkGZIOB63OCjs5Factory({
792
- _worklet_7523284106050_init_data,
802
+ const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkGRXC6J5MCjs5Factory({
803
+ _worklet_9063586545627_init_data,
793
804
  wave,
794
805
  RIPPLE_START_SCALE,
795
806
  center,
@@ -797,7 +808,7 @@ function RippleWave({
797
808
  radius
798
809
  }) {
799
810
  const _e = [new global.Error(), -6, -27];
800
- const chunkGZIOB63OCjs5 = function () {
811
+ const chunkGRXC6J5MCjs5 = function () {
801
812
  const t = wave.expand.value;
802
813
  const from = wave.origin.value;
803
814
  const scale = RIPPLE_START_SCALE + (1 - RIPPLE_START_SCALE) * t;
@@ -815,20 +826,20 @@ function RippleWave({
815
826
  }]
816
827
  };
817
828
  };
818
- chunkGZIOB63OCjs5.__closure = {
829
+ chunkGRXC6J5MCjs5.__closure = {
819
830
  wave,
820
831
  RIPPLE_START_SCALE,
821
832
  center,
822
833
  opacity,
823
834
  radius
824
835
  };
825
- chunkGZIOB63OCjs5.__workletHash = 7523284106050;
826
- chunkGZIOB63OCjs5.__pluginVersion = "0.7.4";
827
- chunkGZIOB63OCjs5.__initData = _worklet_7523284106050_init_data;
828
- chunkGZIOB63OCjs5.__stackDetails = _e;
829
- return chunkGZIOB63OCjs5;
836
+ chunkGRXC6J5MCjs5.__workletHash = 9063586545627;
837
+ chunkGRXC6J5MCjs5.__pluginVersion = "0.7.4";
838
+ chunkGRXC6J5MCjs5.__initData = _worklet_9063586545627_init_data;
839
+ chunkGRXC6J5MCjs5.__stackDetails = _e;
840
+ return chunkGRXC6J5MCjs5;
830
841
  }({
831
- _worklet_7523284106050_init_data,
842
+ _worklet_9063586545627_init_data,
832
843
  wave,
833
844
  RIPPLE_START_SCALE,
834
845
  center,
@@ -874,7 +885,7 @@ function tintSliceFor(token) {
874
885
  return "base";
875
886
  }
876
887
  function resolveTint(tokens, color, theme) {
877
- const tint = _chunkFDUI4IAMcjs.deriveTint.call(void 0, color, theme);
888
+ const tint = _chunk6N5JXRUZcjs.deriveTint.call(void 0, color, theme);
878
889
  const colors = {};
879
890
  for (const [role, token] of Object.entries(_nullishCoalesce(tokens, () => ({})))) {
880
891
  colors[role] = tint[tintSliceFor(token)];
@@ -1012,6 +1023,7 @@ function apply(fns, theme, colors) {
1012
1023
  }
1013
1024
  return merged;
1014
1025
  }
1026
+ exports.useStyleProps = useStyleProps;
1015
1027
  exports.IconContext = IconContext;
1016
1028
  exports.useIconContext = useIconContext;
1017
1029
  exports.Icon = Icon;
@@ -1020,7 +1032,6 @@ exports.createSlotContext = createSlotContext;
1020
1032
  exports.mergeRefs = mergeRefs;
1021
1033
  exports.mergeProps = mergeProps;
1022
1034
  exports.Slot = Slot;
1023
- exports.useStyleProps = useStyleProps;
1024
1035
  exports.useFeedback = useFeedback;
1025
1036
  exports.PRESS_SCALE = PRESS_SCALE;
1026
1037
  exports.PRESS_DURATION = PRESS_DURATION;
@@ -1,5 +1,5 @@
1
- import { Icon, PressableFeedback, childrenToString, createRecipe, createSlotContext, useStyleProps } from "./chunk-KLHHV4RU.js";
2
- import { useXAUITheme } from "./chunk-EMXBFHIP.js";
1
+ import { Icon, PressableFeedback, childrenToString, createRecipe, createSlotContext, useStyleProps } from "./chunk-CLU6QDYC.js";
2
+ import { useXAUITheme } from "./chunk-XJARE6SC.js";
3
3
 
4
4
  // src/components/button/button.context.ts
5
5
  var [ButtonProvider, useButton] = createSlotContext("Button");
@@ -70,10 +70,10 @@ function ButtonSpinner({
70
70
  });
71
71
  }
72
72
  ButtonSpinner.displayName = "XAUI.Button.Spinner";
73
- const _worklet_17512781929349_init_data = {
74
- code: "function chunkSKVKAJ5YJs1(){const{angle}=this.__closure;return{transform:[{rotate:angle.value+\"deg\"}]};}",
75
- location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-SKVKAJ5Y.js",
76
- sourceMap: "{\"version\":3,\"names\":[\"chunkSKVKAJ5YJs1\",\"angle\",\"__closure\",\"transform\",\"rotate\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-SKVKAJ5Y.js\"],\"mappings\":\"AA0EyC,SAAAA,gBAAMA,CAAA,QAAAC,KAAA,OAAAC,SAAA,CAE3C,MAAO,CAAEC,SAAS,CAAE,CAAC,CAAEC,MAAM,CAAKH,KAAK,CAACI,KAAK,MAAM,CAAC,CAAE,CAAC,CACzD\",\"ignoreList\":[]}"
73
+ const _worklet_1169378453226_init_data = {
74
+ code: "function chunkH2USQQUDJs1(){const{angle}=this.__closure;return{transform:[{rotate:angle.value+\"deg\"}]};}",
75
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-H2USQQUD.js",
76
+ sourceMap: "{\"version\":3,\"names\":[\"chunkH2USQQUDJs1\",\"angle\",\"__closure\",\"transform\",\"rotate\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-H2USQQUD.js\"],\"mappings\":\"AA0EyC,SAAAA,gBAAMA,CAAA,QAAAC,KAAA,OAAAC,SAAA,CAE3C,MAAO,CAAEC,SAAS,CAAE,CAAC,CAAEC,MAAM,CAAKH,KAAK,CAACI,KAAK,MAAM,CAAC,CAAE,CAAC,CACzD\",\"ignoreList\":[]}"
77
77
  };
78
78
  function SpinningRing({
79
79
  style
@@ -86,28 +86,28 @@ function SpinningRing({
86
86
  }), -1, false);
87
87
  return () => cancelAnimation(angle);
88
88
  }, [angle]);
89
- const animatedStyle = useAnimatedStyle(function chunkSKVKAJ5YJs1Factory({
90
- _worklet_17512781929349_init_data,
89
+ const animatedStyle = useAnimatedStyle(function chunkH2USQQUDJs1Factory({
90
+ _worklet_1169378453226_init_data,
91
91
  angle
92
92
  }) {
93
93
  const _e = [new global.Error(), -2, -27];
94
- const chunkSKVKAJ5YJs1 = function () {
94
+ const chunkH2USQQUDJs1 = function () {
95
95
  return {
96
96
  transform: [{
97
97
  rotate: `${angle.value}deg`
98
98
  }]
99
99
  };
100
100
  };
101
- chunkSKVKAJ5YJs1.__closure = {
101
+ chunkH2USQQUDJs1.__closure = {
102
102
  angle
103
103
  };
104
- chunkSKVKAJ5YJs1.__workletHash = 17512781929349;
105
- chunkSKVKAJ5YJs1.__pluginVersion = "0.7.4";
106
- chunkSKVKAJ5YJs1.__initData = _worklet_17512781929349_init_data;
107
- chunkSKVKAJ5YJs1.__stackDetails = _e;
108
- return chunkSKVKAJ5YJs1;
104
+ chunkH2USQQUDJs1.__workletHash = 1169378453226;
105
+ chunkH2USQQUDJs1.__pluginVersion = "0.7.4";
106
+ chunkH2USQQUDJs1.__initData = _worklet_1169378453226_init_data;
107
+ chunkH2USQQUDJs1.__stackDetails = _e;
108
+ return chunkH2USQQUDJs1;
109
109
  }({
110
- _worklet_17512781929349_init_data,
110
+ _worklet_1169378453226_init_data,
111
111
  angle
112
112
  }), [angle]);
113
113
  return /* @__PURE__ */jsx3(Animated.View, {
@@ -154,7 +154,14 @@ var VARIANT_TOKENS = {
154
154
  bgPressed: "accentPressed",
155
155
  fg: "accentForeground"
156
156
  },
157
+ // The accent's soft slice, not a second neutral: `secondary` is to `primary` what
158
+ // `danger-soft` is to `danger`, and it reads as the same family at lower emphasis.
157
159
  secondary: {
160
+ bg: "accentSoft",
161
+ bgPressed: "accentSoftPressed",
162
+ fg: "accentSoftForeground"
163
+ },
164
+ default: {
158
165
  bg: "default",
159
166
  bgPressed: "defaultPressed",
160
167
  fg: "defaultForeground"
@@ -168,26 +175,6 @@ var VARIANT_TOKENS = {
168
175
  bgPressed: "defaultSoftPressed",
169
176
  fg: "foreground"
170
177
  },
171
- success: {
172
- bg: "success",
173
- bgPressed: "successPressed",
174
- fg: "successForeground"
175
- },
176
- "success-soft": {
177
- bg: "successSoft",
178
- bgPressed: "successSoftPressed",
179
- fg: "successSoftForeground"
180
- },
181
- warning: {
182
- bg: "warning",
183
- bgPressed: "warningPressed",
184
- fg: "warningForeground"
185
- },
186
- "warning-soft": {
187
- bg: "warningSoft",
188
- bgPressed: "warningSoftPressed",
189
- fg: "warningSoftForeground"
190
- },
191
178
  danger: {
192
179
  bg: "danger",
193
180
  bgPressed: "dangerPressed",