@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkEVXZGNPAcjs = require('./chunk-EVXZGNPA.cjs');
|
|
4
4
|
|
|
5
5
|
// src/system/portal/portal.tsx
|
|
6
6
|
var _react = require('react');
|
|
@@ -31,7 +31,7 @@ var styles = _reactnative.StyleSheet.create({
|
|
|
31
31
|
container: { flex: 1 }
|
|
32
32
|
});
|
|
33
33
|
function PortalHost({ children, ...props }) {
|
|
34
|
-
const [styleProps] =
|
|
34
|
+
const [styleProps] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
|
|
35
35
|
const [portals, setPortals] = _react.useState.call(void 0, /* @__PURE__ */ new Map());
|
|
36
36
|
const addPortal = _react.useCallback.call(void 0, (key, element) => {
|
|
37
37
|
setPortals((current) => new Map(current).set(key, element));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Icon, PressableFeedback } from "./chunk-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Icon, PressableFeedback } from "./chunk-WXAME7KB.js";
|
|
2
|
+
import { createRecipe } from "./chunk-N7C4UNUL.js";
|
|
3
|
+
import { childrenToString, createSlotContext, useStyleProps } from "./chunk-EXX6ATAS.js";
|
|
4
|
+
import { useXAUITheme } from "./chunk-A3EGFI6T.js";
|
|
4
5
|
|
|
5
6
|
// src/components/button/button.context.ts
|
|
6
7
|
var [ButtonProvider, useButton] = createSlotContext("Button");
|
|
@@ -71,10 +72,10 @@ function ButtonSpinner({
|
|
|
71
72
|
});
|
|
72
73
|
}
|
|
73
74
|
ButtonSpinner.displayName = "XAUI.Button.Spinner";
|
|
74
|
-
const
|
|
75
|
-
code: "function
|
|
76
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
77
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
75
|
+
const _worklet_8562276324058_init_data = {
|
|
76
|
+
code: "function chunk4EPS7UBOJs1(){const{angle}=this.__closure;return{transform:[{rotate:angle.value+\"deg\"}]};}",
|
|
77
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-4EPS7UBO.js",
|
|
78
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunk4EPS7UBOJs1\",\"angle\",\"__closure\",\"transform\",\"rotate\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-4EPS7UBO.js\"],\"mappings\":\"AA8EyC,SAAAA,gBAAMA,CAAA,QAAAC,KAAA,OAAAC,SAAA,CAE3C,MAAO,CAAEC,SAAS,CAAE,CAAC,CAAEC,MAAM,CAAKH,KAAK,CAACI,KAAK,MAAM,CAAC,CAAE,CAAC,CACzD\",\"ignoreList\":[]}"
|
|
78
79
|
};
|
|
79
80
|
function SpinningRing({
|
|
80
81
|
style
|
|
@@ -87,28 +88,28 @@ function SpinningRing({
|
|
|
87
88
|
}), -1, false);
|
|
88
89
|
return () => cancelAnimation(angle);
|
|
89
90
|
}, [angle]);
|
|
90
|
-
const animatedStyle = useAnimatedStyle(function
|
|
91
|
-
|
|
91
|
+
const animatedStyle = useAnimatedStyle(function chunk4EPS7UBOJs1Factory({
|
|
92
|
+
_worklet_8562276324058_init_data,
|
|
92
93
|
angle
|
|
93
94
|
}) {
|
|
94
95
|
const _e = [new global.Error(), -2, -27];
|
|
95
|
-
const
|
|
96
|
+
const chunk4EPS7UBOJs1 = function () {
|
|
96
97
|
return {
|
|
97
98
|
transform: [{
|
|
98
99
|
rotate: `${angle.value}deg`
|
|
99
100
|
}]
|
|
100
101
|
};
|
|
101
102
|
};
|
|
102
|
-
|
|
103
|
+
chunk4EPS7UBOJs1.__closure = {
|
|
103
104
|
angle
|
|
104
105
|
};
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
return
|
|
106
|
+
chunk4EPS7UBOJs1.__workletHash = 8562276324058;
|
|
107
|
+
chunk4EPS7UBOJs1.__pluginVersion = "0.7.4";
|
|
108
|
+
chunk4EPS7UBOJs1.__initData = _worklet_8562276324058_init_data;
|
|
109
|
+
chunk4EPS7UBOJs1.__stackDetails = _e;
|
|
110
|
+
return chunk4EPS7UBOJs1;
|
|
110
111
|
}({
|
|
111
|
-
|
|
112
|
+
_worklet_8562276324058_init_data,
|
|
112
113
|
angle
|
|
113
114
|
}), [angle]);
|
|
114
115
|
return /* @__PURE__ */jsx3(Animated.View, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true})
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/theme/theme-context.ts
|
|
2
2
|
var _react = require('react');
|
|
3
3
|
var ThemeContext = _react.createContext.call(void 0, null);
|
|
4
4
|
|
|
@@ -117,24 +117,6 @@ function deriveTint(tint, theme) {
|
|
|
117
117
|
return derived;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
// src/utils/stable-hash.ts
|
|
121
|
-
function canonical(value) {
|
|
122
|
-
if (value === null || typeof value !== "object") return _nullishCoalesce(JSON.stringify(value), () => ( "null"));
|
|
123
|
-
if (Array.isArray(value)) return `[${value.map(canonical).join(",")}]`;
|
|
124
|
-
const entries = Object.entries(value).filter(([, v]) => typeof v !== "function").sort(([a], [b]) => a < b ? -1 : 1).map(([k, v]) => `${JSON.stringify(k)}:${canonical(v)}`);
|
|
125
|
-
return `{${entries.join(",")}}`;
|
|
126
|
-
}
|
|
127
|
-
function stableHash(value) {
|
|
128
|
-
const input = canonical(value);
|
|
129
|
-
let hash = 2166136261;
|
|
130
|
-
for (let i = 0; i < input.length; i++) {
|
|
131
|
-
hash ^= input.charCodeAt(i);
|
|
132
|
-
hash = Math.imul(hash, 16777619) >>> 0;
|
|
133
|
-
}
|
|
134
|
-
return hash.toString(36);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
120
|
|
|
139
121
|
|
|
140
122
|
|
|
@@ -145,4 +127,4 @@ function stableHash(value) {
|
|
|
145
127
|
|
|
146
128
|
|
|
147
129
|
|
|
148
|
-
exports.ThemeContext = ThemeContext; exports.useXAUITheme = useXAUITheme; exports.useColorMode = useColorMode; exports.useThemeColor = useThemeColor; exports.
|
|
130
|
+
exports.ThemeContext = ThemeContext; exports.useXAUITheme = useXAUITheme; exports.useColorMode = useColorMode; exports.useThemeColor = useThemeColor; exports.isHex = isHex; exports.mix = mix; exports.alpha = alpha; exports.contrastOn = contrastOn; exports.deriveTint = deriveTint;
|
|
@@ -36,12 +36,13 @@ function _optionalChain(ops) {
|
|
|
36
36
|
}
|
|
37
37
|
return value;
|
|
38
38
|
}
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
39
|
+
var _chunkA4VD4MHKcjs = require('./chunk-A4VD4MHK.cjs');
|
|
40
|
+
var _chunkUVO4GFSWcjs = require('./chunk-UVO4GFSW.cjs');
|
|
41
|
+
var _chunkEVXZGNPAcjs = require('./chunk-EVXZGNPA.cjs');
|
|
42
|
+
var _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
|
|
42
43
|
|
|
43
44
|
// src/components/button/button.context.ts
|
|
44
|
-
var [ButtonProvider, useButton] =
|
|
45
|
+
var [ButtonProvider, useButton] = _chunkEVXZGNPAcjs.createSlotContext.call(void 0, "Button");
|
|
45
46
|
|
|
46
47
|
// src/components/button/button-icon.tsx
|
|
47
48
|
var _jsxruntime = require('react/jsx-runtime');
|
|
@@ -53,7 +54,7 @@ function ButtonIcon({
|
|
|
53
54
|
const {
|
|
54
55
|
icon
|
|
55
56
|
} = useButton();
|
|
56
|
-
return /* @__PURE__ */_jsxruntime.jsx.call(void 0,
|
|
57
|
+
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunkA4VD4MHKcjs.Icon, {
|
|
57
58
|
size: _nullishCoalesce(size, () => icon.size),
|
|
58
59
|
color: _nullishCoalesce(color, () => icon.color),
|
|
59
60
|
...rest
|
|
@@ -73,7 +74,7 @@ var ButtonLabel = _react.forwardRef.call(void 0, function ButtonLabel2({
|
|
|
73
74
|
const {
|
|
74
75
|
labelStyle
|
|
75
76
|
} = useButton();
|
|
76
|
-
const [styleProps, rest] =
|
|
77
|
+
const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
|
|
77
78
|
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.Text, {
|
|
78
79
|
ref,
|
|
79
80
|
numberOfLines,
|
|
@@ -97,7 +98,7 @@ function ButtonSpinner({
|
|
|
97
98
|
const {
|
|
98
99
|
spinnerStyle
|
|
99
100
|
} = useButton();
|
|
100
|
-
const [styleProps] =
|
|
101
|
+
const [styleProps] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
|
|
101
102
|
const ringStyle = [spinnerStyle, styleProps, style];
|
|
102
103
|
if (!animation) return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.View, {
|
|
103
104
|
style: ringStyle
|
|
@@ -107,10 +108,10 @@ function ButtonSpinner({
|
|
|
107
108
|
});
|
|
108
109
|
}
|
|
109
110
|
ButtonSpinner.displayName = "XAUI.Button.Spinner";
|
|
110
|
-
const
|
|
111
|
-
code: "function
|
|
112
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
113
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
111
|
+
const _worklet_17206274885279_init_data = {
|
|
112
|
+
code: "function chunk6ARON3XTCjs1(){const{angle}=this.__closure;return{transform:[{rotate:angle.value+\"deg\"}]};}",
|
|
113
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-6ARON3XT.cjs",
|
|
114
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunk6ARON3XTCjs1\",\"angle\",\"__closure\",\"transform\",\"rotate\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-6ARON3XT.cjs\"],\"mappings\":\"AA8E6E,SAAAA,iBAAMA,CAAA,QAAAC,KAAA,OAAAC,SAAA,CAE/E,MAAO,CAAEC,SAAS,CAAE,CAAC,CAAEC,MAAM,CAAKH,KAAK,CAACI,KAAK,MAAM,CAAC,CAAE,CAAC,CACzD\",\"ignoreList\":[]}"
|
|
114
115
|
};
|
|
115
116
|
function SpinningRing({
|
|
116
117
|
style
|
|
@@ -123,28 +124,28 @@ function SpinningRing({
|
|
|
123
124
|
}), -1, false);
|
|
124
125
|
return () => _reactnativereanimated.cancelAnimation.call(void 0, angle);
|
|
125
126
|
}, [angle]);
|
|
126
|
-
const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function
|
|
127
|
-
|
|
127
|
+
const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunk6ARON3XTCjs1Factory({
|
|
128
|
+
_worklet_17206274885279_init_data,
|
|
128
129
|
angle
|
|
129
130
|
}) {
|
|
130
131
|
const _e = [new global.Error(), -2, -27];
|
|
131
|
-
const
|
|
132
|
+
const chunk6ARON3XTCjs1 = function () {
|
|
132
133
|
return {
|
|
133
134
|
transform: [{
|
|
134
135
|
rotate: `${angle.value}deg`
|
|
135
136
|
}]
|
|
136
137
|
};
|
|
137
138
|
};
|
|
138
|
-
|
|
139
|
+
chunk6ARON3XTCjs1.__closure = {
|
|
139
140
|
angle
|
|
140
141
|
};
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
return
|
|
142
|
+
chunk6ARON3XTCjs1.__workletHash = 17206274885279;
|
|
143
|
+
chunk6ARON3XTCjs1.__pluginVersion = "0.7.4";
|
|
144
|
+
chunk6ARON3XTCjs1.__initData = _worklet_17206274885279_init_data;
|
|
145
|
+
chunk6ARON3XTCjs1.__stackDetails = _e;
|
|
146
|
+
return chunk6ARON3XTCjs1;
|
|
146
147
|
}({
|
|
147
|
-
|
|
148
|
+
_worklet_17206274885279_init_data,
|
|
148
149
|
angle
|
|
149
150
|
}), [angle]);
|
|
150
151
|
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnativereanimated2.default.View, {
|
|
@@ -255,7 +256,7 @@ function sizeAxis(step) {
|
|
|
255
256
|
spinner: ring(theme, theme.fontSizes[glyph])
|
|
256
257
|
});
|
|
257
258
|
}
|
|
258
|
-
var buttonRecipe =
|
|
259
|
+
var buttonRecipe = _chunkUVO4GFSWcjs.createRecipe.call(void 0, {
|
|
259
260
|
slots: SLOTS,
|
|
260
261
|
base: theme => ({
|
|
261
262
|
root: {
|
|
@@ -443,8 +444,8 @@ var ButtonRoot = _react.forwardRef.call(void 0, function Button({
|
|
|
443
444
|
onPressOut,
|
|
444
445
|
...props
|
|
445
446
|
}, ref) {
|
|
446
|
-
const theme =
|
|
447
|
-
const [styleProps, rest] =
|
|
447
|
+
const theme = _chunk57SJ4LJFcjs.useXAUITheme.call(void 0);
|
|
448
|
+
const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
|
|
448
449
|
const [isPressed, press] = usePressState({
|
|
449
450
|
onPressIn,
|
|
450
451
|
onPressOut
|
|
@@ -488,14 +489,14 @@ var ButtonRoot = _react.forwardRef.call(void 0, function Button({
|
|
|
488
489
|
const rootStyle = [styles.root, _optionalChain([tint, 'optionalAccess', _8 => _8.root]), styleProps, typeof style === "function" ? style({
|
|
489
490
|
pressed: isPressed
|
|
490
491
|
}) : style];
|
|
491
|
-
const text =
|
|
492
|
+
const text = _chunkEVXZGNPAcjs.childrenToString.call(void 0, children);
|
|
492
493
|
const showSpinner = isLoading && !containsElementOfType(children, ButtonSpinner);
|
|
493
494
|
if (isIconOnly && !rest.accessibilityLabel && !rest["aria-label"]) {
|
|
494
495
|
warnDev("Button: an icon-only button needs an `accessibilityLabel` \u2014 there is no text for a screen reader to read, so it announces as an unlabelled button.");
|
|
495
496
|
}
|
|
496
497
|
return /* @__PURE__ */_jsxruntime.jsx.call(void 0, ButtonProvider, {
|
|
497
498
|
value: context,
|
|
498
|
-
children: /* @__PURE__ */_jsxruntime.jsx.call(void 0,
|
|
499
|
+
children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunkA4VD4MHKcjs.PressableFeedback, {
|
|
499
500
|
ref,
|
|
500
501
|
isPressed,
|
|
501
502
|
isDisabled: isDisabled || isLoading,
|
|
@@ -117,29 +117,11 @@ function deriveTint(tint, theme) {
|
|
|
117
117
|
return derived;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
// src/utils/stable-hash.ts
|
|
121
|
-
function canonical(value) {
|
|
122
|
-
if (value === null || typeof value !== "object") return JSON.stringify(value) ?? "null";
|
|
123
|
-
if (Array.isArray(value)) return `[${value.map(canonical).join(",")}]`;
|
|
124
|
-
const entries = Object.entries(value).filter(([, v]) => typeof v !== "function").sort(([a], [b]) => a < b ? -1 : 1).map(([k, v]) => `${JSON.stringify(k)}:${canonical(v)}`);
|
|
125
|
-
return `{${entries.join(",")}}`;
|
|
126
|
-
}
|
|
127
|
-
function stableHash(value) {
|
|
128
|
-
const input = canonical(value);
|
|
129
|
-
let hash = 2166136261;
|
|
130
|
-
for (let i = 0; i < input.length; i++) {
|
|
131
|
-
hash ^= input.charCodeAt(i);
|
|
132
|
-
hash = Math.imul(hash, 16777619) >>> 0;
|
|
133
|
-
}
|
|
134
|
-
return hash.toString(36);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
120
|
export {
|
|
138
121
|
ThemeContext,
|
|
139
122
|
useXAUITheme,
|
|
140
123
|
useColorMode,
|
|
141
124
|
useThemeColor,
|
|
142
|
-
stableHash,
|
|
143
125
|
isHex,
|
|
144
126
|
mix,
|
|
145
127
|
alpha,
|