@a11d/lit-application 0.11.0 → 0.11.1

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.
Files changed (79) hide show
  1. package/CHANGELOG.md +184 -0
  2. package/README.md +99 -0
  3. package/dist/Application.d.ts +50 -0
  4. package/dist/Application.d.ts.map +1 -1
  5. package/dist/Application.js +48 -0
  6. package/dist/ApplicationTopLayer.d.ts +6 -0
  7. package/dist/ApplicationTopLayer.d.ts.map +1 -1
  8. package/dist/ApplicationTopLayer.js +6 -0
  9. package/dist/Dialog/Dialog.d.ts +13 -0
  10. package/dist/Dialog/Dialog.d.ts.map +1 -1
  11. package/dist/Dialog/Dialog.js +1 -0
  12. package/dist/Dialog/DialogCancelledError.d.ts +1 -0
  13. package/dist/Dialog/DialogCancelledError.d.ts.map +1 -1
  14. package/dist/Dialog/DialogCancelledError.js +1 -0
  15. package/dist/Dialog/DialogComponent.d.ts +36 -0
  16. package/dist/Dialog/DialogComponent.d.ts.map +1 -1
  17. package/dist/Dialog/DialogComponent.js +31 -0
  18. package/dist/Dialog/ErrorHandlers/DialogComponentNoOpErrorHandler.d.ts +1 -0
  19. package/dist/Dialog/ErrorHandlers/DialogComponentNoOpErrorHandler.d.ts.map +1 -1
  20. package/dist/Dialog/ErrorHandlers/DialogComponentNoOpErrorHandler.js +1 -0
  21. package/dist/Dialog/ErrorHandlers/DialogComponentNotificationErrorHandler.d.ts +1 -0
  22. package/dist/Dialog/ErrorHandlers/DialogComponentNotificationErrorHandler.d.ts.map +1 -1
  23. package/dist/Dialog/ErrorHandlers/DialogComponentNotificationErrorHandler.js +1 -0
  24. package/dist/Notification/NotificationComponent.d.ts +14 -0
  25. package/dist/Notification/NotificationComponent.d.ts.map +1 -1
  26. package/dist/Notification/NotificationComponent.js +10 -0
  27. package/dist/Page/Page.d.ts +3 -1
  28. package/dist/Page/Page.d.ts.map +1 -1
  29. package/dist/Page/PageComponent.d.ts +11 -0
  30. package/dist/Page/PageComponent.d.ts.map +1 -1
  31. package/dist/Page/PageComponent.js +9 -0
  32. package/dist/Page/PageError.d.ts +1 -0
  33. package/dist/Page/PageError.d.ts.map +1 -1
  34. package/dist/Page/PageError.js +1 -0
  35. package/dist/Page/PageHost.d.ts +1 -0
  36. package/dist/Page/PageHost.d.ts.map +1 -1
  37. package/dist/Page/PageHost.js +7 -6
  38. package/dist/PwaHelper/Manifest.d.ts +2 -0
  39. package/dist/PwaHelper/Manifest.d.ts.map +1 -1
  40. package/dist/PwaHelper/ManifestProvider.d.ts +1 -0
  41. package/dist/PwaHelper/ManifestProvider.d.ts.map +1 -1
  42. package/dist/PwaHelper/PwaHelper.d.ts +4 -0
  43. package/dist/PwaHelper/PwaHelper.d.ts.map +1 -1
  44. package/dist/PwaHelper/PwaHelper.js +3 -0
  45. package/dist/Router/RoutableComponent.d.ts.map +1 -1
  46. package/dist/Router/RouterController.d.ts +6 -0
  47. package/dist/Router/RouterController.d.ts.map +1 -1
  48. package/dist/Router/RouterController.js +6 -0
  49. package/dist/Router/path.d.ts +1 -3
  50. package/dist/Router/path.d.ts.map +1 -1
  51. package/dist/Router/route.d.ts +5 -0
  52. package/dist/Router/route.d.ts.map +1 -1
  53. package/dist/Router/route.js +5 -0
  54. package/dist/Router/routerLink.d.ts +12 -0
  55. package/dist/Router/routerLink.d.ts.map +1 -1
  56. package/dist/Router/routerLink.js +6 -0
  57. package/dist/utilities/HookSet.d.ts +2 -0
  58. package/dist/utilities/HookSet.d.ts.map +1 -1
  59. package/dist/utilities/HookSet.js +2 -0
  60. package/dist/utilities/HttpError.d.ts +1 -0
  61. package/dist/utilities/HttpError.d.ts.map +1 -1
  62. package/dist/utilities/HttpError.js +1 -0
  63. package/dist/utilities/HttpErrorCode.d.ts +1 -0
  64. package/dist/utilities/HttpErrorCode.d.ts.map +1 -1
  65. package/dist/utilities/HttpErrorCode.js +1 -0
  66. package/dist/utilities/Key.d.ts +3 -4
  67. package/dist/utilities/Key.d.ts.map +1 -1
  68. package/dist/utilities/Key.js +3 -4
  69. package/dist/utilities/WindowHelper.d.ts +3 -0
  70. package/dist/utilities/WindowHelper.d.ts.map +1 -1
  71. package/dist/utilities/WindowHelper.js +3 -0
  72. package/dist/utilities/queryInstanceElement.d.ts +1 -0
  73. package/dist/utilities/queryInstanceElement.d.ts.map +1 -1
  74. package/dist/utilities/queryInstanceElement.js +1 -0
  75. package/dist/utilities/querySymbolizedElement.d.ts +5 -0
  76. package/dist/utilities/querySymbolizedElement.d.ts.map +1 -1
  77. package/dist/utilities/querySymbolizedElement.js +5 -0
  78. package/package.json +19 -15
  79. package/dist/tsconfig.tsbuildinfo +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,184 @@
1
+ ## 0.11.1 (2026-09-28)
2
+ - **📝 Documentation**: Describe the package and document its exports ([ff24f0d](https://github.com/a11delavar/lit-application/commit/ff24f0d5837cbdca02329e7716cf485d6402a2a2))
3
+
4
+ ## 0.11.0 (2026-08-19)
5
+ - **🚀 Feature**: Pages' and dialogs' heading can be inferred from the instance-level override of the `label` metadata ([399c336](https://github.com/a11delavar/lit-application/commit/399c336dd0fb01005b0248f837ce6f7fa0ad4204))
6
+
7
+ ## 0.10.0 (2026-05-08)
8
+ - **🧹 Chore**: Bump TypeScript target to ES2022 ([54f88ce](https://github.com/a11delavar/lit-application/commit/54f88ceefd083a4a3f5cc184b000ed338ff85938))
9
+
10
+ ## 0.8.3 (2026-03-12)
11
+ - **🐛 Fix**: Prevent circular resolving of types in TypeScript 7 ([5ba7752](https://github.com/a11delavar/lit-application/commit/5ba77520b87d73604635b7a8c57f9150976408fa))
12
+
13
+ ## 0.8.2 (2025-09-29)
14
+ - **🐛 Fix**: Fix `poppableConfirmationStrategy` value not being respected by dialog's `confirm` method ([d984083](https://github.com/a11delavar/lit-application/commit/d984083e761b0b82688a36c3feb5514e6b32ffb5))
15
+
16
+ ## 0.8.1 (2025-09-24)
17
+ - **🐛 Fix**: Don't clone state of non-opened dialogs when opening them as popups ([07af861](https://github.com/a11delavar/lit-application/commit/07af8613ff97cf9c4e640af6bc976aae455b0d8e))
18
+
19
+ ## 0.8.0 (2025-09-24)
20
+ - **🚀 Feature**: Infer whether a dialog is `poppable` automatically ([65e07a1](https://github.com/a11delavar/lit-application/commit/65e07a1fcc4c29107f4b53f2298702c904cb4ac1))
21
+
22
+ ## 0.7.5 (2025-09-24)
23
+ - **🐛 Fix**: Fix query strings being encoded twice sometimes ([8bbbdec](https://github.com/a11delavar/lit-application/commit/8bbbdec316339f5fc290bff97355e02803347578))
24
+
25
+ ## 0.7.4 (2025-09-23)
26
+ - **🐛 Fix**: Fix non-string parameters in routable components leading to URL mismatch ([78ed027](https://github.com/a11delavar/lit-application/commit/78ed0270891946847035f59a08f31074011d9863))
27
+
28
+ ## 0.7.3 (2025-05-15)
29
+ - **🐛 Fix**: Fix bound-to-window routable component not being detected correctly sometimes ([dc33130](https://github.com/a11delavar/lit-application/commit/dc3313063eed5af52acd6e7ca5196c976bd154d4))
30
+
31
+ ## 0.7.2 (2025-05-14)
32
+ - **🚀⚠️ Breaking Feature**: Deprecate `Router` in favor of the new `RoutableComponent` to enhance routing and parameters lifecycle (#4) ([55e78a7](https://github.com/a11delavar/lit-application/commit/55e78a78750b15ae8c74ef166fe70dc49bd715aa))
33
+
34
+ ## 0.6.1 (2025-03-11)
35
+ - **🚀 Feature**: Infer routable elements' `heading` from their component's `label` metadata, if not set explicitly ([86f7b79](https://github.com/a11delavar/lit-application/commit/86f7b79f3c5e4d49b506a2fc33dfa06598c4a0d8))
36
+
37
+ ## 0.5.3 (2025-02-26)
38
+ - **🚀 Feature**: Ability to override navigation strategy of `routerLink`s ([23c72bc](https://github.com/a11delavar/lit-application/commit/23c72bcb4744ddf55e4d781ee2dda7d8e8caf94f))
39
+
40
+ ## 0.5.1 (2025-02-26)
41
+ - **🐛 Fix**: Encode/decode query parameters ([f4c250f](https://github.com/a11delavar/lit-application/commit/f4c250fa4b3148b1e2e2ded0df3fa7a569db68d0))
42
+
43
+ ## 0.5.0 (2025-02-04)
44
+ - **🚀 Feature**: Add `cloned` callback to `DialogComponent` ([8bdbe36](https://github.com/a11delavar/lit-application/commit/8bdbe3602c850acad4cd0d5ec5bb89d144bb7f1f))
45
+ - **🧹 Chore**: `confirmAsDialog` is private now, use `confirm(DialogConfirmationStrategy.Dialog)` instead ([8bdbe36](https://github.com/a11delavar/lit-application/commit/8bdbe3602c850acad4cd0d5ec5bb89d144bb7f1f))
46
+ - **🧹 Chore**: `confirmAsPopup` is private now, use `confirm(DialogConfirmationStrategy.Popup)` or `confirm(DialogConfirmationStrategy.Window)` instead ([8bdbe36](https://github.com/a11delavar/lit-application/commit/8bdbe3602c850acad4cd0d5ec5bb89d144bb7f1f))
47
+
48
+ ## 0.4.2 (2025-01-20)
49
+ - **🚀 Feature**: Add the `opener` getter to `DialogComponent` ([270b1d7](https://github.com/a11delavar/lit-application/commit/270b1d70a4ea31b2f520ade2e1a26279c5b438f2))
50
+
51
+ ## 0.4.1 (2024-11-04)
52
+ - **🚀 Feature**: Add parameters not present in the route as query string ([a22363b](https://github.com/a11delavar/lit-application/commit/a22363be3a9f35dd0bbf89a498afaa92ebf4545f))
53
+
54
+ ## 0.3.5 (2024-10-09)
55
+ - **🐛 Fix**: Accept string-like objects as notification message ([4a3151c](https://github.com/a11delavar/lit-application/commit/4a3151ca308f5e17d369e1a14a71dc824249bfb7))
56
+
57
+ ## 0.3.3 (2024-06-24)
58
+ - **🚀⚠️ Breaking Feature**: Routable Dialogs ([c8350e2](https://github.com/a11delavar/lit-application/commit/c8350e26f5391b7e0bb48608bacab907f29b07e7))
59
+
60
+ ## 0.2.5 (2024-05-15)
61
+ - **🐛 Fix**: Fix base-path not being considered for popup dialogs ([7557410](https://github.com/a11delavar/lit-application/commit/755741047c2e1351c637e0993e4cb0503cdc36e5))
62
+
63
+ ## 0.2.3 (2024-05-01)
64
+ - **🐛 Fix**: Fix router mixing up pages with same class names ([228ccbb](https://github.com/a11delavar/lit-application/commit/228ccbb669c8cf73f6e432ce7dce67fb33e3a54c))
65
+
66
+ ## 0.2.2 (2024-04-16)
67
+ - **🧹 Chore**: Add ability to override page-loading template ([a7165d7](https://github.com/a11delavar/lit-application/commit/a7165d7eebbe8dafd576382f85ce3409af25e9eb))
68
+
69
+ ## 0.2.1 (2024-04-09)
70
+ - **🚀 Feature**: Dialog error handling strategies ([ba3d922](https://github.com/a11delavar/lit-application/commit/ba3d922e7db118e59d8263e574eea5082af0466e))
71
+
72
+ ## 0.1.17 (2024-03-20)
73
+ - **🐛 Fix**: More reliable reconnecting of top-layer elements ([d2fcd99](https://github.com/a11delavar/lit-application/commit/d2fcd994e4a3b2310c9a88e16d5244cc7486a391))
74
+
75
+ ## 0.1.16 (2024-02-27)
76
+ - **🐛 Fix**: Support differed setting of router's `basePath` ([e43b707](https://github.com/a11delavar/lit-application/commit/e43b7077ff147aee6390b4f90092d8e14eff7deb))
77
+
78
+ ## 0.1.12 (2024-02-19)
79
+ - **🐛 Fix**: Re-connect the disconnected top-layer elements ([9e1361b](https://github.com/a11delavar/lit-application/commit/9e1361bfe418df18755da058d42cb74f5e8e8207))
80
+
81
+ ## 0.1.10 (2024-01-19)
82
+ - **🐛 Fix**: Fix "notifyErrorAndThrow" not working with a short-hand parameter ([749f893](https://github.com/a11delavar/lit-application/commit/749f893e671811e77d70c9ecb07e9e819cd70701))
83
+
84
+ ## 0.1.9 (2024-01-05)
85
+ - **🧹 Chore**: Prevent fail on SSR ([030e264](https://github.com/a11delavar/lit-application/commit/030e26453d6f77bfbbd152e872cbcd017d0757f4))
86
+
87
+ ## 0.1.7 (2023-10-06)
88
+ - **🧹 Chore**: Default z-index for top-layer ([c1a8e50](https://github.com/a11delavar/lit-application/commit/c1a8e504b303df68edaee5ed46c81e4f0939d2d6))
89
+
90
+ ## 0.1.6 (2023-10-06)
91
+ - **🐛 Fix**: Fix dialog keyboard shortcuts not working ([dd9496f](https://github.com/a11delavar/lit-application/commit/dd9496fc3d64ee2694a62a3f4b850ebef68cd000))
92
+
93
+ ## 0.1.5 (2023-10-04)
94
+ - **🧹 Chore**: Render a top-layer in the application instance ([2a117e6](https://github.com/a11delavar/lit-application/commit/2a117e6cb9cd77c23b61da496712fc2f75477c02))
95
+
96
+ ## 0.1.4 (2023-10-04)
97
+ - **🧹 Chore**: Force top-layer not to have any dimensions ([7710448](https://github.com/a11delavar/lit-application/commit/77104488a3ac651d4dbfadfe72951fd4e8f8dc8b))
98
+
99
+ ## 0.1.3 (2023-10-03)
100
+ - **🚀 Feature**: Introduce application top-layers replacing various host elements ([ae35e7a](https://github.com/a11delavar/lit-application/commit/ae35e7a638457a0365ea8b6a2dbfd5334f81aff2))
101
+
102
+ ## 0.0.51 (2023-09-06)
103
+ - **🐛 Fix**: Fix dialogs not opening as popup in some cases ([35684d6](https://github.com/a11delavar/lit-application/commit/35684d62e2acdf24bbadfcb97e007fd67ef41f4b))
104
+
105
+ ## 0.0.50 (2023-08-18)
106
+ - **🚀 Feature**: Set href of router links ([01adf09](https://github.com/a11delavar/lit-application/commit/01adf09b513186a47777cdb6b6d062b4cfce95e6))
107
+
108
+ ## 0.0.48 (2023-08-04)
109
+ - **🐛 Fix**: Fix notifyAndThroError not handling where no explicit notifications are provided ([d52afba](https://github.com/a11delavar/lit-application/commit/d52afba553c62b6dadfe2a9dd603298faafb2746))
110
+
111
+ ## 0.0.46 (2023-05-26)
112
+ - **🐛 Fix**: Only attach the application if not already connected ([9a2432f](https://github.com/a11delavar/lit-application/commit/9a2432fcd96f1b236a1d7aa78770b71cdc27a3c3))
113
+
114
+ ## 0.0.38 (2023-02-26)
115
+ - **🧹 Chore**: Make "handleAction" protected ([51b3d27](https://github.com/a11delavar/lit-application/commit/51b3d272ae22f1aeb82d0b700d5b870fb8108723))
116
+
117
+ ## 0.0.37 (2023-01-17)
118
+ - **🐛 Fix**: Fix routerLink directive not instantiating new components on every invocation ([5e6b18e](https://github.com/a11delavar/lit-application/commit/5e6b18e45ef8b01ed7da0af6162180544bd6cc75))
119
+
120
+ ## 0.0.36 (2023-01-11)
121
+ - **🚀 Feature**: Ability to have base path for the Router ([0e4a1f2](https://github.com/a11delavar/lit-application/commit/0e4a1f27c219992cd6d3a9a9b9ae2b3583f1fa16))
122
+
123
+ ## 0.0.35 (2022-12-21)
124
+ - **🐛 Fix**: Dialog's "manualClose" should not affect cancellation actions ([949e0c8](https://github.com/a11delavar/lit-application/commit/949e0c8181b18c4141819fde07e04865daee2a41))
125
+
126
+ ## 0.0.34 (2022-12-15)
127
+ - **🐛 Fix**: Remove event listeners after the underlying element of routerLink directive has been disconnected ([0c1707f](https://github.com/a11delavar/lit-application/commit/0c1707f0a3a17ae9221ff7e853a75823050409a5))
128
+
129
+ ## 0.0.33 (2022-12-13)
130
+ - **🧹 Chore**: Distinct URL for error pages ([bec6c80](https://github.com/a11delavar/lit-application/commit/bec6c8058f46ef6b1b9d46c24e6482cd69dca72c))
131
+
132
+ ## 0.0.31 (2022-12-07)
133
+ - **🛠️ Refactoring**: Use update directive lifecycle in router link ([78dfad4](https://github.com/a11delavar/lit-application/commit/78dfad4291202bb96472278b3d98706093ef9f39))
134
+
135
+ ## 0.0.28 (2022-12-06)
136
+ - **🐛 Fix**: Fix router links not opening page in new tab when selected ([592b5f9](https://github.com/a11delavar/lit-application/commit/592b5f90dbe43e0766dfef5f5f56699a44429e89))
137
+
138
+ ## 0.0.27 (2022-12-05)
139
+ - **🧹 Chore**: Ability to override the document title ([4d1e67b](https://github.com/a11delavar/lit-application/commit/4d1e67beffe5e72566108d9a6d5c89c7cae20337))
140
+
141
+ ## 0.0.26 (2022-12-01)
142
+ - **🚀 Feature**: Support keyboard shortcuts for opening pages and dialogs ([9e445e8](https://github.com/a11delavar/lit-application/commit/9e445e85b82e896f436380e06cdb7788221546f0))
143
+
144
+ ## 0.0.24 (2022-11-27)
145
+ - **🚀 Feature**: Invocation handler for router link directive ([e0c90c3](https://github.com/a11delavar/lit-application/commit/e0c90c3d06bece0891fd0c06be3f6fb1f5422208))
146
+
147
+ ## 0.0.23 (2022-11-27)
148
+ - **🧹 Chore**: Handle the case of using dialog components without confirmation e.g. for testing ([0eb6287](https://github.com/a11delavar/lit-application/commit/0eb628782715eac67ce3110dd2d2e5faef1c3e45))
149
+
150
+ ## 0.0.22 (2022-11-22)
151
+ - **🐛 Fix**: Fix poppable dialogs not working ([8267877](https://github.com/a11delavar/lit-application/commit/82678778c6ce0882f6d43df83c27106bed984075))
152
+
153
+ ## 0.0.21 (2022-11-22)
154
+ - **🚀 Feature**: Add support for hooks before route ([0df3aaa](https://github.com/a11delavar/lit-application/commit/0df3aaac5a007463ebbb32d65a57d1a01aba2f18))
155
+
156
+ ## 0.0.20 (2022-11-22)
157
+ - **🛠️ Refactoring**: No caching in router ([ccb19e3](https://github.com/a11delavar/lit-application/commit/ccb19e3909d716e4456c80e3518d42b005a27fe3))
158
+
159
+ ## 0.0.17 (2022-11-19)
160
+ - **🐛 Fix**: Fix router over-caching page components ([e5135e3](https://github.com/a11delavar/lit-application/commit/e5135e3b31e94cbd0117d02430644f0410808e3d))
161
+
162
+ ## 0.0.16 (2022-11-16)
163
+ - **🛠️ Refactoring**: No private property access in router ([c9978c1](https://github.com/a11delavar/lit-application/commit/c9978c1d8cf9a5e04afd3c5057cf8af33d4acc5f))
164
+
165
+ ## 0.0.14 (2022-11-14)
166
+ - **🚀 Feature**: Use pushState as default router path changing method ([7b999f7](https://github.com/a11delavar/lit-application/commit/7b999f75e0b1b80574799b5ae14153d706e3fd2e))
167
+
168
+ ## 0.0.13 (2022-11-13)
169
+ - **🚀 Feature**: Router connecting hooks ([a909f4e](https://github.com/a11delavar/lit-application/commit/a909f4eba1c78bb04bd4d97b4f05e9e69d93703c))
170
+
171
+ ## 0.0.12 (2022-11-12)
172
+ - **🚀 Feature**: Router support for nested routes and page instance caching ([5a7b587](https://github.com/a11delavar/lit-application/commit/5a7b587ded95570631fbccd3333b93ce61fa5eef))
173
+
174
+ ## 0.0.10 (2022-11-11)
175
+ - **🐛 Fix**: Do not connect application until connecting hooks are executed ([ac4bae3](https://github.com/a11delavar/lit-application/commit/ac4bae36d2f4e1ddba8ed7512226442cac033e79))
176
+
177
+ ## 0.0.8 (2022-11-09)
178
+ - **🧹 Chore**: Better typing for dialog and page element ([cb8fc0b](https://github.com/a11delavar/lit-application/commit/cb8fc0b06f3bcbc936e4e58257c93aa4b97c2297))
179
+
180
+ ## 0.0.7 (2022-11-09)
181
+ - **🚀 Feature**: Central handling of dialog-related keys ([b95cdff](https://github.com/a11delavar/lit-application/commit/b95cdffb10052c929e077273086123098f46d6bc))
182
+
183
+ ## 0.0.6 (2022-11-08)
184
+ - **🧹 Chore**: Add "data-router-selected" attribute to router links ([18dbad2](https://github.com/a11delavar/lit-application/commit/18dbad232aff9a2765c424e0d63fc8ba6a26918c))
package/README.md ADDED
@@ -0,0 +1,99 @@
1
+ # `@a11d/lit-application`
2
+
3
+ An application shell for Lit, with routed pages, dialogs that resolve with their result, notifications and PWA helpers.
4
+
5
+ [![npm](https://img.shields.io/npm/v/@a11d/lit-application?style=flat-square&color=0077c8)](https://www.npmjs.com/package/@a11d/lit-application)
6
+
7
+ ## Installation
8
+
9
+ ```sh
10
+ npm install @a11d/lit-application
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```ts
16
+ import { component, html } from '@a11d/lit'
17
+ import { application, Application, DialogComponent, PageComponent, route } from '@a11d/lit-application'
18
+ import '@a11d/lit-application-native'
19
+
20
+ @component('app-dialog-greeting')
21
+ export class DialogGreeting extends DialogComponent<{ readonly name: string }> {
22
+ protected override get template() {
23
+ return html`<lit-dialog heading='Greeting' primaryButtonText='OK'>Hello, ${this.parameters.name}!</lit-dialog>`
24
+ }
25
+
26
+ protected override primaryAction() { }
27
+ }
28
+
29
+ @component('app-page-home')
30
+ @route('/')
31
+ export class PageHome extends PageComponent {
32
+ protected override get template() {
33
+ return html`
34
+ <lit-page heading='Home'>
35
+ <button @click=${() => new DialogGreeting({ name: 'Ada' }).confirm()}>Greet</button>
36
+ </lit-page>
37
+ `
38
+ }
39
+ }
40
+
41
+ @application()
42
+ @component('app-application')
43
+ export class App extends Application { }
44
+ ```
45
+
46
+ ## API
47
+
48
+ | Name | Kind | Description |
49
+ | --- | --- | --- |
50
+ | `HookSet` | class | A set of hooks of a lifecycle stage, which `execute` runs together and awaits, even when some of them fail. |
51
+ | `WindowHelper` | class | Opens locations of the application in new tabs or popup windows. |
52
+ | `HttpError` | class | An error of an HTTP status code, with the code's default message unless given another. |
53
+ | `RoutableComponent` | class | |
54
+ | `RouterController` | class | The router rendering the component whose route matches the URL, extending the `Router` of `@lit-labs/router`. |
55
+ | `Application` | class | The base class of an application, which renders the page matching the URL and hosts dialogs and notifications in its top layer. |
56
+ | `ApplicationTopLayer` | class | The layer above the pages that hosts dialogs and notifications, rendered by the application and inside each dialog element. |
57
+ | `PageError` | class | The page showing an HTTP error, routed at `/error/:error` and rendered by the application when no route matches. |
58
+ | `PageHost` | class | The element hosting the current page, rendered by the application. |
59
+ | `PageComponent` | class | The base class of a page, rendered by the application when its route matches. |
60
+ | `DialogCancelledError` | class | The error the confirmation of a dialog rejects with when the dialog is cancelled. |
61
+ | `DialogComponentErrorHandler` | class | The base class of a handler for the errors thrown by dialog actions, registered with `DialogComponent.errorHandler()`. |
62
+ | `DialogComponent` | class | The base class of a dialog, opened by `confirm`, which resolves with the dialog's result once it closes. |
63
+ | `DialogComponentNoOpErrorHandler` | class | The `no-op` dialog error handler, which ignores errors. |
64
+ | `DialogComponentNotificationErrorHandler` | class | The default `notification` dialog error handler, which shows errors as error notifications. |
65
+ | `NotificationComponent` | class | The base class of the element showing notifications, whose static `notify` methods send them. |
66
+ | `PwaHelper` | class | Registers service workers, and prompts to install the application as a progressive web app. |
67
+ | `querySymbolizedElement` | function | Decorates a property to return the element in the render root whose class is marked with the symbol. |
68
+ | `queryInstanceElement` | function | Decorates a static property to return the first element in the document that is an instance of the class. |
69
+ | `WindowOpenMode` | enum | Whether `WindowHelper` opens a location in a new tab or in a popup window. |
70
+ | `HttpErrorCode` | enum | The HTTP status codes of client and server errors. |
71
+ | `Key` | enum | The values of `KeyboardEvent.key` for non-printable keys, such as `Enter`, `Escape` and `ArrowDown`. |
72
+ | `NavigationStrategy` | enum | |
73
+ | `DialogConfirmationStrategy` | enum | Where a dialog opens: in place, or popped out into a new tab or window. |
74
+ | `DialogActionKey` | enum | The keys of the actions of a dialog. |
75
+ | `NotificationType` | enum | The kinds of notifications. |
76
+ | `routerLink` | const | Navigates to a routable component when the element is clicked, and marks the element `data-router-selected` while its URL matches. |
77
+ | `route` | const | Decorates a page or dialog with its routes, rendered by the application's router or, given a `host`, by the router of that component. |
78
+ | `application` | const | Appends an instance of the decorated `Application` subclass to the document body, unless one is already there. |
79
+ | `Page` | interface | The element a page component renders its content into, such as `lit-page`, marked with `PageComponent.pageElement()`. |
80
+ | `Dialog` | interface | The element a dialog component renders its content into, such as `lit-dialog`, marked with `DialogComponent.dialogElement()`. |
81
+ | `BeforeInstallPromptEvent` | interface | The `beforeinstallprompt` event, dispatched when the browser offers to install the application. |
82
+ | `PageParameters` | type | The parameters of a page, mapped to the path and query string of its URL. |
83
+ | `DialogParameters` | type | The parameters of a dialog, passed to its constructor and mapped to its URL if it has a route. |
84
+ | `DialogResult` | type | The outcome of a dialog action: the result resolving the confirmation, or an `Error` rejecting it. |
85
+ | `DialogAction` | type | What a dialog action returns: a `DialogResult`, or a promise of one. |
86
+ | `PopupConfirmationStrategy` | type | The confirmation strategies that pop a dialog out into a new tab or window. |
87
+ | `DialogErrorHandler` | type | The key of a registered error handler, or a function handling the errors thrown by the actions of a dialog. |
88
+ | `Notification` | type | A notification to show: its message, with an optional type and actions. |
89
+ | `Manifest` | type | The web app manifest of the application, as linked in the document's head. |
90
+ | `ManifestIcon` | type | An icon of the web app manifest. |
91
+
92
+ ## Links
93
+
94
+ - [Changelog](https://unpkg.com/@a11d/lit-application/CHANGELOG.md)
95
+ - [Source](https://github.com/a11delavar/lit-application/tree/main/packages/Application)
96
+
97
+ ## License
98
+
99
+ MIT © a11delavar
@@ -1,24 +1,74 @@
1
1
  import { RootCssInjectorController } from '@a11d/root-css-injector';
2
2
  import { NonInertableComponent } from '@a11d/non-inertable-component';
3
3
  import { HookSet, RouterController } from './index.js';
4
+ /** Appends an instance of the decorated `Application` subclass to the document body, unless one is already there. */
4
5
  export declare const application: () => <T extends Application>(ApplicationConstructor: Constructor<T>) => void;
6
+ /**
7
+ * The base class of an application, which renders the page matching the URL and hosts dialogs and notifications in its top layer.
8
+ *
9
+ * It renders into its light DOM and injects its static `styles` into the document. It connects once its `connectingHooks` have run,
10
+ * renders `pageLoadingTemplate` until its `beforeRouteHooks` have run, and then the page matching the URL, dispatching the
11
+ * `Application.connected`, `Application.initialized` and `Application.routed` window events in that order. Pages and dialogs
12
+ * render into page and dialog elements provided by an implementation such as `@a11d/lit-application-native`.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * import { component, html } from '@a11d/lit'
17
+ * import { application, Application, DialogComponent, PageComponent, route } from '@a11d/lit-application'
18
+ * import '@a11d/lit-application-native'
19
+ *
20
+ * @component('app-dialog-greeting')
21
+ * export class DialogGreeting extends DialogComponent<{ readonly name: string }> {
22
+ * protected override get template() {
23
+ * return html`<lit-dialog heading='Greeting' primaryButtonText='OK'>Hello, ${this.parameters.name}!</lit-dialog>`
24
+ * }
25
+ *
26
+ * protected override primaryAction() { }
27
+ * }
28
+ *
29
+ * @component('app-page-home')
30
+ * @route('/')
31
+ * export class PageHome extends PageComponent {
32
+ * protected override get template() {
33
+ * return html`
34
+ * <lit-page heading='Home'>
35
+ * <button @click=${() => new DialogGreeting({ name: 'Ada' }).confirm()}>Greet</button>
36
+ * </lit-page>
37
+ * `
38
+ * }
39
+ * }
40
+ *
41
+ * @application()
42
+ * @component('app-application')
43
+ * export class App extends Application { }
44
+ * ```
45
+ */
5
46
  export declare abstract class Application extends NonInertableComponent {
47
+ /** Hooks awaited before the application connects, such as to load configuration. */
6
48
  static readonly connectingHooks: HookSet<void>;
49
+ /** Hooks awaited after the application first renders and before its router renders the first page. */
7
50
  static readonly beforeRouteHooks: HookSet<void>;
51
+ /** The most recently connected top layer, or `document.body` without one, where dialogs and notifications are appended. */
8
52
  static get topLayer(): HTMLElement;
53
+ /** The application element in the document, if any. */
9
54
  static readonly instance?: Application;
10
55
  static get styles(): import("@a11d/lit").CSSResult;
56
+ /** The heading of the current page, kept in the document title. */
11
57
  pageHeading?: string;
58
+ /** The router rendering the page whose route matches the URL, or `PageError` with `NotFound` when none does. */
12
59
  readonly router: RouterController;
13
60
  protected readonly rootCssInjector: RootCssInjectorController;
14
61
  private shallRenderRouter;
15
62
  protected createRenderRoot(): this;
16
63
  connectedCallback(): Promise<void>;
17
64
  protected initialized(): Promise<void>;
65
+ /** The document title, joining the page heading and the manifest's `short_name`. */
18
66
  protected get documentTitle(): string;
19
67
  protected get template(): import("lit-html").HTMLTemplateResult;
68
+ /** The page host followed by the top layer; override it to render navigation or a footer around them. */
20
69
  protected get bodyTemplate(): import("lit-html").HTMLTemplateResult;
21
70
  protected get pageHostTemplate(): import("lit-html").HTMLTemplateResult;
71
+ /** Rendered in place of the page until the `beforeRouteHooks` have run; nothing by default. */
22
72
  protected get pageLoadingTemplate(): import("lit-html").HTMLTemplateResult;
23
73
  protected get topLayerTemplate(): import("lit-html").HTMLTemplateResult;
24
74
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Application.d.ts","sourceRoot":"","sources":["../Application.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,EAAE,OAAO,EAAa,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAIjE,eAAO,MAAM,WAAW,SACf,CAAC,SAAS,WAAW,EAAE,wBAAwB,WAAW,CAAC,CAAC,CAAC,SAKrE,CAAA;AAED,8BAAsB,WAAY,SAAQ,qBAAqB;IAC9D,MAAM,CAAC,QAAQ,CAAC,eAAe,gBAAgB;IAC/C,MAAM,CAAC,QAAQ,CAAC,gBAAgB,gBAAgB;IAEhD,MAAM,KAAK,QAAQ,gBAA0C;IAErC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAA;IAE9D,WAAoB,MAAM,kCAsCzB;IAEiF,WAAW,CAAC,EAAE,MAAM,CAAA;IAEtG,QAAQ,CAAC,MAAM,mBAMd;IAED,SAAS,CAAC,QAAQ,CAAC,eAAe,4BAAwE;IAEjG,OAAO,CAAC,iBAAiB,CAAQ;cAEvB,gBAAgB;IAIpB,iBAAiB;cAOP,WAAW;IAQpC,SAAS,KAAK,aAAa,WAE1B;IAED,cAAuB,QAAQ,0CAI9B;IAED,SAAS,KAAK,YAAY,0CAKzB;IAED,SAAS,KAAK,gBAAgB,0CAM7B;IAED,SAAS,KAAK,mBAAmB,0CAEhC;IAED,SAAS,KAAK,gBAAgB,0CAE7B;CACD"}
1
+ {"version":3,"file":"Application.d.ts","sourceRoot":"","sources":["../Application.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,EAAE,OAAO,EAAa,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAIjE,qHAAqH;AACrH,eAAO,MAAM,WAAW,SACf,CAAC,SAAS,WAAW,0BAA0B,WAAW,CAAC,CAAC,CAAC,SAKrE,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,8BAAsB,WAAY,SAAQ,qBAAqB;IAC9D,oFAAoF;IACpF,MAAM,CAAC,QAAQ,CAAC,eAAe,gBAAgB;IAC/C,sGAAsG;IACtG,MAAM,CAAC,QAAQ,CAAC,gBAAgB,gBAAgB;IAEhD,2HAA2H;IAC3H,MAAM,KAAK,QAAQ,gBAA0C;IAE7D,uDAAuD;IAC/B,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAA;IAE9D,WAAoB,MAAM,kCAsCzB;IAED,mEAAmE;IACe,WAAW,CAAC,EAAE,MAAM,CAAA;IAEtG,gHAAgH;IAChH,QAAQ,CAAC,MAAM,mBAMd;IAED,SAAS,CAAC,QAAQ,CAAC,eAAe,4BAAwE;IAEjG,OAAO,CAAC,iBAAiB,CAAQ;IAE1C,UAAmB,gBAAgB,SAElC;IAEc,iBAAiB,kBAK/B;IAED,UAAyB,WAAW,kBAMnC;IAED,oFAAoF;IACpF,SAAS,KAAK,aAAa,WAE1B;IAED,cAAuB,QAAQ,0CAI9B;IAED,yGAAyG;IACzG,SAAS,KAAK,YAAY,0CAKzB;IAED,SAAS,KAAK,gBAAgB,0CAM7B;IAED,+FAA+F;IAC/F,SAAS,KAAK,mBAAmB,0CAEhC;IAED,SAAS,KAAK,gBAAgB,0CAE7B;CACD"}
@@ -5,6 +5,7 @@ import { NonInertableComponent } from '@a11d/non-inertable-component';
5
5
  import { HookSet, PageError, RouterController } from './index.js';
6
6
  import { HttpErrorCode, queryInstanceElement } from './utilities/index.js';
7
7
  import { ApplicationTopLayer } from './ApplicationTopLayer.js';
8
+ /** Appends an instance of the decorated `Application` subclass to the document body, unless one is already there. */
8
9
  export const application = () => {
9
10
  return (ApplicationConstructor) => {
10
11
  if (!ApplicationConstructor.instance) {
@@ -12,9 +13,50 @@ export const application = () => {
12
13
  }
13
14
  };
14
15
  };
16
+ /**
17
+ * The base class of an application, which renders the page matching the URL and hosts dialogs and notifications in its top layer.
18
+ *
19
+ * It renders into its light DOM and injects its static `styles` into the document. It connects once its `connectingHooks` have run,
20
+ * renders `pageLoadingTemplate` until its `beforeRouteHooks` have run, and then the page matching the URL, dispatching the
21
+ * `Application.connected`, `Application.initialized` and `Application.routed` window events in that order. Pages and dialogs
22
+ * render into page and dialog elements provided by an implementation such as `@a11d/lit-application-native`.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * import { component, html } from '@a11d/lit'
27
+ * import { application, Application, DialogComponent, PageComponent, route } from '@a11d/lit-application'
28
+ * import '@a11d/lit-application-native'
29
+ *
30
+ * @component('app-dialog-greeting')
31
+ * export class DialogGreeting extends DialogComponent<{ readonly name: string }> {
32
+ * protected override get template() {
33
+ * return html`<lit-dialog heading='Greeting' primaryButtonText='OK'>Hello, ${this.parameters.name}!</lit-dialog>`
34
+ * }
35
+ *
36
+ * protected override primaryAction() { }
37
+ * }
38
+ *
39
+ * @component('app-page-home')
40
+ * @route('/')
41
+ * export class PageHome extends PageComponent {
42
+ * protected override get template() {
43
+ * return html`
44
+ * <lit-page heading='Home'>
45
+ * <button @click=${() => new DialogGreeting({ name: 'Ada' }).confirm()}>Greet</button>
46
+ * </lit-page>
47
+ * `
48
+ * }
49
+ * }
50
+ *
51
+ * @application()
52
+ * @component('app-application')
53
+ * export class App extends Application { }
54
+ * ```
55
+ */
15
56
  export class Application extends NonInertableComponent {
16
57
  constructor() {
17
58
  super(...arguments);
59
+ /** The router rendering the page whose route matches the URL, or `PageError` with `NotFound` when none does. */
18
60
  this.router = new RouterController(this, [], {
19
61
  fallback: {
20
62
  render: () => new PageError({ error: HttpErrorCode.NotFound })
@@ -23,8 +65,11 @@ export class Application extends NonInertableComponent {
23
65
  this.rootCssInjector = new RootCssInjectorController(this, this.constructor.styles);
24
66
  this.shallRenderRouter = false;
25
67
  }
68
+ /** Hooks awaited before the application connects, such as to load configuration. */
26
69
  static { this.connectingHooks = new HookSet(); }
70
+ /** Hooks awaited after the application first renders and before its router renders the first page. */
27
71
  static { this.beforeRouteHooks = new HookSet(); }
72
+ /** The most recently connected top layer, or `document.body` without one, where dialogs and notifications are appended. */
28
73
  static get topLayer() { return ApplicationTopLayer.instance; }
29
74
  static get styles() {
30
75
  return css `
@@ -81,6 +126,7 @@ export class Application extends NonInertableComponent {
81
126
  await this.updateComplete;
82
127
  window?.dispatchEvent(new Event('Application.routed'));
83
128
  }
129
+ /** The document title, joining the page heading and the manifest's `short_name`. */
84
130
  get documentTitle() {
85
131
  return [this.pageHeading, manifest?.short_name].filter(Boolean).join(' | ');
86
132
  }
@@ -89,6 +135,7 @@ export class Application extends NonInertableComponent {
89
135
  ${this.bodyTemplate}
90
136
  `;
91
137
  }
138
+ /** The page host followed by the top layer; override it to render navigation or a footer around them. */
92
139
  get bodyTemplate() {
93
140
  return html `
94
141
  ${this.pageHostTemplate}
@@ -102,6 +149,7 @@ export class Application extends NonInertableComponent {
102
149
  </lit-page-host>
103
150
  `;
104
151
  }
152
+ /** Rendered in place of the page until the `beforeRouteHooks` have run; nothing by default. */
105
153
  get pageLoadingTemplate() {
106
154
  return html.nothing;
107
155
  }
@@ -1,6 +1,12 @@
1
1
  import { Component } from '@a11d/lit';
2
+ /**
3
+ * The layer above the pages that hosts dialogs and notifications, rendered by the application and inside each dialog element.
4
+ *
5
+ * Elements left in a top layer when it disconnects move to the most recently connected one that remains.
6
+ */
2
7
  export declare class ApplicationTopLayer extends Component {
3
8
  private static readonly instances;
9
+ /** The most recently connected top layer, or `document.body` when none is connected. */
4
10
  static get instance(): HTMLElement;
5
11
  get template(): import("lit-html").HTMLTemplateResult;
6
12
  static get styles(): import("@a11d/lit").CSSResult;
@@ -1 +1 @@
1
- {"version":3,"file":"ApplicationTopLayer.d.ts","sourceRoot":"","sources":["../ApplicationTopLayer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAiD,MAAM,WAAW,CAAA;AAEpF,qBACa,mBAAoB,SAAQ,SAAS;IACtB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAA0B;IAEtF,MAAM,KAAK,QAAQ,gBAGlB;IAED,IAAa,QAAQ,0CAEpB;IAED,WAAoB,MAAM,kCAWzB;IAEQ,oBAAoB;CAO7B;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,2BAA2B,EAAE,mBAAmB,CAAA;KAChD;CACD"}
1
+ {"version":3,"file":"ApplicationTopLayer.d.ts","sourceRoot":"","sources":["../ApplicationTopLayer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAiD,MAAM,WAAW,CAAA;AAEpF;;;;GAIG;AACH,qBACa,mBAAoB,SAAQ,SAAS;IACtB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAA0B;IAEtF,wFAAwF;IACxF,MAAM,KAAK,QAAQ,gBAGlB;IAED,IAAa,QAAQ,0CAEpB;IAED,WAAoB,MAAM,kCAWzB;IAEQ,oBAAoB,SAM5B;CACD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,2BAA2B,EAAE,mBAAmB,CAAA;KAChD;CACD"}
@@ -1,8 +1,14 @@
1
1
  var ApplicationTopLayer_1;
2
2
  import { __decorate } from "tslib";
3
3
  import { Component, component, css, html, queryConnectedInstances } from '@a11d/lit';
4
+ /**
5
+ * The layer above the pages that hosts dialogs and notifications, rendered by the application and inside each dialog element.
6
+ *
7
+ * Elements left in a top layer when it disconnects move to the most recently connected one that remains.
8
+ */
4
9
  let ApplicationTopLayer = class ApplicationTopLayer extends Component {
5
10
  static { ApplicationTopLayer_1 = this; }
11
+ /** The most recently connected top layer, or `document.body` when none is connected. */
6
12
  static get instance() {
7
13
  const instances = [...ApplicationTopLayer_1.instances];
8
14
  return instances[instances.length - 1] ?? document.body;
@@ -1,25 +1,38 @@
1
1
  import type { ApplicationTopLayer } from '../ApplicationTopLayer.js';
2
2
  import type { Page } from '../Page/Page.js';
3
+ /** The keys of the actions of a dialog. */
3
4
  export declare enum DialogActionKey {
4
5
  Primary = "primary",
5
6
  Secondary = "secondary",
6
7
  Cancellation = "cancellation"
7
8
  }
9
+ /** The key of a registered error handler, or a function handling the errors thrown by the actions of a dialog. */
8
10
  export type DialogErrorHandler = keyof DialogComponentErrorHandlers | ((error: Error) => void | Promise<void>);
11
+ /** The element a dialog component renders its content into, such as `lit-dialog`, marked with `DialogComponent.dialogElement()`. */
9
12
  export interface Dialog extends Page {
13
+ /** Whether the dialog is shown, set by the dialog component. */
10
14
  open: boolean;
15
+ /** The top layer inside the dialog, hosting nested dialogs and notifications while the dialog is open. */
11
16
  readonly topLayerElement: ApplicationTopLayer;
12
17
  readonly primaryActionElement: HTMLElement | undefined;
13
18
  readonly secondaryActionElement: HTMLElement | undefined;
14
19
  readonly cancellationActionElement: HTMLElement | undefined;
20
+ /** Runs the action of the key, called by the dialog element and assigned by the dialog component. */
15
21
  handleAction: (key: DialogActionKey) => void | Promise<void>;
22
+ /** The key of the action being run, such as to show its element as pending. */
16
23
  executingAction?: DialogActionKey;
17
24
  preventCancellationOnEscape?: boolean;
25
+ /** Runs the primary action when the Enter key is pressed. */
18
26
  primaryOnEnter?: boolean;
27
+ /** Whether the dialog can pop out into a tab or window, set by the dialog component. */
19
28
  poppable?: boolean;
29
+ /** Whether the current URL routes to the dialog, as in the window it popped out into, set by the dialog component. */
20
30
  boundToWindow?: boolean;
31
+ /** Dispatched to pop the dialog out into a new tab. */
21
32
  readonly requestPopup?: EventDispatcher<void>;
33
+ /** Keeps the dialog open after its primary and secondary actions, leaving it to the dialog component to `close` it. */
22
34
  manualClose?: boolean;
35
+ /** Handles the errors thrown by the actions, with the default error handler if not set. */
23
36
  errorHandler?: DialogErrorHandler;
24
37
  }
25
38
  //# sourceMappingURL=Dialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../Dialog/Dialog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AACpE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAE3C,oBAAY,eAAe;IAC1B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,YAAY,iBAAiB;CAC7B;AAED,MAAM,MAAM,kBAAkB,GAC3B,MAAM,4BAA4B,GAClC,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;AAE3C,MAAM,WAAW,MAAO,SAAQ,IAAI;IACnC,IAAI,EAAE,OAAO,CAAA;IAEb,QAAQ,CAAC,eAAe,EAAE,mBAAmB,CAAA;IAE7C,QAAQ,CAAC,oBAAoB,EAAE,WAAW,GAAG,SAAS,CAAA;IACtD,QAAQ,CAAC,sBAAsB,EAAE,WAAW,GAAG,SAAS,CAAA;IACxD,QAAQ,CAAC,yBAAyB,EAAE,WAAW,GAAG,SAAS,CAAA;IAC3D,YAAY,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5D,eAAe,CAAC,EAAE,eAAe,CAAA;IAEjC,2BAA2B,CAAC,EAAE,OAAO,CAAA;IACrC,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,YAAY,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IAE7C,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB,YAAY,CAAC,EAAE,kBAAkB,CAAA;CACjC"}
1
+ {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../Dialog/Dialog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AACpE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAE3C,2CAA2C;AAC3C,oBAAY,eAAe;IAC1B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,YAAY,iBAAiB;CAC7B;AAED,kHAAkH;AAClH,MAAM,MAAM,kBAAkB,GAC3B,MAAM,4BAA4B,GAClC,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;AAE3C,oIAAoI;AACpI,MAAM,WAAW,MAAO,SAAQ,IAAI;IACnC,gEAAgE;IAChE,IAAI,EAAE,OAAO,CAAA;IAEb,0GAA0G;IAC1G,QAAQ,CAAC,eAAe,EAAE,mBAAmB,CAAA;IAE7C,QAAQ,CAAC,oBAAoB,EAAE,WAAW,GAAG,SAAS,CAAA;IACtD,QAAQ,CAAC,sBAAsB,EAAE,WAAW,GAAG,SAAS,CAAA;IACxD,QAAQ,CAAC,yBAAyB,EAAE,WAAW,GAAG,SAAS,CAAA;IAC3D,qGAAqG;IACrG,YAAY,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5D,+EAA+E;IAC/E,eAAe,CAAC,EAAE,eAAe,CAAA;IAEjC,2BAA2B,CAAC,EAAE,OAAO,CAAA;IACrC,6DAA6D;IAC7D,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB,wFAAwF;IACxF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,sHAAsH;IACtH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,uDAAuD;IACvD,QAAQ,CAAC,YAAY,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;IAE7C,uHAAuH;IACvH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB,2FAA2F;IAC3F,YAAY,CAAC,EAAE,kBAAkB,CAAA;CACjC"}
@@ -1,3 +1,4 @@
1
+ /** The keys of the actions of a dialog. */
1
2
  export var DialogActionKey;
2
3
  (function (DialogActionKey) {
3
4
  DialogActionKey["Primary"] = "primary";
@@ -1,4 +1,5 @@
1
1
  import type { DialogComponent } from './DialogComponent.js';
2
+ /** The error the confirmation of a dialog rejects with when the dialog is cancelled. */
2
3
  export declare class DialogCancelledError extends Error {
3
4
  constructor(dialogComponent: DialogComponent<any, any>);
4
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DialogCancelledError.d.ts","sourceRoot":"","sources":["../../Dialog/DialogCancelledError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,qBAAa,oBAAqB,SAAQ,KAAK;gBAClC,eAAe,EAAE,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC;CAGtD"}
1
+ {"version":3,"file":"DialogCancelledError.d.ts","sourceRoot":"","sources":["../../Dialog/DialogCancelledError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,wFAAwF;AACxF,qBAAa,oBAAqB,SAAQ,KAAK;IAC9C,YAAY,eAAe,EAAE,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC,EAErD;CACD"}
@@ -1,3 +1,4 @@
1
+ /** The error the confirmation of a dialog rejects with when the dialog is cancelled. */
1
2
  export class DialogCancelledError extends Error {
2
3
  constructor(dialogComponent) {
3
4
  super(`Dialog "${dialogComponent.tagName.toLowerCase()}" was cancelled.`);