@xaui/native 0.9.1-alpha.13 → 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.
@@ -1,3 +1,7 @@
1
+ import {
2
+ useStyleProps
3
+ } from "./chunk-CLU6QDYC.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
  ] }) });
@@ -1,5 +1,47 @@
1
1
  import { contrastOn, deriveTint, isHex, stableHash, useXAUITheme } from "./chunk-XJARE6SC.js";
2
2
 
3
+ // src/system/style-props/use-style-props.ts
4
+ import { useMemo } from "react";
5
+
6
+ // src/utils/style-props.ts
7
+ var STYLE_PROP_KEYS = [
8
+ // Flex and layout
9
+ "alignContent", "alignItems", "alignSelf", "aspectRatio", "boxSizing", "columnGap", "direction", "display", "flex", "flexBasis", "flexDirection", "flexGrow", "flexShrink", "flexWrap", "gap", "justifyContent", "overflow", "rowGap",
10
+ // Position
11
+ "bottom", "end", "inset", "insetBlock", "insetBlockEnd", "insetBlockStart", "insetInline", "insetInlineEnd", "insetInlineStart", "position", "start", "top", "zIndex",
12
+ // Margin
13
+ "margin", "marginBlock", "marginBlockEnd", "marginBlockStart", "marginBottom", "marginEnd", "marginHorizontal", "marginInline", "marginInlineEnd", "marginInlineStart", "marginStart", "marginTop", "marginVertical",
14
+ // Padding
15
+ "padding", "paddingBlock", "paddingBlockEnd", "paddingBlockStart", "paddingBottom", "paddingEnd", "paddingHorizontal", "paddingInline", "paddingInlineEnd", "paddingInlineStart", "paddingStart", "paddingTop", "paddingVertical",
16
+ // Size
17
+ "height", "maxHeight", "maxWidth", "minHeight", "minWidth", "width",
18
+ // Border
19
+ "borderBlockColor", "borderBlockEndColor", "borderBlockStartColor", "borderBottomColor", "borderBottomEndRadius", "borderBottomStartRadius", "borderBottomWidth", "borderColor", "borderCurve", "borderEndColor", "borderEndEndRadius", "borderEndStartRadius", "borderEndWidth", "borderRadius", "borderStartColor", "borderStartEndRadius", "borderStartStartRadius", "borderStartWidth", "borderStyle", "borderTopColor", "borderTopEndRadius", "borderTopStartRadius", "borderTopWidth", "borderWidth",
20
+ // Fill, shadow, and the rest of a box's paint
21
+ "backfaceVisibility", "backgroundColor", "boxShadow", "cursor", "elevation", "experimental_backgroundImage", "filter", "isolation", "mixBlendMode", "opacity", "outlineColor", "outlineOffset", "outlineStyle", "outlineWidth", "shadowColor", "shadowOffset", "shadowOpacity", "shadowRadius",
22
+ // Transform
23
+ "rotation", "scaleX", "scaleY", "transform", "transformMatrix", "transformOrigin", "translateX", "translateY",
24
+ // Text — a text slot only
25
+ "color", "fontFamily", "fontSize", "fontStyle", "fontVariant", "fontWeight", "includeFontPadding", "letterSpacing", "lineHeight", "textAlign", "textAlignVertical", "textDecorationColor", "textDecorationLine", "textDecorationStyle", "textShadowColor", "textShadowOffset", "textShadowRadius", "textTransform", "userSelect", "verticalAlign", "writingDirection",
26
+ // Image — an image slot only
27
+ "objectFit", "overlayColor", "resizeMode", "tintColor"];
28
+ var STYLE_PROP_KEY_SET = new Set(STYLE_PROP_KEYS);
29
+ function splitStyleProps(props) {
30
+ const styleProps = {};
31
+ const rest = {};
32
+ for (const [key, value] of Object.entries(props)) {
33
+ if (STYLE_PROP_KEY_SET.has(key)) styleProps[key] = value;else rest[key] = value;
34
+ }
35
+ return [styleProps, rest];
36
+ }
37
+
38
+ // src/system/style-props/use-style-props.ts
39
+ function useStyleProps(props) {
40
+ const [styleProps, rest] = splitStyleProps(props);
41
+ const key = stableHash(styleProps);
42
+ return [useMemo(() => styleProps, [key]), rest];
43
+ }
44
+
3
45
  // src/system/icon/icon-context.ts
4
46
  import { createContext, useContext } from "react";
5
47
  var IconContext = createContext({});
@@ -18,10 +60,12 @@ function Icon({
18
60
  source,
19
61
  size,
20
62
  color,
21
- style
63
+ style,
64
+ ...props
22
65
  }) {
23
66
  const inherited = useIconContext();
24
67
  const theme = useXAUITheme();
68
+ const [styleProps] = useStyleProps(props);
25
69
  const resolvedSize = size ?? inherited.size ?? theme.fontSizes.md;
26
70
  const resolvedColor = color ?? inherited.color ?? theme.colors.foreground;
27
71
  if (Component) {
@@ -44,7 +88,7 @@ function Icon({
44
88
  width: resolvedSize,
45
89
  height: resolvedSize,
46
90
  tintColor: resolvedColor
47
- }, style]
91
+ }, styleProps, style]
48
92
  });
49
93
  }
50
94
  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.");
@@ -161,48 +205,6 @@ function refOf(element) {
161
205
  return fromProps ?? fromElement;
162
206
  }
163
207
 
164
- // src/system/style-props/use-style-props.ts
165
- import { useMemo } from "react";
166
-
167
- // src/utils/style-props.ts
168
- var STYLE_PROP_KEYS = [
169
- // Flex and layout
170
- "alignContent", "alignItems", "alignSelf", "aspectRatio", "boxSizing", "columnGap", "direction", "display", "flex", "flexBasis", "flexDirection", "flexGrow", "flexShrink", "flexWrap", "gap", "justifyContent", "overflow", "rowGap",
171
- // Position
172
- "bottom", "end", "inset", "insetBlock", "insetBlockEnd", "insetBlockStart", "insetInline", "insetInlineEnd", "insetInlineStart", "position", "start", "top", "zIndex",
173
- // Margin
174
- "margin", "marginBlock", "marginBlockEnd", "marginBlockStart", "marginBottom", "marginEnd", "marginHorizontal", "marginInline", "marginInlineEnd", "marginInlineStart", "marginStart", "marginTop", "marginVertical",
175
- // Padding
176
- "padding", "paddingBlock", "paddingBlockEnd", "paddingBlockStart", "paddingBottom", "paddingEnd", "paddingHorizontal", "paddingInline", "paddingInlineEnd", "paddingInlineStart", "paddingStart", "paddingTop", "paddingVertical",
177
- // Size
178
- "height", "maxHeight", "maxWidth", "minHeight", "minWidth", "width",
179
- // Border
180
- "borderBlockColor", "borderBlockEndColor", "borderBlockStartColor", "borderBottomColor", "borderBottomEndRadius", "borderBottomStartRadius", "borderBottomWidth", "borderColor", "borderCurve", "borderEndColor", "borderEndEndRadius", "borderEndStartRadius", "borderEndWidth", "borderRadius", "borderStartColor", "borderStartEndRadius", "borderStartStartRadius", "borderStartWidth", "borderStyle", "borderTopColor", "borderTopEndRadius", "borderTopStartRadius", "borderTopWidth", "borderWidth",
181
- // Fill, shadow, and the rest of a box's paint
182
- "backfaceVisibility", "backgroundColor", "boxShadow", "cursor", "elevation", "experimental_backgroundImage", "filter", "isolation", "mixBlendMode", "opacity", "outlineColor", "outlineOffset", "outlineStyle", "outlineWidth", "shadowColor", "shadowOffset", "shadowOpacity", "shadowRadius",
183
- // Transform
184
- "rotation", "scaleX", "scaleY", "transform", "transformMatrix", "transformOrigin", "translateX", "translateY",
185
- // Text — a text slot only
186
- "color", "fontFamily", "fontSize", "fontStyle", "fontVariant", "fontWeight", "includeFontPadding", "letterSpacing", "lineHeight", "textAlign", "textAlignVertical", "textDecorationColor", "textDecorationLine", "textDecorationStyle", "textShadowColor", "textShadowOffset", "textShadowRadius", "textTransform", "userSelect", "verticalAlign", "writingDirection",
187
- // Image — an image slot only
188
- "objectFit", "overlayColor", "resizeMode", "tintColor"];
189
- var STYLE_PROP_KEY_SET = new Set(STYLE_PROP_KEYS);
190
- function splitStyleProps(props) {
191
- const styleProps = {};
192
- const rest = {};
193
- for (const [key, value] of Object.entries(props)) {
194
- if (STYLE_PROP_KEY_SET.has(key)) styleProps[key] = value;else rest[key] = value;
195
- }
196
- return [styleProps, rest];
197
- }
198
-
199
- // src/system/style-props/use-style-props.ts
200
- function useStyleProps(props) {
201
- const [styleProps, rest] = splitStyleProps(props);
202
- const key = stableHash(styleProps);
203
- return [useMemo(() => styleProps, [key]), rest];
204
- }
205
-
206
208
  // src/system/pressable-feedback/pressable-feedback-context.ts
207
209
  import { createContext as createContext3 } from "react";
208
210
  var [FeedbackProvider, useFeedback] = createSlotContext("PressableFeedback");
@@ -212,13 +214,13 @@ var DisableAllContext = createContext3(false);
212
214
  var PRESS_SCALE = 0.985;
213
215
  var PRESS_DURATION = 300;
214
216
  var SCALE_REFERENCE_WIDTH = 300;
215
- const _worklet_6691672065997_init_data = {
216
- code: "function pressScaleFor_chunkB3EAZ2CCJs1(width){const{SCALE_REFERENCE_WIDTH,PRESS_SCALE}=this.__closure;const coefficient=width>0?SCALE_REFERENCE_WIDTH/width:1;return 1-(1-PRESS_SCALE)*coefficient;}",
217
- location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-B3EAZ2CC.js",
218
- sourceMap: "{\"version\":3,\"names\":[\"pressScaleFor_chunkB3EAZ2CCJs1\",\"width\",\"SCALE_REFERENCE_WIDTH\",\"PRESS_SCALE\",\"__closure\",\"coefficient\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-B3EAZ2CC.js\"],\"mappings\":\"AAwWA,SAAAA,8BAA8BA,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\":[]}"
217
+ const _worklet_11076661694643_init_data = {
218
+ code: "function pressScaleFor_chunkCLU6QDYCJs1(width){const{SCALE_REFERENCE_WIDTH,PRESS_SCALE}=this.__closure;const coefficient=width>0?SCALE_REFERENCE_WIDTH/width:1;return 1-(1-PRESS_SCALE)*coefficient;}",
219
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-CLU6QDYC.js",
220
+ sourceMap: "{\"version\":3,\"names\":[\"pressScaleFor_chunkCLU6QDYCJs1\",\"width\",\"SCALE_REFERENCE_WIDTH\",\"PRESS_SCALE\",\"__closure\",\"coefficient\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-CLU6QDYC.js\"],\"mappings\":\"AA2WA,SAAAA,8BAA8BA,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\":[]}"
219
221
  };
220
- const pressScaleFor = function pressScaleFor_chunkB3EAZ2CCJs1Factory({
221
- _worklet_6691672065997_init_data,
222
+ const pressScaleFor = function pressScaleFor_chunkCLU6QDYCJs1Factory({
223
+ _worklet_11076661694643_init_data,
222
224
  SCALE_REFERENCE_WIDTH,
223
225
  PRESS_SCALE
224
226
  }) {
@@ -231,13 +233,13 @@ const pressScaleFor = function pressScaleFor_chunkB3EAZ2CCJs1Factory({
231
233
  SCALE_REFERENCE_WIDTH,
232
234
  PRESS_SCALE
233
235
  };
234
- pressScaleFor.__workletHash = 6691672065997;
236
+ pressScaleFor.__workletHash = 11076661694643;
235
237
  pressScaleFor.__pluginVersion = "0.7.4";
236
- pressScaleFor.__initData = _worklet_6691672065997_init_data;
238
+ pressScaleFor.__initData = _worklet_11076661694643_init_data;
237
239
  pressScaleFor.__stackDetails = _e;
238
240
  return pressScaleFor;
239
241
  }({
240
- _worklet_6691672065997_init_data,
242
+ _worklet_11076661694643_init_data,
241
243
  SCALE_REFERENCE_WIDTH,
242
244
  PRESS_SCALE
243
245
  });
@@ -250,26 +252,26 @@ var RIPPLE_CONFIRM_DURATION = 225;
250
252
  var RIPPLE_FADE_IN = 75;
251
253
  var RIPPLE_FADE_OUT_DELAY = 225;
252
254
  var RIPPLE_FADE_OUT = 150;
253
- const _worklet_9510765573814_init_data = {
254
- code: "function rippleRadiusFor_chunkB3EAZ2CCJs2(width,height){return Math.sqrt(width*width+height*height)/2+5;}",
255
- location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-B3EAZ2CC.js",
256
- sourceMap: "{\"version\":3,\"names\":[\"rippleRadiusFor_chunkB3EAZ2CCJs2\",\"width\",\"height\",\"Math\",\"sqrt\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-B3EAZ2CC.js\"],\"mappings\":\"AAsXA,SAAAA,gCAAwCA,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\":[]}"
255
+ const _worklet_13761713049032_init_data = {
256
+ code: "function rippleRadiusFor_chunkCLU6QDYCJs2(width,height){return Math.sqrt(width*width+height*height)/2+5;}",
257
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-CLU6QDYC.js",
258
+ sourceMap: "{\"version\":3,\"names\":[\"rippleRadiusFor_chunkCLU6QDYCJs2\",\"width\",\"height\",\"Math\",\"sqrt\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-CLU6QDYC.js\"],\"mappings\":\"AAyXA,SAAAA,gCAAwCA,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\":[]}"
257
259
  };
258
- const rippleRadiusFor = function rippleRadiusFor_chunkB3EAZ2CCJs2Factory({
259
- _worklet_9510765573814_init_data
260
+ const rippleRadiusFor = function rippleRadiusFor_chunkCLU6QDYCJs2Factory({
261
+ _worklet_13761713049032_init_data
260
262
  }) {
261
263
  const _e = [new global.Error(), 1, -27];
262
264
  const rippleRadiusFor = function (width, height) {
263
265
  return Math.sqrt(width * width + height * height) / 2 + 5;
264
266
  };
265
267
  rippleRadiusFor.__closure = {};
266
- rippleRadiusFor.__workletHash = 9510765573814;
268
+ rippleRadiusFor.__workletHash = 13761713049032;
267
269
  rippleRadiusFor.__pluginVersion = "0.7.4";
268
- rippleRadiusFor.__initData = _worklet_9510765573814_init_data;
270
+ rippleRadiusFor.__initData = _worklet_13761713049032_init_data;
269
271
  rippleRadiusFor.__stackDetails = _e;
270
272
  return rippleRadiusFor;
271
273
  }({
272
- _worklet_9510765573814_init_data
274
+ _worklet_13761713049032_init_data
273
275
  });
274
276
  var ALL_OFF = {
275
277
  scale: false,
@@ -389,14 +391,17 @@ var AnimatedPressable = Animated.createAnimatedComponent(Pressable);
389
391
  var AnimatedSlot = Animated.createAnimatedComponent(Slot);
390
392
  var PressableFeedback = forwardRef2(function PressableFeedback2({
391
393
  animation,
392
- ...rest
394
+ style,
395
+ ...props
393
396
  }, ref) {
394
397
  const inheritedDisableAll = useContext3(DisableAllContext);
395
398
  const resolved = resolveAnimation(animation, inheritedDisableAll);
399
+ const [styleProps, rest] = useStyleProps(props);
396
400
  const Feedback = resolved.none ? StaticFeedback : AnimatedFeedback;
397
401
  const body = /* @__PURE__ */jsx2(Feedback, {
398
402
  ref,
399
403
  animation: resolved,
404
+ style: [styleProps, style],
400
405
  ...rest
401
406
  });
402
407
  return resolved.disableAll ? /* @__PURE__ */jsx2(DisableAllContext.Provider, {
@@ -435,15 +440,15 @@ var StaticFeedback = forwardRef2(function StaticFeedback2({
435
440
  })
436
441
  });
437
442
  });
438
- const _worklet_2835586366723_init_data = {
439
- code: "function chunkB3EAZ2CCJs3(){const{pressScaleFor,size}=this.__closure;return pressScaleFor(size.value.width);}",
440
- location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-B3EAZ2CC.js",
441
- sourceMap: "{\"version\":3,\"names\":[\"chunkB3EAZ2CCJs3\",\"pressScaleFor\",\"size\",\"__closure\",\"value\",\"width\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-B3EAZ2CC.js\"],\"mappings\":\"AAyhBuC,SAAAA,iBAAA,QAAAC,aAAA,CAAAC,IAAA,OAAAC,SAAA,OAAM,CAAAF,aAAc,CAAAC,IAAK,CAAAE,KAAM,CAAAC,KAAK\",\"ignoreList\":[]}"
443
+ const _worklet_2213648027133_init_data = {
444
+ code: "function chunkCLU6QDYCJs3(){const{pressScaleFor,size}=this.__closure;return pressScaleFor(size.value.width);}",
445
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-CLU6QDYC.js",
446
+ sourceMap: "{\"version\":3,\"names\":[\"chunkCLU6QDYCJs3\",\"pressScaleFor\",\"size\",\"__closure\",\"value\",\"width\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-CLU6QDYC.js\"],\"mappings\":\"AAqiBuC,SAAAA,iBAAA,QAAAC,aAAA,CAAAC,IAAA,OAAAC,SAAA,OAAM,CAAAF,aAAc,CAAAC,IAAK,CAAAE,KAAM,CAAAC,KAAK\",\"ignoreList\":[]}"
442
447
  };
443
- const _worklet_629504988883_init_data = {
444
- code: "function chunkB3EAZ2CCJs4(){const{animation,pressedScale,progress}=this.__closure;if(!animation.scale)return{};return{transform:[{scale:1-(1-pressedScale.value)*progress.value}]};}",
445
- location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-B3EAZ2CC.js",
446
- sourceMap: "{\"version\":3,\"names\":[\"chunkB3EAZ2CCJs4\",\"animation\",\"pressedScale\",\"progress\",\"__closure\",\"scale\",\"transform\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-B3EAZ2CC.js\"],\"mappings\":\"AA0hByC,SAAAA,gBAAMA,CAAA,QAAAC,SAAA,CAAAC,YAAA,CAAAC,QAAA,OAAAC,SAAA,CAE3C,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\":[]}"
448
+ const _worklet_14720418343725_init_data = {
449
+ code: "function chunkCLU6QDYCJs4(){const{animation,pressedScale,progress}=this.__closure;if(!animation.scale)return{};return{transform:[{scale:1-(1-pressedScale.value)*progress.value}]};}",
450
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-CLU6QDYC.js",
451
+ sourceMap: "{\"version\":3,\"names\":[\"chunkCLU6QDYCJs4\",\"animation\",\"pressedScale\",\"progress\",\"__closure\",\"scale\",\"transform\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-CLU6QDYC.js\"],\"mappings\":\"AAsiByC,SAAAA,gBAAMA,CAAA,QAAAC,SAAA,CAAAC,YAAA,CAAAC,QAAA,OAAAC,SAAA,CAE3C,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\":[]}"
447
452
  };
448
453
  var AnimatedFeedback = forwardRef2(function AnimatedFeedback2({
449
454
  isPressed = false,
@@ -471,35 +476,35 @@ var AnimatedFeedback = forwardRef2(function AnimatedFeedback2({
471
476
  easing: Easing.out(Easing.ease)
472
477
  });
473
478
  }, [isPressed, progress]);
474
- const pressedScale = useDerivedValue(function chunkB3EAZ2CCJs3Factory({
475
- _worklet_2835586366723_init_data,
479
+ const pressedScale = useDerivedValue(function chunkCLU6QDYCJs3Factory({
480
+ _worklet_2213648027133_init_data,
476
481
  pressScaleFor,
477
482
  size
478
483
  }) {
479
484
  const _e = [new global.Error(), -3, -27];
480
- const chunkB3EAZ2CCJs3 = () => pressScaleFor(size.value.width);
481
- chunkB3EAZ2CCJs3.__closure = {
485
+ const chunkCLU6QDYCJs3 = () => pressScaleFor(size.value.width);
486
+ chunkCLU6QDYCJs3.__closure = {
482
487
  pressScaleFor,
483
488
  size
484
489
  };
485
- chunkB3EAZ2CCJs3.__workletHash = 2835586366723;
486
- chunkB3EAZ2CCJs3.__pluginVersion = "0.7.4";
487
- chunkB3EAZ2CCJs3.__initData = _worklet_2835586366723_init_data;
488
- chunkB3EAZ2CCJs3.__stackDetails = _e;
489
- return chunkB3EAZ2CCJs3;
490
+ chunkCLU6QDYCJs3.__workletHash = 2213648027133;
491
+ chunkCLU6QDYCJs3.__pluginVersion = "0.7.4";
492
+ chunkCLU6QDYCJs3.__initData = _worklet_2213648027133_init_data;
493
+ chunkCLU6QDYCJs3.__stackDetails = _e;
494
+ return chunkCLU6QDYCJs3;
490
495
  }({
491
- _worklet_2835586366723_init_data,
496
+ _worklet_2213648027133_init_data,
492
497
  pressScaleFor,
493
498
  size
494
499
  }));
495
- const animatedStyle = useAnimatedStyle(function chunkB3EAZ2CCJs4Factory({
496
- _worklet_629504988883_init_data,
500
+ const animatedStyle = useAnimatedStyle(function chunkCLU6QDYCJs4Factory({
501
+ _worklet_14720418343725_init_data,
497
502
  animation,
498
503
  pressedScale,
499
504
  progress
500
505
  }) {
501
506
  const _e = [new global.Error(), -4, -27];
502
- const chunkB3EAZ2CCJs4 = function () {
507
+ const chunkCLU6QDYCJs4 = function () {
503
508
  if (!animation.scale) return {};
504
509
  return {
505
510
  transform: [{
@@ -507,18 +512,18 @@ var AnimatedFeedback = forwardRef2(function AnimatedFeedback2({
507
512
  }]
508
513
  };
509
514
  };
510
- chunkB3EAZ2CCJs4.__closure = {
515
+ chunkCLU6QDYCJs4.__closure = {
511
516
  animation,
512
517
  pressedScale,
513
518
  progress
514
519
  };
515
- chunkB3EAZ2CCJs4.__workletHash = 629504988883;
516
- chunkB3EAZ2CCJs4.__pluginVersion = "0.7.4";
517
- chunkB3EAZ2CCJs4.__initData = _worklet_629504988883_init_data;
518
- chunkB3EAZ2CCJs4.__stackDetails = _e;
519
- return chunkB3EAZ2CCJs4;
520
+ chunkCLU6QDYCJs4.__workletHash = 14720418343725;
521
+ chunkCLU6QDYCJs4.__pluginVersion = "0.7.4";
522
+ chunkCLU6QDYCJs4.__initData = _worklet_14720418343725_init_data;
523
+ chunkCLU6QDYCJs4.__stackDetails = _e;
524
+ return chunkCLU6QDYCJs4;
520
525
  }({
521
- _worklet_629504988883_init_data,
526
+ _worklet_14720418343725_init_data,
522
527
  animation,
523
528
  pressedScale,
524
529
  progress
@@ -632,7 +637,8 @@ import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
632
637
  function PressableFeedbackHighlight({
633
638
  style,
634
639
  animation: override,
635
- children
640
+ children,
641
+ ...props
636
642
  }) {
637
643
  const {
638
644
  isPressed,
@@ -641,11 +647,12 @@ function PressableFeedbackHighlight({
641
647
  ink,
642
648
  corners
643
649
  } = useFeedback();
650
+ const [styleProps] = useStyleProps(props);
644
651
  const settings = resolveSlotAnimation(override, animation.highlight, HIGHLIGHT_OPACITY, HIGHLIGHT_DURATION);
645
652
  const base = [StyleSheet2.absoluteFillObject, {
646
653
  backgroundColor: ink,
647
654
  pointerEvents: "none"
648
- }, corners, style];
655
+ }, corners, styleProps, style];
649
656
  if (!progress || !settings.enabled) {
650
657
  return /* @__PURE__ */jsxs2(Fragment, {
651
658
  children: [/* @__PURE__ */jsx3(View2, {
@@ -665,10 +672,10 @@ function PressableFeedbackHighlight({
665
672
  }
666
673
  PressableFeedbackHighlight.displayName = "XAUI.PressableFeedback.Highlight";
667
674
  markOverlay(PressableFeedbackHighlight);
668
- const _worklet_15840805364323_init_data = {
669
- code: "function chunkB3EAZ2CCJs5(){const{shown,opacity}=this.__closure;return{opacity:shown.value*opacity};}",
670
- location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-B3EAZ2CC.js",
671
- sourceMap: "{\"version\":3,\"names\":[\"chunkB3EAZ2CCJs5\",\"shown\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-B3EAZ2CC.js\"],\"mappings\":\"AAyqB0C,SAAAA,gBAAMA,CAAA,QAAAC,KAAA,CAAAC,OAAA,OAAAC,SAAA,CAE5C,MAAO,CAAED,OAAO,CAAED,KAAK,CAACG,KAAK,CAAGF,OAAQ,CAAC,CAC3C\",\"ignoreList\":[]}"
675
+ const _worklet_11837960236317_init_data = {
676
+ code: "function chunkCLU6QDYCJs5(){const{shown,opacity}=this.__closure;return{opacity:shown.value*opacity};}",
677
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-CLU6QDYC.js",
678
+ sourceMap: "{\"version\":3,\"names\":[\"chunkCLU6QDYCJs5\",\"shown\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-CLU6QDYC.js\"],\"mappings\":\"AAwrB0C,SAAAA,gBAAMA,CAAA,QAAAC,KAAA,CAAAC,OAAA,OAAAC,SAAA,CAE5C,MAAO,CAAED,OAAO,CAAED,KAAK,CAACG,KAAK,CAAGF,OAAQ,CAAC,CAC3C\",\"ignoreList\":[]}"
672
679
  };
673
680
  function AnimatedHighlight({
674
681
  base,
@@ -684,28 +691,28 @@ function AnimatedHighlight({
684
691
  duration
685
692
  });
686
693
  }, [isPressed, shown, duration]);
687
- const animatedStyle = useAnimatedStyle2(function chunkB3EAZ2CCJs5Factory({
688
- _worklet_15840805364323_init_data,
694
+ const animatedStyle = useAnimatedStyle2(function chunkCLU6QDYCJs5Factory({
695
+ _worklet_11837960236317_init_data,
689
696
  shown,
690
697
  opacity
691
698
  }) {
692
699
  const _e = [new global.Error(), -3, -27];
693
- const chunkB3EAZ2CCJs5 = function () {
700
+ const chunkCLU6QDYCJs5 = function () {
694
701
  return {
695
702
  opacity: shown.value * opacity
696
703
  };
697
704
  };
698
- chunkB3EAZ2CCJs5.__closure = {
705
+ chunkCLU6QDYCJs5.__closure = {
699
706
  shown,
700
707
  opacity
701
708
  };
702
- chunkB3EAZ2CCJs5.__workletHash = 15840805364323;
703
- chunkB3EAZ2CCJs5.__pluginVersion = "0.7.4";
704
- chunkB3EAZ2CCJs5.__initData = _worklet_15840805364323_init_data;
705
- chunkB3EAZ2CCJs5.__stackDetails = _e;
706
- return chunkB3EAZ2CCJs5;
709
+ chunkCLU6QDYCJs5.__workletHash = 11837960236317;
710
+ chunkCLU6QDYCJs5.__pluginVersion = "0.7.4";
711
+ chunkCLU6QDYCJs5.__initData = _worklet_11837960236317_init_data;
712
+ chunkCLU6QDYCJs5.__stackDetails = _e;
713
+ return chunkCLU6QDYCJs5;
707
714
  }({
708
- _worklet_15840805364323_init_data,
715
+ _worklet_11837960236317_init_data,
709
716
  shown,
710
717
  opacity
711
718
  }), [shown, opacity]);
@@ -722,7 +729,8 @@ import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-run
722
729
  function PressableFeedbackRipple({
723
730
  style,
724
731
  animation: override,
725
- children
732
+ children,
733
+ ...props
726
734
  }) {
727
735
  const {
728
736
  animation,
@@ -730,6 +738,8 @@ function PressableFeedbackRipple({
730
738
  ink,
731
739
  corners
732
740
  } = useFeedback();
741
+ const [styleProps] = useStyleProps(props);
742
+ const waveStyle = [styleProps, style];
733
743
  const settings = resolveSlotAnimation(override, animation.ripple, RIPPLE_OPACITY);
734
744
  const [size, setSize] = useState({
735
745
  width: 0,
@@ -762,17 +772,17 @@ function PressableFeedbackRipple({
762
772
  },
763
773
  color: ink,
764
774
  opacity: settings.opacity,
765
- style
775
+ style: waveStyle
766
776
  }, index))
767
777
  }), children]
768
778
  });
769
779
  }
770
780
  PressableFeedbackRipple.displayName = "XAUI.PressableFeedback.Ripple";
771
781
  markOverlay(PressableFeedbackRipple);
772
- const _worklet_7503622698860_init_data = {
773
- code: "function chunkB3EAZ2CCJs6(){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}]};}",
774
- location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-B3EAZ2CC.js",
775
- sourceMap: "{\"version\":3,\"names\":[\"chunkB3EAZ2CCJs6\",\"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-B3EAZ2CC.js\"],\"mappings\":\"AAsuB0C,SAAAA,gBAAMA,CAAA,QAAAC,IAAA,CAAAC,kBAAA,CAAAC,MAAA,CAAAC,OAAA,CAAAC,MAAA,OAAAC,SAAA,CAE5C,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
+ const _worklet_14369036823378_init_data = {
783
+ code: "function chunkCLU6QDYCJs6(){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}]};}",
784
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-CLU6QDYC.js",
785
+ sourceMap: "{\"version\":3,\"names\":[\"chunkCLU6QDYCJs6\",\"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-CLU6QDYC.js\"],\"mappings\":\"AAwvB0C,SAAAA,gBAAMA,CAAA,QAAAC,IAAA,CAAAC,kBAAA,CAAAC,MAAA,CAAAC,OAAA,CAAAC,MAAA,OAAAC,SAAA,CAE5C,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\":[]}"
776
786
  };
777
787
  function RippleWave({
778
788
  wave,
@@ -782,8 +792,8 @@ function RippleWave({
782
792
  opacity,
783
793
  style
784
794
  }) {
785
- const animatedStyle = useAnimatedStyle3(function chunkB3EAZ2CCJs6Factory({
786
- _worklet_7503622698860_init_data,
795
+ const animatedStyle = useAnimatedStyle3(function chunkCLU6QDYCJs6Factory({
796
+ _worklet_14369036823378_init_data,
787
797
  wave,
788
798
  RIPPLE_START_SCALE,
789
799
  center,
@@ -791,7 +801,7 @@ function RippleWave({
791
801
  radius
792
802
  }) {
793
803
  const _e = [new global.Error(), -6, -27];
794
- const chunkB3EAZ2CCJs6 = function () {
804
+ const chunkCLU6QDYCJs6 = function () {
795
805
  const t = wave.expand.value;
796
806
  const from = wave.origin.value;
797
807
  const scale = RIPPLE_START_SCALE + (1 - RIPPLE_START_SCALE) * t;
@@ -809,20 +819,20 @@ function RippleWave({
809
819
  }]
810
820
  };
811
821
  };
812
- chunkB3EAZ2CCJs6.__closure = {
822
+ chunkCLU6QDYCJs6.__closure = {
813
823
  wave,
814
824
  RIPPLE_START_SCALE,
815
825
  center,
816
826
  opacity,
817
827
  radius
818
828
  };
819
- chunkB3EAZ2CCJs6.__workletHash = 7503622698860;
820
- chunkB3EAZ2CCJs6.__pluginVersion = "0.7.4";
821
- chunkB3EAZ2CCJs6.__initData = _worklet_7503622698860_init_data;
822
- chunkB3EAZ2CCJs6.__stackDetails = _e;
823
- return chunkB3EAZ2CCJs6;
829
+ chunkCLU6QDYCJs6.__workletHash = 14369036823378;
830
+ chunkCLU6QDYCJs6.__pluginVersion = "0.7.4";
831
+ chunkCLU6QDYCJs6.__initData = _worklet_14369036823378_init_data;
832
+ chunkCLU6QDYCJs6.__stackDetails = _e;
833
+ return chunkCLU6QDYCJs6;
824
834
  }({
825
- _worklet_7503622698860_init_data,
835
+ _worklet_14369036823378_init_data,
826
836
  wave,
827
837
  RIPPLE_START_SCALE,
828
838
  center,
@@ -1007,4 +1017,4 @@ function apply(fns, theme, colors) {
1007
1017
  }
1008
1018
  return merged;
1009
1019
  }
1010
- export { IconContext, useIconContext, Icon, childrenToString, createSlotContext, mergeRefs, mergeProps, Slot, useStyleProps, useFeedback, PRESS_SCALE, PRESS_DURATION, SCALE_REFERENCE_WIDTH, pressScaleFor, HIGHLIGHT_OPACITY, HIGHLIGHT_DURATION, RIPPLE_OPACITY, RIPPLE_START_SCALE, RIPPLE_EXPAND_DURATION, RIPPLE_CONFIRM_DURATION, RIPPLE_FADE_IN, RIPPLE_FADE_OUT_DELAY, RIPPLE_FADE_OUT, rippleRadiusFor, resolveAnimation, resolveSlotAnimation, FEEDBACK_OVERLAY, markOverlay, PressableFeedback3 as PressableFeedback, createRecipe };
1020
+ export { useStyleProps, IconContext, useIconContext, Icon, childrenToString, createSlotContext, mergeRefs, mergeProps, Slot, useFeedback, PRESS_SCALE, PRESS_DURATION, SCALE_REFERENCE_WIDTH, pressScaleFor, HIGHLIGHT_OPACITY, HIGHLIGHT_DURATION, RIPPLE_OPACITY, RIPPLE_START_SCALE, RIPPLE_EXPAND_DURATION, RIPPLE_CONFIRM_DURATION, RIPPLE_FADE_IN, RIPPLE_FADE_OUT_DELAY, RIPPLE_FADE_OUT, rippleRadiusFor, resolveAnimation, resolveSlotAnimation, FEEDBACK_OVERLAY, markOverlay, PressableFeedback3 as PressableFeedback, createRecipe };
@@ -1,4 +1,8 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/system/portal/portal.tsx
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+ var _chunkGRXC6J5Mcjs = require('./chunk-GRXC6J5M.cjs');
4
+
5
+ // src/system/portal/portal.tsx
2
6
  var _react = require('react');
3
7
 
4
8
  // src/system/portal/portal-context.ts
@@ -26,7 +30,8 @@ var _jsxruntime = require('react/jsx-runtime');
26
30
  var styles = _reactnative.StyleSheet.create({
27
31
  container: { flex: 1 }
28
32
  });
29
- function PortalHost({ children }) {
33
+ function PortalHost({ children, ...props }) {
34
+ const [styleProps] = _chunkGRXC6J5Mcjs.useStyleProps.call(void 0, props);
30
35
  const [portals, setPortals] = _react.useState.call(void 0, /* @__PURE__ */ new Map());
31
36
  const addPortal = _react.useCallback.call(void 0, (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__ */ _jsxruntime.jsx.call(void 0, PortalContext.Provider, { value: methods, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles.container, children: [
51
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PortalContext.Provider, { value: methods, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: [styles.container, styleProps], children: [
47
52
  children,
48
53
  Array.from(portals, ([key, element]) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Fragment, { children: element }, key))
49
54
  ] }) });