@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,1149 @@
1
+ <script setup>
2
+ import { computed, nextTick, onMounted, onUnmounted, ref, useSlots, watch } from "vue";
3
+ import { NuxtLink } from "#components";
4
+ import { onKeyStroke, useEventListener, useMediaQuery, useScroll } from "@vueuse/core";
5
+ import {
6
+ useAbracadabra,
7
+ useChildTree,
8
+ useDocDragBus,
9
+ useDocSlugs,
10
+ useDocTree,
11
+ useRoute,
12
+ useRouter,
13
+ useSlugRoute
14
+ } from "#imports";
15
+ import { useJunOptions, useJunDocIcon, useJunLayoutPolicy, useJunPageType } from "../composables/useJunOptions";
16
+ import { useJunDocMenu } from "../composables/useJunDocMenu";
17
+ import { useJunIntro } from "../composables/useJunIntro";
18
+ import { useJunNavSettings } from "../composables/useJunNavSettings";
19
+ import { useJunSearch } from "../composables/useJunSearch";
20
+ import { useJunStudio } from "../composables/useJunStudio";
21
+ import { useJunRename } from "../composables/useJunRename";
22
+ import { useJunTravellers } from "../composables/useJunPresence";
23
+ const props = defineProps({
24
+ navigation: { type: Array, required: true }
25
+ });
26
+ const router = useRouter();
27
+ const route = useRoute();
28
+ const { features, typeIds } = useJunOptions();
29
+ const { isImmersiveType, isPanelType } = useJunLayoutPolicy();
30
+ const { resolveType } = useJunPageType();
31
+ const docIcon = useJunDocIcon();
32
+ const { navVeiled: introNavVeiled, navLogoVeiled: introLogoVeiled } = useJunIntro();
33
+ const { openSearch } = useJunSearch();
34
+ const nav = useJunNavSettings();
35
+ const iconFor = (item) => item.icon ?? docIcon(item.type);
36
+ function redirectTargetFor(item) {
37
+ if (!typeIds.redirect || resolveType(item.type) !== typeIds.redirect || !item.id) return null;
38
+ const u = getEntry(item.id)?.meta?.url;
39
+ return typeof u === "string" && u.trim() ? u.trim() : null;
40
+ }
41
+ const isExternalTarget = (u) => !!u && /^https?:\/\//i.test(u);
42
+ const activeLabelClass = computed(() => {
43
+ switch (nav.activeStyle.value) {
44
+ case "pill":
45
+ case "dot":
46
+ case "glow":
47
+ case "box":
48
+ case "bracket":
49
+ return "text-black dark:text-white";
50
+ case "bold":
51
+ return "font-semibold text-black dark:text-white";
52
+ default:
53
+ return "underline decoration-black dark:decoration-white underline-offset-4 decoration-2";
54
+ }
55
+ });
56
+ const activePillBg = computed(() => {
57
+ switch (nav.activeStyle.value) {
58
+ case "pill":
59
+ return "bg-black/10 dark:bg-white/15";
60
+ // A soft halo rather than a fill — reads as lit rather than selected.
61
+ case "glow":
62
+ return "bg-black/5 dark:bg-white/10 shadow-[0_0_20px_-4px_rgba(0,0,0,0.5)] dark:shadow-[0_0_20px_-4px_rgba(255,255,255,0.55)]";
63
+ case "box":
64
+ return "ring-1 ring-black/35 dark:ring-white/35";
65
+ default:
66
+ return "";
67
+ }
68
+ });
69
+ const activeMarker = computed(() => {
70
+ if (nav.activeStyle.value === "dot") return "dot";
71
+ if (nav.activeStyle.value === "underline" && (nav.itemMode.value === "icon" || nav.itemMode.value === "icon-focus")) return "bar";
72
+ return null;
73
+ });
74
+ const showBrackets = computed(() => nav.activeStyle.value === "bracket");
75
+ const itemSizeClass = computed(() => {
76
+ const tight = nav.itemMode.value === "icon-stack" || vertical.value;
77
+ switch (nav.size.value) {
78
+ case "sm":
79
+ return tight ? "py-1.5 text-xs" : "py-2.5 text-xs";
80
+ case "lg":
81
+ return tight ? "py-2.5 text-base" : "py-4 text-base";
82
+ default:
83
+ return tight ? "py-2 text-sm" : "py-3.5 text-sm";
84
+ }
85
+ });
86
+ const panelHeightClass = computed(() => {
87
+ if (nav.itemMode.value === "icon-stack") return "";
88
+ switch (nav.size.value) {
89
+ case "sm":
90
+ return "sm:h-10";
91
+ case "lg":
92
+ return "sm:h-14";
93
+ default:
94
+ return "sm:h-12";
95
+ }
96
+ });
97
+ const trackGapClass = computed(() => {
98
+ switch (nav.size.value) {
99
+ case "sm":
100
+ return vertical.value ? "space-y-0.5" : "space-x-4";
101
+ case "lg":
102
+ return vertical.value ? "space-y-2" : "space-x-8";
103
+ default:
104
+ return vertical.value ? "space-y-1" : "space-x-6";
105
+ }
106
+ });
107
+ const { editing, openLogin } = useJunStudio();
108
+ const abra = useAbracadabra();
109
+ const navTree = useChildTree(abra.doc, "jun-nav-reorder");
110
+ const { renameDoc } = useJunRename();
111
+ const dragBus = useDocDragBus();
112
+ const { itemsFor } = useJunDocMenu();
113
+ const { travellers } = useJunTravellers();
114
+ const slots = useSlots();
115
+ const logoOpensPalette = computed(() => features.search && nav.logoAction.value === "palette");
116
+ const hasActions = computed(
117
+ () => editing.value || !!slots.actions || features.search && nav.searchButton.value || features.travellersChip && features.presence && nav.travellers.value
118
+ );
119
+ const { entries: treeEntries, getEntry } = useDocTree();
120
+ const navLabelFor = (item) => {
121
+ if (!item.id) return item.name;
122
+ const nl = getEntry(item.id)?.meta?.navLabel;
123
+ return typeof nl === "string" && nl.trim() ? nl.trim() : item.name;
124
+ };
125
+ const SEEN_KEY = "jun_seen_v1";
126
+ const seenMap = ref({});
127
+ function persistSeen() {
128
+ try {
129
+ localStorage.setItem(SEEN_KEY, JSON.stringify(seenMap.value));
130
+ } catch {
131
+ }
132
+ }
133
+ onMounted(() => {
134
+ try {
135
+ seenMap.value = JSON.parse(localStorage.getItem(SEEN_KEY) || "null") ?? {};
136
+ } catch {
137
+ seenMap.value = {};
138
+ }
139
+ });
140
+ const subtreeMaxById = computed(() => {
141
+ const childrenByParent = /* @__PURE__ */ new Map();
142
+ for (const e of treeEntries.value) {
143
+ const arr = childrenByParent.get(e.parentId ?? null) ?? [];
144
+ arr.push({ id: e.id, updatedAt: e.updatedAt });
145
+ childrenByParent.set(e.parentId ?? null, arr);
146
+ }
147
+ const m = /* @__PURE__ */ new Map();
148
+ for (const item of orderedNav.value) {
149
+ if (!item.id) continue;
150
+ let max = getEntry(item.id)?.updatedAt ?? 0;
151
+ const queue = [...childrenByParent.get(item.id) ?? []];
152
+ while (queue.length) {
153
+ const cur = queue.pop();
154
+ if ((cur.updatedAt ?? 0) > max) max = cur.updatedAt ?? 0;
155
+ for (const c of childrenByParent.get(cur.id) ?? []) queue.push(c);
156
+ }
157
+ m.set(item.id, max);
158
+ }
159
+ return m;
160
+ });
161
+ function freshFor(item) {
162
+ if (!nav.freshnessDots.value || !item.id || item.current) return false;
163
+ const seen = seenMap.value[item.id];
164
+ if (!seen) return false;
165
+ return (subtreeMaxById.value.get(item.id) ?? 0) > seen + 2e3;
166
+ }
167
+ function topAncestorOf(docId2) {
168
+ let cursor = docId2;
169
+ for (let depth = 0; cursor && depth < 32; depth++) {
170
+ const entry = getEntry(cursor);
171
+ if (!entry) return null;
172
+ const parent = entry.parentId ?? null;
173
+ if (!parent || parent === abra.spaceDocId.value) return cursor;
174
+ cursor = parent;
175
+ }
176
+ return null;
177
+ }
178
+ const presenceByNavId = computed(() => {
179
+ const map = /* @__PURE__ */ new Map();
180
+ for (const t of travellers.value) {
181
+ if (!t.docId) continue;
182
+ const top = topAncestorOf(t.docId);
183
+ if (!top) continue;
184
+ const list = map.get(top) ?? [];
185
+ list.push(t);
186
+ map.set(top, list);
187
+ }
188
+ return map;
189
+ });
190
+ const presenceFor = (id) => id ? presenceByNavId.value.get(id) ?? [] : [];
191
+ const DOC_DRAG_MIME = "application/x-abracadabra-doc";
192
+ const isDocDragEvent = (e) => !!e.dataTransfer?.types.includes(DOC_DRAG_MIME);
193
+ const navScrollContainer = ref(null);
194
+ const dragId = ref(null);
195
+ const dragging = computed(() => dragId.value !== null);
196
+ const externalHover = ref(false);
197
+ let dragStartOrder = [];
198
+ let orderPersisted = false;
199
+ const orderedNav = ref([...props.navigation]);
200
+ watch(
201
+ () => props.navigation,
202
+ (n) => {
203
+ if (!dragId.value) orderedNav.value = [...n];
204
+ },
205
+ { deep: true }
206
+ );
207
+ let blankDragImage = null;
208
+ onMounted(() => {
209
+ blankDragImage = new Image(1, 1);
210
+ blankDragImage.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
211
+ });
212
+ function onPillDragStart(item, e) {
213
+ if (!editing.value || !item.id) {
214
+ e.preventDefault();
215
+ return;
216
+ }
217
+ dragId.value = item.id;
218
+ dragStartOrder = [...orderedNav.value];
219
+ orderPersisted = false;
220
+ if (e.dataTransfer) {
221
+ e.dataTransfer.effectAllowed = "all";
222
+ e.dataTransfer.setData("text/plain", item.id);
223
+ e.dataTransfer.setData(DOC_DRAG_MIME, JSON.stringify({ id: item.id, label: item.name }));
224
+ if (blankDragImage) e.dataTransfer.setDragImage(blankDragImage, 0, 0);
225
+ }
226
+ dragBus.startDrag({
227
+ docIds: [item.id],
228
+ labels: [item.name],
229
+ icons: [iconFor(item)],
230
+ // Tree-sourced drags get the shared ghost.
231
+ source: "tree",
232
+ pointer: { x: e.clientX, y: e.clientY }
233
+ });
234
+ }
235
+ const axisPointer = (e) => vertical.value ? e.clientY : e.clientX;
236
+ const axisMid = (r) => vertical.value ? r.top + r.height / 2 : r.left + r.width / 2;
237
+ const axisStart = (r) => vertical.value ? r.top : r.left;
238
+ function reorderAt(pos) {
239
+ const container = navScrollContainer.value;
240
+ if (!container || !dragId.value) return;
241
+ const dragIdx = orderedNav.value.findIndex((n) => n.id === dragId.value);
242
+ if (dragIdx < 0) return;
243
+ for (const el of Array.from(container.querySelectorAll("[data-nav-id]"))) {
244
+ const id = el.dataset.navId;
245
+ if (!id || id === dragId.value) continue;
246
+ const idx = orderedNav.value.findIndex((n) => n.id === id);
247
+ const mid = axisMid(el.getBoundingClientRect());
248
+ if (idx > dragIdx && pos > mid || idx < dragIdx && pos < mid) {
249
+ const [moving] = orderedNav.value.splice(dragIdx, 1);
250
+ orderedNav.value.splice(idx, 0, moving);
251
+ break;
252
+ }
253
+ }
254
+ }
255
+ function indexForPos(pos) {
256
+ const container = navScrollContainer.value;
257
+ if (!container) return orderedNav.value.length;
258
+ const els = Array.from(container.querySelectorAll("[data-nav-id]"));
259
+ for (let i = 0; i < els.length; i++) {
260
+ const r = els[i].getBoundingClientRect();
261
+ if (pos < axisStart(r) + (vertical.value ? r.height : r.width) / 2) return i;
262
+ }
263
+ return els.length;
264
+ }
265
+ function topLevelParentId() {
266
+ return abra.spaceDocId.value ?? null;
267
+ }
268
+ function persistOrder() {
269
+ orderedNav.value.forEach((item, i) => {
270
+ if (!item.id) return;
271
+ const entry = navTree.treeMap.get(item.id);
272
+ if (entry) navTree.treeMap.set(item.id, { ...entry, order: (i + 1) * 1e3, updatedAt: Date.now() });
273
+ });
274
+ orderPersisted = true;
275
+ }
276
+ function onTrackDragOver(e) {
277
+ if (!editing.value) return;
278
+ const own = dragId.value !== null;
279
+ if (!own && !isDocDragEvent(e)) return;
280
+ e.preventDefault();
281
+ if (e.dataTransfer) e.dataTransfer.dropEffect = "move";
282
+ dragBus.updatePointer(e.clientX, e.clientY);
283
+ if (own) reorderAt(axisPointer(e));
284
+ else externalHover.value = true;
285
+ }
286
+ function onTrackDragLeave(e) {
287
+ const related = e.relatedTarget;
288
+ if (related && e.currentTarget.contains(related)) return;
289
+ externalHover.value = false;
290
+ if (dragId.value) orderedNav.value = [...dragStartOrder];
291
+ }
292
+ function onTrackDrop(e) {
293
+ if (!editing.value) return;
294
+ e.preventDefault();
295
+ externalHover.value = false;
296
+ if (dragId.value) {
297
+ persistOrder();
298
+ return;
299
+ }
300
+ const raw = e.dataTransfer?.getData(DOC_DRAG_MIME);
301
+ if (!raw) return;
302
+ let payload = null;
303
+ try {
304
+ payload = JSON.parse(raw);
305
+ } catch {
306
+ payload = null;
307
+ }
308
+ if (!payload?.id) return;
309
+ const entry = navTree.treeMap.get(payload.id);
310
+ if (!entry) return;
311
+ const idx = indexForPos(axisPointer(e));
312
+ const orderOf = (item) => item?.id ? navTree.treeMap.get(item.id)?.order ?? 0 : null;
313
+ const before = orderOf(orderedNav.value[idx - 1]);
314
+ const after = orderOf(orderedNav.value[idx]);
315
+ const order = before != null && after != null ? (before + after) / 2 : before != null ? before + 1e3 : after != null ? after - 1e3 : Date.now();
316
+ navTree.treeMap.set(payload.id, {
317
+ ...entry,
318
+ parentId: topLevelParentId(),
319
+ order,
320
+ updatedAt: Date.now()
321
+ });
322
+ }
323
+ function onPillDragEnd(e) {
324
+ if (dragId.value && !orderPersisted) {
325
+ if (e.dataTransfer?.dropEffect === "none") orderedNav.value = [...dragStartOrder];
326
+ }
327
+ dragId.value = null;
328
+ dragBus.endDrag();
329
+ }
330
+ const { getDocUrl } = useDocSlugs();
331
+ function createTopLevel() {
332
+ const id = crypto.randomUUID();
333
+ const now = Date.now();
334
+ const parent = topLevelParentId();
335
+ navTree.treeMap.set(id, {
336
+ label: "New Page",
337
+ parentId: parent,
338
+ order: now,
339
+ type: "doc",
340
+ createdAt: now,
341
+ updatedAt: now
342
+ });
343
+ if (parent) navTree.registerDoc(id, parent, { label: "New Page", type: "doc" });
344
+ router.push(getDocUrl(id));
345
+ }
346
+ const renamingId = ref(null);
347
+ const renameDraft = ref("");
348
+ const renameKind = ref("label");
349
+ function focusRenameInput(id) {
350
+ nextTick(() => {
351
+ navScrollContainer.value?.querySelector(`[data-rename-id="${id}"]`)?.select();
352
+ });
353
+ }
354
+ function startRename(item) {
355
+ if (!item.id) return;
356
+ renameKind.value = "label";
357
+ renameDraft.value = item.name;
358
+ renamingId.value = item.id;
359
+ focusRenameInput(item.id);
360
+ }
361
+ function startNavLabel(item) {
362
+ if (!item.id) return;
363
+ renameKind.value = "navLabel";
364
+ const current = getEntry(item.id)?.meta?.navLabel;
365
+ renameDraft.value = typeof current === "string" ? current : "";
366
+ renamingId.value = item.id;
367
+ focusRenameInput(item.id);
368
+ }
369
+ function commitRename() {
370
+ const id = renamingId.value;
371
+ if (!id) return;
372
+ const label = renameDraft.value.trim();
373
+ if (renameKind.value === "navLabel") {
374
+ navTree.updateMeta(id, { navLabel: label || void 0 });
375
+ } else if (label) {
376
+ renameDoc(id, label);
377
+ }
378
+ renamingId.value = null;
379
+ }
380
+ function cancelRename() {
381
+ renamingId.value = null;
382
+ }
383
+ const menuItemsById = computed(() => {
384
+ const siblings = orderedNav.value.map((n) => n.id).filter(Boolean);
385
+ const map = /* @__PURE__ */ new Map();
386
+ for (const item of orderedNav.value) {
387
+ if (!item.id) continue;
388
+ const entry = getEntry(item.id);
389
+ map.set(item.id, itemsFor(
390
+ {
391
+ docId: item.id,
392
+ label: item.name,
393
+ type: item.type ?? entry?.type,
394
+ meta: entry?.meta,
395
+ surface: "nav",
396
+ editing: editing.value
397
+ },
398
+ {
399
+ tree: navTree,
400
+ // The item IS the link — offering "Open" beside it is noise.
401
+ noOpen: true,
402
+ siblings,
403
+ onRename: () => startRename(item),
404
+ onNavLabel: () => startNavLabel(item)
405
+ }
406
+ ));
407
+ }
408
+ return map;
409
+ });
410
+ const contextItemsFor = (item) => (item.id ? menuItemsById.value.get(item.id) : void 0) ?? [];
411
+ let logoClicks = 0;
412
+ let logoClickTimer = null;
413
+ function onLogoClick() {
414
+ if (logoOpensPalette.value) {
415
+ openSearch();
416
+ return;
417
+ }
418
+ if (!features.studio) return;
419
+ logoClicks++;
420
+ if (logoClickTimer) clearTimeout(logoClickTimer);
421
+ logoClickTimer = setTimeout(() => {
422
+ logoClicks = 0;
423
+ }, 2e3);
424
+ if (logoClicks >= 5) {
425
+ logoClicks = 0;
426
+ openLogin();
427
+ }
428
+ }
429
+ const { docId } = useSlugRoute();
430
+ const navDocType = computed(() => {
431
+ if (docId.value) return getEntry(docId.value)?.type;
432
+ if (route.path === "/" && abra.spaceDocId.value) {
433
+ return getEntry(abra.spaceDocId.value)?.type ?? "doc";
434
+ }
435
+ return null;
436
+ });
437
+ const dockedImmersive = computed(() => isImmersiveType(resolveType(navDocType.value)));
438
+ const dockedPanel = computed(() => isPanelType(resolveType(navDocType.value)));
439
+ const wideEnoughForRail = useMediaQuery("(min-width: 1024px)");
440
+ const mounted = ref(false);
441
+ onMounted(() => {
442
+ mounted.value = true;
443
+ });
444
+ const placement = computed(() => {
445
+ if (dockedPanel.value) return "top-bar";
446
+ if (nav.isRail.value && !(mounted.value && wideEnoughForRail.value)) return "top";
447
+ return nav.placement.value;
448
+ });
449
+ const vertical = computed(() => placement.value === "rail-left" || placement.value === "rail-right");
450
+ const logoInFlow = computed(() => !vertical.value && nav.logoVariant.value !== "mark");
451
+ const isBar = computed(() => placement.value === "top-bar");
452
+ const isBottom = computed(() => placement.value === "bottom");
453
+ const docked = computed(() => dockedImmersive.value || isBar.value);
454
+ const shapeClass = computed(() => {
455
+ switch (nav.shape.value) {
456
+ case "rounded":
457
+ return "rounded-2xl";
458
+ case "square":
459
+ return "rounded-none";
460
+ default:
461
+ return "rounded-lg";
462
+ }
463
+ });
464
+ const chromeClass = computed(
465
+ () => nav.shape.value === "ghost" ? "" : "border-1 border-white/10 dark:border-black/5 ring-1 ring-black/5 dark:ring-white/10"
466
+ );
467
+ const blurClass = computed(() => {
468
+ if (nav.shape.value === "ghost" || !nav.blur.value) return "";
469
+ return isAtTop.value && placement.value === "top" ? "jun-blur-gradient" : "jun-blur";
470
+ });
471
+ const shadowClass = computed(() => {
472
+ if (nav.shape.value === "ghost") return "";
473
+ if (isBar.value) return "shadow-black/10 shadow-lg";
474
+ if (placement.value === "top" && isAtTop.value) return "";
475
+ return "shadow-black/15 shadow-xl";
476
+ });
477
+ const arrivedState = ref({ top: true, bottom: false, left: true, right: true });
478
+ watch(
479
+ [() => route.path, docId, subtreeMaxById],
480
+ () => {
481
+ if (!import.meta.client) return;
482
+ const top = docId.value ? topAncestorOf(docId.value) : null;
483
+ if (!top) return;
484
+ seenMap.value = { ...seenMap.value, [top]: Date.now() };
485
+ persistSeen();
486
+ },
487
+ { immediate: true }
488
+ );
489
+ const isAtTop = computed(
490
+ () => placement.value === "top" && !docked.value && (arrivedState.value?.top ?? true)
491
+ );
492
+ const panelEl = ref(null);
493
+ function publishNavGeometry() {
494
+ if (!import.meta.client) return;
495
+ const root = document.documentElement;
496
+ root.dataset.junNav = placement.value;
497
+ if (vertical.value && panelEl.value) {
498
+ const r = panelEl.value.getBoundingClientRect();
499
+ root.style.setProperty("--jun-nav-rail-w", `${Math.round(r.width) + 12}px`);
500
+ } else {
501
+ root.style.removeProperty("--jun-nav-rail-w");
502
+ }
503
+ }
504
+ const hidden = ref(false);
505
+ const pageScrollable = ref(false);
506
+ const mouseNearEdge = ref(false);
507
+ const canScrollStart = ref(false);
508
+ const canScrollEnd = ref(false);
509
+ const hiddenClass = computed(() => {
510
+ if (!hidden.value) return "";
511
+ if (isBottom.value) return "translate-y-24";
512
+ if (placement.value === "rail-left") return "-translate-x-24";
513
+ if (placement.value === "rail-right") return "translate-x-24";
514
+ return "-translate-y-16";
515
+ });
516
+ const FITS_TOLERANCE = 12;
517
+ function measureScrollIndicators() {
518
+ if (!navScrollContainer.value) return;
519
+ const el = navScrollContainer.value;
520
+ const [scroll, size, content] = vertical.value ? [el.scrollTop, el.clientHeight, el.scrollHeight] : [el.scrollLeft, el.clientWidth, el.scrollWidth];
521
+ const maxScroll = content - size;
522
+ const overflowing = maxScroll > FITS_TOLERANCE;
523
+ canScrollStart.value = overflowing && scroll > FITS_TOLERANCE;
524
+ canScrollEnd.value = overflowing && scroll < maxScroll - FITS_TOLERANCE;
525
+ }
526
+ let indicatorFrame = 0;
527
+ function updateScrollIndicators() {
528
+ if (!import.meta.client) return;
529
+ if (indicatorFrame) return;
530
+ indicatorFrame = requestAnimationFrame(() => {
531
+ indicatorFrame = 0;
532
+ measureScrollIndicators();
533
+ });
534
+ }
535
+ const scrollStart = () => {
536
+ noteTrackInput();
537
+ navScrollContainer.value?.scrollBy(
538
+ vertical.value ? { top: -200, behavior: "smooth" } : { left: -200, behavior: "smooth" }
539
+ );
540
+ };
541
+ const scrollEnd = () => {
542
+ noteTrackInput();
543
+ navScrollContainer.value?.scrollBy(
544
+ vertical.value ? { top: 200, behavior: "smooth" } : { left: 200, behavior: "smooth" }
545
+ );
546
+ };
547
+ const TRACK_HOLD_MS = 3e3;
548
+ const SETTLE_MS = 900;
549
+ let snapRestoreTimer = null;
550
+ let lastTrackInput = 0;
551
+ let settleUntil = 0;
552
+ function noteTrackInput() {
553
+ lastTrackInput = performance.now();
554
+ }
555
+ function centerActiveItem(opts = {}) {
556
+ const container = navScrollContainer.value;
557
+ if (!container || dragId.value || !nav.centerActive.value) return;
558
+ if (!opts.force && performance.now() - lastTrackInput < TRACK_HOLD_MS) return;
559
+ const active = orderedNav.value.find((n) => n.href === route.path);
560
+ const el = active?.id ? container.querySelector(`[data-nav-id="${active.id}"]`) : null;
561
+ if (!el) return;
562
+ container.classList.add("jun-snap-off");
563
+ if (snapRestoreTimer) clearTimeout(snapRestoreTimer);
564
+ if (vertical.value) {
565
+ const target = el.offsetTop - (container.clientHeight - el.clientHeight) / 2;
566
+ container.scrollTo({ top: Math.max(0, target), behavior: "smooth" });
567
+ } else {
568
+ const target = el.offsetLeft - (container.clientWidth - el.clientWidth) / 2;
569
+ container.scrollTo({ left: Math.max(0, target), behavior: "smooth" });
570
+ }
571
+ snapRestoreTimer = setTimeout(() => container.classList.remove("jun-snap-off"), 700);
572
+ }
573
+ watch(() => route.path, () => {
574
+ settleUntil = performance.now() + SETTLE_MS;
575
+ lastTrackInput = 0;
576
+ nextTick(() => centerActiveItem({ force: true }));
577
+ });
578
+ watch(() => props.navigation.length, () => {
579
+ if (performance.now() < settleUntil) nextTick(() => centerActiveItem());
580
+ });
581
+ watch(() => props.navigation.find((n) => n.current)?.id, () => {
582
+ if (performance.now() < settleUntil) nextTick(() => centerActiveItem());
583
+ });
584
+ watch(placement, () => nextTick(() => {
585
+ updateScrollIndicators();
586
+ centerActiveItem({ force: true });
587
+ }));
588
+ watch([placement, vertical, orderedNav], () => nextTick(publishNavGeometry), { deep: true });
589
+ onMounted(() => {
590
+ publishNavGeometry();
591
+ useEventListener(window, "resize", publishNavGeometry);
592
+ if (panelEl.value) {
593
+ const panelRo = new ResizeObserver(() => publishNavGeometry());
594
+ panelRo.observe(panelEl.value);
595
+ onUnmounted(() => panelRo.disconnect());
596
+ }
597
+ nextTick(() => centerActiveItem({ force: true }));
598
+ if (navScrollContainer.value) {
599
+ useEventListener(
600
+ navScrollContainer,
601
+ ["wheel", "touchstart", "pointerdown", "keydown"],
602
+ noteTrackInput,
603
+ { passive: true }
604
+ );
605
+ }
606
+ const scroll = useScroll(document);
607
+ watch(
608
+ () => ({ ...scroll.arrivedState }),
609
+ (s) => {
610
+ arrivedState.value = s;
611
+ },
612
+ { immediate: true, deep: true }
613
+ );
614
+ const updatePageScrollable = () => {
615
+ pageScrollable.value = document.documentElement.scrollHeight > window.innerHeight + 4;
616
+ };
617
+ updatePageScrollable();
618
+ useEventListener(window, "resize", updatePageScrollable);
619
+ const mo = new MutationObserver(updatePageScrollable);
620
+ mo.observe(document.body, { childList: true, subtree: true });
621
+ onUnmounted(() => mo.disconnect());
622
+ useEventListener(window, "mousemove", (e) => {
623
+ if (isBottom.value) mouseNearEdge.value = e.clientY > window.innerHeight - 64;
624
+ else if (placement.value === "rail-left") mouseNearEdge.value = e.clientX < 96;
625
+ else if (placement.value === "rail-right") mouseNearEdge.value = e.clientX > window.innerWidth - 96;
626
+ else mouseNearEdge.value = e.clientY < 64;
627
+ });
628
+ watch([() => ({ ...scroll.directions }), () => ({ ...scroll.arrivedState })], () => {
629
+ if (!nav.autoHide.value || docked.value || vertical.value || !pageScrollable.value) {
630
+ hidden.value = false;
631
+ return;
632
+ }
633
+ if (scroll.arrivedState.top || scroll.arrivedState.bottom || scroll.directions.top || mouseNearEdge.value) {
634
+ hidden.value = false;
635
+ } else if (scroll.directions.bottom) {
636
+ hidden.value = true;
637
+ }
638
+ });
639
+ watch(mouseNearEdge, (near) => {
640
+ if (near) hidden.value = false;
641
+ });
642
+ watch([docked, () => nav.autoHide.value, vertical], () => {
643
+ if (docked.value || !nav.autoHide.value || vertical.value) hidden.value = false;
644
+ });
645
+ onKeyStroke(["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], (e) => {
646
+ if (!nav.keyboardNav.value) return;
647
+ const target = e.target;
648
+ if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable) return;
649
+ const key = Number.parseInt(e.key);
650
+ if (key === 0) router.push("/");
651
+ else if (key <= props.navigation.length) router.push(props.navigation[key - 1].href);
652
+ });
653
+ if (navScrollContainer.value) {
654
+ measureScrollIndicators();
655
+ useEventListener(window, "resize", updateScrollIndicators);
656
+ const ro = new ResizeObserver(() => updateScrollIndicators());
657
+ ro.observe(navScrollContainer.value);
658
+ onUnmounted(() => ro.disconnect());
659
+ }
660
+ });
661
+ watch(orderedNav, () => nextTick(updateScrollIndicators), { deep: true });
662
+ onUnmounted(() => {
663
+ if (indicatorFrame) cancelAnimationFrame(indicatorFrame);
664
+ });
665
+ </script>
666
+
667
+ <template>
668
+ <nav
669
+ class="jun-nav-root fixed z-50 transition-all duration-500"
670
+ :data-jun-nav-mode="nav.itemMode.value"
671
+ :data-jun-nav-placement="placement"
672
+ :class="[
673
+ hiddenClass,
674
+ introNavVeiled ? `jun-nav-intro-hidden jun-nav-intro-${placement}` : '',
675
+ vertical ? [
676
+ 'inset-y-0 flex items-center',
677
+ placement === 'rail-left' ? 'left-0 pl-3' : 'right-0 pr-3'
678
+ ] : [
679
+ 'mx-auto w-full rounded-lg rounded-t-none',
680
+ isBottom ? 'bottom-0 pb-6 px-2 sm:px-8' : '',
681
+ !isBottom && isAtTop && !isBar ? 'pt-8' : '',
682
+ !isBottom && !isBar ? 'px-2 sm:px-8' : ''
683
+ ]
684
+ ]"
685
+ :style="vertical || isBottom ? 'pointer-events: none' : 'pointer-events: none; margin-top: -1px'"
686
+ >
687
+ <!-- The panel.
688
+ A RAIL IS A COLUMN THAT CLIPS: `flex flex-col overflow-hidden` with the
689
+ track as the only growing child. Without it the panel caps its own
690
+ height while its children keep their natural one, so the logo, the
691
+ "new page" button and the search action spill out past the rounded
692
+ panel and float loose beside it. -->
693
+ <!-- `jun-nav-panel` is a CONTRACT, not styling: it is how the command
694
+ palette finds the bar to dock itself under, on all five placements.
695
+ A structural selector (`.jun-nav-root > nav`) would have worked today
696
+ and broken the first time this gained a wrapper. -->
697
+ <nav
698
+ ref="panelEl"
699
+ class="jun-nav-panel relative transition-[max-width,border-radius,border-color,background-color,box-shadow,transform,height,padding] duration-1000"
700
+ :class="[
701
+ chromeClass,
702
+ blurClass,
703
+ shadowClass,
704
+ vertical ? ['flex max-h-[80vh] flex-col overflow-hidden', shapeClass] : isBar ? 'jun-nav-docked' : [
705
+ 'mx-auto max-w-6xl',
706
+ panelHeightClass,
707
+ shapeClass,
708
+ placement === 'top' && !isAtTop ? 'rounded-t-none' : '',
709
+ placement === 'top' && isAtTop && nav.shape.value === 'pill' ? 'rounded-t-lg' : ''
710
+ ]
711
+ ]"
712
+ style="pointer-events: auto"
713
+ >
714
+ <div
715
+ class="opacity-70 transition-all duration-500 hover:opacity-100"
716
+ :class="vertical ? 'flex min-h-0 flex-1 flex-col' : 'mx-auto'"
717
+ >
718
+ <div :class="vertical ? 'flex min-h-0 flex-1 flex-col items-center gap-1 py-2' : 'flex justify-between'">
719
+ <!-- The logo. In a rail it sits above the track rather than behind
720
+ it; in a horizontal bar a MARK is absolutely placed so the track
721
+ can use the full remaining width, and the track reserves a fixed
722
+ `ml-9` for it.
723
+
724
+ A lockup or a wordmark cannot use that: its width is the brand
725
+ NAME's width, which no fixed reserve can know, and the old fixed
726
+ one sat the name straight on top of the first nav item. Those two
727
+ variants go into normal flow instead and the track drops the
728
+ reserve — exact for any name, and the default `mark` path is
729
+ untouched. -->
730
+ <!-- A LINK when the logo goes home, a BUTTON when it opens the
731
+ palette — not a link with its default suppressed.
732
+
733
+ That was the first attempt and it does not work: `RouterLink`
734
+ binds its own click handler on the same anchor, and whether it
735
+ runs before the parent's `@click` is a registration-order detail
736
+ of vue-router, not something this file gets to decide. It ran
737
+ first, `guardEvent` saw an event nobody had prevented yet, and
738
+ the logo navigated home while the palette opened behind it. An
739
+ element that is not a link cannot navigate, whatever the
740
+ ordering. -->
741
+ <div :class="vertical ? 'flex-none' : logoInFlow ? 'flex flex-none' : 'flex'">
742
+ <component
743
+ :is="logoOpensPalette ? 'button' : NuxtLink"
744
+ v-if="nav.showLogo.value"
745
+ :to="logoOpensPalette ? void 0 : '/'"
746
+ :type="logoOpensPalette ? 'button' : void 0"
747
+ :aria-label="logoOpensPalette ? 'Search' : 'Home'"
748
+ :class="vertical ? 'flex items-center justify-center p-2.5' : logoInFlow ? 'flex flex-none items-center p-2.5 px-3' : 'absolute inset-y-0 flex flex-1 items-center p-2.5 px-3'"
749
+ @click="onLogoClick"
750
+ >
751
+ <slot name="logo">
752
+ <JunLogo
753
+ class="jun-nav-logo h-7 w-auto transition-all duration-500"
754
+ :class="introLogoVeiled ? 'opacity-0' : 'opacity-100'"
755
+ />
756
+ </slot>
757
+ </component>
758
+ </div>
759
+
760
+ <!-- The scroll region: the track, with its two arrows floating OVER
761
+ its edges — on BOTH axes.
762
+
763
+ This wrapper exists so the arrows can be absolutely positioned
764
+ against the track and nothing else. They used to sit in flow —
765
+ above and below it in a rail, and the END one inside the action
766
+ cluster in a bar — and that made them part of the track's own
767
+ box: every time one appeared or disappeared, which is every time
768
+ the track reaches or leaves an end, i.e. constantly while
769
+ scrolling, the box resized, the browser re-clamped the scroll
770
+ offset to it, and the nav jumped.
771
+
772
+ The rail was fixed first, and the note here used to claim the
773
+ horizontal bar "never had the problem". It did, and worse. The
774
+ rail's arrows cost it height, which nothing else depended on;
775
+ the bar's end arrow is 32px of WIDTH taken out of the one
776
+ element `centerActiveItem` is mid-glide inside. Measured on the
777
+ playground: the track went 1011px ⇄ 1043px and `scrollLeft`
778
+ clamped by 29px on EVERY navigation that landed near the end of
779
+ the track — a sideways lurch of the whole item row, twice per
780
+ click, in the middle of the animation.
781
+
782
+ Out of flow, the arrows can come and go freely: they reserve
783
+ nothing and the track's box never changes on either axis.
784
+
785
+ The logo reserve (`ml-9` and its overrides) lives on the WRAPPER
786
+ rather than on the track, so the wrapper's box IS the track's
787
+ box — which is what lets the arrows use a plain `left-0` /
788
+ `right-0` and land exactly on the scrolling edges. -->
789
+ <div
790
+ :class="[
791
+ vertical ? 'relative flex min-h-0 w-full flex-1 flex-col' : 'relative flex min-w-0 flex-1 ml-9',
792
+ !nav.showLogo.value && !vertical ? '!ml-3' : '',
793
+ !vertical && logoInFlow ? '!ml-0' : ''
794
+ ]"
795
+ >
796
+ <!-- Horizontal overflow: gradient-masked arrows floating over the
797
+ track's start and end edges. Vertically centred rather than
798
+ `top-0`, so they stay on the item row at every bar size.
799
+
800
+ `left-2`, not `left-0`: the wrapper's left edge is where the
801
+ logo reserve ENDS, and an absolutely-placed mark is still
802
+ sitting in it — flush against that edge the chevron lands on
803
+ the mark. Eight pixels in clears it and reproduces exactly
804
+ where this arrow sat when it was positioned against the panel.
805
+ The end arrow needs no such nudge: the wrapper's right edge is
806
+ the action cluster's left edge, with nothing between them. -->
807
+ <button
808
+ v-show="canScrollStart && !vertical"
809
+ class="absolute left-2 top-1/2 z-10 flex h-8 w-8 -translate-y-1/2 items-center justify-center bg-gradient-to-r from-white/80 to-transparent rounded-full backdrop-blur-sm transition-all hover:from-white/90 dark:from-black/80 dark:to-transparent dark:hover:from-black/90"
810
+ style="pointer-events: auto"
811
+ aria-label="Scroll left"
812
+ @click="scrollStart"
813
+ >
814
+ <UIcon
815
+ name="i-lucide-chevron-left"
816
+ class="size-5 text-black/60 dark:text-white/60"
817
+ />
818
+ </button>
819
+
820
+ <button
821
+ v-show="canScrollEnd && !vertical"
822
+ class="absolute right-0 top-1/2 z-10 flex h-8 w-8 -translate-y-1/2 items-center justify-center bg-gradient-to-l from-white/80 to-transparent rounded-full backdrop-blur-sm transition-all hover:from-white/90 dark:from-black/80 dark:to-transparent dark:hover:from-black/90"
823
+ style="pointer-events: auto"
824
+ aria-label="Scroll right"
825
+ @click="scrollEnd"
826
+ >
827
+ <UIcon
828
+ name="i-lucide-chevron-right"
829
+ class="size-5 text-black/60 dark:text-white/60"
830
+ />
831
+ </button>
832
+
833
+ <!-- Gradient-masked, so items scroll UNDER the arrow rather than
834
+ colliding with it. `from-*` matches the panel, not the page:
835
+ this floats over rail chrome, not over content. -->
836
+ <button
837
+ v-show="canScrollStart && vertical"
838
+ class="absolute inset-x-0 top-0 z-10 flex h-7 items-center justify-center bg-gradient-to-b from-white/90 via-white/70 to-transparent text-black/60 transition-colors hover:text-black dark:from-neutral-900/90 dark:via-neutral-900/70 dark:text-white/60 dark:hover:text-white"
839
+ style="pointer-events: auto"
840
+ aria-label="Scroll up"
841
+ @click="scrollStart"
842
+ >
843
+ <UIcon
844
+ name="i-lucide-chevron-up"
845
+ class="size-4"
846
+ />
847
+ </button>
848
+
849
+ <button
850
+ v-show="canScrollEnd && vertical"
851
+ class="absolute inset-x-0 bottom-0 z-10 flex h-7 items-center justify-center bg-gradient-to-t from-white/90 via-white/70 to-transparent text-black/60 transition-colors hover:text-black dark:from-neutral-900/90 dark:via-neutral-900/70 dark:text-white/60 dark:hover:text-white"
852
+ style="pointer-events: auto"
853
+ aria-label="Scroll down"
854
+ @click="scrollEnd"
855
+ >
856
+ <UIcon
857
+ name="i-lucide-chevron-down"
858
+ class="size-4"
859
+ />
860
+ </button>
861
+
862
+ <!-- The track.
863
+ `flex-1 min-w-0` lets it take the room between the logo and the
864
+ action cluster: wider than its content on desktop, so nothing
865
+ overflows and no arrows show, yet still able to shrink below its
866
+ content on narrow viewports and become genuinely scrollable.
867
+ Sizing to content instead left a few pixels of phantom overflow
868
+ that flashed the arrows.
869
+
870
+ NO `justify-center` here: centring an OVERFLOWING flex container
871
+ pushes its start edge out of the scrollable range, so the first
872
+ item is clipped off-screen and can never be reached. The inner
873
+ track uses `mx-auto` — centred when it fits, start-aligned and
874
+ fully scrollable when it does not.
875
+
876
+ In a RAIL, `min-h-0 flex-1` is what makes the track absorb the
877
+ panel's spare height and scroll, instead of the panel growing
878
+ past its cap and pushing the action cluster outside it.
879
+
880
+ Snap is PROXIMITY, never mandatory. A mandatory container must
881
+ have a snap point selected at all times, so the browser re-snaps
882
+ it on every content change — and this nav's content is a live
883
+ document tree. Scrolling back toward the first item while anyone
884
+ edited anything anywhere pulled the track back to the active
885
+ page, with no navigation involved at all. Proximity keeps the
886
+ tidy landing when you release near an item and lets go
887
+ otherwise. (The comment belongs here and not in the `:class`
888
+ below: Vue's template parser is an HTML parser first, and a
889
+ comment inside an attribute expression takes the file down.) -->
890
+ <div
891
+ ref="navScrollContainer"
892
+ class="flex items-center jun-scrollbar-hide rounded-md transition-shadow duration-200"
893
+ :class="[
894
+ vertical ? 'min-h-0 flex-1 flex-col overflow-y-auto overflow-x-hidden px-2 py-1' : 'mr-0 flex-1 min-w-0 overflow-x-auto pl-5 pr-0 overflow-y-hidden',
895
+ !vertical && logoInFlow ? '!pl-2' : '',
896
+ editing ? 'select-none touch-pan-y' : vertical ? 'snap-y snap-proximity' : 'snap-x snap-proximity',
897
+ externalHover ? 'ring-2 ring-inset ring-black/20 dark:ring-white/25' : ''
898
+ ]"
899
+ style="scrollbar-width: none; -ms-overflow-style: none;"
900
+ @scroll="updateScrollIndicators"
901
+ @dragover="onTrackDragOver"
902
+ @dragleave="onTrackDragLeave"
903
+ @drop="onTrackDrop"
904
+ >
905
+ <TransitionGroup
906
+ tag="div"
907
+ name="nav"
908
+ class="mx-auto flex items-center"
909
+ :class="[vertical ? 'flex-col' : '', trackGapClass]"
910
+ :data-jun-item-mode="nav.itemMode.value"
911
+ >
912
+ <NuxtLink
913
+ v-if="nav.homeItem.value"
914
+ key="__home__"
915
+ to="/"
916
+ :class="[
917
+ 'flex-none tracking-widest text-black text-opacity-60 transition-colors hover:text-opacity-90 dark:text-white dark:text-opacity-60 dark:hover:text-opacity-90',
918
+ itemSizeClass
919
+ ]"
920
+ >
921
+ <span class="jun-nav-pill relative inline-flex items-center rounded-md px-2 py-1 -mx-2 -my-1">
922
+ <UIcon
923
+ name="i-lucide-home"
924
+ class="size-4 flex-none"
925
+ />
926
+ </span>
927
+ </NuxtLink>
928
+
929
+ <NuxtLink
930
+ v-for="(item, i) in orderedNav"
931
+ :key="item.id || item.href"
932
+ :to="redirectTargetFor(item) ?? item.href"
933
+ :target="isExternalTarget(redirectTargetFor(item)) ? '_blank' : void 0"
934
+ :rel="isExternalTarget(redirectTargetFor(item)) ? 'noopener noreferrer' : void 0"
935
+ :data-nav-id="item.id"
936
+ :draggable="editing && !!item.id && renamingId !== item.id ? true : void 0"
937
+ :class="[
938
+ 'flex-none tracking-widest text-black text-opacity-60 transition-colors hover:text-opacity-90 dark:text-white dark:text-opacity-60 dark:hover:text-opacity-90',
939
+ itemSizeClass,
940
+ editing ? 'snap-none' : 'snap-center',
941
+ editing && item.id && renamingId !== item.id ? dragId === item.id ? 'cursor-grabbing' : 'cursor-grab' : ''
942
+ ]"
943
+ @dragstart="onPillDragStart(item, $event)"
944
+ @dragend="onPillDragEnd($event)"
945
+ >
946
+ <UContextMenu
947
+ :items="contextItemsFor(item)"
948
+ :disabled="!item.id || !contextItemsFor(item).length"
949
+ >
950
+ <!-- The inner pill carries the lift, so it never fights the
951
+ FLIP transform on the link itself. -->
952
+ <span
953
+ class="jun-nav-pill group/pill relative inline-flex items-center rounded-md px-2 py-1 -mx-2 -my-1 transition-[transform,box-shadow,background-color] duration-200 ease-out"
954
+ :class="[
955
+ nav.itemMode.value === 'icon-stack' ? 'flex-col gap-0.5' : '',
956
+ item.current ? 'scale-105' : '',
957
+ item.current ? activePillBg : '',
958
+ dragging && dragId === item.id ? 'scale-110 bg-black/10 dark:bg-white/15 shadow-lg shadow-black/25 z-10' : ''
959
+ ]"
960
+ >
961
+ <input
962
+ v-if="renamingId === item.id"
963
+ v-model="renameDraft"
964
+ :data-rename-id="item.id"
965
+ :placeholder="renameKind === 'navLabel' ? item.name : void 0"
966
+ class="w-28 bg-transparent text-sm tracking-widest outline-none border-b border-black/30 dark:border-white/30"
967
+ spellcheck="false"
968
+ @click.prevent.stop
969
+ @keydown.enter.prevent="commitRename"
970
+ @keydown.esc.prevent="cancelRename"
971
+ @blur="commitRename"
972
+ >
973
+
974
+ <template v-else-if="nav.itemMode.value === 'text'">
975
+ <span
976
+ v-if="showBrackets && item.current"
977
+ class="mr-1 opacity-50"
978
+ aria-hidden="true"
979
+ >[</span>
980
+ <span :class="item.current ? activeLabelClass : ''">{{ navLabelFor(item) }}</span>
981
+ <span
982
+ v-if="showBrackets && item.current"
983
+ class="ml-1 opacity-50"
984
+ aria-hidden="true"
985
+ >]</span>
986
+ <UIcon
987
+ v-if="isExternalTarget(redirectTargetFor(item))"
988
+ name="i-lucide-arrow-up-right"
989
+ class="ml-0.5 size-3 opacity-60"
990
+ aria-hidden="true"
991
+ />
992
+ <span
993
+ v-if="nav.showIndices.value"
994
+ style="margin-top: 1px; padding-left: 0.2rem"
995
+ class="ml-1 inline-block h-4 w-4 rounded-sm bg-neutral-400/30 dark:bg-neutral-500/30 px-0.5 text-center align-text-top text-xs opacity-75 transition hover:opacity-100"
996
+ >{{ i + 1 }}</span>
997
+ </template>
998
+
999
+ <template v-else>
1000
+ <UIcon
1001
+ :name="iconFor(item)"
1002
+ class="flex-none"
1003
+ :class="[
1004
+ nav.size.value === 'lg' ? 'size-5' : 'size-4',
1005
+ item.current && nav.activeStyle.value === 'bold' ? 'scale-110' : ''
1006
+ ]"
1007
+ />
1008
+ <span
1009
+ v-if="nav.itemMode.value === 'icon-text'"
1010
+ class="whitespace-nowrap pl-1.5"
1011
+ :class="item.current ? activeLabelClass : ''"
1012
+ >{{ navLabelFor(item) }}</span>
1013
+ <!-- icon-stack: the label sits UNDER the icon, at a size
1014
+ that keeps the item square-ish rather than wide. -->
1015
+ <span
1016
+ v-else-if="nav.itemMode.value === 'icon-stack'"
1017
+ class="whitespace-nowrap text-[10px] leading-none tracking-normal"
1018
+ :class="item.current ? activeLabelClass : ''"
1019
+ >{{ navLabelFor(item) }}</span>
1020
+ <span
1021
+ v-else-if="nav.itemMode.value === 'icon-focus'"
1022
+ class="jun-nav-label-reveal"
1023
+ :class="item.current ? 'is-current' : ''"
1024
+ >
1025
+ <span class="overflow-hidden whitespace-nowrap pl-1.5">{{ navLabelFor(item) }}</span>
1026
+ </span>
1027
+ </template>
1028
+
1029
+ <span
1030
+ v-if="item.current && renamingId !== item.id && activeMarker"
1031
+ class="absolute left-1/2 -translate-x-1/2 bg-current"
1032
+ :class="activeMarker === 'dot' ? '-bottom-1.5 size-1 rounded-full' : '-bottom-1 h-0.5 w-4 rounded-full'"
1033
+ aria-hidden="true"
1034
+ />
1035
+
1036
+ <!-- Ambient presence. Colour rides on presence ONLY. -->
1037
+ <span
1038
+ v-if="presenceFor(item.id).length"
1039
+ class="jun-nav-presence-dot absolute -top-0.5 -right-0.5 size-1.5 rounded-full"
1040
+ :style="{ background: presenceFor(item.id)[0].color }"
1041
+ :title="`${presenceFor(item.id).length} ${presenceFor(item.id).length === 1 ? 'traveller' : 'travellers'} here`"
1042
+ />
1043
+ <!-- Freshness. Hollow and monochrome, so presence stays the
1044
+ only colour in the chrome. -->
1045
+ <span
1046
+ v-else-if="freshFor(item)"
1047
+ class="absolute -top-0.5 -right-0.5 size-1.5 rounded-full ring-1 ring-inset ring-current opacity-50"
1048
+ title="Updated since your last visit"
1049
+ aria-hidden="true"
1050
+ />
1051
+ </span>
1052
+ </UContextMenu>
1053
+ </NuxtLink>
1054
+ </TransitionGroup>
1055
+ </div>
1056
+ </div>
1057
+
1058
+ <!-- The action cluster. In a rail it is the column's LAST flex item,
1059
+ inside the clipped panel, so it stays put while the track above
1060
+ it scrolls.
1061
+
1062
+ It drops out ENTIRELY when it holds nothing: its own padding is
1063
+ real space, and an empty cluster left the rail with a padded gap
1064
+ below the last item and the bar with 12px of dead margin after
1065
+ the track. -->
1066
+ <div
1067
+ v-if="hasActions"
1068
+ class="flex flex-none items-center gap-2"
1069
+ :class="vertical ? 'flex-col px-2 pt-1 pb-2' : 'pr-3'"
1070
+ >
1071
+ <!-- A hairline above the actions, so they read as a footer to the
1072
+ rail rather than as two more nav items.
1073
+
1074
+ It is conditional on there BEING actions. A separator is a
1075
+ statement about two groups, and with the search button switched
1076
+ off, no `+` (not editing) and no travellers chip, it separated
1077
+ the track from nothing — a stray line across the bottom of the
1078
+ rail with empty space under it. -->
1079
+ <div
1080
+ v-if="vertical && hasActions"
1081
+ class="my-0.5 h-px w-6 bg-black/10 dark:bg-white/10"
1082
+ aria-hidden="true"
1083
+ />
1084
+
1085
+ <!-- Pinned to the action cluster, never inside the scrollable track
1086
+ — in the track it scrolled behind the items on mobile. -->
1087
+ <button
1088
+ v-if="editing"
1089
+ type="button"
1090
+ class="flex h-7 w-7 flex-none items-center justify-center rounded-full text-black/50 dark:text-white/50 hover:text-black dark:hover:text-white bg-black/5 dark:bg-white/10 hover:bg-black/10 dark:hover:bg-white/15 ring-1 ring-black/5 dark:ring-white/10 transition-all duration-200 hover:scale-110 active:scale-95"
1091
+ style="pointer-events: auto"
1092
+ aria-label="New page"
1093
+ title="New page"
1094
+ @click="createTopLevel"
1095
+ >
1096
+ <UIcon
1097
+ name="i-lucide-plus"
1098
+ class="size-4"
1099
+ />
1100
+ </button>
1101
+
1102
+ <slot name="actions" />
1103
+
1104
+ <!-- The travellers chip is OFF by default, and both halves of it
1105
+ are switchable: a dot stack and a hover roster here read as a
1106
+ "who's online" widget, which is the opposite of slight ambient
1107
+ presence. Presence still shows where it means something: the
1108
+ item dots above, the card accents, and the aware blobs.
1109
+
1110
+ The build flag decides whether the component exists; the
1111
+ setting decides whether it is shown, so an owner can try it
1112
+ without a redeploy. -->
1113
+ <JunTravellersChip
1114
+ v-if="features.travellersChip && features.presence && nav.travellers.value"
1115
+ :list="nav.travellersList.value"
1116
+ />
1117
+
1118
+ <!-- Search is the ONE right-side action. Everything else — the
1119
+ theme toggle, the studio sign-in — lives in the ⌘K palette.
1120
+
1121
+ It is switchable (`navSearchButton`) because it stops being the
1122
+ only way in once the logo opens the palette: a site that has
1123
+ made that choice would otherwise carry two controls for one
1124
+ thing. Turning it off never removes search — ⌘K is bound
1125
+ globally by `JunSearch` regardless. -->
1126
+ <button
1127
+ v-if="features.search && nav.searchButton.value"
1128
+ type="button"
1129
+ class="flex h-8 w-8 items-center justify-center rounded-full text-black/55 dark:text-white/55 hover:text-black dark:hover:text-white transition-colors duration-200 hover:scale-110 active:scale-95"
1130
+ style="pointer-events: auto"
1131
+ aria-label="Search"
1132
+ title="Search (⌘K)"
1133
+ @click="openSearch"
1134
+ >
1135
+ <UIcon
1136
+ name="i-lucide-search"
1137
+ class="size-4"
1138
+ />
1139
+ </button>
1140
+ </div>
1141
+ </div>
1142
+ </div>
1143
+ </nav>
1144
+ </nav>
1145
+ </template>
1146
+
1147
+ <style scoped>
1148
+ .nav-move{transition:transform .32s cubic-bezier(.22,1,.36,1)}.nav-enter-active{transition:opacity .3s ease,transform .3s cubic-bezier(.22,1,.36,1)}.nav-leave-active{position:absolute;transition:opacity .2s ease,transform .2s ease}.nav-enter-from,.nav-leave-to{opacity:0;transform:translateY(-6px)}:deep(.jun-snap-off){scroll-snap-type:none!important}.jun-nav-label-reveal{display:grid;grid-template-columns:0fr;transition:grid-template-columns .3s cubic-bezier(.22,1,.36,1)}.jun-nav-label-reveal.is-current,.jun-nav-pill:focus-within .jun-nav-label-reveal,.jun-nav-pill:hover .jun-nav-label-reveal{grid-template-columns:1fr}.jun-nav-label-reveal>span{min-width:0}[data-jun-item-mode=icon-stack] .jun-nav-pill{flex-direction:column;gap:.125rem}[data-jun-item-mode]:not([data-jun-item-mode=icon-stack]) .jun-nav-pill>.iconify+*{margin-left:.25rem}.jun-nav-presence-dot{animation:jun-nav-dot-breathe 5s ease-in-out infinite}@keyframes jun-nav-dot-breathe{0%,to{opacity:.85;transform:scale(1)}50%{opacity:1;transform:scale(1.25)}}.jun-nav-intro-hidden{translate:0 -200%}.jun-nav-intro-bottom{translate:0 200%}.jun-nav-intro-rail-left{translate:-200% 0}.jun-nav-intro-rail-right{translate:200% 0}@media (prefers-reduced-motion:reduce){.jun-nav-label-reveal,.nav-enter-active,.nav-leave-active,.nav-move{transition:none}.jun-nav-presence-dot{animation:none}}
1149
+ </style>