@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,413 @@
1
+ <script setup>
2
+ import { computed, ref } from "vue";
3
+ import {
4
+ JUN_APP_STATUSES,
5
+ junMotion,
6
+ useAbracadabra,
7
+ useChildTree,
8
+ useDocTree,
9
+ useJunImagePopup,
10
+ useJunRename,
11
+ useJunStudio,
12
+ useJunUpload
13
+ } from "#imports";
14
+ const props = defineProps({
15
+ docId: { type: String, required: true },
16
+ docLabel: { type: String, required: false },
17
+ docMeta: { type: Object, required: false },
18
+ childProvider: { type: null, required: false },
19
+ editable: { type: Boolean, required: false }
20
+ });
21
+ const abra = useAbracadabra();
22
+ const tree = useChildTree(abra.doc, props.docId);
23
+ const { getEntry } = useDocTree();
24
+ const { editing } = useJunStudio();
25
+ const { renameDoc } = useJunRename();
26
+ const { uploadTo, imageFiles } = useJunUpload();
27
+ const { openImagePopup } = useJunImagePopup();
28
+ const entry = computed(() => getEntry(props.docId));
29
+ const meta = computed(() => entry.value?.meta ?? props.docMeta ?? {});
30
+ const metaRecord = computed(() => meta.value);
31
+ const title = computed(() => entry.value?.label ?? props.docLabel ?? "Project");
32
+ const statusOptions = [...JUN_APP_STATUSES];
33
+ function patchMeta(p) {
34
+ tree.updateMeta(props.docId, p);
35
+ }
36
+ const titleEl = ref(null);
37
+ function commitTitle() {
38
+ const t = titleEl.value?.textContent?.trim();
39
+ if (t && t !== title.value) renameDoc(props.docId, t);
40
+ else if (titleEl.value) titleEl.value.textContent = title.value;
41
+ }
42
+ function onTitleKeydown(e) {
43
+ if (e.key === "Enter") {
44
+ e.preventDefault();
45
+ e.target.blur();
46
+ } else if (e.key === "Escape") {
47
+ if (titleEl.value) titleEl.value.textContent = title.value;
48
+ e.target.blur();
49
+ }
50
+ }
51
+ const visitUrl = computed(() => {
52
+ const u = meta.value.url?.trim();
53
+ if (!u) return null;
54
+ return /^https?:\/\//i.test(u) ? u : `https://${u}`;
55
+ });
56
+ const visitHost = computed(() => {
57
+ if (!visitUrl.value) return "";
58
+ try {
59
+ return new URL(visitUrl.value).hostname.replace(/^www\./, "");
60
+ } catch {
61
+ return meta.value.url ?? "";
62
+ }
63
+ });
64
+ const location = computed(() => {
65
+ const m = metaRecord.value;
66
+ if (typeof m.geoLat === "number" && typeof m.geoLng === "number") {
67
+ return { lat: m.geoLat, lng: m.geoLng };
68
+ }
69
+ const l = meta.value.location;
70
+ return l && typeof l.lat === "number" && typeof l.lng === "number" ? l : null;
71
+ });
72
+ const fmtCoord = (n, pos, neg) => `${Math.abs(n).toFixed(2)}\xB0${n >= 0 ? pos : neg}`;
73
+ const iconInput = ref(null);
74
+ const iconDropActive = ref(false);
75
+ async function setIcon(file) {
76
+ const res = await uploadTo(props.docId, file);
77
+ if (res) {
78
+ patchMeta({ iconUploadId: res.id, iconMimeType: res.mimeType, iconUrl: void 0 });
79
+ }
80
+ }
81
+ function onIconPicked(e) {
82
+ const input = e.target;
83
+ const file = input.files?.[0];
84
+ if (file?.type.startsWith("image/")) void setIcon(file);
85
+ input.value = "";
86
+ }
87
+ function onIconDragOver(e) {
88
+ if (!editing.value || !e.dataTransfer?.types.includes("Files")) return;
89
+ e.preventDefault();
90
+ e.dataTransfer.dropEffect = "copy";
91
+ iconDropActive.value = true;
92
+ }
93
+ function onIconDrop(e) {
94
+ if (!editing.value) return;
95
+ e.preventDefault();
96
+ iconDropActive.value = false;
97
+ const img = imageFiles(e.dataTransfer)[0];
98
+ if (img) void setIcon(img);
99
+ }
100
+ const shotsInput = ref(null);
101
+ const shotsDropActive = ref(false);
102
+ const gallery = computed(
103
+ () => (meta.value.galleryUploads ?? []).filter((u) => !!u?.id && !!u?.mime)
104
+ );
105
+ async function addShots(files) {
106
+ const added = [];
107
+ for (const file of files) {
108
+ if (!file.type.startsWith("image/") && !file.type.startsWith("video/")) continue;
109
+ const res = await uploadTo(props.docId, file);
110
+ if (res) added.push({ id: res.id, mime: res.mimeType, name: res.filename });
111
+ }
112
+ if (added.length) patchMeta({ galleryUploads: [...gallery.value, ...added] });
113
+ }
114
+ function onShotsPicked(e) {
115
+ const input = e.target;
116
+ if (input.files) void addShots(Array.from(input.files));
117
+ input.value = "";
118
+ }
119
+ function onShotsDragOver(e) {
120
+ if (!editing.value || !e.dataTransfer?.types.includes("Files")) return;
121
+ e.preventDefault();
122
+ e.dataTransfer.dropEffect = "copy";
123
+ shotsDropActive.value = true;
124
+ }
125
+ function onShotsDrop(e) {
126
+ if (!editing.value) return;
127
+ e.preventDefault();
128
+ shotsDropActive.value = false;
129
+ if (e.dataTransfer?.files.length) void addShots(Array.from(e.dataTransfer.files));
130
+ }
131
+ function removeShot(index) {
132
+ const next = [...gallery.value];
133
+ next.splice(index, 1);
134
+ patchMeta({ galleryUploads: next });
135
+ }
136
+ function openShot(index, e) {
137
+ openImagePopup(
138
+ e,
139
+ gallery.value.map((shot, i) => ({
140
+ docId: props.docId,
141
+ uploadId: shot.id,
142
+ mime: shot.mime,
143
+ alt: `${title.value} \u2014 screenshot ${i + 1}`
144
+ })),
145
+ index
146
+ );
147
+ }
148
+ </script>
149
+
150
+ <template>
151
+ <div class="mx-auto w-full max-w-3xl px-4 pt-8 pb-20 sm:px-6">
152
+ <header
153
+ v-motion="junMotion({
154
+ initial: { opacity: 0, y: 16 },
155
+ enter: { opacity: 1, y: 0, transition: { duration: 500 } }
156
+ })"
157
+ class="flex flex-col gap-5 sm:flex-row sm:items-start sm:gap-7"
158
+ >
159
+ <div
160
+ class="group/icon relative shrink-0"
161
+ :class="[
162
+ editing ? 'cursor-pointer' : '',
163
+ iconDropActive ? 'rounded-2xl ring-2 ring-black/40 dark:ring-white/50' : ''
164
+ ]"
165
+ @dragover="onIconDragOver"
166
+ @dragleave="iconDropActive = false"
167
+ @drop="onIconDrop"
168
+ @click="editing && iconInput?.click()"
169
+ >
170
+ <div
171
+ v-if="meta.iconUploadId"
172
+ class="size-20 overflow-hidden rounded-2xl shadow-lg shadow-black/20 ring-1 ring-black/5 sm:size-24 dark:ring-white/10"
173
+ >
174
+ <JunMedia
175
+ :doc-id="docId"
176
+ :upload-id="meta.iconUploadId"
177
+ :mime-type="meta.iconMimeType || 'image/png'"
178
+ :alt="title"
179
+ :size="256"
180
+ media-class="h-full w-full object-cover"
181
+ />
182
+ </div>
183
+ <NuxtImg
184
+ v-else-if="meta.iconUrl"
185
+ :src="meta.iconUrl"
186
+ :alt="title"
187
+ class="size-20 rounded-2xl object-contain shadow-lg shadow-black/20 ring-1 ring-black/5 sm:size-24 dark:ring-white/10"
188
+ />
189
+ <div
190
+ v-else
191
+ class="flex size-20 items-center justify-center rounded-2xl bg-linear-to-br from-zinc-100 to-zinc-300 shadow-lg shadow-black/20 ring-1 ring-zinc-200 sm:size-24 dark:from-zinc-700 dark:to-zinc-900 dark:ring-white/10"
192
+ >
193
+ <UIcon
194
+ :name="meta.icon || 'i-lucide-box'"
195
+ class="size-9 text-zinc-400 dark:text-zinc-500"
196
+ />
197
+ </div>
198
+
199
+ <div
200
+ v-if="editing"
201
+ class="absolute inset-0 flex items-center justify-center rounded-2xl bg-black/45 text-white opacity-0 transition-opacity group-hover/icon:opacity-100"
202
+ >
203
+ <UIcon
204
+ name="i-lucide-image-up"
205
+ class="size-6"
206
+ />
207
+ </div>
208
+
209
+ <!-- `@click.stop`: the input's own click bubbles back to the clickable
210
+ wrapper, which would call click() again WITHOUT user activation —
211
+ and Chrome then silently suppresses the file picker. -->
212
+ <input
213
+ ref="iconInput"
214
+ type="file"
215
+ accept="image/*"
216
+ class="hidden"
217
+ @click.stop
218
+ @change="onIconPicked"
219
+ >
220
+ </div>
221
+
222
+ <div class="min-w-0 flex-1">
223
+ <h1
224
+ ref="titleEl"
225
+ :contenteditable="editing ? 'plaintext-only' : void 0"
226
+ spellcheck="false"
227
+ class="text-3xl leading-tight font-semibold tracking-tight text-highlighted outline-none sm:text-4xl"
228
+ :class="editing ? 'cursor-text rounded-md px-1 -mx-1 transition-shadow hover:ring-1 hover:ring-black/15 focus:ring-1 focus:ring-black/25 dark:hover:ring-white/20 dark:focus:ring-white/30' : ''"
229
+ @blur="editing && commitTitle()"
230
+ @keydown="editing && onTitleKeydown($event)"
231
+ >
232
+ {{ title }}
233
+ </h1>
234
+
235
+ <div
236
+ v-if="editing"
237
+ class="mt-2 flex flex-wrap items-center gap-2"
238
+ >
239
+ <AMetaChip
240
+ field-type="select"
241
+ label="Status"
242
+ icon="i-lucide-activity"
243
+ :options="statusOptions"
244
+ :meta="metaRecord"
245
+ meta-key="status"
246
+ @patch="patchMeta"
247
+ />
248
+ <AMetaChip
249
+ field-type="url"
250
+ label="Project URL"
251
+ :meta="metaRecord"
252
+ meta-key="url"
253
+ @patch="patchMeta"
254
+ />
255
+ <AMetaChip
256
+ field-type="location"
257
+ label="Location"
258
+ :meta="metaRecord"
259
+ lat-key="geoLat"
260
+ lng-key="geoLng"
261
+ @patch="patchMeta"
262
+ />
263
+ <AMetaChip
264
+ field-type="text"
265
+ label="Description"
266
+ icon="i-lucide-text"
267
+ :meta="metaRecord"
268
+ meta-key="description"
269
+ @patch="patchMeta"
270
+ />
271
+ </div>
272
+ <div
273
+ v-else-if="meta.status || location"
274
+ class="mt-2 flex flex-wrap items-center gap-2"
275
+ >
276
+ <UBadge
277
+ v-if="meta.status"
278
+ :label="String(meta.status)"
279
+ color="neutral"
280
+ variant="subtle"
281
+ size="sm"
282
+ />
283
+ <UBadge
284
+ v-if="location"
285
+ color="neutral"
286
+ variant="subtle"
287
+ size="sm"
288
+ class="gap-1"
289
+ >
290
+ <UIcon
291
+ name="i-lucide-map-pin"
292
+ class="size-3"
293
+ />
294
+ {{ fmtCoord(location.lat, "N", "S") }}, {{ fmtCoord(location.lng, "E", "W") }}
295
+ </UBadge>
296
+ </div>
297
+
298
+ <p
299
+ v-if="meta.description"
300
+ class="mt-3 text-base leading-relaxed text-muted sm:text-lg"
301
+ >
302
+ {{ meta.description }}
303
+ </p>
304
+
305
+ <div
306
+ v-if="visitUrl"
307
+ class="mt-4"
308
+ >
309
+ <UButton
310
+ :to="visitUrl"
311
+ target="_blank"
312
+ rel="noopener"
313
+ color="neutral"
314
+ variant="solid"
315
+ size="sm"
316
+ trailing-icon="i-lucide-arrow-up-right"
317
+ >
318
+ Visit {{ visitHost }}
319
+ </UButton>
320
+ </div>
321
+
322
+ <ClientOnly>
323
+ <div class="mt-4 -ml-2.5">
324
+ <JunAppreciate :doc-id="docId" />
325
+ </div>
326
+ </ClientOnly>
327
+ </div>
328
+ </header>
329
+
330
+ <section
331
+ v-if="gallery.length || editing"
332
+ class="mt-8"
333
+ :class="shotsDropActive ? 'rounded-xl ring-2 ring-black/40 dark:ring-white/50' : ''"
334
+ @dragover="onShotsDragOver"
335
+ @dragleave="shotsDropActive = false"
336
+ @drop="onShotsDrop"
337
+ >
338
+ <div
339
+ v-if="gallery.length"
340
+ class="grid grid-cols-2 gap-2 sm:grid-cols-3"
341
+ >
342
+ <div
343
+ v-for="(shot, i) in gallery"
344
+ :key="shot.id"
345
+ class="group/shot relative aspect-video cursor-zoom-in overflow-hidden rounded-lg ring-1 ring-black/10 dark:ring-white/10"
346
+ @click="openShot(i, $event)"
347
+ >
348
+ <JunMedia
349
+ :doc-id="docId"
350
+ :upload-id="shot.id"
351
+ :mime-type="shot.mime"
352
+ :alt="`${title} \u2014 screenshot ${i + 1}`"
353
+ :size="800"
354
+ media-class="h-full w-full object-cover transition-transform duration-300 group-hover/shot:scale-105"
355
+ />
356
+ <button
357
+ v-if="editing"
358
+ type="button"
359
+ class="absolute top-1.5 right-1.5 flex h-6 w-6 items-center justify-center rounded-full bg-black/60 text-white opacity-0 transition-opacity group-hover/shot:opacity-100 hover:bg-black/80"
360
+ aria-label="Remove screenshot"
361
+ @click.stop="removeShot(i)"
362
+ >
363
+ <UIcon
364
+ name="i-lucide-x"
365
+ class="size-3.5"
366
+ />
367
+ </button>
368
+ </div>
369
+ </div>
370
+
371
+ <button
372
+ v-if="editing"
373
+ type="button"
374
+ class="mt-2 flex h-16 w-full items-center justify-center gap-2 rounded-lg border border-dashed border-default text-xs text-dimmed transition-colors hover:bg-black/5 hover:text-default dark:hover:bg-white/5"
375
+ @click="shotsInput?.click()"
376
+ >
377
+ <UIcon
378
+ name="i-lucide-image-plus"
379
+ class="size-4"
380
+ />
381
+ Add screenshots — click or drop images
382
+ </button>
383
+ <input
384
+ ref="shotsInput"
385
+ type="file"
386
+ accept="image/*,video/*"
387
+ multiple
388
+ class="hidden"
389
+ @change="onShotsPicked"
390
+ >
391
+ </section>
392
+
393
+ <hr class="my-8 border-default">
394
+
395
+ <div class="jun-project-body">
396
+ <AEditor
397
+ :doc-id="docId"
398
+ :doc-label="title"
399
+ :doc-meta="meta"
400
+ :editable="editing"
401
+ :show-toolbar="editing"
402
+ :show-suggestion-menu="editing"
403
+ :show-drag-handle="editing"
404
+ :show-breadcrumb="false"
405
+ placeholder="No write-up yet."
406
+ />
407
+ </div>
408
+ </div>
409
+ </template>
410
+
411
+ <style scoped>
412
+ .jun-project-body :deep(.document-header){display:none}.jun-project-body :deep([data-meta-key=description]),.jun-project-body :deep([data-meta-key=geoLat]),.jun-project-body :deep([data-meta-key=status]),.jun-project-body :deep([data-meta-key=url]){display:none}.jun-project-body :deep(.ProseMirror),.jun-project-body :deep(.aeditor-canvas){padding:0}
413
+ </style>
@@ -0,0 +1,10 @@
1
+ type __VLS_Props = {
2
+ docId: string;
3
+ docLabel?: string;
4
+ docMeta?: Record<string, unknown>;
5
+ childProvider?: unknown;
6
+ editable?: boolean;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,10 @@
1
+ type __VLS_Props = {
2
+ docId: string;
3
+ docLabel?: string;
4
+ docMeta?: Record<string, unknown>;
5
+ childProvider?: unknown;
6
+ editable?: boolean;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,133 @@
1
+ <script setup>
2
+ import { computed, onMounted, watch } from "vue";
3
+ import { useRouter } from "vue-router";
4
+ import { useAbracadabra, useChildTree, useDocTree, useJunStudio } from "#imports";
5
+ const props = defineProps({
6
+ docId: { type: String, required: true },
7
+ docLabel: { type: String, required: false },
8
+ docMeta: { type: Object, required: false },
9
+ childProvider: { type: null, required: false },
10
+ editable: { type: Boolean, required: false }
11
+ });
12
+ const abra = useAbracadabra();
13
+ const tree = useChildTree(abra.doc, props.docId);
14
+ const { getEntry } = useDocTree();
15
+ const { editing } = useJunStudio();
16
+ const router = useRouter();
17
+ const entry = computed(() => getEntry(props.docId));
18
+ const meta = computed(
19
+ () => entry.value?.meta ?? props.docMeta ?? {}
20
+ );
21
+ const title = computed(() => entry.value?.label ?? props.docLabel ?? "Redirect");
22
+ const url = computed(() => {
23
+ const u = meta.value.url;
24
+ return typeof u === "string" && u.trim() ? u.trim() : null;
25
+ });
26
+ const isExternal = computed(() => !!url.value && /^https?:\/\//i.test(url.value));
27
+ const permanent = computed(() => !!meta.value.redirectPermanent);
28
+ function patch(p) {
29
+ tree.updateMeta(props.docId, p);
30
+ }
31
+ function bounce() {
32
+ if (!url.value || editing.value) return;
33
+ if (isExternal.value) window.location.replace(url.value);
34
+ else void router.replace(url.value);
35
+ }
36
+ onMounted(bounce);
37
+ watch([url, editing], () => bounce());
38
+ function visitTarget() {
39
+ if (!url.value) return;
40
+ if (isExternal.value) window.open(url.value, "_blank", "noopener");
41
+ else void router.push(url.value);
42
+ }
43
+ </script>
44
+
45
+ <template>
46
+ <div class="mx-auto w-full max-w-xl px-4 pt-16 pb-20 sm:px-6">
47
+ <!-- Owner: the settings card. This IS the page for them. -->
48
+ <div
49
+ v-if="editing"
50
+ class="jun-card rounded-xl p-6"
51
+ >
52
+ <div class="mb-4 flex items-center gap-3">
53
+ <span
54
+ class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-black/5 text-black/60 ring-1 ring-black/5 dark:bg-white/10 dark:text-white/70 dark:ring-white/10"
55
+ >
56
+ <UIcon
57
+ name="i-lucide-corner-up-right"
58
+ class="size-4.5"
59
+ />
60
+ </span>
61
+ <div class="min-w-0">
62
+ <h1 class="truncate text-lg leading-tight font-semibold text-highlighted">
63
+ {{ title }}
64
+ </h1>
65
+ <p class="text-xs text-dimmed">
66
+ Redirect — visitors go straight to the target.
67
+ </p>
68
+ </div>
69
+ </div>
70
+
71
+ <div class="flex flex-wrap items-center gap-1.5">
72
+ <AMetaChip
73
+ field-type="url"
74
+ label="Target URL or /path"
75
+ :meta="meta"
76
+ meta-key="url"
77
+ @patch="patch"
78
+ />
79
+ <UButton
80
+ v-if="url"
81
+ size="sm"
82
+ color="neutral"
83
+ variant="ghost"
84
+ trailing-icon="i-lucide-arrow-up-right"
85
+ label="Visit target"
86
+ @click="visitTarget"
87
+ />
88
+ </div>
89
+
90
+ <div class="mt-4 flex items-center gap-2">
91
+ <USwitch
92
+ :model-value="permanent"
93
+ size="sm"
94
+ @update:model-value="patch({ redirectPermanent: $event || void 0 })"
95
+ />
96
+ <span class="text-sm text-muted">Permanent (301) — browsers and crawlers cache it</span>
97
+ </div>
98
+
99
+ <p class="mt-4 text-xs leading-relaxed text-dimmed">
100
+ A server-side visit gets a real {{ permanent ? "301" : "302" }}; an in-app
101
+ navigation bounces on arrival. Leave edit mode to try it — this card only
102
+ shows in the studio.
103
+ </p>
104
+ </div>
105
+
106
+ <!-- No target set. Nothing to bounce to, so say so rather than hang. -->
107
+ <div
108
+ v-else-if="!url"
109
+ class="py-16 text-center"
110
+ >
111
+ <UIcon
112
+ name="i-lucide-corner-up-right"
113
+ class="mb-3 size-10 text-dimmed"
114
+ />
115
+ <p class="text-sm text-muted">
116
+ This page doesn't lead anywhere yet.
117
+ </p>
118
+ </div>
119
+
120
+ <div
121
+ v-else
122
+ class="py-16 text-center"
123
+ >
124
+ <UIcon
125
+ name="i-lucide-corner-up-right"
126
+ class="mb-3 size-10 animate-pulse text-dimmed"
127
+ />
128
+ <p class="text-sm text-muted">
129
+ Taking you to {{ url }}…
130
+ </p>
131
+ </div>
132
+ </div>
133
+ </template>
@@ -0,0 +1,10 @@
1
+ type __VLS_Props = {
2
+ docId: string;
3
+ docLabel?: string;
4
+ docMeta?: Record<string, unknown>;
5
+ childProvider?: unknown;
6
+ editable?: boolean;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,10 @@
1
+ type __VLS_Props = {
2
+ docId: string;
3
+ docLabel?: string;
4
+ docMeta?: Record<string, unknown>;
5
+ childProvider?: unknown;
6
+ editable?: boolean;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;