@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.
- package/README.md +594 -0
- package/dist/module.d.mts +158 -0
- package/dist/module.json +12 -0
- package/dist/module.mjs +957 -0
- package/dist/runtime/assets/css/jun.css +13 -0
- package/dist/runtime/components/JunAnnouncement.d.vue.ts +3 -0
- package/dist/runtime/components/JunAnnouncement.vue +88 -0
- package/dist/runtime/components/JunAnnouncement.vue.d.ts +3 -0
- package/dist/runtime/components/JunAppreciate.d.vue.ts +6 -0
- package/dist/runtime/components/JunAppreciate.vue +71 -0
- package/dist/runtime/components/JunAppreciate.vue.d.ts +6 -0
- package/dist/runtime/components/JunBackgroundPhoto.d.vue.ts +3 -0
- package/dist/runtime/components/JunBackgroundPhoto.vue +23 -0
- package/dist/runtime/components/JunBackgroundPhoto.vue.d.ts +3 -0
- package/dist/runtime/components/JunBlobBackdrop.client.d.vue.ts +3 -0
- package/dist/runtime/components/JunBlobBackdrop.client.vue +120 -0
- package/dist/runtime/components/JunBlobBackdrop.client.vue.d.ts +3 -0
- package/dist/runtime/components/JunBreadcrumbs.d.vue.ts +16 -0
- package/dist/runtime/components/JunBreadcrumbs.vue +63 -0
- package/dist/runtime/components/JunBreadcrumbs.vue.d.ts +16 -0
- package/dist/runtime/components/JunCampfireChat.d.vue.ts +14 -0
- package/dist/runtime/components/JunCampfireChat.vue +136 -0
- package/dist/runtime/components/JunCampfireChat.vue.d.ts +14 -0
- package/dist/runtime/components/JunCampfirePanel.d.vue.ts +33 -0
- package/dist/runtime/components/JunCampfirePanel.vue +202 -0
- package/dist/runtime/components/JunCampfirePanel.vue.d.ts +33 -0
- package/dist/runtime/components/JunCampfirePresence.client.d.vue.ts +3 -0
- package/dist/runtime/components/JunCampfirePresence.client.vue +321 -0
- package/dist/runtime/components/JunCampfirePresence.client.vue.d.ts +3 -0
- package/dist/runtime/components/JunCampfireRoster.d.vue.ts +19 -0
- package/dist/runtime/components/JunCampfireRoster.vue +259 -0
- package/dist/runtime/components/JunCampfireRoster.vue.d.ts +19 -0
- package/dist/runtime/components/JunCampfireYou.d.vue.ts +10 -0
- package/dist/runtime/components/JunCampfireYou.vue +157 -0
- package/dist/runtime/components/JunCampfireYou.vue.d.ts +10 -0
- package/dist/runtime/components/JunDocSurface.d.vue.ts +34 -0
- package/dist/runtime/components/JunDocSurface.vue +117 -0
- package/dist/runtime/components/JunDocSurface.vue.d.ts +34 -0
- package/dist/runtime/components/JunFestivalPlayer.client.d.vue.ts +3 -0
- package/dist/runtime/components/JunFestivalPlayer.client.vue +471 -0
- package/dist/runtime/components/JunFestivalPlayer.client.vue.d.ts +3 -0
- package/dist/runtime/components/JunFooter.d.vue.ts +3 -0
- package/dist/runtime/components/JunFooter.vue +102 -0
- package/dist/runtime/components/JunFooter.vue.d.ts +3 -0
- package/dist/runtime/components/JunGlobeEditor.client.d.vue.ts +43 -0
- package/dist/runtime/components/JunGlobeEditor.client.vue +315 -0
- package/dist/runtime/components/JunGlobeEditor.client.vue.d.ts +43 -0
- package/dist/runtime/components/JunGlobeMap.client.d.vue.ts +58 -0
- package/dist/runtime/components/JunGlobeMap.client.vue +495 -0
- package/dist/runtime/components/JunGlobeMap.client.vue.d.ts +58 -0
- package/dist/runtime/components/JunHead.d.vue.ts +3 -0
- package/dist/runtime/components/JunHead.vue +79 -0
- package/dist/runtime/components/JunHead.vue.d.ts +3 -0
- package/dist/runtime/components/JunHorizontalTimeline.d.vue.ts +0 -0
- package/dist/runtime/components/JunHorizontalTimeline.vue +363 -0
- package/dist/runtime/components/JunHorizontalTimeline.vue.d.ts +0 -0
- package/dist/runtime/components/JunImagePopup.client.d.vue.ts +3 -0
- package/dist/runtime/components/JunImagePopup.client.vue +422 -0
- package/dist/runtime/components/JunImagePopup.client.vue.d.ts +3 -0
- package/dist/runtime/components/JunIntro.d.vue.ts +3 -0
- package/dist/runtime/components/JunIntro.vue +156 -0
- package/dist/runtime/components/JunIntro.vue.d.ts +3 -0
- package/dist/runtime/components/JunItemMenu.d.vue.ts +50 -0
- package/dist/runtime/components/JunItemMenu.vue +97 -0
- package/dist/runtime/components/JunItemMenu.vue.d.ts +50 -0
- package/dist/runtime/components/JunLinksRow.d.vue.ts +19 -0
- package/dist/runtime/components/JunLinksRow.vue +96 -0
- package/dist/runtime/components/JunLinksRow.vue.d.ts +19 -0
- package/dist/runtime/components/JunLogo.d.vue.ts +15 -0
- package/dist/runtime/components/JunLogo.vue +360 -0
- package/dist/runtime/components/JunLogo.vue.d.ts +15 -0
- package/dist/runtime/components/JunMedia.client.d.vue.ts +40 -0
- package/dist/runtime/components/JunMedia.client.vue +117 -0
- package/dist/runtime/components/JunMedia.client.vue.d.ts +40 -0
- package/dist/runtime/components/JunMosaicPane.client.d.vue.ts +24 -0
- package/dist/runtime/components/JunMosaicPane.client.vue +95 -0
- package/dist/runtime/components/JunMosaicPane.client.vue.d.ts +24 -0
- package/dist/runtime/components/JunNavigation.d.vue.ts +26 -0
- package/dist/runtime/components/JunNavigation.vue +1149 -0
- package/dist/runtime/components/JunNavigation.vue.d.ts +26 -0
- package/dist/runtime/components/JunNodePanel.client.d.vue.ts +3 -0
- package/dist/runtime/components/JunNodePanel.client.vue +23 -0
- package/dist/runtime/components/JunNodePanel.client.vue.d.ts +3 -0
- package/dist/runtime/components/JunNotFound.d.vue.ts +7 -0
- package/dist/runtime/components/JunNotFound.vue +137 -0
- package/dist/runtime/components/JunNotFound.vue.d.ts +7 -0
- package/dist/runtime/components/JunPageHero.d.vue.ts +25 -0
- package/dist/runtime/components/JunPageHero.vue +90 -0
- package/dist/runtime/components/JunPageHero.vue.d.ts +25 -0
- package/dist/runtime/components/JunPatternBackdrop.client.d.vue.ts +7 -0
- package/dist/runtime/components/JunPatternBackdrop.client.vue +95 -0
- package/dist/runtime/components/JunPatternBackdrop.client.vue.d.ts +7 -0
- package/dist/runtime/components/JunPeerCursors.client.d.vue.ts +3 -0
- package/dist/runtime/components/JunPeerCursors.client.vue +123 -0
- package/dist/runtime/components/JunPeerCursors.client.vue.d.ts +3 -0
- package/dist/runtime/components/JunPresenceBlobs.client.d.vue.ts +3 -0
- package/dist/runtime/components/JunPresenceBlobs.client.vue +172 -0
- package/dist/runtime/components/JunPresenceBlobs.client.vue.d.ts +3 -0
- package/dist/runtime/components/JunSearch.client.d.vue.ts +3 -0
- package/dist/runtime/components/JunSearch.client.vue +809 -0
- package/dist/runtime/components/JunSearch.client.vue.d.ts +3 -0
- package/dist/runtime/components/JunServiceCard.d.vue.ts +10 -0
- package/dist/runtime/components/JunServiceCard.vue +145 -0
- package/dist/runtime/components/JunServiceCard.vue.d.ts +10 -0
- package/dist/runtime/components/JunShaderBackdrop.client.d.vue.ts +3 -0
- package/dist/runtime/components/JunShaderBackdrop.client.vue +82 -0
- package/dist/runtime/components/JunShaderBackdrop.client.vue.d.ts +3 -0
- package/dist/runtime/components/JunShell.d.vue.ts +17 -0
- package/dist/runtime/components/JunShell.vue +80 -0
- package/dist/runtime/components/JunShell.vue.d.ts +17 -0
- package/dist/runtime/components/JunStudioBar.client.d.vue.ts +3 -0
- package/dist/runtime/components/JunStudioBar.client.vue +462 -0
- package/dist/runtime/components/JunStudioBar.client.vue.d.ts +3 -0
- package/dist/runtime/components/JunStudioLogin.client.d.vue.ts +3 -0
- package/dist/runtime/components/JunStudioLogin.client.vue +58 -0
- package/dist/runtime/components/JunStudioLogin.client.vue.d.ts +3 -0
- package/dist/runtime/components/JunThemeToggle.d.vue.ts +3 -0
- package/dist/runtime/components/JunThemeToggle.vue +32 -0
- package/dist/runtime/components/JunThemeToggle.vue.d.ts +3 -0
- package/dist/runtime/components/JunTravellersChip.d.vue.ts +9 -0
- package/dist/runtime/components/JunTravellersChip.vue +111 -0
- package/dist/runtime/components/JunTravellersChip.vue.d.ts +9 -0
- package/dist/runtime/components/JunVideoEmbed.client.d.vue.ts +23 -0
- package/dist/runtime/components/JunVideoEmbed.client.vue +124 -0
- package/dist/runtime/components/JunVideoEmbed.client.vue.d.ts +23 -0
- package/dist/runtime/components/css-modules.d.ts +7 -0
- package/dist/runtime/components/renderers/.gitkeep +0 -0
- package/dist/runtime/components/renderers/JunAppsRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunAppsRenderer.vue +271 -0
- package/dist/runtime/components/renderers/JunAppsRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunCinemaRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunCinemaRenderer.vue +465 -0
- package/dist/runtime/components/renderers/JunCinemaRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunConfigRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunConfigRenderer.vue +2045 -0
- package/dist/runtime/components/renderers/JunConfigRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunCvRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunCvRenderer.vue +256 -0
- package/dist/runtime/components/renderers/JunCvRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunEntryRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunEntryRenderer.vue +429 -0
- package/dist/runtime/components/renderers/JunEntryRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunFestivalRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunFestivalRenderer.vue +557 -0
- package/dist/runtime/components/renderers/JunFestivalRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunGlobeRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunGlobeRenderer.vue +91 -0
- package/dist/runtime/components/renderers/JunGlobeRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunGuestbookRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunGuestbookRenderer.vue +326 -0
- package/dist/runtime/components/renderers/JunGuestbookRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunHomeRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunHomeRenderer.vue +585 -0
- package/dist/runtime/components/renderers/JunHomeRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunJournalRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunJournalRenderer.vue +420 -0
- package/dist/runtime/components/renderers/JunJournalRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunLibraryRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunLibraryRenderer.vue +319 -0
- package/dist/runtime/components/renderers/JunLibraryRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunLinksRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunLinksRenderer.vue +206 -0
- package/dist/runtime/components/renderers/JunLinksRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunLiveRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunLiveRenderer.vue +684 -0
- package/dist/runtime/components/renderers/JunLiveRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunMosaicRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunMosaicRenderer.vue +572 -0
- package/dist/runtime/components/renderers/JunMosaicRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunMovieRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunMovieRenderer.vue +539 -0
- package/dist/runtime/components/renderers/JunMovieRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunNowRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunNowRenderer.vue +382 -0
- package/dist/runtime/components/renderers/JunNowRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunProjectRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunProjectRenderer.vue +413 -0
- package/dist/runtime/components/renderers/JunProjectRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunRedirectRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunRedirectRenderer.vue +133 -0
- package/dist/runtime/components/renderers/JunRedirectRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunServicesRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunServicesRenderer.vue +267 -0
- package/dist/runtime/components/renderers/JunServicesRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunStatsRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunStatsRenderer.vue +230 -0
- package/dist/runtime/components/renderers/JunStatsRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunTrackRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunTrackRenderer.vue +380 -0
- package/dist/runtime/components/renderers/JunTrackRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunUsesRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunUsesRenderer.vue +254 -0
- package/dist/runtime/components/renderers/JunUsesRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunWallRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunWallRenderer.vue +276 -0
- package/dist/runtime/components/renderers/JunWallRenderer.vue.d.ts +10 -0
- package/dist/runtime/components/renderers/JunWindowRenderer.d.vue.ts +10 -0
- package/dist/runtime/components/renderers/JunWindowRenderer.vue +516 -0
- package/dist/runtime/components/renderers/JunWindowRenderer.vue.d.ts +10 -0
- package/dist/runtime/composables/useJunBackdrop.d.ts +9 -0
- package/dist/runtime/composables/useJunBackdrop.js +27 -0
- package/dist/runtime/composables/useJunBackground.d.ts +78 -0
- package/dist/runtime/composables/useJunBackground.js +65 -0
- package/dist/runtime/composables/useJunCampfire.d.ts +156 -0
- package/dist/runtime/composables/useJunCampfire.js +225 -0
- package/dist/runtime/composables/useJunChrome.d.ts +66 -0
- package/dist/runtime/composables/useJunChrome.js +233 -0
- package/dist/runtime/composables/useJunColorMode.d.ts +8 -0
- package/dist/runtime/composables/useJunColorMode.js +11 -0
- package/dist/runtime/composables/useJunCommands.d.ts +37 -0
- package/dist/runtime/composables/useJunCommands.js +225 -0
- package/dist/runtime/composables/useJunCreatePage.d.ts +17 -0
- package/dist/runtime/composables/useJunCreatePage.js +30 -0
- package/dist/runtime/composables/useJunCurrentDoc.d.ts +5 -0
- package/dist/runtime/composables/useJunCurrentDoc.js +14 -0
- package/dist/runtime/composables/useJunDocMenu.d.ts +71 -0
- package/dist/runtime/composables/useJunDocMenu.js +344 -0
- package/dist/runtime/composables/useJunDocPage.d.ts +99 -0
- package/dist/runtime/composables/useJunDocPage.js +155 -0
- package/dist/runtime/composables/useJunFollow.d.ts +11 -0
- package/dist/runtime/composables/useJunFollow.js +38 -0
- package/dist/runtime/composables/useJunGroupedDnD.d.ts +74 -0
- package/dist/runtime/composables/useJunGroupedDnD.js +186 -0
- package/dist/runtime/composables/useJunImagePopup.d.ts +37 -0
- package/dist/runtime/composables/useJunImagePopup.js +24 -0
- package/dist/runtime/composables/useJunIntro.d.ts +7 -0
- package/dist/runtime/composables/useJunIntro.js +8 -0
- package/dist/runtime/composables/useJunListDnD.d.ts +65 -0
- package/dist/runtime/composables/useJunListDnD.js +159 -0
- package/dist/runtime/composables/useJunMediaImport.d.ts +27 -0
- package/dist/runtime/composables/useJunMediaImport.js +90 -0
- package/dist/runtime/composables/useJunNavSettings.d.ts +57 -0
- package/dist/runtime/composables/useJunNavSettings.js +74 -0
- package/dist/runtime/composables/useJunNodePanel.d.ts +41 -0
- package/dist/runtime/composables/useJunNodePanel.js +36 -0
- package/dist/runtime/composables/useJunOpenDoc.d.ts +7 -0
- package/dist/runtime/composables/useJunOpenDoc.js +30 -0
- package/dist/runtime/composables/useJunOptions.d.ts +68 -0
- package/dist/runtime/composables/useJunOptions.js +68 -0
- package/dist/runtime/composables/useJunPalette.d.ts +16 -0
- package/dist/runtime/composables/useJunPalette.js +72 -0
- package/dist/runtime/composables/useJunPeopleAdmin.d.ts +69 -0
- package/dist/runtime/composables/useJunPeopleAdmin.js +73 -0
- package/dist/runtime/composables/useJunPlayer.d.ts +99 -0
- package/dist/runtime/composables/useJunPlayer.js +208 -0
- package/dist/runtime/composables/useJunPresence.d.ts +32 -0
- package/dist/runtime/composables/useJunPresence.js +53 -0
- package/dist/runtime/composables/useJunPressDrag.d.ts +20 -0
- package/dist/runtime/composables/useJunPressDrag.js +85 -0
- package/dist/runtime/composables/useJunRecent.d.ts +9 -0
- package/dist/runtime/composables/useJunRecent.js +44 -0
- package/dist/runtime/composables/useJunRename.d.ts +19 -0
- package/dist/runtime/composables/useJunRename.js +62 -0
- package/dist/runtime/composables/useJunRouteGeoHeal.d.ts +1 -0
- package/dist/runtime/composables/useJunRouteGeoHeal.js +45 -0
- package/dist/runtime/composables/useJunRouting.d.ts +29 -0
- package/dist/runtime/composables/useJunRouting.js +101 -0
- package/dist/runtime/composables/useJunSearch.d.ts +6 -0
- package/dist/runtime/composables/useJunSearch.js +16 -0
- package/dist/runtime/composables/useJunSelfId.d.ts +1 -0
- package/dist/runtime/composables/useJunSelfId.js +28 -0
- package/dist/runtime/composables/useJunSiteConfig.d.ts +229 -0
- package/dist/runtime/composables/useJunSiteConfig.js +95 -0
- package/dist/runtime/composables/useJunSiteConfigValues.d.ts +33 -0
- package/dist/runtime/composables/useJunSiteConfigValues.js +21 -0
- package/dist/runtime/composables/useJunStagger.d.ts +54 -0
- package/dist/runtime/composables/useJunStagger.js +23 -0
- package/dist/runtime/composables/useJunStudio.d.ts +11 -0
- package/dist/runtime/composables/useJunStudio.js +51 -0
- package/dist/runtime/composables/useJunSurface.d.ts +19 -0
- package/dist/runtime/composables/useJunSurface.js +8 -0
- package/dist/runtime/composables/useJunTheme.d.ts +21 -0
- package/dist/runtime/composables/useJunTheme.js +138 -0
- package/dist/runtime/composables/useJunThemeTransition.d.ts +5 -0
- package/dist/runtime/composables/useJunThemeTransition.js +32 -0
- package/dist/runtime/composables/useJunUpload.d.ts +12 -0
- package/dist/runtime/composables/useJunUpload.js +44 -0
- package/dist/runtime/composables/useJunViewingAccent.d.ts +6 -0
- package/dist/runtime/composables/useJunViewingAccent.js +28 -0
- package/dist/runtime/error.d.vue.ts +7 -0
- package/dist/runtime/error.vue +74 -0
- package/dist/runtime/error.vue.d.ts +7 -0
- package/dist/runtime/layouts/jun.d.vue.ts +13 -0
- package/dist/runtime/layouts/jun.vue +162 -0
- package/dist/runtime/layouts/jun.vue.d.ts +13 -0
- package/dist/runtime/pages/doc.d.vue.ts +3 -0
- package/dist/runtime/pages/doc.vue +142 -0
- package/dist/runtime/pages/doc.vue.d.ts +3 -0
- package/dist/runtime/pages/index.d.vue.ts +3 -0
- package/dist/runtime/pages/index.vue +64 -0
- package/dist/runtime/pages/index.vue.d.ts +3 -0
- package/dist/runtime/plugins/jun-drag-affordance.client.d.ts +2 -0
- package/dist/runtime/plugins/jun-drag-affordance.client.js +9 -0
- package/dist/runtime/router.options.d.ts +3 -0
- package/dist/runtime/router.options.js +72 -0
- package/dist/runtime/server/api/nav.get.d.ts +9 -0
- package/dist/runtime/server/api/nav.get.js +16 -0
- package/dist/runtime/server/api/resolve/[...slug].get.d.ts +18 -0
- package/dist/runtime/server/api/resolve/[...slug].get.js +20 -0
- package/dist/runtime/server/api/search.get.d.ts +13 -0
- package/dist/runtime/server/api/search.get.js +72 -0
- package/dist/runtime/server/api/service.get.d.ts +12 -0
- package/dist/runtime/server/api/service.get.js +39 -0
- package/dist/runtime/server/api/site-config.get.d.ts +2 -0
- package/dist/runtime/server/api/site-config.get.js +3 -0
- package/dist/runtime/server/api/stats.get.d.ts +12 -0
- package/dist/runtime/server/api/stats.get.js +56 -0
- package/dist/runtime/server/janitor/junJanitorActor.d.ts +179 -0
- package/dist/runtime/server/janitor/junJanitorActor.js +305 -0
- package/dist/runtime/server/janitor/junJanitorChores.d.ts +137 -0
- package/dist/runtime/server/janitor/junJanitorChores.js +189 -0
- package/dist/runtime/server/janitor/junJanitorDiff.d.ts +41 -0
- package/dist/runtime/server/janitor/junJanitorDiff.js +109 -0
- package/dist/runtime/server/janitor/junJanitorListen.d.ts +33 -0
- package/dist/runtime/server/janitor/junJanitorListen.js +43 -0
- package/dist/runtime/server/janitor/junJanitorMachine.d.ts +60 -0
- package/dist/runtime/server/janitor/junJanitorMachine.js +598 -0
- package/dist/runtime/server/janitor/junJanitorMotor.d.ts +211 -0
- package/dist/runtime/server/janitor/junJanitorMotor.js +241 -0
- package/dist/runtime/server/janitor/junJanitorPatrol.d.ts +68 -0
- package/dist/runtime/server/janitor/junJanitorPatrol.js +34 -0
- package/dist/runtime/server/janitor/junJanitorPerform.d.ts +70 -0
- package/dist/runtime/server/janitor/junJanitorPerform.js +72 -0
- package/dist/runtime/server/janitor/junJanitorRandom.d.ts +54 -0
- package/dist/runtime/server/janitor/junJanitorRandom.js +48 -0
- package/dist/runtime/server/janitor/junJanitorStore.d.ts +159 -0
- package/dist/runtime/server/janitor/junJanitorStore.js +269 -0
- package/dist/runtime/server/janitor/junJanitorVoice.d.ts +86 -0
- package/dist/runtime/server/janitor/junJanitorVoice.js +193 -0
- package/dist/runtime/server/janitor/junJanitorYText.d.ts +164 -0
- package/dist/runtime/server/janitor/junJanitorYText.js +258 -0
- package/dist/runtime/server/plugins/jun-bootstrap.d.ts +25 -0
- package/dist/runtime/server/plugins/jun-bootstrap.js +652 -0
- package/dist/runtime/server/plugins/jun-doc-cache.d.ts +2 -0
- package/dist/runtime/server/plugins/jun-doc-cache.js +142 -0
- package/dist/runtime/server/plugins/jun-janitor.d.ts +2 -0
- package/dist/runtime/server/plugins/jun-janitor.js +176 -0
- package/dist/runtime/server/plugins/jun-rpc.d.ts +2 -0
- package/dist/runtime/server/plugins/jun-rpc.js +455 -0
- package/dist/runtime/server/routes/feed.json.get.d.ts +21 -0
- package/dist/runtime/server/routes/feed.json.get.js +25 -0
- package/dist/runtime/server/routes/feed.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/feed.xml.get.js +34 -0
- package/dist/runtime/server/routes/sitemap.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/sitemap.xml.get.js +27 -0
- package/dist/runtime/server/utils/junCache.d.ts +41 -0
- package/dist/runtime/server/utils/junCache.js +32 -0
- package/dist/runtime/server/utils/junFeed.d.ts +20 -0
- package/dist/runtime/server/utils/junFeed.js +71 -0
- package/dist/runtime/server/utils/junServiceFetch.d.ts +46 -0
- package/dist/runtime/server/utils/junServiceFetch.js +320 -0
- package/dist/runtime/server/utils/junVisibility.d.ts +31 -0
- package/dist/runtime/server/utils/junVisibility.js +6 -0
- package/dist/runtime/types.d.ts +853 -0
- package/dist/runtime/types.js +1 -0
- package/dist/runtime/utils/junDate.d.ts +38 -0
- package/dist/runtime/utils/junDate.js +30 -0
- package/dist/runtime/utils/junDndGeometry.d.ts +62 -0
- package/dist/runtime/utils/junDndGeometry.js +56 -0
- package/dist/runtime/utils/junDocTypeIcons.d.ts +30 -0
- package/dist/runtime/utils/junDocTypeIcons.js +30 -0
- package/dist/runtime/utils/junEditorBodyText.d.ts +32 -0
- package/dist/runtime/utils/junEditorBodyText.js +10 -0
- package/dist/runtime/utils/junMapboxToken.d.ts +1 -0
- package/dist/runtime/utils/junMapboxToken.js +5 -0
- package/dist/runtime/utils/junMatch.d.ts +45 -0
- package/dist/runtime/utils/junMatch.js +37 -0
- package/dist/runtime/utils/junMetaSchemas.d.ts +23 -0
- package/dist/runtime/utils/junMetaSchemas.js +94 -0
- package/dist/runtime/utils/junMotion.d.ts +71 -0
- package/dist/runtime/utils/junMotion.js +3 -0
- package/dist/runtime/utils/junServiceRef.d.ts +21 -0
- package/dist/runtime/utils/junServiceRef.js +94 -0
- package/dist/runtime/utils/junSimplifyPath.d.ts +23 -0
- package/dist/runtime/utils/junSimplifyPath.js +57 -0
- package/dist/runtime/utils/junTransportModes.d.ts +49 -0
- package/dist/runtime/utils/junTransportModes.js +37 -0
- package/dist/runtime/utils/junVideoSource.d.ts +51 -0
- package/dist/runtime/utils/junVideoSource.js +110 -0
- package/dist/runtime/utils/junVisibility.d.ts +14 -0
- package/dist/runtime/utils/junVisibility.js +6 -0
- package/dist/types.d.mts +5 -0
- package/package.json +111 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { JunNavActiveStyle, JunNavItemMode, JunNavLogoAction, JunNavPlacement, JunNavShape, JunNavSize } from '../types.js';
|
|
2
|
+
export declare function useJunNavSettings(): {
|
|
3
|
+
placement: import("vue").ComputedRef<JunNavPlacement>;
|
|
4
|
+
shape: import("vue").ComputedRef<JunNavShape>;
|
|
5
|
+
size: import("vue").ComputedRef<JunNavSize>;
|
|
6
|
+
itemMode: import("vue").ComputedRef<JunNavItemMode>;
|
|
7
|
+
activeStyle: import("vue").ComputedRef<JunNavActiveStyle>;
|
|
8
|
+
autoHide: import("vue").ComputedRef<boolean>;
|
|
9
|
+
blur: import("vue").ComputedRef<boolean>;
|
|
10
|
+
homeItem: import("vue").ComputedRef<boolean>;
|
|
11
|
+
showLogo: import("vue").ComputedRef<boolean>;
|
|
12
|
+
/**
|
|
13
|
+
* What the logo does. `palette` makes the mark the way into search, which
|
|
14
|
+
* is why the search button is separately switchable — a site that has done
|
|
15
|
+
* that does not need two of them.
|
|
16
|
+
*/
|
|
17
|
+
logoAction: import("vue").ComputedRef<JunNavLogoAction>;
|
|
18
|
+
/** The search button in the right cluster. ⌘K is unaffected either way. */
|
|
19
|
+
searchButton: import("vue").ComputedRef<boolean>;
|
|
20
|
+
centerActive: import("vue").ComputedRef<boolean>;
|
|
21
|
+
showIndices: import("vue").ComputedRef<boolean>;
|
|
22
|
+
keyboardNav: import("vue").ComputedRef<boolean>;
|
|
23
|
+
freshnessDots: import("vue").ComputedRef<boolean>;
|
|
24
|
+
/**
|
|
25
|
+
* The fellow-travellers dot stack, and whether hovering it names them.
|
|
26
|
+
*
|
|
27
|
+
* Two switches rather than one because they disclose different things: the
|
|
28
|
+
* dots say how many people are here, the roster says who they are and what
|
|
29
|
+
* they are reading. Both default OFF.
|
|
30
|
+
*/
|
|
31
|
+
travellers: import("vue").ComputedRef<boolean>;
|
|
32
|
+
travellersList: import("vue").ComputedRef<boolean>;
|
|
33
|
+
/**
|
|
34
|
+
* Which `<JunLogo>` variant the navbar is showing. The navbar needs it for
|
|
35
|
+
* LAYOUT — a bare mark can float over the track on a fixed reserve, a
|
|
36
|
+
* lockup carrying the brand name cannot — so it reads the same key the
|
|
37
|
+
* logo does rather than being told by it.
|
|
38
|
+
*
|
|
39
|
+
* **Including the same build-time default.** A literal `'mark'` here was a
|
|
40
|
+
* disagreement waiting to happen: a site setting `brand.logoVariant:
|
|
41
|
+
* 'lockup'` would have rendered the name while the bar still reserved a
|
|
42
|
+
* bare mark's width, which is the collision the `logoInFlow` rule exists to
|
|
43
|
+
* prevent.
|
|
44
|
+
*/
|
|
45
|
+
logoVariant: import("vue").ComputedRef<import("../types.js").JunLogoVariant>;
|
|
46
|
+
/** True for the two vertical placements — the track then stacks. */
|
|
47
|
+
isRail: import("vue").ComputedRef<boolean>;
|
|
48
|
+
/** The vocabularies, so the settings page never keeps a second copy. */
|
|
49
|
+
vocab: {
|
|
50
|
+
PLACEMENTS: JunNavPlacement[];
|
|
51
|
+
SHAPES: JunNavShape[];
|
|
52
|
+
SIZES: JunNavSize[];
|
|
53
|
+
ITEM_MODES: JunNavItemMode[];
|
|
54
|
+
ACTIVE_STYLES: JunNavActiveStyle[];
|
|
55
|
+
LOGO_ACTIONS: JunNavLogoAction[];
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { useJunOptions } from "./useJunOptions.js";
|
|
3
|
+
import { useJunEffectiveConfig } from "./useJunSiteConfig.js";
|
|
4
|
+
const PLACEMENTS = ["top", "top-bar", "bottom", "rail-left", "rail-right"];
|
|
5
|
+
const SHAPES = ["pill", "rounded", "square", "ghost"];
|
|
6
|
+
const SIZES = ["sm", "md", "lg"];
|
|
7
|
+
const ITEM_MODES = ["text", "icon", "icon-focus", "icon-text", "icon-stack"];
|
|
8
|
+
const ACTIVE_STYLES = ["underline", "pill", "dot", "bold", "glow", "box", "bracket"];
|
|
9
|
+
const LOGO_VARIANTS = ["mark", "lockup", "wordmark"];
|
|
10
|
+
const LOGO_ACTIONS = ["home", "palette"];
|
|
11
|
+
export function useJunNavSettings() {
|
|
12
|
+
const { navigation, brand } = useJunOptions();
|
|
13
|
+
const config = useJunEffectiveConfig();
|
|
14
|
+
function pick(stored, allowed, fallback) {
|
|
15
|
+
return typeof stored === "string" && allowed.includes(stored) ? stored : fallback;
|
|
16
|
+
}
|
|
17
|
+
function flag(stored, fallback) {
|
|
18
|
+
return typeof stored === "boolean" ? stored : fallback;
|
|
19
|
+
}
|
|
20
|
+
const placement = computed(() => pick(config.value.navPlacement, PLACEMENTS, navigation.placement));
|
|
21
|
+
const shape = computed(() => pick(config.value.navShape, SHAPES, navigation.shape));
|
|
22
|
+
const size = computed(() => pick(config.value.navSize, SIZES, navigation.size));
|
|
23
|
+
const itemMode = computed(() => pick(config.value.navItemMode, ITEM_MODES, navigation.itemMode));
|
|
24
|
+
const activeStyle = computed(() => pick(config.value.navActiveStyle, ACTIVE_STYLES, navigation.activeStyle));
|
|
25
|
+
return {
|
|
26
|
+
placement,
|
|
27
|
+
shape,
|
|
28
|
+
size,
|
|
29
|
+
itemMode,
|
|
30
|
+
activeStyle,
|
|
31
|
+
autoHide: computed(() => flag(config.value.navAutoHide, navigation.autoHide)),
|
|
32
|
+
blur: computed(() => flag(config.value.navBlur, navigation.blur)),
|
|
33
|
+
homeItem: computed(() => flag(config.value.navHomeItem, navigation.homeItem)),
|
|
34
|
+
showLogo: computed(() => flag(config.value.navShowLogo, navigation.showLogo)),
|
|
35
|
+
/**
|
|
36
|
+
* What the logo does. `palette` makes the mark the way into search, which
|
|
37
|
+
* is why the search button is separately switchable — a site that has done
|
|
38
|
+
* that does not need two of them.
|
|
39
|
+
*/
|
|
40
|
+
logoAction: computed(() => pick(config.value.navLogoAction, LOGO_ACTIONS, navigation.logoAction)),
|
|
41
|
+
/** The search button in the right cluster. ⌘K is unaffected either way. */
|
|
42
|
+
searchButton: computed(() => flag(config.value.navSearchButton, navigation.searchButton)),
|
|
43
|
+
centerActive: computed(() => flag(config.value.navCenterActive, navigation.centerActive)),
|
|
44
|
+
showIndices: computed(() => flag(config.value.navShowIndices, navigation.showIndices)),
|
|
45
|
+
keyboardNav: computed(() => flag(config.value.navKeyboardNav, navigation.keyboardNav)),
|
|
46
|
+
freshnessDots: computed(() => flag(config.value.navFreshnessDots, navigation.freshnessDots)),
|
|
47
|
+
/**
|
|
48
|
+
* The fellow-travellers dot stack, and whether hovering it names them.
|
|
49
|
+
*
|
|
50
|
+
* Two switches rather than one because they disclose different things: the
|
|
51
|
+
* dots say how many people are here, the roster says who they are and what
|
|
52
|
+
* they are reading. Both default OFF.
|
|
53
|
+
*/
|
|
54
|
+
travellers: computed(() => flag(config.value.navTravellers, navigation.travellers)),
|
|
55
|
+
travellersList: computed(() => flag(config.value.navTravellersList, navigation.travellersList)),
|
|
56
|
+
/**
|
|
57
|
+
* Which `<JunLogo>` variant the navbar is showing. The navbar needs it for
|
|
58
|
+
* LAYOUT — a bare mark can float over the track on a fixed reserve, a
|
|
59
|
+
* lockup carrying the brand name cannot — so it reads the same key the
|
|
60
|
+
* logo does rather than being told by it.
|
|
61
|
+
*
|
|
62
|
+
* **Including the same build-time default.** A literal `'mark'` here was a
|
|
63
|
+
* disagreement waiting to happen: a site setting `brand.logoVariant:
|
|
64
|
+
* 'lockup'` would have rendered the name while the bar still reserved a
|
|
65
|
+
* bare mark's width, which is the collision the `logoInFlow` rule exists to
|
|
66
|
+
* prevent.
|
|
67
|
+
*/
|
|
68
|
+
logoVariant: computed(() => pick(config.value.brandLogoVariant, LOGO_VARIANTS, brand.logoVariant)),
|
|
69
|
+
/** True for the two vertical placements — the track then stacks. */
|
|
70
|
+
isRail: computed(() => placement.value === "rail-left" || placement.value === "rail-right"),
|
|
71
|
+
/** The vocabularies, so the settings page never keeps a second copy. */
|
|
72
|
+
vocab: { PLACEMENTS, SHAPES, SIZES, ITEM_MODES, ACTIVE_STYLES, LOGO_ACTIONS }
|
|
73
|
+
};
|
|
74
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useJunNodePanel — the document slideover, as a site-wide singleton.
|
|
3
|
+
*
|
|
4
|
+
* `@abraca/nuxt` ships `useNodePanel()` + `<ANodePanel>`, which load a child
|
|
5
|
+
* document's provider and stream it into a panel. That composable is
|
|
6
|
+
* per-caller, though: calling it inside a renderer would give every list its
|
|
7
|
+
* own panel state, and the panel would unmount the moment the page navigated.
|
|
8
|
+
*
|
|
9
|
+
* So the state lives here, module-scoped, the panel is mounted ONCE in the
|
|
10
|
+
* layout, and any surface — a context menu, a card click under
|
|
11
|
+
* `nodePanel: 'slideover'`, a keyboard shortcut — opens it through `open()`.
|
|
12
|
+
*
|
|
13
|
+
* > **Deliberately not `await`-blocking.** `openNode()` resolves after LOCAL
|
|
14
|
+
* > (IndexedDB) hydration and lets server content stream in afterwards.
|
|
15
|
+
* > Blocking on network `synced` is what made cold opens fail on slow
|
|
16
|
+
* > connections while cached documents appeared to work.
|
|
17
|
+
*/
|
|
18
|
+
import { type Ref } from 'vue';
|
|
19
|
+
interface PanelBinding {
|
|
20
|
+
openNodeId: Ref<string | null>;
|
|
21
|
+
openNodeLabel: Ref<string>;
|
|
22
|
+
openNodeProvider: Ref<unknown>;
|
|
23
|
+
isLoading: Ref<boolean>;
|
|
24
|
+
loadError: Ref<string | null>;
|
|
25
|
+
openNode: (id: string, label: string) => Promise<void>;
|
|
26
|
+
closePanel: () => void;
|
|
27
|
+
retry: () => void;
|
|
28
|
+
}
|
|
29
|
+
export declare function useJunNodePanel(): {
|
|
30
|
+
openId: Ref<string | null, string | null>;
|
|
31
|
+
openLabel: Ref<string, string>;
|
|
32
|
+
open: (docId: string, label?: string) => Promise<void>;
|
|
33
|
+
close: () => void;
|
|
34
|
+
isOpen: Ref<string | null, string | null>;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Internal: called by `<JunNodePanel>` once, to publish its binding and drain
|
|
38
|
+
* whatever was requested before it mounted.
|
|
39
|
+
*/
|
|
40
|
+
export declare function useJunNodePanelHost(): PanelBinding;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ref, shallowRef, watch } from "vue";
|
|
2
|
+
import { useAbracadabra, useNodePanel } from "#imports";
|
|
3
|
+
const openId = ref(null);
|
|
4
|
+
const openLabel = ref("");
|
|
5
|
+
const binding = shallowRef(null);
|
|
6
|
+
const pending = ref(null);
|
|
7
|
+
export function useJunNodePanel() {
|
|
8
|
+
async function open(docId, label = "") {
|
|
9
|
+
openId.value = docId;
|
|
10
|
+
openLabel.value = label;
|
|
11
|
+
if (binding.value) await binding.value.openNode(docId, label);
|
|
12
|
+
else pending.value = { id: docId, label };
|
|
13
|
+
}
|
|
14
|
+
function close() {
|
|
15
|
+
openId.value = null;
|
|
16
|
+
openLabel.value = "";
|
|
17
|
+
pending.value = null;
|
|
18
|
+
binding.value?.closePanel();
|
|
19
|
+
}
|
|
20
|
+
return { openId, openLabel, open, close, isOpen: openId };
|
|
21
|
+
}
|
|
22
|
+
export function useJunNodePanelHost() {
|
|
23
|
+
const abra = useAbracadabra();
|
|
24
|
+
const panel = useNodePanel(abra.provider);
|
|
25
|
+
binding.value = panel;
|
|
26
|
+
watch(panel.openNodeId, (id) => {
|
|
27
|
+
openId.value = id;
|
|
28
|
+
if (!id) openLabel.value = "";
|
|
29
|
+
});
|
|
30
|
+
if (pending.value) {
|
|
31
|
+
const { id, label } = pending.value;
|
|
32
|
+
pending.value = null;
|
|
33
|
+
void panel.openNode(id, label);
|
|
34
|
+
}
|
|
35
|
+
return panel;
|
|
36
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function useJunOpenDoc(): {
|
|
2
|
+
open: (docId: string, label?: string) => void;
|
|
3
|
+
peek: (docId: string, label?: string) => void;
|
|
4
|
+
navigate: (docId: string) => void;
|
|
5
|
+
onActivate: (e: MouseEvent, docId: string, label?: string) => void;
|
|
6
|
+
slideoverAvailable: boolean;
|
|
7
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useRouter } from "vue-router";
|
|
2
|
+
import { useDocSlugs } from "#imports";
|
|
3
|
+
import { useJunNodePanel } from "./useJunNodePanel.js";
|
|
4
|
+
import { useJunOptions } from "./useJunOptions.js";
|
|
5
|
+
export function useJunOpenDoc() {
|
|
6
|
+
const router = useRouter();
|
|
7
|
+
const { getDocUrl } = useDocSlugs();
|
|
8
|
+
const { nodePanel, features } = useJunOptions();
|
|
9
|
+
const panel = useJunNodePanel();
|
|
10
|
+
const slideoverAvailable = features.slideover !== false;
|
|
11
|
+
function navigate(docId) {
|
|
12
|
+
const to = getDocUrl(docId);
|
|
13
|
+
if (to) void router.push(to);
|
|
14
|
+
}
|
|
15
|
+
function peek(docId, label = "") {
|
|
16
|
+
if (!slideoverAvailable) return navigate(docId);
|
|
17
|
+
void panel.open(docId, label);
|
|
18
|
+
}
|
|
19
|
+
function open(docId, label = "") {
|
|
20
|
+
if (nodePanel === "slideover" && slideoverAvailable) peek(docId, label);
|
|
21
|
+
else navigate(docId);
|
|
22
|
+
}
|
|
23
|
+
function onActivate(e, docId, label = "") {
|
|
24
|
+
if (e.button !== 0 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey) return;
|
|
25
|
+
if (nodePanel !== "slideover" || !slideoverAvailable) return;
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
peek(docId, label);
|
|
28
|
+
}
|
|
29
|
+
return { open, peek, navigate, onActivate, slideoverAvailable };
|
|
30
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { JunPageTypeKey, JunRuntimeOptions } from '../types.js';
|
|
2
|
+
/** The whole resolved option set. Most call sites want one of the readers below. */
|
|
3
|
+
export declare function useJunOptions(): JunRuntimeOptions;
|
|
4
|
+
/** Site identity — name, tagline, logo component, theme colour. */
|
|
5
|
+
export declare function useJunBrand(): import("vue").ComputedRef<{
|
|
6
|
+
name: string;
|
|
7
|
+
tagline: string;
|
|
8
|
+
seoDescription: string;
|
|
9
|
+
avatar: string;
|
|
10
|
+
logoMark: import("../types.js").JunLogoMark;
|
|
11
|
+
logoVariant: import("../types.js").JunLogoVariant;
|
|
12
|
+
themeColor: string;
|
|
13
|
+
schemaType: import("../types.js").JunBrand["schemaType"];
|
|
14
|
+
}>;
|
|
15
|
+
/** Site-wide feature flags. */
|
|
16
|
+
export declare function useJunFeatures(): import("vue").ComputedRef<Required<import("../types.js").JunFeatures>>;
|
|
17
|
+
/**
|
|
18
|
+
* Page-type layout policy — the single source of truth for how a doc type lays
|
|
19
|
+
* out, shared by the pages, the navigation and the backdrop so they can never
|
|
20
|
+
* drift.
|
|
21
|
+
*
|
|
22
|
+
* Unknown types are FLOWING on purpose: an unregistered type falls back to the
|
|
23
|
+
* module's editor, which flows, and locking it would clip it under the nav.
|
|
24
|
+
*/
|
|
25
|
+
export declare function useJunLayoutPolicy(): {
|
|
26
|
+
/** Canvas pages — renderer fills the viewport, navbar floats over it as a pill. */
|
|
27
|
+
isImmersiveType: (t?: string | null) => boolean;
|
|
28
|
+
/** Structured full-size pages — navbar docks full-width, renderer fills below it. */
|
|
29
|
+
isPanelType: (t?: string | null) => boolean;
|
|
30
|
+
/** Any viewport-bound page: the renderer owns scroll and the body lock applies. */
|
|
31
|
+
isLockedType: (t?: string | null) => boolean;
|
|
32
|
+
/** Any page that flows with the document: page scroll, nav auto-hides. */
|
|
33
|
+
isFlowingType: (t?: string | null) => boolean;
|
|
34
|
+
/** Editorial pages that flow full-width and manage their own inner width. */
|
|
35
|
+
isFeedType: (t?: string | null) => boolean;
|
|
36
|
+
/** Detail pages that carry their own column width AND horizontal padding. */
|
|
37
|
+
isSelfPaddedType: (t?: string | null) => boolean;
|
|
38
|
+
/** Reading width for flowing editor content. */
|
|
39
|
+
editorMaxW: (t?: string | null) => string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Resolve a document's stored type to the canonical registered one, applying
|
|
43
|
+
* `pageTypeAliases`. Every consumer that switches on a page type must go
|
|
44
|
+
* through this, or an adopted corpus renders as plain documents.
|
|
45
|
+
*/
|
|
46
|
+
export declare function useJunPageType(): {
|
|
47
|
+
resolveType: (t?: string | null) => string | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* The registered type id for a page-type KEY — `'entry'` → `'jun-entry'`.
|
|
50
|
+
*
|
|
51
|
+
* Every renderer that creates a child of another type goes through this
|
|
52
|
+
* rather than writing the id inline: a site may remap a type through
|
|
53
|
+
* `pageTypes.entry.type`, and a hard-coded `'jun-entry'` would then create
|
|
54
|
+
* children no renderer claims. Returns `undefined` when the type is
|
|
55
|
+
* disabled, which is also the "is it on?" check — a feed whose detail type
|
|
56
|
+
* is switched off should not offer to create one.
|
|
57
|
+
*/
|
|
58
|
+
typeIdFor: (key: JunPageTypeKey) => string | undefined;
|
|
59
|
+
isJunType: (t?: string | null) => boolean;
|
|
60
|
+
/** The registered display name for a type — "Journal", not "jun-journal". */
|
|
61
|
+
labelForType: (t?: string | null) => string | undefined;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* A document's icon: `meta.icon` wins, then its registered page type, then a
|
|
65
|
+
* plain file. Use this rather than the bare `iconForDocType` util — it layers
|
|
66
|
+
* in the site's own `jun-*` registrations, including any label/icon overrides.
|
|
67
|
+
*/
|
|
68
|
+
export declare function useJunDocIcon(): (type?: string | null, metaIcon?: string | null) => string;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { useRuntimeConfig } from "#app";
|
|
3
|
+
import { iconForDocType } from "../utils/junDocTypeIcons.js";
|
|
4
|
+
export function useJunOptions() {
|
|
5
|
+
return useRuntimeConfig().public.jun;
|
|
6
|
+
}
|
|
7
|
+
export function useJunBrand() {
|
|
8
|
+
const opts = useJunOptions();
|
|
9
|
+
return computed(() => opts.brand);
|
|
10
|
+
}
|
|
11
|
+
export function useJunFeatures() {
|
|
12
|
+
const opts = useJunOptions();
|
|
13
|
+
return computed(() => opts.features);
|
|
14
|
+
}
|
|
15
|
+
export function useJunLayoutPolicy() {
|
|
16
|
+
const opts = useJunOptions();
|
|
17
|
+
const immersive = (t) => !!t && opts.layout.immersive.includes(t);
|
|
18
|
+
const panel = (t) => !!t && opts.layout.panel.includes(t);
|
|
19
|
+
const locked = (t) => immersive(t) || panel(t);
|
|
20
|
+
return {
|
|
21
|
+
/** Canvas pages — renderer fills the viewport, navbar floats over it as a pill. */
|
|
22
|
+
isImmersiveType: immersive,
|
|
23
|
+
/** Structured full-size pages — navbar docks full-width, renderer fills below it. */
|
|
24
|
+
isPanelType: panel,
|
|
25
|
+
/** Any viewport-bound page: the renderer owns scroll and the body lock applies. */
|
|
26
|
+
isLockedType: locked,
|
|
27
|
+
/** Any page that flows with the document: page scroll, nav auto-hides. */
|
|
28
|
+
isFlowingType: (t) => !locked(t),
|
|
29
|
+
/** Editorial pages that flow full-width and manage their own inner width. */
|
|
30
|
+
isFeedType: (t) => !!t && opts.layout.feed.includes(t),
|
|
31
|
+
/** Detail pages that carry their own column width AND horizontal padding. */
|
|
32
|
+
isSelfPaddedType: (t) => !!t && opts.layout.selfPadded.includes(t),
|
|
33
|
+
/** Reading width for flowing editor content. */
|
|
34
|
+
editorMaxW: (t) => t && opts.layout.readingWidth[t] || opts.layout.readingWidth.default || "max-w-6xl"
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function useJunPageType() {
|
|
38
|
+
const opts = useJunOptions();
|
|
39
|
+
const resolveType = (t) => t ? opts.pageTypeAliases[t] ?? t : void 0;
|
|
40
|
+
return {
|
|
41
|
+
resolveType,
|
|
42
|
+
/**
|
|
43
|
+
* The registered type id for a page-type KEY — `'entry'` → `'jun-entry'`.
|
|
44
|
+
*
|
|
45
|
+
* Every renderer that creates a child of another type goes through this
|
|
46
|
+
* rather than writing the id inline: a site may remap a type through
|
|
47
|
+
* `pageTypes.entry.type`, and a hard-coded `'jun-entry'` would then create
|
|
48
|
+
* children no renderer claims. Returns `undefined` when the type is
|
|
49
|
+
* disabled, which is also the "is it on?" check — a feed whose detail type
|
|
50
|
+
* is switched off should not offer to create one.
|
|
51
|
+
*/
|
|
52
|
+
typeIdFor: (key) => opts.typeIds[key],
|
|
53
|
+
isJunType: (t) => {
|
|
54
|
+
const resolved = resolveType(t);
|
|
55
|
+
return !!resolved && opts.pageTypes.includes(resolved);
|
|
56
|
+
},
|
|
57
|
+
/** The registered display name for a type — "Journal", not "jun-journal". */
|
|
58
|
+
labelForType: (t) => {
|
|
59
|
+
const resolved = resolveType(t);
|
|
60
|
+
return resolved ? opts.typeLabels[resolved] : void 0;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export function useJunDocIcon() {
|
|
65
|
+
const opts = useJunOptions();
|
|
66
|
+
const { resolveType } = useJunPageType();
|
|
67
|
+
return (type, metaIcon) => iconForDocType(resolveType(type), metaIcon, opts.typeIcons);
|
|
68
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the backdrop should be HEADING — set by `useJunThemeTransition` before
|
|
3
|
+
* the committed colour mode flips, so the blobs lerp to the new palette first
|
|
4
|
+
* and the chrome switches after. `null` means "follow the committed mode
|
|
5
|
+
* directly", which is what a system-level change does.
|
|
6
|
+
*/
|
|
7
|
+
export declare const themeTarget: import("vue").Ref<"light" | "dark" | null, "light" | "dark" | null>;
|
|
8
|
+
/** Duration of the per-route and per-mode colour LERP. */
|
|
9
|
+
export declare const LERP_DURATION_MS = 900;
|
|
10
|
+
export declare function useJunPalette(pageType?: () => string | null | undefined): {
|
|
11
|
+
blobA: import("vue").Ref<string, string>;
|
|
12
|
+
blobB: import("vue").Ref<string, string>;
|
|
13
|
+
fogA: import("vue").Ref<string, string>;
|
|
14
|
+
fogB: import("vue").Ref<string, string>;
|
|
15
|
+
paletteName: import("vue").ComputedRef<string>;
|
|
16
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { computed, ref, watch } from "vue";
|
|
2
|
+
import { useRoute } from "#imports";
|
|
3
|
+
import { useJunColorMode } from "./useJunColorMode.js";
|
|
4
|
+
import { useJunOptions } from "./useJunOptions.js";
|
|
5
|
+
export const themeTarget = ref(null);
|
|
6
|
+
export const LERP_DURATION_MS = 900;
|
|
7
|
+
function hexToRgb(hex) {
|
|
8
|
+
const h = hex.replace("#", "");
|
|
9
|
+
const n = Number.parseInt(h.length === 3 ? h.split("").map((c) => c + c).join("") : h, 16);
|
|
10
|
+
return [n >> 16 & 255, n >> 8 & 255, n & 255];
|
|
11
|
+
}
|
|
12
|
+
function rgbToHex(r, g, b) {
|
|
13
|
+
const c = (v) => Math.max(0, Math.min(255, Math.round(v))).toString(16).padStart(2, "0");
|
|
14
|
+
return `#${c(r)}${c(g)}${c(b)}`;
|
|
15
|
+
}
|
|
16
|
+
function lerpHex(a, b, t) {
|
|
17
|
+
const [ar, ag, ab] = hexToRgb(a);
|
|
18
|
+
const [br, bg, bb] = hexToRgb(b);
|
|
19
|
+
return rgbToHex(ar + (br - ar) * t, ag + (bg - ag) * t, ab + (bb - ab) * t);
|
|
20
|
+
}
|
|
21
|
+
function ease(t) {
|
|
22
|
+
return t * t * (3 - 2 * t);
|
|
23
|
+
}
|
|
24
|
+
export function useJunPalette(pageType) {
|
|
25
|
+
const route = useRoute();
|
|
26
|
+
const { palettes, paletteMap } = useJunOptions();
|
|
27
|
+
const colorMode = useJunColorMode();
|
|
28
|
+
const effectiveMode = computed(() => themeTarget.value ?? colorMode.value);
|
|
29
|
+
const paletteName = computed(() => {
|
|
30
|
+
const type = pageType?.();
|
|
31
|
+
if (type && paletteMap[type]) return paletteMap[type];
|
|
32
|
+
if (route.path === "/" && paletteMap["/"]) return paletteMap["/"];
|
|
33
|
+
return "subtle";
|
|
34
|
+
});
|
|
35
|
+
function resolve(name, mode) {
|
|
36
|
+
const set = palettes[name] ?? palettes.subtle;
|
|
37
|
+
return mode === "dark" ? set.dark : set.light;
|
|
38
|
+
}
|
|
39
|
+
const initial = resolve(paletteName.value, effectiveMode.value);
|
|
40
|
+
const blobA = ref(initial.blobA);
|
|
41
|
+
const blobB = ref(initial.blobB);
|
|
42
|
+
const fogA = ref(initial.fogA);
|
|
43
|
+
const fogB = ref(initial.fogB);
|
|
44
|
+
let raf = null;
|
|
45
|
+
function animateTo(target) {
|
|
46
|
+
if (raf !== null && typeof window !== "undefined") {
|
|
47
|
+
cancelAnimationFrame(raf);
|
|
48
|
+
raf = null;
|
|
49
|
+
}
|
|
50
|
+
const from = {
|
|
51
|
+
blobA: blobA.value,
|
|
52
|
+
blobB: blobB.value,
|
|
53
|
+
fogA: fogA.value,
|
|
54
|
+
fogB: fogB.value
|
|
55
|
+
};
|
|
56
|
+
const start = typeof performance !== "undefined" ? performance.now() : Date.now();
|
|
57
|
+
function step(now) {
|
|
58
|
+
const t = Math.min(1, (now - start) / LERP_DURATION_MS);
|
|
59
|
+
const e = ease(t);
|
|
60
|
+
blobA.value = lerpHex(from.blobA, target.blobA, e);
|
|
61
|
+
blobB.value = lerpHex(from.blobB, target.blobB, e);
|
|
62
|
+
fogA.value = lerpHex(from.fogA, target.fogA, e);
|
|
63
|
+
fogB.value = lerpHex(from.fogB, target.fogB, e);
|
|
64
|
+
if (t < 1 && typeof window !== "undefined") raf = requestAnimationFrame(step);
|
|
65
|
+
else raf = null;
|
|
66
|
+
}
|
|
67
|
+
if (typeof window !== "undefined") raf = requestAnimationFrame(step);
|
|
68
|
+
}
|
|
69
|
+
watch(paletteName, (name) => animateTo(resolve(name, effectiveMode.value)));
|
|
70
|
+
watch(effectiveMode, (mode) => animateTo(resolve(paletteName.value, mode)));
|
|
71
|
+
return { blobA, blobB, fogA, fogB, paletteName };
|
|
72
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useJunPeopleAdmin — the owner's authority over the people at the fire.
|
|
3
|
+
*
|
|
4
|
+
* A public Abracadabra site pins every visitor to `viewer` through
|
|
5
|
+
* `[access].authenticated`: read and presence, no write. That is the right
|
|
6
|
+
* default and it is what makes the site safe to leave open — but it means the
|
|
7
|
+
* only way to promote a reader to a contributor has been a SQL statement or
|
|
8
|
+
* another application. The roster already knows who is here; this gives the
|
|
9
|
+
* owner the one thing that was missing beside each name.
|
|
10
|
+
*
|
|
11
|
+
* ## What a grant actually does
|
|
12
|
+
*
|
|
13
|
+
* A permission row on the SPACE ROOT, which cascades to every document under
|
|
14
|
+
* it — the same cascade the campfire channel's `public_access` rides. The
|
|
15
|
+
* server's own rules apply and are not re-implemented here:
|
|
16
|
+
*
|
|
17
|
+
* - It requires **Owner** on the target document. The studio owner has that;
|
|
18
|
+
* a visitor calling this would be refused by the server, which is why the
|
|
19
|
+
* UI gate is convenience and the server gate is the security.
|
|
20
|
+
* - **`admin` and `service` are not offered.** The server refuses to grant an
|
|
21
|
+
* elevated role to anyone but a root admin, so offering them would be
|
|
22
|
+
* offering a button that fails. A site owner who needs one has the server.
|
|
23
|
+
* - Revoking removes the row; the person falls back to whatever
|
|
24
|
+
* `[access].authenticated` says, which is normally `viewer`. It is not a
|
|
25
|
+
* ban — there is no such thing here, and pretending otherwise in a menu
|
|
26
|
+
* would be worse than not offering it.
|
|
27
|
+
*
|
|
28
|
+
* ## The identity caveat, stated plainly
|
|
29
|
+
*
|
|
30
|
+
* A grant is keyed on the public key awareness carries, which is the DEVICE
|
|
31
|
+
* keystore key. For a soft identity — every ordinary visitor to a site built on
|
|
32
|
+
* this module, since the SDK mints and registers a keypair per browser — that
|
|
33
|
+
* key IS the account, so the grant lands on the right principal. For someone
|
|
34
|
+
* who signed in with a password on a device with its own keypair, the two
|
|
35
|
+
* differ, and the grant would be written against a key the JWT never presents.
|
|
36
|
+
*
|
|
37
|
+
* There is no endpoint that resolves a device key back to its account, so this
|
|
38
|
+
* cannot be papered over from the client. `refresh()` therefore reads the
|
|
39
|
+
* permissions back after every write and the roster shows what the SERVER
|
|
40
|
+
* stores, not what was asked for: a grant that did not land where the owner
|
|
41
|
+
* expected shows up as a row that never appears next to that person.
|
|
42
|
+
*/
|
|
43
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
44
|
+
/** The roles a site owner may hand out. See the header for the two it may not. */
|
|
45
|
+
export type JunPersonRole = 'owner' | 'editor' | 'viewer' | 'observer';
|
|
46
|
+
export declare const JUN_PERSON_ROLES: {
|
|
47
|
+
value: JunPersonRole;
|
|
48
|
+
label: string;
|
|
49
|
+
hint: string;
|
|
50
|
+
icon: string;
|
|
51
|
+
}[];
|
|
52
|
+
export interface JunPersonGrant {
|
|
53
|
+
role: string;
|
|
54
|
+
/** The server's own name for the account, when it has one. */
|
|
55
|
+
username: string;
|
|
56
|
+
}
|
|
57
|
+
export declare function useJunPeopleAdmin(): {
|
|
58
|
+
/** Owner sessions only. Everything else here no-ops for a visitor. */
|
|
59
|
+
canAdmin: ComputedRef<boolean>;
|
|
60
|
+
/** Public key → the permission row stored on the space root, if any. */
|
|
61
|
+
grants: Ref<Record<string, JunPersonGrant>>;
|
|
62
|
+
/** The key currently being written, so its row can show progress. */
|
|
63
|
+
busy: Ref<string>;
|
|
64
|
+
/** True once a read has completed — "no grants" and "not looked yet" differ. */
|
|
65
|
+
loaded: Ref<boolean>;
|
|
66
|
+
refresh: () => Promise<void>;
|
|
67
|
+
setRole: (userId: string, role: JunPersonRole) => Promise<void>;
|
|
68
|
+
revoke: (userId: string) => Promise<void>;
|
|
69
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { computed, ref } from "vue";
|
|
2
|
+
import { useAbracadabra, useToast } from "#imports";
|
|
3
|
+
import { useJunStudio } from "./useJunStudio.js";
|
|
4
|
+
export const JUN_PERSON_ROLES = [
|
|
5
|
+
{ value: "owner", label: "Owner", hint: "Everything, including permissions", icon: "i-lucide-crown" },
|
|
6
|
+
{ value: "editor", label: "Editor", hint: "Write pages and upload files", icon: "i-lucide-pencil-line" },
|
|
7
|
+
{ value: "viewer", label: "Viewer", hint: "Read, and be seen in presence", icon: "i-lucide-eye" },
|
|
8
|
+
{ value: "observer", label: "Observer", hint: "Read only \u2014 no presence at all", icon: "i-lucide-glasses" }
|
|
9
|
+
];
|
|
10
|
+
export function useJunPeopleAdmin() {
|
|
11
|
+
const abra = useAbracadabra();
|
|
12
|
+
const { canEdit } = useJunStudio();
|
|
13
|
+
const toast = useToast();
|
|
14
|
+
const grants = ref({});
|
|
15
|
+
const busy = ref("");
|
|
16
|
+
const loaded = ref(false);
|
|
17
|
+
const canAdmin = computed(() => canEdit.value === true && !!abra.spaceDocId.value);
|
|
18
|
+
function client() {
|
|
19
|
+
return abra.client.value ?? null;
|
|
20
|
+
}
|
|
21
|
+
async function refresh() {
|
|
22
|
+
const c = client();
|
|
23
|
+
const root = abra.spaceDocId.value;
|
|
24
|
+
if (!canAdmin.value || !c?.listPermissions || !root) return;
|
|
25
|
+
try {
|
|
26
|
+
const rows = await c.listPermissions(root);
|
|
27
|
+
const next = {};
|
|
28
|
+
for (const row of rows) {
|
|
29
|
+
if (row?.user_id) next[row.user_id] = { role: row.role, username: row.username ?? "" };
|
|
30
|
+
}
|
|
31
|
+
grants.value = next;
|
|
32
|
+
loaded.value = true;
|
|
33
|
+
} catch {
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
async function write(userId, run, done) {
|
|
37
|
+
const c = client();
|
|
38
|
+
const root = abra.spaceDocId.value;
|
|
39
|
+
if (!canAdmin.value || !c || !root || !userId || busy.value) return;
|
|
40
|
+
busy.value = userId;
|
|
41
|
+
try {
|
|
42
|
+
await run(c, root);
|
|
43
|
+
await refresh();
|
|
44
|
+
toast.add({ title: done, icon: "i-lucide-check", color: "success" });
|
|
45
|
+
} catch (err) {
|
|
46
|
+
toast.add({
|
|
47
|
+
title: "That did not go through",
|
|
48
|
+
description: err?.message || "The server refused the change.",
|
|
49
|
+
icon: "i-lucide-circle-x",
|
|
50
|
+
color: "error"
|
|
51
|
+
});
|
|
52
|
+
} finally {
|
|
53
|
+
busy.value = "";
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
async function setRole(userId, role) {
|
|
57
|
+
await write(
|
|
58
|
+
userId,
|
|
59
|
+
(c, root) => c.setPermission?.(root, { user_id: userId, role }) ?? Promise.resolve(),
|
|
60
|
+
// "an owner", "an editor", "a viewer", "an observer" — by the vowel, not
|
|
61
|
+
// by a list, so a role added later reads correctly without a second edit.
|
|
62
|
+
`Now ${/^[aeiou]/.test(role) ? "an" : "a"} ${role}`
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
async function revoke(userId) {
|
|
66
|
+
await write(
|
|
67
|
+
userId,
|
|
68
|
+
(c, root) => c.removePermission?.(root, { user_id: userId }) ?? Promise.resolve(),
|
|
69
|
+
"Back to the site default"
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
return { canAdmin, grants, busy, loaded, refresh, setRole, revoke };
|
|
73
|
+
}
|