@await-widget/runtime 0.0.33 → 0.0.34
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 +1 -1
- package/types/await.d.ts +38 -12
- package/types/meta.d.ts +93 -0
- package/types/prop.d.ts +14 -5
package/package.json
CHANGED
package/types/await.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ declare module 'await' {
|
|
|
30
30
|
children?: NativeView;
|
|
31
31
|
},
|
|
32
32
|
): NativeView;
|
|
33
|
+
/** Opens a custom-scheme URL or universal link through the Await app when tapped. */
|
|
33
34
|
export function Link(
|
|
34
35
|
props: LinkValue &
|
|
35
36
|
ID &
|
|
@@ -37,6 +38,7 @@ declare module 'await' {
|
|
|
37
38
|
children?: NativeView;
|
|
38
39
|
},
|
|
39
40
|
): NativeView;
|
|
41
|
+
/** When tapped, runs an intent or opens a universal link directly without going through the Await app. */
|
|
40
42
|
export function Button(
|
|
41
43
|
props: ButtonValue &
|
|
42
44
|
ID &
|
|
@@ -44,6 +46,7 @@ declare module 'await' {
|
|
|
44
46
|
children?: NativeView;
|
|
45
47
|
},
|
|
46
48
|
): NativeView;
|
|
49
|
+
/** Displays a solid color and expands to fill the available space. */
|
|
47
50
|
export function Color(
|
|
48
51
|
props: ColorValue &
|
|
49
52
|
ID &
|
|
@@ -51,6 +54,7 @@ declare module 'await' {
|
|
|
51
54
|
children?: never;
|
|
52
55
|
},
|
|
53
56
|
): NativeView;
|
|
57
|
+
/** Displays text and can contain nested `Text` or `Image` views. */
|
|
54
58
|
export function Text(
|
|
55
59
|
props: TextValue &
|
|
56
60
|
ID &
|
|
@@ -58,6 +62,7 @@ declare module 'await' {
|
|
|
58
62
|
children?: NativeView;
|
|
59
63
|
},
|
|
60
64
|
): NativeView;
|
|
65
|
+
/** Displays an automatically updating clock or countdown. */
|
|
61
66
|
export function Time(
|
|
62
67
|
props: TimeValue &
|
|
63
68
|
ID &
|
|
@@ -79,13 +84,15 @@ declare module 'await' {
|
|
|
79
84
|
children?: never;
|
|
80
85
|
},
|
|
81
86
|
): NativeView;
|
|
87
|
+
/** Displays an image from a local or remote path, or renders child views as an image. Avoid large or complex child content due to system limits. */
|
|
82
88
|
export function Image(
|
|
83
89
|
props: ImageValue &
|
|
84
90
|
ID &
|
|
85
91
|
Mods & {
|
|
86
|
-
children?:
|
|
92
|
+
children?: NativeView;
|
|
87
93
|
},
|
|
88
94
|
): NativeView;
|
|
95
|
+
/** Displays a system SF Symbol. */
|
|
89
96
|
export function Icon(
|
|
90
97
|
props: IconValue &
|
|
91
98
|
ID &
|
|
@@ -93,6 +100,7 @@ declare module 'await' {
|
|
|
93
100
|
children?: never;
|
|
94
101
|
},
|
|
95
102
|
): NativeView;
|
|
103
|
+
/** Displays an SVG from a local or remote path, or from raw SVG markup. */
|
|
96
104
|
export function Svg(
|
|
97
105
|
props: SvgValue &
|
|
98
106
|
ID &
|
|
@@ -100,6 +108,7 @@ declare module 'await' {
|
|
|
100
108
|
children?: never;
|
|
101
109
|
},
|
|
102
110
|
): NativeView;
|
|
111
|
+
/** Draws a rounded rectangle that expands to fill the available space. */
|
|
103
112
|
export function RoundedRectangle(
|
|
104
113
|
props: RoundedRectangleValue &
|
|
105
114
|
ShapeValue &
|
|
@@ -108,6 +117,7 @@ declare module 'await' {
|
|
|
108
117
|
children?: never;
|
|
109
118
|
},
|
|
110
119
|
): NativeView;
|
|
120
|
+
/** Draws a rounded rectangle with independently configurable corners that expands to fill the available space. */
|
|
111
121
|
export function UnevenRoundedRectangle(
|
|
112
122
|
props: UnevenRoundedRectangleValue &
|
|
113
123
|
ShapeValue &
|
|
@@ -116,6 +126,7 @@ declare module 'await' {
|
|
|
116
126
|
children?: never;
|
|
117
127
|
},
|
|
118
128
|
): NativeView;
|
|
129
|
+
/** Draws a rectangle that expands to fill the available space. */
|
|
119
130
|
export function Rectangle(
|
|
120
131
|
props: ShapeValue &
|
|
121
132
|
ID &
|
|
@@ -123,6 +134,7 @@ declare module 'await' {
|
|
|
123
134
|
children?: never;
|
|
124
135
|
},
|
|
125
136
|
): NativeView;
|
|
137
|
+
/** Draws a circular sector that expands to fill the available space. */
|
|
126
138
|
export function Sector(
|
|
127
139
|
props: SectorValue &
|
|
128
140
|
ShapeValue &
|
|
@@ -131,6 +143,7 @@ declare module 'await' {
|
|
|
131
143
|
children?: never;
|
|
132
144
|
},
|
|
133
145
|
): NativeView;
|
|
146
|
+
/** Draws an ellipse that expands to fill the available space. */
|
|
134
147
|
export function Ellipse(
|
|
135
148
|
props: ShapeValue &
|
|
136
149
|
ID &
|
|
@@ -138,6 +151,7 @@ declare module 'await' {
|
|
|
138
151
|
children?: never;
|
|
139
152
|
},
|
|
140
153
|
): NativeView;
|
|
154
|
+
/** Draws a circle that expands to fill the available space. */
|
|
141
155
|
export function Circle(
|
|
142
156
|
props: ShapeValue &
|
|
143
157
|
ID &
|
|
@@ -145,6 +159,7 @@ declare module 'await' {
|
|
|
145
159
|
children?: never;
|
|
146
160
|
},
|
|
147
161
|
): NativeView;
|
|
162
|
+
/** Draws a polygon that expands to fill the available space. */
|
|
148
163
|
export function Polygon(
|
|
149
164
|
props: PolygonValue &
|
|
150
165
|
ShapeValue &
|
|
@@ -153,6 +168,7 @@ declare module 'await' {
|
|
|
153
168
|
children?: never;
|
|
154
169
|
},
|
|
155
170
|
): NativeView;
|
|
171
|
+
/** Draws a diamond that expands to fill the available space. */
|
|
156
172
|
export function Diamond(
|
|
157
173
|
props: ShapeValue &
|
|
158
174
|
ID &
|
|
@@ -160,6 +176,7 @@ declare module 'await' {
|
|
|
160
176
|
children?: never;
|
|
161
177
|
},
|
|
162
178
|
): NativeView;
|
|
179
|
+
/** Draws a capsule that expands to fill the available space. */
|
|
163
180
|
export function Capsule(
|
|
164
181
|
props: CapsuleValue &
|
|
165
182
|
ShapeValue &
|
|
@@ -168,6 +185,7 @@ declare module 'await' {
|
|
|
168
185
|
children?: never;
|
|
169
186
|
},
|
|
170
187
|
): NativeView;
|
|
188
|
+
/** Adds flexible space within an `HStack` or `VStack`, expanding to fill the available space. */
|
|
171
189
|
export function Spacer(
|
|
172
190
|
props: SpacerValue &
|
|
173
191
|
ID &
|
|
@@ -181,6 +199,7 @@ declare module 'await' {
|
|
|
181
199
|
children?: NativeView;
|
|
182
200
|
},
|
|
183
201
|
): NativeView;
|
|
202
|
+
/** Creates a modifier for use in a `CustomButtonStyle`. */
|
|
184
203
|
export function Modifier(
|
|
185
204
|
props: ID &
|
|
186
205
|
Mods & {
|
|
@@ -193,6 +212,7 @@ declare module 'await' {
|
|
|
193
212
|
children?: never;
|
|
194
213
|
},
|
|
195
214
|
): NativeView;
|
|
215
|
+
/** Creates a transparent button that expands to fill the available space. */
|
|
196
216
|
export function FullButton(
|
|
197
217
|
props: ButtonValue &
|
|
198
218
|
ID &
|
|
@@ -200,12 +220,14 @@ declare module 'await' {
|
|
|
200
220
|
children?: never;
|
|
201
221
|
},
|
|
202
222
|
): NativeView;
|
|
223
|
+
/** Displays a random number for debugging. */
|
|
203
224
|
export function Stamp(
|
|
204
225
|
props: ID &
|
|
205
226
|
Mods & {
|
|
206
227
|
children?: never;
|
|
207
228
|
},
|
|
208
229
|
): NativeView;
|
|
230
|
+
/** Creates a vertical page-flip effect. */
|
|
209
231
|
export function VFlip(
|
|
210
232
|
props: FlipValue &
|
|
211
233
|
ID &
|
|
@@ -213,27 +235,31 @@ declare module 'await' {
|
|
|
213
235
|
children?: never;
|
|
214
236
|
},
|
|
215
237
|
): NativeView;
|
|
216
|
-
|
|
217
|
-
|
|
238
|
+
/** Creates a horizontal page-flip effect. */
|
|
239
|
+
export function HFlip(
|
|
240
|
+
props: FlipValue &
|
|
218
241
|
ID &
|
|
219
242
|
Mods & {
|
|
220
243
|
children?: never;
|
|
221
244
|
},
|
|
222
245
|
): NativeView;
|
|
223
|
-
|
|
246
|
+
/** Creates a flip transition around the x-axis. */
|
|
247
|
+
export function XFlip(
|
|
224
248
|
props: AxisFlipValue &
|
|
225
249
|
ID &
|
|
226
250
|
Mods & {
|
|
227
251
|
children?: never;
|
|
228
252
|
},
|
|
229
253
|
): NativeView;
|
|
230
|
-
|
|
231
|
-
|
|
254
|
+
/** Creates a flip transition around the y-axis. */
|
|
255
|
+
export function YFlip(
|
|
256
|
+
props: AxisFlipValue &
|
|
232
257
|
ID &
|
|
233
258
|
Mods & {
|
|
234
259
|
children?: never;
|
|
235
260
|
},
|
|
236
261
|
): NativeView;
|
|
262
|
+
/** Creates a GIF-like animation with limited system support. Only specific durations are available, transparency is not supported directly, and frame dimensions and count should remain small. */
|
|
237
263
|
export function Gif(
|
|
238
264
|
props: GifValue &
|
|
239
265
|
ID &
|
|
@@ -241,17 +267,17 @@ declare module 'await' {
|
|
|
241
267
|
children: NativeView[];
|
|
242
268
|
},
|
|
243
269
|
): NativeView;
|
|
244
|
-
/**
|
|
245
|
-
export function
|
|
246
|
-
props:
|
|
270
|
+
/** Cycles through a sequence of views based on the selected time unit, enabling effects such as a ticking second hand. Available on iOS 26 and later. */
|
|
271
|
+
export function Ticker(
|
|
272
|
+
props: TickerValue &
|
|
247
273
|
ID &
|
|
248
274
|
Mods & {
|
|
249
275
|
children: NativeView[];
|
|
250
276
|
},
|
|
251
277
|
): NativeView;
|
|
252
|
-
/** Available on iOS
|
|
253
|
-
export function
|
|
254
|
-
props:
|
|
278
|
+
/** Cycles through a sequence of views once per second, enabling effects such as a ticking second hand. It is less efficient than `Ticker`. Available on iOS 18 and earlier. */
|
|
279
|
+
export function ClockSecond(
|
|
280
|
+
props: ClockSecondValue &
|
|
255
281
|
ID &
|
|
256
282
|
Mods & {
|
|
257
283
|
children: NativeView[];
|
package/types/meta.d.ts
CHANGED
|
@@ -118,6 +118,7 @@ type Padding =
|
|
|
118
118
|
|
|
119
119
|
type RadialGradient = {
|
|
120
120
|
gradient: 'radial';
|
|
121
|
+
color?: Color;
|
|
121
122
|
colors?: Color[];
|
|
122
123
|
stops?: Array<[Color, number]>;
|
|
123
124
|
startRadius?: number;
|
|
@@ -126,6 +127,7 @@ type RadialGradient = {
|
|
|
126
127
|
|
|
127
128
|
type AngularGradient = {
|
|
128
129
|
gradient: 'angular';
|
|
130
|
+
color?: Color;
|
|
129
131
|
colors?: Color[];
|
|
130
132
|
stops?: Array<[Color, number]>;
|
|
131
133
|
angle?: number;
|
|
@@ -134,6 +136,7 @@ type AngularGradient = {
|
|
|
134
136
|
|
|
135
137
|
type LinearGradient = {
|
|
136
138
|
gradient: 'linear';
|
|
139
|
+
color?: Color;
|
|
137
140
|
colors?: Color[];
|
|
138
141
|
stops?: Stop[];
|
|
139
142
|
startPoint?: UnitPoint;
|
|
@@ -424,3 +427,93 @@ type strikethrough =
|
|
|
424
427
|
isActive?: boolean;
|
|
425
428
|
color?: Color;
|
|
426
429
|
};
|
|
430
|
+
|
|
431
|
+
type DateFormatYearToken = {
|
|
432
|
+
field: 'year';
|
|
433
|
+
style?: 'default' | 'twoDigits';
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
type DateFormatQuarterToken = {
|
|
437
|
+
field: 'quarter';
|
|
438
|
+
values: [
|
|
439
|
+
firstQuarter: string,
|
|
440
|
+
secondQuarter: string,
|
|
441
|
+
thirdQuarter: string,
|
|
442
|
+
fourthQuarter: string,
|
|
443
|
+
];
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
type DateFormatMonthToken = {
|
|
447
|
+
field: 'month';
|
|
448
|
+
style?: 'default' | 'twoDigits' | 'short' | 'long';
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
type DateFormatDayToken = {
|
|
452
|
+
field: 'day';
|
|
453
|
+
style?: 'default' | 'twoDigits';
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
type DateFormatDayOfYearToken = {
|
|
457
|
+
field: 'dayOfYear';
|
|
458
|
+
style?: 'default' | 'twoDigits' | 'threeDigits';
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
type DateFormatWeekdayToken = {
|
|
462
|
+
field: 'weekday';
|
|
463
|
+
values: [
|
|
464
|
+
monday: string,
|
|
465
|
+
tuesday: string,
|
|
466
|
+
wednesday: string,
|
|
467
|
+
thursday: string,
|
|
468
|
+
friday: string,
|
|
469
|
+
saturday: string,
|
|
470
|
+
sunday: string,
|
|
471
|
+
];
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
type DateFormatHourToken = {
|
|
475
|
+
field: 'hour';
|
|
476
|
+
style?: 'default' | 'twoDigits';
|
|
477
|
+
/** Omit to use the system hour cycle. */
|
|
478
|
+
cycle?: 12 | 24;
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
type DateFormatMinuteToken = {
|
|
482
|
+
field: 'minute';
|
|
483
|
+
style?: 'default' | 'twoDigits';
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
type DateFormatSecondToken = {
|
|
487
|
+
field: 'second';
|
|
488
|
+
style?: 'default' | 'twoDigits';
|
|
489
|
+
};
|
|
490
|
+
|
|
491
|
+
type DateFormatFractionalSecondToken = {
|
|
492
|
+
field: 'fractionalSecond';
|
|
493
|
+
digits: 1 | 2 | 3;
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
type DateFormatAMPMToken = {
|
|
497
|
+
field: 'ampm';
|
|
498
|
+
values?: [am: string, pm: string];
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
type DateFormatTimeZoneToken = {
|
|
502
|
+
field: 'zone';
|
|
503
|
+
style?: 'short' | 'long' | 'identifier' | 'city';
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
type DateFormatToken =
|
|
507
|
+
| string
|
|
508
|
+
| DateFormatYearToken
|
|
509
|
+
| DateFormatQuarterToken
|
|
510
|
+
| DateFormatMonthToken
|
|
511
|
+
| DateFormatDayToken
|
|
512
|
+
| DateFormatDayOfYearToken
|
|
513
|
+
| DateFormatWeekdayToken
|
|
514
|
+
| DateFormatHourToken
|
|
515
|
+
| DateFormatMinuteToken
|
|
516
|
+
| DateFormatSecondToken
|
|
517
|
+
| DateFormatFractionalSecondToken
|
|
518
|
+
| DateFormatAMPMToken
|
|
519
|
+
| DateFormatTimeZoneToken;
|
package/types/prop.d.ts
CHANGED
|
@@ -125,11 +125,20 @@ type IconValue = {
|
|
|
125
125
|
value?: string;
|
|
126
126
|
};
|
|
127
127
|
|
|
128
|
-
type TimeValue =
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
128
|
+
type TimeValue =
|
|
129
|
+
| {
|
|
130
|
+
/** IANA time-zone identifier. Omit to use the system time zone. */
|
|
131
|
+
timezone?: string;
|
|
132
|
+
format?: DateFormatToken[];
|
|
133
|
+
date?: never;
|
|
134
|
+
style?: never;
|
|
135
|
+
}
|
|
136
|
+
| {
|
|
137
|
+
timezone?: never;
|
|
138
|
+
format?: never;
|
|
139
|
+
date?: Date;
|
|
140
|
+
style?: TimeStyle;
|
|
141
|
+
};
|
|
133
142
|
|
|
134
143
|
type ProgressViewValue = {
|
|
135
144
|
value: number | [start: Date, end: Date];
|