@monimesl/dot-core 0.1.0-alpha.3 → 0.1.0-alpha.5
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/index.d.ts +187 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +195 -20
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -54,6 +54,18 @@ type PropsOf<M extends ComponentManifest, Children = never> = { [K in keyof M['p
|
|
|
54
54
|
type ComponentRegistry = Readonly<Record<string, ComponentManifest>>;
|
|
55
55
|
export declare function componentRegistry(manifests: Iterable<ComponentManifest>): ComponentRegistry;
|
|
56
56
|
//#endregion
|
|
57
|
+
//#region src/view/components/amount-input.d.ts
|
|
58
|
+
export declare const AmountInput: ComponentManifest<"AmountInput", {
|
|
59
|
+
readonly value: "number";
|
|
60
|
+
readonly currency: "string";
|
|
61
|
+
readonly decimals: "number";
|
|
62
|
+
readonly label: "string";
|
|
63
|
+
readonly placeholder: "string";
|
|
64
|
+
readonly hint: "string";
|
|
65
|
+
readonly error: "string";
|
|
66
|
+
readonly disabled: "boolean";
|
|
67
|
+
}, "change", "none">;
|
|
68
|
+
//#endregion
|
|
57
69
|
//#region src/view/components/button.d.ts
|
|
58
70
|
export declare const Button: ComponentManifest<"Button", {
|
|
59
71
|
readonly variant: readonly ["primary", "secondary"];
|
|
@@ -61,9 +73,46 @@ export declare const Button: ComponentManifest<"Button", {
|
|
|
61
73
|
readonly loading: "boolean";
|
|
62
74
|
}, "click", "text">;
|
|
63
75
|
//#endregion
|
|
76
|
+
//#region src/view/components/carousel.d.ts
|
|
77
|
+
export declare const Carousel: ComponentManifest<"Carousel", {
|
|
78
|
+
readonly autoplay: "boolean";
|
|
79
|
+
readonly interval: "number";
|
|
80
|
+
readonly loop: "boolean";
|
|
81
|
+
readonly indicator: readonly ["dots", "none"];
|
|
82
|
+
readonly gap: readonly ["none", "small", "medium", "large"];
|
|
83
|
+
readonly effect: readonly ["slide", "scale"];
|
|
84
|
+
readonly index: "number";
|
|
85
|
+
}, "change", "elements">;
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/view/components/chip.d.ts
|
|
88
|
+
export declare const Chip: ComponentManifest<"Chip", {
|
|
89
|
+
readonly label: "string";
|
|
90
|
+
readonly icon: readonly ["arrow-down", "arrow-left", "arrow-right", "arrow-up", "bank", "bell", "bolt", "calendar", "card", "cart", "cash", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "copy", "download", "edit", "error", "eye", "eye-off", "file", "gift", "grid", "heart", "help", "history", "home", "image", "info", "list", "location", "lock", "logout", "mail", "minus", "mobile", "more", "phone", "plus", "qr-code", "receipt", "refresh", "search", "send", "settings", "share", "star", "success", "trash", "upload", "user", "users", "wallet", "warning", "water", "wifi"];
|
|
91
|
+
readonly selected: "boolean";
|
|
92
|
+
readonly disabled: "boolean";
|
|
93
|
+
}, "tap", "none">;
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/view/components/code-input.d.ts
|
|
96
|
+
export declare const CodeInput: ComponentManifest<"CodeInput", {
|
|
97
|
+
readonly value: "string";
|
|
98
|
+
readonly length: "number";
|
|
99
|
+
readonly label: "string";
|
|
100
|
+
readonly hint: "string";
|
|
101
|
+
readonly error: "string";
|
|
102
|
+
readonly secure: "boolean";
|
|
103
|
+
readonly disabled: "boolean";
|
|
104
|
+
}, "change" | "complete", "none">;
|
|
105
|
+
//#endregion
|
|
64
106
|
//#region src/view/components/divider.d.ts
|
|
65
107
|
export declare const Divider: ComponentManifest<"Divider", Record<never, PropType>, never, "none">;
|
|
66
108
|
//#endregion
|
|
109
|
+
//#region src/view/components/empty-state.d.ts
|
|
110
|
+
export declare const EmptyState: ComponentManifest<"EmptyState", {
|
|
111
|
+
readonly icon: readonly ["arrow-down", "arrow-left", "arrow-right", "arrow-up", "bank", "bell", "bolt", "calendar", "card", "cart", "cash", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "copy", "download", "edit", "error", "eye", "eye-off", "file", "gift", "grid", "heart", "help", "history", "home", "image", "info", "list", "location", "lock", "logout", "mail", "minus", "mobile", "more", "phone", "plus", "qr-code", "receipt", "refresh", "search", "send", "settings", "share", "star", "success", "trash", "upload", "user", "users", "wallet", "warning", "water", "wifi"];
|
|
112
|
+
readonly title: "string";
|
|
113
|
+
readonly text: "string";
|
|
114
|
+
}, never, "elements">;
|
|
115
|
+
//#endregion
|
|
67
116
|
//#region src/view/components/feedback.d.ts
|
|
68
117
|
export declare const Spinner: ComponentManifest<"Spinner", {
|
|
69
118
|
readonly size: readonly ["small", "medium", "large"];
|
|
@@ -82,6 +131,18 @@ export declare const Badge: ComponentManifest<"Badge", {
|
|
|
82
131
|
//#region src/view/components/footer.d.ts
|
|
83
132
|
export declare const Footer: ComponentManifest<"Footer", Record<never, PropType>, never, "elements">;
|
|
84
133
|
//#endregion
|
|
134
|
+
//#region src/view/components/grid.d.ts
|
|
135
|
+
export declare const Grid: ComponentManifest<"Grid", {
|
|
136
|
+
readonly columns: "number";
|
|
137
|
+
readonly gap: readonly ["none", "small", "medium", "large"];
|
|
138
|
+
}, never, "elements">;
|
|
139
|
+
export declare const GridItem: ComponentManifest<"GridItem", {
|
|
140
|
+
readonly label: "string";
|
|
141
|
+
readonly icon: readonly ["arrow-down", "arrow-left", "arrow-right", "arrow-up", "bank", "bell", "bolt", "calendar", "card", "cart", "cash", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "copy", "download", "edit", "error", "eye", "eye-off", "file", "gift", "grid", "heart", "help", "history", "home", "image", "info", "list", "location", "lock", "logout", "mail", "minus", "mobile", "more", "phone", "plus", "qr-code", "receipt", "refresh", "search", "send", "settings", "share", "star", "success", "trash", "upload", "user", "users", "wallet", "warning", "water", "wifi"];
|
|
142
|
+
readonly image: "string";
|
|
143
|
+
readonly badge: "string";
|
|
144
|
+
}, "tap", "none">;
|
|
145
|
+
//#endregion
|
|
85
146
|
//#region src/view/components/icon.d.ts
|
|
86
147
|
export declare const Icon: ComponentManifest<"Icon", {
|
|
87
148
|
readonly name: readonly ["arrow-down", "arrow-left", "arrow-right", "arrow-up", "bank", "bell", "bolt", "calendar", "card", "cart", "cash", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "copy", "download", "edit", "error", "eye", "eye-off", "file", "gift", "grid", "heart", "help", "history", "home", "image", "info", "list", "location", "lock", "logout", "mail", "minus", "mobile", "more", "phone", "plus", "qr-code", "receipt", "refresh", "search", "send", "settings", "share", "star", "success", "trash", "upload", "user", "users", "wallet", "warning", "water", "wifi"];
|
|
@@ -114,7 +175,9 @@ export declare const Input: ComponentManifest<"Input", {
|
|
|
114
175
|
}, "change" | "submit", "none">;
|
|
115
176
|
//#endregion
|
|
116
177
|
//#region src/view/components/list.d.ts
|
|
117
|
-
export declare const List: ComponentManifest<"List",
|
|
178
|
+
export declare const List: ComponentManifest<"List", {
|
|
179
|
+
readonly size: readonly ["sm", "md"];
|
|
180
|
+
}, never, "elements">;
|
|
118
181
|
export declare const ListItem: ComponentManifest<"ListItem", {
|
|
119
182
|
readonly title: "string";
|
|
120
183
|
readonly subtitle: "string";
|
|
@@ -127,6 +190,7 @@ export declare const ListItem: ComponentManifest<"ListItem", {
|
|
|
127
190
|
export declare const Sheet: ComponentManifest<"Sheet", {
|
|
128
191
|
readonly open: "boolean";
|
|
129
192
|
readonly title: "string";
|
|
193
|
+
readonly showCloseIcon: "boolean";
|
|
130
194
|
}, "close", "elements">;
|
|
131
195
|
export declare const Toast: ComponentManifest<"Toast", {
|
|
132
196
|
readonly message: "string";
|
|
@@ -134,6 +198,13 @@ export declare const Toast: ComponentManifest<"Toast", {
|
|
|
134
198
|
readonly duration: "number";
|
|
135
199
|
}, "hide", "none">;
|
|
136
200
|
//#endregion
|
|
201
|
+
//#region src/view/components/qr-code.d.ts
|
|
202
|
+
export declare const QRCode: ComponentManifest<"QRCode", {
|
|
203
|
+
readonly value: "string";
|
|
204
|
+
readonly size: "number";
|
|
205
|
+
readonly label: "string";
|
|
206
|
+
}, never, "none">;
|
|
207
|
+
//#endregion
|
|
137
208
|
//#region src/view/components/select.d.ts
|
|
138
209
|
export declare const Select: ComponentManifest<"Select", {
|
|
139
210
|
readonly value: "string";
|
|
@@ -155,6 +226,17 @@ export declare const Skeleton: ComponentManifest<"Skeleton", {
|
|
|
155
226
|
readonly height: "number";
|
|
156
227
|
}, never, "none">;
|
|
157
228
|
//#endregion
|
|
229
|
+
//#region src/view/components/tabs.d.ts
|
|
230
|
+
export declare const Tabs: ComponentManifest<"Tabs", {
|
|
231
|
+
readonly value: "string";
|
|
232
|
+
readonly variant: readonly ["underline", "segmented"];
|
|
233
|
+
}, "change", "elements">;
|
|
234
|
+
export declare const Tab: ComponentManifest<"Tab", {
|
|
235
|
+
readonly value: "string";
|
|
236
|
+
readonly label: "string";
|
|
237
|
+
readonly badge: "number";
|
|
238
|
+
}, never, "none">;
|
|
239
|
+
//#endregion
|
|
158
240
|
//#region src/view/components/text.d.ts
|
|
159
241
|
export declare const Text: ComponentManifest<"Text", {
|
|
160
242
|
readonly variant: readonly ["title", "body", "caption"];
|
|
@@ -223,6 +305,16 @@ type IconName = (typeof ICON_NAMES)[number];
|
|
|
223
305
|
//#endregion
|
|
224
306
|
//#region src/view/components/index.d.ts
|
|
225
307
|
export declare const builtinComponents: {
|
|
308
|
+
readonly AmountInput: ComponentManifest<"AmountInput", {
|
|
309
|
+
readonly value: "number";
|
|
310
|
+
readonly currency: "string";
|
|
311
|
+
readonly decimals: "number";
|
|
312
|
+
readonly label: "string";
|
|
313
|
+
readonly placeholder: "string";
|
|
314
|
+
readonly hint: "string";
|
|
315
|
+
readonly error: "string";
|
|
316
|
+
readonly disabled: "boolean";
|
|
317
|
+
}, "change", "none">;
|
|
226
318
|
readonly Badge: ComponentManifest<"Badge", {
|
|
227
319
|
readonly tone: readonly ["default", "info", "success", "warning", "danger"];
|
|
228
320
|
}, never, "text">;
|
|
@@ -231,13 +323,52 @@ export declare const builtinComponents: {
|
|
|
231
323
|
readonly disabled: "boolean";
|
|
232
324
|
readonly loading: "boolean";
|
|
233
325
|
}, "click", "text">;
|
|
326
|
+
readonly Carousel: ComponentManifest<"Carousel", {
|
|
327
|
+
readonly autoplay: "boolean";
|
|
328
|
+
readonly interval: "number";
|
|
329
|
+
readonly loop: "boolean";
|
|
330
|
+
readonly indicator: readonly ["dots", "none"];
|
|
331
|
+
readonly gap: readonly ["none", "small", "medium", "large"];
|
|
332
|
+
readonly effect: readonly ["slide", "scale"];
|
|
333
|
+
readonly index: "number";
|
|
334
|
+
}, "change", "elements">;
|
|
234
335
|
readonly Checkbox: ComponentManifest<"Checkbox", {
|
|
235
336
|
readonly checked: "boolean";
|
|
236
337
|
readonly label: "string";
|
|
237
338
|
readonly disabled: "boolean";
|
|
238
339
|
}, "change", "none">;
|
|
340
|
+
readonly Chip: ComponentManifest<"Chip", {
|
|
341
|
+
readonly label: "string";
|
|
342
|
+
readonly icon: readonly ["arrow-down", "arrow-left", "arrow-right", "arrow-up", "bank", "bell", "bolt", "calendar", "card", "cart", "cash", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "copy", "download", "edit", "error", "eye", "eye-off", "file", "gift", "grid", "heart", "help", "history", "home", "image", "info", "list", "location", "lock", "logout", "mail", "minus", "mobile", "more", "phone", "plus", "qr-code", "receipt", "refresh", "search", "send", "settings", "share", "star", "success", "trash", "upload", "user", "users", "wallet", "warning", "water", "wifi"];
|
|
343
|
+
readonly selected: "boolean";
|
|
344
|
+
readonly disabled: "boolean";
|
|
345
|
+
}, "tap", "none">;
|
|
346
|
+
readonly CodeInput: ComponentManifest<"CodeInput", {
|
|
347
|
+
readonly value: "string";
|
|
348
|
+
readonly length: "number";
|
|
349
|
+
readonly label: "string";
|
|
350
|
+
readonly hint: "string";
|
|
351
|
+
readonly error: "string";
|
|
352
|
+
readonly secure: "boolean";
|
|
353
|
+
readonly disabled: "boolean";
|
|
354
|
+
}, "change" | "complete", "none">;
|
|
239
355
|
readonly Divider: ComponentManifest<"Divider", Record<never, PropType>, never, "none">;
|
|
356
|
+
readonly EmptyState: ComponentManifest<"EmptyState", {
|
|
357
|
+
readonly icon: readonly ["arrow-down", "arrow-left", "arrow-right", "arrow-up", "bank", "bell", "bolt", "calendar", "card", "cart", "cash", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "copy", "download", "edit", "error", "eye", "eye-off", "file", "gift", "grid", "heart", "help", "history", "home", "image", "info", "list", "location", "lock", "logout", "mail", "minus", "mobile", "more", "phone", "plus", "qr-code", "receipt", "refresh", "search", "send", "settings", "share", "star", "success", "trash", "upload", "user", "users", "wallet", "warning", "water", "wifi"];
|
|
358
|
+
readonly title: "string";
|
|
359
|
+
readonly text: "string";
|
|
360
|
+
}, never, "elements">;
|
|
240
361
|
readonly Footer: ComponentManifest<"Footer", Record<never, PropType>, never, "elements">;
|
|
362
|
+
readonly Grid: ComponentManifest<"Grid", {
|
|
363
|
+
readonly columns: "number";
|
|
364
|
+
readonly gap: readonly ["none", "small", "medium", "large"];
|
|
365
|
+
}, never, "elements">;
|
|
366
|
+
readonly GridItem: ComponentManifest<"GridItem", {
|
|
367
|
+
readonly label: "string";
|
|
368
|
+
readonly icon: readonly ["arrow-down", "arrow-left", "arrow-right", "arrow-up", "bank", "bell", "bolt", "calendar", "card", "cart", "cash", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "copy", "download", "edit", "error", "eye", "eye-off", "file", "gift", "grid", "heart", "help", "history", "home", "image", "info", "list", "location", "lock", "logout", "mail", "minus", "mobile", "more", "phone", "plus", "qr-code", "receipt", "refresh", "search", "send", "settings", "share", "star", "success", "trash", "upload", "user", "users", "wallet", "warning", "water", "wifi"];
|
|
369
|
+
readonly image: "string";
|
|
370
|
+
readonly badge: "string";
|
|
371
|
+
}, "tap", "none">;
|
|
241
372
|
readonly Icon: ComponentManifest<"Icon", {
|
|
242
373
|
readonly name: readonly ["arrow-down", "arrow-left", "arrow-right", "arrow-up", "bank", "bell", "bolt", "calendar", "card", "cart", "cash", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "copy", "download", "edit", "error", "eye", "eye-off", "file", "gift", "grid", "heart", "help", "history", "home", "image", "info", "list", "location", "lock", "logout", "mail", "minus", "mobile", "more", "phone", "plus", "qr-code", "receipt", "refresh", "search", "send", "settings", "share", "star", "success", "trash", "upload", "user", "users", "wallet", "warning", "water", "wifi"];
|
|
243
374
|
readonly size: readonly ["small", "medium", "large"];
|
|
@@ -263,7 +394,9 @@ export declare const builtinComponents: {
|
|
|
263
394
|
readonly maxLength: "number";
|
|
264
395
|
readonly disabled: "boolean";
|
|
265
396
|
}, "change" | "submit", "none">;
|
|
266
|
-
readonly List: ComponentManifest<"List",
|
|
397
|
+
readonly List: ComponentManifest<"List", {
|
|
398
|
+
readonly size: readonly ["sm", "md"];
|
|
399
|
+
}, never, "elements">;
|
|
267
400
|
readonly ListItem: ComponentManifest<"ListItem", {
|
|
268
401
|
readonly title: "string";
|
|
269
402
|
readonly subtitle: "string";
|
|
@@ -282,6 +415,11 @@ export declare const builtinComponents: {
|
|
|
282
415
|
readonly ProgressBar: ComponentManifest<"ProgressBar", {
|
|
283
416
|
readonly value: "number";
|
|
284
417
|
}, never, "none">;
|
|
418
|
+
readonly QRCode: ComponentManifest<"QRCode", {
|
|
419
|
+
readonly value: "string";
|
|
420
|
+
readonly size: "number";
|
|
421
|
+
readonly label: "string";
|
|
422
|
+
}, never, "none">;
|
|
285
423
|
readonly Radio: ComponentManifest<"Radio", {
|
|
286
424
|
readonly value: "string";
|
|
287
425
|
readonly label: "string";
|
|
@@ -303,6 +441,7 @@ export declare const builtinComponents: {
|
|
|
303
441
|
readonly Sheet: ComponentManifest<"Sheet", {
|
|
304
442
|
readonly open: "boolean";
|
|
305
443
|
readonly title: "string";
|
|
444
|
+
readonly showCloseIcon: "boolean";
|
|
306
445
|
}, "close", "elements">;
|
|
307
446
|
readonly Skeleton: ComponentManifest<"Skeleton", {
|
|
308
447
|
readonly shape: readonly ["text", "circle", "box"];
|
|
@@ -317,6 +456,15 @@ export declare const builtinComponents: {
|
|
|
317
456
|
readonly label: "string";
|
|
318
457
|
readonly disabled: "boolean";
|
|
319
458
|
}, "change", "none">;
|
|
459
|
+
readonly Tab: ComponentManifest<"Tab", {
|
|
460
|
+
readonly value: "string";
|
|
461
|
+
readonly label: "string";
|
|
462
|
+
readonly badge: "number";
|
|
463
|
+
}, never, "none">;
|
|
464
|
+
readonly Tabs: ComponentManifest<"Tabs", {
|
|
465
|
+
readonly value: "string";
|
|
466
|
+
readonly variant: readonly ["underline", "segmented"];
|
|
467
|
+
}, "change", "elements">;
|
|
320
468
|
readonly Text: ComponentManifest<"Text", {
|
|
321
469
|
readonly variant: readonly ["title", "body", "caption"];
|
|
322
470
|
readonly tone: readonly ["default", "muted", "info", "success", "warning", "danger"];
|
|
@@ -366,8 +514,11 @@ export declare const builtinRegistry: Readonly<Record<string, ComponentManifest<
|
|
|
366
514
|
interface Theme {
|
|
367
515
|
scheme?: ColorScheme | 'system' | undefined;
|
|
368
516
|
colors?: ThemeColors | undefined;
|
|
369
|
-
|
|
517
|
+
density?: ThemeDensity | undefined;
|
|
518
|
+
shape?: ThemeShape | undefined;
|
|
370
519
|
}
|
|
520
|
+
type ThemeDensity = 'dense' | 'compact' | 'comfortable';
|
|
521
|
+
type ThemeShape = 'square' | 'subtle' | 'soft' | 'rounded';
|
|
371
522
|
interface ThemeColors {
|
|
372
523
|
primary?: SchemeColor | undefined;
|
|
373
524
|
background?: SchemeColor | undefined;
|
|
@@ -375,14 +526,17 @@ interface ThemeColors {
|
|
|
375
526
|
text?: SchemeColor | undefined;
|
|
376
527
|
}
|
|
377
528
|
interface SchemeColor {
|
|
378
|
-
light
|
|
379
|
-
dark
|
|
529
|
+
light?: HexColor;
|
|
530
|
+
dark?: HexColor;
|
|
380
531
|
}
|
|
532
|
+
type HexColor = `#${string}`;
|
|
381
533
|
type ColorScheme = 'light' | 'dark';
|
|
382
534
|
//#endregion
|
|
383
535
|
//#region src/host/context.d.ts
|
|
384
536
|
type AppState = 'active' | 'background';
|
|
537
|
+
type Platform = 'ios' | 'android';
|
|
385
538
|
interface SystemContext {
|
|
539
|
+
readonly platform: Platform;
|
|
386
540
|
readonly scheme: ColorScheme;
|
|
387
541
|
readonly appState: AppState;
|
|
388
542
|
}
|
|
@@ -406,6 +560,29 @@ export declare function connectHost(caller: HostCaller | null): void;
|
|
|
406
560
|
export declare function callHost<Result>(method: string, params: unknown, options?: HostCallOptions): HostRequest<Result>;
|
|
407
561
|
export declare function createHostRequest<Result>(promise: Promise<Result>, cancel?: () => void): HostRequest<Result>;
|
|
408
562
|
//#endregion
|
|
563
|
+
//#region src/page/bars.d.ts
|
|
564
|
+
interface NavigationBarOptions {
|
|
565
|
+
title?: string | undefined;
|
|
566
|
+
hidden?: boolean | undefined;
|
|
567
|
+
backgroundColor?: string | undefined;
|
|
568
|
+
textColor?: string | undefined;
|
|
569
|
+
}
|
|
570
|
+
interface TabBarOptions {
|
|
571
|
+
hidden?: boolean | undefined;
|
|
572
|
+
}
|
|
573
|
+
interface PageConfigs {
|
|
574
|
+
navigationBar?: NavigationBarOptions | undefined;
|
|
575
|
+
tabBar?: TabBarOptions | undefined;
|
|
576
|
+
}
|
|
577
|
+
interface PageBars {
|
|
578
|
+
navigationBar: NavigationBarOptions;
|
|
579
|
+
tabBar: TabBarOptions;
|
|
580
|
+
}
|
|
581
|
+
export declare function checkNavigationBar(options: NavigationBarOptions): void;
|
|
582
|
+
export declare function checkTabBar(options: TabBarOptions): void;
|
|
583
|
+
export declare function checkConfigs(configs: PageConfigs): void;
|
|
584
|
+
export declare function mergeConfigs(...configs: (PageConfigs | undefined)[]): PageBars;
|
|
585
|
+
//#endregion
|
|
409
586
|
//#region src/page/navigation.d.ts
|
|
410
587
|
export declare const MAX_STACK_DEPTH = 8;
|
|
411
588
|
export declare function isPageId(value: string): boolean;
|
|
@@ -488,6 +665,9 @@ interface LogicLayerMessages {
|
|
|
488
665
|
hostCancel: {
|
|
489
666
|
id: number;
|
|
490
667
|
};
|
|
668
|
+
pageBars: {
|
|
669
|
+
instanceId: number;
|
|
670
|
+
} & PageBars;
|
|
491
671
|
}
|
|
492
672
|
interface HostLayerMessages {
|
|
493
673
|
syncStack: {
|
|
@@ -631,6 +811,7 @@ export declare const REACT_HOST_PATH = "/__dot/react/";
|
|
|
631
811
|
export declare const REACT_HOST_MODULES: {
|
|
632
812
|
readonly react: "react.js";
|
|
633
813
|
readonly 'react/jsx-runtime': "react-jsx-runtime.js";
|
|
814
|
+
readonly 'react-dom': "react-dom.js";
|
|
634
815
|
readonly 'react-dom/client': "react-dom-client.js";
|
|
635
816
|
};
|
|
636
817
|
export declare function reactHostUrl(dotReactVersion: string, file: string): string;
|
|
@@ -670,5 +851,5 @@ export declare class MessageChannel<Outgoing extends MessageMap, Incoming extend
|
|
|
670
851
|
listen(onError: (error: unknown, message: Envelope) => void): () => void;
|
|
671
852
|
}
|
|
672
853
|
//#endregion
|
|
673
|
-
export type { AppState, BuiltinComponents, ChildrenType, ColorScheme, ComponentManifest, ComponentRegistry, DotEvent, DotHooks, DotPermission, Envelope, EventProp, HostCallOptions, HostCaller, HostErrorCode, HostLayerMessages, HostRequest, HostResult, IconName, LogicLayerMessages, MessageHandler, MessageMap, MessageType, Navigation, PageHooks, PageLaunchOptions, PageState, PropType, PropTypes, PropValue, PropsOf, RenderContext, SchemeColor, SourceLocation, StackEntry, SystemContext, Theme, ThemeColors, Transport, TransportAdapter, UILayerMessages, ViewRender };
|
|
854
|
+
export type { AppState, BuiltinComponents, ChildrenType, ColorScheme, ComponentManifest, ComponentRegistry, DotEvent, DotHooks, DotPermission, Envelope, EventProp, HexColor, HostCallOptions, HostCaller, HostErrorCode, HostLayerMessages, HostRequest, HostResult, IconName, LogicLayerMessages, MessageHandler, MessageMap, MessageType, Navigation, NavigationBarOptions, PageBars, PageConfigs, PageHooks, PageLaunchOptions, PageState, Platform, PropType, PropTypes, PropValue, PropsOf, RenderContext, SchemeColor, SourceLocation, StackEntry, SystemContext, TabBarOptions, Theme, ThemeColors, ThemeDensity, ThemeShape, Transport, TransportAdapter, UILayerMessages, ViewRender };
|
|
674
855
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/event/core.ts","../src/view/component.ts","../src/view/components/button.ts","../src/view/components/divider.ts","../src/view/components/feedback.ts","../src/view/components/footer.ts","../src/view/components/icon.ts","../src/view/components/image.ts","../src/view/components/input.ts","../src/view/components/list.ts","../src/view/components/overlays.ts","../src/view/components/select.ts","../src/view/components/skeleton.ts","../src/view/components/text.ts","../src/view/components/text-area.ts","../src/view/components/toggles.ts","../src/view/components/view.ts","../src/view/components/options.ts","../src/view/components/index.ts","../src/theme/theme.ts","../src/host/context.ts","../src/host/calls.ts","../src/page/navigation.ts","../src/protocol/core.ts","../src/view/renderer.ts","../src/view/values.ts","../src/source/location.ts","../src/source/error.ts","../src/event/emitter.ts","../src/protocol/transport.ts","../src/host/host.ts","../src/host/permissions.ts","../src/host/files.ts","../src/host/network.ts","../src/host/react.ts","../src/page/lifecycle.ts","../src/page/state.ts","../src/version/semantic-version.ts","../src/messageChannel.ts"],"mappings":";UAEiB,SAAS,kBAAkB,OAAO,SAAS;WACjD;WACA,QAAQ;WACR,MAAM;;wBAGD,YAAY,SAAS,uBACnC,cACA,SAAQ,QACR,OAAM,SAAS,2BACd,SAAS;;;UCVK;EACf;EACA;EACA;EACA;;KAGU,iBAAiB;KAEjB,UAAU,UAAU,YAAY,8BACxC,YACA,gBAAgB,YACd,UAAU;;;;;;KAQJ;;;;;UAMK,kBACf,8BACA,cAAc,eAAe,YAAY,eAAe,WACxD,gCACA,iBAAiB,eAAe;WAEvB,MAAM;WACN,OAAO;WAEP,iBAAiB;WACjB,UAAU;WACV;;wBAGK,sBACR,2BACA,cAAc,eAAe,YAAY,cAAc,iBACvD,qCACA,iBAAiB,eAAe,cACtC;EACA,MAAM;EACN,QAAQ;EACR,kBAAkB;EAClB,UAAU;EACV;IACE,kBAAkB,MAAM,OAAO,QAAQ;KAI/B,UAAU,6BAA6B,WAAW;wBAE9C,UAAU,sBAAsB,OAAO,QAAQ,UAAU;wBAKzD,YAAY;wBAMZ,UAAU;;;;;;KAUd,QAAQ,UAAU,mBAAmB,uBAC9C,WAAW,cAAc,UAAU,WAAW,wBAE9C,KAAK,uBAAuB,UAAU,QAAQ,OAAO,qCACnD;EAA2C,WAAW;;KAE/C,oBAAoB,SAAS,eAAe;wBAExC,kBAAkB,WAAW,SAAS,qBAAqB;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/event/core.ts","../src/view/component.ts","../src/view/components/amount-input.ts","../src/view/components/button.ts","../src/view/components/carousel.ts","../src/view/components/chip.ts","../src/view/components/code-input.ts","../src/view/components/divider.ts","../src/view/components/empty-state.ts","../src/view/components/feedback.ts","../src/view/components/footer.ts","../src/view/components/grid.ts","../src/view/components/icon.ts","../src/view/components/image.ts","../src/view/components/input.ts","../src/view/components/list.ts","../src/view/components/overlays.ts","../src/view/components/qr-code.ts","../src/view/components/select.ts","../src/view/components/skeleton.ts","../src/view/components/tabs.ts","../src/view/components/text.ts","../src/view/components/text-area.ts","../src/view/components/toggles.ts","../src/view/components/view.ts","../src/view/components/options.ts","../src/view/components/index.ts","../src/theme/theme.ts","../src/host/context.ts","../src/host/calls.ts","../src/page/bars.ts","../src/page/navigation.ts","../src/protocol/core.ts","../src/view/renderer.ts","../src/view/values.ts","../src/source/location.ts","../src/source/error.ts","../src/event/emitter.ts","../src/protocol/transport.ts","../src/host/host.ts","../src/host/permissions.ts","../src/host/files.ts","../src/host/network.ts","../src/host/react.ts","../src/page/lifecycle.ts","../src/page/state.ts","../src/version/semantic-version.ts","../src/messageChannel.ts"],"mappings":";UAEiB,SAAS,kBAA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EAIjE,OAAO,UAAU,YAAY,WAC3B,MAAM,GACN,SAAS,eAAe,SAAS,MAChC,eAAe,SAAS;EAM3B,OAAO,UAAU,gBAAgB,SAAS"}
|
package/dist/index.js
CHANGED
|
@@ -87,6 +87,23 @@ var SourceError = class extends Error {
|
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
89
|
//#endregion
|
|
90
|
+
//#region src/view/components/amount-input.ts
|
|
91
|
+
const AmountInput = defineComponent({
|
|
92
|
+
name: "AmountInput",
|
|
93
|
+
props: {
|
|
94
|
+
value: "number",
|
|
95
|
+
currency: "string",
|
|
96
|
+
decimals: "number",
|
|
97
|
+
label: "string",
|
|
98
|
+
placeholder: "string",
|
|
99
|
+
hint: "string",
|
|
100
|
+
error: "string",
|
|
101
|
+
disabled: "boolean"
|
|
102
|
+
},
|
|
103
|
+
events: ["change"],
|
|
104
|
+
children: "none"
|
|
105
|
+
});
|
|
106
|
+
//#endregion
|
|
90
107
|
//#region src/view/components/button.ts
|
|
91
108
|
const Button = defineComponent({
|
|
92
109
|
name: "Button",
|
|
@@ -99,18 +116,18 @@ const Button = defineComponent({
|
|
|
99
116
|
children: "text"
|
|
100
117
|
});
|
|
101
118
|
//#endregion
|
|
102
|
-
//#region src/view/components/divider.ts
|
|
103
|
-
const Divider = defineComponent({
|
|
104
|
-
name: "Divider",
|
|
105
|
-
children: "none"
|
|
106
|
-
});
|
|
107
|
-
//#endregion
|
|
108
119
|
//#region src/view/components/options.ts
|
|
109
120
|
const SIZES = [
|
|
110
121
|
"small",
|
|
111
122
|
"medium",
|
|
112
123
|
"large"
|
|
113
124
|
];
|
|
125
|
+
const SPACES = [
|
|
126
|
+
"none",
|
|
127
|
+
"small",
|
|
128
|
+
"medium",
|
|
129
|
+
"large"
|
|
130
|
+
];
|
|
114
131
|
const TONES = [
|
|
115
132
|
"default",
|
|
116
133
|
"muted",
|
|
@@ -189,6 +206,68 @@ const ICON_NAMES = [
|
|
|
189
206
|
"wifi"
|
|
190
207
|
];
|
|
191
208
|
//#endregion
|
|
209
|
+
//#region src/view/components/carousel.ts
|
|
210
|
+
const Carousel = defineComponent({
|
|
211
|
+
name: "Carousel",
|
|
212
|
+
props: {
|
|
213
|
+
autoplay: "boolean",
|
|
214
|
+
interval: "number",
|
|
215
|
+
loop: "boolean",
|
|
216
|
+
indicator: ["dots", "none"],
|
|
217
|
+
gap: SPACES,
|
|
218
|
+
effect: ["slide", "scale"],
|
|
219
|
+
index: "number"
|
|
220
|
+
},
|
|
221
|
+
events: ["change"],
|
|
222
|
+
children: "elements"
|
|
223
|
+
});
|
|
224
|
+
//#endregion
|
|
225
|
+
//#region src/view/components/chip.ts
|
|
226
|
+
const Chip = defineComponent({
|
|
227
|
+
name: "Chip",
|
|
228
|
+
props: {
|
|
229
|
+
label: "string",
|
|
230
|
+
icon: ICON_NAMES,
|
|
231
|
+
selected: "boolean",
|
|
232
|
+
disabled: "boolean"
|
|
233
|
+
},
|
|
234
|
+
events: ["tap"],
|
|
235
|
+
children: "none"
|
|
236
|
+
});
|
|
237
|
+
//#endregion
|
|
238
|
+
//#region src/view/components/code-input.ts
|
|
239
|
+
const CodeInput = defineComponent({
|
|
240
|
+
name: "CodeInput",
|
|
241
|
+
props: {
|
|
242
|
+
value: "string",
|
|
243
|
+
length: "number",
|
|
244
|
+
label: "string",
|
|
245
|
+
hint: "string",
|
|
246
|
+
error: "string",
|
|
247
|
+
secure: "boolean",
|
|
248
|
+
disabled: "boolean"
|
|
249
|
+
},
|
|
250
|
+
events: ["change", "complete"],
|
|
251
|
+
children: "none"
|
|
252
|
+
});
|
|
253
|
+
//#endregion
|
|
254
|
+
//#region src/view/components/divider.ts
|
|
255
|
+
const Divider = defineComponent({
|
|
256
|
+
name: "Divider",
|
|
257
|
+
children: "none"
|
|
258
|
+
});
|
|
259
|
+
//#endregion
|
|
260
|
+
//#region src/view/components/empty-state.ts
|
|
261
|
+
const EmptyState = defineComponent({
|
|
262
|
+
name: "EmptyState",
|
|
263
|
+
props: {
|
|
264
|
+
icon: ICON_NAMES,
|
|
265
|
+
title: "string",
|
|
266
|
+
text: "string"
|
|
267
|
+
},
|
|
268
|
+
children: "elements"
|
|
269
|
+
});
|
|
270
|
+
//#endregion
|
|
192
271
|
//#region src/view/components/feedback.ts
|
|
193
272
|
const Spinner = defineComponent({
|
|
194
273
|
name: "Spinner",
|
|
@@ -220,6 +299,27 @@ const Footer = defineComponent({
|
|
|
220
299
|
children: "elements"
|
|
221
300
|
});
|
|
222
301
|
//#endregion
|
|
302
|
+
//#region src/view/components/grid.ts
|
|
303
|
+
const Grid = defineComponent({
|
|
304
|
+
name: "Grid",
|
|
305
|
+
props: {
|
|
306
|
+
columns: "number",
|
|
307
|
+
gap: SPACES
|
|
308
|
+
},
|
|
309
|
+
children: "elements"
|
|
310
|
+
});
|
|
311
|
+
const GridItem = defineComponent({
|
|
312
|
+
name: "GridItem",
|
|
313
|
+
props: {
|
|
314
|
+
label: "string",
|
|
315
|
+
icon: ICON_NAMES,
|
|
316
|
+
image: "string",
|
|
317
|
+
badge: "string"
|
|
318
|
+
},
|
|
319
|
+
events: ["tap"],
|
|
320
|
+
children: "none"
|
|
321
|
+
});
|
|
322
|
+
//#endregion
|
|
223
323
|
//#region src/view/components/icon.ts
|
|
224
324
|
const Icon = defineComponent({
|
|
225
325
|
name: "Icon",
|
|
@@ -279,6 +379,7 @@ const Input = defineComponent({
|
|
|
279
379
|
//#region src/view/components/list.ts
|
|
280
380
|
const List = defineComponent({
|
|
281
381
|
name: "List",
|
|
382
|
+
props: { size: ["sm", "md"] },
|
|
282
383
|
children: "elements"
|
|
283
384
|
});
|
|
284
385
|
const ListItem = defineComponent({
|
|
@@ -299,7 +400,8 @@ const Sheet = defineComponent({
|
|
|
299
400
|
name: "Sheet",
|
|
300
401
|
props: {
|
|
301
402
|
open: "boolean",
|
|
302
|
-
title: "string"
|
|
403
|
+
title: "string",
|
|
404
|
+
showCloseIcon: "boolean"
|
|
303
405
|
},
|
|
304
406
|
events: ["close"],
|
|
305
407
|
children: "elements"
|
|
@@ -315,6 +417,17 @@ const Toast = defineComponent({
|
|
|
315
417
|
children: "none"
|
|
316
418
|
});
|
|
317
419
|
//#endregion
|
|
420
|
+
//#region src/view/components/qr-code.ts
|
|
421
|
+
const QRCode = defineComponent({
|
|
422
|
+
name: "QRCode",
|
|
423
|
+
props: {
|
|
424
|
+
value: "string",
|
|
425
|
+
size: "number",
|
|
426
|
+
label: "string"
|
|
427
|
+
},
|
|
428
|
+
children: "none"
|
|
429
|
+
});
|
|
430
|
+
//#endregion
|
|
318
431
|
//#region src/view/components/select.ts
|
|
319
432
|
const Select = defineComponent({
|
|
320
433
|
name: "Select",
|
|
@@ -353,6 +466,26 @@ const Skeleton = defineComponent({
|
|
|
353
466
|
children: "none"
|
|
354
467
|
});
|
|
355
468
|
//#endregion
|
|
469
|
+
//#region src/view/components/tabs.ts
|
|
470
|
+
const Tabs = defineComponent({
|
|
471
|
+
name: "Tabs",
|
|
472
|
+
props: {
|
|
473
|
+
value: "string",
|
|
474
|
+
variant: ["underline", "segmented"]
|
|
475
|
+
},
|
|
476
|
+
events: ["change"],
|
|
477
|
+
children: "elements"
|
|
478
|
+
});
|
|
479
|
+
const Tab = defineComponent({
|
|
480
|
+
name: "Tab",
|
|
481
|
+
props: {
|
|
482
|
+
value: "string",
|
|
483
|
+
label: "string",
|
|
484
|
+
badge: "number"
|
|
485
|
+
},
|
|
486
|
+
children: "none"
|
|
487
|
+
});
|
|
488
|
+
//#endregion
|
|
356
489
|
//#region src/view/components/text.ts
|
|
357
490
|
const Text = defineComponent({
|
|
358
491
|
name: "Text",
|
|
@@ -438,16 +571,10 @@ const Radio = defineComponent({
|
|
|
438
571
|
});
|
|
439
572
|
//#endregion
|
|
440
573
|
//#region src/view/components/view.ts
|
|
441
|
-
const SPACE = [
|
|
442
|
-
"none",
|
|
443
|
-
"small",
|
|
444
|
-
"medium",
|
|
445
|
-
"large"
|
|
446
|
-
];
|
|
447
574
|
const View = defineComponent({
|
|
448
575
|
name: "View",
|
|
449
576
|
props: {
|
|
450
|
-
gap:
|
|
577
|
+
gap: SPACES,
|
|
451
578
|
direction: ["column", "row"],
|
|
452
579
|
align: [
|
|
453
580
|
"stretch",
|
|
@@ -463,11 +590,11 @@ const View = defineComponent({
|
|
|
463
590
|
],
|
|
464
591
|
wrap: "boolean",
|
|
465
592
|
grow: "boolean",
|
|
466
|
-
padding:
|
|
467
|
-
paddingTop:
|
|
468
|
-
paddingStart:
|
|
469
|
-
paddingEnd:
|
|
470
|
-
paddingBottom:
|
|
593
|
+
padding: SPACES,
|
|
594
|
+
paddingTop: SPACES,
|
|
595
|
+
paddingStart: SPACES,
|
|
596
|
+
paddingEnd: SPACES,
|
|
597
|
+
paddingBottom: SPACES,
|
|
471
598
|
variant: ["plain", "card"]
|
|
472
599
|
},
|
|
473
600
|
events: ["tap"],
|
|
@@ -476,11 +603,18 @@ const View = defineComponent({
|
|
|
476
603
|
//#endregion
|
|
477
604
|
//#region src/view/components/index.ts
|
|
478
605
|
const builtinComponents = {
|
|
606
|
+
AmountInput,
|
|
479
607
|
Badge,
|
|
480
608
|
Button,
|
|
609
|
+
Carousel,
|
|
481
610
|
Checkbox,
|
|
611
|
+
Chip,
|
|
612
|
+
CodeInput,
|
|
482
613
|
Divider,
|
|
614
|
+
EmptyState,
|
|
483
615
|
Footer,
|
|
616
|
+
Grid,
|
|
617
|
+
GridItem,
|
|
484
618
|
Icon,
|
|
485
619
|
Image,
|
|
486
620
|
Input,
|
|
@@ -489,6 +623,7 @@ const builtinComponents = {
|
|
|
489
623
|
Notice,
|
|
490
624
|
Option,
|
|
491
625
|
ProgressBar,
|
|
626
|
+
QRCode,
|
|
492
627
|
Radio,
|
|
493
628
|
RadioGroup,
|
|
494
629
|
Select,
|
|
@@ -496,6 +631,8 @@ const builtinComponents = {
|
|
|
496
631
|
Skeleton,
|
|
497
632
|
Spinner,
|
|
498
633
|
Switch,
|
|
634
|
+
Tab,
|
|
635
|
+
Tabs,
|
|
499
636
|
Text,
|
|
500
637
|
TextArea,
|
|
501
638
|
Toast,
|
|
@@ -535,6 +672,7 @@ function hostTransport() {
|
|
|
535
672
|
//#endregion
|
|
536
673
|
//#region src/host/context.ts
|
|
537
674
|
const DEFAULT_SYSTEM_CONTEXT = {
|
|
675
|
+
platform: "ios",
|
|
538
676
|
scheme: "light",
|
|
539
677
|
appState: "active"
|
|
540
678
|
};
|
|
@@ -656,6 +794,7 @@ const REACT_HOST_PATH = "/__dot/react/";
|
|
|
656
794
|
const REACT_HOST_MODULES = {
|
|
657
795
|
react: "react.js",
|
|
658
796
|
"react/jsx-runtime": "react-jsx-runtime.js",
|
|
797
|
+
"react-dom": "react-dom.js",
|
|
659
798
|
"react-dom/client": "react-dom-client.js"
|
|
660
799
|
};
|
|
661
800
|
function reactHostUrl(dotReactVersion, file) {
|
|
@@ -759,6 +898,42 @@ function applyChanges(state, changes) {
|
|
|
759
898
|
return next;
|
|
760
899
|
}
|
|
761
900
|
//#endregion
|
|
901
|
+
//#region src/page/bars.ts
|
|
902
|
+
const HEX_COLOR = /^#[0-9a-fA-F]{6}$/;
|
|
903
|
+
function checkNavigationBar(options) {
|
|
904
|
+
const { title, hidden, backgroundColor, textColor } = options;
|
|
905
|
+
if (title !== void 0 && typeof title !== "string") throw new TypeError("The navigation bar's title must be text");
|
|
906
|
+
if (hidden !== void 0 && typeof hidden !== "boolean") throw new TypeError("The navigation bar's `hidden` must be true or false");
|
|
907
|
+
for (const [name, color] of Object.entries({
|
|
908
|
+
backgroundColor,
|
|
909
|
+
textColor
|
|
910
|
+
})) if (color !== void 0 && (typeof color !== "string" || !HEX_COLOR.test(color))) throw new TypeError(`The navigation bar's ${name} must be a color such as "#1A73E8"`);
|
|
911
|
+
}
|
|
912
|
+
function checkTabBar(options) {
|
|
913
|
+
if (options.hidden !== void 0 && typeof options.hidden !== "boolean") throw new TypeError("The tab bar's `hidden` must be true or false");
|
|
914
|
+
}
|
|
915
|
+
function checkConfigs(configs) {
|
|
916
|
+
checkNavigationBar(configs.navigationBar ?? {});
|
|
917
|
+
checkTabBar(configs.tabBar ?? {});
|
|
918
|
+
}
|
|
919
|
+
function mergeConfigs(...configs) {
|
|
920
|
+
const bars = {
|
|
921
|
+
navigationBar: {},
|
|
922
|
+
tabBar: {}
|
|
923
|
+
};
|
|
924
|
+
for (const config of configs) {
|
|
925
|
+
bars.navigationBar = {
|
|
926
|
+
...bars.navigationBar,
|
|
927
|
+
...config?.navigationBar
|
|
928
|
+
};
|
|
929
|
+
bars.tabBar = {
|
|
930
|
+
...bars.tabBar,
|
|
931
|
+
...config?.tabBar
|
|
932
|
+
};
|
|
933
|
+
}
|
|
934
|
+
return bars;
|
|
935
|
+
}
|
|
936
|
+
//#endregion
|
|
762
937
|
//#region src/messageChannel.ts
|
|
763
938
|
var MessageChannel = class {
|
|
764
939
|
#transport;
|
|
@@ -794,6 +969,6 @@ var MessageChannel = class {
|
|
|
794
969
|
}
|
|
795
970
|
};
|
|
796
971
|
//#endregion
|
|
797
|
-
export { Badge, Button, Checkbox, DEFAULT_SYSTEM_CONTEXT, DOT_FILE_PATH_MAX_LENGTH, Divider, EventEmitter, Footer, HostError, ICON_NAMES, Icon, Image, Input, List, ListItem, MAX_STACK_DEPTH, MessageChannel, NETWORK_HOST_MAX_LENGTH, NETWORK_HOST_PATTERN, NavigationStack, Notice, Option, PAGE_HOOKS, PERMISSIONS, ProgressBar, REACT_HOST_MODULES, REACT_HOST_PATH, Radio, RadioGroup, SEMVER_PATTERN, SIZES, STATUS_TONES, Select, Sheet, Skeleton, SourceError, Spinner, Switch, TONES, Text, TextArea, Toast, View, allowsHost, applyChanges, builtinComponents, builtinRegistry, callHost, compareVersions, componentRegistry, connectHost, createAdaptorTransport, createEvent, createHostRequest, createLocator, createTransportPair, defineComponent, dotFilePathProblem, eventName, eventProp, hostTransport, isEventProp, isNetworkHost, isPageId, isPermission, isReactCompatible, isSemanticVersion, isVersionAtLeast, locatedMessage, locationAt, majorVersion, newestReactOfMajor, reactHostUrl, toList, toText };
|
|
972
|
+
export { AmountInput, Badge, Button, Carousel, Checkbox, Chip, CodeInput, DEFAULT_SYSTEM_CONTEXT, DOT_FILE_PATH_MAX_LENGTH, Divider, EmptyState, EventEmitter, Footer, Grid, GridItem, HostError, ICON_NAMES, Icon, Image, Input, List, ListItem, MAX_STACK_DEPTH, MessageChannel, NETWORK_HOST_MAX_LENGTH, NETWORK_HOST_PATTERN, NavigationStack, Notice, Option, PAGE_HOOKS, PERMISSIONS, ProgressBar, QRCode, REACT_HOST_MODULES, REACT_HOST_PATH, Radio, RadioGroup, SEMVER_PATTERN, SIZES, STATUS_TONES, Select, Sheet, Skeleton, SourceError, Spinner, Switch, TONES, Tab, Tabs, Text, TextArea, Toast, View, allowsHost, applyChanges, builtinComponents, builtinRegistry, callHost, checkConfigs, checkNavigationBar, checkTabBar, compareVersions, componentRegistry, connectHost, createAdaptorTransport, createEvent, createHostRequest, createLocator, createTransportPair, defineComponent, dotFilePathProblem, eventName, eventProp, hostTransport, isEventProp, isNetworkHost, isPageId, isPermission, isReactCompatible, isSemanticVersion, isVersionAtLeast, locatedMessage, locationAt, majorVersion, mergeConfigs, newestReactOfMajor, reactHostUrl, toList, toText };
|
|
798
973
|
|
|
799
974
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/view/component.ts","../src/view/values.ts","../src/source/location.ts","../src/source/error.ts","../src/view/components/button.ts","../src/view/components/divider.ts","../src/view/components/options.ts","../src/view/components/feedback.ts","../src/view/components/footer.ts","../src/view/components/icon.ts","../src/view/components/image.ts","../src/view/components/input.ts","../src/view/components/list.ts","../src/view/components/overlays.ts","../src/view/components/select.ts","../src/view/components/skeleton.ts","../src/view/components/text.ts","../src/view/components/text-area.ts","../src/view/components/toggles.ts","../src/view/components/view.ts","../src/view/components/index.ts","../src/event/emitter.ts","../src/event/core.ts","../src/host/host.ts","../src/host/context.ts","../src/host/calls.ts","../src/host/permissions.ts","../src/host/files.ts","../src/host/network.ts","../src/version/semantic-version.ts","../src/host/react.ts","../src/protocol/transport.ts","../src/page/lifecycle.ts","../src/page/navigation.ts","../src/page/state.ts","../src/messageChannel.ts"],"sourcesContent":["import type { DotEvent } from '../event/core';\n\nexport interface PropTypes {\n string: string;\n number: number;\n boolean: boolean;\n any: unknown;\n}\n\nexport type PropType = keyof PropTypes | readonly string[];\n\nexport type PropValue<T extends PropType> = T extends readonly string[]\n ? T[number]\n : T extends keyof PropTypes\n ? PropTypes[T]\n : never;\n\n/**\n * - `none`: no children\n * - `text`: text and inline components (such as `Text`).\n * - `elements`: any components, but raw text must be wrapped in an inline component.\n */\nexport type ChildrenType = 'none' | 'text' | 'elements';\n\n/**\n * Describes a UI component independently of any renderer. The compiler checks `.dml` markup\n * against it, and each renderer maps it to its own elements.\n */\nexport interface ComponentManifest<\n Name extends string = string,\n Props extends Record<string, PropType> = Record<string, PropType>,\n Events extends string = string,\n Children extends ChildrenType = ChildrenType,\n> {\n readonly name: Name;\n readonly props: Props;\n // Supported event names; `click` is written `onClick` in markup and received as the `onClick` prop.\n readonly events: readonly Events[];\n readonly children: Children;\n readonly inline?: boolean;\n}\n\nexport function defineComponent<\n const Name extends string,\n const Props extends Record<string, PropType> = Record<never, PropType>,\n const Events extends string = never,\n const Children extends ChildrenType = ChildrenType,\n>(manifest: {\n name: Name;\n props?: Props;\n events?: readonly Events[];\n children: Children;\n inline?: boolean;\n}): ComponentManifest<Name, Props, Events, Children> {\n return { props: {} as Props, events: [], ...manifest };\n}\n\nexport type EventProp<Event extends string> = `on${Capitalize<Event>}`;\n\nexport function eventProp<Event extends string>(event: Event): EventProp<Event> {\n return `on${event.charAt(0).toUpperCase()}${event.slice(1)}` as EventProp<Event>;\n}\n\n// Event props are `on` followed by a capital letter, like `onClick`.\nexport function isEventProp(name: string): boolean {\n const letterAfterOn = name.charAt('on'.length);\n return name.startsWith('on') && letterAfterOn >= 'A' && letterAfterOn <= 'Z';\n}\n\n// The reverse of eventProp: `onClick` -> `click`.\nexport function eventName(prop: string): string {\n const name = prop.slice('on'.length);\n return name.charAt(0).toLowerCase() + name.slice(1);\n}\n\n/**\n * The props a renderer's implementation of `M` receives, with `Children` as its node type. Every\n * prop is optional and may be `undefined`: markup can omit it, and a binding can evaluate to\n * `undefined` at runtime.\n */\nexport type PropsOf<M extends ComponentManifest, Children = never> = {\n [K in keyof M['props']]?: PropValue<M['props'][K]> | undefined;\n} & {\n [E in M['events'][number] as EventProp<E>]?: ((event: DotEvent) => void) | undefined;\n} & (M['children'] extends 'none' ? unknown : { children?: Children | undefined });\n\nexport type ComponentRegistry = Readonly<Record<string, ComponentManifest>>;\n\nexport function componentRegistry(manifests: Iterable<ComponentManifest>): ComponentRegistry {\n const registry: Record<string, ComponentManifest> = {};\n for (const manifest of manifests) {\n if (manifest.name in registry) {\n throw new Error(`Component <${manifest.name}> is defined twice`);\n }\n registry[manifest.name] = manifest;\n }\n return registry;\n}\n","export function toText(value: unknown): string {\n switch (typeof value) {\n case 'string':\n return value;\n case 'number':\n case 'boolean':\n case 'bigint':\n return String(value);\n case 'object':\n return value === null ? '' : JSON.stringify(value);\n default:\n return '';\n }\n}\n\nexport function toList(value: unknown): readonly unknown[] {\n if (Array.isArray(value)) {\n return value;\n }\n if (typeof value === 'object' && value !== null && Symbol.iterator in value) {\n return Array.from(value as Iterable<unknown>);\n }\n return [];\n}\n","export interface SourceLocation {\n readonly line: number;\n readonly column: number;\n readonly offset: number;\n}\n\n// Finds lines by binary search over their start offsets, computed once per source.\nexport function createLocator(source: string): (offset: number) => SourceLocation {\n const lineStarts = [0];\n for (let index = 0; index < source.length; index++) {\n if (source[index] === '\\n') {\n lineStarts.push(index + 1);\n }\n }\n return (offset) => {\n let low = 0;\n let high = lineStarts.length - 1;\n while (low < high) {\n const middle = Math.floor((low + high + 1) / 2);\n if (lineStarts[middle]! <= offset) {\n low = middle;\n } else {\n high = middle - 1;\n }\n }\n return { line: low + 1, column: offset - lineStarts[low]! + 1, offset };\n };\n}\n\nexport function locationAt(source: string, offset: number): SourceLocation {\n return createLocator(source)(offset);\n}\n\nexport function locatedMessage(message: string, file?: string, location?: SourceLocation): string {\n const where = [file, location?.line, location?.column]\n .filter((part) => part !== undefined)\n .join(':');\n return where ? `${where}: ${message}` : message;\n}\n","import type { SourceLocation } from './location';\nimport { locatedMessage } from './location';\n\n// A problem at a place in a source file. The message starts with `file:line:column:`\nexport class SourceError extends Error {\n readonly reason: string;\n readonly file: string | undefined;\n readonly loc: SourceLocation | undefined;\n\n constructor(reason: string, file?: string, location?: SourceLocation) {\n super(locatedMessage(reason, file, location));\n this.reason = reason;\n this.file = file;\n this.loc = location;\n }\n}\n","import { defineComponent } from '../component';\n\nexport const Button = defineComponent({\n name: 'Button',\n props: {\n variant: ['primary', 'secondary'],\n disabled: 'boolean',\n // Shows a spinner and ignores taps, such as while a payment is sent.\n loading: 'boolean',\n },\n events: ['click'],\n children: 'text',\n});\n","import { defineComponent } from '../component';\n\nexport const Divider = defineComponent({\n name: 'Divider',\n children: 'none',\n});\n","export const SIZES = ['small', 'medium', 'large'] as const;\n\nexport const TONES = ['default', 'muted', 'info', 'success', 'warning', 'danger'] as const;\n\nexport const STATUS_TONES = ['default', 'info', 'success', 'warning', 'danger'] as const;\n\nexport const ICON_NAMES = [\n 'arrow-down',\n 'arrow-left',\n 'arrow-right',\n 'arrow-up',\n 'bank',\n 'bell',\n 'bolt',\n 'calendar',\n 'card',\n 'cart',\n 'cash',\n 'check',\n 'chevron-down',\n 'chevron-left',\n 'chevron-right',\n 'chevron-up',\n 'clock',\n 'close',\n 'copy',\n 'download',\n 'edit',\n 'error',\n 'eye',\n 'eye-off',\n 'file',\n 'gift',\n 'grid',\n 'heart',\n 'help',\n 'history',\n 'home',\n 'image',\n 'info',\n 'list',\n 'location',\n 'lock',\n 'logout',\n 'mail',\n 'minus',\n 'mobile',\n 'more',\n 'phone',\n 'plus',\n 'qr-code',\n 'receipt',\n 'refresh',\n 'search',\n 'send',\n 'settings',\n 'share',\n 'star',\n 'success',\n 'trash',\n 'upload',\n 'user',\n 'users',\n 'wallet',\n 'warning',\n 'water',\n 'wifi',\n] as const;\n\nexport type IconName = (typeof ICON_NAMES)[number];\n","import { defineComponent } from '../component';\nimport { SIZES, STATUS_TONES } from './options';\n\nexport const Spinner = defineComponent({\n name: 'Spinner',\n props: { size: SIZES },\n children: 'none',\n});\n\nexport const ProgressBar = defineComponent({\n name: 'ProgressBar',\n // From 0 to 100.\n props: { value: 'number' },\n children: 'none',\n});\n\n// A message in the flow of the page, such as a failed payment's reason.\nexport const Notice = defineComponent({\n name: 'Notice',\n props: { tone: STATUS_TONES, title: 'string' },\n children: 'text',\n});\n\nexport const Badge = defineComponent({\n name: 'Badge',\n props: { tone: STATUS_TONES },\n children: 'text',\n});\n","import { defineComponent } from '../component';\n\n// Stays at the bottom of the screen while the page scrolls, for its main action. Put it last in\n// the page's root View.\nexport const Footer = defineComponent({\n name: 'Footer',\n children: 'elements',\n});\n","import { defineComponent } from '../component';\nimport { ICON_NAMES, SIZES, TONES } from './options';\n\nexport const Icon = defineComponent({\n name: 'Icon',\n props: { name: ICON_NAMES, size: SIZES, tone: TONES },\n children: 'none',\n inline: true,\n});\n","import { defineComponent } from '../component';\n\nexport const Image = defineComponent({\n name: 'Image',\n props: {\n src: 'string',\n alt: 'string',\n width: 'number',\n height: 'number',\n // `cover` fills the box and crops; `contain` shows the whole picture.\n fit: ['cover', 'contain'],\n shape: ['rounded', 'square', 'circle'],\n },\n events: ['load', 'error'],\n children: 'none',\n});\n","import { defineComponent } from '../component';\n\nexport const Input = defineComponent({\n name: 'Input',\n props: {\n value: 'string',\n placeholder: 'string',\n label: 'string',\n // Help shown under the field, which `error` replaces.\n hint: 'string',\n error: 'string',\n // Text shown inside the field, before and after what the person types, such as \"Le\".\n prefix: 'string',\n suffix: 'string',\n type: ['text', 'number', 'email', 'phone', 'password'],\n maxLength: 'number',\n disabled: 'boolean',\n },\n events: ['change', 'submit'],\n children: 'none',\n});\n","import { defineComponent } from '../component';\nimport { ICON_NAMES } from './options';\n\nexport const List = defineComponent({\n name: 'List',\n children: 'elements',\n});\n\n// What it holds shows at its end, in place of `value`. A row with `onTap` shows a chevron.\nexport const ListItem = defineComponent({\n name: 'ListItem',\n props: {\n title: 'string',\n subtitle: 'string',\n value: 'string',\n icon: ICON_NAMES,\n image: 'string',\n },\n events: ['tap'],\n children: 'elements',\n});\n","import { defineComponent } from '../component';\nimport { STATUS_TONES } from './options';\n\n// A panel that slides up over the page while `open` is true, such as an action sheet of buttons.\n// Tapping outside it raises `close`; the page closes it by setting `open` back to false.\nexport const Sheet = defineComponent({\n name: 'Sheet',\n props: { open: 'boolean', title: 'string' },\n events: ['close'],\n children: 'elements',\n});\n\n// Shows `message` briefly over the page, then raises `hide`, where the page clears the message\n// so the same one can show again.\nexport const Toast = defineComponent({\n name: 'Toast',\n props: {\n message: 'string',\n tone: STATUS_TONES,\n // In milliseconds.\n duration: 'number',\n },\n events: ['hide'],\n children: 'none',\n});\n","import { defineComponent } from '../component';\n\n// A field that opens a sheet of the `Option`s it holds; `value` is the chosen one's.\nexport const Select = defineComponent({\n name: 'Select',\n props: {\n value: 'string',\n label: 'string',\n placeholder: 'string',\n hint: 'string',\n error: 'string',\n disabled: 'boolean',\n },\n events: ['change'],\n children: 'elements',\n});\n\nexport const Option = defineComponent({\n name: 'Option',\n props: { value: 'string', label: 'string' },\n children: 'none',\n});\n","import { defineComponent } from '../component';\n\nexport const Skeleton = defineComponent({\n name: 'Skeleton',\n props: {\n shape: ['text', 'circle', 'box'],\n // Lines of text, for `text`.\n lines: 'number',\n // In pixels, for `circle` and `box`.\n height: 'number',\n },\n children: 'none',\n});\n","import { defineComponent } from '../component';\nimport { TONES } from './options';\n\nexport const Text = defineComponent({\n name: 'Text',\n props: {\n variant: ['title', 'body', 'caption'],\n tone: TONES,\n weight: ['regular', 'medium', 'bold'],\n align: ['start', 'center', 'end'],\n // Cuts the text off with an ellipsis after this many lines.\n maxLines: 'number',\n },\n children: 'text',\n inline: true,\n});\n","import { defineComponent } from '../component';\n\nexport const TextArea = defineComponent({\n name: 'TextArea',\n props: {\n value: 'string',\n placeholder: 'string',\n label: 'string',\n hint: 'string',\n error: 'string',\n // The lines of text it shows before scrolling.\n rows: 'number',\n maxLength: 'number',\n disabled: 'boolean',\n },\n events: ['change'],\n children: 'none',\n});\n","import { defineComponent } from '../component';\n\nexport const Switch = defineComponent({\n name: 'Switch',\n props: { checked: 'boolean', label: 'string', disabled: 'boolean' },\n events: ['change'],\n children: 'none',\n});\n\nexport const Checkbox = defineComponent({\n name: 'Checkbox',\n props: { checked: 'boolean', label: 'string', disabled: 'boolean' },\n events: ['change'],\n children: 'none',\n});\n\n// A choice of one `Radio` among those it holds; `value` is the chosen one's.\nexport const RadioGroup = defineComponent({\n name: 'RadioGroup',\n props: { value: 'string', label: 'string', disabled: 'boolean' },\n events: ['change'],\n children: 'elements',\n});\n\nexport const Radio = defineComponent({\n name: 'Radio',\n props: { value: 'string', label: 'string', disabled: 'boolean' },\n children: 'none',\n});\n","import { defineComponent } from '../component';\n\nconst SPACE = ['none', 'small', 'medium', 'large'] as const;\n\nexport const View = defineComponent({\n name: 'View',\n props: {\n gap: SPACE,\n direction: ['column', 'row'],\n // Across `direction`.\n align: ['stretch', 'start', 'center', 'end'],\n // Along `direction`: `between` puts the first and last child at the ends.\n justify: ['start', 'center', 'end', 'between'],\n // Lets children that don't fit flow onto another line.\n wrap: 'boolean',\n // Takes the space its parent has left along the parent's direction.\n grow: 'boolean',\n // Space inside the view's edges. `start` and `end` follow the reading direction, so they\n padding: SPACE,\n paddingTop: SPACE,\n paddingStart: SPACE,\n paddingEnd: SPACE,\n paddingBottom: SPACE,\n variant: ['plain', 'card'],\n },\n events: ['tap'],\n children: 'elements',\n});\n","import { componentRegistry } from '../component';\nimport { Button } from './button';\nimport { Divider } from './divider';\nimport { Badge, Notice, ProgressBar, Spinner } from './feedback';\nimport { Footer } from './footer';\nimport { Icon } from './icon';\nimport { Image } from './image';\nimport { Input } from './input';\nimport { List, ListItem } from './list';\nimport { Sheet, Toast } from './overlays';\nimport { Option, Select } from './select';\nimport { Skeleton } from './skeleton';\nimport { Text } from './text';\nimport { TextArea } from './text-area';\nimport { Checkbox, Radio, RadioGroup, Switch } from './toggles';\nimport { View } from './view';\n\nexport {\n Badge,\n Button,\n Checkbox,\n Divider,\n Footer,\n Icon,\n Image,\n Input,\n List,\n ListItem,\n Notice,\n Option,\n ProgressBar,\n Radio,\n RadioGroup,\n Select,\n Sheet,\n Skeleton,\n Spinner,\n Switch,\n Text,\n TextArea,\n Toast,\n View,\n};\nexport { ICON_NAMES, SIZES, STATUS_TONES, TONES } from './options';\nexport type { IconName } from './options';\n\nexport const builtinComponents = {\n Badge,\n Button,\n Checkbox,\n Divider,\n Footer,\n Icon,\n Image,\n Input,\n List,\n ListItem,\n Notice,\n Option,\n ProgressBar,\n Radio,\n RadioGroup,\n Select,\n Sheet,\n Skeleton,\n Spinner,\n Switch,\n Text,\n TextArea,\n Toast,\n View,\n} as const;\n\nexport type BuiltinComponents = typeof builtinComponents;\n\nexport const builtinRegistry = componentRegistry(Object.values(builtinComponents));\n","type Listener = (...args: never[]) => void;\n\nexport class EventEmitter<Events extends { [K in keyof Events]: Listener }> {\n readonly #listeners = new Map<keyof Events, Set<Listener>>();\n\n on<K extends keyof Events>(name: K, listener: Events[K]): () => void {\n const listeners = this.#listeners.get(name) ?? new Set();\n this.#listeners.set(name, listeners);\n listeners.add(listener);\n return () => listeners.delete(listener);\n }\n\n emit<K extends keyof Events>(name: K, ...args: Parameters<Events[K]>): void {\n const listeners = this.#listeners.get(name) as Set<Events[K]> | undefined;\n listeners?.forEach((listener) => listener(...args));\n }\n}\n","// `data` holds the `data-*` attributes of the component that raised the event: `data-account-id`\n// arrives as `data.accountId`.\nexport interface DotEvent<Detail = unknown, Data = Readonly<Record<string, unknown>>> {\n readonly type: string;\n readonly detail: Detail;\n readonly data: Data;\n}\n\nexport function createEvent<Detail = Record<string, never>>(\n type: string,\n detail: Detail = {} as Detail,\n data: Readonly<Record<string, unknown>> = {},\n): DotEvent<Detail> {\n return { type, detail, data };\n}\n","import type { Transport } from '../protocol/transport';\n\ndeclare global {\n // Installed by the host (the iOS or Android app, or the browser simulator) before Dot starts.\n // noinspection ES6ConvertVarToLetConst\n var __hostTransport: Transport | undefined;\n}\n\n// The transport the host installed. Messages crossing it must be JSON-serializable.\nexport function hostTransport(): Transport {\n const transport = globalThis.__hostTransport;\n if (!transport) {\n throw new Error(\n 'No Dot host found: expected `globalThis.__hostTransport` to be available at runtime. ' +\n 'Dots run inside the Dash App, or a simulator via `dotctl dev`.',\n );\n }\n return transport;\n}\n","import type { ColorScheme } from '../theme/theme';\n\n// `background` while the person is away from Dash: in another app, on the home screen, or with the\n// phone locked.\nexport type AppState = 'active' | 'background';\n\nexport interface SystemContext {\n readonly scheme: ColorScheme;\n readonly appState: AppState;\n}\n\nexport const DEFAULT_SYSTEM_CONTEXT: SystemContext = { scheme: 'light', appState: 'active' };\n","export type HostErrorCode =\n 'unsupported' | 'denied' | 'cancelled' | 'timeout' | 'invalid' | 'failed';\n\nexport class HostError extends Error {\n override readonly name = 'HostError';\n readonly code: HostErrorCode;\n\n constructor(code: HostErrorCode, message: string) {\n super(message);\n this.code = code;\n }\n}\n\nexport interface HostCallOptions {\n timeout?: number | undefined;\n}\n\nexport interface HostRequest<T> extends Promise<T> {\n // Stops waiting: the promise rejects with `cancelled`, and the host stops the work.\n cancel(): void;\n}\n\nexport type HostCaller = (\n method: string,\n params: unknown,\n options: HostCallOptions,\n) => HostRequest<unknown>;\n\nlet connectedCaller: HostCaller | null = null;\n\n// The service connects itself when it starts\nexport function connectHost(caller: HostCaller | null): void {\n connectedCaller = caller;\n}\n\nexport function callHost<Result>(\n method: string,\n params: unknown,\n options: HostCallOptions = {},\n): HostRequest<Result> {\n if (!connectedCaller) {\n const error = new HostError(\n 'unsupported',\n `No host to run \"${method}\": host calls run in the service`,\n );\n return createHostRequest(Promise.reject(error));\n }\n return connectedCaller(method, params, options) as HostRequest<Result>;\n}\n\nexport function createHostRequest<Result>(\n promise: Promise<Result>,\n cancel: () => void = () => {},\n): HostRequest<Result> {\n const request = promise as HostRequest<Result>;\n request.cancel = cancel;\n return request;\n}\n","// What a dot may ask the person for. A dot declares each one it uses in dot.json, with the reason\n// Dash shows the person; a host method that needs one runs only once the person allows it.\n// - `account`: the Dash account the person is logged into: their username (email or phone) and\n// full name.\nexport const PERMISSIONS = ['account'] as const;\n\nexport type DotPermission = (typeof PERMISSIONS)[number];\n\nexport function isPermission(value: string): value is DotPermission {\n return (PERMISSIONS as readonly string[]).includes(value);\n}\n","export const DOT_FILE_PATH_MAX_LENGTH = 512;\nconst MAX_NAME_LENGTH = 255;\n\n// Why `path` isn't a relative path inside a dot's storage, or null when it is.\nexport function dotFilePathProblem(path: string, { allowRoot = false } = {}): string | null {\n if (path === '') {\n return allowRoot ? null : 'A path is needed, such as \"receipts/42.pdf\"';\n }\n if (path.length > DOT_FILE_PATH_MAX_LENGTH) {\n return `\"${path.slice(0, 40)}…\" is longer than ${DOT_FILE_PATH_MAX_LENGTH} characters`;\n }\n if (path.startsWith('/')) {\n return `\"${path}\" starts with \"/\": paths are relative to the dot's storage, such as \"receipts/42.pdf\"`;\n }\n if ([...path].some((char) => char === '\\\\' || char.charCodeAt(0) < 0x20)) {\n return `\"${path}\" has a backslash or a control character`;\n }\n for (const name of path.split('/')) {\n if (name === '' || name === '.' || name === '..') {\n return `\"${path}\" has an empty, \".\" or \"..\" part: write each folder once, such as \"receipts/42.pdf\"`;\n }\n if (name.length > MAX_NAME_LENGTH) {\n return `\"${path}\" has a name longer than ${MAX_NAME_LENGTH} characters`;\n }\n }\n return null;\n}\n","// An exact host name, or \"*.example.com\" for any subdomain of example.com, but not example.com.\nconst LABEL = '[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?';\nexport const NETWORK_HOST_PATTERN = new RegExp(\n `^(?:\\\\*\\\\.${LABEL}(?:\\\\.${LABEL})+|${LABEL}(?:\\\\.${LABEL})*)$`,\n);\nexport const NETWORK_HOST_MAX_LENGTH = 253;\n\nexport function isNetworkHost(value: string): boolean {\n return value.length <= NETWORK_HOST_MAX_LENGTH && NETWORK_HOST_PATTERN.test(value);\n}\n\nexport function allowsHost(hosts: readonly string[], host: string): boolean {\n const name = host.toLowerCase().replace(/\\.$/, '');\n return hosts.some((pattern) =>\n pattern.startsWith('*.') ? name.endsWith(pattern.slice(1)) : name === pattern,\n );\n}\n","// A semantic version, as https://semver.org defines it: `1.4.0`, `2.0.0-beta.1`, `1.0.0+build.7`.\nexport const SEMVER_PATTERN =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\ninterface SemanticVersion {\n readonly major: number;\n readonly minor: number;\n readonly patch: number;\n // `[\"beta\", \"1\"]` for `1.0.0-beta.1`; empty for a release.\n readonly prerelease: readonly string[];\n}\n\nexport function isSemanticVersion(value: unknown): value is string {\n return typeof value === 'string' && SEMVER_PATTERN.test(value);\n}\n\nexport function majorVersion(version: string): number {\n return parseVersion(version).major;\n}\n\n// Whether `version` is `minimum` or a later one.\nexport function isVersionAtLeast(version: string, minimum: string): boolean {\n return compareVersions(version, minimum) >= 0;\n}\n\n// Negative when `left` comes before `right`, positive when after, and 0 for the same release.\n// Build metadata, the part after `+`, does not count.\nexport function compareVersions(left: string, right: string): number {\n const leftVersion = parseVersion(left);\n const rightVersion = parseVersion(right);\n const differences = [\n leftVersion.major - rightVersion.major,\n leftVersion.minor - rightVersion.minor,\n leftVersion.patch - rightVersion.patch,\n ];\n for (const difference of differences) {\n if (difference !== 0) {\n return difference;\n }\n }\n return comparePrereleases(leftVersion.prerelease, rightVersion.prerelease);\n}\n\nfunction parseVersion(version: string): SemanticVersion {\n const match = SEMVER_PATTERN.exec(version);\n if (!match) {\n throw new Error(`\"${version}\" is not a semantic version`);\n }\n const [, major, minor, patch, prerelease] = match;\n return {\n major: Number(major),\n minor: Number(minor),\n patch: Number(patch),\n prerelease: prerelease === undefined ? [] : prerelease.split('.'),\n };\n}\n\n// A release comes after its pre-releases (`1.0.0-beta` < `1.0.0`). Between pre-releases, the first\n// identifier that differs decides; if all match, the one with fewer identifiers comes first.\nfunction comparePrereleases(left: readonly string[], right: readonly string[]): number {\n if (left.length === 0 || right.length === 0) {\n return right.length - left.length;\n }\n const shared = Math.min(left.length, right.length);\n for (let index = 0; index < shared; index++) {\n const order = compareIdentifiers(left[index]!, right[index]!);\n if (order !== 0) {\n return order;\n }\n }\n return left.length - right.length;\n}\n\n// Numbers compare as numbers and come before words, which compare as text.\nfunction compareIdentifiers(left: string, right: string): number {\n const leftIsNumber = /^\\d+$/.test(left);\n const rightIsNumber = /^\\d+$/.test(right);\n if (leftIsNumber && rightIsNumber) {\n return Number(left) - Number(right);\n }\n if (leftIsNumber) {\n return -1;\n }\n if (rightIsNumber) {\n return 1;\n }\n if (left < right) {\n return -1;\n }\n if (left > right) {\n return 1;\n }\n return 0;\n}\n","import { compareVersions, isVersionAtLeast, majorVersion } from '../version/semantic-version';\n\n// The host ships React, not each dot: every dot's webview imports these names, and an import map in\n// its index.html points them at the host's copies under `/__dot/react/<major>/`.\nexport const REACT_HOST_PATH = '/__dot/react/';\n\n// Each name a dot's webview imports React by, and the host's file for it.\nexport const REACT_HOST_MODULES = {\n react: 'react.js',\n 'react/jsx-runtime': 'react-jsx-runtime.js',\n 'react-dom/client': 'react-dom-client.js',\n} as const;\n\n// By major version only: the host serves the newest React it has with that major, so it can update\n// React within a major without dots being rebuilt.\nexport function reactHostUrl(dotReactVersion: string, file: string): string {\n return `${REACT_HOST_PATH}${majorVersion(dotReactVersion)}/${file}`;\n}\n\n// A React release only adds to its major version, so a dot runs on the same major at or above the\n// version it was built with. A different major can change or remove what the dot relies on.\nexport function isReactCompatible(hostVersion: string, dotVersion: string): boolean {\n return (\n majorVersion(hostVersion) === majorVersion(dotVersion) &&\n isVersionAtLeast(hostVersion, dotVersion)\n );\n}\n\n// The newest of `versions` with `major`, or undefined when there is none.\nexport function newestReactOfMajor(versions: readonly string[], major: number): string | undefined {\n const matching = versions.filter((version) => majorVersion(version) === major);\n return matching.sort(compareVersions).at(-1);\n}\n","/**\n * A universal bridge for sending and receiving messages,\n * whether across web workers, message ports, or native app boundaries.\n */\nexport interface Transport {\n post(message: unknown): void;\n // Returns a function that removes the listener.\n listen(listener: (message: unknown) => void): () => void;\n}\n\n/**\n * Adapter interface for anything that acts like\n * 1. a MessagePort (https://developer.mozilla.org/en-US/docs/Web/API/MessagePort) or\n * 2. a Web Worker (https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API)\n */\nexport interface TransportAdapter {\n postMessage(message: unknown): void;\n addEventListener(type: 'message', listener: (event: { data: unknown }) => void): void;\n removeEventListener(type: 'message', listener: (event: { data: unknown }) => void): void;\n}\n\nexport function createAdaptorTransport(adapter: TransportAdapter): Transport {\n return {\n post: (message) => adapter.postMessage(message),\n listen(listener) {\n const onMessage = (event: { data: unknown }) => listener(event.data);\n adapter.addEventListener('message', onMessage);\n return () => adapter.removeEventListener('message', onMessage);\n },\n };\n}\n\n// Two transports connected to each other in the same thread, for tests and single-thread setups.\nexport function createTransportPair(): [Transport, Transport] {\n type Listeners = Set<(message: unknown) => void>;\n const firstListeners: Listeners = new Set();\n const secondListeners: Listeners = new Set();\n const createSide = (ownListeners: Listeners, otherListeners: Listeners): Transport => ({\n post: (message) => {\n // Simulate cross-thread memory isolation by cloning the payload\n const copy: unknown = JSON.parse(JSON.stringify(message));\n otherListeners.forEach((listener) => listener(copy));\n },\n listen(listener) {\n ownListeners.add(listener);\n return () => ownListeners.delete(listener);\n },\n });\n return [createSide(firstListeners, secondListeners), createSide(secondListeners, firstListeners)];\n}\n","import type { PageLaunchOptions } from './navigation';\n\nexport interface PageHooks {\n onLoad(options: PageLaunchOptions): void | Promise<void>;\n onShow(): void | Promise<void>;\n onHide(): void | Promise<void>;\n onUnload(): void | Promise<void>;\n}\n\nexport interface DotHooks {\n onLaunch(): void | Promise<void>;\n onError(error: Error): void;\n}\n\n// A record rather than a list, so adding a hook to PageHooks without listing it is a type error.\nconst pageHooks: Record<keyof PageHooks, true> = {\n onLoad: true,\n onShow: true,\n onHide: true,\n onUnload: true,\n};\n\nexport const PAGE_HOOKS = Object.keys(pageHooks) as readonly (keyof PageHooks)[];\n","export const MAX_STACK_DEPTH = 8;\n\nconst PAGE_ID = /^[A-Za-z0-9_-]+(?:\\/[A-Za-z0-9_-]+)*$/;\n\nexport function isPageId(value: string): boolean {\n return PAGE_ID.test(value);\n}\n\nexport type PageLaunchOptions = Readonly<Record<string, string>>;\n\nexport type Navigation =\n | {\n readonly action: 'push' | 'replace' | 'reset';\n readonly page: string;\n readonly options: PageLaunchOptions;\n }\n | { readonly action: 'back'; readonly delta: number };\n\nexport interface StackEntry {\n readonly instanceId: number;\n readonly page: string;\n readonly options: PageLaunchOptions;\n}\n\nexport class NavigationStack {\n readonly limit: number;\n #pages: StackEntry[] = [];\n #nextInstanceId = 1;\n\n constructor(limit = MAX_STACK_DEPTH) {\n this.limit = limit;\n }\n\n get pages(): readonly StackEntry[] {\n return this.#pages;\n }\n\n get top(): StackEntry | undefined {\n return this.#pages.at(-1);\n }\n\n /**\n * Applies a navigation, or refuses it and returns false: a push onto a full stack, or going back\n * from the first page (which the host handles itself, e.g. by closing the dot).\n */\n apply(navigation: Navigation): boolean {\n switch (navigation.action) {\n case 'push':\n if (this.#pages.length >= this.limit) {\n return false;\n }\n break;\n case 'replace':\n this.#pages.pop();\n break;\n case 'reset':\n this.#pages = [];\n break;\n case 'back': {\n const count = Math.min(navigation.delta, this.#pages.length - 1);\n if (count < 1) {\n return false;\n }\n this.#pages = this.#pages.slice(0, -count);\n return true;\n }\n }\n const { page, options } = navigation;\n this.#pages = [...this.#pages, { instanceId: this.#nextInstanceId++, page, options }];\n return true;\n }\n}\n","export function applyChanges<T>(state: T, changes: Partial<T>): T {\n const next = { ...state } as Record<string, unknown>;\n for (const [key, value] of Object.entries(changes)) {\n if (value !== undefined) {\n next[key] = value;\n }\n }\n return next as T;\n}\n","import type { Transport } from './protocol/transport';\nimport type { Envelope, MessageMap, MessageType } from './protocol/core';\n\nexport type MessageHandler<Payload> = (payload: Payload) => void;\n\nexport class MessageChannel<Outgoing extends MessageMap, Incoming extends MessageMap> {\n readonly #transport: Transport;\n readonly #handlers = new Map<string, MessageHandler<never>>();\n\n constructor(transport: Transport) {\n this.#transport = transport;\n }\n\n send<T extends MessageType<Outgoing>>(type: T, payload: Outgoing[T]): void {\n this.#transport.post({ type, payload } satisfies Envelope);\n }\n\n handle<T extends MessageType<Incoming>>(\n type: T,\n handler: MessageHandler<Incoming[T]>,\n ): MessageHandler<Incoming[T]> | undefined {\n const previous = this.#handlers.get(type) as MessageHandler<Incoming[T]> | undefined;\n this.#handlers.set(type, handler);\n return previous;\n }\n\n listen(onError: (error: unknown, message: Envelope) => void): () => void {\n return this.#transport.listen((rawMessage) => {\n const message = rawMessage as Envelope;\n const handler = this.#handlers.get(message.type) as MessageHandler<unknown> | undefined;\n if (!handler) {\n onError(new Error(`No handler registered for message \"${message.type}\"`), message);\n return;\n }\n try {\n handler(message.payload);\n } catch (error) {\n onError(error, message);\n }\n });\n }\n}\n"],"mappings":";AA0CA,SAAgB,gBAKd,UAMmD;CACnD,OAAO;EAAE,OAAO,CAAC;EAAY,QAAQ,CAAC;EAAG,GAAG;CAAS;AACvD;AAIA,SAAgB,UAAgC,OAAgC;CAC9E,OAAO,KAAK,MAAM,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,MAAM,MAAM,CAAC;AAC3D;AAGA,SAAgB,YAAY,MAAuB;CACjD,MAA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;EACxC,KAAK,UAAU,IAAI,MAAM,OAAO;EAChC,OAAO;CACT;CAEA,OAAO,SAAkE;EACvE,OAAO,KAAK,WAAW,QAAQ,eAAe;GAC5C,MAAM,UAAU;GAChB,MAAM,UAAU,KAAK,UAAU,IAAI,QAAQ,IAAI;GAC/C,IAAI,CAAC,SAAS;IACZ,wBAAQ,IAAI,MAAM,sCAAsC,QAAQ,KAAK,EAAE,GAAG,OAAO;IACjF;GACF;GACA,IAAI;IACF,QAAQ,QAAQ,OAAO;GACzB,SAAS,OAAO;IACd,QAAQ,OAAO,OAAO;GACxB;EACF,CAAC;CACH;AACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/view/component.ts","../src/view/values.ts","../src/source/location.ts","../src/source/error.ts","../src/view/components/amount-input.ts","../src/view/components/button.ts","../src/view/components/options.ts","../src/view/components/carousel.ts","../src/view/components/chip.ts","../src/view/components/code-input.ts","../src/view/components/divider.ts","../src/view/components/empty-state.ts","../src/view/components/feedback.ts","../src/view/components/footer.ts","../src/view/components/grid.ts","../src/view/components/icon.ts","../src/view/components/image.ts","../src/view/components/input.ts","../src/view/components/list.ts","../src/view/components/overlays.ts","../src/view/components/qr-code.ts","../src/view/components/select.ts","../src/view/components/skeleton.ts","../src/view/components/tabs.ts","../src/view/components/text.ts","../src/view/components/text-area.ts","../src/view/components/toggles.ts","../src/view/components/view.ts","../src/view/components/index.ts","../src/event/emitter.ts","../src/event/core.ts","../src/host/host.ts","../src/host/context.ts","../src/host/calls.ts","../src/host/permissions.ts","../src/host/files.ts","../src/host/network.ts","../src/version/semantic-version.ts","../src/host/react.ts","../src/protocol/transport.ts","../src/page/lifecycle.ts","../src/page/navigation.ts","../src/page/state.ts","../src/page/bars.ts","../src/messageChannel.ts"],"sourcesContent":["import type { DotEvent } from '../event/core';\n\nexport interface PropTypes {\n string: string;\n number: number;\n boolean: boolean;\n any: unknown;\n}\n\nexport type PropType = keyof PropTypes | readonly string[];\n\nexport type PropValue<T extends PropType> = T extends readonly string[]\n ? T[number]\n : T extends keyof PropTypes\n ? PropTypes[T]\n : never;\n\n/**\n * - `none`: no children\n * - `text`: text and inline components (such as `Text`).\n * - `elements`: any components, but raw text must be wrapped in an inline component.\n */\nexport type ChildrenType = 'none' | 'text' | 'elements';\n\n/**\n * Describes a UI component independently of any renderer. The compiler checks `.dml` markup\n * against it, and each renderer maps it to its own elements.\n */\nexport interface ComponentManifest<\n Name extends string = string,\n Props extends Record<string, PropType> = Record<string, PropType>,\n Events extends string = string,\n Children extends ChildrenType = ChildrenType,\n> {\n readonly name: Name;\n readonly props: Props;\n // Supported event names; `click` is written `onClick` in markup and received as the `onClick` prop.\n readonly events: readonly Events[];\n readonly children: Children;\n readonly inline?: boolean;\n}\n\nexport function defineComponent<\n const Name extends string,\n const Props extends Record<string, PropType> = Record<never, PropType>,\n const Events extends string = never,\n const Children extends ChildrenType = ChildrenType,\n>(manifest: {\n name: Name;\n props?: Props;\n events?: readonly Events[];\n children: Children;\n inline?: boolean;\n}): ComponentManifest<Name, Props, Events, Children> {\n return { props: {} as Props, events: [], ...manifest };\n}\n\nexport type EventProp<Event extends string> = `on${Capitalize<Event>}`;\n\nexport function eventProp<Event extends string>(event: Event): EventProp<Event> {\n return `on${event.charAt(0).toUpperCase()}${event.slice(1)}` as EventProp<Event>;\n}\n\n// Event props are `on` followed by a capital letter, like `onClick`.\nexport function isEventProp(name: string): boolean {\n const letterAfterOn = name.charAt('on'.length);\n return name.startsWith('on') && letterAfterOn >= 'A' && letterAfterOn <= 'Z';\n}\n\n// The reverse of eventProp: `onClick` -> `click`.\nexport function eventName(prop: string): string {\n const name = prop.slice('on'.length);\n return name.charAt(0).toLowerCase() + name.slice(1);\n}\n\n/**\n * The props a renderer's implementation of `M` receives, with `Children` as its node type. Every\n * prop is optional and may be `undefined`: markup can omit it, and a binding can evaluate to\n * `undefined` at runtime.\n */\nexport type PropsOf<M extends ComponentManifest, Children = never> = {\n [K in keyof M['props']]?: PropValue<M['props'][K]> | undefined;\n} & {\n [E in M['events'][number] as EventProp<E>]?: ((event: DotEvent) => void) | undefined;\n} & (M['children'] extends 'none' ? unknown : { children?: Children | undefined });\n\nexport type ComponentRegistry = Readonly<Record<string, ComponentManifest>>;\n\nexport function componentRegistry(manifests: Iterable<ComponentManifest>): ComponentRegistry {\n const registry: Record<string, ComponentManifest> = {};\n for (const manifest of manifests) {\n if (manifest.name in registry) {\n throw new Error(`Component <${manifest.name}> is defined twice`);\n }\n registry[manifest.name] = manifest;\n }\n return registry;\n}\n","export function toText(value: unknown): string {\n switch (typeof value) {\n case 'string':\n return value;\n case 'number':\n case 'boolean':\n case 'bigint':\n return String(value);\n case 'object':\n return value === null ? '' : JSON.stringify(value);\n default:\n return '';\n }\n}\n\nexport function toList(value: unknown): readonly unknown[] {\n if (Array.isArray(value)) {\n return value;\n }\n if (typeof value === 'object' && value !== null && Symbol.iterator in value) {\n return Array.from(value as Iterable<unknown>);\n }\n return [];\n}\n","export interface SourceLocation {\n readonly line: number;\n readonly column: number;\n readonly offset: number;\n}\n\n// Finds lines by binary search over their start offsets, computed once per source.\nexport function createLocator(source: string): (offset: number) => SourceLocation {\n const lineStarts = [0];\n for (let index = 0; index < source.length; index++) {\n if (source[index] === '\\n') {\n lineStarts.push(index + 1);\n }\n }\n return (offset) => {\n let low = 0;\n let high = lineStarts.length - 1;\n while (low < high) {\n const middle = Math.floor((low + high + 1) / 2);\n if (lineStarts[middle]! <= offset) {\n low = middle;\n } else {\n high = middle - 1;\n }\n }\n return { line: low + 1, column: offset - lineStarts[low]! + 1, offset };\n };\n}\n\nexport function locationAt(source: string, offset: number): SourceLocation {\n return createLocator(source)(offset);\n}\n\nexport function locatedMessage(message: string, file?: string, location?: SourceLocation): string {\n const where = [file, location?.line, location?.column]\n .filter((part) => part !== undefined)\n .join(':');\n return where ? `${where}: ${message}` : message;\n}\n","import type { SourceLocation } from './location';\nimport { locatedMessage } from './location';\n\n// A problem at a place in a source file. The message starts with `file:line:column:`\nexport class SourceError extends Error {\n readonly reason: string;\n readonly file: string | undefined;\n readonly loc: SourceLocation | undefined;\n\n constructor(reason: string, file?: string, location?: SourceLocation) {\n super(locatedMessage(reason, file, location));\n this.reason = reason;\n this.file = file;\n this.loc = location;\n }\n}\n","import { defineComponent } from '../component';\n\n// A sum of money, in large type and with thousands separators. `change` carries the `value` as a\n// number, or null when the field is empty.\nexport const AmountInput = defineComponent({\n name: 'AmountInput',\n props: {\n value: 'number',\n // Shown before the amount, such as \"Le\".\n currency: 'string',\n // Digits allowed after the decimal point, 0 unless set.\n decimals: 'number',\n label: 'string',\n placeholder: 'string',\n hint: 'string',\n error: 'string',\n disabled: 'boolean',\n },\n events: ['change'],\n children: 'none',\n});\n","import { defineComponent } from '../component';\n\nexport const Button = defineComponent({\n name: 'Button',\n props: {\n variant: ['primary', 'secondary'],\n disabled: 'boolean',\n // Shows a spinner and ignores taps, such as while a payment is sent.\n loading: 'boolean',\n },\n events: ['click'],\n children: 'text',\n});\n","export const SIZES = ['small', 'medium', 'large'] as const;\n\n// Space between or around components.\nexport const SPACES = ['none', 'small', 'medium', 'large'] as const;\n\nexport const TONES = ['default', 'muted', 'info', 'success', 'warning', 'danger'] as const;\n\nexport const STATUS_TONES = ['default', 'info', 'success', 'warning', 'danger'] as const;\n\nexport const ICON_NAMES = [\n 'arrow-down',\n 'arrow-left',\n 'arrow-right',\n 'arrow-up',\n 'bank',\n 'bell',\n 'bolt',\n 'calendar',\n 'card',\n 'cart',\n 'cash',\n 'check',\n 'chevron-down',\n 'chevron-left',\n 'chevron-right',\n 'chevron-up',\n 'clock',\n 'close',\n 'copy',\n 'download',\n 'edit',\n 'error',\n 'eye',\n 'eye-off',\n 'file',\n 'gift',\n 'grid',\n 'heart',\n 'help',\n 'history',\n 'home',\n 'image',\n 'info',\n 'list',\n 'location',\n 'lock',\n 'logout',\n 'mail',\n 'minus',\n 'mobile',\n 'more',\n 'phone',\n 'plus',\n 'qr-code',\n 'receipt',\n 'refresh',\n 'search',\n 'send',\n 'settings',\n 'share',\n 'star',\n 'success',\n 'trash',\n 'upload',\n 'user',\n 'users',\n 'wallet',\n 'warning',\n 'water',\n 'wifi',\n] as const;\n\nexport type IconName = (typeof ICON_NAMES)[number];\n","import { defineComponent } from '../component';\nimport { SPACES } from './options';\n\n// Shows its children one at a time, as slides to swipe between. `change` carries the `index` of\n// the slide it moved to.\nexport const Carousel = defineComponent({\n name: 'Carousel',\n props: {\n // Moves to the next slide every `interval` milliseconds, pausing while touched.\n autoplay: 'boolean',\n interval: 'number',\n // After the last slide comes the first again.\n loop: 'boolean',\n indicator: ['dots', 'none'],\n // Space between slides, seen as one slides in.\n gap: SPACES,\n // `scale` shrinks a slide as it leaves the middle and grows the one coming in, with the swipe.\n effect: ['slide', 'scale'],\n // The slide to show; changing it moves the carousel there.\n index: 'number',\n },\n events: ['change'],\n children: 'elements',\n});\n","import { defineComponent } from '../component';\nimport { ICON_NAMES } from './options';\n\n// A small rounded choice, such as a filter; `selected` fills it.\nexport const Chip = defineComponent({\n name: 'Chip',\n props: { label: 'string', icon: ICON_NAMES, selected: 'boolean', disabled: 'boolean' },\n events: ['tap'],\n children: 'none',\n});\n","import { defineComponent } from '../component';\n\n// A one-time code or PIN, one box per digit. `complete` follows the `change` that fills the last\n// box.\nexport const CodeInput = defineComponent({\n name: 'CodeInput',\n props: {\n value: 'string',\n // How many digits, 6 unless set.\n length: 'number',\n label: 'string',\n hint: 'string',\n error: 'string',\n // Shows dots in place of the digits, as for a PIN.\n secure: 'boolean',\n disabled: 'boolean',\n },\n events: ['change', 'complete'],\n children: 'none',\n});\n","import { defineComponent } from '../component';\n\nexport const Divider = defineComponent({\n name: 'Divider',\n children: 'none',\n});\n","import { defineComponent } from '../component';\nimport { ICON_NAMES } from './options';\n\n// What a page shows where there's nothing yet, such as an empty list. What it holds, such as a\n// button, shows under its text.\nexport const EmptyState = defineComponent({\n name: 'EmptyState',\n props: { icon: ICON_NAMES, title: 'string', text: 'string' },\n children: 'elements',\n});\n","import { defineComponent } from '../component';\nimport { SIZES, STATUS_TONES } from './options';\n\nexport const Spinner = defineComponent({\n name: 'Spinner',\n props: { size: SIZES },\n children: 'none',\n});\n\nexport const ProgressBar = defineComponent({\n name: 'ProgressBar',\n // From 0 to 100.\n props: { value: 'number' },\n children: 'none',\n});\n\n// A message in the flow of the page, such as a failed payment's reason.\nexport const Notice = defineComponent({\n name: 'Notice',\n props: { tone: STATUS_TONES, title: 'string' },\n children: 'text',\n});\n\nexport const Badge = defineComponent({\n name: 'Badge',\n props: { tone: STATUS_TONES },\n children: 'text',\n});\n","import { defineComponent } from '../component';\n\n// Stays at the bottom of the screen while the page scrolls, for its main action. Put it last in\n// the page's root View.\nexport const Footer = defineComponent({\n name: 'Footer',\n children: 'elements',\n});\n","import { defineComponent } from '../component';\nimport { ICON_NAMES, SPACES } from './options';\n\n// Lays its children out in `columns` equal columns, 4 unless set.\nexport const Grid = defineComponent({\n name: 'Grid',\n props: { columns: 'number', gap: SPACES },\n children: 'elements',\n});\n\n// An icon or picture over a short label, such as a service on a home screen.\nexport const GridItem = defineComponent({\n name: 'GridItem',\n props: {\n label: 'string',\n icon: ICON_NAMES,\n image: 'string',\n // A short note on the item's corner, such as \"New\" or a count.\n badge: 'string',\n },\n events: ['tap'],\n children: 'none',\n});\n","import { defineComponent } from '../component';\nimport { ICON_NAMES, SIZES, TONES } from './options';\n\nexport const Icon = defineComponent({\n name: 'Icon',\n props: { name: ICON_NAMES, size: SIZES, tone: TONES },\n children: 'none',\n inline: true,\n});\n","import { defineComponent } from '../component';\n\nexport const Image = defineComponent({\n name: 'Image',\n props: {\n src: 'string',\n alt: 'string',\n width: 'number',\n height: 'number',\n // `cover` fills the box and crops; `contain` shows the whole picture.\n fit: ['cover', 'contain'],\n shape: ['rounded', 'square', 'circle'],\n },\n events: ['load', 'error'],\n children: 'none',\n});\n","import { defineComponent } from '../component';\n\nexport const Input = defineComponent({\n name: 'Input',\n props: {\n value: 'string',\n placeholder: 'string',\n label: 'string',\n // Help shown under the field, which `error` replaces.\n hint: 'string',\n error: 'string',\n // Text shown inside the field, before and after what the person types, such as \"Le\".\n prefix: 'string',\n suffix: 'string',\n type: ['text', 'number', 'email', 'phone', 'password'],\n maxLength: 'number',\n disabled: 'boolean',\n },\n events: ['change', 'submit'],\n children: 'none',\n});\n","import { defineComponent } from '../component';\nimport { ICON_NAMES } from './options';\n\nexport const List = defineComponent({\n name: 'List',\n props: { size: ['sm', 'md'] },\n children: 'elements',\n});\n\n// What it holds shows at its end, in place of `value`. A row with `onTap` shows a chevron.\nexport const ListItem = defineComponent({\n name: 'ListItem',\n props: {\n title: 'string',\n subtitle: 'string',\n value: 'string',\n icon: ICON_NAMES,\n image: 'string',\n },\n events: ['tap'],\n children: 'elements',\n});\n","import { defineComponent } from '../component';\nimport { STATUS_TONES } from './options';\n\n// A panel that slides up over the page while `open` is true, such as an action sheet of buttons.\n// Tapping outside it raises `close`; the page closes it by setting `open` back to false.\nexport const Sheet = defineComponent({\n name: 'Sheet',\n props: { open: 'boolean', title: 'string', showCloseIcon: 'boolean' },\n events: ['close'],\n children: 'elements',\n});\n\n// Shows `message` briefly over the page, then raises `hide`, where the page clears the message\n// so the same one can show again.\nexport const Toast = defineComponent({\n name: 'Toast',\n props: {\n message: 'string',\n tone: STATUS_TONES,\n // In milliseconds.\n duration: 'number',\n },\n events: ['hide'],\n children: 'none',\n});\n","import { defineComponent } from '../component';\n\n// `value` as a QR code, dark on light whatever the theme, so any camera can read it.\nexport const QRCode = defineComponent({\n name: 'QRCode',\n props: {\n value: 'string',\n // In pixels, 200 unless set.\n size: 'number',\n // Read out in place of the code, by screen readers.\n label: 'string',\n },\n children: 'none',\n});\n","import { defineComponent } from '../component';\n\n// A field that opens a sheet of the `Option`s it holds; `value` is the chosen one's.\nexport const Select = defineComponent({\n name: 'Select',\n props: {\n value: 'string',\n label: 'string',\n placeholder: 'string',\n hint: 'string',\n error: 'string',\n disabled: 'boolean',\n },\n events: ['change'],\n children: 'elements',\n});\n\nexport const Option = defineComponent({\n name: 'Option',\n props: { value: 'string', label: 'string' },\n children: 'none',\n});\n","import { defineComponent } from '../component';\n\nexport const Skeleton = defineComponent({\n name: 'Skeleton',\n props: {\n shape: ['text', 'circle', 'box'],\n // Lines of text, for `text`.\n lines: 'number',\n // In pixels, for `circle` and `box`.\n height: 'number',\n },\n children: 'none',\n});\n","import { defineComponent } from '../component';\n\n// A row of `Tab`s, one of them chosen: `value` is the chosen one's. The page shows what goes with\n// it, such as with an <If> for each.\nexport const Tabs = defineComponent({\n name: 'Tabs',\n props: {\n value: 'string',\n // `underline` marks the chosen tab with a line; `segmented` fills it, in a rounded track.\n variant: ['underline', 'segmented'],\n },\n events: ['change'],\n children: 'elements',\n});\n\nexport const Tab = defineComponent({\n name: 'Tab',\n props: {\n value: 'string',\n label: 'string',\n // A count shown next to the label, such as unread items.\n badge: 'number',\n },\n children: 'none',\n});\n","import { defineComponent } from '../component';\nimport { TONES } from './options';\n\nexport const Text = defineComponent({\n name: 'Text',\n props: {\n variant: ['title', 'body', 'caption'],\n tone: TONES,\n weight: ['regular', 'medium', 'bold'],\n align: ['start', 'center', 'end'],\n // Cuts the text off with an ellipsis after this many lines.\n maxLines: 'number',\n },\n children: 'text',\n inline: true,\n});\n","import { defineComponent } from '../component';\n\nexport const TextArea = defineComponent({\n name: 'TextArea',\n props: {\n value: 'string',\n placeholder: 'string',\n label: 'string',\n hint: 'string',\n error: 'string',\n // The lines of text it shows before scrolling.\n rows: 'number',\n maxLength: 'number',\n disabled: 'boolean',\n },\n events: ['change'],\n children: 'none',\n});\n","import { defineComponent } from '../component';\n\nexport const Switch = defineComponent({\n name: 'Switch',\n props: { checked: 'boolean', label: 'string', disabled: 'boolean' },\n events: ['change'],\n children: 'none',\n});\n\nexport const Checkbox = defineComponent({\n name: 'Checkbox',\n props: { checked: 'boolean', label: 'string', disabled: 'boolean' },\n events: ['change'],\n children: 'none',\n});\n\n// A choice of one `Radio` among those it holds; `value` is the chosen one's.\nexport const RadioGroup = defineComponent({\n name: 'RadioGroup',\n props: { value: 'string', label: 'string', disabled: 'boolean' },\n events: ['change'],\n children: 'elements',\n});\n\nexport const Radio = defineComponent({\n name: 'Radio',\n props: { value: 'string', label: 'string', disabled: 'boolean' },\n children: 'none',\n});\n","import { defineComponent } from '../component';\nimport { SPACES } from './options';\n\nexport const View = defineComponent({\n name: 'View',\n props: {\n gap: SPACES,\n direction: ['column', 'row'],\n // Across `direction`.\n align: ['stretch', 'start', 'center', 'end'],\n // Along `direction`: `between` puts the first and last child at the ends.\n justify: ['start', 'center', 'end', 'between'],\n // Lets children that don't fit flow onto another line.\n wrap: 'boolean',\n // Takes the space its parent has left along the parent's direction.\n grow: 'boolean',\n // Space inside the view's edges. `start` and `end` follow the reading direction, so they\n padding: SPACES,\n paddingTop: SPACES,\n paddingStart: SPACES,\n paddingEnd: SPACES,\n paddingBottom: SPACES,\n variant: ['plain', 'card'],\n },\n events: ['tap'],\n children: 'elements',\n});\n","import { componentRegistry } from '../component';\nimport { AmountInput } from './amount-input';\nimport { Button } from './button';\nimport { Carousel } from './carousel';\nimport { Chip } from './chip';\nimport { CodeInput } from './code-input';\nimport { Divider } from './divider';\nimport { EmptyState } from './empty-state';\nimport { Badge, Notice, ProgressBar, Spinner } from './feedback';\nimport { Footer } from './footer';\nimport { Grid, GridItem } from './grid';\nimport { Icon } from './icon';\nimport { Image } from './image';\nimport { Input } from './input';\nimport { List, ListItem } from './list';\nimport { Sheet, Toast } from './overlays';\nimport { QRCode } from './qr-code';\nimport { Option, Select } from './select';\nimport { Skeleton } from './skeleton';\nimport { Tab, Tabs } from './tabs';\nimport { Text } from './text';\nimport { TextArea } from './text-area';\nimport { Checkbox, Radio, RadioGroup, Switch } from './toggles';\nimport { View } from './view';\n\nexport {\n AmountInput,\n Badge,\n Button,\n Carousel,\n Checkbox,\n Chip,\n CodeInput,\n Divider,\n EmptyState,\n Footer,\n Grid,\n GridItem,\n Icon,\n Image,\n Input,\n List,\n ListItem,\n Notice,\n Option,\n ProgressBar,\n QRCode,\n Radio,\n RadioGroup,\n Select,\n Sheet,\n Skeleton,\n Spinner,\n Switch,\n Tab,\n Tabs,\n Text,\n TextArea,\n Toast,\n View,\n};\nexport { ICON_NAMES, SIZES, STATUS_TONES, TONES } from './options';\nexport type { IconName } from './options';\n\nexport const builtinComponents = {\n AmountInput,\n Badge,\n Button,\n Carousel,\n Checkbox,\n Chip,\n CodeInput,\n Divider,\n EmptyState,\n Footer,\n Grid,\n GridItem,\n Icon,\n Image,\n Input,\n List,\n ListItem,\n Notice,\n Option,\n ProgressBar,\n QRCode,\n Radio,\n RadioGroup,\n Select,\n Sheet,\n Skeleton,\n Spinner,\n Switch,\n Tab,\n Tabs,\n Text,\n TextArea,\n Toast,\n View,\n} as const;\n\nexport type BuiltinComponents = typeof builtinComponents;\n\nexport const builtinRegistry = componentRegistry(Object.values(builtinComponents));\n","type Listener = (...args: never[]) => void;\n\nexport class EventEmitter<Events extends { [K in keyof Events]: Listener }> {\n readonly #listeners = new Map<keyof Events, Set<Listener>>();\n\n on<K extends keyof Events>(name: K, listener: Events[K]): () => void {\n const listeners = this.#listeners.get(name) ?? new Set();\n this.#listeners.set(name, listeners);\n listeners.add(listener);\n return () => listeners.delete(listener);\n }\n\n emit<K extends keyof Events>(name: K, ...args: Parameters<Events[K]>): void {\n const listeners = this.#listeners.get(name) as Set<Events[K]> | undefined;\n listeners?.forEach((listener) => listener(...args));\n }\n}\n","// `data` holds the `data-*` attributes of the component that raised the event: `data-account-id`\n// arrives as `data.accountId`.\nexport interface DotEvent<Detail = unknown, Data = Readonly<Record<string, unknown>>> {\n readonly type: string;\n readonly detail: Detail;\n readonly data: Data;\n}\n\nexport function createEvent<Detail = Record<string, never>>(\n type: string,\n detail: Detail = {} as Detail,\n data: Readonly<Record<string, unknown>> = {},\n): DotEvent<Detail> {\n return { type, detail, data };\n}\n","import type { Transport } from '../protocol/transport';\n\ndeclare global {\n // Installed by the host (the iOS or Android app, or the browser simulator) before Dot starts.\n // noinspection ES6ConvertVarToLetConst\n var __hostTransport: Transport | undefined;\n}\n\n// The transport the host installed. Messages crossing it must be JSON-serializable.\nexport function hostTransport(): Transport {\n const transport = globalThis.__hostTransport;\n if (!transport) {\n throw new Error(\n 'No Dot host found: expected `globalThis.__hostTransport` to be available at runtime. ' +\n 'Dots run inside the Dash App, or a simulator via `dotctl dev`.',\n );\n }\n return transport;\n}\n","import type { ColorScheme } from '../theme/theme';\n\n// `background` while the person is away from Dash: in another app, on the home screen, or with the\n// phone locked.\nexport type AppState = 'active' | 'background';\nexport type Platform = 'ios' | 'android';\n\nexport interface SystemContext {\n readonly platform: Platform;\n readonly scheme: ColorScheme;\n readonly appState: AppState;\n}\n\nexport const DEFAULT_SYSTEM_CONTEXT: SystemContext = {\n platform: 'ios',\n scheme: 'light',\n appState: 'active',\n};\n","export type HostErrorCode =\n 'unsupported' | 'denied' | 'cancelled' | 'timeout' | 'invalid' | 'failed';\n\nexport class HostError extends Error {\n override readonly name = 'HostError';\n readonly code: HostErrorCode;\n\n constructor(code: HostErrorCode, message: string) {\n super(message);\n this.code = code;\n }\n}\n\nexport interface HostCallOptions {\n timeout?: number | undefined;\n}\n\nexport interface HostRequest<T> extends Promise<T> {\n // Stops waiting: the promise rejects with `cancelled`, and the host stops the work.\n cancel(): void;\n}\n\nexport type HostCaller = (\n method: string,\n params: unknown,\n options: HostCallOptions,\n) => HostRequest<unknown>;\n\nlet connectedCaller: HostCaller | null = null;\n\n// The service connects itself when it starts\nexport function connectHost(caller: HostCaller | null): void {\n connectedCaller = caller;\n}\n\nexport function callHost<Result>(\n method: string,\n params: unknown,\n options: HostCallOptions = {},\n): HostRequest<Result> {\n if (!connectedCaller) {\n const error = new HostError(\n 'unsupported',\n `No host to run \"${method}\": host calls run in the service`,\n );\n return createHostRequest(Promise.reject(error));\n }\n return connectedCaller(method, params, options) as HostRequest<Result>;\n}\n\nexport function createHostRequest<Result>(\n promise: Promise<Result>,\n cancel: () => void = () => {},\n): HostRequest<Result> {\n const request = promise as HostRequest<Result>;\n request.cancel = cancel;\n return request;\n}\n","// What a dot may ask the person for. A dot declares each one it uses in dot.json, with the reason\n// Dash shows the person; a host method that needs one runs only once the person allows it.\n// - `account`: the Dash account the person is logged into: their username (email or phone) and\n// full name.\nexport const PERMISSIONS = ['account'] as const;\n\nexport type DotPermission = (typeof PERMISSIONS)[number];\n\nexport function isPermission(value: string): value is DotPermission {\n return (PERMISSIONS as readonly string[]).includes(value);\n}\n","export const DOT_FILE_PATH_MAX_LENGTH = 512;\nconst MAX_NAME_LENGTH = 255;\n\n// Why `path` isn't a relative path inside a dot's storage, or null when it is.\nexport function dotFilePathProblem(path: string, { allowRoot = false } = {}): string | null {\n if (path === '') {\n return allowRoot ? null : 'A path is needed, such as \"receipts/42.pdf\"';\n }\n if (path.length > DOT_FILE_PATH_MAX_LENGTH) {\n return `\"${path.slice(0, 40)}…\" is longer than ${DOT_FILE_PATH_MAX_LENGTH} characters`;\n }\n if (path.startsWith('/')) {\n return `\"${path}\" starts with \"/\": paths are relative to the dot's storage, such as \"receipts/42.pdf\"`;\n }\n if ([...path].some((char) => char === '\\\\' || char.charCodeAt(0) < 0x20)) {\n return `\"${path}\" has a backslash or a control character`;\n }\n for (const name of path.split('/')) {\n if (name === '' || name === '.' || name === '..') {\n return `\"${path}\" has an empty, \".\" or \"..\" part: write each folder once, such as \"receipts/42.pdf\"`;\n }\n if (name.length > MAX_NAME_LENGTH) {\n return `\"${path}\" has a name longer than ${MAX_NAME_LENGTH} characters`;\n }\n }\n return null;\n}\n","// An exact host name, or \"*.example.com\" for any subdomain of example.com, but not example.com.\nconst LABEL = '[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?';\nexport const NETWORK_HOST_PATTERN = new RegExp(\n `^(?:\\\\*\\\\.${LABEL}(?:\\\\.${LABEL})+|${LABEL}(?:\\\\.${LABEL})*)$`,\n);\nexport const NETWORK_HOST_MAX_LENGTH = 253;\n\nexport function isNetworkHost(value: string): boolean {\n return value.length <= NETWORK_HOST_MAX_LENGTH && NETWORK_HOST_PATTERN.test(value);\n}\n\nexport function allowsHost(hosts: readonly string[], host: string): boolean {\n const name = host.toLowerCase().replace(/\\.$/, '');\n return hosts.some((pattern) =>\n pattern.startsWith('*.') ? name.endsWith(pattern.slice(1)) : name === pattern,\n );\n}\n","// A semantic version, as https://semver.org defines it: `1.4.0`, `2.0.0-beta.1`, `1.0.0+build.7`.\nexport const SEMVER_PATTERN =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\ninterface SemanticVersion {\n readonly major: number;\n readonly minor: number;\n readonly patch: number;\n // `[\"beta\", \"1\"]` for `1.0.0-beta.1`; empty for a release.\n readonly prerelease: readonly string[];\n}\n\nexport function isSemanticVersion(value: unknown): value is string {\n return typeof value === 'string' && SEMVER_PATTERN.test(value);\n}\n\nexport function majorVersion(version: string): number {\n return parseVersion(version).major;\n}\n\n// Whether `version` is `minimum` or a later one.\nexport function isVersionAtLeast(version: string, minimum: string): boolean {\n return compareVersions(version, minimum) >= 0;\n}\n\n// Negative when `left` comes before `right`, positive when after, and 0 for the same release.\n// Build metadata, the part after `+`, does not count.\nexport function compareVersions(left: string, right: string): number {\n const leftVersion = parseVersion(left);\n const rightVersion = parseVersion(right);\n const differences = [\n leftVersion.major - rightVersion.major,\n leftVersion.minor - rightVersion.minor,\n leftVersion.patch - rightVersion.patch,\n ];\n for (const difference of differences) {\n if (difference !== 0) {\n return difference;\n }\n }\n return comparePrereleases(leftVersion.prerelease, rightVersion.prerelease);\n}\n\nfunction parseVersion(version: string): SemanticVersion {\n const match = SEMVER_PATTERN.exec(version);\n if (!match) {\n throw new Error(`\"${version}\" is not a semantic version`);\n }\n const [, major, minor, patch, prerelease] = match;\n return {\n major: Number(major),\n minor: Number(minor),\n patch: Number(patch),\n prerelease: prerelease === undefined ? [] : prerelease.split('.'),\n };\n}\n\n// A release comes after its pre-releases (`1.0.0-beta` < `1.0.0`). Between pre-releases, the first\n// identifier that differs decides; if all match, the one with fewer identifiers comes first.\nfunction comparePrereleases(left: readonly string[], right: readonly string[]): number {\n if (left.length === 0 || right.length === 0) {\n return right.length - left.length;\n }\n const shared = Math.min(left.length, right.length);\n for (let index = 0; index < shared; index++) {\n const order = compareIdentifiers(left[index]!, right[index]!);\n if (order !== 0) {\n return order;\n }\n }\n return left.length - right.length;\n}\n\n// Numbers compare as numbers and come before words, which compare as text.\nfunction compareIdentifiers(left: string, right: string): number {\n const leftIsNumber = /^\\d+$/.test(left);\n const rightIsNumber = /^\\d+$/.test(right);\n if (leftIsNumber && rightIsNumber) {\n return Number(left) - Number(right);\n }\n if (leftIsNumber) {\n return -1;\n }\n if (rightIsNumber) {\n return 1;\n }\n if (left < right) {\n return -1;\n }\n if (left > right) {\n return 1;\n }\n return 0;\n}\n","import { compareVersions, isVersionAtLeast, majorVersion } from '../version/semantic-version';\n\n// The host ships React, not each dot: every dot's webview imports these names, and an import map in\n// its index.html points them at the host's copies under `/__dot/react/<major>/`.\nexport const REACT_HOST_PATH = '/__dot/react/';\n\n// Each name a dot's webview imports React by, and the host's file for it.\nexport const REACT_HOST_MODULES = {\n react: 'react.js',\n 'react/jsx-runtime': 'react-jsx-runtime.js',\n 'react-dom': 'react-dom.js',\n 'react-dom/client': 'react-dom-client.js',\n} as const;\n\n// By major version only: the host serves the newest React it has with that major, so it can update\n// React within a major without dots being rebuilt.\nexport function reactHostUrl(dotReactVersion: string, file: string): string {\n return `${REACT_HOST_PATH}${majorVersion(dotReactVersion)}/${file}`;\n}\n\n// A React release only adds to its major version, so a dot runs on the same major at or above the\n// version it was built with. A different major can change or remove what the dot relies on.\nexport function isReactCompatible(hostVersion: string, dotVersion: string): boolean {\n return (\n majorVersion(hostVersion) === majorVersion(dotVersion) &&\n isVersionAtLeast(hostVersion, dotVersion)\n );\n}\n\n// The newest of `versions` with `major`, or undefined when there is none.\nexport function newestReactOfMajor(versions: readonly string[], major: number): string | undefined {\n const matching = versions.filter((version) => majorVersion(version) === major);\n return matching.sort(compareVersions).at(-1);\n}\n","/**\n * A universal bridge for sending and receiving messages,\n * whether across web workers, message ports, or native app boundaries.\n */\nexport interface Transport {\n post(message: unknown): void;\n // Returns a function that removes the listener.\n listen(listener: (message: unknown) => void): () => void;\n}\n\n/**\n * Adapter interface for anything that acts like\n * 1. a MessagePort (https://developer.mozilla.org/en-US/docs/Web/API/MessagePort) or\n * 2. a Web Worker (https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API)\n */\nexport interface TransportAdapter {\n postMessage(message: unknown): void;\n addEventListener(type: 'message', listener: (event: { data: unknown }) => void): void;\n removeEventListener(type: 'message', listener: (event: { data: unknown }) => void): void;\n}\n\nexport function createAdaptorTransport(adapter: TransportAdapter): Transport {\n return {\n post: (message) => adapter.postMessage(message),\n listen(listener) {\n const onMessage = (event: { data: unknown }) => listener(event.data);\n adapter.addEventListener('message', onMessage);\n return () => adapter.removeEventListener('message', onMessage);\n },\n };\n}\n\n// Two transports connected to each other in the same thread, for tests and single-thread setups.\nexport function createTransportPair(): [Transport, Transport] {\n type Listeners = Set<(message: unknown) => void>;\n const firstListeners: Listeners = new Set();\n const secondListeners: Listeners = new Set();\n const createSide = (ownListeners: Listeners, otherListeners: Listeners): Transport => ({\n post: (message) => {\n // Simulate cross-thread memory isolation by cloning the payload\n const copy: unknown = JSON.parse(JSON.stringify(message));\n otherListeners.forEach((listener) => listener(copy));\n },\n listen(listener) {\n ownListeners.add(listener);\n return () => ownListeners.delete(listener);\n },\n });\n return [createSide(firstListeners, secondListeners), createSide(secondListeners, firstListeners)];\n}\n","import type { PageLaunchOptions } from './navigation';\n\nexport interface PageHooks {\n onLoad(options: PageLaunchOptions): void | Promise<void>;\n onShow(): void | Promise<void>;\n onHide(): void | Promise<void>;\n onUnload(): void | Promise<void>;\n}\n\nexport interface DotHooks {\n onLaunch(): void | Promise<void>;\n onError(error: Error): void;\n}\n\n// A record rather than a list, so adding a hook to PageHooks without listing it is a type error.\nconst pageHooks: Record<keyof PageHooks, true> = {\n onLoad: true,\n onShow: true,\n onHide: true,\n onUnload: true,\n};\n\nexport const PAGE_HOOKS = Object.keys(pageHooks) as readonly (keyof PageHooks)[];\n","export const MAX_STACK_DEPTH = 8;\n\nconst PAGE_ID = /^[A-Za-z0-9_-]+(?:\\/[A-Za-z0-9_-]+)*$/;\n\nexport function isPageId(value: string): boolean {\n return PAGE_ID.test(value);\n}\n\nexport type PageLaunchOptions = Readonly<Record<string, string>>;\n\nexport type Navigation =\n | {\n readonly action: 'push' | 'replace' | 'reset';\n readonly page: string;\n readonly options: PageLaunchOptions;\n }\n | { readonly action: 'back'; readonly delta: number };\n\nexport interface StackEntry {\n readonly instanceId: number;\n readonly page: string;\n readonly options: PageLaunchOptions;\n}\n\nexport class NavigationStack {\n readonly limit: number;\n #pages: StackEntry[] = [];\n #nextInstanceId = 1;\n\n constructor(limit = MAX_STACK_DEPTH) {\n this.limit = limit;\n }\n\n get pages(): readonly StackEntry[] {\n return this.#pages;\n }\n\n get top(): StackEntry | undefined {\n return this.#pages.at(-1);\n }\n\n /**\n * Applies a navigation, or refuses it and returns false: a push onto a full stack, or going back\n * from the first page (which the host handles itself, e.g. by closing the dot).\n */\n apply(navigation: Navigation): boolean {\n switch (navigation.action) {\n case 'push':\n if (this.#pages.length >= this.limit) {\n return false;\n }\n break;\n case 'replace':\n this.#pages.pop();\n break;\n case 'reset':\n this.#pages = [];\n break;\n case 'back': {\n const count = Math.min(navigation.delta, this.#pages.length - 1);\n if (count < 1) {\n return false;\n }\n this.#pages = this.#pages.slice(0, -count);\n return true;\n }\n }\n const { page, options } = navigation;\n this.#pages = [...this.#pages, { instanceId: this.#nextInstanceId++, page, options }];\n return true;\n }\n}\n","export function applyChanges<T>(state: T, changes: Partial<T>): T {\n const next = { ...state } as Record<string, unknown>;\n for (const [key, value] of Object.entries(changes)) {\n if (value !== undefined) {\n next[key] = value;\n }\n }\n return next as T;\n}\n","// What a page shows in Dash's bars around the dot. A dot sets them for all its pages in defineDot,\n// for one page in definePage, and while a page runs; Dash puts its own back when the page closes or\n// the dot exits. An option set to undefined goes back to Dash's own.\nexport interface NavigationBarOptions {\n // Shown in place of the dot's name.\n title?: string | undefined;\n hidden?: boolean | undefined;\n // As #RRGGBB.\n backgroundColor?: string | undefined;\n textColor?: string | undefined;\n}\n\nexport interface TabBarOptions {\n // Hides Dash's own tabs at the bottom of the screen.\n hidden?: boolean | undefined;\n}\n\n// The `configs` of defineDot and definePage.\nexport interface PageConfigs {\n navigationBar?: NavigationBarOptions | undefined;\n tabBar?: TabBarOptions | undefined;\n}\n\nexport interface PageBars {\n navigationBar: NavigationBarOptions;\n tabBar: TabBarOptions;\n}\n\nconst HEX_COLOR = /^#[0-9a-fA-F]{6}$/;\n\n// Throws when an option has the wrong type, or a color isn't #RRGGBB.\nexport function checkNavigationBar(options: NavigationBarOptions): void {\n const { title, hidden, backgroundColor, textColor } = options;\n if (title !== undefined && typeof title !== 'string') {\n throw new TypeError(\"The navigation bar's title must be text\");\n }\n if (hidden !== undefined && typeof hidden !== 'boolean') {\n throw new TypeError(\"The navigation bar's `hidden` must be true or false\");\n }\n for (const [name, color] of Object.entries({ backgroundColor, textColor })) {\n if (color !== undefined && (typeof color !== 'string' || !HEX_COLOR.test(color))) {\n throw new TypeError(`The navigation bar's ${name} must be a color such as \"#1A73E8\"`);\n }\n }\n}\n\nexport function checkTabBar(options: TabBarOptions): void {\n if (options.hidden !== undefined && typeof options.hidden !== 'boolean') {\n throw new TypeError(\"The tab bar's `hidden` must be true or false\");\n }\n}\n\nexport function checkConfigs(configs: PageConfigs): void {\n checkNavigationBar(configs.navigationBar ?? {});\n checkTabBar(configs.tabBar ?? {});\n}\n\n// Later configs override earlier ones, option by option.\nexport function mergeConfigs(...configs: (PageConfigs | undefined)[]): PageBars {\n const bars: PageBars = { navigationBar: {}, tabBar: {} };\n for (const config of configs) {\n bars.navigationBar = { ...bars.navigationBar, ...config?.navigationBar };\n bars.tabBar = { ...bars.tabBar, ...config?.tabBar };\n }\n return bars;\n}\n","import type { Transport } from './protocol/transport';\nimport type { Envelope, MessageMap, MessageType } from './protocol/core';\n\nexport type MessageHandler<Payload> = (payload: Payload) => void;\n\nexport class MessageChannel<Outgoing extends MessageMap, Incoming extends MessageMap> {\n readonly #transport: Transport;\n readonly #handlers = new Map<string, MessageHandler<never>>();\n\n constructor(transport: Transport) {\n this.#transport = transport;\n }\n\n send<T extends MessageType<Outgoing>>(type: T, payload: Outgoing[T]): void {\n this.#transport.post({ type, payload } satisfies Envelope);\n }\n\n handle<T extends MessageType<Incoming>>(\n type: T,\n handler: MessageHandler<Incoming[T]>,\n ): MessageHandler<Incoming[T]> | undefined {\n const previous = this.#handlers.get(type) as MessageHandler<Incoming[T]> | undefined;\n this.#handlers.set(type, handler);\n return previous;\n }\n\n listen(onError: (error: unknown, message: Envelope) => void): () => void {\n return this.#transport.listen((rawMessage) => {\n const message = rawMessage as Envelope;\n const handler = this.#handlers.get(message.type) as MessageHandler<unknown> | undefined;\n if (!handler) {\n onError(new Error(`No handler registered for message \"${message.type}\"`), message);\n return;\n }\n try {\n handler(message.payload);\n } catch (error) {\n onError(error, message);\n }\n });\n }\n}\n"],"mappings":";AA0CA,SAAgB,gBAKd,UAMmD;CACnD,OAAO;EAAE,OAAO,CAAC;EAAY,QAAQ,CAAC;EAAG,GAAG;CAAS;AACvD;AAIA,SAAgB,UAAgC,OAAgC;CAC9E,OAAO,KAAK,MAAM,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,MAAM,MAAM,CAAC;AAC3D;AAGA,SAAgB,YAAY,MAAuB;CACjD,MAAM,gBAAgB,KAAK,OAAO,CAAW;CAC7C,OAAO,KAAK,WAAW,IAAI,KAAK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