@screenreader-speech-capture/bridge 0.0.0-stage → 0.0.2
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/LICENSE +21 -0
- package/README.md +46 -2
- package/dist/cli.mjs +6291 -0
- package/dist/ui/adapter-node.js +11 -0
- package/dist/ui/client/ui/_app/immutable/assets/0.ONZWQgDA.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/0.ONZWQgDA.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/0.ONZWQgDA.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/3.WduKm4aT.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/3.WduKm4aT.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/3.WduKm4aT.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/4.DyY1vjRV.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/4.DyY1vjRV.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/4.DyY1vjRV.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/5.YyxFzHED.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/5.YyxFzHED.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/5.YyxFzHED.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.Dgdg5KMw.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/Pane.Dgdg5KMw.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/Pane.Dgdg5KMw.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/material-symbols-outlined-latin-400-normal.BhEvR8fk.woff2 +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-flex-cyrillic-ext-opsz-normal.nDQikIyu.woff2 +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-flex-cyrillic-opsz-normal.SjuC5rw5.woff2 +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-flex-greek-opsz-normal.C14fFRny.woff2 +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-flex-latin-ext-opsz-normal.xNclTVCo.woff2 +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-flex-latin-opsz-normal.hy8fyBBC.woff2 +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-flex-vietnamese-opsz-normal.C-H_yGOU.woff2 +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-400-normal.B3hIXASd.woff +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-400-normal.C-_K-ZCn.woff2 +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-500-normal.DGZ7-lUP.woff2 +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-500-normal.NpUJFYX7.woff +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-ext-400-normal.BHxv52bw.woff2 +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-ext-400-normal.W26xs1TL.woff +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-ext-500-normal.6xdwlG7p.woff +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-ext-500-normal.DC57U9n8.woff2 +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-greek-400-normal.CH_u3Aru.woff2 +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-greek-400-normal.P8xe1gs1.woff +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-greek-500-normal.C2M8jX6G.woff +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-greek-500-normal.DpRFkptA.woff2 +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-400-normal.DBZPkcnn.woff +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-400-normal.GekRknry.woff2 +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-500-normal.D6j6AMzd.woff +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-500-normal.pxIOXZmA.woff2 +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-ext-400-normal.BwLXVYNz.woff +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-ext-400-normal.DLAV9S_w.woff2 +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-ext-500-normal.B1IjfbhL.woff +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-ext-500-normal.Db3ge6Oe.woff2 +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-vietnamese-400-normal.CzWHQABp.woff +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-vietnamese-400-normal.yYTFiTTs.woff2 +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-vietnamese-500-normal.Cq-quQMu.woff2 +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-vietnamese-500-normal.IxzxMIj7.woff +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/0FroJ-XN.js +3 -0
- package/dist/ui/client/ui/_app/immutable/chunks/0FroJ-XN.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/0FroJ-XN.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/4wvZDMeR.js +33 -0
- package/dist/ui/client/ui/_app/immutable/chunks/4wvZDMeR.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/4wvZDMeR.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/B1Ryegye.js +3 -0
- package/dist/ui/client/ui/_app/immutable/chunks/B1Ryegye.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/B1Ryegye.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/B1vArRqi.js +3 -0
- package/dist/ui/client/ui/_app/immutable/chunks/B1vArRqi.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/B1vArRqi.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BS7n1gMj.js +40 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BS7n1gMj.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BS7n1gMj.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/B_ZElYu_.js +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/B_ZElYu_.js.br +2 -0
- package/dist/ui/client/ui/_app/immutable/chunks/B_ZElYu_.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Beqi9dRN.js +72 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Beqi9dRN.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Beqi9dRN.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BnU72Mow.js +2 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BnU72Mow.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BnU72Mow.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/CK3uUd4t.js +48 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CK3uUd4t.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CK3uUd4t.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CMWEX9XL.js +138 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CMWEX9XL.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CMWEX9XL.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CVpgcnu3.js +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CVpgcnu3.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CVpgcnu3.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/D-2Nx62w.js +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/D-2Nx62w.js.br +4 -0
- package/dist/ui/client/ui/_app/immutable/chunks/D-2Nx62w.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/D0famktY.js +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/D0famktY.js.br +2 -0
- package/dist/ui/client/ui/_app/immutable/chunks/D0famktY.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DHsTyp2W.js +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DHsTyp2W.js.br +2 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DHsTyp2W.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DOY87jO2.js +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DOY87jO2.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DOY87jO2.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DUTjbZNf.js +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DUTjbZNf.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DUTjbZNf.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Dvxhfd7j.js +3 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Dvxhfd7j.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Dvxhfd7j.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DzInmTUe.js +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DzInmTUe.js.br +1 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DzInmTUe.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/tKonUL5Y.js +4 -0
- package/dist/ui/client/ui/_app/immutable/chunks/tKonUL5Y.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/tKonUL5Y.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.C8tsut3X.js +2 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.C8tsut3X.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.C8tsut3X.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/payload.DSmR2FwN.js +1 -0
- package/dist/ui/client/ui/_app/immutable/entry/payload.DSmR2FwN.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/payload.DSmR2FwN.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/start.DqIv9xYX.js +2 -0
- package/dist/ui/client/ui/_app/immutable/entry/start.DqIv9xYX.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/start.DqIv9xYX.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.3bVKqGbx.js +1 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.3bVKqGbx.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.3bVKqGbx.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/1.C81neQJL.js +1 -0
- package/dist/ui/client/ui/_app/immutable/nodes/1.C81neQJL.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/1.C81neQJL.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.CmlyeAx_.js +1 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.CmlyeAx_.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.CmlyeAx_.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.WT26F_BF.js +5 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.WT26F_BF.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.WT26F_BF.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/4.tiDJxi6M.js +160 -0
- package/dist/ui/client/ui/_app/immutable/nodes/4.tiDJxi6M.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/4.tiDJxi6M.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/5.MzfJoePg.js +6 -0
- package/dist/ui/client/ui/_app/immutable/nodes/5.MzfJoePg.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/5.MzfJoePg.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/6.bNZhqiRK.js +6 -0
- package/dist/ui/client/ui/_app/immutable/nodes/6.bNZhqiRK.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/6.bNZhqiRK.js.gz +0 -0
- package/dist/ui/client/ui/_app/version.json +1 -0
- 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/client/ui/robots.txt +3 -0
- package/dist/ui/client/ui/robots.txt.br +0 -0
- package/dist/ui/client/ui/robots.txt.gz +0 -0
- package/dist/ui/handler.js +1 -0
- package/dist/ui/index.js +1 -0
- package/dist/ui/server/.vite/manifest.json +761 -0
- package/dist/ui/server/_app/immutable/assets/ExternalLink.CYXazpKA.css +1 -0
- package/dist/ui/server/_app/immutable/assets/Pane.Dgdg5KMw.css +1 -0
- package/dist/ui/server/_app/immutable/assets/_layout.DSVNnDlO.css +1 -0
- package/dist/ui/server/_app/immutable/assets/_layout.ONZWQgDA.css +1 -0
- package/dist/ui/server/_app/immutable/assets/_page.C0Nhvs_m.css +1 -0
- package/dist/ui/server/_app/immutable/assets/_page.DyY1vjRV.css +1 -0
- package/dist/ui/server/_app/immutable/assets/_page.WduKm4aT.css +1 -0
- package/dist/ui/server/_app/immutable/assets/_page.YyxFzHED.css +1 -0
- package/dist/ui/server/_app/immutable/assets/material-symbols-outlined-latin-400-normal.BhEvR8fk.woff2 +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-flex-cyrillic-ext-opsz-normal.nDQikIyu.woff2 +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-flex-cyrillic-opsz-normal.SjuC5rw5.woff2 +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-flex-greek-opsz-normal.C14fFRny.woff2 +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-flex-latin-ext-opsz-normal.xNclTVCo.woff2 +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-flex-latin-opsz-normal.hy8fyBBC.woff2 +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-flex-vietnamese-opsz-normal.C-H_yGOU.woff2 +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-400-normal.B3hIXASd.woff +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-400-normal.C-_K-ZCn.woff2 +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-500-normal.DGZ7-lUP.woff2 +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-500-normal.NpUJFYX7.woff +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-ext-400-normal.BHxv52bw.woff2 +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-ext-400-normal.W26xs1TL.woff +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-ext-500-normal.6xdwlG7p.woff +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-ext-500-normal.DC57U9n8.woff2 +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-greek-400-normal.CH_u3Aru.woff2 +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-greek-400-normal.P8xe1gs1.woff +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-greek-500-normal.C2M8jX6G.woff +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-greek-500-normal.DpRFkptA.woff2 +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-400-normal.DBZPkcnn.woff +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-400-normal.GekRknry.woff2 +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-500-normal.D6j6AMzd.woff +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-500-normal.pxIOXZmA.woff2 +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-ext-400-normal.BwLXVYNz.woff +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-ext-400-normal.DLAV9S_w.woff2 +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-ext-500-normal.B1IjfbhL.woff +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-ext-500-normal.Db3ge6Oe.woff2 +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-vietnamese-400-normal.CzWHQABp.woff +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-vietnamese-400-normal.yYTFiTTs.woff2 +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-vietnamese-500-normal.Cq-quQMu.woff2 +0 -0
- package/dist/ui/server/_app/immutable/assets/roboto-mono-vietnamese-500-normal.IxzxMIj7.woff +0 -0
- package/dist/ui/server/adapter-env.js +1 -0
- package/dist/ui/server/adapter-index.js +73 -0
- package/dist/ui/server/adapter-index.js.map +1 -0
- package/dist/ui/server/adapter-node-env.js +63 -0
- package/dist/ui/server/adapter-node-env.js.map +1 -0
- package/dist/ui/server/adapter-node-handler.js +638 -0
- package/dist/ui/server/adapter-node-handler.js.map +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 +3468 -0
- package/dist/ui/server/chunks/composition.js.map +1 -0
- 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/config.js +145 -0
- package/dist/ui/server/chunks/config.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/exports.js +352 -0
- package/dist/ui/server/chunks/exports.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/functions.js +29 -0
- package/dist/ui/server/chunks/functions.js.map +1 -0
- package/dist/ui/server/chunks/icon-button.js +234 -0
- package/dist/ui/server/chunks/icon-button.js.map +1 -0
- 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 +6 -0
- package/dist/ui/server/chunks/index-server.js.map +1 -0
- package/dist/ui/server/chunks/instance.js +3577 -0
- package/dist/ui/server/chunks/instance.js.map +1 -0
- package/dist/ui/server/chunks/internal.js +3577 -0
- package/dist/ui/server/chunks/internal.js.map +1 -0
- package/dist/ui/server/chunks/navigation.js +11 -0
- package/dist/ui/server/chunks/navigation.js.map +1 -0
- 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 +1477 -0
- package/dist/ui/server/chunks/outlined-text-field.js.map +1 -0
- 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/remote-1j2tn2d.js +4 -0
- package/dist/ui/server/chunks/remote.js +1580 -0
- package/dist/ui/server/chunks/remote.js.map +1 -0
- package/dist/ui/server/chunks/scope.js +13 -0
- package/dist/ui/server/chunks/scope.js.map +1 -0
- package/dist/ui/server/chunks/server-errors.js +471 -0
- package/dist/ui/server/chunks/server-errors.js.map +1 -0
- package/dist/ui/server/chunks/server.js +8 -0
- package/dist/ui/server/chunks/server.js.map +1 -0
- package/dist/ui/server/chunks/server2.js +1960 -0
- package/dist/ui/server/chunks/server2.js.map +1 -0
- package/dist/ui/server/chunks/sessions.js +65 -0
- package/dist/ui/server/chunks/sessions.js.map +1 -0
- package/dist/ui/server/chunks/sessions.remote.js +56 -0
- package/dist/ui/server/chunks/sessions.remote.js.map +1 -0
- package/dist/ui/server/chunks/shared-errors.js +198 -0
- package/dist/ui/server/chunks/shared-errors.js.map +1 -0
- package/dist/ui/server/chunks/shared.js +85 -0
- package/dist/ui/server/chunks/shared.js.map +1 -0
- package/dist/ui/server/chunks/src.js +1217 -0
- package/dist/ui/server/chunks/src.js.map +1 -0
- package/dist/ui/server/chunks/state.js +38 -0
- package/dist/ui/server/chunks/state.js.map +1 -0
- 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 +19 -0
- package/dist/ui/server/entries/endpoints/api/config/_server.ts.js.map +1 -0
- 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 +13 -0
- package/dist/ui/server/entries/endpoints/api/markers/_server.ts.js.map +1 -0
- package/dist/ui/server/entries/endpoints/api/sessions/_id_id_/_server.ts.js +12 -0
- package/dist/ui/server/entries/endpoints/api/sessions/_id_id_/_server.ts.js.map +1 -0
- package/dist/ui/server/entries/endpoints/api/sessions/_server.ts.js +13 -0
- package/dist/ui/server/entries/endpoints/api/sessions/_server.ts.js.map +1 -0
- package/dist/ui/server/entries/endpoints/api/sessions/end/_server.ts.js +9 -0
- package/dist/ui/server/entries/endpoints/api/sessions/end/_server.ts.js.map +1 -0
- package/dist/ui/server/entries/endpoints/api/speech/_server.ts.js +25 -0
- package/dist/ui/server/entries/endpoints/api/speech/_server.ts.js.map +1 -0
- package/dist/ui/server/entries/endpoints/api/speech/stream/_server.ts.js +19 -0
- package/dist/ui/server/entries/endpoints/api/speech/stream/_server.ts.js.map +1 -0
- package/dist/ui/server/entries/endpoints/api/status/_server.ts.js +9 -0
- package/dist/ui/server/entries/endpoints/api/status/_server.ts.js.map +1 -0
- package/dist/ui/server/entries/hooks.server.js +161 -0
- package/dist/ui/server/entries/hooks.server.js.map +1 -0
- package/dist/ui/server/entries/pages/_error.svelte.js +16 -0
- package/dist/ui/server/entries/pages/_error.svelte.js.map +1 -0
- package/dist/ui/server/entries/pages/_layout.server.ts.js +17 -0
- package/dist/ui/server/entries/pages/_layout.server.ts.js.map +1 -0
- package/dist/ui/server/entries/pages/_layout.svelte.js +175 -0
- package/dist/ui/server/entries/pages/_layout.svelte.js.map +1 -0
- package/dist/ui/server/entries/pages/_page.server.ts.js +18 -0
- package/dist/ui/server/entries/pages/_page.server.ts.js.map +1 -0
- package/dist/ui/server/entries/pages/_page.svelte.js +444 -0
- package/dist/ui/server/entries/pages/_page.svelte.js.map +1 -0
- 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 +3531 -0
- package/dist/ui/server/entries/pages/settings/_page.svelte.js.map +1 -0
- 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 +230 -0
- package/dist/ui/server/entries/pages/setup/_page.svelte.js.map +1 -0
- 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/entries/params.js +60 -0
- package/dist/ui/server/entries/params.js.map +1 -0
- package/dist/ui/server/env.js +1 -0
- package/dist/ui/server/handler.js +1 -0
- package/dist/ui/server/index.js +67 -0
- package/dist/ui/server/index.js.map +1 -0
- package/dist/ui/server/manifest-full.js +126 -0
- package/dist/ui/server/manifest.js +126 -0
- package/dist/ui/server/nodes/0.js +10 -0
- package/dist/ui/server/nodes/1.js +8 -0
- package/dist/ui/server/nodes/2.js +8 -0
- package/dist/ui/server/nodes/3.js +10 -0
- package/dist/ui/server/nodes/4.js +10 -0
- package/dist/ui/server/nodes/5.js +8 -0
- package/dist/ui/server/nodes/6.js +10 -0
- package/dist/ui/server/remote-entry.js +1 -0
- package/dist/ui/server/server.js +128 -0
- package/package.json +39 -3
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { t as scopeParam } from "../../../../../chunks/scope.js";
|
|
2
|
+
// src/routes/api/speech/stream/+server.ts
|
|
3
|
+
/**
|
|
4
|
+
* Relays the bridge's SSE stream to the browser. `?session=<id|none>` and `Last-Event-ID` go
|
|
5
|
+
* through (`?since=0` replays the whole buffer), so the browser's own reconnects replay what it
|
|
6
|
+
* missed. The upstream request ends when
|
|
7
|
+
* the browser goes away.
|
|
8
|
+
*/
|
|
9
|
+
var GET = async ({ url, request, locals }) => {
|
|
10
|
+
const upstream = await locals.bridge.openSpeechStream(scopeParam(url), request.headers.get("last-event-id") ?? url.searchParams.get("since"), request.signal);
|
|
11
|
+
return new Response(upstream.body, { headers: {
|
|
12
|
+
"content-type": "text/event-stream",
|
|
13
|
+
"cache-control": "no-cache, no-transform",
|
|
14
|
+
"x-accel-buffering": "no"
|
|
15
|
+
} });
|
|
16
|
+
};
|
|
17
|
+
export { GET };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=_server.ts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_server.ts.js","names":[],"sources":["../../../../../../../src/routes/api/speech/stream/+server.ts"],"sourcesContent":["import { scopeParam } from '#lib/server/scope.js';\nimport type { RequestHandler } from './$types';\n\n/**\n * Relays the bridge's SSE stream to the browser. `?session=<id|none>` and `Last-Event-ID` go\n * through (`?since=0` replays the whole buffer), so the browser's own reconnects replay what it\n * missed. The upstream request ends when\n * the browser goes away.\n */\nexport const GET: RequestHandler = async ({ url, request, locals }) => {\n const upstream = await locals.bridge.openSpeechStream(\n scopeParam(url),\n // `EventSource` cannot set the header on its first request, so `?since=` stands in for it; the\n // header it sends itself when it reconnects wins.\n request.headers.get('last-event-id') ?? url.searchParams.get('since'),\n request.signal,\n );\n return new Response(upstream.body, {\n headers: {\n 'content-type': 'text/event-stream',\n 'cache-control': 'no-cache, no-transform',\n 'x-accel-buffering': 'no',\n },\n });\n};\n"],"mappings":";;;;;;;;AASA,IAAa,MAAsB,OAAO,EAAE,KAAK,SAAS,aAAa;CACrE,MAAM,WAAW,MAAM,OAAO,OAAO,iBACnC,WAAW,GAAG,GAGd,QAAQ,QAAQ,IAAI,eAAe,KAAK,IAAI,aAAa,IAAI,OAAO,GACpE,QAAQ,MACV;CACA,OAAO,IAAI,SAAS,SAAS,MAAM,EACjC,SAAS;EACP,gBAAgB;EAChB,iBAAiB;EACjB,qBAAqB;CACvB,EACF,CAAC;AACH"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { r as json } from "../../../../chunks/exports.js";
|
|
2
|
+
// src/routes/api/status/+server.ts
|
|
3
|
+
/** The header's status read: the browser asks the BFF, the BFF asks the bridge. */
|
|
4
|
+
var GET = async ({ locals }) => {
|
|
5
|
+
return json(await locals.bridge.status());
|
|
6
|
+
};
|
|
7
|
+
export { GET };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=_server.ts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_server.ts.js","names":[],"sources":["../../../../../../src/routes/api/status/+server.ts"],"sourcesContent":["import { json } from '@sveltejs/kit';\nimport type { RequestHandler } from './$types';\n\n/** The header's status read: the browser asks the BFF, the BFF asks the bridge. */\nexport const GET: RequestHandler = async ({ locals }) => {\n return json(await locals.bridge.status());\n};\n"],"mappings":";;;AAIA,IAAa,MAAsB,OAAO,EAAE,aAAa;CACvD,OAAO,KAAK,MAAM,OAAO,OAAO,OAAO,CAAC;AAC1C"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { t as dynamic_private_env } from "../chunks/config.js";
|
|
2
|
+
import { t as error } from "../chunks/exports.js";
|
|
3
|
+
import { a as SessionListSchema, d as SpeechListSchema, f as ConfigOverridesSchema, i as CLIENT_HEADER, m as ConfigSchema, n as checkDto, r as StatusSchema, s as StartSessionResponseSchema, t as AnyErrorBodySchema, u as SpeechEntrySchema } from "../chunks/src.js";
|
|
4
|
+
// ../shared/src/api-version.ts
|
|
5
|
+
/** Path prefix of every API route. */
|
|
6
|
+
var API_PREFIX = "/api/v1";
|
|
7
|
+
// .svelte-kit/generated/build/env/private/server.js
|
|
8
|
+
var SR_BRIDGE_API_URL = dynamic_private_env.SR_BRIDGE_API_URL;
|
|
9
|
+
// src/lib/server/bridge-api.ts
|
|
10
|
+
/** Named in the bridge's logs when this UI ends or replaces another client's session. */
|
|
11
|
+
var UI_CLIENT = "web-ui";
|
|
12
|
+
/**
|
|
13
|
+
* `baseUrl` is the bridge's origin (no path). `fetchFn` is SvelteKit's `event.fetch` in
|
|
14
|
+
* routes and a fake in tests.
|
|
15
|
+
*/
|
|
16
|
+
function createBridgeApi(baseUrl, fetchFn) {
|
|
17
|
+
const root = baseUrl.replace(/\/+$/, "") + API_PREFIX;
|
|
18
|
+
const origin = new URL(root).origin;
|
|
19
|
+
async function call(method, path, body) {
|
|
20
|
+
let response;
|
|
21
|
+
try {
|
|
22
|
+
response = await fetchFn(`${root}${path}`, {
|
|
23
|
+
method,
|
|
24
|
+
headers: {
|
|
25
|
+
accept: "application/json",
|
|
26
|
+
origin,
|
|
27
|
+
[CLIENT_HEADER]: UI_CLIENT,
|
|
28
|
+
...body === void 0 ? {} : { "content-type": "application/json" }
|
|
29
|
+
},
|
|
30
|
+
body: body === void 0 ? void 0 : JSON.stringify(body)
|
|
31
|
+
});
|
|
32
|
+
} catch (cause) {
|
|
33
|
+
error(502, `The bridge is not reachable: ${describe(cause)}`);
|
|
34
|
+
}
|
|
35
|
+
const answer = await response.json().catch(() => void 0);
|
|
36
|
+
if (!response.ok) {
|
|
37
|
+
const apiError = checkDto(AnyErrorBodySchema, answer);
|
|
38
|
+
if (!apiError.ok) error(response.status, `The bridge answered ${response.status}`);
|
|
39
|
+
const { message, details } = apiError.value.error;
|
|
40
|
+
const field = details?.field;
|
|
41
|
+
if (typeof field === "string") error(response.status, {
|
|
42
|
+
message,
|
|
43
|
+
field
|
|
44
|
+
});
|
|
45
|
+
error(response.status, message);
|
|
46
|
+
}
|
|
47
|
+
return answer;
|
|
48
|
+
}
|
|
49
|
+
async function read(method, path, schema, body) {
|
|
50
|
+
const checked = checkDto(schema, await call(method, path, body));
|
|
51
|
+
if (!checked.ok) error(502, `Unexpected answer from the bridge at ${checked.field}: ${checked.message}`);
|
|
52
|
+
return checked.value;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
status: () => read("GET", "/status", StatusSchema),
|
|
56
|
+
sessions: () => read("GET", "/sessions", SessionListSchema),
|
|
57
|
+
startSession: (request) => read("POST", "/sessions", StartSessionResponseSchema, request),
|
|
58
|
+
endSession: async () => {
|
|
59
|
+
await call("POST", "/sessions/end");
|
|
60
|
+
},
|
|
61
|
+
deleteSession: async (id) => {
|
|
62
|
+
await call("DELETE", `/sessions?session=${id}`);
|
|
63
|
+
},
|
|
64
|
+
clearSpeech: async (session) => {
|
|
65
|
+
await call("DELETE", `/speech?session=${session}`);
|
|
66
|
+
},
|
|
67
|
+
config: (view) => read("GET", `/config?view=${view}`, ConfigSchema),
|
|
68
|
+
configOverrides: () => read("GET", "/config/overrides", ConfigOverridesSchema),
|
|
69
|
+
updateConfig: (patch) => read("PUT", "/config", ConfigSchema, patch),
|
|
70
|
+
pressKeys: async (keys) => {
|
|
71
|
+
await call("POST", "/input/keys", { keys });
|
|
72
|
+
},
|
|
73
|
+
addMarker: (label) => read("POST", "/markers", SpeechEntrySchema, { label }),
|
|
74
|
+
speech: (session, since, limit) => {
|
|
75
|
+
const query = new URLSearchParams({
|
|
76
|
+
since: String(since),
|
|
77
|
+
limit: String(limit)
|
|
78
|
+
});
|
|
79
|
+
if (session !== null) query.set("session", String(session));
|
|
80
|
+
return read("GET", `/speech?${query}`, SpeechListSchema);
|
|
81
|
+
},
|
|
82
|
+
openSpeechStream: async (session, lastEventId, signal) => {
|
|
83
|
+
const query = session === null ? "" : `?session=${session}`;
|
|
84
|
+
let response;
|
|
85
|
+
try {
|
|
86
|
+
response = await fetchFn(`${root}/speech/stream${query}`, {
|
|
87
|
+
headers: {
|
|
88
|
+
accept: "text/event-stream",
|
|
89
|
+
origin,
|
|
90
|
+
[CLIENT_HEADER]: UI_CLIENT,
|
|
91
|
+
...lastEventId === null ? {} : { "last-event-id": lastEventId }
|
|
92
|
+
},
|
|
93
|
+
signal
|
|
94
|
+
});
|
|
95
|
+
} catch (cause) {
|
|
96
|
+
error(502, `The bridge is not reachable: ${describe(cause)}`);
|
|
97
|
+
}
|
|
98
|
+
if (!response.ok || response.body === null) {
|
|
99
|
+
await response.body?.cancel().catch(() => void 0);
|
|
100
|
+
error(response.status === 200 ? 502 : response.status, "The speech stream is not available");
|
|
101
|
+
}
|
|
102
|
+
return response;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function describe(cause) {
|
|
107
|
+
return cause instanceof Error ? cause.message : String(cause);
|
|
108
|
+
}
|
|
109
|
+
// src/lib/server/bridge-from-env.ts
|
|
110
|
+
/** The bridge API of this deployment, at `SR_BRIDGE_API_URL` (`src/env.ts`). */
|
|
111
|
+
function bridgeApiFromEnv(fetchFn) {
|
|
112
|
+
return createBridgeApi(SR_BRIDGE_API_URL, fetchFn);
|
|
113
|
+
}
|
|
114
|
+
// src/lib/server/log.ts
|
|
115
|
+
/**
|
|
116
|
+
* Where the bridge puts its `[web-ui]` logger before it loads the UI (`UI_LOGGER_KEY` in
|
|
117
|
+
* `packages/bridge/src/composition/ui.ts`; the bridge and the UI don't import each other).
|
|
118
|
+
*/
|
|
119
|
+
var BRIDGE_LOGGER_KEY = Symbol.for("screenreader-speech-capture.ui-logger");
|
|
120
|
+
function isServerLog(value) {
|
|
121
|
+
return typeof value === "object" && value !== null && typeof value.error === "function" && typeof value.warn === "function";
|
|
122
|
+
}
|
|
123
|
+
/** `pnpm dev:ui` has no bridge in its process: the Vite dev server's console stands in. */
|
|
124
|
+
var consoleLog = {
|
|
125
|
+
error: (message) => console.error(`[web-ui] ${message}`),
|
|
126
|
+
warn: (message) => console.warn(`[web-ui] ${message}`)
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* The bridge log inside the bridge, the console otherwise. Read per call, so it doesn't matter
|
|
130
|
+
* whether this module loads before or after the bridge sets it.
|
|
131
|
+
*/
|
|
132
|
+
function serverLog() {
|
|
133
|
+
const bridge = globalThis[BRIDGE_LOGGER_KEY];
|
|
134
|
+
return isServerLog(bridge) ? bridge : consoleLog;
|
|
135
|
+
}
|
|
136
|
+
// src/hooks.server.ts
|
|
137
|
+
/**
|
|
138
|
+
* Set by the bridge (`LOCAL_HEADER` in `packages/bridge/src/composition/ui.ts`) on a request that
|
|
139
|
+
* comes from the bridge's own machine, and removed from every other one. The UI can't import it:
|
|
140
|
+
* the bridge and the UI don't depend on each other.
|
|
141
|
+
*/
|
|
142
|
+
var LOCAL_HEADER = "x-sr-bridge-local";
|
|
143
|
+
var handle = ({ event, resolve }) => {
|
|
144
|
+
event.locals.local = event.request.headers.get(LOCAL_HEADER) === "1";
|
|
145
|
+
event.locals.bridge = bridgeApiFromEnv(event.fetch);
|
|
146
|
+
return resolve(event);
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* An unexpected error (`kind: 'unknown'`: not one thrown with `error()`, not SvelteKit's own such
|
|
150
|
+
* as a 404) is one line in the bridge log; the browser keeps SvelteKit's generic answer. The line
|
|
151
|
+
* names the path but never the query, which can hold speech text that must stay off the console
|
|
152
|
+
* (docs/usage/operations.md#speech-text-stays-off-the-console).
|
|
153
|
+
*/
|
|
154
|
+
var handleError = ({ kind, error, event }) => {
|
|
155
|
+
if (kind !== "unknown") return;
|
|
156
|
+
const reason = error instanceof Error ? `${error.name}: ${error.message}` : String(error);
|
|
157
|
+
serverLog().error(`${event.request.method} ${event.url.pathname}: ${reason}`);
|
|
158
|
+
};
|
|
159
|
+
export { handle, handleError };
|
|
160
|
+
|
|
161
|
+
//# sourceMappingURL=hooks.server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.server.js","names":["env"],"sources":["../../../../shared/src/api-version.ts","../../../.svelte-kit/generated/build/env/private/server.js","../../../src/lib/server/bridge-api.ts","../../../src/lib/server/bridge-from-env.ts","../../../src/lib/server/log.ts","../../../src/hooks.server.ts"],"sourcesContent":["/**\n * `<major>.<minor>` of the HTTP API. Minor versions only add things, with the exceptions in\n * docs/usage/http-api.md#versioning. Within a major version the enums of the answers never grow\n * (`openapi/freeze.test.ts`).\n */\nexport const API_VERSION = '1.31';\n\n/** Path prefix of every API route. */\nexport const API_PREFIX = '/api/v1';\n\n/**\n * Response header with {@link API_VERSION} on every answer under {@link API_PREFIX} (since 1.22),\n * so a client checks the version on each answer instead of asking `GET /status` first.\n */\nexport const API_VERSION_HEADER = 'X-SR-Speech-Api-Version';\n","import { dynamic_private_env as env } from '../config.js';\n\nexport const SR_BRIDGE_API_URL = env.SR_BRIDGE_API_URL;\n","import { error } from '@sveltejs/kit';\nimport {\n AnyErrorBodySchema,\n API_PREFIX,\n CLIENT_HEADER,\n checkDto,\n ConfigOverridesSchema,\n ConfigSchema,\n SessionListSchema,\n SpeechEntrySchema,\n SpeechListSchema,\n StartSessionResponseSchema,\n StatusSchema,\n type ConfigDto,\n type ConfigOverridesDto,\n type ConfigPatchDto,\n type DtoOf,\n type DtoSchema,\n type KeysRequestDto,\n type SessionListDto,\n type SpeechEntryDto,\n type SpeechListDto,\n type StartSessionRequestDto,\n type StartSessionResponseDto,\n type StatusDto,\n} from '@screenreader-speech-capture/shared';\nimport type { SessionScope } from '#lib/core/sessions.js';\n\ntype Fetch = typeof fetch;\n\n/** The bridge's HTTP API as the BFF uses it: the only place the UI server talks to the bridge. */\nexport interface BridgeApi {\n status(): Promise<StatusDto>;\n sessions(): Promise<SessionListDto>;\n startSession(request: StartSessionRequestDto): Promise<StartSessionResponseDto>;\n /** Ends the current session; does nothing if none is current. */\n endSession(): Promise<void>;\n /** Deletes an ended session and its speech (the bridge refuses the current one). */\n deleteSession(id: number): Promise<void>;\n /** Clears the speech of the current session or of `none` (`session`: an id or `none`); it keeps running. */\n clearSpeech(session: SessionScope): Promise<void>;\n /** The configuration in use (`active`) or the one the next start will use (`saved`). */\n config(view: 'active' | 'saved'): Promise<ConfigDto>;\n /** The settings a flag or environment variable sets: the config file can't change them. */\n configOverrides(): Promise<ConfigOverridesDto>;\n /**\n * Saves a partial config for the next start and answers with the saved config. Rejects with the\n * bridge's status and message, plus `field` (`tcp.port`) when the bridge names one.\n */\n updateConfig(patch: ConfigPatchDto): Promise<ConfigDto>;\n /** Presses keys in the foreground window of the bridge's machine. */\n pressKeys(keys: KeysRequestDto['keys']): Promise<void>;\n /** Inserts a marker; the bridge files it under the current session (or outside any). */\n addMarker(label: string): Promise<SpeechEntryDto>;\n /** One page of a scope's entries with `seq > since`, oldest first (`session`: an id or `none`). */\n speech(session: SessionScope | null, since: number, limit: number): Promise<SpeechListDto>;\n /**\n * Opens the bridge's SSE stream (`session`: an id or `none`). The body is passed on as it is,\n * so `Last-Event-ID` replays and every event name reach the browser untouched.\n */\n openSpeechStream(\n session: SessionScope | null,\n lastEventId: string | null,\n signal: AbortSignal,\n ): Promise<Response>;\n}\n\n/** Named in the bridge's logs when this UI ends or replaces another client's session. */\nconst UI_CLIENT = 'web-ui';\n\n/**\n * `baseUrl` is the bridge's origin (no path). `fetchFn` is SvelteKit's `event.fetch` in\n * routes and a fake in tests.\n */\nexport function createBridgeApi(baseUrl: string, fetchFn: Fetch): BridgeApi {\n const root = baseUrl.replace(/\\/+$/, '') + API_PREFIX;\n // SvelteKit's `event.fetch` adds `Origin: <the UI's own origin>` to every call to another origin\n // (`pnpm dev:ui`: http://localhost:5173). The bridge refuses a POST from any origin but its own\n // (docs/usage/security.md#host-and-origin), so name the bridge itself: this is a server-side\n // call, not a page of another site.\n const origin = new URL(root).origin;\n\n async function call(\n method: 'GET' | 'POST' | 'PUT' | 'DELETE',\n path: string,\n body?: unknown,\n ): Promise<unknown> {\n let response: Response;\n try {\n response = await fetchFn(`${root}${path}`, {\n method,\n headers: {\n accept: 'application/json',\n origin,\n [CLIENT_HEADER]: UI_CLIENT,\n ...(body === undefined ? {} : { 'content-type': 'application/json' }),\n },\n body: body === undefined ? undefined : JSON.stringify(body),\n });\n } catch (cause) {\n error(502, `The bridge is not reachable: ${describe(cause)}`);\n }\n const answer: unknown = await response.json().catch(() => undefined);\n if (!response.ok) {\n const apiError = checkDto(AnyErrorBodySchema, answer);\n if (!apiError.ok) error(response.status, `The bridge answered ${response.status}`);\n const { message, details } = apiError.value.error;\n const field = details?.field;\n if (typeof field === 'string') error(response.status, { message, field });\n error(response.status, message);\n }\n return answer;\n }\n\n async function read<S extends DtoSchema>(\n method: 'GET' | 'POST' | 'PUT',\n path: string,\n schema: S,\n body?: unknown,\n ): Promise<DtoOf<S>> {\n const checked = checkDto(schema, await call(method, path, body));\n if (!checked.ok) {\n error(502, `Unexpected answer from the bridge at ${checked.field}: ${checked.message}`);\n }\n return checked.value;\n }\n\n return {\n status: () => read('GET', '/status', StatusSchema),\n sessions: () => read('GET', '/sessions', SessionListSchema),\n startSession: (request) => read('POST', '/sessions', StartSessionResponseSchema, request),\n endSession: async () => {\n await call('POST', '/sessions/end');\n },\n deleteSession: async (id) => {\n await call('DELETE', `/sessions?session=${id}`);\n },\n clearSpeech: async (session) => {\n await call('DELETE', `/speech?session=${session}`);\n },\n config: (view) => read('GET', `/config?view=${view}`, ConfigSchema),\n configOverrides: () => read('GET', '/config/overrides', ConfigOverridesSchema),\n updateConfig: (patch) => read('PUT', '/config', ConfigSchema, patch),\n pressKeys: async (keys) => {\n await call('POST', '/input/keys', { keys });\n },\n addMarker: (label) => read('POST', '/markers', SpeechEntrySchema, { label }),\n speech: (session, since, limit) => {\n const query = new URLSearchParams({ since: String(since), limit: String(limit) });\n if (session !== null) query.set('session', String(session));\n return read('GET', `/speech?${query}`, SpeechListSchema);\n },\n openSpeechStream: async (session, lastEventId, signal) => {\n const query = session === null ? '' : `?session=${session}`;\n let response: Response;\n try {\n response = await fetchFn(`${root}/speech/stream${query}`, {\n headers: {\n accept: 'text/event-stream',\n origin,\n [CLIENT_HEADER]: UI_CLIENT,\n ...(lastEventId === null ? {} : { 'last-event-id': lastEventId }),\n },\n signal,\n });\n } catch (cause) {\n error(502, `The bridge is not reachable: ${describe(cause)}`);\n }\n if (!response.ok || response.body === null) {\n // Unread, the body would hold the bridge connection until it is garbage collected, and\n // `EventSource` retries every few seconds while the bridge refuses.\n await response.body?.cancel().catch(() => undefined);\n error(\n response.status === 200 ? 502 : response.status,\n 'The speech stream is not available',\n );\n }\n return response;\n },\n };\n}\n\nfunction describe(cause: unknown): string {\n return cause instanceof Error ? cause.message : String(cause);\n}\n","import { SR_BRIDGE_API_URL } from '$app/env/private';\nimport { createBridgeApi, type BridgeApi } from './bridge-api.js';\n\n/** The bridge API of this deployment, at `SR_BRIDGE_API_URL` (`src/env.ts`). */\nexport function bridgeApiFromEnv(fetchFn: typeof fetch): BridgeApi {\n return createBridgeApi(SR_BRIDGE_API_URL, fetchFn);\n}\n","/** What the BFF logs through: the bridge's `Logger` port, as far as the UI uses it. */\nexport interface ServerLog {\n error(message: string): void;\n warn(message: string): void;\n}\n\n/**\n * Where the bridge puts its `[web-ui]` logger before it loads the UI (`UI_LOGGER_KEY` in\n * `packages/bridge/src/composition/ui.ts`; the bridge and the UI don't import each other).\n */\nconst BRIDGE_LOGGER_KEY = Symbol.for('screenreader-speech-capture.ui-logger');\n\nfunction isServerLog(value: unknown): value is ServerLog {\n return (\n typeof value === 'object' &&\n value !== null &&\n typeof (value as ServerLog).error === 'function' &&\n typeof (value as ServerLog).warn === 'function'\n );\n}\n\n/** `pnpm dev:ui` has no bridge in its process: the Vite dev server's console stands in. */\nconst consoleLog: ServerLog = {\n error: (message) => console.error(`[web-ui] ${message}`),\n warn: (message) => console.warn(`[web-ui] ${message}`),\n};\n\n/**\n * The bridge log inside the bridge, the console otherwise. Read per call, so it doesn't matter\n * whether this module loads before or after the bridge sets it.\n */\nexport function serverLog(): ServerLog {\n const bridge = (globalThis as Record<symbol, unknown>)[BRIDGE_LOGGER_KEY];\n return isServerLog(bridge) ? bridge : consoleLog;\n}\n","import type { Handle, HandleServerError } from '@sveltejs/kit/hooks';\nimport { bridgeApiFromEnv } from '#lib/server/bridge-from-env.js';\nimport { serverLog } from '#lib/server/log.js';\n\n/**\n * Set by the bridge (`LOCAL_HEADER` in `packages/bridge/src/composition/ui.ts`) on a request that\n * comes from the bridge's own machine, and removed from every other one. The UI can't import it:\n * the bridge and the UI don't depend on each other.\n */\nconst LOCAL_HEADER = 'x-sr-bridge-local';\n\nexport const handle: Handle = ({ event, resolve }) => {\n event.locals.local = event.request.headers.get(LOCAL_HEADER) === '1';\n // Built once per request and with its `fetch`, so routes and loads share one way to the bridge.\n event.locals.bridge = bridgeApiFromEnv(event.fetch);\n return resolve(event);\n};\n\n/**\n * An unexpected error (`kind: 'unknown'`: not one thrown with `error()`, not SvelteKit's own such\n * as a 404) is one line in the bridge log; the browser keeps SvelteKit's generic answer. The line\n * names the path but never the query, which can hold speech text that must stay off the console\n * (docs/usage/operations.md#speech-text-stays-off-the-console).\n */\nexport const handleError: HandleServerError = ({ kind, error, event }) => {\n if (kind !== 'unknown') return;\n const reason = error instanceof Error ? `${error.name}: ${error.message}` : String(error);\n serverLog().error(`${event.request.method} ${event.url.pathname}: ${reason}`);\n};\n"],"mappings":"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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { a as head, h as escape_html } from "../../chunks/server2.js";
|
|
2
|
+
import { t as page } from "../../chunks/state.js";
|
|
3
|
+
// src/routes/+error.svelte
|
|
4
|
+
function _error($$renderer, $$props) {
|
|
5
|
+
$$renderer.component(($$renderer) => {
|
|
6
|
+
head("1j96wlh", $$renderer, ($$renderer) => {
|
|
7
|
+
$$renderer.title(($$renderer) => {
|
|
8
|
+
$$renderer.push(`<title>${escape_html(page.status)} · Speech Capture</title>`);
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
$$renderer.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export { _error as default };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=_error.svelte.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_error.svelte.js","names":["$.escape"],"sources":["../../../../src/routes/+error.svelte"],"sourcesContent":["<script lang=\"ts\">\n import { page } from '$app/state';\n</script>\n\n<!-- What SvelteKit's own error page shows, with a title: `app.html` has none to fall back on. -->\n<svelte:head>\n <title>{page.status} · Speech Capture</title>\n</svelte:head>\n\n<h1>{page.status}</h1>\n<p>{page.error?.message}</p>\n"],"mappings":";;;;CAAA,WAAA,WAAA,eAAA;;;IAMU,WAAA,KAAA,UAAAA,YAAA,KAAK,MAAM,EAAA,0BAAA;;;EAGhB,WAAA,KAAA,OAAAA,YAAA,KAAK,MAAM,EAAA,WAAAA,YACZ,KAAK,OAAO,OAAO,EAAA,KAAA;CARf,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/routes/+layout.server.ts
|
|
2
|
+
var load = async ({ locals }) => {
|
|
3
|
+
try {
|
|
4
|
+
return {
|
|
5
|
+
status: await locals.bridge.status(),
|
|
6
|
+
local: locals.local
|
|
7
|
+
};
|
|
8
|
+
} catch {
|
|
9
|
+
return {
|
|
10
|
+
status: null,
|
|
11
|
+
local: locals.local
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export { load };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=_layout.server.ts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_layout.server.ts.js","names":[],"sources":["../../../../src/routes/+layout.server.ts"],"sourcesContent":["import type { LayoutServerLoad } from './$types';\n\nexport const load: LayoutServerLoad = async ({ locals }) => {\n try {\n return { status: await locals.bridge.status(), local: locals.local };\n } catch {\n // The header stays and shows \"bridge unreachable\"; the refresh button retries.\n return { status: null, local: locals.local };\n }\n};\n"],"mappings":";AAEA,IAAa,OAAyB,OAAO,EAAE,aAAa;CAC1D,IAAI;EACF,OAAO;GAAE,QAAQ,MAAM,OAAO,OAAO,OAAO;GAAG,OAAO,OAAO;EAAM;CACrE,QAAQ;EAEN,OAAO;GAAE,QAAQ;GAAM,OAAO,OAAO;EAAM;CAC7C;AACF"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { nt as resolve } from "../../chunks/internal.js";
|
|
2
|
+
import { a as head, c as stringify, d as attr, f as clsx, h as escape_html, i as ensure_array_like, o as props_id, r as derived, t as attr_class } from "../../chunks/server2.js";
|
|
3
|
+
import "../../chunks/index-server.js";
|
|
4
|
+
import "../../chunks/paths.js";
|
|
5
|
+
import { t as page } from "../../chunks/state.js";
|
|
6
|
+
import "../../chunks/icon.js";
|
|
7
|
+
import "../../chunks/icon-button.js";
|
|
8
|
+
import { n as provideAppStores, t as appStores } from "../../chunks/composition.js";
|
|
9
|
+
import { t as isCurrent } from "../../chunks/navigation.js";
|
|
10
|
+
// src/lib/assets/favicon.svg
|
|
11
|
+
var favicon_default = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%3e%3ctitle%3eSpeech%20Capture%3c/title%3e%3crect%20width='44'%20height='44'%20rx='14'%20fill='%23415f91'/%3e%3cpath%20d='M4%2010v4M8%206v12M12%203v18M16%208v8M20%2011v2'%20transform='translate(10%2010)'%20fill='none'%20stroke='%23fff'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
12
|
+
// ../../node_modules/.pnpm/@fontsource+material-symbols-outlined@5.3.9/node_modules/@fontsource/material-symbols-outlined/files/material-symbols-outlined-latin-400-normal.woff2?url
|
|
13
|
+
var material_symbols_outlined_latin_400_normal_default = "/ui/_app/immutable/assets/material-symbols-outlined-latin-400-normal.BhEvR8fk.woff2";
|
|
14
|
+
// src/lib/components/StatusChips/StatusChips.svelte
|
|
15
|
+
function StatusChips($$renderer, $$props) {
|
|
16
|
+
$$renderer.component(($$renderer) => {
|
|
17
|
+
let { chips, announcement } = $$props;
|
|
18
|
+
if (chips.length > 0) {
|
|
19
|
+
$$renderer.push(`<!--[0--><ul aria-label="Bridge status" class="svelte-19wvxlf"><!--[-->`);
|
|
20
|
+
const each_array = ensure_array_like(chips);
|
|
21
|
+
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
|
22
|
+
let chip = each_array[$$index];
|
|
23
|
+
$$renderer.push(`<li${attr_class(clsx(chip.tone), "svelte-19wvxlf", { "down": chip.down })}><span class="face svelte-19wvxlf"${attr("title", chip.text)} aria-hidden="true"><span${attr_class(`dot ${stringify(chip.dot)}`, "svelte-19wvxlf")}></span> <span class="chip-label svelte-19wvxlf">${escape_html(chip.text)}</span></span> <span class="visually-hidden">${escape_html(chip.description)}</span></li>`);
|
|
24
|
+
}
|
|
25
|
+
$$renderer.push(`<!--]--></ul>`);
|
|
26
|
+
} else $$renderer.push("<!--[-1-->");
|
|
27
|
+
$$renderer.push(`<!--]--> <span class="visually-hidden" role="status">${escape_html(announcement)}</span>`);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
// src/lib/components/StatusRefresh/StatusRefresh.svelte
|
|
31
|
+
function StatusRefresh($$renderer, $$props) {
|
|
32
|
+
let { loading, onRetry } = $$props;
|
|
33
|
+
$$renderer.push(`<md-icon-button title="Refresh status" class="svelte-5q7qd7"><md-icon${attr_class("svelte-5q7qd7", void 0, { "spin": loading })}>refresh</md-icon></md-icon-button>`);
|
|
34
|
+
}
|
|
35
|
+
// src/lib/core/status.ts
|
|
36
|
+
/**
|
|
37
|
+
* Only what needs a look: a service that is not running (not enabled) has no chip, and the session
|
|
38
|
+
* is the sessions pane's business. An unreachable bridge is a chip of its own.
|
|
39
|
+
*/
|
|
40
|
+
function deriveChips(status, reachable) {
|
|
41
|
+
if (!reachable) return [{
|
|
42
|
+
id: "bridge",
|
|
43
|
+
text: "Bridge unreachable",
|
|
44
|
+
tone: "error",
|
|
45
|
+
dot: "filled",
|
|
46
|
+
description: "Bridge unreachable"
|
|
47
|
+
}];
|
|
48
|
+
if (status === null) return [];
|
|
49
|
+
return [serviceChip("playwright", "Playwright", status.playwright), serviceChip("mcp", "MCP", status.mcp)].filter((chip) => chip !== null);
|
|
50
|
+
}
|
|
51
|
+
function serviceChip(id, name, service) {
|
|
52
|
+
const base = `${name} ${service.version}`;
|
|
53
|
+
switch (service.state) {
|
|
54
|
+
case "running": return {
|
|
55
|
+
id,
|
|
56
|
+
text: base,
|
|
57
|
+
tone: "ok",
|
|
58
|
+
dot: "filled",
|
|
59
|
+
description: `${base}, running`
|
|
60
|
+
};
|
|
61
|
+
case "crashed":
|
|
62
|
+
case "failed": return {
|
|
63
|
+
id,
|
|
64
|
+
text: `${base} · ${service.state}`,
|
|
65
|
+
tone: "warning",
|
|
66
|
+
dot: "filled",
|
|
67
|
+
description: `${base}, ${service.state}`
|
|
68
|
+
};
|
|
69
|
+
case "starting": return {
|
|
70
|
+
id,
|
|
71
|
+
text: base,
|
|
72
|
+
tone: "neutral",
|
|
73
|
+
dot: "hollow",
|
|
74
|
+
description: `${base}, starting`,
|
|
75
|
+
down: true
|
|
76
|
+
};
|
|
77
|
+
case "stopped": return null;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The words a screen reader gets when the state changes. Empty while everything is fine, so the
|
|
82
|
+
* regular refresh never speaks.
|
|
83
|
+
*/
|
|
84
|
+
function announcement(chips, reachable) {
|
|
85
|
+
if (!reachable) return "Bridge unreachable.";
|
|
86
|
+
return chips.filter((chip) => chip.tone === "error" || chip.tone === "warning").map((chip) => `${chip.description}.`).join(" ");
|
|
87
|
+
}
|
|
88
|
+
// src/lib/components/BridgeStatus/BridgeStatus.svelte
|
|
89
|
+
function BridgeStatus($$renderer, $$props) {
|
|
90
|
+
$$renderer.component(($$renderer) => {
|
|
91
|
+
const statusStore = appStores().status;
|
|
92
|
+
const seed = derived(() => page.data.status);
|
|
93
|
+
const status = derived(() => statusStore.status ?? seed());
|
|
94
|
+
const chips = derived(() => deriveChips(status(), statusStore.reachable));
|
|
95
|
+
StatusChips($$renderer, {
|
|
96
|
+
chips: chips(),
|
|
97
|
+
announcement: announcement(chips(), statusStore.reachable)
|
|
98
|
+
});
|
|
99
|
+
$$renderer.push(`<!----> `);
|
|
100
|
+
if (!statusStore.reachable) {
|
|
101
|
+
$$renderer.push("<!--[0-->");
|
|
102
|
+
StatusRefresh($$renderer, {
|
|
103
|
+
loading: statusStore.loading,
|
|
104
|
+
onRetry: () => void statusStore.retry()
|
|
105
|
+
});
|
|
106
|
+
} else $$renderer.push("<!--[-1-->");
|
|
107
|
+
$$renderer.push(`<!--]-->`);
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
// src/lib/components/AppHeader/AppHeader.svelte
|
|
111
|
+
function AppHeader($$renderer, $$props) {
|
|
112
|
+
let { host } = $$props;
|
|
113
|
+
$$renderer.push(`<header class="svelte-4j9s4f"><div class="logo-slot svelte-4j9s4f"><div class="logo svelte-4j9s4f"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 10v4M8 6v12M12 3v18M16 8v8M20 11v2"></path></svg></div></div> <div class="title svelte-4j9s4f"><span class="name svelte-4j9s4f">Speech Capture</span> <span class="meta svelte-4j9s4f">${escape_html(host)}</span></div> `);
|
|
114
|
+
BridgeStatus($$renderer, {});
|
|
115
|
+
$$renderer.push(`<!----></header>`);
|
|
116
|
+
}
|
|
117
|
+
// src/lib/components/NavRail/NavRail.svelte
|
|
118
|
+
function NavRail($$renderer, $$props) {
|
|
119
|
+
$$renderer.component(($$renderer) => {
|
|
120
|
+
const id = props_id($$renderer);
|
|
121
|
+
let { items, currentPath } = $$props;
|
|
122
|
+
let announcement = "";
|
|
123
|
+
$$renderer.push(`<nav aria-label="Pages" class="svelte-sxtjmn"><ul class="svelte-sxtjmn"><!--[-->`);
|
|
124
|
+
const each_array = ensure_array_like(items);
|
|
125
|
+
for (let index = 0, $$length = each_array.length; index < $$length; index++) {
|
|
126
|
+
let item = each_array[index];
|
|
127
|
+
const current = isCurrent(item, currentPath);
|
|
128
|
+
const linkId = `${id}-link-${index}`;
|
|
129
|
+
const labelId = `${linkId}-label`;
|
|
130
|
+
$$renderer.push(`<li><a${attr("id", linkId)}${attr("href", item.href)}${attr("aria-labelledby", labelId)}${attr("aria-current", current ? "page" : void 0)} data-sveltekit-reset="false" class="svelte-sxtjmn"><span${attr_class("indicator svelte-sxtjmn", void 0, { "current": current })}><md-ripple${attr("for", linkId)} aria-hidden="true"></md-ripple> <md-icon aria-hidden="true">${escape_html(item.icon)}</md-icon></span> <span${attr("id", labelId)} class="label svelte-sxtjmn">${escape_html(item.label)}</span></a></li>`);
|
|
131
|
+
}
|
|
132
|
+
$$renderer.push(`<!--]--></ul></nav> <span class="visually-hidden" role="status">${escape_html(announcement)}</span>`);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
// src/routes/+layout.svelte
|
|
136
|
+
function _layout($$renderer, $$props) {
|
|
137
|
+
$$renderer.component(($$renderer) => {
|
|
138
|
+
let { children } = $$props;
|
|
139
|
+
const { theme: themeStore } = provideAppStores();
|
|
140
|
+
const navItems = [
|
|
141
|
+
{
|
|
142
|
+
href: resolve("/"),
|
|
143
|
+
label: "Monitor",
|
|
144
|
+
icon: "monitor",
|
|
145
|
+
exact: true
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
href: resolve("/settings"),
|
|
149
|
+
label: "Settings",
|
|
150
|
+
icon: "settings"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
href: resolve("/setup"),
|
|
154
|
+
label: "Setup",
|
|
155
|
+
icon: "build"
|
|
156
|
+
}
|
|
157
|
+
];
|
|
158
|
+
head("12qhfyh", $$renderer, ($$renderer) => {
|
|
159
|
+
$$renderer.push(`<link rel="icon"${attr("href", favicon_default)}/> <link rel="preload" as="font" type="font/woff2"${attr("href", material_symbols_outlined_latin_400_normal_default)} crossorigin="anonymous"/> <meta name="color-scheme" content="light dark"/>`);
|
|
160
|
+
});
|
|
161
|
+
$$renderer.push(`<div class="app svelte-12qhfyh">`);
|
|
162
|
+
AppHeader($$renderer, { host: page.url.host });
|
|
163
|
+
$$renderer.push(`<!----> <div class="body svelte-12qhfyh">`);
|
|
164
|
+
NavRail($$renderer, {
|
|
165
|
+
items: navItems,
|
|
166
|
+
currentPath: page.url.pathname
|
|
167
|
+
});
|
|
168
|
+
$$renderer.push(`<!----> <main class="svelte-12qhfyh">`);
|
|
169
|
+
children($$renderer);
|
|
170
|
+
$$renderer.push(`<!----></main></div></div>`);
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
export { _layout as default };
|
|
174
|
+
|
|
175
|
+
//# sourceMappingURL=_layout.svelte.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_layout.svelte.js","names":["$.ensure_array_like","$.attr_class","$.clsx","$.attr","$.stringify","$.escape","$.attr_class","$.derived","onMount","$.escape","$.props_id","$.ensure_array_like","$.attr","$.attr_class","$.escape","onMount","$.attr","favicon","iconFont"],"sources":["../../../../src/lib/assets/favicon.svg","../../../../../../node_modules/.pnpm/@fontsource+material-symbols-outlined@5.3.9/node_modules/@fontsource/material-symbols-outlined/files/material-symbols-outlined-latin-400-normal.woff2?url","../../../../src/lib/components/StatusChips/StatusChips.svelte","../../../../src/lib/components/StatusRefresh/StatusRefresh.svelte","../../../../src/lib/adapters/icon-font.ts","../../../../src/lib/core/status.ts","../../../../src/lib/components/BridgeStatus/BridgeStatus.svelte","../../../../src/lib/components/AppHeader/AppHeader.svelte","../../../../src/lib/components/NavRail/NavRail.svelte","../../../../src/routes/+layout.svelte"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%3e%3ctitle%3eSpeech%20Capture%3c/title%3e%3crect%20width='44'%20height='44'%20rx='14'%20fill='%23415f91'/%3e%3cpath%20d='M4%2010v4M8%206v12M12%203v18M16%208v8M20%2011v2'%20transform='translate(10%2010)'%20fill='none'%20stroke='%23fff'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e\"","export default import.meta.ROLLDOWN_FILE_URL_l8JNr3EuSZUlWjWYrZY85w","<script lang=\"ts\">\n import type { Chip } from '#lib/core/status.js';\n\n type Props = { chips: Chip[]; announcement: string };\n\n let { chips, announcement }: Props = $props();\n</script>\n\n{#if chips.length > 0}\n <ul aria-label=\"Bridge status\">\n {#each chips as chip (chip.id)}\n <li class={chip.tone} class:down={chip.down}>\n <!-- The tooltip sits on the hidden part, so it is never read next to the description. -->\n <span class=\"face\" title={chip.text} aria-hidden=\"true\">\n <span class=\"dot {chip.dot}\"></span>\n <span class=\"chip-label\">{chip.text}</span>\n </span>\n <!-- As text: screen readers can skip an `aria-label` on a list item. -->\n <span class=\"visually-hidden\">{chip.description}</span>\n </li>\n {/each}\n </ul>\n{/if}\n<!-- Only changes of a problem state speak; a refresh leaves this text as it is. -->\n<span class=\"visually-hidden\" role=\"status\">{announcement}</span>\n\n<style>\n ul {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n li {\n position: relative;\n display: inline-flex;\n height: 32px;\n border: 1px solid var(--md-sys-color-outline-variant);\n border-width: max(1px, var(--app-border-width));\n border-radius: 8px;\n background: var(--md-sys-color-surface-container-lowest, transparent);\n color: var(--md-sys-color-on-surface);\n font-family: var(--app-font-mono);\n font-size: var(--app-mono-size);\n white-space: nowrap;\n }\n\n li.ok {\n --dot: var(--app-success);\n }\n li.warning {\n --dot: var(--app-warning);\n background: var(--app-warning-container);\n color: var(--app-on-warning-container);\n border-color: var(--app-warning);\n }\n li.error {\n --dot: var(--md-sys-color-error);\n background: var(--md-sys-color-error-container);\n color: var(--md-sys-color-on-error-container);\n border-color: var(--md-sys-color-error);\n }\n li.neutral {\n --dot: var(--md-sys-color-outline);\n color: var(--md-sys-color-on-surface-variant);\n }\n\n li.down {\n --dot: var(--md-sys-color-error);\n }\n\n /* Fills the chip, so the tooltip shows wherever the pointer is on it. */\n .face {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 0 12px;\n }\n\n .dot {\n box-sizing: border-box;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--dot);\n border: 2px solid var(--dot);\n }\n .dot.hollow {\n background: transparent;\n }\n\n /* On a narrow screen only the dot stays; the hidden description still says what it is. */\n @media (width < 800px) {\n .chip-label {\n display: none;\n }\n }\n</style>\n","<script lang=\"ts\">\n import '@material/web/icon/icon.js';\n import '@material/web/iconbutton/icon-button.js';\n\n type Props = { loading: boolean; onRetry: () => void };\n\n let { loading, onRetry }: Props = $props();\n</script>\n\n<!-- svelte-ignore a11y_click_events_have_key_events, a11y_no_static_element_interactions -->\n<!-- md-icon-button wraps a real <button> in its shadow DOM, which handles keys and role. -->\n<md-icon-button title=\"Refresh status\" onclick={onRetry}>\n <md-icon class:spin={loading}>refresh</md-icon>\n</md-icon-button>\n\n<style>\n md-icon-button {\n --md-icon-button-icon-color: var(--md-sys-color-on-surface-variant);\n --md-icon-button-hover-icon-color: var(--md-sys-color-on-surface);\n --md-icon-button-focus-icon-color: var(--md-sys-color-on-surface);\n }\n\n .spin {\n animation: spin 0.8s linear infinite;\n }\n\n @keyframes spin {\n to {\n transform: rotate(360deg);\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .spin {\n animation: none;\n }\n }\n</style>\n","const ICON_FONT = '24px \"Material Symbols Outlined\"';\n\n/**\n * Loads the icon font and then sets `data-icons-ready` on `<html>`, which ends the placeholder\n * shimmer in `global.css`. If loading fails the icons show anyway rather than shimmer forever.\n */\nexport async function markIconFontReady(): Promise<void> {\n try {\n await document.fonts.load(ICON_FONT);\n } catch {\n // fall through: show the icons\n }\n document.documentElement.setAttribute('data-icons-ready', '');\n}\n","import type { ServiceStatusDto, StatusDto } from '@screenreader-speech-capture/shared';\n\n/** Where the status comes from (the HTTP adapter asks the BFF, which asks the bridge). */\nexport interface StatusApi {\n fetch(): Promise<StatusDto>;\n}\n\nexport type ChipId = 'playwright' | 'mcp' | 'bridge';\nexport type ChipTone = 'ok' | 'error' | 'warning' | 'neutral';\n\nexport type Chip = {\n id: ChipId;\n /** What the chip shows. */\n text: string;\n tone: ChipTone;\n /** A hollow dot means \"nothing there yet\"; a filled one means \"there is state\". */\n dot: 'filled' | 'hollow';\n /** Spoken name of the state, so it is never colour alone. */\n description: string;\n /** Not connected or not ready: the dot is red while the chip itself stays neutral. */\n down?: boolean;\n};\n\n/**\n * Only what needs a look: a service that is not running (not enabled) has no chip, and the session\n * is the sessions pane's business. An unreachable bridge is a chip of its own.\n */\nexport function deriveChips(status: StatusDto | null, reachable: boolean): Chip[] {\n if (!reachable) {\n return [\n {\n id: 'bridge',\n text: 'Bridge unreachable',\n tone: 'error',\n dot: 'filled',\n description: 'Bridge unreachable',\n },\n ];\n }\n if (status === null) return [];\n return [\n serviceChip('playwright', 'Playwright', status.playwright),\n serviceChip('mcp', 'MCP', status.mcp),\n ].filter((chip): chip is Chip => chip !== null);\n}\n\nfunction serviceChip(id: ChipId, name: string, service: ServiceStatusDto): Chip | null {\n const base = `${name} ${service.version}`;\n switch (service.state) {\n case 'running':\n return { id, text: base, tone: 'ok', dot: 'filled', description: `${base}, running` };\n case 'crashed':\n case 'failed':\n return {\n id,\n text: `${base} · ${service.state}`,\n tone: 'warning',\n dot: 'filled',\n description: `${base}, ${service.state}`,\n };\n case 'starting':\n return {\n id,\n text: base,\n tone: 'neutral',\n dot: 'hollow',\n description: `${base}, starting`,\n down: true,\n };\n case 'stopped':\n return null;\n }\n}\n\n/**\n * The words a screen reader gets when the state changes. Empty while everything is fine, so the\n * regular refresh never speaks.\n */\nexport function announcement(chips: Chip[], reachable: boolean): string {\n if (!reachable) return 'Bridge unreachable.';\n return chips\n .filter((chip) => chip.tone === 'error' || chip.tone === 'warning')\n .map((chip) => `${chip.description}.`)\n .join(' ');\n}\n","<script lang=\"ts\">\n import { onMount } from 'svelte';\n import { page } from '$app/state';\n import StatusChips from '#lib/components/StatusChips/StatusChips.svelte';\n import StatusRefresh from '#lib/components/StatusRefresh/StatusRefresh.svelte';\n import { appStores } from '#lib/composition.js';\n import { announcement, deriveChips } from '#lib/core/status.js';\n import type { StatusDto } from '@screenreader-speech-capture/shared';\n\n const statusStore = appStores().status;\n\n // The status the server rendered (`+layout.server.ts`); it fills in until the store has its own.\n const seed = $derived(page.data.status as StatusDto | null);\n const status = $derived(statusStore.status ?? seed);\n const chips = $derived(deriveChips(status, statusStore.reachable));\n\n onMount(() => statusStore.init(seed));\n</script>\n\n<StatusChips {chips} announcement={announcement(chips, statusStore.reachable)} />\n<!-- Status is read once, so the retry only shows when there is something to recover from. -->\n{#if !statusStore.reachable}\n <StatusRefresh loading={statusStore.loading} onRetry={() => void statusStore.retry()} />\n{/if}\n","<script lang=\"ts\">\n import '@material/web/icon/icon.js';\n import '@material/web/iconbutton/icon-button.js';\n import BridgeStatus from '#lib/components/BridgeStatus/BridgeStatus.svelte';\n\n type Props = {\n host: string;\n };\n\n let { host }: Props = $props();\n</script>\n\n<header>\n <div class=\"logo-slot\">\n <div class=\"logo\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M4 10v4M8 6v12M12 3v18M16 8v8M20 11v2\" />\n </svg>\n </div>\n </div>\n <div class=\"title\">\n <span class=\"name\">Speech Capture</span>\n <span class=\"meta\">{host}</span>\n </div>\n <BridgeStatus />\n</header>\n\n<style>\n header {\n display: flex;\n align-items: center;\n gap: 12px 16px;\n min-height: 68px;\n padding: 10px 16px 10px 0;\n background: var(--md-sys-color-surface-container);\n color: var(--md-sys-color-on-surface);\n }\n\n /* As wide as the navigation rail, so the logo sits centered over it. */\n .logo-slot {\n display: flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: var(--app-rail-width);\n }\n\n .logo {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 44px;\n height: 44px;\n border-radius: 14px;\n background: var(--md-sys-color-primary);\n color: var(--md-sys-color-on-primary);\n }\n\n .title {\n display: flex;\n flex-direction: column;\n min-width: 0;\n margin-right: auto;\n }\n\n header {\n flex-wrap: wrap;\n }\n\n .name {\n font-family: var(--md-sys-typescale-title-large-font);\n font-size: var(--md-sys-typescale-title-large-size);\n line-height: var(--md-sys-typescale-title-large-line-height);\n font-weight: var(--md-ref-typeface-weight-medium);\n }\n\n .meta {\n font-family: var(--app-font-mono);\n font-size: var(--app-mono-size);\n line-height: var(--app-mono-line-height);\n color: var(--md-sys-color-on-surface-variant);\n }\n\n md-icon-button {\n --md-icon-button-icon-color: var(--md-sys-color-on-surface-variant);\n --md-icon-button-hover-icon-color: var(--md-sys-color-on-surface);\n --md-icon-button-focus-icon-color: var(--md-sys-color-on-surface);\n --md-icon-button-pressed-icon-color: var(--md-sys-color-on-surface);\n }\n</style>\n","<script lang=\"ts\">\n import '@material/web/icon/icon.js';\n import '@material/web/ripple/ripple.js';\n import { arrowNavigation } from '#lib/components/arrow-navigation.js';\n import { isCurrent, type NavItem } from '#lib/core/navigation.js';\n\n type Props = { items: NavItem[]; currentPath: string };\n\n let { items, currentPath }: Props = $props();\n\n const id = $props.id();\n\n /** Long enough for a screen reader to notice the emptied region before the next text. */\n const ANNOUNCE_DELAY_MS = 100;\n\n let announcement = $state('');\n let timer: ReturnType<typeof setTimeout> | undefined;\n\n // What was said belongs to the page it was said on.\n $effect(() => {\n void currentPath;\n return () => {\n clearTimeout(timer);\n announcement = '';\n };\n });\n\n /**\n * The link to the page already shown: navigating would change nothing, say nothing and send the\n * focus back to the start of the page. Stay, and say that this is the current page.\n */\n function onclick(event: MouseEvent & { currentTarget: HTMLAnchorElement }, label: string) {\n // With a modifier the browser opens the link somewhere else.\n if (event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) return;\n // The whole URL: `/ui/` still leads away from `/ui/?session=7`.\n const link = event.currentTarget;\n if (link.href !== link.ownerDocument.URL) return;\n event.preventDefault();\n clearTimeout(timer);\n announcement = '';\n // Emptied first, so the same words are spoken again.\n timer = setTimeout(() => (announcement = `${label}, current page`), ANNOUNCE_DELAY_MS);\n }\n\n /** Links only react to Enter by themselves; a navigation rail's items also take Space. */\n function onkeydown(event: KeyboardEvent & { currentTarget: HTMLAnchorElement }) {\n if (event.key !== ' ') return;\n if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return;\n event.preventDefault(); // no scrolling\n if (!event.repeat) event.currentTarget.click();\n }\n</script>\n\n<nav aria-label=\"Pages\">\n <ul {@attach arrowNavigation('a')}>\n {#each items as item, index (item.href)}\n {@const current = isCurrent(item, currentPath)}\n {@const linkId = `${id}-link-${index}`}\n {@const labelId = `${linkId}-label`}\n <li>\n <!-- Named by the label alone: from the content, Chromium also reads the icon's\n ligature text (\"settings Settings\"), despite its aria-hidden. -->\n <!-- No reset: SvelteKit would move the focus to the body after changing pages. Its\n announcer still says the new page's title. -->\n <!-- The layout passes hrefs it built with resolve(). -->\n <!-- eslint-disable svelte/no-navigation-without-resolve -->\n <a\n id={linkId}\n href={item.href}\n aria-labelledby={labelId}\n aria-current={current ? 'page' : undefined}\n data-sveltekit-reset=\"false\"\n onclick={(event) => onclick(event, item.label)}\n {onkeydown}\n >\n <!-- eslint-enable svelte/no-navigation-without-resolve -->\n <span class=\"indicator\" class:current>\n <!-- Hover and press on the whole link show in the indicator. -->\n <md-ripple for={linkId} aria-hidden=\"true\"></md-ripple>\n <md-icon aria-hidden=\"true\">{item.icon}</md-icon>\n </span>\n <span id={labelId} class=\"label\">{item.label}</span>\n </a>\n </li>\n {/each}\n </ul>\n</nav>\n<!-- Outside the navigation, so reading through it doesn't run into this. -->\n<span class=\"visually-hidden\" role=\"status\">{announcement}</span>\n\n<style>\n nav {\n flex: none;\n width: var(--app-rail-width);\n /* With the links' own 4px, the first icon sits one gutter below the top. */\n padding: calc(var(--app-gutter) - 4px) 0;\n /* Large text in a low window. */\n overflow-y: auto;\n background: var(--md-sys-color-surface);\n }\n\n ul {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n a {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n min-height: 48px;\n /* Room for the focus ring around the icon and the label. */\n padding: 4px 0;\n color: var(--md-sys-color-on-surface-variant);\n text-decoration: none;\n }\n\n /* Inside the link: the rail is at the window's edge and clips what sticks out. */\n a:focus-visible {\n outline-offset: calc(-1 * var(--md-sys-state-focus-indicator-thickness));\n }\n\n .indicator {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 32px;\n border: var(--app-border-width) solid transparent;\n box-sizing: border-box;\n border-radius: 16px;\n --md-ripple-hover-color: currentColor;\n --md-ripple-pressed-color: currentColor;\n }\n\n .indicator.current {\n border-color: var(--md-sys-color-outline);\n background: var(--md-sys-color-secondary-container);\n color: var(--md-sys-color-on-secondary-container);\n }\n\n a[aria-current='page'] {\n color: var(--md-sys-color-on-surface);\n }\n\n /* The whole label stays visible at large text sizes: it wraps and the item grows. */\n .label {\n max-width: 100%;\n text-align: center;\n hyphens: auto;\n overflow-wrap: anywhere;\n font-family: var(--md-sys-typescale-label-medium-font);\n font-size: var(--md-sys-typescale-label-medium-size);\n line-height: var(--md-sys-typescale-label-medium-line-height);\n font-weight: var(--md-ref-typeface-weight-medium);\n }\n</style>\n","<script lang=\"ts\">\n import { onMount } from 'svelte';\n import { resolve } from '$app/paths';\n import { page } from '$app/state';\n import favicon from '#lib/assets/favicon.svg';\n import iconFont from '@fontsource/material-symbols-outlined/files/material-symbols-outlined-latin-400-normal.woff2?url';\n import AppHeader from '#lib/components/AppHeader/AppHeader.svelte';\n import NavRail from '#lib/components/NavRail/NavRail.svelte';\n import { markIconFontReady, provideAppStores } from '#lib/composition.js';\n import type { NavItem } from '#lib/core/navigation.js';\n import '#lib/styles/fonts.css';\n import '#lib/styles/tokens.css';\n import '#lib/styles/global.css';\n import type { LayoutProps } from './$types';\n\n let { children }: LayoutProps = $props();\n\n // One set of stores per app: per request on the server, once in the browser.\n const { theme: themeStore } = provideAppStores();\n\n const navItems: NavItem[] = [\n { href: resolve('/'), label: 'Monitor', icon: 'monitor', exact: true },\n { href: resolve('/settings'), label: 'Settings', icon: 'settings' },\n { href: resolve('/setup'), label: 'Setup', icon: 'build' },\n ];\n\n onMount(() => {\n themeStore.init();\n void markIconFontReady();\n });\n</script>\n\n<svelte:head>\n <link rel=\"icon\" href={favicon} />\n <link rel=\"preload\" as=\"font\" type=\"font/woff2\" href={iconFont} crossorigin=\"anonymous\" />\n <meta name=\"color-scheme\" content=\"light dark\" />\n</svelte:head>\n\n<div class=\"app\">\n <AppHeader host={page.url.host} />\n\n <div class=\"body\">\n <NavRail items={navItems} currentPath={page.url.pathname} />\n <main>\n {@render children()}\n </main>\n </div>\n</div>\n\n<style>\n /* The window height is fixed, so a page can fill what is left below the header (which grows\n when its chips wrap). */\n .app {\n display: flex;\n flex-direction: column;\n height: 100dvh;\n }\n\n .body {\n display: flex;\n flex: 1;\n align-items: stretch;\n min-height: 0;\n }\n\n main {\n flex: 1;\n min-width: 0;\n min-height: 0;\n padding: 0 16px;\n overflow: auto;\n }\n</style>\n"],"ignoreList":[1],"mappings":"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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { t as getSessions } from "../../chunks/sessions.remote.js";
|
|
2
|
+
// src/routes/+page.server.ts
|
|
3
|
+
var load = async () => {
|
|
4
|
+
try {
|
|
5
|
+
return {
|
|
6
|
+
sessions: await getSessions(),
|
|
7
|
+
now: Date.now()
|
|
8
|
+
};
|
|
9
|
+
} catch {
|
|
10
|
+
return {
|
|
11
|
+
sessions: null,
|
|
12
|
+
now: Date.now()
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export { load };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=_page.server.ts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_page.server.ts.js","names":[],"sources":["../../../../src/routes/+page.server.ts"],"sourcesContent":["import { getSessions } from '#lib/remote/sessions.remote.js';\nimport type { PageServerLoad } from './$types';\n\nexport const load: PageServerLoad = async () => {\n try {\n // Awaited here, the query's answer goes into the page for the browser's `getSessions()` too.\n // `now` is the end of a live session's duration: the server and the first client render agree.\n return { sessions: await getSessions(), now: Date.now() };\n } catch {\n // The pane starts empty and fills in once the store reaches the bridge.\n return { sessions: null, now: Date.now() };\n }\n};\n"],"mappings":";;AAGA,IAAa,OAAuB,YAAY;CAC9C,IAAI;EAGF,OAAO;GAAE,UAAU,MAAM,YAAY;GAAG,KAAK,KAAK,IAAI;EAAE;CAC1D,QAAQ;EAEN,OAAO;GAAE,UAAU;GAAM,KAAK,KAAK,IAAI;EAAE;CAC3C;AACF"}
|