@xaui/native 0.9.1-alpha.3 → 0.9.1-alpha.30
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-27ZRTZEE.js +293 -0
- package/dist/chunk-3FV4COTM.js +68 -0
- package/dist/chunk-423RQBOX.js +21 -0
- package/dist/chunk-4GTAZM2C.js +174 -0
- package/dist/chunk-4XPLPQLM.cjs +147 -0
- package/dist/{chunk-3QBT3Q65.cjs → chunk-57SJ4LJF.cjs} +7 -2
- package/dist/chunk-5GO7MAVY.cjs +74 -0
- package/dist/chunk-5RQ7AZPN.cjs +455 -0
- package/dist/chunk-5Z4P6WHR.cjs +525 -0
- package/dist/chunk-6RVCGLKZ.js +661 -0
- package/dist/chunk-7DPL3ZDS.cjs +21 -0
- package/dist/chunk-7EIHHOHP.cjs +42 -0
- package/dist/chunk-7SEZGVTY.js +62 -0
- package/dist/chunk-7XKQJQF2.cjs +70 -0
- package/dist/{chunk-X2K2FX3W.js → chunk-A3EGFI6T.js} +6 -1
- package/dist/chunk-A5OCK3C2.js +525 -0
- package/dist/chunk-BA2DBSAN.js +102 -0
- package/dist/chunk-BFMTUMTU.js +669 -0
- package/dist/chunk-BVJQ3UPZ.js +62 -0
- package/dist/chunk-DFME724B.js +147 -0
- package/dist/chunk-E2CWBQTV.js +119 -0
- package/dist/chunk-E4TS6632.cjs +314 -0
- package/dist/chunk-EGLLDKN6.js +9 -0
- package/dist/chunk-EJQCQPET.cjs +9 -0
- package/dist/chunk-F6CQ6CBI.cjs +112 -0
- package/dist/chunk-F6W3JQ7K.js +42 -0
- package/dist/chunk-FMZQW35T.js +431 -0
- package/dist/chunk-FNEUOBCV.cjs +174 -0
- package/dist/chunk-G7K652GC.js +145 -0
- package/dist/chunk-GGW42MY4.js +20 -0
- package/dist/chunk-GI24YJPE.js +314 -0
- package/dist/chunk-GLGU2WFL.cjs +190 -0
- package/dist/chunk-GPVNCJ3Z.cjs +696 -0
- package/dist/chunk-GVQOD3VW.js +74 -0
- package/dist/chunk-KOC3KQIT.js +124 -0
- package/dist/chunk-KPWZLUES.cjs +124 -0
- package/dist/chunk-KWCHSIMI.cjs +293 -0
- package/dist/chunk-MC7SY2QH.cjs +20 -0
- package/dist/chunk-N527BTY4.cjs +366 -0
- package/dist/chunk-NBFWWQFW.cjs +346 -0
- package/dist/chunk-NYRXUGVL.js +104 -0
- package/dist/{chunk-AW63PTQ4.cjs → chunk-OHEHPQLC.cjs} +72 -72
- package/dist/chunk-Q3WFY5N3.js +366 -0
- package/dist/chunk-QGN2BBJO.cjs +104 -0
- package/dist/chunk-TGZZ3RZU.cjs +86 -0
- package/dist/{chunk-2KXQATVL.js → chunk-TZG3DERP.js} +46 -46
- package/dist/chunk-UBQLKIZC.cjs +431 -0
- package/dist/chunk-URSKA2VR.js +190 -0
- package/dist/chunk-V4WDMM6Z.js +86 -0
- package/dist/chunk-VJEER76X.js +455 -0
- package/dist/chunk-VZBWYWEI.cjs +736 -0
- package/dist/chunk-WR7YLDVV.cjs +68 -0
- package/dist/chunk-X4HQ4H2V.js +701 -0
- package/dist/chunk-XFSW3ZNI.cjs +145 -0
- package/dist/chunk-XQFAUDR2.cjs +62 -0
- package/dist/chunk-YKL6XHM6.js +346 -0
- package/dist/chunk-ZP2E2H2G.cjs +119 -0
- package/dist/chunk-ZSLNGBDS.cjs +700 -0
- package/dist/close-button.type-BUYuoSt2.d.ts +36 -0
- package/dist/close-button.type-CHsgZ3wO.d.cts +36 -0
- package/dist/components/alert/index.cjs +20 -0
- package/dist/components/alert/index.d.cts +169 -0
- package/dist/components/alert/index.d.ts +169 -0
- package/dist/components/alert/index.js +20 -0
- package/dist/components/button/index.cjs +21 -0
- package/dist/components/button/index.d.cts +613 -0
- package/dist/components/button/index.d.ts +613 -0
- package/dist/components/button/index.js +21 -0
- package/dist/components/card/index.cjs +22 -0
- package/dist/components/card/index.d.cts +620 -0
- package/dist/components/card/index.d.ts +620 -0
- package/dist/components/card/index.js +22 -0
- package/dist/components/checkbox/index.cjs +26 -0
- package/dist/components/checkbox/index.d.cts +1136 -0
- package/dist/components/checkbox/index.d.ts +1136 -0
- package/dist/components/checkbox/index.js +26 -0
- package/dist/components/chip/index.cjs +20 -0
- package/dist/components/chip/index.d.cts +608 -0
- package/dist/components/chip/index.d.ts +608 -0
- package/dist/components/chip/index.js +20 -0
- package/dist/components/input/index.cjs +25 -0
- package/dist/components/input/index.d.cts +205 -0
- package/dist/components/input/index.d.ts +205 -0
- package/dist/components/input/index.js +25 -0
- package/dist/components/input-group/index.cjs +27 -0
- package/dist/components/input-group/index.d.cts +270 -0
- package/dist/components/input-group/index.d.ts +270 -0
- package/dist/components/input-group/index.js +27 -0
- package/dist/components/input-otp/index.cjs +29 -0
- package/dist/components/input-otp/index.d.cts +325 -0
- package/dist/components/input-otp/index.d.ts +325 -0
- package/dist/components/input-otp/index.js +29 -0
- package/dist/components/radio/index.cjs +26 -0
- package/dist/components/radio/index.d.cts +1102 -0
- package/dist/components/radio/index.d.ts +1102 -0
- package/dist/components/radio/index.js +26 -0
- package/dist/components/spinner/index.cjs +16 -0
- package/dist/components/spinner/index.d.cts +104 -0
- package/dist/components/spinner/index.d.ts +104 -0
- package/dist/components/spinner/index.js +16 -0
- package/dist/components/switch/index.cjs +27 -0
- package/dist/components/switch/index.d.cts +1154 -0
- package/dist/components/switch/index.d.ts +1154 -0
- package/dist/components/switch/index.js +27 -0
- package/dist/components/text-area/index.cjs +14 -0
- package/dist/components/text-area/index.d.cts +73 -0
- package/dist/components/text-area/index.d.ts +73 -0
- package/dist/components/text-area/index.js +14 -0
- package/dist/components/typography/index.cjs +15 -0
- package/dist/components/typography/index.d.cts +116 -0
- package/dist/components/typography/index.d.ts +116 -0
- package/dist/components/typography/index.js +15 -0
- package/dist/components/view/index.cjs +17 -0
- package/dist/components/view/index.d.cts +152 -0
- package/dist/components/view/index.d.ts +152 -0
- package/dist/components/view/index.js +17 -0
- package/dist/create-recipe-BdVd2ffi.d.ts +114 -0
- package/dist/create-recipe-dC7wMfnj.d.cts +114 -0
- package/dist/icon.type-Kml72iSz.d.ts +73 -0
- package/dist/icon.type-d_i9ma-i.d.cts +73 -0
- package/dist/index.cjs +246 -4
- package/dist/index.d.cts +109 -4
- package/dist/index.d.ts +109 -4
- package/dist/index.js +266 -24
- package/dist/input.type-BUMDlzL9.d.cts +167 -0
- package/dist/input.type-D2qgi03E.d.ts +167 -0
- package/dist/pressable-feedback.type-BA2C9sSz.d.cts +127 -0
- package/dist/pressable-feedback.type-Bs4dQlGj.d.ts +127 -0
- package/dist/style-props.type-CfnoGEP7.d.cts +31 -0
- package/dist/style-props.type-CfnoGEP7.d.ts +31 -0
- package/dist/system/index.cjs +60 -3
- package/dist/system/index.d.cts +347 -181
- package/dist/system/index.d.ts +347 -181
- package/dist/system/index.js +71 -14
- package/dist/theme/index.cjs +4 -3
- package/dist/theme/index.d.cts +34 -23
- package/dist/theme/index.d.ts +34 -23
- package/dist/theme/index.js +3 -2
- 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 +174 -18
- package/dist/chunk-QAMNNTGM.js +0 -637
- package/dist/chunk-V63JO65F.cjs +0 -637
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
import { ImageSourcePropType, StyleProp, ImageStyle } from 'react-native';
|
|
3
|
+
import { I as ImageStyleProps } from './style-props.type-CfnoGEP7.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The props Lucide, Ionicons and `react-native-vector-icons` all accept — the shape
|
|
7
|
+
* `as` is handed. It is a convention rather than an interface anyone published, which is
|
|
8
|
+
* exactly why `Icon` exists: without it every call site computes the two values by hand.
|
|
9
|
+
*/
|
|
10
|
+
type IconComponentProps = {
|
|
11
|
+
size?: number;
|
|
12
|
+
color?: string;
|
|
13
|
+
};
|
|
14
|
+
/** What every form takes, and the only lever the two non-rendering ones have. */
|
|
15
|
+
type IconBase = {
|
|
16
|
+
/** Overrides what the surrounding slot asked for. */
|
|
17
|
+
size?: number;
|
|
18
|
+
/** A raw value (R7), never a token. Overrides the slot's. */
|
|
19
|
+
color?: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* An icon component — `size` and `color` are injected into it.
|
|
23
|
+
*
|
|
24
|
+
* No style props and no `style`: we do not render this node, the third party does, and
|
|
25
|
+
* there is no published interface that says it would accept either. Wrapping it in a view
|
|
26
|
+
* to make them work would add a level of depth to every icon in the library.
|
|
27
|
+
*/
|
|
28
|
+
type IconAsProps = IconBase & {
|
|
29
|
+
as: ComponentType<IconComponentProps>;
|
|
30
|
+
children?: never;
|
|
31
|
+
source?: never;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* A raw `react-native-svg` element, cloned with the resolved size and colour.
|
|
35
|
+
*
|
|
36
|
+
* No style props and no `style` either: the node is the caller's own element, and they can
|
|
37
|
+
* style it where they wrote it.
|
|
38
|
+
*/
|
|
39
|
+
type IconChildrenProps = IconBase & {
|
|
40
|
+
as?: never;
|
|
41
|
+
children: ReactNode;
|
|
42
|
+
source?: never;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* An image, tinted with the resolved colour — **the one form that carries R14**, because
|
|
46
|
+
* it is the one where we render the node.
|
|
47
|
+
*/
|
|
48
|
+
type IconSourceProps = IconBase & ImageStyleProps & {
|
|
49
|
+
as?: never;
|
|
50
|
+
children?: never;
|
|
51
|
+
source: ImageSourcePropType;
|
|
52
|
+
style?: StyleProp<ImageStyle>;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Three forms, and the type says which one you are in.
|
|
56
|
+
*
|
|
57
|
+
* The union is what makes R14's boundary checkable rather than merely documented. When
|
|
58
|
+
* every form declared the style props, `<Icon as={Trash2} marginEnd={8} />` compiled and
|
|
59
|
+
* did nothing at all — the prop was dropped on the two forms that do not render the node,
|
|
60
|
+
* silently, and only a comment said so. Now it is a compile error that points at `size`
|
|
61
|
+
* and `color`, which are the levers those forms actually have.
|
|
62
|
+
*
|
|
63
|
+
* It also makes the three mutually exclusive, which they always were at runtime: `as`
|
|
64
|
+
* wins over children, and children over `source`.
|
|
65
|
+
*/
|
|
66
|
+
type IconProps = IconAsProps | IconChildrenProps | IconSourceProps;
|
|
67
|
+
/** What a component root publishes so the icons inside it need no props at all. */
|
|
68
|
+
type IconContextValue = {
|
|
69
|
+
size?: number;
|
|
70
|
+
color?: string;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export type { IconContextValue as I, IconProps as a, IconComponentProps as b };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
import { ImageSourcePropType, StyleProp, ImageStyle } from 'react-native';
|
|
3
|
+
import { I as ImageStyleProps } from './style-props.type-CfnoGEP7.cjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The props Lucide, Ionicons and `react-native-vector-icons` all accept — the shape
|
|
7
|
+
* `as` is handed. It is a convention rather than an interface anyone published, which is
|
|
8
|
+
* exactly why `Icon` exists: without it every call site computes the two values by hand.
|
|
9
|
+
*/
|
|
10
|
+
type IconComponentProps = {
|
|
11
|
+
size?: number;
|
|
12
|
+
color?: string;
|
|
13
|
+
};
|
|
14
|
+
/** What every form takes, and the only lever the two non-rendering ones have. */
|
|
15
|
+
type IconBase = {
|
|
16
|
+
/** Overrides what the surrounding slot asked for. */
|
|
17
|
+
size?: number;
|
|
18
|
+
/** A raw value (R7), never a token. Overrides the slot's. */
|
|
19
|
+
color?: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* An icon component — `size` and `color` are injected into it.
|
|
23
|
+
*
|
|
24
|
+
* No style props and no `style`: we do not render this node, the third party does, and
|
|
25
|
+
* there is no published interface that says it would accept either. Wrapping it in a view
|
|
26
|
+
* to make them work would add a level of depth to every icon in the library.
|
|
27
|
+
*/
|
|
28
|
+
type IconAsProps = IconBase & {
|
|
29
|
+
as: ComponentType<IconComponentProps>;
|
|
30
|
+
children?: never;
|
|
31
|
+
source?: never;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* A raw `react-native-svg` element, cloned with the resolved size and colour.
|
|
35
|
+
*
|
|
36
|
+
* No style props and no `style` either: the node is the caller's own element, and they can
|
|
37
|
+
* style it where they wrote it.
|
|
38
|
+
*/
|
|
39
|
+
type IconChildrenProps = IconBase & {
|
|
40
|
+
as?: never;
|
|
41
|
+
children: ReactNode;
|
|
42
|
+
source?: never;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* An image, tinted with the resolved colour — **the one form that carries R14**, because
|
|
46
|
+
* it is the one where we render the node.
|
|
47
|
+
*/
|
|
48
|
+
type IconSourceProps = IconBase & ImageStyleProps & {
|
|
49
|
+
as?: never;
|
|
50
|
+
children?: never;
|
|
51
|
+
source: ImageSourcePropType;
|
|
52
|
+
style?: StyleProp<ImageStyle>;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Three forms, and the type says which one you are in.
|
|
56
|
+
*
|
|
57
|
+
* The union is what makes R14's boundary checkable rather than merely documented. When
|
|
58
|
+
* every form declared the style props, `<Icon as={Trash2} marginEnd={8} />` compiled and
|
|
59
|
+
* did nothing at all — the prop was dropped on the two forms that do not render the node,
|
|
60
|
+
* silently, and only a comment said so. Now it is a compile error that points at `size`
|
|
61
|
+
* and `color`, which are the levers those forms actually have.
|
|
62
|
+
*
|
|
63
|
+
* It also makes the three mutually exclusive, which they always were at runtime: `as`
|
|
64
|
+
* wins over children, and children over `source`.
|
|
65
|
+
*/
|
|
66
|
+
type IconProps = IconAsProps | IconChildrenProps | IconSourceProps;
|
|
67
|
+
/** What a component root publishes so the icons inside it need no props at all. */
|
|
68
|
+
type IconContextValue = {
|
|
69
|
+
size?: number;
|
|
70
|
+
color?: string;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export type { IconContextValue as I, IconProps as a, IconComponentProps as b };
|
package/dist/index.cjs
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
var _chunkOHEHPQLCcjs = require('./chunk-OHEHPQLC.cjs');
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
|
|
@@ -16,10 +17,11 @@
|
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
|
|
19
|
-
var
|
|
20
|
+
var _chunkKWCHSIMIcjs = require('./chunk-KWCHSIMI.cjs');
|
|
20
21
|
|
|
21
22
|
|
|
22
23
|
|
|
24
|
+
var _chunkKPWZLUEScjs = require('./chunk-KPWZLUES.cjs');
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
|
|
@@ -28,45 +30,285 @@ var _chunkV63JO65Fcjs = require('./chunk-V63JO65F.cjs');
|
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
|
|
31
|
-
var
|
|
33
|
+
var _chunkZSLNGBDScjs = require('./chunk-ZSLNGBDS.cjs');
|
|
32
34
|
|
|
33
35
|
|
|
34
36
|
|
|
37
|
+
var _chunk5GO7MAVYcjs = require('./chunk-5GO7MAVY.cjs');
|
|
35
38
|
|
|
36
39
|
|
|
37
40
|
|
|
38
|
-
var _chunk3QBT3Q65cjs = require('./chunk-3QBT3Q65.cjs');
|
|
39
41
|
|
|
42
|
+
var _chunkQGN2BBJOcjs = require('./chunk-QGN2BBJO.cjs');
|
|
40
43
|
|
|
41
44
|
|
|
42
45
|
|
|
43
46
|
|
|
44
47
|
|
|
45
48
|
|
|
49
|
+
var _chunkXFSW3ZNIcjs = require('./chunk-XFSW3ZNI.cjs');
|
|
46
50
|
|
|
47
51
|
|
|
48
52
|
|
|
49
53
|
|
|
54
|
+
var _chunkXQFAUDR2cjs = require('./chunk-XQFAUDR2.cjs');
|
|
50
55
|
|
|
51
56
|
|
|
52
57
|
|
|
53
58
|
|
|
59
|
+
var _chunkN527BTY4cjs = require('./chunk-N527BTY4.cjs');
|
|
54
60
|
|
|
55
61
|
|
|
56
62
|
|
|
57
63
|
|
|
64
|
+
var _chunkE4TS6632cjs = require('./chunk-E4TS6632.cjs');
|
|
58
65
|
|
|
59
66
|
|
|
60
67
|
|
|
61
68
|
|
|
62
69
|
|
|
70
|
+
var _chunk7XKQJQF2cjs = require('./chunk-7XKQJQF2.cjs');
|
|
63
71
|
|
|
64
72
|
|
|
65
73
|
|
|
66
74
|
|
|
67
75
|
|
|
68
76
|
|
|
77
|
+
var _chunk5RQ7AZPNcjs = require('./chunk-5RQ7AZPN.cjs');
|
|
69
78
|
|
|
70
79
|
|
|
71
80
|
|
|
72
|
-
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
var _chunkNBFWWQFWcjs = require('./chunk-NBFWWQFW.cjs');
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
var _chunkF6CQ6CBIcjs = require('./chunk-F6CQ6CBI.cjs');
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
var _chunkUBQLKIZCcjs = require('./chunk-UBQLKIZC.cjs');
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
var _chunkTGZZ3RZUcjs = require('./chunk-TGZZ3RZU.cjs');
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
var _chunkGPVNCJ3Zcjs = require('./chunk-GPVNCJ3Z.cjs');
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
var _chunk7DPL3ZDScjs = require('./chunk-7DPL3ZDS.cjs');
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
var _chunk4XPLPQLMcjs = require('./chunk-4XPLPQLM.cjs');
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
var _chunk5Z4P6WHRcjs = require('./chunk-5Z4P6WHR.cjs');
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
var _chunkWR7YLDVVcjs = require('./chunk-WR7YLDVV.cjs');
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
var _chunkVZBWYWEIcjs = require('./chunk-VZBWYWEI.cjs');
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
var _chunk7EIHHOHPcjs = require('./chunk-7EIHHOHP.cjs');
|
|
162
|
+
require('./chunk-EJQCQPET.cjs');
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
var _chunkFNEUOBCVcjs = require('./chunk-FNEUOBCV.cjs');
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
var _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
var _chunkZP2E2H2Gcjs = require('./chunk-ZP2E2H2G.cjs');
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
var _chunkGLGU2WFLcjs = require('./chunk-GLGU2WFL.cjs');
|
|
184
|
+
require('./chunk-MC7SY2QH.cjs');
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
exports.Alert = _chunkN527BTY4cjs.Alert; exports.Button = _chunkE4TS6632cjs.Button; exports.CARD_BACKGROUND = _chunk5RQ7AZPNcjs.CARD_BACKGROUND; exports.Card = _chunk5RQ7AZPNcjs.Card; exports.Checkbox = _chunkNBFWWQFWcjs.Checkbox; exports.CheckboxIndicator = _chunkNBFWWQFWcjs.CheckboxIndicator; exports.CheckboxLabel = _chunkNBFWWQFWcjs.CheckboxLabel; exports.CheckboxRoot = _chunkNBFWWQFWcjs.CheckboxRoot; exports.Chip = _chunkUBQLKIZCcjs.Chip; exports.CloseButton = _chunkTGZZ3RZUcjs.CloseButton; exports.Column = _chunkXFSW3ZNIcjs.Column; exports.FEEDBACK_OVERLAY = _chunkGPVNCJ3Zcjs.FEEDBACK_OVERLAY; exports.Grid = _chunkXFSW3ZNIcjs.Grid; exports.HIGHLIGHT_DURATION = _chunkGPVNCJ3Zcjs.HIGHLIGHT_DURATION; exports.HIGHLIGHT_OPACITY = _chunkGPVNCJ3Zcjs.HIGHLIGHT_OPACITY; exports.Icon = _chunkWR7YLDVVcjs.Icon; exports.IconContext = _chunkWR7YLDVVcjs.IconContext; exports.Input = _chunk5Z4P6WHRcjs.Input; exports.InputDescription = _chunk5Z4P6WHRcjs.InputDescription; exports.InputError = _chunk5Z4P6WHRcjs.InputError; exports.InputField = _chunk5Z4P6WHRcjs.InputField; exports.InputGroup = _chunk4XPLPQLMcjs.InputGroup; exports.InputGroupField = _chunk4XPLPQLMcjs.InputGroupField; exports.InputGroupIcon = _chunk4XPLPQLMcjs.InputGroupIcon; exports.InputGroupPrefix = _chunk4XPLPQLMcjs.InputGroupPrefix; exports.InputGroupRoot = _chunk4XPLPQLMcjs.InputGroupRoot; exports.InputGroupSuffix = _chunk4XPLPQLMcjs.InputGroupSuffix; exports.InputLabel = _chunk5Z4P6WHRcjs.InputLabel; exports.InputOTP = _chunkVZBWYWEIcjs.InputOTP; exports.InputRoot = _chunk5Z4P6WHRcjs.InputRoot; exports.OTP_ALPHANUMERIC = _chunkVZBWYWEIcjs.OTP_ALPHANUMERIC; exports.OTP_DIGITS = _chunkVZBWYWEIcjs.OTP_DIGITS; exports.OTP_LETTERS = _chunkVZBWYWEIcjs.OTP_LETTERS; exports.PRESS_DURATION = _chunkGPVNCJ3Zcjs.PRESS_DURATION; exports.PRESS_SCALE = _chunkGPVNCJ3Zcjs.PRESS_SCALE; exports.Portal = _chunkXQFAUDR2cjs.Portal; exports.PortalContext = _chunkXQFAUDR2cjs.PortalContext; exports.PortalHost = _chunkXQFAUDR2cjs.PortalHost; exports.PressableFeedback = _chunkGPVNCJ3Zcjs.PressableFeedback; exports.RIPPLE_CONFIRM_DURATION = _chunkGPVNCJ3Zcjs.RIPPLE_CONFIRM_DURATION; exports.RIPPLE_EXPAND_DURATION = _chunkGPVNCJ3Zcjs.RIPPLE_EXPAND_DURATION; exports.RIPPLE_FADE_IN = _chunkGPVNCJ3Zcjs.RIPPLE_FADE_IN; exports.RIPPLE_FADE_OUT = _chunkGPVNCJ3Zcjs.RIPPLE_FADE_OUT; exports.RIPPLE_FADE_OUT_DELAY = _chunkGPVNCJ3Zcjs.RIPPLE_FADE_OUT_DELAY; exports.RIPPLE_OPACITY = _chunkGPVNCJ3Zcjs.RIPPLE_OPACITY; exports.RIPPLE_START_SCALE = _chunkGPVNCJ3Zcjs.RIPPLE_START_SCALE; exports.ROTATION_DURATION = _chunk7XKQJQF2cjs.ROTATION_DURATION; exports.Radio = _chunkKWCHSIMIcjs.Radio; exports.RadioIndicator = _chunkKWCHSIMIcjs.RadioIndicator; exports.RadioLabel = _chunkKWCHSIMIcjs.RadioLabel; exports.RadioRoot = _chunkKWCHSIMIcjs.RadioRoot; exports.Row = _chunkXFSW3ZNIcjs.Row; exports.SCALE_REFERENCE_WIDTH = _chunkGPVNCJ3Zcjs.SCALE_REFERENCE_WIDTH; exports.SelectionFill = _chunkF6CQ6CBIcjs.SelectionFill; exports.Slot = _chunkZP2E2H2Gcjs.Slot; exports.Spinner = _chunkKPWZLUEScjs.Spinner; exports.Stack = _chunkXFSW3ZNIcjs.Stack; exports.Switch = _chunkZSLNGBDScjs.Switch; exports.SwitchLabel = _chunkZSLNGBDScjs.SwitchLabel; exports.SwitchRoot = _chunkZSLNGBDScjs.SwitchRoot; exports.SwitchThumb = _chunkZSLNGBDScjs.SwitchThumb; exports.SwitchTrack = _chunkZSLNGBDScjs.SwitchTrack; exports.TextArea = _chunk5GO7MAVYcjs.TextArea; exports.TextSpan = _chunkQGN2BBJOcjs.TextSpan; exports.ThemeContext = _chunk57SJ4LJFcjs.ThemeContext; exports.Typography = _chunkQGN2BBJOcjs.Typography; exports.XAUIProvider = _chunkOHEHPQLCcjs.XAUIProvider; exports.alertRecipe = _chunkN527BTY4cjs.alertRecipe; exports.buildRadius = _chunkOHEHPQLCcjs.buildRadius; exports.buildShadows = _chunkOHEHPQLCcjs.buildShadows; exports.buildSlots = _chunkVZBWYWEIcjs.buildSlots; exports.buttonRecipe = _chunkE4TS6632cjs.buttonRecipe; exports.cardRecipe = _chunk5RQ7AZPNcjs.cardRecipe; exports.checkboxRecipe = _chunkNBFWWQFWcjs.checkboxRecipe; exports.childrenToString = _chunkZP2E2H2Gcjs.childrenToString; exports.chipRecipe = _chunkUBQLKIZCcjs.chipRecipe; exports.closeButtonBase = _chunkTGZZ3RZUcjs.closeButtonBase; exports.createRecipe = _chunkFNEUOBCVcjs.createRecipe; exports.createSlotContext = _chunkZP2E2H2Gcjs.createSlotContext; exports.createTheme = _chunkOHEHPQLCcjs.createTheme; exports.decoratorPadding = _chunk4XPLPQLMcjs.decoratorPadding; exports.defaultTheme = _chunkOHEHPQLCcjs.defaultTheme; exports.deriveColors = _chunkOHEHPQLCcjs.deriveColors; exports.deriveTint = _chunk57SJ4LJFcjs.deriveTint; exports.extractPastedCode = _chunkVZBWYWEIcjs.extractPastedCode; exports.inputOTPRecipe = _chunkVZBWYWEIcjs.inputOTPRecipe; exports.inputRecipe = _chunk5Z4P6WHRcjs.inputRecipe; exports.markBackground = _chunk5RQ7AZPNcjs.markBackground; exports.markOverlay = _chunkGPVNCJ3Zcjs.markOverlay; exports.mergeProps = _chunkZP2E2H2Gcjs.mergeProps; exports.mergeRefs = _chunkGLGU2WFLcjs.mergeRefs; exports.palette = _chunkOHEHPQLCcjs.palette; exports.pressScaleFor = _chunkGPVNCJ3Zcjs.pressScaleFor; exports.primitives = _chunkOHEHPQLCcjs.primitives; exports.radioRecipe = _chunkKWCHSIMIcjs.radioRecipe; exports.radiusAxis = _chunkFNEUOBCVcjs.radiusAxis; exports.resolveAnimation = _chunkGPVNCJ3Zcjs.resolveAnimation; exports.resolveSlotAnimation = _chunkGPVNCJ3Zcjs.resolveSlotAnimation; exports.rippleRadiusFor = _chunkGPVNCJ3Zcjs.rippleRadiusFor; exports.sourceKeys = _chunkOHEHPQLCcjs.sourceKeys; exports.spinnerRecipe = _chunkKPWZLUEScjs.spinnerRecipe; exports.switchRecipe = _chunkZSLNGBDScjs.switchRecipe; exports.tokens = _chunkOHEHPQLCcjs.tokens; exports.typographyRecipe = _chunkQGN2BBJOcjs.typographyRecipe; exports.useAlert = _chunkN527BTY4cjs.useAlert; exports.useButton = _chunkE4TS6632cjs.useButton; exports.useCard = _chunk5RQ7AZPNcjs.useCard; exports.useCheckbox = _chunkNBFWWQFWcjs.useCheckbox; exports.useChip = _chunkUBQLKIZCcjs.useChip; exports.useColorMode = _chunk57SJ4LJFcjs.useColorMode; exports.useControllableState = _chunk7EIHHOHPcjs.useControllableState; exports.useFeedback = _chunkGPVNCJ3Zcjs.useFeedback; exports.useGrid = _chunkXFSW3ZNIcjs.useGrid; exports.useIconContext = _chunkWR7YLDVVcjs.useIconContext; exports.useInput = _chunk5Z4P6WHRcjs.useInput; exports.useInputGroup = _chunk4XPLPQLMcjs.useInputGroup; exports.useInputOTP = _chunkVZBWYWEIcjs.useInputOTP; exports.useInputOTPBox = _chunkVZBWYWEIcjs.useInputOTPBox; exports.useMergedRef = _chunk7XKQJQF2cjs.useMergedRef; exports.usePressState = _chunk7DPL3ZDScjs.usePressState; exports.usePrevious = _chunk7XKQJQF2cjs.usePrevious; exports.useRadio = _chunkKWCHSIMIcjs.useRadio; exports.useRotation = _chunk7XKQJQF2cjs.useRotation; exports.useStyleProps = _chunkGLGU2WFLcjs.useStyleProps; exports.useSwitch = _chunkZSLNGBDScjs.useSwitch; exports.useTextArea = _chunk5GO7MAVYcjs.useTextArea; exports.useThemeColor = _chunk57SJ4LJFcjs.useThemeColor; exports.useXAUITheme = _chunk57SJ4LJFcjs.useXAUITheme;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,111 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Alert, AlertCloseProps, AlertContentProps, AlertContextValue, AlertDescriptionProps, AlertIconProps, AlertProps, AlertSize, AlertSlot, AlertTitleProps, AlertVariant, alertRecipe, useAlert } from './components/alert/index.cjs';
|
|
2
|
+
export { Button, ButtonContextValue, ButtonIconProps, ButtonLabelProps, ButtonProps, ButtonSize, ButtonSlot, ButtonSpinnerProps, ButtonVariant, buttonRecipe, useButton } from './components/button/index.cjs';
|
|
3
|
+
export { CARD_BACKGROUND, Card, CardBackgroundProps, CardBodyProps, CardContextValue, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardProps, CardSize, CardSlot, CardTitleProps, CardVariant, cardRecipe, markBackground, useCard } from './components/card/index.cjs';
|
|
4
|
+
export { Checkbox, CheckboxContextValue, CheckboxIndicator, CheckboxIndicatorProps, CheckboxLabel, CheckboxLabelProps, CheckboxProps, CheckboxRoot, CheckboxSize, CheckboxSlot, CheckboxVariant, checkboxRecipe, useCheckbox } from './components/checkbox/index.cjs';
|
|
5
|
+
export { Chip, ChipAvatarProps, ChipCloseProps, ChipContextValue, ChipDotProps, ChipIconProps, ChipLabelProps, ChipProps, ChipSize, ChipSlot, ChipVariant, chipRecipe, useChip } from './components/chip/index.cjs';
|
|
6
|
+
export { Input, InputDescription, InputError, InputField, InputLabel, InputRoot, inputRecipe, useInput } from './components/input/index.cjs';
|
|
7
|
+
export { InputGroup, InputGroupContextValue, InputGroupField, InputGroupFieldProps, InputGroupIcon, InputGroupIconProps, InputGroupPrefix, InputGroupPrefixProps, InputGroupProps, InputGroupRoot, InputGroupSide, InputGroupSuffix, InputGroupSuffixProps, decoratorPadding, useInputGroup } from './components/input-group/index.cjs';
|
|
8
|
+
export { InputOTP, InputOTPBoxContextValue, InputOTPBoxProps, InputOTPCaretProps, InputOTPContextValue, InputOTPGroupProps, InputOTPHandle, InputOTPPattern, InputOTPPlaceholderProps, InputOTPProps, InputOTPRenderState, InputOTPSeparatorProps, InputOTPSize, InputOTPSlot, InputOTPValueProps, InputOTPVariant, OTPSlotState, OTP_ALPHANUMERIC, OTP_DIGITS, OTP_LETTERS, buildSlots, extractPastedCode, inputOTPRecipe, useInputOTP, useInputOTPBox } from './components/input-otp/index.cjs';
|
|
9
|
+
export { Radio, RadioContextValue, RadioIndicator, RadioIndicatorProps, RadioLabel, RadioLabelProps, RadioProps, RadioRoot, RadioSize, RadioSlot, RadioVariant, radioRecipe, useRadio } from './components/radio/index.cjs';
|
|
10
|
+
export { Spinner, SpinnerProps, SpinnerSize, SpinnerSlot, SpinnerVariant, spinnerRecipe } from './components/spinner/index.cjs';
|
|
11
|
+
export { Switch, SwitchContextValue, SwitchLabel, SwitchLabelProps, SwitchProps, SwitchRoot, SwitchSize, SwitchSlot, SwitchThumb, SwitchThumbProps, SwitchTrack, SwitchTrackProps, SwitchVariant, switchRecipe, useSwitch } from './components/switch/index.cjs';
|
|
12
|
+
export { TextArea, TextAreaContextValue, TextAreaFieldProps, TextAreaProps, useTextArea } from './components/text-area/index.cjs';
|
|
13
|
+
export { TextSpan, TextSpanProps, Typography, TypographyProps, TypographySlot, TypographyVariant, typographyRecipe } from './components/typography/index.cjs';
|
|
14
|
+
export { AxisProps, Column, ColumnProps, Grid, GridContextValue, GridItemProps, GridProps, Row, RowProps, Stack, StackItemProps, StackProps, useGrid } from './components/view/index.cjs';
|
|
15
|
+
import { RefCallback } from 'react';
|
|
16
|
+
import { PossibleRef } from './system/index.cjs';
|
|
17
|
+
export { AsChildProps, CloseButton, CloseButtonSlots, FEEDBACK_OVERLAY, HIGHLIGHT_DURATION, HIGHLIGHT_OPACITY, Icon, IconContext, MergeableProps, PRESS_DURATION, PRESS_SCALE, Portal, PortalContext, PortalHost, PortalHostProps, PortalMethods, PortalProps, PressableFeedback, PressableFeedbackHighlightProps, PressableFeedbackRippleProps, RIPPLE_CONFIRM_DURATION, RIPPLE_EXPAND_DURATION, RIPPLE_FADE_IN, RIPPLE_FADE_OUT, RIPPLE_FADE_OUT_DELAY, RIPPLE_OPACITY, RIPPLE_START_SCALE, SCALE_REFERENCE_WIDTH, SelectionFill, SelectionFillProps, Slot, SlotProps, childrenToString, closeButtonBase, createSlotContext, markOverlay, mergeProps, mergeRefs, pressScaleFor, radiusAxis, resolveAnimation, resolveSlotAnimation, rippleRadiusFor, useFeedback, useIconContext, useStyleProps } from './system/index.cjs';
|
|
18
|
+
import { GestureResponderEvent, ViewStyle } from 'react-native';
|
|
19
|
+
export { C as CloseButtonProps } from './close-button.type-CHsgZ3wO.cjs';
|
|
20
|
+
export { b as IconComponentProps, I as IconContextValue, a as IconProps } from './icon.type-d_i9ma-i.cjs';
|
|
21
|
+
export { A as Axes, C as CompoundVariant, R as Recipe, d as RecipeConfig, b as ResolveArgs, e as ResolvedSelection, f as ResolvedStyles, g as Selection, h as SlotStyle, S as SlotStyles, i as StateName, j as States, a as StyleFn, T as TintArgs, V as VariantColors, k as VariantRole, l as VariantTokens, c as createRecipe } from './create-recipe-dC7wMfnj.cjs';
|
|
22
|
+
export { D as DirectionalStyleKey, I as ImageStyleProps, S as StyleProps, T as TextStyleProps, V as ViewStyleProps } from './style-props.type-CfnoGEP7.cjs';
|
|
2
23
|
export { ColorModePreference, PaletteFamily, PaletteShade, ThemeContext, XAUIProvider, XAUIProviderProps, XAUITint, buildRadius, buildShadows, createTheme, defaultTheme, deriveColors, deriveTint, palette, primitives, sourceKeys, tokens, useColorMode, useThemeColor, useXAUITheme } from './theme/index.cjs';
|
|
3
|
-
export { C as ColorMode, F as FontSizeKey,
|
|
4
|
-
|
|
5
|
-
|
|
24
|
+
export { C as ColorMode, F as FontSizeKey, b as FontWeightKey, R as RadiusKey, S as Size, a as XAUIColors, c as XAUIDerivedColors, d as XAUIPrimitiveColors, e as XAUIRadius, f as XAUIShadow, g as XAUISourceColors, X as XAUITheme, h as XAUIThemeConfig, i as XAUIThemeSet } from './theme.type-C2gNHpEx.cjs';
|
|
25
|
+
export { b as InputContextValue, c as InputDescriptionProps, d as InputErrorProps, I as InputFieldProps, e as InputLabelPlacement, f as InputLabelProps, a as InputProps, g as InputSize, h as InputSlot, i as InputVariant } from './input.type-BUMDlzL9.cjs';
|
|
26
|
+
export { A as AnimationConfig, a as AnimationProp, F as FeedbackContext, P as PressableFeedbackProps, R as RadiusStyle, b as ResolvedAnimation, c as RippleWave, S as SlotAnimation } from './pressable-feedback.type-BA2C9sSz.cjs';
|
|
6
27
|
import 'react-native-reanimated';
|
|
28
|
+
|
|
29
|
+
type ControllableStateOptions<T> = {
|
|
30
|
+
/** Present means controlled: the caller owns the value and this never stores one. */
|
|
31
|
+
value?: T;
|
|
32
|
+
/** The starting value when uncontrolled. */
|
|
33
|
+
defaultValue: T;
|
|
34
|
+
/** Called with every new value, controlled or not. */
|
|
35
|
+
onChange?: (value: T) => void;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* One state that works both ways, so a component never has two code paths for "the
|
|
39
|
+
* caller drives this" and "we do".
|
|
40
|
+
*
|
|
41
|
+
* The setter is stable across renders and reads the current value from a ref, so a
|
|
42
|
+
* handler built on it can be passed to a memoized child without rebuilding it on every
|
|
43
|
+
* render — which is the whole reason components reach for this rather than a local
|
|
44
|
+
* `useState` plus an `if`.
|
|
45
|
+
*/
|
|
46
|
+
declare function useControllableState<T>({ value, defaultValue, onChange, }: ControllableStateOptions<T>): [T, (next: T | ((current: T) => T)) => void];
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* `mergeRefs` for a component that renders: memoized on the refs it was given, so React
|
|
50
|
+
* does not detach and reattach every one of them on each render — which it does whenever
|
|
51
|
+
* a ref callback changes identity, and which costs a node measurement every time.
|
|
52
|
+
*/
|
|
53
|
+
declare function useMergedRef<T>(...refs: Array<PossibleRef<T>>): RefCallback<T>;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* `null` as much as `undefined`: that is how `PressableProps` types its handlers, and a
|
|
57
|
+
* root forwarding what it was given should not have to launder them first.
|
|
58
|
+
*/
|
|
59
|
+
type PressHandlers = {
|
|
60
|
+
onPressIn?: PressHandler | null;
|
|
61
|
+
onPressOut?: PressHandler | null;
|
|
62
|
+
};
|
|
63
|
+
type PressHandler = (event: GestureResponderEvent) => void;
|
|
64
|
+
/**
|
|
65
|
+
* The press state a root owns, with the handlers that maintain it.
|
|
66
|
+
*
|
|
67
|
+
* It exists because every pressable component needs the same three things and gets one
|
|
68
|
+
* of them wrong on its own: the state has to be *up here* — the recipe resolves on it
|
|
69
|
+
* (R5) — the caller's handlers must be **composed, never replaced**, and the returned
|
|
70
|
+
* handlers must keep their identity so passing them down does not defeat a memo.
|
|
71
|
+
*
|
|
72
|
+
* ```tsx
|
|
73
|
+
* const [isPressed, pressHandlers] = usePressState(props)
|
|
74
|
+
* const styles = recipe.resolve({ theme, selection, states: { pressed: isPressed } })
|
|
75
|
+
* <PressableFeedback isPressed={isPressed} {...pressHandlers} />
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
declare function usePressState(handlers?: PressHandlers): [boolean, {
|
|
79
|
+
onPressIn: PressHandler;
|
|
80
|
+
onPressOut: PressHandler;
|
|
81
|
+
}];
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The value from the render before this one, `undefined` on the first.
|
|
85
|
+
*
|
|
86
|
+
* Written in an effect rather than during render on purpose: reading it mid-render would
|
|
87
|
+
* make "previous" mean something different depending on whether React re-ran the render,
|
|
88
|
+
* which under StrictMode it does.
|
|
89
|
+
*/
|
|
90
|
+
declare function usePrevious<T>(value: T): T | undefined;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* One turn. Slow enough to read as waiting, fast enough not to read as stuck — HeroUI
|
|
94
|
+
* arrives at the same figure from the other side, a 1000ms turn played at 1.1×.
|
|
95
|
+
*
|
|
96
|
+
* It is a constant rather than a parameter because the library turns at one speed: two
|
|
97
|
+
* spinners on one screen at two rates is a bug, and the only way to be sure of that is
|
|
98
|
+
* for there to be one number.
|
|
99
|
+
*/
|
|
100
|
+
declare const ROTATION_DURATION = 900;
|
|
101
|
+
/**
|
|
102
|
+
* A full turn, repeating, on the UI thread. Returns the animated style to merge onto the
|
|
103
|
+
* node that spins.
|
|
104
|
+
*
|
|
105
|
+
* **A caller that must animate nothing does not call it.** Hooks cannot be conditional,
|
|
106
|
+
* so "no animation" is only true if this one is never reached — which is why both call
|
|
107
|
+
* sites render two components rather than branch inside one.
|
|
108
|
+
*/
|
|
109
|
+
declare function useRotation(): ViewStyle;
|
|
110
|
+
|
|
111
|
+
export { type ControllableStateOptions, PossibleRef, type PressHandlers, ROTATION_DURATION, useControllableState, useMergedRef, usePressState, usePrevious, useRotation };
|