@xaui/native 0.9.1-alpha.21 → 0.9.1-alpha.22
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-RMLFMRWL.js → chunk-2U6JR7BF.js} +5 -5
- package/dist/{chunk-N7C4UNUL.js → chunk-3JATAB7S.js} +23 -1
- package/dist/chunk-4MHJOWM4.cjs +364 -0
- package/dist/{chunk-2WMVDMFV.cjs → chunk-6HXWQ5AU.cjs} +2 -2
- package/dist/chunk-6WW4CSPY.cjs +82 -0
- package/dist/chunk-AHL33YAO.js +425 -0
- package/dist/{chunk-XHZBXYVU.js → chunk-AKXG43S4.js} +1 -1
- package/dist/{chunk-4NE3SLTM.cjs → chunk-BH5DSJVX.cjs} +102 -73
- package/dist/{chunk-BPBY7ON7.cjs → chunk-BNWS26PX.cjs} +19 -21
- package/dist/{chunk-5LC6KVL3.cjs → chunk-DXGQ43IV.cjs} +3 -3
- package/dist/{chunk-ISVUXVFL.js → chunk-FNQF4KQV.js} +19 -71
- package/dist/{chunk-YRCUALUQ.js → chunk-FTCTTBLG.js} +7 -9
- package/dist/{chunk-JL27KVRT.js → chunk-FVP5FUVS.js} +3 -3
- package/dist/{chunk-UL263KGM.cjs → chunk-GBPWTFTU.cjs} +10 -10
- package/dist/{chunk-TUJBDS5M.js → chunk-GG2WWCBK.js} +10 -10
- package/dist/{chunk-EVXZGNPA.cjs → chunk-HUZ4AUM2.cjs} +98 -98
- package/dist/chunk-I6PE5UUH.cjs +425 -0
- package/dist/{chunk-33QILJJH.cjs → chunk-IBEX4XGV.cjs} +11 -11
- package/dist/{chunk-IBRVMLUF.js → chunk-KM2TI5IC.js} +107 -80
- package/dist/chunk-OGC4RKE3.js +364 -0
- package/dist/{chunk-JXLRHKCQ.js → chunk-OYZYWWJ6.js} +1 -1
- package/dist/{chunk-EXX6ATAS.js → chunk-PMO62QK4.js} +101 -101
- package/dist/{chunk-UBA6AEY6.cjs → chunk-RAWOJ3N3.cjs} +8 -8
- package/dist/{chunk-APCBIHLR.cjs → chunk-VDRRD6GM.cjs} +29 -81
- package/dist/{chunk-UVO4GFSW.cjs → chunk-YXVKQMCK.cjs} +23 -1
- package/dist/chunk-ZQ3JSWRO.js +82 -0
- package/dist/close-button.type-BUYuoSt2.d.ts +36 -0
- package/dist/close-button.type-CHsgZ3wO.d.cts +36 -0
- package/dist/components/alert/index.cjs +17 -0
- package/dist/components/alert/index.d.cts +169 -0
- package/dist/components/alert/index.d.ts +169 -0
- package/dist/components/alert/index.js +17 -0
- package/dist/components/button/index.cjs +6 -7
- package/dist/components/button/index.d.cts +193 -244
- package/dist/components/button/index.d.ts +193 -244
- package/dist/components/button/index.js +5 -6
- package/dist/components/card/index.cjs +5 -6
- package/dist/components/card/index.d.cts +193 -193
- package/dist/components/card/index.d.ts +193 -193
- package/dist/components/card/index.js +4 -5
- package/dist/components/chip/index.cjs +17 -0
- package/dist/components/chip/index.d.cts +608 -0
- package/dist/components/chip/index.d.ts +608 -0
- package/dist/components/chip/index.js +17 -0
- package/dist/components/typography/index.cjs +4 -4
- package/dist/components/typography/index.d.cts +4 -4
- package/dist/components/typography/index.d.ts +4 -4
- package/dist/components/typography/index.js +3 -3
- package/dist/components/view/index.cjs +3 -3
- package/dist/components/view/index.d.cts +7 -7
- package/dist/components/view/index.d.ts +7 -7
- package/dist/components/view/index.js +2 -2
- package/dist/{create-recipe-CC3NNCqF.d.ts → create-recipe-CbXika57.d.ts} +4 -3
- package/dist/{create-recipe-CPBFg7ym.d.cts → create-recipe-jHlk434p.d.cts} +4 -3
- package/dist/{icon.type-Cs1tMX0W.d.cts → icon.type-CF4KiMKl.d.cts} +1 -1
- package/dist/{icon.type-BkcEPJbK.d.ts → icon.type-Dq4_qePa.d.ts} +1 -1
- package/dist/index.cjs +36 -14
- package/dist/index.d.cts +8 -5
- package/dist/index.d.ts +8 -5
- package/dist/index.js +55 -33
- package/dist/{pressable-feedback.type-wfeiJz5m.d.cts → pressable-feedback.type-BA2C9sSz.d.cts} +1 -1
- package/dist/{pressable-feedback.type-DsvWZXWC.d.ts → pressable-feedback.type-Bs4dQlGj.d.ts} +1 -1
- package/dist/{style-props.type-B1BG5TCm.d.cts → style-props.type-CfnoGEP7.d.cts} +1 -1
- package/dist/{style-props.type-B1BG5TCm.d.ts → style-props.type-CfnoGEP7.d.ts} +1 -1
- package/dist/system/index.cjs +15 -7
- package/dist/system/index.d.cts +174 -100
- package/dist/system/index.d.ts +174 -100
- package/dist/system/index.js +15 -7
- package/dist/theme/index.cjs +2 -2
- package/dist/theme/index.d.cts +10 -10
- package/dist/theme/index.d.ts +10 -10
- package/dist/theme/index.js +1 -1
- package/package.json +21 -1
- package/dist/chunk-RRRGLRRP.cjs +0 -28
- package/dist/chunk-SGHP76GU.js +0 -28
|
@@ -1,5 +1,26 @@
|
|
|
1
|
-
import { Slot, createSlotContext, useStyleProps } from "./chunk-EXX6ATAS.js";
|
|
2
1
|
import { contrastOn, isHex, useXAUITheme } from "./chunk-A3EGFI6T.js";
|
|
2
|
+
import { Slot, createSlotContext, useStyleProps } from "./chunk-PMO62QK4.js";
|
|
3
|
+
|
|
4
|
+
// src/hooks/use-press-state.ts
|
|
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
|
+
}
|
|
3
24
|
|
|
4
25
|
// src/system/pressable-feedback/pressable-feedback-context.ts
|
|
5
26
|
import { createContext } from "react";
|
|
@@ -10,13 +31,13 @@ var DisableAllContext = createContext(false);
|
|
|
10
31
|
var PRESS_SCALE = 0.985;
|
|
11
32
|
var PRESS_DURATION = 300;
|
|
12
33
|
var SCALE_REFERENCE_WIDTH = 300;
|
|
13
|
-
const
|
|
14
|
-
code: "function
|
|
15
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
16
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
34
|
+
const _worklet_17352996968518_init_data = {
|
|
35
|
+
code: "function pressScaleFor_chunkKM2TI5ICJs1(width){const{SCALE_REFERENCE_WIDTH,PRESS_SCALE}=this.__closure;const coefficient=width>0?SCALE_REFERENCE_WIDTH/width:1;return 1-(1-PRESS_SCALE)*coefficient;}",
|
|
36
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-KM2TI5IC.js",
|
|
37
|
+
sourceMap: "{\"version\":3,\"names\":[\"pressScaleFor_chunkKM2TI5ICJs1\",\"width\",\"SCALE_REFERENCE_WIDTH\",\"PRESS_SCALE\",\"__closure\",\"coefficient\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-KM2TI5IC.js\"],\"mappings\":\"AAsCA,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\":[]}"
|
|
17
38
|
};
|
|
18
|
-
const pressScaleFor = function
|
|
19
|
-
|
|
39
|
+
const pressScaleFor = function pressScaleFor_chunkKM2TI5ICJs1Factory({
|
|
40
|
+
_worklet_17352996968518_init_data,
|
|
20
41
|
SCALE_REFERENCE_WIDTH,
|
|
21
42
|
PRESS_SCALE
|
|
22
43
|
}) {
|
|
@@ -29,13 +50,13 @@ const pressScaleFor = function pressScaleFor_chunkIBRVMLUFJs1Factory({
|
|
|
29
50
|
SCALE_REFERENCE_WIDTH,
|
|
30
51
|
PRESS_SCALE
|
|
31
52
|
};
|
|
32
|
-
pressScaleFor.__workletHash =
|
|
53
|
+
pressScaleFor.__workletHash = 17352996968518;
|
|
33
54
|
pressScaleFor.__pluginVersion = "0.7.4";
|
|
34
|
-
pressScaleFor.__initData =
|
|
55
|
+
pressScaleFor.__initData = _worklet_17352996968518_init_data;
|
|
35
56
|
pressScaleFor.__stackDetails = _e;
|
|
36
57
|
return pressScaleFor;
|
|
37
58
|
}({
|
|
38
|
-
|
|
59
|
+
_worklet_17352996968518_init_data,
|
|
39
60
|
SCALE_REFERENCE_WIDTH,
|
|
40
61
|
PRESS_SCALE
|
|
41
62
|
});
|
|
@@ -48,26 +69,26 @@ var RIPPLE_CONFIRM_DURATION = 225;
|
|
|
48
69
|
var RIPPLE_FADE_IN = 75;
|
|
49
70
|
var RIPPLE_FADE_OUT_DELAY = 225;
|
|
50
71
|
var RIPPLE_FADE_OUT = 150;
|
|
51
|
-
const
|
|
52
|
-
code: "function
|
|
53
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
54
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
72
|
+
const _worklet_9330177075325_init_data = {
|
|
73
|
+
code: "function rippleRadiusFor_chunkKM2TI5ICJs2(width,height){return Math.sqrt(width*width+height*height)/2+5;}",
|
|
74
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-KM2TI5IC.js",
|
|
75
|
+
sourceMap: "{\"version\":3,\"names\":[\"rippleRadiusFor_chunkKM2TI5ICJs2\",\"width\",\"height\",\"Math\",\"sqrt\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-KM2TI5IC.js\"],\"mappings\":\"AAoDA,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\":[]}"
|
|
55
76
|
};
|
|
56
|
-
const rippleRadiusFor = function
|
|
57
|
-
|
|
77
|
+
const rippleRadiusFor = function rippleRadiusFor_chunkKM2TI5ICJs2Factory({
|
|
78
|
+
_worklet_9330177075325_init_data
|
|
58
79
|
}) {
|
|
59
80
|
const _e = [new global.Error(), 1, -27];
|
|
60
81
|
const rippleRadiusFor = function (width, height) {
|
|
61
82
|
return Math.sqrt(width * width + height * height) / 2 + 5;
|
|
62
83
|
};
|
|
63
84
|
rippleRadiusFor.__closure = {};
|
|
64
|
-
rippleRadiusFor.__workletHash =
|
|
85
|
+
rippleRadiusFor.__workletHash = 9330177075325;
|
|
65
86
|
rippleRadiusFor.__pluginVersion = "0.7.4";
|
|
66
|
-
rippleRadiusFor.__initData =
|
|
87
|
+
rippleRadiusFor.__initData = _worklet_9330177075325_init_data;
|
|
67
88
|
rippleRadiusFor.__stackDetails = _e;
|
|
68
89
|
return rippleRadiusFor;
|
|
69
90
|
}({
|
|
70
|
-
|
|
91
|
+
_worklet_9330177075325_init_data
|
|
71
92
|
});
|
|
72
93
|
var ALL_OFF = {
|
|
73
94
|
scale: false,
|
|
@@ -170,7 +191,7 @@ function feedbackChildren(children, asChild) {
|
|
|
170
191
|
}
|
|
171
192
|
|
|
172
193
|
// src/system/pressable-feedback/pressable-feedback.tsx
|
|
173
|
-
import { forwardRef, useContext, useEffect, useMemo, useRef } from "react";
|
|
194
|
+
import { forwardRef, useContext, useEffect, useMemo, useRef as useRef2 } from "react";
|
|
174
195
|
import { Pressable, StyleSheet } from "react-native";
|
|
175
196
|
import Animated, { Easing, useAnimatedStyle, useDerivedValue, useSharedValue, withDelay, withTiming } from "react-native-reanimated";
|
|
176
197
|
|
|
@@ -241,15 +262,15 @@ var StaticFeedback = forwardRef(function StaticFeedback2({
|
|
|
241
262
|
})
|
|
242
263
|
});
|
|
243
264
|
});
|
|
244
|
-
const
|
|
245
|
-
code: "function
|
|
246
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
247
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
265
|
+
const _worklet_9447082819528_init_data = {
|
|
266
|
+
code: "function chunkKM2TI5ICJs3(){const{pressScaleFor,size}=this.__closure;return pressScaleFor(size.value.width);}",
|
|
267
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-KM2TI5IC.js",
|
|
268
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkKM2TI5ICJs3\",\"pressScaleFor\",\"size\",\"__closure\",\"value\",\"width\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-KM2TI5IC.js\"],\"mappings\":\"AAkOuC,SAAAA,iBAAA,QAAAC,aAAA,CAAAC,IAAA,OAAAC,SAAA,OAAM,CAAAF,aAAc,CAAAC,IAAK,CAAAE,KAAM,CAAAC,KAAK\",\"ignoreList\":[]}"
|
|
248
269
|
};
|
|
249
|
-
const
|
|
250
|
-
code: "function
|
|
251
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
252
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
270
|
+
const _worklet_6524907929752_init_data = {
|
|
271
|
+
code: "function chunkKM2TI5ICJs4(){const{animation,pressedScale,progress}=this.__closure;if(!animation.scale)return{};return{transform:[{scale:1-(1-pressedScale.value)*progress.value}]};}",
|
|
272
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-KM2TI5IC.js",
|
|
273
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkKM2TI5ICJs4\",\"animation\",\"pressedScale\",\"progress\",\"__closure\",\"scale\",\"transform\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-KM2TI5IC.js\"],\"mappings\":\"AAmOyC,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\":[]}"
|
|
253
274
|
};
|
|
254
275
|
var AnimatedFeedback = forwardRef(function AnimatedFeedback2({
|
|
255
276
|
isPressed = false,
|
|
@@ -270,42 +291,42 @@ var AnimatedFeedback = forwardRef(function AnimatedFeedback2({
|
|
|
270
291
|
height: 0
|
|
271
292
|
});
|
|
272
293
|
const waves = [useWave(), useWave()];
|
|
273
|
-
const nextWave =
|
|
294
|
+
const nextWave = useRef2(0);
|
|
274
295
|
useEffect(() => {
|
|
275
296
|
progress.value = withTiming(isPressed ? 1 : 0, {
|
|
276
297
|
duration: PRESS_DURATION,
|
|
277
298
|
easing: Easing.out(Easing.ease)
|
|
278
299
|
});
|
|
279
300
|
}, [isPressed, progress]);
|
|
280
|
-
const pressedScale = useDerivedValue(function
|
|
281
|
-
|
|
301
|
+
const pressedScale = useDerivedValue(function chunkKM2TI5ICJs3Factory({
|
|
302
|
+
_worklet_9447082819528_init_data,
|
|
282
303
|
pressScaleFor,
|
|
283
304
|
size
|
|
284
305
|
}) {
|
|
285
306
|
const _e = [new global.Error(), -3, -27];
|
|
286
|
-
const
|
|
287
|
-
|
|
307
|
+
const chunkKM2TI5ICJs3 = () => pressScaleFor(size.value.width);
|
|
308
|
+
chunkKM2TI5ICJs3.__closure = {
|
|
288
309
|
pressScaleFor,
|
|
289
310
|
size
|
|
290
311
|
};
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
return
|
|
312
|
+
chunkKM2TI5ICJs3.__workletHash = 9447082819528;
|
|
313
|
+
chunkKM2TI5ICJs3.__pluginVersion = "0.7.4";
|
|
314
|
+
chunkKM2TI5ICJs3.__initData = _worklet_9447082819528_init_data;
|
|
315
|
+
chunkKM2TI5ICJs3.__stackDetails = _e;
|
|
316
|
+
return chunkKM2TI5ICJs3;
|
|
296
317
|
}({
|
|
297
|
-
|
|
318
|
+
_worklet_9447082819528_init_data,
|
|
298
319
|
pressScaleFor,
|
|
299
320
|
size
|
|
300
321
|
}));
|
|
301
|
-
const animatedStyle = useAnimatedStyle(function
|
|
302
|
-
|
|
322
|
+
const animatedStyle = useAnimatedStyle(function chunkKM2TI5ICJs4Factory({
|
|
323
|
+
_worklet_6524907929752_init_data,
|
|
303
324
|
animation,
|
|
304
325
|
pressedScale,
|
|
305
326
|
progress
|
|
306
327
|
}) {
|
|
307
328
|
const _e = [new global.Error(), -4, -27];
|
|
308
|
-
const
|
|
329
|
+
const chunkKM2TI5ICJs4 = function () {
|
|
309
330
|
if (!animation.scale) return {};
|
|
310
331
|
return {
|
|
311
332
|
transform: [{
|
|
@@ -313,18 +334,18 @@ var AnimatedFeedback = forwardRef(function AnimatedFeedback2({
|
|
|
313
334
|
}]
|
|
314
335
|
};
|
|
315
336
|
};
|
|
316
|
-
|
|
337
|
+
chunkKM2TI5ICJs4.__closure = {
|
|
317
338
|
animation,
|
|
318
339
|
pressedScale,
|
|
319
340
|
progress
|
|
320
341
|
};
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
return
|
|
342
|
+
chunkKM2TI5ICJs4.__workletHash = 6524907929752;
|
|
343
|
+
chunkKM2TI5ICJs4.__pluginVersion = "0.7.4";
|
|
344
|
+
chunkKM2TI5ICJs4.__initData = _worklet_6524907929752_init_data;
|
|
345
|
+
chunkKM2TI5ICJs4.__stackDetails = _e;
|
|
346
|
+
return chunkKM2TI5ICJs4;
|
|
326
347
|
}({
|
|
327
|
-
|
|
348
|
+
_worklet_6524907929752_init_data,
|
|
328
349
|
animation,
|
|
329
350
|
pressedScale,
|
|
330
351
|
progress
|
|
@@ -469,10 +490,10 @@ function PressableFeedbackHighlight({
|
|
|
469
490
|
}
|
|
470
491
|
PressableFeedbackHighlight.displayName = "XAUI.PressableFeedback.Highlight";
|
|
471
492
|
markOverlay(PressableFeedbackHighlight);
|
|
472
|
-
const
|
|
473
|
-
code: "function
|
|
474
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
475
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
493
|
+
const _worklet_16041587830056_init_data = {
|
|
494
|
+
code: "function chunkKM2TI5ICJs5(){const{shown,opacity}=this.__closure;return{opacity:shown.value*opacity};}",
|
|
495
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-KM2TI5IC.js",
|
|
496
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkKM2TI5ICJs5\",\"shown\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-KM2TI5IC.js\"],\"mappings\":\"AAiX0C,SAAAA,gBAAMA,CAAA,QAAAC,KAAA,CAAAC,OAAA,OAAAC,SAAA,CAE5C,MAAO,CAAED,OAAO,CAAED,KAAK,CAACG,KAAK,CAAGF,OAAQ,CAAC,CAC3C\",\"ignoreList\":[]}"
|
|
476
497
|
};
|
|
477
498
|
function AnimatedHighlight({
|
|
478
499
|
base,
|
|
@@ -488,28 +509,28 @@ function AnimatedHighlight({
|
|
|
488
509
|
duration
|
|
489
510
|
});
|
|
490
511
|
}, [isPressed, shown, duration]);
|
|
491
|
-
const animatedStyle = useAnimatedStyle2(function
|
|
492
|
-
|
|
512
|
+
const animatedStyle = useAnimatedStyle2(function chunkKM2TI5ICJs5Factory({
|
|
513
|
+
_worklet_16041587830056_init_data,
|
|
493
514
|
shown,
|
|
494
515
|
opacity
|
|
495
516
|
}) {
|
|
496
517
|
const _e = [new global.Error(), -3, -27];
|
|
497
|
-
const
|
|
518
|
+
const chunkKM2TI5ICJs5 = function () {
|
|
498
519
|
return {
|
|
499
520
|
opacity: shown.value * opacity
|
|
500
521
|
};
|
|
501
522
|
};
|
|
502
|
-
|
|
523
|
+
chunkKM2TI5ICJs5.__closure = {
|
|
503
524
|
shown,
|
|
504
525
|
opacity
|
|
505
526
|
};
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
return
|
|
527
|
+
chunkKM2TI5ICJs5.__workletHash = 16041587830056;
|
|
528
|
+
chunkKM2TI5ICJs5.__pluginVersion = "0.7.4";
|
|
529
|
+
chunkKM2TI5ICJs5.__initData = _worklet_16041587830056_init_data;
|
|
530
|
+
chunkKM2TI5ICJs5.__stackDetails = _e;
|
|
531
|
+
return chunkKM2TI5ICJs5;
|
|
511
532
|
}({
|
|
512
|
-
|
|
533
|
+
_worklet_16041587830056_init_data,
|
|
513
534
|
shown,
|
|
514
535
|
opacity
|
|
515
536
|
}), [shown, opacity]);
|
|
@@ -519,7 +540,7 @@ function AnimatedHighlight({
|
|
|
519
540
|
}
|
|
520
541
|
|
|
521
542
|
// src/system/pressable-feedback/pressable-feedback-ripple.tsx
|
|
522
|
-
import { useState } from "react";
|
|
543
|
+
import { useState as useState2 } from "react";
|
|
523
544
|
import { StyleSheet as StyleSheet3, View as View3 } from "react-native";
|
|
524
545
|
import Animated3, { useAnimatedStyle as useAnimatedStyle3 } from "react-native-reanimated";
|
|
525
546
|
import { Fragment as Fragment3, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
@@ -538,7 +559,7 @@ function PressableFeedbackRipple({
|
|
|
538
559
|
const [styleProps] = useStyleProps(props);
|
|
539
560
|
const waveStyle = [styleProps, style];
|
|
540
561
|
const settings = resolveSlotAnimation(override, animation.ripple, RIPPLE_OPACITY);
|
|
541
|
-
const [size, setSize] =
|
|
562
|
+
const [size, setSize] = useState2({
|
|
542
563
|
width: 0,
|
|
543
564
|
height: 0
|
|
544
565
|
});
|
|
@@ -576,10 +597,10 @@ function PressableFeedbackRipple({
|
|
|
576
597
|
}
|
|
577
598
|
PressableFeedbackRipple.displayName = "XAUI.PressableFeedback.Ripple";
|
|
578
599
|
markOverlay(PressableFeedbackRipple);
|
|
579
|
-
const
|
|
580
|
-
code: "function
|
|
581
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
582
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
600
|
+
const _worklet_10181885956967_init_data = {
|
|
601
|
+
code: "function chunkKM2TI5ICJs6(){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}]};}",
|
|
602
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-KM2TI5IC.js",
|
|
603
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkKM2TI5ICJs6\",\"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-KM2TI5IC.js\"],\"mappings\":\"AAib0C,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\":[]}"
|
|
583
604
|
};
|
|
584
605
|
function RippleWave({
|
|
585
606
|
wave,
|
|
@@ -589,8 +610,8 @@ function RippleWave({
|
|
|
589
610
|
opacity,
|
|
590
611
|
style
|
|
591
612
|
}) {
|
|
592
|
-
const animatedStyle = useAnimatedStyle3(function
|
|
593
|
-
|
|
613
|
+
const animatedStyle = useAnimatedStyle3(function chunkKM2TI5ICJs6Factory({
|
|
614
|
+
_worklet_10181885956967_init_data,
|
|
594
615
|
wave,
|
|
595
616
|
RIPPLE_START_SCALE,
|
|
596
617
|
center,
|
|
@@ -598,7 +619,7 @@ function RippleWave({
|
|
|
598
619
|
radius
|
|
599
620
|
}) {
|
|
600
621
|
const _e = [new global.Error(), -6, -27];
|
|
601
|
-
const
|
|
622
|
+
const chunkKM2TI5ICJs6 = function () {
|
|
602
623
|
const t = wave.expand.value;
|
|
603
624
|
const from = wave.origin.value;
|
|
604
625
|
const scale = RIPPLE_START_SCALE + (1 - RIPPLE_START_SCALE) * t;
|
|
@@ -616,20 +637,20 @@ function RippleWave({
|
|
|
616
637
|
}]
|
|
617
638
|
};
|
|
618
639
|
};
|
|
619
|
-
|
|
640
|
+
chunkKM2TI5ICJs6.__closure = {
|
|
620
641
|
wave,
|
|
621
642
|
RIPPLE_START_SCALE,
|
|
622
643
|
center,
|
|
623
644
|
opacity,
|
|
624
645
|
radius
|
|
625
646
|
};
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
return
|
|
647
|
+
chunkKM2TI5ICJs6.__workletHash = 10181885956967;
|
|
648
|
+
chunkKM2TI5ICJs6.__pluginVersion = "0.7.4";
|
|
649
|
+
chunkKM2TI5ICJs6.__initData = _worklet_10181885956967_init_data;
|
|
650
|
+
chunkKM2TI5ICJs6.__stackDetails = _e;
|
|
651
|
+
return chunkKM2TI5ICJs6;
|
|
631
652
|
}({
|
|
632
|
-
|
|
653
|
+
_worklet_10181885956967_init_data,
|
|
633
654
|
wave,
|
|
634
655
|
RIPPLE_START_SCALE,
|
|
635
656
|
center,
|
|
@@ -665,4 +686,10 @@ var PressableFeedback3 = Object.assign(PressableFeedback, {
|
|
|
665
686
|
Highlight: PressableFeedbackHighlight,
|
|
666
687
|
Ripple: PressableFeedbackRipple
|
|
667
688
|
});
|
|
668
|
-
|
|
689
|
+
|
|
690
|
+
// src/utils/warn-dev.ts
|
|
691
|
+
function warnDev(message) {
|
|
692
|
+
if (typeof __DEV__ !== "undefined" && !__DEV__) return;
|
|
693
|
+
console.warn(`XAUI: ${message}`);
|
|
694
|
+
}
|
|
695
|
+
export { usePressState, warnDev, 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 };
|