fedipod-server 0.9.0 → 0.11.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 (319) hide show
  1. package/dist/claims.js +1 -1
  2. package/dist/handler.d.ts +1 -1
  3. package/dist/handler.js +35 -2
  4. package/dist/handler.jsonld +1 -1
  5. package/lib/admin.mjs +3 -3
  6. package/lib/c2s.mjs +27 -2
  7. package/lib/deliver.mjs +6 -0
  8. package/lib/embed.mjs +1 -0
  9. package/lib/export-collections.mjs +1 -1
  10. package/lib/front-core.mjs +272 -49
  11. package/lib/gateway-core.mjs +3 -7
  12. package/lib/httpsig.mjs +33 -2
  13. package/lib/import.mjs +1 -1
  14. package/lib/intake.mjs +357 -118
  15. package/lib/links.mjs +6 -32
  16. package/lib/mastoapi.mjs +449 -38
  17. package/lib/migrate.mjs +4 -18
  18. package/lib/pod/README.md +61 -0
  19. package/lib/pod/actor.mjs +96 -0
  20. package/lib/pod/collection.mjs +77 -0
  21. package/lib/pod/containers.mjs +136 -0
  22. package/lib/pod/discovery.mjs +46 -0
  23. package/lib/pod/featured.mjs +18 -0
  24. package/lib/pod/followers.mjs +24 -0
  25. package/lib/pod/following.mjs +10 -0
  26. package/lib/pod/http.mjs +74 -0
  27. package/lib/pod/inbox.mjs +144 -0
  28. package/lib/pod/links.mjs +35 -0
  29. package/lib/pod/media.mjs +27 -0
  30. package/lib/pod/notes.mjs +80 -0
  31. package/lib/pod/notifications.mjs +89 -0
  32. package/lib/pod/outbox.mjs +18 -0
  33. package/lib/pod/package.json +19 -0
  34. package/lib/pod/policy.mjs +58 -0
  35. package/lib/pod/private.mjs +19 -0
  36. package/lib/pod/root.mjs +63 -0
  37. package/lib/pod/state.mjs +39 -0
  38. package/lib/pod/transport.mjs +477 -0
  39. package/lib/pod/urls.mjs +71 -0
  40. package/lib/polls.mjs +105 -0
  41. package/lib/publisher.mjs +357 -188
  42. package/lib/remote.mjs +30 -395
  43. package/lib/social.mjs +20 -9
  44. package/lib/storage.mjs +2 -2
  45. package/lib/store.mjs +8 -1
  46. package/lib/tagfeed.mjs +19 -2
  47. package/lib/wire.mjs +87 -67
  48. package/package.json +1 -1
  49. package/run-agent.mjs +20 -39
  50. package/web/admin/admin.js +141 -74
  51. package/web/admin/bar.css +9 -13
  52. package/web/admin/bar.js +2 -2
  53. package/web/admin/client/client.js +1 -1
  54. package/web/admin/client/index.html +5 -6
  55. package/web/admin/index.html +53 -65
  56. package/web/admin/setup/index.html +2 -1
  57. package/web/admin/setup/setup.js +1 -1
  58. package/web/admin/tokens.css +56 -0
  59. package/web/app/README.md +77 -0
  60. package/web/app/admin-facade.mjs +549 -0
  61. package/web/app/agent.mjs +490 -0
  62. package/web/app/atproto-browser.mjs +86 -0
  63. package/web/app/boot.mjs +340 -0
  64. package/web/app/deliver-relay.mjs +72 -0
  65. package/web/app/dist/boot.js +34067 -0
  66. package/web/app/dist/boot.js.map +7 -0
  67. package/web/app/dist/sw.js +53745 -0
  68. package/web/app/dist/sw.js.map +7 -0
  69. package/web/app/fediacct-browser.mjs +146 -0
  70. package/web/app/idb-kv.mjs +35 -0
  71. package/web/app/index.html +203 -0
  72. package/web/app/index.html~ +152 -0
  73. package/web/app/keys-browser.mjs +46 -0
  74. package/web/app/keystore.mjs +99 -0
  75. package/web/app/oidc-session.mjs +189 -0
  76. package/web/app/pod-auth.mjs +248 -0
  77. package/web/app/pod-remote.mjs +84 -0
  78. package/web/app/shims/_globals.mjs +2 -0
  79. package/web/app/shims/fedify-sig.mjs +77 -0
  80. package/web/app/shims/node-crypto.mjs +113 -0
  81. package/web/app/shims/node-fs.mjs +17 -0
  82. package/web/app/shims/node-path.mjs +19 -0
  83. package/web/app/shims/node-url.mjs +7 -0
  84. package/web/app/shims/prelude.js +58 -0
  85. package/web/app/shims/safefetch.mjs +58 -0
  86. package/web/app/shims/web-push.mjs +14 -0
  87. package/web/app/signup.mjs +248 -0
  88. package/web/app/site/_headers +9 -0
  89. package/web/app/site/_redirects +21 -0
  90. package/web/app/site/admin/admin.js +1181 -0
  91. package/web/app/site/admin/bar.css +60 -0
  92. package/web/app/site/admin/bar.js +61 -0
  93. package/web/app/site/admin/client/client.js +66 -0
  94. package/web/app/site/admin/client/index.html +43 -0
  95. package/web/app/site/admin/index.html +556 -0
  96. package/web/app/site/admin/setup/index.html +191 -0
  97. package/web/app/site/admin/setup/setup.js +308 -0
  98. package/web/app/site/admin/tokens.css +56 -0
  99. package/web/app/site/admin/window.css +55 -0
  100. package/web/app/site/admin/window.js +136 -0
  101. package/web/app/site/app/404.html +40 -0
  102. package/web/app/site/app/_headers +2 -0
  103. package/web/app/site/app/apple-touch-icon.png +0 -0
  104. package/web/app/site/app/assets/ICONS-DIPJeU0C.js +2 -0
  105. package/web/app/site/app/assets/ICONS-DIPJeU0C.js.map +1 -0
  106. package/web/app/site/app/assets/ScheduledAtField-D-Abfo4J.js +183 -0
  107. package/web/app/site/app/assets/ScheduledAtField-D-Abfo4J.js.map +1 -0
  108. package/web/app/site/app/assets/Temml-CCjoacWt.woff2 +0 -0
  109. package/web/app/site/app/assets/__vite-browser-external-C7iut881.js +2 -0
  110. package/web/app/site/app/assets/__vite-browser-external-C7iut881.js.map +1 -0
  111. package/web/app/site/app/assets/boosts-carousel-BiOaNdMT.jpg +0 -0
  112. package/web/app/site/app/assets/catch-up-O5q5C75Z.png +0 -0
  113. package/web/app/site/app/assets/chunk-aKtaBQYM.js +1 -0
  114. package/web/app/site/app/assets/compose-CFEx7wb4.js +2 -0
  115. package/web/app/site/app/assets/compose-CFEx7wb4.js.map +1 -0
  116. package/web/app/site/app/assets/compose-ZJN5xSb4.js +35 -0
  117. package/web/app/site/app/assets/compose-ZJN5xSb4.js.map +1 -0
  118. package/web/app/site/app/assets/debug.module-YFQgwnIr.js +52 -0
  119. package/web/app/site/app/assets/debug.module-YFQgwnIr.js.map +1 -0
  120. package/web/app/site/app/assets/dom-p1YcJ5Rw.js +2 -0
  121. package/web/app/site/app/assets/dom-p1YcJ5Rw.js.map +1 -0
  122. package/web/app/site/app/assets/home-mobile-dark@2x-Dc-J8-SM.png +0 -0
  123. package/web/app/site/app/assets/home-mobile-light@2x-Bd3fod8m.png +0 -0
  124. package/web/app/site/app/assets/home-tablet-dark@2x-BgcNI8le.png +0 -0
  125. package/web/app/site/app/assets/home-tablet-light@2x-BW2RV9T6.png +0 -0
  126. package/web/app/site/app/assets/icons/add-circle-line-WD0mwORD.js +1 -0
  127. package/web/app/site/app/assets/icons/alert-line-CpFUMf9s.js +1 -0
  128. package/web/app/site/app/assets/icons/android-2-line-Bzxnrd3S.js +1 -0
  129. package/web/app/site/app/assets/icons/announcement-line-5nwaJFJm.js +1 -0
  130. package/web/app/site/app/assets/icons/arrow-down-circle-line-a7Id9-Iv.js +1 -0
  131. package/web/app/site/app/assets/icons/arrow-down-line-B8uzXzq6.js +1 -0
  132. package/web/app/site/app/assets/icons/arrow-left-line-CGrGT9C-.js +1 -0
  133. package/web/app/site/app/assets/icons/arrow-right-line-CE-HERfX.js +1 -0
  134. package/web/app/site/app/assets/icons/arrow-to-up-line-CvdQjmcy.js +1 -0
  135. package/web/app/site/app/assets/icons/arrow-up-circle-line-DEparSNF.js +1 -0
  136. package/web/app/site/app/assets/icons/arrow-up-line-C7yBeugc.js +1 -0
  137. package/web/app/site/app/assets/icons/arrows-right-line-BtbXmJGP.js +1 -0
  138. package/web/app/site/app/assets/icons/at-line-CF66Bznk.js +1 -0
  139. package/web/app/site/app/assets/icons/attachment-line-BY8It-l9.js +1 -0
  140. package/web/app/site/app/assets/icons/blockquote-line-BS6pU_hm.js +1 -0
  141. package/web/app/site/app/assets/icons/board-line-C0UWXyA6.js +1 -0
  142. package/web/app/site/app/assets/icons/bookmark-line-1CtX5JLF.js +1 -0
  143. package/web/app/site/app/assets/icons/building-5-line-Dd59MzbO.js +1 -0
  144. package/web/app/site/app/assets/icons/bus-2-line-6_dvA0GG.js +1 -0
  145. package/web/app/site/app/assets/icons/calendar-day-line-Crpl_fmu.js +1 -0
  146. package/web/app/site/app/assets/icons/calendar-month-line-vommts2C.js +1 -0
  147. package/web/app/site/app/assets/icons/calendar-time-add-line-BU_DTlQk.js +1 -0
  148. package/web/app/site/app/assets/icons/camera-line-Cv69MEei.js +1 -0
  149. package/web/app/site/app/assets/icons/celebrate-line-B8DvIoi0.js +1 -0
  150. package/web/app/site/app/assets/icons/chart-bar-line-FK-QOmtF.js +1 -0
  151. package/web/app/site/app/assets/icons/chart-line-line-BGcJAFWw.js +1 -0
  152. package/web/app/site/app/assets/icons/chat-3-line-YFK2-hwz.js +1 -0
  153. package/web/app/site/app/assets/icons/check-circle-line-DsAxFr5-.js +1 -0
  154. package/web/app/site/app/assets/icons/clipboard-line-BBp364gJ.js +1 -0
  155. package/web/app/site/app/assets/icons/close-circle-line-CICdiuGz.js +1 -0
  156. package/web/app/site/app/assets/icons/close-line-DYrFWcjv.js +1 -0
  157. package/web/app/site/app/assets/icons/cloud-line-tiQAbah8.js +1 -0
  158. package/web/app/site/app/assets/icons/code-line-fAl8iiV3.js +1 -0
  159. package/web/app/site/app/assets/icons/comment-2-line-CR3g7WeB.js +1 -0
  160. package/web/app/site/app/assets/icons/copy-2-line-CLW69yF5.js +1 -0
  161. package/web/app/site/app/assets/icons/delete-2-line-B8xmbr4n.js +1 -0
  162. package/web/app/site/app/assets/icons/document-3-line-DBGNhAg2.js +1 -0
  163. package/web/app/site/app/assets/icons/document-line-C7mb9sb7.js +1 -0
  164. package/web/app/site/app/assets/icons/down-line-BGqSSThd.js +1 -0
  165. package/web/app/site/app/assets/icons/edit-4-line-DcgGaEhx.js +1 -0
  166. package/web/app/site/app/assets/icons/emoji-2-line-D8YgnM-y.js +1 -0
  167. package/web/app/site/app/assets/icons/exit-line-Dc07BS-x.js +1 -0
  168. package/web/app/site/app/assets/icons/external-link-line-BvpSkmjO.js +1 -0
  169. package/web/app/site/app/assets/icons/eye-2-line-CiWXx-f_.js +1 -0
  170. package/web/app/site/app/assets/icons/eye-close-line-BgTaSJ4P.js +1 -0
  171. package/web/app/site/app/assets/icons/filter-2-line-B_mR2usy.js +1 -0
  172. package/web/app/site/app/assets/icons/filter-line-C_nm-3cU.js +1 -0
  173. package/web/app/site/app/assets/icons/flag-1-line-C2HB05I0.js +1 -0
  174. package/web/app/site/app/assets/icons/forbid-circle-line-D3LTT9yd.js +1 -0
  175. package/web/app/site/app/assets/icons/formula-line-DLrt2d6j.js +1 -0
  176. package/web/app/site/app/assets/icons/grid-line-CgUmEikf.js +1 -0
  177. package/web/app/site/app/assets/icons/group-line-C5fnX0wU.js +1 -0
  178. package/web/app/site/app/assets/icons/hand-finger-2-line-BGgxbuL9.js +1 -0
  179. package/web/app/site/app/assets/icons/hashtag-line-CyTEEXBb.js +1 -0
  180. package/web/app/site/app/assets/icons/heart-crack-line-BZddbO2C.js +1 -0
  181. package/web/app/site/app/assets/icons/heart-line-CJ7K47J4.js +1 -0
  182. package/web/app/site/app/assets/icons/history-2-line-kWWvFzqv.js +1 -0
  183. package/web/app/site/app/assets/icons/history-line-bGQiwbTH.js +1 -0
  184. package/web/app/site/app/assets/icons/home-3-line-fRU1zeLG.js +1 -0
  185. package/web/app/site/app/assets/icons/information-line-iNk6-sOY.js +1 -0
  186. package/web/app/site/app/assets/icons/keyboard-line-DsCyuQNz.js +1 -0
  187. package/web/app/site/app/assets/icons/layout-4-line-CZkOX52Z.js +1 -0
  188. package/web/app/site/app/assets/icons/layout-5-line-B_znt5wO.js +1 -0
  189. package/web/app/site/app/assets/icons/left-line-eUw0tya4.js +1 -0
  190. package/web/app/site/app/assets/icons/lightning-line-DaKoDdix.js +1 -0
  191. package/web/app/site/app/assets/icons/link-2-line-DCqLmMA7.js +1 -0
  192. package/web/app/site/app/assets/icons/list-check-line-BAxosBh9.js +1 -0
  193. package/web/app/site/app/assets/icons/lock-line-CPoaXeUW.js +1 -0
  194. package/web/app/site/app/assets/icons/mail-line-B0P8aa1L.js +1 -0
  195. package/web/app/site/app/assets/icons/moon-line-CEqNAToP.js +1 -0
  196. package/web/app/site/app/assets/icons/more-1-fill-Dw2e5xab.js +1 -0
  197. package/web/app/site/app/assets/icons/more-3-line-BIiVjYTz.js +1 -0
  198. package/web/app/site/app/assets/icons/notification-line-BZZq2Gtu.js +1 -0
  199. package/web/app/site/app/assets/icons/pencil-line-CKh8-A1v.js +1 -0
  200. package/web/app/site/app/assets/icons/photo-album-line-Bnfg2u40.js +1 -0
  201. package/web/app/site/app/assets/icons/pin-line-DpTolyhs.js +1 -0
  202. package/web/app/site/app/assets/icons/play-fill-B0-G_8lX.js +1 -0
  203. package/web/app/site/app/assets/icons/qrcode-2-line-B6SPCaHn.js +1 -0
  204. package/web/app/site/app/assets/icons/quill-pen-line-B6LUrnCP.js +1 -0
  205. package/web/app/site/app/assets/icons/quote-left-fill-hQZ1cj_6.js +1 -0
  206. package/web/app/site/app/assets/icons/radar-line-CKyroTth.js +1 -0
  207. package/web/app/site/app/assets/icons/react-line-CoIKhhtK.js +1 -0
  208. package/web/app/site/app/assets/icons/refresh-2-line-D0mTF97S.js +1 -0
  209. package/web/app/site/app/assets/icons/right-line-B3KWJaqc.js +1 -0
  210. package/web/app/site/app/assets/icons/rocket-line-4KZl537D.js +1 -0
  211. package/web/app/site/app/assets/icons/round-fill-C69NTrZ0.js +1 -0
  212. package/web/app/site/app/assets/icons/round-line-B9k_1uo-.js +1 -0
  213. package/web/app/site/app/assets/icons/route-line-B28ReHcE.js +1 -0
  214. package/web/app/site/app/assets/icons/rows-4-line-CrBniagM.js +1 -0
  215. package/web/app/site/app/assets/icons/scan-line-DSf74YdP.js +1 -0
  216. package/web/app/site/app/assets/icons/search-2-line-B6geIU1z.js +1 -0
  217. package/web/app/site/app/assets/icons/settings-3-line-azJwK47w.js +1 -0
  218. package/web/app/site/app/assets/icons/settings-6-line-C_5zc5YR.js +1 -0
  219. package/web/app/site/app/assets/icons/share-2-line-D5MxWjrm.js +1 -0
  220. package/web/app/site/app/assets/icons/share-forward-line-Cp61fZzZ.js +1 -0
  221. package/web/app/site/app/assets/icons/sparkles-2-line-DYYyXTaW.js +1 -0
  222. package/web/app/site/app/assets/icons/sparkles-line-C2hY1s6I.js +1 -0
  223. package/web/app/site/app/assets/icons/time-line-BF3eet1v.js +1 -0
  224. package/web/app/site/app/assets/icons/transfer-4-line-oisfvTBw.js +1 -0
  225. package/web/app/site/app/assets/icons/translate-line-BFWol2Ce.js +1 -0
  226. package/web/app/site/app/assets/icons/unlock-line-X_x5vwv3.js +1 -0
  227. package/web/app/site/app/assets/icons/upload-3-line-DgzwUJeW.js +1 -0
  228. package/web/app/site/app/assets/icons/user-4-line-BVSynZCp.js +1 -0
  229. package/web/app/site/app/assets/icons/user-add-2-line-BlGS5Q8q.js +1 -0
  230. package/web/app/site/app/assets/icons/user-add-line-BbXdHG4z.js +1 -0
  231. package/web/app/site/app/assets/icons/user-edit-line-BFAHOV0X.js +1 -0
  232. package/web/app/site/app/assets/icons/user-follow-line-BXux0wSd.js +1 -0
  233. package/web/app/site/app/assets/icons/user-star-line-DdYlpHLU.js +1 -0
  234. package/web/app/site/app/assets/icons/user-warning-line-Cj43j0_E.js +1 -0
  235. package/web/app/site/app/assets/icons/user-x-line-DIDgNlPH.js +1 -0
  236. package/web/app/site/app/assets/icons/volume-line-Bs390KQt.js +1 -0
  237. package/web/app/site/app/assets/icons/volume-mute-line-DzlzIqFZ.js +1 -0
  238. package/web/app/site/app/assets/icons/walk-line-yNXfB-md.js +1 -0
  239. package/web/app/site/app/assets/icons/world-2-line-CenkGIwj.js +1 -0
  240. package/web/app/site/app/assets/icons/zoom-in-line-CaENUphf.js +1 -0
  241. package/web/app/site/app/assets/icons/zoom-out-line-BDNk0EWo.js +1 -0
  242. package/web/app/site/app/assets/instances-BNPptnn-.json +333 -0
  243. package/web/app/site/app/assets/locales/ar-SA-CfheRbCu.js +1 -0
  244. package/web/app/site/app/assets/locales/ca-ES-DHRW86Tz.js +1 -0
  245. package/web/app/site/app/assets/locales/cs-CZ-CKoqEuA1.js +1 -0
  246. package/web/app/site/app/assets/locales/de-DE-ByRPMRFy.js +1 -0
  247. package/web/app/site/app/assets/locales/eo-UY-CPC7wLCS.js +1 -0
  248. package/web/app/site/app/assets/locales/es-ES-dJa0Fd9t.js +1 -0
  249. package/web/app/site/app/assets/locales/eu-ES-C3djlPR2.js +1 -0
  250. package/web/app/site/app/assets/locales/fa-IR-DTT490Ck.js +1 -0
  251. package/web/app/site/app/assets/locales/fi-FI-B23MCPuz.js +1 -0
  252. package/web/app/site/app/assets/locales/fr-FR-BcaQsO5C.js +1 -0
  253. package/web/app/site/app/assets/locales/gl-ES-BR-CVKBN.js +1 -0
  254. package/web/app/site/app/assets/locales/he-IL-CfheRbCu.js +1 -0
  255. package/web/app/site/app/assets/locales/hu-HU-CfheRbCu.js +1 -0
  256. package/web/app/site/app/assets/locales/it-IT-C1136UFV.js +1 -0
  257. package/web/app/site/app/assets/locales/ja-JP-CRZmRAhD.js +1 -0
  258. package/web/app/site/app/assets/locales/kab-Cz8xH_TT.js +1 -0
  259. package/web/app/site/app/assets/locales/ko-KR-CG9UiY4o.js +1 -0
  260. package/web/app/site/app/assets/locales/lt-LT-CJcI6sHZ.js +1 -0
  261. package/web/app/site/app/assets/locales/nb-NO-CfheRbCu.js +1 -0
  262. package/web/app/site/app/assets/locales/nl-NL-DxN4Yc1t.js +1 -0
  263. package/web/app/site/app/assets/locales/oc-FR-CfheRbCu.js +1 -0
  264. package/web/app/site/app/assets/locales/pl-PL-DkwGXf6P.js +1 -0
  265. package/web/app/site/app/assets/locales/pseudo-LOCALE-CQ4XxkQ0.js +1 -0
  266. package/web/app/site/app/assets/locales/pt-BR-nGL0HdFS.js +1 -0
  267. package/web/app/site/app/assets/locales/pt-PT-Cp17aj2z.js +1 -0
  268. package/web/app/site/app/assets/locales/ru-RU-0Y8cIoaK.js +1 -0
  269. package/web/app/site/app/assets/locales/th-TH-CfheRbCu.js +1 -0
  270. package/web/app/site/app/assets/locales/tok-CfheRbCu.js +1 -0
  271. package/web/app/site/app/assets/locales/tr-TR-CfheRbCu.js +1 -0
  272. package/web/app/site/app/assets/locales/uk-UA-C5E3dFBf.js +1 -0
  273. package/web/app/site/app/assets/locales/zh-CN-BHJi7_et.js +1 -0
  274. package/web/app/site/app/assets/locales/zh-TW-CfheRbCu.js +1 -0
  275. package/web/app/site/app/assets/main-BdqNbG-a.js +26 -0
  276. package/web/app/site/app/assets/main-BdqNbG-a.js.map +1 -0
  277. package/web/app/site/app/assets/mock-home-DGhR__He.js +2 -0
  278. package/web/app/site/app/assets/mock-home-DGhR__He.js.map +1 -0
  279. package/web/app/site/app/assets/multi-column-ROck0NVt.jpg +0 -0
  280. package/web/app/site/app/assets/multi-hashtag-timeline-DH5INVHi.jpg +0 -0
  281. package/web/app/site/app/assets/nested-comments-thread-hv59kZLc.jpg +0 -0
  282. package/web/app/site/app/assets/polyfill-force-H8sUkLGp.js +2 -0
  283. package/web/app/site/app/assets/polyfill-force-H8sUkLGp.js.map +1 -0
  284. package/web/app/site/app/assets/pwa-viewport-ogKbF51K.js +20 -0
  285. package/web/app/site/app/assets/pwa-viewport-ogKbF51K.js.map +1 -0
  286. package/web/app/site/app/assets/style-B1iLPTPR.css +2 -0
  287. package/web/app/site/app/assets/temml-DuyIQMei.js +97 -0
  288. package/web/app/site/app/assets/temml-DuyIQMei.js.map +1 -0
  289. package/web/app/site/app/assets/tinyld.light.node-DtbBhLYC.js +2 -0
  290. package/web/app/site/app/assets/tinyld.light.node-DtbBhLYC.js.map +1 -0
  291. package/web/app/site/app/assets/year-in-posts-B2lywqdx.png +0 -0
  292. package/web/app/site/app/assets/year-in-posts-DJv_star.js +3 -0
  293. package/web/app/site/app/assets/year-in-posts-DJv_star.js.map +1 -0
  294. package/web/app/site/app/compose/index.html +20 -0
  295. package/web/app/site/app/favicon.ico +0 -0
  296. package/web/app/site/app/index.html +73 -0
  297. package/web/app/site/app/logo-192.png +0 -0
  298. package/web/app/site/app/logo-512.png +0 -0
  299. package/web/app/site/app/logo-badge-72.png +0 -0
  300. package/web/app/site/app/logo-maskable-512.png +0 -0
  301. package/web/app/site/app/logo-monochrome-512.png +0 -0
  302. package/web/app/site/app/logo-monochrome-maskable-512.png +0 -0
  303. package/web/app/site/app/manifest.webmanifest +1 -0
  304. package/web/app/site/app/og-image-2.jpg +0 -0
  305. package/web/app/site/app/og-image.png +0 -0
  306. package/web/app/site/app/robots.txt +2 -0
  307. package/web/app/site/app/version.json +1 -0
  308. package/web/app/site/boot.js +34067 -0
  309. package/web/app/site/index.html +203 -0
  310. package/web/app/site/sw.js +53745 -0
  311. package/web/app/sw-src.mjs +205 -0
  312. package/web/front/#new-account.html# +43 -0
  313. package/web/front/admin.html +1 -81
  314. package/web/front/admin.js +85 -0
  315. package/web/front/new-account.html +1 -9
  316. package/web/front/new-account.js +13 -0
  317. package/web/front/run.html +1 -92
  318. package/web/front/run.js +107 -0
  319. package/lib/podrdf.mjs +0 -132
@@ -0,0 +1,191 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>FediPod — setup</title>
7
+ <link rel="stylesheet" href="../tokens.css">
8
+ <style>
9
+ /* 20px on the root, not on body, so every rem below scales with it. */
10
+ :root { color-scheme: light dark; font-size: 125%; --heading: #1a4f8a; }
11
+ body { font: 1rem/1.5 system-ui, sans-serif; margin: 0; }
12
+ /* The bar spans the window; the form stays in a centred column under it. */
13
+ /* The same 960 column the bar and the record use, so the three pages line up. */
14
+ #page { max-width: 960px; margin: 0 auto; padding: 1.75rem 1rem 4rem; box-sizing: border-box; }
15
+ h1, h2, h3 { color: var(--heading); }
16
+ h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
17
+ h2 { font-size: 1.1rem; margin: 2rem 0 .5rem; }
18
+ p { margin: .5rem 0; }
19
+ .sub { color: #666; margin-top: 0; }
20
+ fieldset { border: 1px solid #bbb; border-radius: .4rem; margin: 1rem 0; padding: .75rem 1rem 1rem; }
21
+ legend { padding: 0 .3rem; font-weight: 600; }
22
+ label { display: block; margin: .75rem 0 .2rem; }
23
+ .hint { color: #666; font-size: .9rem; margin: .15rem 0 0; }
24
+ input[type=text], input[type=email], input[type=url], input[type=password], select, textarea {
25
+ font: inherit; width: 100%; padding: .5rem; box-sizing: border-box;
26
+ border: 1px solid #767676; border-radius: .3rem; background: Field; color: FieldText;
27
+ }
28
+ .choice { display: block; margin: .35rem 0; font-weight: normal; }
29
+ .choice input { margin-right: .4rem; }
30
+ button { font: inherit; padding: .6rem 1.2rem; border-radius: .3rem; border: 1px solid #666;
31
+ background: ButtonFace; color: ButtonText; cursor: pointer; }
32
+ button.primary { font-weight: 600; }
33
+ button:disabled { opacity: .5; cursor: default; }
34
+ .address { font-size: 1.2rem; font-weight: 600; word-break: break-all; }
35
+ .warn { border-left: .25rem solid #c60; padding-left: .75rem; }
36
+ .err { border-left: .25rem solid #b00020; padding-left: .75rem; color: #b00020; }
37
+ /* Announced, not shown: the step list beside it already says this visually. */
38
+ /* In the accessibility tree from load, hidden by being empty: a live region
39
+ added to the tree in the same task as its text does not announce. */
40
+ #form-error:empty, #run-error:empty { display: none; }
41
+ .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
42
+ overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
43
+ .steps { list-style: none; padding: 0; }
44
+ .steps li { padding: .3rem 0; }
45
+ .steps .state { display: inline-block; width: 1.6rem; }
46
+ .note { color: #666; font-size: .9rem; word-break: break-all; }
47
+ .origins { font-family: ui-monospace, monospace; font-size: .95rem; word-break: break-all; }
48
+ @media (prefers-color-scheme: dark) { :root { --heading: #7fb3e8; }
49
+ .sub, .hint, .note { color: #aaa; } fieldset { border-color: #555; }
50
+ /* 2.40:1 without this — the record page has always had the override and
51
+ this page, where an error IS the whole message, did not. */
52
+ .err { color: #ff8a8a; border-left-color: #ff8a8a; } }
53
+ </style>
54
+ <link rel="stylesheet" href="../bar.css">
55
+ <style>#actor-pick{display:none!important}</style>
56
+ </head>
57
+ <body>
58
+
59
+ <nav id="bar" aria-label="Site">
60
+ <h1 class="name"><a href="/?add">FediPod</a></h1>
61
+ <span id="bar-handle"></span>
62
+ <a id="bar-fediverse" href="../client/" title=" Open the client and read your timeline">visit account</a>
63
+ <a id="bar-manage" href="../" title=" The record: what this actor is, and what you can do to it">manage account</a>
64
+ <a id="bar-signout" href="/?signout" title=" Sign out of FediPod and clear this browser">sign out</a>
65
+ <a id="bar-add" href="../?new=1" title=" Set up another actor on this machine, with its own pod" aria-current="page">add new account</a>
66
+ </nav>
67
+ <main id="page">
68
+ <p class="sub" id="strap">setting up…</p>
69
+
70
+ <!-- Nothing here is wired up by hand: setup.js reads /setup/state and shows
71
+ exactly one of these. -->
72
+
73
+ <section id="pane-loading">
74
+ <p>Reading this agent's state…</p>
75
+ </section>
76
+
77
+ <section id="pane-done" hidden>
78
+ <h2>Ready</h2>
79
+ <p class="address" id="done-address"></p>
80
+ <p id="done-note"></p>
81
+ <p id="done-links"></p>
82
+ </section>
83
+
84
+ <section id="pane-configured" hidden>
85
+ <h2>This agent is already set up</h2>
86
+ <p class="address" id="configured-address"></p>
87
+ <p>
88
+ <a href="../">Edit the record</a>
89
+ &nbsp;·&nbsp;
90
+ <a href="../../" id="configured-client">Open the client</a>
91
+ </p>
92
+ <p class="hint">For another actor, use <strong>add new account</strong> above.</p>
93
+ </section>
94
+
95
+ <section id="pane-run" hidden>
96
+ <h2 id="run-title">Setting up</h2>
97
+ <ul class="steps" id="run-steps"></ul>
98
+ <p class="sr-only" id="run-say" role="status"></p>
99
+ <p class="err" id="run-error" role="alert"></p>
100
+ <p><button id="run-again" title=" Try the step that failed again" hidden>Try again</button>
101
+ <button id="run-reenter" title=" Discard the credential and enter the account and pod again" hidden>Re-enter credentials</button></p>
102
+ </section>
103
+
104
+ <section id="pane-form" hidden>
105
+ <form id="form">
106
+
107
+ <fieldset>
108
+ <legend>What kind of Actor?</legend>
109
+ <label class="choice"><input type="radio" name="kind" value="person" checked>
110
+ A <strong>person</strong> — an account you read and post from</label>
111
+ <label class="choice"><input type="radio" name="kind" value="group">
112
+ A <strong>group</strong> of fediverse users you manage</label>
113
+ </fieldset>
114
+
115
+ <fieldset>
116
+ <legend>Actor's Handle</legend>
117
+ <input type="text" id="handle" name="handle" autocomplete="off" autofocus
118
+ placeholder="handle part of fediverse address: @HANDLE@server"
119
+ aria-label="Actor's Handle" aria-describedby="handle-hint">
120
+ <p class="hint" id="handle-hint">The name in your fediverse address. This is permanent. Letters, digits,
121
+ hyphens, and underscores only.</p>
122
+ </fieldset>
123
+
124
+ <fieldset id="fs-pod">
125
+ <legend>Actor's Pod</legend>
126
+ <label class="choice"><input type="radio" name="mode" value="new" checked>
127
+ Create a Solid account and pod for the Actor</label>
128
+ <label class="choice"><input type="radio" name="mode" value="existing">
129
+ Use a pod I already have</label>
130
+
131
+ <div id="row-issuer-new">
132
+ <label for="issuer-new">Solid pod provider</label>
133
+ <select id="issuer-new" name="issuerNew" aria-describedby="issuer-new-hint">
134
+ <option value="https://solidcommunity.net">solidcommunity.net</option>
135
+ </select>
136
+ <p class="hint" id="issuer-new-hint">Providers that give each pod its own subdomain, so the
137
+ Fediverse address works everywhere.</p>
138
+ </div>
139
+
140
+ <div id="row-issuer-existing" hidden>
141
+ <label for="issuer">Solid identity provider</label>
142
+ <input type="url" id="issuer" name="issuer" value="https://solidcommunity.net" autocomplete="url">
143
+ </div>
144
+
145
+ <label for="email">Solid Account email/username</label>
146
+ <input type="email" id="email" name="email" autocomplete="email" placeholder="you@example.org">
147
+
148
+ <div id="row-password">
149
+ <label for="password">Solid Account password</label>
150
+ <input type="password" id="password" name="password" autocomplete="current-password"
151
+ aria-describedby="password-hint">
152
+ <p class="hint" id="password-hint">Password is sent once in return for a credential which is stored locally.
153
+ The password itself is never stored. You may revoke the credential without changing the
154
+ password.</p>
155
+ </div>
156
+
157
+ <div id="row-podname">
158
+ <label for="podName">Pod name</label>
159
+ <input type="text" id="podName" name="podName" autocomplete="off"
160
+ aria-describedby="podname-hint">
161
+ <p class="hint" id="podname-hint">The subdomain of your pod address, it will become
162
+ https://YOUR-POD-NAME.your-identity-provider</p>
163
+ </div>
164
+
165
+ <div id="row-pod" hidden>
166
+ <label for="pod">Pod address</label>
167
+ <input type="url" id="pod" name="pod" autocomplete="url" placeholder="https://you.solidcommunity.net/">
168
+ </div>
169
+ </fieldset>
170
+
171
+ <p id="row-reenter" class="warn" hidden>Finishing a setup that already has an account credential.
172
+ Wrong account or pod?
173
+ <button type="button" id="form-reenter" title=" Discard the credential and enter the account and pod again">Re-enter credentials</button></p>
174
+
175
+ <h2>You will be</h2>
176
+ <p class="address" id="preview">…</p>
177
+ <div id="preview-notes"></div>
178
+ <p>The handle and the pod cannot be changed afterwards. Everything else — display
179
+ name, bio, pictures — you set in the client.</p>
180
+
181
+ <p class="err" id="form-error" role="alert"></p>
182
+ <p><button type="submit" class="primary" id="submit" title=" Create it">Create it</button></p>
183
+ </form>
184
+ </section>
185
+
186
+ </main>
187
+
188
+ <script src="../bar.js"></script>
189
+ <script src="setup.js"></script>
190
+ </body>
191
+ </html>
@@ -0,0 +1,308 @@
1
+ // setup.js — the questions the CLI used to ask, asked here instead. Every
2
+ // request is relative, so the page behaves identically whether it was reached
3
+ // at localhost:<port> or at <handle>.localhost:<port>.
4
+ //
5
+ // External file, not an inline script: the CSP allows 'self' plus the hashes
6
+ // of Phanpy's own inline bootstrap, and nothing else.
7
+
8
+ const $ = (id) => document.getElementById(id);
9
+ // Empty means gone, not a blank line where a sentence used to be.
10
+ const strap = (t) => { const el = $('strap'); el.textContent = t || ''; el.hidden = !t; };
11
+ // By id, not by position: these were `body > section` until a wrapper went
12
+ // round them for layout, and the selector then matched nothing — every pane
13
+ // kept whatever it started as and the page sat on "Reading this agent's state".
14
+ const show = (id) => { for (const s of document.querySelectorAll('section[id^="pane-"]')) s.hidden = s.id !== id; };
15
+ // The door this page is served behind: nothing when the agent runs on this
16
+ // machine, `/app` when the identity is hosted by its own pod server. Read from
17
+ // the page's own address, so one build serves both.
18
+ const BASE = location.pathname.replace(/\/admin\/.*$/u, '');
19
+ const api = async (path, init) => {
20
+ const res = await fetch(BASE + path, { ...init, headers: { ...(init?.headers || {}), 'x-fedipod-page': '1' } });
21
+ return { status: res.status, json: await res.json().catch(() => null) };
22
+ };
23
+ const postJson = (path, body) => api(path, {
24
+ method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body),
25
+ });
26
+
27
+ let state = null;
28
+
29
+ // ---- what the agent needs from us ----
30
+
31
+ async function start() {
32
+ const { json } = await api('/setup/state');
33
+ state = json || {};
34
+ if (state.phase === 'running' || state.phase === 'done' || state.phase === 'error') return watchRun();
35
+ if (state.configured) return paneConfigured();
36
+ return paneForm();
37
+ }
38
+
39
+ function paneConfigured() {
40
+ strap('already set up');
41
+ $('configured-address').textContent = state.handle ? `@${state.handle}` : '';
42
+ $('configured-client').hidden = state.kind === 'group';
43
+ show('pane-configured');
44
+ // The address needs the pod host, which only /config knows.
45
+ api('/config').then(({ json }) => {
46
+ if (json?.address) $('configured-address').textContent = json.address;
47
+ });
48
+ }
49
+
50
+ // ---- the form ----
51
+
52
+ function paneForm() {
53
+ // Nothing is asked in a terminal any more — every question is on this page.
54
+ // A fresh run needs no strap at all; a resumed one has something to say.
55
+ strap(state.resumable ? 'finishing a setup that did not complete' : '');
56
+ if (state.handle) $('handle').value = state.handle;
57
+ // A signup page's carry-over: the form opens with its answers already in.
58
+ const fr = state.firstRun;
59
+ if (fr && !state.resumable) {
60
+ if (fr.kind) $('form').elements.kind.value = fr.kind;
61
+ if (fr.handle) $('handle').value = fr.handle;
62
+ if (fr.pod) { $('form').elements.mode.value = 'existing'; $('pod').value = fr.pod; }
63
+ // A gateway-arranged signup names its own provider; give the dropdown that
64
+ // choice too, so the carried-over answer survives the narrower control.
65
+ if (fr.issuer) {
66
+ $('issuer').value = fr.issuer;
67
+ const sel = $('issuer-new');
68
+ if (![...sel.options].some(o => o.value === fr.issuer)) {
69
+ const o = document.createElement('option');
70
+ o.value = fr.issuer;
71
+ o.textContent = host(fr.issuer);
72
+ sel.appendChild(o);
73
+ }
74
+ sel.value = fr.issuer;
75
+ }
76
+ if (fr.gatewayHost) strap(`finishing your ${fr.gatewayHost} signup — enter your Solid account details`);
77
+ }
78
+ // Resuming: the account exists and the credential is minted. Asking for a
79
+ // password again would mint a second one and orphan the first, which cannot
80
+ // be recovered.
81
+ // Set both ways, not just hidden-when-resuming: re-entering credentials
82
+ // re-renders this in the other mode, and a one-way hide would strand the
83
+ // account and pod fields off-screen. Resuming settles the account and the
84
+ // credential, so those fields go; a fresh run shows them.
85
+ $('row-reenter').hidden = !state.resumable;
86
+ $('fs-pod').hidden = state.resumable;
87
+ // The password field also goes when AP_PASSWORD supplied it in the environment.
88
+ $('row-password').hidden = state.resumable || state.passwordSupplied;
89
+ $('submit').textContent = state.resumable ? 'Finish setting up' : 'Create it';
90
+ if (state.resumable) $('form-reenter').onclick = reEnter; // the escape from a wrong credential
91
+ show('pane-form');
92
+ // The markup's autofocus was set while this pane was still hidden, so it
93
+ // never fired — move focus to the first field now that the pane is showing.
94
+ $('handle').focus();
95
+ for (const el of $('form').elements) {
96
+ el.addEventListener('input', onEdit);
97
+ el.addEventListener('change', onEdit);
98
+ }
99
+ $('form').addEventListener('submit', onSubmit);
100
+ onEdit();
101
+ }
102
+
103
+ function answers() {
104
+ const f = $('form').elements;
105
+ const kind = f.kind.value;
106
+ const mode = state.resumable ? 'existing' : f.mode.value;
107
+ const a = {
108
+ kind,
109
+ mode,
110
+ handle: f.handle.value.trim(),
111
+ issuer: (mode === 'new' ? f.issuerNew.value : f.issuer.value).trim(),
112
+ email: f.email.value.trim(),
113
+ };
114
+ if (mode === 'new') a.podName = f.podName.value.trim() || a.handle;
115
+ else a.pod = f.pod.value.trim();
116
+ if (!state.resumable && !state.passwordSupplied) a.password = f.password.value;
117
+ return a;
118
+ }
119
+
120
+ // Every warning the CLI printed before it asked "create pod and fediverse
121
+ // account?", in the same words, as you type.
122
+ const NOTES = {
123
+ 'pod-is-a-path': (a) =>
124
+ `This pod is a path on ${host(a.pod)}, not the root of its own host. WebFinger is `
125
+ + 'answered only at a host root, which this pod cannot write to, so other servers '
126
+ + 'will not find this address. Posting and reading still work; being discovered does not.',
127
+ };
128
+ const REFUSALS = {
129
+ 'group-needs-host-root': () =>
130
+ 'A group needs a pod at the root of its own host, or nobody could ever find it. '
131
+ + 'Give the group a pod of its own, or set this up as a person.',
132
+ };
133
+ const host = (u) => { try { return new URL(u).host; } catch { return u; } };
134
+
135
+ let editTimer = null;
136
+ function onEdit() {
137
+ const mode = state.resumable ? 'existing' : $('form').elements.mode.value;
138
+ $('row-podname').hidden = mode !== 'new';
139
+ $('row-pod').hidden = mode === 'new';
140
+ $('row-issuer-new').hidden = mode !== 'new';
141
+ $('row-issuer-existing').hidden = mode === 'new';
142
+ clearTimeout(editTimer);
143
+ editTimer = setTimeout(preview, 150);
144
+ }
145
+
146
+ async function preview() {
147
+ const a = answers();
148
+ $('preview-notes').textContent = '';
149
+ if (!a.handle || (a.mode === 'existing' && !a.pod)) { $('preview').textContent = '…'; return; }
150
+ if (state.resumable) { $('preview').textContent = `@${a.handle}@…`; return; }
151
+ const { json } = await postJson('/setup/check', a);
152
+ if (!json) return;
153
+ $('preview').textContent = json.address || '…';
154
+ const notes = $('preview-notes');
155
+ for (const w of json.warnings || []) {
156
+ const p = document.createElement('p');
157
+ p.className = 'warn';
158
+ p.textContent = NOTES[w] ? NOTES[w](a) : w;
159
+ notes.appendChild(p);
160
+ }
161
+ if (json.refusal) {
162
+ const p = document.createElement('p');
163
+ p.className = 'err';
164
+ p.textContent = REFUSALS[json.refusal] ? REFUSALS[json.refusal]() : json.refusal;
165
+ notes.appendChild(p);
166
+ }
167
+ $('submit').disabled = !!json.refusal;
168
+ }
169
+
170
+ async function onSubmit(ev) {
171
+ ev.preventDefault();
172
+ $('form-error').textContent = '';
173
+ $('submit').disabled = true;
174
+ const { status, json } = await postJson('/setup', answers());
175
+ if (status !== 202) {
176
+ $('submit').disabled = false;
177
+ $('form-error').textContent = json?.error || `setup refused (HTTP ${status})`;
178
+ return;
179
+ }
180
+ watchRun();
181
+ }
182
+
183
+ // ---- the run ----
184
+
185
+ const LABELS = {
186
+ account: 'Creating the account and pod',
187
+ credential: 'Minting a credential for this machine',
188
+ bootstrap: 'Provisioning the pod',
189
+ connect: 'Connecting',
190
+ publish: 'Publishing the actor',
191
+ verify: 'Checking the world can see it',
192
+ };
193
+ const MARKS = { waiting: '·', running: '⟳', ok: '✓', skipped: '–', error: '✗' };
194
+
195
+ async function watchRun() {
196
+ show('pane-run');
197
+ strap('setting up');
198
+ const { json: run } = await api('/setup/progress');
199
+ if (!run) return;
200
+ renderRun(run);
201
+ if (run.phase === 'running') return setTimeout(watchRun, 700);
202
+ if (run.phase === 'done') return paneDone(run.result);
203
+ $('run-title').textContent = 'Setup stopped';
204
+ $('run-error').textContent = run.error || 'unknown error';
205
+ $('run-again').hidden = false;
206
+ $('run-again').onclick = async () => {
207
+ // Re-read the state: a run that got as far as the credential resumes from
208
+ // there rather than minting a second one.
209
+ const { json } = await api('/setup/state');
210
+ state = json || state;
211
+ paneForm();
212
+ };
213
+ // A failure past the credential (a wrong pod answering 401 to the first
214
+ // write) leaves a credential that "Try again" can only re-use. Offer to
215
+ // discard it and re-enter the account and pod — only when there is one.
216
+ const { json: st } = await api('/setup/state');
217
+ const reenter = $('run-reenter');
218
+ reenter.hidden = !st?.hasCredential;
219
+ reenter.onclick = reEnter;
220
+ }
221
+
222
+ // Discard the saved credential (server confirms, then the full form returns).
223
+ // Destructive and unrecoverable — a minted credential is shown once — so it
224
+ // asks first.
225
+ async function reEnter() {
226
+ if (!confirm('Discard the saved account credential and enter the account and pod again?\n\n'
227
+ + 'The old credential is left on your account — revoke it from the account dashboard if you want it gone.')) return;
228
+ const { status, json } = await postJson('/setup/reset', {});
229
+ if (status !== 200) {
230
+ const box = $('pane-form').hidden ? $('run-error') : $('form-error');
231
+ box.textContent = json?.error || `could not reset (HTTP ${status})`;
232
+ return;
233
+ }
234
+ const { json: st } = await api('/setup/state');
235
+ state = st || {};
236
+ paneForm();
237
+ }
238
+
239
+ function renderRun(run) {
240
+ const ul = $('run-steps');
241
+ ul.textContent = '';
242
+ for (const s of run.steps) {
243
+ const li = document.createElement('li');
244
+ const mark = document.createElement('span');
245
+ mark.className = 'state';
246
+ mark.textContent = MARKS[s.state] || '·';
247
+ // The glyph is the whole of what says how a step went, and `⟳` read aloud
248
+ // is not a word. Naming it leaves the visual result exactly as it was.
249
+ mark.setAttribute('aria-label', s.state || 'waiting');
250
+ li.appendChild(mark);
251
+ li.appendChild(document.createTextNode(LABELS[s.key] || s.key));
252
+ if (s.note) {
253
+ const note = document.createElement('div');
254
+ note.className = 'note';
255
+ note.textContent = s.note;
256
+ li.appendChild(note);
257
+ }
258
+ ul.appendChild(li);
259
+ }
260
+ // One polite line rather than a live region over the whole list: the list is
261
+ // rebuilt from scratch on every poll, and announcing all six steps twice a
262
+ // second is not progress, it is noise. Only the step actually moving is said.
263
+ const now = run.steps.find(s => s.state === 'running')
264
+ || [...run.steps].reverse().find(s => s.state && s.state !== 'waiting');
265
+ const say = now ? `${LABELS[now.key] || now.key}: ${now.state}` : '';
266
+ const line = $('run-say');
267
+ if (line && line.textContent !== say) line.textContent = say;
268
+ }
269
+
270
+ function paneDone(result) {
271
+ // Straight to the thing you set it up FOR. A group has no client of its own,
272
+ // so it goes to its console instead. Warnings are the exception: an address
273
+ // nobody can resolve, or documents a stranger cannot read, are worth stopping
274
+ // for — the client would just look empty and not say why.
275
+ const stop = !result?.resolvable || result?.unreachable?.length;
276
+ if (!stop) {
277
+ location.href = result?.kind === 'group' ? '/admin/' : '/admin/client/';
278
+ return;
279
+ }
280
+ strap('set up');
281
+ show('pane-done');
282
+ $('done-address').textContent = result?.address || `@${result?.handle} — no resolvable address`;
283
+ const notes = [];
284
+ if (!result?.resolvable) {
285
+ notes.push(`${result?.pod} is not the root of its own host, so this address cannot be `
286
+ + 'discovered by other servers. Posting and reading still work.');
287
+ }
288
+ if (result?.unreachable?.length) {
289
+ notes.push(`Not readable without credentials yet: ${result.unreachable.join(', ')}. `
290
+ + 'Other servers cannot fetch this actor until that clears.');
291
+ }
292
+ $('done-note').className = notes.length ? 'warn' : '';
293
+ $('done-note').textContent = notes.join(' ');
294
+
295
+ const links = $('done-links');
296
+ links.textContent = '';
297
+ const add = (href, text) => {
298
+ if (links.hasChildNodes()) links.appendChild(document.createTextNode(' · '));
299
+ const a = document.createElement('a');
300
+ a.href = href;
301
+ a.textContent = text;
302
+ links.appendChild(a);
303
+ };
304
+ if (result?.kind !== 'group') add('/', 'Open the client');
305
+ add('/admin/', 'Edit the record');
306
+ }
307
+
308
+ start();
@@ -0,0 +1,56 @@
1
+ /* tokens.css — the FediPod design tokens: the front page's palette
2
+ (web/app/index.html), so the front, the record page, the bar and the client
3
+ shell are one visual system. The front is the reference; these values mirror
4
+ its :root. Declared under every name the pages already use — plus aliases
5
+ (--ink=--fg, --muted=--sub, --link=--accent, --field-edge=--field-border,
6
+ --danger=--err, --ring=--focus) — so a page only has to drop its own :root
7
+ colours and inherit these. */
8
+ :root {
9
+ color-scheme: light dark;
10
+
11
+ /* ground + text */
12
+ --bg: #ffffff; --fg: #1a1a1a; --ink: #1a1a1a;
13
+ --surface: #f0f2f5; /* the page ground behind cards */
14
+ --raised: #ffffff; /* cards, the rail, the bar band, dialogs */
15
+
16
+ /* structure + action */
17
+ --heading: #123f74; --accent: #12467e; --link: #12467e;
18
+ --sub: #565656; --muted: #565656; --line: #b0b0b0;
19
+
20
+ /* fields */
21
+ --field-bg: #ececec; --field-bg-hover: #e2e4e8; --field-hover: #e2e4e8;
22
+ --field-text: #141414; --field-edge: #6f6f6f; --field-border: #6f6f6f;
23
+
24
+ /* buttons — filled, muted forest green (like the front) */
25
+ --btn: #3a5f43; --btn-hover: #30503a; --btn-text: #ffffff;
26
+ --btn-bg: #ececec; --btn-bg-hover: #e2e4e8; --btn-bg-active: #d8dade; --btn-edge: #6f6f6f;
27
+
28
+ /* status + focus */
29
+ --err: #b00020; --danger: #b00020; --warn: #8a4b00; --ok: #1f7a3d;
30
+ --focus: #12467e; --ring: #12467e;
31
+
32
+ --chevron: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M1 1l4 4 4-4' fill='none' stroke='%23124f8a' stroke-width='1.6' stroke-linecap='round'/></svg>");
33
+ }
34
+
35
+ @media (prefers-color-scheme: dark) {
36
+ :root {
37
+ --bg: #191919; --fg: #f3f3f3; --ink: #f3f3f3;
38
+ --surface: #18191a; --raised: #242526;
39
+
40
+ --heading: #8fc2f2; --accent: #8fc2f2; --link: #8fc2f2;
41
+ --sub: #d2d2d2; --muted: #d2d2d2; --line: #6d6d6d;
42
+
43
+ --field-bg: #474747; --field-bg-hover: #515151; --field-hover: #515151;
44
+ --field-text: #f5f5f5; --field-edge: #9aa0a6; --field-border: #9aa0a6;
45
+
46
+ /* a touch brighter on the dark page so white text and the fill-vs-page edge
47
+ both clear their contrast floors — still muted (kept in sync with the front) */
48
+ --btn: #4a7a54; --btn-hover: #3f6a49; --btn-text: #ffffff;
49
+ --btn-bg: #474747; --btn-bg-hover: #515151; --btn-bg-active: #5b5b5b; --btn-edge: #9aa0a6;
50
+
51
+ --err: #ff9b9b; --danger: #ff9b9b; --warn: #ffb366; --ok: #7fd39a;
52
+ --focus: #8fc2f2; --ring: #8fc2f2;
53
+
54
+ --chevron: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M1 1l4 4 4-4' fill='none' stroke='%23bcd8f0' stroke-width='1.6' stroke-linecap='round'/></svg>");
55
+ }
56
+ }
@@ -0,0 +1,55 @@
1
+ /* window.css — the floating panel every page of ours puts a form in.
2
+ Shared like bar.css, so the three surfaces cannot drift apart. */
3
+
4
+ /* Fixed, so it floats over the page rather than pushing it about — which is
5
+ what the accordions did, moving the line you were reading every time one
6
+ opened. Resizing is the browser's own grip: `resize` needs `overflow` set to
7
+ anything but visible, which is also what keeps a long form inside the frame. */
8
+ #win {
9
+ position: fixed; z-index: 40;
10
+ top: 5rem; left: 50%; transform: translateX(-50%);
11
+ width: min(46rem, calc(100vw - 2rem));
12
+ /* Tall enough for what is in it and no taller: a fixed height made a short
13
+ panel roomy and a long one scroll for no reason. `auto` up to a cap, so it
14
+ only ever scrolls when the content genuinely will not fit the screen — and
15
+ the moment you drag the corner, that inline height wins over both. */
16
+ height: auto;
17
+ min-width: 18rem; min-height: 8rem;
18
+ max-width: 100vw; max-height: calc(100vh - 7rem);
19
+ resize: both; overflow: hidden;
20
+ display: flex; flex-direction: column;
21
+ /* Raised, like the bar: it sits ON the page, so it takes the same colour the
22
+ bar does rather than the page's own. The shadow lifts it; the colour says
23
+ which layer it belongs to. */
24
+ background: var(--raised); color: CanvasText;
25
+ border: 1px solid var(--btn-edge); border-radius: .5rem;
26
+ box-shadow: 0 .6rem 2rem #0004;
27
+ }
28
+ /* Dragged by the bar, so the grab area is obvious and a text selection inside
29
+ the form never moves the window. */
30
+ /* Its own title bar keeps a rule: this one IS two surfaces meeting inside a
31
+ single small box, where a tone change alone is too quiet to read as a grab
32
+ handle. Different problem from the page bar, different answer. */
33
+ #win-bar {
34
+ flex: 0 0 auto; display: flex; align-items: baseline; gap: .6rem;
35
+ padding: .45rem .7rem; cursor: move; user-select: none;
36
+ border-bottom: 1px solid var(--btn-edge); border-radius: .5rem .5rem 0 0;
37
+ background: var(--surface);
38
+ }
39
+ #win-title { flex: 1 1 auto; font-weight: 600; color: var(--heading); }
40
+ /* 24x24 is the 2.5.8 minimum; at .1rem of vertical padding this came out
41
+ 21.6px tall, which is a small target for the one control that dismisses the
42
+ thing covering your page. Same glyph, same place, bigger hit area. */
43
+ #win-close {
44
+ font: inherit; line-height: 1; cursor: pointer;
45
+ min-width: 24px; min-height: 24px; padding: .2rem .5rem;
46
+ display: inline-flex; align-items: center; justify-content: center;
47
+ border: 0; background: none; color: var(--link);
48
+ }
49
+ /* The window scrolls, never the page — same rule the rest of the app follows. */
50
+ #win-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: .2rem 1rem 1rem; }
51
+ #win-body > * { margin-top: .6rem; }
52
+ #win-body pre { overflow-x: auto; background: #0001; padding: .6rem; border-radius: .3rem;
53
+ font-size: .9rem; }
54
+ /* Dragging with the pointer over the frame would otherwise select text inside it. */
55
+ body.dragging { user-select: none; }