@await-widget/runtime 0.0.45 → 0.0.47
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/package.json +3 -3
- package/types/await.d.ts +1 -1
- package/types/prop.d.ts +51 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@await-widget/runtime",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.47",
|
|
4
4
|
"description": "TypeScript declarations for Await widgets.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Maundy",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"cli:test": "node bin/await-widget.js --help"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"typescript": "^6.0.
|
|
37
|
-
"xo": "^
|
|
36
|
+
"typescript": "^6.0.3",
|
|
37
|
+
"xo": "^4.0.0"
|
|
38
38
|
},
|
|
39
39
|
"bin": {
|
|
40
40
|
"await-widget": "bin/await-widget.js"
|
package/types/await.d.ts
CHANGED
|
@@ -76,7 +76,7 @@ declare module 'await' {
|
|
|
76
76
|
children?: NativeView;
|
|
77
77
|
},
|
|
78
78
|
): NativeView;
|
|
79
|
-
/** Displays an automatically updating clock or
|
|
79
|
+
/** Displays an automatically updating clock, countdown/count-up timer, or stopwatch. */
|
|
80
80
|
export function Time(
|
|
81
81
|
props: TimeValue &
|
|
82
82
|
ID &
|
package/types/prop.d.ts
CHANGED
|
@@ -146,6 +146,30 @@ type IconValue = {
|
|
|
146
146
|
resizable?: Resizable;
|
|
147
147
|
};
|
|
148
148
|
|
|
149
|
+
/** Unbounded stopwatch counts up from `date` */
|
|
150
|
+
type TimeStopwatchFormat = {
|
|
151
|
+
type: 'stopwatch';
|
|
152
|
+
/** Whether to include an hours component. Default true. */
|
|
153
|
+
showsHours?: boolean;
|
|
154
|
+
/** Maximum number of time fields to display. Default 4. */
|
|
155
|
+
maxFieldCount?: number;
|
|
156
|
+
/** Smallest displayed unit in seconds, e.g. 0.01. Default 0.01. */
|
|
157
|
+
maxPrecision?: number;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
/** Bounded timer stops at `date` */
|
|
161
|
+
type TimeTimerFormat = {
|
|
162
|
+
type: 'timer';
|
|
163
|
+
/** Counts down to `date` when true, counts up to it when false. Default true. */
|
|
164
|
+
countsDown?: boolean;
|
|
165
|
+
/** Whether to include an hours component. Default true. */
|
|
166
|
+
showsHours?: boolean;
|
|
167
|
+
/** Clamped to 2...4. Default 3. */
|
|
168
|
+
maxFieldCount?: number;
|
|
169
|
+
/** Smallest displayed unit in seconds: 0.01 (hundredths), 0.1 (tenths), or 1 (seconds). Default 1. */
|
|
170
|
+
maxPrecision?: 0.01 | 0.1 | 1;
|
|
171
|
+
};
|
|
172
|
+
|
|
149
173
|
type TimeValue =
|
|
150
174
|
| {
|
|
151
175
|
/** IANA time-zone identifier. Omit to use the system time zone. */
|
|
@@ -155,22 +179,38 @@ type TimeValue =
|
|
|
155
179
|
style?: never;
|
|
156
180
|
countsDown?: never;
|
|
157
181
|
showsHours?: never;
|
|
182
|
+
maxFieldCount?: never;
|
|
183
|
+
maxPrecision?: never;
|
|
158
184
|
}
|
|
159
185
|
| {
|
|
160
186
|
date?: Date;
|
|
161
|
-
|
|
187
|
+
format: TimeStopwatchFormat;
|
|
162
188
|
timeZone?: never;
|
|
163
|
-
|
|
189
|
+
style?: never;
|
|
190
|
+
countsDown?: never;
|
|
191
|
+
showsHours?: never;
|
|
192
|
+
maxFieldCount?: never;
|
|
193
|
+
maxPrecision?: never;
|
|
194
|
+
}
|
|
195
|
+
| {
|
|
196
|
+
date: Date;
|
|
197
|
+
format: TimeTimerFormat;
|
|
198
|
+
timeZone?: never;
|
|
199
|
+
style?: never;
|
|
164
200
|
countsDown?: never;
|
|
165
201
|
showsHours?: never;
|
|
202
|
+
maxFieldCount?: never;
|
|
203
|
+
maxPrecision?: never;
|
|
166
204
|
}
|
|
167
205
|
| {
|
|
168
206
|
date?: Date;
|
|
169
|
-
|
|
170
|
-
showsHours?: boolean;
|
|
207
|
+
style?: TimeStyle;
|
|
171
208
|
timeZone?: never;
|
|
172
209
|
format?: never;
|
|
173
|
-
|
|
210
|
+
countsDown?: never;
|
|
211
|
+
showsHours?: never;
|
|
212
|
+
maxFieldCount?: never;
|
|
213
|
+
maxPrecision?: never;
|
|
174
214
|
};
|
|
175
215
|
|
|
176
216
|
type ProgressViewValue = {
|
|
@@ -296,8 +336,12 @@ type BaseMods = {
|
|
|
296
336
|
rotation3DEffect?: Rotation3DEffect;
|
|
297
337
|
rotationEffect?: RotationEffect;
|
|
298
338
|
safeAreaInset?:
|
|
299
|
-
| {edge: HorizontalEdge; alignment
|
|
300
|
-
| {
|
|
339
|
+
| {edge: HorizontalEdge; alignment?: VerticalAlignment; content: NativeView}
|
|
340
|
+
| {
|
|
341
|
+
edge: VerticalEdge;
|
|
342
|
+
alignment?: HorizontalAlignment;
|
|
343
|
+
content: NativeView;
|
|
344
|
+
};
|
|
301
345
|
saturation?: number;
|
|
302
346
|
scaleEffect?: ScaleEffect;
|
|
303
347
|
shadow?: Shadow;
|