@xaui/native 0.9.1-alpha.17 → 0.9.1-alpha.18
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-ASXK7XU4.js → chunk-MBLPPOSO.js} +15 -15
- package/dist/{chunk-IZYRU7S2.cjs → chunk-ODH5WAVM.cjs} +17 -17
- package/dist/{chunk-2UICXD3Q.cjs → chunk-P5MKOLIW.cjs} +97 -90
- package/dist/{chunk-F432IDIW.js → chunk-VQPP6FCB.js} +111 -104
- package/dist/components/button/index.cjs +3 -3
- package/dist/components/button/index.d.cts +1 -1
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/button/index.js +2 -2
- package/dist/components/typography/index.d.cts +2 -2
- package/dist/components/typography/index.d.ts +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/{pressable-feedback.type-KcPvFf6f.d.ts → pressable-feedback.type-UwqIG6ES.d.ts} +47 -19
- package/dist/{pressable-feedback.type-C9kjAuVQ.d.cts → pressable-feedback.type-lgW5wQx5.d.cts} +47 -19
- package/dist/system/index.cjs +2 -2
- package/dist/system/index.d.cts +8 -4
- package/dist/system/index.d.ts +8 -4
- package/dist/system/index.js +1 -1
- package/package.json +1 -1
package/dist/{pressable-feedback.type-KcPvFf6f.d.ts → pressable-feedback.type-UwqIG6ES.d.ts}
RENAMED
|
@@ -12,31 +12,59 @@ type IconComponentProps = {
|
|
|
12
12
|
size?: number;
|
|
13
13
|
color?: string;
|
|
14
14
|
};
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
* reason: it is the one of the three forms where we render the node. On the other two,
|
|
18
|
-
* `size` and `color` are what shapes the icon.
|
|
19
|
-
*/
|
|
20
|
-
type IconProps = ImageStyleProps & {
|
|
21
|
-
/** An icon component. `size` and `color` are injected into it. */
|
|
22
|
-
as?: ComponentType<IconComponentProps>;
|
|
23
|
-
/** A raw `react-native-svg` element, cloned with the resolved size and colour. */
|
|
24
|
-
children?: ReactNode;
|
|
25
|
-
/** An image, tinted with the resolved colour. */
|
|
26
|
-
source?: ImageSourcePropType;
|
|
15
|
+
/** What every form takes, and the only lever the two non-rendering ones have. */
|
|
16
|
+
type IconBase = {
|
|
27
17
|
/** Overrides what the surrounding slot asked for. */
|
|
28
18
|
size?: number;
|
|
29
19
|
/** A raw value (R7), never a token. Overrides the slot's. */
|
|
30
20
|
color?: string;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* An icon component — `size` and `color` are injected into it.
|
|
24
|
+
*
|
|
25
|
+
* No style props and no `style`: we do not render this node, the third party does, and
|
|
26
|
+
* there is no published interface that says it would accept either. Wrapping it in a view
|
|
27
|
+
* to make them work would add a level of depth to every icon in the library.
|
|
28
|
+
*/
|
|
29
|
+
type IconAsProps = IconBase & {
|
|
30
|
+
as: ComponentType<IconComponentProps>;
|
|
31
|
+
children?: never;
|
|
32
|
+
source?: never;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* A raw `react-native-svg` element, cloned with the resolved size and colour.
|
|
36
|
+
*
|
|
37
|
+
* No style props and no `style` either: the node is the caller's own element, and they can
|
|
38
|
+
* style it where they wrote it.
|
|
39
|
+
*/
|
|
40
|
+
type IconChildrenProps = IconBase & {
|
|
41
|
+
as?: never;
|
|
42
|
+
children: ReactNode;
|
|
43
|
+
source?: never;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* An image, tinted with the resolved colour — **the one form that carries R14**, because
|
|
47
|
+
* it is the one where we render the node.
|
|
48
|
+
*/
|
|
49
|
+
type IconSourceProps = IconBase & ImageStyleProps & {
|
|
50
|
+
as?: never;
|
|
51
|
+
children?: never;
|
|
52
|
+
source: ImageSourcePropType;
|
|
38
53
|
style?: StyleProp<ImageStyle>;
|
|
39
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* Three forms, and the type says which one you are in.
|
|
57
|
+
*
|
|
58
|
+
* The union is what makes R14's boundary checkable rather than merely documented. When
|
|
59
|
+
* every form declared the style props, `<Icon as={Trash2} marginEnd={8} />` compiled and
|
|
60
|
+
* did nothing at all — the prop was dropped on the two forms that do not render the node,
|
|
61
|
+
* silently, and only a comment said so. Now it is a compile error that points at `size`
|
|
62
|
+
* and `color`, which are the levers those forms actually have.
|
|
63
|
+
*
|
|
64
|
+
* It also makes the three mutually exclusive, which they always were at runtime: `as`
|
|
65
|
+
* wins over children, and children over `source`.
|
|
66
|
+
*/
|
|
67
|
+
type IconProps = IconAsProps | IconChildrenProps | IconSourceProps;
|
|
40
68
|
/** What a component root publishes so the icons inside it need no props at all. */
|
|
41
69
|
type IconContextValue = {
|
|
42
70
|
size?: number;
|
package/dist/{pressable-feedback.type-C9kjAuVQ.d.cts → pressable-feedback.type-lgW5wQx5.d.cts}
RENAMED
|
@@ -12,31 +12,59 @@ type IconComponentProps = {
|
|
|
12
12
|
size?: number;
|
|
13
13
|
color?: string;
|
|
14
14
|
};
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
* reason: it is the one of the three forms where we render the node. On the other two,
|
|
18
|
-
* `size` and `color` are what shapes the icon.
|
|
19
|
-
*/
|
|
20
|
-
type IconProps = ImageStyleProps & {
|
|
21
|
-
/** An icon component. `size` and `color` are injected into it. */
|
|
22
|
-
as?: ComponentType<IconComponentProps>;
|
|
23
|
-
/** A raw `react-native-svg` element, cloned with the resolved size and colour. */
|
|
24
|
-
children?: ReactNode;
|
|
25
|
-
/** An image, tinted with the resolved colour. */
|
|
26
|
-
source?: ImageSourcePropType;
|
|
15
|
+
/** What every form takes, and the only lever the two non-rendering ones have. */
|
|
16
|
+
type IconBase = {
|
|
27
17
|
/** Overrides what the surrounding slot asked for. */
|
|
28
18
|
size?: number;
|
|
29
19
|
/** A raw value (R7), never a token. Overrides the slot's. */
|
|
30
20
|
color?: string;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* An icon component — `size` and `color` are injected into it.
|
|
24
|
+
*
|
|
25
|
+
* No style props and no `style`: we do not render this node, the third party does, and
|
|
26
|
+
* there is no published interface that says it would accept either. Wrapping it in a view
|
|
27
|
+
* to make them work would add a level of depth to every icon in the library.
|
|
28
|
+
*/
|
|
29
|
+
type IconAsProps = IconBase & {
|
|
30
|
+
as: ComponentType<IconComponentProps>;
|
|
31
|
+
children?: never;
|
|
32
|
+
source?: never;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* A raw `react-native-svg` element, cloned with the resolved size and colour.
|
|
36
|
+
*
|
|
37
|
+
* No style props and no `style` either: the node is the caller's own element, and they can
|
|
38
|
+
* style it where they wrote it.
|
|
39
|
+
*/
|
|
40
|
+
type IconChildrenProps = IconBase & {
|
|
41
|
+
as?: never;
|
|
42
|
+
children: ReactNode;
|
|
43
|
+
source?: never;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* An image, tinted with the resolved colour — **the one form that carries R14**, because
|
|
47
|
+
* it is the one where we render the node.
|
|
48
|
+
*/
|
|
49
|
+
type IconSourceProps = IconBase & ImageStyleProps & {
|
|
50
|
+
as?: never;
|
|
51
|
+
children?: never;
|
|
52
|
+
source: ImageSourcePropType;
|
|
38
53
|
style?: StyleProp<ImageStyle>;
|
|
39
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* Three forms, and the type says which one you are in.
|
|
57
|
+
*
|
|
58
|
+
* The union is what makes R14's boundary checkable rather than merely documented. When
|
|
59
|
+
* every form declared the style props, `<Icon as={Trash2} marginEnd={8} />` compiled and
|
|
60
|
+
* did nothing at all — the prop was dropped on the two forms that do not render the node,
|
|
61
|
+
* silently, and only a comment said so. Now it is a compile error that points at `size`
|
|
62
|
+
* and `color`, which are the levers those forms actually have.
|
|
63
|
+
*
|
|
64
|
+
* It also makes the three mutually exclusive, which they always were at runtime: `as`
|
|
65
|
+
* wins over children, and children over `source`.
|
|
66
|
+
*/
|
|
67
|
+
type IconProps = IconAsProps | IconChildrenProps | IconSourceProps;
|
|
40
68
|
/** What a component root publishes so the icons inside it need no props at all. */
|
|
41
69
|
type IconContextValue = {
|
|
42
70
|
size?: number;
|
package/dist/system/index.cjs
CHANGED
|
@@ -27,7 +27,7 @@ var _chunkM2VYRHVScjs = require('../chunk-M2VYRHVS.cjs');
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _chunkP5MKOLIWcjs = require('../chunk-P5MKOLIW.cjs');
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
@@ -72,4 +72,4 @@ require('../chunk-6N5JXRUZ.cjs');
|
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
exports.FEEDBACK_OVERLAY =
|
|
75
|
+
exports.FEEDBACK_OVERLAY = _chunkP5MKOLIWcjs.FEEDBACK_OVERLAY; exports.HIGHLIGHT_DURATION = _chunkP5MKOLIWcjs.HIGHLIGHT_DURATION; exports.HIGHLIGHT_OPACITY = _chunkP5MKOLIWcjs.HIGHLIGHT_OPACITY; exports.Icon = _chunkP5MKOLIWcjs.Icon; exports.IconContext = _chunkP5MKOLIWcjs.IconContext; exports.PRESS_DURATION = _chunkP5MKOLIWcjs.PRESS_DURATION; exports.PRESS_SCALE = _chunkP5MKOLIWcjs.PRESS_SCALE; exports.Portal = _chunkM2VYRHVScjs.Portal; exports.PortalContext = _chunkM2VYRHVScjs.PortalContext; exports.PortalHost = _chunkM2VYRHVScjs.PortalHost; exports.PressableFeedback = _chunkP5MKOLIWcjs.PressableFeedback; exports.RIPPLE_CONFIRM_DURATION = _chunkP5MKOLIWcjs.RIPPLE_CONFIRM_DURATION; exports.RIPPLE_EXPAND_DURATION = _chunkP5MKOLIWcjs.RIPPLE_EXPAND_DURATION; exports.RIPPLE_FADE_IN = _chunkP5MKOLIWcjs.RIPPLE_FADE_IN; exports.RIPPLE_FADE_OUT = _chunkP5MKOLIWcjs.RIPPLE_FADE_OUT; exports.RIPPLE_FADE_OUT_DELAY = _chunkP5MKOLIWcjs.RIPPLE_FADE_OUT_DELAY; exports.RIPPLE_OPACITY = _chunkP5MKOLIWcjs.RIPPLE_OPACITY; exports.RIPPLE_START_SCALE = _chunkP5MKOLIWcjs.RIPPLE_START_SCALE; exports.SCALE_REFERENCE_WIDTH = _chunkP5MKOLIWcjs.SCALE_REFERENCE_WIDTH; exports.Slot = _chunk5SU7FXWHcjs.Slot; exports.childrenToString = _chunk5SU7FXWHcjs.childrenToString; exports.createRecipe = _chunk5SU7FXWHcjs.createRecipe; exports.createSlotContext = _chunk5SU7FXWHcjs.createSlotContext; exports.markOverlay = _chunkP5MKOLIWcjs.markOverlay; exports.mergeProps = _chunk5SU7FXWHcjs.mergeProps; exports.mergeRefs = _chunk5SU7FXWHcjs.mergeRefs; exports.pressScaleFor = _chunkP5MKOLIWcjs.pressScaleFor; exports.resolveAnimation = _chunkP5MKOLIWcjs.resolveAnimation; exports.resolveSlotAnimation = _chunkP5MKOLIWcjs.resolveSlotAnimation; exports.rippleRadiusFor = _chunkP5MKOLIWcjs.rippleRadiusFor; exports.useFeedback = _chunkP5MKOLIWcjs.useFeedback; exports.useIconContext = _chunkP5MKOLIWcjs.useIconContext; exports.useStyleProps = _chunk5SU7FXWHcjs.useStyleProps;
|
package/dist/system/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, Provider, Ref, RefCallback } from 'react';
|
|
3
|
-
import { b as IconProps, a as IconContextValue, S as SlotAnimation, F as FeedbackContext, c as AnimationProp, d as ResolvedAnimation } from '../pressable-feedback.type-
|
|
4
|
-
export { A as AnimationConfig, I as IconComponentProps, P as PressableFeedbackProps, R as RadiusStyle, e as RippleWave } from '../pressable-feedback.type-
|
|
3
|
+
import { b as IconProps, a as IconContextValue, S as SlotAnimation, F as FeedbackContext, c as AnimationProp, d as ResolvedAnimation } from '../pressable-feedback.type-lgW5wQx5.cjs';
|
|
4
|
+
export { A as AnimationConfig, I as IconComponentProps, P as PressableFeedbackProps, R as RadiusStyle, e as RippleWave } from '../pressable-feedback.type-lgW5wQx5.cjs';
|
|
5
5
|
import { V as ViewStyleProps } from '../create-recipe-3_ElpCYt.cjs';
|
|
6
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';
|
|
7
7
|
import * as react_native from 'react-native';
|
|
@@ -55,8 +55,12 @@ declare function useStyleProps<P extends object>(props: P): [StylePropsOf<P>, Re
|
|
|
55
55
|
* Three accepted forms — a component through `as`, a raw SVG as children, or an image
|
|
56
56
|
* through `source` — and the resolution is the same for all three: an explicit prop, else
|
|
57
57
|
* what the surrounding slot published, else the theme.
|
|
58
|
+
*
|
|
59
|
+
* The props are taken whole rather than destructured, because they are a union: which
|
|
60
|
+
* keys exist depends on the form, and narrowing is what lets `style` be reachable in the
|
|
61
|
+
* one branch that renders a node and unwritable in the two that do not.
|
|
58
62
|
*/
|
|
59
|
-
declare function Icon(
|
|
63
|
+
declare function Icon(props: IconProps): react.JSX.Element;
|
|
60
64
|
declare namespace Icon {
|
|
61
65
|
var displayName: string;
|
|
62
66
|
}
|
|
@@ -378,7 +382,7 @@ declare function resolveSlotAnimation(override: SlotAnimation | undefined, enabl
|
|
|
378
382
|
* off — and it is the only shape that survives `asChild`, where the caller's own element
|
|
379
383
|
* is the pressable and there is no sibling for the primitive to inject.
|
|
380
384
|
*/
|
|
381
|
-
declare const PressableFeedback: react.ForwardRefExoticComponent<Omit<react_native.PressableProps, "
|
|
385
|
+
declare const PressableFeedback: react.ForwardRefExoticComponent<Omit<react_native.PressableProps, "style" | "children" | "disabled"> & ViewStyleProps & {
|
|
382
386
|
isPressed?: boolean;
|
|
383
387
|
isDisabled?: boolean;
|
|
384
388
|
asChild?: boolean;
|
package/dist/system/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, Provider, Ref, RefCallback } from 'react';
|
|
3
|
-
import { b as IconProps, a as IconContextValue, S as SlotAnimation, F as FeedbackContext, c as AnimationProp, d as ResolvedAnimation } from '../pressable-feedback.type-
|
|
4
|
-
export { A as AnimationConfig, I as IconComponentProps, P as PressableFeedbackProps, R as RadiusStyle, e as RippleWave } from '../pressable-feedback.type-
|
|
3
|
+
import { b as IconProps, a as IconContextValue, S as SlotAnimation, F as FeedbackContext, c as AnimationProp, d as ResolvedAnimation } from '../pressable-feedback.type-UwqIG6ES.js';
|
|
4
|
+
export { A as AnimationConfig, I as IconComponentProps, P as PressableFeedbackProps, R as RadiusStyle, e as RippleWave } from '../pressable-feedback.type-UwqIG6ES.js';
|
|
5
5
|
import { V as ViewStyleProps } from '../create-recipe-DImq1AZA.js';
|
|
6
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';
|
|
7
7
|
import * as react_native from 'react-native';
|
|
@@ -55,8 +55,12 @@ declare function useStyleProps<P extends object>(props: P): [StylePropsOf<P>, Re
|
|
|
55
55
|
* Three accepted forms — a component through `as`, a raw SVG as children, or an image
|
|
56
56
|
* through `source` — and the resolution is the same for all three: an explicit prop, else
|
|
57
57
|
* what the surrounding slot published, else the theme.
|
|
58
|
+
*
|
|
59
|
+
* The props are taken whole rather than destructured, because they are a union: which
|
|
60
|
+
* keys exist depends on the form, and narrowing is what lets `style` be reachable in the
|
|
61
|
+
* one branch that renders a node and unwritable in the two that do not.
|
|
58
62
|
*/
|
|
59
|
-
declare function Icon(
|
|
63
|
+
declare function Icon(props: IconProps): react.JSX.Element;
|
|
60
64
|
declare namespace Icon {
|
|
61
65
|
var displayName: string;
|
|
62
66
|
}
|
|
@@ -378,7 +382,7 @@ declare function resolveSlotAnimation(override: SlotAnimation | undefined, enabl
|
|
|
378
382
|
* off — and it is the only shape that survives `asChild`, where the caller's own element
|
|
379
383
|
* is the pressable and there is no sibling for the primitive to inject.
|
|
380
384
|
*/
|
|
381
|
-
declare const PressableFeedback: react.ForwardRefExoticComponent<Omit<react_native.PressableProps, "
|
|
385
|
+
declare const PressableFeedback: react.ForwardRefExoticComponent<Omit<react_native.PressableProps, "style" | "children" | "disabled"> & ViewStyleProps & {
|
|
382
386
|
isPressed?: boolean;
|
|
383
387
|
isDisabled?: boolean;
|
|
384
388
|
asChild?: boolean;
|
package/dist/system/index.js
CHANGED