@xaui/native 0.9.1-alpha.13 → 0.9.1-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-B3EAZ2CC.js → chunk-64L44HEI.js} +155 -144
- package/dist/{chunk-2FOEFUPM.cjs → chunk-BAACHVM4.cjs} +8 -3
- package/dist/{chunk-RWLODK55.js → chunk-E3756MJC.js} +15 -15
- package/dist/{chunk-MLJ543GP.cjs → chunk-NLFE3CRM.cjs} +23 -23
- package/dist/{chunk-IVVFYUDW.cjs → chunk-PUER6Y4M.cjs} +134 -122
- package/dist/{chunk-TO6DAGFB.js → chunk-UOJBK5Z4.js} +7 -2
- package/dist/components/button/index.cjs +3 -3
- package/dist/components/button/index.d.cts +322 -7
- package/dist/components/button/index.d.ts +322 -7
- package/dist/components/button/index.js +2 -2
- package/dist/{create-recipe-oiLAlJ4u.d.cts → create-recipe-BcUu9b2I.d.cts} +41 -31
- package/dist/{create-recipe-3OPwcC6P.d.ts → create-recipe-DD9W6m9b.d.ts} +41 -31
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/system/index.cjs +3 -3
- package/dist/system/index.d.cts +174 -173
- package/dist/system/index.d.ts +174 -173
- package/dist/system/index.js +2 -2
- package/package.json +1 -1
|
@@ -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
|
|
216
|
-
code: "function
|
|
217
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
218
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
217
|
+
const _worklet_7139534127642_init_data = {
|
|
218
|
+
code: "function pressScaleFor_chunk64L44HEIJs1(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-64L44HEI.js",
|
|
220
|
+
sourceMap: "{\"version\":3,\"names\":[\"pressScaleFor_chunk64L44HEIJs1\",\"width\",\"SCALE_REFERENCE_WIDTH\",\"PRESS_SCALE\",\"__closure\",\"coefficient\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-64L44HEI.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
|
|
221
|
-
|
|
222
|
+
const pressScaleFor = function pressScaleFor_chunk64L44HEIJs1Factory({
|
|
223
|
+
_worklet_7139534127642_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 =
|
|
236
|
+
pressScaleFor.__workletHash = 7139534127642;
|
|
235
237
|
pressScaleFor.__pluginVersion = "0.7.4";
|
|
236
|
-
pressScaleFor.__initData =
|
|
238
|
+
pressScaleFor.__initData = _worklet_7139534127642_init_data;
|
|
237
239
|
pressScaleFor.__stackDetails = _e;
|
|
238
240
|
return pressScaleFor;
|
|
239
241
|
}({
|
|
240
|
-
|
|
242
|
+
_worklet_7139534127642_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
|
|
254
|
-
code: "function
|
|
255
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
256
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
255
|
+
const _worklet_8530012985633_init_data = {
|
|
256
|
+
code: "function rippleRadiusFor_chunk64L44HEIJs2(width,height){return Math.sqrt(width*width+height*height)/2+5;}",
|
|
257
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-64L44HEI.js",
|
|
258
|
+
sourceMap: "{\"version\":3,\"names\":[\"rippleRadiusFor_chunk64L44HEIJs2\",\"width\",\"height\",\"Math\",\"sqrt\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-64L44HEI.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
|
|
259
|
-
|
|
260
|
+
const rippleRadiusFor = function rippleRadiusFor_chunk64L44HEIJs2Factory({
|
|
261
|
+
_worklet_8530012985633_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 =
|
|
268
|
+
rippleRadiusFor.__workletHash = 8530012985633;
|
|
267
269
|
rippleRadiusFor.__pluginVersion = "0.7.4";
|
|
268
|
-
rippleRadiusFor.__initData =
|
|
270
|
+
rippleRadiusFor.__initData = _worklet_8530012985633_init_data;
|
|
269
271
|
rippleRadiusFor.__stackDetails = _e;
|
|
270
272
|
return rippleRadiusFor;
|
|
271
273
|
}({
|
|
272
|
-
|
|
274
|
+
_worklet_8530012985633_init_data
|
|
273
275
|
});
|
|
274
276
|
var ALL_OFF = {
|
|
275
277
|
scale: false,
|
|
@@ -334,7 +336,7 @@ function resolveSlotAnimation(override, enabledByRoot, defaultOpacity, defaultDu
|
|
|
334
336
|
}
|
|
335
337
|
|
|
336
338
|
// src/system/pressable-feedback/pressable-feedback.overlay.ts
|
|
337
|
-
import { Children, isValidElement as isValidElement4 } from "react";
|
|
339
|
+
import { Children, Fragment, createElement, isValidElement as isValidElement4 } from "react";
|
|
338
340
|
var FEEDBACK_OVERLAY = /* @__PURE__ */Symbol.for("xaui.PressableFeedback.overlay");
|
|
339
341
|
function markOverlay(component) {
|
|
340
342
|
return Object.assign(component, {
|
|
@@ -361,6 +363,15 @@ function partitionOverlays(children) {
|
|
|
361
363
|
content: all.filter(node => !isBareOverlay(node))
|
|
362
364
|
};
|
|
363
365
|
}
|
|
366
|
+
function feedbackChildren(children, asChild) {
|
|
367
|
+
if (asChild) return children;
|
|
368
|
+
const {
|
|
369
|
+
overlays,
|
|
370
|
+
content
|
|
371
|
+
} = partitionOverlays(children);
|
|
372
|
+
if (overlays === null) return content;
|
|
373
|
+
return createElement(Fragment, null, overlays, content);
|
|
374
|
+
}
|
|
364
375
|
|
|
365
376
|
// src/system/pressable-feedback/pressable-feedback.tsx
|
|
366
377
|
import { forwardRef as forwardRef2, useContext as useContext3, useEffect, useMemo as useMemo2, useRef } from "react";
|
|
@@ -384,19 +395,22 @@ function radiusFrom(style) {
|
|
|
384
395
|
}
|
|
385
396
|
|
|
386
397
|
// src/system/pressable-feedback/pressable-feedback.tsx
|
|
387
|
-
import { jsx as jsx2
|
|
398
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
388
399
|
var AnimatedPressable = Animated.createAnimatedComponent(Pressable);
|
|
389
400
|
var AnimatedSlot = Animated.createAnimatedComponent(Slot);
|
|
390
401
|
var PressableFeedback = forwardRef2(function PressableFeedback2({
|
|
391
402
|
animation,
|
|
392
|
-
|
|
403
|
+
style,
|
|
404
|
+
...props
|
|
393
405
|
}, ref) {
|
|
394
406
|
const inheritedDisableAll = useContext3(DisableAllContext);
|
|
395
407
|
const resolved = resolveAnimation(animation, inheritedDisableAll);
|
|
408
|
+
const [styleProps, rest] = useStyleProps(props);
|
|
396
409
|
const Feedback = resolved.none ? StaticFeedback : AnimatedFeedback;
|
|
397
410
|
const body = /* @__PURE__ */jsx2(Feedback, {
|
|
398
411
|
ref,
|
|
399
412
|
animation: resolved,
|
|
413
|
+
style: [styleProps, style],
|
|
400
414
|
...rest
|
|
401
415
|
});
|
|
402
416
|
return resolved.disableAll ? /* @__PURE__ */jsx2(DisableAllContext.Provider, {
|
|
@@ -420,30 +434,26 @@ var StaticFeedback = forwardRef2(function StaticFeedback2({
|
|
|
420
434
|
...surface
|
|
421
435
|
}), [isPressed, animation, surface]);
|
|
422
436
|
const Root = asChild ? Slot : Pressable;
|
|
423
|
-
const {
|
|
424
|
-
overlays,
|
|
425
|
-
content
|
|
426
|
-
} = partitionOverlays(children);
|
|
427
437
|
return /* @__PURE__ */jsx2(FeedbackProvider, {
|
|
428
438
|
value: context,
|
|
429
|
-
children: /* @__PURE__ */
|
|
439
|
+
children: /* @__PURE__ */jsx2(Root, {
|
|
430
440
|
ref,
|
|
431
441
|
style,
|
|
432
442
|
disabled: isDisabled,
|
|
433
443
|
...rest,
|
|
434
|
-
children:
|
|
444
|
+
children: feedbackChildren(children, asChild)
|
|
435
445
|
})
|
|
436
446
|
});
|
|
437
447
|
});
|
|
438
|
-
const
|
|
439
|
-
code: "function
|
|
440
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
441
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
448
|
+
const _worklet_17549026676436_init_data = {
|
|
449
|
+
code: "function chunk64L44HEIJs3(){const{pressScaleFor,size}=this.__closure;return pressScaleFor(size.value.width);}",
|
|
450
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-64L44HEI.js",
|
|
451
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunk64L44HEIJs3\",\"pressScaleFor\",\"size\",\"__closure\",\"value\",\"width\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-64L44HEI.js\"],\"mappings\":\"AAuiBuC,SAAAA,iBAAA,QAAAC,aAAA,CAAAC,IAAA,OAAAC,SAAA,OAAM,CAAAF,aAAc,CAAAC,IAAK,CAAAE,KAAM,CAAAC,KAAK\",\"ignoreList\":[]}"
|
|
442
452
|
};
|
|
443
|
-
const
|
|
444
|
-
code: "function
|
|
445
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
446
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
453
|
+
const _worklet_11319249043844_init_data = {
|
|
454
|
+
code: "function chunk64L44HEIJs4(){const{animation,pressedScale,progress}=this.__closure;if(!animation.scale)return{};return{transform:[{scale:1-(1-pressedScale.value)*progress.value}]};}",
|
|
455
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-64L44HEI.js",
|
|
456
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunk64L44HEIJs4\",\"animation\",\"pressedScale\",\"progress\",\"__closure\",\"scale\",\"transform\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-64L44HEI.js\"],\"mappings\":\"AAwiByC,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
457
|
};
|
|
448
458
|
var AnimatedFeedback = forwardRef2(function AnimatedFeedback2({
|
|
449
459
|
isPressed = false,
|
|
@@ -471,35 +481,35 @@ var AnimatedFeedback = forwardRef2(function AnimatedFeedback2({
|
|
|
471
481
|
easing: Easing.out(Easing.ease)
|
|
472
482
|
});
|
|
473
483
|
}, [isPressed, progress]);
|
|
474
|
-
const pressedScale = useDerivedValue(function
|
|
475
|
-
|
|
484
|
+
const pressedScale = useDerivedValue(function chunk64L44HEIJs3Factory({
|
|
485
|
+
_worklet_17549026676436_init_data,
|
|
476
486
|
pressScaleFor,
|
|
477
487
|
size
|
|
478
488
|
}) {
|
|
479
489
|
const _e = [new global.Error(), -3, -27];
|
|
480
|
-
const
|
|
481
|
-
|
|
490
|
+
const chunk64L44HEIJs3 = () => pressScaleFor(size.value.width);
|
|
491
|
+
chunk64L44HEIJs3.__closure = {
|
|
482
492
|
pressScaleFor,
|
|
483
493
|
size
|
|
484
494
|
};
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
return
|
|
495
|
+
chunk64L44HEIJs3.__workletHash = 17549026676436;
|
|
496
|
+
chunk64L44HEIJs3.__pluginVersion = "0.7.4";
|
|
497
|
+
chunk64L44HEIJs3.__initData = _worklet_17549026676436_init_data;
|
|
498
|
+
chunk64L44HEIJs3.__stackDetails = _e;
|
|
499
|
+
return chunk64L44HEIJs3;
|
|
490
500
|
}({
|
|
491
|
-
|
|
501
|
+
_worklet_17549026676436_init_data,
|
|
492
502
|
pressScaleFor,
|
|
493
503
|
size
|
|
494
504
|
}));
|
|
495
|
-
const animatedStyle = useAnimatedStyle(function
|
|
496
|
-
|
|
505
|
+
const animatedStyle = useAnimatedStyle(function chunk64L44HEIJs4Factory({
|
|
506
|
+
_worklet_11319249043844_init_data,
|
|
497
507
|
animation,
|
|
498
508
|
pressedScale,
|
|
499
509
|
progress
|
|
500
510
|
}) {
|
|
501
511
|
const _e = [new global.Error(), -4, -27];
|
|
502
|
-
const
|
|
512
|
+
const chunk64L44HEIJs4 = function () {
|
|
503
513
|
if (!animation.scale) return {};
|
|
504
514
|
return {
|
|
505
515
|
transform: [{
|
|
@@ -507,18 +517,18 @@ var AnimatedFeedback = forwardRef2(function AnimatedFeedback2({
|
|
|
507
517
|
}]
|
|
508
518
|
};
|
|
509
519
|
};
|
|
510
|
-
|
|
520
|
+
chunk64L44HEIJs4.__closure = {
|
|
511
521
|
animation,
|
|
512
522
|
pressedScale,
|
|
513
523
|
progress
|
|
514
524
|
};
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
return
|
|
525
|
+
chunk64L44HEIJs4.__workletHash = 11319249043844;
|
|
526
|
+
chunk64L44HEIJs4.__pluginVersion = "0.7.4";
|
|
527
|
+
chunk64L44HEIJs4.__initData = _worklet_11319249043844_init_data;
|
|
528
|
+
chunk64L44HEIJs4.__stackDetails = _e;
|
|
529
|
+
return chunk64L44HEIJs4;
|
|
520
530
|
}({
|
|
521
|
-
|
|
531
|
+
_worklet_11319249043844_init_data,
|
|
522
532
|
animation,
|
|
523
533
|
pressedScale,
|
|
524
534
|
progress
|
|
@@ -583,13 +593,9 @@ var AnimatedFeedback = forwardRef2(function AnimatedFeedback2({
|
|
|
583
593
|
onLayout?.(event);
|
|
584
594
|
};
|
|
585
595
|
const Root = asChild ? AnimatedSlot : AnimatedPressable;
|
|
586
|
-
const {
|
|
587
|
-
overlays,
|
|
588
|
-
content
|
|
589
|
-
} = partitionOverlays(children);
|
|
590
596
|
return /* @__PURE__ */jsx2(FeedbackProvider, {
|
|
591
597
|
value: context,
|
|
592
|
-
children: /* @__PURE__ */
|
|
598
|
+
children: /* @__PURE__ */jsx2(Root, {
|
|
593
599
|
ref,
|
|
594
600
|
style: [style, animatedStyle],
|
|
595
601
|
disabled: isDisabled,
|
|
@@ -598,7 +604,7 @@ var AnimatedFeedback = forwardRef2(function AnimatedFeedback2({
|
|
|
598
604
|
onTouchEnd: handleTouchEnd,
|
|
599
605
|
onTouchCancel: handleTouchCancel,
|
|
600
606
|
...rest,
|
|
601
|
-
children:
|
|
607
|
+
children: feedbackChildren(children, asChild)
|
|
602
608
|
})
|
|
603
609
|
});
|
|
604
610
|
});
|
|
@@ -628,11 +634,12 @@ function useSurface(style) {
|
|
|
628
634
|
import { useEffect as useEffect2 } from "react";
|
|
629
635
|
import { StyleSheet as StyleSheet2, View as View2 } from "react-native";
|
|
630
636
|
import Animated2, { useAnimatedStyle as useAnimatedStyle2, useSharedValue as useSharedValue2, withTiming as withTiming2 } from "react-native-reanimated";
|
|
631
|
-
import { Fragment, jsx as jsx3, jsxs
|
|
637
|
+
import { Fragment as Fragment2, jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
632
638
|
function PressableFeedbackHighlight({
|
|
633
639
|
style,
|
|
634
640
|
animation: override,
|
|
635
|
-
children
|
|
641
|
+
children,
|
|
642
|
+
...props
|
|
636
643
|
}) {
|
|
637
644
|
const {
|
|
638
645
|
isPressed,
|
|
@@ -641,13 +648,14 @@ function PressableFeedbackHighlight({
|
|
|
641
648
|
ink,
|
|
642
649
|
corners
|
|
643
650
|
} = useFeedback();
|
|
651
|
+
const [styleProps] = useStyleProps(props);
|
|
644
652
|
const settings = resolveSlotAnimation(override, animation.highlight, HIGHLIGHT_OPACITY, HIGHLIGHT_DURATION);
|
|
645
653
|
const base = [StyleSheet2.absoluteFillObject, {
|
|
646
654
|
backgroundColor: ink,
|
|
647
655
|
pointerEvents: "none"
|
|
648
|
-
}, corners, style];
|
|
656
|
+
}, corners, styleProps, style];
|
|
649
657
|
if (!progress || !settings.enabled) {
|
|
650
|
-
return /* @__PURE__ */
|
|
658
|
+
return /* @__PURE__ */jsxs(Fragment2, {
|
|
651
659
|
children: [/* @__PURE__ */jsx3(View2, {
|
|
652
660
|
style: [base, {
|
|
653
661
|
opacity: isPressed ? settings.opacity : 0
|
|
@@ -655,7 +663,7 @@ function PressableFeedbackHighlight({
|
|
|
655
663
|
}), children]
|
|
656
664
|
});
|
|
657
665
|
}
|
|
658
|
-
return /* @__PURE__ */
|
|
666
|
+
return /* @__PURE__ */jsxs(Fragment2, {
|
|
659
667
|
children: [/* @__PURE__ */jsx3(AnimatedHighlight, {
|
|
660
668
|
base,
|
|
661
669
|
duration: settings.duration,
|
|
@@ -665,10 +673,10 @@ function PressableFeedbackHighlight({
|
|
|
665
673
|
}
|
|
666
674
|
PressableFeedbackHighlight.displayName = "XAUI.PressableFeedback.Highlight";
|
|
667
675
|
markOverlay(PressableFeedbackHighlight);
|
|
668
|
-
const
|
|
669
|
-
code: "function
|
|
670
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
671
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
676
|
+
const _worklet_1017691592244_init_data = {
|
|
677
|
+
code: "function chunk64L44HEIJs5(){const{shown,opacity}=this.__closure;return{opacity:shown.value*opacity};}",
|
|
678
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-64L44HEI.js",
|
|
679
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunk64L44HEIJs5\",\"shown\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-64L44HEI.js\"],\"mappings\":\"AAsrB0C,SAAAA,gBAAMA,CAAA,QAAAC,KAAA,CAAAC,OAAA,OAAAC,SAAA,CAE5C,MAAO,CAAED,OAAO,CAAED,KAAK,CAACG,KAAK,CAAGF,OAAQ,CAAC,CAC3C\",\"ignoreList\":[]}"
|
|
672
680
|
};
|
|
673
681
|
function AnimatedHighlight({
|
|
674
682
|
base,
|
|
@@ -684,28 +692,28 @@ function AnimatedHighlight({
|
|
|
684
692
|
duration
|
|
685
693
|
});
|
|
686
694
|
}, [isPressed, shown, duration]);
|
|
687
|
-
const animatedStyle = useAnimatedStyle2(function
|
|
688
|
-
|
|
695
|
+
const animatedStyle = useAnimatedStyle2(function chunk64L44HEIJs5Factory({
|
|
696
|
+
_worklet_1017691592244_init_data,
|
|
689
697
|
shown,
|
|
690
698
|
opacity
|
|
691
699
|
}) {
|
|
692
700
|
const _e = [new global.Error(), -3, -27];
|
|
693
|
-
const
|
|
701
|
+
const chunk64L44HEIJs5 = function () {
|
|
694
702
|
return {
|
|
695
703
|
opacity: shown.value * opacity
|
|
696
704
|
};
|
|
697
705
|
};
|
|
698
|
-
|
|
706
|
+
chunk64L44HEIJs5.__closure = {
|
|
699
707
|
shown,
|
|
700
708
|
opacity
|
|
701
709
|
};
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
return
|
|
710
|
+
chunk64L44HEIJs5.__workletHash = 1017691592244;
|
|
711
|
+
chunk64L44HEIJs5.__pluginVersion = "0.7.4";
|
|
712
|
+
chunk64L44HEIJs5.__initData = _worklet_1017691592244_init_data;
|
|
713
|
+
chunk64L44HEIJs5.__stackDetails = _e;
|
|
714
|
+
return chunk64L44HEIJs5;
|
|
707
715
|
}({
|
|
708
|
-
|
|
716
|
+
_worklet_1017691592244_init_data,
|
|
709
717
|
shown,
|
|
710
718
|
opacity
|
|
711
719
|
}), [shown, opacity]);
|
|
@@ -718,11 +726,12 @@ function AnimatedHighlight({
|
|
|
718
726
|
import { useState } from "react";
|
|
719
727
|
import { StyleSheet as StyleSheet3, View as View3 } from "react-native";
|
|
720
728
|
import Animated3, { useAnimatedStyle as useAnimatedStyle3 } from "react-native-reanimated";
|
|
721
|
-
import { Fragment as
|
|
729
|
+
import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
722
730
|
function PressableFeedbackRipple({
|
|
723
731
|
style,
|
|
724
732
|
animation: override,
|
|
725
|
-
children
|
|
733
|
+
children,
|
|
734
|
+
...props
|
|
726
735
|
}) {
|
|
727
736
|
const {
|
|
728
737
|
animation,
|
|
@@ -730,6 +739,8 @@ function PressableFeedbackRipple({
|
|
|
730
739
|
ink,
|
|
731
740
|
corners
|
|
732
741
|
} = useFeedback();
|
|
742
|
+
const [styleProps] = useStyleProps(props);
|
|
743
|
+
const waveStyle = [styleProps, style];
|
|
733
744
|
const settings = resolveSlotAnimation(override, animation.ripple, RIPPLE_OPACITY);
|
|
734
745
|
const [size, setSize] = useState({
|
|
735
746
|
width: 0,
|
|
@@ -745,11 +756,11 @@ function PressableFeedbackRipple({
|
|
|
745
756
|
height
|
|
746
757
|
});
|
|
747
758
|
};
|
|
748
|
-
if (!waves || !settings.enabled) return /* @__PURE__ */jsx4(
|
|
759
|
+
if (!waves || !settings.enabled) return /* @__PURE__ */jsx4(Fragment3, {
|
|
749
760
|
children
|
|
750
761
|
});
|
|
751
762
|
const radius = rippleRadiusFor(size.width, size.height);
|
|
752
|
-
return /* @__PURE__ */
|
|
763
|
+
return /* @__PURE__ */jsxs2(Fragment3, {
|
|
753
764
|
children: [/* @__PURE__ */jsx4(View3, {
|
|
754
765
|
style: [StyleSheet3.absoluteFill, styles.clip, corners],
|
|
755
766
|
onLayout: handleLayout,
|
|
@@ -762,17 +773,17 @@ function PressableFeedbackRipple({
|
|
|
762
773
|
},
|
|
763
774
|
color: ink,
|
|
764
775
|
opacity: settings.opacity,
|
|
765
|
-
style
|
|
776
|
+
style: waveStyle
|
|
766
777
|
}, index))
|
|
767
778
|
}), children]
|
|
768
779
|
});
|
|
769
780
|
}
|
|
770
781
|
PressableFeedbackRipple.displayName = "XAUI.PressableFeedback.Ripple";
|
|
771
782
|
markOverlay(PressableFeedbackRipple);
|
|
772
|
-
const
|
|
773
|
-
code: "function
|
|
774
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
775
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
783
|
+
const _worklet_12261780159803_init_data = {
|
|
784
|
+
code: "function chunk64L44HEIJs6(){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}]};}",
|
|
785
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-64L44HEI.js",
|
|
786
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunk64L44HEIJs6\",\"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-64L44HEI.js\"],\"mappings\":\"AAsvB0C,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
787
|
};
|
|
777
788
|
function RippleWave({
|
|
778
789
|
wave,
|
|
@@ -782,8 +793,8 @@ function RippleWave({
|
|
|
782
793
|
opacity,
|
|
783
794
|
style
|
|
784
795
|
}) {
|
|
785
|
-
const animatedStyle = useAnimatedStyle3(function
|
|
786
|
-
|
|
796
|
+
const animatedStyle = useAnimatedStyle3(function chunk64L44HEIJs6Factory({
|
|
797
|
+
_worklet_12261780159803_init_data,
|
|
787
798
|
wave,
|
|
788
799
|
RIPPLE_START_SCALE,
|
|
789
800
|
center,
|
|
@@ -791,7 +802,7 @@ function RippleWave({
|
|
|
791
802
|
radius
|
|
792
803
|
}) {
|
|
793
804
|
const _e = [new global.Error(), -6, -27];
|
|
794
|
-
const
|
|
805
|
+
const chunk64L44HEIJs6 = function () {
|
|
795
806
|
const t = wave.expand.value;
|
|
796
807
|
const from = wave.origin.value;
|
|
797
808
|
const scale = RIPPLE_START_SCALE + (1 - RIPPLE_START_SCALE) * t;
|
|
@@ -809,20 +820,20 @@ function RippleWave({
|
|
|
809
820
|
}]
|
|
810
821
|
};
|
|
811
822
|
};
|
|
812
|
-
|
|
823
|
+
chunk64L44HEIJs6.__closure = {
|
|
813
824
|
wave,
|
|
814
825
|
RIPPLE_START_SCALE,
|
|
815
826
|
center,
|
|
816
827
|
opacity,
|
|
817
828
|
radius
|
|
818
829
|
};
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
return
|
|
830
|
+
chunk64L44HEIJs6.__workletHash = 12261780159803;
|
|
831
|
+
chunk64L44HEIJs6.__pluginVersion = "0.7.4";
|
|
832
|
+
chunk64L44HEIJs6.__initData = _worklet_12261780159803_init_data;
|
|
833
|
+
chunk64L44HEIJs6.__stackDetails = _e;
|
|
834
|
+
return chunk64L44HEIJs6;
|
|
824
835
|
}({
|
|
825
|
-
|
|
836
|
+
_worklet_12261780159803_init_data,
|
|
826
837
|
wave,
|
|
827
838
|
RIPPLE_START_SCALE,
|
|
828
839
|
center,
|
|
@@ -1007,4 +1018,4 @@ function apply(fns, theme, colors) {
|
|
|
1007
1018
|
}
|
|
1008
1019
|
return merged;
|
|
1009
1020
|
}
|
|
1010
|
-
export { IconContext, useIconContext, Icon, childrenToString, createSlotContext, mergeRefs, mergeProps, Slot,
|
|
1021
|
+
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; }
|
|
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 _chunkPUER6Y4Mcjs = require('./chunk-PUER6Y4M.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] = _chunkPUER6Y4Mcjs.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
|
] }) });
|