panelui-native 0.77.0 → 0.79.0
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/lib/module/components/area-chart/index.js +32 -25
- package/lib/module/components/area-chart/index.js.map +1 -1
- package/lib/module/components/bottom-sheet/index.js +97 -15
- package/lib/module/components/bottom-sheet/index.js.map +1 -1
- package/lib/module/components/funnel-chart/index.js +15 -2
- package/lib/module/components/funnel-chart/index.js.map +1 -1
- package/lib/module/components/heatmap-chart/index.js +19 -27
- package/lib/module/components/heatmap-chart/index.js.map +1 -1
- package/lib/module/components/hex-chart/index.js +2 -0
- package/lib/module/components/hex-chart/index.js.map +1 -1
- package/lib/module/components/line-chart/index.js +38 -31
- package/lib/module/components/line-chart/index.js.map +1 -1
- package/lib/module/components/map/index.js +63 -39
- package/lib/module/components/map/index.js.map +1 -1
- package/lib/module/components/map/map-children.js +54 -0
- package/lib/module/components/map/map-children.js.map +1 -0
- package/lib/module/components/map/maplibre.js +31 -3
- package/lib/module/components/map/maplibre.js.map +1 -1
- package/lib/module/components/markdown-editor/index.js +288 -34
- package/lib/module/components/markdown-editor/index.js.map +1 -1
- package/lib/module/components/markdown-editor/markdown-transforms.js +272 -9
- package/lib/module/components/markdown-editor/markdown-transforms.js.map +1 -1
- package/lib/module/components/marquee/index.js +205 -46
- package/lib/module/components/marquee/index.js.map +1 -1
- package/lib/module/components/panelside/index.js +162 -34
- package/lib/module/components/panelside/index.js.map +1 -1
- package/lib/module/components/pie-chart/index.js +15 -2
- package/lib/module/components/pie-chart/index.js.map +1 -1
- package/lib/module/components/plot/index.js +42 -44
- package/lib/module/components/plot/index.js.map +1 -1
- package/lib/module/components/progress-button/index.js +617 -0
- package/lib/module/components/progress-button/index.js.map +1 -0
- package/lib/module/components/progress-button/progress-button-hold.js +91 -0
- package/lib/module/components/progress-button/progress-button-hold.js.map +1 -0
- package/lib/module/components/scatter-chart/index.js +6 -25
- package/lib/module/components/scatter-chart/index.js.map +1 -1
- package/lib/module/components/section-rail/index.js +40 -17
- package/lib/module/components/section-rail/index.js.map +1 -1
- package/lib/module/components/split-view/index.js +54 -10
- package/lib/module/components/split-view/index.js.map +1 -1
- package/lib/module/components/theme-selector/index.js +239 -0
- package/lib/module/components/theme-selector/index.js.map +1 -0
- package/lib/module/components/theme-selector/theme-preview.js +320 -0
- package/lib/module/components/theme-selector/theme-preview.js.map +1 -0
- package/lib/module/components/timeline/index.js +145 -14
- package/lib/module/components/timeline/index.js.map +1 -1
- package/lib/module/components/toast/index.js +45 -11
- package/lib/module/components/toast/index.js.map +1 -1
- package/lib/module/components/treemap-chart/index.js +63 -6
- package/lib/module/components/treemap-chart/index.js.map +1 -1
- package/lib/module/components/waterfall-chart/index.js +20 -4
- package/lib/module/components/waterfall-chart/index.js.map +1 -1
- package/lib/module/hooks/index.js +1 -0
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/use-scroll-sections.js +44 -2
- package/lib/module/hooks/use-scroll-sections.js.map +1 -1
- package/lib/module/hooks/use-skeleton-handoff.js +58 -0
- package/lib/module/hooks/use-skeleton-handoff.js.map +1 -0
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/components/area-chart/index.d.ts +1 -1
- package/lib/typescript/src/components/area-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/bottom-sheet/index.d.ts.map +1 -1
- package/lib/typescript/src/components/funnel-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/heatmap-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/hex-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/line-chart/index.d.ts +1 -1
- package/lib/typescript/src/components/line-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/map/index.d.ts +8 -4
- package/lib/typescript/src/components/map/index.d.ts.map +1 -1
- package/lib/typescript/src/components/map/map-children.d.ts +41 -0
- package/lib/typescript/src/components/map/map-children.d.ts.map +1 -0
- package/lib/typescript/src/components/map/maplibre.d.ts +8 -4
- package/lib/typescript/src/components/map/maplibre.d.ts.map +1 -1
- package/lib/typescript/src/components/markdown-editor/index.d.ts +64 -5
- package/lib/typescript/src/components/markdown-editor/index.d.ts.map +1 -1
- package/lib/typescript/src/components/markdown-editor/markdown-transforms.d.ts +33 -5
- package/lib/typescript/src/components/markdown-editor/markdown-transforms.d.ts.map +1 -1
- package/lib/typescript/src/components/marquee/index.d.ts +55 -2
- package/lib/typescript/src/components/marquee/index.d.ts.map +1 -1
- package/lib/typescript/src/components/panelside/index.d.ts +79 -4
- package/lib/typescript/src/components/panelside/index.d.ts.map +1 -1
- package/lib/typescript/src/components/pie-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/plot/index.d.ts +1 -3
- package/lib/typescript/src/components/plot/index.d.ts.map +1 -1
- package/lib/typescript/src/components/progress-button/index.d.ts +311 -0
- package/lib/typescript/src/components/progress-button/index.d.ts.map +1 -0
- package/lib/typescript/src/components/progress-button/progress-button-hold.d.ts +60 -0
- package/lib/typescript/src/components/progress-button/progress-button-hold.d.ts.map +1 -0
- package/lib/typescript/src/components/scatter-chart/index.d.ts +1 -1
- package/lib/typescript/src/components/scatter-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/section-rail/index.d.ts.map +1 -1
- package/lib/typescript/src/components/split-view/index.d.ts +10 -1
- package/lib/typescript/src/components/split-view/index.d.ts.map +1 -1
- package/lib/typescript/src/components/theme-selector/index.d.ts +107 -0
- package/lib/typescript/src/components/theme-selector/index.d.ts.map +1 -0
- package/lib/typescript/src/components/theme-selector/theme-preview.d.ts +32 -0
- package/lib/typescript/src/components/theme-selector/theme-preview.d.ts.map +1 -0
- package/lib/typescript/src/components/timeline/index.d.ts +7 -0
- package/lib/typescript/src/components/timeline/index.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/index.d.ts.map +1 -1
- package/lib/typescript/src/components/treemap-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/waterfall-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/index.d.ts +1 -0
- package/lib/typescript/src/hooks/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/use-scroll-sections.d.ts +1 -0
- package/lib/typescript/src/hooks/use-scroll-sections.d.ts.map +1 -1
- package/lib/typescript/src/hooks/use-skeleton-handoff.d.ts +11 -0
- package/lib/typescript/src/hooks/use-skeleton-handoff.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +6 -4
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/area-chart/index.tsx +49 -37
- package/src/components/bottom-sheet/index.tsx +109 -11
- package/src/components/funnel-chart/index.tsx +10 -2
- package/src/components/heatmap-chart/index.tsx +27 -22
- package/src/components/hex-chart/index.tsx +22 -6
- package/src/components/line-chart/index.tsx +57 -43
- package/src/components/map/index.tsx +63 -36
- package/src/components/map/map-children.ts +66 -0
- package/src/components/map/maplibre.ts +32 -4
- package/src/components/markdown-editor/index.tsx +413 -35
- package/src/components/markdown-editor/markdown-transforms.ts +274 -10
- package/src/components/marquee/index.tsx +254 -58
- package/src/components/panelside/index.tsx +179 -40
- package/src/components/pie-chart/index.tsx +10 -2
- package/src/components/plot/index.tsx +66 -50
- package/src/components/progress-button/index.tsx +684 -0
- package/src/components/progress-button/progress-button-hold.ts +88 -0
- package/src/components/scatter-chart/index.tsx +4 -25
- package/src/components/section-rail/index.tsx +39 -19
- package/src/components/split-view/index.tsx +53 -8
- package/src/components/theme-selector/index.tsx +281 -0
- package/src/components/theme-selector/theme-preview.tsx +205 -0
- package/src/components/timeline/index.tsx +143 -17
- package/src/components/toast/index.tsx +60 -11
- package/src/components/treemap-chart/index.tsx +65 -8
- package/src/components/waterfall-chart/index.tsx +14 -4
- package/src/hooks/index.ts +5 -0
- package/src/hooks/use-scroll-sections.ts +52 -3
- package/src/hooks/use-skeleton-handoff.ts +69 -0
- package/src/index.ts +25 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProgressButton — press and hold to confirm, with the wait drawn on the button.
|
|
3
|
+
*
|
|
4
|
+
* ```tsx
|
|
5
|
+
* <ProgressButton onComplete={wipe}>
|
|
6
|
+
* <ProgressButton.Label>Hold to erase</ProgressButton.Label>
|
|
7
|
+
* </ProgressButton>
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* For the action a confirmation dialog exists to slow down. A dialog asks the
|
|
11
|
+
* question somewhere else and takes the answer as a tap — which is two taps,
|
|
12
|
+
* and two taps in a row is a rhythm a hand falls into. A hold cannot be
|
|
13
|
+
* completed by accident and cannot be completed by habit: it has to be
|
|
14
|
+
* sustained, and the fill says for how much longer.
|
|
15
|
+
*
|
|
16
|
+
* ## The fill is the promise
|
|
17
|
+
*
|
|
18
|
+
* Nothing fires until the fill reaches the end. There is no tolerance near the
|
|
19
|
+
* top, because a tolerance means the button sometimes commits after the reader
|
|
20
|
+
* has deliberately let go — which is the one failure a confirmation control
|
|
21
|
+
* cannot have. Released early, the fill drains back, in proportion to how far
|
|
22
|
+
* it got.
|
|
23
|
+
*
|
|
24
|
+
* ## How it is drawn
|
|
25
|
+
*
|
|
26
|
+
* The fill is a clipped copy of the button in inverted colours, growing from
|
|
27
|
+
* the leading edge. That is what keeps the label legible across the boundary:
|
|
28
|
+
* a single label under a translucent wash goes muddy in the middle of the
|
|
29
|
+
* wipe, exactly where the eye is. Two labels, each at full contrast on its own
|
|
30
|
+
* ground, never do.
|
|
31
|
+
*
|
|
32
|
+
* The clip is a view under `overflow: 'hidden'`, and its width is animated.
|
|
33
|
+
* Animating a width is normally a layout pass per frame; this view is
|
|
34
|
+
* absolutely positioned over the button and its copy of the label is pinned to
|
|
35
|
+
* the button's own width, so nothing it contains reflows as it grows.
|
|
36
|
+
*
|
|
37
|
+
* ## Reduced motion
|
|
38
|
+
*
|
|
39
|
+
* The wipe is replaced by a stepped fill that advances in fifths. The hold
|
|
40
|
+
* still has to be legible — a control that asks you to wait and shows nothing
|
|
41
|
+
* is a broken button — so this is a coarser indicator, not the absence of one.
|
|
42
|
+
*/
|
|
43
|
+
import { type ReactNode } from 'react';
|
|
44
|
+
import { View, type PressableProps, type ViewProps } from 'react-native';
|
|
45
|
+
import { type SharedValue } from 'react-native-reanimated';
|
|
46
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
47
|
+
declare const progressButtonVariants: import("tailwind-variants").TVReturnType<{
|
|
48
|
+
variant: {
|
|
49
|
+
primary: {
|
|
50
|
+
label: string;
|
|
51
|
+
fill: string;
|
|
52
|
+
fillLabel: string;
|
|
53
|
+
};
|
|
54
|
+
secondary: {
|
|
55
|
+
label: string;
|
|
56
|
+
fill: string;
|
|
57
|
+
fillLabel: string;
|
|
58
|
+
};
|
|
59
|
+
destructive: {
|
|
60
|
+
label: string;
|
|
61
|
+
fill: string;
|
|
62
|
+
fillLabel: string;
|
|
63
|
+
};
|
|
64
|
+
success: {
|
|
65
|
+
label: string;
|
|
66
|
+
fill: string;
|
|
67
|
+
fillLabel: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
size: {
|
|
71
|
+
sm: {
|
|
72
|
+
root: string;
|
|
73
|
+
content: string;
|
|
74
|
+
label: string;
|
|
75
|
+
fillLabel: string;
|
|
76
|
+
};
|
|
77
|
+
md: {
|
|
78
|
+
root: string;
|
|
79
|
+
content: string;
|
|
80
|
+
label: string;
|
|
81
|
+
fillLabel: string;
|
|
82
|
+
};
|
|
83
|
+
lg: {
|
|
84
|
+
root: string;
|
|
85
|
+
content: string;
|
|
86
|
+
label: string;
|
|
87
|
+
fillLabel: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
fullWidth: {
|
|
91
|
+
true: {
|
|
92
|
+
root: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
disabled: {
|
|
96
|
+
true: {
|
|
97
|
+
root: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
}, {
|
|
101
|
+
root: string;
|
|
102
|
+
content: string;
|
|
103
|
+
label: string;
|
|
104
|
+
/** The inverted copy, drawn on the filled ground. */
|
|
105
|
+
fill: string;
|
|
106
|
+
fillLabel: string;
|
|
107
|
+
}, undefined, {
|
|
108
|
+
variant: {
|
|
109
|
+
primary: {
|
|
110
|
+
label: string;
|
|
111
|
+
fill: string;
|
|
112
|
+
fillLabel: string;
|
|
113
|
+
};
|
|
114
|
+
secondary: {
|
|
115
|
+
label: string;
|
|
116
|
+
fill: string;
|
|
117
|
+
fillLabel: string;
|
|
118
|
+
};
|
|
119
|
+
destructive: {
|
|
120
|
+
label: string;
|
|
121
|
+
fill: string;
|
|
122
|
+
fillLabel: string;
|
|
123
|
+
};
|
|
124
|
+
success: {
|
|
125
|
+
label: string;
|
|
126
|
+
fill: string;
|
|
127
|
+
fillLabel: string;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
size: {
|
|
131
|
+
sm: {
|
|
132
|
+
root: string;
|
|
133
|
+
content: string;
|
|
134
|
+
label: string;
|
|
135
|
+
fillLabel: string;
|
|
136
|
+
};
|
|
137
|
+
md: {
|
|
138
|
+
root: string;
|
|
139
|
+
content: string;
|
|
140
|
+
label: string;
|
|
141
|
+
fillLabel: string;
|
|
142
|
+
};
|
|
143
|
+
lg: {
|
|
144
|
+
root: string;
|
|
145
|
+
content: string;
|
|
146
|
+
label: string;
|
|
147
|
+
fillLabel: string;
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
fullWidth: {
|
|
151
|
+
true: {
|
|
152
|
+
root: string;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
disabled: {
|
|
156
|
+
true: {
|
|
157
|
+
root: string;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
}, {
|
|
161
|
+
root: string;
|
|
162
|
+
content: string;
|
|
163
|
+
label: string;
|
|
164
|
+
/** The inverted copy, drawn on the filled ground. */
|
|
165
|
+
fill: string;
|
|
166
|
+
fillLabel: string;
|
|
167
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
168
|
+
variant: {
|
|
169
|
+
primary: {
|
|
170
|
+
label: string;
|
|
171
|
+
fill: string;
|
|
172
|
+
fillLabel: string;
|
|
173
|
+
};
|
|
174
|
+
secondary: {
|
|
175
|
+
label: string;
|
|
176
|
+
fill: string;
|
|
177
|
+
fillLabel: string;
|
|
178
|
+
};
|
|
179
|
+
destructive: {
|
|
180
|
+
label: string;
|
|
181
|
+
fill: string;
|
|
182
|
+
fillLabel: string;
|
|
183
|
+
};
|
|
184
|
+
success: {
|
|
185
|
+
label: string;
|
|
186
|
+
fill: string;
|
|
187
|
+
fillLabel: string;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
size: {
|
|
191
|
+
sm: {
|
|
192
|
+
root: string;
|
|
193
|
+
content: string;
|
|
194
|
+
label: string;
|
|
195
|
+
fillLabel: string;
|
|
196
|
+
};
|
|
197
|
+
md: {
|
|
198
|
+
root: string;
|
|
199
|
+
content: string;
|
|
200
|
+
label: string;
|
|
201
|
+
fillLabel: string;
|
|
202
|
+
};
|
|
203
|
+
lg: {
|
|
204
|
+
root: string;
|
|
205
|
+
content: string;
|
|
206
|
+
label: string;
|
|
207
|
+
fillLabel: string;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
fullWidth: {
|
|
211
|
+
true: {
|
|
212
|
+
root: string;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
disabled: {
|
|
216
|
+
true: {
|
|
217
|
+
root: string;
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
}, {
|
|
221
|
+
root: string;
|
|
222
|
+
content: string;
|
|
223
|
+
label: string;
|
|
224
|
+
/** The inverted copy, drawn on the filled ground. */
|
|
225
|
+
fill: string;
|
|
226
|
+
fillLabel: string;
|
|
227
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
228
|
+
type ProgressButtonVariantProps = VariantProps<typeof progressButtonVariants>;
|
|
229
|
+
/** How a progress button looks. */
|
|
230
|
+
export type ProgressButtonVariant = NonNullable<ProgressButtonVariantProps['variant']>;
|
|
231
|
+
/** How big a progress button is. */
|
|
232
|
+
export type ProgressButtonSize = NonNullable<ProgressButtonVariantProps['size']>;
|
|
233
|
+
/** How far through the hold this button is, for something rendered inside it. */
|
|
234
|
+
export declare function useProgressButton(): {
|
|
235
|
+
progress: SharedValue<number>;
|
|
236
|
+
completed: boolean;
|
|
237
|
+
};
|
|
238
|
+
export interface ProgressButtonProps extends Omit<PressableProps, 'children' | 'disabled'>, Omit<ProgressButtonVariantProps, 'disabled'> {
|
|
239
|
+
className?: string;
|
|
240
|
+
/**
|
|
241
|
+
* Milliseconds the button has to be held. Defaults to `2000`, and is floored
|
|
242
|
+
* at `200` — a hold that completes on touch-down is a button with extra steps.
|
|
243
|
+
*/
|
|
244
|
+
holdDuration?: number;
|
|
245
|
+
/** Fires once the hold has been sustained to the end. */
|
|
246
|
+
onComplete?: () => void;
|
|
247
|
+
/** Fires whenever the completed state changes, including on a reset. */
|
|
248
|
+
onCompletedChange?: (completed: boolean) => void;
|
|
249
|
+
/** Controlled completion. Leave unset to let the button own it. */
|
|
250
|
+
completed?: boolean;
|
|
251
|
+
/** Return to the unfilled state after `autoResetDelay`. */
|
|
252
|
+
autoReset?: boolean;
|
|
253
|
+
/** Milliseconds to stay completed before resetting. Defaults to `1000`. */
|
|
254
|
+
autoResetDelay?: number;
|
|
255
|
+
/**
|
|
256
|
+
* Dim the button and refuse the hold outright. The fill never starts, so
|
|
257
|
+
* there is no half-finished state to explain.
|
|
258
|
+
*/
|
|
259
|
+
disabled?: boolean;
|
|
260
|
+
/**
|
|
261
|
+
* A tick as the hold takes, and a knock when it completes. Off by default:
|
|
262
|
+
* whether an action is worth feeling is the caller's call, not the control's.
|
|
263
|
+
*/
|
|
264
|
+
haptics?: boolean;
|
|
265
|
+
children?: ReactNode;
|
|
266
|
+
}
|
|
267
|
+
export interface ProgressButtonLabelProps extends ViewProps {
|
|
268
|
+
className?: string;
|
|
269
|
+
children?: ReactNode;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* What the button says, drawn twice.
|
|
273
|
+
*
|
|
274
|
+
* The second copy is the one inside the fill, in the inverted colour, pinned to
|
|
275
|
+
* the button's own width and clipped to however far the hold has got. Both are
|
|
276
|
+
* the same text at the same position, so the boundary between them falls in the
|
|
277
|
+
* middle of a glyph rather than between two differently laid-out lines.
|
|
278
|
+
*/
|
|
279
|
+
declare function ProgressButtonLabel({ className, children, ...props }: ProgressButtonLabelProps): import("react").JSX.Element;
|
|
280
|
+
declare namespace ProgressButtonLabel {
|
|
281
|
+
var displayName: string;
|
|
282
|
+
}
|
|
283
|
+
export interface ProgressButtonDoneProps extends ViewProps {
|
|
284
|
+
className?: string;
|
|
285
|
+
/**
|
|
286
|
+
* What the button shows once the hold has landed. A tick on its own by
|
|
287
|
+
* default; children replace it, so a word beside one is
|
|
288
|
+
* `<ProgressButton.Done><CheckIcon /><Text>Paid</Text></ProgressButton.Done>`.
|
|
289
|
+
*/
|
|
290
|
+
children?: ReactNode;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* The drawing the button lands on.
|
|
294
|
+
*
|
|
295
|
+
* It sits over the finished fill rather than beside the label, so the button
|
|
296
|
+
* does not change width at the moment it completes — a control that resizes as
|
|
297
|
+
* it succeeds moves everything under it, and the reader's eye is on the button.
|
|
298
|
+
*
|
|
299
|
+
* One is added for you unless you write your own, because a hold that lands and
|
|
300
|
+
* shows nothing leaves the reader checking whether it worked.
|
|
301
|
+
*/
|
|
302
|
+
declare function ProgressButtonDone({ className, children, ...props }: ProgressButtonDoneProps): import("react").JSX.Element;
|
|
303
|
+
declare namespace ProgressButtonDone {
|
|
304
|
+
var displayName: string;
|
|
305
|
+
}
|
|
306
|
+
export declare const ProgressButton: import("react").ForwardRefExoticComponent<ProgressButtonProps & import("react").RefAttributes<View>> & {
|
|
307
|
+
Label: typeof ProgressButtonLabel;
|
|
308
|
+
Done: typeof ProgressButtonDone;
|
|
309
|
+
};
|
|
310
|
+
export { DEFAULT_AUTO_RESET_DELAY, DEFAULT_HOLD_DURATION, DEFAULT_RELEASE_DURATION, fillDuration, isComplete, releaseDuration, resolveHoldDuration, } from './progress-button-hold.js';
|
|
311
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/progress-button/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,EAWL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAEL,IAAI,EAEJ,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAiB,EAWf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAyC1D,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmCxB,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAArD,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAArD,qDAAqD;;;2CAgEvD,CAAC;AAEH,KAAK,0BAA0B,GAAG,YAAY,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE9E,mCAAmC;AACnC,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,0BAA0B,CAAC,SAAS,CAAC,CAAC,CAAC;AACvF,oCAAoC;AACpC,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC,CAAC;AA2BjF,iFAAiF;AACjF,wBAAgB,iBAAiB;;;EAGhC;AAED,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,cAAc,EAA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AY,EACZ,UAAU,EACV,eAAe,EACf,mBAAmB,GACpB,MAAM,2BAAwB,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The arithmetic behind a hold, kept out of the component so it can be tested
|
|
3
|
+
* without a renderer — the same split `splitter-math` and `ai-input-growth` use.
|
|
4
|
+
*
|
|
5
|
+
* None of it is worklet-only, so the component can call it from either runtime.
|
|
6
|
+
*/
|
|
7
|
+
/** Milliseconds a hold has to be sustained before it counts. */
|
|
8
|
+
export declare const DEFAULT_HOLD_DURATION = 2000;
|
|
9
|
+
/**
|
|
10
|
+
* Milliseconds a complete fill takes to rewind, when the hold length is not
|
|
11
|
+
* known — the default only exists so {@link releaseDuration} has one.
|
|
12
|
+
*
|
|
13
|
+
* The component always passes the hold's own duration instead: the drain is
|
|
14
|
+
* the fill running backwards at the same rate, so a two-second hold takes two
|
|
15
|
+
* seconds to give back.
|
|
16
|
+
*/
|
|
17
|
+
export declare const DEFAULT_RELEASE_DURATION = 2000;
|
|
18
|
+
/** Milliseconds before an `autoReset` button offers itself again. */
|
|
19
|
+
export declare const DEFAULT_AUTO_RESET_DELAY = 1000;
|
|
20
|
+
/**
|
|
21
|
+
* A hold duration that cannot produce a broken animation.
|
|
22
|
+
*
|
|
23
|
+
* Zero would complete on touch-down, which defeats the point of the control:
|
|
24
|
+
* a hold-to-confirm that confirms on a tap is a button with extra steps. A
|
|
25
|
+
* floor rather than a rejection, because the caller asking for `0` wants it
|
|
26
|
+
* fast, not broken.
|
|
27
|
+
*/
|
|
28
|
+
export declare function resolveHoldDuration(duration: number | undefined): number;
|
|
29
|
+
/**
|
|
30
|
+
* How long the fill should take to drain from where it is.
|
|
31
|
+
*
|
|
32
|
+
* The fill, run backwards. `full` is the hold's own duration, so the drain
|
|
33
|
+
* covers the distance left at exactly the rate it was filled at: let go at
|
|
34
|
+
* nine tenths of a two-second hold and it takes 1.8 seconds to give back, the
|
|
35
|
+
* same 1.8 seconds it took to earn.
|
|
36
|
+
*
|
|
37
|
+
* That is the point of it. The wait was drawn on the button, so undoing the
|
|
38
|
+
* wait is worth drawing too — a fill that vanishes has been deleted, and a
|
|
39
|
+
* fill that travels back has been let go.
|
|
40
|
+
*/
|
|
41
|
+
export declare function releaseDuration(progress: number, full?: number): number;
|
|
42
|
+
/**
|
|
43
|
+
* Whether a hold that has been released should still be honoured.
|
|
44
|
+
*
|
|
45
|
+
* The fill is the promise, so anything short of the end is not a confirmation —
|
|
46
|
+
* there is no "close enough" here. It exists as a named function because the
|
|
47
|
+
* tempting version of this rule is a tolerance, and a tolerance means the
|
|
48
|
+
* button sometimes fires when the reader let go early on purpose.
|
|
49
|
+
*/
|
|
50
|
+
export declare function isComplete(progress: number): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* How long it takes to cover the distance still ahead, at the fill's own rate.
|
|
53
|
+
*
|
|
54
|
+
* A press that arrives while the fill is on its way back should carry on from
|
|
55
|
+
* where it is rather than restarting the clock — otherwise a fill picked up at
|
|
56
|
+
* halfway takes the whole hold to cover the half that is left, and the second
|
|
57
|
+
* attempt is twice as slow as the first for no reason the reader can see.
|
|
58
|
+
*/
|
|
59
|
+
export declare function fillDuration(from: number, full: number): number;
|
|
60
|
+
//# sourceMappingURL=progress-button-hold.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-button-hold.d.ts","sourceRoot":"","sources":["../../../../../src/components/progress-button/progress-button-hold.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,gEAAgE;AAChE,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAE1C;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,OAAwB,CAAC;AAE9D,qEAAqE;AACrE,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAE7C;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAIxE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,MAAiC,GACtC,MAAM,CAQR;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAGpD;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAI/D"}
|
|
@@ -79,7 +79,7 @@ export interface ScatterChartProps extends ViewProps, ChartAccessibilityProps<Sc
|
|
|
79
79
|
status?: ScatterChartStatus;
|
|
80
80
|
/** Width ÷ height. `1` suits a scatter plot: neither axis is the important one. */
|
|
81
81
|
aspectRatio?: number;
|
|
82
|
-
/** Milliseconds for the reveal on mount. */
|
|
82
|
+
/** Milliseconds for the reveal on mount. Defaults to `650`. */
|
|
83
83
|
animationDuration?: number;
|
|
84
84
|
/** Milliseconds for the axes to settle after the data changes. */
|
|
85
85
|
domainDuration?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/scatter-chart/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EAWL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAA4C,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAgBxF,OAAO,EAA0B,KAAK,uBAAuB,EAAE,MAAM,yCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/scatter-chart/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EAWL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAA4C,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAgBxF,OAAO,EAA0B,KAAK,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file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/section-rail/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAUL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/section-rail/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAUL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAgE3E,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,OAAO,CAAC;AACpD,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AAyC3D,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC;;;;OAIG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,4BAA4B;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,MA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AAC;IACd,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,4CAA4C;AAC5C,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAS,EAAE,QAAQ,EAAE,EAAE,oBAAoB,+BA+BvF;AAED,eAAO,MAAM,WAAW;;;;;CAKtB,CAAC"}
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
import { type ReactNode } from 'react';
|
|
34
34
|
import { type ViewProps } from 'react-native';
|
|
35
35
|
import { type SharedValue } from 'react-native-reanimated';
|
|
36
|
+
export type SplitViewVariant = 'panes' | 'seam';
|
|
36
37
|
interface SplitViewContextValue {
|
|
37
38
|
/** The top pane's height in points. Written by drags, read by both panes. */
|
|
38
39
|
topHeight: SharedValue<number>;
|
|
@@ -50,6 +51,7 @@ interface SplitViewContextValue {
|
|
|
50
51
|
snapTo: (index: number) => void;
|
|
51
52
|
measureDragArea: (height: number) => void;
|
|
52
53
|
dragAreaHeight: number;
|
|
54
|
+
variant: SplitViewVariant;
|
|
53
55
|
}
|
|
54
56
|
/**
|
|
55
57
|
* Reads the live layout from inside a split view, and moves the seam.
|
|
@@ -60,6 +62,13 @@ interface SplitViewContextValue {
|
|
|
60
62
|
export declare function useSplitView(): SplitViewContextValue;
|
|
61
63
|
export interface SplitViewProps extends ViewProps {
|
|
62
64
|
className?: string;
|
|
65
|
+
/**
|
|
66
|
+
* How the split is drawn. `panes` gives each half its own rounded surface on
|
|
67
|
+
* a recessed ground, with the grip in the gap between them; `seam` is a
|
|
68
|
+
* hairline grip on a shared background, for a split inside something that
|
|
69
|
+
* already has a surface of its own.
|
|
70
|
+
*/
|
|
71
|
+
variant?: SplitViewVariant;
|
|
63
72
|
/**
|
|
64
73
|
* Heights the seam settles on. A number at or below `1` is a fraction of the
|
|
65
74
|
* room the panes share; anything larger is points. Defaults to
|
|
@@ -88,7 +97,7 @@ export interface SplitViewProps extends ViewProps {
|
|
|
88
97
|
animateOnMount?: boolean;
|
|
89
98
|
children?: ReactNode;
|
|
90
99
|
}
|
|
91
|
-
declare function SplitViewRoot({ className, snapPoints, minHeight, maxHeight, defaultSnapIndex, snapIndex: snapIndexProp, onSnapIndexChange, onSnap, disabled, animateOnMount, children, onLayout, ...props }: SplitViewProps): import("react").JSX.Element;
|
|
100
|
+
declare function SplitViewRoot({ className, variant, snapPoints, minHeight, maxHeight, defaultSnapIndex, snapIndex: snapIndexProp, onSnapIndexChange, onSnap, disabled, animateOnMount, children, onLayout, ...props }: SplitViewProps): import("react").JSX.Element;
|
|
92
101
|
declare namespace SplitViewRoot {
|
|
93
102
|
var displayName: string;
|
|
94
103
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/split-view/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAgC,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE5E,OAAiB,EAMf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/split-view/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAgC,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE5E,OAAiB,EAMf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAmEjC,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhD,UAAU,qBAAqB;IAC7B,6EAA6E;IAC7E,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC/B,0CAA0C;IAC1C,QAAQ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AAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,+BA6BtF;kBA7BQ,eAAe;;;AAqCxB,eAAO,MAAM,SAAS;;;;;CAKpB,CAAC;AAEH,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,GAClB,MAAM,sBAAmB,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ThemeSelector — light, dark, or whatever the device is set to.
|
|
3
|
+
*
|
|
4
|
+
* Three miniatures of a screen, the chosen one ringed. A row of words would
|
|
5
|
+
* take a third of the space and say the same thing, but "System" is the option
|
|
6
|
+
* people hesitate over, and a picture of a screen split down the middle
|
|
7
|
+
* explains it in less time than a sentence does.
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <ThemeSelector label="Choose a theme" />
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* ## It reads the theme rather than remembering it
|
|
14
|
+
*
|
|
15
|
+
* There is already one answer to "which theme is this" — Uniwind's — so the
|
|
16
|
+
* selector asks for it instead of keeping a copy that can disagree. Change the
|
|
17
|
+
* theme anywhere else in the app and the ring moves. Pass `value` to show
|
|
18
|
+
* something else, for a settings screen that stages a choice before applying
|
|
19
|
+
* it.
|
|
20
|
+
*
|
|
21
|
+
* ## Light and dark stay inside the family
|
|
22
|
+
*
|
|
23
|
+
* A reader in Moon who picks Light gets Moon's light theme, not the default
|
|
24
|
+
* one. System is the exception, and cannot be otherwise: the device knows only
|
|
25
|
+
* light and dark, so following it means following those two.
|
|
26
|
+
*/
|
|
27
|
+
import { type ReactNode } from 'react';
|
|
28
|
+
import { type PressableProps, type ViewProps } from 'react-native';
|
|
29
|
+
import { type ThemePreviewVariant } from './theme-preview.js';
|
|
30
|
+
export type { ThemePreviewVariant } from './theme-preview.js';
|
|
31
|
+
/** What the selector chooses between. */
|
|
32
|
+
export type ThemeSelection = 'system' | 'light' | 'dark';
|
|
33
|
+
/** How big the miniatures are drawn. */
|
|
34
|
+
export type ThemeSelectorSize = 'sm' | 'md';
|
|
35
|
+
/**
|
|
36
|
+
* Which of the three the app is on, read from the theme itself.
|
|
37
|
+
*
|
|
38
|
+
* `hasAdaptiveThemes` is the part that makes this possible: it is true exactly
|
|
39
|
+
* while the theme is following the device, which is the one thing the theme's
|
|
40
|
+
* own name cannot tell you — `system` resolves to `light` or `dark` the moment
|
|
41
|
+
* it is applied, and the two are indistinguishable afterwards.
|
|
42
|
+
*/
|
|
43
|
+
export declare function useThemeSelection(): ThemeSelection;
|
|
44
|
+
export interface ThemeSelectorProps extends Omit<ViewProps, 'children'> {
|
|
45
|
+
className?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Show this as chosen instead of whatever the app is actually on. For a
|
|
48
|
+
* settings screen that stages a choice before applying it; left unset, the
|
|
49
|
+
* selector reads the live theme.
|
|
50
|
+
*/
|
|
51
|
+
value?: ThemeSelection;
|
|
52
|
+
/** Fires with the option pressed, before the theme changes. */
|
|
53
|
+
onValueChange?: (value: ThemeSelection) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Apply the choice. On by default — a theme selector that does not select a
|
|
56
|
+
* theme is a radio group. Turn it off to store the choice and apply it
|
|
57
|
+
* yourself, which is what an app that persists the preference wants.
|
|
58
|
+
*/
|
|
59
|
+
applyTheme?: boolean;
|
|
60
|
+
/** The heading above the row. Left out, there is none. */
|
|
61
|
+
label?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Which miniature is drawn. `window` is an app screen with a panel on it;
|
|
64
|
+
* `card` is a framed card with an accent, cut on the diagonal for system.
|
|
65
|
+
*/
|
|
66
|
+
variant?: ThemePreviewVariant;
|
|
67
|
+
/**
|
|
68
|
+
* How wide the miniatures are drawn. `sm` for a settings row that has other
|
|
69
|
+
* things on it; `md` when choosing the theme is what the screen is for.
|
|
70
|
+
*/
|
|
71
|
+
size?: ThemeSelectorSize;
|
|
72
|
+
/** Stop the row being pressed, and dim it to say so. */
|
|
73
|
+
disabled?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* The options, in the order you want them. Left out, the selector draws
|
|
76
|
+
* system, light and dark in that order — which is the whole component.
|
|
77
|
+
*/
|
|
78
|
+
children?: ReactNode;
|
|
79
|
+
}
|
|
80
|
+
declare function ThemeSelectorRoot({ className, value, onValueChange, applyTheme, label, variant, size, disabled, children, ...props }: ThemeSelectorProps): import("react").JSX.Element;
|
|
81
|
+
declare namespace ThemeSelectorRoot {
|
|
82
|
+
var displayName: string;
|
|
83
|
+
}
|
|
84
|
+
export interface ThemeSelectorOptionProps extends Omit<PressableProps, 'children' | 'onPress'> {
|
|
85
|
+
className?: string;
|
|
86
|
+
/** Which of the three this option chooses. */
|
|
87
|
+
value: ThemeSelection;
|
|
88
|
+
/** What it is called under the miniature. Defaults to System, Light or Dark. */
|
|
89
|
+
label?: string;
|
|
90
|
+
/** Replaces the drawn miniature. */
|
|
91
|
+
children?: ReactNode;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* One of the three.
|
|
95
|
+
*
|
|
96
|
+
* The whole thing is the target — the miniature and the word under it — because
|
|
97
|
+
* at this size the word is the easier of the two to hit and pressing it should
|
|
98
|
+
* not miss.
|
|
99
|
+
*/
|
|
100
|
+
declare function ThemeSelectorOption({ className, value, label, children, ...props }: ThemeSelectorOptionProps): import("react").JSX.Element;
|
|
101
|
+
declare namespace ThemeSelectorOption {
|
|
102
|
+
var displayName: string;
|
|
103
|
+
}
|
|
104
|
+
export declare const ThemeSelector: typeof ThemeSelectorRoot & {
|
|
105
|
+
Option: typeof ThemeSelectorOption;
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/theme-selector/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAmD,KAAK,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,cAAc,EAAE,UAAU,GAAG,SAAS,CAAC;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,KAAK,EAAE,cAAc,CAAC;IACtB,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;GAMG;AACH,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,KAAK,EACL,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,wBAAwB,+BAgC1B;kBAtCQ,mBAAmB;;;AA2C5B,eAAO,MAAM,aAAa;;CAExB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The three miniatures a theme selector is made of.
|
|
3
|
+
*
|
|
4
|
+
* Drawn from fixed neutrals rather than from theme tokens, which is the one
|
|
5
|
+
* thing about this file that is not obvious. A preview built out of the active
|
|
6
|
+
* theme's colours shows the reader the theme they already have, three times —
|
|
7
|
+
* the light option has to look light while the app around it is dark, or it is
|
|
8
|
+
* not a preview of anything.
|
|
9
|
+
*
|
|
10
|
+
* The greys are the ones a screenshot of an app would actually have: a ground,
|
|
11
|
+
* a surface sitting on it, a mark, and the lines of text. Two sets, and the
|
|
12
|
+
* system option draws both.
|
|
13
|
+
*/
|
|
14
|
+
import { type ReactNode } from 'react';
|
|
15
|
+
/** Which of the three a preview is drawing. */
|
|
16
|
+
export type ThemePreviewMode = 'system' | 'light' | 'dark';
|
|
17
|
+
/** How the miniature is drawn. */
|
|
18
|
+
export type ThemePreviewVariant = 'window' | 'card';
|
|
19
|
+
export interface ThemePreviewProps {
|
|
20
|
+
mode: ThemePreviewMode;
|
|
21
|
+
variant?: ThemePreviewVariant;
|
|
22
|
+
width: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* One miniature.
|
|
26
|
+
*
|
|
27
|
+
* `width` rather than a scale factor: the option's box is what decides the
|
|
28
|
+
* size, and everything inside is drawn against a fixed box and scaled by the
|
|
29
|
+
* viewBox — so the geometry above never has to know how big it ended up.
|
|
30
|
+
*/
|
|
31
|
+
export declare function ThemePreview({ mode, variant, width }: ThemePreviewProps): ReactNode;
|
|
32
|
+
//# sourceMappingURL=theme-preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-preview.d.ts","sourceRoot":"","sources":["../../../../../src/components/theme-selector/theme-preview.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG9C,+CAA+C;AAC/C,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3D,kCAAkC;AAClC,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,MAAM,CAAC;AA+GpD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,gBAAgB,CAAC;IACvB,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,OAAkB,EAAE,KAAK,EAAE,EAAE,iBAAiB,GAAG,SAAS,CA4D9F"}
|
|
@@ -68,6 +68,13 @@ export interface TimelineProps extends ViewProps {
|
|
|
68
68
|
* halfway shows two half-columns and no whole one.
|
|
69
69
|
*/
|
|
70
70
|
snap?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Horizontal only: a tick as the reading edge passes from one column to the
|
|
73
|
+
* next. Needs `snap`, since a scroll that lands anywhere has no detents to
|
|
74
|
+
* feel. Off by default — a haptic per column is a lot for a long history, and
|
|
75
|
+
* whether this one is worth feeling is the caller's call.
|
|
76
|
+
*/
|
|
77
|
+
haptics?: boolean;
|
|
71
78
|
children?: ReactNode;
|
|
72
79
|
}
|
|
73
80
|
export interface TimelineListProps<T> extends Omit<FlatListProps<T>, 'data' | 'renderItem' | 'horizontal' | 'getItemLayout' | 'onScroll' | 'snapToOffsets' | 'CellRendererComponent'> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/timeline/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EAQL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAEL,IAAI,EACJ,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,IAAI,IAAI,MAAM,EACnB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/timeline/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EAQL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAEL,IAAI,EACJ,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,IAAI,IAAI,MAAM,EACnB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAgBtB,OAAO,EAAQ,KAAK,SAAS,EAAgB,MAAM,0BAAuB,CAAC;AA6F3E,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC;AAC/E,mEAAmE;AACnE,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AACjF,mCAAmC;AACnC,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,YAAY,CAAC;AA0N5D,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDA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