@xaui/native 0.9.1-alpha.17 → 0.9.1-alpha.19
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-M2VYRHVS.cjs → chunk-2WMVDMFV.cjs} +2 -2
- package/dist/{chunk-ASXK7XU4.js → chunk-4EPS7UBO.js} +18 -17
- package/dist/{chunk-6N5JXRUZ.cjs → chunk-57SJ4LJF.cjs} +2 -20
- package/dist/{chunk-IZYRU7S2.cjs → chunk-6ARON3XT.cjs} +27 -26
- package/dist/{chunk-XJARE6SC.js → chunk-A3EGFI6T.js} +0 -18
- package/dist/{chunk-2UICXD3Q.cjs → chunk-A4VD4MHK.cjs} +109 -102
- package/dist/chunk-BFB6K4M7.cjs +31 -0
- package/dist/{chunk-BHAHJHAI.cjs → chunk-BHTFIZTQ.cjs} +34 -32
- package/dist/{chunk-5SU7FXWH.cjs → chunk-EVXZGNPA.cjs} +3 -148
- package/dist/{chunk-4K3LZS7M.js → chunk-EXX6ATAS.js} +2 -147
- package/dist/chunk-GGW42MY4.js +20 -0
- package/dist/chunk-MAYVGK6W.js +31 -0
- package/dist/chunk-MC7SY2QH.cjs +20 -0
- package/dist/{chunk-XQE5PXOD.js → chunk-MWXE7D4L.js} +4 -2
- package/dist/chunk-N7C4UNUL.js +150 -0
- package/dist/{chunk-6PZF4PI7.js → chunk-RMLFMRWL.js} +5 -3
- package/dist/{chunk-6VTBGBPP.cjs → chunk-UBA6AEY6.cjs} +10 -8
- package/dist/chunk-UVO4GFSW.cjs +150 -0
- package/dist/{chunk-F432IDIW.js → chunk-WXAME7KB.js} +113 -106
- package/dist/{chunk-L3AQNVRN.js → chunk-XHZBXYVU.js} +1 -1
- package/dist/components/button/index.cjs +7 -5
- package/dist/components/button/index.d.cts +3 -2
- package/dist/components/button/index.d.ts +3 -2
- package/dist/components/button/index.js +6 -4
- package/dist/components/typography/index.cjs +6 -4
- package/dist/components/typography/index.d.cts +4 -3
- package/dist/components/typography/index.d.ts +4 -3
- package/dist/components/typography/index.js +5 -3
- package/dist/components/view/index.cjs +10 -0
- package/dist/components/view/index.d.cts +77 -0
- package/dist/components/view/index.d.ts +77 -0
- package/dist/components/view/index.js +10 -0
- package/dist/{create-recipe-3_ElpCYt.d.cts → create-recipe-C0XXjuow.d.cts} +2 -30
- package/dist/{create-recipe-DImq1AZA.d.ts → create-recipe-CPXFo2rk.d.ts} +2 -30
- package/dist/index.cjs +19 -10
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +17 -8
- package/dist/{pressable-feedback.type-KcPvFf6f.d.ts → pressable-feedback.type-1K8YEOb8.d.cts} +48 -20
- package/dist/{pressable-feedback.type-C9kjAuVQ.d.cts → pressable-feedback.type-BwkKLQlX.d.ts} +48 -20
- package/dist/style-props.type-B1BG5TCm.d.cts +31 -0
- package/dist/style-props.type-B1BG5TCm.d.ts +31 -0
- package/dist/system/index.cjs +8 -5
- package/dist/system/index.d.cts +11 -6
- package/dist/system/index.d.ts +11 -6
- package/dist/system/index.js +8 -5
- package/dist/theme/index.cjs +4 -3
- package/dist/theme/index.js +3 -2
- package/package.json +11 -1
|
@@ -36,8 +36,8 @@ function _optionalChain(ops) {
|
|
|
36
36
|
}
|
|
37
37
|
return value;
|
|
38
38
|
}
|
|
39
|
-
var
|
|
40
|
-
var
|
|
39
|
+
var _chunkEVXZGNPAcjs = require('./chunk-EVXZGNPA.cjs');
|
|
40
|
+
var _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
|
|
41
41
|
|
|
42
42
|
// src/system/icon/icon-context.ts
|
|
43
43
|
var _react = require('react');
|
|
@@ -51,63 +51,70 @@ function useIconContext() {
|
|
|
51
51
|
|
|
52
52
|
var _reactnative = require('react-native');
|
|
53
53
|
var _jsxruntime = require('react/jsx-runtime');
|
|
54
|
-
function Icon({
|
|
55
|
-
as: Component,
|
|
56
|
-
children,
|
|
57
|
-
source,
|
|
58
|
-
size,
|
|
59
|
-
color,
|
|
60
|
-
style,
|
|
61
|
-
...props
|
|
62
|
-
}) {
|
|
54
|
+
function Icon(props) {
|
|
63
55
|
const inherited = useIconContext();
|
|
64
|
-
const theme =
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
56
|
+
const theme = _chunk57SJ4LJFcjs.useXAUITheme.call(void 0);
|
|
57
|
+
const size = _nullishCoalesce(_nullishCoalesce(props.size, () => inherited.size), () => theme.fontSizes.md);
|
|
58
|
+
const color = _nullishCoalesce(_nullishCoalesce(props.color, () => inherited.color), () => theme.colors.foreground);
|
|
59
|
+
if (props.as) {
|
|
60
|
+
const Component = props.as;
|
|
69
61
|
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, Component, {
|
|
70
|
-
size
|
|
71
|
-
color
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
if (_react.isValidElement.call(void 0, children)) {
|
|
75
|
-
return _react.cloneElement.call(void 0, children, {
|
|
76
|
-
width: resolvedSize,
|
|
77
|
-
height: resolvedSize,
|
|
78
|
-
color: resolvedColor
|
|
62
|
+
size,
|
|
63
|
+
color
|
|
79
64
|
});
|
|
80
65
|
}
|
|
81
|
-
if (
|
|
82
|
-
return
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
height: resolvedSize,
|
|
87
|
-
tintColor: resolvedColor
|
|
88
|
-
}, styleProps, style]
|
|
66
|
+
if (_react.isValidElement.call(void 0, props.children)) {
|
|
67
|
+
return _react.cloneElement.call(void 0, props.children, {
|
|
68
|
+
width: size,
|
|
69
|
+
height: size,
|
|
70
|
+
color
|
|
89
71
|
});
|
|
90
72
|
}
|
|
73
|
+
if (props.source) return /* @__PURE__ */_jsxruntime.jsx.call(void 0, IconImage, {
|
|
74
|
+
...props,
|
|
75
|
+
resolved: {
|
|
76
|
+
size,
|
|
77
|
+
color
|
|
78
|
+
}
|
|
79
|
+
});
|
|
91
80
|
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.");
|
|
92
81
|
}
|
|
93
82
|
Icon.displayName = "XAUI.Icon";
|
|
83
|
+
function IconImage({
|
|
84
|
+
source,
|
|
85
|
+
style,
|
|
86
|
+
resolved,
|
|
87
|
+
size: _size,
|
|
88
|
+
color: _color,
|
|
89
|
+
...props
|
|
90
|
+
}) {
|
|
91
|
+
const [styleProps] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
|
|
92
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.Image, {
|
|
93
|
+
source,
|
|
94
|
+
style: [{
|
|
95
|
+
width: resolved.size,
|
|
96
|
+
height: resolved.size,
|
|
97
|
+
tintColor: resolved.color
|
|
98
|
+
}, styleProps, style]
|
|
99
|
+
});
|
|
100
|
+
}
|
|
94
101
|
|
|
95
102
|
// src/system/pressable-feedback/pressable-feedback-context.ts
|
|
96
103
|
|
|
97
|
-
var [FeedbackProvider, useFeedback] =
|
|
104
|
+
var [FeedbackProvider, useFeedback] = _chunkEVXZGNPAcjs.createSlotContext.call(void 0, "PressableFeedback");
|
|
98
105
|
var DisableAllContext = _react.createContext.call(void 0, false);
|
|
99
106
|
|
|
100
107
|
// src/system/pressable-feedback/pressable-feedback.animation.ts
|
|
101
108
|
var PRESS_SCALE = 0.985;
|
|
102
109
|
var PRESS_DURATION = 300;
|
|
103
110
|
var SCALE_REFERENCE_WIDTH = 300;
|
|
104
|
-
const
|
|
105
|
-
code: "function
|
|
106
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
107
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
111
|
+
const _worklet_4514115383310_init_data = {
|
|
112
|
+
code: "function pressScaleFor_chunkA4VD4MHKCjs1(width){const{SCALE_REFERENCE_WIDTH,PRESS_SCALE}=this.__closure;const coefficient=width>0?SCALE_REFERENCE_WIDTH/width:1;return 1-(1-PRESS_SCALE)*coefficient;}",
|
|
113
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-A4VD4MHK.cjs",
|
|
114
|
+
sourceMap: "{\"version\":3,\"names\":[\"pressScaleFor_chunkA4VD4MHKCjs1\",\"width\",\"SCALE_REFERENCE_WIDTH\",\"PRESS_SCALE\",\"__closure\",\"coefficient\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-A4VD4MHK.cjs\"],\"mappings\":\"AA4EA,SAAAA,+BAA8BA,CAAAC,KAAA,QAAAC,qBAAA,CAAAC,WAAA,OAAAC,SAAA,CAE5B,KAAM,CAAAC,WAAW,CAAGJ,KAAK,CAAG,CAAC,CAAGC,qBAAqB,CAAGD,KAAK,CAAG,CAAC,CACjE,MAAO,EAAC,CAAG,CAAC,CAAC,CAAGE,WAAW,EAAIE,WAAW,CAC5C\",\"ignoreList\":[]}"
|
|
108
115
|
};
|
|
109
|
-
const pressScaleFor = function
|
|
110
|
-
|
|
116
|
+
const pressScaleFor = function pressScaleFor_chunkA4VD4MHKCjs1Factory({
|
|
117
|
+
_worklet_4514115383310_init_data,
|
|
111
118
|
SCALE_REFERENCE_WIDTH,
|
|
112
119
|
PRESS_SCALE
|
|
113
120
|
}) {
|
|
@@ -120,13 +127,13 @@ const pressScaleFor = function pressScaleFor_chunk2UICXD3QCjs1Factory({
|
|
|
120
127
|
SCALE_REFERENCE_WIDTH,
|
|
121
128
|
PRESS_SCALE
|
|
122
129
|
};
|
|
123
|
-
pressScaleFor.__workletHash =
|
|
130
|
+
pressScaleFor.__workletHash = 4514115383310;
|
|
124
131
|
pressScaleFor.__pluginVersion = "0.7.4";
|
|
125
|
-
pressScaleFor.__initData =
|
|
132
|
+
pressScaleFor.__initData = _worklet_4514115383310_init_data;
|
|
126
133
|
pressScaleFor.__stackDetails = _e;
|
|
127
134
|
return pressScaleFor;
|
|
128
135
|
}({
|
|
129
|
-
|
|
136
|
+
_worklet_4514115383310_init_data,
|
|
130
137
|
SCALE_REFERENCE_WIDTH,
|
|
131
138
|
PRESS_SCALE
|
|
132
139
|
});
|
|
@@ -139,26 +146,26 @@ var RIPPLE_CONFIRM_DURATION = 225;
|
|
|
139
146
|
var RIPPLE_FADE_IN = 75;
|
|
140
147
|
var RIPPLE_FADE_OUT_DELAY = 225;
|
|
141
148
|
var RIPPLE_FADE_OUT = 150;
|
|
142
|
-
const
|
|
143
|
-
code: "function
|
|
144
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
145
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
149
|
+
const _worklet_6866525022261_init_data = {
|
|
150
|
+
code: "function rippleRadiusFor_chunkA4VD4MHKCjs2(width,height){return Math.sqrt(width*width+height*height)/2+5;}",
|
|
151
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-A4VD4MHK.cjs",
|
|
152
|
+
sourceMap: "{\"version\":3,\"names\":[\"rippleRadiusFor_chunkA4VD4MHKCjs2\",\"width\",\"height\",\"Math\",\"sqrt\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-A4VD4MHK.cjs\"],\"mappings\":\"AA0FA,SAAAA,iCAAwCA,CAAAC,KAAA,CAAAC,MAAA,EAEtC,MAAO,CAAAC,IAAI,CAACC,IAAI,CAACH,KAAK,CAAGA,KAAK,CAAGC,MAAM,CAAGA,MAAM,CAAC,CAAG,CAAC,CAAG,CAAC,CAC3D\",\"ignoreList\":[]}"
|
|
146
153
|
};
|
|
147
|
-
const rippleRadiusFor = function
|
|
148
|
-
|
|
154
|
+
const rippleRadiusFor = function rippleRadiusFor_chunkA4VD4MHKCjs2Factory({
|
|
155
|
+
_worklet_6866525022261_init_data
|
|
149
156
|
}) {
|
|
150
157
|
const _e = [new global.Error(), 1, -27];
|
|
151
158
|
const rippleRadiusFor = function (width, height) {
|
|
152
159
|
return Math.sqrt(width * width + height * height) / 2 + 5;
|
|
153
160
|
};
|
|
154
161
|
rippleRadiusFor.__closure = {};
|
|
155
|
-
rippleRadiusFor.__workletHash =
|
|
162
|
+
rippleRadiusFor.__workletHash = 6866525022261;
|
|
156
163
|
rippleRadiusFor.__pluginVersion = "0.7.4";
|
|
157
|
-
rippleRadiusFor.__initData =
|
|
164
|
+
rippleRadiusFor.__initData = _worklet_6866525022261_init_data;
|
|
158
165
|
rippleRadiusFor.__stackDetails = _e;
|
|
159
166
|
return rippleRadiusFor;
|
|
160
167
|
}({
|
|
161
|
-
|
|
168
|
+
_worklet_6866525022261_init_data
|
|
162
169
|
});
|
|
163
170
|
var ALL_OFF = {
|
|
164
171
|
scale: false,
|
|
@@ -267,8 +274,8 @@ var _reactnativereanimated2 = _interopRequireDefault(_reactnativereanimated);
|
|
|
267
274
|
|
|
268
275
|
// src/system/pressable-feedback/pressable-feedback.surface.ts
|
|
269
276
|
function inkFor(background, colors) {
|
|
270
|
-
if (typeof background !== "string" || !
|
|
271
|
-
return
|
|
277
|
+
if (typeof background !== "string" || !_chunk57SJ4LJFcjs.isHex.call(void 0, background)) return colors.foreground;
|
|
278
|
+
return _chunk57SJ4LJFcjs.contrastOn.call(void 0, background, colors.snow, colors.eclipse);
|
|
272
279
|
}
|
|
273
280
|
var RADIUS_KEYS = ["borderRadius", "borderStartStartRadius", "borderStartEndRadius", "borderEndStartRadius", "borderEndEndRadius"];
|
|
274
281
|
function radiusFrom(style) {
|
|
@@ -284,7 +291,7 @@ function radiusFrom(style) {
|
|
|
284
291
|
// src/system/pressable-feedback/pressable-feedback.tsx
|
|
285
292
|
|
|
286
293
|
var AnimatedPressable = _reactnativereanimated2.default.createAnimatedComponent(_reactnative.Pressable);
|
|
287
|
-
var AnimatedSlot = _reactnativereanimated2.default.createAnimatedComponent(
|
|
294
|
+
var AnimatedSlot = _reactnativereanimated2.default.createAnimatedComponent(_chunkEVXZGNPAcjs.Slot);
|
|
288
295
|
var PressableFeedback = _react.forwardRef.call(void 0, function PressableFeedback2({
|
|
289
296
|
animation,
|
|
290
297
|
style,
|
|
@@ -292,7 +299,7 @@ var PressableFeedback = _react.forwardRef.call(void 0, function PressableFeedbac
|
|
|
292
299
|
}, ref) {
|
|
293
300
|
const inheritedDisableAll = _react.useContext.call(void 0, DisableAllContext);
|
|
294
301
|
const resolved = resolveAnimation(animation, inheritedDisableAll);
|
|
295
|
-
const [styleProps, rest] =
|
|
302
|
+
const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
|
|
296
303
|
const Feedback = resolved.none ? StaticFeedback : AnimatedFeedback;
|
|
297
304
|
const body = /* @__PURE__ */_jsxruntime.jsx.call(void 0, Feedback, {
|
|
298
305
|
ref,
|
|
@@ -320,7 +327,7 @@ var StaticFeedback = _react.forwardRef.call(void 0, function StaticFeedback2({
|
|
|
320
327
|
animation,
|
|
321
328
|
...surface
|
|
322
329
|
}), [isPressed, animation, surface]);
|
|
323
|
-
const Root = asChild ?
|
|
330
|
+
const Root = asChild ? _chunkEVXZGNPAcjs.Slot : _reactnative.Pressable;
|
|
324
331
|
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, FeedbackProvider, {
|
|
325
332
|
value: context,
|
|
326
333
|
children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, Root, {
|
|
@@ -332,10 +339,10 @@ var StaticFeedback = _react.forwardRef.call(void 0, function StaticFeedback2({
|
|
|
332
339
|
})
|
|
333
340
|
});
|
|
334
341
|
});
|
|
335
|
-
const
|
|
336
|
-
code: "function
|
|
337
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
338
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
342
|
+
const _worklet_10224860224599_init_data = {
|
|
343
|
+
code: "function chunkA4VD4MHKCjs3(){const{animation,pressedScale,progress}=this.__closure;if(!animation.scale)return{};return{transform:[{scale:1-(1-pressedScale.value)*progress.value}]};}",
|
|
344
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-A4VD4MHK.cjs",
|
|
345
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkA4VD4MHKCjs3\",\"animation\",\"pressedScale\",\"progress\",\"__closure\",\"scale\",\"transform\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-A4VD4MHK.cjs\"],\"mappings\":\"AAyQ6E,SAAAA,iBAAMA,CAAA,QAAAC,SAAA,CAAAC,YAAA,CAAAC,QAAA,OAAAC,SAAA,CAE/E,GAAI,CAACH,SAAS,CAACI,KAAK,CAAE,MAAO,CAAC,CAAC,CAC/B,MAAO,CAAEC,SAAS,CAAE,CAAC,CAAED,KAAK,CAAE,CAAC,CAAG,CAAC,CAAC,CAAGH,YAAY,CAACK,KAAK,EAAIJ,QAAQ,CAACI,KAAM,CAAC,CAAE,CAAC,CAClF\",\"ignoreList\":[]}"
|
|
339
346
|
};
|
|
340
347
|
var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2({
|
|
341
348
|
isPressed = false,
|
|
@@ -364,14 +371,14 @@ var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2
|
|
|
364
371
|
});
|
|
365
372
|
}, [isPressed, progress]);
|
|
366
373
|
const pressedScale = _reactnativereanimated.useDerivedValue.call(void 0, () => pressScaleFor(size.value.width));
|
|
367
|
-
const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function
|
|
368
|
-
|
|
374
|
+
const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkA4VD4MHKCjs3Factory({
|
|
375
|
+
_worklet_10224860224599_init_data,
|
|
369
376
|
animation,
|
|
370
377
|
pressedScale,
|
|
371
378
|
progress
|
|
372
379
|
}) {
|
|
373
380
|
const _e = [new global.Error(), -4, -27];
|
|
374
|
-
const
|
|
381
|
+
const chunkA4VD4MHKCjs3 = function () {
|
|
375
382
|
if (!animation.scale) return {};
|
|
376
383
|
return {
|
|
377
384
|
transform: [{
|
|
@@ -379,18 +386,18 @@ var AnimatedFeedback = _react.forwardRef.call(void 0, function AnimatedFeedback2
|
|
|
379
386
|
}]
|
|
380
387
|
};
|
|
381
388
|
};
|
|
382
|
-
|
|
389
|
+
chunkA4VD4MHKCjs3.__closure = {
|
|
383
390
|
animation,
|
|
384
391
|
pressedScale,
|
|
385
392
|
progress
|
|
386
393
|
};
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
return
|
|
394
|
+
chunkA4VD4MHKCjs3.__workletHash = 10224860224599;
|
|
395
|
+
chunkA4VD4MHKCjs3.__pluginVersion = "0.7.4";
|
|
396
|
+
chunkA4VD4MHKCjs3.__initData = _worklet_10224860224599_init_data;
|
|
397
|
+
chunkA4VD4MHKCjs3.__stackDetails = _e;
|
|
398
|
+
return chunkA4VD4MHKCjs3;
|
|
392
399
|
}({
|
|
393
|
-
|
|
400
|
+
_worklet_10224860224599_init_data,
|
|
394
401
|
animation,
|
|
395
402
|
pressedScale,
|
|
396
403
|
progress
|
|
@@ -482,7 +489,7 @@ function useWave() {
|
|
|
482
489
|
};
|
|
483
490
|
}
|
|
484
491
|
function useSurface(style) {
|
|
485
|
-
const theme =
|
|
492
|
+
const theme = _chunk57SJ4LJFcjs.useXAUITheme.call(void 0);
|
|
486
493
|
return _react.useMemo.call(void 0, () => {
|
|
487
494
|
const flat = _reactnative.StyleSheet.flatten(style);
|
|
488
495
|
return {
|
|
@@ -507,7 +514,7 @@ function PressableFeedbackHighlight({
|
|
|
507
514
|
ink,
|
|
508
515
|
corners
|
|
509
516
|
} = useFeedback();
|
|
510
|
-
const [styleProps] =
|
|
517
|
+
const [styleProps] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
|
|
511
518
|
const settings = resolveSlotAnimation(override, animation.highlight, HIGHLIGHT_OPACITY, HIGHLIGHT_DURATION);
|
|
512
519
|
const base = [_reactnative.StyleSheet.absoluteFillObject, {
|
|
513
520
|
backgroundColor: ink,
|
|
@@ -532,10 +539,10 @@ function PressableFeedbackHighlight({
|
|
|
532
539
|
}
|
|
533
540
|
PressableFeedbackHighlight.displayName = "XAUI.PressableFeedback.Highlight";
|
|
534
541
|
markOverlay(PressableFeedbackHighlight);
|
|
535
|
-
const
|
|
536
|
-
code: "function
|
|
537
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
538
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
542
|
+
const _worklet_15152704224865_init_data = {
|
|
543
|
+
code: "function chunkA4VD4MHKCjs4(){const{shown,opacity}=this.__closure;return{opacity:shown.value*opacity};}",
|
|
544
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-A4VD4MHK.cjs",
|
|
545
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkA4VD4MHKCjs4\",\"shown\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-A4VD4MHK.cjs\"],\"mappings\":\"AAuZ6E,SAAAA,iBAAMA,CAAA,QAAAC,KAAA,CAAAC,OAAA,OAAAC,SAAA,CAE/E,MAAO,CAAED,OAAO,CAAED,KAAK,CAACG,KAAK,CAAGF,OAAQ,CAAC,CAC3C\",\"ignoreList\":[]}"
|
|
539
546
|
};
|
|
540
547
|
function AnimatedHighlight({
|
|
541
548
|
base,
|
|
@@ -551,28 +558,28 @@ function AnimatedHighlight({
|
|
|
551
558
|
duration
|
|
552
559
|
});
|
|
553
560
|
}, [isPressed, shown, duration]);
|
|
554
|
-
const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function
|
|
555
|
-
|
|
561
|
+
const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkA4VD4MHKCjs4Factory({
|
|
562
|
+
_worklet_15152704224865_init_data,
|
|
556
563
|
shown,
|
|
557
564
|
opacity
|
|
558
565
|
}) {
|
|
559
566
|
const _e = [new global.Error(), -3, -27];
|
|
560
|
-
const
|
|
567
|
+
const chunkA4VD4MHKCjs4 = function () {
|
|
561
568
|
return {
|
|
562
569
|
opacity: shown.value * opacity
|
|
563
570
|
};
|
|
564
571
|
};
|
|
565
|
-
|
|
572
|
+
chunkA4VD4MHKCjs4.__closure = {
|
|
566
573
|
shown,
|
|
567
574
|
opacity
|
|
568
575
|
};
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
return
|
|
576
|
+
chunkA4VD4MHKCjs4.__workletHash = 15152704224865;
|
|
577
|
+
chunkA4VD4MHKCjs4.__pluginVersion = "0.7.4";
|
|
578
|
+
chunkA4VD4MHKCjs4.__initData = _worklet_15152704224865_init_data;
|
|
579
|
+
chunkA4VD4MHKCjs4.__stackDetails = _e;
|
|
580
|
+
return chunkA4VD4MHKCjs4;
|
|
574
581
|
}({
|
|
575
|
-
|
|
582
|
+
_worklet_15152704224865_init_data,
|
|
576
583
|
shown,
|
|
577
584
|
opacity
|
|
578
585
|
}), [shown, opacity]);
|
|
@@ -595,7 +602,7 @@ function PressableFeedbackRipple({
|
|
|
595
602
|
ink,
|
|
596
603
|
corners
|
|
597
604
|
} = useFeedback();
|
|
598
|
-
const [styleProps] =
|
|
605
|
+
const [styleProps] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
|
|
599
606
|
const waveStyle = [styleProps, style];
|
|
600
607
|
const settings = resolveSlotAnimation(override, animation.ripple, RIPPLE_OPACITY);
|
|
601
608
|
const [size, setSize] = _react.useState.call(void 0, {
|
|
@@ -636,10 +643,10 @@ function PressableFeedbackRipple({
|
|
|
636
643
|
}
|
|
637
644
|
PressableFeedbackRipple.displayName = "XAUI.PressableFeedback.Ripple";
|
|
638
645
|
markOverlay(PressableFeedbackRipple);
|
|
639
|
-
const
|
|
640
|
-
code: "function
|
|
641
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
642
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
646
|
+
const _worklet_16545336462220_init_data = {
|
|
647
|
+
code: "function chunkA4VD4MHKCjs5(){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}]};}",
|
|
648
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-A4VD4MHK.cjs",
|
|
649
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkA4VD4MHKCjs5\",\"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-A4VD4MHK.cjs\"],\"mappings\":\"AAud6E,SAAAA,iBAAMA,CAAA,QAAAC,IAAA,CAAAC,kBAAA,CAAAC,MAAA,CAAAC,OAAA,CAAAC,MAAA,OAAAC,SAAA,CAE/E,KAAM,CAAAC,CAAC,CAAGN,IAAI,CAACO,MAAM,CAACC,KAAK,CAC3B,KAAM,CAAAC,IAAI,CAAGT,IAAI,CAACU,MAAM,CAACF,KAAK,CAC9B,KAAM,CAAAG,KAAK,CAAGV,kBAAkB,CAAG,CAAC,CAAC,CAAGA,kBAAkB,EAAIK,CAAC,CAC/D,KAAM,CAAAM,CAAC,CAAGH,IAAI,CAACG,CAAC,CAAG,CAACV,MAAM,CAACU,CAAC,CAAGH,IAAI,CAACG,CAAC,EAAIN,CAAC,CAC1C,KAAM,CAAAO,CAAC,CAAGJ,IAAI,CAACI,CAAC,CAAG,CAACX,MAAM,CAACW,CAAC,CAAGJ,IAAI,CAACI,CAAC,EAAIP,CAAC,CAC1C,MAAO,CAELH,OAAO,CAAEH,IAAI,CAACc,KAAK,CAACN,KAAK,CAAGL,OAAO,CACnCY,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEJ,CAAC,CAAGR,MAAO,CAAC,CAAE,CAAEa,UAAU,CAAEJ,CAAC,CAAGT,MAAO,CAAC,CAAE,CAAEO,KAAA,CAAAA,KAAM,CAAC,CAC/E,CAAC,CACH\",\"ignoreList\":[]}"
|
|
643
650
|
};
|
|
644
651
|
function RippleWave({
|
|
645
652
|
wave,
|
|
@@ -649,8 +656,8 @@ function RippleWave({
|
|
|
649
656
|
opacity,
|
|
650
657
|
style
|
|
651
658
|
}) {
|
|
652
|
-
const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function
|
|
653
|
-
|
|
659
|
+
const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkA4VD4MHKCjs5Factory({
|
|
660
|
+
_worklet_16545336462220_init_data,
|
|
654
661
|
wave,
|
|
655
662
|
RIPPLE_START_SCALE,
|
|
656
663
|
center,
|
|
@@ -658,7 +665,7 @@ function RippleWave({
|
|
|
658
665
|
radius
|
|
659
666
|
}) {
|
|
660
667
|
const _e = [new global.Error(), -6, -27];
|
|
661
|
-
const
|
|
668
|
+
const chunkA4VD4MHKCjs5 = function () {
|
|
662
669
|
const t = wave.expand.value;
|
|
663
670
|
const from = wave.origin.value;
|
|
664
671
|
const scale = RIPPLE_START_SCALE + (1 - RIPPLE_START_SCALE) * t;
|
|
@@ -676,20 +683,20 @@ function RippleWave({
|
|
|
676
683
|
}]
|
|
677
684
|
};
|
|
678
685
|
};
|
|
679
|
-
|
|
686
|
+
chunkA4VD4MHKCjs5.__closure = {
|
|
680
687
|
wave,
|
|
681
688
|
RIPPLE_START_SCALE,
|
|
682
689
|
center,
|
|
683
690
|
opacity,
|
|
684
691
|
radius
|
|
685
692
|
};
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
return
|
|
693
|
+
chunkA4VD4MHKCjs5.__workletHash = 16545336462220;
|
|
694
|
+
chunkA4VD4MHKCjs5.__pluginVersion = "0.7.4";
|
|
695
|
+
chunkA4VD4MHKCjs5.__initData = _worklet_16545336462220_init_data;
|
|
696
|
+
chunkA4VD4MHKCjs5.__stackDetails = _e;
|
|
697
|
+
return chunkA4VD4MHKCjs5;
|
|
691
698
|
}({
|
|
692
|
-
|
|
699
|
+
_worklet_16545336462220_init_data,
|
|
693
700
|
wave,
|
|
694
701
|
RIPPLE_START_SCALE,
|
|
695
702
|
center,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkEVXZGNPAcjs = require('./chunk-EVXZGNPA.cjs');
|
|
5
|
+
|
|
6
|
+
// src/components/view/row.tsx
|
|
7
|
+
var _react = require('react');
|
|
8
|
+
var _reactnative = require('react-native');
|
|
9
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
10
|
+
var Row = _react.forwardRef.call(void 0, function Row2({ children, asChild = false, style, ...props }, ref) {
|
|
11
|
+
const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
|
|
12
|
+
const Root = asChild ? _chunkEVXZGNPAcjs.Slot : _reactnative.View;
|
|
13
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Root, { ref, style: [{ flexDirection: "row" }, styleProps, style], ...rest, children });
|
|
14
|
+
});
|
|
15
|
+
Row.displayName = "XAUI.Row";
|
|
16
|
+
|
|
17
|
+
// src/components/view/column.tsx
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
var Column = _react.forwardRef.call(void 0, function Column2({ children, asChild = false, style, ...props }, ref) {
|
|
22
|
+
const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
|
|
23
|
+
const Root = asChild ? _chunkEVXZGNPAcjs.Slot : _reactnative.View;
|
|
24
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Root, { ref, style: [{ flexDirection: "column" }, styleProps, style], ...rest, children });
|
|
25
|
+
});
|
|
26
|
+
Column.displayName = "XAUI.Column";
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
exports.Row = Row; exports.Column = Column;
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
var _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
|
|
8
|
+
var _chunkMC7SY2QHcjs = require('./chunk-MC7SY2QH.cjs');
|
|
7
9
|
|
|
8
10
|
// src/provider/xaui-provider.tsx
|
|
9
11
|
var _reactnative = require('react-native');
|
|
@@ -11,38 +13,38 @@ var _reactnative = require('react-native');
|
|
|
11
13
|
// src/theme/derive-colors.ts
|
|
12
14
|
function deriveColors(s) {
|
|
13
15
|
return {
|
|
14
|
-
accentPressed:
|
|
15
|
-
successPressed:
|
|
16
|
-
warningPressed:
|
|
17
|
-
dangerPressed:
|
|
18
|
-
defaultPressed:
|
|
19
|
-
surfacePressed:
|
|
20
|
-
defaultSoft:
|
|
16
|
+
accentPressed: _chunk57SJ4LJFcjs.mix.call(void 0, s.accent, s.foreground, 0.1),
|
|
17
|
+
successPressed: _chunk57SJ4LJFcjs.mix.call(void 0, s.success, s.foreground, 0.1),
|
|
18
|
+
warningPressed: _chunk57SJ4LJFcjs.mix.call(void 0, s.warning, s.foreground, 0.1),
|
|
19
|
+
dangerPressed: _chunk57SJ4LJFcjs.mix.call(void 0, s.danger, s.foreground, 0.1),
|
|
20
|
+
defaultPressed: _chunk57SJ4LJFcjs.mix.call(void 0, s.default, s.defaultForeground, 0.04),
|
|
21
|
+
surfacePressed: _chunk57SJ4LJFcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.08),
|
|
22
|
+
defaultSoft: _chunk57SJ4LJFcjs.alpha.call(void 0, s.default, 0.5),
|
|
21
23
|
defaultSoftForeground: s.defaultForeground,
|
|
22
|
-
defaultSoftPressed:
|
|
23
|
-
accentSoft:
|
|
24
|
-
accentSoftForeground:
|
|
25
|
-
accentSoftPressed:
|
|
26
|
-
successSoft:
|
|
27
|
-
successSoftForeground:
|
|
28
|
-
successSoftPressed:
|
|
29
|
-
warningSoft:
|
|
30
|
-
warningSoftForeground:
|
|
31
|
-
warningSoftPressed:
|
|
32
|
-
dangerSoft:
|
|
33
|
-
dangerSoftForeground:
|
|
34
|
-
dangerSoftPressed:
|
|
35
|
-
backgroundSecondary:
|
|
36
|
-
backgroundTertiary:
|
|
24
|
+
defaultSoftPressed: _chunk57SJ4LJFcjs.alpha.call(void 0, s.default, 0.6),
|
|
25
|
+
accentSoft: _chunk57SJ4LJFcjs.alpha.call(void 0, s.accent, 0.15),
|
|
26
|
+
accentSoftForeground: _chunk57SJ4LJFcjs.mix.call(void 0, s.accent, s.foreground, 0.2),
|
|
27
|
+
accentSoftPressed: _chunk57SJ4LJFcjs.alpha.call(void 0, s.accent, 0.2),
|
|
28
|
+
successSoft: _chunk57SJ4LJFcjs.alpha.call(void 0, s.success, 0.15),
|
|
29
|
+
successSoftForeground: _chunk57SJ4LJFcjs.mix.call(void 0, s.success, s.foreground, 0.3),
|
|
30
|
+
successSoftPressed: _chunk57SJ4LJFcjs.alpha.call(void 0, s.success, 0.2),
|
|
31
|
+
warningSoft: _chunk57SJ4LJFcjs.alpha.call(void 0, s.warning, 0.15),
|
|
32
|
+
warningSoftForeground: _chunk57SJ4LJFcjs.mix.call(void 0, s.warning, s.foreground, 0.35),
|
|
33
|
+
warningSoftPressed: _chunk57SJ4LJFcjs.alpha.call(void 0, s.warning, 0.2),
|
|
34
|
+
dangerSoft: _chunk57SJ4LJFcjs.alpha.call(void 0, s.danger, 0.15),
|
|
35
|
+
dangerSoftForeground: _chunk57SJ4LJFcjs.mix.call(void 0, s.danger, s.foreground, 0.2),
|
|
36
|
+
dangerSoftPressed: _chunk57SJ4LJFcjs.alpha.call(void 0, s.danger, 0.2),
|
|
37
|
+
backgroundSecondary: _chunk57SJ4LJFcjs.mix.call(void 0, s.background, s.foreground, 0.04),
|
|
38
|
+
backgroundTertiary: _chunk57SJ4LJFcjs.mix.call(void 0, s.background, s.foreground, 0.08),
|
|
37
39
|
backgroundInverse: s.foreground,
|
|
38
|
-
borderSecondary:
|
|
39
|
-
borderTertiary:
|
|
40
|
-
separatorSecondary:
|
|
41
|
-
separatorTertiary:
|
|
42
|
-
fieldPressed:
|
|
40
|
+
borderSecondary: _chunk57SJ4LJFcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.22),
|
|
41
|
+
borderTertiary: _chunk57SJ4LJFcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.34),
|
|
42
|
+
separatorSecondary: _chunk57SJ4LJFcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.15),
|
|
43
|
+
separatorTertiary: _chunk57SJ4LJFcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.19),
|
|
44
|
+
fieldPressed: _chunk57SJ4LJFcjs.mix.call(void 0, s.fieldBackground, s.fieldForeground, 0.1),
|
|
43
45
|
fieldFocus: s.fieldBackground,
|
|
44
|
-
fieldBorderPressed:
|
|
45
|
-
fieldBorderFocus:
|
|
46
|
+
fieldBorderPressed: _chunk57SJ4LJFcjs.mix.call(void 0, s.fieldBorder, s.fieldForeground, 0.12),
|
|
47
|
+
fieldBorderFocus: _chunk57SJ4LJFcjs.mix.call(void 0, s.fieldBorder, s.fieldForeground, 0.26)
|
|
46
48
|
};
|
|
47
49
|
}
|
|
48
50
|
|
|
@@ -365,7 +367,7 @@ function resolveMode(mode, config, id) {
|
|
|
365
367
|
};
|
|
366
368
|
}
|
|
367
369
|
function createTheme(config = {}) {
|
|
368
|
-
const id =
|
|
370
|
+
const id = _chunkMC7SY2QHcjs.stableHash.call(void 0, config);
|
|
369
371
|
return {
|
|
370
372
|
id,
|
|
371
373
|
light: resolveMode("light", config, id),
|
|
@@ -383,7 +385,7 @@ function XAUIProvider({
|
|
|
383
385
|
}) {
|
|
384
386
|
const scheme = _reactnative.useColorScheme.call(void 0, );
|
|
385
387
|
const resolved = colorMode === "system" ? scheme === "dark" ? "dark" : "light" : colorMode;
|
|
386
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
388
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk57SJ4LJFcjs.ThemeContext.Provider, { value: theme[resolved], children });
|
|
387
389
|
}
|
|
388
390
|
|
|
389
391
|
// src/theme/palette.ts
|