@xaui/native 0.9.1-alpha.29 → 0.9.1-alpha.30
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-XYFMSRNJ.js → chunk-27ZRTZEE.js} +14 -10
- package/dist/{chunk-ICR42HHG.js → chunk-3FV4COTM.js} +3 -3
- package/dist/chunk-423RQBOX.js +21 -0
- package/dist/{chunk-TFNB2PNI.cjs → chunk-4XPLPQLM.cjs} +13 -11
- package/dist/{chunk-APONC4DB.cjs → chunk-5GO7MAVY.cjs} +12 -10
- package/dist/{chunk-AQNWXJYV.cjs → chunk-5RQ7AZPN.cjs} +20 -16
- package/dist/{chunk-FFEUGWVA.cjs → chunk-5Z4P6WHR.cjs} +11 -9
- package/dist/{chunk-L3Q5TVYE.js → chunk-6RVCGLKZ.js} +60 -58
- package/dist/chunk-7DPL3ZDS.cjs +21 -0
- package/dist/{chunk-Y4BPKSD3.js → chunk-7SEZGVTY.js} +1 -1
- package/dist/chunk-7XKQJQF2.cjs +70 -0
- package/dist/{chunk-7BOFQN2G.js → chunk-A5OCK3C2.js} +7 -5
- package/dist/{chunk-4HELPMAK.js → chunk-BFMTUMTU.js} +81 -101
- package/dist/chunk-BVJQ3UPZ.js +62 -0
- package/dist/{chunk-NG4GFBDR.js → chunk-DFME724B.js} +8 -6
- package/dist/chunk-E2CWBQTV.js +119 -0
- package/dist/chunk-E4TS6632.cjs +314 -0
- package/dist/{chunk-VUEDYW3M.js → chunk-FMZQW35T.js} +15 -11
- package/dist/{chunk-OYZYWWJ6.js → chunk-G7K652GC.js} +4 -2
- package/dist/{chunk-YGOXQSNU.js → chunk-GI24YJPE.js} +100 -206
- package/dist/chunk-GLGU2WFL.cjs +190 -0
- package/dist/{chunk-IG4Q3WQO.cjs → chunk-GPVNCJ3Z.cjs} +74 -95
- package/dist/{chunk-D4SOU26X.js → chunk-GVQOD3VW.js} +5 -3
- package/dist/chunk-KOC3KQIT.js +124 -0
- package/dist/chunk-KPWZLUES.cjs +124 -0
- package/dist/{chunk-SVRZJEDU.cjs → chunk-KWCHSIMI.cjs} +16 -12
- package/dist/{chunk-GCU5A5MM.cjs → chunk-N527BTY4.cjs} +17 -15
- package/dist/{chunk-F3H4TXAY.cjs → chunk-NBFWWQFW.cjs} +16 -12
- package/dist/{chunk-HOIQRGSK.js → chunk-NYRXUGVL.js} +6 -4
- package/dist/{chunk-V56334S3.js → chunk-Q3WFY5N3.js} +9 -7
- package/dist/{chunk-FXHRNUCS.cjs → chunk-QGN2BBJO.cjs} +8 -6
- package/dist/{chunk-J2JJLKLG.cjs → chunk-TGZZ3RZU.cjs} +7 -5
- package/dist/{chunk-YWBTIWT5.cjs → chunk-UBQLKIZC.cjs} +22 -18
- package/dist/{chunk-PMO62QK4.js → chunk-URSKA2VR.js} +1 -114
- package/dist/{chunk-A4RGJBP2.js → chunk-V4WDMM6Z.js} +5 -3
- package/dist/{chunk-FDSQOPJH.js → chunk-VJEER76X.js} +11 -7
- package/dist/{chunk-O5KDIEDH.cjs → chunk-VZBWYWEI.cjs} +25 -24
- package/dist/{chunk-B4W2XNBP.cjs → chunk-WR7YLDVV.cjs} +3 -3
- package/dist/{chunk-5RFRASSB.js → chunk-X4HQ4H2V.js} +16 -15
- package/dist/{chunk-IBEX4XGV.cjs → chunk-XFSW3ZNI.cjs} +13 -11
- package/dist/{chunk-VZGBEGDV.cjs → chunk-XQFAUDR2.cjs} +2 -2
- package/dist/{chunk-V3KS5PPK.js → chunk-YKL6XHM6.js} +14 -10
- package/dist/{chunk-HUZ4AUM2.cjs → chunk-ZP2E2H2G.cjs} +4 -188
- package/dist/{chunk-RZC4VFB5.cjs → chunk-ZSLNGBDS.cjs} +68 -66
- package/dist/components/alert/index.cjs +8 -6
- package/dist/components/alert/index.d.cts +2 -2
- package/dist/components/alert/index.d.ts +2 -2
- package/dist/components/alert/index.js +7 -5
- package/dist/components/button/index.cjs +9 -5
- package/dist/components/button/index.d.cts +9 -4
- package/dist/components/button/index.d.ts +9 -4
- package/dist/components/button/index.js +8 -4
- package/dist/components/card/index.cjs +6 -4
- package/dist/components/card/index.d.cts +1 -1
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/card/index.js +5 -3
- package/dist/components/checkbox/index.cjs +7 -5
- package/dist/components/checkbox/index.d.cts +1 -1
- package/dist/components/checkbox/index.d.ts +1 -1
- package/dist/components/checkbox/index.js +6 -4
- package/dist/components/chip/index.cjs +8 -6
- package/dist/components/chip/index.d.cts +2 -2
- package/dist/components/chip/index.d.ts +2 -2
- package/dist/components/chip/index.js +7 -5
- package/dist/components/input/index.cjs +4 -3
- package/dist/components/input/index.d.cts +1 -1
- package/dist/components/input/index.d.ts +1 -1
- package/dist/components/input/index.js +3 -2
- package/dist/components/input-group/index.cjs +6 -5
- package/dist/components/input-group/index.d.cts +1 -1
- package/dist/components/input-group/index.d.ts +1 -1
- package/dist/components/input-group/index.js +5 -4
- package/dist/components/input-otp/index.cjs +4 -3
- package/dist/components/input-otp/index.d.cts +2 -2
- package/dist/components/input-otp/index.d.ts +2 -2
- package/dist/components/input-otp/index.js +3 -2
- package/dist/components/radio/index.cjs +7 -5
- package/dist/components/radio/index.d.cts +1 -1
- package/dist/components/radio/index.d.ts +1 -1
- package/dist/components/radio/index.js +6 -4
- package/dist/components/spinner/index.cjs +16 -0
- package/dist/components/spinner/index.d.cts +104 -0
- package/dist/components/spinner/index.d.ts +104 -0
- package/dist/components/spinner/index.js +16 -0
- package/dist/components/switch/index.cjs +6 -4
- package/dist/components/switch/index.d.cts +1 -1
- package/dist/components/switch/index.d.ts +1 -1
- package/dist/components/switch/index.js +5 -3
- package/dist/components/text-area/index.cjs +5 -4
- package/dist/components/text-area/index.js +4 -3
- package/dist/components/typography/index.cjs +4 -3
- package/dist/components/typography/index.d.cts +1 -1
- package/dist/components/typography/index.d.ts +1 -1
- package/dist/components/typography/index.js +3 -2
- package/dist/components/view/index.cjs +4 -3
- package/dist/components/view/index.js +3 -2
- package/dist/{create-recipe-DUo8doTt.d.ts → create-recipe-BdVd2ffi.d.ts} +1 -1
- package/dist/{create-recipe-CWvI5ot3.d.cts → create-recipe-dC7wMfnj.d.cts} +1 -1
- package/dist/{icon.type-Dq4_qePa.d.ts → icon.type-Kml72iSz.d.ts} +1 -1
- package/dist/{icon.type-CF4KiMKl.d.cts → icon.type-d_i9ma-i.d.cts} +1 -1
- package/dist/index.cjs +39 -37
- package/dist/index.d.cts +24 -4
- package/dist/index.d.ts +24 -4
- package/dist/index.js +73 -71
- package/dist/system/index.cjs +11 -8
- package/dist/system/index.d.cts +4 -4
- package/dist/system/index.d.ts +4 -4
- package/dist/system/index.js +11 -8
- package/package.json +11 -1
- package/dist/chunk-E25JH7W2.cjs +0 -456
|
@@ -1,26 +1,6 @@
|
|
|
1
|
-
import { Slot, createSlotContext, useStyleProps } from "./chunk-PMO62QK4.js";
|
|
2
1
|
import { contrastOn, isHex, useXAUITheme } from "./chunk-A3EGFI6T.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { useCallback, useRef, useState } from "react";
|
|
6
|
-
function usePressState(handlers = {}) {
|
|
7
|
-
const [isPressed, setIsPressed] = useState(false);
|
|
8
|
-
const latest = useRef(handlers);
|
|
9
|
-
latest.current = handlers;
|
|
10
|
-
const onPressIn = useCallback(event => {
|
|
11
|
-
setIsPressed(true);
|
|
12
|
-
latest.current.onPressIn?.(event);
|
|
13
|
-
}, []);
|
|
14
|
-
const onPressOut = useCallback(event => {
|
|
15
|
-
setIsPressed(false);
|
|
16
|
-
latest.current.onPressOut?.(event);
|
|
17
|
-
}, []);
|
|
18
|
-
const press = useRef({
|
|
19
|
-
onPressIn,
|
|
20
|
-
onPressOut
|
|
21
|
-
}).current;
|
|
22
|
-
return [isPressed, press];
|
|
23
|
-
}
|
|
2
|
+
import { Slot, createSlotContext } from "./chunk-E2CWBQTV.js";
|
|
3
|
+
import { useStyleProps } from "./chunk-URSKA2VR.js";
|
|
24
4
|
|
|
25
5
|
// src/system/pressable-feedback/pressable-feedback-context.ts
|
|
26
6
|
import { createContext } from "react";
|
|
@@ -31,13 +11,13 @@ var DisableAllContext = createContext(false);
|
|
|
31
11
|
var PRESS_SCALE = 0.985;
|
|
32
12
|
var PRESS_DURATION = 300;
|
|
33
13
|
var SCALE_REFERENCE_WIDTH = 300;
|
|
34
|
-
const
|
|
35
|
-
code: "function
|
|
36
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
37
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
14
|
+
const _worklet_17312197456628_init_data = {
|
|
15
|
+
code: "function pressScaleFor_chunkBFMTUMTUJs1(width){const{SCALE_REFERENCE_WIDTH,PRESS_SCALE}=this.__closure;const coefficient=width>0?SCALE_REFERENCE_WIDTH/width:1;return 1-(1-PRESS_SCALE)*coefficient;}",
|
|
16
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-BFMTUMTU.js",
|
|
17
|
+
sourceMap: "{\"version\":3,\"names\":[\"pressScaleFor_chunkBFMTUMTUJs1\",\"width\",\"SCALE_REFERENCE_WIDTH\",\"PRESS_SCALE\",\"__closure\",\"coefficient\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-BFMTUMTU.js\"],\"mappings\":\"AAsBA,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\":[]}"
|
|
38
18
|
};
|
|
39
|
-
const pressScaleFor = function
|
|
40
|
-
|
|
19
|
+
const pressScaleFor = function pressScaleFor_chunkBFMTUMTUJs1Factory({
|
|
20
|
+
_worklet_17312197456628_init_data,
|
|
41
21
|
SCALE_REFERENCE_WIDTH,
|
|
42
22
|
PRESS_SCALE
|
|
43
23
|
}) {
|
|
@@ -50,13 +30,13 @@ const pressScaleFor = function pressScaleFor_chunk4HELPMAKJs1Factory({
|
|
|
50
30
|
SCALE_REFERENCE_WIDTH,
|
|
51
31
|
PRESS_SCALE
|
|
52
32
|
};
|
|
53
|
-
pressScaleFor.__workletHash =
|
|
33
|
+
pressScaleFor.__workletHash = 17312197456628;
|
|
54
34
|
pressScaleFor.__pluginVersion = "0.7.4";
|
|
55
|
-
pressScaleFor.__initData =
|
|
35
|
+
pressScaleFor.__initData = _worklet_17312197456628_init_data;
|
|
56
36
|
pressScaleFor.__stackDetails = _e;
|
|
57
37
|
return pressScaleFor;
|
|
58
38
|
}({
|
|
59
|
-
|
|
39
|
+
_worklet_17312197456628_init_data,
|
|
60
40
|
SCALE_REFERENCE_WIDTH,
|
|
61
41
|
PRESS_SCALE
|
|
62
42
|
});
|
|
@@ -69,26 +49,26 @@ var RIPPLE_CONFIRM_DURATION = 225;
|
|
|
69
49
|
var RIPPLE_FADE_IN = 75;
|
|
70
50
|
var RIPPLE_FADE_OUT_DELAY = 225;
|
|
71
51
|
var RIPPLE_FADE_OUT = 150;
|
|
72
|
-
const
|
|
73
|
-
code: "function
|
|
74
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
75
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
52
|
+
const _worklet_549142897807_init_data = {
|
|
53
|
+
code: "function rippleRadiusFor_chunkBFMTUMTUJs2(width,height){return Math.sqrt(width*width+height*height)/2+5;}",
|
|
54
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-BFMTUMTU.js",
|
|
55
|
+
sourceMap: "{\"version\":3,\"names\":[\"rippleRadiusFor_chunkBFMTUMTUJs2\",\"width\",\"height\",\"Math\",\"sqrt\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-BFMTUMTU.js\"],\"mappings\":\"AAoCA,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\":[]}"
|
|
76
56
|
};
|
|
77
|
-
const rippleRadiusFor = function
|
|
78
|
-
|
|
57
|
+
const rippleRadiusFor = function rippleRadiusFor_chunkBFMTUMTUJs2Factory({
|
|
58
|
+
_worklet_549142897807_init_data
|
|
79
59
|
}) {
|
|
80
60
|
const _e = [new global.Error(), 1, -27];
|
|
81
61
|
const rippleRadiusFor = function (width, height) {
|
|
82
62
|
return Math.sqrt(width * width + height * height) / 2 + 5;
|
|
83
63
|
};
|
|
84
64
|
rippleRadiusFor.__closure = {};
|
|
85
|
-
rippleRadiusFor.__workletHash =
|
|
65
|
+
rippleRadiusFor.__workletHash = 549142897807;
|
|
86
66
|
rippleRadiusFor.__pluginVersion = "0.7.4";
|
|
87
|
-
rippleRadiusFor.__initData =
|
|
67
|
+
rippleRadiusFor.__initData = _worklet_549142897807_init_data;
|
|
88
68
|
rippleRadiusFor.__stackDetails = _e;
|
|
89
69
|
return rippleRadiusFor;
|
|
90
70
|
}({
|
|
91
|
-
|
|
71
|
+
_worklet_549142897807_init_data
|
|
92
72
|
});
|
|
93
73
|
var ALL_OFF = {
|
|
94
74
|
scale: false,
|
|
@@ -191,7 +171,7 @@ function feedbackChildren(children, asChild) {
|
|
|
191
171
|
}
|
|
192
172
|
|
|
193
173
|
// src/system/pressable-feedback/pressable-feedback.tsx
|
|
194
|
-
import { forwardRef, useContext, useEffect, useMemo, useRef
|
|
174
|
+
import { forwardRef, useContext, useEffect, useMemo, useRef } from "react";
|
|
195
175
|
import { Pressable, StyleSheet } from "react-native";
|
|
196
176
|
import Animated, { Easing, useAnimatedStyle, useDerivedValue, useSharedValue, withDelay, withTiming } from "react-native-reanimated";
|
|
197
177
|
|
|
@@ -262,15 +242,15 @@ var StaticFeedback = forwardRef(function StaticFeedback2({
|
|
|
262
242
|
})
|
|
263
243
|
});
|
|
264
244
|
});
|
|
265
|
-
const
|
|
266
|
-
code: "function
|
|
267
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
268
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
245
|
+
const _worklet_12010692297274_init_data = {
|
|
246
|
+
code: "function chunkBFMTUMTUJs3(){const{pressScaleFor,size}=this.__closure;return pressScaleFor(size.value.width);}",
|
|
247
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-BFMTUMTU.js",
|
|
248
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkBFMTUMTUJs3\",\"pressScaleFor\",\"size\",\"__closure\",\"value\",\"width\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-BFMTUMTU.js\"],\"mappings\":\"AAkNuC,SAAAA,iBAAA,QAAAC,aAAA,CAAAC,IAAA,OAAAC,SAAA,OAAM,CAAAF,aAAc,CAAAC,IAAK,CAAAE,KAAM,CAAAC,KAAK\",\"ignoreList\":[]}"
|
|
269
249
|
};
|
|
270
|
-
const
|
|
271
|
-
code: "function
|
|
272
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
273
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
250
|
+
const _worklet_10297242211818_init_data = {
|
|
251
|
+
code: "function chunkBFMTUMTUJs4(){const{animation,pressedScale,progress}=this.__closure;if(!animation.scale)return{};return{transform:[{scale:1-(1-pressedScale.value)*progress.value}]};}",
|
|
252
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-BFMTUMTU.js",
|
|
253
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkBFMTUMTUJs4\",\"animation\",\"pressedScale\",\"progress\",\"__closure\",\"scale\",\"transform\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-BFMTUMTU.js\"],\"mappings\":\"AAmNyC,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\":[]}"
|
|
274
254
|
};
|
|
275
255
|
var AnimatedFeedback = forwardRef(function AnimatedFeedback2({
|
|
276
256
|
isPressed = false,
|
|
@@ -291,42 +271,42 @@ var AnimatedFeedback = forwardRef(function AnimatedFeedback2({
|
|
|
291
271
|
height: 0
|
|
292
272
|
});
|
|
293
273
|
const waves = [useWave(), useWave()];
|
|
294
|
-
const nextWave =
|
|
274
|
+
const nextWave = useRef(0);
|
|
295
275
|
useEffect(() => {
|
|
296
276
|
progress.value = withTiming(isPressed ? 1 : 0, {
|
|
297
277
|
duration: PRESS_DURATION,
|
|
298
278
|
easing: Easing.out(Easing.ease)
|
|
299
279
|
});
|
|
300
280
|
}, [isPressed, progress]);
|
|
301
|
-
const pressedScale = useDerivedValue(function
|
|
302
|
-
|
|
281
|
+
const pressedScale = useDerivedValue(function chunkBFMTUMTUJs3Factory({
|
|
282
|
+
_worklet_12010692297274_init_data,
|
|
303
283
|
pressScaleFor,
|
|
304
284
|
size
|
|
305
285
|
}) {
|
|
306
286
|
const _e = [new global.Error(), -3, -27];
|
|
307
|
-
const
|
|
308
|
-
|
|
287
|
+
const chunkBFMTUMTUJs3 = () => pressScaleFor(size.value.width);
|
|
288
|
+
chunkBFMTUMTUJs3.__closure = {
|
|
309
289
|
pressScaleFor,
|
|
310
290
|
size
|
|
311
291
|
};
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
return
|
|
292
|
+
chunkBFMTUMTUJs3.__workletHash = 12010692297274;
|
|
293
|
+
chunkBFMTUMTUJs3.__pluginVersion = "0.7.4";
|
|
294
|
+
chunkBFMTUMTUJs3.__initData = _worklet_12010692297274_init_data;
|
|
295
|
+
chunkBFMTUMTUJs3.__stackDetails = _e;
|
|
296
|
+
return chunkBFMTUMTUJs3;
|
|
317
297
|
}({
|
|
318
|
-
|
|
298
|
+
_worklet_12010692297274_init_data,
|
|
319
299
|
pressScaleFor,
|
|
320
300
|
size
|
|
321
301
|
}));
|
|
322
|
-
const animatedStyle = useAnimatedStyle(function
|
|
323
|
-
|
|
302
|
+
const animatedStyle = useAnimatedStyle(function chunkBFMTUMTUJs4Factory({
|
|
303
|
+
_worklet_10297242211818_init_data,
|
|
324
304
|
animation,
|
|
325
305
|
pressedScale,
|
|
326
306
|
progress
|
|
327
307
|
}) {
|
|
328
308
|
const _e = [new global.Error(), -4, -27];
|
|
329
|
-
const
|
|
309
|
+
const chunkBFMTUMTUJs4 = function () {
|
|
330
310
|
if (!animation.scale) return {};
|
|
331
311
|
return {
|
|
332
312
|
transform: [{
|
|
@@ -334,18 +314,18 @@ var AnimatedFeedback = forwardRef(function AnimatedFeedback2({
|
|
|
334
314
|
}]
|
|
335
315
|
};
|
|
336
316
|
};
|
|
337
|
-
|
|
317
|
+
chunkBFMTUMTUJs4.__closure = {
|
|
338
318
|
animation,
|
|
339
319
|
pressedScale,
|
|
340
320
|
progress
|
|
341
321
|
};
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
return
|
|
322
|
+
chunkBFMTUMTUJs4.__workletHash = 10297242211818;
|
|
323
|
+
chunkBFMTUMTUJs4.__pluginVersion = "0.7.4";
|
|
324
|
+
chunkBFMTUMTUJs4.__initData = _worklet_10297242211818_init_data;
|
|
325
|
+
chunkBFMTUMTUJs4.__stackDetails = _e;
|
|
326
|
+
return chunkBFMTUMTUJs4;
|
|
347
327
|
}({
|
|
348
|
-
|
|
328
|
+
_worklet_10297242211818_init_data,
|
|
349
329
|
animation,
|
|
350
330
|
pressedScale,
|
|
351
331
|
progress
|
|
@@ -490,10 +470,10 @@ function PressableFeedbackHighlight({
|
|
|
490
470
|
}
|
|
491
471
|
PressableFeedbackHighlight.displayName = "XAUI.PressableFeedback.Highlight";
|
|
492
472
|
markOverlay(PressableFeedbackHighlight);
|
|
493
|
-
const
|
|
494
|
-
code: "function
|
|
495
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
496
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
473
|
+
const _worklet_16955843926426_init_data = {
|
|
474
|
+
code: "function chunkBFMTUMTUJs5(){const{shown,opacity}=this.__closure;return{opacity:shown.value*opacity};}",
|
|
475
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-BFMTUMTU.js",
|
|
476
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkBFMTUMTUJs5\",\"shown\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-BFMTUMTU.js\"],\"mappings\":\"AAiW0C,SAAAA,gBAAMA,CAAA,QAAAC,KAAA,CAAAC,OAAA,OAAAC,SAAA,CAE5C,MAAO,CAAED,OAAO,CAAED,KAAK,CAACG,KAAK,CAAGF,OAAQ,CAAC,CAC3C\",\"ignoreList\":[]}"
|
|
497
477
|
};
|
|
498
478
|
function AnimatedHighlight({
|
|
499
479
|
base,
|
|
@@ -509,28 +489,28 @@ function AnimatedHighlight({
|
|
|
509
489
|
duration
|
|
510
490
|
});
|
|
511
491
|
}, [isPressed, shown, duration]);
|
|
512
|
-
const animatedStyle = useAnimatedStyle2(function
|
|
513
|
-
|
|
492
|
+
const animatedStyle = useAnimatedStyle2(function chunkBFMTUMTUJs5Factory({
|
|
493
|
+
_worklet_16955843926426_init_data,
|
|
514
494
|
shown,
|
|
515
495
|
opacity
|
|
516
496
|
}) {
|
|
517
497
|
const _e = [new global.Error(), -3, -27];
|
|
518
|
-
const
|
|
498
|
+
const chunkBFMTUMTUJs5 = function () {
|
|
519
499
|
return {
|
|
520
500
|
opacity: shown.value * opacity
|
|
521
501
|
};
|
|
522
502
|
};
|
|
523
|
-
|
|
503
|
+
chunkBFMTUMTUJs5.__closure = {
|
|
524
504
|
shown,
|
|
525
505
|
opacity
|
|
526
506
|
};
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
return
|
|
507
|
+
chunkBFMTUMTUJs5.__workletHash = 16955843926426;
|
|
508
|
+
chunkBFMTUMTUJs5.__pluginVersion = "0.7.4";
|
|
509
|
+
chunkBFMTUMTUJs5.__initData = _worklet_16955843926426_init_data;
|
|
510
|
+
chunkBFMTUMTUJs5.__stackDetails = _e;
|
|
511
|
+
return chunkBFMTUMTUJs5;
|
|
532
512
|
}({
|
|
533
|
-
|
|
513
|
+
_worklet_16955843926426_init_data,
|
|
534
514
|
shown,
|
|
535
515
|
opacity
|
|
536
516
|
}), [shown, opacity]);
|
|
@@ -540,7 +520,7 @@ function AnimatedHighlight({
|
|
|
540
520
|
}
|
|
541
521
|
|
|
542
522
|
// src/system/pressable-feedback/pressable-feedback-ripple.tsx
|
|
543
|
-
import { useState
|
|
523
|
+
import { useState } from "react";
|
|
544
524
|
import { StyleSheet as StyleSheet3, View as View3 } from "react-native";
|
|
545
525
|
import Animated3, { useAnimatedStyle as useAnimatedStyle3 } from "react-native-reanimated";
|
|
546
526
|
import { Fragment as Fragment3, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
@@ -559,7 +539,7 @@ function PressableFeedbackRipple({
|
|
|
559
539
|
const [styleProps] = useStyleProps(props);
|
|
560
540
|
const waveStyle = [styleProps, style];
|
|
561
541
|
const settings = resolveSlotAnimation(override, animation.ripple, RIPPLE_OPACITY);
|
|
562
|
-
const [size, setSize] =
|
|
542
|
+
const [size, setSize] = useState({
|
|
563
543
|
width: 0,
|
|
564
544
|
height: 0
|
|
565
545
|
});
|
|
@@ -597,10 +577,10 @@ function PressableFeedbackRipple({
|
|
|
597
577
|
}
|
|
598
578
|
PressableFeedbackRipple.displayName = "XAUI.PressableFeedback.Ripple";
|
|
599
579
|
markOverlay(PressableFeedbackRipple);
|
|
600
|
-
const
|
|
601
|
-
code: "function
|
|
602
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
603
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
580
|
+
const _worklet_3850855000277_init_data = {
|
|
581
|
+
code: "function chunkBFMTUMTUJs6(){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}]};}",
|
|
582
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-BFMTUMTU.js",
|
|
583
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkBFMTUMTUJs6\",\"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-BFMTUMTU.js\"],\"mappings\":\"AAia0C,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\":[]}"
|
|
604
584
|
};
|
|
605
585
|
function RippleWave({
|
|
606
586
|
wave,
|
|
@@ -610,8 +590,8 @@ function RippleWave({
|
|
|
610
590
|
opacity,
|
|
611
591
|
style
|
|
612
592
|
}) {
|
|
613
|
-
const animatedStyle = useAnimatedStyle3(function
|
|
614
|
-
|
|
593
|
+
const animatedStyle = useAnimatedStyle3(function chunkBFMTUMTUJs6Factory({
|
|
594
|
+
_worklet_3850855000277_init_data,
|
|
615
595
|
wave,
|
|
616
596
|
RIPPLE_START_SCALE,
|
|
617
597
|
center,
|
|
@@ -619,7 +599,7 @@ function RippleWave({
|
|
|
619
599
|
radius
|
|
620
600
|
}) {
|
|
621
601
|
const _e = [new global.Error(), -6, -27];
|
|
622
|
-
const
|
|
602
|
+
const chunkBFMTUMTUJs6 = function () {
|
|
623
603
|
const t = wave.expand.value;
|
|
624
604
|
const from = wave.origin.value;
|
|
625
605
|
const scale = RIPPLE_START_SCALE + (1 - RIPPLE_START_SCALE) * t;
|
|
@@ -637,20 +617,20 @@ function RippleWave({
|
|
|
637
617
|
}]
|
|
638
618
|
};
|
|
639
619
|
};
|
|
640
|
-
|
|
620
|
+
chunkBFMTUMTUJs6.__closure = {
|
|
641
621
|
wave,
|
|
642
622
|
RIPPLE_START_SCALE,
|
|
643
623
|
center,
|
|
644
624
|
opacity,
|
|
645
625
|
radius
|
|
646
626
|
};
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
return
|
|
627
|
+
chunkBFMTUMTUJs6.__workletHash = 3850855000277;
|
|
628
|
+
chunkBFMTUMTUJs6.__pluginVersion = "0.7.4";
|
|
629
|
+
chunkBFMTUMTUJs6.__initData = _worklet_3850855000277_init_data;
|
|
630
|
+
chunkBFMTUMTUJs6.__stackDetails = _e;
|
|
631
|
+
return chunkBFMTUMTUJs6;
|
|
652
632
|
}({
|
|
653
|
-
|
|
633
|
+
_worklet_3850855000277_init_data,
|
|
654
634
|
wave,
|
|
655
635
|
RIPPLE_START_SCALE,
|
|
656
636
|
center,
|
|
@@ -686,4 +666,4 @@ var PressableFeedback3 = Object.assign(PressableFeedback, {
|
|
|
686
666
|
Highlight: PressableFeedbackHighlight,
|
|
687
667
|
Ripple: PressableFeedbackRipple
|
|
688
668
|
});
|
|
689
|
-
export {
|
|
669
|
+
export { 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 };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { mergeRefs } from "./chunk-URSKA2VR.js";
|
|
2
|
+
|
|
3
|
+
// src/hooks/use-merged-ref.ts
|
|
4
|
+
import { useMemo } from "react";
|
|
5
|
+
function useMergedRef(...refs) {
|
|
6
|
+
return useMemo(() => mergeRefs(...refs), refs);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// src/hooks/use-previous.ts
|
|
10
|
+
import { useEffect, useRef } from "react";
|
|
11
|
+
function usePrevious(value) {
|
|
12
|
+
const previous = useRef(void 0);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
previous.current = value;
|
|
15
|
+
}, [value]);
|
|
16
|
+
return previous.current;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// src/hooks/use-rotation.ts
|
|
20
|
+
import { useEffect as useEffect2 } from "react";
|
|
21
|
+
import { Easing, cancelAnimation, useAnimatedStyle, useSharedValue, withRepeat, withTiming } from "react-native-reanimated";
|
|
22
|
+
var ROTATION_DURATION = 900;
|
|
23
|
+
const _worklet_9664866718948_init_data = {
|
|
24
|
+
code: "function chunkBVJQ3UPZJs1(){const{angle}=this.__closure;return{transform:[{rotate:angle.value+\"deg\"}]};}",
|
|
25
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-BVJQ3UPZ.js",
|
|
26
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkBVJQ3UPZJs1\",\"angle\",\"__closure\",\"transform\",\"rotate\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-BVJQ3UPZ.js\"],\"mappings\":\"AAyC0B,SAAAA,gBAAMA,CAAA,QAAAC,KAAA,OAAAC,SAAA,CAE5B,MAAO,CAAEC,SAAS,CAAE,CAAC,CAAEC,MAAM,CAAKH,KAAK,CAACI,KAAK,MAAM,CAAC,CAAE,CAAC,CACzD\",\"ignoreList\":[]}"
|
|
27
|
+
};
|
|
28
|
+
function useRotation() {
|
|
29
|
+
const angle = useSharedValue(0);
|
|
30
|
+
useEffect2(() => {
|
|
31
|
+
angle.value = withRepeat(withTiming(360, {
|
|
32
|
+
duration: ROTATION_DURATION,
|
|
33
|
+
easing: Easing.linear
|
|
34
|
+
}), -1, false);
|
|
35
|
+
return () => cancelAnimation(angle);
|
|
36
|
+
}, [angle]);
|
|
37
|
+
return useAnimatedStyle(function chunkBVJQ3UPZJs1Factory({
|
|
38
|
+
_worklet_9664866718948_init_data,
|
|
39
|
+
angle
|
|
40
|
+
}) {
|
|
41
|
+
const _e = [new global.Error(), -2, -27];
|
|
42
|
+
const chunkBVJQ3UPZJs1 = function () {
|
|
43
|
+
return {
|
|
44
|
+
transform: [{
|
|
45
|
+
rotate: `${angle.value}deg`
|
|
46
|
+
}]
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
chunkBVJQ3UPZJs1.__closure = {
|
|
50
|
+
angle
|
|
51
|
+
};
|
|
52
|
+
chunkBVJQ3UPZJs1.__workletHash = 9664866718948;
|
|
53
|
+
chunkBVJQ3UPZJs1.__pluginVersion = "0.7.4";
|
|
54
|
+
chunkBVJQ3UPZJs1.__initData = _worklet_9664866718948_init_data;
|
|
55
|
+
chunkBVJQ3UPZJs1.__stackDetails = _e;
|
|
56
|
+
return chunkBVJQ3UPZJs1;
|
|
57
|
+
}({
|
|
58
|
+
_worklet_9664866718948_init_data,
|
|
59
|
+
angle
|
|
60
|
+
}), [angle]);
|
|
61
|
+
}
|
|
62
|
+
export { useMergedRef, usePrevious, ROTATION_DURATION, useRotation };
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Icon
|
|
3
|
-
} from "./chunk-ICR42HHG.js";
|
|
4
1
|
import {
|
|
5
2
|
InputField,
|
|
6
3
|
useInput
|
|
7
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-A5OCK3C2.js";
|
|
5
|
+
import {
|
|
6
|
+
Icon
|
|
7
|
+
} from "./chunk-3FV4COTM.js";
|
|
8
8
|
import {
|
|
9
9
|
Slot,
|
|
10
|
-
createSlotContext
|
|
10
|
+
createSlotContext
|
|
11
|
+
} from "./chunk-E2CWBQTV.js";
|
|
12
|
+
import {
|
|
11
13
|
useStyleProps
|
|
12
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-URSKA2VR.js";
|
|
13
15
|
|
|
14
16
|
// src/components/input-group/input-group-field.tsx
|
|
15
17
|
import { forwardRef, useMemo } from "react";
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import {
|
|
2
|
+
mergeRefs
|
|
3
|
+
} from "./chunk-URSKA2VR.js";
|
|
4
|
+
|
|
5
|
+
// src/system/slot/create-slot-context.ts
|
|
6
|
+
import { createContext, useContext } from "react";
|
|
7
|
+
function createSlotContext(name) {
|
|
8
|
+
const Context = createContext(null);
|
|
9
|
+
Context.displayName = `XAUI.${name}.Context`;
|
|
10
|
+
function useSlotContext() {
|
|
11
|
+
const value = useContext(Context);
|
|
12
|
+
if (value === null) {
|
|
13
|
+
const error = new Error(
|
|
14
|
+
`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.`
|
|
15
|
+
);
|
|
16
|
+
Error.captureStackTrace?.(
|
|
17
|
+
error,
|
|
18
|
+
useSlotContext
|
|
19
|
+
);
|
|
20
|
+
throw error;
|
|
21
|
+
}
|
|
22
|
+
return value;
|
|
23
|
+
}
|
|
24
|
+
return [Context.Provider, useSlotContext];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// src/system/slot/merge-props.ts
|
|
28
|
+
var EVENT_HANDLER = /^on[A-Z]/;
|
|
29
|
+
function mergeProps(ours, theirs) {
|
|
30
|
+
const merged = { ...ours };
|
|
31
|
+
for (const key of Object.keys(theirs)) {
|
|
32
|
+
const ourValue = ours[key];
|
|
33
|
+
const theirValue = theirs[key];
|
|
34
|
+
if (EVENT_HANDLER.test(key)) {
|
|
35
|
+
merged[key] = composeHandlers(ourValue, theirValue);
|
|
36
|
+
} else if (key === "style") {
|
|
37
|
+
merged[key] = mergeStyles(ourValue, theirValue);
|
|
38
|
+
} else if (key === "ref") {
|
|
39
|
+
merged[key] = mergeRefs(
|
|
40
|
+
ourValue,
|
|
41
|
+
theirValue
|
|
42
|
+
);
|
|
43
|
+
} else {
|
|
44
|
+
merged[key] = theirValue;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return merged;
|
|
48
|
+
}
|
|
49
|
+
function composeHandlers(ours, theirs) {
|
|
50
|
+
if (typeof ours !== "function") return theirs;
|
|
51
|
+
if (typeof theirs !== "function") return ours;
|
|
52
|
+
return (...args) => {
|
|
53
|
+
;
|
|
54
|
+
ours(...args);
|
|
55
|
+
return theirs(...args);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function mergeStyles(ours, theirs) {
|
|
59
|
+
if (typeof ours === "function" || typeof theirs === "function") {
|
|
60
|
+
return (state) => [
|
|
61
|
+
resolveStyle(ours, state),
|
|
62
|
+
resolveStyle(theirs, state)
|
|
63
|
+
];
|
|
64
|
+
}
|
|
65
|
+
return [ours, theirs];
|
|
66
|
+
}
|
|
67
|
+
function resolveStyle(style, state) {
|
|
68
|
+
return typeof style === "function" ? style(state) : style;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// src/system/slot/slot.tsx
|
|
72
|
+
import { cloneElement, forwardRef, isValidElement } from "react";
|
|
73
|
+
var Slot = forwardRef(function Slot2({ children, ...ours }, ref) {
|
|
74
|
+
if (!isValidElement(children)) {
|
|
75
|
+
throw new Error(
|
|
76
|
+
"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."
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
const child = children;
|
|
80
|
+
const merged = mergeProps(ours, child.props);
|
|
81
|
+
merged.ref = mergeRefs(ref, refOf(child));
|
|
82
|
+
return cloneElement(child, merged);
|
|
83
|
+
});
|
|
84
|
+
Slot.displayName = "XAUI.Slot";
|
|
85
|
+
function refOf(element) {
|
|
86
|
+
const fromProps = element.props.ref;
|
|
87
|
+
const fromElement = element.ref;
|
|
88
|
+
return fromProps ?? fromElement;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// src/system/slot/children-to-string.ts
|
|
92
|
+
import { isValidElement as isValidElement2 } from "react";
|
|
93
|
+
function childrenToString(children) {
|
|
94
|
+
const text = stringify(children);
|
|
95
|
+
return text === null || text === "" ? null : text;
|
|
96
|
+
}
|
|
97
|
+
function stringify(node) {
|
|
98
|
+
if (node === null || node === void 0 || typeof node === "boolean") return "";
|
|
99
|
+
if (typeof node === "string") return node;
|
|
100
|
+
if (typeof node === "number") return String(node);
|
|
101
|
+
if (isValidElement2(node)) return null;
|
|
102
|
+
if (Array.isArray(node)) {
|
|
103
|
+
let text = "";
|
|
104
|
+
for (const child of node) {
|
|
105
|
+
const part = stringify(child);
|
|
106
|
+
if (part === null) return null;
|
|
107
|
+
text += part;
|
|
108
|
+
}
|
|
109
|
+
return text;
|
|
110
|
+
}
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export {
|
|
115
|
+
createSlotContext,
|
|
116
|
+
mergeProps,
|
|
117
|
+
Slot,
|
|
118
|
+
childrenToString
|
|
119
|
+
};
|