screenreader-speech-capture 0.1.0 → 0.3.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 (206) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +4 -0
  3. package/dist/cli.mjs +15 -5
  4. package/dist/ui/adapter-node.js +4 -4
  5. package/dist/ui/client/ui/_app/immutable/assets/0.CeDGT9MW.css +1 -0
  6. package/dist/ui/client/ui/_app/immutable/assets/0.CeDGT9MW.css.br +0 -0
  7. package/dist/ui/client/ui/_app/immutable/assets/0.CeDGT9MW.css.gz +0 -0
  8. package/dist/ui/client/ui/_app/immutable/assets/2.DJfIfRJB.css +1 -0
  9. package/dist/ui/client/ui/_app/immutable/assets/2.DJfIfRJB.css.br +0 -0
  10. package/dist/ui/client/ui/_app/immutable/assets/2.DJfIfRJB.css.gz +0 -0
  11. package/dist/ui/client/ui/_app/immutable/assets/material-symbols-outlined-latin-400-normal.BhEvR8fk.woff2 +0 -0
  12. package/dist/ui/client/ui/_app/immutable/assets/roboto-flex-cyrillic-ext-opsz-normal.nDQikIyu.woff2 +0 -0
  13. package/dist/ui/client/ui/_app/immutable/assets/roboto-flex-cyrillic-opsz-normal.SjuC5rw5.woff2 +0 -0
  14. package/dist/ui/client/ui/_app/immutable/assets/roboto-flex-greek-opsz-normal.C14fFRny.woff2 +0 -0
  15. package/dist/ui/client/ui/_app/immutable/assets/roboto-flex-latin-ext-opsz-normal.xNclTVCo.woff2 +0 -0
  16. package/dist/ui/client/ui/_app/immutable/assets/roboto-flex-latin-opsz-normal.hy8fyBBC.woff2 +0 -0
  17. package/dist/ui/client/ui/_app/immutable/assets/roboto-flex-vietnamese-opsz-normal.C-H_yGOU.woff2 +0 -0
  18. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-400-normal.B3hIXASd.woff +0 -0
  19. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-400-normal.C-_K-ZCn.woff2 +0 -0
  20. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-500-normal.DGZ7-lUP.woff2 +0 -0
  21. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-500-normal.NpUJFYX7.woff +0 -0
  22. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-ext-400-normal.BHxv52bw.woff2 +0 -0
  23. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-ext-400-normal.W26xs1TL.woff +0 -0
  24. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-ext-500-normal.6xdwlG7p.woff +0 -0
  25. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-cyrillic-ext-500-normal.DC57U9n8.woff2 +0 -0
  26. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-greek-400-normal.CH_u3Aru.woff2 +0 -0
  27. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-greek-400-normal.P8xe1gs1.woff +0 -0
  28. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-greek-500-normal.C2M8jX6G.woff +0 -0
  29. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-greek-500-normal.DpRFkptA.woff2 +0 -0
  30. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-400-normal.DBZPkcnn.woff +0 -0
  31. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-400-normal.GekRknry.woff2 +0 -0
  32. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-500-normal.D6j6AMzd.woff +0 -0
  33. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-500-normal.pxIOXZmA.woff2 +0 -0
  34. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-ext-400-normal.BwLXVYNz.woff +0 -0
  35. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-ext-400-normal.DLAV9S_w.woff2 +0 -0
  36. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-ext-500-normal.B1IjfbhL.woff +0 -0
  37. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-latin-ext-500-normal.Db3ge6Oe.woff2 +0 -0
  38. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-vietnamese-400-normal.CzWHQABp.woff +0 -0
  39. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-vietnamese-400-normal.yYTFiTTs.woff2 +0 -0
  40. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-vietnamese-500-normal.Cq-quQMu.woff2 +0 -0
  41. package/dist/ui/client/ui/_app/immutable/assets/roboto-mono-vietnamese-500-normal.IxzxMIj7.woff +0 -0
  42. package/dist/ui/client/ui/_app/immutable/chunks/BaD2EyfF.js +1 -0
  43. package/dist/ui/client/ui/_app/immutable/chunks/BaD2EyfF.js.br +1 -0
  44. package/dist/ui/client/ui/_app/immutable/chunks/BaD2EyfF.js.gz +0 -0
  45. package/dist/ui/client/ui/_app/immutable/chunks/CcBdu3S8.js +3 -0
  46. package/dist/ui/client/ui/_app/immutable/chunks/CcBdu3S8.js.br +0 -0
  47. package/dist/ui/client/ui/_app/immutable/chunks/CcBdu3S8.js.gz +0 -0
  48. package/dist/ui/client/ui/_app/immutable/chunks/DSHrAZZ8.js +37 -0
  49. package/dist/ui/client/ui/_app/immutable/chunks/DSHrAZZ8.js.br +0 -0
  50. package/dist/ui/client/ui/_app/immutable/chunks/DSHrAZZ8.js.gz +0 -0
  51. package/dist/ui/client/ui/_app/immutable/chunks/DbiAGPgw.js +1 -0
  52. package/dist/ui/client/ui/_app/immutable/chunks/DbiAGPgw.js.br +2 -0
  53. package/dist/ui/client/ui/_app/immutable/chunks/DbiAGPgw.js.gz +0 -0
  54. package/dist/ui/client/ui/_app/immutable/chunks/Dg9MaatX.js +1 -0
  55. package/dist/ui/client/ui/_app/immutable/chunks/Dg9MaatX.js.br +0 -0
  56. package/dist/ui/client/ui/_app/immutable/chunks/Dg9MaatX.js.gz +0 -0
  57. package/dist/ui/client/ui/_app/immutable/chunks/DvmLiMpQ.js +3 -0
  58. package/dist/ui/client/ui/_app/immutable/chunks/DvmLiMpQ.js.br +0 -0
  59. package/dist/ui/client/ui/_app/immutable/chunks/DvmLiMpQ.js.gz +0 -0
  60. package/dist/ui/client/ui/_app/immutable/entry/app.2mjWY9ga.js +2 -0
  61. package/dist/ui/client/ui/_app/immutable/entry/app.2mjWY9ga.js.br +0 -0
  62. package/dist/ui/client/ui/_app/immutable/entry/app.2mjWY9ga.js.gz +0 -0
  63. package/dist/ui/client/ui/_app/immutable/entry/start.BHpKgjPx.js +2 -0
  64. package/dist/ui/client/ui/_app/immutable/entry/start.BHpKgjPx.js.br +0 -0
  65. package/dist/ui/client/ui/_app/immutable/entry/start.BHpKgjPx.js.gz +0 -0
  66. package/dist/ui/client/ui/_app/immutable/nodes/0.CQ_XophD.js +1 -0
  67. package/dist/ui/client/ui/_app/immutable/nodes/0.CQ_XophD.js.br +0 -0
  68. package/dist/ui/client/ui/_app/immutable/nodes/0.CQ_XophD.js.gz +0 -0
  69. package/dist/ui/client/ui/_app/immutable/nodes/1.Bd-KoKuj.js +1 -0
  70. package/dist/ui/client/ui/_app/immutable/nodes/1.Bd-KoKuj.js.br +0 -0
  71. package/dist/ui/client/ui/_app/immutable/nodes/1.Bd-KoKuj.js.gz +0 -0
  72. package/dist/ui/client/ui/_app/immutable/nodes/2.BTJ1n3E7.js +224 -0
  73. package/dist/ui/client/ui/_app/immutable/nodes/2.BTJ1n3E7.js.br +0 -0
  74. package/dist/ui/client/ui/_app/immutable/nodes/2.BTJ1n3E7.js.gz +0 -0
  75. package/dist/ui/client/ui/_app/immutable/nodes/3.CsdEJLWJ.js +1 -0
  76. package/dist/ui/client/ui/_app/immutable/nodes/3.CsdEJLWJ.js.br +0 -0
  77. package/dist/ui/client/ui/_app/immutable/nodes/3.CsdEJLWJ.js.gz +0 -0
  78. package/dist/ui/client/ui/_app/immutable/nodes/4.CXVi2Rvi.js +1 -0
  79. package/dist/ui/client/ui/_app/immutable/nodes/4.CXVi2Rvi.js.br +0 -0
  80. package/dist/ui/client/ui/_app/immutable/nodes/4.CXVi2Rvi.js.gz +0 -0
  81. package/dist/ui/client/ui/_app/version.json +1 -0
  82. package/dist/ui/client/ui/_app/version.json.br +0 -0
  83. package/dist/ui/client/ui/_app/version.json.gz +0 -0
  84. package/dist/ui/server/.vite/manifest.json +269 -4
  85. package/dist/ui/server/_app/immutable/assets/_layout.CeDGT9MW.css +1 -0
  86. package/dist/ui/server/_app/immutable/assets/_page.DJfIfRJB.css +1 -0
  87. package/dist/ui/server/_app/immutable/assets/material-symbols-outlined-latin-400-normal.BhEvR8fk.woff2 +0 -0
  88. package/dist/ui/server/_app/immutable/assets/roboto-flex-cyrillic-ext-opsz-normal.nDQikIyu.woff2 +0 -0
  89. package/dist/ui/server/_app/immutable/assets/roboto-flex-cyrillic-opsz-normal.SjuC5rw5.woff2 +0 -0
  90. package/dist/ui/server/_app/immutable/assets/roboto-flex-greek-opsz-normal.C14fFRny.woff2 +0 -0
  91. package/dist/ui/server/_app/immutable/assets/roboto-flex-latin-ext-opsz-normal.xNclTVCo.woff2 +0 -0
  92. package/dist/ui/server/_app/immutable/assets/roboto-flex-latin-opsz-normal.hy8fyBBC.woff2 +0 -0
  93. package/dist/ui/server/_app/immutable/assets/roboto-flex-vietnamese-opsz-normal.C-H_yGOU.woff2 +0 -0
  94. package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-400-normal.B3hIXASd.woff +0 -0
  95. package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-400-normal.C-_K-ZCn.woff2 +0 -0
  96. package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-500-normal.DGZ7-lUP.woff2 +0 -0
  97. package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-500-normal.NpUJFYX7.woff +0 -0
  98. package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-ext-400-normal.BHxv52bw.woff2 +0 -0
  99. package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-ext-400-normal.W26xs1TL.woff +0 -0
  100. package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-ext-500-normal.6xdwlG7p.woff +0 -0
  101. package/dist/ui/server/_app/immutable/assets/roboto-mono-cyrillic-ext-500-normal.DC57U9n8.woff2 +0 -0
  102. package/dist/ui/server/_app/immutable/assets/roboto-mono-greek-400-normal.CH_u3Aru.woff2 +0 -0
  103. package/dist/ui/server/_app/immutable/assets/roboto-mono-greek-400-normal.P8xe1gs1.woff +0 -0
  104. package/dist/ui/server/_app/immutable/assets/roboto-mono-greek-500-normal.C2M8jX6G.woff +0 -0
  105. package/dist/ui/server/_app/immutable/assets/roboto-mono-greek-500-normal.DpRFkptA.woff2 +0 -0
  106. package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-400-normal.DBZPkcnn.woff +0 -0
  107. package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-400-normal.GekRknry.woff2 +0 -0
  108. package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-500-normal.D6j6AMzd.woff +0 -0
  109. package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-500-normal.pxIOXZmA.woff2 +0 -0
  110. package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-ext-400-normal.BwLXVYNz.woff +0 -0
  111. package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-ext-400-normal.DLAV9S_w.woff2 +0 -0
  112. package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-ext-500-normal.B1IjfbhL.woff +0 -0
  113. package/dist/ui/server/_app/immutable/assets/roboto-mono-latin-ext-500-normal.Db3ge6Oe.woff2 +0 -0
  114. package/dist/ui/server/_app/immutable/assets/roboto-mono-vietnamese-400-normal.CzWHQABp.woff +0 -0
  115. package/dist/ui/server/_app/immutable/assets/roboto-mono-vietnamese-400-normal.yYTFiTTs.woff2 +0 -0
  116. package/dist/ui/server/_app/immutable/assets/roboto-mono-vietnamese-500-normal.Cq-quQMu.woff2 +0 -0
  117. package/dist/ui/server/_app/immutable/assets/roboto-mono-vietnamese-500-normal.IxzxMIj7.woff +0 -0
  118. package/dist/ui/server/chunks/bridge-api.js +61 -0
  119. package/dist/ui/server/chunks/bridge-api.js.map +1 -0
  120. package/dist/ui/server/chunks/composition.js +232 -0
  121. package/dist/ui/server/chunks/composition.js.map +1 -0
  122. package/dist/ui/server/chunks/exports.js +69 -1
  123. package/dist/ui/server/chunks/exports.js.map +1 -1
  124. package/dist/ui/server/chunks/instance.js +20 -26
  125. package/dist/ui/server/chunks/instance.js.map +1 -1
  126. package/dist/ui/server/chunks/internal.js +102 -7
  127. package/dist/ui/server/chunks/internal.js.map +1 -1
  128. package/dist/ui/server/chunks/navigation.js +15 -0
  129. package/dist/ui/server/chunks/navigation.js.map +1 -0
  130. package/dist/ui/server/chunks/server2.js +30 -1
  131. package/dist/ui/server/chunks/server2.js.map +1 -1
  132. package/dist/ui/server/chunks/src.js +968 -0
  133. package/dist/ui/server/chunks/src.js.map +1 -0
  134. package/dist/ui/server/chunks/state.js +38 -0
  135. package/dist/ui/server/chunks/state.js.map +1 -0
  136. package/dist/ui/server/entries/endpoints/api/sessions/_server.ts.js +18 -0
  137. package/dist/ui/server/entries/endpoints/api/sessions/_server.ts.js.map +1 -0
  138. package/dist/ui/server/entries/endpoints/api/sessions/end/_server.ts.js +10 -0
  139. package/dist/ui/server/entries/endpoints/api/sessions/end/_server.ts.js.map +1 -0
  140. package/dist/ui/server/entries/endpoints/api/status/_server.ts.js +10 -0
  141. package/dist/ui/server/entries/endpoints/api/status/_server.ts.js.map +1 -0
  142. package/dist/ui/server/entries/fallbacks/error.svelte.js +2 -35
  143. package/dist/ui/server/entries/fallbacks/error.svelte.js.map +1 -1
  144. package/dist/ui/server/entries/pages/_layout.server.ts.js +5 -980
  145. package/dist/ui/server/entries/pages/_layout.server.ts.js.map +1 -1
  146. package/dist/ui/server/entries/pages/_layout.svelte.js +194 -7
  147. package/dist/ui/server/entries/pages/_layout.svelte.js.map +1 -1
  148. package/dist/ui/server/entries/pages/_page.server.ts.js +18 -0
  149. package/dist/ui/server/entries/pages/_page.server.ts.js.map +1 -0
  150. package/dist/ui/server/entries/pages/_page.svelte.js +213 -2
  151. package/dist/ui/server/entries/pages/_page.svelte.js.map +1 -1
  152. package/dist/ui/server/entries/pages/settings/_page.svelte.js +8 -0
  153. package/dist/ui/server/entries/pages/settings/_page.svelte.js.map +1 -0
  154. package/dist/ui/server/entries/pages/setup/_page.svelte.js +8 -0
  155. package/dist/ui/server/entries/pages/setup/_page.svelte.js.map +1 -0
  156. package/dist/ui/server/index.js +2 -2
  157. package/dist/ui/server/manifest-full.js +40 -3
  158. package/dist/ui/server/manifest.js +40 -3
  159. package/dist/ui/server/nodes/0.js +3 -3
  160. package/dist/ui/server/nodes/1.js +1 -1
  161. package/dist/ui/server/nodes/2.js +5 -3
  162. package/dist/ui/server/nodes/3.js +8 -0
  163. package/dist/ui/server/nodes/4.js +8 -0
  164. package/dist/ui/server/remote-entry.js +3 -3
  165. package/dist/ui/server/remote-entry.js.map +1 -1
  166. package/dist/ui/server/server.js +40 -3
  167. package/package.json +2 -2
  168. package/dist/ui/client/_app/immutable/chunks/BMrJcSB7.js +0 -3
  169. package/dist/ui/client/_app/immutable/chunks/BMrJcSB7.js.br +0 -0
  170. package/dist/ui/client/_app/immutable/chunks/BMrJcSB7.js.gz +0 -0
  171. package/dist/ui/client/_app/immutable/chunks/BueZJg5y.js +0 -2
  172. package/dist/ui/client/_app/immutable/chunks/BueZJg5y.js.br +0 -0
  173. package/dist/ui/client/_app/immutable/chunks/BueZJg5y.js.gz +0 -0
  174. package/dist/ui/client/_app/immutable/chunks/ZzrMKdp0.js +0 -1
  175. package/dist/ui/client/_app/immutable/chunks/ZzrMKdp0.js.br +0 -0
  176. package/dist/ui/client/_app/immutable/chunks/ZzrMKdp0.js.gz +0 -0
  177. package/dist/ui/client/_app/immutable/entry/app.BGREpuCm.js +0 -2
  178. package/dist/ui/client/_app/immutable/entry/app.BGREpuCm.js.br +0 -0
  179. package/dist/ui/client/_app/immutable/entry/app.BGREpuCm.js.gz +0 -0
  180. package/dist/ui/client/_app/immutable/entry/start.Bj3y6VYi.js +0 -2
  181. package/dist/ui/client/_app/immutable/entry/start.Bj3y6VYi.js.br +0 -0
  182. package/dist/ui/client/_app/immutable/entry/start.Bj3y6VYi.js.gz +0 -0
  183. package/dist/ui/client/_app/immutable/nodes/0.BdmtdjrF.js +0 -1
  184. package/dist/ui/client/_app/immutable/nodes/0.BdmtdjrF.js.br +0 -0
  185. package/dist/ui/client/_app/immutable/nodes/0.BdmtdjrF.js.gz +0 -0
  186. package/dist/ui/client/_app/immutable/nodes/1.B76I_t5U.js +0 -1
  187. package/dist/ui/client/_app/immutable/nodes/1.B76I_t5U.js.br +0 -0
  188. package/dist/ui/client/_app/immutable/nodes/1.B76I_t5U.js.gz +0 -0
  189. package/dist/ui/client/_app/immutable/nodes/2.CpNTEXmI.js +0 -1
  190. package/dist/ui/client/_app/immutable/nodes/2.CpNTEXmI.js.br +0 -0
  191. package/dist/ui/client/_app/immutable/nodes/2.CpNTEXmI.js.gz +0 -0
  192. package/dist/ui/client/_app/version.json +0 -1
  193. package/dist/ui/client/_app/version.json.br +0 -0
  194. package/dist/ui/client/_app/version.json.gz +0 -0
  195. /package/dist/ui/client/{_app → ui/_app}/immutable/chunks/Bjy-W4x2.js +0 -0
  196. /package/dist/ui/client/{_app → ui/_app}/immutable/chunks/Bjy-W4x2.js.br +0 -0
  197. /package/dist/ui/client/{_app → ui/_app}/immutable/chunks/Bjy-W4x2.js.gz +0 -0
  198. /package/dist/ui/client/{_app → ui/_app}/immutable/chunks/DclECHGd.js +0 -0
  199. /package/dist/ui/client/{_app → ui/_app}/immutable/chunks/DclECHGd.js.br +0 -0
  200. /package/dist/ui/client/{_app → ui/_app}/immutable/chunks/DclECHGd.js.gz +0 -0
  201. /package/dist/ui/client/{_app → ui/_app}/immutable/entry/payload.DSmR2FwN.js +0 -0
  202. /package/dist/ui/client/{_app → ui/_app}/immutable/entry/payload.DSmR2FwN.js.br +0 -0
  203. /package/dist/ui/client/{_app → ui/_app}/immutable/entry/payload.DSmR2FwN.js.gz +0 -0
  204. /package/dist/ui/client/{robots.txt → ui/robots.txt} +0 -0
  205. /package/dist/ui/client/{robots.txt.br → ui/robots.txt.br} +0 -0
  206. /package/dist/ui/client/{robots.txt.gz → ui/robots.txt.gz} +0 -0
@@ -1,14 +1,201 @@
1
- import { a as attr, n as head } from "../../chunks/server2.js";
1
+ import { mt as resolve } from "../../chunks/internal.js";
2
+ import { a as head, f as escape_html, i as ensure_array_like, l as attr, r as derived, s as stringify, t as attr_class, u as clsx } from "../../chunks/server2.js";
3
+ import { t as page } from "../../chunks/state.js";
4
+ import { n as statusStore } from "../../chunks/composition.js";
5
+ import "@material/web/icon/icon.js";
6
+ import "@material/web/iconbutton/icon-button.js";
2
7
  // src/lib/assets/favicon.svg
3
- var favicon_default = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='107'%20height='128'%20viewBox='0%200%20107%20128'%3e%3ctitle%3esvelte-logo%3c/title%3e%3cpath%20d='M94.157%2022.819c-10.4-14.885-30.94-19.297-45.792-9.835L22.282%2029.608A29.92%2029.92%200%200%200%208.764%2049.65a31.5%2031.5%200%200%200%203.108%2020.231%2030%2030%200%200%200-4.477%2011.183%2031.9%2031.9%200%200%200%205.448%2024.116c10.402%2014.887%2030.942%2019.297%2045.791%209.835l26.083-16.624A29.92%2029.92%200%200%200%2098.235%2078.35a31.53%2031.53%200%200%200-3.105-20.232%2030%2030%200%200%200%204.474-11.182%2031.88%2031.88%200%200%200-5.447-24.116'%20style='fill:%23ff3e00'/%3e%3cpath%20d='M45.817%20106.582a20.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.503%2018%2018%200%200%201%20.624-2.435l.49-1.498%201.337.981a33.6%2033.6%200%200%200%2010.203%205.098l.97.294-.09.968a5.85%205.85%200%200%200%201.052%203.878%206.24%206.24%200%200%200%206.695%202.485%205.8%205.8%200%200%200%201.603-.704L69.27%2076.28a5.43%205.43%200%200%200%202.45-3.631%205.8%205.8%200%200%200-.987-4.371%206.24%206.24%200%200%200-6.698-2.487%205.7%205.7%200%200%200-1.6.704l-9.953%206.345a19%2019%200%200%201-5.296%202.326%2020.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.502%2017.99%2017.99%200%200%201%208.13-12.052l26.081-16.623a19%2019%200%200%201%205.3-2.329%2020.72%2020.72%200%200%201%2022.237%208.243%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-.624%202.435l-.49%201.498-1.337-.98a33.6%2033.6%200%200%200-10.203-5.1l-.97-.294.09-.968a5.86%205.86%200%200%200-1.052-3.878%206.24%206.24%200%200%200-6.696-2.485%205.8%205.8%200%200%200-1.602.704L37.73%2051.72a5.42%205.42%200%200%200-2.449%203.63%205.79%205.79%200%200%200%20.986%204.372%206.24%206.24%200%200%200%206.698%202.486%205.8%205.8%200%200%200%201.602-.704l9.952-6.342a19%2019%200%200%201%205.295-2.328%2020.72%2020.72%200%200%201%2022.237%208.242%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-8.13%2012.053l-26.081%2016.622a19%2019%200%200%201-5.3%202.328'%20style='fill:%23fff'/%3e%3c/svg%3e";
8
+ var favicon_default = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%3e%3ctitle%3eSpeech%20Capture%3c/title%3e%3crect%20width='44'%20height='44'%20rx='14'%20fill='%23415f91'/%3e%3cpath%20d='M4%2010v4M8%206v12M12%203v18M16%208v8M20%2011v2'%20transform='translate(10%2010)'%20fill='none'%20stroke='%23fff'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
9
+ // ../../node_modules/.pnpm/@fontsource+material-symbols-outlined@5.3.9/node_modules/@fontsource/material-symbols-outlined/files/material-symbols-outlined-latin-400-normal.woff2?url
10
+ var material_symbols_outlined_latin_400_normal_default = "/ui/_app/immutable/assets/material-symbols-outlined-latin-400-normal.BhEvR8fk.woff2";
11
+ // src/lib/components/StatusChips/StatusChips.svelte
12
+ function StatusChips($$renderer, $$props) {
13
+ let { chips, announcement } = $$props;
14
+ $$renderer.push(`<ul aria-label="Bridge status" class="svelte-19wvxlf"><!--[-->`);
15
+ const each_array = ensure_array_like(chips);
16
+ for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
17
+ let chip = each_array[$$index];
18
+ $$renderer.push(`<li${attr_class(clsx(chip.tone), "svelte-19wvxlf", { "down": chip.down })}${attr("aria-label", chip.description)}${attr("title", chip.text)}><span${attr_class(`dot ${stringify(chip.dot)}`, "svelte-19wvxlf")} aria-hidden="true"></span> <span aria-hidden="true" class="chip-label svelte-19wvxlf">${escape_html(chip.text)}</span></li>`);
19
+ }
20
+ $$renderer.push(`<!--]--></ul> <span class="sr-only svelte-19wvxlf" role="status">${escape_html(announcement)}</span>`);
21
+ }
22
+ // src/lib/components/StatusRefresh/StatusRefresh.svelte
23
+ function StatusRefresh($$renderer, $$props) {
24
+ let { loading, onRetry } = $$props;
25
+ $$renderer.push(`<md-icon-button title="Refresh status" class="svelte-5q7qd7"><md-icon${attr_class("svelte-5q7qd7", void 0, { "spin": loading })}>refresh</md-icon></md-icon-button>`);
26
+ }
27
+ // src/lib/core/status.ts
28
+ function deriveChips(status, reachable) {
29
+ if (status === null) return [
30
+ neutral("playwright", "Playwright"),
31
+ neutral("mcp", "MCP"),
32
+ neutral("session", "Session")
33
+ ];
34
+ const chips = [
35
+ serviceChip("playwright", "Playwright", status.playwright),
36
+ serviceChip("mcp", "MCP", status.mcp),
37
+ sessionChip(status)
38
+ ];
39
+ return reachable ? chips : chips.map((chip) => ({
40
+ ...chip,
41
+ tone: "neutral",
42
+ down: true
43
+ }));
44
+ }
45
+ function neutral(id, text) {
46
+ return {
47
+ id,
48
+ text,
49
+ tone: "neutral",
50
+ dot: "hollow",
51
+ description: `${text}, state unknown`,
52
+ down: true
53
+ };
54
+ }
55
+ function serviceChip(id, name, service) {
56
+ const base = `${name} ${service.version}`;
57
+ switch (service.state) {
58
+ case "running": return {
59
+ id,
60
+ text: base,
61
+ tone: "ok",
62
+ dot: "filled",
63
+ description: `${base}, running`
64
+ };
65
+ case "crashed":
66
+ case "failed": return {
67
+ id,
68
+ text: `${base} · ${service.state}`,
69
+ tone: "warning",
70
+ dot: "filled",
71
+ description: `${base}, ${service.state}`
72
+ };
73
+ case "starting": return {
74
+ id,
75
+ text: base,
76
+ tone: "neutral",
77
+ dot: "hollow",
78
+ description: `${base}, starting`,
79
+ down: true
80
+ };
81
+ case "stopped": return {
82
+ id,
83
+ text: base,
84
+ tone: "neutral",
85
+ dot: "hollow",
86
+ description: `${base}, stopped`,
87
+ down: true
88
+ };
89
+ }
90
+ }
91
+ function sessionChip({ session }) {
92
+ if (session.current === null) return {
93
+ id: "session",
94
+ text: "No session",
95
+ tone: "neutral",
96
+ dot: "hollow",
97
+ description: "No session is running"
98
+ };
99
+ const text = `Session #${session.current.id}`;
100
+ return {
101
+ id: "session",
102
+ text,
103
+ tone: "ok",
104
+ dot: "filled",
105
+ description: `${text}, live`
106
+ };
107
+ }
108
+ /**
109
+ * The words a screen reader gets when the state changes. Empty while everything is fine, so the
110
+ * regular refresh never speaks.
111
+ */
112
+ function announcement(chips, reachable) {
113
+ if (!reachable) return "Bridge unreachable.";
114
+ return chips.filter((chip) => chip.tone === "error" || chip.tone === "warning").map((chip) => `${chip.description}.`).join(" ");
115
+ }
116
+ // src/lib/components/BridgeStatus/BridgeStatus.svelte
117
+ function BridgeStatus($$renderer, $$props) {
118
+ $$renderer.component(($$renderer) => {
119
+ const seed = derived(() => page.data.status);
120
+ const status = derived(() => statusStore.status ?? seed());
121
+ const chips = derived(() => deriveChips(status(), statusStore.reachable));
122
+ StatusChips($$renderer, {
123
+ chips: chips(),
124
+ announcement: announcement(chips(), statusStore.reachable)
125
+ });
126
+ $$renderer.push(`<!----> `);
127
+ StatusRefresh($$renderer, {
128
+ loading: statusStore.loading,
129
+ onRetry: () => void statusStore.retry()
130
+ });
131
+ $$renderer.push(`<!---->`);
132
+ });
133
+ }
134
+ // src/lib/components/AppHeader/AppHeader.svelte
135
+ function AppHeader($$renderer, $$props) {
136
+ let { host } = $$props;
137
+ $$renderer.push(`<header class="svelte-4j9s4f"><div class="logo-slot svelte-4j9s4f"><div class="logo svelte-4j9s4f"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 10v4M8 6v12M12 3v18M16 8v8M20 11v2"></path></svg></div></div> <div class="title svelte-4j9s4f"><span class="name svelte-4j9s4f">Speech Capture</span> <span class="meta svelte-4j9s4f">${escape_html(host)}</span></div> `);
138
+ BridgeStatus($$renderer, {});
139
+ $$renderer.push(`<!----></header>`);
140
+ }
141
+ // src/lib/core/navigation.ts
142
+ var trimSlash = (path) => path.length > 1 ? path.replace(/\/+$/, "") : path;
143
+ /** Whether `href` is the page shown at `currentPath` (a trailing slash doesn't matter). */
144
+ function isCurrent(item, currentPath) {
145
+ const href = trimSlash(item.href);
146
+ const path = trimSlash(currentPath);
147
+ return item.exact ? path === href : path === href || path.startsWith(`${href}/`);
148
+ }
149
+ // src/lib/components/NavRail/NavRail.svelte
150
+ function NavRail($$renderer, $$props) {
151
+ $$renderer.component(($$renderer) => {
152
+ let { items, currentPath } = $$props;
153
+ $$renderer.push(`<nav aria-label="Pages" class="svelte-sxtjmn"><ul class="svelte-sxtjmn"><!--[-->`);
154
+ const each_array = ensure_array_like(items);
155
+ for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
156
+ let item = each_array[$$index];
157
+ const current = isCurrent(item, currentPath);
158
+ $$renderer.push(`<li><a${attr("href", item.href)}${attr("aria-current", current ? "page" : void 0)} class="svelte-sxtjmn"><span${attr_class("indicator svelte-sxtjmn", void 0, { "current": current })}><md-icon>${escape_html(item.icon)}</md-icon></span> <span class="label svelte-sxtjmn">${escape_html(item.label)}</span></a></li>`);
159
+ }
160
+ $$renderer.push(`<!--]--></ul></nav>`);
161
+ });
162
+ }
4
163
  // src/routes/+layout.svelte
5
164
  function _layout($$renderer, $$props) {
6
- let { children } = $$props;
7
- head("12qhfyh", $$renderer, ($$renderer) => {
8
- $$renderer.push(`<link rel="icon"${attr("href", favicon_default)}/>`);
165
+ $$renderer.component(($$renderer) => {
166
+ let { children } = $$props;
167
+ const navItems = [
168
+ {
169
+ href: resolve("/"),
170
+ label: "Monitor",
171
+ icon: "monitor",
172
+ exact: true
173
+ },
174
+ {
175
+ href: resolve("/settings"),
176
+ label: "Settings",
177
+ icon: "settings"
178
+ },
179
+ {
180
+ href: resolve("/setup"),
181
+ label: "Setup",
182
+ icon: "build"
183
+ }
184
+ ];
185
+ head("12qhfyh", $$renderer, ($$renderer) => {
186
+ $$renderer.push(`<link rel="icon"${attr("href", favicon_default)}/> <link rel="preload" as="font" type="font/woff2"${attr("href", material_symbols_outlined_latin_400_normal_default)} crossorigin="anonymous"/> <meta name="color-scheme" content="light dark"/>`);
187
+ });
188
+ $$renderer.push(`<div class="app svelte-12qhfyh">`);
189
+ AppHeader($$renderer, { host: page.url.host });
190
+ $$renderer.push(`<!----> <div class="body svelte-12qhfyh">`);
191
+ NavRail($$renderer, {
192
+ items: navItems,
193
+ currentPath: page.url.pathname
194
+ });
195
+ $$renderer.push(`<!----> <main class="svelte-12qhfyh">`);
196
+ children($$renderer);
197
+ $$renderer.push(`<!----></main></div></div>`);
9
198
  });
10
- children($$renderer);
11
- $$renderer.push(`<!---->`);
12
199
  }
13
200
  export { _layout as default };
14
201
 
@@ -1 +1 @@
1
- {"version":3,"file":"_layout.svelte.js","names":["$.attr","favicon"],"sources":["../../../../src/lib/assets/favicon.svg","../../../../src/routes/+layout.svelte"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='107'%20height='128'%20viewBox='0%200%20107%20128'%3e%3ctitle%3esvelte-logo%3c/title%3e%3cpath%20d='M94.157%2022.819c-10.4-14.885-30.94-19.297-45.792-9.835L22.282%2029.608A29.92%2029.92%200%200%200%208.764%2049.65a31.5%2031.5%200%200%200%203.108%2020.231%2030%2030%200%200%200-4.477%2011.183%2031.9%2031.9%200%200%200%205.448%2024.116c10.402%2014.887%2030.942%2019.297%2045.791%209.835l26.083-16.624A29.92%2029.92%200%200%200%2098.235%2078.35a31.53%2031.53%200%200%200-3.105-20.232%2030%2030%200%200%200%204.474-11.182%2031.88%2031.88%200%200%200-5.447-24.116'%20style='fill:%23ff3e00'/%3e%3cpath%20d='M45.817%20106.582a20.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.503%2018%2018%200%200%201%20.624-2.435l.49-1.498%201.337.981a33.6%2033.6%200%200%200%2010.203%205.098l.97.294-.09.968a5.85%205.85%200%200%200%201.052%203.878%206.24%206.24%200%200%200%206.695%202.485%205.8%205.8%200%200%200%201.603-.704L69.27%2076.28a5.43%205.43%200%200%200%202.45-3.631%205.8%205.8%200%200%200-.987-4.371%206.24%206.24%200%200%200-6.698-2.487%205.7%205.7%200%200%200-1.6.704l-9.953%206.345a19%2019%200%200%201-5.296%202.326%2020.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.502%2017.99%2017.99%200%200%201%208.13-12.052l26.081-16.623a19%2019%200%200%201%205.3-2.329%2020.72%2020.72%200%200%201%2022.237%208.243%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-.624%202.435l-.49%201.498-1.337-.98a33.6%2033.6%200%200%200-10.203-5.1l-.97-.294.09-.968a5.86%205.86%200%200%200-1.052-3.878%206.24%206.24%200%200%200-6.696-2.485%205.8%205.8%200%200%200-1.602.704L37.73%2051.72a5.42%205.42%200%200%200-2.449%203.63%205.79%205.79%200%200%200%20.986%204.372%206.24%206.24%200%200%200%206.698%202.486%205.8%205.8%200%200%200%201.602-.704l9.952-6.342a19%2019%200%200%201%205.295-2.328%2020.72%2020.72%200%200%201%2022.237%208.242%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-8.13%2012.053l-26.081%2016.622a19%2019%200%200%201-5.3%202.328'%20style='fill:%23fff'/%3e%3c/svg%3e\"","<script lang=\"ts\">\n import favicon from '#lib/assets/favicon.svg';\n import type { LayoutProps } from './$types';\n\n let { children }: LayoutProps = $props();\n</script>\n\n<svelte:head>\n <link rel=\"icon\" href={favicon} />\n</svelte:head>\n\n{@render children()}\n"],"mappings":";;AAAA,IAAA,kBAAe;;ACAf,SAAA,QAAA,YAAA,SAAA;CAIE,IAAI,EAAE,aAAuB;;EAIN,WAAA,KAAA,mBAAAA,KAAA,QAAAC,eAAO,EAAA,GAAA;;CAGvB,SAAQ,UAAA;;AANT"}
1
+ {"version":3,"file":"_layout.svelte.js","names":["$.ensure_array_like","$.attr_class","$.clsx","$.attr","$.stringify","$.escape","$.attr_class","$.derived","$.escape","$.ensure_array_like","$.attr","$.attr_class","$.escape","$.attr","favicon","iconFont"],"sources":["../../../../src/lib/assets/favicon.svg","../../../../../../node_modules/.pnpm/@fontsource+material-symbols-outlined@5.3.9/node_modules/@fontsource/material-symbols-outlined/files/material-symbols-outlined-latin-400-normal.woff2?url","../../../../src/lib/components/StatusChips/StatusChips.svelte","../../../../src/lib/components/StatusRefresh/StatusRefresh.svelte","../../../../src/lib/adapters/icon-font.ts","../../../../src/lib/core/status.ts","../../../../src/lib/components/BridgeStatus/BridgeStatus.svelte","../../../../src/lib/components/AppHeader/AppHeader.svelte","../../../../src/lib/core/navigation.ts","../../../../src/lib/components/NavRail/NavRail.svelte","../../../../src/routes/+layout.svelte"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%3e%3ctitle%3eSpeech%20Capture%3c/title%3e%3crect%20width='44'%20height='44'%20rx='14'%20fill='%23415f91'/%3e%3cpath%20d='M4%2010v4M8%206v12M12%203v18M16%208v8M20%2011v2'%20transform='translate(10%2010)'%20fill='none'%20stroke='%23fff'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e\"","export default import.meta.ROLLDOWN_FILE_URL_VRAku6fjghkApIISiBWPzg","<script lang=\"ts\">\n import type { Chip } from '#lib/core/status.js';\n\n type Props = { chips: Chip[]; announcement: string };\n\n let { chips, announcement }: Props = $props();\n</script>\n\n<ul aria-label=\"Bridge status\">\n {#each chips as chip (chip.id)}\n <li class={chip.tone} class:down={chip.down} aria-label={chip.description} title={chip.text}>\n <span class=\"dot {chip.dot}\" aria-hidden=\"true\"></span>\n <span aria-hidden=\"true\" class=\"chip-label\">{chip.text}</span>\n </li>\n {/each}\n</ul>\n<!-- Only changes of a problem state speak; a refresh leaves this text as it is. -->\n<span class=\"sr-only\" role=\"status\">{announcement}</span>\n\n<style>\n ul {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n li {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n height: 32px;\n padding: 0 12px;\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: 8px;\n background: var(--md-sys-color-surface-container-lowest, transparent);\n color: var(--md-sys-color-on-surface);\n font-family: var(--app-font-mono);\n font-size: var(--app-mono-size);\n white-space: nowrap;\n }\n\n li.ok {\n --dot: var(--app-success);\n }\n li.warning {\n --dot: var(--app-warning);\n background: var(--app-warning-container);\n color: var(--app-on-warning-container);\n border-color: var(--app-warning);\n }\n li.error {\n --dot: var(--md-sys-color-error);\n background: var(--md-sys-color-error-container);\n color: var(--md-sys-color-on-error-container);\n border-color: var(--md-sys-color-error);\n }\n li.neutral {\n --dot: var(--md-sys-color-outline);\n color: var(--md-sys-color-on-surface-variant);\n }\n\n li.down {\n --dot: var(--md-sys-color-error);\n }\n\n .dot {\n box-sizing: border-box;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--dot);\n border: 2px solid var(--dot);\n }\n .dot.hollow {\n background: transparent;\n }\n\n /* On a narrow screen only the dot stays; the chip's aria-label still says what it is. */\n @media (width < 800px) {\n .chip-label {\n display: none;\n }\n }\n\n .sr-only {\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/icon/icon.js';\n import '@material/web/iconbutton/icon-button.js';\n\n type Props = { loading: boolean; onRetry: () => void };\n\n let { loading, onRetry }: Props = $props();\n</script>\n\n<!-- svelte-ignore a11y_click_events_have_key_events, a11y_no_static_element_interactions -->\n<!-- md-icon-button wraps a real <button> in its shadow DOM, which handles keys and role. -->\n<md-icon-button title=\"Refresh status\" onclick={onRetry}>\n <md-icon class:spin={loading}>refresh</md-icon>\n</md-icon-button>\n\n<style>\n md-icon-button {\n --md-icon-button-icon-color: var(--md-sys-color-on-surface-variant);\n --md-icon-button-hover-icon-color: var(--md-sys-color-on-surface);\n --md-icon-button-focus-icon-color: var(--md-sys-color-on-surface);\n }\n\n .spin {\n animation: spin 0.8s linear infinite;\n }\n\n @keyframes spin {\n to {\n transform: rotate(360deg);\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .spin {\n animation: none;\n }\n }\n</style>\n","const ICON_FONT = '24px \"Material Symbols Outlined\"';\n\n/**\n * Loads the icon font and then sets `data-icons-ready` on `<html>`, which ends the placeholder\n * shimmer in `global.css`. If loading fails the icons show anyway rather than shimmer forever.\n */\nexport async function markIconFontReady(): Promise<void> {\n try {\n await document.fonts.load(ICON_FONT);\n } catch {\n // fall through: show the icons\n }\n document.documentElement.setAttribute('data-icons-ready', '');\n}\n","import type { ServiceStatusDto, StatusDto } from '@screenreader-speech-capture/shared';\n\n/** Where the status comes from (the HTTP adapter asks the BFF, which asks the bridge). */\nexport interface StatusApi {\n fetch(): Promise<StatusDto>;\n}\n\nexport type ChipId = 'playwright' | 'mcp' | 'session';\nexport type ChipTone = 'ok' | 'error' | 'warning' | 'neutral';\n\nexport type Chip = {\n id: ChipId;\n /** What the chip shows. */\n text: string;\n tone: ChipTone;\n /** A hollow dot means \"nothing there yet\"; a filled one means \"there is state\". */\n dot: 'filled' | 'hollow';\n /** Spoken name of the state, so it is never colour alone. */\n description: string;\n /** Not connected or not ready: the dot is red while the chip itself stays neutral. */\n down?: boolean;\n};\n\nexport function deriveChips(status: StatusDto | null, reachable: boolean): Chip[] {\n if (status === null) {\n return [\n neutral('playwright', 'Playwright'),\n neutral('mcp', 'MCP'),\n neutral('session', 'Session'),\n ];\n }\n const chips = [\n serviceChip('playwright', 'Playwright', status.playwright),\n serviceChip('mcp', 'MCP', status.mcp),\n sessionChip(status),\n ];\n // The last known values stay visible, but they are no longer a statement about now.\n return reachable\n ? chips\n : chips.map((chip) => ({ ...chip, tone: 'neutral' as const, down: true }));\n}\n\nfunction neutral(id: ChipId, text: string): Chip {\n return {\n id,\n text,\n tone: 'neutral',\n dot: 'hollow',\n description: `${text}, state unknown`,\n down: true,\n };\n}\n\nfunction serviceChip(id: ChipId, name: string, service: ServiceStatusDto): Chip {\n const base = `${name} ${service.version}`;\n switch (service.state) {\n case 'running':\n return { id, text: base, tone: 'ok', dot: 'filled', description: `${base}, running` };\n case 'crashed':\n case 'failed':\n return {\n id,\n text: `${base} · ${service.state}`,\n tone: 'warning',\n dot: 'filled',\n description: `${base}, ${service.state}`,\n };\n case 'starting':\n return {\n id,\n text: base,\n tone: 'neutral',\n dot: 'hollow',\n description: `${base}, starting`,\n down: true,\n };\n case 'stopped':\n return {\n id,\n text: base,\n tone: 'neutral',\n dot: 'hollow',\n description: `${base}, stopped`,\n down: true,\n };\n }\n}\n\nfunction sessionChip({ session }: StatusDto): Chip {\n if (session.current === null) {\n return {\n id: 'session',\n text: 'No session',\n tone: 'neutral',\n dot: 'hollow',\n description: 'No session is running',\n };\n }\n const text = `Session #${session.current.id}`;\n return { id: 'session', text, tone: 'ok', dot: 'filled', description: `${text}, live` };\n}\n\n/**\n * The words a screen reader gets when the state changes. Empty while everything is fine, so the\n * regular refresh never speaks.\n */\nexport function announcement(chips: Chip[], reachable: boolean): string {\n if (!reachable) return 'Bridge unreachable.';\n return chips\n .filter((chip) => chip.tone === 'error' || chip.tone === 'warning')\n .map((chip) => `${chip.description}.`)\n .join(' ');\n}\n","<script lang=\"ts\">\n import { onMount } from 'svelte';\n import { page } from '$app/state';\n import StatusChips from '#lib/components/StatusChips/StatusChips.svelte';\n import StatusRefresh from '#lib/components/StatusRefresh/StatusRefresh.svelte';\n import { statusStore } from '#lib/composition.js';\n import { announcement, deriveChips } from '#lib/core/status.js';\n import type { StatusDto } from '@screenreader-speech-capture/shared';\n\n // The status the server rendered (`+layout.server.ts`); it fills in until the store has its own.\n const seed = $derived(page.data.status as StatusDto | null);\n const status = $derived(statusStore.status ?? seed);\n const chips = $derived(deriveChips(status, statusStore.reachable));\n\n onMount(() => statusStore.init(seed));\n</script>\n\n<StatusChips {chips} announcement={announcement(chips, statusStore.reachable)} />\n<StatusRefresh loading={statusStore.loading} onRetry={() => void statusStore.retry()} />\n","<script lang=\"ts\">\n import '@material/web/icon/icon.js';\n import '@material/web/iconbutton/icon-button.js';\n import BridgeStatus from '#lib/components/BridgeStatus/BridgeStatus.svelte';\n\n type Props = {\n host: string;\n };\n\n let { host }: Props = $props();\n</script>\n\n<header>\n <div class=\"logo-slot\">\n <div class=\"logo\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"><path d=\"M4 10v4M8 6v12M12 3v18M16 8v8M20 11v2\" /></svg\n >\n </div>\n </div>\n <div class=\"title\">\n <span class=\"name\">Speech Capture</span>\n <span class=\"meta\">{host}</span>\n </div>\n <BridgeStatus />\n</header>\n\n<style>\n header {\n display: flex;\n align-items: center;\n gap: 12px 16px;\n min-height: 68px;\n padding: 10px 16px 10px 0;\n background: var(--md-sys-color-surface-container);\n color: var(--md-sys-color-on-surface);\n }\n\n /* As wide as the navigation rail, so the logo sits centered over it. */\n .logo-slot {\n display: flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: var(--app-rail-width);\n }\n\n .logo {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 44px;\n height: 44px;\n border-radius: 14px;\n background: var(--md-sys-color-primary);\n color: var(--md-sys-color-on-primary);\n }\n\n .title {\n display: flex;\n flex-direction: column;\n min-width: 0;\n margin-right: auto;\n }\n\n header {\n flex-wrap: wrap;\n }\n\n .name {\n font-family: var(--md-sys-typescale-title-large-font);\n font-size: var(--md-sys-typescale-title-large-size);\n line-height: var(--md-sys-typescale-title-large-line-height);\n font-weight: var(--md-ref-typeface-weight-medium);\n }\n\n .meta {\n font-family: var(--app-font-mono);\n font-size: var(--app-mono-size);\n line-height: var(--app-mono-line-height);\n color: var(--md-sys-color-on-surface-variant);\n }\n\n md-icon-button {\n --md-icon-button-icon-color: var(--md-sys-color-on-surface-variant);\n --md-icon-button-hover-icon-color: var(--md-sys-color-on-surface);\n --md-icon-button-focus-icon-color: var(--md-sys-color-on-surface);\n --md-icon-button-pressed-icon-color: var(--md-sys-color-on-surface);\n }\n</style>\n","export type NavItem = {\n href: string;\n label: string;\n icon: string;\n /** Only the exact path is current (the start page); otherwise its sub-paths count too. */\n exact?: boolean;\n};\n\nconst trimSlash = (path: string): string => (path.length > 1 ? path.replace(/\\/+$/, '') : path);\n\n/** Whether `href` is the page shown at `currentPath` (a trailing slash doesn't matter). */\nexport function isCurrent(item: Pick<NavItem, 'href' | 'exact'>, currentPath: string): boolean {\n const href = trimSlash(item.href);\n const path = trimSlash(currentPath);\n return item.exact ? path === href : path === href || path.startsWith(`${href}/`);\n}\n","<script lang=\"ts\">\n import '@material/web/icon/icon.js';\n import { isCurrent, type NavItem } from '#lib/core/navigation.js';\n\n type Props = { items: NavItem[]; currentPath: string };\n\n let { items, currentPath }: Props = $props();\n</script>\n\n<nav aria-label=\"Pages\">\n <ul>\n {#each items as item (item.href)}\n {@const current = isCurrent(item, currentPath)}\n <li>\n <!-- The layout passes hrefs it built with resolve(). -->\n <!-- eslint-disable-next-line svelte/no-navigation-without-resolve -->\n <a href={item.href} aria-current={current ? 'page' : undefined}>\n <span class=\"indicator\" class:current><md-icon>{item.icon}</md-icon></span>\n <span class=\"label\">{item.label}</span>\n </a>\n </li>\n {/each}\n </ul>\n</nav>\n\n<style>\n nav {\n flex: none;\n width: var(--app-rail-width);\n padding: var(--app-gutter) 0;\n background: var(--md-sys-color-surface);\n }\n\n ul {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n a {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n min-height: 48px;\n color: var(--md-sys-color-on-surface-variant);\n text-decoration: none;\n }\n\n .indicator {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 32px;\n border-radius: 16px;\n }\n\n .indicator.current {\n background: var(--md-sys-color-secondary-container);\n color: var(--md-sys-color-on-secondary-container);\n }\n\n a:hover .indicator:not(.current) {\n background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent);\n }\n\n a[aria-current='page'] {\n color: var(--md-sys-color-on-surface);\n }\n\n .label {\n font-family: var(--md-sys-typescale-label-medium-font);\n font-size: var(--md-sys-typescale-label-medium-size);\n line-height: var(--md-sys-typescale-label-medium-line-height);\n font-weight: var(--md-ref-typeface-weight-medium);\n }\n</style>\n","<script lang=\"ts\">\n import { onMount } from 'svelte';\n import { resolve } from '$app/paths';\n import { page } from '$app/state';\n import favicon from '#lib/assets/favicon.svg';\n import iconFont from '@fontsource/material-symbols-outlined/files/material-symbols-outlined-latin-400-normal.woff2?url';\n import AppHeader from '#lib/components/AppHeader/AppHeader.svelte';\n import NavRail from '#lib/components/NavRail/NavRail.svelte';\n import { markIconFontReady, themeStore } from '#lib/composition.js';\n import type { NavItem } from '#lib/core/navigation.js';\n import '#lib/styles/fonts.css';\n import '#lib/styles/tokens.css';\n import '#lib/styles/global.css';\n import type { LayoutProps } from './$types';\n\n let { children }: LayoutProps = $props();\n\n const navItems: NavItem[] = [\n { href: resolve('/'), label: 'Monitor', icon: 'monitor', exact: true },\n { href: resolve('/settings'), label: 'Settings', icon: 'settings' },\n { href: resolve('/setup'), label: 'Setup', icon: 'build' },\n ];\n\n onMount(() => {\n themeStore.init();\n void markIconFontReady();\n });\n</script>\n\n<svelte:head>\n <link rel=\"icon\" href={favicon} />\n <link rel=\"preload\" as=\"font\" type=\"font/woff2\" href={iconFont} crossorigin=\"anonymous\" />\n <meta name=\"color-scheme\" content=\"light dark\" />\n</svelte:head>\n\n<div class=\"app\">\n <AppHeader host={page.url.host} />\n\n <div class=\"body\">\n <NavRail items={navItems} currentPath={page.url.pathname} />\n <main>\n {@render children()}\n </main>\n </div>\n</div>\n\n<style>\n /* The window height is fixed, so a page can fill what is left below the header (which grows\n when its chips wrap). */\n .app {\n display: flex;\n flex-direction: column;\n height: 100dvh;\n }\n\n .body {\n display: flex;\n flex: 1;\n align-items: stretch;\n min-height: 0;\n }\n\n main {\n flex: 1;\n min-width: 0;\n min-height: 0;\n padding: 0 16px;\n overflow: auto;\n }\n</style>\n"],"ignoreList":[1],"mappings":";;;;;;;AAAA,IAAA,kBAAe;;ACAf,IAAA,qDAAe;;ACAf,SAAA,YAAA,YAAA,SAAA;CAKE,IAAI,EAAE,OAAO,iBAAqB;;CAI3B,MAAA,aAAAA,kBAAA,KAAK;;EAAI,IAAA,OAAI,WAAA;EACP,WAAA,KAAA,MAAAC,WAAAC,KAAA,KAAK,IAAI,GAAA,kBAAA,EAAA,QAAc,KAAK,KAAI,CAAA,IAAAC,KAAA,cAAc,KAAK,WAAW,IAAAA,KAAA,SAAS,KAAK,IAAI,EAAA,QAAAF,WAAA,OAAAG,UACvE,KAAK,GAAG,KAAA,gBAAA,EAAA,yFA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,WAAA,eAAA;EAME,IAAI,EAAE,OAAO,gBAAoB;;EAKxB,MAAA,aAAAC,kBAAA,KAAK;;GAAI,IAAA,OAAI,WAAA;GACV,MAAA,UAAU,UAAU,MAAM,WAAW;GAIlC,WAAA,KAAA,SAAAC,KAAA,QAAA,KAAK,IAAI,IAAAA,KAAA,gBAAgB,UAAU,SAAS,KAAA,CAAS,EAAA,8BAAAC,WAAA,2BAAA,KAAA,GAAA,EAAA,WAAA,QAAA,CAAA,EAAA,YAAAC,YACZ,KAAK,IAAI,EAAA,sDAAAA,YACpC,KAAK,KAAK,EAAA,iBAAA;;;CAXjC,CAAA;;;;CCPR,WAAA,WAAA,eAAA;EAeE,IAAI,EAAE,aAAuB;EAE7B,MAAM,WAAsB;GAC1B;IAAE,MAAM,QAAQ,GAAG;IAAG,OAAO;IAAW,MAAM;IAAW,OAAO;GAAM;GACtE;IAAE,MAAM,QAAQ,WAAW;IAAG,OAAO;IAAY,MAAM;GAAY;GACnE;IAAE,MAAM,QAAQ,QAAQ;IAAG,OAAO;IAAS,MAAM;GAAO;EACzD;;GASsB,WAAA,KAAA,mBAAAC,KAAA,QAAAC,eAAO,EAAA,oDAAAD,KAAA,QACwBE,kDAAQ,EAAA,4EAAA;;;EAK7C,UAAA,YAAA,EAAA,MAAA,KAAK,IAAI,KAAI,CAAA;;EAGZ,QAAA,YAAA;GAAA,OAAA;GAAQ,aAAe,KAAK,IAAI;EAAQ,CAAA;;EAE7C,SAAQ,UAAA;;CAdf,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { t as bridgeApiFromEnv } from "../../chunks/bridge-api.js";
2
+ // src/routes/+page.server.ts
3
+ var load = async ({ fetch }) => {
4
+ try {
5
+ return {
6
+ sessions: await bridgeApiFromEnv(fetch).sessions(),
7
+ now: Date.now()
8
+ };
9
+ } catch {
10
+ return {
11
+ sessions: null,
12
+ now: Date.now()
13
+ };
14
+ }
15
+ };
16
+ export { load };
17
+
18
+ //# sourceMappingURL=_page.server.ts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_page.server.ts.js","names":[],"sources":["../../../../src/routes/+page.server.ts"],"sourcesContent":["import { bridgeApiFromEnv } from '#lib/server/bridge-api.js';\nimport type { PageServerLoad } from './$types';\n\nexport const load: PageServerLoad = async ({ fetch }) => {\n try {\n // `now` is the end of a live session's duration: the server and the first client render agree.\n return { sessions: await bridgeApiFromEnv(fetch).sessions(), now: Date.now() };\n } catch {\n // The pane starts empty and fills in once the store reaches the bridge.\n return { sessions: null, now: Date.now() };\n }\n};\n"],"mappings":";;AAGA,IAAa,OAAuB,OAAO,EAAE,YAAY;CACvD,IAAI;EAEF,OAAO;GAAE,UAAU,MAAM,iBAAiB,KAAK,CAAC,CAAC,SAAS;GAAG,KAAK,KAAK,IAAI;EAAE;CAC/E,QAAQ;EAEN,OAAO;GAAE,UAAU;GAAM,KAAK,KAAK,IAAI;EAAE;CAC3C;AACF"}
@@ -1,9 +1,220 @@
1
- import { o as escape_html } from "../../chunks/server2.js";
1
+ import { mt as resolve } from "../../chunks/internal.js";
2
+ import { f as escape_html, i as ensure_array_like, l as attr, n as attr_style, r as derived, t as attr_class, u as clsx } from "../../chunks/server2.js";
3
+ import { t as page } from "../../chunks/state.js";
4
+ import { n as goto } from "../../chunks/navigation.js";
5
+ import { t as sessionsStore } from "../../chunks/composition.js";
6
+ import { c as API_LIMITS } from "../../chunks/src.js";
7
+ import "@material/web/icon/icon.js";
8
+ import "@material/web/iconbutton/icon-button.js";
9
+ import "@material/web/button/text-button.js";
10
+ import "@material/web/dialog/dialog.js";
11
+ import "@material/web/ripple/ripple.js";
12
+ import "@material/web/textfield/outlined-text-field.js";
13
+ // src/lib/components/SessionsPane/EndSessionDialog.svelte
14
+ function EndSessionDialog($$renderer, $$props) {
15
+ $$renderer.component(($$renderer) => {
16
+ /** The session's entry count; the bridge forgets a session that ends with none. */
17
+ /** Rejects with a message to show; resolves when the session has ended. */
18
+ let { open, sessionId, entries, onEnd, onClose } = $$props;
19
+ const empty = derived(() => entries === 0);
20
+ let busy = false;
21
+ $$renderer.push(`<md-dialog${attr("open", open, true)} class="svelte-17z3k9b"><div slot="headline">${escape_html(empty() ? "Drop" : "End")} session ${escape_html(sessionId === null ? "" : `#${sessionId}`)}?</div> <div slot="content">`);
22
+ if (empty()) $$renderer.push(`<!--[0--><p class="svelte-17z3k9b">This session has no entries, so ending it deletes it. Its number is not reused.</p>`);
23
+ else $$renderer.push(`<!--[-1--><p class="svelte-17z3k9b">Speech captured after this belongs to no session.</p>`);
24
+ $$renderer.push(`<!--]--> `);
25
+ $$renderer.push("<!--[-1-->");
26
+ $$renderer.push(`<!--]--></div> <div slot="actions"><md-text-button type="button">Cancel</md-text-button> <md-text-button type="button"${attr("disabled", busy, true)}>End session</md-text-button></div></md-dialog>`);
27
+ });
28
+ }
29
+ // src/lib/components/ListItem/ListItem.svelte
30
+ function ListItem($$renderer, $$props) {
31
+ /** One line, cut off with an ellipsis. */
32
+ /** The muted monospace line under the title. */
33
+ /** Actions at the end of the row. They sit beside the select button, never inside it. */
34
+ /** Highlights the row and sets `aria-current`. */
35
+ /**
36
+ * What a screen reader should hear instead of the visual subtitle. Without it the subtitle
37
+ * is read as it is.
38
+ */
39
+ /**
40
+ * The row's corner radius as a CSS value. Defaults to 8px, the radius of md-list-item's
41
+ * focus ring (md-list-item itself has no container shape).
42
+ */
43
+ let { title, subtitle, trailing, selected = false, description, shape, onSelect } = $$props;
44
+ $$renderer.push(`<li${attr_class("svelte-3qlloz", void 0, { "selected": selected })}${attr_style("", { "--list-item-shape": shape })}><md-ripple aria-hidden="true"></md-ripple> <button type="button" class="select svelte-3qlloz"${attr("aria-current", selected ? "true" : void 0)}><span class="title svelte-3qlloz">${escape_html(title)}</span> `);
45
+ if (subtitle) {
46
+ $$renderer.push(`<!--[0--><span class="subtitle svelte-3qlloz"${attr("aria-hidden", description === void 0 ? void 0 : "true")}>`);
47
+ subtitle($$renderer);
48
+ $$renderer.push(`<!----></span>`);
49
+ } else $$renderer.push("<!--[-1-->");
50
+ $$renderer.push(`<!--]--> `);
51
+ if (description !== void 0) $$renderer.push(`<!--[0--><span class="sr-only svelte-3qlloz">${escape_html(description)}</span>`);
52
+ else $$renderer.push("<!--[-1-->");
53
+ $$renderer.push(`<!--]--></button> `);
54
+ if (trailing) {
55
+ $$renderer.push(`<!--[0--><span class="trailing svelte-3qlloz">`);
56
+ trailing($$renderer);
57
+ $$renderer.push(`<!----></span>`);
58
+ } else $$renderer.push("<!--[-1-->");
59
+ $$renderer.push(`<!--]--></li>`);
60
+ }
61
+ // src/lib/core/sessions.ts
62
+ /** `4 s`, `3 min 12 s`, `1 h 05 min`. Never negative (the bridge's clock may run ahead). */
63
+ function formatDuration(milliseconds) {
64
+ const total = Math.max(0, Math.floor(milliseconds / 1e3));
65
+ const hours = Math.floor(total / 3600);
66
+ const minutes = Math.floor(total % 3600 / 60);
67
+ const seconds = total % 60;
68
+ if (hours > 0) return `${hours} h ${String(minutes).padStart(2, "0")} min`;
69
+ if (minutes > 0) return `${minutes} min ${seconds} s`;
70
+ return `${seconds} s`;
71
+ }
72
+ /** What a row shows under the name. `now` (epoch ms) is the end of a session that is still live. */
73
+ function describeSession(session, now) {
74
+ const duration = formatDuration((session.endedAt === null ? now : Date.parse(session.endedAt)) - Date.parse(session.startedAt));
75
+ const live = session.endedAt === null;
76
+ const entries = `${session.entries} ${session.entries === 1 ? "entry" : "entries"}`;
77
+ const parts = [
78
+ `Session ${session.id}`,
79
+ live ? "live" : null,
80
+ session.run === null ? null : `run ${session.run}`,
81
+ duration,
82
+ entries
83
+ ];
84
+ return {
85
+ id: `#${session.id}`,
86
+ run: session.run,
87
+ duration,
88
+ entries,
89
+ spoken: parts.filter((part) => part !== null).join(", ")
90
+ };
91
+ }
92
+ /**
93
+ * The session a pane shows: the one named in the URL if it still exists, otherwise the current
94
+ * one (following), otherwise none.
95
+ */
96
+ function selectedSessionId(requested, sessions, currentId) {
97
+ const id = requested === null || !/^\d+$/.test(requested) ? null : Number(requested);
98
+ if (id !== null && sessions.some((session) => session.id === id)) return id;
99
+ return currentId;
100
+ }
101
+ // src/lib/components/SessionsPane/SessionRow.svelte
102
+ function SessionRow($$renderer, $$props) {
103
+ $$renderer.component(($$renderer) => {
104
+ /** Epoch ms: the end of a live session's duration. */
105
+ let { session, now, selected, live, onSelect } = $$props;
106
+ const meta = derived(() => describeSession(session, now));
107
+ function subtitle($$renderer) {
108
+ $$renderer.push(`<span class="meta svelte-wvg2ho">`);
109
+ if (live) $$renderer.push(`<!--[0--><span class="dot svelte-wvg2ho"></span>`);
110
+ else $$renderer.push("<!--[-1-->");
111
+ $$renderer.push(`<!--]--> <span class="svelte-wvg2ho">${escape_html(meta().id)}</span> `);
112
+ if (meta().run !== null) $$renderer.push(`<!--[0--><span class="run svelte-wvg2ho">${escape_html(meta().run)}</span>`);
113
+ else $$renderer.push("<!--[-1-->");
114
+ $$renderer.push(`<!--]--> <span class="svelte-wvg2ho">${escape_html(meta().duration)}</span> <span class="svelte-wvg2ho">${escape_html(meta().entries)}</span></span>`);
115
+ }
116
+ ListItem($$renderer, {
117
+ title: session.name,
118
+ shape: "var(--md-sys-shape-corner-extra-large, 28px)",
119
+ subtitle,
120
+ selected,
121
+ description: meta().spoken,
122
+ onSelect
123
+ });
124
+ });
125
+ }
126
+ // src/lib/components/SessionsPane/StartSessionDialog.svelte
127
+ function StartSessionDialog($$renderer, $$props) {
128
+ $$renderer.component(($$renderer) => {
129
+ /** Rejects with a message to show; resolves when the session has started. */
130
+ let { open, onStart, onClose } = $$props;
131
+ let name = "";
132
+ let run = "";
133
+ let nameError = "";
134
+ let busy = false;
135
+ $$renderer.push(`<md-dialog${attr("open", open, true)} class="svelte-2k1elc"><div slot="headline">Start a session</div> <form slot="content" id="start-session-form" novalidate="" class="svelte-2k1elc"><md-outlined-text-field label="Name" required=""${attr("maxlength", API_LIMITS.sessionLabelLength)}${attr("value", name)}${attr("error", false)}${attr("error-text", nameError)}></md-outlined-text-field> <md-outlined-text-field label="Run (optional)" supporting-text="Groups sessions, for example one run id per test run."${attr("maxlength", API_LIMITS.sessionLabelLength)}${attr("value", run)}></md-outlined-text-field> `);
136
+ $$renderer.push("<!--[-1-->");
137
+ $$renderer.push(`<!--]--></form> <div slot="actions"><md-text-button type="button">Cancel</md-text-button> <md-text-button type="submit" form="start-session-form"${attr("disabled", busy, true)}>Start</md-text-button></div></md-dialog>`);
138
+ });
139
+ }
140
+ // src/lib/components/SessionsPane/SessionsPane.svelte
141
+ function SessionsPane($$renderer, $$props) {
142
+ $$renderer.component(($$renderer) => {
143
+ /** Newest first. */
144
+ /** Epoch ms, for the duration of the live session. */
145
+ let { sessions, currentId, selectedId, now, onSelect, onStart, onEnd } = $$props;
146
+ let startOpen = false;
147
+ let endOpen = false;
148
+ const toggleLabel = derived(() => currentId === null ? "Start a session" : `End session ${currentId}`);
149
+ $$renderer.push(`<section aria-labelledby="sessions-heading" class="svelte-1fz71rn"><header class="svelte-1fz71rn"><h2 id="sessions-heading" class="svelte-1fz71rn">Sessions</h2> <md-icon-button${attr_class(clsx(currentId === null ? "start" : "stop"), "svelte-1fz71rn")}${attr("title", toggleLabel())}${attr("aria-label", toggleLabel())}><md-icon aria-hidden="true">${escape_html(currentId === null ? "play_arrow" : "stop")}</md-icon></md-icon-button></header> `);
150
+ if (sessions.length === 0) $$renderer.push(`<!--[0--><p class="empty svelte-1fz71rn">No sessions in the buffer. Start one with the play button.</p>`);
151
+ else {
152
+ $$renderer.push(`<!--[-1--><ul aria-labelledby="sessions-heading" class="svelte-1fz71rn"><!--[-->`);
153
+ const each_array = ensure_array_like(sessions);
154
+ for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
155
+ let session = each_array[$$index];
156
+ SessionRow($$renderer, {
157
+ session,
158
+ now,
159
+ live: session.id === currentId,
160
+ selected: session.id === selectedId,
161
+ onSelect: () => onSelect(session.id)
162
+ });
163
+ }
164
+ $$renderer.push(`<!--]--></ul>`);
165
+ }
166
+ $$renderer.push(`<!--]--></section> `);
167
+ StartSessionDialog($$renderer, {
168
+ open: startOpen,
169
+ onStart,
170
+ onClose: () => startOpen = false
171
+ });
172
+ $$renderer.push(`<!----> `);
173
+ EndSessionDialog($$renderer, {
174
+ open: endOpen,
175
+ sessionId: currentId,
176
+ entries: sessions.find((session) => session.id === currentId)?.entries ?? null,
177
+ onEnd,
178
+ onClose: () => endOpen = false
179
+ });
180
+ $$renderer.push(`<!---->`);
181
+ });
182
+ }
2
183
  // src/routes/+page.svelte
3
184
  function _page($$renderer, $$props) {
4
185
  $$renderer.component(($$renderer) => {
5
186
  let { data } = $$props;
6
- $$renderer.push(`<main><h1>Screenreader speech capture</h1> <p>Bridge ${escape_html(data.status.bridge.version)} is ${escape_html(data.status.bridge.state)}.</p></main>`);
187
+ const list = derived(() => sessionsStore.loaded ? {
188
+ sessions: sessionsStore.sessions,
189
+ currentId: sessionsStore.currentId
190
+ } : data.sessions ?? {
191
+ sessions: [],
192
+ currentId: null
193
+ });
194
+ const now = derived(() => sessionsStore.loaded ? sessionsStore.now : data.now);
195
+ const selectedId = derived(() => selectedSessionId(page.url.searchParams.get("session"), list().sessions, list().currentId));
196
+ function select(id) {
197
+ const live = id === null || id === list().currentId;
198
+ return goto(live ? resolve("/") : `${resolve("/")}?session=${id}`, { reset: false });
199
+ }
200
+ async function start(name, run) {
201
+ await sessionsStore.start(name, run);
202
+ await select(null);
203
+ }
204
+ $$renderer.push(`<div class="monitor svelte-1uha8ag"><aside class="svelte-1uha8ag">`);
205
+ SessionsPane($$renderer, {
206
+ sessions: list().sessions,
207
+ currentId: list().currentId,
208
+ selectedId: selectedId(),
209
+ now: now(),
210
+ onSelect: (id) => void select(id),
211
+ onStart: start,
212
+ onEnd: () => sessionsStore.end()
213
+ });
214
+ $$renderer.push(`<!----></aside> <div class="log svelte-1uha8ag"><h1>Monitor</h1> `);
215
+ if (data.status) $$renderer.push(`<!--[0--><p>Bridge ${escape_html(data.status.bridge.version)} is ${escape_html(data.status.bridge.state)}.</p>`);
216
+ else $$renderer.push(`<!--[-1--><p>The bridge is not reachable.</p>`);
217
+ $$renderer.push(`<!--]--></div></div>`);
7
218
  });
8
219
  }
9
220
  export { _page as default };
@@ -1 +1 @@
1
- {"version":3,"file":"_page.svelte.js","names":["$.escape"],"sources":["../../../../src/routes/+page.svelte"],"sourcesContent":["<script lang=\"ts\">\n import type { PageProps } from './$types';\n\n let { data }: PageProps = $props();\n</script>\n\n<main>\n <h1>Screenreader speech capture</h1>\n <p>Bridge {data.status.bridge.version} is {data.status.bridge.state}.</p>\n</main>\n"],"mappings":";;;CAAA,WAAA,WAAA,eAAA;EAGE,IAAI,EAAE,SAAiB;EAKZ,WAAA,KAAA,wDAAAA,YAAA,KAAK,OAAO,OAAO,OAAO,EAAA,MAAAA,YAAM,KAAK,OAAO,OAAO,KAAK,EAAA,aAAA;CAJ7D,CAAA"}
1
+ {"version":3,"file":"_page.svelte.js","names":["$.derived","$.attr","$.escape","$.attr_class","$.attr_style","$.attr","$.escape","$.derived","$.escape","$.attr","$.derived","$.attr_class","$.clsx","$.attr","$.escape","$.ensure_array_like","$.derived","$.escape"],"sources":["../../../../src/lib/components/SessionsPane/EndSessionDialog.svelte","../../../../src/lib/components/ListItem/ListItem.svelte","../../../../src/lib/core/sessions.ts","../../../../src/lib/components/SessionsPane/SessionRow.svelte","../../../../src/lib/components/SessionsPane/StartSessionDialog.svelte","../../../../src/lib/components/SessionsPane/SessionsPane.svelte","../../../../src/routes/+page.svelte"],"sourcesContent":["<script lang=\"ts\">\n import '@material/web/button/text-button.js';\n import '@material/web/dialog/dialog.js';\n\n type Props = {\n open: boolean;\n sessionId: number | null;\n /** The session's entry count; the bridge forgets a session that ends with none. */\n entries: number | null;\n /** Rejects with a message to show; resolves when the session has ended. */\n onEnd: () => Promise<void>;\n onClose: () => void;\n };\n\n let { open, sessionId, entries, onEnd, onClose }: Props = $props();\n\n const empty = $derived(entries === 0);\n\n let failure = $state('');\n let busy = $state(false);\n\n $effect(() => {\n if (open) failure = '';\n });\n\n async function confirm(): Promise<void> {\n if (busy) return;\n failure = '';\n busy = true;\n try {\n await onEnd();\n onClose();\n } catch (cause) {\n failure = cause instanceof Error ? cause.message : 'The session could not be ended.';\n } finally {\n busy = false;\n }\n }\n</script>\n\n<md-dialog {open} onclosed={onClose}>\n <div slot=\"headline\">\n {empty ? 'Drop' : 'End'} session {sessionId === null ? '' : `#${sessionId}`}?\n </div>\n <div slot=\"content\">\n {#if empty}\n <p>This session has no entries, so ending it deletes it. Its number is not reused.</p>\n {:else}\n <p>Speech captured after this belongs to no session.</p>\n {/if}\n {#if failure !== ''}<p role=\"alert\" class=\"failure\">{failure}</p>{/if}\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 type=\"button\" disabled={busy} onclick={confirm}>End session</md-text-button>\n </div>\n</md-dialog>\n\n<style>\n md-dialog {\n /* The dialog is as wide as its longest line by default; a cap makes the text wrap. */\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\n .failure {\n margin-top: 12px;\n color: var(--md-sys-color-error);\n }\n</style>\n","<script lang=\"ts\">\n import '@material/web/ripple/ripple.js';\n import type { Snippet } from 'svelte';\n\n type Props = {\n /** One line, cut off with an ellipsis. */\n title: string;\n /** The muted monospace line under the title. */\n subtitle?: Snippet;\n /** Actions at the end of the row. They sit beside the select button, never inside it. */\n trailing?: Snippet;\n /** Highlights the row and sets `aria-current`. */\n selected?: boolean;\n /**\n * What a screen reader should hear instead of the visual subtitle. Without it the subtitle\n * is read as it is.\n */\n description?: string;\n /**\n * The row's corner radius as a CSS value. Defaults to 8px, the radius of md-list-item's\n * focus ring (md-list-item itself has no container shape).\n */\n shape?: string;\n onSelect: () => void;\n };\n\n let {\n title,\n subtitle,\n trailing,\n selected = false,\n description,\n shape,\n onSelect,\n }: Props = $props();\n</script>\n\n<li class:selected style:--list-item-shape={shape}>\n <!-- One hover and press layer for the whole row, trailing actions included. -->\n <md-ripple aria-hidden=\"true\"></md-ripple>\n <button\n type=\"button\"\n class=\"select\"\n aria-current={selected ? 'true' : undefined}\n onclick={onSelect}\n >\n <span class=\"title\">{title}</span>\n {#if subtitle}\n <!-- With a description, the sentence below says all of this once. -->\n <span class=\"subtitle\" aria-hidden={description === undefined ? undefined : 'true'}>\n {@render subtitle()}\n </span>\n {/if}\n {#if description !== undefined}<span class=\"sr-only\">{description}</span>{/if}\n </button>\n {#if trailing}\n <!-- A sibling of the select button, so no interactive element sits inside another. -->\n <span class=\"trailing\">{@render trailing()}</span>\n {/if}\n</li>\n\n<style>\n li {\n position: relative;\n display: flex;\n align-items: center;\n min-height: 60px;\n border-radius: var(--list-item-shape, var(--md-sys-shape-corner-small, 8px));\n color: var(--md-sys-color-on-surface);\n /* The layer follows the text colour, so it shows on the selected row too. */\n --md-ripple-hover-color: currentColor;\n --md-ripple-pressed-color: currentColor;\n }\n\n li.selected {\n background: var(--md-sys-color-secondary-container);\n color: var(--md-sys-color-on-secondary-container);\n }\n\n .select {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 4px;\n align-items: flex-start;\n min-width: 0;\n min-height: 60px;\n padding: 8px 16px;\n border: 0;\n border-radius: inherit;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n justify-content: center;\n }\n\n .title {\n max-width: 100%;\n overflow: hidden;\n font-size: var(--md-sys-typescale-label-large-size, 14px);\n font-weight: 500;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n /* Font, size and colour are inherited by whatever the subtitle snippet renders. */\n .subtitle {\n max-width: 100%;\n overflow: hidden;\n color: var(--md-sys-color-on-surface-variant);\n font-family: var(--app-font-mono);\n font-size: var(--app-mono-size);\n white-space: nowrap;\n }\n\n li.selected .subtitle {\n color: inherit;\n }\n\n .trailing {\n display: flex;\n flex: none;\n margin-right: 8px;\n }\n\n .sr-only {\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","import type {\n SessionDto,\n SessionListDto,\n StartSessionResponseDto,\n} from '@screenreader-speech-capture/shared';\n\n/** Where the sessions come from and go to (the HTTP adapter asks the BFF, which asks the bridge). */\nexport interface SessionsApi {\n list(): Promise<SessionListDto>;\n start(name: string, run: string | null): Promise<StartSessionResponseDto>;\n /** Ends the current session; does nothing if none is current. */\n end(): Promise<void>;\n}\n\n/** `4 s`, `3 min 12 s`, `1 h 05 min`. Never negative (the bridge's clock may run ahead). */\nexport function formatDuration(milliseconds: number): string {\n const total = Math.max(0, Math.floor(milliseconds / 1000));\n const hours = Math.floor(total / 3600);\n const minutes = Math.floor((total % 3600) / 60);\n const seconds = total % 60;\n if (hours > 0) return `${hours} h ${String(minutes).padStart(2, '0')} min`;\n if (minutes > 0) return `${minutes} min ${seconds} s`;\n return `${seconds} s`;\n}\n\nexport type SessionMeta = {\n /** `#7` */\n id: string;\n run: string | null;\n duration: string;\n /** `4 entries`, `1 entry` */\n entries: string;\n /** The same facts as a sentence, for the screen reader. */\n spoken: string;\n};\n\n/** What a row shows under the name. `now` (epoch ms) is the end of a session that is still live. */\nexport function describeSession(session: SessionDto, now: number): SessionMeta {\n const end = session.endedAt === null ? now : Date.parse(session.endedAt);\n const duration = formatDuration(end - Date.parse(session.startedAt));\n const live = session.endedAt === null;\n const entries = `${session.entries} ${session.entries === 1 ? 'entry' : 'entries'}`;\n const parts = [\n `Session ${session.id}`,\n live ? 'live' : null,\n session.run === null ? null : `run ${session.run}`,\n duration,\n entries,\n ];\n return {\n id: `#${session.id}`,\n run: session.run,\n duration,\n entries,\n spoken: parts.filter((part) => part !== null).join(', '),\n };\n}\n\n/**\n * The session a pane shows: the one named in the URL if it still exists, otherwise the current\n * one (following), otherwise none.\n */\nexport function selectedSessionId(\n requested: string | null,\n sessions: SessionDto[],\n currentId: number | null,\n): number | null {\n const id = requested === null || !/^\\d+$/.test(requested) ? null : Number(requested);\n if (id !== null && sessions.some((session) => session.id === id)) return id;\n return currentId;\n}\n","<script lang=\"ts\">\n import ListItem from '#lib/components/ListItem/ListItem.svelte';\n import { describeSession } from '#lib/core/sessions.js';\n import type { SessionDto } from '@screenreader-speech-capture/shared';\n\n type Props = {\n session: SessionDto;\n /** Epoch ms: the end of a live session's duration. */\n now: number;\n selected: boolean;\n live: boolean;\n onSelect: () => void;\n };\n\n let { session, now, selected, live, onSelect }: Props = $props();\n\n const meta = $derived(describeSession(session, now));\n</script>\n\n{#snippet subtitle()}\n <span class=\"meta\">\n {#if live}<span class=\"dot\"></span>{/if}\n <span>{meta.id}</span>\n {#if meta.run !== null}<span class=\"run\">{meta.run}</span>{/if}\n <span>{meta.duration}</span>\n <span>{meta.entries}</span>\n </span>\n{/snippet}\n\n<ListItem\n title={session.name}\n shape=\"var(--md-sys-shape-corner-extra-large, 28px)\"\n {subtitle}\n {selected}\n description={meta.spoken}\n {onSelect}\n/>\n\n<style>\n /* One line. The run name and then the entry count shrink with an ellipsis; the rest stays whole. */\n .meta {\n display: flex;\n align-items: center;\n min-width: 0;\n }\n\n .meta > span {\n flex: none;\n white-space: nowrap;\n }\n\n .meta > :not(:last-child)::after {\n content: '\\00a0·\\00a0';\n }\n\n .meta > .dot::after {\n content: none;\n }\n\n .meta > .run,\n .meta > span:last-child {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .dot {\n flex: none;\n width: 8px;\n height: 8px;\n margin-right: 6px;\n border-radius: 50%;\n background: var(--app-success);\n animation: pulse 1.6s ease-in-out infinite;\n }\n\n @keyframes pulse {\n 50% {\n opacity: 0.35;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .dot {\n animation: none;\n }\n }\n</style>\n","<script lang=\"ts\">\n import '@material/web/button/text-button.js';\n import '@material/web/dialog/dialog.js';\n import '@material/web/textfield/outlined-text-field.js';\n import { API_LIMITS } from '@screenreader-speech-capture/shared';\n\n type Props = {\n open: boolean;\n /** Rejects with a message to show; resolves when the session has started. */\n onStart: (name: string, run: string | null) => Promise<void>;\n onClose: () => void;\n };\n\n let { open, onStart, onClose }: Props = $props();\n\n let name = $state('');\n let run = $state('');\n let nameError = $state('');\n let failure = $state('');\n let busy = $state(false);\n\n $effect(() => {\n if (open) {\n name = '';\n run = '';\n nameError = '';\n failure = '';\n }\n });\n\n async function submit(event: SubmitEvent): Promise<void> {\n event.preventDefault();\n if (busy) return;\n const trimmedName = name.trim();\n if (trimmedName === '') {\n nameError = 'Enter a name.';\n return;\n }\n nameError = '';\n failure = '';\n busy = true;\n try {\n await onStart(trimmedName, run.trim() === '' ? null : run.trim());\n onClose();\n } catch (cause) {\n failure = cause instanceof Error ? cause.message : 'The session could not be started.';\n } finally {\n busy = false;\n }\n }\n</script>\n\n<md-dialog {open} onclosed={onClose}>\n <div slot=\"headline\">Start a session</div>\n <form slot=\"content\" id=\"start-session-form\" novalidate onsubmit={submit}>\n <md-outlined-text-field\n label=\"Name\"\n required\n maxlength={API_LIMITS.sessionLabelLength}\n value={name}\n error={nameError !== ''}\n error-text={nameError}\n oninput={(event: Event) => (name = (event.target as HTMLInputElement).value)}\n ></md-outlined-text-field>\n <md-outlined-text-field\n label=\"Run (optional)\"\n supporting-text=\"Groups sessions, for example one run id per test run.\"\n maxlength={API_LIMITS.sessionLabelLength}\n value={run}\n oninput={(event: Event) => (run = (event.target as HTMLInputElement).value)}\n ></md-outlined-text-field>\n {#if failure !== ''}<p role=\"alert\" class=\"failure\">{failure}</p>{/if}\n </form>\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 <md-text-button type=\"submit\" form=\"start-session-form\" disabled={busy}>Start</md-text-button>\n </div>\n</md-dialog>\n\n<style>\n md-dialog {\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 form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n min-width: min(360px, 70vw);\n }\n\n .failure {\n margin: 0;\n color: var(--md-sys-color-error);\n }\n</style>\n","<script lang=\"ts\">\n import '@material/web/icon/icon.js';\n import '@material/web/iconbutton/icon-button.js';\n import type { SessionDto } from '@screenreader-speech-capture/shared';\n import EndSessionDialog from './EndSessionDialog.svelte';\n import SessionRow from './SessionRow.svelte';\n import StartSessionDialog from './StartSessionDialog.svelte';\n\n type Props = {\n /** Newest first. */\n sessions: SessionDto[];\n currentId: number | null;\n selectedId: number | null;\n /** Epoch ms, for the duration of the live session. */\n now: number;\n onSelect: (id: number) => void;\n onStart: (name: string, run: string | null) => Promise<void>;\n onEnd: () => Promise<void>;\n };\n\n let { sessions, currentId, selectedId, now, onSelect, onStart, onEnd }: Props = $props();\n\n let startOpen = $state(false);\n let endOpen = $state(false);\n\n const toggleLabel = $derived(currentId === null ? 'Start a session' : `End session ${currentId}`);\n</script>\n\n<section aria-labelledby=\"sessions-heading\">\n <header>\n <h2 id=\"sessions-heading\">Sessions</h2>\n <!-- svelte-ignore a11y_click_events_have_key_events, a11y_no_static_element_interactions -->\n <md-icon-button\n class={currentId === null ? 'start' : 'stop'}\n title={toggleLabel}\n aria-label={toggleLabel}\n onclick={() => (currentId === null ? (startOpen = true) : (endOpen = true))}\n >\n <md-icon aria-hidden=\"true\">{currentId === null ? 'play_arrow' : 'stop'}</md-icon>\n </md-icon-button>\n </header>\n\n {#if sessions.length === 0}\n <p class=\"empty\">No sessions in the buffer. Start one with the play button.</p>\n {:else}\n <ul aria-labelledby=\"sessions-heading\">\n {#each sessions as session (session.id)}\n <SessionRow\n {session}\n {now}\n live={session.id === currentId}\n selected={session.id === selectedId}\n onSelect={() => onSelect(session.id)}\n />\n {/each}\n </ul>\n {/if}\n</section>\n\n<StartSessionDialog open={startOpen} {onStart} onClose={() => (startOpen = false)} />\n<EndSessionDialog\n open={endOpen}\n sessionId={currentId}\n entries={sessions.find((session) => session.id === currentId)?.entries ?? null}\n {onEnd}\n onClose={() => (endOpen = false)}\n/>\n\n<style>\n section {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n padding: 16px 12px;\n border-radius: 28px;\n background: var(--md-sys-color-surface-container-low);\n }\n\n header {\n flex: none;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 4px 8px 16px;\n }\n\n h2 {\n margin: 0;\n font-size: var(--md-sys-typescale-title-medium-size, 16px);\n font-weight: 500;\n }\n\n .start {\n --md-icon-button-icon-color: var(--md-sys-color-primary);\n --md-icon-button-hover-icon-color: var(--md-sys-color-primary);\n --md-icon-button-focus-icon-color: var(--md-sys-color-primary);\n }\n\n .stop {\n --md-icon-button-icon-color: var(--md-sys-color-error);\n --md-icon-button-hover-icon-color: var(--md-sys-color-error);\n --md-icon-button-focus-icon-color: var(--md-sys-color-error);\n }\n\n ul {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 4px;\n min-height: 0;\n overflow-y: auto;\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n .empty {\n margin: 0;\n padding: 8px 16px;\n color: var(--md-sys-color-on-surface-variant);\n }\n</style>\n","<script lang=\"ts\">\n import { onMount } from 'svelte';\n import { goto } from '$app/navigation';\n import { resolve } from '$app/paths';\n import { page } from '$app/state';\n import SessionsPane from '#lib/components/SessionsPane/SessionsPane.svelte';\n import { sessionsStore } from '#lib/composition.js';\n import { selectedSessionId } from '#lib/core/sessions.js';\n import type { PageProps } from './$types';\n\n let { data }: PageProps = $props();\n\n // Until the store has read the list, show what the server rendered (`+page.server.ts`), so the\n // server's HTML already has the sessions. The store is shared by all requests: it is never\n // filled on the server.\n const list = $derived(\n sessionsStore.loaded\n ? { sessions: sessionsStore.sessions, currentId: sessionsStore.currentId }\n : (data.sessions ?? { sessions: [], currentId: null }),\n );\n const now = $derived(sessionsStore.loaded ? sessionsStore.now : data.now);\n\n // The URL names the selected session; without it the pane follows the current one.\n const selectedId = $derived(\n selectedSessionId(page.url.searchParams.get('session'), list.sessions, list.currentId),\n );\n\n onMount(() => sessionsStore.init(data.sessions));\n\n function select(id: number | null): Promise<void> {\n const live = id === null || id === list.currentId;\n // eslint-disable-next-line svelte/no-navigation-without-resolve\n return goto(live ? resolve('/') : `${resolve('/')}?session=${id}`, { reset: false });\n }\n\n async function start(name: string, run: string | null): Promise<void> {\n await sessionsStore.start(name, run);\n await select(null); // the new session is current: follow it\n }\n</script>\n\n<div class=\"monitor\">\n <aside>\n <SessionsPane\n sessions={list.sessions}\n currentId={list.currentId}\n {selectedId}\n {now}\n onSelect={(id: number) => void select(id)}\n onStart={start}\n onEnd={() => sessionsStore.end()}\n />\n </aside>\n <div class=\"log\">\n <h1>Monitor</h1>\n {#if data.status}\n <p>Bridge {data.status.bridge.version} is {data.status.bridge.state}.</p>\n {:else}\n <p>The bridge is not reachable.</p>\n {/if}\n </div>\n</div>\n\n<style>\n /* The same gap above as below, and the one the rail keeps above its active item, so the pane\n starts level with it. */\n .monitor {\n display: flex;\n gap: 16px;\n align-items: stretch;\n height: 100%;\n padding: var(--app-gutter) 0;\n }\n\n aside {\n flex: none;\n width: var(--app-sessions-width);\n min-height: 0;\n }\n\n .log {\n flex: 1;\n min-width: 0;\n }\n</style>\n"],"mappings":";;;;;;;;;;;;;;CAAA,WAAA,WAAA,eAAA;;;EAcE,IAAI,EAAE,MAAM,WAAW,SAAS,OAAO,YAAgB;EAEvD,MAAM,QAAKA,cAAY,YAAY,CAAC;EAGpC,IAAI,OAAc;EAqBR,WAAA,KAAA,aAAAC,KAAA,QAAA,MAAI,IAAA,EAAA,+CAAAC,YAEX,MAAK,IAAG,S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WAAA,eAAA;EAUE,IAAI,EAAE,SAAiB;EAKvB,MAAM,OAAIC,cACR,cAAc,SACV;GAAE,UAAU,cAAc;GAAU,WAAW,cAAc;EAAU,IACtE,KAAK,YAAY;GAAE,UAAU,CAAA;GAAI,WAAW;EAAI,CAAE;EAEzD,MAAM,MAAGA,cAAY,cAAc,SAAS,cAAc,MAAM,KAAK,GAAG;EAGxE,MAAM,aAAUA,cACd,kBAAkB,KAAK,IAAI,aAAa,IAAI,SAAS,GAAG,KAAI,CAAA,CAAC,UAAU,KAAI,CAAA,CAAC,SAAS,CAAC;EAKxF,SAAS,OAAO,IAAkC;GAChD,MAAM,OAAO,OAAO,QAAQ,OAAO,KAAI,CAAA,CAAC;GAExC,OAAO,KAAK,OAAO,QAAQ,GAAG,IAAI,GAAG,QAAQ,GAAG,EAAC,WAAY,MAAM,EAAE,OAAO,MAAK,CAAE;EACrF;EAEA,eAAe,MAAM,MAAc,KAAmC;GACpE,MAAM,cAAc,MAAM,MAAM,GAAG;GACnC,MAAM,OAAO,IAAI;EACnB;;;GAMc,UAAA,KAAI,CAAA,CAAC;GACJ,WAAA,KAAI,CAAA,CAAC;GACf,YAAA,WAAU;GACV,KAAA,IAAG;GACM,WAAC,OAAe,KAAK,OAAO,EAAE;GAC/B,SAAA;GACF,aAAM,cAAc,IAAG;;;EAK3B,IAAA,KAAK,QACG,WAAA,KAAA,sBAAAC,YAAA,KAAK,OAAO,OAAO,OAAO,EAAA,MAAAA,YAAM,KAAK,OAAO,OAAO,KAAK,EAAA,MAAA;;;CAjBjE,CAAA"}
@@ -0,0 +1,8 @@
1
+ import "../../../chunks/server2.js";
2
+ // src/routes/settings/+page.svelte
3
+ function _page($$renderer) {
4
+ $$renderer.push(`<h1>Settings</h1> <p>The bridge settings will be edited here.</p>`);
5
+ }
6
+ export { _page as default };
7
+
8
+ //# sourceMappingURL=_page.svelte.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_page.svelte.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import "../../../chunks/server2.js";
2
+ // 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>`);
5
+ }
6
+ export { _page as default };
7
+
8
+ //# sourceMappingURL=_page.svelte.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_page.svelte.js","names":[],"sources":[],"mappings":""}
@@ -1,6 +1,6 @@
1
1
  import { n as set_building, r as set_prerendering } from "./chunks/server.js";
2
- import { L as enable_verbose_errors } from "./chunks/exports.js";
3
- import { At as set_assets, l as set_fix_stack_trace, o as set_manifest, s as set_read_implementation, t as format_response } from "./chunks/internal.js";
2
+ import { W as enable_verbose_errors } from "./chunks/exports.js";
3
+ import { jt as set_assets, l as set_fix_stack_trace, o as set_manifest, s as set_read_implementation, t as format_response } from "./chunks/internal.js";
4
4
  // ../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/runtime/server/index.js
5
5
  /**
6
6
  * Sets the module-level state the runtime reads, then loads the runtime. Everything that