screenreader-speech-capture 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/README.md +17 -0
  2. package/dist/cli.mjs +1 -1
  3. package/dist/ui/adapter-node.js +1 -1
  4. package/dist/ui/client/ui/_app/immutable/assets/{0.CnPCLsGJ.css → 0.DH3e8XLu.css} +1 -1
  5. package/dist/ui/client/ui/_app/immutable/assets/0.DH3e8XLu.css.br +0 -0
  6. package/dist/ui/client/ui/_app/immutable/assets/0.DH3e8XLu.css.gz +0 -0
  7. package/dist/ui/client/ui/_app/immutable/assets/2.DSVNnDlO.css +1 -0
  8. package/dist/ui/client/ui/_app/immutable/assets/2.DSVNnDlO.css.br +3 -0
  9. package/dist/ui/client/ui/_app/immutable/assets/2.DSVNnDlO.css.gz +0 -0
  10. package/dist/ui/client/ui/_app/immutable/assets/4.DIE1qdmp.css +1 -0
  11. package/dist/ui/client/ui/_app/immutable/assets/4.DIE1qdmp.css.br +0 -0
  12. package/dist/ui/client/ui/_app/immutable/assets/4.DIE1qdmp.css.gz +0 -0
  13. package/dist/ui/client/ui/_app/immutable/assets/5.DCMlxwLh.css +1 -0
  14. package/dist/ui/client/ui/_app/immutable/assets/5.DCMlxwLh.css.br +0 -0
  15. package/dist/ui/client/ui/_app/immutable/assets/5.DCMlxwLh.css.gz +0 -0
  16. package/dist/ui/client/ui/_app/immutable/assets/6.C0Nhvs_m.css +1 -0
  17. package/dist/ui/client/ui/_app/immutable/assets/6.C0Nhvs_m.css.br +0 -0
  18. package/dist/ui/client/ui/_app/immutable/assets/6.C0Nhvs_m.css.gz +0 -0
  19. package/dist/ui/client/ui/_app/immutable/assets/ExternalLink.CYXazpKA.css +1 -0
  20. package/dist/ui/client/ui/_app/immutable/assets/ExternalLink.CYXazpKA.css.br +0 -0
  21. package/dist/ui/client/ui/_app/immutable/assets/ExternalLink.CYXazpKA.css.gz +0 -0
  22. package/dist/ui/client/ui/_app/immutable/assets/Pane.Co7gxzxw.css +1 -0
  23. package/dist/ui/client/ui/_app/immutable/assets/Pane.Co7gxzxw.css.br +0 -0
  24. package/dist/ui/client/ui/_app/immutable/assets/Pane.Co7gxzxw.css.gz +0 -0
  25. package/dist/ui/client/ui/_app/immutable/chunks/{Cba3ZwaX.js → 4R6qUa-I.js} +12 -13
  26. package/dist/ui/client/ui/_app/immutable/chunks/4R6qUa-I.js.br +0 -0
  27. package/dist/ui/client/ui/_app/immutable/chunks/4R6qUa-I.js.gz +0 -0
  28. package/dist/ui/client/ui/_app/immutable/chunks/BC9D66S_.js +2 -0
  29. package/dist/ui/client/ui/_app/immutable/chunks/BC9D66S_.js.br +0 -0
  30. package/dist/ui/client/ui/_app/immutable/chunks/BC9D66S_.js.gz +0 -0
  31. package/dist/ui/client/ui/_app/immutable/chunks/BCiTXg3M.js +138 -0
  32. package/dist/ui/client/ui/_app/immutable/chunks/BCiTXg3M.js.br +0 -0
  33. package/dist/ui/client/ui/_app/immutable/chunks/BCiTXg3M.js.gz +0 -0
  34. package/dist/ui/client/ui/_app/immutable/chunks/BGgW64O2.js +1 -0
  35. package/dist/ui/client/ui/_app/immutable/chunks/BGgW64O2.js.br +2 -0
  36. package/dist/ui/client/ui/_app/immutable/chunks/BGgW64O2.js.gz +0 -0
  37. package/dist/ui/client/ui/_app/immutable/chunks/Bvlvl8SZ.js +1 -0
  38. package/dist/ui/client/ui/_app/immutable/chunks/Bvlvl8SZ.js.br +0 -0
  39. package/dist/ui/client/ui/_app/immutable/chunks/Bvlvl8SZ.js.gz +0 -0
  40. package/dist/ui/client/ui/_app/immutable/chunks/ByQTEKOy.js +3 -0
  41. package/dist/ui/client/ui/_app/immutable/chunks/ByQTEKOy.js.br +0 -0
  42. package/dist/ui/client/ui/_app/immutable/chunks/ByQTEKOy.js.gz +0 -0
  43. package/dist/ui/client/ui/_app/immutable/chunks/C-UVUBR9.js +3 -0
  44. package/dist/ui/client/ui/_app/immutable/chunks/C-UVUBR9.js.br +0 -0
  45. package/dist/ui/client/ui/_app/immutable/chunks/C-UVUBR9.js.gz +0 -0
  46. package/dist/ui/client/ui/_app/immutable/chunks/C1Z3Vlq6.js +3 -0
  47. package/dist/ui/client/ui/_app/immutable/chunks/C1Z3Vlq6.js.br +11 -0
  48. package/dist/ui/client/ui/_app/immutable/chunks/C1Z3Vlq6.js.gz +0 -0
  49. package/dist/ui/client/ui/_app/immutable/chunks/CSj31z2g.js +1 -0
  50. package/dist/ui/client/ui/_app/immutable/chunks/CSj31z2g.js.br +2 -0
  51. package/dist/ui/client/ui/_app/immutable/chunks/CSj31z2g.js.gz +0 -0
  52. package/dist/ui/client/ui/_app/immutable/chunks/D7Lf2nU5.js +48 -0
  53. package/dist/ui/client/ui/_app/immutable/chunks/D7Lf2nU5.js.br +0 -0
  54. package/dist/ui/client/ui/_app/immutable/chunks/D7Lf2nU5.js.gz +0 -0
  55. package/dist/ui/client/ui/_app/immutable/chunks/D8AQra8V.js +3 -0
  56. package/dist/ui/client/ui/_app/immutable/chunks/D8AQra8V.js.br +0 -0
  57. package/dist/ui/client/ui/_app/immutable/chunks/D8AQra8V.js.gz +0 -0
  58. package/dist/ui/client/ui/_app/immutable/chunks/DLBNPxq0.js +1 -0
  59. package/dist/ui/client/ui/_app/immutable/chunks/DLBNPxq0.js.br +3 -0
  60. package/dist/ui/client/ui/_app/immutable/chunks/DLBNPxq0.js.gz +0 -0
  61. package/dist/ui/client/ui/_app/immutable/chunks/DMXmTTni.js +1 -0
  62. package/dist/ui/client/ui/_app/immutable/chunks/DMXmTTni.js.br +0 -0
  63. package/dist/ui/client/ui/_app/immutable/chunks/DMXmTTni.js.gz +0 -0
  64. package/dist/ui/client/ui/_app/immutable/chunks/DVjfBgOA.js +1 -0
  65. package/dist/ui/client/ui/_app/immutable/chunks/DVjfBgOA.js.br +0 -0
  66. package/dist/ui/client/ui/_app/immutable/chunks/DVjfBgOA.js.gz +0 -0
  67. package/dist/ui/client/ui/_app/immutable/chunks/EBfbaSFC.js +40 -0
  68. package/dist/ui/client/ui/_app/immutable/chunks/EBfbaSFC.js.br +0 -0
  69. package/dist/ui/client/ui/_app/immutable/chunks/EBfbaSFC.js.gz +0 -0
  70. package/dist/ui/client/ui/_app/immutable/chunks/HjKxdHgL.js +4 -0
  71. package/dist/ui/client/ui/_app/immutable/chunks/HjKxdHgL.js.br +0 -0
  72. package/dist/ui/client/ui/_app/immutable/chunks/HjKxdHgL.js.gz +0 -0
  73. package/dist/ui/client/ui/_app/immutable/chunks/y62iQtQV.js +1 -0
  74. package/dist/ui/client/ui/_app/immutable/chunks/y62iQtQV.js.br +1 -0
  75. package/dist/ui/client/ui/_app/immutable/chunks/y62iQtQV.js.gz +0 -0
  76. package/dist/ui/client/ui/_app/immutable/entry/app.BRCyy_aP.js +2 -0
  77. package/dist/ui/client/ui/_app/immutable/entry/app.BRCyy_aP.js.br +0 -0
  78. package/dist/ui/client/ui/_app/immutable/entry/app.BRCyy_aP.js.gz +0 -0
  79. package/dist/ui/client/ui/_app/immutable/entry/start.ujo8oI9U.js +2 -0
  80. package/dist/ui/client/ui/_app/immutable/entry/start.ujo8oI9U.js.br +5 -0
  81. package/dist/ui/client/ui/_app/immutable/entry/start.ujo8oI9U.js.gz +0 -0
  82. package/dist/ui/client/ui/_app/immutable/nodes/0.CYE8I_uA.js +1 -0
  83. package/dist/ui/client/ui/_app/immutable/nodes/0.CYE8I_uA.js.br +0 -0
  84. package/dist/ui/client/ui/_app/immutable/nodes/0.CYE8I_uA.js.gz +0 -0
  85. package/dist/ui/client/ui/_app/immutable/nodes/1.DTsysZRk.js +1 -0
  86. package/dist/ui/client/ui/_app/immutable/nodes/1.DTsysZRk.js.br +0 -0
  87. package/dist/ui/client/ui/_app/immutable/nodes/1.DTsysZRk.js.gz +0 -0
  88. package/dist/ui/client/ui/_app/immutable/nodes/2.hev1nfuM.js +1 -0
  89. package/dist/ui/client/ui/_app/immutable/nodes/2.hev1nfuM.js.br +0 -0
  90. package/dist/ui/client/ui/_app/immutable/nodes/2.hev1nfuM.js.gz +0 -0
  91. package/dist/ui/client/ui/_app/immutable/nodes/3.CApflji6.js +5 -0
  92. package/dist/ui/client/ui/_app/immutable/nodes/3.CApflji6.js.br +0 -0
  93. package/dist/ui/client/ui/_app/immutable/nodes/3.CApflji6.js.gz +0 -0
  94. package/dist/ui/client/ui/_app/immutable/nodes/4.BkefkGQL.js +160 -0
  95. package/dist/ui/client/ui/_app/immutable/nodes/4.BkefkGQL.js.br +0 -0
  96. package/dist/ui/client/ui/_app/immutable/nodes/4.BkefkGQL.js.gz +0 -0
  97. package/dist/ui/client/ui/_app/immutable/nodes/5.CDYh05RH.js +6 -0
  98. package/dist/ui/client/ui/_app/immutable/nodes/5.CDYh05RH.js.br +0 -0
  99. package/dist/ui/client/ui/_app/immutable/nodes/5.CDYh05RH.js.gz +0 -0
  100. package/dist/ui/client/ui/_app/immutable/nodes/6.DwISzDQO.js +6 -0
  101. package/dist/ui/client/ui/_app/immutable/nodes/6.DwISzDQO.js.br +0 -0
  102. package/dist/ui/client/ui/_app/immutable/nodes/6.DwISzDQO.js.gz +0 -0
  103. package/dist/ui/client/ui/_app/version.json +1 -1
  104. package/dist/ui/client/ui/_app/version.json.br +0 -0
  105. package/dist/ui/client/ui/_app/version.json.gz +0 -0
  106. package/dist/ui/server/.vite/manifest.json +193 -10
  107. package/dist/ui/server/_app/immutable/assets/ExternalLink.CYXazpKA.css +1 -0
  108. package/dist/ui/server/_app/immutable/assets/Pane.Co7gxzxw.css +1 -0
  109. package/dist/ui/server/_app/immutable/assets/{_layout.CnPCLsGJ.css → _layout.DH3e8XLu.css} +1 -1
  110. package/dist/ui/server/_app/immutable/assets/_layout.DSVNnDlO.css +1 -0
  111. package/dist/ui/server/_app/immutable/assets/_page.C0Nhvs_m.css +1 -0
  112. package/dist/ui/server/_app/immutable/assets/_page.DCMlxwLh.css +1 -0
  113. package/dist/ui/server/_app/immutable/assets/_page.DIE1qdmp.css +1 -0
  114. package/dist/ui/server/chunks/ExternalLink.js +12 -0
  115. package/dist/ui/server/chunks/ExternalLink.js.map +1 -0
  116. package/dist/ui/server/chunks/Pane.js +13 -0
  117. package/dist/ui/server/chunks/Pane.js.map +1 -0
  118. package/dist/ui/server/chunks/composition.js +462 -120
  119. package/dist/ui/server/chunks/composition.js.map +1 -1
  120. package/dist/ui/server/chunks/config-state.js +21 -0
  121. package/dist/ui/server/chunks/config-state.js.map +1 -0
  122. package/dist/ui/server/chunks/dialog.js +592 -0
  123. package/dist/ui/server/chunks/dialog.js.map +1 -0
  124. package/dist/ui/server/chunks/filled-button.js +116 -0
  125. package/dist/ui/server/chunks/filled-button.js.map +1 -0
  126. package/dist/ui/server/chunks/icon-button.js +2 -46
  127. package/dist/ui/server/chunks/icon-button.js.map +1 -1
  128. package/dist/ui/server/chunks/icon.js +49 -0
  129. package/dist/ui/server/chunks/icon.js.map +1 -0
  130. package/dist/ui/server/chunks/index-server.js +5 -1
  131. package/dist/ui/server/chunks/index-server.js.map +1 -0
  132. package/dist/ui/server/chunks/instance.js +5 -5
  133. package/dist/ui/server/chunks/internal.js +1 -1
  134. package/dist/ui/server/chunks/navigation.js +9 -13
  135. package/dist/ui/server/chunks/navigation.js.map +1 -1
  136. package/dist/ui/server/chunks/navigation2.js +15 -0
  137. package/dist/ui/server/chunks/navigation2.js.map +1 -0
  138. package/dist/ui/server/chunks/outlined-text-field.js +11 -398
  139. package/dist/ui/server/chunks/outlined-text-field.js.map +1 -1
  140. package/dist/ui/server/chunks/paths.js +2 -0
  141. package/dist/ui/server/chunks/redispatch-event.js +91 -0
  142. package/dist/ui/server/chunks/redispatch-event.js.map +1 -0
  143. package/dist/ui/server/chunks/server2.js +11 -1
  144. package/dist/ui/server/chunks/server2.js.map +1 -1
  145. package/dist/ui/server/chunks/src.js +112 -3
  146. package/dist/ui/server/chunks/src.js.map +1 -1
  147. package/dist/ui/server/chunks/state.js +1 -1
  148. package/dist/ui/server/chunks/static-html.js +38 -0
  149. package/dist/ui/server/chunks/static-html.js.map +1 -0
  150. package/dist/ui/server/chunks/text-button.js +307 -0
  151. package/dist/ui/server/chunks/text-button.js.map +1 -0
  152. package/dist/ui/server/entries/endpoints/api/config/_server.ts.js +4 -17
  153. package/dist/ui/server/entries/endpoints/api/config/_server.ts.js.map +1 -1
  154. package/dist/ui/server/entries/endpoints/api/input/keys/_server.ts.js +14 -0
  155. package/dist/ui/server/entries/endpoints/api/input/keys/_server.ts.js.map +1 -0
  156. package/dist/ui/server/entries/endpoints/api/markers/_server.ts.js +1 -1
  157. package/dist/ui/server/entries/endpoints/api/speech/_server.ts.js +1 -1
  158. package/dist/ui/server/entries/fallbacks/error.svelte.js +1 -1
  159. package/dist/ui/server/entries/hooks.server.js +4 -1
  160. package/dist/ui/server/entries/hooks.server.js.map +1 -1
  161. package/dist/ui/server/entries/pages/_layout.svelte.js +5 -10
  162. package/dist/ui/server/entries/pages/_layout.svelte.js.map +1 -1
  163. package/dist/ui/server/entries/pages/_page.svelte.js +15 -597
  164. package/dist/ui/server/entries/pages/_page.svelte.js.map +1 -1
  165. package/dist/ui/server/entries/pages/settings/_page.server.ts.js +12 -0
  166. package/dist/ui/server/entries/pages/settings/_page.server.ts.js.map +1 -0
  167. package/dist/ui/server/entries/pages/settings/_page.svelte.js +3470 -70
  168. package/dist/ui/server/entries/pages/settings/_page.svelte.js.map +1 -1
  169. package/dist/ui/server/entries/pages/setup/_layout.svelte.js +51 -0
  170. package/dist/ui/server/entries/pages/setup/_layout.svelte.js.map +1 -0
  171. package/dist/ui/server/entries/pages/setup/_page.svelte.js +225 -3
  172. package/dist/ui/server/entries/pages/setup/_page.svelte.js.map +1 -1
  173. package/dist/ui/server/entries/pages/setup/instructions/_page.server.ts.js +12 -0
  174. package/dist/ui/server/entries/pages/setup/instructions/_page.server.ts.js.map +1 -0
  175. package/dist/ui/server/entries/pages/setup/instructions/_page.svelte.js +271 -0
  176. package/dist/ui/server/entries/pages/setup/instructions/_page.svelte.js.map +1 -0
  177. package/dist/ui/server/manifest-full.js +21 -5
  178. package/dist/ui/server/manifest.js +21 -5
  179. package/dist/ui/server/nodes/0.js +2 -2
  180. package/dist/ui/server/nodes/1.js +1 -1
  181. package/dist/ui/server/nodes/2.js +4 -6
  182. package/dist/ui/server/nodes/3.js +6 -4
  183. package/dist/ui/server/nodes/4.js +6 -4
  184. package/dist/ui/server/nodes/5.js +8 -0
  185. package/dist/ui/server/nodes/6.js +10 -0
  186. package/dist/ui/server/server.js +21 -5
  187. package/package.json +1 -1
  188. package/dist/ui/client/ui/_app/immutable/assets/0.CnPCLsGJ.css.br +0 -0
  189. package/dist/ui/client/ui/_app/immutable/assets/0.CnPCLsGJ.css.gz +0 -0
  190. package/dist/ui/client/ui/_app/immutable/assets/3.CK2Biket.css +0 -1
  191. package/dist/ui/client/ui/_app/immutable/assets/3.CK2Biket.css.br +0 -0
  192. package/dist/ui/client/ui/_app/immutable/assets/3.CK2Biket.css.gz +0 -0
  193. package/dist/ui/client/ui/_app/immutable/chunks/0YgL1EU2.js +0 -179
  194. package/dist/ui/client/ui/_app/immutable/chunks/0YgL1EU2.js.br +0 -0
  195. package/dist/ui/client/ui/_app/immutable/chunks/0YgL1EU2.js.gz +0 -0
  196. package/dist/ui/client/ui/_app/immutable/chunks/BYvlzyV8.js +0 -1
  197. package/dist/ui/client/ui/_app/immutable/chunks/BYvlzyV8.js.br +0 -2
  198. package/dist/ui/client/ui/_app/immutable/chunks/BYvlzyV8.js.gz +0 -0
  199. package/dist/ui/client/ui/_app/immutable/chunks/BfvDkxmG.js +0 -3
  200. package/dist/ui/client/ui/_app/immutable/chunks/BfvDkxmG.js.br +0 -0
  201. package/dist/ui/client/ui/_app/immutable/chunks/BfvDkxmG.js.gz +0 -0
  202. package/dist/ui/client/ui/_app/immutable/chunks/Cba3ZwaX.js.br +0 -0
  203. package/dist/ui/client/ui/_app/immutable/chunks/Cba3ZwaX.js.gz +0 -0
  204. package/dist/ui/client/ui/_app/immutable/chunks/DErxe_FC.js +0 -3
  205. package/dist/ui/client/ui/_app/immutable/chunks/DErxe_FC.js.br +0 -0
  206. package/dist/ui/client/ui/_app/immutable/chunks/DErxe_FC.js.gz +0 -0
  207. package/dist/ui/client/ui/_app/immutable/chunks/Dqufijaz.js +0 -1
  208. package/dist/ui/client/ui/_app/immutable/chunks/Dqufijaz.js.br +0 -0
  209. package/dist/ui/client/ui/_app/immutable/chunks/Dqufijaz.js.gz +0 -0
  210. package/dist/ui/client/ui/_app/immutable/chunks/WpCriteK.js +0 -1
  211. package/dist/ui/client/ui/_app/immutable/chunks/WpCriteK.js.br +0 -1
  212. package/dist/ui/client/ui/_app/immutable/chunks/WpCriteK.js.gz +0 -0
  213. package/dist/ui/client/ui/_app/immutable/chunks/wbLSPbHY.js +0 -4
  214. package/dist/ui/client/ui/_app/immutable/chunks/wbLSPbHY.js.br +0 -0
  215. package/dist/ui/client/ui/_app/immutable/chunks/wbLSPbHY.js.gz +0 -0
  216. package/dist/ui/client/ui/_app/immutable/entry/app.B6hhDf4F.js +0 -2
  217. package/dist/ui/client/ui/_app/immutable/entry/app.B6hhDf4F.js.br +0 -0
  218. package/dist/ui/client/ui/_app/immutable/entry/app.B6hhDf4F.js.gz +0 -0
  219. package/dist/ui/client/ui/_app/immutable/entry/start.Dluk7nQO.js +0 -2
  220. package/dist/ui/client/ui/_app/immutable/entry/start.Dluk7nQO.js.br +0 -0
  221. package/dist/ui/client/ui/_app/immutable/entry/start.Dluk7nQO.js.gz +0 -0
  222. package/dist/ui/client/ui/_app/immutable/nodes/0.D-lhv0Us.js +0 -1
  223. package/dist/ui/client/ui/_app/immutable/nodes/0.D-lhv0Us.js.br +0 -0
  224. package/dist/ui/client/ui/_app/immutable/nodes/0.D-lhv0Us.js.gz +0 -0
  225. package/dist/ui/client/ui/_app/immutable/nodes/1.Cs4GAsCO.js +0 -1
  226. package/dist/ui/client/ui/_app/immutable/nodes/1.Cs4GAsCO.js.br +0 -2
  227. package/dist/ui/client/ui/_app/immutable/nodes/1.Cs4GAsCO.js.gz +0 -0
  228. package/dist/ui/client/ui/_app/immutable/nodes/2.CmuzlN_T.js +0 -52
  229. package/dist/ui/client/ui/_app/immutable/nodes/2.CmuzlN_T.js.br +0 -0
  230. package/dist/ui/client/ui/_app/immutable/nodes/2.CmuzlN_T.js.gz +0 -0
  231. package/dist/ui/client/ui/_app/immutable/nodes/3.DMXXeBbC.js +0 -5
  232. package/dist/ui/client/ui/_app/immutable/nodes/3.DMXXeBbC.js.br +0 -0
  233. package/dist/ui/client/ui/_app/immutable/nodes/3.DMXXeBbC.js.gz +0 -0
  234. package/dist/ui/client/ui/_app/immutable/nodes/4.CMHCNMDn.js +0 -1
  235. package/dist/ui/client/ui/_app/immutable/nodes/4.CMHCNMDn.js.br +0 -0
  236. package/dist/ui/client/ui/_app/immutable/nodes/4.CMHCNMDn.js.gz +0 -0
  237. package/dist/ui/server/_app/immutable/assets/_page.CK2Biket.css +0 -1
  238. /package/dist/ui/client/ui/_app/immutable/assets/{2.ChCvyBVk.css → 3.ChCvyBVk.css} +0 -0
  239. /package/dist/ui/client/ui/_app/immutable/assets/{2.ChCvyBVk.css.br → 3.ChCvyBVk.css.br} +0 -0
  240. /package/dist/ui/client/ui/_app/immutable/assets/{2.ChCvyBVk.css.gz → 3.ChCvyBVk.css.gz} +0 -0
@@ -0,0 +1,51 @@
1
+ import { mt as resolve } from "../../../chunks/internal.js";
2
+ import { d as attr, h as escape_html, i as ensure_array_like } from "../../../chunks/server2.js";
3
+ import "../../../chunks/paths.js";
4
+ import { t as page } from "../../../chunks/state.js";
5
+ import { t as Pane } from "../../../chunks/Pane.js";
6
+ import { t as isCurrent } from "../../../chunks/navigation.js";
7
+ // src/lib/components/TabBar/TabBar.svelte
8
+ function TabBar($$renderer, $$props) {
9
+ $$renderer.component(($$renderer) => {
10
+ /** Names the navigation landmark. */
11
+ let { label, items, currentPath } = $$props;
12
+ $$renderer.push(`<nav${attr("aria-label", label)} class="svelte-1rp78hl"><ul class="svelte-1rp78hl"><!--[-->`);
13
+ const each_array = ensure_array_like(items);
14
+ for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
15
+ let item = each_array[$$index];
16
+ $$renderer.push(`<li><a${attr("href", item.href)}${attr("aria-current", isCurrent(item, currentPath) ? "page" : void 0)} class="svelte-1rp78hl">${escape_html(item.label)}</a></li>`);
17
+ }
18
+ $$renderer.push(`<!--]--></ul></nav>`);
19
+ });
20
+ }
21
+ // src/routes/setup/+layout.svelte
22
+ function _layout($$renderer, $$props) {
23
+ $$renderer.component(($$renderer) => {
24
+ let { children } = $$props;
25
+ const tabs = [{
26
+ href: resolve("/setup"),
27
+ label: "Check",
28
+ exact: true
29
+ }, {
30
+ href: resolve("/setup/instructions"),
31
+ label: "Instructions"
32
+ }];
33
+ Pane($$renderer, {
34
+ heading: "Setup",
35
+ children: ($$renderer) => {
36
+ TabBar($$renderer, {
37
+ label: "Setup",
38
+ items: tabs,
39
+ currentPath: page.url.pathname
40
+ });
41
+ $$renderer.push(`<!----> `);
42
+ children($$renderer);
43
+ $$renderer.push(`<!---->`);
44
+ },
45
+ $$slots: { default: true }
46
+ });
47
+ });
48
+ }
49
+ export { _layout as default };
50
+
51
+ //# sourceMappingURL=_layout.svelte.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_layout.svelte.js","names":["$.attr","$.ensure_array_like","$.escape"],"sources":["../../../../../src/lib/components/TabBar/TabBar.svelte","../../../../../src/routes/setup/+layout.svelte"],"sourcesContent":["<script lang=\"ts\">\n import { isCurrent, type NavItem } from '#lib/core/navigation.js';\n\n type Props = {\n /** Names the navigation landmark. */\n label: string;\n items: Pick<NavItem, 'href' | 'label' | 'exact'>[];\n currentPath: string;\n };\n\n let { label, items, currentPath }: Props = $props();\n</script>\n\n<!-- Pages that look like tabs: links, so each has its own address and \"back\" works. -->\n<nav aria-label={label}>\n <ul>\n {#each items as item (item.href)}\n <li>\n <!-- The caller passes hrefs it built with resolve(). -->\n <!-- eslint-disable-next-line svelte/no-navigation-without-resolve -->\n <a href={item.href} aria-current={isCurrent(item, currentPath) ? 'page' : undefined}>\n {item.label}\n </a>\n </li>\n {/each}\n </ul>\n</nav>\n\n<style>\n nav {\n border-bottom: 1px solid var(--md-sys-color-outline-variant);\n border-width: 0 0 max(1px, var(--app-border-width));\n }\n\n ul {\n display: flex;\n flex-wrap: wrap;\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n a {\n display: flex;\n align-items: center;\n min-height: 48px;\n padding: 0 16px;\n /* Always there, so the label doesn't move when the tab becomes the current one. */\n border-bottom: 3px solid transparent;\n color: var(--md-sys-color-on-surface-variant);\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n text-decoration: none;\n }\n\n a:hover {\n background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent);\n }\n\n a[aria-current='page'] {\n border-bottom-color: var(--md-sys-color-primary);\n color: var(--md-sys-color-on-surface);\n }\n</style>\n","<script lang=\"ts\">\n import { resolve } from '$app/paths';\n import { page } from '$app/state';\n import Pane from '#lib/components/Pane/Pane.svelte';\n import TabBar from '#lib/components/TabBar/TabBar.svelte';\n import type { LayoutProps } from './$types';\n\n let { children }: LayoutProps = $props();\n\n const tabs = [\n { href: resolve('/setup'), label: 'Check', exact: true },\n { href: resolve('/setup/instructions'), label: 'Instructions' },\n ];\n</script>\n\n<Pane heading=\"Setup\">\n <TabBar label=\"Setup\" items={tabs} currentPath={page.url.pathname} />\n {@render children()}\n</Pane>\n"],"mappings":";;;;;;;;CAAA,WAAA,WAAA,eAAA;;EAUE,IAAI,EAAE,OAAO,OAAO,gBAAoB;EAIzB,WAAA,KAAA,OAAAA,KAAA,cAAA,KAAK,EAAA,4DAAA;EAEX,MAAA,aAAAC,kBAAA,KAAK;;GAAI,IAAA,OAAI,WAAA;GAIP,WAAA,KAAA,SAAAD,KAAA,QAAA,KAAK,IAAI,IAAAA,KAAA,gBAAgB,UAAU,MAAM,WAAW,IAAI,SAAS,KAAA,CAAS,EAAA,0BAAAE,YAChF,KAAK,KAAK,EAAA,UAAA;;;CAVb,CAAA;;;;CCXR,WAAA,WAAA,eAAA;EAOE,IAAI,EAAE,aAAuB;EAE7B,MAAM,OAAO,CACX;GAAE,MAAM,QAAQ,QAAQ;GAAG,OAAO;GAAS,OAAO;EAAI,GACtD;GAAE,MAAM,QAAQ,qBAAqB;GAAG,OAAO;EAAc,CAC9D;;;;IAI4B,OAAA,YAAA;KAAA,OAAA;KAAA,OAAA;KAAI,aAAe,KAAK,IAAI;IAAQ,CAAA;;IACxD,SAAQ,UAAA;;;;;CAJX,CAAA"}
@@ -1,7 +1,229 @@
1
- import "../../../chunks/server2.js";
1
+ import { mt 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, r as derived, t as attr_class } from "../../../chunks/server2.js";
3
+ import "../../../chunks/index-server.js";
4
+ import "../../../chunks/filled-button.js";
5
+ import "../../../chunks/icon.js";
6
+ import { t as ExternalLink } from "../../../chunks/ExternalLink.js";
7
+ import "../../../chunks/paths.js";
8
+ import { a as deriveCheckRows, i as SCREEN_READER_ID, o as docsUrl, r as CHECK_CHORD, t as appStores } from "../../../chunks/composition.js";
9
+ import "../../../chunks/text-button.js";
10
+ import "../../../chunks/dialog.js";
11
+ // src/lib/components/ScreenReaderLink/ScreenReaderLink.svelte
12
+ function ScreenReaderLink($$renderer, $$props) {
13
+ $$renderer.component(($$renderer) => {
14
+ let { children } = $$props;
15
+ $$renderer.push(`<a${attr("href", `${stringify(resolve("/setup/instructions"))}#${stringify(SCREEN_READER_ID)}`)} class="svelte-13xhv7j">`);
16
+ children($$renderer);
17
+ $$renderer.push(`<!----></a>`);
18
+ });
19
+ }
20
+ // src/lib/components/SetupStatus/SetupStatus.svelte
21
+ function SetupStatus($$renderer, $$props) {
22
+ $$renderer.component(($$renderer) => {
23
+ /** `null` until the status was read once. */
24
+ /** Whether the last read of the status worked. */
25
+ /** Reads the status again. */
26
+ let { rows, reachable, onCheck } = $$props;
27
+ const ICONS = {
28
+ ok: "check_circle",
29
+ warning: "warning",
30
+ neutral: "radio_button_unchecked"
31
+ };
32
+ /** What the last "Check again" found; empty until someone asks. */
33
+ let result = "";
34
+ if (!reachable) $$renderer.push(`<!--[0--><p role="alert" class="unreachable svelte-10lx79f">The bridge is not reachable.${escape_html(rows === null ? "" : " This is the last state that was read.")}</p>`);
35
+ else if (rows === null) $$renderer.push(`<!--[1--><p class="note svelte-10lx79f">Reading the status…</p>`);
36
+ else $$renderer.push("<!--[-1-->");
37
+ $$renderer.push(`<!--]--> `);
38
+ if (rows !== null) {
39
+ $$renderer.push(`<!--[0--><ul aria-label="Setup status" class="svelte-10lx79f"><!--[-->`);
40
+ const each_array = ensure_array_like(rows);
41
+ for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
42
+ let row = each_array[$$index];
43
+ $$renderer.push(`<li${attr_class(clsx(row.tone), "svelte-10lx79f")}><md-icon aria-hidden="true" class="svelte-10lx79f">${escape_html(ICONS[row.tone])}</md-icon> <span class="label svelte-10lx79f">${escape_html(row.label)}</span> <span class="state svelte-10lx79f">`);
44
+ if (row.tone === "warning") $$renderer.push(`<!--[0--><span class="visually-hidden svelte-10lx79f">Warning:</span>`);
45
+ else $$renderer.push("<!--[-1-->");
46
+ $$renderer.push(`<!--]--> ${escape_html(row.state)} `);
47
+ if (row.library !== null) {
48
+ $$renderer.push("<!--[0-->");
49
+ const { name, href } = row.library;
50
+ $$renderer.push(`<span>(`);
51
+ if (href === null) $$renderer.push(`<!--[0-->${escape_html(name)}`);
52
+ else {
53
+ $$renderer.push("<!--[-1-->");
54
+ ExternalLink($$renderer, {
55
+ href,
56
+ children: ($$renderer) => {
57
+ $$renderer.push(`<!---->${escape_html(name)}<span class="visually-hidden svelte-10lx79f">on GitHub</span>`);
58
+ },
59
+ $$slots: { default: true }
60
+ });
61
+ }
62
+ $$renderer.push(`<!--]-->)</span>`);
63
+ } else $$renderer.push("<!--[-1-->");
64
+ $$renderer.push(`<!--]--> `);
65
+ if (row.help !== null) {
66
+ $$renderer.push(`<!--[0--><span class="help svelte-10lx79f">`);
67
+ if ("href" in row.help) {
68
+ $$renderer.push("<!--[0-->");
69
+ ExternalLink($$renderer, {
70
+ href: row.help.href,
71
+ children: ($$renderer) => {
72
+ $$renderer.push(`<!---->${escape_html(row.help.label)}<span class="visually-hidden svelte-10lx79f">(help for ${escape_html(row.label)})</span>`);
73
+ },
74
+ $$slots: { default: true }
75
+ });
76
+ } else {
77
+ $$renderer.push("<!--[-1-->");
78
+ ScreenReaderLink($$renderer, {
79
+ children: ($$renderer) => {
80
+ $$renderer.push(`<!---->${escape_html(row.help.label)}<span class="visually-hidden svelte-10lx79f">(help for ${escape_html(row.label)})</span>`);
81
+ },
82
+ $$slots: { default: true }
83
+ });
84
+ }
85
+ $$renderer.push(`<!--]--></span>`);
86
+ } else $$renderer.push("<!--[-1-->");
87
+ $$renderer.push(`<!--]--></span></li>`);
88
+ }
89
+ $$renderer.push(`<!--]--></ul>`);
90
+ } else $$renderer.push("<!--[-1-->");
91
+ $$renderer.push(`<!--]--> <md-outlined-button type="button">${escape_html(reachable ? "Check again" : "Try again")}</md-outlined-button> <p role="status" class="note svelte-10lx79f">${escape_html(result)}</p>`);
92
+ });
93
+ }
94
+ // src/lib/components/SpeechTest/SendKeysDialog.svelte
95
+ function SendKeysDialog($$renderer, $$props) {
96
+ $$renderer.component(($$renderer) => {
97
+ let { open, onSend, onClose } = $$props;
98
+ $$renderer.push(`<md-dialog${attr("open", open, true)} class="svelte-6mj6i9"><div slot="headline">Send ${escape_html(CHECK_CHORD)} during a session?</div> <div slot="content"><p class="svelte-6mj6i9">A session is running. The keys go to the window in front on the bridge's machine, and the
99
+ speech they cause is recorded in that session.</p></div> <div slot="actions"><md-text-button type="button">Cancel</md-text-button> <md-text-button type="button">Send</md-text-button></div></md-dialog>`);
100
+ });
101
+ }
102
+ // src/lib/components/SpeechTest/SpeechTest.svelte
103
+ function SpeechTest($$renderer, $$props) {
104
+ $$renderer.component(($$renderer) => {
105
+ /** The speech that arrived, oldest first. */
106
+ /**
107
+ * The page is opened on the screen reader's own machine: the screen reader reads it, so what
108
+ * arrived is hidden from it, and the page's own speech can pass the check.
109
+ */
110
+ /** Whether the bridge can send keys; `null` until the status was read. */
111
+ /** The port the bridge listens on for speech, and its version; `null` until known. */
112
+ /** Read right before the keys are sent: they need a confirmation while a session runs. */
113
+ let { phase, via, entries, reconnecting, failure, local, input, port, version, onListen, onSendKeys, onStop, isSessionRunning } = $$props;
114
+ let confirmOpen = false;
115
+ const busy = derived(() => phase === "starting" || phase === "listening");
116
+ const cannotSend = derived(() => busy() || input?.available !== true);
117
+ const progress = derived(() => !busy() ? "" : reconnecting ? "Connection lost, reconnecting…" : via === "keys" ? `Sending ${CHECK_CHORD} and waiting for speech…` : "Listening. Make the screen reader speak, for example with a key press.");
118
+ const outcome = derived(() => phase === "heard" ? "Speech arrived." : phase === "silent" ? "Nothing arrived." : phase === "failed" ? `The check failed: ${failure}` : "");
119
+ const announced = derived(() => outcome() !== "" ? outcome() : local ? "" : progress());
120
+ $$renderer.push(`<p class="scope">Checks that what the screen reader says reaches the bridge. Listen and make it speak, or let the
121
+ bridge send ${escape_html(CHECK_CHORD)} (read the window title in NVDA and JAWS) to the window in front.</p> `);
122
+ if (local) $$renderer.push(`<!--[0--><p class="scope">This page is opened on the bridge's own machine: the screen reader reads this page too, and that
123
+ speech can pass the check.</p>`);
124
+ else $$renderer.push("<!--[-1-->");
125
+ $$renderer.push(`<!--]--> <div class="actions svelte-xev9kd"><md-filled-button type="button"${attr("soft-disabled", busy() ? true : void 0)}>Listen</md-filled-button> <md-outlined-button type="button"${attr("soft-disabled", cannotSend() ? true : void 0)}>Send ${escape_html(CHECK_CHORD)}</md-outlined-button> <md-text-button type="button"${attr("soft-disabled", busy() ? void 0 : true)}>Stop</md-text-button></div> `);
126
+ if (input !== null && !input.available) $$renderer.push(`<!--[0--><p class="scope">${escape_html(CHECK_CHORD)} can't be sent: ${escape_html(input.reason ?? "native input is not available")}</p>`);
127
+ else $$renderer.push("<!--[-1-->");
128
+ $$renderer.push(`<!--]--> `);
129
+ if (local && progress() !== "") $$renderer.push(`<!--[0--><p class="result svelte-xev9kd">${escape_html(progress())}</p>`);
130
+ else $$renderer.push("<!--[-1-->");
131
+ $$renderer.push(`<!--]--> <p role="status"${attr_class(`result ${stringify(phase)}`, "svelte-xev9kd")}>${escape_html(announced())}</p> `);
132
+ if (phase === "heard") {
133
+ $$renderer.push(`<!--[0--><ol aria-label="Speech that arrived"${attr("aria-hidden", local ? "true" : void 0)} class="svelte-xev9kd"><!--[-->`);
134
+ const each_array = ensure_array_like(entries);
135
+ for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
136
+ let entry = each_array[$$index];
137
+ $$renderer.push(`<li>${escape_html(entry.text)}</li>`);
138
+ }
139
+ $$renderer.push(`<!--]--></ol> <p class="scope svelte-xev9kd">Wrong characters? Set the <a${attr("href", resolve("/settings"))} class="svelte-xev9kd">text encoding</a>.</p>`);
140
+ } else if (phase === "silent" && via === "manual") {
141
+ $$renderer.push(`<!--[1--><ul class="hints svelte-xev9kd"><li class="svelte-xev9kd">`);
142
+ ScreenReaderLink($$renderer, {
143
+ children: ($$renderer) => {
144
+ $$renderer.push(`<!---->Select the socket voice`);
145
+ },
146
+ $$slots: { default: true }
147
+ });
148
+ $$renderer.push(`<!----> in the screen reader.</li> <li class="svelte-xev9kd">The voice must send to ${escape_html(port === null ? "the bridge's port" : `port ${port}`)}
149
+ (`);
150
+ ExternalLink($$renderer, {
151
+ href: docsUrl(version, "usage/troubleshooting.md#speech"),
152
+ children: ($$renderer) => {
153
+ $$renderer.push(`<!---->troubleshooting`);
154
+ },
155
+ $$slots: { default: true }
156
+ });
157
+ $$renderer.push(`<!---->).</li> <li class="svelte-xev9kd">JAWS: turn off `);
158
+ ExternalLink($$renderer, {
159
+ href: docsUrl(version, "usage/vm-setup.md#jaws-language-detection"),
160
+ children: ($$renderer) => {
161
+ $$renderer.push(`<!---->Detect Language Changes`);
162
+ },
163
+ $$slots: { default: true }
164
+ });
165
+ $$renderer.push(`<!---->.</li></ul>`);
166
+ } else if (phase === "silent") {
167
+ $$renderer.push(`<!--[2--><p class="scope">${escape_html(CHECK_CHORD)} was sent. Use Listen and make the screen reader speak by hand: if that works, the keys
168
+ don't reach the screen reader (`);
169
+ ExternalLink($$renderer, {
170
+ href: docsUrl(version, "usage/troubleshooting.md#browser-and-input"),
171
+ children: ($$renderer) => {
172
+ $$renderer.push(`<!---->troubleshooting`);
173
+ },
174
+ $$slots: { default: true }
175
+ });
176
+ $$renderer.push(`<!---->).</p>`);
177
+ } else $$renderer.push("<!--[-1-->");
178
+ $$renderer.push(`<!--]--> `);
179
+ SendKeysDialog($$renderer, {
180
+ open: confirmOpen,
181
+ onSend: onSendKeys,
182
+ onClose: () => confirmOpen = false
183
+ });
184
+ $$renderer.push(`<!---->`);
185
+ });
186
+ }
2
187
  // src/routes/setup/+page.svelte
3
- function _page($$renderer) {
4
- $$renderer.push(`<h1>Setup</h1> <p>The steps to connect a screen reader will be listed here.</p>`);
188
+ function _page($$renderer, $$props) {
189
+ $$renderer.component(($$renderer) => {
190
+ let { data } = $$props;
191
+ const { status: statusStore, voiceCheck } = appStores();
192
+ const status = derived(() => statusStore.status ?? data.status);
193
+ const rows = derived(() => status() === null ? null : deriveCheckRows(status()));
194
+ async function isSessionRunning() {
195
+ await statusStore.retry();
196
+ return (statusStore.status ?? data.status)?.session.current != null;
197
+ }
198
+ head("g40i6i", $$renderer, ($$renderer) => {
199
+ $$renderer.title(($$renderer) => {
200
+ $$renderer.push(`<title>Setup · Speech Capture</title>`);
201
+ });
202
+ });
203
+ $$renderer.push(`<section class="part" aria-labelledby="status-heading"><h2 id="status-heading">Status</h2> `);
204
+ SetupStatus($$renderer, {
205
+ rows: rows(),
206
+ reachable: statusStore.reachable,
207
+ onCheck: () => statusStore.retry()
208
+ });
209
+ $$renderer.push(`<!----></section> <section class="part" aria-labelledby="test-heading"><h2 id="test-heading">Speech test</h2> `);
210
+ SpeechTest($$renderer, {
211
+ phase: voiceCheck.phase,
212
+ via: voiceCheck.via,
213
+ entries: voiceCheck.entries,
214
+ reconnecting: voiceCheck.reconnecting,
215
+ failure: voiceCheck.failure,
216
+ local: data.local,
217
+ input: status()?.input.native ?? null,
218
+ port: status()?.tcp.port ?? null,
219
+ version: status()?.bridge.version ?? null,
220
+ onListen: () => void voiceCheck.start("manual"),
221
+ onSendKeys: () => void voiceCheck.start("keys"),
222
+ onStop: () => voiceCheck.stop(),
223
+ isSessionRunning
224
+ });
225
+ $$renderer.push(`<!----></section>`);
226
+ });
5
227
  }
6
228
  export { _page as default };
7
229
 
@@ -1 +1 @@
1
- {"version":3,"file":"_page.svelte.js","names":[],"sources":[],"mappings":""}
1
+ {"version":3,"file":"_page.svelte.js","names":["$.attr","$.stringify","$.escape","$.ensure_array_like","$.attr_class","$.clsx","$.attr","$.escape","$.derived","$.escape","$.attr","$.attr_class","$.stringify","$.ensure_array_like","$.derived"],"sources":["../../../../../src/lib/components/ScreenReaderLink/ScreenReaderLink.svelte","../../../../../src/lib/components/SetupStatus/SetupStatus.svelte","../../../../../src/lib/components/SpeechTest/SendKeysDialog.svelte","../../../../../src/lib/components/SpeechTest/SpeechTest.svelte","../../../../../src/routes/setup/+page.svelte"],"sourcesContent":["<script lang=\"ts\">\n import type { Snippet } from 'svelte';\n import { resolve } from '$app/paths';\n import { SCREEN_READER_ID } from '#lib/core/setup.js';\n\n type Props = { children: Snippet };\n\n let { children }: Props = $props();\n</script>\n\n<!-- To the screen reader steps of the Setup instructions. -->\n<a href=\"{resolve('/setup/instructions')}#{SCREEN_READER_ID}\">{@render children()}</a>\n\n<style>\n a {\n color: var(--md-sys-color-primary);\n }\n</style>\n","<script lang=\"ts\">\n import '@material/web/button/outlined-button.js';\n import '@material/web/icon/icon.js';\n import { tick } from 'svelte';\n import ExternalLink from '#lib/components/ExternalLink/ExternalLink.svelte';\n import ScreenReaderLink from '#lib/components/ScreenReaderLink/ScreenReaderLink.svelte';\n import type { CheckRow, CheckTone } from '#lib/core/setup.js';\n\n type Props = {\n /** `null` until the status was read once. */\n rows: CheckRow[] | null;\n /** Whether the last read of the status worked. */\n reachable: boolean;\n /** Reads the status again. */\n onCheck: () => Promise<void>;\n };\n\n let { rows, reachable, onCheck }: Props = $props();\n\n const ICONS: Record<CheckTone, string> = {\n ok: 'check_circle',\n warning: 'warning',\n neutral: 'radio_button_unchecked',\n };\n\n /** What the last \"Check again\" found; empty until someone asks. */\n let result = $state('');\n\n async function check(): Promise<void> {\n result = '';\n await onCheck();\n await tick();\n if (!reachable) return; // The alert says it.\n const warnings = rows?.filter((row) => row.tone === 'warning').length ?? 0;\n result =\n warnings === 0\n ? 'Checked: no warnings.'\n : `Checked: ${warnings} ${warnings === 1 ? 'warning' : 'warnings'}.`;\n }\n</script>\n\n{#if !reachable}\n <p role=\"alert\" class=\"unreachable\">\n The bridge is not reachable.{rows === null ? '' : ' This is the last state that was read.'}\n </p>\n{:else if rows === null}\n <p class=\"note\">Reading the status…</p>\n{/if}\n\n{#if rows !== null}\n <ul aria-label=\"Setup status\">\n {#each rows as row (row.id)}\n <li class={row.tone}>\n <md-icon aria-hidden=\"true\">{ICONS[row.tone]}</md-icon>\n <span class=\"label\">{row.label}</span>\n <span class=\"state\">\n {#if row.tone === 'warning'}<span class=\"visually-hidden\">Warning:</span>{/if}\n {row.state}\n {#if row.library !== null}\n {@const { name, href } = row.library}\n <span\n >({#if href === null}{name}{:else}<ExternalLink {href}\n >{name}<span class=\"visually-hidden\"> on GitHub</span></ExternalLink\n >{/if})</span\n >\n {/if}\n {#if row.help !== null}\n <span class=\"help\">\n {#if 'href' in row.help}\n <ExternalLink href={row.help.href}\n >{row.help.label}<span class=\"visually-hidden\">\n (help for {row.label})</span\n ></ExternalLink\n >\n {:else}\n <ScreenReaderLink\n >{row.help.label}<span class=\"visually-hidden\">\n (help for {row.label})</span\n ></ScreenReaderLink\n >\n {/if}\n </span>\n {/if}\n </span>\n </li>\n {/each}\n </ul>\n{/if}\n\n<!-- svelte-ignore a11y_click_events_have_key_events, a11y_no_static_element_interactions -->\n<md-outlined-button type=\"button\" onclick={() => void check()}>\n {reachable ? 'Check again' : 'Try again'}\n</md-outlined-button>\n\n<p role=\"status\" class=\"note\">{result}</p>\n\n<style>\n ul {\n margin: 0 0 12px;\n padding: 0;\n list-style: none;\n }\n\n li {\n display: grid;\n grid-template-columns: 24px minmax(0, 180px) minmax(0, 1fr);\n gap: 4px 12px;\n align-items: start;\n padding: 8px 0;\n color: var(--md-sys-color-on-surface);\n font-size: 14px;\n line-height: 24px;\n }\n\n li + li {\n border-top: 1px solid var(--md-sys-color-outline-variant);\n }\n\n .ok md-icon {\n color: var(--app-success);\n }\n\n .warning md-icon {\n color: var(--app-warning);\n }\n\n .neutral md-icon {\n color: var(--md-sys-color-on-surface-variant);\n }\n\n .label {\n font-weight: 500;\n }\n\n .state {\n overflow-wrap: anywhere;\n }\n\n .help {\n margin-left: 8px;\n }\n\n @media (max-width: 600px) {\n li {\n grid-template-columns: 24px minmax(0, 1fr);\n }\n\n .state {\n grid-column: 2;\n }\n }\n\n .note,\n .unreachable {\n margin: 0 0 12px;\n color: var(--md-sys-color-on-surface-variant);\n font-size: 13px;\n line-height: 18px;\n }\n\n .unreachable {\n color: var(--md-sys-color-error);\n font-size: 14px;\n line-height: 20px;\n }\n\n p[role='status'] {\n margin: 8px 0 0;\n }\n\n p[role='status']:empty {\n margin: 0;\n }\n\n .visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n }\n</style>\n","<script lang=\"ts\">\n import '@material/web/button/text-button.js';\n import '@material/web/dialog/dialog.js';\n import { CHECK_CHORD } from '#lib/core/setup.js';\n\n type Props = {\n open: boolean;\n onSend: () => void;\n onClose: () => void;\n };\n\n let { open, onSend, onClose }: Props = $props();\n</script>\n\n<md-dialog {open} onclosed={onClose}>\n <div slot=\"headline\">Send {CHECK_CHORD} during a session?</div>\n <div slot=\"content\">\n <p>\n A session is running. The keys go to the window in front on the bridge's machine, and the\n speech they cause is recorded in that session.\n </p>\n </div>\n <div slot=\"actions\">\n <!-- svelte-ignore a11y_click_events_have_key_events, a11y_no_static_element_interactions -->\n <md-text-button type=\"button\" onclick={onClose}>Cancel</md-text-button>\n <!-- svelte-ignore a11y_click_events_have_key_events, a11y_no_static_element_interactions -->\n <md-text-button\n type=\"button\"\n onclick={() => {\n onClose();\n onSend();\n }}>Send</md-text-button\n >\n </div>\n</md-dialog>\n\n<style>\n md-dialog {\n max-width: min(400px, calc(100% - 48px));\n --md-dialog-container-color: var(--md-sys-color-surface-container-high);\n --md-dialog-headline-color: var(--md-sys-color-on-surface);\n --md-dialog-supporting-text-color: var(--md-sys-color-on-surface-variant);\n }\n\n p {\n margin: 0;\n }\n</style>\n","<script lang=\"ts\">\n import '@material/web/button/filled-button.js';\n import '@material/web/button/outlined-button.js';\n import '@material/web/button/text-button.js';\n import { resolve } from '$app/paths';\n import type { InputAvailabilityDto, SpeechEntryDto } from '@screenreader-speech-capture/shared';\n import ExternalLink from '#lib/components/ExternalLink/ExternalLink.svelte';\n import ScreenReaderLink from '#lib/components/ScreenReaderLink/ScreenReaderLink.svelte';\n import { CHECK_CHORD, docsUrl, type CheckVia } from '#lib/core/setup.js';\n import type { CheckPhase } from '#lib/stores/voice-check.svelte.js';\n import SendKeysDialog from './SendKeysDialog.svelte';\n\n type Props = {\n phase: CheckPhase;\n via: CheckVia;\n /** The speech that arrived, oldest first. */\n entries: readonly SpeechEntryDto[];\n reconnecting: boolean;\n failure: string;\n /**\n * The page is opened on the screen reader's own machine: the screen reader reads it, so what\n * arrived is hidden from it, and the page's own speech can pass the check.\n */\n local: boolean;\n /** Whether the bridge can send keys; `null` until the status was read. */\n input: InputAvailabilityDto | null;\n /** The port the bridge listens on for speech, and its version; `null` until known. */\n port: number | null;\n version: string | null;\n onListen: () => void;\n onSendKeys: () => void;\n onStop: () => void;\n /** Read right before the keys are sent: they need a confirmation while a session runs. */\n isSessionRunning: () => Promise<boolean>;\n };\n\n let {\n phase,\n via,\n entries,\n reconnecting,\n failure,\n local,\n input,\n port,\n version,\n onListen,\n onSendKeys,\n onStop,\n isSessionRunning,\n }: Props = $props();\n\n let confirmOpen = $state(false);\n let asking = $state(false);\n\n const busy = $derived(phase === 'starting' || phase === 'listening');\n const cannotSend = $derived(busy || input?.available !== true);\n\n const progress = $derived(\n !busy\n ? ''\n : reconnecting\n ? 'Connection lost, reconnecting…'\n : via === 'keys'\n ? `Sending ${CHECK_CHORD} and waiting for speech…`\n : 'Listening. Make the screen reader speak, for example with a key press.',\n );\n const outcome = $derived(\n phase === 'heard'\n ? 'Speech arrived.'\n : phase === 'silent'\n ? 'Nothing arrived.'\n : phase === 'failed'\n ? `The check failed: ${failure}`\n : '',\n );\n // On the bridge's machine the progress is not announced: its speech would pass the check.\n const announced = $derived(outcome !== '' ? outcome : local ? '' : progress);\n\n async function send(): Promise<void> {\n if (cannotSend || asking) return;\n asking = true;\n try {\n if (await isSessionRunning()) confirmOpen = true;\n else onSendKeys();\n } finally {\n asking = false;\n }\n }\n</script>\n\n<p class=\"scope\">\n Checks that what the screen reader says reaches the bridge. Listen and make it speak, or let the\n bridge send {CHECK_CHORD} (read the window title in NVDA and JAWS) to the window in front.\n</p>\n{#if local}\n <p class=\"scope\">\n This page is opened on the bridge's own machine: the screen reader reads this page too, and that\n speech can pass the check.\n </p>\n{/if}\n\n<!-- Soft-disabled: a disabled button would drop the focus it has after a click. -->\n<div class=\"actions\">\n <!-- svelte-ignore a11y_click_events_have_key_events, a11y_no_static_element_interactions -->\n <md-filled-button\n type=\"button\"\n soft-disabled={busy ? true : undefined}\n onclick={() => {\n if (!busy) onListen();\n }}>Listen</md-filled-button\n >\n <!-- svelte-ignore a11y_click_events_have_key_events, a11y_no_static_element_interactions -->\n <md-outlined-button\n type=\"button\"\n soft-disabled={cannotSend ? true : undefined}\n onclick={() => void send()}>Send {CHECK_CHORD}</md-outlined-button\n >\n <!-- svelte-ignore a11y_click_events_have_key_events, a11y_no_static_element_interactions -->\n <md-text-button\n type=\"button\"\n soft-disabled={busy ? undefined : true}\n onclick={() => {\n if (busy) onStop();\n }}>Stop</md-text-button\n >\n</div>\n\n{#if input !== null && !input.available}\n <p class=\"scope\">\n {CHECK_CHORD} can't be sent: {input.reason ?? 'native input is not available'}\n </p>\n{/if}\n\n{#if local && progress !== ''}<p class=\"result\">{progress}</p>{/if}\n<!-- A live region that is always there. It says how it went, never what was spoken. -->\n<p role=\"status\" class=\"result {phase}\">{announced}</p>\n\n{#if phase === 'heard'}\n <ol aria-label=\"Speech that arrived\" aria-hidden={local ? 'true' : undefined}>\n {#each entries as entry (entry.seq)}\n <li>{entry.text}</li>\n {/each}\n </ol>\n <p class=\"scope\">\n Wrong characters? Set the <a href={resolve('/settings')}>text encoding</a>.\n </p>\n{:else if phase === 'silent' && via === 'manual'}\n <ul class=\"hints\">\n <li>\n <ScreenReaderLink>Select the socket voice</ScreenReaderLink> in the screen reader.\n </li>\n <li>\n The voice must send to {port === null ? \"the bridge's port\" : `port ${port}`}\n (<ExternalLink href={docsUrl(version, 'usage/troubleshooting.md#speech')}\n >troubleshooting</ExternalLink\n >).\n </li>\n <li>\n JAWS: turn off\n <ExternalLink href={docsUrl(version, 'usage/vm-setup.md#jaws-language-detection')}\n >Detect Language Changes</ExternalLink\n >.\n </li>\n </ul>\n{:else if phase === 'silent'}\n <p class=\"scope\">\n {CHECK_CHORD} was sent. Use Listen and make the screen reader speak by hand: if that works, the keys\n don't reach the screen reader (<ExternalLink\n href={docsUrl(version, 'usage/troubleshooting.md#browser-and-input')}\n >troubleshooting</ExternalLink\n >).\n </p>\n{/if}\n\n<SendKeysDialog open={confirmOpen} onSend={onSendKeys} onClose={() => (confirmOpen = false)} />\n\n<style>\n .actions {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n margin-bottom: 12px;\n }\n\n .result {\n margin: 0 0 8px;\n color: var(--md-sys-color-on-surface);\n font-size: 14px;\n line-height: 20px;\n overflow-wrap: anywhere;\n }\n\n .result:empty {\n margin: 0;\n }\n\n .result.heard {\n color: var(--app-success);\n font-weight: 500;\n }\n\n .result.failed {\n color: var(--md-sys-color-error);\n }\n\n ol {\n margin: 0 0 12px;\n padding: 8px 12px 8px 36px;\n border-radius: 12px;\n background: var(--md-sys-color-surface-container-low);\n color: var(--md-sys-color-on-surface);\n font-size: var(--app-log-text-size);\n line-height: var(--app-log-text-line-height);\n overflow-wrap: anywhere;\n }\n\n .hints {\n margin: 0;\n padding-left: 20px;\n color: var(--md-sys-color-on-surface);\n font-size: 14px;\n line-height: 20px;\n }\n\n .hints li + li {\n margin-top: 4px;\n }\n\n /* The link to the settings; the other links style themselves. */\n p a {\n color: var(--md-sys-color-primary);\n }\n</style>\n","<script lang=\"ts\">\n import { onMount, untrack } from 'svelte';\n import SetupStatus from '#lib/components/SetupStatus/SetupStatus.svelte';\n import SpeechTest from '#lib/components/SpeechTest/SpeechTest.svelte';\n import { appStores } from '#lib/composition.js';\n import { deriveCheckRows } from '#lib/core/setup.js';\n import type { PageProps } from './$types';\n\n let { data }: PageProps = $props();\n\n const { status: statusStore, voiceCheck } = appStores();\n\n // On the server the status store is still empty, the layout's load has the status.\n const status = $derived(statusStore.status ?? data.status);\n const rows = $derived(status === null ? null : deriveCheckRows(status));\n\n onMount(() => {\n // The layout's status is as old as the app's first page; this page is about the current one.\n void statusStore.retry();\n return () => voiceCheck.stop();\n });\n\n // Speech arrived: the voice row has something new to say.\n $effect(() => {\n if (voiceCheck.phase === 'heard') untrack(() => void statusStore.retry());\n });\n\n async function isSessionRunning(): Promise<boolean> {\n await statusStore.retry();\n return (statusStore.status ?? data.status)?.session.current != null;\n }\n</script>\n\n<svelte:head>\n <title>Setup · Speech Capture</title>\n</svelte:head>\n\n<section class=\"part\" aria-labelledby=\"status-heading\">\n <h2 id=\"status-heading\">Status</h2>\n <SetupStatus {rows} reachable={statusStore.reachable} onCheck={() => statusStore.retry()} />\n</section>\n\n<section class=\"part\" aria-labelledby=\"test-heading\">\n <h2 id=\"test-heading\">Speech test</h2>\n <SpeechTest\n phase={voiceCheck.phase}\n via={voiceCheck.via}\n entries={voiceCheck.entries}\n reconnecting={voiceCheck.reconnecting}\n failure={voiceCheck.failure}\n local={data.local}\n input={status?.input.native ?? null}\n port={status?.tcp.port ?? null}\n version={status?.bridge.version ?? null}\n onListen={() => void voiceCheck.start('manual')}\n onSendKeys={() => void voiceCheck.start('keys')}\n onStop={() => voiceCheck.stop()}\n {isSessionRunning}\n />\n</section>\n"],"mappings":"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"}
@@ -0,0 +1,12 @@
1
+ // src/routes/setup/instructions/+page.server.ts
2
+ var load = async ({ locals }) => {
3
+ try {
4
+ const { http } = await locals.bridge.config("active");
5
+ return { http };
6
+ } catch {
7
+ return { http: null };
8
+ }
9
+ };
10
+ export { load };
11
+
12
+ //# sourceMappingURL=_page.server.ts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_page.server.ts.js","names":[],"sources":["../../../../../../src/routes/setup/instructions/+page.server.ts"],"sourcesContent":["import type { PageServerLoad } from './$types';\n\nexport const load: PageServerLoad = async ({ locals }) => {\n try {\n // Where the HTTP API listens: the instructions for the test machine fill it in.\n const { http } = await locals.bridge.config('active');\n return { http };\n } catch {\n // The instructions show the defaults.\n return { http: null };\n }\n};\n"],"mappings":";AAEA,IAAa,OAAuB,OAAO,EAAE,aAAa;CACxD,IAAI;EAEF,MAAM,EAAE,SAAS,MAAM,OAAO,OAAO,OAAO,QAAQ;EACpD,OAAO,EAAE,KAAK;CAChB,QAAQ;EAEN,OAAO,EAAE,MAAM,KAAK;CACtB;AACF"}
@@ -0,0 +1,271 @@
1
+ import { mt as resolve } from "../../../../chunks/internal.js";
2
+ import { a as head, c as stringify, d as attr, h as escape_html, r as derived } from "../../../../chunks/server2.js";
3
+ import "../../../../chunks/index-server.js";
4
+ import { t as page } from "../../../../chunks/state.js";
5
+ import "../../../../chunks/paths.js";
6
+ import "../../../../chunks/text-button.js";
7
+ import "../../../../chunks/icon.js";
8
+ import { t as ExternalLink } from "../../../../chunks/ExternalLink.js";
9
+ import { y as HOST_NAME_PATTERN } from "../../../../chunks/src.js";
10
+ import { i as SCREEN_READER_ID, o as docsUrl, t as appStores } from "../../../../chunks/composition.js";
11
+ // ../shared/src/services.ts
12
+ /** Playwright MCP (streamable HTTP): `http://<bridge>:5151/playwright-mcp`. */
13
+ var PLAYWRIGHT_MCP_PATH = "/playwright-mcp";
14
+ // src/lib/components/CommandBlock/CommandBlock.svelte
15
+ function CommandBlock($$renderer, $$props) {
16
+ $$renderer.component(($$renderer) => {
17
+ /** What the block holds, for the button's name: `Copy <label>`. */
18
+ /** Resolves `false` when the browser didn't take it. */
19
+ let { label, text, onCopy } = $$props;
20
+ const result = derived(() => "");
21
+ $$renderer.push(`<div class="command svelte-1c2bq9d"><pre class="svelte-1c2bq9d"><code class="svelte-1c2bq9d">${escape_html(text)}</code></pre> <md-text-button type="button"${attr("aria-label", `Copy ${stringify(label)}`)}><md-icon slot="icon" aria-hidden="true">content_copy</md-icon> Copy</md-text-button></div> <p role="status" class="svelte-1c2bq9d">${escape_html(result())}</p>`);
22
+ });
23
+ }
24
+ var DEFAULT_VOICE_HOST = "127.0.0.1";
25
+ /** Installs the socket voice and registers the default one. */
26
+ var INSTALL_VOICE = "npm install -g text-to-socket-engine\ntext-to-socket-engine-register";
27
+ /** The socket voice for a bridge that listens on `host` and `port` (`tcp` of the status). */
28
+ function voiceSetup({ host, port }) {
29
+ const target = [
30
+ "0.0.0.0",
31
+ "::",
32
+ "localhost"
33
+ ].includes(host) ? DEFAULT_VOICE_HOST : host;
34
+ const name = `Text To Socket ${target}:${port}`;
35
+ if (target === DEFAULT_VOICE_HOST && port === 4449) return {
36
+ name,
37
+ addVoice: null
38
+ };
39
+ const id = `ssc${port}`;
40
+ return {
41
+ name,
42
+ addVoice: `text-to-socket-engine-add-voice ${id} "${name}" ${target} ${port} voice=${id}`
43
+ };
44
+ }
45
+ var isLoopback = (host) => [
46
+ "localhost",
47
+ "::1",
48
+ "[::1]"
49
+ ].includes(host) || /^127(\.\d+){3}$/.test(host);
50
+ /**
51
+ * The address for the test machine: the one the page was opened with, which evidently reaches the
52
+ * bridge. Opened over loopback (or by a name that doesn't belong in a command), the address is left
53
+ * open and only the bridge's HTTP port is filled in.
54
+ */
55
+ function bridgeAddress(page, httpPort) {
56
+ const { hostname, origin } = page;
57
+ return (/^\[[0-9a-fA-F:.]+\]$/.test(hostname) || hostname !== "*" && HOST_NAME_PATTERN.test(hostname)) && !isLoopback(hostname) && hostname !== "0.0.0.0" ? {
58
+ url: origin,
59
+ placeholder: false
60
+ } : {
61
+ url: `http://<vm-ip>:${httpPort}`,
62
+ placeholder: true
63
+ };
64
+ }
65
+ /** Whether `http.host` keeps other machines out. */
66
+ function listensOnLoopbackOnly(httpHost) {
67
+ return isLoopback(httpHost);
68
+ }
69
+ /** Opens the bridge's HTTP port in the Windows firewall (administrator PowerShell). */
70
+ function firewallCommand(httpPort) {
71
+ return `New-NetFirewallRule -DisplayName "screenreader-speech-capture" \`
72
+ -Direction Inbound -Protocol TCP -LocalPort ${httpPort} -Action Allow -Profile Any`;
73
+ }
74
+ /** Stores the bridge's address for the client, and checks it. */
75
+ function clientCommands(url) {
76
+ return [`npx screenreader-speech-capture-client config set url ${url}`, "npx screenreader-speech-capture-client status"].join("\n");
77
+ }
78
+ /** The test project's packages; Playwright must match the bridge's version exactly. */
79
+ function playwrightInstall(version) {
80
+ return `npm i -D screenreader-speech-capture-client @playwright/test@${version} @types/node`;
81
+ }
82
+ /** The entry of an MCP client's configuration for the bridge's Playwright MCP. */
83
+ function mcpClientConfig(url) {
84
+ const server = { url: `${url}${PLAYWRIGHT_MCP_PATH}` };
85
+ return JSON.stringify({ mcpServers: { "screenreader-vm": server } }, null, 2);
86
+ }
87
+ // src/lib/components/TestMachineInstructions/TestMachineInstructions.svelte
88
+ function TestMachineInstructions($$renderer, $$props) {
89
+ $$renderer.component(($$renderer) => {
90
+ /** The page is opened on the bridge's machine: nothing shows yet that others reach it. */
91
+ /** `http.host` keeps other machines out. */
92
+ /** The services as the status has them; `null` until known. */
93
+ let { address, local, loopbackOnly, httpPort, playwright, mcp, version, onCopy } = $$props;
94
+ const docs = (path) => docsUrl(version, path);
95
+ $$renderer.push(`<section class="part" aria-labelledby="machine-heading"><h2 id="machine-heading">Test machine</h2> `);
96
+ if (loopbackOnly) $$renderer.push(`<!--[0--><p class="warning svelte-2oo2iv">The bridge only listens on its own machine, so other machines can't connect. Start it without <code class="svelte-2oo2iv">--host</code>, or with an address they reach.</p>`);
97
+ else $$renderer.push("<!--[-1-->");
98
+ $$renderer.push(`<!--]--> `);
99
+ if (local) {
100
+ $$renderer.push(`<!--[0--><p class="svelte-2oo2iv">Windows can block the port without asking. On the bridge's machine, in an <strong>administrator</strong> PowerShell (`);
101
+ ExternalLink($$renderer, {
102
+ href: docs("usage/vm-setup.md#firewall"),
103
+ children: ($$renderer) => {
104
+ $$renderer.push(`<!---->firewall`);
105
+ },
106
+ $$slots: { default: true }
107
+ });
108
+ $$renderer.push(`<!---->):</p> `);
109
+ CommandBlock($$renderer, {
110
+ label: "the firewall command",
111
+ text: firewallCommand(httpPort),
112
+ onCopy
113
+ });
114
+ $$renderer.push(`<!---->`);
115
+ } else $$renderer.push(`<!--[-1--><p class="svelte-2oo2iv">This machine already reaches the bridge, so the firewall lets it through.</p>`);
116
+ $$renderer.push(`<!--]--> <p class="svelte-2oo2iv">On the test machine (Node 20 or newer), store the bridge's address and check it:</p> `);
117
+ CommandBlock($$renderer, {
118
+ label: "the client commands",
119
+ text: clientCommands(address.url),
120
+ onCopy
121
+ });
122
+ $$renderer.push(`<!----> `);
123
+ if (address.placeholder) $$renderer.push(`<!--[0--><p class="svelte-2oo2iv">Replace <code class="svelte-2oo2iv">&lt;vm-ip></code> with the VM's address: one from the <code class="svelte-2oo2iv">HTTP API</code> row of the bridge's start output, or from <code class="svelte-2oo2iv">ipconfig</code> on the VM.</p>`);
124
+ else $$renderer.push("<!--[-1-->");
125
+ $$renderer.push(`<!--]--> <h3 class="svelte-2oo2iv">Playwright tests</h3> `);
126
+ if (playwright?.state === "stopped") $$renderer.push(`<!--[0--><p class="svelte-2oo2iv">The Playwright server is off. <a${attr("href", resolve("/settings"))} class="svelte-2oo2iv">Turn it on in Settings.</a></p>`);
127
+ else if (playwright !== null) {
128
+ $$renderer.push(`<!--[1--><p class="svelte-2oo2iv">The test project needs exactly the bridge's Playwright version:</p> `);
129
+ CommandBlock($$renderer, {
130
+ label: "the test packages command",
131
+ text: playwrightInstall(playwright.version),
132
+ onCopy
133
+ });
134
+ $$renderer.push(`<!---->`);
135
+ } else $$renderer.push("<!--[-1-->");
136
+ $$renderer.push(`<!--]--> <p class="svelte-2oo2iv">`);
137
+ ExternalLink($$renderer, {
138
+ href: docs("usage/client.md"),
139
+ children: ($$renderer) => {
140
+ $$renderer.push(`<!---->Set up the tests with the test client`);
141
+ },
142
+ $$slots: { default: true }
143
+ });
144
+ $$renderer.push(`<!----></p> <h3 class="svelte-2oo2iv">AI agents</h3> `);
145
+ if (mcp?.state === "stopped") $$renderer.push(`<!--[0--><p class="svelte-2oo2iv">Playwright MCP is off. <a${attr("href", resolve("/settings"))} class="svelte-2oo2iv">Turn it on in Settings.</a></p>`);
146
+ else {
147
+ $$renderer.push(`<!--[-1--><p class="svelte-2oo2iv">Point the agent's MCP client at the bridge:</p> `);
148
+ CommandBlock($$renderer, {
149
+ label: "the MCP configuration",
150
+ text: mcpClientConfig(address.url),
151
+ onCopy
152
+ });
153
+ $$renderer.push(`<!---->`);
154
+ }
155
+ $$renderer.push(`<!--]--> <p class="svelte-2oo2iv">`);
156
+ ExternalLink($$renderer, {
157
+ href: docs("usage/agents.md"),
158
+ children: ($$renderer) => {
159
+ $$renderer.push(`<!---->How agents use the bridge`);
160
+ },
161
+ $$slots: { default: true }
162
+ });
163
+ $$renderer.push(`<!----></p></section>`);
164
+ });
165
+ }
166
+ // src/lib/components/VoiceInstructions/VoiceInstructions.svelte
167
+ function VoiceInstructions($$renderer, $$props) {
168
+ $$renderer.component(($$renderer) => {
169
+ /** Where the bridge listens for speech; `null` until known (the defaults are shown). */
170
+ let { tcp, version, onCopy } = $$props;
171
+ const voice = derived(() => voiceSetup(tcp ?? {
172
+ host: "127.0.0.1",
173
+ port: 4449
174
+ }));
175
+ const docs = (path) => docsUrl(version, path);
176
+ $$renderer.push(`<section class="part" aria-labelledby="voice-heading"><h2 id="voice-heading">Socket voice</h2> <p class="svelte-1tbxerf">On the bridge's machine, in an <strong>administrator</strong> prompt:</p> `);
177
+ CommandBlock($$renderer, {
178
+ label: "the install commands",
179
+ text: INSTALL_VOICE,
180
+ onCopy
181
+ });
182
+ $$renderer.push(`<!----> `);
183
+ if (voice().addVoice !== null) {
184
+ $$renderer.push(`<!--[0--><p class="svelte-1tbxerf">The default voice doesn't send to where this bridge listens. Add a voice that does, in the
185
+ same prompt:</p> `);
186
+ CommandBlock($$renderer, {
187
+ label: "the add-voice command",
188
+ text: voice().addVoice,
189
+ onCopy
190
+ });
191
+ $$renderer.push(`<!---->`);
192
+ } else $$renderer.push("<!--[-1-->");
193
+ $$renderer.push(`<!--]--> <ul class="more svelte-1tbxerf"><li class="svelte-1tbxerf">`);
194
+ ExternalLink($$renderer, {
195
+ href: docs("usage/troubleshooting.md#speech"),
196
+ children: ($$renderer) => {
197
+ $$renderer.push(`<!---->The voice is not listed`);
198
+ },
199
+ $$slots: { default: true }
200
+ });
201
+ $$renderer.push(`<!----></li> <li class="svelte-1tbxerf">`);
202
+ ExternalLink($$renderer, {
203
+ href: docs("usage/vm-setup.md#more-voices--other-ports"),
204
+ children: ($$renderer) => {
205
+ $$renderer.push(`<!---->More voices, and removing them`);
206
+ },
207
+ $$slots: { default: true }
208
+ });
209
+ $$renderer.push(`<!----></li></ul></section> <section class="part"${attr("aria-labelledby", SCREEN_READER_ID)}><h2${attr("id", SCREEN_READER_ID)} tabindex="-1">Screen reader</h2> <p class="svelte-1tbxerf">Select the voice <strong>${escape_html(voice().name)}</strong>.</p> <h3 class="svelte-1tbxerf">NVDA</h3> <ol class="svelte-1tbxerf"><li class="svelte-1tbxerf">Open the NVDA menu (NVDA+N) → Preferences → Settings… → Speech.</li> <li class="svelte-1tbxerf">Under Synthesizer, choose Change… → Microsoft Speech API version 5 → OK.</li> <li class="svelte-1tbxerf">Under Voice, select ${escape_html(voice().name)}.</li></ol> <h3 class="svelte-1tbxerf">JAWS</h3> <ol class="svelte-1tbxerf"><li class="svelte-1tbxerf">Open JAWS → Options → Voices → Voice Adjustment….</li> <li class="svelte-1tbxerf">Create or select a voice profile and set its Synthesizer to SAPI 5 (the label can differ
210
+ between JAWS versions).</li> <li class="svelte-1tbxerf">Select ${escape_html(voice().name)} as the Voice, apply it to all contexts and save the profile.</li> <li class="svelte-1tbxerf">In Settings Center (Insert+F2), turn off <em>Detect Language Changes</em> (German: <em lang="de">Sprachwechsel erkennen</em>), or web pages are read by another voice.</li></ol> <ul class="more svelte-1tbxerf"><li class="svelte-1tbxerf">`);
211
+ ExternalLink($$renderer, {
212
+ href: docs("usage/vm-setup.md#a-german-voice"),
213
+ children: ($$renderer) => {
214
+ $$renderer.push(`<!---->JAWS in German or another language doesn't list the voice`);
215
+ },
216
+ $$slots: { default: true }
217
+ });
218
+ $$renderer.push(`<!----></li> <li class="svelte-1tbxerf">`);
219
+ ExternalLink($$renderer, {
220
+ href: docs("usage/vm-setup.md#prepare-the-vm"),
221
+ children: ($$renderer) => {
222
+ $$renderer.push(`<!---->Prepare the VM for CI`);
223
+ },
224
+ $$slots: { default: true }
225
+ });
226
+ $$renderer.push(`<!----></li> <li class="svelte-1tbxerf">`);
227
+ ExternalLink($$renderer, {
228
+ href: docs("usage/vm-setup.md#screen-reader-licensing"),
229
+ children: ($$renderer) => {
230
+ $$renderer.push(`<!---->Screen reader licensing`);
231
+ },
232
+ $$slots: { default: true }
233
+ });
234
+ $$renderer.push(`<!----></li></ul></section>`);
235
+ });
236
+ }
237
+ // src/routes/setup/instructions/+page.svelte
238
+ function _page($$renderer, $$props) {
239
+ $$renderer.component(($$renderer) => {
240
+ let { data } = $$props;
241
+ const { status: statusStore, clipboard } = appStores();
242
+ const status = derived(() => statusStore.status ?? data.status);
243
+ const httpPort = derived(() => data.http?.port ?? 5151);
244
+ const copy = (text) => clipboard.copy(text);
245
+ head("149ah0g", $$renderer, ($$renderer) => {
246
+ $$renderer.title(($$renderer) => {
247
+ $$renderer.push(`<title>Setup instructions · Speech Capture</title>`);
248
+ });
249
+ });
250
+ VoiceInstructions($$renderer, {
251
+ tcp: status()?.tcp ?? null,
252
+ version: status()?.bridge.version ?? null,
253
+ onCopy: copy
254
+ });
255
+ $$renderer.push(`<!----> `);
256
+ TestMachineInstructions($$renderer, {
257
+ address: bridgeAddress(page.url, httpPort()),
258
+ local: data.local,
259
+ loopbackOnly: data.http !== null && listensOnLoopbackOnly(data.http.host),
260
+ httpPort: httpPort(),
261
+ playwright: status()?.playwright ?? null,
262
+ mcp: status()?.mcp ?? null,
263
+ version: status()?.bridge.version ?? null,
264
+ onCopy: copy
265
+ });
266
+ $$renderer.push(`<!---->`);
267
+ });
268
+ }
269
+ export { _page as default };
270
+
271
+ //# sourceMappingURL=_page.svelte.js.map