@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
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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 _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
|
|
4
|
+
|
|
5
|
+
// src/system/recipe/resolve-tint.ts
|
|
6
|
+
var TINT_SLICE_BY_SUFFIX = [
|
|
7
|
+
[/SoftForeground$/, "softForeground"],
|
|
8
|
+
[/SoftPressed$/, "softPressed"],
|
|
9
|
+
[/Soft$/, "soft"],
|
|
10
|
+
[/Foreground$/, "foreground"],
|
|
11
|
+
[/Pressed$/, "pressed"]
|
|
12
|
+
];
|
|
13
|
+
function tintSliceFor(token) {
|
|
14
|
+
for (const [suffix, slice] of TINT_SLICE_BY_SUFFIX) {
|
|
15
|
+
if (suffix.test(token)) return slice;
|
|
16
|
+
}
|
|
17
|
+
return "base";
|
|
18
|
+
}
|
|
19
|
+
function resolveTint(tokens, color, theme) {
|
|
20
|
+
const tint = _chunk57SJ4LJFcjs.deriveTint.call(void 0, color, theme);
|
|
21
|
+
const colors = {};
|
|
22
|
+
for (const [role, token] of Object.entries(_nullishCoalesce(tokens, () => ( {})))) {
|
|
23
|
+
colors[role] = tint[tintSliceFor(token)];
|
|
24
|
+
}
|
|
25
|
+
return colors;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// src/system/recipe/style-cache.ts
|
|
29
|
+
var _reactnative = require('react-native');
|
|
30
|
+
|
|
31
|
+
// src/system/recipe/variant-map.ts
|
|
32
|
+
var STATE_ORDER = ["focused", "pressed", "disabled"];
|
|
33
|
+
function resolveSelection(defaultVariants, selection) {
|
|
34
|
+
const resolved = { ...defaultVariants };
|
|
35
|
+
for (const [axis, value] of Object.entries(_nullishCoalesce(selection, () => ( {})))) {
|
|
36
|
+
if (value !== void 0) resolved[axis] = value;
|
|
37
|
+
}
|
|
38
|
+
return resolved;
|
|
39
|
+
}
|
|
40
|
+
function resolveVariantColors(tokens, theme) {
|
|
41
|
+
const colors = {};
|
|
42
|
+
for (const [role, token] of entriesOf(tokens)) {
|
|
43
|
+
const value = theme.colors[token];
|
|
44
|
+
if (value === void 0) {
|
|
45
|
+
throw new Error(
|
|
46
|
+
`XAUI: the recipe names "${token}" for its "${role}" role, but the theme has no such colour token. Check the spelling against XAUIColors.`
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
colors[role] = value;
|
|
50
|
+
}
|
|
51
|
+
return colors;
|
|
52
|
+
}
|
|
53
|
+
function activeStateFns(states, active) {
|
|
54
|
+
const fns = [];
|
|
55
|
+
for (const state of STATE_ORDER) {
|
|
56
|
+
const fn = active[state] ? _optionalChain([states, 'optionalAccess', _ => _[state]]) : void 0;
|
|
57
|
+
if (fn) fns.push(fn);
|
|
58
|
+
}
|
|
59
|
+
return fns;
|
|
60
|
+
}
|
|
61
|
+
function collectStyleFns(config, selection, states) {
|
|
62
|
+
const fns = [];
|
|
63
|
+
if (config.base) fns.push(config.base);
|
|
64
|
+
if (config.paint) fns.push(config.paint);
|
|
65
|
+
for (const [axis, values] of Object.entries(_nullishCoalesce(config.variants, () => ( {})))) {
|
|
66
|
+
const value = selection[axis];
|
|
67
|
+
const fn = value === void 0 ? void 0 : values[value];
|
|
68
|
+
if (fn) fns.push(fn);
|
|
69
|
+
}
|
|
70
|
+
for (const compound of _nullishCoalesce(config.compoundVariants, () => ( []))) {
|
|
71
|
+
if (appliesTo(compound.when, selection)) fns.push(compound.style);
|
|
72
|
+
}
|
|
73
|
+
return [...fns, ...activeStateFns(config.states, states)];
|
|
74
|
+
}
|
|
75
|
+
function appliesTo(when, selection) {
|
|
76
|
+
return Object.entries(when).every(([axis, value]) => selection[axis] === value);
|
|
77
|
+
}
|
|
78
|
+
function entriesOf(tokens) {
|
|
79
|
+
return Object.entries(_nullishCoalesce(tokens, () => ( {})));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// src/system/recipe/style-cache.ts
|
|
83
|
+
function createStyleCache(slots) {
|
|
84
|
+
const entries = /* @__PURE__ */ new Map();
|
|
85
|
+
return {
|
|
86
|
+
read(key, build) {
|
|
87
|
+
const hit = entries.get(key);
|
|
88
|
+
if (hit) return hit;
|
|
89
|
+
const built = build();
|
|
90
|
+
const complete = {};
|
|
91
|
+
for (const slot of slots) complete[slot] = _nullishCoalesce(built[slot], () => ( {}));
|
|
92
|
+
const created = _reactnative.StyleSheet.create(complete);
|
|
93
|
+
entries.set(key, created);
|
|
94
|
+
return created;
|
|
95
|
+
},
|
|
96
|
+
get size() {
|
|
97
|
+
return entries.size;
|
|
98
|
+
},
|
|
99
|
+
clear() {
|
|
100
|
+
entries.clear();
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
function cacheKey(theme, selection, states) {
|
|
105
|
+
const axes = Object.keys(selection).sort().map((axis) => `${axis}:${_nullishCoalesce(selection[axis], () => ( "-"))}`).join("|");
|
|
106
|
+
const active = STATE_ORDER.filter((state) => states[state]).join(",");
|
|
107
|
+
return `${theme.id}|${theme.mode}|${axes}|${active}`;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// src/system/recipe/create-recipe.ts
|
|
111
|
+
function createRecipe(config) {
|
|
112
|
+
const cache = createStyleCache(config.slots);
|
|
113
|
+
const tokensFor = (variant) => variant === void 0 ? void 0 : _optionalChain([config, 'access', _2 => _2.variantTokens, 'optionalAccess', _3 => _3[variant]]);
|
|
114
|
+
return {
|
|
115
|
+
slots: config.slots,
|
|
116
|
+
resolve({ theme, selection, states = {} }) {
|
|
117
|
+
const resolved = resolveSelection(config.defaultVariants, selection);
|
|
118
|
+
return cache.read(cacheKey(theme, resolved, states), () => {
|
|
119
|
+
const colors = resolveVariantColors(tokensFor(resolved.variant), theme);
|
|
120
|
+
return apply(collectStyleFns(config, resolved, states), theme, colors);
|
|
121
|
+
});
|
|
122
|
+
},
|
|
123
|
+
tint({ theme, color, selection, states = {} }) {
|
|
124
|
+
if (!config.paint) return {};
|
|
125
|
+
const resolved = resolveSelection(config.defaultVariants, selection);
|
|
126
|
+
const tokens = tokensFor(resolved.variant);
|
|
127
|
+
if (!tokens) return {};
|
|
128
|
+
const colors = resolveTint(tokens, color, theme);
|
|
129
|
+
const fns = [config.paint, ...activeStateFns(config.states, states)];
|
|
130
|
+
return apply(fns, theme, colors);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function apply(fns, theme, colors) {
|
|
135
|
+
const merged = {};
|
|
136
|
+
for (const fn of fns) {
|
|
137
|
+
const produced = fn(theme, colors);
|
|
138
|
+
for (const slot of Object.keys(produced)) {
|
|
139
|
+
const style = produced[slot];
|
|
140
|
+
if (!style) continue;
|
|
141
|
+
const previous = merged[slot];
|
|
142
|
+
merged[slot] = previous ? { ...previous, ...style } : style;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return merged;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
exports.createRecipe = createRecipe;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Slot, createSlotContext, useStyleProps } from "./chunk-
|
|
2
|
-
import { contrastOn, isHex, useXAUITheme } from "./chunk-
|
|
1
|
+
import { Slot, createSlotContext, useStyleProps } from "./chunk-EXX6ATAS.js";
|
|
2
|
+
import { contrastOn, isHex, useXAUITheme } from "./chunk-A3EGFI6T.js";
|
|
3
3
|
|
|
4
4
|
// src/system/icon/icon-context.ts
|
|
5
5
|
import { createContext, useContext } from "react";
|
|
@@ -13,46 +13,53 @@ function useIconContext() {
|
|
|
13
13
|
import { cloneElement, isValidElement } from "react";
|
|
14
14
|
import { Image } from "react-native";
|
|
15
15
|
import { jsx } from "react/jsx-runtime";
|
|
16
|
-
function Icon({
|
|
17
|
-
as: Component,
|
|
18
|
-
children,
|
|
19
|
-
source,
|
|
20
|
-
size,
|
|
21
|
-
color,
|
|
22
|
-
style,
|
|
23
|
-
...props
|
|
24
|
-
}) {
|
|
16
|
+
function Icon(props) {
|
|
25
17
|
const inherited = useIconContext();
|
|
26
18
|
const theme = useXAUITheme();
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
const size = props.size ?? inherited.size ?? theme.fontSizes.md;
|
|
20
|
+
const color = props.color ?? inherited.color ?? theme.colors.foreground;
|
|
21
|
+
if (props.as) {
|
|
22
|
+
const Component = props.as;
|
|
31
23
|
return /* @__PURE__ */jsx(Component, {
|
|
32
|
-
size
|
|
33
|
-
color
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
if (isValidElement(children)) {
|
|
37
|
-
return cloneElement(children, {
|
|
38
|
-
width: resolvedSize,
|
|
39
|
-
height: resolvedSize,
|
|
40
|
-
color: resolvedColor
|
|
24
|
+
size,
|
|
25
|
+
color
|
|
41
26
|
});
|
|
42
27
|
}
|
|
43
|
-
if (
|
|
44
|
-
return
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
height: resolvedSize,
|
|
49
|
-
tintColor: resolvedColor
|
|
50
|
-
}, styleProps, style]
|
|
28
|
+
if (isValidElement(props.children)) {
|
|
29
|
+
return cloneElement(props.children, {
|
|
30
|
+
width: size,
|
|
31
|
+
height: size,
|
|
32
|
+
color
|
|
51
33
|
});
|
|
52
34
|
}
|
|
35
|
+
if (props.source) return /* @__PURE__ */jsx(IconImage, {
|
|
36
|
+
...props,
|
|
37
|
+
resolved: {
|
|
38
|
+
size,
|
|
39
|
+
color
|
|
40
|
+
}
|
|
41
|
+
});
|
|
53
42
|
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.");
|
|
54
43
|
}
|
|
55
44
|
Icon.displayName = "XAUI.Icon";
|
|
45
|
+
function IconImage({
|
|
46
|
+
source,
|
|
47
|
+
style,
|
|
48
|
+
resolved,
|
|
49
|
+
size: _size,
|
|
50
|
+
color: _color,
|
|
51
|
+
...props
|
|
52
|
+
}) {
|
|
53
|
+
const [styleProps] = useStyleProps(props);
|
|
54
|
+
return /* @__PURE__ */jsx(Image, {
|
|
55
|
+
source,
|
|
56
|
+
style: [{
|
|
57
|
+
width: resolved.size,
|
|
58
|
+
height: resolved.size,
|
|
59
|
+
tintColor: resolved.color
|
|
60
|
+
}, styleProps, style]
|
|
61
|
+
});
|
|
62
|
+
}
|
|
56
63
|
|
|
57
64
|
// src/system/pressable-feedback/pressable-feedback-context.ts
|
|
58
65
|
import { createContext as createContext2 } from "react";
|
|
@@ -63,13 +70,13 @@ var DisableAllContext = createContext2(false);
|
|
|
63
70
|
var PRESS_SCALE = 0.985;
|
|
64
71
|
var PRESS_DURATION = 300;
|
|
65
72
|
var SCALE_REFERENCE_WIDTH = 300;
|
|
66
|
-
const
|
|
67
|
-
code: "function
|
|
68
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
69
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
73
|
+
const _worklet_1477207651784_init_data = {
|
|
74
|
+
code: "function pressScaleFor_chunkWXAME7KBJs1(width){const{SCALE_REFERENCE_WIDTH,PRESS_SCALE}=this.__closure;const coefficient=width>0?SCALE_REFERENCE_WIDTH/width:1;return 1-(1-PRESS_SCALE)*coefficient;}",
|
|
75
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-WXAME7KB.js",
|
|
76
|
+
sourceMap: "{\"version\":3,\"names\":[\"pressScaleFor_chunkWXAME7KBJs1\",\"width\",\"SCALE_REFERENCE_WIDTH\",\"PRESS_SCALE\",\"__closure\",\"coefficient\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-WXAME7KB.js\"],\"mappings\":\"AA4EA,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\":[]}"
|
|
70
77
|
};
|
|
71
|
-
const pressScaleFor = function
|
|
72
|
-
|
|
78
|
+
const pressScaleFor = function pressScaleFor_chunkWXAME7KBJs1Factory({
|
|
79
|
+
_worklet_1477207651784_init_data,
|
|
73
80
|
SCALE_REFERENCE_WIDTH,
|
|
74
81
|
PRESS_SCALE
|
|
75
82
|
}) {
|
|
@@ -82,13 +89,13 @@ const pressScaleFor = function pressScaleFor_chunkF432IDIWJs1Factory({
|
|
|
82
89
|
SCALE_REFERENCE_WIDTH,
|
|
83
90
|
PRESS_SCALE
|
|
84
91
|
};
|
|
85
|
-
pressScaleFor.__workletHash =
|
|
92
|
+
pressScaleFor.__workletHash = 1477207651784;
|
|
86
93
|
pressScaleFor.__pluginVersion = "0.7.4";
|
|
87
|
-
pressScaleFor.__initData =
|
|
94
|
+
pressScaleFor.__initData = _worklet_1477207651784_init_data;
|
|
88
95
|
pressScaleFor.__stackDetails = _e;
|
|
89
96
|
return pressScaleFor;
|
|
90
97
|
}({
|
|
91
|
-
|
|
98
|
+
_worklet_1477207651784_init_data,
|
|
92
99
|
SCALE_REFERENCE_WIDTH,
|
|
93
100
|
PRESS_SCALE
|
|
94
101
|
});
|
|
@@ -101,26 +108,26 @@ var RIPPLE_CONFIRM_DURATION = 225;
|
|
|
101
108
|
var RIPPLE_FADE_IN = 75;
|
|
102
109
|
var RIPPLE_FADE_OUT_DELAY = 225;
|
|
103
110
|
var RIPPLE_FADE_OUT = 150;
|
|
104
|
-
const
|
|
105
|
-
code: "function
|
|
106
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
107
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
111
|
+
const _worklet_6998368132659_init_data = {
|
|
112
|
+
code: "function rippleRadiusFor_chunkWXAME7KBJs2(width,height){return Math.sqrt(width*width+height*height)/2+5;}",
|
|
113
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-WXAME7KB.js",
|
|
114
|
+
sourceMap: "{\"version\":3,\"names\":[\"rippleRadiusFor_chunkWXAME7KBJs2\",\"width\",\"height\",\"Math\",\"sqrt\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-WXAME7KB.js\"],\"mappings\":\"AA0FA,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\":[]}"
|
|
108
115
|
};
|
|
109
|
-
const rippleRadiusFor = function
|
|
110
|
-
|
|
116
|
+
const rippleRadiusFor = function rippleRadiusFor_chunkWXAME7KBJs2Factory({
|
|
117
|
+
_worklet_6998368132659_init_data
|
|
111
118
|
}) {
|
|
112
119
|
const _e = [new global.Error(), 1, -27];
|
|
113
120
|
const rippleRadiusFor = function (width, height) {
|
|
114
121
|
return Math.sqrt(width * width + height * height) / 2 + 5;
|
|
115
122
|
};
|
|
116
123
|
rippleRadiusFor.__closure = {};
|
|
117
|
-
rippleRadiusFor.__workletHash =
|
|
124
|
+
rippleRadiusFor.__workletHash = 6998368132659;
|
|
118
125
|
rippleRadiusFor.__pluginVersion = "0.7.4";
|
|
119
|
-
rippleRadiusFor.__initData =
|
|
126
|
+
rippleRadiusFor.__initData = _worklet_6998368132659_init_data;
|
|
120
127
|
rippleRadiusFor.__stackDetails = _e;
|
|
121
128
|
return rippleRadiusFor;
|
|
122
129
|
}({
|
|
123
|
-
|
|
130
|
+
_worklet_6998368132659_init_data
|
|
124
131
|
});
|
|
125
132
|
var ALL_OFF = {
|
|
126
133
|
scale: false,
|
|
@@ -294,15 +301,15 @@ var StaticFeedback = forwardRef(function StaticFeedback2({
|
|
|
294
301
|
})
|
|
295
302
|
});
|
|
296
303
|
});
|
|
297
|
-
const
|
|
298
|
-
code: "function
|
|
299
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
300
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
304
|
+
const _worklet_3682262406534_init_data = {
|
|
305
|
+
code: "function chunkWXAME7KBJs3(){const{pressScaleFor,size}=this.__closure;return pressScaleFor(size.value.width);}",
|
|
306
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-WXAME7KB.js",
|
|
307
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkWXAME7KBJs3\",\"pressScaleFor\",\"size\",\"__closure\",\"value\",\"width\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-WXAME7KB.js\"],\"mappings\":\"AAwQuC,SAAAA,iBAAA,QAAAC,aAAA,CAAAC,IAAA,OAAAC,SAAA,OAAM,CAAAF,aAAc,CAAAC,IAAK,CAAAE,KAAM,CAAAC,KAAK\",\"ignoreList\":[]}"
|
|
301
308
|
};
|
|
302
|
-
const
|
|
303
|
-
code: "function
|
|
304
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
305
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
309
|
+
const _worklet_10640067524054_init_data = {
|
|
310
|
+
code: "function chunkWXAME7KBJs4(){const{animation,pressedScale,progress}=this.__closure;if(!animation.scale)return{};return{transform:[{scale:1-(1-pressedScale.value)*progress.value}]};}",
|
|
311
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-WXAME7KB.js",
|
|
312
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkWXAME7KBJs4\",\"animation\",\"pressedScale\",\"progress\",\"__closure\",\"scale\",\"transform\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-WXAME7KB.js\"],\"mappings\":\"AAyQyC,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\":[]}"
|
|
306
313
|
};
|
|
307
314
|
var AnimatedFeedback = forwardRef(function AnimatedFeedback2({
|
|
308
315
|
isPressed = false,
|
|
@@ -330,35 +337,35 @@ var AnimatedFeedback = forwardRef(function AnimatedFeedback2({
|
|
|
330
337
|
easing: Easing.out(Easing.ease)
|
|
331
338
|
});
|
|
332
339
|
}, [isPressed, progress]);
|
|
333
|
-
const pressedScale = useDerivedValue(function
|
|
334
|
-
|
|
340
|
+
const pressedScale = useDerivedValue(function chunkWXAME7KBJs3Factory({
|
|
341
|
+
_worklet_3682262406534_init_data,
|
|
335
342
|
pressScaleFor,
|
|
336
343
|
size
|
|
337
344
|
}) {
|
|
338
345
|
const _e = [new global.Error(), -3, -27];
|
|
339
|
-
const
|
|
340
|
-
|
|
346
|
+
const chunkWXAME7KBJs3 = () => pressScaleFor(size.value.width);
|
|
347
|
+
chunkWXAME7KBJs3.__closure = {
|
|
341
348
|
pressScaleFor,
|
|
342
349
|
size
|
|
343
350
|
};
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
return
|
|
351
|
+
chunkWXAME7KBJs3.__workletHash = 3682262406534;
|
|
352
|
+
chunkWXAME7KBJs3.__pluginVersion = "0.7.4";
|
|
353
|
+
chunkWXAME7KBJs3.__initData = _worklet_3682262406534_init_data;
|
|
354
|
+
chunkWXAME7KBJs3.__stackDetails = _e;
|
|
355
|
+
return chunkWXAME7KBJs3;
|
|
349
356
|
}({
|
|
350
|
-
|
|
357
|
+
_worklet_3682262406534_init_data,
|
|
351
358
|
pressScaleFor,
|
|
352
359
|
size
|
|
353
360
|
}));
|
|
354
|
-
const animatedStyle = useAnimatedStyle(function
|
|
355
|
-
|
|
361
|
+
const animatedStyle = useAnimatedStyle(function chunkWXAME7KBJs4Factory({
|
|
362
|
+
_worklet_10640067524054_init_data,
|
|
356
363
|
animation,
|
|
357
364
|
pressedScale,
|
|
358
365
|
progress
|
|
359
366
|
}) {
|
|
360
367
|
const _e = [new global.Error(), -4, -27];
|
|
361
|
-
const
|
|
368
|
+
const chunkWXAME7KBJs4 = function () {
|
|
362
369
|
if (!animation.scale) return {};
|
|
363
370
|
return {
|
|
364
371
|
transform: [{
|
|
@@ -366,18 +373,18 @@ var AnimatedFeedback = forwardRef(function AnimatedFeedback2({
|
|
|
366
373
|
}]
|
|
367
374
|
};
|
|
368
375
|
};
|
|
369
|
-
|
|
376
|
+
chunkWXAME7KBJs4.__closure = {
|
|
370
377
|
animation,
|
|
371
378
|
pressedScale,
|
|
372
379
|
progress
|
|
373
380
|
};
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
return
|
|
381
|
+
chunkWXAME7KBJs4.__workletHash = 10640067524054;
|
|
382
|
+
chunkWXAME7KBJs4.__pluginVersion = "0.7.4";
|
|
383
|
+
chunkWXAME7KBJs4.__initData = _worklet_10640067524054_init_data;
|
|
384
|
+
chunkWXAME7KBJs4.__stackDetails = _e;
|
|
385
|
+
return chunkWXAME7KBJs4;
|
|
379
386
|
}({
|
|
380
|
-
|
|
387
|
+
_worklet_10640067524054_init_data,
|
|
381
388
|
animation,
|
|
382
389
|
pressedScale,
|
|
383
390
|
progress
|
|
@@ -522,10 +529,10 @@ function PressableFeedbackHighlight({
|
|
|
522
529
|
}
|
|
523
530
|
PressableFeedbackHighlight.displayName = "XAUI.PressableFeedback.Highlight";
|
|
524
531
|
markOverlay(PressableFeedbackHighlight);
|
|
525
|
-
const
|
|
526
|
-
code: "function
|
|
527
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
528
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
532
|
+
const _worklet_4673236042662_init_data = {
|
|
533
|
+
code: "function chunkWXAME7KBJs5(){const{shown,opacity}=this.__closure;return{opacity:shown.value*opacity};}",
|
|
534
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-WXAME7KB.js",
|
|
535
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkWXAME7KBJs5\",\"shown\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-WXAME7KB.js\"],\"mappings\":\"AAuZ0C,SAAAA,gBAAMA,CAAA,QAAAC,KAAA,CAAAC,OAAA,OAAAC,SAAA,CAE5C,MAAO,CAAED,OAAO,CAAED,KAAK,CAACG,KAAK,CAAGF,OAAQ,CAAC,CAC3C\",\"ignoreList\":[]}"
|
|
529
536
|
};
|
|
530
537
|
function AnimatedHighlight({
|
|
531
538
|
base,
|
|
@@ -541,28 +548,28 @@ function AnimatedHighlight({
|
|
|
541
548
|
duration
|
|
542
549
|
});
|
|
543
550
|
}, [isPressed, shown, duration]);
|
|
544
|
-
const animatedStyle = useAnimatedStyle2(function
|
|
545
|
-
|
|
551
|
+
const animatedStyle = useAnimatedStyle2(function chunkWXAME7KBJs5Factory({
|
|
552
|
+
_worklet_4673236042662_init_data,
|
|
546
553
|
shown,
|
|
547
554
|
opacity
|
|
548
555
|
}) {
|
|
549
556
|
const _e = [new global.Error(), -3, -27];
|
|
550
|
-
const
|
|
557
|
+
const chunkWXAME7KBJs5 = function () {
|
|
551
558
|
return {
|
|
552
559
|
opacity: shown.value * opacity
|
|
553
560
|
};
|
|
554
561
|
};
|
|
555
|
-
|
|
562
|
+
chunkWXAME7KBJs5.__closure = {
|
|
556
563
|
shown,
|
|
557
564
|
opacity
|
|
558
565
|
};
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
return
|
|
566
|
+
chunkWXAME7KBJs5.__workletHash = 4673236042662;
|
|
567
|
+
chunkWXAME7KBJs5.__pluginVersion = "0.7.4";
|
|
568
|
+
chunkWXAME7KBJs5.__initData = _worklet_4673236042662_init_data;
|
|
569
|
+
chunkWXAME7KBJs5.__stackDetails = _e;
|
|
570
|
+
return chunkWXAME7KBJs5;
|
|
564
571
|
}({
|
|
565
|
-
|
|
572
|
+
_worklet_4673236042662_init_data,
|
|
566
573
|
shown,
|
|
567
574
|
opacity
|
|
568
575
|
}), [shown, opacity]);
|
|
@@ -629,10 +636,10 @@ function PressableFeedbackRipple({
|
|
|
629
636
|
}
|
|
630
637
|
PressableFeedbackRipple.displayName = "XAUI.PressableFeedback.Ripple";
|
|
631
638
|
markOverlay(PressableFeedbackRipple);
|
|
632
|
-
const
|
|
633
|
-
code: "function
|
|
634
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
635
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
639
|
+
const _worklet_1833417637801_init_data = {
|
|
640
|
+
code: "function chunkWXAME7KBJs6(){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}]};}",
|
|
641
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-WXAME7KB.js",
|
|
642
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkWXAME7KBJs6\",\"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-WXAME7KB.js\"],\"mappings\":\"AAud0C,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\":[]}"
|
|
636
643
|
};
|
|
637
644
|
function RippleWave({
|
|
638
645
|
wave,
|
|
@@ -642,8 +649,8 @@ function RippleWave({
|
|
|
642
649
|
opacity,
|
|
643
650
|
style
|
|
644
651
|
}) {
|
|
645
|
-
const animatedStyle = useAnimatedStyle3(function
|
|
646
|
-
|
|
652
|
+
const animatedStyle = useAnimatedStyle3(function chunkWXAME7KBJs6Factory({
|
|
653
|
+
_worklet_1833417637801_init_data,
|
|
647
654
|
wave,
|
|
648
655
|
RIPPLE_START_SCALE,
|
|
649
656
|
center,
|
|
@@ -651,7 +658,7 @@ function RippleWave({
|
|
|
651
658
|
radius
|
|
652
659
|
}) {
|
|
653
660
|
const _e = [new global.Error(), -6, -27];
|
|
654
|
-
const
|
|
661
|
+
const chunkWXAME7KBJs6 = function () {
|
|
655
662
|
const t = wave.expand.value;
|
|
656
663
|
const from = wave.origin.value;
|
|
657
664
|
const scale = RIPPLE_START_SCALE + (1 - RIPPLE_START_SCALE) * t;
|
|
@@ -669,20 +676,20 @@ function RippleWave({
|
|
|
669
676
|
}]
|
|
670
677
|
};
|
|
671
678
|
};
|
|
672
|
-
|
|
679
|
+
chunkWXAME7KBJs6.__closure = {
|
|
673
680
|
wave,
|
|
674
681
|
RIPPLE_START_SCALE,
|
|
675
682
|
center,
|
|
676
683
|
opacity,
|
|
677
684
|
radius
|
|
678
685
|
};
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
return
|
|
686
|
+
chunkWXAME7KBJs6.__workletHash = 1833417637801;
|
|
687
|
+
chunkWXAME7KBJs6.__pluginVersion = "0.7.4";
|
|
688
|
+
chunkWXAME7KBJs6.__initData = _worklet_1833417637801_init_data;
|
|
689
|
+
chunkWXAME7KBJs6.__stackDetails = _e;
|
|
690
|
+
return chunkWXAME7KBJs6;
|
|
684
691
|
}({
|
|
685
|
-
|
|
692
|
+
_worklet_1833417637801_init_data,
|
|
686
693
|
wave,
|
|
687
694
|
RIPPLE_START_SCALE,
|
|
688
695
|
center,
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
8
|
-
require('../../chunk-
|
|
5
|
+
var _chunk6ARON3XTcjs = require('../../chunk-6ARON3XT.cjs');
|
|
6
|
+
require('../../chunk-A4VD4MHK.cjs');
|
|
7
|
+
require('../../chunk-UVO4GFSW.cjs');
|
|
8
|
+
require('../../chunk-EVXZGNPA.cjs');
|
|
9
|
+
require('../../chunk-57SJ4LJF.cjs');
|
|
10
|
+
require('../../chunk-MC7SY2QH.cjs');
|
|
9
11
|
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
|
|
13
|
-
exports.Button =
|
|
15
|
+
exports.Button = _chunk6ARON3XTcjs.Button; exports.buttonRecipe = _chunk6ARON3XTcjs.buttonRecipe; exports.useButton = _chunk6ARON3XTcjs.useButton;
|
|
@@ -2,9 +2,10 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import * as react_native from 'react-native';
|
|
4
4
|
import { StyleProp, TextStyle, ViewStyle, TextProps, PressableStateCallbackType } from 'react-native';
|
|
5
|
-
import {
|
|
5
|
+
import { T as TextStyleProps, V as ViewStyleProps } from '../../style-props.type-B1BG5TCm.cjs';
|
|
6
6
|
import { S as Size, R as RadiusKey, X as XAUITheme } from '../../theme.type-C2gNHpEx.cjs';
|
|
7
|
-
import { a as IconContextValue, b as IconProps, P as PressableFeedbackProps, c as AnimationProp } from '../../pressable-feedback.type-
|
|
7
|
+
import { a as IconContextValue, b as IconProps, P as PressableFeedbackProps, c as AnimationProp } from '../../pressable-feedback.type-1K8YEOb8.cjs';
|
|
8
|
+
import { R as Recipe, g as SlotStyles } from '../../create-recipe-C0XXjuow.cjs';
|
|
8
9
|
import 'react-native-reanimated';
|
|
9
10
|
|
|
10
11
|
type ButtonSlot = 'root' | 'label' | 'icon' | 'spinner';
|
|
@@ -2,9 +2,10 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import * as react_native from 'react-native';
|
|
4
4
|
import { StyleProp, TextStyle, ViewStyle, TextProps, PressableStateCallbackType } from 'react-native';
|
|
5
|
-
import {
|
|
5
|
+
import { T as TextStyleProps, V as ViewStyleProps } from '../../style-props.type-B1BG5TCm.js';
|
|
6
6
|
import { S as Size, R as RadiusKey, X as XAUITheme } from '../../theme.type-C2gNHpEx.js';
|
|
7
|
-
import { a as IconContextValue, b as IconProps, P as PressableFeedbackProps, c as AnimationProp } from '../../pressable-feedback.type-
|
|
7
|
+
import { a as IconContextValue, b as IconProps, P as PressableFeedbackProps, c as AnimationProp } from '../../pressable-feedback.type-BwkKLQlX.js';
|
|
8
|
+
import { R as Recipe, g as SlotStyles } from '../../create-recipe-CPXFo2rk.js';
|
|
8
9
|
import 'react-native-reanimated';
|
|
9
10
|
|
|
10
11
|
type ButtonSlot = 'root' | 'label' | 'icon' | 'spinner';
|
|
@@ -2,10 +2,12 @@ import {
|
|
|
2
2
|
Button,
|
|
3
3
|
buttonRecipe,
|
|
4
4
|
useButton
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
5
|
+
} from "../../chunk-4EPS7UBO.js";
|
|
6
|
+
import "../../chunk-WXAME7KB.js";
|
|
7
|
+
import "../../chunk-N7C4UNUL.js";
|
|
8
|
+
import "../../chunk-EXX6ATAS.js";
|
|
9
|
+
import "../../chunk-A3EGFI6T.js";
|
|
10
|
+
import "../../chunk-GGW42MY4.js";
|
|
9
11
|
export {
|
|
10
12
|
Button,
|
|
11
13
|
buttonRecipe,
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
5
|
+
var _chunkUBA6AEY6cjs = require('../../chunk-UBA6AEY6.cjs');
|
|
6
|
+
require('../../chunk-UVO4GFSW.cjs');
|
|
7
|
+
require('../../chunk-EVXZGNPA.cjs');
|
|
8
|
+
require('../../chunk-57SJ4LJF.cjs');
|
|
9
|
+
require('../../chunk-MC7SY2QH.cjs');
|
|
8
10
|
|
|
9
11
|
|
|
10
12
|
|
|
11
13
|
|
|
12
|
-
exports.TextSpan =
|
|
14
|
+
exports.TextSpan = _chunkUBA6AEY6cjs.TextSpan; exports.Typography = _chunkUBA6AEY6cjs.Typography; exports.typographyRecipe = _chunkUBA6AEY6cjs.typographyRecipe;
|