@abraca/junis 2.80.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 (383) hide show
  1. package/README.md +594 -0
  2. package/dist/module.d.mts +158 -0
  3. package/dist/module.json +12 -0
  4. package/dist/module.mjs +957 -0
  5. package/dist/runtime/assets/css/jun.css +13 -0
  6. package/dist/runtime/components/JunAnnouncement.d.vue.ts +3 -0
  7. package/dist/runtime/components/JunAnnouncement.vue +88 -0
  8. package/dist/runtime/components/JunAnnouncement.vue.d.ts +3 -0
  9. package/dist/runtime/components/JunAppreciate.d.vue.ts +6 -0
  10. package/dist/runtime/components/JunAppreciate.vue +71 -0
  11. package/dist/runtime/components/JunAppreciate.vue.d.ts +6 -0
  12. package/dist/runtime/components/JunBackgroundPhoto.d.vue.ts +3 -0
  13. package/dist/runtime/components/JunBackgroundPhoto.vue +23 -0
  14. package/dist/runtime/components/JunBackgroundPhoto.vue.d.ts +3 -0
  15. package/dist/runtime/components/JunBlobBackdrop.client.d.vue.ts +3 -0
  16. package/dist/runtime/components/JunBlobBackdrop.client.vue +120 -0
  17. package/dist/runtime/components/JunBlobBackdrop.client.vue.d.ts +3 -0
  18. package/dist/runtime/components/JunBreadcrumbs.d.vue.ts +16 -0
  19. package/dist/runtime/components/JunBreadcrumbs.vue +63 -0
  20. package/dist/runtime/components/JunBreadcrumbs.vue.d.ts +16 -0
  21. package/dist/runtime/components/JunCampfireChat.d.vue.ts +14 -0
  22. package/dist/runtime/components/JunCampfireChat.vue +136 -0
  23. package/dist/runtime/components/JunCampfireChat.vue.d.ts +14 -0
  24. package/dist/runtime/components/JunCampfirePanel.d.vue.ts +33 -0
  25. package/dist/runtime/components/JunCampfirePanel.vue +202 -0
  26. package/dist/runtime/components/JunCampfirePanel.vue.d.ts +33 -0
  27. package/dist/runtime/components/JunCampfirePresence.client.d.vue.ts +3 -0
  28. package/dist/runtime/components/JunCampfirePresence.client.vue +321 -0
  29. package/dist/runtime/components/JunCampfirePresence.client.vue.d.ts +3 -0
  30. package/dist/runtime/components/JunCampfireRoster.d.vue.ts +19 -0
  31. package/dist/runtime/components/JunCampfireRoster.vue +259 -0
  32. package/dist/runtime/components/JunCampfireRoster.vue.d.ts +19 -0
  33. package/dist/runtime/components/JunCampfireYou.d.vue.ts +10 -0
  34. package/dist/runtime/components/JunCampfireYou.vue +157 -0
  35. package/dist/runtime/components/JunCampfireYou.vue.d.ts +10 -0
  36. package/dist/runtime/components/JunDocSurface.d.vue.ts +34 -0
  37. package/dist/runtime/components/JunDocSurface.vue +117 -0
  38. package/dist/runtime/components/JunDocSurface.vue.d.ts +34 -0
  39. package/dist/runtime/components/JunFestivalPlayer.client.d.vue.ts +3 -0
  40. package/dist/runtime/components/JunFestivalPlayer.client.vue +471 -0
  41. package/dist/runtime/components/JunFestivalPlayer.client.vue.d.ts +3 -0
  42. package/dist/runtime/components/JunFooter.d.vue.ts +3 -0
  43. package/dist/runtime/components/JunFooter.vue +102 -0
  44. package/dist/runtime/components/JunFooter.vue.d.ts +3 -0
  45. package/dist/runtime/components/JunGlobeEditor.client.d.vue.ts +43 -0
  46. package/dist/runtime/components/JunGlobeEditor.client.vue +315 -0
  47. package/dist/runtime/components/JunGlobeEditor.client.vue.d.ts +43 -0
  48. package/dist/runtime/components/JunGlobeMap.client.d.vue.ts +58 -0
  49. package/dist/runtime/components/JunGlobeMap.client.vue +495 -0
  50. package/dist/runtime/components/JunGlobeMap.client.vue.d.ts +58 -0
  51. package/dist/runtime/components/JunHead.d.vue.ts +3 -0
  52. package/dist/runtime/components/JunHead.vue +79 -0
  53. package/dist/runtime/components/JunHead.vue.d.ts +3 -0
  54. package/dist/runtime/components/JunHorizontalTimeline.d.vue.ts +0 -0
  55. package/dist/runtime/components/JunHorizontalTimeline.vue +363 -0
  56. package/dist/runtime/components/JunHorizontalTimeline.vue.d.ts +0 -0
  57. package/dist/runtime/components/JunImagePopup.client.d.vue.ts +3 -0
  58. package/dist/runtime/components/JunImagePopup.client.vue +422 -0
  59. package/dist/runtime/components/JunImagePopup.client.vue.d.ts +3 -0
  60. package/dist/runtime/components/JunIntro.d.vue.ts +3 -0
  61. package/dist/runtime/components/JunIntro.vue +156 -0
  62. package/dist/runtime/components/JunIntro.vue.d.ts +3 -0
  63. package/dist/runtime/components/JunItemMenu.d.vue.ts +50 -0
  64. package/dist/runtime/components/JunItemMenu.vue +97 -0
  65. package/dist/runtime/components/JunItemMenu.vue.d.ts +50 -0
  66. package/dist/runtime/components/JunLinksRow.d.vue.ts +19 -0
  67. package/dist/runtime/components/JunLinksRow.vue +96 -0
  68. package/dist/runtime/components/JunLinksRow.vue.d.ts +19 -0
  69. package/dist/runtime/components/JunLogo.d.vue.ts +15 -0
  70. package/dist/runtime/components/JunLogo.vue +360 -0
  71. package/dist/runtime/components/JunLogo.vue.d.ts +15 -0
  72. package/dist/runtime/components/JunMedia.client.d.vue.ts +40 -0
  73. package/dist/runtime/components/JunMedia.client.vue +117 -0
  74. package/dist/runtime/components/JunMedia.client.vue.d.ts +40 -0
  75. package/dist/runtime/components/JunMosaicPane.client.d.vue.ts +24 -0
  76. package/dist/runtime/components/JunMosaicPane.client.vue +95 -0
  77. package/dist/runtime/components/JunMosaicPane.client.vue.d.ts +24 -0
  78. package/dist/runtime/components/JunNavigation.d.vue.ts +26 -0
  79. package/dist/runtime/components/JunNavigation.vue +1149 -0
  80. package/dist/runtime/components/JunNavigation.vue.d.ts +26 -0
  81. package/dist/runtime/components/JunNodePanel.client.d.vue.ts +3 -0
  82. package/dist/runtime/components/JunNodePanel.client.vue +23 -0
  83. package/dist/runtime/components/JunNodePanel.client.vue.d.ts +3 -0
  84. package/dist/runtime/components/JunNotFound.d.vue.ts +7 -0
  85. package/dist/runtime/components/JunNotFound.vue +137 -0
  86. package/dist/runtime/components/JunNotFound.vue.d.ts +7 -0
  87. package/dist/runtime/components/JunPageHero.d.vue.ts +25 -0
  88. package/dist/runtime/components/JunPageHero.vue +90 -0
  89. package/dist/runtime/components/JunPageHero.vue.d.ts +25 -0
  90. package/dist/runtime/components/JunPatternBackdrop.client.d.vue.ts +7 -0
  91. package/dist/runtime/components/JunPatternBackdrop.client.vue +95 -0
  92. package/dist/runtime/components/JunPatternBackdrop.client.vue.d.ts +7 -0
  93. package/dist/runtime/components/JunPeerCursors.client.d.vue.ts +3 -0
  94. package/dist/runtime/components/JunPeerCursors.client.vue +123 -0
  95. package/dist/runtime/components/JunPeerCursors.client.vue.d.ts +3 -0
  96. package/dist/runtime/components/JunPresenceBlobs.client.d.vue.ts +3 -0
  97. package/dist/runtime/components/JunPresenceBlobs.client.vue +172 -0
  98. package/dist/runtime/components/JunPresenceBlobs.client.vue.d.ts +3 -0
  99. package/dist/runtime/components/JunSearch.client.d.vue.ts +3 -0
  100. package/dist/runtime/components/JunSearch.client.vue +809 -0
  101. package/dist/runtime/components/JunSearch.client.vue.d.ts +3 -0
  102. package/dist/runtime/components/JunServiceCard.d.vue.ts +10 -0
  103. package/dist/runtime/components/JunServiceCard.vue +145 -0
  104. package/dist/runtime/components/JunServiceCard.vue.d.ts +10 -0
  105. package/dist/runtime/components/JunShaderBackdrop.client.d.vue.ts +3 -0
  106. package/dist/runtime/components/JunShaderBackdrop.client.vue +82 -0
  107. package/dist/runtime/components/JunShaderBackdrop.client.vue.d.ts +3 -0
  108. package/dist/runtime/components/JunShell.d.vue.ts +17 -0
  109. package/dist/runtime/components/JunShell.vue +80 -0
  110. package/dist/runtime/components/JunShell.vue.d.ts +17 -0
  111. package/dist/runtime/components/JunStudioBar.client.d.vue.ts +3 -0
  112. package/dist/runtime/components/JunStudioBar.client.vue +462 -0
  113. package/dist/runtime/components/JunStudioBar.client.vue.d.ts +3 -0
  114. package/dist/runtime/components/JunStudioLogin.client.d.vue.ts +3 -0
  115. package/dist/runtime/components/JunStudioLogin.client.vue +58 -0
  116. package/dist/runtime/components/JunStudioLogin.client.vue.d.ts +3 -0
  117. package/dist/runtime/components/JunThemeToggle.d.vue.ts +3 -0
  118. package/dist/runtime/components/JunThemeToggle.vue +32 -0
  119. package/dist/runtime/components/JunThemeToggle.vue.d.ts +3 -0
  120. package/dist/runtime/components/JunTravellersChip.d.vue.ts +9 -0
  121. package/dist/runtime/components/JunTravellersChip.vue +111 -0
  122. package/dist/runtime/components/JunTravellersChip.vue.d.ts +9 -0
  123. package/dist/runtime/components/JunVideoEmbed.client.d.vue.ts +23 -0
  124. package/dist/runtime/components/JunVideoEmbed.client.vue +124 -0
  125. package/dist/runtime/components/JunVideoEmbed.client.vue.d.ts +23 -0
  126. package/dist/runtime/components/css-modules.d.ts +7 -0
  127. package/dist/runtime/components/renderers/.gitkeep +0 -0
  128. package/dist/runtime/components/renderers/JunAppsRenderer.d.vue.ts +10 -0
  129. package/dist/runtime/components/renderers/JunAppsRenderer.vue +271 -0
  130. package/dist/runtime/components/renderers/JunAppsRenderer.vue.d.ts +10 -0
  131. package/dist/runtime/components/renderers/JunCinemaRenderer.d.vue.ts +10 -0
  132. package/dist/runtime/components/renderers/JunCinemaRenderer.vue +465 -0
  133. package/dist/runtime/components/renderers/JunCinemaRenderer.vue.d.ts +10 -0
  134. package/dist/runtime/components/renderers/JunConfigRenderer.d.vue.ts +10 -0
  135. package/dist/runtime/components/renderers/JunConfigRenderer.vue +2045 -0
  136. package/dist/runtime/components/renderers/JunConfigRenderer.vue.d.ts +10 -0
  137. package/dist/runtime/components/renderers/JunCvRenderer.d.vue.ts +10 -0
  138. package/dist/runtime/components/renderers/JunCvRenderer.vue +256 -0
  139. package/dist/runtime/components/renderers/JunCvRenderer.vue.d.ts +10 -0
  140. package/dist/runtime/components/renderers/JunEntryRenderer.d.vue.ts +10 -0
  141. package/dist/runtime/components/renderers/JunEntryRenderer.vue +429 -0
  142. package/dist/runtime/components/renderers/JunEntryRenderer.vue.d.ts +10 -0
  143. package/dist/runtime/components/renderers/JunFestivalRenderer.d.vue.ts +10 -0
  144. package/dist/runtime/components/renderers/JunFestivalRenderer.vue +557 -0
  145. package/dist/runtime/components/renderers/JunFestivalRenderer.vue.d.ts +10 -0
  146. package/dist/runtime/components/renderers/JunGlobeRenderer.d.vue.ts +10 -0
  147. package/dist/runtime/components/renderers/JunGlobeRenderer.vue +91 -0
  148. package/dist/runtime/components/renderers/JunGlobeRenderer.vue.d.ts +10 -0
  149. package/dist/runtime/components/renderers/JunGuestbookRenderer.d.vue.ts +10 -0
  150. package/dist/runtime/components/renderers/JunGuestbookRenderer.vue +326 -0
  151. package/dist/runtime/components/renderers/JunGuestbookRenderer.vue.d.ts +10 -0
  152. package/dist/runtime/components/renderers/JunHomeRenderer.d.vue.ts +10 -0
  153. package/dist/runtime/components/renderers/JunHomeRenderer.vue +585 -0
  154. package/dist/runtime/components/renderers/JunHomeRenderer.vue.d.ts +10 -0
  155. package/dist/runtime/components/renderers/JunJournalRenderer.d.vue.ts +10 -0
  156. package/dist/runtime/components/renderers/JunJournalRenderer.vue +420 -0
  157. package/dist/runtime/components/renderers/JunJournalRenderer.vue.d.ts +10 -0
  158. package/dist/runtime/components/renderers/JunLibraryRenderer.d.vue.ts +10 -0
  159. package/dist/runtime/components/renderers/JunLibraryRenderer.vue +319 -0
  160. package/dist/runtime/components/renderers/JunLibraryRenderer.vue.d.ts +10 -0
  161. package/dist/runtime/components/renderers/JunLinksRenderer.d.vue.ts +10 -0
  162. package/dist/runtime/components/renderers/JunLinksRenderer.vue +206 -0
  163. package/dist/runtime/components/renderers/JunLinksRenderer.vue.d.ts +10 -0
  164. package/dist/runtime/components/renderers/JunLiveRenderer.d.vue.ts +10 -0
  165. package/dist/runtime/components/renderers/JunLiveRenderer.vue +684 -0
  166. package/dist/runtime/components/renderers/JunLiveRenderer.vue.d.ts +10 -0
  167. package/dist/runtime/components/renderers/JunMosaicRenderer.d.vue.ts +10 -0
  168. package/dist/runtime/components/renderers/JunMosaicRenderer.vue +572 -0
  169. package/dist/runtime/components/renderers/JunMosaicRenderer.vue.d.ts +10 -0
  170. package/dist/runtime/components/renderers/JunMovieRenderer.d.vue.ts +10 -0
  171. package/dist/runtime/components/renderers/JunMovieRenderer.vue +539 -0
  172. package/dist/runtime/components/renderers/JunMovieRenderer.vue.d.ts +10 -0
  173. package/dist/runtime/components/renderers/JunNowRenderer.d.vue.ts +10 -0
  174. package/dist/runtime/components/renderers/JunNowRenderer.vue +382 -0
  175. package/dist/runtime/components/renderers/JunNowRenderer.vue.d.ts +10 -0
  176. package/dist/runtime/components/renderers/JunProjectRenderer.d.vue.ts +10 -0
  177. package/dist/runtime/components/renderers/JunProjectRenderer.vue +413 -0
  178. package/dist/runtime/components/renderers/JunProjectRenderer.vue.d.ts +10 -0
  179. package/dist/runtime/components/renderers/JunRedirectRenderer.d.vue.ts +10 -0
  180. package/dist/runtime/components/renderers/JunRedirectRenderer.vue +133 -0
  181. package/dist/runtime/components/renderers/JunRedirectRenderer.vue.d.ts +10 -0
  182. package/dist/runtime/components/renderers/JunServicesRenderer.d.vue.ts +10 -0
  183. package/dist/runtime/components/renderers/JunServicesRenderer.vue +267 -0
  184. package/dist/runtime/components/renderers/JunServicesRenderer.vue.d.ts +10 -0
  185. package/dist/runtime/components/renderers/JunStatsRenderer.d.vue.ts +10 -0
  186. package/dist/runtime/components/renderers/JunStatsRenderer.vue +230 -0
  187. package/dist/runtime/components/renderers/JunStatsRenderer.vue.d.ts +10 -0
  188. package/dist/runtime/components/renderers/JunTrackRenderer.d.vue.ts +10 -0
  189. package/dist/runtime/components/renderers/JunTrackRenderer.vue +380 -0
  190. package/dist/runtime/components/renderers/JunTrackRenderer.vue.d.ts +10 -0
  191. package/dist/runtime/components/renderers/JunUsesRenderer.d.vue.ts +10 -0
  192. package/dist/runtime/components/renderers/JunUsesRenderer.vue +254 -0
  193. package/dist/runtime/components/renderers/JunUsesRenderer.vue.d.ts +10 -0
  194. package/dist/runtime/components/renderers/JunWallRenderer.d.vue.ts +10 -0
  195. package/dist/runtime/components/renderers/JunWallRenderer.vue +276 -0
  196. package/dist/runtime/components/renderers/JunWallRenderer.vue.d.ts +10 -0
  197. package/dist/runtime/components/renderers/JunWindowRenderer.d.vue.ts +10 -0
  198. package/dist/runtime/components/renderers/JunWindowRenderer.vue +516 -0
  199. package/dist/runtime/components/renderers/JunWindowRenderer.vue.d.ts +10 -0
  200. package/dist/runtime/composables/useJunBackdrop.d.ts +9 -0
  201. package/dist/runtime/composables/useJunBackdrop.js +27 -0
  202. package/dist/runtime/composables/useJunBackground.d.ts +78 -0
  203. package/dist/runtime/composables/useJunBackground.js +65 -0
  204. package/dist/runtime/composables/useJunCampfire.d.ts +156 -0
  205. package/dist/runtime/composables/useJunCampfire.js +225 -0
  206. package/dist/runtime/composables/useJunChrome.d.ts +66 -0
  207. package/dist/runtime/composables/useJunChrome.js +233 -0
  208. package/dist/runtime/composables/useJunColorMode.d.ts +8 -0
  209. package/dist/runtime/composables/useJunColorMode.js +11 -0
  210. package/dist/runtime/composables/useJunCommands.d.ts +37 -0
  211. package/dist/runtime/composables/useJunCommands.js +225 -0
  212. package/dist/runtime/composables/useJunCreatePage.d.ts +17 -0
  213. package/dist/runtime/composables/useJunCreatePage.js +30 -0
  214. package/dist/runtime/composables/useJunCurrentDoc.d.ts +5 -0
  215. package/dist/runtime/composables/useJunCurrentDoc.js +14 -0
  216. package/dist/runtime/composables/useJunDocMenu.d.ts +71 -0
  217. package/dist/runtime/composables/useJunDocMenu.js +344 -0
  218. package/dist/runtime/composables/useJunDocPage.d.ts +99 -0
  219. package/dist/runtime/composables/useJunDocPage.js +155 -0
  220. package/dist/runtime/composables/useJunFollow.d.ts +11 -0
  221. package/dist/runtime/composables/useJunFollow.js +38 -0
  222. package/dist/runtime/composables/useJunGroupedDnD.d.ts +74 -0
  223. package/dist/runtime/composables/useJunGroupedDnD.js +186 -0
  224. package/dist/runtime/composables/useJunImagePopup.d.ts +37 -0
  225. package/dist/runtime/composables/useJunImagePopup.js +24 -0
  226. package/dist/runtime/composables/useJunIntro.d.ts +7 -0
  227. package/dist/runtime/composables/useJunIntro.js +8 -0
  228. package/dist/runtime/composables/useJunListDnD.d.ts +65 -0
  229. package/dist/runtime/composables/useJunListDnD.js +159 -0
  230. package/dist/runtime/composables/useJunMediaImport.d.ts +27 -0
  231. package/dist/runtime/composables/useJunMediaImport.js +90 -0
  232. package/dist/runtime/composables/useJunNavSettings.d.ts +57 -0
  233. package/dist/runtime/composables/useJunNavSettings.js +74 -0
  234. package/dist/runtime/composables/useJunNodePanel.d.ts +41 -0
  235. package/dist/runtime/composables/useJunNodePanel.js +36 -0
  236. package/dist/runtime/composables/useJunOpenDoc.d.ts +7 -0
  237. package/dist/runtime/composables/useJunOpenDoc.js +30 -0
  238. package/dist/runtime/composables/useJunOptions.d.ts +68 -0
  239. package/dist/runtime/composables/useJunOptions.js +68 -0
  240. package/dist/runtime/composables/useJunPalette.d.ts +16 -0
  241. package/dist/runtime/composables/useJunPalette.js +72 -0
  242. package/dist/runtime/composables/useJunPeopleAdmin.d.ts +69 -0
  243. package/dist/runtime/composables/useJunPeopleAdmin.js +73 -0
  244. package/dist/runtime/composables/useJunPlayer.d.ts +99 -0
  245. package/dist/runtime/composables/useJunPlayer.js +208 -0
  246. package/dist/runtime/composables/useJunPresence.d.ts +32 -0
  247. package/dist/runtime/composables/useJunPresence.js +53 -0
  248. package/dist/runtime/composables/useJunPressDrag.d.ts +20 -0
  249. package/dist/runtime/composables/useJunPressDrag.js +85 -0
  250. package/dist/runtime/composables/useJunRecent.d.ts +9 -0
  251. package/dist/runtime/composables/useJunRecent.js +44 -0
  252. package/dist/runtime/composables/useJunRename.d.ts +19 -0
  253. package/dist/runtime/composables/useJunRename.js +62 -0
  254. package/dist/runtime/composables/useJunRouteGeoHeal.d.ts +1 -0
  255. package/dist/runtime/composables/useJunRouteGeoHeal.js +45 -0
  256. package/dist/runtime/composables/useJunRouting.d.ts +29 -0
  257. package/dist/runtime/composables/useJunRouting.js +101 -0
  258. package/dist/runtime/composables/useJunSearch.d.ts +6 -0
  259. package/dist/runtime/composables/useJunSearch.js +16 -0
  260. package/dist/runtime/composables/useJunSelfId.d.ts +1 -0
  261. package/dist/runtime/composables/useJunSelfId.js +28 -0
  262. package/dist/runtime/composables/useJunSiteConfig.d.ts +229 -0
  263. package/dist/runtime/composables/useJunSiteConfig.js +95 -0
  264. package/dist/runtime/composables/useJunSiteConfigValues.d.ts +33 -0
  265. package/dist/runtime/composables/useJunSiteConfigValues.js +21 -0
  266. package/dist/runtime/composables/useJunStagger.d.ts +54 -0
  267. package/dist/runtime/composables/useJunStagger.js +23 -0
  268. package/dist/runtime/composables/useJunStudio.d.ts +11 -0
  269. package/dist/runtime/composables/useJunStudio.js +51 -0
  270. package/dist/runtime/composables/useJunSurface.d.ts +19 -0
  271. package/dist/runtime/composables/useJunSurface.js +8 -0
  272. package/dist/runtime/composables/useJunTheme.d.ts +21 -0
  273. package/dist/runtime/composables/useJunTheme.js +138 -0
  274. package/dist/runtime/composables/useJunThemeTransition.d.ts +5 -0
  275. package/dist/runtime/composables/useJunThemeTransition.js +32 -0
  276. package/dist/runtime/composables/useJunUpload.d.ts +12 -0
  277. package/dist/runtime/composables/useJunUpload.js +44 -0
  278. package/dist/runtime/composables/useJunViewingAccent.d.ts +6 -0
  279. package/dist/runtime/composables/useJunViewingAccent.js +28 -0
  280. package/dist/runtime/error.d.vue.ts +7 -0
  281. package/dist/runtime/error.vue +74 -0
  282. package/dist/runtime/error.vue.d.ts +7 -0
  283. package/dist/runtime/layouts/jun.d.vue.ts +13 -0
  284. package/dist/runtime/layouts/jun.vue +162 -0
  285. package/dist/runtime/layouts/jun.vue.d.ts +13 -0
  286. package/dist/runtime/pages/doc.d.vue.ts +3 -0
  287. package/dist/runtime/pages/doc.vue +142 -0
  288. package/dist/runtime/pages/doc.vue.d.ts +3 -0
  289. package/dist/runtime/pages/index.d.vue.ts +3 -0
  290. package/dist/runtime/pages/index.vue +64 -0
  291. package/dist/runtime/pages/index.vue.d.ts +3 -0
  292. package/dist/runtime/plugins/jun-drag-affordance.client.d.ts +2 -0
  293. package/dist/runtime/plugins/jun-drag-affordance.client.js +9 -0
  294. package/dist/runtime/router.options.d.ts +3 -0
  295. package/dist/runtime/router.options.js +72 -0
  296. package/dist/runtime/server/api/nav.get.d.ts +9 -0
  297. package/dist/runtime/server/api/nav.get.js +16 -0
  298. package/dist/runtime/server/api/resolve/[...slug].get.d.ts +18 -0
  299. package/dist/runtime/server/api/resolve/[...slug].get.js +20 -0
  300. package/dist/runtime/server/api/search.get.d.ts +13 -0
  301. package/dist/runtime/server/api/search.get.js +72 -0
  302. package/dist/runtime/server/api/service.get.d.ts +12 -0
  303. package/dist/runtime/server/api/service.get.js +39 -0
  304. package/dist/runtime/server/api/site-config.get.d.ts +2 -0
  305. package/dist/runtime/server/api/site-config.get.js +3 -0
  306. package/dist/runtime/server/api/stats.get.d.ts +12 -0
  307. package/dist/runtime/server/api/stats.get.js +56 -0
  308. package/dist/runtime/server/janitor/junJanitorActor.d.ts +179 -0
  309. package/dist/runtime/server/janitor/junJanitorActor.js +305 -0
  310. package/dist/runtime/server/janitor/junJanitorChores.d.ts +137 -0
  311. package/dist/runtime/server/janitor/junJanitorChores.js +189 -0
  312. package/dist/runtime/server/janitor/junJanitorDiff.d.ts +41 -0
  313. package/dist/runtime/server/janitor/junJanitorDiff.js +109 -0
  314. package/dist/runtime/server/janitor/junJanitorListen.d.ts +33 -0
  315. package/dist/runtime/server/janitor/junJanitorListen.js +43 -0
  316. package/dist/runtime/server/janitor/junJanitorMachine.d.ts +60 -0
  317. package/dist/runtime/server/janitor/junJanitorMachine.js +598 -0
  318. package/dist/runtime/server/janitor/junJanitorMotor.d.ts +211 -0
  319. package/dist/runtime/server/janitor/junJanitorMotor.js +241 -0
  320. package/dist/runtime/server/janitor/junJanitorPatrol.d.ts +68 -0
  321. package/dist/runtime/server/janitor/junJanitorPatrol.js +34 -0
  322. package/dist/runtime/server/janitor/junJanitorPerform.d.ts +70 -0
  323. package/dist/runtime/server/janitor/junJanitorPerform.js +72 -0
  324. package/dist/runtime/server/janitor/junJanitorRandom.d.ts +54 -0
  325. package/dist/runtime/server/janitor/junJanitorRandom.js +48 -0
  326. package/dist/runtime/server/janitor/junJanitorStore.d.ts +159 -0
  327. package/dist/runtime/server/janitor/junJanitorStore.js +269 -0
  328. package/dist/runtime/server/janitor/junJanitorVoice.d.ts +86 -0
  329. package/dist/runtime/server/janitor/junJanitorVoice.js +193 -0
  330. package/dist/runtime/server/janitor/junJanitorYText.d.ts +164 -0
  331. package/dist/runtime/server/janitor/junJanitorYText.js +258 -0
  332. package/dist/runtime/server/plugins/jun-bootstrap.d.ts +25 -0
  333. package/dist/runtime/server/plugins/jun-bootstrap.js +652 -0
  334. package/dist/runtime/server/plugins/jun-doc-cache.d.ts +2 -0
  335. package/dist/runtime/server/plugins/jun-doc-cache.js +142 -0
  336. package/dist/runtime/server/plugins/jun-janitor.d.ts +2 -0
  337. package/dist/runtime/server/plugins/jun-janitor.js +176 -0
  338. package/dist/runtime/server/plugins/jun-rpc.d.ts +2 -0
  339. package/dist/runtime/server/plugins/jun-rpc.js +455 -0
  340. package/dist/runtime/server/routes/feed.json.get.d.ts +21 -0
  341. package/dist/runtime/server/routes/feed.json.get.js +25 -0
  342. package/dist/runtime/server/routes/feed.xml.get.d.ts +2 -0
  343. package/dist/runtime/server/routes/feed.xml.get.js +34 -0
  344. package/dist/runtime/server/routes/sitemap.xml.get.d.ts +2 -0
  345. package/dist/runtime/server/routes/sitemap.xml.get.js +27 -0
  346. package/dist/runtime/server/utils/junCache.d.ts +41 -0
  347. package/dist/runtime/server/utils/junCache.js +32 -0
  348. package/dist/runtime/server/utils/junFeed.d.ts +20 -0
  349. package/dist/runtime/server/utils/junFeed.js +71 -0
  350. package/dist/runtime/server/utils/junServiceFetch.d.ts +46 -0
  351. package/dist/runtime/server/utils/junServiceFetch.js +320 -0
  352. package/dist/runtime/server/utils/junVisibility.d.ts +31 -0
  353. package/dist/runtime/server/utils/junVisibility.js +6 -0
  354. package/dist/runtime/types.d.ts +853 -0
  355. package/dist/runtime/types.js +1 -0
  356. package/dist/runtime/utils/junDate.d.ts +38 -0
  357. package/dist/runtime/utils/junDate.js +30 -0
  358. package/dist/runtime/utils/junDndGeometry.d.ts +62 -0
  359. package/dist/runtime/utils/junDndGeometry.js +56 -0
  360. package/dist/runtime/utils/junDocTypeIcons.d.ts +30 -0
  361. package/dist/runtime/utils/junDocTypeIcons.js +30 -0
  362. package/dist/runtime/utils/junEditorBodyText.d.ts +32 -0
  363. package/dist/runtime/utils/junEditorBodyText.js +10 -0
  364. package/dist/runtime/utils/junMapboxToken.d.ts +1 -0
  365. package/dist/runtime/utils/junMapboxToken.js +5 -0
  366. package/dist/runtime/utils/junMatch.d.ts +45 -0
  367. package/dist/runtime/utils/junMatch.js +37 -0
  368. package/dist/runtime/utils/junMetaSchemas.d.ts +23 -0
  369. package/dist/runtime/utils/junMetaSchemas.js +94 -0
  370. package/dist/runtime/utils/junMotion.d.ts +71 -0
  371. package/dist/runtime/utils/junMotion.js +3 -0
  372. package/dist/runtime/utils/junServiceRef.d.ts +21 -0
  373. package/dist/runtime/utils/junServiceRef.js +94 -0
  374. package/dist/runtime/utils/junSimplifyPath.d.ts +23 -0
  375. package/dist/runtime/utils/junSimplifyPath.js +57 -0
  376. package/dist/runtime/utils/junTransportModes.d.ts +49 -0
  377. package/dist/runtime/utils/junTransportModes.js +37 -0
  378. package/dist/runtime/utils/junVideoSource.d.ts +51 -0
  379. package/dist/runtime/utils/junVideoSource.js +110 -0
  380. package/dist/runtime/utils/junVisibility.d.ts +14 -0
  381. package/dist/runtime/utils/junVisibility.js +6 -0
  382. package/dist/types.d.mts +5 -0
  383. package/package.json +111 -0
@@ -0,0 +1,65 @@
1
+ import { computed, ref, watch } from "vue";
2
+ import { useFileBlobStore } from "#imports";
3
+ import { useJunEffectiveConfig } from "./useJunSiteConfig.js";
4
+ const FITS = ["cover", "contain", "tile"];
5
+ const OPACITY_MIN = 0.05;
6
+ const OPACITY_MAX = 1;
7
+ const FULL_PX = 1024;
8
+ const SOFT_PX = 64;
9
+ export function junBackgroundUpload(value) {
10
+ if (!value || /^(?:https?:)?\/\//i.test(value) || value.startsWith("/") || value.startsWith("data:")) return null;
11
+ const [docId, uploadId, ...rest] = value.split("/");
12
+ if (!docId || !uploadId || rest.length) return null;
13
+ return { docId, uploadId };
14
+ }
15
+ export function useJunBackgroundSettings() {
16
+ const config = useJunEffectiveConfig();
17
+ return computed(() => {
18
+ const c = config.value;
19
+ const stored = typeof c.themeBackgroundImage === "string" ? c.themeBackgroundImage.trim() : "";
20
+ const opacity = typeof c.themeBackgroundOpacity === "number" && Number.isFinite(c.themeBackgroundOpacity) ? Math.min(OPACITY_MAX, Math.max(OPACITY_MIN, c.themeBackgroundOpacity)) : 1;
21
+ return {
22
+ ref: stored,
23
+ fit: typeof c.themeBackgroundFit === "string" && FITS.includes(c.themeBackgroundFit) ? c.themeBackgroundFit : "cover",
24
+ opacity,
25
+ blur: c.themeBackgroundBlur === true,
26
+ active: !!stored
27
+ };
28
+ });
29
+ }
30
+ export function useJunBackgroundImage() {
31
+ const settings = useJunBackgroundSettings();
32
+ const { getBlobUrl, getThumbUrl } = useFileBlobStore();
33
+ const url = ref("");
34
+ watch(
35
+ // Both the reference AND the softening, because softening changes which
36
+ // RESOLUTION is fetched rather than which filter is applied. See below.
37
+ () => [settings.value.ref, settings.value.blur],
38
+ async ([value, soft]) => {
39
+ if (!value) {
40
+ url.value = "";
41
+ return;
42
+ }
43
+ const upload = junBackgroundUpload(value);
44
+ if (!upload) {
45
+ url.value = `url("${value.replace(/"/g, "%22")}")`;
46
+ return;
47
+ }
48
+ const want = soft ? SOFT_PX : FULL_PX;
49
+ const resolved = await getThumbUrl(upload.docId, upload.uploadId, { w: want }) ?? await getBlobUrl(upload.docId, upload.uploadId);
50
+ if (settings.value.ref !== value || settings.value.blur !== soft) return;
51
+ url.value = resolved ? `url("${resolved}")` : "";
52
+ },
53
+ { immediate: true }
54
+ );
55
+ return {
56
+ settings,
57
+ url,
58
+ size: computed(() => {
59
+ const fit = settings.value.fit;
60
+ return fit === "tile" ? "auto" : fit;
61
+ }),
62
+ repeat: computed(() => settings.value.fit === "tile" ? "repeat" : "no-repeat")
63
+ };
64
+ }
65
+ export const JUN_BACKGROUND_VOCAB = { FITS, OPACITY_MIN, OPACITY_MAX };
@@ -0,0 +1,156 @@
1
+ /**
2
+ * useJunCampfire — everything the site's user center needs to know about
3
+ * itself, resolved once so no component has to.
4
+ *
5
+ * Four things live here, and they are separate exports because they have
6
+ * different costs: the settings are pure computeds anything may read, the
7
+ * people list walks awareness on every tick, the channel resolves against the
8
+ * document tree, and the name directory keeps module-level state.
9
+ *
10
+ * ## Settings
11
+ *
12
+ * Two layers, the same contract the navbar uses: `jun.campfire` is what a FRESH
13
+ * site boots with, and the Site Config document is the owner's live choice,
14
+ * which wins. The config stores `undefined` for the DEFAULT rather than the
15
+ * value, so "never touched" and "set back to the default" are the same thing —
16
+ * which is what lets a site change `jun.campfire.rosterStyle` later and have
17
+ * existing deployments follow.
18
+ *
19
+ * Every value is validated against its vocabulary here rather than at each call
20
+ * site: a config document is CRDT data an older client may have written.
21
+ *
22
+ * ## Why the channel is not the space document
23
+ *
24
+ * It used to be, and that is why chat did not work. `messages:send` is gated on
25
+ * `can_write()` against the channel document, and visitors are `viewer`
26
+ * site-wide — so every visitor message was rejected, invisibly, behind the
27
+ * client's own optimistic echo. `jun:campfire` (in `server/plugins/jun-rpc.ts`)
28
+ * opens ONE hidden `kind: "channel"` child of the space root with
29
+ * `public_access = "editor"`, and this resolves it by its `meta.campfire` flag.
30
+ *
31
+ * When no such document exists — the runner has not opened it, or `features.rpc`
32
+ * is off — this returns `null` rather than falling back to the space root.
33
+ * Falling back is what produced the original bug: a channel that accepts
34
+ * messages from the owner and silently drops everyone else's is worse than no
35
+ * channel at all, because nothing on screen distinguishes the two.
36
+ */
37
+ import { type ComputedRef } from 'vue';
38
+ import type { JunCampfirePillMode, JunCampfirePlacement, JunCampfireRosterStyle, JunCampfireSize, JunCampfireTab } from '../types.js';
39
+ export interface JunCampfireSettings {
40
+ /** Is the hearth mounted at all? */
41
+ enabled: boolean;
42
+ /** What the place is called. Header, empty state, every aria label. */
43
+ title: string;
44
+ /** The mark on the hearth — a validated `i-lucide-*` id. */
45
+ icon: string;
46
+ chat: boolean;
47
+ roster: boolean;
48
+ identity: boolean;
49
+ reactions: boolean;
50
+ follow: boolean;
51
+ showPages: boolean;
52
+ showBots: boolean;
53
+ allowRename: boolean;
54
+ reactionSet: string[];
55
+ historyLimit: number;
56
+ placement: JunCampfirePlacement;
57
+ size: JunCampfireSize;
58
+ pillMode: JunCampfirePillMode;
59
+ rosterStyle: JunCampfireRosterStyle;
60
+ openTab: JunCampfireTab;
61
+ blur: boolean;
62
+ ember: boolean;
63
+ label: string;
64
+ /**
65
+ * True when no panel would have anything in it — the hearth is then a
66
+ * decoration, and the pill stops offering to open.
67
+ */
68
+ hasPanel: boolean;
69
+ }
70
+ /**
71
+ * A reaction palette from a stored string. Split on GRAPHEMES rather than code
72
+ * units: `👋` is two code units and `❤️` is a base character plus a variation
73
+ * selector, so a naive `split('')` shreds both into mojibake.
74
+ */
75
+ export declare function junCampfireReactions(raw: string): string[];
76
+ export declare function useJunCampfireSettings(): ComputedRef<JunCampfireSettings>;
77
+ /** The vocabularies, so the settings page never keeps a second copy. */
78
+ export declare const JUN_CAMPFIRE_VOCAB: {
79
+ PLACEMENTS: JunCampfirePlacement[];
80
+ PILL_MODES: JunCampfirePillMode[];
81
+ ROSTER_STYLES: JunCampfireRosterStyle[];
82
+ TABS: JunCampfireTab[];
83
+ SIZES: JunCampfireSize[];
84
+ HISTORY_MIN: number;
85
+ HISTORY_MAX: number;
86
+ REACTIONS_MAX: number;
87
+ TITLE_MAX: number;
88
+ ICON_RE: RegExp;
89
+ };
90
+ export interface JunCampfirePerson {
91
+ /** The awareness client id of the session shown. See `sessions`. */
92
+ clientId: number;
93
+ publicKey: string;
94
+ name: string;
95
+ color: string;
96
+ idle: boolean;
97
+ isSelf: boolean;
98
+ /**
99
+ * A process rather than a person: an AI agent, or a headless runner that is
100
+ * connected to the root document without ever standing on a page.
101
+ */
102
+ isBot: boolean;
103
+ docId: string | null;
104
+ page: string | null;
105
+ statusIcon: string | null;
106
+ statusText: string | null;
107
+ /** How many tabs this person has open. `1` for almost everyone. */
108
+ sessions: number;
109
+ }
110
+ /**
111
+ * The people at the fire.
112
+ *
113
+ * **Deduplicated by public key**, and that is the fix for the count reading
114
+ * several times too high: awareness is per SESSION, so a visitor with the site
115
+ * open in two tabs was two people, and the owner with a tab plus a studio
116
+ * window was two more. A person is a key, not a socket. The awake session wins
117
+ * the `docId`/`page` — an idle background tab must not report where its owner
118
+ * is.
119
+ *
120
+ * `others` is built from awareness, which excludes the local session by
121
+ * construction. `self` is built from the LOCAL identity rather than fished back
122
+ * out of that list: the only sessions of mine awareness can see are my other
123
+ * tabs, and describing me by a background tab's route is both wrong and
124
+ * unstable.
125
+ */
126
+ export declare function useJunCampfirePeople(): {
127
+ others: ComputedRef<JunCampfirePerson[]>;
128
+ self: ComputedRef<JunCampfirePerson>;
129
+ /** Everyone, self first. What the roster renders. */
130
+ everyone: ComputedRef<JunCampfirePerson[]>;
131
+ };
132
+ /**
133
+ * How the user center describes the company. A custom label wins verbatim,
134
+ * with `{n}` interpolated — a site whose visitors are "readers" or "guests"
135
+ * should not have to accept the default wording.
136
+ */
137
+ export declare function junCampfireLabel(others: number, custom: string): string;
138
+ /**
139
+ * The campfire's channel document, or `null` when the runner has not opened one.
140
+ *
141
+ * `null` is a real answer and the panel says so: it means visitor sends would be
142
+ * rejected by the server, and showing a working-looking composer over that is
143
+ * exactly the bug this whole change exists to fix.
144
+ *
145
+ * **Oldest first, ties broken on the id — and `jun:campfire` sorts candidates
146
+ * the same way.** If the two rules ever disagreed, half the visitors would be
147
+ * talking in a room the other half cannot see, with nothing on either screen to
148
+ * suggest it. `Array.find` was that bug waiting to happen: it answers in Y.Map
149
+ * iteration order, which is not stable between clients.
150
+ */
151
+ export declare function useJunCampfireChannel(): ComputedRef<string | null>;
152
+ export declare function useJunCampfireNames(): {
153
+ remember: (publicKey: string, name: string) => void;
154
+ flush: () => void;
155
+ nameFor: (publicKey: string, fallback?: string) => string;
156
+ };
@@ -0,0 +1,225 @@
1
+ import { computed } from "vue";
2
+ import { useAbracadabra, useAwarenessPeers, useDocTree } from "#imports";
3
+ import { useJunOptions } from "./useJunOptions.js";
4
+ import { useJunEffectiveConfig } from "./useJunSiteConfig.js";
5
+ const PLACEMENTS = ["bottom-right", "bottom-left", "top-right", "top-left"];
6
+ const PILL_MODES = ["full", "compact", "count", "ember"];
7
+ const ROSTER_STYLES = ["list", "grid", "facepile", "dots"];
8
+ const TABS = ["auto", "here", "fire", "you"];
9
+ const SIZES = ["sm", "md", "lg"];
10
+ const HISTORY_MIN = 5;
11
+ const HISTORY_MAX = 300;
12
+ const REACTIONS_MAX = 8;
13
+ const TITLE_MAX = 32;
14
+ const ICON_RE = /^i-lucide-[a-z0-9]+(?:-[a-z0-9]+)*$/;
15
+ export function junCampfireReactions(raw) {
16
+ const out = [];
17
+ if (typeof Intl !== "undefined" && "Segmenter" in Intl) {
18
+ const seg = new Intl.Segmenter(void 0, { granularity: "grapheme" });
19
+ for (const { segment } of seg.segment(raw)) {
20
+ const g = segment.trim();
21
+ if (g) out.push(g);
22
+ }
23
+ } else {
24
+ for (const g of raw.split(/\s+/)) {
25
+ if (g) out.push(g);
26
+ }
27
+ }
28
+ return out.slice(0, REACTIONS_MAX);
29
+ }
30
+ export function useJunCampfireSettings() {
31
+ const opts = useJunOptions();
32
+ const config = useJunEffectiveConfig();
33
+ function pick(stored, allowed, fallback) {
34
+ return typeof stored === "string" && allowed.includes(stored) ? stored : fallback;
35
+ }
36
+ function flag(stored, fallback) {
37
+ return typeof stored === "boolean" ? stored : fallback;
38
+ }
39
+ return computed(() => {
40
+ const c = config.value;
41
+ const build = opts.campfire;
42
+ const stored = typeof c.campfireReactionSet === "string" ? junCampfireReactions(c.campfireReactionSet) : [];
43
+ const title = (typeof c.campfireTitle === "string" && c.campfireTitle.trim() ? c.campfireTitle.trim().slice(0, TITLE_MAX) : build.title) || "User Center";
44
+ const reactions = flag(c.campfireReactions, build.reactions);
45
+ const chat = flag(c.campfireChat, build.chat);
46
+ const roster = flag(c.campfireRoster, build.roster);
47
+ const identity = flag(c.campfireIdentity, build.identity);
48
+ return {
49
+ // The build flag decides whether the hearth exists; this decides whether
50
+ // it is lit. Same shape as every navigation key — which is what lets an
51
+ // owner light it from the settings page without a redeploy.
52
+ enabled: flag(c.campfireEnabled, opts.features.campfire === true),
53
+ title,
54
+ icon: typeof c.campfireIcon === "string" && ICON_RE.test(c.campfireIcon) ? c.campfireIcon : ICON_RE.test(build.icon) ? build.icon : "i-lucide-users-round",
55
+ chat,
56
+ roster,
57
+ identity,
58
+ reactions,
59
+ follow: flag(c.campfireFollow, build.follow),
60
+ showPages: flag(c.campfireShowPages, build.showPages),
61
+ showBots: flag(c.campfireShowBots, build.showBots),
62
+ allowRename: flag(c.campfireAllowRename, build.allowRename),
63
+ // An emptied palette falls back rather than leaving the reaction row a
64
+ // blank strip: clearing the field means "I did not mean to configure
65
+ // this", and there is a switch for meaning "off".
66
+ reactionSet: stored.length ? stored : build.reactionSet,
67
+ historyLimit: Math.min(
68
+ HISTORY_MAX,
69
+ Math.max(
70
+ HISTORY_MIN,
71
+ typeof c.campfireHistoryLimit === "number" && Number.isFinite(c.campfireHistoryLimit) ? Math.round(c.campfireHistoryLimit) : build.historyLimit
72
+ )
73
+ ),
74
+ placement: pick(c.campfirePlacement, PLACEMENTS, build.placement),
75
+ size: pick(c.campfireSize, SIZES, build.size),
76
+ pillMode: pick(c.campfirePillMode, PILL_MODES, build.pillMode),
77
+ rosterStyle: pick(c.campfireRosterStyle, ROSTER_STYLES, build.rosterStyle),
78
+ openTab: pick(c.campfireOpenTab, TABS, build.openTab),
79
+ blur: flag(c.campfireBlur, build.blur),
80
+ ember: flag(c.campfireEmber, build.ember),
81
+ label: typeof c.campfireLabel === "string" ? c.campfireLabel : build.label,
82
+ hasPanel: chat || roster || identity
83
+ };
84
+ });
85
+ }
86
+ export const JUN_CAMPFIRE_VOCAB = {
87
+ PLACEMENTS,
88
+ PILL_MODES,
89
+ ROSTER_STYLES,
90
+ TABS,
91
+ SIZES,
92
+ HISTORY_MIN,
93
+ HISTORY_MAX,
94
+ REACTIONS_MAX,
95
+ TITLE_MAX,
96
+ ICON_RE
97
+ };
98
+ export function useJunCampfirePeople() {
99
+ const { peers, isIdle } = useAwarenessPeers();
100
+ const abra = useAbracadabra();
101
+ const settings = useJunCampfireSettings();
102
+ const others = computed(() => {
103
+ const mine = abra.publicKeyB64.value;
104
+ const byKey = /* @__PURE__ */ new Map();
105
+ for (const p of peers.value) {
106
+ const state = p;
107
+ const user = p.user;
108
+ if (!user) continue;
109
+ if (mine && user.publicKey === mine) continue;
110
+ const key = user.publicKey || `client:${p.clientId}`;
111
+ const page = typeof state.page === "string" ? state.page : null;
112
+ const idle = typeof p.idle === "boolean" ? p.idle : isIdle(p.clientId);
113
+ const person = {
114
+ clientId: p.clientId,
115
+ publicKey: user.publicKey ?? "",
116
+ name: user.name || "Traveller",
117
+ color: user.color || "var(--ui-text-muted)",
118
+ idle,
119
+ isSelf: false,
120
+ // A session that never broadcasts a `page` is not walking the site —
121
+ // it is a runner holding the root document open. The janitor sets
122
+ // `page` on purpose, precisely so it counts as a person here.
123
+ isBot: user.isAgent === true || page === null,
124
+ docId: typeof state.docId === "string" ? state.docId : null,
125
+ page,
126
+ statusIcon: typeof user.statusIcon === "string" ? user.statusIcon : null,
127
+ statusText: typeof user.statusText === "string" ? user.statusText : null,
128
+ sessions: 1
129
+ };
130
+ const seen = byKey.get(key);
131
+ if (!seen) {
132
+ byKey.set(key, person);
133
+ continue;
134
+ }
135
+ seen.sessions++;
136
+ if (seen.idle && !person.idle) byKey.set(key, { ...person, sessions: seen.sessions });
137
+ }
138
+ const all = [...byKey.values()];
139
+ return settings.value.showBots ? all : all.filter((p) => !p.isBot);
140
+ });
141
+ const self = computed(() => ({
142
+ clientId: -1,
143
+ publicKey: abra.publicKeyB64.value ?? "",
144
+ name: abra.userName.value || "You",
145
+ color: abra.userColor.value || "var(--ui-text-muted)",
146
+ idle: false,
147
+ isSelf: true,
148
+ isBot: false,
149
+ docId: abra.spaceDocId.value ?? null,
150
+ page: null,
151
+ statusIcon: abra.userStatusIcon?.value || null,
152
+ statusText: abra.userStatusText?.value || null,
153
+ sessions: 1
154
+ }));
155
+ return {
156
+ others,
157
+ self,
158
+ everyone: computed(() => [self.value, ...others.value])
159
+ };
160
+ }
161
+ export function junCampfireLabel(others, custom) {
162
+ if (custom) return custom.replace(/\{n\}/g, String(others));
163
+ if (others === 0) return "nobody else here";
164
+ if (others === 1) return "1 other here";
165
+ return `${others} others here`;
166
+ }
167
+ export function useJunCampfireChannel() {
168
+ const { entries } = useDocTree();
169
+ return computed(() => {
170
+ const candidates = entries.value.filter(
171
+ (e) => e.meta?.campfire === true && !e.trashed
172
+ );
173
+ if (candidates.length < 2) return candidates[0]?.id ?? null;
174
+ return [...candidates].sort(
175
+ (a, b) => (a.createdAt ?? 0) - (b.createdAt ?? 0) || (a.id < b.id ? -1 : 1)
176
+ )[0].id;
177
+ });
178
+ }
179
+ const NAMES_KEY = "jun:campfire:names";
180
+ const NAMES_CAP = 200;
181
+ let directory = null;
182
+ function loadDirectory() {
183
+ if (directory) return directory;
184
+ directory = /* @__PURE__ */ new Map();
185
+ if (typeof localStorage === "undefined") return directory;
186
+ try {
187
+ const raw = localStorage.getItem(NAMES_KEY);
188
+ if (raw) {
189
+ for (const [k, v] of Object.entries(JSON.parse(raw))) {
190
+ if (typeof v === "string") directory.set(k, v);
191
+ }
192
+ }
193
+ } catch {
194
+ }
195
+ return directory;
196
+ }
197
+ function persistDirectory() {
198
+ if (typeof localStorage === "undefined" || !directory) return;
199
+ try {
200
+ const entries = [...directory.entries()].slice(-NAMES_CAP);
201
+ directory = new Map(entries);
202
+ localStorage.setItem(NAMES_KEY, JSON.stringify(Object.fromEntries(entries)));
203
+ } catch {
204
+ }
205
+ }
206
+ export function useJunCampfireNames() {
207
+ const dir = loadDirectory();
208
+ let dirty = false;
209
+ function remember(publicKey, name) {
210
+ if (!publicKey || !name || name === "User" || name === "Traveller") return;
211
+ if (dir.get(publicKey) === name) return;
212
+ dir.delete(publicKey);
213
+ dir.set(publicKey, name);
214
+ dirty = true;
215
+ }
216
+ function flush() {
217
+ if (!dirty) return;
218
+ dirty = false;
219
+ persistDirectory();
220
+ }
221
+ function nameFor(publicKey, fallback = "Traveller") {
222
+ return dir.get(publicKey) || fallback;
223
+ }
224
+ return { remember, flush, nameFor };
225
+ }
@@ -0,0 +1,66 @@
1
+ /**
2
+ * useJunChrome — where the site's own furniture currently is.
3
+ *
4
+ * The floating bars used to be positioned by literal: the studio bar was
5
+ * `bottom-4 left-4` and knew nothing at all, and the hearth carried four
6
+ * hard-coded corners in which `top-[4.5rem]` was the height of one particular
7
+ * navbar in one particular placement. Both were correct for the configuration
8
+ * they were written against and wrong for every other one — a left rail buried
9
+ * the studio bar, a bottom dock sat on top of it, and a top-corner hearth
10
+ * cleared a bar that might be a rail, or at the bottom, or auto-hidden.
11
+ *
12
+ * So the geometry is MEASURED and published, the same contract `--jun-player-h`
13
+ * and `--jun-nav-rail-w` already established here:
14
+ *
15
+ * - `--jun-chrome-top` / `-right` / `-bottom` / `-left` — how many pixels of
16
+ * each viewport edge the navbar and the player have taken. A bar positions
17
+ * itself at `calc(var(--jun-chrome-bottom) + 1rem)` and is correct on all
18
+ * five navbar placements without knowing which one it is in.
19
+ * - `--jun-studio-h` / `--jun-hearth-h` — each bar's own measured height, so
20
+ * two bars sharing a corner stack instead of overlapping. They fall back to
21
+ * `0px`, which is exactly right for the visitor who has no studio bar.
22
+ *
23
+ * CSS variables rather than reactive numbers, deliberately: the bars then get a
24
+ * transition on `bottom`/`left` for free, so a navbar that moves is answered by
25
+ * bars that GLIDE out of its way rather than teleporting. It also means nothing
26
+ * re-renders when the geometry changes.
27
+ *
28
+ * **Measurement is bursty, not continuous.** A permanent rAF loop for the whole
29
+ * session to watch something that moves a handful of times is not a trade worth
30
+ * making. Anything that could have moved the navbar starts a burst; a burst
31
+ * keeps running while the numbers are still changing and stops shortly after
32
+ * they settle. That is what tracks the 1000ms placement transition and the
33
+ * auto-hide slide without polling between them.
34
+ */
35
+ import { type Ref } from 'vue';
36
+ /**
37
+ * The corner a bar should actually use: its own, unless the navbar has taken
38
+ * that edge, in which case it moves to the opposite one.
39
+ *
40
+ * The same mirror the player already does — when the navbar owns the bottom,
41
+ * the player's pill goes to the top. A bar stacked in a second row above a
42
+ * bottom dock is three surfaces competing for one edge; moving it to the free
43
+ * edge is what the layout was already doing everywhere else.
44
+ */
45
+ export type JunCorner = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
46
+ export declare function junMirrorCorner(corner: JunCorner, placement: string): JunCorner;
47
+ /**
48
+ * Keep `--jun-chrome-*` current for as long as this component is mounted.
49
+ *
50
+ * Refcounted and self-starting, so it does not matter which bar mounts first or
51
+ * whether the layout remembered to call it. The navbar itself never has to
52
+ * know anyone is listening.
53
+ */
54
+ export declare function useJunChromeInsets(): {
55
+ navPlacement: Ref<string, string>;
56
+ };
57
+ /**
58
+ * Publish one bar's measured height as `--jun-<name>-h`, so whatever shares its
59
+ * corner can clear it with a `calc()` instead of a guessed constant.
60
+ *
61
+ * The variable is REMOVED on unmount rather than zeroed, which is the same
62
+ * thing to a `var(--jun-studio-h, 0px)` reader and means a stale value can
63
+ * never outlive the bar that wrote it — the hearth would otherwise keep dodging
64
+ * a studio bar that signed out ten minutes ago.
65
+ */
66
+ export declare function useJunChromeSlot(name: string, el: Ref<HTMLElement | null>): void;