@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,29 @@
1
+ import { type JunTransportMode } from '../utils/junTransportModes.js';
2
+ export interface GeoPoint {
3
+ lng: number;
4
+ lat: number;
5
+ }
6
+ export interface GeoResult {
7
+ label: string;
8
+ lng: number;
9
+ lat: number;
10
+ }
11
+ export interface RouteResult {
12
+ coords: [number, number][];
13
+ km: number;
14
+ /** Travel minutes. Zero for a great-circle arc, which has no duration estimate. */
15
+ min: number;
16
+ snapped: boolean;
17
+ }
18
+ /**
19
+ * A spherical great-circle arc between two points.
20
+ *
21
+ * The running `prevLng` unwrap is what stops a leg crossing the antimeridian
22
+ * from drawing all the way back around the globe.
23
+ */
24
+ export declare function greatCircleArc(a: GeoPoint, b: GeoPoint, steps?: number): [number, number][];
25
+ export declare function useJunRouting(): {
26
+ geocode: (query: string) => Promise<GeoResult[]>;
27
+ reverseGeocode: (lng: number, lat: number) => Promise<string>;
28
+ directions: (mode: JunTransportMode, from: GeoPoint, to: GeoPoint) => Promise<RouteResult>;
29
+ };
@@ -0,0 +1,101 @@
1
+ import { computed } from "vue";
2
+ import { junMapboxToken } from "../utils/junMapboxToken.js";
3
+ import { profileFor } from "../utils/junTransportModes.js";
4
+ import { junSimplifyPath } from "../utils/junSimplifyPath.js";
5
+ const EARTH_KM = 6371;
6
+ function haversineKm(a, b) {
7
+ const r = Math.PI / 180;
8
+ const dLat = (b.lat - a.lat) * r;
9
+ const dLng = (b.lng - a.lng) * r;
10
+ const h = Math.sin(dLat / 2) ** 2 + Math.cos(a.lat * r) * Math.cos(b.lat * r) * Math.sin(dLng / 2) ** 2;
11
+ return 2 * EARTH_KM * Math.asin(Math.min(1, Math.sqrt(h)));
12
+ }
13
+ export function greatCircleArc(a, b, steps = 48) {
14
+ const toR = Math.PI / 180;
15
+ const lat1 = a.lat * toR;
16
+ const lon1 = a.lng * toR;
17
+ const lat2 = b.lat * toR;
18
+ const lon2 = b.lng * toR;
19
+ const d = 2 * Math.asin(Math.sqrt(
20
+ Math.sin((lat2 - lat1) / 2) ** 2 + Math.cos(lat1) * Math.cos(lat2) * Math.sin((lon2 - lon1) / 2) ** 2
21
+ ));
22
+ if (d === 0) return [[a.lng, a.lat], [b.lng, b.lat]];
23
+ const pts = [];
24
+ let prevLng = null;
25
+ for (let i = 0; i <= steps; i++) {
26
+ const f = i / steps;
27
+ const A = Math.sin((1 - f) * d) / Math.sin(d);
28
+ const B = Math.sin(f * d) / Math.sin(d);
29
+ const x = A * Math.cos(lat1) * Math.cos(lon1) + B * Math.cos(lat2) * Math.cos(lon2);
30
+ const y = A * Math.cos(lat1) * Math.sin(lon1) + B * Math.cos(lat2) * Math.sin(lon2);
31
+ const z = A * Math.sin(lat1) + B * Math.sin(lat2);
32
+ const lat = Math.atan2(z, Math.sqrt(x * x + y * y)) / toR;
33
+ let lng = Math.atan2(y, x) / toR;
34
+ if (prevLng !== null) {
35
+ while (lng - prevLng > 180) lng -= 360;
36
+ while (lng - prevLng < -180) lng += 360;
37
+ }
38
+ prevLng = lng;
39
+ pts.push([lng, lat]);
40
+ }
41
+ return pts;
42
+ }
43
+ export function useJunRouting() {
44
+ const token = computed(() => junMapboxToken());
45
+ async function geocode(query) {
46
+ const q = query.trim();
47
+ if (!q || !token.value) return [];
48
+ try {
49
+ const url = `https://api.mapbox.com/search/geocode/v6/forward?q=${encodeURIComponent(q)}&limit=5&access_token=${token.value}`;
50
+ const data = await $fetch(url);
51
+ return (data.features ?? []).filter((f) => f.geometry?.coordinates).map((f) => ({
52
+ label: f.properties?.full_address || f.properties?.name || q,
53
+ lng: f.geometry.coordinates[0],
54
+ lat: f.geometry.coordinates[1]
55
+ }));
56
+ } catch {
57
+ return [];
58
+ }
59
+ }
60
+ async function reverseGeocode(lng, lat) {
61
+ if (!token.value) return "";
62
+ try {
63
+ const url = `https://api.mapbox.com/search/geocode/v6/reverse?longitude=${lng}&latitude=${lat}&limit=1&access_token=${token.value}`;
64
+ const data = await $fetch(url);
65
+ const f = data.features?.[0];
66
+ return f?.properties?.name || f?.properties?.full_address || "";
67
+ } catch {
68
+ return "";
69
+ }
70
+ }
71
+ async function directions(mode, from, to) {
72
+ const profile = profileFor(mode);
73
+ const fallback = () => ({
74
+ coords: greatCircleArc(from, to),
75
+ km: haversineKm(from, to),
76
+ min: 0,
77
+ snapped: false
78
+ });
79
+ if (!profile || !token.value) return fallback();
80
+ try {
81
+ const coordPair = `${from.lng},${from.lat};${to.lng},${to.lat}`;
82
+ const url = `https://api.mapbox.com/directions/v5/mapbox/${profile}/${coordPair}?geometries=geojson&overview=full&access_token=${token.value}`;
83
+ const data = await $fetch(url);
84
+ const r = data.routes?.[0];
85
+ if (!r?.geometry?.coordinates?.length) return fallback();
86
+ return {
87
+ // `overview=full` returns every road vertex — thousands of points on a
88
+ // long leg. Simplify BEFORE it ever reaches `meta.routeGeo`: at globe
89
+ // zoom the shape is indistinguishable and the document stays light.
90
+ // See `useJunRouteGeoHeal` for what happens when this guard is missing.
91
+ coords: junSimplifyPath(r.geometry.coordinates),
92
+ km: r.distance / 1e3,
93
+ min: r.duration / 60,
94
+ snapped: true
95
+ };
96
+ } catch {
97
+ return fallback();
98
+ }
99
+ }
100
+ return { geocode, reverseGeocode, directions };
101
+ }
@@ -0,0 +1,6 @@
1
+ export declare function useJunSearch(): {
2
+ open: import("vue").Ref<boolean, boolean>;
3
+ openSearch: () => void;
4
+ closeSearch: () => void;
5
+ toggleSearch: () => void;
6
+ };
@@ -0,0 +1,16 @@
1
+ import { ref } from "vue";
2
+ const open = ref(false);
3
+ export function useJunSearch() {
4
+ return {
5
+ open,
6
+ openSearch: () => {
7
+ open.value = true;
8
+ },
9
+ closeSearch: () => {
10
+ open.value = false;
11
+ },
12
+ toggleSearch: () => {
13
+ open.value = !open.value;
14
+ }
15
+ };
16
+ }
@@ -0,0 +1 @@
1
+ export declare function useJunSelfId(): import("vue").ComputedRef<string>;
@@ -0,0 +1,28 @@
1
+ import { computed } from "vue";
2
+ import { useAbracadabra } from "#imports";
3
+ let memoToken = null;
4
+ let memoSub = "";
5
+ function subOf(token) {
6
+ if (token === memoToken) return memoSub;
7
+ memoToken = token;
8
+ memoSub = "";
9
+ const payload = token.split(".")[1];
10
+ if (payload) {
11
+ try {
12
+ const claims = JSON.parse(
13
+ atob(payload.replace(/-/g, "+").replace(/_/g, "/"))
14
+ );
15
+ if (typeof claims.sub === "string") memoSub = claims.sub;
16
+ } catch {
17
+ }
18
+ }
19
+ return memoSub;
20
+ }
21
+ export function useJunSelfId() {
22
+ const abra = useAbracadabra();
23
+ return computed(() => {
24
+ const token = abra.client.value?.token;
25
+ const sub = typeof token === "string" ? subOf(token) : "";
26
+ return sub || abra.publicKeyB64.value || "";
27
+ });
28
+ }
@@ -0,0 +1,229 @@
1
+ /**
2
+ * useJunSiteConfig — the site's configuration, itself a document.
3
+ *
4
+ * > **The `Jun` prefix is load-bearing.** `nuxt-site-config` (pulled in by
5
+ * > `nuxt-og-image`, among others) auto-imports its own `useSiteConfig`, which
6
+ * > shadows an unprefixed composable of that name and crashes SSR with "Cannot
7
+ * > read properties of undefined". Do not rename this to `useSiteConfig`.
8
+ *
9
+ * The config lives in a hidden document that MUST be a true child of the space
10
+ * root (`parentId === spaceDocId`) — the website IS a space, and every
11
+ * document, config included, hangs off the space document. It is flagged
12
+ * `meta.siteConfig: true` + `meta.hidden: true`, with page type `jun-config`.
13
+ *
14
+ * The config VALUES are the document's meta (a CRDT map, so live for every
15
+ * client) and the document's page renderer is the settings UI. Everything is a
16
+ * document, settings included.
17
+ *
18
+ * Readers — navbar, SEO head, theme — consume `config` reactively with graceful
19
+ * defaults when the document does not exist yet. `ensure()` find-or-creates it
20
+ * and REFUSES to create until the space document id is known, so a config
21
+ * document can never be born unparented. Historic strays are repaired by
22
+ * `useJunSiteConfigHeal()`.
23
+ *
24
+ * Note that `meta.hidden` is NOT what protects this document — hidden pages
25
+ * stay searchable on purpose. Owner-only is a separate predicate,
26
+ * `isJunOwnerOnlyDoc()`, enforced in search, the sitemap, the resolve endpoint
27
+ * and the renderer itself.
28
+ */
29
+ import { type ComputedRef } from 'vue';
30
+ import type { TreeEntry } from '@abraca/nuxt';
31
+ import type { JunBackdropKind, JunBackgroundFit, JunCampfirePillMode, JunCampfirePlacement, JunCampfireRosterStyle, JunCampfireSize, JunCampfireTab, JunNavActiveStyle, JunNavItemMode, JunNavLogoAction, JunNavPlacement, JunNavShape, JunNavSize } from '../types.js';
32
+ export type { JunBackdropKind, JunBackgroundFit, JunCampfirePillMode, JunCampfirePlacement, JunCampfireRosterStyle, JunCampfireSize, JunCampfireTab, JunNavActiveStyle, JunNavItemMode, JunNavLogoAction, JunNavPlacement, JunNavShape, JunNavSize, } from '../types.js';
33
+ export type JunThemeRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
34
+ export type JunThemeAccent = 'mono' | 'sun' | 'blue' | 'emerald' | 'violet' | 'amber' | 'rose' | 'teal';
35
+ export type JunThemeNeutral = 'slate' | 'zinc' | 'stone';
36
+ export type JunThemeBlobs = 'off' | 'quiet' | 'normal' | 'bold';
37
+ export type JunThemeFont = 'default' | 'serif' | 'grotesk' | 'mono';
38
+ /**
39
+ * How much glass the site wears. `backdrop-filter` is the most expensive thing
40
+ * on the page and this site has a lot of them, so this is a performance
41
+ * control as much as a visual one — see the block at the end of `jun.css`.
42
+ */
43
+ export type JunThemeSurface = 'glass' | 'soft' | 'solid';
44
+ export interface JunSiteConfig {
45
+ /** SEO */
46
+ seoTitle?: string;
47
+ seoTitleTemplate?: string;
48
+ seoDescription?: string;
49
+ seoOgImage?: string;
50
+ /** Navigation — every key falls back to the build-time `jun.navigation` default. */
51
+ navItemMode?: JunNavItemMode;
52
+ navActiveStyle?: JunNavActiveStyle;
53
+ navPlacement?: JunNavPlacement;
54
+ navShape?: JunNavShape;
55
+ navSize?: JunNavSize;
56
+ navAutoHide?: boolean;
57
+ navBlur?: boolean;
58
+ navHomeItem?: boolean;
59
+ navShowLogo?: boolean;
60
+ /** What the logo does when pressed — go home, or open the command palette. */
61
+ navLogoAction?: JunNavLogoAction;
62
+ /** The search button in the right cluster. ⌘K works either way. */
63
+ navSearchButton?: boolean;
64
+ navCenterActive?: boolean;
65
+ navShowIndices?: boolean;
66
+ navKeyboardNav?: boolean;
67
+ /** "Changed since your last visit" markers on nav items. */
68
+ navFreshnessDots?: boolean;
69
+ /** The fellow-travellers dot stack, and whether hovering it names them. */
70
+ navTravellers?: boolean;
71
+ navTravellersList?: boolean;
72
+ /** Which built-in mark `<JunLogo>` draws, and whether it carries the name. */
73
+ brandLogo?: 'sprout' | 'node' | 'page' | 'sun';
74
+ brandLogoVariant?: 'mark' | 'lockup' | 'wordmark';
75
+ /** Theme — Nuxt UI variables, applied live and SSR-inlined so there is no flash. */
76
+ themeRadius?: JunThemeRadius;
77
+ themeAccent?: JunThemeAccent;
78
+ themeNeutral?: JunThemeNeutral;
79
+ themeBlobs?: JunThemeBlobs;
80
+ /**
81
+ * The ambient backdrop, switched live. Any CSS kind the build offers —
82
+ * `shader` is build-time only and is never stored here.
83
+ */
84
+ themeBackdrop?: JunBackdropKind;
85
+ /** Body font preset — static classes in jun.css, faces self-hosted. */
86
+ themeFont?: JunThemeFont;
87
+ /**
88
+ * Frosting. `glass` (default) is the house look; `soft` keeps it on the
89
+ * floating chrome only; `solid` removes every `backdrop-filter` on the page
90
+ * and makes the panels opaque. Worth reaching for on a site with a
91
+ * background image, or on modest hardware.
92
+ */
93
+ themeSurface?: JunThemeSurface;
94
+ /** Custom accent hexes. Either one overrides `themeAccent` for its scheme. */
95
+ themeAccentCustomLight?: string;
96
+ themeAccentCustomDark?: string;
97
+ /**
98
+ * A background IMAGE, painted underneath the backdrop rather than instead of
99
+ * it — see `useJunBackground`. Either an upload reference
100
+ * (`<docId>/<uploadId>`) or a literal URL.
101
+ */
102
+ themeBackgroundImage?: string;
103
+ themeBackgroundFit?: JunBackgroundFit;
104
+ /** 0.05–1. How strongly the image reads through the theme base. */
105
+ themeBackgroundOpacity?: number;
106
+ /** Soften the image so page text stays readable over it. */
107
+ themeBackgroundBlur?: boolean;
108
+ /** Announcement ribbon — live for every visitor the moment it is typed. */
109
+ announceEnabled?: boolean;
110
+ announceText?: string;
111
+ announceHref?: string;
112
+ /**
113
+ * The campfire — the site's user center. Every key falls back to the
114
+ * build-time `jun.campfire` default, and `campfireEnabled` additionally
115
+ * falls back to `features.campfire`: the build decides whether the hearth
116
+ * exists, this decides whether it is lit.
117
+ */
118
+ campfireEnabled?: boolean;
119
+ /**
120
+ * The soft blob that follows another visitor's cursor onto whatever they are
121
+ * pointing at (`<APresenceBlobs>`). Falls back to `features.awareBlobs`: the
122
+ * build decides whether the layer exists, this decides whether it shows —
123
+ * the same relationship `campfireEnabled` has with `features.campfire`.
124
+ *
125
+ * It is a setting rather than a build flag because it is a matter of taste
126
+ * that changes with the site's content: over a photograph it is ambience,
127
+ * over a dense page it is one more thing moving.
128
+ */
129
+ presenceBlobs?: boolean;
130
+ /** What the place is called, and the mark on its hearth (`i-lucide-*`). */
131
+ campfireTitle?: string;
132
+ campfireIcon?: string;
133
+ campfireChat?: boolean;
134
+ campfireRoster?: boolean;
135
+ campfireIdentity?: boolean;
136
+ campfireReactions?: boolean;
137
+ campfireFollow?: boolean;
138
+ campfireShowPages?: boolean;
139
+ campfireShowBots?: boolean;
140
+ campfireAllowRename?: boolean;
141
+ /** The reaction palette as ONE string — emoji separated by anything. */
142
+ campfireReactionSet?: string;
143
+ campfireHistoryLimit?: number;
144
+ campfirePlacement?: JunCampfirePlacement;
145
+ campfireSize?: JunCampfireSize;
146
+ campfirePillMode?: JunCampfirePillMode;
147
+ campfireRosterStyle?: JunCampfireRosterStyle;
148
+ campfireOpenTab?: JunCampfireTab;
149
+ campfireBlur?: boolean;
150
+ campfireEmber?: boolean;
151
+ /** Replaces "N others warming here". `{n}` interpolates the count. */
152
+ campfireLabel?: string;
153
+ /** Footer */
154
+ footerText?: string;
155
+ footerShowUpdated?: boolean;
156
+ /** Visitor interaction and feeds. All default ON; only an explicit `false` disables. */
157
+ guestbookEnabled?: boolean;
158
+ reactionsEnabled?: boolean;
159
+ feedsEnabled?: boolean;
160
+ /** Structured-data author, for JSON-LD and the feeds. */
161
+ authorName?: string;
162
+ /** Custom copy on the themed 404 page. */
163
+ notFoundText?: string;
164
+ [k: string]: unknown;
165
+ }
166
+ export declare function useJunSiteConfig(): {
167
+ docId: ComputedRef<string | null>;
168
+ candidates: ComputedRef<TreeEntry[]>;
169
+ config: ComputedRef<JunSiteConfig>;
170
+ ensure: () => string | null;
171
+ set: (patch: Partial<JunSiteConfig>) => void;
172
+ };
173
+ /**
174
+ * The config as any READER should see it — SSR snapshot merged with the live
175
+ * document.
176
+ *
177
+ * > **`useJunSiteConfig().config` alone is not enough, and that cost a session.**
178
+ * > It reads the LIVE tree, and the config document is a hidden top-level page
179
+ * > that the client's tree does not necessarily carry: on the settings page it
180
+ * > is loaded (the renderer opens it), so every knob appeared to work — and on
181
+ * > every OTHER page it resolved to `{}`, so the navbar silently fell back to
182
+ * > its build-time defaults for every visitor. The server has no such problem
183
+ * > (its runner syncs the whole tree), so the SSR HTML was correct and the
184
+ * > hydrated client quietly disagreed with it.
185
+ *
186
+ * The merge is a **SPREAD, SSR first**, and the comment that used to be here
187
+ * argued the opposite — that a spread "would resurrect every key the owner has
188
+ * deleted from a stale snapshot", so the live document had to win wholesale
189
+ * once it was non-empty. That rests on an assumption about how a default is
190
+ * stored, and the assumption is wrong.
191
+ *
192
+ * Clearing a setting does NOT remove its key. `set()` writes `undefined`
193
+ * through `updateMeta`, so the live meta keeps `themeSurface: undefined`
194
+ * forever after; it is JSON serialisation on the way to the SSR snapshot that
195
+ * drops it (measured: 15 live keys, 9 in the snapshot). A spread therefore
196
+ * preserves deletions exactly — `live` overwrites the snapshot's value with
197
+ * `undefined`, and `pick()` falls back to the build default, which is the
198
+ * intended behaviour.
199
+ *
200
+ * What live-wins-wholesale could not survive is a PARTIALLY SYNCED live entry.
201
+ * The tree hands the config document's meta over as it arrives, so there is a
202
+ * window where it holds some settings and not others — and during it, every
203
+ * key not yet received was erased from a snapshot that had them all. Chrome
204
+ * then disagreed with correct SSR HTML: the server rendered
205
+ * `navItemMode: icon-stack` and the client hydrated `text`, and since Vue does
206
+ * not rectify CLASS mismatches the icons stayed stacked in the DOM while every
207
+ * binding said otherwise — until a navigation re-rendered the list and it
208
+ * "fixed itself". Anything wrong on load and right after you click something
209
+ * is this shape.
210
+ *
211
+ * With a spread the snapshot backs every key the live document has not sent
212
+ * yet, and no setting can go missing for the length of a sync.
213
+ *
214
+ * Use this in chrome that reads settings. `useJunSiteConfig()` stays the WRITE
215
+ * path and the settings page's own read.
216
+ */
217
+ export declare function useJunEffectiveConfig(): ComputedRef<JunSiteConfig>;
218
+ /**
219
+ * Repairs the two historic failure modes, live, on the owner's next visit:
220
+ *
221
+ * - a config document created before the space id was known (so its
222
+ * `parentId` is null, or points anywhere else) is reparented under the
223
+ * space root and re-registered server-side;
224
+ * - duplicate config documents are merged into the canonical one — whose
225
+ * values win — and then trashed.
226
+ *
227
+ * Mount once, in the layout.
228
+ */
229
+ export declare function useJunSiteConfigHeal(): void;
@@ -0,0 +1,95 @@
1
+ import { computed, watch } from "vue";
2
+ import { useNuxtData } from "#app";
3
+ import { useAbracadabra, useChildTree, useDocTree } from "#imports";
4
+ import { useJunStudio } from "./useJunStudio.js";
5
+ export function useJunSiteConfig() {
6
+ const abra = useAbracadabra();
7
+ const { entries, getEntry } = useDocTree();
8
+ const tree = useChildTree(abra.doc, "jun-site-config");
9
+ const candidates = computed(
10
+ () => entries.value.filter(
11
+ (e) => e.meta?.siteConfig === true && !e.trashed
12
+ )
13
+ );
14
+ const docId = computed(() => {
15
+ const all = candidates.value;
16
+ if (all.length === 0) return null;
17
+ const space = abra.spaceDocId.value;
18
+ const parented = space ? all.filter((e) => e.parentId === space) : [];
19
+ const pool = parented.length ? parented : all;
20
+ return [...pool].sort((a, b) => (a.createdAt ?? 0) - (b.createdAt ?? 0) || (a.id < b.id ? -1 : 1))[0].id;
21
+ });
22
+ const config = computed(
23
+ () => (docId.value ? getEntry(docId.value)?.meta : void 0) ?? {}
24
+ );
25
+ function ensure() {
26
+ if (docId.value) return docId.value;
27
+ const parent = abra.spaceDocId.value;
28
+ if (!parent) return null;
29
+ const id = crypto.randomUUID();
30
+ const now = Date.now();
31
+ tree.treeMap.set(id, {
32
+ label: "Site Config",
33
+ parentId: parent,
34
+ order: now,
35
+ type: "jun-config",
36
+ createdAt: now,
37
+ updatedAt: now,
38
+ meta: { siteConfig: true, hidden: true }
39
+ });
40
+ tree.registerDoc(id, parent, { label: "Site Config", type: "jun-config" });
41
+ return id;
42
+ }
43
+ function set(patch) {
44
+ const id = ensure();
45
+ if (id) tree.updateMeta(id, patch);
46
+ }
47
+ return { docId, candidates, config, ensure, set };
48
+ }
49
+ export function useJunEffectiveConfig() {
50
+ const { config } = useJunSiteConfig();
51
+ const { data: ssr } = useNuxtData("jun-site-config");
52
+ return computed(() => ({
53
+ ...ssr.value ?? {},
54
+ ...config.value
55
+ }));
56
+ }
57
+ let healArmed = false;
58
+ export function useJunSiteConfigHeal() {
59
+ if (import.meta.server || healArmed) return;
60
+ healArmed = true;
61
+ const abra = useAbracadabra();
62
+ const { canEdit } = useJunStudio();
63
+ const site = useJunSiteConfig();
64
+ const tree = useChildTree(abra.doc, "jun-site-config-heal");
65
+ watch(
66
+ [() => site.candidates.value.length, () => abra.spaceDocId.value, canEdit],
67
+ () => {
68
+ const space = abra.spaceDocId.value;
69
+ if (!space || !canEdit.value) return;
70
+ if (site.candidates.value.length === 0) return;
71
+ const canonicalId = site.docId.value;
72
+ if (!canonicalId) return;
73
+ const raw = tree.treeMap.get(canonicalId);
74
+ if (raw && raw.parentId !== space) {
75
+ tree.treeMap.set(canonicalId, { ...raw, parentId: space, updatedAt: Date.now() });
76
+ tree.registerDoc(canonicalId, space, {
77
+ label: raw.label || "Site Config",
78
+ type: raw.type || "jun-config"
79
+ });
80
+ }
81
+ for (const dupe of site.candidates.value) {
82
+ if (dupe.id === canonicalId) continue;
83
+ const extraMeta = dupe.meta ?? {};
84
+ const canonicalMeta = tree.treeMap.get(canonicalId)?.meta ?? {};
85
+ const merged = {};
86
+ for (const [k, v] of Object.entries(extraMeta)) {
87
+ if (!(k in canonicalMeta) && k !== "siteConfig") merged[k] = v;
88
+ }
89
+ if (Object.keys(merged).length) tree.updateMeta(canonicalId, merged);
90
+ tree.deleteEntry(dupe.id);
91
+ }
92
+ },
93
+ { immediate: true }
94
+ );
95
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Reading the site's configuration — the SSR half.
3
+ *
4
+ * The Site Config is a DOCUMENT: a hidden top-level `jun-config` doc whose meta
5
+ * IS the configuration and whose page is the settings UI. Everything is a
6
+ * document, settings included.
7
+ *
8
+ * Two sources have to be reconciled:
9
+ * - the Nitro doc cache, over `<apiBase>/site-config`, which is all SSR has
10
+ * (the live CRDT tree is empty server-side);
11
+ * - the live CRDT meta, once the provider syncs.
12
+ *
13
+ * **The merge is not a spread.** `{ ...ssr, ...live }` looks right and is
14
+ * wrong: config defaults are stored as `undefined` (picking the default CLEARS
15
+ * the key), so a spread resurrects every key the owner has deleted, using the
16
+ * stale SSR snapshot. The rule is LIVE-AUTHORITATIVE-ONCE-NON-EMPTY — the
17
+ * moment the live config has any content at all, it replaces the snapshot
18
+ * wholesale.
19
+ *
20
+ * Phase 2 adds the write side (`useJunSiteConfig`: `ensure()`, `set()`, the
21
+ * duplicate-healing watcher). This composable stays the read path.
22
+ */
23
+ import { type ComputedRef, type Ref } from 'vue';
24
+ export type JunConfigMap = Record<string, unknown>;
25
+ /** Trim a config value to a usable string, or `undefined`. */
26
+ export declare function junConfigStr(v: unknown): string | undefined;
27
+ /** A boolean config value that defaults to ON — only an explicit `false` disables. */
28
+ export declare function junConfigOn(v: unknown): boolean;
29
+ /**
30
+ * The effective site config: the SSR snapshot until the live document has
31
+ * anything in it, then the live document.
32
+ */
33
+ export declare function useJunSiteConfigValues(live?: Ref<JunConfigMap> | ComputedRef<JunConfigMap>): Promise<ComputedRef<JunConfigMap>>;
@@ -0,0 +1,21 @@
1
+ import { computed } from "vue";
2
+ import { useFetch } from "#app";
3
+ import { useJunOptions } from "./useJunOptions.js";
4
+ export function junConfigStr(v) {
5
+ return typeof v === "string" && v.trim() ? v : void 0;
6
+ }
7
+ export function junConfigOn(v) {
8
+ return v !== false;
9
+ }
10
+ export async function useJunSiteConfigValues(live) {
11
+ const { apiBase } = useJunOptions();
12
+ const { data: ssr } = await useFetch(`${apiBase}/site-config`, {
13
+ key: "jun-site-config",
14
+ default: () => ({})
15
+ });
16
+ return computed(() => {
17
+ const liveValue = live?.value;
18
+ if (liveValue && Object.keys(liveValue).length > 0) return liveValue;
19
+ return ssr.value ?? {};
20
+ });
21
+ }
@@ -0,0 +1,54 @@
1
+ /**
2
+ * The site's shared entrance motion, on top of @vueuse/motion.
3
+ *
4
+ * Timing lives here so every list across the site moves to the same beat.
5
+ *
6
+ * <article
7
+ * v-for="(item, i) in items"
8
+ * :key="item.id"
9
+ * v-motion="junStagger(i)"
10
+ * >…</article>
11
+ */
12
+ export interface JunStaggerOptions {
13
+ /** Per-index delay. */
14
+ delayMs?: number;
15
+ durationMs?: number;
16
+ /** Distance travelled on the way up. */
17
+ yPx?: number;
18
+ /** Offset applied before the per-index delay. */
19
+ baseDelayMs?: number;
20
+ }
21
+ /** Fade up with a stagger — the standard list entrance. */
22
+ export declare function junStagger(index: number, options?: JunStaggerOptions): {
23
+ initial: {
24
+ opacity: number;
25
+ y: number;
26
+ };
27
+ enter: {
28
+ opacity: number;
29
+ y: number;
30
+ transition: {
31
+ duration: number;
32
+ delay: number;
33
+ };
34
+ };
35
+ };
36
+ /**
37
+ * Headline entrance — fades in over 1s with NO vertical movement. Used by
38
+ * `<JunPageHero>` on the title block, where a lift fights the page transition.
39
+ */
40
+ export declare function junHeroEnter(options?: {
41
+ delayMs?: number;
42
+ durationMs?: number;
43
+ }): {
44
+ initial: {
45
+ opacity: number;
46
+ };
47
+ enter: {
48
+ opacity: number;
49
+ transition: {
50
+ duration: number;
51
+ delay: number;
52
+ };
53
+ };
54
+ };
@@ -0,0 +1,23 @@
1
+ export function junStagger(index, options) {
2
+ const delay = options?.delayMs ?? 100;
3
+ const duration = options?.durationMs ?? 600;
4
+ const y = options?.yPx ?? 20;
5
+ const base = options?.baseDelayMs ?? 0;
6
+ return {
7
+ initial: { opacity: 0, y },
8
+ enter: {
9
+ opacity: 1,
10
+ y: 0,
11
+ transition: { duration, delay: base + index * delay }
12
+ }
13
+ };
14
+ }
15
+ export function junHeroEnter(options) {
16
+ return {
17
+ initial: { opacity: 0 },
18
+ enter: {
19
+ opacity: 1,
20
+ transition: { duration: options?.durationMs ?? 1e3, delay: options?.delayMs ?? 0 }
21
+ }
22
+ };
23
+ }
@@ -0,0 +1,11 @@
1
+ export declare function useJunStudio(): {
2
+ loginOpen: import("vue").Ref<boolean, boolean>;
3
+ editMode: import("vue").Ref<boolean, boolean>;
4
+ editing: import("vue").ComputedRef<boolean>;
5
+ canEdit: import("vue").ComputedRef<boolean>;
6
+ effectiveRole: import("vue").Ref<string | null, string | null>;
7
+ openLogin: () => void;
8
+ closeLogin: () => void;
9
+ setEditMode: (on: boolean) => void;
10
+ toggleEdit: () => void;
11
+ };