@xaui/native 0.9.1-alpha.7 → 0.9.1-alpha.9

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.
@@ -3,10 +3,6 @@ import {
3
3
  useXAUITheme
4
4
  } from "./chunk-X2K2FX3W.js";
5
5
 
6
- // src/system/icon/icon.tsx
7
- import { cloneElement, isValidElement } from "react";
8
- import { Image } from "react-native";
9
-
10
6
  // src/system/icon/icon-context.ts
11
7
  import { createContext, useContext } from "react";
12
8
  var IconContext = createContext({});
@@ -16,6 +12,9 @@ function useIconContext() {
16
12
  }
17
13
 
18
14
  // src/system/icon/icon.tsx
15
+ import { cloneElement, isValidElement } from "react";
16
+ import { Image } from "react-native";
17
+ import { jsx } from "react/jsx-runtime";
19
18
  function Icon({
20
19
  as: Component,
21
20
  children,
@@ -29,7 +28,7 @@ function Icon({
29
28
  const resolvedSize = size ?? inherited.size ?? theme.fontSizes.md;
30
29
  const resolvedColor = color ?? inherited.color ?? theme.colors.foreground;
31
30
  if (Component) {
32
- return /* @__PURE__ */ React.createElement(Component, { size: resolvedSize, color: resolvedColor });
31
+ return /* @__PURE__ */ jsx(Component, { size: resolvedSize, color: resolvedColor });
33
32
  }
34
33
  if (isValidElement(children)) {
35
34
  return cloneElement(children, {
@@ -39,7 +38,7 @@ function Icon({
39
38
  });
40
39
  }
41
40
  if (source) {
42
- return /* @__PURE__ */ React.createElement(
41
+ return /* @__PURE__ */ jsx(
43
42
  Image,
44
43
  {
45
44
  source,
@@ -56,73 +55,36 @@ function Icon({
56
55
  }
57
56
  Icon.displayName = "XAUI.Icon";
58
57
 
59
- // src/system/portal/portal.tsx
60
- import { useContext as useContext2, useId, useLayoutEffect } from "react";
61
-
62
- // src/system/portal/portal-context.ts
63
- import { createContext as createContext2 } from "react";
64
- var PortalContext = createContext2(null);
65
-
66
- // src/system/portal/portal.tsx
67
- function Portal({ children }) {
68
- const context = useContext2(PortalContext);
69
- const key = useId();
70
- useLayoutEffect(() => {
71
- context?.addPortal(key, children);
72
- }, [children, context, key]);
73
- useLayoutEffect(() => {
74
- return () => context?.removePortal(key);
75
- }, [context, key]);
76
- return null;
58
+ // src/system/slot/children-to-string.ts
59
+ import { isValidElement as isValidElement2 } from "react";
60
+ function childrenToString(children) {
61
+ const text = stringify(children);
62
+ return text === null || text === "" ? null : text;
77
63
  }
78
- Portal.displayName = "XAUI.Portal";
79
-
80
- // src/system/portal/portal-host.tsx
81
- import { Fragment, useCallback, useMemo, useState } from "react";
82
- import { StyleSheet, View } from "react-native";
83
- var styles = StyleSheet.create({
84
- container: { flex: 1 }
85
- });
86
- function PortalHost({ children }) {
87
- const [portals, setPortals] = useState(/* @__PURE__ */ new Map());
88
- const addPortal = useCallback((key, element) => {
89
- setPortals((current) => new Map(current).set(key, element));
90
- }, []);
91
- const removePortal = useCallback((key) => {
92
- setPortals((current) => {
93
- if (!current.has(key)) return current;
94
- const next = new Map(current);
95
- next.delete(key);
96
- return next;
97
- });
98
- }, []);
99
- const methods = useMemo(
100
- () => ({ addPortal, removePortal }),
101
- [addPortal, removePortal]
102
- );
103
- return /* @__PURE__ */ React.createElement(PortalContext.Provider, { value: methods }, /* @__PURE__ */ React.createElement(View, { style: styles.container }, children, Array.from(portals, ([key, element]) => /* @__PURE__ */ React.createElement(Fragment, { key }, element))));
64
+ function stringify(node) {
65
+ if (node === null || node === void 0 || typeof node === "boolean") return "";
66
+ if (typeof node === "string") return node;
67
+ if (typeof node === "number") return String(node);
68
+ if (isValidElement2(node)) return null;
69
+ if (Array.isArray(node)) {
70
+ let text = "";
71
+ for (const child of node) {
72
+ const part = stringify(child);
73
+ if (part === null) return null;
74
+ text += part;
75
+ }
76
+ return text;
77
+ }
78
+ return null;
104
79
  }
105
- PortalHost.displayName = "XAUI.PortalHost";
106
-
107
- // src/system/pressable-feedback/pressable-feedback.tsx
108
- import { forwardRef as forwardRef2, useContext as useContext4, useEffect as useEffect2, useMemo as useMemo2 } from "react";
109
- import { Pressable } from "react-native";
110
- import Animated3, {
111
- useAnimatedStyle as useAnimatedStyle3,
112
- useSharedValue as useSharedValue3,
113
- withTiming as withTiming3
114
- } from "react-native-reanimated";
115
-
116
- // src/system/pressable-feedback/pressable-feedback-context.ts
117
- import { createContext as createContext4 } from "react";
118
80
 
119
81
  // src/system/slot/create-slot-context.ts
120
- import { createContext as createContext3, useContext as useContext3 } from "react";
82
+ import { createContext as createContext2, useContext as useContext2 } from "react";
121
83
  function createSlotContext(name) {
122
- const Context = createContext3(null);
84
+ const Context = createContext2(null);
123
85
  Context.displayName = `XAUI.${name}.Context`;
124
86
  function useSlotContext() {
125
- const value = useContext3(Context);
87
+ const value = useContext2(Context);
126
88
  if (value === null) {
127
89
  const error = new Error(
128
90
  `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.`
@@ -138,18 +100,84 @@ function createSlotContext(name) {
138
100
  return [Context.Provider, useSlotContext];
139
101
  }
140
102
 
103
+ // src/system/slot/merge-refs.ts
104
+ function mergeRefs(...refs) {
105
+ return (value) => {
106
+ for (const ref of refs) {
107
+ if (typeof ref === "function") ref(value);
108
+ else if (ref) ref.current = value;
109
+ }
110
+ };
111
+ }
112
+
113
+ // src/system/slot/merge-props.ts
114
+ var EVENT_HANDLER = /^on[A-Z]/;
115
+ function mergeProps(ours, theirs) {
116
+ const merged = { ...ours };
117
+ for (const key of Object.keys(theirs)) {
118
+ const ourValue = ours[key];
119
+ const theirValue = theirs[key];
120
+ if (EVENT_HANDLER.test(key)) {
121
+ merged[key] = composeHandlers(ourValue, theirValue);
122
+ } else if (key === "style") {
123
+ merged[key] = mergeStyles(ourValue, theirValue);
124
+ } else if (key === "ref") {
125
+ merged[key] = mergeRefs(
126
+ ourValue,
127
+ theirValue
128
+ );
129
+ } else {
130
+ merged[key] = theirValue;
131
+ }
132
+ }
133
+ return merged;
134
+ }
135
+ function composeHandlers(ours, theirs) {
136
+ if (typeof ours !== "function") return theirs;
137
+ if (typeof theirs !== "function") return ours;
138
+ return (...args) => {
139
+ ;
140
+ ours(...args);
141
+ return theirs(...args);
142
+ };
143
+ }
144
+ function mergeStyles(ours, theirs) {
145
+ if (typeof ours === "function" || typeof theirs === "function") {
146
+ return (state) => [
147
+ resolveStyle(ours, state),
148
+ resolveStyle(theirs, state)
149
+ ];
150
+ }
151
+ return [ours, theirs];
152
+ }
153
+ function resolveStyle(style, state) {
154
+ return typeof style === "function" ? style(state) : style;
155
+ }
156
+
157
+ // src/system/slot/slot.tsx
158
+ import { cloneElement as cloneElement2, forwardRef, isValidElement as isValidElement3 } from "react";
159
+ var Slot = forwardRef(function Slot2({ children, ...ours }, ref) {
160
+ if (!isValidElement3(children)) {
161
+ throw new Error(
162
+ "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."
163
+ );
164
+ }
165
+ const child = children;
166
+ const merged = mergeProps(ours, child.props);
167
+ merged.ref = mergeRefs(ref, refOf(child));
168
+ return cloneElement2(child, merged);
169
+ });
170
+ Slot.displayName = "XAUI.Slot";
171
+ function refOf(element) {
172
+ const fromProps = element.props.ref;
173
+ const fromElement = element.ref;
174
+ return fromProps ?? fromElement;
175
+ }
176
+
141
177
  // src/system/pressable-feedback/pressable-feedback-context.ts
178
+ import { createContext as createContext3 } from "react";
142
179
  var [FeedbackProvider, useFeedback] = createSlotContext("PressableFeedback");
143
- var DisableAllContext = createContext4(false);
144
-
145
- // src/system/pressable-feedback/pressable-feedback-highlight.tsx
146
- import { useEffect } from "react";
147
- import { StyleSheet as StyleSheet2, View as View2 } from "react-native";
148
- import Animated, {
149
- useAnimatedStyle,
150
- useSharedValue,
151
- withTiming
152
- } from "react-native-reanimated";
180
+ var DisableAllContext = createContext3(false);
153
181
 
154
182
  // src/system/pressable-feedback/pressable-feedback.animation.ts
155
183
  var PRESS_SCALE = 0.975;
@@ -206,7 +234,24 @@ function resolveSlotAnimation(override, enabledByRoot, defaultOpacity, defaultDu
206
234
  };
207
235
  }
208
236
 
237
+ // src/system/pressable-feedback/pressable-feedback.tsx
238
+ import { forwardRef as forwardRef2, useContext as useContext3, useEffect as useEffect2, useMemo } from "react";
239
+ import { Pressable } from "react-native";
240
+ import Animated3, {
241
+ useAnimatedStyle as useAnimatedStyle3,
242
+ useSharedValue as useSharedValue3,
243
+ withTiming as withTiming3
244
+ } from "react-native-reanimated";
245
+
209
246
  // src/system/pressable-feedback/pressable-feedback-highlight.tsx
247
+ import { useEffect } from "react";
248
+ import { StyleSheet, View } from "react-native";
249
+ import Animated, {
250
+ useAnimatedStyle,
251
+ useSharedValue,
252
+ withTiming
253
+ } from "react-native-reanimated";
254
+ import { jsx as jsx2 } from "react/jsx-runtime";
210
255
  function PressableFeedbackHighlight({
211
256
  style,
212
257
  animation: override
@@ -219,20 +264,20 @@ function PressableFeedbackHighlight({
219
264
  HIGHLIGHT_OPACITY
220
265
  );
221
266
  const base = [
222
- StyleSheet2.absoluteFillObject,
267
+ StyleSheet.absoluteFillObject,
223
268
  { backgroundColor: theme.colors.foreground },
224
269
  style
225
270
  ];
226
271
  if (!progress || !settings.enabled) {
227
- return /* @__PURE__ */ React.createElement(
228
- View2,
272
+ return /* @__PURE__ */ jsx2(
273
+ View,
229
274
  {
230
275
  pointerEvents: "none",
231
276
  style: [base, { opacity: isPressed ? settings.opacity : 0 }]
232
277
  }
233
278
  );
234
279
  }
235
- return /* @__PURE__ */ React.createElement(
280
+ return /* @__PURE__ */ jsx2(
236
281
  AnimatedHighlight,
237
282
  {
238
283
  base,
@@ -252,10 +297,11 @@ function AnimatedHighlight({
252
297
  useEffect(() => {
253
298
  shown.value = withTiming(isPressed ? 1 : 0, { duration });
254
299
  }, [isPressed, shown, duration]);
255
- const animatedStyle = useAnimatedStyle(() => ({
256
- opacity: shown.value * opacity
257
- }));
258
- return /* @__PURE__ */ React.createElement(Animated.View, { pointerEvents: "none", style: [base, animatedStyle] });
300
+ const animatedStyle = useAnimatedStyle(
301
+ () => ({ opacity: shown.value * opacity }),
302
+ [shown, opacity]
303
+ );
304
+ return /* @__PURE__ */ jsx2(Animated.View, { pointerEvents: "none", style: [base, animatedStyle] });
259
305
  }
260
306
 
261
307
  // src/system/pressable-feedback/pressable-feedback-ripple.tsx
@@ -266,6 +312,7 @@ import Animated2, {
266
312
  useSharedValue as useSharedValue2,
267
313
  withTiming as withTiming2
268
314
  } from "react-native-reanimated";
315
+ import { Fragment, jsx as jsx3, jsxs } from "react/jsx-runtime";
269
316
  function PressableFeedbackRipple({
270
317
  style,
271
318
  animation: override
@@ -279,7 +326,7 @@ function PressableFeedbackRipple({
279
326
  RIPPLE_DURATION
280
327
  );
281
328
  if (!progress || !pressCount || !origin || !size || !settings.enabled) return null;
282
- return /* @__PURE__ */ React.createElement(
329
+ return /* @__PURE__ */ jsx3(
283
330
  AnimatedRipple,
284
331
  {
285
332
  color: theme.colors.foreground,
@@ -312,29 +359,33 @@ function AnimatedRipple({
312
359
  wave.value = 0;
313
360
  wave.value = withTiming2(2, { duration: duration * 2 });
314
361
  useA.value = !useA.value;
315
- }
362
+ },
363
+ [pressCount, origin, duration, waveA, waveB, fromA, fromB, useA]
316
364
  );
317
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
318
- RippleWave,
319
- {
320
- wave: waveA,
321
- from: fromA,
322
- size,
323
- color,
324
- opacity,
325
- style
326
- }
327
- ), /* @__PURE__ */ React.createElement(
328
- RippleWave,
329
- {
330
- wave: waveB,
331
- from: fromB,
332
- size,
333
- color,
334
- opacity,
335
- style
336
- }
337
- ));
365
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
366
+ /* @__PURE__ */ jsx3(
367
+ RippleWave,
368
+ {
369
+ wave: waveA,
370
+ from: fromA,
371
+ size,
372
+ color,
373
+ opacity,
374
+ style
375
+ }
376
+ ),
377
+ /* @__PURE__ */ jsx3(
378
+ RippleWave,
379
+ {
380
+ wave: waveB,
381
+ from: fromB,
382
+ size,
383
+ color,
384
+ opacity,
385
+ style
386
+ }
387
+ )
388
+ ] });
338
389
  }
339
390
  function RippleWave({
340
391
  wave,
@@ -361,8 +412,8 @@ function RippleWave({
361
412
  { scale: interpolate(wave.value, [0, 1, 2], [0, 1, 1]) }
362
413
  ]
363
414
  };
364
- });
365
- return /* @__PURE__ */ React.createElement(
415
+ }, [wave, from, size, opacity]);
416
+ return /* @__PURE__ */ jsx3(
366
417
  Animated2.View,
367
418
  {
368
419
  pointerEvents: "none",
@@ -375,91 +426,16 @@ function RippleWave({
375
426
  );
376
427
  }
377
428
 
378
- // src/system/slot/slot.tsx
379
- import { cloneElement as cloneElement2, forwardRef, isValidElement as isValidElement2 } from "react";
380
-
381
- // src/system/slot/merge-refs.ts
382
- function mergeRefs(...refs) {
383
- return (value) => {
384
- for (const ref of refs) {
385
- if (typeof ref === "function") ref(value);
386
- else if (ref) ref.current = value;
387
- }
388
- };
389
- }
390
-
391
- // src/system/slot/merge-props.ts
392
- var EVENT_HANDLER = /^on[A-Z]/;
393
- function mergeProps(ours, theirs) {
394
- const merged = { ...ours };
395
- for (const key of Object.keys(theirs)) {
396
- const ourValue = ours[key];
397
- const theirValue = theirs[key];
398
- if (EVENT_HANDLER.test(key)) {
399
- merged[key] = composeHandlers(ourValue, theirValue);
400
- } else if (key === "style") {
401
- merged[key] = mergeStyles(ourValue, theirValue);
402
- } else if (key === "ref") {
403
- merged[key] = mergeRefs(
404
- ourValue,
405
- theirValue
406
- );
407
- } else {
408
- merged[key] = theirValue;
409
- }
410
- }
411
- return merged;
412
- }
413
- function composeHandlers(ours, theirs) {
414
- if (typeof ours !== "function") return theirs;
415
- if (typeof theirs !== "function") return ours;
416
- return (...args) => {
417
- ;
418
- ours(...args);
419
- return theirs(...args);
420
- };
421
- }
422
- function mergeStyles(ours, theirs) {
423
- if (typeof ours === "function" || typeof theirs === "function") {
424
- return (state) => [
425
- resolveStyle(ours, state),
426
- resolveStyle(theirs, state)
427
- ];
428
- }
429
- return [ours, theirs];
430
- }
431
- function resolveStyle(style, state) {
432
- return typeof style === "function" ? style(state) : style;
433
- }
434
-
435
- // src/system/slot/slot.tsx
436
- var Slot = forwardRef(function Slot2({ children, ...ours }, ref) {
437
- if (!isValidElement2(children)) {
438
- throw new Error(
439
- "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."
440
- );
441
- }
442
- const child = children;
443
- const merged = mergeProps(ours, child.props);
444
- merged.ref = mergeRefs(ref, refOf(child));
445
- return cloneElement2(child, merged);
446
- });
447
- Slot.displayName = "XAUI.Slot";
448
- function refOf(element) {
449
- const fromProps = element.props.ref;
450
- const fromElement = element.ref;
451
- return fromProps ?? fromElement;
452
- }
453
-
454
429
  // src/system/pressable-feedback/pressable-feedback.tsx
430
+ import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
455
431
  var AnimatedPressable = Animated3.createAnimatedComponent(Pressable);
456
432
  var AnimatedSlot = Animated3.createAnimatedComponent(Slot);
457
433
  var PressableFeedback = forwardRef2(
458
434
  function PressableFeedback2({ animation, feedbackVariant = "scale-highlight", ...rest }, ref) {
459
- const inheritedDisableAll = useContext4(DisableAllContext);
435
+ const inheritedDisableAll = useContext3(DisableAllContext);
460
436
  const resolved = resolveAnimation(animation, inheritedDisableAll);
461
437
  const Feedback = resolved.none || feedbackVariant === "none" ? StaticFeedback : AnimatedFeedback;
462
- const body = /* @__PURE__ */ React.createElement(
438
+ const body2 = /* @__PURE__ */ jsx4(
463
439
  Feedback,
464
440
  {
465
441
  ref,
@@ -468,7 +444,7 @@ var PressableFeedback = forwardRef2(
468
444
  ...rest
469
445
  }
470
446
  );
471
- return resolved.disableAll ? /* @__PURE__ */ React.createElement(DisableAllContext.Provider, { value: true }, body) : body;
447
+ return resolved.disableAll ? /* @__PURE__ */ jsx4(DisableAllContext.Provider, { value: true, children: body2 }) : body2;
472
448
  }
473
449
  );
474
450
  var StaticFeedback = forwardRef2(function StaticFeedback2({
@@ -481,9 +457,9 @@ var StaticFeedback = forwardRef2(function StaticFeedback2({
481
457
  style,
482
458
  ...rest
483
459
  }, ref) {
484
- const context = useMemo2(() => ({ isPressed, animation }), [isPressed, animation]);
460
+ const context = useMemo(() => ({ isPressed, animation }), [isPressed, animation]);
485
461
  const Root = asChild ? Slot : Pressable;
486
- return /* @__PURE__ */ React.createElement(Root, { ref, style, disabled: isDisabled, ...rest }, /* @__PURE__ */ React.createElement(FeedbackProvider, { value: context }, /* @__PURE__ */ React.createElement(DefaultOverlay, { variant: feedbackVariant }), children));
462
+ return /* @__PURE__ */ jsx4(FeedbackProvider, { value: context, children: /* @__PURE__ */ jsx4(Root, { ref, style, disabled: isDisabled, ...rest, children: body(asChild, feedbackVariant, children) }) });
487
463
  });
488
464
  var AnimatedFeedback = forwardRef2(function AnimatedFeedback2({
489
465
  isPressed = false,
@@ -507,9 +483,10 @@ var AnimatedFeedback = forwardRef2(function AnimatedFeedback2({
507
483
  });
508
484
  }, [isPressed, progress]);
509
485
  const animatedStyle = useAnimatedStyle3(
510
- () => animation.scale ? { transform: [{ scale: 1 - (1 - PRESS_SCALE) * progress.value }] } : {}
486
+ () => animation.scale ? { transform: [{ scale: 1 - (1 - PRESS_SCALE) * progress.value }] } : {},
487
+ [animation.scale, progress]
511
488
  );
512
- const context = useMemo2(
489
+ const context = useMemo(
513
490
  () => ({ isPressed, animation, progress, pressCount, origin, size }),
514
491
  [isPressed, animation, progress, pressCount, origin, size]
515
492
  );
@@ -526,7 +503,7 @@ var AnimatedFeedback = forwardRef2(function AnimatedFeedback2({
526
503
  };
527
504
  const clip = feedbackVariant === "scale-ripple" ? { overflow: "hidden" } : null;
528
505
  const Root = asChild ? AnimatedSlot : AnimatedPressable;
529
- return /* @__PURE__ */ React.createElement(
506
+ return /* @__PURE__ */ jsx4(FeedbackProvider, { value: context, children: /* @__PURE__ */ jsx4(
530
507
  Root,
531
508
  {
532
509
  ref,
@@ -534,14 +511,21 @@ var AnimatedFeedback = forwardRef2(function AnimatedFeedback2({
534
511
  disabled: isDisabled,
535
512
  onPressIn: handlePressIn,
536
513
  onLayout: handleLayout,
537
- ...rest
538
- },
539
- /* @__PURE__ */ React.createElement(FeedbackProvider, { value: context }, /* @__PURE__ */ React.createElement(DefaultOverlay, { variant: feedbackVariant }), children)
540
- );
514
+ ...rest,
515
+ children: body(asChild, feedbackVariant, children)
516
+ }
517
+ ) });
541
518
  });
519
+ function body(asChild, variant, children) {
520
+ if (asChild) return children;
521
+ return /* @__PURE__ */ jsxs2(Fragment2, { children: [
522
+ /* @__PURE__ */ jsx4(DefaultOverlay, { variant }),
523
+ children
524
+ ] });
525
+ }
542
526
  function DefaultOverlay({ variant }) {
543
- if (variant === "scale-highlight") return /* @__PURE__ */ React.createElement(PressableFeedbackHighlight, null);
544
- if (variant === "scale-ripple") return /* @__PURE__ */ React.createElement(PressableFeedbackRipple, null);
527
+ if (variant === "scale-highlight") return /* @__PURE__ */ jsx4(PressableFeedbackHighlight, {});
528
+ if (variant === "scale-ripple") return /* @__PURE__ */ jsx4(PressableFeedbackRipple, {});
545
529
  return null;
546
530
  }
547
531
 
@@ -575,7 +559,7 @@ function resolveTint(tokens, color, theme) {
575
559
  }
576
560
 
577
561
  // src/system/recipe/style-cache.ts
578
- import { StyleSheet as StyleSheet3 } from "react-native";
562
+ import { StyleSheet as StyleSheet2 } from "react-native";
579
563
 
580
564
  // src/system/recipe/variant-map.ts
581
565
  var STATE_ORDER = ["focused", "pressed", "disabled"];
@@ -638,7 +622,7 @@ function createStyleCache(slots) {
638
622
  const built = build();
639
623
  const complete = {};
640
624
  for (const slot of slots) complete[slot] = built[slot] ?? {};
641
- const created = StyleSheet3.create(complete);
625
+ const created = StyleSheet2.create(complete);
642
626
  entries.set(key, created);
643
627
  return created;
644
628
  },
@@ -694,38 +678,15 @@ function apply(fns, theme, colors) {
694
678
  return merged;
695
679
  }
696
680
 
697
- // src/system/slot/children-to-string.ts
698
- import { isValidElement as isValidElement3 } from "react";
699
- function childrenToString(children) {
700
- const text = stringify(children);
701
- return text === null || text === "" ? null : text;
702
- }
703
- function stringify(node) {
704
- if (node === null || node === void 0 || typeof node === "boolean") return "";
705
- if (typeof node === "string") return node;
706
- if (typeof node === "number") return String(node);
707
- if (isValidElement3(node)) return null;
708
- if (Array.isArray(node)) {
709
- let text = "";
710
- for (const child of node) {
711
- const part = stringify(child);
712
- if (part === null) return null;
713
- text += part;
714
- }
715
- return text;
716
- }
717
- return null;
718
- }
719
-
720
681
  export {
721
- mergeRefs,
722
682
  IconContext,
723
683
  useIconContext,
724
684
  Icon,
725
- PortalContext,
726
- Portal,
727
- PortalHost,
685
+ childrenToString,
728
686
  createSlotContext,
687
+ mergeRefs,
688
+ mergeProps,
689
+ Slot,
729
690
  useFeedback,
730
691
  PRESS_SCALE,
731
692
  PRESS_DURATION,
@@ -736,9 +697,6 @@ export {
736
697
  RIPPLE_COVERAGE,
737
698
  resolveAnimation,
738
699
  resolveSlotAnimation,
739
- mergeProps,
740
- Slot,
741
700
  PressableFeedback3 as PressableFeedback,
742
- createRecipe,
743
- childrenToString
701
+ createRecipe
744
702
  };