@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,35 +1,7 @@
|
|
|
1
1
|
import { ComponentType, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ImageSourcePropType, StyleProp, ImageStyle, PressableProps, ViewStyle } from 'react-native';
|
|
3
|
+
import { I as ImageStyleProps, V as ViewStyleProps } from './create-recipe-3_ElpCYt.cjs';
|
|
3
4
|
import { SharedValue } from 'react-native-reanimated';
|
|
4
|
-
import { g as XAUITheme, X as XAUIColors } from './theme.type-C9bFJKFm.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* R13 — React Native mirrors a layout under RTL through the Start/End properties and only
|
|
8
|
-
* those. A props API is exactly where someone writes `paddingLeft` without thinking, so
|
|
9
|
-
* the type removes the temptation instead of leaving it to a review.
|
|
10
|
-
*/
|
|
11
|
-
type DirectionalStyleKey = 'left' | 'right' | 'paddingLeft' | 'paddingRight' | 'marginLeft' | 'marginRight' | 'borderLeftWidth' | 'borderRightWidth' | 'borderLeftColor' | 'borderRightColor' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderBottomLeftRadius' | 'borderBottomRightRadius';
|
|
12
|
-
/**
|
|
13
|
-
* `pointerEvents` is a style key *and* a `View` prop. R14 says the component's own prop
|
|
14
|
-
* wins, so it stays the prop it has always been and is not exposed twice — the one name
|
|
15
|
-
* where the two vocabularies collide.
|
|
16
|
-
*/
|
|
17
|
-
type ComponentOwnedStyleKey = 'pointerEvents';
|
|
18
|
-
/**
|
|
19
|
-
* The style keys of a node, exposed as props (R14). Not a maintained list: it derives
|
|
20
|
-
* from the React Native type, minus what R13 forbids.
|
|
21
|
-
*
|
|
22
|
-
* ```ts
|
|
23
|
-
* type CardProps = ViewStyleProps & { variant?: CardVariant }
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
type StyleProps<Style> = Omit<Style, DirectionalStyleKey | ComponentOwnedStyleKey>;
|
|
27
|
-
/** A root, or any slot that renders a view. */
|
|
28
|
-
type ViewStyleProps = StyleProps<ViewStyle>;
|
|
29
|
-
/** A text slot — `color`, `fontSize`, `letterSpacing`… */
|
|
30
|
-
type TextStyleProps = StyleProps<TextStyle>;
|
|
31
|
-
/** An image slot — `resizeMode`, `tintColor`… */
|
|
32
|
-
type ImageStyleProps = StyleProps<ImageStyle>;
|
|
33
5
|
|
|
34
6
|
/**
|
|
35
7
|
* The props Lucide, Ionicons and `react-native-vector-icons` all accept — the shape
|
|
@@ -192,89 +164,4 @@ type FeedbackContext = {
|
|
|
192
164
|
waves?: readonly [RippleWave, RippleWave];
|
|
193
165
|
};
|
|
194
166
|
|
|
195
|
-
|
|
196
|
-
* A slot is a view or a text node, and a recipe writes one object per slot, so the two
|
|
197
|
-
* RN style shapes are merged rather than discriminated per slot.
|
|
198
|
-
*/
|
|
199
|
-
type SlotStyle = ViewStyle & TextStyle;
|
|
200
|
-
type SlotStyles<Slot extends string> = Partial<Record<Slot, SlotStyle>>;
|
|
201
|
-
/** The roles a variant consumes. The variant names tokens; `paint` says where they land. */
|
|
202
|
-
type VariantRole = 'bg' | 'bgPressed' | 'fg' | 'border';
|
|
203
|
-
/** Token names per role — no colour value ever appears in a recipe. */
|
|
204
|
-
type VariantTokens = Partial<Record<VariantRole, keyof XAUIColors>>;
|
|
205
|
-
/** The same roles resolved: theme colours, or the slices of a raw `color`. */
|
|
206
|
-
type VariantColors = Partial<Record<VariantRole, string>>;
|
|
207
|
-
/**
|
|
208
|
-
* `disabled` is applied last of the three: a control that is both pressed and disabled
|
|
209
|
-
* has to read disabled.
|
|
210
|
-
*/
|
|
211
|
-
type StateName = 'focused' | 'pressed' | 'disabled';
|
|
212
|
-
type States = Partial<Record<StateName, boolean>>;
|
|
213
|
-
/** Reads the theme and the variant's resolved colours; returns one style per slot. */
|
|
214
|
-
type StyleFn<Slot extends string> = (theme: XAUITheme, colors: VariantColors) => SlotStyles<Slot>;
|
|
215
|
-
/** Named axes of finite token values — `{ size: { sm: fn, md: fn } }`. */
|
|
216
|
-
type Axes<Slot extends string> = Record<string, Record<string, StyleFn<Slot>>>;
|
|
217
|
-
/** One value per axis, plus the variant. Missing keys fall back to `defaultVariants`. */
|
|
218
|
-
type Selection<Variant extends string, A extends Axes<string>> = {
|
|
219
|
-
variant?: Variant;
|
|
220
|
-
} & {
|
|
221
|
-
[Axis in keyof A]?: Extract<keyof A[Axis], string>;
|
|
222
|
-
};
|
|
223
|
-
type CompoundVariant<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
|
|
224
|
-
when: Selection<Variant, A>;
|
|
225
|
-
style: StyleFn<Slot>;
|
|
226
|
-
};
|
|
227
|
-
type RecipeConfig<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
|
|
228
|
-
/** Every slot the component publishes. Slots a recipe never styles resolve to `{}`. */
|
|
229
|
-
slots: readonly Slot[];
|
|
230
|
-
base?: StyleFn<Slot>;
|
|
231
|
-
variantTokens?: Record<Variant, VariantTokens>;
|
|
232
|
-
/** Where the variant's colours land — written once, and it holds for every variant. */
|
|
233
|
-
paint?: StyleFn<Slot>;
|
|
234
|
-
variants?: A;
|
|
235
|
-
compoundVariants?: ReadonlyArray<CompoundVariant<Slot, Variant, A>>;
|
|
236
|
-
states?: Partial<Record<StateName, StyleFn<Slot>>>;
|
|
237
|
-
/**
|
|
238
|
-
* `NoInfer`, because this is the one place a single variant name appears on its own:
|
|
239
|
-
* without it, inference reads `Variant` off `{ variant: 'primary' }` and narrows the
|
|
240
|
-
* whole recipe to that one value, so every other variant becomes a type error at the
|
|
241
|
-
* call site. `variantTokens` is the declaration; this only picks a default from it.
|
|
242
|
-
*/
|
|
243
|
-
defaultVariants?: Selection<NoInfer<Variant>, A>;
|
|
244
|
-
};
|
|
245
|
-
/** Stable references: the same object for the same tokens, for the app's lifetime. */
|
|
246
|
-
type ResolvedStyles<Slot extends string> = Readonly<Record<Slot, SlotStyle>>;
|
|
247
|
-
/** A selection with `defaultVariants` already folded in, keyed by axis name. */
|
|
248
|
-
type ResolvedSelection = Readonly<Record<string, string | undefined>>;
|
|
249
|
-
|
|
250
|
-
type ResolveArgs<Variant extends string, A extends Axes<string>> = {
|
|
251
|
-
theme: XAUITheme;
|
|
252
|
-
selection?: Selection<Variant, A>;
|
|
253
|
-
states?: States;
|
|
254
|
-
};
|
|
255
|
-
type TintArgs<Variant extends string, A extends Axes<string>> = ResolveArgs<Variant, A> & {
|
|
256
|
-
color: string;
|
|
257
|
-
};
|
|
258
|
-
type Recipe<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
|
|
259
|
-
readonly slots: readonly Slot[];
|
|
260
|
-
/** The cached pass: stable `StyleSheet` references, keyed by tokens alone. */
|
|
261
|
-
resolve(args: ResolveArgs<Variant, A>): ResolvedStyles<Slot>;
|
|
262
|
-
/**
|
|
263
|
-
* The tint pass: the same functions run again with `color`'s slices in place of the
|
|
264
|
-
* theme's tokens. Uncached and allocating, and only ever called when `color` is set.
|
|
265
|
-
*/
|
|
266
|
-
tint(args: TintArgs<Variant, A>): SlotStyles<Slot>;
|
|
267
|
-
};
|
|
268
|
-
/**
|
|
269
|
-
* A component's style, declared once. Resolution splits in two because the two halves
|
|
270
|
-
* have different lifetimes: everything keyed by a finite token is cached forever, and
|
|
271
|
-
* an arbitrary `color` is recomputed per render — which is what keeps the cache bounded
|
|
272
|
-
* by the number of token combinations rather than by the palette users invent.
|
|
273
|
-
*
|
|
274
|
-
* const styles = buttonRecipe.resolve({ theme, selection: { variant, size }, states })
|
|
275
|
-
* const tint = color ? buttonRecipe.tint({ theme, color, selection, states }) : undefined
|
|
276
|
-
* <View style={[styles.root, tint?.root, style]} />
|
|
277
|
-
*/
|
|
278
|
-
declare function createRecipe<Slot extends string, Variant extends string, const A extends Axes<Slot>>(config: RecipeConfig<Slot, Variant, A>): Recipe<Slot, Variant, A>;
|
|
279
|
-
|
|
280
|
-
export { type AnimationConfig as A, type CompoundVariant as C, type DirectionalStyleKey as D, type FeedbackContext as F, type IconComponentProps as I, type PressableFeedbackProps as P, type RadiusStyle as R, type SlotAnimation as S, type TintArgs as T, type VariantColors as V, type IconContextValue as a, type IconProps as b, type AnimationProp as c, type ResolvedAnimation as d, type RippleWave as e, createRecipe as f, type Recipe as g, type ResolveArgs as h, type Axes as i, type RecipeConfig as j, type ResolvedSelection as k, type ResolvedStyles as l, type Selection as m, type SlotStyle as n, type SlotStyles as o, type StateName as p, type States as q, type StyleFn as r, type VariantRole as s, type VariantTokens as t, type ImageStyleProps as u, type StyleProps as v, type TextStyleProps as w, type ViewStyleProps as x };
|
|
167
|
+
export type { AnimationConfig as A, FeedbackContext as F, IconComponentProps as I, PressableFeedbackProps as P, RadiusStyle as R, SlotAnimation as S, IconContextValue as a, IconProps as b, AnimationProp as c, ResolvedAnimation as d, RippleWave as e };
|
|
@@ -1,35 +1,7 @@
|
|
|
1
1
|
import { ComponentType, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ImageSourcePropType, StyleProp, ImageStyle, PressableProps, ViewStyle } from 'react-native';
|
|
3
|
+
import { I as ImageStyleProps, V as ViewStyleProps } from './create-recipe-DImq1AZA.js';
|
|
3
4
|
import { SharedValue } from 'react-native-reanimated';
|
|
4
|
-
import { g as XAUITheme, X as XAUIColors } from './theme.type-C9bFJKFm.cjs';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* R13 — React Native mirrors a layout under RTL through the Start/End properties and only
|
|
8
|
-
* those. A props API is exactly where someone writes `paddingLeft` without thinking, so
|
|
9
|
-
* the type removes the temptation instead of leaving it to a review.
|
|
10
|
-
*/
|
|
11
|
-
type DirectionalStyleKey = 'left' | 'right' | 'paddingLeft' | 'paddingRight' | 'marginLeft' | 'marginRight' | 'borderLeftWidth' | 'borderRightWidth' | 'borderLeftColor' | 'borderRightColor' | 'borderTopLeftRadius' | 'borderTopRightRadius' | 'borderBottomLeftRadius' | 'borderBottomRightRadius';
|
|
12
|
-
/**
|
|
13
|
-
* `pointerEvents` is a style key *and* a `View` prop. R14 says the component's own prop
|
|
14
|
-
* wins, so it stays the prop it has always been and is not exposed twice — the one name
|
|
15
|
-
* where the two vocabularies collide.
|
|
16
|
-
*/
|
|
17
|
-
type ComponentOwnedStyleKey = 'pointerEvents';
|
|
18
|
-
/**
|
|
19
|
-
* The style keys of a node, exposed as props (R14). Not a maintained list: it derives
|
|
20
|
-
* from the React Native type, minus what R13 forbids.
|
|
21
|
-
*
|
|
22
|
-
* ```ts
|
|
23
|
-
* type CardProps = ViewStyleProps & { variant?: CardVariant }
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
type StyleProps<Style> = Omit<Style, DirectionalStyleKey | ComponentOwnedStyleKey>;
|
|
27
|
-
/** A root, or any slot that renders a view. */
|
|
28
|
-
type ViewStyleProps = StyleProps<ViewStyle>;
|
|
29
|
-
/** A text slot — `color`, `fontSize`, `letterSpacing`… */
|
|
30
|
-
type TextStyleProps = StyleProps<TextStyle>;
|
|
31
|
-
/** An image slot — `resizeMode`, `tintColor`… */
|
|
32
|
-
type ImageStyleProps = StyleProps<ImageStyle>;
|
|
33
5
|
|
|
34
6
|
/**
|
|
35
7
|
* The props Lucide, Ionicons and `react-native-vector-icons` all accept — the shape
|
|
@@ -192,89 +164,4 @@ type FeedbackContext = {
|
|
|
192
164
|
waves?: readonly [RippleWave, RippleWave];
|
|
193
165
|
};
|
|
194
166
|
|
|
195
|
-
|
|
196
|
-
* A slot is a view or a text node, and a recipe writes one object per slot, so the two
|
|
197
|
-
* RN style shapes are merged rather than discriminated per slot.
|
|
198
|
-
*/
|
|
199
|
-
type SlotStyle = ViewStyle & TextStyle;
|
|
200
|
-
type SlotStyles<Slot extends string> = Partial<Record<Slot, SlotStyle>>;
|
|
201
|
-
/** The roles a variant consumes. The variant names tokens; `paint` says where they land. */
|
|
202
|
-
type VariantRole = 'bg' | 'bgPressed' | 'fg' | 'border';
|
|
203
|
-
/** Token names per role — no colour value ever appears in a recipe. */
|
|
204
|
-
type VariantTokens = Partial<Record<VariantRole, keyof XAUIColors>>;
|
|
205
|
-
/** The same roles resolved: theme colours, or the slices of a raw `color`. */
|
|
206
|
-
type VariantColors = Partial<Record<VariantRole, string>>;
|
|
207
|
-
/**
|
|
208
|
-
* `disabled` is applied last of the three: a control that is both pressed and disabled
|
|
209
|
-
* has to read disabled.
|
|
210
|
-
*/
|
|
211
|
-
type StateName = 'focused' | 'pressed' | 'disabled';
|
|
212
|
-
type States = Partial<Record<StateName, boolean>>;
|
|
213
|
-
/** Reads the theme and the variant's resolved colours; returns one style per slot. */
|
|
214
|
-
type StyleFn<Slot extends string> = (theme: XAUITheme, colors: VariantColors) => SlotStyles<Slot>;
|
|
215
|
-
/** Named axes of finite token values — `{ size: { sm: fn, md: fn } }`. */
|
|
216
|
-
type Axes<Slot extends string> = Record<string, Record<string, StyleFn<Slot>>>;
|
|
217
|
-
/** One value per axis, plus the variant. Missing keys fall back to `defaultVariants`. */
|
|
218
|
-
type Selection<Variant extends string, A extends Axes<string>> = {
|
|
219
|
-
variant?: Variant;
|
|
220
|
-
} & {
|
|
221
|
-
[Axis in keyof A]?: Extract<keyof A[Axis], string>;
|
|
222
|
-
};
|
|
223
|
-
type CompoundVariant<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
|
|
224
|
-
when: Selection<Variant, A>;
|
|
225
|
-
style: StyleFn<Slot>;
|
|
226
|
-
};
|
|
227
|
-
type RecipeConfig<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
|
|
228
|
-
/** Every slot the component publishes. Slots a recipe never styles resolve to `{}`. */
|
|
229
|
-
slots: readonly Slot[];
|
|
230
|
-
base?: StyleFn<Slot>;
|
|
231
|
-
variantTokens?: Record<Variant, VariantTokens>;
|
|
232
|
-
/** Where the variant's colours land — written once, and it holds for every variant. */
|
|
233
|
-
paint?: StyleFn<Slot>;
|
|
234
|
-
variants?: A;
|
|
235
|
-
compoundVariants?: ReadonlyArray<CompoundVariant<Slot, Variant, A>>;
|
|
236
|
-
states?: Partial<Record<StateName, StyleFn<Slot>>>;
|
|
237
|
-
/**
|
|
238
|
-
* `NoInfer`, because this is the one place a single variant name appears on its own:
|
|
239
|
-
* without it, inference reads `Variant` off `{ variant: 'primary' }` and narrows the
|
|
240
|
-
* whole recipe to that one value, so every other variant becomes a type error at the
|
|
241
|
-
* call site. `variantTokens` is the declaration; this only picks a default from it.
|
|
242
|
-
*/
|
|
243
|
-
defaultVariants?: Selection<NoInfer<Variant>, A>;
|
|
244
|
-
};
|
|
245
|
-
/** Stable references: the same object for the same tokens, for the app's lifetime. */
|
|
246
|
-
type ResolvedStyles<Slot extends string> = Readonly<Record<Slot, SlotStyle>>;
|
|
247
|
-
/** A selection with `defaultVariants` already folded in, keyed by axis name. */
|
|
248
|
-
type ResolvedSelection = Readonly<Record<string, string | undefined>>;
|
|
249
|
-
|
|
250
|
-
type ResolveArgs<Variant extends string, A extends Axes<string>> = {
|
|
251
|
-
theme: XAUITheme;
|
|
252
|
-
selection?: Selection<Variant, A>;
|
|
253
|
-
states?: States;
|
|
254
|
-
};
|
|
255
|
-
type TintArgs<Variant extends string, A extends Axes<string>> = ResolveArgs<Variant, A> & {
|
|
256
|
-
color: string;
|
|
257
|
-
};
|
|
258
|
-
type Recipe<Slot extends string, Variant extends string, A extends Axes<Slot>> = {
|
|
259
|
-
readonly slots: readonly Slot[];
|
|
260
|
-
/** The cached pass: stable `StyleSheet` references, keyed by tokens alone. */
|
|
261
|
-
resolve(args: ResolveArgs<Variant, A>): ResolvedStyles<Slot>;
|
|
262
|
-
/**
|
|
263
|
-
* The tint pass: the same functions run again with `color`'s slices in place of the
|
|
264
|
-
* theme's tokens. Uncached and allocating, and only ever called when `color` is set.
|
|
265
|
-
*/
|
|
266
|
-
tint(args: TintArgs<Variant, A>): SlotStyles<Slot>;
|
|
267
|
-
};
|
|
268
|
-
/**
|
|
269
|
-
* A component's style, declared once. Resolution splits in two because the two halves
|
|
270
|
-
* have different lifetimes: everything keyed by a finite token is cached forever, and
|
|
271
|
-
* an arbitrary `color` is recomputed per render — which is what keeps the cache bounded
|
|
272
|
-
* by the number of token combinations rather than by the palette users invent.
|
|
273
|
-
*
|
|
274
|
-
* const styles = buttonRecipe.resolve({ theme, selection: { variant, size }, states })
|
|
275
|
-
* const tint = color ? buttonRecipe.tint({ theme, color, selection, states }) : undefined
|
|
276
|
-
* <View style={[styles.root, tint?.root, style]} />
|
|
277
|
-
*/
|
|
278
|
-
declare function createRecipe<Slot extends string, Variant extends string, const A extends Axes<Slot>>(config: RecipeConfig<Slot, Variant, A>): Recipe<Slot, Variant, A>;
|
|
279
|
-
|
|
280
|
-
export { type AnimationConfig as A, type CompoundVariant as C, type DirectionalStyleKey as D, type FeedbackContext as F, type IconComponentProps as I, type PressableFeedbackProps as P, type RadiusStyle as R, type SlotAnimation as S, type TintArgs as T, type VariantColors as V, type IconContextValue as a, type IconProps as b, type AnimationProp as c, type ResolvedAnimation as d, type RippleWave as e, createRecipe as f, type Recipe as g, type ResolveArgs as h, type Axes as i, type RecipeConfig as j, type ResolvedSelection as k, type ResolvedStyles as l, type Selection as m, type SlotStyle as n, type SlotStyles as o, type StateName as p, type States as q, type StyleFn as r, type VariantRole as s, type VariantTokens as t, type ImageStyleProps as u, type StyleProps as v, type TextStyleProps as w, type ViewStyleProps as x };
|
|
167
|
+
export type { AnimationConfig as A, FeedbackContext as F, IconComponentProps as I, PressableFeedbackProps as P, RadiusStyle as R, SlotAnimation as S, IconContextValue as a, IconProps as b, AnimationProp as c, ResolvedAnimation as d, RippleWave as e };
|
package/dist/system/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkM2VYRHVScjs = require('../chunk-M2VYRHVS.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -27,6 +27,7 @@ var _chunkBAACHVM4cjs = require('../chunk-BAACHVM4.cjs');
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
+
var _chunk2UICXD3Qcjs = require('../chunk-2UICXD3Q.cjs');
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
|
|
@@ -34,7 +35,8 @@ var _chunkBAACHVM4cjs = require('../chunk-BAACHVM4.cjs');
|
|
|
34
35
|
|
|
35
36
|
|
|
36
37
|
|
|
37
|
-
|
|
38
|
+
|
|
39
|
+
var _chunk5SU7FXWHcjs = require('../chunk-5SU7FXWH.cjs');
|
|
38
40
|
require('../chunk-6N5JXRUZ.cjs');
|
|
39
41
|
|
|
40
42
|
|
|
@@ -70,4 +72,4 @@ require('../chunk-6N5JXRUZ.cjs');
|
|
|
70
72
|
|
|
71
73
|
|
|
72
74
|
|
|
73
|
-
exports.FEEDBACK_OVERLAY =
|
|
75
|
+
exports.FEEDBACK_OVERLAY = _chunk2UICXD3Qcjs.FEEDBACK_OVERLAY; exports.HIGHLIGHT_DURATION = _chunk2UICXD3Qcjs.HIGHLIGHT_DURATION; exports.HIGHLIGHT_OPACITY = _chunk2UICXD3Qcjs.HIGHLIGHT_OPACITY; exports.Icon = _chunk2UICXD3Qcjs.Icon; exports.IconContext = _chunk2UICXD3Qcjs.IconContext; exports.PRESS_DURATION = _chunk2UICXD3Qcjs.PRESS_DURATION; exports.PRESS_SCALE = _chunk2UICXD3Qcjs.PRESS_SCALE; exports.Portal = _chunkM2VYRHVScjs.Portal; exports.PortalContext = _chunkM2VYRHVScjs.PortalContext; exports.PortalHost = _chunkM2VYRHVScjs.PortalHost; exports.PressableFeedback = _chunk2UICXD3Qcjs.PressableFeedback; exports.RIPPLE_CONFIRM_DURATION = _chunk2UICXD3Qcjs.RIPPLE_CONFIRM_DURATION; exports.RIPPLE_EXPAND_DURATION = _chunk2UICXD3Qcjs.RIPPLE_EXPAND_DURATION; exports.RIPPLE_FADE_IN = _chunk2UICXD3Qcjs.RIPPLE_FADE_IN; exports.RIPPLE_FADE_OUT = _chunk2UICXD3Qcjs.RIPPLE_FADE_OUT; exports.RIPPLE_FADE_OUT_DELAY = _chunk2UICXD3Qcjs.RIPPLE_FADE_OUT_DELAY; exports.RIPPLE_OPACITY = _chunk2UICXD3Qcjs.RIPPLE_OPACITY; exports.RIPPLE_START_SCALE = _chunk2UICXD3Qcjs.RIPPLE_START_SCALE; exports.SCALE_REFERENCE_WIDTH = _chunk2UICXD3Qcjs.SCALE_REFERENCE_WIDTH; exports.Slot = _chunk5SU7FXWHcjs.Slot; exports.childrenToString = _chunk5SU7FXWHcjs.childrenToString; exports.createRecipe = _chunk5SU7FXWHcjs.createRecipe; exports.createSlotContext = _chunk5SU7FXWHcjs.createSlotContext; exports.markOverlay = _chunk2UICXD3Qcjs.markOverlay; exports.mergeProps = _chunk5SU7FXWHcjs.mergeProps; exports.mergeRefs = _chunk5SU7FXWHcjs.mergeRefs; exports.pressScaleFor = _chunk2UICXD3Qcjs.pressScaleFor; exports.resolveAnimation = _chunk2UICXD3Qcjs.resolveAnimation; exports.resolveSlotAnimation = _chunk2UICXD3Qcjs.resolveSlotAnimation; exports.rippleRadiusFor = _chunk2UICXD3Qcjs.rippleRadiusFor; exports.useFeedback = _chunk2UICXD3Qcjs.useFeedback; exports.useIconContext = _chunk2UICXD3Qcjs.useIconContext; exports.useStyleProps = _chunk5SU7FXWHcjs.useStyleProps;
|
package/dist/system/index.d.cts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, Provider, Ref, RefCallback } from 'react';
|
|
3
|
-
import { b as IconProps, a as IconContextValue,
|
|
4
|
-
export { A as AnimationConfig,
|
|
3
|
+
import { b as IconProps, a as IconContextValue, S as SlotAnimation, F as FeedbackContext, c as AnimationProp, d as ResolvedAnimation } from '../pressable-feedback.type-C9kjAuVQ.cjs';
|
|
4
|
+
export { A as AnimationConfig, I as IconComponentProps, P as PressableFeedbackProps, R as RadiusStyle, e as RippleWave } from '../pressable-feedback.type-C9kjAuVQ.cjs';
|
|
5
|
+
import { V as ViewStyleProps } from '../create-recipe-3_ElpCYt.cjs';
|
|
6
|
+
export { A as Axes, C as CompoundVariant, D as DirectionalStyleKey, I as ImageStyleProps, R as Recipe, b as RecipeConfig, a as ResolveArgs, d as ResolvedSelection, e as ResolvedStyles, S as Selection, f as SlotStyle, g as SlotStyles, h as StateName, i as States, j as StyleFn, n as StyleProps, o as TextStyleProps, T as TintArgs, k as VariantColors, l as VariantRole, m as VariantTokens, c as createRecipe } from '../create-recipe-3_ElpCYt.cjs';
|
|
5
7
|
import * as react_native from 'react-native';
|
|
6
8
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
7
9
|
import 'react-native-reanimated';
|
|
8
|
-
import '../theme.type-
|
|
10
|
+
import '../theme.type-C2gNHpEx.cjs';
|
|
9
11
|
|
|
10
12
|
/**
|
|
11
13
|
* The runtime half of R14. The type half lives in `system/style-props/`, and the two are
|
|
@@ -376,7 +378,7 @@ declare function resolveSlotAnimation(override: SlotAnimation | undefined, enabl
|
|
|
376
378
|
* off — and it is the only shape that survives `asChild`, where the caller's own element
|
|
377
379
|
* is the pressable and there is no sibling for the primitive to inject.
|
|
378
380
|
*/
|
|
379
|
-
declare const PressableFeedback: react.ForwardRefExoticComponent<Omit<react_native.PressableProps, "
|
|
381
|
+
declare const PressableFeedback: react.ForwardRefExoticComponent<Omit<react_native.PressableProps, "children" | "style" | "disabled"> & ViewStyleProps & {
|
|
380
382
|
isPressed?: boolean;
|
|
381
383
|
isDisabled?: boolean;
|
|
382
384
|
asChild?: boolean;
|
package/dist/system/index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, Provider, Ref, RefCallback } from 'react';
|
|
3
|
-
import { b as IconProps, a as IconContextValue,
|
|
4
|
-
export { A as AnimationConfig,
|
|
3
|
+
import { b as IconProps, a as IconContextValue, S as SlotAnimation, F as FeedbackContext, c as AnimationProp, d as ResolvedAnimation } from '../pressable-feedback.type-KcPvFf6f.js';
|
|
4
|
+
export { A as AnimationConfig, I as IconComponentProps, P as PressableFeedbackProps, R as RadiusStyle, e as RippleWave } from '../pressable-feedback.type-KcPvFf6f.js';
|
|
5
|
+
import { V as ViewStyleProps } from '../create-recipe-DImq1AZA.js';
|
|
6
|
+
export { A as Axes, C as CompoundVariant, D as DirectionalStyleKey, I as ImageStyleProps, R as Recipe, b as RecipeConfig, a as ResolveArgs, d as ResolvedSelection, e as ResolvedStyles, S as Selection, f as SlotStyle, g as SlotStyles, h as StateName, i as States, j as StyleFn, n as StyleProps, o as TextStyleProps, T as TintArgs, k as VariantColors, l as VariantRole, m as VariantTokens, c as createRecipe } from '../create-recipe-DImq1AZA.js';
|
|
5
7
|
import * as react_native from 'react-native';
|
|
6
8
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
7
9
|
import 'react-native-reanimated';
|
|
8
|
-
import '../theme.type-
|
|
10
|
+
import '../theme.type-C2gNHpEx.js';
|
|
9
11
|
|
|
10
12
|
/**
|
|
11
13
|
* The runtime half of R14. The type half lives in `system/style-props/`, and the two are
|
|
@@ -376,7 +378,7 @@ declare function resolveSlotAnimation(override: SlotAnimation | undefined, enabl
|
|
|
376
378
|
* off — and it is the only shape that survives `asChild`, where the caller's own element
|
|
377
379
|
* is the pressable and there is no sibling for the primitive to inject.
|
|
378
380
|
*/
|
|
379
|
-
declare const PressableFeedback: react.ForwardRefExoticComponent<Omit<react_native.PressableProps, "
|
|
381
|
+
declare const PressableFeedback: react.ForwardRefExoticComponent<Omit<react_native.PressableProps, "children" | "style" | "disabled"> & ViewStyleProps & {
|
|
380
382
|
isPressed?: boolean;
|
|
381
383
|
isDisabled?: boolean;
|
|
382
384
|
asChild?: boolean;
|
package/dist/system/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Portal,
|
|
3
3
|
PortalContext,
|
|
4
4
|
PortalHost
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-L3AQNVRN.js";
|
|
6
6
|
import {
|
|
7
7
|
FEEDBACK_OVERLAY,
|
|
8
8
|
HIGHLIGHT_DURATION,
|
|
@@ -20,21 +20,23 @@ import {
|
|
|
20
20
|
RIPPLE_OPACITY,
|
|
21
21
|
RIPPLE_START_SCALE,
|
|
22
22
|
SCALE_REFERENCE_WIDTH,
|
|
23
|
-
Slot,
|
|
24
|
-
childrenToString,
|
|
25
|
-
createRecipe,
|
|
26
|
-
createSlotContext,
|
|
27
23
|
markOverlay,
|
|
28
|
-
mergeProps,
|
|
29
|
-
mergeRefs,
|
|
30
24
|
pressScaleFor,
|
|
31
25
|
resolveAnimation,
|
|
32
26
|
resolveSlotAnimation,
|
|
33
27
|
rippleRadiusFor,
|
|
34
28
|
useFeedback,
|
|
35
|
-
useIconContext
|
|
29
|
+
useIconContext
|
|
30
|
+
} from "../chunk-F432IDIW.js";
|
|
31
|
+
import {
|
|
32
|
+
Slot,
|
|
33
|
+
childrenToString,
|
|
34
|
+
createRecipe,
|
|
35
|
+
createSlotContext,
|
|
36
|
+
mergeProps,
|
|
37
|
+
mergeRefs,
|
|
36
38
|
useStyleProps
|
|
37
|
-
} from "../chunk-
|
|
39
|
+
} from "../chunk-4K3LZS7M.js";
|
|
38
40
|
import "../chunk-XJARE6SC.js";
|
|
39
41
|
export {
|
|
40
42
|
FEEDBACK_OVERLAY,
|
package/dist/theme/index.cjs
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkBHAHJHAIcjs = require('../chunk-BHAHJHAI.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -33,4 +33,4 @@ var _chunk6N5JXRUZcjs = require('../chunk-6N5JXRUZ.cjs');
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
exports.ThemeContext = _chunk6N5JXRUZcjs.ThemeContext; exports.XAUIProvider =
|
|
36
|
+
exports.ThemeContext = _chunk6N5JXRUZcjs.ThemeContext; exports.XAUIProvider = _chunkBHAHJHAIcjs.XAUIProvider; exports.buildRadius = _chunkBHAHJHAIcjs.buildRadius; exports.buildShadows = _chunkBHAHJHAIcjs.buildShadows; exports.createTheme = _chunkBHAHJHAIcjs.createTheme; exports.defaultTheme = _chunkBHAHJHAIcjs.defaultTheme; exports.deriveColors = _chunkBHAHJHAIcjs.deriveColors; exports.deriveTint = _chunk6N5JXRUZcjs.deriveTint; exports.palette = _chunkBHAHJHAIcjs.palette; exports.primitives = _chunkBHAHJHAIcjs.primitives; exports.sourceKeys = _chunkBHAHJHAIcjs.sourceKeys; exports.tokens = _chunkBHAHJHAIcjs.tokens; exports.useColorMode = _chunk6N5JXRUZcjs.useColorMode; exports.useThemeColor = _chunk6N5JXRUZcjs.useThemeColor; exports.useXAUITheme = _chunk6N5JXRUZcjs.useXAUITheme;
|
package/dist/theme/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { i as XAUIThemeSet, h as XAUIThemeConfig,
|
|
4
|
-
export { F as FontSizeKey,
|
|
3
|
+
import { i as XAUIThemeSet, h as XAUIThemeConfig, g as XAUISourceColors, c as XAUIDerivedColors, X as XAUITheme, e as XAUIRadius, C as ColorMode, a as XAUIColors } from '../theme.type-C2gNHpEx.cjs';
|
|
4
|
+
export { F as FontSizeKey, b as FontWeightKey, R as RadiusKey, S as Size, d as XAUIPrimitiveColors, f as XAUIShadow } from '../theme.type-C2gNHpEx.cjs';
|
|
5
5
|
import 'react-native';
|
|
6
6
|
|
|
7
7
|
/** `'system'` follows the device; the resolved value is never `'system'`. */
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { i as XAUIThemeSet, h as XAUIThemeConfig,
|
|
4
|
-
export { F as FontSizeKey,
|
|
3
|
+
import { i as XAUIThemeSet, h as XAUIThemeConfig, g as XAUISourceColors, c as XAUIDerivedColors, X as XAUITheme, e as XAUIRadius, C as ColorMode, a as XAUIColors } from '../theme.type-C2gNHpEx.js';
|
|
4
|
+
export { F as FontSizeKey, b as FontWeightKey, R as RadiusKey, S as Size, d as XAUIPrimitiveColors, f as XAUIShadow } from '../theme.type-C2gNHpEx.js';
|
|
5
5
|
import 'react-native';
|
|
6
6
|
|
|
7
7
|
/** `'system'` follows the device; the resolved value is never `'system'`. */
|
package/dist/theme/index.js
CHANGED
|
@@ -156,4 +156,4 @@ type XAUIThemeSet = {
|
|
|
156
156
|
dark: XAUITheme;
|
|
157
157
|
};
|
|
158
158
|
|
|
159
|
-
export type { ColorMode as C, FontSizeKey as F, RadiusKey as R, Size as S,
|
|
159
|
+
export type { ColorMode as C, FontSizeKey as F, RadiusKey as R, Size as S, XAUITheme as X, XAUIColors as a, FontWeightKey as b, XAUIDerivedColors as c, XAUIPrimitiveColors as d, XAUIRadius as e, XAUIShadow as f, XAUISourceColors as g, XAUIThemeConfig as h, XAUIThemeSet as i };
|
|
@@ -156,4 +156,4 @@ type XAUIThemeSet = {
|
|
|
156
156
|
dark: XAUITheme;
|
|
157
157
|
};
|
|
158
158
|
|
|
159
|
-
export type { ColorMode as C, FontSizeKey as F, RadiusKey as R, Size as S,
|
|
159
|
+
export type { ColorMode as C, FontSizeKey as F, RadiusKey as R, Size as S, XAUITheme as X, XAUIColors as a, FontWeightKey as b, XAUIDerivedColors as c, XAUIPrimitiveColors as d, XAUIRadius as e, XAUIShadow as f, XAUISourceColors as g, XAUIThemeConfig as h, XAUIThemeSet as i };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xaui/native",
|
|
3
|
-
"version": "0.9.1-alpha.
|
|
3
|
+
"version": "0.9.1-alpha.17",
|
|
4
4
|
"description": "Composition-first React Native UI components with native animations powered by Reanimated",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -37,6 +37,16 @@
|
|
|
37
37
|
"default": "./dist/components/button/index.cjs"
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
|
+
"./typography": {
|
|
41
|
+
"import": {
|
|
42
|
+
"types": "./dist/components/typography/index.d.ts",
|
|
43
|
+
"default": "./dist/components/typography/index.js"
|
|
44
|
+
},
|
|
45
|
+
"require": {
|
|
46
|
+
"types": "./dist/components/typography/index.d.cts",
|
|
47
|
+
"default": "./dist/components/typography/index.cjs"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
40
50
|
"./system": {
|
|
41
51
|
"import": {
|
|
42
52
|
"types": "./dist/system/index.d.ts",
|