screenreader-speech-capture 0.9.0 → 0.10.0
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/README.md +17 -0
- package/dist/cli.mjs +1 -1
- package/dist/ui/adapter-node.js +1 -1
- package/dist/ui/client/ui/_app/immutable/assets/{0.CnPCLsGJ.css → 0.DH3e8XLu.css} +1 -1
- package/dist/ui/client/ui/_app/immutable/assets/0.DH3e8XLu.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/0.DH3e8XLu.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/2.DSVNnDlO.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/2.DSVNnDlO.css.br +3 -0
- package/dist/ui/client/ui/_app/immutable/assets/2.DSVNnDlO.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/4.DIE1qdmp.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/4.DIE1qdmp.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/4.DIE1qdmp.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/5.DCMlxwLh.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/5.DCMlxwLh.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/5.DCMlxwLh.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/6.C0Nhvs_m.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/6.C0Nhvs_m.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/6.C0Nhvs_m.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/ExternalLink.CYXazpKA.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/ExternalLink.CYXazpKA.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/ExternalLink.CYXazpKA.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/Pane.Co7gxzxw.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/Pane.Co7gxzxw.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/Pane.Co7gxzxw.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/{Cba3ZwaX.js → 4R6qUa-I.js} +12 -13
- package/dist/ui/client/ui/_app/immutable/chunks/4R6qUa-I.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/4R6qUa-I.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BC9D66S_.js +2 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BC9D66S_.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BC9D66S_.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BCiTXg3M.js +138 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BCiTXg3M.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BCiTXg3M.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BGgW64O2.js +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BGgW64O2.js.br +2 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BGgW64O2.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Bvlvl8SZ.js +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Bvlvl8SZ.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Bvlvl8SZ.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/ByQTEKOy.js +3 -0
- package/dist/ui/client/ui/_app/immutable/chunks/ByQTEKOy.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/ByQTEKOy.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/C-UVUBR9.js +3 -0
- package/dist/ui/client/ui/_app/immutable/chunks/C-UVUBR9.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/C-UVUBR9.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/C1Z3Vlq6.js +3 -0
- package/dist/ui/client/ui/_app/immutable/chunks/C1Z3Vlq6.js.br +11 -0
- package/dist/ui/client/ui/_app/immutable/chunks/C1Z3Vlq6.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CSj31z2g.js +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CSj31z2g.js.br +2 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CSj31z2g.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/D7Lf2nU5.js +48 -0
- package/dist/ui/client/ui/_app/immutable/chunks/D7Lf2nU5.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/D7Lf2nU5.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/D8AQra8V.js +3 -0
- package/dist/ui/client/ui/_app/immutable/chunks/D8AQra8V.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/D8AQra8V.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DLBNPxq0.js +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DLBNPxq0.js.br +3 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DLBNPxq0.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DMXmTTni.js +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DMXmTTni.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DMXmTTni.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DVjfBgOA.js +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DVjfBgOA.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DVjfBgOA.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/EBfbaSFC.js +40 -0
- package/dist/ui/client/ui/_app/immutable/chunks/EBfbaSFC.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/EBfbaSFC.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/HjKxdHgL.js +4 -0
- package/dist/ui/client/ui/_app/immutable/chunks/HjKxdHgL.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/HjKxdHgL.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/y62iQtQV.js +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/y62iQtQV.js.br +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/y62iQtQV.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.BRCyy_aP.js +2 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.BRCyy_aP.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.BRCyy_aP.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/start.ujo8oI9U.js +2 -0
- package/dist/ui/client/ui/_app/immutable/entry/start.ujo8oI9U.js.br +5 -0
- package/dist/ui/client/ui/_app/immutable/entry/start.ujo8oI9U.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.CYE8I_uA.js +1 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.CYE8I_uA.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.CYE8I_uA.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/1.DTsysZRk.js +1 -0
- package/dist/ui/client/ui/_app/immutable/nodes/1.DTsysZRk.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/1.DTsysZRk.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.hev1nfuM.js +1 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.hev1nfuM.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.hev1nfuM.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.CApflji6.js +5 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.CApflji6.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.CApflji6.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/4.BkefkGQL.js +160 -0
- package/dist/ui/client/ui/_app/immutable/nodes/4.BkefkGQL.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/4.BkefkGQL.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/5.CDYh05RH.js +6 -0
- package/dist/ui/client/ui/_app/immutable/nodes/5.CDYh05RH.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/5.CDYh05RH.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/6.DwISzDQO.js +6 -0
- package/dist/ui/client/ui/_app/immutable/nodes/6.DwISzDQO.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/6.DwISzDQO.js.gz +0 -0
- package/dist/ui/client/ui/_app/version.json +1 -1
- package/dist/ui/client/ui/_app/version.json.br +0 -0
- package/dist/ui/client/ui/_app/version.json.gz +0 -0
- package/dist/ui/server/.vite/manifest.json +193 -10
- package/dist/ui/server/_app/immutable/assets/ExternalLink.CYXazpKA.css +1 -0
- package/dist/ui/server/_app/immutable/assets/Pane.Co7gxzxw.css +1 -0
- package/dist/ui/server/_app/immutable/assets/{_layout.CnPCLsGJ.css → _layout.DH3e8XLu.css} +1 -1
- package/dist/ui/server/_app/immutable/assets/_layout.DSVNnDlO.css +1 -0
- package/dist/ui/server/_app/immutable/assets/_page.C0Nhvs_m.css +1 -0
- package/dist/ui/server/_app/immutable/assets/_page.DCMlxwLh.css +1 -0
- package/dist/ui/server/_app/immutable/assets/_page.DIE1qdmp.css +1 -0
- package/dist/ui/server/chunks/ExternalLink.js +12 -0
- package/dist/ui/server/chunks/ExternalLink.js.map +1 -0
- package/dist/ui/server/chunks/Pane.js +13 -0
- package/dist/ui/server/chunks/Pane.js.map +1 -0
- package/dist/ui/server/chunks/composition.js +462 -120
- package/dist/ui/server/chunks/composition.js.map +1 -1
- package/dist/ui/server/chunks/config-state.js +21 -0
- package/dist/ui/server/chunks/config-state.js.map +1 -0
- package/dist/ui/server/chunks/dialog.js +592 -0
- package/dist/ui/server/chunks/dialog.js.map +1 -0
- package/dist/ui/server/chunks/filled-button.js +116 -0
- package/dist/ui/server/chunks/filled-button.js.map +1 -0
- package/dist/ui/server/chunks/icon-button.js +2 -46
- package/dist/ui/server/chunks/icon-button.js.map +1 -1
- package/dist/ui/server/chunks/icon.js +49 -0
- package/dist/ui/server/chunks/icon.js.map +1 -0
- package/dist/ui/server/chunks/index-server.js +5 -1
- package/dist/ui/server/chunks/index-server.js.map +1 -0
- package/dist/ui/server/chunks/instance.js +5 -5
- package/dist/ui/server/chunks/internal.js +1 -1
- package/dist/ui/server/chunks/navigation.js +9 -13
- package/dist/ui/server/chunks/navigation.js.map +1 -1
- package/dist/ui/server/chunks/navigation2.js +15 -0
- package/dist/ui/server/chunks/navigation2.js.map +1 -0
- package/dist/ui/server/chunks/outlined-text-field.js +11 -398
- package/dist/ui/server/chunks/outlined-text-field.js.map +1 -1
- package/dist/ui/server/chunks/paths.js +2 -0
- package/dist/ui/server/chunks/redispatch-event.js +91 -0
- package/dist/ui/server/chunks/redispatch-event.js.map +1 -0
- package/dist/ui/server/chunks/server2.js +11 -1
- package/dist/ui/server/chunks/server2.js.map +1 -1
- package/dist/ui/server/chunks/src.js +112 -3
- package/dist/ui/server/chunks/src.js.map +1 -1
- package/dist/ui/server/chunks/state.js +1 -1
- package/dist/ui/server/chunks/static-html.js +38 -0
- package/dist/ui/server/chunks/static-html.js.map +1 -0
- package/dist/ui/server/chunks/text-button.js +307 -0
- package/dist/ui/server/chunks/text-button.js.map +1 -0
- package/dist/ui/server/entries/endpoints/api/config/_server.ts.js +4 -17
- package/dist/ui/server/entries/endpoints/api/config/_server.ts.js.map +1 -1
- package/dist/ui/server/entries/endpoints/api/input/keys/_server.ts.js +14 -0
- package/dist/ui/server/entries/endpoints/api/input/keys/_server.ts.js.map +1 -0
- package/dist/ui/server/entries/endpoints/api/markers/_server.ts.js +1 -1
- package/dist/ui/server/entries/endpoints/api/speech/_server.ts.js +1 -1
- package/dist/ui/server/entries/fallbacks/error.svelte.js +1 -1
- package/dist/ui/server/entries/hooks.server.js +4 -1
- package/dist/ui/server/entries/hooks.server.js.map +1 -1
- package/dist/ui/server/entries/pages/_layout.svelte.js +5 -10
- package/dist/ui/server/entries/pages/_layout.svelte.js.map +1 -1
- package/dist/ui/server/entries/pages/_page.svelte.js +15 -597
- package/dist/ui/server/entries/pages/_page.svelte.js.map +1 -1
- package/dist/ui/server/entries/pages/settings/_page.server.ts.js +12 -0
- package/dist/ui/server/entries/pages/settings/_page.server.ts.js.map +1 -0
- package/dist/ui/server/entries/pages/settings/_page.svelte.js +3470 -70
- package/dist/ui/server/entries/pages/settings/_page.svelte.js.map +1 -1
- package/dist/ui/server/entries/pages/setup/_layout.svelte.js +51 -0
- package/dist/ui/server/entries/pages/setup/_layout.svelte.js.map +1 -0
- package/dist/ui/server/entries/pages/setup/_page.svelte.js +225 -3
- package/dist/ui/server/entries/pages/setup/_page.svelte.js.map +1 -1
- package/dist/ui/server/entries/pages/setup/instructions/_page.server.ts.js +12 -0
- package/dist/ui/server/entries/pages/setup/instructions/_page.server.ts.js.map +1 -0
- package/dist/ui/server/entries/pages/setup/instructions/_page.svelte.js +271 -0
- package/dist/ui/server/entries/pages/setup/instructions/_page.svelte.js.map +1 -0
- package/dist/ui/server/manifest-full.js +21 -5
- package/dist/ui/server/manifest.js +21 -5
- package/dist/ui/server/nodes/0.js +2 -2
- package/dist/ui/server/nodes/1.js +1 -1
- package/dist/ui/server/nodes/2.js +4 -6
- package/dist/ui/server/nodes/3.js +6 -4
- package/dist/ui/server/nodes/4.js +6 -4
- package/dist/ui/server/nodes/5.js +8 -0
- package/dist/ui/server/nodes/6.js +10 -0
- package/dist/ui/server/server.js +21 -5
- package/package.json +1 -1
- package/dist/ui/client/ui/_app/immutable/assets/0.CnPCLsGJ.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/0.CnPCLsGJ.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/3.CK2Biket.css +0 -1
- package/dist/ui/client/ui/_app/immutable/assets/3.CK2Biket.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/3.CK2Biket.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/0YgL1EU2.js +0 -179
- package/dist/ui/client/ui/_app/immutable/chunks/0YgL1EU2.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/0YgL1EU2.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BYvlzyV8.js +0 -1
- package/dist/ui/client/ui/_app/immutable/chunks/BYvlzyV8.js.br +0 -2
- package/dist/ui/client/ui/_app/immutable/chunks/BYvlzyV8.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BfvDkxmG.js +0 -3
- package/dist/ui/client/ui/_app/immutable/chunks/BfvDkxmG.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BfvDkxmG.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Cba3ZwaX.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Cba3ZwaX.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DErxe_FC.js +0 -3
- package/dist/ui/client/ui/_app/immutable/chunks/DErxe_FC.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DErxe_FC.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Dqufijaz.js +0 -1
- package/dist/ui/client/ui/_app/immutable/chunks/Dqufijaz.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Dqufijaz.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/WpCriteK.js +0 -1
- package/dist/ui/client/ui/_app/immutable/chunks/WpCriteK.js.br +0 -1
- package/dist/ui/client/ui/_app/immutable/chunks/WpCriteK.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/wbLSPbHY.js +0 -4
- package/dist/ui/client/ui/_app/immutable/chunks/wbLSPbHY.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/wbLSPbHY.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.B6hhDf4F.js +0 -2
- package/dist/ui/client/ui/_app/immutable/entry/app.B6hhDf4F.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.B6hhDf4F.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/start.Dluk7nQO.js +0 -2
- package/dist/ui/client/ui/_app/immutable/entry/start.Dluk7nQO.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/start.Dluk7nQO.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.D-lhv0Us.js +0 -1
- package/dist/ui/client/ui/_app/immutable/nodes/0.D-lhv0Us.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.D-lhv0Us.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/1.Cs4GAsCO.js +0 -1
- package/dist/ui/client/ui/_app/immutable/nodes/1.Cs4GAsCO.js.br +0 -2
- package/dist/ui/client/ui/_app/immutable/nodes/1.Cs4GAsCO.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.CmuzlN_T.js +0 -52
- package/dist/ui/client/ui/_app/immutable/nodes/2.CmuzlN_T.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.CmuzlN_T.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.DMXXeBbC.js +0 -5
- package/dist/ui/client/ui/_app/immutable/nodes/3.DMXXeBbC.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.DMXXeBbC.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/4.CMHCNMDn.js +0 -1
- package/dist/ui/client/ui/_app/immutable/nodes/4.CMHCNMDn.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/4.CMHCNMDn.js.gz +0 -0
- package/dist/ui/server/_app/immutable/assets/_page.CK2Biket.css +0 -1
- /package/dist/ui/client/ui/_app/immutable/assets/{2.ChCvyBVk.css → 3.ChCvyBVk.css} +0 -0
- /package/dist/ui/client/ui/_app/immutable/assets/{2.ChCvyBVk.css.br → 3.ChCvyBVk.css.br} +0 -0
- /package/dist/ui/client/ui/_app/immutable/assets/{2.ChCvyBVk.css.gz → 3.ChCvyBVk.css.gz} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/lib/server/config-state.ts
|
|
2
|
+
/**
|
|
3
|
+
* What the Settings page knows about the configuration, in one answer: what runs (`active`), what
|
|
4
|
+
* the next start will use (`saved`) and the settings a flag or variable sets (`overrides`, by
|
|
5
|
+
* dotted path). The page's load and the config route both read it.
|
|
6
|
+
*/
|
|
7
|
+
async function readConfigState(bridge) {
|
|
8
|
+
const [active, saved, overrides] = await Promise.all([
|
|
9
|
+
bridge.config("active"),
|
|
10
|
+
bridge.config("saved"),
|
|
11
|
+
bridge.configOverrides()
|
|
12
|
+
]);
|
|
13
|
+
return {
|
|
14
|
+
active,
|
|
15
|
+
saved,
|
|
16
|
+
overrides: overrides.overrides
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export { readConfigState as t };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=config-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-state.js","names":[],"sources":["../../../src/lib/server/config-state.ts"],"sourcesContent":["import type { ConfigState } from '#lib/core/config.js';\nimport type { BridgeApi } from './bridge-api.js';\n\n/**\n * What the Settings page knows about the configuration, in one answer: what runs (`active`), what\n * the next start will use (`saved`) and the settings a flag or variable sets (`overrides`, by\n * dotted path). The page's load and the config route both read it.\n */\nexport async function readConfigState(bridge: BridgeApi): Promise<ConfigState> {\n const [active, saved, overrides] = await Promise.all([\n bridge.config('active'),\n bridge.config('saved'),\n bridge.configOverrides(),\n ]);\n return { active, saved, overrides: overrides.overrides };\n}\n"],"mappings":";;;;;;AAQA,eAAsB,gBAAgB,QAAyC;CAC7E,MAAM,CAAC,QAAQ,OAAO,aAAa,MAAM,QAAQ,IAAI;EACnD,OAAO,OAAO,QAAQ;EACtB,OAAO,OAAO,OAAO;EACrB,OAAO,gBAAgB;CACzB,CAAC;CACD,OAAO;EAAE;EAAQ;EAAO,WAAW,UAAU;CAAU;AACzD"}
|
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
import { B as e$1, E as EASING, G as t, H as r, I as T, K as __decorate, M as i, N as A, O as e, T as mixinDelegatesAria, U as n, W as i$1 } from "./composition.js";
|
|
2
|
+
import { t as redispatchEvent } from "./redispatch-event.js";
|
|
3
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/divider/internal/divider.js
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright 2023 Google LLC
|
|
7
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* A divider component.
|
|
11
|
+
*/
|
|
12
|
+
var Divider = class extends i {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
/**
|
|
16
|
+
* Indents the divider with equal padding on both sides.
|
|
17
|
+
*/
|
|
18
|
+
this.inset = false;
|
|
19
|
+
/**
|
|
20
|
+
* Indents the divider with padding on the leading side.
|
|
21
|
+
*/
|
|
22
|
+
this.insetStart = false;
|
|
23
|
+
/**
|
|
24
|
+
* Indents the divider with padding on the trailing side.
|
|
25
|
+
*/
|
|
26
|
+
this.insetEnd = false;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
__decorate([n({
|
|
30
|
+
type: Boolean,
|
|
31
|
+
reflect: true
|
|
32
|
+
})], Divider.prototype, "inset", void 0);
|
|
33
|
+
__decorate([n({
|
|
34
|
+
type: Boolean,
|
|
35
|
+
reflect: true,
|
|
36
|
+
attribute: "inset-start"
|
|
37
|
+
})], Divider.prototype, "insetStart", void 0);
|
|
38
|
+
__decorate([n({
|
|
39
|
+
type: Boolean,
|
|
40
|
+
reflect: true,
|
|
41
|
+
attribute: "inset-end"
|
|
42
|
+
})], Divider.prototype, "insetEnd", void 0);
|
|
43
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/divider/internal/divider-styles.cssresult.js
|
|
44
|
+
/**
|
|
45
|
+
* @license
|
|
46
|
+
* Copyright 2026 Google LLC
|
|
47
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
48
|
+
*/
|
|
49
|
+
var styles$1 = i$1`:host{box-sizing:border-box;color:var(--md-divider-color, var(--md-sys-color-outline-variant, #cac4d0));display:flex;height:var(--md-divider-thickness, 1px);width:100%}:host([inset]),:host([inset-start]){padding-inline-start:16px}:host([inset]),:host([inset-end]){padding-inline-end:16px}:host::before{background:currentColor;content:"";height:100%;width:100%}@media(forced-colors: active){:host::before{background:CanvasText}}
|
|
50
|
+
`;
|
|
51
|
+
styles$1.styleSheet;
|
|
52
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/divider/divider.js
|
|
53
|
+
/**
|
|
54
|
+
* @license
|
|
55
|
+
* Copyright 2023 Google LLC
|
|
56
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
57
|
+
*/
|
|
58
|
+
/**
|
|
59
|
+
* @summary A divider is a thin line that groups content in lists and
|
|
60
|
+
* containers.
|
|
61
|
+
*
|
|
62
|
+
* @description Dividers can reinforce tapability, such as when used to separate
|
|
63
|
+
* list items or define tappable regions in an accordion.
|
|
64
|
+
*
|
|
65
|
+
* @final
|
|
66
|
+
* @suppress {visibility}
|
|
67
|
+
*/
|
|
68
|
+
var MdDivider = class MdDivider extends Divider {};
|
|
69
|
+
MdDivider.styles = [styles$1];
|
|
70
|
+
MdDivider = __decorate([t("md-divider")], MdDivider);
|
|
71
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/dialog/internal/animations.js
|
|
72
|
+
/**
|
|
73
|
+
* @license
|
|
74
|
+
* Copyright 2023 Google LLC
|
|
75
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
76
|
+
*/
|
|
77
|
+
/**
|
|
78
|
+
* The default dialog open animation.
|
|
79
|
+
*/
|
|
80
|
+
var DIALOG_DEFAULT_OPEN_ANIMATION = {
|
|
81
|
+
dialog: [[[{ "transform": "translateY(-50px)" }, { "transform": "translateY(0)" }], {
|
|
82
|
+
duration: 500,
|
|
83
|
+
easing: EASING.EMPHASIZED
|
|
84
|
+
}]],
|
|
85
|
+
scrim: [[[{ "opacity": 0 }, { "opacity": .32 }], {
|
|
86
|
+
duration: 500,
|
|
87
|
+
easing: "linear"
|
|
88
|
+
}]],
|
|
89
|
+
container: [[[{ "opacity": 0 }, { "opacity": 1 }], {
|
|
90
|
+
duration: 50,
|
|
91
|
+
easing: "linear",
|
|
92
|
+
pseudoElement: "::before"
|
|
93
|
+
}], [[{ "height": "35%" }, { "height": "100%" }], {
|
|
94
|
+
duration: 500,
|
|
95
|
+
easing: EASING.EMPHASIZED,
|
|
96
|
+
pseudoElement: "::before"
|
|
97
|
+
}]],
|
|
98
|
+
headline: [[[
|
|
99
|
+
{ "opacity": 0 },
|
|
100
|
+
{
|
|
101
|
+
"opacity": 0,
|
|
102
|
+
offset: .2
|
|
103
|
+
},
|
|
104
|
+
{ "opacity": 1 }
|
|
105
|
+
], {
|
|
106
|
+
duration: 250,
|
|
107
|
+
easing: "linear",
|
|
108
|
+
fill: "forwards"
|
|
109
|
+
}]],
|
|
110
|
+
content: [[[
|
|
111
|
+
{ "opacity": 0 },
|
|
112
|
+
{
|
|
113
|
+
"opacity": 0,
|
|
114
|
+
offset: .2
|
|
115
|
+
},
|
|
116
|
+
{ "opacity": 1 }
|
|
117
|
+
], {
|
|
118
|
+
duration: 250,
|
|
119
|
+
easing: "linear",
|
|
120
|
+
fill: "forwards"
|
|
121
|
+
}]],
|
|
122
|
+
actions: [[[
|
|
123
|
+
{ "opacity": 0 },
|
|
124
|
+
{
|
|
125
|
+
"opacity": 0,
|
|
126
|
+
offset: .5
|
|
127
|
+
},
|
|
128
|
+
{ "opacity": 1 }
|
|
129
|
+
], {
|
|
130
|
+
duration: 300,
|
|
131
|
+
easing: "linear",
|
|
132
|
+
fill: "forwards"
|
|
133
|
+
}]]
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* The default dialog close animation.
|
|
137
|
+
*/
|
|
138
|
+
var DIALOG_DEFAULT_CLOSE_ANIMATION = {
|
|
139
|
+
dialog: [[[{ "transform": "translateY(0)" }, { "transform": "translateY(-50px)" }], {
|
|
140
|
+
duration: 150,
|
|
141
|
+
easing: EASING.EMPHASIZED_ACCELERATE
|
|
142
|
+
}]],
|
|
143
|
+
scrim: [[[{ "opacity": .32 }, { "opacity": 0 }], {
|
|
144
|
+
duration: 150,
|
|
145
|
+
easing: "linear"
|
|
146
|
+
}]],
|
|
147
|
+
container: [[[{ "height": "100%" }, { "height": "35%" }], {
|
|
148
|
+
duration: 150,
|
|
149
|
+
easing: EASING.EMPHASIZED_ACCELERATE,
|
|
150
|
+
pseudoElement: "::before"
|
|
151
|
+
}], [[{ "opacity": "1" }, { "opacity": "0" }], {
|
|
152
|
+
delay: 100,
|
|
153
|
+
duration: 50,
|
|
154
|
+
easing: "linear",
|
|
155
|
+
pseudoElement: "::before"
|
|
156
|
+
}]],
|
|
157
|
+
headline: [[[{ "opacity": 1 }, { "opacity": 0 }], {
|
|
158
|
+
duration: 100,
|
|
159
|
+
easing: "linear",
|
|
160
|
+
fill: "forwards"
|
|
161
|
+
}]],
|
|
162
|
+
content: [[[{ "opacity": 1 }, { "opacity": 0 }], {
|
|
163
|
+
duration: 100,
|
|
164
|
+
easing: "linear",
|
|
165
|
+
fill: "forwards"
|
|
166
|
+
}]],
|
|
167
|
+
actions: [[[{ "opacity": 1 }, { "opacity": 0 }], {
|
|
168
|
+
duration: 100,
|
|
169
|
+
easing: "linear",
|
|
170
|
+
fill: "forwards"
|
|
171
|
+
}]]
|
|
172
|
+
};
|
|
173
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/dialog/internal/dialog.js
|
|
174
|
+
/**
|
|
175
|
+
* @license
|
|
176
|
+
* Copyright 2023 Google LLC
|
|
177
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
178
|
+
*/
|
|
179
|
+
var dialogBaseClass = mixinDelegatesAria(i);
|
|
180
|
+
/**
|
|
181
|
+
* A dialog component.
|
|
182
|
+
*
|
|
183
|
+
* @fires open {Event} Dispatched when the dialog is opening before any animations.
|
|
184
|
+
* @fires opened {Event} Dispatched when the dialog has opened after any animations.
|
|
185
|
+
* @fires close {Event} Dispatched when the dialog is closing before any animations.
|
|
186
|
+
* @fires closed {Event} Dispatched when the dialog has closed after any animations.
|
|
187
|
+
* @fires cancel {Event} Dispatched when the dialog has been canceled by clicking
|
|
188
|
+
* on the scrim or pressing Escape.
|
|
189
|
+
*/
|
|
190
|
+
var Dialog = class extends dialogBaseClass {
|
|
191
|
+
/**
|
|
192
|
+
* Opens the dialog when set to `true` and closes it when set to `false`.
|
|
193
|
+
*/
|
|
194
|
+
get open() {
|
|
195
|
+
return this.isOpen;
|
|
196
|
+
}
|
|
197
|
+
set open(open) {
|
|
198
|
+
if (open === this.isOpen) return;
|
|
199
|
+
this.isOpen = open;
|
|
200
|
+
if (open) {
|
|
201
|
+
this.setAttribute("open", "");
|
|
202
|
+
this.show();
|
|
203
|
+
} else {
|
|
204
|
+
this.removeAttribute("open");
|
|
205
|
+
this.close();
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
constructor() {
|
|
209
|
+
super();
|
|
210
|
+
/**
|
|
211
|
+
* Skips the opening and closing animations.
|
|
212
|
+
*/
|
|
213
|
+
this.quick = false;
|
|
214
|
+
/**
|
|
215
|
+
* Gets or sets the dialog's return value, usually to indicate which button
|
|
216
|
+
* a user pressed to close it.
|
|
217
|
+
*
|
|
218
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/returnValue
|
|
219
|
+
*/
|
|
220
|
+
this.returnValue = "";
|
|
221
|
+
/**
|
|
222
|
+
* Disables focus trapping, which by default keeps keyboard Tab navigation
|
|
223
|
+
* within the dialog.
|
|
224
|
+
*
|
|
225
|
+
* When disabled, after focusing the last element of a dialog, pressing Tab
|
|
226
|
+
* again will release focus from the window back to the browser (such as the
|
|
227
|
+
* URL bar).
|
|
228
|
+
*
|
|
229
|
+
* Focus trapping is recommended for accessibility, and should not typically
|
|
230
|
+
* be disabled. Only turn this off if the use case of a dialog is more
|
|
231
|
+
* accessible without focus trapping.
|
|
232
|
+
*/
|
|
233
|
+
this.noFocusTrap = false;
|
|
234
|
+
/**
|
|
235
|
+
* Gets the opening animation for a dialog. Set to a new function to customize
|
|
236
|
+
* the animation.
|
|
237
|
+
*/
|
|
238
|
+
this.getOpenAnimation = () => DIALOG_DEFAULT_OPEN_ANIMATION;
|
|
239
|
+
/**
|
|
240
|
+
* Gets the closing animation for a dialog. Set to a new function to customize
|
|
241
|
+
* the animation.
|
|
242
|
+
*/
|
|
243
|
+
this.getCloseAnimation = () => DIALOG_DEFAULT_CLOSE_ANIMATION;
|
|
244
|
+
this.isOpen = false;
|
|
245
|
+
this.isOpening = false;
|
|
246
|
+
this.isConnectedPromise = this.getIsConnectedPromise();
|
|
247
|
+
this.isAtScrollTop = false;
|
|
248
|
+
this.isAtScrollBottom = false;
|
|
249
|
+
this.nextClickIsFromContent = false;
|
|
250
|
+
this.hasHeadline = false;
|
|
251
|
+
this.hasActions = false;
|
|
252
|
+
this.hasIcon = false;
|
|
253
|
+
this.escapePressedWithoutCancel = false;
|
|
254
|
+
this.treewalker = null;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Opens the dialog and fires a cancelable `open` event. After a dialog's
|
|
258
|
+
* animation, an `opened` event is fired.
|
|
259
|
+
*
|
|
260
|
+
* Add an `autofocus` attribute to a child of the dialog that should
|
|
261
|
+
* receive focus after opening.
|
|
262
|
+
*
|
|
263
|
+
* @return A Promise that resolves after the animation is finished and the
|
|
264
|
+
* `opened` event was fired.
|
|
265
|
+
*/
|
|
266
|
+
async show() {
|
|
267
|
+
this.isOpening = true;
|
|
268
|
+
await this.isConnectedPromise;
|
|
269
|
+
await this.updateComplete;
|
|
270
|
+
const dialog = this.dialog;
|
|
271
|
+
if (dialog.open || !this.isOpening) {
|
|
272
|
+
this.isOpening = false;
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
if (!this.dispatchEvent(new Event("open", { cancelable: true }))) {
|
|
276
|
+
this.open = false;
|
|
277
|
+
this.isOpening = false;
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
dialog.showModal();
|
|
281
|
+
this.open = true;
|
|
282
|
+
if (this.scroller) this.scroller.scrollTop = 0;
|
|
283
|
+
this.querySelector("[autofocus]")?.focus();
|
|
284
|
+
await this.animateDialog(this.getOpenAnimation());
|
|
285
|
+
this.dispatchEvent(new Event("opened"));
|
|
286
|
+
this.isOpening = false;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Closes the dialog and fires a cancelable `close` event. After a dialog's
|
|
290
|
+
* animation, a `closed` event is fired.
|
|
291
|
+
*
|
|
292
|
+
* @param returnValue A return value usually indicating which button was used
|
|
293
|
+
* to close a dialog. If a dialog is canceled by clicking the scrim or
|
|
294
|
+
* pressing Escape, it will not change the return value after closing.
|
|
295
|
+
* @return A Promise that resolves after the animation is finished and the
|
|
296
|
+
* `closed` event was fired.
|
|
297
|
+
*/
|
|
298
|
+
async close(returnValue = this.returnValue) {
|
|
299
|
+
this.isOpening = false;
|
|
300
|
+
if (!this.isConnected) {
|
|
301
|
+
this.open = false;
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
await this.updateComplete;
|
|
305
|
+
const dialog = this.dialog;
|
|
306
|
+
if (!dialog.open || this.isOpening) {
|
|
307
|
+
this.open = false;
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
const prevReturnValue = this.returnValue;
|
|
311
|
+
this.returnValue = returnValue;
|
|
312
|
+
if (!this.dispatchEvent(new Event("close", { cancelable: true }))) {
|
|
313
|
+
this.returnValue = prevReturnValue;
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
await this.animateDialog(this.getCloseAnimation());
|
|
317
|
+
dialog.close(returnValue);
|
|
318
|
+
this.open = false;
|
|
319
|
+
this.dispatchEvent(new Event("closed"));
|
|
320
|
+
}
|
|
321
|
+
connectedCallback() {
|
|
322
|
+
super.connectedCallback();
|
|
323
|
+
this.isConnectedPromiseResolve();
|
|
324
|
+
}
|
|
325
|
+
disconnectedCallback() {
|
|
326
|
+
super.disconnectedCallback();
|
|
327
|
+
this.isConnectedPromise = this.getIsConnectedPromise();
|
|
328
|
+
}
|
|
329
|
+
render() {
|
|
330
|
+
const scrollable = this.open && !(this.isAtScrollTop && this.isAtScrollBottom);
|
|
331
|
+
const classes = {
|
|
332
|
+
"has-headline": this.hasHeadline,
|
|
333
|
+
"has-actions": this.hasActions,
|
|
334
|
+
"has-icon": this.hasIcon,
|
|
335
|
+
"scrollable": scrollable,
|
|
336
|
+
"show-top-divider": scrollable && !this.isAtScrollTop,
|
|
337
|
+
"show-bottom-divider": scrollable && !this.isAtScrollBottom
|
|
338
|
+
};
|
|
339
|
+
const showFocusTrap = this.open && !this.noFocusTrap;
|
|
340
|
+
const focusTrap = T`
|
|
341
|
+
<div
|
|
342
|
+
class="focus-trap"
|
|
343
|
+
tabindex="0"
|
|
344
|
+
aria-hidden="true"
|
|
345
|
+
@focus=${this.handleFocusTrapFocus}></div>
|
|
346
|
+
`;
|
|
347
|
+
const { ariaLabel } = this;
|
|
348
|
+
return T`
|
|
349
|
+
<div class="scrim"></div>
|
|
350
|
+
<dialog
|
|
351
|
+
class=${e(classes)}
|
|
352
|
+
aria-label=${ariaLabel || A}
|
|
353
|
+
aria-labelledby=${this.hasHeadline ? "headline" : A}
|
|
354
|
+
role=${this.type === "alert" ? "alertdialog" : A}
|
|
355
|
+
@cancel=${this.handleCancel}
|
|
356
|
+
@click=${this.handleDialogClick}
|
|
357
|
+
@close=${this.handleClose}
|
|
358
|
+
@keydown=${this.handleKeydown}
|
|
359
|
+
.returnValue=${this.returnValue || A}>
|
|
360
|
+
${showFocusTrap ? focusTrap : A}
|
|
361
|
+
<div class="container" @click=${this.handleContentClick}>
|
|
362
|
+
<div class="headline">
|
|
363
|
+
<div class="icon" aria-hidden="true">
|
|
364
|
+
<slot name="icon" @slotchange=${this.handleIconChange}></slot>
|
|
365
|
+
</div>
|
|
366
|
+
<h2 id="headline" aria-hidden=${!this.hasHeadline || A}>
|
|
367
|
+
<slot
|
|
368
|
+
name="headline"
|
|
369
|
+
@slotchange=${this.handleHeadlineChange}></slot>
|
|
370
|
+
</h2>
|
|
371
|
+
<md-divider></md-divider>
|
|
372
|
+
</div>
|
|
373
|
+
<div class="scroller">
|
|
374
|
+
<div class="content">
|
|
375
|
+
<div class="top anchor"></div>
|
|
376
|
+
<slot name="content"></slot>
|
|
377
|
+
<div class="bottom anchor"></div>
|
|
378
|
+
</div>
|
|
379
|
+
</div>
|
|
380
|
+
<div class="actions">
|
|
381
|
+
<md-divider></md-divider>
|
|
382
|
+
<slot name="actions" @slotchange=${this.handleActionsChange}></slot>
|
|
383
|
+
</div>
|
|
384
|
+
</div>
|
|
385
|
+
${showFocusTrap ? focusTrap : A}
|
|
386
|
+
</dialog>
|
|
387
|
+
`;
|
|
388
|
+
}
|
|
389
|
+
firstUpdated() {
|
|
390
|
+
this.intersectionObserver = new IntersectionObserver((entries) => {
|
|
391
|
+
for (const entry of entries) this.handleAnchorIntersection(entry);
|
|
392
|
+
}, { root: this.scroller });
|
|
393
|
+
this.intersectionObserver.observe(this.topAnchor);
|
|
394
|
+
this.intersectionObserver.observe(this.bottomAnchor);
|
|
395
|
+
}
|
|
396
|
+
handleDialogClick() {
|
|
397
|
+
if (this.nextClickIsFromContent) {
|
|
398
|
+
this.nextClickIsFromContent = false;
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
if (!this.dispatchEvent(new Event("cancel", { cancelable: true }))) return;
|
|
402
|
+
this.close();
|
|
403
|
+
}
|
|
404
|
+
handleContentClick() {
|
|
405
|
+
this.nextClickIsFromContent = true;
|
|
406
|
+
}
|
|
407
|
+
handleSubmit(event) {
|
|
408
|
+
const form = event.target;
|
|
409
|
+
const { submitter } = event;
|
|
410
|
+
if (form.getAttribute("method") !== "dialog" || !submitter) return;
|
|
411
|
+
this.close(submitter.getAttribute("value") ?? this.returnValue);
|
|
412
|
+
}
|
|
413
|
+
handleCancel(event) {
|
|
414
|
+
if (event.target !== this.dialog) return;
|
|
415
|
+
this.escapePressedWithoutCancel = false;
|
|
416
|
+
const preventDefault = !redispatchEvent(this, event);
|
|
417
|
+
event.preventDefault();
|
|
418
|
+
if (preventDefault) return;
|
|
419
|
+
this.close();
|
|
420
|
+
}
|
|
421
|
+
handleClose() {
|
|
422
|
+
if (!this.escapePressedWithoutCancel) return;
|
|
423
|
+
this.escapePressedWithoutCancel = false;
|
|
424
|
+
this.dialog?.dispatchEvent(new Event("cancel", { cancelable: true }));
|
|
425
|
+
}
|
|
426
|
+
handleKeydown(event) {
|
|
427
|
+
if (event.key !== "Escape") return;
|
|
428
|
+
this.escapePressedWithoutCancel = true;
|
|
429
|
+
setTimeout(() => {
|
|
430
|
+
this.escapePressedWithoutCancel = false;
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
async animateDialog(animation) {
|
|
434
|
+
this.cancelAnimations?.abort();
|
|
435
|
+
this.cancelAnimations = new AbortController();
|
|
436
|
+
if (this.quick) return;
|
|
437
|
+
const { dialog, scrim, container, headline, content, actions } = this;
|
|
438
|
+
if (!dialog || !scrim || !container || !headline || !content || !actions) return;
|
|
439
|
+
const { container: containerAnimate, dialog: dialogAnimate, scrim: scrimAnimate, headline: headlineAnimate, content: contentAnimate, actions: actionsAnimate } = animation;
|
|
440
|
+
const elementAndAnimation = [
|
|
441
|
+
[dialog, dialogAnimate ?? []],
|
|
442
|
+
[scrim, scrimAnimate ?? []],
|
|
443
|
+
[container, containerAnimate ?? []],
|
|
444
|
+
[headline, headlineAnimate ?? []],
|
|
445
|
+
[content, contentAnimate ?? []],
|
|
446
|
+
[actions, actionsAnimate ?? []]
|
|
447
|
+
];
|
|
448
|
+
const animations = [];
|
|
449
|
+
for (const [element, animation] of elementAndAnimation) for (const animateArgs of animation) {
|
|
450
|
+
const animation = element.animate(...animateArgs);
|
|
451
|
+
this.cancelAnimations.signal.addEventListener("abort", () => {
|
|
452
|
+
animation.cancel();
|
|
453
|
+
});
|
|
454
|
+
animations.push(animation);
|
|
455
|
+
}
|
|
456
|
+
await Promise.all(animations.map((animation) => animation.finished.catch(() => {})));
|
|
457
|
+
}
|
|
458
|
+
handleHeadlineChange(event) {
|
|
459
|
+
const slot = event.target;
|
|
460
|
+
this.hasHeadline = slot.assignedElements().length > 0;
|
|
461
|
+
}
|
|
462
|
+
handleActionsChange(event) {
|
|
463
|
+
const slot = event.target;
|
|
464
|
+
this.hasActions = slot.assignedElements().length > 0;
|
|
465
|
+
}
|
|
466
|
+
handleIconChange(event) {
|
|
467
|
+
const slot = event.target;
|
|
468
|
+
this.hasIcon = slot.assignedElements().length > 0;
|
|
469
|
+
}
|
|
470
|
+
handleAnchorIntersection(entry) {
|
|
471
|
+
const { target, isIntersecting } = entry;
|
|
472
|
+
if (target === this.topAnchor) this.isAtScrollTop = isIntersecting;
|
|
473
|
+
if (target === this.bottomAnchor) this.isAtScrollBottom = isIntersecting;
|
|
474
|
+
}
|
|
475
|
+
getIsConnectedPromise() {
|
|
476
|
+
return new Promise((resolve) => {
|
|
477
|
+
this.isConnectedPromiseResolve = resolve;
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
handleFocusTrapFocus(event) {
|
|
481
|
+
const [firstFocusableChild, lastFocusableChild] = this.getFirstAndLastFocusableChildren();
|
|
482
|
+
if (!firstFocusableChild || !lastFocusableChild) {
|
|
483
|
+
this.dialog?.focus();
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
const isFirstFocusTrap = event.target === this.firstFocusTrap;
|
|
487
|
+
const isLastFocusTrap = !isFirstFocusTrap;
|
|
488
|
+
const focusCameFromFirstChild = event.relatedTarget === firstFocusableChild;
|
|
489
|
+
const focusCameFromLastChild = event.relatedTarget === lastFocusableChild;
|
|
490
|
+
const focusCameFromOutsideDialog = !focusCameFromFirstChild && !focusCameFromLastChild;
|
|
491
|
+
if (isLastFocusTrap && focusCameFromLastChild || isFirstFocusTrap && focusCameFromOutsideDialog) {
|
|
492
|
+
firstFocusableChild.focus();
|
|
493
|
+
return;
|
|
494
|
+
}
|
|
495
|
+
if (isFirstFocusTrap && focusCameFromFirstChild || isLastFocusTrap && focusCameFromOutsideDialog) {
|
|
496
|
+
lastFocusableChild.focus();
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
getFirstAndLastFocusableChildren() {
|
|
501
|
+
if (!this.treewalker) return [null, null];
|
|
502
|
+
let firstFocusableChild = null;
|
|
503
|
+
let lastFocusableChild = null;
|
|
504
|
+
this.treewalker.currentNode = this.treewalker.root;
|
|
505
|
+
while (this.treewalker.nextNode()) {
|
|
506
|
+
const nextChild = this.treewalker.currentNode;
|
|
507
|
+
if (!isFocusable(nextChild)) continue;
|
|
508
|
+
if (!firstFocusableChild) firstFocusableChild = nextChild;
|
|
509
|
+
lastFocusableChild = nextChild;
|
|
510
|
+
}
|
|
511
|
+
return [firstFocusableChild, lastFocusableChild];
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
__decorate([n({ type: Boolean })], Dialog.prototype, "open", null);
|
|
515
|
+
__decorate([n({ type: Boolean })], Dialog.prototype, "quick", void 0);
|
|
516
|
+
__decorate([n({ attribute: false })], Dialog.prototype, "returnValue", void 0);
|
|
517
|
+
__decorate([n()], Dialog.prototype, "type", void 0);
|
|
518
|
+
__decorate([n({
|
|
519
|
+
type: Boolean,
|
|
520
|
+
attribute: "no-focus-trap"
|
|
521
|
+
})], Dialog.prototype, "noFocusTrap", void 0);
|
|
522
|
+
__decorate([e$1("dialog")], Dialog.prototype, "dialog", void 0);
|
|
523
|
+
__decorate([e$1(".scrim")], Dialog.prototype, "scrim", void 0);
|
|
524
|
+
__decorate([e$1(".container")], Dialog.prototype, "container", void 0);
|
|
525
|
+
__decorate([e$1(".headline")], Dialog.prototype, "headline", void 0);
|
|
526
|
+
__decorate([e$1(".content")], Dialog.prototype, "content", void 0);
|
|
527
|
+
__decorate([e$1(".actions")], Dialog.prototype, "actions", void 0);
|
|
528
|
+
__decorate([r()], Dialog.prototype, "isAtScrollTop", void 0);
|
|
529
|
+
__decorate([r()], Dialog.prototype, "isAtScrollBottom", void 0);
|
|
530
|
+
__decorate([e$1(".scroller")], Dialog.prototype, "scroller", void 0);
|
|
531
|
+
__decorate([e$1(".top.anchor")], Dialog.prototype, "topAnchor", void 0);
|
|
532
|
+
__decorate([e$1(".bottom.anchor")], Dialog.prototype, "bottomAnchor", void 0);
|
|
533
|
+
__decorate([e$1(".focus-trap")], Dialog.prototype, "firstFocusTrap", void 0);
|
|
534
|
+
__decorate([r()], Dialog.prototype, "hasHeadline", void 0);
|
|
535
|
+
__decorate([r()], Dialog.prototype, "hasActions", void 0);
|
|
536
|
+
__decorate([r()], Dialog.prototype, "hasIcon", void 0);
|
|
537
|
+
function isFocusable(element) {
|
|
538
|
+
const knownFocusableElements = ":is(button,input,select,textarea,object,:is(a,area)[href],[tabindex],[contenteditable=true])";
|
|
539
|
+
const notDisabled = ":not(:disabled,[disabled])";
|
|
540
|
+
if (element.matches(knownFocusableElements + notDisabled + ":not([tabindex^=\"-\"])")) return true;
|
|
541
|
+
if (!element.localName.includes("-")) return false;
|
|
542
|
+
if (!element.matches(notDisabled)) return false;
|
|
543
|
+
return element.shadowRoot?.delegatesFocus ?? false;
|
|
544
|
+
}
|
|
545
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/dialog/internal/dialog-styles.cssresult.js
|
|
546
|
+
/**
|
|
547
|
+
* @license
|
|
548
|
+
* Copyright 2026 Google LLC
|
|
549
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
550
|
+
*/
|
|
551
|
+
var styles = i$1`:host{border-start-start-radius:var(--md-dialog-container-shape-start-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-start-end-radius:var(--md-dialog-container-shape-start-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-end-radius:var(--md-dialog-container-shape-end-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-start-radius:var(--md-dialog-container-shape-end-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));display:contents;margin:auto;max-height:min(560px,100% - 48px);max-width:min(560px,100% - 48px);min-height:140px;min-width:280px;position:fixed;height:fit-content;width:fit-content}dialog{background:rgba(0,0,0,0);border:none;border-radius:inherit;flex-direction:column;height:inherit;margin:inherit;max-height:inherit;max-width:inherit;min-height:inherit;min-width:inherit;outline:none;overflow:visible;padding:0;width:inherit}dialog[open]{display:flex}::backdrop{background:none}.scrim{background:var(--md-sys-color-scrim, #000);display:none;inset:0;opacity:32%;pointer-events:none;position:fixed;z-index:1}:host([open]) .scrim{display:flex}h2{all:unset;align-self:stretch}.headline{align-items:center;color:var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1d1b20));display:flex;flex-direction:column;font-family:var(--md-dialog-headline-font, var(--md-sys-typescale-headline-small-font, var(--md-ref-typeface-brand, Roboto)));font-size:var(--md-dialog-headline-size, var(--md-sys-typescale-headline-small-size, 1.5rem));line-height:var(--md-dialog-headline-line-height, var(--md-sys-typescale-headline-small-line-height, 2rem));font-weight:var(--md-dialog-headline-weight, var(--md-sys-typescale-headline-small-weight, var(--md-ref-typeface-weight-regular, 400)));position:relative}slot[name=headline]::slotted(*){align-items:center;align-self:stretch;box-sizing:border-box;display:flex;gap:8px;padding:24px 24px 0}.icon{display:flex}slot[name=icon]::slotted(*){color:var(--md-dialog-icon-color, var(--md-sys-color-secondary, #625b71));fill:currentColor;font-size:var(--md-dialog-icon-size, 24px);margin-top:24px;height:var(--md-dialog-icon-size, 24px);width:var(--md-dialog-icon-size, 24px)}.has-icon slot[name=headline]::slotted(*){justify-content:center;padding-top:16px}.scrollable slot[name=headline]::slotted(*){padding-bottom:16px}.scrollable.has-headline slot[name=content]::slotted(*){padding-top:8px}.container{border-radius:inherit;display:flex;flex-direction:column;flex-grow:1;overflow:hidden;position:relative;transform-origin:top}.container::before{background:var(--md-dialog-container-color, var(--md-sys-color-surface-container-high, #ece6f0));border-radius:inherit;content:"";inset:0;position:absolute}.scroller{display:flex;flex:1;flex-direction:column;overflow:hidden;z-index:1}.scrollable .scroller{overflow-y:scroll}.content{color:var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-dialog-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-dialog-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-dialog-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));flex:1;font-weight:var(--md-dialog-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)));height:min-content;position:relative}slot[name=content]::slotted(*){box-sizing:border-box;padding:24px}.anchor{position:absolute}.top.anchor{top:0}.bottom.anchor{bottom:0}.actions{position:relative}slot[name=actions]::slotted(*){box-sizing:border-box;display:flex;gap:8px;justify-content:flex-end;padding:16px 24px 24px}.has-actions slot[name=content]::slotted(*){padding-bottom:8px}md-divider{display:none;position:absolute}.has-headline.show-top-divider .headline md-divider,.has-actions.show-bottom-divider .actions md-divider{display:flex}.headline md-divider{bottom:0}.actions md-divider{top:0}@media(forced-colors: active){dialog{outline:2px solid WindowText}}
|
|
552
|
+
`;
|
|
553
|
+
styles.styleSheet;
|
|
554
|
+
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/dialog/dialog.js
|
|
555
|
+
/**
|
|
556
|
+
* @license
|
|
557
|
+
* Copyright 2023 Google LLC
|
|
558
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
559
|
+
*/
|
|
560
|
+
/**
|
|
561
|
+
* @summary Dialogs can require an action, communicate information, or help
|
|
562
|
+
* users accomplish a task. There are two types of dialogs: basic and
|
|
563
|
+
* full-screen.
|
|
564
|
+
*
|
|
565
|
+
* @description
|
|
566
|
+
* A dialog is a modal window that appears in front of app content to provide
|
|
567
|
+
* critical information or ask for a decision. Dialogs disable all app
|
|
568
|
+
* functionality when they appear, and remain on screen until confirmed,
|
|
569
|
+
* dismissed, or a required action has been taken.
|
|
570
|
+
*
|
|
571
|
+
* Dialogs are purposefully interruptive, so they should be used sparingly.
|
|
572
|
+
* A less disruptive alternative is to use a menu, which provides options
|
|
573
|
+
* without interrupting a user’s experience.
|
|
574
|
+
*
|
|
575
|
+
* On mobile devices only, complex dialogs should be displayed fullscreen.
|
|
576
|
+
*
|
|
577
|
+
* __Example usages:__
|
|
578
|
+
* - Common use cases for basic dialogs include alerts, quick selection, and
|
|
579
|
+
* confirmation.
|
|
580
|
+
* - More complex dialogs may contain actions that require a series of tasks
|
|
581
|
+
* to complete. One example is creating a calendar entry with the event title,
|
|
582
|
+
* date, location, and time.
|
|
583
|
+
*
|
|
584
|
+
* @final
|
|
585
|
+
* @suppress {visibility}
|
|
586
|
+
*/
|
|
587
|
+
var MdDialog = class MdDialog extends Dialog {};
|
|
588
|
+
MdDialog.styles = [styles];
|
|
589
|
+
MdDialog = __decorate([t("md-dialog")], MdDialog);
|
|
590
|
+
export {};
|
|
591
|
+
|
|
592
|
+
//# sourceMappingURL=dialog.js.map
|