@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,71 @@
1
+ import { useRuntimeConfig } from "nitropack/runtime";
2
+ import { junDocHtml, junDocTree, junRootDocId, junSlugMap } from "./junCache.js";
3
+ import { isJunOwnerOnlyDoc } from "./junVisibility.js";
4
+ const FEED_LIMIT = 50;
5
+ function toMs(v) {
6
+ if (typeof v === "number" && Number.isFinite(v)) return v;
7
+ if (typeof v === "string" && v.trim()) {
8
+ const t = Date.parse(v);
9
+ if (!Number.isNaN(t)) return t;
10
+ }
11
+ return 0;
12
+ }
13
+ function escapeHtml(s) {
14
+ return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
15
+ }
16
+ function stripDocChrome(html) {
17
+ return html.replace(/^\s*<h1[^>]*>[\s\S]*?<\/h1>/i, "").replace(/<div[^>]*data-document-meta[^>]*>\s*<\/div>/gi, "").trim();
18
+ }
19
+ function feedTypes() {
20
+ const jun = useRuntimeConfig().public.jun;
21
+ return new Set(jun?.feedItemTypes ?? []);
22
+ }
23
+ function feedParentIds(tree) {
24
+ const types = feedTypes();
25
+ const ids = /* @__PURE__ */ new Set();
26
+ if (!types.size) return ids;
27
+ for (const [id, entry] of Object.entries(tree)) {
28
+ if (entry && !entry.trashed && entry.type && types.has(entry.type)) ids.add(id);
29
+ }
30
+ return ids;
31
+ }
32
+ export async function junFeedItems() {
33
+ const [tree, slugs] = await Promise.all([junDocTree(), junSlugMap()]);
34
+ const parents = feedParentIds(tree);
35
+ if (!parents.size) return [];
36
+ const rootId = junRootDocId();
37
+ const candidates = [];
38
+ for (const [id, entry] of Object.entries(tree)) {
39
+ if (!entry || entry.trashed || id === rootId) continue;
40
+ if (!entry.parentId || !parents.has(entry.parentId)) continue;
41
+ const meta = entry.meta ?? {};
42
+ if (meta.draft === true || meta.hidden === true || meta.seedTest === true) continue;
43
+ if (isJunOwnerOnlyDoc(entry)) continue;
44
+ if (!slugs[id]) continue;
45
+ const ms = toMs(meta.date) || toMs(entry.updatedAt);
46
+ if (!ms) continue;
47
+ candidates.push({ id, entry, ms });
48
+ }
49
+ candidates.sort((a, b) => b.ms - a.ms);
50
+ return Promise.all(
51
+ candidates.slice(0, FEED_LIMIT).map(async ({ id, entry, ms }) => {
52
+ const meta = entry.meta ?? {};
53
+ let contentHtml = stripDocChrome(await junDocHtml(id) ?? "");
54
+ if (!contentHtml && typeof meta.body === "string") {
55
+ contentHtml = meta.body.split(/\n{2,}/).map((p) => `<p>${escapeHtml(p).replace(/\n/g, "<br>")}</p>`).join("");
56
+ }
57
+ const excerpt = typeof meta.excerpt === "string" && meta.excerpt.trim() ? meta.excerpt.trim() : typeof meta.body === "string" ? meta.body.slice(0, 200) : void 0;
58
+ return {
59
+ id,
60
+ title: entry.label || "Untitled",
61
+ url: `/${slugs[id]}`,
62
+ date: new Date(ms).toISOString(),
63
+ summary: excerpt,
64
+ contentHtml: contentHtml || void 0
65
+ };
66
+ })
67
+ );
68
+ }
69
+ export function junSiteUrl() {
70
+ return (process.env.SITE_URL || "http://localhost:3003").replace(/\/+$/, "");
71
+ }
@@ -0,0 +1,46 @@
1
+ /** What every adapter returns, whatever it fetched. One card shape, one renderer. */
2
+ export interface JunServiceCard {
3
+ provider: string;
4
+ ref: string;
5
+ title: string;
6
+ subtitle: string;
7
+ /** Where "open" goes — the human page, not the API endpoint. */
8
+ url: string;
9
+ /** Up to four figures. Rendered as pills, in this order. */
10
+ stats: {
11
+ label: string;
12
+ value: string;
13
+ }[];
14
+ /** ISO date of the thing's last activity, when the provider reports one. */
15
+ timestamp?: string;
16
+ /** Feed entries, for `rss`. */
17
+ items?: {
18
+ title: string;
19
+ url: string;
20
+ date?: string;
21
+ }[];
22
+ /** Reachability, for `http`. */
23
+ up?: boolean;
24
+ /** Round-trip milliseconds, for `http`. */
25
+ ms?: number;
26
+ /** A remote image URL — only ever rendered when the site allows remote media. */
27
+ image?: string;
28
+ /** When this answer was produced. Drives the "stale" dot in the renderer. */
29
+ fetchedAt: string;
30
+ }
31
+ export declare class JunServiceError extends Error {
32
+ readonly status: number;
33
+ constructor(message: string, status?: number);
34
+ }
35
+ /**
36
+ * Throws unless `raw` is a public http(s) URL.
37
+ *
38
+ * Resolves the hostname and checks EVERY address it answers with: a name with
39
+ * one public and one private A record is a bypass otherwise.
40
+ */
41
+ export declare function assertSafeUrl(raw: string): Promise<URL>;
42
+ /** Every adapter id this build knows about. The site's allowlist narrows it. */
43
+ export declare const JUN_SERVICE_ADAPTER_IDS: string[];
44
+ export declare function junFetchService(provider: string, ref: string, ctx?: {
45
+ githubToken?: string;
46
+ }): Promise<JunServiceCard>;
@@ -0,0 +1,320 @@
1
+ import { lookup } from "node:dns/promises";
2
+ import { isIP } from "node:net";
3
+ export class JunServiceError extends Error {
4
+ constructor(message, status = 502) {
5
+ super(message);
6
+ this.status = status;
7
+ }
8
+ }
9
+ const USER_AGENT = "jun-is/1.0 (+https://github.com/jun-is/nuxt)";
10
+ const TIMEOUT_MS = 5e3;
11
+ const MAX_BYTES = 1024 * 1024;
12
+ const MAX_REDIRECTS = 2;
13
+ function isPrivateV4(ip) {
14
+ const [a, b] = ip.split(".").map(Number);
15
+ if (a === 10 || a === 127 || a === 0) return true;
16
+ if (a === 172 && b >= 16 && b <= 31) return true;
17
+ if (a === 192 && b === 168) return true;
18
+ if (a === 169 && b === 254) return true;
19
+ if (a === 100 && b >= 64 && b <= 127) return true;
20
+ if (a >= 224) return true;
21
+ return false;
22
+ }
23
+ function isPrivateV6(ip) {
24
+ const v = ip.toLowerCase().replace(/^\[|\]$/g, "");
25
+ if (v === "::1" || v === "::") return true;
26
+ if (/^f[cd]/.test(v)) return true;
27
+ if (/^fe[89ab]/.test(v)) return true;
28
+ const mapped = v.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/);
29
+ if (mapped) return isPrivateV4(mapped[1]);
30
+ return false;
31
+ }
32
+ function isPrivateAddress(ip) {
33
+ return isIP(ip) === 6 ? isPrivateV6(ip) : isPrivateV4(ip);
34
+ }
35
+ export async function assertSafeUrl(raw) {
36
+ let u;
37
+ try {
38
+ u = new URL(raw);
39
+ } catch {
40
+ throw new JunServiceError("Not a URL", 400);
41
+ }
42
+ if (u.protocol !== "http:" && u.protocol !== "https:") {
43
+ throw new JunServiceError("Only http and https are allowed", 400);
44
+ }
45
+ if (u.username || u.password) throw new JunServiceError("Credentials are not allowed", 400);
46
+ const host = u.hostname.replace(/^\[|\]$/g, "");
47
+ if (isIP(host)) {
48
+ if (isPrivateAddress(host)) throw new JunServiceError("That address is not reachable", 400);
49
+ return u;
50
+ }
51
+ let addresses;
52
+ try {
53
+ addresses = await lookup(host, { all: true });
54
+ } catch {
55
+ throw new JunServiceError("Host does not resolve", 400);
56
+ }
57
+ if (!addresses.length) throw new JunServiceError("Host does not resolve", 400);
58
+ if (addresses.some((a) => isPrivateAddress(a.address))) {
59
+ throw new JunServiceError("That address is not reachable", 400);
60
+ }
61
+ return u;
62
+ }
63
+ async function safeFetch(url, init = {}) {
64
+ let target = url;
65
+ const started = Date.now();
66
+ for (let hop = 0; hop <= MAX_REDIRECTS; hop++) {
67
+ const u = await assertSafeUrl(target);
68
+ const res = await fetch(u, {
69
+ // Manual redirects — the point of the guard is lost if fetch follows a
70
+ // 302 to 169.254.169.254 on our behalf.
71
+ redirect: "manual",
72
+ signal: AbortSignal.timeout(TIMEOUT_MS),
73
+ headers: {
74
+ "user-agent": USER_AGENT,
75
+ "accept": init.accept ?? "*/*",
76
+ ...init.headers ?? {}
77
+ }
78
+ }).catch((err) => {
79
+ throw new JunServiceError(err.name === "TimeoutError" ? "Timed out" : "Request failed");
80
+ });
81
+ if (res.status >= 300 && res.status < 400) {
82
+ const location = res.headers.get("location");
83
+ if (!location) throw new JunServiceError("Redirect without a destination");
84
+ target = new URL(location, u).toString();
85
+ continue;
86
+ }
87
+ const text = await readCapped(res);
88
+ return { status: res.status, text, ms: Date.now() - started };
89
+ }
90
+ throw new JunServiceError("Too many redirects");
91
+ }
92
+ async function readCapped(res) {
93
+ const reader = res.body?.getReader();
94
+ if (!reader) return "";
95
+ const decoder = new TextDecoder();
96
+ let out = "";
97
+ let total = 0;
98
+ for (; ; ) {
99
+ const { done, value } = await reader.read();
100
+ if (done) break;
101
+ total += value.byteLength;
102
+ if (total > MAX_BYTES) {
103
+ void reader.cancel();
104
+ break;
105
+ }
106
+ out += decoder.decode(value, { stream: true });
107
+ }
108
+ return out;
109
+ }
110
+ async function fetchJson(url, headers) {
111
+ const { status, text } = await safeFetch(url, { accept: "application/json", headers });
112
+ if (status === 404) throw new JunServiceError("Not found", 404);
113
+ if (status === 403 || status === 429) throw new JunServiceError("Rate limited", 429);
114
+ if (status >= 400) throw new JunServiceError(`Upstream said ${status}`);
115
+ try {
116
+ return JSON.parse(text);
117
+ } catch {
118
+ throw new JunServiceError("Upstream sent something that is not JSON");
119
+ }
120
+ }
121
+ function compact(n) {
122
+ const v = Number(n ?? 0);
123
+ if (!Number.isFinite(v)) return "\u2014";
124
+ if (v < 1e3) return String(v);
125
+ if (v < 1e6) return `${(v / 1e3).toFixed(v < 1e4 ? 1 : 0)}k`;
126
+ return `${(v / 1e6).toFixed(1)}m`;
127
+ }
128
+ const GITHUB_REPO = async (ref, ctx) => {
129
+ if (!/^[\w.-]+\/[\w.-]+$/.test(ref)) throw new JunServiceError("Expected owner/repo", 400);
130
+ const headers = { accept: "application/vnd.github+json" };
131
+ if (ctx.githubToken) headers.authorization = `Bearer ${ctx.githubToken}`;
132
+ const repo = await fetchJson(`https://api.github.com/repos/${ref}`, headers);
133
+ return {
134
+ provider: "github-repo",
135
+ ref,
136
+ title: repo.full_name,
137
+ subtitle: repo.description ?? "",
138
+ url: repo.html_url,
139
+ stats: [
140
+ { label: "stars", value: compact(repo.stargazers_count) },
141
+ { label: "forks", value: compact(repo.forks_count) },
142
+ { label: "issues", value: compact(repo.open_issues_count) },
143
+ { label: "licence", value: repo.license?.spdx_id ?? "\u2014" }
144
+ ],
145
+ timestamp: repo.pushed_at,
146
+ fetchedAt: (/* @__PURE__ */ new Date()).toISOString()
147
+ };
148
+ };
149
+ const GITHUB_USER = async (ref, ctx) => {
150
+ if (!/^[\w-]+$/.test(ref)) throw new JunServiceError("Expected a username", 400);
151
+ const headers = { accept: "application/vnd.github+json" };
152
+ if (ctx.githubToken) headers.authorization = `Bearer ${ctx.githubToken}`;
153
+ const user = await fetchJson(`https://api.github.com/users/${ref}`, headers);
154
+ return {
155
+ provider: "github-user",
156
+ ref,
157
+ title: user.name || user.login,
158
+ subtitle: user.bio ?? `@${user.login}`,
159
+ url: user.html_url,
160
+ image: user.avatar_url,
161
+ stats: [
162
+ { label: "followers", value: compact(user.followers) },
163
+ { label: "repos", value: compact(user.public_repos) }
164
+ ],
165
+ timestamp: user.created_at,
166
+ fetchedAt: (/* @__PURE__ */ new Date()).toISOString()
167
+ };
168
+ };
169
+ const NPM = async (ref) => {
170
+ if (!/^(?:@[\w.-]+\/)?[\w.-]+$/.test(ref)) throw new JunServiceError("Expected a package name", 400);
171
+ const encoded = ref.replace("/", "%2F");
172
+ const pkg = await fetchJson(`https://registry.npmjs.org/${encoded}`);
173
+ let weekly = "\u2014";
174
+ try {
175
+ const dl = await fetchJson(
176
+ `https://api.npmjs.org/downloads/point/last-week/${encoded}`
177
+ );
178
+ weekly = compact(dl.downloads);
179
+ } catch {
180
+ }
181
+ const latest = pkg["dist-tags"]?.latest ?? "";
182
+ return {
183
+ provider: "npm",
184
+ ref,
185
+ title: pkg.name,
186
+ subtitle: pkg.description ?? "",
187
+ url: `https://www.npmjs.com/package/${ref}`,
188
+ stats: [
189
+ { label: "version", value: latest || "\u2014" },
190
+ { label: "weekly", value: weekly },
191
+ { label: "licence", value: pkg.license ?? "\u2014" }
192
+ ],
193
+ timestamp: latest ? pkg.time?.[latest] : pkg.time?.modified,
194
+ fetchedAt: (/* @__PURE__ */ new Date()).toISOString()
195
+ };
196
+ };
197
+ const CRATES = async (ref) => {
198
+ if (!/^[\w-]+$/.test(ref)) throw new JunServiceError("Expected a crate name", 400);
199
+ const data = await fetchJson(`https://crates.io/api/v1/crates/${ref}`);
200
+ const c = data.crate;
201
+ return {
202
+ provider: "crates",
203
+ ref,
204
+ title: c.name,
205
+ subtitle: c.description ?? "",
206
+ url: `https://crates.io/crates/${ref}`,
207
+ stats: [
208
+ { label: "version", value: c.max_stable_version ?? "\u2014" },
209
+ { label: "downloads", value: compact(c.downloads) },
210
+ { label: "recent", value: compact(c.recent_downloads) }
211
+ ],
212
+ timestamp: c.updated_at,
213
+ fetchedAt: (/* @__PURE__ */ new Date()).toISOString()
214
+ };
215
+ };
216
+ function decodeXmlText(raw) {
217
+ return raw.replace(/<!\[CDATA\[([\s\S]*?)\]\]>/g, "$1").replace(/<[^>]+>/g, "").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#0?39;|&apos;/g, "'").replace(/&amp;/g, "&").trim();
218
+ }
219
+ function firstTag(block, tag) {
220
+ const m = block.match(new RegExp(`<${tag}[^>]*>([\\s\\S]*?)</${tag}>`, "i"));
221
+ return m ? decodeXmlText(m[1]) : "";
222
+ }
223
+ const RSS = async (ref) => {
224
+ const { status, text } = await safeFetch(ref, { accept: "application/rss+xml, application/atom+xml, application/xml;q=0.9, */*;q=0.8" });
225
+ if (status >= 400) throw new JunServiceError(`Feed said ${status}`);
226
+ const feedTitle = firstTag(text.slice(0, 4e3), "title");
227
+ const blocks = [
228
+ ...text.matchAll(/<item[\s>][\s\S]*?<\/item>/gi),
229
+ ...text.matchAll(/<entry[\s>][\s\S]*?<\/entry>/gi)
230
+ ].map((m) => m[0]);
231
+ const items = blocks.slice(0, 6).map((block) => {
232
+ const href = block.match(/<link[^>]*href=["']([^"']+)["']/i)?.[1];
233
+ return {
234
+ title: firstTag(block, "title") || "Untitled",
235
+ url: href ?? firstTag(block, "link"),
236
+ date: firstTag(block, "pubDate") || firstTag(block, "updated") || firstTag(block, "published") || void 0
237
+ };
238
+ });
239
+ return {
240
+ provider: "rss",
241
+ ref,
242
+ title: feedTitle || new URL(ref).hostname,
243
+ subtitle: `${blocks.length} item${blocks.length === 1 ? "" : "s"}`,
244
+ url: ref,
245
+ stats: [{ label: "items", value: String(blocks.length) }],
246
+ items,
247
+ timestamp: items[0]?.date,
248
+ fetchedAt: (/* @__PURE__ */ new Date()).toISOString()
249
+ };
250
+ };
251
+ const HTTP = async (ref) => {
252
+ const started = Date.now();
253
+ let status = 0;
254
+ let ms = 0;
255
+ try {
256
+ const res = await safeFetch(ref, { accept: "text/html,*/*" });
257
+ status = res.status;
258
+ ms = res.ms;
259
+ } catch (err) {
260
+ if (err instanceof JunServiceError && err.status === 400) throw err;
261
+ ms = Date.now() - started;
262
+ }
263
+ const up = status > 0 && status < 400;
264
+ return {
265
+ provider: "http",
266
+ ref,
267
+ title: new URL(ref).hostname,
268
+ subtitle: up ? "Responding" : "No response",
269
+ url: ref,
270
+ up,
271
+ ms,
272
+ stats: [
273
+ { label: "status", value: status ? String(status) : "down" },
274
+ { label: "latency", value: `${ms} ms` }
275
+ ],
276
+ fetchedAt: (/* @__PURE__ */ new Date()).toISOString()
277
+ };
278
+ };
279
+ const OG = async (ref) => {
280
+ const { status, text } = await safeFetch(ref, { accept: "text/html" });
281
+ if (status >= 400) throw new JunServiceError(`Page said ${status}`);
282
+ const meta = (prop) => {
283
+ const patterns = [
284
+ new RegExp(`<meta[^>]+(?:property|name)=["']${prop}["'][^>]+content=["']([^"']*)["']`, "i"),
285
+ new RegExp(`<meta[^>]+content=["']([^"']*)["'][^>]+(?:property|name)=["']${prop}["']`, "i")
286
+ ];
287
+ for (const p of patterns) {
288
+ const m = text.match(p);
289
+ if (m) return decodeXmlText(m[1]);
290
+ }
291
+ return "";
292
+ };
293
+ const title = meta("og:title") || firstTag(text.slice(0, 8e3), "title") || new URL(ref).hostname;
294
+ return {
295
+ provider: "og",
296
+ ref,
297
+ title,
298
+ subtitle: meta("og:description") || meta("description"),
299
+ url: meta("og:url") || ref,
300
+ image: meta("og:image"),
301
+ stats: [{ label: "site", value: meta("og:site_name") || new URL(ref).hostname }],
302
+ fetchedAt: (/* @__PURE__ */ new Date()).toISOString()
303
+ };
304
+ };
305
+ const ADAPTERS = {
306
+ "github-repo": GITHUB_REPO,
307
+ "github-user": GITHUB_USER,
308
+ "npm": NPM,
309
+ "crates": CRATES,
310
+ "rss": RSS,
311
+ "http": HTTP,
312
+ "og": OG
313
+ };
314
+ export const JUN_SERVICE_ADAPTER_IDS = Object.keys(ADAPTERS);
315
+ export async function junFetchService(provider, ref, ctx = {}) {
316
+ const adapter = ADAPTERS[provider];
317
+ if (!adapter) throw new JunServiceError(`Unknown provider "${provider}"`, 400);
318
+ if (!ref) throw new JunServiceError("Missing reference", 400);
319
+ return adapter(ref, { githubToken: ctx.githubToken ?? "" });
320
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Which documents the PUBLIC surfaces of the site are allowed to expose.
3
+ *
4
+ * "Everything is a document" cuts both ways: the site's own settings live in a
5
+ * `jun-config` document, so without an explicit rule they show up wherever
6
+ * documents show up — search results, the sitemap, link previews. On janis.io
7
+ * they did: `/site-config` was a fully readable page for every visitor, listing
8
+ * the site's SEO copy, theme and feature switches, and it ranked FIRST for the
9
+ * query "site".
10
+ *
11
+ * `meta.hidden` is NOT enough on its own. It means "not advertised in
12
+ * navigation", and hidden pages are deliberately still searchable. This
13
+ * predicate is the stronger statement: **owner-only**.
14
+ *
15
+ * Enforced at five points — the search endpoint, the sitemap, the resolve
16
+ * endpoint (which still resolves, so the owner can navigate there and the page
17
+ * knows its layout, but blanks the content), the search overlay, and the config
18
+ * renderer itself.
19
+ *
20
+ * > This file is duplicated as `runtime/utils/junVisibility.ts` for the client
21
+ * > bundle. Nitro server utils and the app's auto-imported utils are separate
22
+ * > bundles, and a shared file would have to live outside both and be imported
23
+ * > by path, which buys nothing for a four-line predicate. **Keep the two in
24
+ * > step.**
25
+ */
26
+ export interface JunVisibilityEntry {
27
+ type?: string;
28
+ meta?: Record<string, unknown>;
29
+ }
30
+ /** True for documents only the signed-in owner may see. */
31
+ export declare function isJunOwnerOnlyDoc(entry: JunVisibilityEntry | undefined | null): boolean;
@@ -0,0 +1,6 @@
1
+ export function isJunOwnerOnlyDoc(entry) {
2
+ if (!entry) return false;
3
+ if (entry.type === "jun-config") return true;
4
+ if (entry.meta?.siteConfig === true) return true;
5
+ return entry.meta?.campfire === true;
6
+ }