@xaui/native 0.9.1-alpha.16 → 0.9.1-alpha.17
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-PUER6Y4M.cjs → chunk-2UICXD3Q.cjs} +75 -381
- package/dist/chunk-4K3LZS7M.js +448 -0
- package/dist/chunk-5SU7FXWH.cjs +448 -0
- package/dist/chunk-6PZF4PI7.js +100 -0
- package/dist/chunk-6VTBGBPP.cjs +100 -0
- package/dist/{chunk-E3756MJC.js → chunk-ASXK7XU4.js} +16 -15
- package/dist/{chunk-KCUT47FY.cjs → chunk-BHAHJHAI.cjs} +5 -1
- package/dist/{chunk-64L44HEI.js → chunk-F432IDIW.js} +89 -389
- package/dist/{chunk-NLFE3CRM.cjs → chunk-IZYRU7S2.cjs} +24 -23
- package/dist/{chunk-UOJBK5Z4.js → chunk-L3AQNVRN.js} +1 -1
- package/dist/{chunk-BAACHVM4.cjs → chunk-M2VYRHVS.cjs} +2 -2
- package/dist/{chunk-EHHSY2KB.js → chunk-XQE5PXOD.js} +5 -1
- package/dist/components/button/index.cjs +4 -3
- package/dist/components/button/index.d.cts +179 -178
- package/dist/components/button/index.d.ts +179 -178
- package/dist/components/button/index.js +3 -2
- package/dist/components/typography/index.cjs +12 -0
- package/dist/components/typography/index.d.cts +115 -0
- package/dist/components/typography/index.d.ts +115 -0
- package/dist/components/typography/index.js +12 -0
- package/dist/create-recipe-3_ElpCYt.d.cts +117 -0
- package/dist/create-recipe-DImq1AZA.d.ts +117 -0
- package/dist/index.cjs +17 -7
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +21 -11
- package/dist/{create-recipe-DD9W6m9b.d.ts → pressable-feedback.type-C9kjAuVQ.d.cts} +3 -116
- package/dist/{create-recipe-BcUu9b2I.d.cts → pressable-feedback.type-KcPvFf6f.d.ts} +3 -116
- package/dist/system/index.cjs +5 -3
- package/dist/system/index.d.cts +6 -4
- package/dist/system/index.d.ts +6 -4
- package/dist/system/index.js +11 -9
- package/dist/theme/index.cjs +2 -2
- package/dist/theme/index.d.cts +2 -2
- package/dist/theme/index.d.ts +2 -2
- package/dist/theme/index.js +1 -1
- package/dist/{theme.type-C9bFJKFm.d.cts → theme.type-C2gNHpEx.d.cts} +1 -1
- package/dist/{theme.type-C9bFJKFm.d.ts → theme.type-C2gNHpEx.d.ts} +1 -1
- package/package.json +11 -1
|
@@ -1,46 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
// src/system/style-props/use-style-props.ts
|
|
4
|
-
import { useMemo } from "react";
|
|
5
|
-
|
|
6
|
-
// src/utils/style-props.ts
|
|
7
|
-
var STYLE_PROP_KEYS = [
|
|
8
|
-
// Flex and layout
|
|
9
|
-
"alignContent", "alignItems", "alignSelf", "aspectRatio", "boxSizing", "columnGap", "direction", "display", "flex", "flexBasis", "flexDirection", "flexGrow", "flexShrink", "flexWrap", "gap", "justifyContent", "overflow", "rowGap",
|
|
10
|
-
// Position
|
|
11
|
-
"bottom", "end", "inset", "insetBlock", "insetBlockEnd", "insetBlockStart", "insetInline", "insetInlineEnd", "insetInlineStart", "position", "start", "top", "zIndex",
|
|
12
|
-
// Margin
|
|
13
|
-
"margin", "marginBlock", "marginBlockEnd", "marginBlockStart", "marginBottom", "marginEnd", "marginHorizontal", "marginInline", "marginInlineEnd", "marginInlineStart", "marginStart", "marginTop", "marginVertical",
|
|
14
|
-
// Padding
|
|
15
|
-
"padding", "paddingBlock", "paddingBlockEnd", "paddingBlockStart", "paddingBottom", "paddingEnd", "paddingHorizontal", "paddingInline", "paddingInlineEnd", "paddingInlineStart", "paddingStart", "paddingTop", "paddingVertical",
|
|
16
|
-
// Size
|
|
17
|
-
"height", "maxHeight", "maxWidth", "minHeight", "minWidth", "width",
|
|
18
|
-
// Border
|
|
19
|
-
"borderBlockColor", "borderBlockEndColor", "borderBlockStartColor", "borderBottomColor", "borderBottomEndRadius", "borderBottomStartRadius", "borderBottomWidth", "borderColor", "borderCurve", "borderEndColor", "borderEndEndRadius", "borderEndStartRadius", "borderEndWidth", "borderRadius", "borderStartColor", "borderStartEndRadius", "borderStartStartRadius", "borderStartWidth", "borderStyle", "borderTopColor", "borderTopEndRadius", "borderTopStartRadius", "borderTopWidth", "borderWidth",
|
|
20
|
-
// Fill, shadow, and the rest of a box's paint
|
|
21
|
-
"backfaceVisibility", "backgroundColor", "boxShadow", "cursor", "elevation", "experimental_backgroundImage", "filter", "isolation", "mixBlendMode", "opacity", "outlineColor", "outlineOffset", "outlineStyle", "outlineWidth", "shadowColor", "shadowOffset", "shadowOpacity", "shadowRadius",
|
|
22
|
-
// Transform
|
|
23
|
-
"rotation", "scaleX", "scaleY", "transform", "transformMatrix", "transformOrigin", "translateX", "translateY",
|
|
24
|
-
// Text — a text slot only
|
|
25
|
-
"color", "fontFamily", "fontSize", "fontStyle", "fontVariant", "fontWeight", "includeFontPadding", "letterSpacing", "lineHeight", "textAlign", "textAlignVertical", "textDecorationColor", "textDecorationLine", "textDecorationStyle", "textShadowColor", "textShadowOffset", "textShadowRadius", "textTransform", "userSelect", "verticalAlign", "writingDirection",
|
|
26
|
-
// Image — an image slot only
|
|
27
|
-
"objectFit", "overlayColor", "resizeMode", "tintColor"];
|
|
28
|
-
var STYLE_PROP_KEY_SET = new Set(STYLE_PROP_KEYS);
|
|
29
|
-
function splitStyleProps(props) {
|
|
30
|
-
const styleProps = {};
|
|
31
|
-
const rest = {};
|
|
32
|
-
for (const [key, value] of Object.entries(props)) {
|
|
33
|
-
if (STYLE_PROP_KEY_SET.has(key)) styleProps[key] = value;else rest[key] = value;
|
|
34
|
-
}
|
|
35
|
-
return [styleProps, rest];
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// src/system/style-props/use-style-props.ts
|
|
39
|
-
function useStyleProps(props) {
|
|
40
|
-
const [styleProps, rest] = splitStyleProps(props);
|
|
41
|
-
const key = stableHash(styleProps);
|
|
42
|
-
return [useMemo(() => styleProps, [key]), rest];
|
|
43
|
-
}
|
|
1
|
+
import { Slot, createSlotContext, useStyleProps } from "./chunk-4K3LZS7M.js";
|
|
2
|
+
import { contrastOn, isHex, useXAUITheme } from "./chunk-XJARE6SC.js";
|
|
44
3
|
|
|
45
4
|
// src/system/icon/icon-context.ts
|
|
46
5
|
import { createContext, useContext } from "react";
|
|
@@ -95,132 +54,22 @@ function Icon({
|
|
|
95
54
|
}
|
|
96
55
|
Icon.displayName = "XAUI.Icon";
|
|
97
56
|
|
|
98
|
-
// src/system/slot/children-to-string.ts
|
|
99
|
-
import { isValidElement as isValidElement2 } from "react";
|
|
100
|
-
function childrenToString(children) {
|
|
101
|
-
const text = stringify(children);
|
|
102
|
-
return text === null || text === "" ? null : text;
|
|
103
|
-
}
|
|
104
|
-
function stringify(node) {
|
|
105
|
-
if (node === null || node === void 0 || typeof node === "boolean") return "";
|
|
106
|
-
if (typeof node === "string") return node;
|
|
107
|
-
if (typeof node === "number") return String(node);
|
|
108
|
-
if (isValidElement2(node)) return null;
|
|
109
|
-
if (Array.isArray(node)) {
|
|
110
|
-
let text = "";
|
|
111
|
-
for (const child of node) {
|
|
112
|
-
const part = stringify(child);
|
|
113
|
-
if (part === null) return null;
|
|
114
|
-
text += part;
|
|
115
|
-
}
|
|
116
|
-
return text;
|
|
117
|
-
}
|
|
118
|
-
return null;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
// src/system/slot/create-slot-context.ts
|
|
122
|
-
import { createContext as createContext2, useContext as useContext2 } from "react";
|
|
123
|
-
function createSlotContext(name) {
|
|
124
|
-
const Context = createContext2(null);
|
|
125
|
-
Context.displayName = `XAUI.${name}.Context`;
|
|
126
|
-
function useSlotContext() {
|
|
127
|
-
const value = useContext2(Context);
|
|
128
|
-
if (value === null) {
|
|
129
|
-
const error = new Error(`XAUI: use${name} must be called inside <${name}>. A slot reads the values its root resolved, so it can only be rendered as a child of one.`);
|
|
130
|
-
Error.captureStackTrace?.(error, useSlotContext);
|
|
131
|
-
throw error;
|
|
132
|
-
}
|
|
133
|
-
return value;
|
|
134
|
-
}
|
|
135
|
-
return [Context.Provider, useSlotContext];
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// src/system/slot/merge-refs.ts
|
|
139
|
-
function mergeRefs(...refs) {
|
|
140
|
-
return value => {
|
|
141
|
-
for (const ref of refs) {
|
|
142
|
-
if (typeof ref === "function") ref(value);else if (ref) ref.current = value;
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// src/system/slot/merge-props.ts
|
|
148
|
-
var EVENT_HANDLER = /^on[A-Z]/;
|
|
149
|
-
function mergeProps(ours, theirs) {
|
|
150
|
-
const merged = {
|
|
151
|
-
...ours
|
|
152
|
-
};
|
|
153
|
-
for (const key of Object.keys(theirs)) {
|
|
154
|
-
const ourValue = ours[key];
|
|
155
|
-
const theirValue = theirs[key];
|
|
156
|
-
if (EVENT_HANDLER.test(key)) {
|
|
157
|
-
merged[key] = composeHandlers(ourValue, theirValue);
|
|
158
|
-
} else if (key === "style") {
|
|
159
|
-
merged[key] = mergeStyles(ourValue, theirValue);
|
|
160
|
-
} else if (key === "ref") {
|
|
161
|
-
merged[key] = mergeRefs(ourValue, theirValue);
|
|
162
|
-
} else {
|
|
163
|
-
merged[key] = theirValue;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
return merged;
|
|
167
|
-
}
|
|
168
|
-
function composeHandlers(ours, theirs) {
|
|
169
|
-
if (typeof ours !== "function") return theirs;
|
|
170
|
-
if (typeof theirs !== "function") return ours;
|
|
171
|
-
return (...args) => {
|
|
172
|
-
;
|
|
173
|
-
ours(...args);
|
|
174
|
-
return theirs(...args);
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
function mergeStyles(ours, theirs) {
|
|
178
|
-
if (typeof ours === "function" || typeof theirs === "function") {
|
|
179
|
-
return state => [resolveStyle(ours, state), resolveStyle(theirs, state)];
|
|
180
|
-
}
|
|
181
|
-
return [ours, theirs];
|
|
182
|
-
}
|
|
183
|
-
function resolveStyle(style, state) {
|
|
184
|
-
return typeof style === "function" ? style(state) : style;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
// src/system/slot/slot.tsx
|
|
188
|
-
import { cloneElement as cloneElement2, forwardRef, isValidElement as isValidElement3 } from "react";
|
|
189
|
-
var Slot = forwardRef(function Slot2({
|
|
190
|
-
children,
|
|
191
|
-
...ours
|
|
192
|
-
}, ref) {
|
|
193
|
-
if (!isValidElement3(children)) {
|
|
194
|
-
throw new Error("XAUI: asChild expects exactly one React element as its child, and merges the component's props into it. Text, a fragment, several children or none give it nothing to merge into \u2014 drop `asChild` to render the component itself.");
|
|
195
|
-
}
|
|
196
|
-
const child = children;
|
|
197
|
-
const merged = mergeProps(ours, child.props);
|
|
198
|
-
merged.ref = mergeRefs(ref, refOf(child));
|
|
199
|
-
return cloneElement2(child, merged);
|
|
200
|
-
});
|
|
201
|
-
Slot.displayName = "XAUI.Slot";
|
|
202
|
-
function refOf(element) {
|
|
203
|
-
const fromProps = element.props.ref;
|
|
204
|
-
const fromElement = element.ref;
|
|
205
|
-
return fromProps ?? fromElement;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
57
|
// src/system/pressable-feedback/pressable-feedback-context.ts
|
|
209
|
-
import { createContext as
|
|
58
|
+
import { createContext as createContext2 } from "react";
|
|
210
59
|
var [FeedbackProvider, useFeedback] = createSlotContext("PressableFeedback");
|
|
211
|
-
var DisableAllContext =
|
|
60
|
+
var DisableAllContext = createContext2(false);
|
|
212
61
|
|
|
213
62
|
// src/system/pressable-feedback/pressable-feedback.animation.ts
|
|
214
63
|
var PRESS_SCALE = 0.985;
|
|
215
64
|
var PRESS_DURATION = 300;
|
|
216
65
|
var SCALE_REFERENCE_WIDTH = 300;
|
|
217
|
-
const
|
|
218
|
-
code: "function
|
|
219
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
220
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
66
|
+
const _worklet_12908961525296_init_data = {
|
|
67
|
+
code: "function pressScaleFor_chunkF432IDIWJs1(width){const{SCALE_REFERENCE_WIDTH,PRESS_SCALE}=this.__closure;const coefficient=width>0?SCALE_REFERENCE_WIDTH/width:1;return 1-(1-PRESS_SCALE)*coefficient;}",
|
|
68
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-F432IDIW.js",
|
|
69
|
+
sourceMap: "{\"version\":3,\"names\":[\"pressScaleFor_chunkF432IDIWJs1\",\"width\",\"SCALE_REFERENCE_WIDTH\",\"PRESS_SCALE\",\"__closure\",\"coefficient\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-F432IDIW.js\"],\"mappings\":\"AA2EA,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\":[]}"
|
|
221
70
|
};
|
|
222
|
-
const pressScaleFor = function
|
|
223
|
-
|
|
71
|
+
const pressScaleFor = function pressScaleFor_chunkF432IDIWJs1Factory({
|
|
72
|
+
_worklet_12908961525296_init_data,
|
|
224
73
|
SCALE_REFERENCE_WIDTH,
|
|
225
74
|
PRESS_SCALE
|
|
226
75
|
}) {
|
|
@@ -233,13 +82,13 @@ const pressScaleFor = function pressScaleFor_chunk64L44HEIJs1Factory({
|
|
|
233
82
|
SCALE_REFERENCE_WIDTH,
|
|
234
83
|
PRESS_SCALE
|
|
235
84
|
};
|
|
236
|
-
pressScaleFor.__workletHash =
|
|
85
|
+
pressScaleFor.__workletHash = 12908961525296;
|
|
237
86
|
pressScaleFor.__pluginVersion = "0.7.4";
|
|
238
|
-
pressScaleFor.__initData =
|
|
87
|
+
pressScaleFor.__initData = _worklet_12908961525296_init_data;
|
|
239
88
|
pressScaleFor.__stackDetails = _e;
|
|
240
89
|
return pressScaleFor;
|
|
241
90
|
}({
|
|
242
|
-
|
|
91
|
+
_worklet_12908961525296_init_data,
|
|
243
92
|
SCALE_REFERENCE_WIDTH,
|
|
244
93
|
PRESS_SCALE
|
|
245
94
|
});
|
|
@@ -252,26 +101,26 @@ var RIPPLE_CONFIRM_DURATION = 225;
|
|
|
252
101
|
var RIPPLE_FADE_IN = 75;
|
|
253
102
|
var RIPPLE_FADE_OUT_DELAY = 225;
|
|
254
103
|
var RIPPLE_FADE_OUT = 150;
|
|
255
|
-
const
|
|
256
|
-
code: "function
|
|
257
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
258
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
104
|
+
const _worklet_1880833073675_init_data = {
|
|
105
|
+
code: "function rippleRadiusFor_chunkF432IDIWJs2(width,height){return Math.sqrt(width*width+height*height)/2+5;}",
|
|
106
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-F432IDIW.js",
|
|
107
|
+
sourceMap: "{\"version\":3,\"names\":[\"rippleRadiusFor_chunkF432IDIWJs2\",\"width\",\"height\",\"Math\",\"sqrt\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-F432IDIW.js\"],\"mappings\":\"AAyFA,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\":[]}"
|
|
259
108
|
};
|
|
260
|
-
const rippleRadiusFor = function
|
|
261
|
-
|
|
109
|
+
const rippleRadiusFor = function rippleRadiusFor_chunkF432IDIWJs2Factory({
|
|
110
|
+
_worklet_1880833073675_init_data
|
|
262
111
|
}) {
|
|
263
112
|
const _e = [new global.Error(), 1, -27];
|
|
264
113
|
const rippleRadiusFor = function (width, height) {
|
|
265
114
|
return Math.sqrt(width * width + height * height) / 2 + 5;
|
|
266
115
|
};
|
|
267
116
|
rippleRadiusFor.__closure = {};
|
|
268
|
-
rippleRadiusFor.__workletHash =
|
|
117
|
+
rippleRadiusFor.__workletHash = 1880833073675;
|
|
269
118
|
rippleRadiusFor.__pluginVersion = "0.7.4";
|
|
270
|
-
rippleRadiusFor.__initData =
|
|
119
|
+
rippleRadiusFor.__initData = _worklet_1880833073675_init_data;
|
|
271
120
|
rippleRadiusFor.__stackDetails = _e;
|
|
272
121
|
return rippleRadiusFor;
|
|
273
122
|
}({
|
|
274
|
-
|
|
123
|
+
_worklet_1880833073675_init_data
|
|
275
124
|
});
|
|
276
125
|
var ALL_OFF = {
|
|
277
126
|
scale: false,
|
|
@@ -336,7 +185,7 @@ function resolveSlotAnimation(override, enabledByRoot, defaultOpacity, defaultDu
|
|
|
336
185
|
}
|
|
337
186
|
|
|
338
187
|
// src/system/pressable-feedback/pressable-feedback.overlay.ts
|
|
339
|
-
import { Children, Fragment, createElement, isValidElement as
|
|
188
|
+
import { Children, Fragment, createElement, isValidElement as isValidElement2 } from "react";
|
|
340
189
|
var FEEDBACK_OVERLAY = /* @__PURE__ */Symbol.for("xaui.PressableFeedback.overlay");
|
|
341
190
|
function markOverlay(component) {
|
|
342
191
|
return Object.assign(component, {
|
|
@@ -344,7 +193,7 @@ function markOverlay(component) {
|
|
|
344
193
|
});
|
|
345
194
|
}
|
|
346
195
|
function isBareOverlay(node) {
|
|
347
|
-
if (!
|
|
196
|
+
if (!isValidElement2(node)) return false;
|
|
348
197
|
const type = node.type;
|
|
349
198
|
if (typeof type !== "function" && typeof type !== "object") return false;
|
|
350
199
|
if (type === null) return false;
|
|
@@ -374,7 +223,7 @@ function feedbackChildren(children, asChild) {
|
|
|
374
223
|
}
|
|
375
224
|
|
|
376
225
|
// src/system/pressable-feedback/pressable-feedback.tsx
|
|
377
|
-
import { forwardRef
|
|
226
|
+
import { forwardRef, useContext as useContext2, useEffect, useMemo, useRef } from "react";
|
|
378
227
|
import { Pressable, StyleSheet } from "react-native";
|
|
379
228
|
import Animated, { Easing, useAnimatedStyle, useDerivedValue, useSharedValue, withDelay, withTiming } from "react-native-reanimated";
|
|
380
229
|
|
|
@@ -398,12 +247,12 @@ function radiusFrom(style) {
|
|
|
398
247
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
399
248
|
var AnimatedPressable = Animated.createAnimatedComponent(Pressable);
|
|
400
249
|
var AnimatedSlot = Animated.createAnimatedComponent(Slot);
|
|
401
|
-
var PressableFeedback =
|
|
250
|
+
var PressableFeedback = forwardRef(function PressableFeedback2({
|
|
402
251
|
animation,
|
|
403
252
|
style,
|
|
404
253
|
...props
|
|
405
254
|
}, ref) {
|
|
406
|
-
const inheritedDisableAll =
|
|
255
|
+
const inheritedDisableAll = useContext2(DisableAllContext);
|
|
407
256
|
const resolved = resolveAnimation(animation, inheritedDisableAll);
|
|
408
257
|
const [styleProps, rest] = useStyleProps(props);
|
|
409
258
|
const Feedback = resolved.none ? StaticFeedback : AnimatedFeedback;
|
|
@@ -418,7 +267,7 @@ var PressableFeedback = forwardRef2(function PressableFeedback2({
|
|
|
418
267
|
children: body
|
|
419
268
|
}) : body;
|
|
420
269
|
});
|
|
421
|
-
var StaticFeedback =
|
|
270
|
+
var StaticFeedback = forwardRef(function StaticFeedback2({
|
|
422
271
|
isPressed = false,
|
|
423
272
|
isDisabled,
|
|
424
273
|
asChild = false,
|
|
@@ -428,7 +277,7 @@ var StaticFeedback = forwardRef2(function StaticFeedback2({
|
|
|
428
277
|
...rest
|
|
429
278
|
}, ref) {
|
|
430
279
|
const surface = useSurface(style);
|
|
431
|
-
const context =
|
|
280
|
+
const context = useMemo(() => ({
|
|
432
281
|
isPressed,
|
|
433
282
|
animation,
|
|
434
283
|
...surface
|
|
@@ -445,17 +294,17 @@ var StaticFeedback = forwardRef2(function StaticFeedback2({
|
|
|
445
294
|
})
|
|
446
295
|
});
|
|
447
296
|
});
|
|
448
|
-
const
|
|
449
|
-
code: "function
|
|
450
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
451
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
297
|
+
const _worklet_15277282018622_init_data = {
|
|
298
|
+
code: "function chunkF432IDIWJs3(){const{pressScaleFor,size}=this.__closure;return pressScaleFor(size.value.width);}",
|
|
299
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-F432IDIW.js",
|
|
300
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkF432IDIWJs3\",\"pressScaleFor\",\"size\",\"__closure\",\"value\",\"width\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-F432IDIW.js\"],\"mappings\":\"AAuQuC,SAAAA,iBAAA,QAAAC,aAAA,CAAAC,IAAA,OAAAC,SAAA,OAAM,CAAAF,aAAc,CAAAC,IAAK,CAAAE,KAAM,CAAAC,KAAK\",\"ignoreList\":[]}"
|
|
452
301
|
};
|
|
453
|
-
const
|
|
454
|
-
code: "function
|
|
455
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
456
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
302
|
+
const _worklet_1413470399342_init_data = {
|
|
303
|
+
code: "function chunkF432IDIWJs4(){const{animation,pressedScale,progress}=this.__closure;if(!animation.scale)return{};return{transform:[{scale:1-(1-pressedScale.value)*progress.value}]};}",
|
|
304
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-F432IDIW.js",
|
|
305
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkF432IDIWJs4\",\"animation\",\"pressedScale\",\"progress\",\"__closure\",\"scale\",\"transform\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-F432IDIW.js\"],\"mappings\":\"AAwQyC,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\":[]}"
|
|
457
306
|
};
|
|
458
|
-
var AnimatedFeedback =
|
|
307
|
+
var AnimatedFeedback = forwardRef(function AnimatedFeedback2({
|
|
459
308
|
isPressed = false,
|
|
460
309
|
isDisabled,
|
|
461
310
|
asChild = false,
|
|
@@ -481,35 +330,35 @@ var AnimatedFeedback = forwardRef2(function AnimatedFeedback2({
|
|
|
481
330
|
easing: Easing.out(Easing.ease)
|
|
482
331
|
});
|
|
483
332
|
}, [isPressed, progress]);
|
|
484
|
-
const pressedScale = useDerivedValue(function
|
|
485
|
-
|
|
333
|
+
const pressedScale = useDerivedValue(function chunkF432IDIWJs3Factory({
|
|
334
|
+
_worklet_15277282018622_init_data,
|
|
486
335
|
pressScaleFor,
|
|
487
336
|
size
|
|
488
337
|
}) {
|
|
489
338
|
const _e = [new global.Error(), -3, -27];
|
|
490
|
-
const
|
|
491
|
-
|
|
339
|
+
const chunkF432IDIWJs3 = () => pressScaleFor(size.value.width);
|
|
340
|
+
chunkF432IDIWJs3.__closure = {
|
|
492
341
|
pressScaleFor,
|
|
493
342
|
size
|
|
494
343
|
};
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
return
|
|
344
|
+
chunkF432IDIWJs3.__workletHash = 15277282018622;
|
|
345
|
+
chunkF432IDIWJs3.__pluginVersion = "0.7.4";
|
|
346
|
+
chunkF432IDIWJs3.__initData = _worklet_15277282018622_init_data;
|
|
347
|
+
chunkF432IDIWJs3.__stackDetails = _e;
|
|
348
|
+
return chunkF432IDIWJs3;
|
|
500
349
|
}({
|
|
501
|
-
|
|
350
|
+
_worklet_15277282018622_init_data,
|
|
502
351
|
pressScaleFor,
|
|
503
352
|
size
|
|
504
353
|
}));
|
|
505
|
-
const animatedStyle = useAnimatedStyle(function
|
|
506
|
-
|
|
354
|
+
const animatedStyle = useAnimatedStyle(function chunkF432IDIWJs4Factory({
|
|
355
|
+
_worklet_1413470399342_init_data,
|
|
507
356
|
animation,
|
|
508
357
|
pressedScale,
|
|
509
358
|
progress
|
|
510
359
|
}) {
|
|
511
360
|
const _e = [new global.Error(), -4, -27];
|
|
512
|
-
const
|
|
361
|
+
const chunkF432IDIWJs4 = function () {
|
|
513
362
|
if (!animation.scale) return {};
|
|
514
363
|
return {
|
|
515
364
|
transform: [{
|
|
@@ -517,24 +366,24 @@ var AnimatedFeedback = forwardRef2(function AnimatedFeedback2({
|
|
|
517
366
|
}]
|
|
518
367
|
};
|
|
519
368
|
};
|
|
520
|
-
|
|
369
|
+
chunkF432IDIWJs4.__closure = {
|
|
521
370
|
animation,
|
|
522
371
|
pressedScale,
|
|
523
372
|
progress
|
|
524
373
|
};
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
return
|
|
374
|
+
chunkF432IDIWJs4.__workletHash = 1413470399342;
|
|
375
|
+
chunkF432IDIWJs4.__pluginVersion = "0.7.4";
|
|
376
|
+
chunkF432IDIWJs4.__initData = _worklet_1413470399342_init_data;
|
|
377
|
+
chunkF432IDIWJs4.__stackDetails = _e;
|
|
378
|
+
return chunkF432IDIWJs4;
|
|
530
379
|
}({
|
|
531
|
-
|
|
380
|
+
_worklet_1413470399342_init_data,
|
|
532
381
|
animation,
|
|
533
382
|
pressedScale,
|
|
534
383
|
progress
|
|
535
384
|
}), [animation.scale, progress, pressedScale]);
|
|
536
385
|
const surface = useSurface(style);
|
|
537
|
-
const context =
|
|
386
|
+
const context = useMemo(() => ({
|
|
538
387
|
isPressed,
|
|
539
388
|
animation,
|
|
540
389
|
progress,
|
|
@@ -621,7 +470,7 @@ function useWave() {
|
|
|
621
470
|
}
|
|
622
471
|
function useSurface(style) {
|
|
623
472
|
const theme = useXAUITheme();
|
|
624
|
-
return
|
|
473
|
+
return useMemo(() => {
|
|
625
474
|
const flat = StyleSheet.flatten(style);
|
|
626
475
|
return {
|
|
627
476
|
ink: inkFor(flat?.backgroundColor, theme.colors),
|
|
@@ -673,10 +522,10 @@ function PressableFeedbackHighlight({
|
|
|
673
522
|
}
|
|
674
523
|
PressableFeedbackHighlight.displayName = "XAUI.PressableFeedback.Highlight";
|
|
675
524
|
markOverlay(PressableFeedbackHighlight);
|
|
676
|
-
const
|
|
677
|
-
code: "function
|
|
678
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
679
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
525
|
+
const _worklet_12670811315294_init_data = {
|
|
526
|
+
code: "function chunkF432IDIWJs5(){const{shown,opacity}=this.__closure;return{opacity:shown.value*opacity};}",
|
|
527
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-F432IDIW.js",
|
|
528
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkF432IDIWJs5\",\"shown\",\"opacity\",\"__closure\",\"value\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-F432IDIW.js\"],\"mappings\":\"AAsZ0C,SAAAA,gBAAMA,CAAA,QAAAC,KAAA,CAAAC,OAAA,OAAAC,SAAA,CAE5C,MAAO,CAAED,OAAO,CAAED,KAAK,CAACG,KAAK,CAAGF,OAAQ,CAAC,CAC3C\",\"ignoreList\":[]}"
|
|
680
529
|
};
|
|
681
530
|
function AnimatedHighlight({
|
|
682
531
|
base,
|
|
@@ -692,28 +541,28 @@ function AnimatedHighlight({
|
|
|
692
541
|
duration
|
|
693
542
|
});
|
|
694
543
|
}, [isPressed, shown, duration]);
|
|
695
|
-
const animatedStyle = useAnimatedStyle2(function
|
|
696
|
-
|
|
544
|
+
const animatedStyle = useAnimatedStyle2(function chunkF432IDIWJs5Factory({
|
|
545
|
+
_worklet_12670811315294_init_data,
|
|
697
546
|
shown,
|
|
698
547
|
opacity
|
|
699
548
|
}) {
|
|
700
549
|
const _e = [new global.Error(), -3, -27];
|
|
701
|
-
const
|
|
550
|
+
const chunkF432IDIWJs5 = function () {
|
|
702
551
|
return {
|
|
703
552
|
opacity: shown.value * opacity
|
|
704
553
|
};
|
|
705
554
|
};
|
|
706
|
-
|
|
555
|
+
chunkF432IDIWJs5.__closure = {
|
|
707
556
|
shown,
|
|
708
557
|
opacity
|
|
709
558
|
};
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
return
|
|
559
|
+
chunkF432IDIWJs5.__workletHash = 12670811315294;
|
|
560
|
+
chunkF432IDIWJs5.__pluginVersion = "0.7.4";
|
|
561
|
+
chunkF432IDIWJs5.__initData = _worklet_12670811315294_init_data;
|
|
562
|
+
chunkF432IDIWJs5.__stackDetails = _e;
|
|
563
|
+
return chunkF432IDIWJs5;
|
|
715
564
|
}({
|
|
716
|
-
|
|
565
|
+
_worklet_12670811315294_init_data,
|
|
717
566
|
shown,
|
|
718
567
|
opacity
|
|
719
568
|
}), [shown, opacity]);
|
|
@@ -780,10 +629,10 @@ function PressableFeedbackRipple({
|
|
|
780
629
|
}
|
|
781
630
|
PressableFeedbackRipple.displayName = "XAUI.PressableFeedback.Ripple";
|
|
782
631
|
markOverlay(PressableFeedbackRipple);
|
|
783
|
-
const
|
|
784
|
-
code: "function
|
|
785
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
786
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
632
|
+
const _worklet_5608199590865_init_data = {
|
|
633
|
+
code: "function chunkF432IDIWJs6(){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}]};}",
|
|
634
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-F432IDIW.js",
|
|
635
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkF432IDIWJs6\",\"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-F432IDIW.js\"],\"mappings\":\"AAsd0C,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\":[]}"
|
|
787
636
|
};
|
|
788
637
|
function RippleWave({
|
|
789
638
|
wave,
|
|
@@ -793,8 +642,8 @@ function RippleWave({
|
|
|
793
642
|
opacity,
|
|
794
643
|
style
|
|
795
644
|
}) {
|
|
796
|
-
const animatedStyle = useAnimatedStyle3(function
|
|
797
|
-
|
|
645
|
+
const animatedStyle = useAnimatedStyle3(function chunkF432IDIWJs6Factory({
|
|
646
|
+
_worklet_5608199590865_init_data,
|
|
798
647
|
wave,
|
|
799
648
|
RIPPLE_START_SCALE,
|
|
800
649
|
center,
|
|
@@ -802,7 +651,7 @@ function RippleWave({
|
|
|
802
651
|
radius
|
|
803
652
|
}) {
|
|
804
653
|
const _e = [new global.Error(), -6, -27];
|
|
805
|
-
const
|
|
654
|
+
const chunkF432IDIWJs6 = function () {
|
|
806
655
|
const t = wave.expand.value;
|
|
807
656
|
const from = wave.origin.value;
|
|
808
657
|
const scale = RIPPLE_START_SCALE + (1 - RIPPLE_START_SCALE) * t;
|
|
@@ -820,20 +669,20 @@ function RippleWave({
|
|
|
820
669
|
}]
|
|
821
670
|
};
|
|
822
671
|
};
|
|
823
|
-
|
|
672
|
+
chunkF432IDIWJs6.__closure = {
|
|
824
673
|
wave,
|
|
825
674
|
RIPPLE_START_SCALE,
|
|
826
675
|
center,
|
|
827
676
|
opacity,
|
|
828
677
|
radius
|
|
829
678
|
};
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
return
|
|
679
|
+
chunkF432IDIWJs6.__workletHash = 5608199590865;
|
|
680
|
+
chunkF432IDIWJs6.__pluginVersion = "0.7.4";
|
|
681
|
+
chunkF432IDIWJs6.__initData = _worklet_5608199590865_init_data;
|
|
682
|
+
chunkF432IDIWJs6.__stackDetails = _e;
|
|
683
|
+
return chunkF432IDIWJs6;
|
|
835
684
|
}({
|
|
836
|
-
|
|
685
|
+
_worklet_5608199590865_init_data,
|
|
837
686
|
wave,
|
|
838
687
|
RIPPLE_START_SCALE,
|
|
839
688
|
center,
|
|
@@ -869,153 +718,4 @@ var PressableFeedback3 = Object.assign(PressableFeedback, {
|
|
|
869
718
|
Highlight: PressableFeedbackHighlight,
|
|
870
719
|
Ripple: PressableFeedbackRipple
|
|
871
720
|
});
|
|
872
|
-
|
|
873
|
-
// src/system/recipe/resolve-tint.ts
|
|
874
|
-
var TINT_SLICE_BY_SUFFIX = [[/SoftForeground$/, "softForeground"], [/SoftPressed$/, "softPressed"], [/Soft$/, "soft"], [/Foreground$/, "foreground"], [/Pressed$/, "pressed"]];
|
|
875
|
-
function tintSliceFor(token) {
|
|
876
|
-
for (const [suffix, slice] of TINT_SLICE_BY_SUFFIX) {
|
|
877
|
-
if (suffix.test(token)) return slice;
|
|
878
|
-
}
|
|
879
|
-
return "base";
|
|
880
|
-
}
|
|
881
|
-
function resolveTint(tokens, color, theme) {
|
|
882
|
-
const tint = deriveTint(color, theme);
|
|
883
|
-
const colors = {};
|
|
884
|
-
for (const [role, token] of Object.entries(tokens ?? {})) {
|
|
885
|
-
colors[role] = tint[tintSliceFor(token)];
|
|
886
|
-
}
|
|
887
|
-
return colors;
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
// src/system/recipe/style-cache.ts
|
|
891
|
-
import { StyleSheet as StyleSheet4 } from "react-native";
|
|
892
|
-
|
|
893
|
-
// src/system/recipe/variant-map.ts
|
|
894
|
-
var STATE_ORDER = ["focused", "pressed", "disabled"];
|
|
895
|
-
function resolveSelection(defaultVariants, selection) {
|
|
896
|
-
const resolved = {
|
|
897
|
-
...defaultVariants
|
|
898
|
-
};
|
|
899
|
-
for (const [axis, value] of Object.entries(selection ?? {})) {
|
|
900
|
-
if (value !== void 0) resolved[axis] = value;
|
|
901
|
-
}
|
|
902
|
-
return resolved;
|
|
903
|
-
}
|
|
904
|
-
function resolveVariantColors(tokens, theme) {
|
|
905
|
-
const colors = {};
|
|
906
|
-
for (const [role, token] of entriesOf(tokens)) {
|
|
907
|
-
const value = theme.colors[token];
|
|
908
|
-
if (value === void 0) {
|
|
909
|
-
throw new Error(`XAUI: the recipe names "${token}" for its "${role}" role, but the theme has no such colour token. Check the spelling against XAUIColors.`);
|
|
910
|
-
}
|
|
911
|
-
colors[role] = value;
|
|
912
|
-
}
|
|
913
|
-
return colors;
|
|
914
|
-
}
|
|
915
|
-
function activeStateFns(states, active) {
|
|
916
|
-
const fns = [];
|
|
917
|
-
for (const state of STATE_ORDER) {
|
|
918
|
-
const fn = active[state] ? states?.[state] : void 0;
|
|
919
|
-
if (fn) fns.push(fn);
|
|
920
|
-
}
|
|
921
|
-
return fns;
|
|
922
|
-
}
|
|
923
|
-
function collectStyleFns(config, selection, states) {
|
|
924
|
-
const fns = [];
|
|
925
|
-
if (config.base) fns.push(config.base);
|
|
926
|
-
if (config.paint) fns.push(config.paint);
|
|
927
|
-
for (const [axis, values] of Object.entries(config.variants ?? {})) {
|
|
928
|
-
const value = selection[axis];
|
|
929
|
-
const fn = value === void 0 ? void 0 : values[value];
|
|
930
|
-
if (fn) fns.push(fn);
|
|
931
|
-
}
|
|
932
|
-
for (const compound of config.compoundVariants ?? []) {
|
|
933
|
-
if (appliesTo(compound.when, selection)) fns.push(compound.style);
|
|
934
|
-
}
|
|
935
|
-
return [...fns, ...activeStateFns(config.states, states)];
|
|
936
|
-
}
|
|
937
|
-
function appliesTo(when, selection) {
|
|
938
|
-
return Object.entries(when).every(([axis, value]) => selection[axis] === value);
|
|
939
|
-
}
|
|
940
|
-
function entriesOf(tokens) {
|
|
941
|
-
return Object.entries(tokens ?? {});
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
// src/system/recipe/style-cache.ts
|
|
945
|
-
function createStyleCache(slots) {
|
|
946
|
-
const entries = /* @__PURE__ */new Map();
|
|
947
|
-
return {
|
|
948
|
-
read(key, build) {
|
|
949
|
-
const hit = entries.get(key);
|
|
950
|
-
if (hit) return hit;
|
|
951
|
-
const built = build();
|
|
952
|
-
const complete = {};
|
|
953
|
-
for (const slot of slots) complete[slot] = built[slot] ?? {};
|
|
954
|
-
const created = StyleSheet4.create(complete);
|
|
955
|
-
entries.set(key, created);
|
|
956
|
-
return created;
|
|
957
|
-
},
|
|
958
|
-
get size() {
|
|
959
|
-
return entries.size;
|
|
960
|
-
},
|
|
961
|
-
clear() {
|
|
962
|
-
entries.clear();
|
|
963
|
-
}
|
|
964
|
-
};
|
|
965
|
-
}
|
|
966
|
-
function cacheKey(theme, selection, states) {
|
|
967
|
-
const axes = Object.keys(selection).sort().map(axis => `${axis}:${selection[axis] ?? "-"}`).join("|");
|
|
968
|
-
const active = STATE_ORDER.filter(state => states[state]).join(",");
|
|
969
|
-
return `${theme.id}|${theme.mode}|${axes}|${active}`;
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
// src/system/recipe/create-recipe.ts
|
|
973
|
-
function createRecipe(config) {
|
|
974
|
-
const cache = createStyleCache(config.slots);
|
|
975
|
-
const tokensFor = variant => variant === void 0 ? void 0 : config.variantTokens?.[variant];
|
|
976
|
-
return {
|
|
977
|
-
slots: config.slots,
|
|
978
|
-
resolve({
|
|
979
|
-
theme,
|
|
980
|
-
selection,
|
|
981
|
-
states = {}
|
|
982
|
-
}) {
|
|
983
|
-
const resolved = resolveSelection(config.defaultVariants, selection);
|
|
984
|
-
return cache.read(cacheKey(theme, resolved, states), () => {
|
|
985
|
-
const colors = resolveVariantColors(tokensFor(resolved.variant), theme);
|
|
986
|
-
return apply(collectStyleFns(config, resolved, states), theme, colors);
|
|
987
|
-
});
|
|
988
|
-
},
|
|
989
|
-
tint({
|
|
990
|
-
theme,
|
|
991
|
-
color,
|
|
992
|
-
selection,
|
|
993
|
-
states = {}
|
|
994
|
-
}) {
|
|
995
|
-
if (!config.paint) return {};
|
|
996
|
-
const resolved = resolveSelection(config.defaultVariants, selection);
|
|
997
|
-
const tokens = tokensFor(resolved.variant);
|
|
998
|
-
if (!tokens) return {};
|
|
999
|
-
const colors = resolveTint(tokens, color, theme);
|
|
1000
|
-
const fns = [config.paint, ...activeStateFns(config.states, states)];
|
|
1001
|
-
return apply(fns, theme, colors);
|
|
1002
|
-
}
|
|
1003
|
-
};
|
|
1004
|
-
}
|
|
1005
|
-
function apply(fns, theme, colors) {
|
|
1006
|
-
const merged = {};
|
|
1007
|
-
for (const fn of fns) {
|
|
1008
|
-
const produced = fn(theme, colors);
|
|
1009
|
-
for (const slot of Object.keys(produced)) {
|
|
1010
|
-
const style = produced[slot];
|
|
1011
|
-
if (!style) continue;
|
|
1012
|
-
const previous = merged[slot];
|
|
1013
|
-
merged[slot] = previous ? {
|
|
1014
|
-
...previous,
|
|
1015
|
-
...style
|
|
1016
|
-
} : style;
|
|
1017
|
-
}
|
|
1018
|
-
}
|
|
1019
|
-
return merged;
|
|
1020
|
-
}
|
|
1021
|
-
export { useStyleProps, IconContext, useIconContext, Icon, childrenToString, createSlotContext, mergeRefs, mergeProps, Slot, 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, createRecipe };
|
|
721
|
+
export { IconContext, useIconContext, Icon, 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 };
|