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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/{chunk-PUER6Y4M.cjs → chunk-2UICXD3Q.cjs} +75 -381
  2. package/dist/chunk-4K3LZS7M.js +448 -0
  3. package/dist/chunk-5SU7FXWH.cjs +448 -0
  4. package/dist/chunk-6PZF4PI7.js +100 -0
  5. package/dist/chunk-6VTBGBPP.cjs +100 -0
  6. package/dist/{chunk-E3756MJC.js → chunk-ASXK7XU4.js} +16 -15
  7. package/dist/{chunk-DDYMIWLW.cjs → chunk-BHAHJHAI.cjs} +9 -5
  8. package/dist/{chunk-64L44HEI.js → chunk-F432IDIW.js} +89 -389
  9. package/dist/{chunk-NLFE3CRM.cjs → chunk-IZYRU7S2.cjs} +24 -23
  10. package/dist/{chunk-UOJBK5Z4.js → chunk-L3AQNVRN.js} +1 -1
  11. package/dist/{chunk-BAACHVM4.cjs → chunk-M2VYRHVS.cjs} +2 -2
  12. package/dist/{chunk-4O3PXFQ7.js → chunk-XQE5PXOD.js} +9 -5
  13. package/dist/components/button/index.cjs +4 -3
  14. package/dist/components/button/index.d.cts +3 -2
  15. package/dist/components/button/index.d.ts +3 -2
  16. package/dist/components/button/index.js +3 -2
  17. package/dist/components/typography/index.cjs +12 -0
  18. package/dist/components/typography/index.d.cts +115 -0
  19. package/dist/components/typography/index.d.ts +115 -0
  20. package/dist/components/typography/index.js +12 -0
  21. package/dist/create-recipe-3_ElpCYt.d.cts +117 -0
  22. package/dist/create-recipe-DImq1AZA.d.ts +117 -0
  23. package/dist/index.cjs +17 -7
  24. package/dist/index.d.cts +4 -2
  25. package/dist/index.d.ts +4 -2
  26. package/dist/index.js +21 -11
  27. package/dist/{create-recipe-DD9W6m9b.d.ts → pressable-feedback.type-C9kjAuVQ.d.cts} +3 -116
  28. package/dist/{create-recipe-BcUu9b2I.d.cts → pressable-feedback.type-KcPvFf6f.d.ts} +3 -116
  29. package/dist/system/index.cjs +5 -3
  30. package/dist/system/index.d.cts +5 -3
  31. package/dist/system/index.d.ts +5 -3
  32. package/dist/system/index.js +11 -9
  33. package/dist/theme/index.cjs +2 -2
  34. package/dist/theme/index.d.cts +6 -6
  35. package/dist/theme/index.d.ts +6 -6
  36. package/dist/theme/index.js +1 -1
  37. package/dist/{theme.type-C9bFJKFm.d.cts → theme.type-C2gNHpEx.d.cts} +1 -1
  38. package/dist/{theme.type-C9bFJKFm.d.ts → theme.type-C2gNHpEx.d.ts} +1 -1
  39. package/package.json +11 -1
@@ -36,52 +36,11 @@ function _optionalChain(ops) {
36
36
  }
37
37
  return value;
38
38
  }
39
+ var _chunk5SU7FXWHcjs = require('./chunk-5SU7FXWH.cjs');
39
40
  var _chunk6N5JXRUZcjs = require('./chunk-6N5JXRUZ.cjs');
40
41
 
41
- // src/system/style-props/use-style-props.ts
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
42
  // src/system/icon/icon-context.ts
84
-
43
+ var _react = require('react');
85
44
  var IconContext = _react.createContext.call(void 0, {});
86
45
  IconContext.displayName = "XAUI.Icon.Context";
87
46
  function useIconContext() {
@@ -103,7 +62,7 @@ function Icon({
103
62
  }) {
104
63
  const inherited = useIconContext();
105
64
  const theme = _chunk6N5JXRUZcjs.useXAUITheme.call(void 0);
106
- const [styleProps] = useStyleProps(props);
65
+ const [styleProps] = _chunk5SU7FXWHcjs.useStyleProps.call(void 0, props);
107
66
  const resolvedSize = _nullishCoalesce(_nullishCoalesce(size, () => inherited.size), () => theme.fontSizes.md);
108
67
  const resolvedColor = _nullishCoalesce(_nullishCoalesce(color, () => inherited.color), () => theme.colors.foreground);
109
68
  if (Component) {
@@ -133,132 +92,22 @@ function Icon({
133
92
  }
134
93
  Icon.displayName = "XAUI.Icon";
135
94
 
136
- // src/system/slot/children-to-string.ts
137
-
138
- function childrenToString(children) {
139
- const text = stringify(children);
140
- return text === null || text === "" ? null : text;
141
- }
142
- function stringify(node) {
143
- if (node === null || node === void 0 || typeof node === "boolean") return "";
144
- if (typeof node === "string") return node;
145
- if (typeof node === "number") return String(node);
146
- if (_react.isValidElement.call(void 0, node)) return null;
147
- if (Array.isArray(node)) {
148
- let text = "";
149
- for (const child of node) {
150
- const part = stringify(child);
151
- if (part === null) return null;
152
- text += part;
153
- }
154
- return text;
155
- }
156
- return null;
157
- }
158
-
159
- // src/system/slot/create-slot-context.ts
160
-
161
- function createSlotContext(name) {
162
- const Context = _react.createContext.call(void 0, null);
163
- Context.displayName = `XAUI.${name}.Context`;
164
- function useSlotContext() {
165
- const value = _react.useContext.call(void 0, Context);
166
- if (value === null) {
167
- const error = new Error(`XAUI: use${name} must be called inside <${name}>. A slot reads the values its root resolved, so it can only be rendered as a child of one.`);
168
- _optionalChain([Error, 'access', _ => _.captureStackTrace, 'optionalCall', _2 => _2(error, useSlotContext)]);
169
- throw error;
170
- }
171
- return value;
172
- }
173
- return [Context.Provider, useSlotContext];
174
- }
175
-
176
- // src/system/slot/merge-refs.ts
177
- function mergeRefs(...refs) {
178
- return value => {
179
- for (const ref of refs) {
180
- if (typeof ref === "function") ref(value);else if (ref) ref.current = value;
181
- }
182
- };
183
- }
184
-
185
- // src/system/slot/merge-props.ts
186
- var EVENT_HANDLER = /^on[A-Z]/;
187
- function mergeProps(ours, theirs) {
188
- const merged = {
189
- ...ours
190
- };
191
- for (const key of Object.keys(theirs)) {
192
- const ourValue = ours[key];
193
- const theirValue = theirs[key];
194
- if (EVENT_HANDLER.test(key)) {
195
- merged[key] = composeHandlers(ourValue, theirValue);
196
- } else if (key === "style") {
197
- merged[key] = mergeStyles(ourValue, theirValue);
198
- } else if (key === "ref") {
199
- merged[key] = mergeRefs(ourValue, theirValue);
200
- } else {
201
- merged[key] = theirValue;
202
- }
203
- }
204
- return merged;
205
- }
206
- function composeHandlers(ours, theirs) {
207
- if (typeof ours !== "function") return theirs;
208
- if (typeof theirs !== "function") return ours;
209
- return (...args) => {
210
- ;
211
- ours(...args);
212
- return theirs(...args);
213
- };
214
- }
215
- function mergeStyles(ours, theirs) {
216
- if (typeof ours === "function" || typeof theirs === "function") {
217
- return state => [resolveStyle(ours, state), resolveStyle(theirs, state)];
218
- }
219
- return [ours, theirs];
220
- }
221
- function resolveStyle(style, state) {
222
- return typeof style === "function" ? style(state) : style;
223
- }
224
-
225
- // src/system/slot/slot.tsx
226
-
227
- var Slot = _react.forwardRef.call(void 0, function Slot2({
228
- children,
229
- ...ours
230
- }, ref) {
231
- if (!_react.isValidElement.call(void 0, children)) {
232
- throw new Error("XAUI: asChild expects exactly one React element as its child, and merges the component's props into it. Text, a fragment, several children or none give it nothing to merge into \u2014 drop `asChild` to render the component itself.");
233
- }
234
- const child = children;
235
- const merged = mergeProps(ours, child.props);
236
- merged.ref = mergeRefs(ref, refOf(child));
237
- return _react.cloneElement.call(void 0, child, merged);
238
- });
239
- Slot.displayName = "XAUI.Slot";
240
- function refOf(element) {
241
- const fromProps = element.props.ref;
242
- const fromElement = element.ref;
243
- return _nullishCoalesce(fromProps, () => fromElement);
244
- }
245
-
246
95
  // src/system/pressable-feedback/pressable-feedback-context.ts
247
96
 
248
- var [FeedbackProvider, useFeedback] = createSlotContext("PressableFeedback");
97
+ var [FeedbackProvider, useFeedback] = _chunk5SU7FXWHcjs.createSlotContext.call(void 0, "PressableFeedback");
249
98
  var DisableAllContext = _react.createContext.call(void 0, false);
250
99
 
251
100
  // src/system/pressable-feedback/pressable-feedback.animation.ts
252
101
  var PRESS_SCALE = 0.985;
253
102
  var PRESS_DURATION = 300;
254
103
  var SCALE_REFERENCE_WIDTH = 300;
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\":[]}"
104
+ const _worklet_12714309096160_init_data = {
105
+ code: "function pressScaleFor_chunk2UICXD3QCjs1(width){const{SCALE_REFERENCE_WIDTH,PRESS_SCALE}=this.__closure;const coefficient=width>0?SCALE_REFERENCE_WIDTH/width:1;return 1-(1-PRESS_SCALE)*coefficient;}",
106
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-2UICXD3Q.cjs",
107
+ sourceMap: "{\"version\":3,\"names\":[\"pressScaleFor_chunk2UICXD3QCjs1\",\"width\",\"SCALE_REFERENCE_WIDTH\",\"PRESS_SCALE\",\"__closure\",\"coefficient\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-2UICXD3Q.cjs\"],\"mappings\":\"AA2EA,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\":[]}"
259
108
  };
260
- const pressScaleFor = function pressScaleFor_chunkPUER6Y4MCjs1Factory({
261
- _worklet_3638762147639_init_data,
109
+ const pressScaleFor = function pressScaleFor_chunk2UICXD3QCjs1Factory({
110
+ _worklet_12714309096160_init_data,
262
111
  SCALE_REFERENCE_WIDTH,
263
112
  PRESS_SCALE
264
113
  }) {
@@ -271,13 +120,13 @@ const pressScaleFor = function pressScaleFor_chunkPUER6Y4MCjs1Factory({
271
120
  SCALE_REFERENCE_WIDTH,
272
121
  PRESS_SCALE
273
122
  };
274
- pressScaleFor.__workletHash = 3638762147639;
123
+ pressScaleFor.__workletHash = 12714309096160;
275
124
  pressScaleFor.__pluginVersion = "0.7.4";
276
- pressScaleFor.__initData = _worklet_3638762147639_init_data;
125
+ pressScaleFor.__initData = _worklet_12714309096160_init_data;
277
126
  pressScaleFor.__stackDetails = _e;
278
127
  return pressScaleFor;
279
128
  }({
280
- _worklet_3638762147639_init_data,
129
+ _worklet_12714309096160_init_data,
281
130
  SCALE_REFERENCE_WIDTH,
282
131
  PRESS_SCALE
283
132
  });
@@ -290,26 +139,26 @@ var RIPPLE_CONFIRM_DURATION = 225;
290
139
  var RIPPLE_FADE_IN = 75;
291
140
  var RIPPLE_FADE_OUT_DELAY = 225;
292
141
  var RIPPLE_FADE_OUT = 150;
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\":[]}"
142
+ const _worklet_1716125229339_init_data = {
143
+ code: "function rippleRadiusFor_chunk2UICXD3QCjs2(width,height){return Math.sqrt(width*width+height*height)/2+5;}",
144
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-2UICXD3Q.cjs",
145
+ sourceMap: "{\"version\":3,\"names\":[\"rippleRadiusFor_chunk2UICXD3QCjs2\",\"width\",\"height\",\"Math\",\"sqrt\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-2UICXD3Q.cjs\"],\"mappings\":\"AAyFA,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\":[]}"
297
146
  };
298
- const rippleRadiusFor = function rippleRadiusFor_chunkPUER6Y4MCjs2Factory({
299
- _worklet_15335127470860_init_data
147
+ const rippleRadiusFor = function rippleRadiusFor_chunk2UICXD3QCjs2Factory({
148
+ _worklet_1716125229339_init_data
300
149
  }) {
301
150
  const _e = [new global.Error(), 1, -27];
302
151
  const rippleRadiusFor = function (width, height) {
303
152
  return Math.sqrt(width * width + height * height) / 2 + 5;
304
153
  };
305
154
  rippleRadiusFor.__closure = {};
306
- rippleRadiusFor.__workletHash = 15335127470860;
155
+ rippleRadiusFor.__workletHash = 1716125229339;
307
156
  rippleRadiusFor.__pluginVersion = "0.7.4";
308
- rippleRadiusFor.__initData = _worklet_15335127470860_init_data;
157
+ rippleRadiusFor.__initData = _worklet_1716125229339_init_data;
309
158
  rippleRadiusFor.__stackDetails = _e;
310
159
  return rippleRadiusFor;
311
160
  }({
312
- _worklet_15335127470860_init_data
161
+ _worklet_1716125229339_init_data
313
162
  });
314
163
  var ALL_OFF = {
315
164
  scale: false,
@@ -435,7 +284,7 @@ function radiusFrom(style) {
435
284
  // src/system/pressable-feedback/pressable-feedback.tsx
436
285
 
437
286
  var AnimatedPressable = _reactnativereanimated2.default.createAnimatedComponent(_reactnative.Pressable);
438
- var AnimatedSlot = _reactnativereanimated2.default.createAnimatedComponent(Slot);
287
+ var AnimatedSlot = _reactnativereanimated2.default.createAnimatedComponent(_chunk5SU7FXWHcjs.Slot);
439
288
  var PressableFeedback = _react.forwardRef.call(void 0, function PressableFeedback2({
440
289
  animation,
441
290
  style,
@@ -443,7 +292,7 @@ var PressableFeedback = _react.forwardRef.call(void 0, function PressableFeedbac
443
292
  }, ref) {
444
293
  const inheritedDisableAll = _react.useContext.call(void 0, DisableAllContext);
445
294
  const resolved = resolveAnimation(animation, inheritedDisableAll);
446
- const [styleProps, rest] = useStyleProps(props);
295
+ const [styleProps, rest] = _chunk5SU7FXWHcjs.useStyleProps.call(void 0, props);
447
296
  const Feedback = resolved.none ? StaticFeedback : AnimatedFeedback;
448
297
  const body = /* @__PURE__ */_jsxruntime.jsx.call(void 0, Feedback, {
449
298
  ref,
@@ -471,7 +320,7 @@ var StaticFeedback = _react.forwardRef.call(void 0, function StaticFeedback2({
471
320
  animation,
472
321
  ...surface
473
322
  }), [isPressed, animation, surface]);
474
- const Root = asChild ? Slot : _reactnative.Pressable;
323
+ const Root = asChild ? _chunk5SU7FXWHcjs.Slot : _reactnative.Pressable;
475
324
  return /* @__PURE__ */_jsxruntime.jsx.call(void 0, FeedbackProvider, {
476
325
  value: context,
477
326
  children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, Root, {
@@ -483,10 +332,10 @@ var StaticFeedback = _react.forwardRef.call(void 0, function StaticFeedback2({
483
332
  })
484
333
  });
485
334
  });
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\":[]}"
335
+ const _worklet_16183698449401_init_data = {
336
+ code: "function chunk2UICXD3QCjs3(){const{animation,pressedScale,progress}=this.__closure;if(!animation.scale)return{};return{transform:[{scale:1-(1-pressedScale.value)*progress.value}]};}",
337
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-2UICXD3Q.cjs",
338
+ sourceMap: "{\"version\":3,\"names\":[\"chunk2UICXD3QCjs3\",\"animation\",\"pressedScale\",\"progress\",\"__closure\",\"scale\",\"transform\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-2UICXD3Q.cjs\"],\"mappings\":\"AAwQ6E,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\":[]}"
490
339
  };
491
340
  var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2({
492
341
  isPressed = false,
@@ -515,14 +364,14 @@ var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2
515
364
  });
516
365
  }, [isPressed, progress]);
517
366
  const pressedScale = _reactnativereanimated.useDerivedValue.call(void 0, () => pressScaleFor(size.value.width));
518
- const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkPUER6Y4MCjs3Factory({
519
- _worklet_14386231340974_init_data,
367
+ const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunk2UICXD3QCjs3Factory({
368
+ _worklet_16183698449401_init_data,
520
369
  animation,
521
370
  pressedScale,
522
371
  progress
523
372
  }) {
524
373
  const _e = [new global.Error(), -4, -27];
525
- const chunkPUER6Y4MCjs3 = function () {
374
+ const chunk2UICXD3QCjs3 = function () {
526
375
  if (!animation.scale) return {};
527
376
  return {
528
377
  transform: [{
@@ -530,18 +379,18 @@ var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2
530
379
  }]
531
380
  };
532
381
  };
533
- chunkPUER6Y4MCjs3.__closure = {
382
+ chunk2UICXD3QCjs3.__closure = {
534
383
  animation,
535
384
  pressedScale,
536
385
  progress
537
386
  };
538
- chunkPUER6Y4MCjs3.__workletHash = 14386231340974;
539
- chunkPUER6Y4MCjs3.__pluginVersion = "0.7.4";
540
- chunkPUER6Y4MCjs3.__initData = _worklet_14386231340974_init_data;
541
- chunkPUER6Y4MCjs3.__stackDetails = _e;
542
- return chunkPUER6Y4MCjs3;
387
+ chunk2UICXD3QCjs3.__workletHash = 16183698449401;
388
+ chunk2UICXD3QCjs3.__pluginVersion = "0.7.4";
389
+ chunk2UICXD3QCjs3.__initData = _worklet_16183698449401_init_data;
390
+ chunk2UICXD3QCjs3.__stackDetails = _e;
391
+ return chunk2UICXD3QCjs3;
543
392
  }({
544
- _worklet_14386231340974_init_data,
393
+ _worklet_16183698449401_init_data,
545
394
  animation,
546
395
  pressedScale,
547
396
  progress
@@ -574,7 +423,7 @@ var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2
574
423
  wave.alpha.value = _reactnativereanimated.withTiming.call(void 0, 1, {
575
424
  duration: RIPPLE_FADE_IN
576
425
  });
577
- _optionalChain([onTouchStart, 'optionalCall', _3 => _3(event)]);
426
+ _optionalChain([onTouchStart, 'optionalCall', _ => _(event)]);
578
427
  };
579
428
  const releaseWave = () => {
580
429
  const wave = waves[nextWave.current === 0 ? 1 : 0];
@@ -588,11 +437,11 @@ var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2
588
437
  };
589
438
  const handleTouchEnd = event => {
590
439
  releaseWave();
591
- _optionalChain([onTouchEnd, 'optionalCall', _4 => _4(event)]);
440
+ _optionalChain([onTouchEnd, 'optionalCall', _2 => _2(event)]);
592
441
  };
593
442
  const handleTouchCancel = event => {
594
443
  releaseWave();
595
- _optionalChain([onTouchCancel, 'optionalCall', _5 => _5(event)]);
444
+ _optionalChain([onTouchCancel, 'optionalCall', _3 => _3(event)]);
596
445
  };
597
446
  const handleLayout = event => {
598
447
  const {
@@ -603,7 +452,7 @@ var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2
603
452
  width,
604
453
  height
605
454
  };
606
- _optionalChain([onLayout, 'optionalCall', _6 => _6(event)]);
455
+ _optionalChain([onLayout, 'optionalCall', _4 => _4(event)]);
607
456
  };
608
457
  const Root = asChild ? AnimatedSlot : AnimatedPressable;
609
458
  return /* @__PURE__ */_jsxruntime.jsx.call(void 0, FeedbackProvider, {
@@ -637,7 +486,7 @@ function useSurface(style) {
637
486
  return _react.useMemo.call(void 0, () => {
638
487
  const flat = _reactnative.StyleSheet.flatten(style);
639
488
  return {
640
- ink: inkFor(_optionalChain([flat, 'optionalAccess', _7 => _7.backgroundColor]), theme.colors),
489
+ ink: inkFor(_optionalChain([flat, 'optionalAccess', _5 => _5.backgroundColor]), theme.colors),
641
490
  corners: radiusFrom(flat)
642
491
  };
643
492
  }, [style, theme]);
@@ -658,7 +507,7 @@ function PressableFeedbackHighlight({
658
507
  ink,
659
508
  corners
660
509
  } = useFeedback();
661
- const [styleProps] = useStyleProps(props);
510
+ const [styleProps] = _chunk5SU7FXWHcjs.useStyleProps.call(void 0, props);
662
511
  const settings = resolveSlotAnimation(override, animation.highlight, HIGHLIGHT_OPACITY, HIGHLIGHT_DURATION);
663
512
  const base = [_reactnative.StyleSheet.absoluteFillObject, {
664
513
  backgroundColor: ink,
@@ -683,10 +532,10 @@ function PressableFeedbackHighlight({
683
532
  }
684
533
  PressableFeedbackHighlight.displayName = "XAUI.PressableFeedback.Highlight";
685
534
  markOverlay(PressableFeedbackHighlight);
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\":[]}"
535
+ const _worklet_122095293967_init_data = {
536
+ code: "function chunk2UICXD3QCjs4(){const{shown,opacity}=this.__closure;return{opacity:shown.value*opacity};}",
537
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-2UICXD3Q.cjs",
538
+ sourceMap: "{\"version\":3,\"names\":[\"chunk2UICXD3QCjs4\",\"shown\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-2UICXD3Q.cjs\"],\"mappings\":\"AAsZ6E,SAAAA,iBAAMA,CAAA,QAAAC,KAAA,CAAAC,OAAA,OAAAC,SAAA,CAE/E,MAAO,CAAED,OAAO,CAAED,KAAK,CAACG,KAAK,CAAGF,OAAQ,CAAC,CAC3C\",\"ignoreList\":[]}"
690
539
  };
691
540
  function AnimatedHighlight({
692
541
  base,
@@ -702,28 +551,28 @@ function AnimatedHighlight({
702
551
  duration
703
552
  });
704
553
  }, [isPressed, shown, duration]);
705
- const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkPUER6Y4MCjs4Factory({
706
- _worklet_9533806899672_init_data,
554
+ const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunk2UICXD3QCjs4Factory({
555
+ _worklet_122095293967_init_data,
707
556
  shown,
708
557
  opacity
709
558
  }) {
710
559
  const _e = [new global.Error(), -3, -27];
711
- const chunkPUER6Y4MCjs4 = function () {
560
+ const chunk2UICXD3QCjs4 = function () {
712
561
  return {
713
562
  opacity: shown.value * opacity
714
563
  };
715
564
  };
716
- chunkPUER6Y4MCjs4.__closure = {
565
+ chunk2UICXD3QCjs4.__closure = {
717
566
  shown,
718
567
  opacity
719
568
  };
720
- chunkPUER6Y4MCjs4.__workletHash = 9533806899672;
721
- chunkPUER6Y4MCjs4.__pluginVersion = "0.7.4";
722
- chunkPUER6Y4MCjs4.__initData = _worklet_9533806899672_init_data;
723
- chunkPUER6Y4MCjs4.__stackDetails = _e;
724
- return chunkPUER6Y4MCjs4;
569
+ chunk2UICXD3QCjs4.__workletHash = 122095293967;
570
+ chunk2UICXD3QCjs4.__pluginVersion = "0.7.4";
571
+ chunk2UICXD3QCjs4.__initData = _worklet_122095293967_init_data;
572
+ chunk2UICXD3QCjs4.__stackDetails = _e;
573
+ return chunk2UICXD3QCjs4;
725
574
  }({
726
- _worklet_9533806899672_init_data,
575
+ _worklet_122095293967_init_data,
727
576
  shown,
728
577
  opacity
729
578
  }), [shown, opacity]);
@@ -746,7 +595,7 @@ function PressableFeedbackRipple({
746
595
  ink,
747
596
  corners
748
597
  } = useFeedback();
749
- const [styleProps] = useStyleProps(props);
598
+ const [styleProps] = _chunk5SU7FXWHcjs.useStyleProps.call(void 0, props);
750
599
  const waveStyle = [styleProps, style];
751
600
  const settings = resolveSlotAnimation(override, animation.ripple, RIPPLE_OPACITY);
752
601
  const [size, setSize] = _react.useState.call(void 0, {
@@ -787,10 +636,10 @@ function PressableFeedbackRipple({
787
636
  }
788
637
  PressableFeedbackRipple.displayName = "XAUI.PressableFeedback.Ripple";
789
638
  markOverlay(PressableFeedbackRipple);
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\":[]}"
639
+ const _worklet_11605290139298_init_data = {
640
+ code: "function chunk2UICXD3QCjs5(){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}]};}",
641
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-2UICXD3Q.cjs",
642
+ sourceMap: "{\"version\":3,\"names\":[\"chunk2UICXD3QCjs5\",\"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-2UICXD3Q.cjs\"],\"mappings\":\"AAsd6E,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\":[]}"
794
643
  };
795
644
  function RippleWave({
796
645
  wave,
@@ -800,8 +649,8 @@ function RippleWave({
800
649
  opacity,
801
650
  style
802
651
  }) {
803
- const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkPUER6Y4MCjs5Factory({
804
- _worklet_2787827463541_init_data,
652
+ const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunk2UICXD3QCjs5Factory({
653
+ _worklet_11605290139298_init_data,
805
654
  wave,
806
655
  RIPPLE_START_SCALE,
807
656
  center,
@@ -809,7 +658,7 @@ function RippleWave({
809
658
  radius
810
659
  }) {
811
660
  const _e = [new global.Error(), -6, -27];
812
- const chunkPUER6Y4MCjs5 = function () {
661
+ const chunk2UICXD3QCjs5 = function () {
813
662
  const t = wave.expand.value;
814
663
  const from = wave.origin.value;
815
664
  const scale = RIPPLE_START_SCALE + (1 - RIPPLE_START_SCALE) * t;
@@ -827,20 +676,20 @@ function RippleWave({
827
676
  }]
828
677
  };
829
678
  };
830
- chunkPUER6Y4MCjs5.__closure = {
679
+ chunk2UICXD3QCjs5.__closure = {
831
680
  wave,
832
681
  RIPPLE_START_SCALE,
833
682
  center,
834
683
  opacity,
835
684
  radius
836
685
  };
837
- chunkPUER6Y4MCjs5.__workletHash = 2787827463541;
838
- chunkPUER6Y4MCjs5.__pluginVersion = "0.7.4";
839
- chunkPUER6Y4MCjs5.__initData = _worklet_2787827463541_init_data;
840
- chunkPUER6Y4MCjs5.__stackDetails = _e;
841
- return chunkPUER6Y4MCjs5;
686
+ chunk2UICXD3QCjs5.__workletHash = 11605290139298;
687
+ chunk2UICXD3QCjs5.__pluginVersion = "0.7.4";
688
+ chunk2UICXD3QCjs5.__initData = _worklet_11605290139298_init_data;
689
+ chunk2UICXD3QCjs5.__stackDetails = _e;
690
+ return chunk2UICXD3QCjs5;
842
691
  }({
843
- _worklet_2787827463541_init_data,
692
+ _worklet_11605290139298_init_data,
844
693
  wave,
845
694
  RIPPLE_START_SCALE,
846
695
  center,
@@ -876,163 +725,9 @@ var PressableFeedback3 = Object.assign(PressableFeedback, {
876
725
  Highlight: PressableFeedbackHighlight,
877
726
  Ripple: PressableFeedbackRipple
878
727
  });
879
-
880
- // src/system/recipe/resolve-tint.ts
881
- var TINT_SLICE_BY_SUFFIX = [[/SoftForeground$/, "softForeground"], [/SoftPressed$/, "softPressed"], [/Soft$/, "soft"], [/Foreground$/, "foreground"], [/Pressed$/, "pressed"]];
882
- function tintSliceFor(token) {
883
- for (const [suffix, slice] of TINT_SLICE_BY_SUFFIX) {
884
- if (suffix.test(token)) return slice;
885
- }
886
- return "base";
887
- }
888
- function resolveTint(tokens, color, theme) {
889
- const tint = _chunk6N5JXRUZcjs.deriveTint.call(void 0, color, theme);
890
- const colors = {};
891
- for (const [role, token] of Object.entries(_nullishCoalesce(tokens, () => ({})))) {
892
- colors[role] = tint[tintSliceFor(token)];
893
- }
894
- return colors;
895
- }
896
-
897
- // src/system/recipe/style-cache.ts
898
-
899
- // src/system/recipe/variant-map.ts
900
- var STATE_ORDER = ["focused", "pressed", "disabled"];
901
- function resolveSelection(defaultVariants, selection) {
902
- const resolved = {
903
- ...defaultVariants
904
- };
905
- for (const [axis, value] of Object.entries(_nullishCoalesce(selection, () => ({})))) {
906
- if (value !== void 0) resolved[axis] = value;
907
- }
908
- return resolved;
909
- }
910
- function resolveVariantColors(tokens, theme) {
911
- const colors = {};
912
- for (const [role, token] of entriesOf(tokens)) {
913
- const value = theme.colors[token];
914
- if (value === void 0) {
915
- throw new Error(`XAUI: the recipe names "${token}" for its "${role}" role, but the theme has no such colour token. Check the spelling against XAUIColors.`);
916
- }
917
- colors[role] = value;
918
- }
919
- return colors;
920
- }
921
- function activeStateFns(states, active) {
922
- const fns = [];
923
- for (const state of STATE_ORDER) {
924
- const fn = active[state] ? _optionalChain([states, 'optionalAccess', _8 => _8[state]]) : void 0;
925
- if (fn) fns.push(fn);
926
- }
927
- return fns;
928
- }
929
- function collectStyleFns(config, selection, states) {
930
- const fns = [];
931
- if (config.base) fns.push(config.base);
932
- if (config.paint) fns.push(config.paint);
933
- for (const [axis, values] of Object.entries(_nullishCoalesce(config.variants, () => ({})))) {
934
- const value = selection[axis];
935
- const fn = value === void 0 ? void 0 : values[value];
936
- if (fn) fns.push(fn);
937
- }
938
- for (const compound of _nullishCoalesce(config.compoundVariants, () => [])) {
939
- if (appliesTo(compound.when, selection)) fns.push(compound.style);
940
- }
941
- return [...fns, ...activeStateFns(config.states, states)];
942
- }
943
- function appliesTo(when, selection) {
944
- return Object.entries(when).every(([axis, value]) => selection[axis] === value);
945
- }
946
- function entriesOf(tokens) {
947
- return Object.entries(_nullishCoalesce(tokens, () => ({})));
948
- }
949
-
950
- // src/system/recipe/style-cache.ts
951
- function createStyleCache(slots) {
952
- const entries = /* @__PURE__ */new Map();
953
- return {
954
- read(key, build) {
955
- const hit = entries.get(key);
956
- if (hit) return hit;
957
- const built = build();
958
- const complete = {};
959
- for (const slot of slots) complete[slot] = _nullishCoalesce(built[slot], () => ({}));
960
- const created = _reactnative.StyleSheet.create(complete);
961
- entries.set(key, created);
962
- return created;
963
- },
964
- get size() {
965
- return entries.size;
966
- },
967
- clear() {
968
- entries.clear();
969
- }
970
- };
971
- }
972
- function cacheKey(theme, selection, states) {
973
- const axes = Object.keys(selection).sort().map(axis => `${axis}:${_nullishCoalesce(selection[axis], () => "-")}`).join("|");
974
- const active = STATE_ORDER.filter(state => states[state]).join(",");
975
- return `${theme.id}|${theme.mode}|${axes}|${active}`;
976
- }
977
-
978
- // src/system/recipe/create-recipe.ts
979
- function createRecipe(config) {
980
- const cache = createStyleCache(config.slots);
981
- const tokensFor = variant => variant === void 0 ? void 0 : _optionalChain([config, 'access', _9 => _9.variantTokens, 'optionalAccess', _10 => _10[variant]]);
982
- return {
983
- slots: config.slots,
984
- resolve({
985
- theme,
986
- selection,
987
- states = {}
988
- }) {
989
- const resolved = resolveSelection(config.defaultVariants, selection);
990
- return cache.read(cacheKey(theme, resolved, states), () => {
991
- const colors = resolveVariantColors(tokensFor(resolved.variant), theme);
992
- return apply(collectStyleFns(config, resolved, states), theme, colors);
993
- });
994
- },
995
- tint({
996
- theme,
997
- color,
998
- selection,
999
- states = {}
1000
- }) {
1001
- if (!config.paint) return {};
1002
- const resolved = resolveSelection(config.defaultVariants, selection);
1003
- const tokens = tokensFor(resolved.variant);
1004
- if (!tokens) return {};
1005
- const colors = resolveTint(tokens, color, theme);
1006
- const fns = [config.paint, ...activeStateFns(config.states, states)];
1007
- return apply(fns, theme, colors);
1008
- }
1009
- };
1010
- }
1011
- function apply(fns, theme, colors) {
1012
- const merged = {};
1013
- for (const fn of fns) {
1014
- const produced = fn(theme, colors);
1015
- for (const slot of Object.keys(produced)) {
1016
- const style = produced[slot];
1017
- if (!style) continue;
1018
- const previous = merged[slot];
1019
- merged[slot] = previous ? {
1020
- ...previous,
1021
- ...style
1022
- } : style;
1023
- }
1024
- }
1025
- return merged;
1026
- }
1027
- exports.useStyleProps = useStyleProps;
1028
728
  exports.IconContext = IconContext;
1029
729
  exports.useIconContext = useIconContext;
1030
730
  exports.Icon = Icon;
1031
- exports.childrenToString = childrenToString;
1032
- exports.createSlotContext = createSlotContext;
1033
- exports.mergeRefs = mergeRefs;
1034
- exports.mergeProps = mergeProps;
1035
- exports.Slot = Slot;
1036
731
  exports.useFeedback = useFeedback;
1037
732
  exports.PRESS_SCALE = PRESS_SCALE;
1038
733
  exports.PRESS_DURATION = PRESS_DURATION;
@@ -1052,5 +747,4 @@ exports.resolveAnimation = resolveAnimation;
1052
747
  exports.resolveSlotAnimation = resolveSlotAnimation;
1053
748
  exports.FEEDBACK_OVERLAY = FEEDBACK_OVERLAY;
1054
749
  exports.markOverlay = markOverlay;
1055
- exports.PressableFeedback = PressableFeedback3;
1056
- exports.createRecipe = createRecipe;
750
+ exports.PressableFeedback = PressableFeedback3;