@await-widget/runtime 0.0.33 → 0.0.35

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@await-widget/runtime",
3
- "version": "0.0.33",
3
+ "version": "0.0.35",
4
4
  "description": "TypeScript declarations for Await widgets.",
5
5
  "license": "MIT",
6
6
  "author": "Maundy",
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?: never;
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
- export function XFlip(
217
- props: AxisFlipValue &
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
- export function YFlip(
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
- export function HFlip(
231
- props: FlipValue &
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,15 +267,7 @@ declare module 'await' {
241
267
  children: NativeView[];
242
268
  },
243
269
  ): NativeView;
244
- /** This is a fallback for Ticker on iOS 18 and earlier. */
245
- export function ClockSecond(
246
- props: ClockSecondValue &
247
- ID &
248
- Mods & {
249
- children: NativeView[];
250
- },
251
- ): NativeView;
252
- /** Available on iOS 26 and later. */
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. */
253
271
  export function Ticker(
254
272
  props: TickerValue &
255
273
  ID &
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,67 @@ 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 DateFormatMonthToken = {
437
+ field: 'month';
438
+ style?: 'default' | 'twoDigits' | 'short' | 'long';
439
+ };
440
+
441
+ type DateFormatDayToken = {
442
+ field: 'day';
443
+ style?: 'default' | 'twoDigits';
444
+ };
445
+
446
+ type DateFormatDayOfYearToken = {
447
+ field: 'dayOfYear';
448
+ style?: 'default' | 'twoDigits' | 'threeDigits';
449
+ };
450
+
451
+ type DateFormatHourToken = {
452
+ field: 'hour';
453
+ style?: 'default' | 'twoDigits';
454
+ /** Omit to use the system hour cycle. */
455
+ cycle?: 12 | 24;
456
+ };
457
+
458
+ type DateFormatMinuteToken = {
459
+ field: 'minute';
460
+ style?: 'default' | 'twoDigits';
461
+ };
462
+
463
+ type DateFormatSecondToken = {
464
+ field: 'second';
465
+ style?: 'default' | 'twoDigits';
466
+ };
467
+
468
+ type DateFormatFractionalSecondToken = {
469
+ field: 'fractionalSecond';
470
+ digits: 1 | 2 | 3;
471
+ };
472
+
473
+ type DateFormatAMPMToken = {
474
+ field: 'ampm';
475
+ };
476
+
477
+ type DateFormatTimeZoneToken = {
478
+ field: 'zone';
479
+ style?: 'short' | 'long' | 'identifier' | 'city';
480
+ };
481
+
482
+ type DateFormatToken =
483
+ | string
484
+ | DateFormatYearToken
485
+ | DateFormatMonthToken
486
+ | DateFormatDayToken
487
+ | DateFormatDayOfYearToken
488
+ | DateFormatHourToken
489
+ | DateFormatMinuteToken
490
+ | DateFormatSecondToken
491
+ | DateFormatFractionalSecondToken
492
+ | DateFormatAMPMToken
493
+ | DateFormatTimeZoneToken;
package/types/prop.d.ts CHANGED
@@ -118,6 +118,8 @@ type ImageValue = {
118
118
  style?: TemplateRenderingMode;
119
119
  /** The mode that indicates how images are rendered on widget accented mode */
120
120
  accented?: Accented;
121
+ /** The maximum number of pixels along the image's longest edge. Defaults to 1000. */
122
+ maxPixel?: number;
121
123
  };
122
124
 
123
125
  type IconValue = {
@@ -125,11 +127,20 @@ type IconValue = {
125
127
  value?: string;
126
128
  };
127
129
 
128
- type TimeValue = {
129
- date?: Date;
130
- /** Use `timer` to update once per second. */
131
- style?: TimeStyle;
132
- };
130
+ type TimeValue =
131
+ | {
132
+ /** IANA time-zone identifier. Omit to use the system time zone. */
133
+ timeZone?: string;
134
+ format?: DateFormatToken[];
135
+ date?: never;
136
+ style?: never;
137
+ }
138
+ | {
139
+ timeZone?: never;
140
+ format?: never;
141
+ date?: Date;
142
+ style?: TimeStyle;
143
+ };
133
144
 
134
145
  type ProgressViewValue = {
135
146
  value: number | [start: Date, end: Date];