@screenreader-speech-capture/bridge 0.0.0-stage → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,1217 @@
|
|
|
1
|
+
var DEFAULT_CONFIG = {
|
|
2
|
+
lang: void 0,
|
|
3
|
+
message: void 0,
|
|
4
|
+
abortEarly: void 0,
|
|
5
|
+
abortPipeEarly: void 0
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Returns the global configuration.
|
|
9
|
+
*
|
|
10
|
+
* @param config The config to merge.
|
|
11
|
+
*
|
|
12
|
+
* @returns The configuration.
|
|
13
|
+
*/
|
|
14
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
15
|
+
function getGlobalConfig(config$1) {
|
|
16
|
+
if (!config$1 && true) return DEFAULT_CONFIG;
|
|
17
|
+
return {
|
|
18
|
+
lang: config$1?.lang ?? void 0,
|
|
19
|
+
message: config$1?.message,
|
|
20
|
+
abortEarly: config$1?.abortEarly ?? void 0,
|
|
21
|
+
abortPipeEarly: config$1?.abortPipeEarly ?? void 0
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Stringifies an unknown input to a literal or type string.
|
|
26
|
+
*
|
|
27
|
+
* @param input The unknown input.
|
|
28
|
+
*
|
|
29
|
+
* @returns A literal or type string.
|
|
30
|
+
*
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
34
|
+
function _stringify(input) {
|
|
35
|
+
const type = typeof input;
|
|
36
|
+
if (type === "string") return `"${input}"`;
|
|
37
|
+
if (type === "number" || type === "bigint" || type === "boolean") return `${input}`;
|
|
38
|
+
if (type === "object" || type === "function") return (input && Object.getPrototypeOf(input)?.constructor?.name) ?? "null";
|
|
39
|
+
return type;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Adds an issue to the dataset.
|
|
43
|
+
*
|
|
44
|
+
* @param context The issue context.
|
|
45
|
+
* @param label The issue label.
|
|
46
|
+
* @param dataset The input dataset.
|
|
47
|
+
* @param config The configuration.
|
|
48
|
+
* @param other The optional props.
|
|
49
|
+
*
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
function _addIssue(context, label, dataset, config$1, other) {
|
|
53
|
+
const input = other && "input" in other ? other.input : dataset.value;
|
|
54
|
+
const expected = other?.expected ?? context.expects ?? null;
|
|
55
|
+
const received = other?.received ?? /* @__PURE__ */ _stringify(input);
|
|
56
|
+
const issue = {
|
|
57
|
+
kind: context.kind,
|
|
58
|
+
type: context.type,
|
|
59
|
+
input,
|
|
60
|
+
expected,
|
|
61
|
+
received,
|
|
62
|
+
message: `Invalid ${label}: ${expected ? `Expected ${expected} but r` : "R"}eceived ${received}`,
|
|
63
|
+
requirement: context.requirement,
|
|
64
|
+
path: other?.path,
|
|
65
|
+
issues: other?.issues,
|
|
66
|
+
lang: config$1.lang,
|
|
67
|
+
abortEarly: config$1.abortEarly,
|
|
68
|
+
abortPipeEarly: config$1.abortPipeEarly
|
|
69
|
+
};
|
|
70
|
+
const isSchema = context.kind === "schema";
|
|
71
|
+
const message$1 = other?.message ?? context.message ?? (context.reference, issue.lang, void 0) ?? (isSchema ? (issue.lang, void 0) : null) ?? config$1.message ?? (issue.lang, void 0);
|
|
72
|
+
if (message$1 !== void 0) issue.message = typeof message$1 === "function" ? message$1(issue) : message$1;
|
|
73
|
+
if (isSchema) dataset.typed = false;
|
|
74
|
+
if (dataset.issues) dataset.issues.push(issue);
|
|
75
|
+
else dataset.issues = [issue];
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Disallows inherited object properties and prevents object prototype
|
|
79
|
+
* pollution by disallowing certain keys.
|
|
80
|
+
*
|
|
81
|
+
* @param object The object to check.
|
|
82
|
+
* @param key The key to check.
|
|
83
|
+
*
|
|
84
|
+
* @returns Whether the key is allowed.
|
|
85
|
+
*
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
89
|
+
function _isValidObjectKey(object$1, key) {
|
|
90
|
+
return Object.prototype.hasOwnProperty.call(object$1, key) && key !== "__proto__" && key !== "prototype" && key !== "constructor";
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Joins multiple `expects` values with the given separator.
|
|
94
|
+
*
|
|
95
|
+
* @param values The `expects` values.
|
|
96
|
+
* @param separator The separator.
|
|
97
|
+
*
|
|
98
|
+
* @returns The joined `expects` property.
|
|
99
|
+
*
|
|
100
|
+
* @internal
|
|
101
|
+
*/
|
|
102
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
103
|
+
function _joinExpects(values$1, separator) {
|
|
104
|
+
const list = [...new Set(values$1)];
|
|
105
|
+
if (list.length > 1) return `(${list.join(` ${separator} `)})`;
|
|
106
|
+
return list[0] ?? "never";
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Eagerly creates and attaches the Standard Schema properties of a schema.
|
|
110
|
+
*
|
|
111
|
+
* Hint: The contextual `this` type includes the standard properties that are
|
|
112
|
+
* attached before the schema is returned.
|
|
113
|
+
*
|
|
114
|
+
* @param schema The schema to attach standard properties to.
|
|
115
|
+
*
|
|
116
|
+
* @returns The schema with standard properties attached.
|
|
117
|
+
*
|
|
118
|
+
* @internal
|
|
119
|
+
*/
|
|
120
|
+
function _standardSchema(schema) {
|
|
121
|
+
schema["~standard"] = {
|
|
122
|
+
version: 1,
|
|
123
|
+
vendor: "valibot",
|
|
124
|
+
validate: (value$1) => schema["~run"]({ value: value$1 }, /* @__PURE__ */ getGlobalConfig())
|
|
125
|
+
};
|
|
126
|
+
return schema;
|
|
127
|
+
}
|
|
128
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
129
|
+
function getDotPath(issue) {
|
|
130
|
+
if (issue.path) {
|
|
131
|
+
let key = "";
|
|
132
|
+
for (const item of issue.path) if (typeof item.key === "string" || typeof item.key === "number") if (key) key += `.${item.key}`;
|
|
133
|
+
else key += item.key;
|
|
134
|
+
else return null;
|
|
135
|
+
return key;
|
|
136
|
+
}
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp regex. Allows a
|
|
141
|
+
* space as a date/time separator and an optional space before the UTC offset.
|
|
142
|
+
*/
|
|
143
|
+
var ISO_TIMESTAMP_REGEX = /^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])[T ](?:0\d|1\d|2[0-3])(?::[0-5]\d){2}(?:\.\d{1,9})?(?:Z| ?[+-](?:0\d|1\d|2[0-3])(?::?[0-5]\d)?)$/u;
|
|
144
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
145
|
+
function check(requirement, message$1) {
|
|
146
|
+
return {
|
|
147
|
+
kind: "validation",
|
|
148
|
+
type: "check",
|
|
149
|
+
reference: check,
|
|
150
|
+
async: false,
|
|
151
|
+
expects: null,
|
|
152
|
+
requirement,
|
|
153
|
+
message: message$1,
|
|
154
|
+
"~run"(dataset, config$1) {
|
|
155
|
+
if (dataset.typed && !this.requirement(dataset.value)) _addIssue(this, "input", dataset, config$1);
|
|
156
|
+
return dataset;
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Creates a description metadata action.
|
|
162
|
+
*
|
|
163
|
+
* @param description_ The description text.
|
|
164
|
+
*
|
|
165
|
+
* @returns A description action.
|
|
166
|
+
*/
|
|
167
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
168
|
+
function description(description_) {
|
|
169
|
+
return {
|
|
170
|
+
kind: "metadata",
|
|
171
|
+
type: "description",
|
|
172
|
+
reference: description,
|
|
173
|
+
description: description_
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Creates an examples metadata action.
|
|
178
|
+
*
|
|
179
|
+
* @param examples_ The examples.
|
|
180
|
+
*
|
|
181
|
+
* @returns An examples action.
|
|
182
|
+
*
|
|
183
|
+
* @beta
|
|
184
|
+
*/
|
|
185
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
186
|
+
function examples(examples_) {
|
|
187
|
+
return {
|
|
188
|
+
kind: "metadata",
|
|
189
|
+
type: "examples",
|
|
190
|
+
reference: examples,
|
|
191
|
+
examples: examples_
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
195
|
+
function integer$3(message$1) {
|
|
196
|
+
return {
|
|
197
|
+
kind: "validation",
|
|
198
|
+
type: "integer",
|
|
199
|
+
reference: integer$3,
|
|
200
|
+
async: false,
|
|
201
|
+
expects: null,
|
|
202
|
+
requirement: Number.isInteger,
|
|
203
|
+
message: message$1,
|
|
204
|
+
"~run"(dataset, config$1) {
|
|
205
|
+
if (dataset.typed && !this.requirement(dataset.value)) _addIssue(this, "integer", dataset, config$1);
|
|
206
|
+
return dataset;
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
211
|
+
function isoTimestamp(message$1) {
|
|
212
|
+
return {
|
|
213
|
+
kind: "validation",
|
|
214
|
+
type: "iso_timestamp",
|
|
215
|
+
reference: isoTimestamp,
|
|
216
|
+
async: false,
|
|
217
|
+
expects: null,
|
|
218
|
+
requirement: ISO_TIMESTAMP_REGEX,
|
|
219
|
+
message: message$1,
|
|
220
|
+
"~run"(dataset, config$1) {
|
|
221
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "timestamp", dataset, config$1);
|
|
222
|
+
return dataset;
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
227
|
+
function maxLength(requirement, message$1) {
|
|
228
|
+
return {
|
|
229
|
+
kind: "validation",
|
|
230
|
+
type: "max_length",
|
|
231
|
+
reference: maxLength,
|
|
232
|
+
async: false,
|
|
233
|
+
expects: `<=${requirement}`,
|
|
234
|
+
requirement,
|
|
235
|
+
message: message$1,
|
|
236
|
+
"~run"(dataset, config$1) {
|
|
237
|
+
if (dataset.typed && dataset.value.length > this.requirement) _addIssue(this, "length", dataset, config$1, { received: `${dataset.value.length}` });
|
|
238
|
+
return dataset;
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
243
|
+
function maxValue(requirement, message$1) {
|
|
244
|
+
return {
|
|
245
|
+
kind: "validation",
|
|
246
|
+
type: "max_value",
|
|
247
|
+
reference: maxValue,
|
|
248
|
+
async: false,
|
|
249
|
+
expects: `<=${requirement instanceof Date ? requirement.toJSON() : /* @__PURE__ */ _stringify(requirement)}`,
|
|
250
|
+
requirement,
|
|
251
|
+
message: message$1,
|
|
252
|
+
"~run"(dataset, config$1) {
|
|
253
|
+
if (dataset.typed && !(dataset.value <= this.requirement)) _addIssue(this, "value", dataset, config$1, { received: dataset.value instanceof Date ? dataset.value.toJSON() : /* @__PURE__ */ _stringify(dataset.value) });
|
|
254
|
+
return dataset;
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
259
|
+
function minLength(requirement, message$1) {
|
|
260
|
+
return {
|
|
261
|
+
kind: "validation",
|
|
262
|
+
type: "min_length",
|
|
263
|
+
reference: minLength,
|
|
264
|
+
async: false,
|
|
265
|
+
expects: `>=${requirement}`,
|
|
266
|
+
requirement,
|
|
267
|
+
message: message$1,
|
|
268
|
+
"~run"(dataset, config$1) {
|
|
269
|
+
if (dataset.typed && dataset.value.length < this.requirement) _addIssue(this, "length", dataset, config$1, { received: `${dataset.value.length}` });
|
|
270
|
+
return dataset;
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
275
|
+
function minValue(requirement, message$1) {
|
|
276
|
+
return {
|
|
277
|
+
kind: "validation",
|
|
278
|
+
type: "min_value",
|
|
279
|
+
reference: minValue,
|
|
280
|
+
async: false,
|
|
281
|
+
expects: `>=${requirement instanceof Date ? requirement.toJSON() : /* @__PURE__ */ _stringify(requirement)}`,
|
|
282
|
+
requirement,
|
|
283
|
+
message: message$1,
|
|
284
|
+
"~run"(dataset, config$1) {
|
|
285
|
+
if (dataset.typed && !(dataset.value >= this.requirement)) _addIssue(this, "value", dataset, config$1, { received: dataset.value instanceof Date ? dataset.value.toJSON() : /* @__PURE__ */ _stringify(dataset.value) });
|
|
286
|
+
return dataset;
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
291
|
+
function nonEmpty(message$1) {
|
|
292
|
+
return {
|
|
293
|
+
kind: "validation",
|
|
294
|
+
type: "non_empty",
|
|
295
|
+
reference: nonEmpty,
|
|
296
|
+
async: false,
|
|
297
|
+
expects: "!0",
|
|
298
|
+
message: message$1,
|
|
299
|
+
"~run"(dataset, config$1) {
|
|
300
|
+
if (dataset.typed && dataset.value.length === 0) _addIssue(this, "length", dataset, config$1, { received: "0" });
|
|
301
|
+
return dataset;
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
306
|
+
function regex(requirement, message$1) {
|
|
307
|
+
return {
|
|
308
|
+
kind: "validation",
|
|
309
|
+
type: "regex",
|
|
310
|
+
reference: regex,
|
|
311
|
+
async: false,
|
|
312
|
+
expects: `${requirement}`,
|
|
313
|
+
requirement,
|
|
314
|
+
message: message$1,
|
|
315
|
+
"~run"(dataset, config$1) {
|
|
316
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "format", dataset, config$1);
|
|
317
|
+
return dataset;
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Returns the fallback value of the schema.
|
|
323
|
+
*
|
|
324
|
+
* @param schema The schema to get it from.
|
|
325
|
+
* @param dataset The output dataset if available.
|
|
326
|
+
* @param config The config if available.
|
|
327
|
+
*
|
|
328
|
+
* @returns The fallback value.
|
|
329
|
+
*/
|
|
330
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
331
|
+
function getFallback(schema, dataset, config$1) {
|
|
332
|
+
return typeof schema.fallback === "function" ? schema.fallback(dataset, config$1) : schema.fallback;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Returns the default value of the schema.
|
|
336
|
+
*
|
|
337
|
+
* @param schema The schema to get it from.
|
|
338
|
+
* @param dataset The input dataset if available.
|
|
339
|
+
* @param config The config if available.
|
|
340
|
+
*
|
|
341
|
+
* @returns The default value.
|
|
342
|
+
*/
|
|
343
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
344
|
+
function getDefault(schema, dataset, config$1) {
|
|
345
|
+
return typeof schema.default === "function" ? schema.default(dataset, config$1) : schema.default;
|
|
346
|
+
}
|
|
347
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
348
|
+
function array(item, message$1) {
|
|
349
|
+
return _standardSchema({
|
|
350
|
+
kind: "schema",
|
|
351
|
+
type: "array",
|
|
352
|
+
reference: array,
|
|
353
|
+
expects: "Array",
|
|
354
|
+
async: false,
|
|
355
|
+
item,
|
|
356
|
+
message: message$1,
|
|
357
|
+
"~run"(dataset, config$1) {
|
|
358
|
+
const input = dataset.value;
|
|
359
|
+
if (Array.isArray(input)) {
|
|
360
|
+
dataset.typed = true;
|
|
361
|
+
dataset.value = [];
|
|
362
|
+
for (let key = 0; key < input.length; key++) {
|
|
363
|
+
const value$1 = input[key];
|
|
364
|
+
const itemDataset = this.item["~run"]({ value: value$1 }, config$1);
|
|
365
|
+
if (itemDataset.issues) {
|
|
366
|
+
const pathItem = {
|
|
367
|
+
type: "array",
|
|
368
|
+
origin: "value",
|
|
369
|
+
input,
|
|
370
|
+
key,
|
|
371
|
+
value: value$1
|
|
372
|
+
};
|
|
373
|
+
for (const issue of itemDataset.issues) {
|
|
374
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
375
|
+
else issue.path = [pathItem];
|
|
376
|
+
dataset.issues?.push(issue);
|
|
377
|
+
}
|
|
378
|
+
if (!dataset.issues) dataset.issues = itemDataset.issues;
|
|
379
|
+
if (config$1.abortEarly) {
|
|
380
|
+
dataset.typed = false;
|
|
381
|
+
break;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
if (!itemDataset.typed) dataset.typed = false;
|
|
385
|
+
dataset.value.push(itemDataset.value);
|
|
386
|
+
}
|
|
387
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
388
|
+
return dataset;
|
|
389
|
+
}
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
393
|
+
function boolean(message$1) {
|
|
394
|
+
return _standardSchema({
|
|
395
|
+
kind: "schema",
|
|
396
|
+
type: "boolean",
|
|
397
|
+
reference: boolean,
|
|
398
|
+
expects: "boolean",
|
|
399
|
+
async: false,
|
|
400
|
+
message: message$1,
|
|
401
|
+
"~run"(dataset, config$1) {
|
|
402
|
+
if (typeof dataset.value === "boolean") dataset.typed = true;
|
|
403
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
404
|
+
return dataset;
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
409
|
+
function nullable(wrapped, default_) {
|
|
410
|
+
return _standardSchema({
|
|
411
|
+
kind: "schema",
|
|
412
|
+
type: "nullable",
|
|
413
|
+
reference: nullable,
|
|
414
|
+
expects: `(${wrapped.expects} | null)`,
|
|
415
|
+
async: false,
|
|
416
|
+
wrapped,
|
|
417
|
+
default: default_,
|
|
418
|
+
"~run"(dataset, config$1) {
|
|
419
|
+
if (dataset.value === null) {
|
|
420
|
+
if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
|
|
421
|
+
if (dataset.value === null) {
|
|
422
|
+
dataset.typed = true;
|
|
423
|
+
return dataset;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
return this.wrapped["~run"](dataset, config$1);
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
431
|
+
function number(message$1) {
|
|
432
|
+
return _standardSchema({
|
|
433
|
+
kind: "schema",
|
|
434
|
+
type: "number",
|
|
435
|
+
reference: number,
|
|
436
|
+
expects: "number",
|
|
437
|
+
async: false,
|
|
438
|
+
message: message$1,
|
|
439
|
+
"~run"(dataset, config$1) {
|
|
440
|
+
if (typeof dataset.value === "number" && !isNaN(dataset.value)) dataset.typed = true;
|
|
441
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
442
|
+
return dataset;
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
447
|
+
function object(entries$1, message$1) {
|
|
448
|
+
return _standardSchema({
|
|
449
|
+
kind: "schema",
|
|
450
|
+
type: "object",
|
|
451
|
+
reference: object,
|
|
452
|
+
expects: "Object",
|
|
453
|
+
async: false,
|
|
454
|
+
entries: entries$1,
|
|
455
|
+
message: message$1,
|
|
456
|
+
"~run"(dataset, config$1) {
|
|
457
|
+
const input = dataset.value;
|
|
458
|
+
if (input && typeof input === "object") {
|
|
459
|
+
dataset.typed = true;
|
|
460
|
+
dataset.value = {};
|
|
461
|
+
for (const key in this.entries) {
|
|
462
|
+
const valueSchema = this.entries[key];
|
|
463
|
+
if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
|
|
464
|
+
const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
|
|
465
|
+
const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
|
|
466
|
+
if (valueDataset.issues) {
|
|
467
|
+
const pathItem = {
|
|
468
|
+
type: "object",
|
|
469
|
+
origin: "value",
|
|
470
|
+
input,
|
|
471
|
+
key,
|
|
472
|
+
value: value$1
|
|
473
|
+
};
|
|
474
|
+
for (const issue of valueDataset.issues) {
|
|
475
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
476
|
+
else issue.path = [pathItem];
|
|
477
|
+
dataset.issues?.push(issue);
|
|
478
|
+
}
|
|
479
|
+
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
480
|
+
if (config$1.abortEarly) {
|
|
481
|
+
dataset.typed = false;
|
|
482
|
+
break;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
if (!valueDataset.typed) dataset.typed = false;
|
|
486
|
+
dataset.value[key] = valueDataset.value;
|
|
487
|
+
} else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
|
|
488
|
+
else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
|
|
489
|
+
_addIssue(this, "key", dataset, config$1, {
|
|
490
|
+
input: void 0,
|
|
491
|
+
expected: `"${key}"`,
|
|
492
|
+
path: [{
|
|
493
|
+
type: "object",
|
|
494
|
+
origin: "key",
|
|
495
|
+
input,
|
|
496
|
+
key,
|
|
497
|
+
value: input[key]
|
|
498
|
+
}]
|
|
499
|
+
});
|
|
500
|
+
if (config$1.abortEarly) break;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
504
|
+
return dataset;
|
|
505
|
+
}
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
509
|
+
function optional(wrapped, default_) {
|
|
510
|
+
return _standardSchema({
|
|
511
|
+
kind: "schema",
|
|
512
|
+
type: "optional",
|
|
513
|
+
reference: optional,
|
|
514
|
+
expects: `(${wrapped.expects} | undefined)`,
|
|
515
|
+
async: false,
|
|
516
|
+
wrapped,
|
|
517
|
+
default: default_,
|
|
518
|
+
"~run"(dataset, config$1) {
|
|
519
|
+
if (dataset.value === void 0) {
|
|
520
|
+
if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
|
|
521
|
+
if (dataset.value === void 0) {
|
|
522
|
+
dataset.typed = true;
|
|
523
|
+
return dataset;
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
return this.wrapped["~run"](dataset, config$1);
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
531
|
+
function picklist(options, message$1) {
|
|
532
|
+
return _standardSchema({
|
|
533
|
+
kind: "schema",
|
|
534
|
+
type: "picklist",
|
|
535
|
+
reference: picklist,
|
|
536
|
+
expects: /* @__PURE__ */ _joinExpects(options.map(_stringify), "|"),
|
|
537
|
+
async: false,
|
|
538
|
+
options,
|
|
539
|
+
message: message$1,
|
|
540
|
+
"~run"(dataset, config$1) {
|
|
541
|
+
if (this.options.includes(dataset.value)) dataset.typed = true;
|
|
542
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
543
|
+
return dataset;
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
548
|
+
function record(key, value$1, message$1) {
|
|
549
|
+
return _standardSchema({
|
|
550
|
+
kind: "schema",
|
|
551
|
+
type: "record",
|
|
552
|
+
reference: record,
|
|
553
|
+
expects: "Object",
|
|
554
|
+
async: false,
|
|
555
|
+
key,
|
|
556
|
+
value: value$1,
|
|
557
|
+
message: message$1,
|
|
558
|
+
"~run"(dataset, config$1) {
|
|
559
|
+
const input = dataset.value;
|
|
560
|
+
if (input && typeof input === "object") {
|
|
561
|
+
dataset.typed = true;
|
|
562
|
+
dataset.value = {};
|
|
563
|
+
for (const entryKey in input) if (/* @__PURE__ */ _isValidObjectKey(input, entryKey)) {
|
|
564
|
+
const entryValue = input[entryKey];
|
|
565
|
+
const keyDataset = this.key["~run"]({ value: entryKey }, config$1);
|
|
566
|
+
if (keyDataset.issues) {
|
|
567
|
+
const pathItem = {
|
|
568
|
+
type: "object",
|
|
569
|
+
origin: "key",
|
|
570
|
+
input,
|
|
571
|
+
key: entryKey,
|
|
572
|
+
value: entryValue
|
|
573
|
+
};
|
|
574
|
+
for (const issue of keyDataset.issues) {
|
|
575
|
+
issue.path = [pathItem];
|
|
576
|
+
dataset.issues?.push(issue);
|
|
577
|
+
}
|
|
578
|
+
if (!dataset.issues) dataset.issues = keyDataset.issues;
|
|
579
|
+
if (config$1.abortEarly) {
|
|
580
|
+
dataset.typed = false;
|
|
581
|
+
break;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
const valueDataset = this.value["~run"]({ value: entryValue }, config$1);
|
|
585
|
+
if (valueDataset.issues) {
|
|
586
|
+
const pathItem = {
|
|
587
|
+
type: "object",
|
|
588
|
+
origin: "value",
|
|
589
|
+
input,
|
|
590
|
+
key: entryKey,
|
|
591
|
+
value: entryValue
|
|
592
|
+
};
|
|
593
|
+
for (const issue of valueDataset.issues) {
|
|
594
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
595
|
+
else issue.path = [pathItem];
|
|
596
|
+
dataset.issues?.push(issue);
|
|
597
|
+
}
|
|
598
|
+
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
599
|
+
if (config$1.abortEarly) {
|
|
600
|
+
dataset.typed = false;
|
|
601
|
+
break;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
if (!keyDataset.typed || !valueDataset.typed) dataset.typed = false;
|
|
605
|
+
if (keyDataset.typed) dataset.value[keyDataset.value] = valueDataset.value;
|
|
606
|
+
}
|
|
607
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
608
|
+
return dataset;
|
|
609
|
+
}
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
613
|
+
function strictObject(entries$1, message$1) {
|
|
614
|
+
return _standardSchema({
|
|
615
|
+
kind: "schema",
|
|
616
|
+
type: "strict_object",
|
|
617
|
+
reference: strictObject,
|
|
618
|
+
expects: "Object",
|
|
619
|
+
async: false,
|
|
620
|
+
entries: entries$1,
|
|
621
|
+
message: message$1,
|
|
622
|
+
"~run"(dataset, config$1) {
|
|
623
|
+
const input = dataset.value;
|
|
624
|
+
if (input && typeof input === "object") {
|
|
625
|
+
dataset.typed = true;
|
|
626
|
+
dataset.value = {};
|
|
627
|
+
for (const key in this.entries) {
|
|
628
|
+
const valueSchema = this.entries[key];
|
|
629
|
+
if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
|
|
630
|
+
const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
|
|
631
|
+
const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
|
|
632
|
+
if (valueDataset.issues) {
|
|
633
|
+
const pathItem = {
|
|
634
|
+
type: "object",
|
|
635
|
+
origin: "value",
|
|
636
|
+
input,
|
|
637
|
+
key,
|
|
638
|
+
value: value$1
|
|
639
|
+
};
|
|
640
|
+
for (const issue of valueDataset.issues) {
|
|
641
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
642
|
+
else issue.path = [pathItem];
|
|
643
|
+
dataset.issues?.push(issue);
|
|
644
|
+
}
|
|
645
|
+
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
646
|
+
if (config$1.abortEarly) {
|
|
647
|
+
dataset.typed = false;
|
|
648
|
+
break;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
if (!valueDataset.typed) dataset.typed = false;
|
|
652
|
+
dataset.value[key] = valueDataset.value;
|
|
653
|
+
} else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
|
|
654
|
+
else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
|
|
655
|
+
_addIssue(this, "key", dataset, config$1, {
|
|
656
|
+
input: void 0,
|
|
657
|
+
expected: `"${key}"`,
|
|
658
|
+
path: [{
|
|
659
|
+
type: "object",
|
|
660
|
+
origin: "key",
|
|
661
|
+
input,
|
|
662
|
+
key,
|
|
663
|
+
value: input[key]
|
|
664
|
+
}]
|
|
665
|
+
});
|
|
666
|
+
if (config$1.abortEarly) break;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
if (!dataset.issues || !config$1.abortEarly) {
|
|
670
|
+
for (const key in input) if (!Object.prototype.hasOwnProperty.call(this.entries, key)) {
|
|
671
|
+
_addIssue(this, "key", dataset, config$1, {
|
|
672
|
+
input: key,
|
|
673
|
+
expected: "never",
|
|
674
|
+
path: [{
|
|
675
|
+
type: "object",
|
|
676
|
+
origin: "key",
|
|
677
|
+
input,
|
|
678
|
+
key,
|
|
679
|
+
value: input[key]
|
|
680
|
+
}]
|
|
681
|
+
});
|
|
682
|
+
break;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
686
|
+
return dataset;
|
|
687
|
+
}
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
691
|
+
function string(message$1) {
|
|
692
|
+
return _standardSchema({
|
|
693
|
+
kind: "schema",
|
|
694
|
+
type: "string",
|
|
695
|
+
reference: string,
|
|
696
|
+
expects: "string",
|
|
697
|
+
async: false,
|
|
698
|
+
message: message$1,
|
|
699
|
+
"~run"(dataset, config$1) {
|
|
700
|
+
if (typeof dataset.value === "string") dataset.typed = true;
|
|
701
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
702
|
+
return dataset;
|
|
703
|
+
}
|
|
704
|
+
});
|
|
705
|
+
}
|
|
706
|
+
/**
|
|
707
|
+
* Returns the sub issues of the provided datasets for the union issue.
|
|
708
|
+
*
|
|
709
|
+
* @param datasets The datasets.
|
|
710
|
+
*
|
|
711
|
+
* @returns The sub issues.
|
|
712
|
+
*
|
|
713
|
+
* @internal
|
|
714
|
+
*/
|
|
715
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
716
|
+
function _subIssues(datasets) {
|
|
717
|
+
let issues;
|
|
718
|
+
if (datasets) for (const dataset of datasets) if (issues) for (const issue of dataset.issues) issues.push(issue);
|
|
719
|
+
else issues = dataset.issues;
|
|
720
|
+
return issues;
|
|
721
|
+
}
|
|
722
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
723
|
+
function union(options, message$1) {
|
|
724
|
+
return _standardSchema({
|
|
725
|
+
kind: "schema",
|
|
726
|
+
type: "union",
|
|
727
|
+
reference: union,
|
|
728
|
+
expects: /* @__PURE__ */ _joinExpects(options.map((option) => option.expects), "|"),
|
|
729
|
+
async: false,
|
|
730
|
+
options,
|
|
731
|
+
message: message$1,
|
|
732
|
+
"~run"(dataset, config$1) {
|
|
733
|
+
let validDataset;
|
|
734
|
+
let typedDatasets;
|
|
735
|
+
let untypedDatasets;
|
|
736
|
+
for (const schema of this.options) {
|
|
737
|
+
const optionDataset = schema["~run"]({ value: dataset.value }, config$1);
|
|
738
|
+
if (optionDataset.typed) if (optionDataset.issues) if (typedDatasets) typedDatasets.push(optionDataset);
|
|
739
|
+
else typedDatasets = [optionDataset];
|
|
740
|
+
else {
|
|
741
|
+
validDataset = optionDataset;
|
|
742
|
+
break;
|
|
743
|
+
}
|
|
744
|
+
else if (untypedDatasets) untypedDatasets.push(optionDataset);
|
|
745
|
+
else untypedDatasets = [optionDataset];
|
|
746
|
+
}
|
|
747
|
+
if (validDataset) return validDataset;
|
|
748
|
+
if (typedDatasets) {
|
|
749
|
+
if (typedDatasets.length === 1) return typedDatasets[0];
|
|
750
|
+
_addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(typedDatasets) });
|
|
751
|
+
dataset.typed = true;
|
|
752
|
+
} else if (untypedDatasets?.length === 1) return untypedDatasets[0];
|
|
753
|
+
else _addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(untypedDatasets) });
|
|
754
|
+
return dataset;
|
|
755
|
+
}
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
/**
|
|
759
|
+
* Creates a unknown schema.
|
|
760
|
+
*
|
|
761
|
+
* @returns A unknown schema.
|
|
762
|
+
*/
|
|
763
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
764
|
+
function unknown() {
|
|
765
|
+
return _standardSchema({
|
|
766
|
+
kind: "schema",
|
|
767
|
+
type: "unknown",
|
|
768
|
+
reference: unknown,
|
|
769
|
+
expects: "unknown",
|
|
770
|
+
async: false,
|
|
771
|
+
"~run"(dataset) {
|
|
772
|
+
dataset.typed = true;
|
|
773
|
+
return dataset;
|
|
774
|
+
}
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
778
|
+
function pipe(...pipe$1) {
|
|
779
|
+
return _standardSchema({
|
|
780
|
+
...pipe$1[0],
|
|
781
|
+
pipe: pipe$1,
|
|
782
|
+
"~run"(dataset, config$1) {
|
|
783
|
+
for (const item of pipe$1) if (item.kind !== "metadata") {
|
|
784
|
+
if (dataset.issues && (item.kind === "schema" || item.kind === "transformation")) {
|
|
785
|
+
dataset.typed = false;
|
|
786
|
+
break;
|
|
787
|
+
}
|
|
788
|
+
if (!dataset.issues || !config$1.abortEarly && !config$1.abortPipeEarly) dataset = item["~run"](dataset, config$1);
|
|
789
|
+
}
|
|
790
|
+
return dataset;
|
|
791
|
+
}
|
|
792
|
+
});
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* Parses an unknown input based on a schema.
|
|
796
|
+
*
|
|
797
|
+
* @param schema The schema to be used.
|
|
798
|
+
* @param input The input to be parsed.
|
|
799
|
+
* @param config The parse configuration.
|
|
800
|
+
*
|
|
801
|
+
* @returns The parse result.
|
|
802
|
+
*/
|
|
803
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
804
|
+
function safeParse(schema, input, config$1) {
|
|
805
|
+
const dataset = schema["~run"]({ value: input }, /* @__PURE__ */ getGlobalConfig(config$1));
|
|
806
|
+
return {
|
|
807
|
+
typed: dataset.typed,
|
|
808
|
+
success: !dataset.issues,
|
|
809
|
+
output: dataset.value,
|
|
810
|
+
issues: dataset.issues
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
// ../shared/src/limits.ts
|
|
814
|
+
/** Ranges of the speech endpoints. */
|
|
815
|
+
var API_LIMITS = {
|
|
816
|
+
/** `GET /speech?limit=`: the default and the most a caller may ask for. */
|
|
817
|
+
list: {
|
|
818
|
+
default: 1e3,
|
|
819
|
+
max: 1e4
|
|
820
|
+
},
|
|
821
|
+
wait: {
|
|
822
|
+
/** `GET /speech/wait?timeoutMs=`. */
|
|
823
|
+
timeoutMs: {
|
|
824
|
+
default: 5e3,
|
|
825
|
+
max: 3e5
|
|
826
|
+
},
|
|
827
|
+
/** Entries the timeout answer holds at most: the last ones seen. */
|
|
828
|
+
seen: 1e3,
|
|
829
|
+
/** Longest `regex`. */
|
|
830
|
+
regexLength: 500
|
|
831
|
+
},
|
|
832
|
+
/** Longest marker label (trimmed). */
|
|
833
|
+
markerLength: 1e3,
|
|
834
|
+
/** Longest session `name`, `run` or client name (trimmed). */
|
|
835
|
+
sessionLabelLength: 1e3,
|
|
836
|
+
/** `POST /input/click` and `POST /input/keys`. */
|
|
837
|
+
input: {
|
|
838
|
+
/** Largest absolute screen coordinate (physical pixels). */
|
|
839
|
+
coordinate: 1e5,
|
|
840
|
+
/** Pause between the chords of a sequence. */
|
|
841
|
+
delayMs: {
|
|
842
|
+
default: 50,
|
|
843
|
+
max: 1e4
|
|
844
|
+
},
|
|
845
|
+
/** Most chords in one request. */
|
|
846
|
+
maxKeys: 100,
|
|
847
|
+
/** Longest `title` of `POST /input/focus`. */
|
|
848
|
+
focusTitleLength: 200
|
|
849
|
+
},
|
|
850
|
+
/**
|
|
851
|
+
* `capture` of `POST /input/click` and `POST /input/keys` (and the client's `record()`, which
|
|
852
|
+
* uses the same defaults): the defaults and ranges in milliseconds.
|
|
853
|
+
*/
|
|
854
|
+
capture: {
|
|
855
|
+
/** Silence that ends the capture. */
|
|
856
|
+
quietForMs: {
|
|
857
|
+
default: 500,
|
|
858
|
+
min: 1,
|
|
859
|
+
max: 6e4
|
|
860
|
+
},
|
|
861
|
+
/** How long the first speech may take after the input. */
|
|
862
|
+
firstWithinMs: {
|
|
863
|
+
default: 2e3,
|
|
864
|
+
max: 3e5
|
|
865
|
+
},
|
|
866
|
+
/** Longest capture, counted from the input. */
|
|
867
|
+
timeoutMs: {
|
|
868
|
+
default: 1e4,
|
|
869
|
+
max: 3e5
|
|
870
|
+
},
|
|
871
|
+
/** Silence to wait for before the input (0: none). */
|
|
872
|
+
settleMs: {
|
|
873
|
+
default: 0,
|
|
874
|
+
max: 6e4
|
|
875
|
+
},
|
|
876
|
+
/** Entries the answer holds at most: the first ones. */
|
|
877
|
+
entries: 1e4
|
|
878
|
+
}
|
|
879
|
+
};
|
|
880
|
+
/** Ranges of the settings (`GET` / `PUT /config`). */
|
|
881
|
+
var CONFIG_LIMITS = {
|
|
882
|
+
port: {
|
|
883
|
+
min: 0,
|
|
884
|
+
max: 65535
|
|
885
|
+
},
|
|
886
|
+
maxLineBytes: {
|
|
887
|
+
min: 1024,
|
|
888
|
+
max: 16777216
|
|
889
|
+
},
|
|
890
|
+
maxEntries: {
|
|
891
|
+
min: 1,
|
|
892
|
+
max: 1e6
|
|
893
|
+
}
|
|
894
|
+
};
|
|
895
|
+
/**
|
|
896
|
+
* An exact npm version (`1.56.1`, `1.57.0-beta-1`): `playwright.version` ends up on an
|
|
897
|
+
* `npm install` command line, so nothing else may get through.
|
|
898
|
+
*/
|
|
899
|
+
var EXACT_VERSION_PATTERN = /^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/;
|
|
900
|
+
/** A host name without port or scheme, or `*` (`http.allowedHosts`). */
|
|
901
|
+
var HOST_NAME_PATTERN = /^(\*|[A-Za-z0-9]([A-Za-z0-9.-]*[A-Za-z0-9])?)$/;
|
|
902
|
+
/** Whether `text` is a usable label: not empty after trimming, at most `max` characters trimmed. */
|
|
903
|
+
var isTrimmedLabel = (text, max) => {
|
|
904
|
+
const trimmed = text.trim();
|
|
905
|
+
return trimmed !== "" && trimmed.length <= max;
|
|
906
|
+
};
|
|
907
|
+
// ../shared/src/config.ts
|
|
908
|
+
/** A `TextDecoder` label other than UTF-16 (the framing splits the bytes on 0x0A first). */
|
|
909
|
+
function isSupportedEncoding(label) {
|
|
910
|
+
try {
|
|
911
|
+
return !new TextDecoder(label).encoding.startsWith("utf-16");
|
|
912
|
+
} catch {
|
|
913
|
+
return false;
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
var LOG_LEVELS = [
|
|
917
|
+
"error",
|
|
918
|
+
"warn",
|
|
919
|
+
"info",
|
|
920
|
+
"debug"
|
|
921
|
+
];
|
|
922
|
+
var range = ({ min, max }) => /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$3(), /* @__PURE__ */ minValue(min), /* @__PURE__ */ maxValue(max));
|
|
923
|
+
var port = range(CONFIG_LIMITS.port);
|
|
924
|
+
/** Port of a child service: `0` ("any free port") would leave the bridge no port to proxy to. */
|
|
925
|
+
var childPort = range({
|
|
926
|
+
min: 1,
|
|
927
|
+
max: CONFIG_LIMITS.port.max
|
|
928
|
+
});
|
|
929
|
+
var nonBlank = /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ regex(/\S/), /* @__PURE__ */ description("Not empty or blank."));
|
|
930
|
+
var AllowedHostsSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ array(/* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ regex(HOST_NAME_PATTERN))), /* @__PURE__ */ description("Host names the API answers to besides IP addresses, `localhost` and the machine's name. Without port or scheme. `[\"*\"]` accepts any name. Added in API 1.5."));
|
|
931
|
+
var ServiceConfigSchema = /* @__PURE__ */ object({
|
|
932
|
+
enabled: /* @__PURE__ */ boolean(),
|
|
933
|
+
port: childPort,
|
|
934
|
+
version: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ regex(EXACT_VERSION_PATTERN))), /* @__PURE__ */ description("`null` = bundled version. Otherwise an exact version like `1.65.1`."))
|
|
935
|
+
});
|
|
936
|
+
var McpConfigSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
|
|
937
|
+
enabled: /* @__PURE__ */ boolean(),
|
|
938
|
+
port: childPort
|
|
939
|
+
}), /* @__PURE__ */ description("No `version`: the bridge runs its bundled `@playwright/mcp`."));
|
|
940
|
+
var sections = {
|
|
941
|
+
tcp: {
|
|
942
|
+
host: nonBlank,
|
|
943
|
+
port,
|
|
944
|
+
encoding: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ check(isSupportedEncoding), /* @__PURE__ */ description("TextDecoder label of the socket voice's code page. Not `utf-16*`: lines are split on bytes.")),
|
|
945
|
+
maxLineBytes: range(CONFIG_LIMITS.maxLineBytes)
|
|
946
|
+
},
|
|
947
|
+
http: {
|
|
948
|
+
host: nonBlank,
|
|
949
|
+
port,
|
|
950
|
+
allowedHosts: AllowedHostsSchema
|
|
951
|
+
},
|
|
952
|
+
buffer: { maxEntries: range(CONFIG_LIMITS.maxEntries) },
|
|
953
|
+
log: {
|
|
954
|
+
level: /* @__PURE__ */ picklist(LOG_LEVELS),
|
|
955
|
+
file: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(nonBlank), /* @__PURE__ */ description("Bridge log file, `null` = default path.")),
|
|
956
|
+
consoleSpeech: /* @__PURE__ */ pipe(/* @__PURE__ */ boolean(), /* @__PURE__ */ description("Also write the speech text to the console."))
|
|
957
|
+
}
|
|
958
|
+
};
|
|
959
|
+
var ConfigSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
|
|
960
|
+
tcp: /* @__PURE__ */ object(sections.tcp),
|
|
961
|
+
http: /* @__PURE__ */ object(sections.http),
|
|
962
|
+
playwright: ServiceConfigSchema,
|
|
963
|
+
mcp: McpConfigSchema,
|
|
964
|
+
buffer: /* @__PURE__ */ object(sections.buffer),
|
|
965
|
+
log: /* @__PURE__ */ object(sections.log)
|
|
966
|
+
}), /* @__PURE__ */ description("The bridge configuration (docs/usage/configuration.md)."));
|
|
967
|
+
var ConfigOverridesSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({ overrides: /* @__PURE__ */ pipe(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string()), /* @__PURE__ */ description("Settings a flag or environment variable sets at startup, by their dotted path (`tcp.port`), with what sets each (`--tcp-port` or `SR_SPEECH_TCP_PORT`). They win over the config file on every start, so a saved value of them has no effect.")) }), /* @__PURE__ */ description("The settings the config file cannot change (`GET /config/overrides`)."));
|
|
968
|
+
/** A section with every setting optional and no others allowed. */
|
|
969
|
+
var patchOf = (entries) => /* @__PURE__ */ strictObject(Object.fromEntries(Object.entries(entries).map(([key, schema]) => [key, /* @__PURE__ */ optional(schema)])));
|
|
970
|
+
var ServiceConfigPatchSchema = patchOf(ServiceConfigSchema.entries);
|
|
971
|
+
var McpConfigPatchSchema = patchOf({
|
|
972
|
+
enabled: /* @__PURE__ */ boolean(),
|
|
973
|
+
port: childPort
|
|
974
|
+
});
|
|
975
|
+
var ConfigPatchSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ strictObject({
|
|
976
|
+
tcp: /* @__PURE__ */ optional(patchOf(sections.tcp)),
|
|
977
|
+
http: /* @__PURE__ */ optional(patchOf(sections.http)),
|
|
978
|
+
playwright: /* @__PURE__ */ optional(ServiceConfigPatchSchema),
|
|
979
|
+
mcp: /* @__PURE__ */ optional(McpConfigPatchSchema),
|
|
980
|
+
buffer: /* @__PURE__ */ optional(patchOf(sections.buffer)),
|
|
981
|
+
log: /* @__PURE__ */ optional(patchOf(sections.log))
|
|
982
|
+
}), /* @__PURE__ */ description("Any subset of `Config` (`PUT /config`). Settings left out keep their value; unknown ones are rejected. Ranges as in `Config`."));
|
|
983
|
+
// ../shared/src/speech.ts
|
|
984
|
+
var integer$2 = (min) => /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$3(), /* @__PURE__ */ minValue(min));
|
|
985
|
+
var timestamp$2 = /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoTimestamp());
|
|
986
|
+
var SpeechEntrySchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
|
|
987
|
+
seq: /* @__PURE__ */ pipe(integer$2(1), /* @__PURE__ */ description("Increasing sequence number. Survives clear and keeps rising across restarts: the first entry of a bridge run gets the run's start time in milliseconds.")),
|
|
988
|
+
kind: /* @__PURE__ */ picklist(["speech", "marker"]),
|
|
989
|
+
text: /* @__PURE__ */ string(),
|
|
990
|
+
receivedAt: /* @__PURE__ */ pipe(timestamp$2, /* @__PURE__ */ description("When the bridge received the line (UTC).")),
|
|
991
|
+
source: /* @__PURE__ */ pipe(/* @__PURE__ */ picklist(["tcp", "api"]), /* @__PURE__ */ description("`tcp` for speech, `api` for markers.")),
|
|
992
|
+
voice: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ string()), /* @__PURE__ */ description("Header (`voice=<id>`) of the sending voice, `null` if not set or for markers.")),
|
|
993
|
+
connectionId: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(integer$2(1)), /* @__PURE__ */ description("TCP connection that delivered it, `null` for markers.")),
|
|
994
|
+
sessionId: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ nullable(integer$2(1))), /* @__PURE__ */ description("The session that was current, `null` outside any session. Added in API 1.3."))
|
|
995
|
+
}), /* @__PURE__ */ description("One recorded speech line or a marker."), /* @__PURE__ */ examples([{
|
|
996
|
+
seq: 42,
|
|
997
|
+
kind: "speech",
|
|
998
|
+
text: "Submit, button",
|
|
999
|
+
receivedAt: "2026-11-07T14:03:12.345Z",
|
|
1000
|
+
source: "tcp",
|
|
1001
|
+
voice: "ssc5000",
|
|
1002
|
+
connectionId: 3,
|
|
1003
|
+
sessionId: 7
|
|
1004
|
+
}]));
|
|
1005
|
+
var SpeechListSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
|
|
1006
|
+
entries: /* @__PURE__ */ array(SpeechEntrySchema),
|
|
1007
|
+
truncated: /* @__PURE__ */ pipe(/* @__PURE__ */ boolean(), /* @__PURE__ */ description("`true` when entries after `since` are missing: dropped because the buffer was full, or `since` is from another bridge run (since API 1.29).")),
|
|
1008
|
+
hasMore: /* @__PURE__ */ pipe(/* @__PURE__ */ boolean(), /* @__PURE__ */ description("`true` when more entries follow: ask again with the last entry's `seq` as `since`."))
|
|
1009
|
+
}), /* @__PURE__ */ description("`GET /speech`: a page of entries after `since`, oldest first."));
|
|
1010
|
+
API_LIMITS.wait.seen, `${API_LIMITS.wait.seen}`;
|
|
1011
|
+
var MarkerRequestSchema = /* @__PURE__ */ strictObject({ label: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ check((label) => isTrimmedLabel(label, API_LIMITS.markerLength)), /* @__PURE__ */ description(`Marker text. Trimmed, must not be empty, at most ${API_LIMITS.markerLength} characters.`), /* @__PURE__ */ examples(["step 3"])) });
|
|
1012
|
+
// ../shared/src/input.ts
|
|
1013
|
+
var { coordinate, delayMs, maxKeys } = API_LIMITS.input;
|
|
1014
|
+
var CAPTURE = API_LIMITS.capture;
|
|
1015
|
+
var ms = (min, max, description$1) => /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$3(), /* @__PURE__ */ minValue(min), /* @__PURE__ */ maxValue(max))), /* @__PURE__ */ description(description$1));
|
|
1016
|
+
var capture = /* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ strictObject({
|
|
1017
|
+
quietForMs: ms(CAPTURE.quietForMs.min, CAPTURE.quietForMs.max, `The capture ends when nothing was spoken for this long, ${CAPTURE.quietForMs.default} if omitted.`),
|
|
1018
|
+
firstWithinMs: ms(0, CAPTURE.firstWithinMs.max, `How long the first speech may take after the input; none in that time is \`no-speech\`. ${CAPTURE.firstWithinMs.default} if omitted.`),
|
|
1019
|
+
timeoutMs: ms(0, CAPTURE.timeoutMs.max, `Longest capture, counted from the input; speech that goes on until then is \`timeout\`. ${CAPTURE.timeoutMs.default} if omitted.`),
|
|
1020
|
+
settleMs: ms(0, CAPTURE.settleMs.max, "Before the input, wait until nothing was spoken for this long (at most `timeoutMs`), so speech still trailing from an earlier step is not captured. The input is sent after `timeoutMs` even if the speech did not pause. 0 (no wait) if omitted.")
|
|
1021
|
+
}), /* @__PURE__ */ description("Records the speech the input causes and answers with it (`InputCapture` instead of `InputResult`). Times are in milliseconds and measured on the bridge, from when it received the speech. Added in API 1.19.")));
|
|
1022
|
+
CAPTURE.entries, `${CAPTURE.entries}`;
|
|
1023
|
+
-coordinate, -coordinate;
|
|
1024
|
+
var KeysRequestSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ strictObject({
|
|
1025
|
+
keys: /* @__PURE__ */ pipe(/* @__PURE__ */ union([/* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ nonEmpty()), /* @__PURE__ */ pipe(/* @__PURE__ */ array(/* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ nonEmpty())), /* @__PURE__ */ minLength(1), /* @__PURE__ */ maxLength(maxKeys))]), /* @__PURE__ */ description(`One chord (\`Insert+T\`) or a sequence of chords (\`["h", "h", "Insert+Down"]\`). Chords join modifiers (\`Control\`, \`Shift\`, \`Alt\`, \`Win\`, \`Insert\`, \`CapsLock\`) and one key with \`+\`. Names are case-insensitive (docs/usage/native-input.md#key-names); the numpad keys (\`numpad7\`, \`numpadEnter\`, …) since API 1.30. At most ${maxKeys} chords.`), /* @__PURE__ */ examples(["Insert+T"])),
|
|
1026
|
+
delayMs: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$3(), /* @__PURE__ */ minValue(0), /* @__PURE__ */ maxValue(delayMs.max))), /* @__PURE__ */ description(`Pause between the chords of a sequence in milliseconds, ${delayMs.default} if omitted.`)),
|
|
1027
|
+
capture
|
|
1028
|
+
}), /* @__PURE__ */ description("`POST /input/keys`: send key presses to the focused window. Added in API 1.14."));
|
|
1029
|
+
API_LIMITS.input.focusTitleLength;
|
|
1030
|
+
// ../shared/src/key-chord.ts
|
|
1031
|
+
/**
|
|
1032
|
+
* The key names of `POST /input/keys` (docs/usage/native-input.md#key-names). The bridge parses
|
|
1033
|
+
* chords with this rule, and the CLI checks them before sending and lists the names in `--help`,
|
|
1034
|
+
* so both use this one copy. Like `text-match.ts`, it belongs to the contract, not to either side.
|
|
1035
|
+
*/
|
|
1036
|
+
/** Keys that can be held down while another key is pressed. `Insert` and `CapsLock` are the screen reader keys. */
|
|
1037
|
+
var MODIFIER_KEYS = [
|
|
1038
|
+
"control",
|
|
1039
|
+
"shift",
|
|
1040
|
+
"alt",
|
|
1041
|
+
"win",
|
|
1042
|
+
"insert",
|
|
1043
|
+
"capslock"
|
|
1044
|
+
];
|
|
1045
|
+
/**
|
|
1046
|
+
* The keys of the numeric keypad (API 1.30), which NVDA's desktop layout and JAWS use for
|
|
1047
|
+
* reading commands. With NumLock off they are those commands, with NumLock on they type.
|
|
1048
|
+
*/
|
|
1049
|
+
var NUMPAD_KEYS = [
|
|
1050
|
+
...Array.from({ length: 10 }, (_, digit) => `numpad${digit}`),
|
|
1051
|
+
"numpadplus",
|
|
1052
|
+
"numpadminus",
|
|
1053
|
+
"numpadmultiply",
|
|
1054
|
+
"numpaddivide",
|
|
1055
|
+
"numpaddecimal",
|
|
1056
|
+
"numpadenter"
|
|
1057
|
+
];
|
|
1058
|
+
/** Keys with a name, besides `a`–`z` and `0`–`9`. */
|
|
1059
|
+
var NAMED_KEYS = [
|
|
1060
|
+
"enter",
|
|
1061
|
+
"tab",
|
|
1062
|
+
"escape",
|
|
1063
|
+
"space",
|
|
1064
|
+
"backspace",
|
|
1065
|
+
"delete",
|
|
1066
|
+
"up",
|
|
1067
|
+
"down",
|
|
1068
|
+
"left",
|
|
1069
|
+
"right",
|
|
1070
|
+
"home",
|
|
1071
|
+
"end",
|
|
1072
|
+
"pageup",
|
|
1073
|
+
"pagedown",
|
|
1074
|
+
...Array.from({ length: 12 }, (_, index) => `f${index + 1}`),
|
|
1075
|
+
...NUMPAD_KEYS
|
|
1076
|
+
];
|
|
1077
|
+
[...MODIFIER_KEYS, ...NAMED_KEYS];
|
|
1078
|
+
new Set(MODIFIER_KEYS);
|
|
1079
|
+
// ../shared/src/session.ts
|
|
1080
|
+
var integer$1 = (min) => /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$3(), /* @__PURE__ */ minValue(min));
|
|
1081
|
+
var timestamp$1 = /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoTimestamp());
|
|
1082
|
+
var label = (text) => /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ check((text) => isTrimmedLabel(text, API_LIMITS.sessionLabelLength)), /* @__PURE__ */ description(`${text} Trimmed, must not be empty, at most ${API_LIMITS.sessionLabelLength} characters.`));
|
|
1083
|
+
var sessionEntries = {
|
|
1084
|
+
id: /* @__PURE__ */ pipe(integer$1(1), /* @__PURE__ */ description("Increasing, also across restarts (since API 1.29): the first session of a bridge run gets the run's start time in milliseconds, so an id is never given out twice.")),
|
|
1085
|
+
name: /* @__PURE__ */ string(),
|
|
1086
|
+
run: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ string()), /* @__PURE__ */ description("Optional label that groups sessions.")),
|
|
1087
|
+
client: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ string()), /* @__PURE__ */ description("Who started it: the `X-SR-Speech-Client` header, `null` if it wasn't sent. Added in API 1.10.")),
|
|
1088
|
+
startedAt: timestamp$1,
|
|
1089
|
+
endedAt: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(timestamp$1), /* @__PURE__ */ description("`null` while the session is current.")),
|
|
1090
|
+
startSeq: /* @__PURE__ */ pipe(integer$1(0), /* @__PURE__ */ description("The last `seq` given out before the session started: `since=startSeq` reads the session from its start. Added in API 1.9.")),
|
|
1091
|
+
firstSeq: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(integer$1(1)), /* @__PURE__ */ description("First entry still in the buffer, `null` if none.")),
|
|
1092
|
+
lastSeq: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(integer$1(1)), /* @__PURE__ */ description("Last entry still in the buffer, `null` if none.")),
|
|
1093
|
+
entries: /* @__PURE__ */ pipe(integer$1(0), /* @__PURE__ */ description("Entries of this session still in the buffer."))
|
|
1094
|
+
};
|
|
1095
|
+
var SessionSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object(sessionEntries), /* @__PURE__ */ description("A session (docs/usage/speech-capture.md#sessions). Added in API 1.3."), /* @__PURE__ */ examples([{
|
|
1096
|
+
id: 7,
|
|
1097
|
+
name: "form › submit button is announced",
|
|
1098
|
+
run: "nightly-42",
|
|
1099
|
+
client: "ci-runner pid 4242",
|
|
1100
|
+
startedAt: "2026-11-12T09:31:04.120Z",
|
|
1101
|
+
endedAt: null,
|
|
1102
|
+
startSeq: 339,
|
|
1103
|
+
firstSeq: 340,
|
|
1104
|
+
lastSeq: 342,
|
|
1105
|
+
entries: 3
|
|
1106
|
+
}]));
|
|
1107
|
+
var StartSessionRequestSchema = /* @__PURE__ */ strictObject({
|
|
1108
|
+
name: /* @__PURE__ */ pipe(label("For example the test title."), /* @__PURE__ */ examples(["checkout test"])),
|
|
1109
|
+
run: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ nullable(label("Optional label that groups sessions, for example one per test run."))), /* @__PURE__ */ examples(["nightly-42"]))
|
|
1110
|
+
});
|
|
1111
|
+
var StartSessionResponseSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
|
|
1112
|
+
...sessionEntries,
|
|
1113
|
+
replaced: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(SessionSchema), /* @__PURE__ */ description("The session this start ended if another client had started it, `null` otherwise. Added in API 1.10."))
|
|
1114
|
+
}), /* @__PURE__ */ description("`POST /sessions`: the new session, plus `replaced`."));
|
|
1115
|
+
/**
|
|
1116
|
+
* Request header naming the client (for example `host pid 1234`), so the bridge can tell when
|
|
1117
|
+
* one client ends or replaces another one's session. Optional. API 1.10.
|
|
1118
|
+
*/
|
|
1119
|
+
var CLIENT_HEADER = "x-sr-speech-client";
|
|
1120
|
+
var SessionListSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
|
|
1121
|
+
sessions: /* @__PURE__ */ array(SessionSchema),
|
|
1122
|
+
currentId: /* @__PURE__ */ nullable(integer$1(1)),
|
|
1123
|
+
outsideEntries: /* @__PURE__ */ pipe(integer$1(0), /* @__PURE__ */ description("Entries in the buffer that were recorded outside any session (`session=none`). Added in API 1.15."))
|
|
1124
|
+
}), /* @__PURE__ */ description("`GET /sessions`: the current session and the ended ones with entries in the buffer, newest first, and how many entries lie outside any session."));
|
|
1125
|
+
// ../shared/src/status.ts
|
|
1126
|
+
var integer = (min) => /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$3(), /* @__PURE__ */ minValue(min));
|
|
1127
|
+
var timestamp = /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoTimestamp());
|
|
1128
|
+
var BRIDGE_STATES = [
|
|
1129
|
+
"starting",
|
|
1130
|
+
"ready",
|
|
1131
|
+
"stopping"
|
|
1132
|
+
];
|
|
1133
|
+
var ServiceStatusSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
|
|
1134
|
+
state: /* @__PURE__ */ pipe(/* @__PURE__ */ picklist([
|
|
1135
|
+
"stopped",
|
|
1136
|
+
"starting",
|
|
1137
|
+
"running",
|
|
1138
|
+
"crashed",
|
|
1139
|
+
"failed"
|
|
1140
|
+
]), /* @__PURE__ */ description("`starting` includes the install. `crashed`: it exited and restarts after a delay. `failed`: 5 crashes in a row; restart the bridge (or change the service's settings).")),
|
|
1141
|
+
version: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ description("The version that runs (configured or bundled)."), /* @__PURE__ */ examples(["1.65.1"])),
|
|
1142
|
+
port: integer(0),
|
|
1143
|
+
restarts: /* @__PURE__ */ pipe(integer(0), /* @__PURE__ */ description("Restarts after crashes since the service was last started (bridge start or config change).")),
|
|
1144
|
+
exitCode: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$3())), /* @__PURE__ */ description("Exit code of the last unexpected exit. `null` if none, or killed by a signal."))
|
|
1145
|
+
}), /* @__PURE__ */ description("A child service (docs/usage/operations.md#child-service-crashes)."));
|
|
1146
|
+
var ConnectionSchema = /* @__PURE__ */ object({
|
|
1147
|
+
id: integer(1),
|
|
1148
|
+
voice: /* @__PURE__ */ nullable(/* @__PURE__ */ string()),
|
|
1149
|
+
connectedAt: timestamp
|
|
1150
|
+
});
|
|
1151
|
+
var InputAvailabilitySchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
|
|
1152
|
+
available: /* @__PURE__ */ boolean(),
|
|
1153
|
+
backend: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ string()), /* @__PURE__ */ description("The library that does it. `null` when not available."), /* @__PURE__ */ examples(["robotjs"])),
|
|
1154
|
+
reason: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ string()), /* @__PURE__ */ description("Why it is not available (also the `INPUT_DISABLED` message). `null` when it is."), /* @__PURE__ */ examples(["only on Windows"]))
|
|
1155
|
+
}), /* @__PURE__ */ description("Whether a native input feature works on this machine. Fixed at the bridge start."));
|
|
1156
|
+
var StatusSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
|
|
1157
|
+
bridge: /* @__PURE__ */ object({
|
|
1158
|
+
version: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ description("Package version of the bridge."), /* @__PURE__ */ examples(["0.3.0"])),
|
|
1159
|
+
apiVersion: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ description("`<major>.<minor>` of this API."), /* @__PURE__ */ examples(["1.13"])),
|
|
1160
|
+
state: /* @__PURE__ */ picklist(BRIDGE_STATES),
|
|
1161
|
+
startedAt: /* @__PURE__ */ pipe(timestamp, /* @__PURE__ */ description("When this bridge run started. Added in API 1.4."))
|
|
1162
|
+
}),
|
|
1163
|
+
tcp: /* @__PURE__ */ object({
|
|
1164
|
+
listening: /* @__PURE__ */ boolean(),
|
|
1165
|
+
host: /* @__PURE__ */ string(),
|
|
1166
|
+
port: integer(0),
|
|
1167
|
+
encoding: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ description("Code page used to decode the socket voice.")),
|
|
1168
|
+
connections: /* @__PURE__ */ pipe(/* @__PURE__ */ array(ConnectionSchema), /* @__PURE__ */ description("Open connections, oldest first."))
|
|
1169
|
+
}),
|
|
1170
|
+
buffer: /* @__PURE__ */ object({
|
|
1171
|
+
size: integer(0),
|
|
1172
|
+
maxEntries: integer(1),
|
|
1173
|
+
firstSeq: /* @__PURE__ */ nullable(integer(1)),
|
|
1174
|
+
lastSeq: /* @__PURE__ */ nullable(integer(1))
|
|
1175
|
+
}),
|
|
1176
|
+
playwright: ServiceStatusSchema,
|
|
1177
|
+
mcp: ServiceStatusSchema,
|
|
1178
|
+
session: /* @__PURE__ */ pipe(/* @__PURE__ */ object({
|
|
1179
|
+
current: /* @__PURE__ */ nullable(SessionSchema),
|
|
1180
|
+
count: /* @__PURE__ */ pipe(integer(0), /* @__PURE__ */ description("Number of sessions `GET /sessions` lists."))
|
|
1181
|
+
}), /* @__PURE__ */ description("Added in API 1.3.")),
|
|
1182
|
+
input: /* @__PURE__ */ pipe(/* @__PURE__ */ object({
|
|
1183
|
+
native: /* @__PURE__ */ pipe(InputAvailabilitySchema, /* @__PURE__ */ description("`POST /input/keys` and `POST /input/click` (robotjs).")),
|
|
1184
|
+
focus: /* @__PURE__ */ pipe(InputAvailabilitySchema, /* @__PURE__ */ description("`POST /input/focus` (koffi, Windows only)."))
|
|
1185
|
+
}), /* @__PURE__ */ description("Native input (docs/usage/native-input.md). When a feature is not available, its endpoints answer `409 INPUT_DISABLED`. Added in API 1.24."))
|
|
1186
|
+
}), /* @__PURE__ */ description("`GET /status`. `playwright` since API 1.1, `mcp` since 1.2, `session` since 1.3, `input` since 1.24."));
|
|
1187
|
+
// ../shared/src/validate.ts
|
|
1188
|
+
/**
|
|
1189
|
+
* Checks `value` against `schema`. Unknown keys of an answer don't fail it and are left out of the
|
|
1190
|
+
* result: a newer bridge of the same major version may add fields. The request schemas are strict
|
|
1191
|
+
* and refuse them (docs/usage/http-api.md#requests).
|
|
1192
|
+
*/
|
|
1193
|
+
function checkDto(schema, value) {
|
|
1194
|
+
const result = /* @__PURE__ */ safeParse(schema, value);
|
|
1195
|
+
if (result.success) return {
|
|
1196
|
+
ok: true,
|
|
1197
|
+
value: result.output
|
|
1198
|
+
};
|
|
1199
|
+
const [issue] = result.issues;
|
|
1200
|
+
return {
|
|
1201
|
+
ok: false,
|
|
1202
|
+
field: /* @__PURE__ */ getDotPath(issue) ?? "(body)",
|
|
1203
|
+
message: issue.message
|
|
1204
|
+
};
|
|
1205
|
+
}
|
|
1206
|
+
/**
|
|
1207
|
+
* An error body as a client must accept it: like `ErrorBodySchema`, but with any `code`, since
|
|
1208
|
+
* new codes may come in minor versions.
|
|
1209
|
+
*/
|
|
1210
|
+
var AnyErrorBodySchema = /* @__PURE__ */ object({ error: /* @__PURE__ */ object({
|
|
1211
|
+
code: /* @__PURE__ */ string(),
|
|
1212
|
+
message: /* @__PURE__ */ string(),
|
|
1213
|
+
details: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ unknown()))
|
|
1214
|
+
}) });
|
|
1215
|
+
export { CONFIG_LIMITS as _, SessionListSchema as a, KeysRequestSchema as c, SpeechListSchema as d, ConfigOverridesSchema as f, API_LIMITS as g, LOG_LEVELS as h, CLIENT_HEADER as i, MarkerRequestSchema as l, ConfigSchema as m, checkDto as n, StartSessionRequestSchema as o, ConfigPatchSchema as p, StatusSchema as r, StartSessionResponseSchema as s, AnyErrorBodySchema as t, SpeechEntrySchema as u, EXACT_VERSION_PATTERN as v, HOST_NAME_PATTERN as y };
|
|
1216
|
+
|
|
1217
|
+
//# sourceMappingURL=src.js.map
|