@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,344 @@
1
+ import { computed } from "vue";
2
+ import { useRouter } from "vue-router";
3
+ import {
4
+ useAbracadabra,
5
+ useDocSlugs,
6
+ useToast,
7
+ useTrash
8
+ } from "#imports";
9
+ import { useJunOptions, useJunDocIcon, useJunPageType } from "./useJunOptions.js";
10
+ import { useJunNodePanel } from "./useJunNodePanel.js";
11
+ import { useJunStudio } from "./useJunStudio.js";
12
+ const builders = [];
13
+ export function registerJunMenuItems(builder) {
14
+ builders.push(builder);
15
+ return () => {
16
+ const i = builders.indexOf(builder);
17
+ if (i >= 0) builders.splice(i, 1);
18
+ };
19
+ }
20
+ const ICON_CHOICES = [
21
+ { label: "Document", icon: "i-lucide-file-text" },
22
+ { label: "Feather", icon: "i-lucide-feather" },
23
+ { label: "Box", icon: "i-lucide-box" },
24
+ { label: "Link", icon: "i-lucide-link" },
25
+ { label: "Compass", icon: "i-lucide-compass" },
26
+ { label: "Camera", icon: "i-lucide-camera" },
27
+ { label: "Library", icon: "i-lucide-library" },
28
+ { label: "Wrench", icon: "i-lucide-wrench" },
29
+ { label: "Radio", icon: "i-lucide-radio" },
30
+ { label: "Activity", icon: "i-lucide-activity" },
31
+ { label: "Milestone", icon: "i-lucide-milestone" },
32
+ { label: "Globe", icon: "i-lucide-globe-2" },
33
+ { label: "Heart", icon: "i-lucide-heart" },
34
+ { label: "Star", icon: "i-lucide-star" },
35
+ { label: "Flag", icon: "i-lucide-flag" },
36
+ { label: "Music", icon: "i-lucide-music" }
37
+ ];
38
+ export function useJunDocMenu() {
39
+ const router = useRouter();
40
+ const abra = useAbracadabra();
41
+ const toast = useToast();
42
+ const { getDocUrl } = useDocSlugs();
43
+ const { restoreFromTrash } = useTrash();
44
+ const opts = useJunOptions();
45
+ const { resolveType, labelForType } = useJunPageType();
46
+ const docIcon = useJunDocIcon();
47
+ const panel = useJunNodePanel();
48
+ const { editing: studioEditing } = useJunStudio();
49
+ const menuOpts = computed(() => opts.contextMenu);
50
+ function urlFor(id) {
51
+ const to = getDocUrl(id);
52
+ return typeof to === "string" && to ? to : null;
53
+ }
54
+ function absoluteUrl(path) {
55
+ if (!import.meta.client) return path;
56
+ return new URL(path, window.location.origin).toString();
57
+ }
58
+ async function copy(text, what) {
59
+ try {
60
+ await navigator.clipboard.writeText(text);
61
+ toast.add({ title: `${what} copied`, icon: "i-lucide-check", duration: 2e3 });
62
+ } catch {
63
+ toast.add({
64
+ title: "Could not copy",
65
+ description: "Your browser blocked clipboard access here.",
66
+ icon: "i-lucide-clipboard-x",
67
+ color: "error",
68
+ duration: 4e3
69
+ });
70
+ }
71
+ }
72
+ function externalUrl(meta) {
73
+ const u = meta?.url;
74
+ return typeof u === "string" && u.trim() ? u.trim() : null;
75
+ }
76
+ function openGroup(ctx, o) {
77
+ const c = menuOpts.value;
78
+ const items = [];
79
+ const path = urlFor(ctx.docId);
80
+ const ext = externalUrl(ctx.meta);
81
+ if (c.open !== false && !o.noOpen && path) {
82
+ items.push({
83
+ label: "Open",
84
+ icon: "i-lucide-arrow-right",
85
+ onSelect: () => void router.push(path)
86
+ });
87
+ }
88
+ if (c.newTab !== false && path) {
89
+ items.push({
90
+ label: "Open in new tab",
91
+ icon: "i-lucide-external-link",
92
+ onSelect: () => window.open(absoluteUrl(path), "_blank", "noopener")
93
+ });
94
+ }
95
+ if (c.slideover !== false && opts.features.slideover) {
96
+ items.push({
97
+ label: "Open in slideover",
98
+ icon: "i-lucide-panel-right",
99
+ onSelect: () => void panel.open(ctx.docId, ctx.label)
100
+ });
101
+ }
102
+ if (ext) {
103
+ items.push({
104
+ label: "Open URL",
105
+ icon: "i-lucide-arrow-up-right",
106
+ onSelect: () => window.open(ext, "_blank", "noopener")
107
+ });
108
+ }
109
+ return items;
110
+ }
111
+ function shareGroup(ctx) {
112
+ const c = menuOpts.value;
113
+ const items = [];
114
+ const path = urlFor(ctx.docId);
115
+ if (!path) return items;
116
+ const abs = () => absoluteUrl(path);
117
+ if (c.copyLink !== false) {
118
+ items.push({
119
+ label: "Copy link",
120
+ icon: "i-lucide-link-2",
121
+ onSelect: () => void copy(abs(), "Link")
122
+ });
123
+ }
124
+ if (c.copyMarkdown) {
125
+ items.push({
126
+ label: "Copy as Markdown",
127
+ icon: "i-lucide-code",
128
+ onSelect: () => void copy(`[${ctx.label}](${abs()})`, "Markdown link")
129
+ });
130
+ }
131
+ if (c.copyTitle) {
132
+ items.push({
133
+ label: "Copy title",
134
+ icon: "i-lucide-type",
135
+ onSelect: () => void copy(ctx.label, "Title")
136
+ });
137
+ }
138
+ if (c.share !== false) {
139
+ items.push({
140
+ label: "Share\u2026",
141
+ icon: "i-lucide-share-2",
142
+ onSelect: async () => {
143
+ const url = abs();
144
+ const nav = navigator;
145
+ if (typeof nav.share === "function") {
146
+ try {
147
+ await nav.share({ title: ctx.label, url });
148
+ return;
149
+ } catch {
150
+ }
151
+ }
152
+ await copy(url, "Link");
153
+ }
154
+ });
155
+ }
156
+ if (c.subscribe !== false && opts.features.feeds && opts.feedItemTypes.includes(resolveType(ctx.type) ?? "")) {
157
+ items.push({
158
+ label: "Subscribe",
159
+ icon: "i-lucide-rss",
160
+ onSelect: () => window.open(absoluteUrl("/feed.xml"), "_blank", "noopener")
161
+ });
162
+ }
163
+ return items;
164
+ }
165
+ function editGroup(ctx, o) {
166
+ const c = menuOpts.value;
167
+ const tree = o.tree;
168
+ const items = [];
169
+ if (!tree) return items;
170
+ if (o.onRename) {
171
+ items.push({ label: "Rename", icon: "i-lucide-pencil-line", onSelect: o.onRename });
172
+ }
173
+ if (o.onNavLabel) {
174
+ items.push({ label: "Nav label", icon: "i-lucide-tag", onSelect: o.onNavLabel });
175
+ }
176
+ if (c.setIcon !== false) {
177
+ const current = typeof ctx.meta?.icon === "string" ? ctx.meta.icon : void 0;
178
+ items.push({
179
+ label: "Icon",
180
+ icon: docIcon(ctx.type, current),
181
+ children: [
182
+ ...ICON_CHOICES.map((choice) => ({
183
+ label: choice.label,
184
+ icon: choice.icon,
185
+ checked: current === choice.icon,
186
+ onSelect: () => tree.updateMeta(ctx.docId, { icon: choice.icon })
187
+ })),
188
+ {
189
+ label: "Use page-type icon",
190
+ icon: "i-lucide-rotate-ccw",
191
+ onSelect: () => tree.updateMeta(ctx.docId, { icon: void 0 })
192
+ }
193
+ ]
194
+ });
195
+ }
196
+ if (c.changeType !== false) {
197
+ const currentType = resolveType(ctx.type);
198
+ const setType = (type) => {
199
+ const entry = tree.treeMap.get(ctx.docId);
200
+ if (entry) tree.treeMap.set(ctx.docId, { ...entry, type, updatedAt: Date.now() });
201
+ };
202
+ items.push({
203
+ label: "Page type",
204
+ icon: "i-lucide-shapes",
205
+ children: [
206
+ {
207
+ label: "Document",
208
+ icon: "i-lucide-file-text",
209
+ checked: currentType === "doc" || !currentType,
210
+ onSelect: () => setType("doc")
211
+ },
212
+ ...opts.pageTypes.map((type) => ({
213
+ label: labelForType(type) ?? type,
214
+ icon: opts.typeIcons[type] ?? "i-lucide-file-text",
215
+ checked: currentType === type,
216
+ onSelect: () => setType(type)
217
+ }))
218
+ ]
219
+ });
220
+ }
221
+ if (c.duplicate !== false && tree.duplicateEntry) {
222
+ items.push({
223
+ label: "Duplicate",
224
+ icon: "i-lucide-copy",
225
+ onSelect: () => {
226
+ tree.duplicateEntry(ctx.docId);
227
+ toast.add({ title: `Duplicated \u201C${ctx.label}\u201D`, icon: "i-lucide-copy", duration: 3e3 });
228
+ }
229
+ });
230
+ }
231
+ if (c.copyId) {
232
+ items.push({
233
+ label: "Copy document id",
234
+ icon: "i-lucide-hash",
235
+ onSelect: () => void copy(ctx.docId, "Document id")
236
+ });
237
+ }
238
+ return items;
239
+ }
240
+ function arrangeGroup(ctx, o) {
241
+ const c = menuOpts.value;
242
+ const tree = o.tree;
243
+ const items = [];
244
+ if (!tree) return items;
245
+ if (c.pin !== false && o.siblings?.length) {
246
+ const first = o.siblings[0];
247
+ if (first && first !== ctx.docId) {
248
+ items.push({
249
+ label: "Pin to top",
250
+ icon: "i-lucide-arrow-up-to-line",
251
+ onSelect: () => {
252
+ const entry = tree.treeMap.get(ctx.docId);
253
+ const head = tree.treeMap.get(first);
254
+ if (!entry) return;
255
+ tree.treeMap.set(ctx.docId, {
256
+ ...entry,
257
+ order: (head?.order ?? 1e3) - 1e3,
258
+ updatedAt: Date.now()
259
+ });
260
+ }
261
+ });
262
+ }
263
+ }
264
+ if (c.hide !== false) {
265
+ const hidden = ctx.meta?.hidden === true;
266
+ items.push({
267
+ label: hidden ? "Show in navigation" : "Hide from navigation",
268
+ icon: hidden ? "i-lucide-eye" : "i-lucide-eye-off",
269
+ onSelect: () => tree.updateMeta(ctx.docId, { hidden: hidden ? void 0 : true })
270
+ });
271
+ }
272
+ if (c.moveToTop !== false && tree.moveEntry) {
273
+ const space = abra.spaceDocId.value;
274
+ const entry = tree.treeMap.get(ctx.docId);
275
+ if (space && entry && entry.parentId !== space) {
276
+ items.push({
277
+ label: "Move to top level",
278
+ icon: "i-lucide-corner-left-up",
279
+ onSelect: () => tree.moveEntry(ctx.docId, space, Date.now())
280
+ });
281
+ }
282
+ }
283
+ return items;
284
+ }
285
+ function dangerGroup(ctx, o) {
286
+ const tree = o.tree;
287
+ if (!tree || menuOpts.value.trash === false) return [];
288
+ return [{
289
+ label: "Move to trash",
290
+ icon: "i-lucide-trash-2",
291
+ color: "error",
292
+ onSelect: () => {
293
+ tree.deleteEntry(ctx.docId);
294
+ o.onDeleted?.(ctx.docId);
295
+ toast.add({
296
+ title: `Moved \u201C${ctx.label}\u201D to trash`,
297
+ icon: "i-lucide-trash-2",
298
+ duration: 6e3,
299
+ actions: [{
300
+ label: "Undo",
301
+ color: "neutral",
302
+ variant: "outline",
303
+ onClick: () => restoreFromTrash(ctx.docId)
304
+ }]
305
+ });
306
+ }
307
+ }];
308
+ }
309
+ function itemsFor(ctx, o = {}) {
310
+ const c = menuOpts.value;
311
+ if (c.enabled === false) return [];
312
+ const editing = ctx.editing;
313
+ if (!editing && c.visitor === false) return [];
314
+ const groups = [];
315
+ const open = openGroup(ctx, o);
316
+ if (open.length) groups.push(open);
317
+ const share = shareGroup(ctx);
318
+ if (share.length) groups.push(share);
319
+ if (editing) {
320
+ const edit = editGroup(ctx, o);
321
+ if (edit.length) groups.push(edit);
322
+ const arrange = arrangeGroup(ctx, o);
323
+ if (arrange.length) groups.push(arrange);
324
+ }
325
+ for (const build of builders) {
326
+ const extra = build(ctx);
327
+ if (extra?.length) groups.push(...extra.filter((g) => g.length));
328
+ }
329
+ if (o.extra?.length) groups.push(...o.extra.filter((g) => g.length));
330
+ if (editing) {
331
+ const danger = dangerGroup(ctx, o);
332
+ if (danger.length) groups.push(danger);
333
+ }
334
+ return groups;
335
+ }
336
+ return {
337
+ itemsFor,
338
+ /** Read the live edit flag without every call site importing the studio. */
339
+ editing: studioEditing,
340
+ copy,
341
+ absoluteUrl,
342
+ urlFor
343
+ };
344
+ }
@@ -0,0 +1,99 @@
1
+ /**
2
+ * useJunDocPage — everything a document route needs, in one place.
3
+ *
4
+ * `/` and `/**` are the same page with two different ways of finding a
5
+ * document id. The reference site kept them as two files and they drifted:
6
+ * the home route lost breadcrumbs, the cached-entry handoff and the
7
+ * `#loading` HTML, so a cold visit to `/` showed a skeleton where a cold
8
+ * visit to `/about` showed real content.
9
+ *
10
+ * So the whole surface lives here and in `<JunDocSurface>`, and the two pages
11
+ * are thin: resolve an id, hand it over. There is no longer a place for them
12
+ * to drift apart.
13
+ *
14
+ * What this owns:
15
+ * - the effective page TYPE, which has to come from the server cache until
16
+ * the live tree syncs or the first paint picks the wrong layout bucket;
17
+ * - the layout bucket and its reading width;
18
+ * - the body scroll lock for viewport-bound types;
19
+ * - `renderKey`, which remounts `<ADocRenderer>` when editability or type
20
+ * flips (it fixes both at mount time);
21
+ * - `cachedEntry`, the server-cache stand-in that lets the REAL renderer
22
+ * paint its full chrome on first client paint instead of a bare prose blob;
23
+ * - SEO: title, description, and the page type's own JSON-LD.
24
+ */
25
+ import { type ComputedRef, type Ref } from 'vue';
26
+ import type { JunConfigMap } from './useJunSiteConfigValues.js';
27
+ import type { TreeEntry } from '@abraca/nuxt';
28
+ /** The shape `<apiBase>/resolve/**` answers with when it knows the slug. */
29
+ export interface JunResolvedDoc {
30
+ found: boolean;
31
+ /**
32
+ * Whether the server doc cache holds anything at all. A miss against an
33
+ * EMPTY cache means "not synced yet", not "no such page" — the page must not
34
+ * turn that into a 404.
35
+ */
36
+ cacheReady?: boolean;
37
+ docId?: string;
38
+ /** Set when the slug is a FORMER address — the page emits a 301 to it. */
39
+ canonical?: string | null;
40
+ title?: string | null;
41
+ type?: string;
42
+ meta?: Record<string, unknown>;
43
+ html?: string;
44
+ }
45
+ export type JunLayoutBucket = 'immersive' | 'panel' | 'flowing';
46
+ /** `useFetch` hands back `T | undefined`; a plain ref may hold `null`. Take both. */
47
+ type MaybeResolved = Ref<JunResolvedDoc | null | undefined> | ComputedRef<JunResolvedDoc | null | undefined>;
48
+ export interface UseJunDocPageOptions {
49
+ /** The server resolve payload, when the route fetched one. */
50
+ resolved?: MaybeResolved;
51
+ }
52
+ /**
53
+ * SYNCHRONOUS on purpose — do not add an `await` to this function.
54
+ *
55
+ * `useHead`, `useNuxtData` and friends resolve the Nuxt instance from an
56
+ * async-local context that is LOST across an await boundary. An earlier
57
+ * revision awaited the site-config fetch here and every page 500'd with "A
58
+ * composable that requires access to the Nuxt instance was called outside of
59
+ * a plugin…". Anything this needs must therefore already be in the payload:
60
+ * `JunHead` blocks on the site config in `app.vue`, so it is warm by the time
61
+ * any page's setup runs, and this reads it back through `useNuxtData`.
62
+ */
63
+ export declare function useJunDocPage(docId: Ref<string | null> | ComputedRef<string | null>, options?: UseJunDocPageOptions): {
64
+ entry: ComputedRef<TreeEntry | undefined>;
65
+ docType: ComputedRef<string | null>;
66
+ bucket: ComputedRef<JunLayoutBucket>;
67
+ immersive: ComputedRef<boolean>;
68
+ panel: ComputedRef<boolean>;
69
+ locked: ComputedRef<boolean>;
70
+ flowMaxW: ComputedRef<string>;
71
+ renderKey: ComputedRef<string>;
72
+ cachedEntry: ComputedRef<{
73
+ label: string;
74
+ type: string;
75
+ meta: Record<string, unknown>;
76
+ } | null>;
77
+ ownerOnly: ComputedRef<boolean>;
78
+ editing: ComputedRef<boolean>;
79
+ canEdit: ComputedRef<boolean>;
80
+ siteConfig: ComputedRef<JunConfigMap>;
81
+ description: ComputedRef<string>;
82
+ };
83
+ /** Context handed to a page type's `jsonLd` builder. */
84
+ export interface JunJsonLdContext {
85
+ title: string;
86
+ meta: Record<string, unknown>;
87
+ authorName: string;
88
+ description: string;
89
+ }
90
+ /**
91
+ * Expand a declarative JSON-LD spec into a schema.org object.
92
+ *
93
+ * The spec is DATA, not a function, because it has to survive the trip
94
+ * through `runtimeConfig` — a function would not. Each value is either a
95
+ * literal or a `{ from: 'meta.key' }` reference, and missing references drop
96
+ * their key rather than emitting `undefined`, which is invalid JSON-LD.
97
+ */
98
+ export declare function junBuildJsonLd(spec: Record<string, unknown>, ctx: JunJsonLdContext): Record<string, unknown> | null;
99
+ export {};
@@ -0,0 +1,155 @@
1
+ import { computed, onUnmounted, watchEffect } from "vue";
2
+ import { useHead, useNuxtData, useSeoMeta } from "#app";
3
+ import {
4
+ useDocTree,
5
+ useJunBrand,
6
+ useJunLayoutPolicy,
7
+ useJunOptions,
8
+ useJunPageType,
9
+ useJunStudio,
10
+ junConfigStr,
11
+ isJunOwnerOnlyDoc
12
+ } from "#imports";
13
+ export function useJunDocPage(docId, options = {}) {
14
+ const { resolved } = options;
15
+ const opts = useJunOptions();
16
+ const brand = useJunBrand();
17
+ const { getEntry } = useDocTree();
18
+ const { editing, canEdit } = useJunStudio();
19
+ const { resolveType } = useJunPageType();
20
+ const {
21
+ isImmersiveType,
22
+ isPanelType,
23
+ isLockedType,
24
+ isFeedType,
25
+ isSelfPaddedType,
26
+ editorMaxW
27
+ } = useJunLayoutPolicy();
28
+ const entry = computed(() => docId.value ? getEntry(docId.value) : void 0);
29
+ const docType = computed(() => {
30
+ if (!docId.value) return null;
31
+ return resolveType(entry.value?.type ?? resolved?.value?.type ?? "doc") ?? "doc";
32
+ });
33
+ const immersive = computed(() => isImmersiveType(docType.value));
34
+ const panel = computed(() => isPanelType(docType.value));
35
+ const locked = computed(() => isLockedType(docType.value));
36
+ const bucket = computed(
37
+ () => immersive.value ? "immersive" : panel.value ? "panel" : "flowing"
38
+ );
39
+ const flowMaxW = computed(
40
+ () => isFeedType(docType.value) || isSelfPaddedType(docType.value) ? "" : `${editorMaxW(docType.value)} px-4 sm:px-8`
41
+ );
42
+ watchEffect(() => {
43
+ if (!import.meta.client) return;
44
+ document.documentElement.classList.toggle("jun-viewport-bound", locked.value);
45
+ });
46
+ onUnmounted(() => {
47
+ if (!import.meta.client) return;
48
+ document.documentElement.classList.remove("jun-viewport-bound");
49
+ });
50
+ const renderKey = computed(
51
+ () => `${docId.value}:${docType.value}:${editing.value ? "edit" : "read"}`
52
+ );
53
+ const cachedEntry = computed(() => {
54
+ if (!docId.value || entry.value || !resolved?.value?.found) return null;
55
+ return {
56
+ label: resolved.value.title ?? "",
57
+ type: resolved.value.type ?? "doc",
58
+ meta: resolved.value.meta ?? {}
59
+ };
60
+ });
61
+ const { data: ssrConfig } = useNuxtData("jun-site-config");
62
+ const siteConfig = computed(() => ssrConfig.value ?? {});
63
+ const ownerOnly = computed(() => isJunOwnerOnlyDoc(entry.value ?? {
64
+ type: resolved?.value?.type,
65
+ meta: resolved?.value?.meta
66
+ }));
67
+ useHead({
68
+ // `undefined`, NOT the site name, when there is no document title of our
69
+ // own. `JunHead`'s titleTemplate already falls back to the site name for
70
+ // an untitled page; returning it here too would run it through the
71
+ // template and render `Jun!s — Jun!s`.
72
+ title: computed(() => {
73
+ if (!canEdit.value && ownerOnly.value) return void 0;
74
+ return entry.value?.label ?? resolved?.value?.title ?? void 0;
75
+ })
76
+ });
77
+ const description = computed(() => {
78
+ if (!(!canEdit.value && ownerOnly.value)) {
79
+ const meta = entry.value?.meta ?? resolved?.value?.meta ?? {};
80
+ const own = junConfigStr(meta.description) ?? junConfigStr(meta.excerpt);
81
+ if (own) return own;
82
+ }
83
+ return junConfigStr(siteConfig.value.seoDescription) ?? brand.value.seoDescription;
84
+ });
85
+ const jsonLd = computed(() => {
86
+ const type = docType.value;
87
+ const builder = type ? opts.jsonLd?.[type] : void 0;
88
+ if (!builder || !resolved?.value?.found || ownerOnly.value) return "";
89
+ const out = junBuildJsonLd(builder, {
90
+ title: resolved.value.title ?? "",
91
+ meta: resolved.value.meta ?? {},
92
+ authorName: junConfigStr(siteConfig.value.authorName) ?? brand.value.name,
93
+ description: description.value
94
+ });
95
+ return out ? JSON.stringify(out) : "";
96
+ });
97
+ useSeoMeta({
98
+ description: () => description.value,
99
+ ogDescription: () => description.value
100
+ });
101
+ useHead({
102
+ script: computed(
103
+ () => jsonLd.value ? [{ key: "jun-jsonld", type: "application/ld+json", textContent: jsonLd.value }] : []
104
+ )
105
+ });
106
+ return {
107
+ entry,
108
+ docType,
109
+ bucket,
110
+ immersive,
111
+ panel,
112
+ locked,
113
+ flowMaxW,
114
+ renderKey,
115
+ cachedEntry,
116
+ ownerOnly,
117
+ editing,
118
+ canEdit,
119
+ siteConfig,
120
+ description
121
+ };
122
+ }
123
+ export function junBuildJsonLd(spec, ctx) {
124
+ const resolveValue = (v) => {
125
+ if (v && typeof v === "object" && "from" in v) {
126
+ const path = String(v.from);
127
+ const [head, ...rest] = path.split(".");
128
+ const source = head === "meta" ? rest.reduce(
129
+ (acc, k) => acc && typeof acc === "object" ? acc[k] : void 0,
130
+ ctx.meta
131
+ ) : head === "title" ? ctx.title : head === "authorName" ? ctx.authorName : head === "description" ? ctx.description : void 0;
132
+ const format = v.format;
133
+ if (format === "iso-date" && (typeof source === "string" || typeof source === "number")) {
134
+ if (source === "") return void 0;
135
+ const d = new Date(source);
136
+ return Number.isNaN(d.getTime()) ? void 0 : d.toISOString();
137
+ }
138
+ return source;
139
+ }
140
+ if (Array.isArray(v)) return v.map(resolveValue);
141
+ if (v && typeof v === "object") return expand(v);
142
+ return v;
143
+ };
144
+ const expand = (obj) => {
145
+ const out = {};
146
+ for (const [k, v] of Object.entries(obj)) {
147
+ const resolved = resolveValue(v);
148
+ if (resolved === void 0 || resolved === null || resolved === "") continue;
149
+ out[k] = resolved;
150
+ }
151
+ return out;
152
+ };
153
+ const built = expand(spec);
154
+ return Object.keys(built).length ? { "@context": "https://schema.org", ...built } : null;
155
+ }
@@ -0,0 +1,11 @@
1
+ export declare function useJunFollow(): {
2
+ toggle: (clientId: number) => void;
3
+ unfollow: () => void;
4
+ followingClientId: import("vue").ComputedRef<number | null>;
5
+ followingUser: import("vue").ComputedRef<{
6
+ name?: string | undefined;
7
+ color?: string | undefined;
8
+ publicKey?: string | undefined;
9
+ } | null>;
10
+ isFollowing: import("vue").ComputedRef<boolean>;
11
+ };
@@ -0,0 +1,38 @@
1
+ import { computed, watch, watchEffect } from "vue";
2
+ import {
3
+ useAAFollowPeer,
4
+ useAbracadabra,
5
+ useAwareness,
6
+ useRoute,
7
+ useRouter
8
+ } from "#imports";
9
+ export function useJunFollow() {
10
+ const { setField, states } = useAwareness();
11
+ const { isReady } = useAbracadabra();
12
+ const route = useRoute();
13
+ const router = useRouter();
14
+ const { follow, unfollow, followingClientId, followingUser, isFollowing } = useAAFollowPeer();
15
+ if (import.meta.client) {
16
+ watchEffect(() => {
17
+ if (!isReady.value) return;
18
+ setField("route", route.fullPath);
19
+ });
20
+ const leaderRoute = computed(() => {
21
+ if (followingClientId.value == null) return void 0;
22
+ return states.value.get(followingClientId.value)?.route;
23
+ });
24
+ watch(leaderRoute, (p) => {
25
+ if (p && p !== route.fullPath) router.push(p);
26
+ });
27
+ }
28
+ function toggle(clientId) {
29
+ if (followingClientId.value === clientId) {
30
+ unfollow();
31
+ return;
32
+ }
33
+ follow(clientId);
34
+ const st = states.value.get(clientId);
35
+ if (st?.route && st.route !== route.fullPath) router.push(st.route);
36
+ }
37
+ return { toggle, unfollow, followingClientId, followingUser, isFollowing };
38
+ }