@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,29 @@
|
|
|
1
|
+
import { type JunTransportMode } from '../utils/junTransportModes.js';
|
|
2
|
+
export interface GeoPoint {
|
|
3
|
+
lng: number;
|
|
4
|
+
lat: number;
|
|
5
|
+
}
|
|
6
|
+
export interface GeoResult {
|
|
7
|
+
label: string;
|
|
8
|
+
lng: number;
|
|
9
|
+
lat: number;
|
|
10
|
+
}
|
|
11
|
+
export interface RouteResult {
|
|
12
|
+
coords: [number, number][];
|
|
13
|
+
km: number;
|
|
14
|
+
/** Travel minutes. Zero for a great-circle arc, which has no duration estimate. */
|
|
15
|
+
min: number;
|
|
16
|
+
snapped: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A spherical great-circle arc between two points.
|
|
20
|
+
*
|
|
21
|
+
* The running `prevLng` unwrap is what stops a leg crossing the antimeridian
|
|
22
|
+
* from drawing all the way back around the globe.
|
|
23
|
+
*/
|
|
24
|
+
export declare function greatCircleArc(a: GeoPoint, b: GeoPoint, steps?: number): [number, number][];
|
|
25
|
+
export declare function useJunRouting(): {
|
|
26
|
+
geocode: (query: string) => Promise<GeoResult[]>;
|
|
27
|
+
reverseGeocode: (lng: number, lat: number) => Promise<string>;
|
|
28
|
+
directions: (mode: JunTransportMode, from: GeoPoint, to: GeoPoint) => Promise<RouteResult>;
|
|
29
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { junMapboxToken } from "../utils/junMapboxToken.js";
|
|
3
|
+
import { profileFor } from "../utils/junTransportModes.js";
|
|
4
|
+
import { junSimplifyPath } from "../utils/junSimplifyPath.js";
|
|
5
|
+
const EARTH_KM = 6371;
|
|
6
|
+
function haversineKm(a, b) {
|
|
7
|
+
const r = Math.PI / 180;
|
|
8
|
+
const dLat = (b.lat - a.lat) * r;
|
|
9
|
+
const dLng = (b.lng - a.lng) * r;
|
|
10
|
+
const h = Math.sin(dLat / 2) ** 2 + Math.cos(a.lat * r) * Math.cos(b.lat * r) * Math.sin(dLng / 2) ** 2;
|
|
11
|
+
return 2 * EARTH_KM * Math.asin(Math.min(1, Math.sqrt(h)));
|
|
12
|
+
}
|
|
13
|
+
export function greatCircleArc(a, b, steps = 48) {
|
|
14
|
+
const toR = Math.PI / 180;
|
|
15
|
+
const lat1 = a.lat * toR;
|
|
16
|
+
const lon1 = a.lng * toR;
|
|
17
|
+
const lat2 = b.lat * toR;
|
|
18
|
+
const lon2 = b.lng * toR;
|
|
19
|
+
const d = 2 * Math.asin(Math.sqrt(
|
|
20
|
+
Math.sin((lat2 - lat1) / 2) ** 2 + Math.cos(lat1) * Math.cos(lat2) * Math.sin((lon2 - lon1) / 2) ** 2
|
|
21
|
+
));
|
|
22
|
+
if (d === 0) return [[a.lng, a.lat], [b.lng, b.lat]];
|
|
23
|
+
const pts = [];
|
|
24
|
+
let prevLng = null;
|
|
25
|
+
for (let i = 0; i <= steps; i++) {
|
|
26
|
+
const f = i / steps;
|
|
27
|
+
const A = Math.sin((1 - f) * d) / Math.sin(d);
|
|
28
|
+
const B = Math.sin(f * d) / Math.sin(d);
|
|
29
|
+
const x = A * Math.cos(lat1) * Math.cos(lon1) + B * Math.cos(lat2) * Math.cos(lon2);
|
|
30
|
+
const y = A * Math.cos(lat1) * Math.sin(lon1) + B * Math.cos(lat2) * Math.sin(lon2);
|
|
31
|
+
const z = A * Math.sin(lat1) + B * Math.sin(lat2);
|
|
32
|
+
const lat = Math.atan2(z, Math.sqrt(x * x + y * y)) / toR;
|
|
33
|
+
let lng = Math.atan2(y, x) / toR;
|
|
34
|
+
if (prevLng !== null) {
|
|
35
|
+
while (lng - prevLng > 180) lng -= 360;
|
|
36
|
+
while (lng - prevLng < -180) lng += 360;
|
|
37
|
+
}
|
|
38
|
+
prevLng = lng;
|
|
39
|
+
pts.push([lng, lat]);
|
|
40
|
+
}
|
|
41
|
+
return pts;
|
|
42
|
+
}
|
|
43
|
+
export function useJunRouting() {
|
|
44
|
+
const token = computed(() => junMapboxToken());
|
|
45
|
+
async function geocode(query) {
|
|
46
|
+
const q = query.trim();
|
|
47
|
+
if (!q || !token.value) return [];
|
|
48
|
+
try {
|
|
49
|
+
const url = `https://api.mapbox.com/search/geocode/v6/forward?q=${encodeURIComponent(q)}&limit=5&access_token=${token.value}`;
|
|
50
|
+
const data = await $fetch(url);
|
|
51
|
+
return (data.features ?? []).filter((f) => f.geometry?.coordinates).map((f) => ({
|
|
52
|
+
label: f.properties?.full_address || f.properties?.name || q,
|
|
53
|
+
lng: f.geometry.coordinates[0],
|
|
54
|
+
lat: f.geometry.coordinates[1]
|
|
55
|
+
}));
|
|
56
|
+
} catch {
|
|
57
|
+
return [];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
async function reverseGeocode(lng, lat) {
|
|
61
|
+
if (!token.value) return "";
|
|
62
|
+
try {
|
|
63
|
+
const url = `https://api.mapbox.com/search/geocode/v6/reverse?longitude=${lng}&latitude=${lat}&limit=1&access_token=${token.value}`;
|
|
64
|
+
const data = await $fetch(url);
|
|
65
|
+
const f = data.features?.[0];
|
|
66
|
+
return f?.properties?.name || f?.properties?.full_address || "";
|
|
67
|
+
} catch {
|
|
68
|
+
return "";
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
async function directions(mode, from, to) {
|
|
72
|
+
const profile = profileFor(mode);
|
|
73
|
+
const fallback = () => ({
|
|
74
|
+
coords: greatCircleArc(from, to),
|
|
75
|
+
km: haversineKm(from, to),
|
|
76
|
+
min: 0,
|
|
77
|
+
snapped: false
|
|
78
|
+
});
|
|
79
|
+
if (!profile || !token.value) return fallback();
|
|
80
|
+
try {
|
|
81
|
+
const coordPair = `${from.lng},${from.lat};${to.lng},${to.lat}`;
|
|
82
|
+
const url = `https://api.mapbox.com/directions/v5/mapbox/${profile}/${coordPair}?geometries=geojson&overview=full&access_token=${token.value}`;
|
|
83
|
+
const data = await $fetch(url);
|
|
84
|
+
const r = data.routes?.[0];
|
|
85
|
+
if (!r?.geometry?.coordinates?.length) return fallback();
|
|
86
|
+
return {
|
|
87
|
+
// `overview=full` returns every road vertex — thousands of points on a
|
|
88
|
+
// long leg. Simplify BEFORE it ever reaches `meta.routeGeo`: at globe
|
|
89
|
+
// zoom the shape is indistinguishable and the document stays light.
|
|
90
|
+
// See `useJunRouteGeoHeal` for what happens when this guard is missing.
|
|
91
|
+
coords: junSimplifyPath(r.geometry.coordinates),
|
|
92
|
+
km: r.distance / 1e3,
|
|
93
|
+
min: r.duration / 60,
|
|
94
|
+
snapped: true
|
|
95
|
+
};
|
|
96
|
+
} catch {
|
|
97
|
+
return fallback();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return { geocode, reverseGeocode, directions };
|
|
101
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ref } from "vue";
|
|
2
|
+
const open = ref(false);
|
|
3
|
+
export function useJunSearch() {
|
|
4
|
+
return {
|
|
5
|
+
open,
|
|
6
|
+
openSearch: () => {
|
|
7
|
+
open.value = true;
|
|
8
|
+
},
|
|
9
|
+
closeSearch: () => {
|
|
10
|
+
open.value = false;
|
|
11
|
+
},
|
|
12
|
+
toggleSearch: () => {
|
|
13
|
+
open.value = !open.value;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useJunSelfId(): import("vue").ComputedRef<string>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { useAbracadabra } from "#imports";
|
|
3
|
+
let memoToken = null;
|
|
4
|
+
let memoSub = "";
|
|
5
|
+
function subOf(token) {
|
|
6
|
+
if (token === memoToken) return memoSub;
|
|
7
|
+
memoToken = token;
|
|
8
|
+
memoSub = "";
|
|
9
|
+
const payload = token.split(".")[1];
|
|
10
|
+
if (payload) {
|
|
11
|
+
try {
|
|
12
|
+
const claims = JSON.parse(
|
|
13
|
+
atob(payload.replace(/-/g, "+").replace(/_/g, "/"))
|
|
14
|
+
);
|
|
15
|
+
if (typeof claims.sub === "string") memoSub = claims.sub;
|
|
16
|
+
} catch {
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return memoSub;
|
|
20
|
+
}
|
|
21
|
+
export function useJunSelfId() {
|
|
22
|
+
const abra = useAbracadabra();
|
|
23
|
+
return computed(() => {
|
|
24
|
+
const token = abra.client.value?.token;
|
|
25
|
+
const sub = typeof token === "string" ? subOf(token) : "";
|
|
26
|
+
return sub || abra.publicKeyB64.value || "";
|
|
27
|
+
});
|
|
28
|
+
}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useJunSiteConfig — the site's configuration, itself a document.
|
|
3
|
+
*
|
|
4
|
+
* > **The `Jun` prefix is load-bearing.** `nuxt-site-config` (pulled in by
|
|
5
|
+
* > `nuxt-og-image`, among others) auto-imports its own `useSiteConfig`, which
|
|
6
|
+
* > shadows an unprefixed composable of that name and crashes SSR with "Cannot
|
|
7
|
+
* > read properties of undefined". Do not rename this to `useSiteConfig`.
|
|
8
|
+
*
|
|
9
|
+
* The config lives in a hidden document that MUST be a true child of the space
|
|
10
|
+
* root (`parentId === spaceDocId`) — the website IS a space, and every
|
|
11
|
+
* document, config included, hangs off the space document. It is flagged
|
|
12
|
+
* `meta.siteConfig: true` + `meta.hidden: true`, with page type `jun-config`.
|
|
13
|
+
*
|
|
14
|
+
* The config VALUES are the document's meta (a CRDT map, so live for every
|
|
15
|
+
* client) and the document's page renderer is the settings UI. Everything is a
|
|
16
|
+
* document, settings included.
|
|
17
|
+
*
|
|
18
|
+
* Readers — navbar, SEO head, theme — consume `config` reactively with graceful
|
|
19
|
+
* defaults when the document does not exist yet. `ensure()` find-or-creates it
|
|
20
|
+
* and REFUSES to create until the space document id is known, so a config
|
|
21
|
+
* document can never be born unparented. Historic strays are repaired by
|
|
22
|
+
* `useJunSiteConfigHeal()`.
|
|
23
|
+
*
|
|
24
|
+
* Note that `meta.hidden` is NOT what protects this document — hidden pages
|
|
25
|
+
* stay searchable on purpose. Owner-only is a separate predicate,
|
|
26
|
+
* `isJunOwnerOnlyDoc()`, enforced in search, the sitemap, the resolve endpoint
|
|
27
|
+
* and the renderer itself.
|
|
28
|
+
*/
|
|
29
|
+
import { type ComputedRef } from 'vue';
|
|
30
|
+
import type { TreeEntry } from '@abraca/nuxt';
|
|
31
|
+
import type { JunBackdropKind, JunBackgroundFit, JunCampfirePillMode, JunCampfirePlacement, JunCampfireRosterStyle, JunCampfireSize, JunCampfireTab, JunNavActiveStyle, JunNavItemMode, JunNavLogoAction, JunNavPlacement, JunNavShape, JunNavSize } from '../types.js';
|
|
32
|
+
export type { JunBackdropKind, JunBackgroundFit, JunCampfirePillMode, JunCampfirePlacement, JunCampfireRosterStyle, JunCampfireSize, JunCampfireTab, JunNavActiveStyle, JunNavItemMode, JunNavLogoAction, JunNavPlacement, JunNavShape, JunNavSize, } from '../types.js';
|
|
33
|
+
export type JunThemeRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
34
|
+
export type JunThemeAccent = 'mono' | 'sun' | 'blue' | 'emerald' | 'violet' | 'amber' | 'rose' | 'teal';
|
|
35
|
+
export type JunThemeNeutral = 'slate' | 'zinc' | 'stone';
|
|
36
|
+
export type JunThemeBlobs = 'off' | 'quiet' | 'normal' | 'bold';
|
|
37
|
+
export type JunThemeFont = 'default' | 'serif' | 'grotesk' | 'mono';
|
|
38
|
+
/**
|
|
39
|
+
* How much glass the site wears. `backdrop-filter` is the most expensive thing
|
|
40
|
+
* on the page and this site has a lot of them, so this is a performance
|
|
41
|
+
* control as much as a visual one — see the block at the end of `jun.css`.
|
|
42
|
+
*/
|
|
43
|
+
export type JunThemeSurface = 'glass' | 'soft' | 'solid';
|
|
44
|
+
export interface JunSiteConfig {
|
|
45
|
+
/** SEO */
|
|
46
|
+
seoTitle?: string;
|
|
47
|
+
seoTitleTemplate?: string;
|
|
48
|
+
seoDescription?: string;
|
|
49
|
+
seoOgImage?: string;
|
|
50
|
+
/** Navigation — every key falls back to the build-time `jun.navigation` default. */
|
|
51
|
+
navItemMode?: JunNavItemMode;
|
|
52
|
+
navActiveStyle?: JunNavActiveStyle;
|
|
53
|
+
navPlacement?: JunNavPlacement;
|
|
54
|
+
navShape?: JunNavShape;
|
|
55
|
+
navSize?: JunNavSize;
|
|
56
|
+
navAutoHide?: boolean;
|
|
57
|
+
navBlur?: boolean;
|
|
58
|
+
navHomeItem?: boolean;
|
|
59
|
+
navShowLogo?: boolean;
|
|
60
|
+
/** What the logo does when pressed — go home, or open the command palette. */
|
|
61
|
+
navLogoAction?: JunNavLogoAction;
|
|
62
|
+
/** The search button in the right cluster. ⌘K works either way. */
|
|
63
|
+
navSearchButton?: boolean;
|
|
64
|
+
navCenterActive?: boolean;
|
|
65
|
+
navShowIndices?: boolean;
|
|
66
|
+
navKeyboardNav?: boolean;
|
|
67
|
+
/** "Changed since your last visit" markers on nav items. */
|
|
68
|
+
navFreshnessDots?: boolean;
|
|
69
|
+
/** The fellow-travellers dot stack, and whether hovering it names them. */
|
|
70
|
+
navTravellers?: boolean;
|
|
71
|
+
navTravellersList?: boolean;
|
|
72
|
+
/** Which built-in mark `<JunLogo>` draws, and whether it carries the name. */
|
|
73
|
+
brandLogo?: 'sprout' | 'node' | 'page' | 'sun';
|
|
74
|
+
brandLogoVariant?: 'mark' | 'lockup' | 'wordmark';
|
|
75
|
+
/** Theme — Nuxt UI variables, applied live and SSR-inlined so there is no flash. */
|
|
76
|
+
themeRadius?: JunThemeRadius;
|
|
77
|
+
themeAccent?: JunThemeAccent;
|
|
78
|
+
themeNeutral?: JunThemeNeutral;
|
|
79
|
+
themeBlobs?: JunThemeBlobs;
|
|
80
|
+
/**
|
|
81
|
+
* The ambient backdrop, switched live. Any CSS kind the build offers —
|
|
82
|
+
* `shader` is build-time only and is never stored here.
|
|
83
|
+
*/
|
|
84
|
+
themeBackdrop?: JunBackdropKind;
|
|
85
|
+
/** Body font preset — static classes in jun.css, faces self-hosted. */
|
|
86
|
+
themeFont?: JunThemeFont;
|
|
87
|
+
/**
|
|
88
|
+
* Frosting. `glass` (default) is the house look; `soft` keeps it on the
|
|
89
|
+
* floating chrome only; `solid` removes every `backdrop-filter` on the page
|
|
90
|
+
* and makes the panels opaque. Worth reaching for on a site with a
|
|
91
|
+
* background image, or on modest hardware.
|
|
92
|
+
*/
|
|
93
|
+
themeSurface?: JunThemeSurface;
|
|
94
|
+
/** Custom accent hexes. Either one overrides `themeAccent` for its scheme. */
|
|
95
|
+
themeAccentCustomLight?: string;
|
|
96
|
+
themeAccentCustomDark?: string;
|
|
97
|
+
/**
|
|
98
|
+
* A background IMAGE, painted underneath the backdrop rather than instead of
|
|
99
|
+
* it — see `useJunBackground`. Either an upload reference
|
|
100
|
+
* (`<docId>/<uploadId>`) or a literal URL.
|
|
101
|
+
*/
|
|
102
|
+
themeBackgroundImage?: string;
|
|
103
|
+
themeBackgroundFit?: JunBackgroundFit;
|
|
104
|
+
/** 0.05–1. How strongly the image reads through the theme base. */
|
|
105
|
+
themeBackgroundOpacity?: number;
|
|
106
|
+
/** Soften the image so page text stays readable over it. */
|
|
107
|
+
themeBackgroundBlur?: boolean;
|
|
108
|
+
/** Announcement ribbon — live for every visitor the moment it is typed. */
|
|
109
|
+
announceEnabled?: boolean;
|
|
110
|
+
announceText?: string;
|
|
111
|
+
announceHref?: string;
|
|
112
|
+
/**
|
|
113
|
+
* The campfire — the site's user center. Every key falls back to the
|
|
114
|
+
* build-time `jun.campfire` default, and `campfireEnabled` additionally
|
|
115
|
+
* falls back to `features.campfire`: the build decides whether the hearth
|
|
116
|
+
* exists, this decides whether it is lit.
|
|
117
|
+
*/
|
|
118
|
+
campfireEnabled?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* The soft blob that follows another visitor's cursor onto whatever they are
|
|
121
|
+
* pointing at (`<APresenceBlobs>`). Falls back to `features.awareBlobs`: the
|
|
122
|
+
* build decides whether the layer exists, this decides whether it shows —
|
|
123
|
+
* the same relationship `campfireEnabled` has with `features.campfire`.
|
|
124
|
+
*
|
|
125
|
+
* It is a setting rather than a build flag because it is a matter of taste
|
|
126
|
+
* that changes with the site's content: over a photograph it is ambience,
|
|
127
|
+
* over a dense page it is one more thing moving.
|
|
128
|
+
*/
|
|
129
|
+
presenceBlobs?: boolean;
|
|
130
|
+
/** What the place is called, and the mark on its hearth (`i-lucide-*`). */
|
|
131
|
+
campfireTitle?: string;
|
|
132
|
+
campfireIcon?: string;
|
|
133
|
+
campfireChat?: boolean;
|
|
134
|
+
campfireRoster?: boolean;
|
|
135
|
+
campfireIdentity?: boolean;
|
|
136
|
+
campfireReactions?: boolean;
|
|
137
|
+
campfireFollow?: boolean;
|
|
138
|
+
campfireShowPages?: boolean;
|
|
139
|
+
campfireShowBots?: boolean;
|
|
140
|
+
campfireAllowRename?: boolean;
|
|
141
|
+
/** The reaction palette as ONE string — emoji separated by anything. */
|
|
142
|
+
campfireReactionSet?: string;
|
|
143
|
+
campfireHistoryLimit?: number;
|
|
144
|
+
campfirePlacement?: JunCampfirePlacement;
|
|
145
|
+
campfireSize?: JunCampfireSize;
|
|
146
|
+
campfirePillMode?: JunCampfirePillMode;
|
|
147
|
+
campfireRosterStyle?: JunCampfireRosterStyle;
|
|
148
|
+
campfireOpenTab?: JunCampfireTab;
|
|
149
|
+
campfireBlur?: boolean;
|
|
150
|
+
campfireEmber?: boolean;
|
|
151
|
+
/** Replaces "N others warming here". `{n}` interpolates the count. */
|
|
152
|
+
campfireLabel?: string;
|
|
153
|
+
/** Footer */
|
|
154
|
+
footerText?: string;
|
|
155
|
+
footerShowUpdated?: boolean;
|
|
156
|
+
/** Visitor interaction and feeds. All default ON; only an explicit `false` disables. */
|
|
157
|
+
guestbookEnabled?: boolean;
|
|
158
|
+
reactionsEnabled?: boolean;
|
|
159
|
+
feedsEnabled?: boolean;
|
|
160
|
+
/** Structured-data author, for JSON-LD and the feeds. */
|
|
161
|
+
authorName?: string;
|
|
162
|
+
/** Custom copy on the themed 404 page. */
|
|
163
|
+
notFoundText?: string;
|
|
164
|
+
[k: string]: unknown;
|
|
165
|
+
}
|
|
166
|
+
export declare function useJunSiteConfig(): {
|
|
167
|
+
docId: ComputedRef<string | null>;
|
|
168
|
+
candidates: ComputedRef<TreeEntry[]>;
|
|
169
|
+
config: ComputedRef<JunSiteConfig>;
|
|
170
|
+
ensure: () => string | null;
|
|
171
|
+
set: (patch: Partial<JunSiteConfig>) => void;
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* The config as any READER should see it — SSR snapshot merged with the live
|
|
175
|
+
* document.
|
|
176
|
+
*
|
|
177
|
+
* > **`useJunSiteConfig().config` alone is not enough, and that cost a session.**
|
|
178
|
+
* > It reads the LIVE tree, and the config document is a hidden top-level page
|
|
179
|
+
* > that the client's tree does not necessarily carry: on the settings page it
|
|
180
|
+
* > is loaded (the renderer opens it), so every knob appeared to work — and on
|
|
181
|
+
* > every OTHER page it resolved to `{}`, so the navbar silently fell back to
|
|
182
|
+
* > its build-time defaults for every visitor. The server has no such problem
|
|
183
|
+
* > (its runner syncs the whole tree), so the SSR HTML was correct and the
|
|
184
|
+
* > hydrated client quietly disagreed with it.
|
|
185
|
+
*
|
|
186
|
+
* The merge is a **SPREAD, SSR first**, and the comment that used to be here
|
|
187
|
+
* argued the opposite — that a spread "would resurrect every key the owner has
|
|
188
|
+
* deleted from a stale snapshot", so the live document had to win wholesale
|
|
189
|
+
* once it was non-empty. That rests on an assumption about how a default is
|
|
190
|
+
* stored, and the assumption is wrong.
|
|
191
|
+
*
|
|
192
|
+
* Clearing a setting does NOT remove its key. `set()` writes `undefined`
|
|
193
|
+
* through `updateMeta`, so the live meta keeps `themeSurface: undefined`
|
|
194
|
+
* forever after; it is JSON serialisation on the way to the SSR snapshot that
|
|
195
|
+
* drops it (measured: 15 live keys, 9 in the snapshot). A spread therefore
|
|
196
|
+
* preserves deletions exactly — `live` overwrites the snapshot's value with
|
|
197
|
+
* `undefined`, and `pick()` falls back to the build default, which is the
|
|
198
|
+
* intended behaviour.
|
|
199
|
+
*
|
|
200
|
+
* What live-wins-wholesale could not survive is a PARTIALLY SYNCED live entry.
|
|
201
|
+
* The tree hands the config document's meta over as it arrives, so there is a
|
|
202
|
+
* window where it holds some settings and not others — and during it, every
|
|
203
|
+
* key not yet received was erased from a snapshot that had them all. Chrome
|
|
204
|
+
* then disagreed with correct SSR HTML: the server rendered
|
|
205
|
+
* `navItemMode: icon-stack` and the client hydrated `text`, and since Vue does
|
|
206
|
+
* not rectify CLASS mismatches the icons stayed stacked in the DOM while every
|
|
207
|
+
* binding said otherwise — until a navigation re-rendered the list and it
|
|
208
|
+
* "fixed itself". Anything wrong on load and right after you click something
|
|
209
|
+
* is this shape.
|
|
210
|
+
*
|
|
211
|
+
* With a spread the snapshot backs every key the live document has not sent
|
|
212
|
+
* yet, and no setting can go missing for the length of a sync.
|
|
213
|
+
*
|
|
214
|
+
* Use this in chrome that reads settings. `useJunSiteConfig()` stays the WRITE
|
|
215
|
+
* path and the settings page's own read.
|
|
216
|
+
*/
|
|
217
|
+
export declare function useJunEffectiveConfig(): ComputedRef<JunSiteConfig>;
|
|
218
|
+
/**
|
|
219
|
+
* Repairs the two historic failure modes, live, on the owner's next visit:
|
|
220
|
+
*
|
|
221
|
+
* - a config document created before the space id was known (so its
|
|
222
|
+
* `parentId` is null, or points anywhere else) is reparented under the
|
|
223
|
+
* space root and re-registered server-side;
|
|
224
|
+
* - duplicate config documents are merged into the canonical one — whose
|
|
225
|
+
* values win — and then trashed.
|
|
226
|
+
*
|
|
227
|
+
* Mount once, in the layout.
|
|
228
|
+
*/
|
|
229
|
+
export declare function useJunSiteConfigHeal(): void;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { computed, watch } from "vue";
|
|
2
|
+
import { useNuxtData } from "#app";
|
|
3
|
+
import { useAbracadabra, useChildTree, useDocTree } from "#imports";
|
|
4
|
+
import { useJunStudio } from "./useJunStudio.js";
|
|
5
|
+
export function useJunSiteConfig() {
|
|
6
|
+
const abra = useAbracadabra();
|
|
7
|
+
const { entries, getEntry } = useDocTree();
|
|
8
|
+
const tree = useChildTree(abra.doc, "jun-site-config");
|
|
9
|
+
const candidates = computed(
|
|
10
|
+
() => entries.value.filter(
|
|
11
|
+
(e) => e.meta?.siteConfig === true && !e.trashed
|
|
12
|
+
)
|
|
13
|
+
);
|
|
14
|
+
const docId = computed(() => {
|
|
15
|
+
const all = candidates.value;
|
|
16
|
+
if (all.length === 0) return null;
|
|
17
|
+
const space = abra.spaceDocId.value;
|
|
18
|
+
const parented = space ? all.filter((e) => e.parentId === space) : [];
|
|
19
|
+
const pool = parented.length ? parented : all;
|
|
20
|
+
return [...pool].sort((a, b) => (a.createdAt ?? 0) - (b.createdAt ?? 0) || (a.id < b.id ? -1 : 1))[0].id;
|
|
21
|
+
});
|
|
22
|
+
const config = computed(
|
|
23
|
+
() => (docId.value ? getEntry(docId.value)?.meta : void 0) ?? {}
|
|
24
|
+
);
|
|
25
|
+
function ensure() {
|
|
26
|
+
if (docId.value) return docId.value;
|
|
27
|
+
const parent = abra.spaceDocId.value;
|
|
28
|
+
if (!parent) return null;
|
|
29
|
+
const id = crypto.randomUUID();
|
|
30
|
+
const now = Date.now();
|
|
31
|
+
tree.treeMap.set(id, {
|
|
32
|
+
label: "Site Config",
|
|
33
|
+
parentId: parent,
|
|
34
|
+
order: now,
|
|
35
|
+
type: "jun-config",
|
|
36
|
+
createdAt: now,
|
|
37
|
+
updatedAt: now,
|
|
38
|
+
meta: { siteConfig: true, hidden: true }
|
|
39
|
+
});
|
|
40
|
+
tree.registerDoc(id, parent, { label: "Site Config", type: "jun-config" });
|
|
41
|
+
return id;
|
|
42
|
+
}
|
|
43
|
+
function set(patch) {
|
|
44
|
+
const id = ensure();
|
|
45
|
+
if (id) tree.updateMeta(id, patch);
|
|
46
|
+
}
|
|
47
|
+
return { docId, candidates, config, ensure, set };
|
|
48
|
+
}
|
|
49
|
+
export function useJunEffectiveConfig() {
|
|
50
|
+
const { config } = useJunSiteConfig();
|
|
51
|
+
const { data: ssr } = useNuxtData("jun-site-config");
|
|
52
|
+
return computed(() => ({
|
|
53
|
+
...ssr.value ?? {},
|
|
54
|
+
...config.value
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
let healArmed = false;
|
|
58
|
+
export function useJunSiteConfigHeal() {
|
|
59
|
+
if (import.meta.server || healArmed) return;
|
|
60
|
+
healArmed = true;
|
|
61
|
+
const abra = useAbracadabra();
|
|
62
|
+
const { canEdit } = useJunStudio();
|
|
63
|
+
const site = useJunSiteConfig();
|
|
64
|
+
const tree = useChildTree(abra.doc, "jun-site-config-heal");
|
|
65
|
+
watch(
|
|
66
|
+
[() => site.candidates.value.length, () => abra.spaceDocId.value, canEdit],
|
|
67
|
+
() => {
|
|
68
|
+
const space = abra.spaceDocId.value;
|
|
69
|
+
if (!space || !canEdit.value) return;
|
|
70
|
+
if (site.candidates.value.length === 0) return;
|
|
71
|
+
const canonicalId = site.docId.value;
|
|
72
|
+
if (!canonicalId) return;
|
|
73
|
+
const raw = tree.treeMap.get(canonicalId);
|
|
74
|
+
if (raw && raw.parentId !== space) {
|
|
75
|
+
tree.treeMap.set(canonicalId, { ...raw, parentId: space, updatedAt: Date.now() });
|
|
76
|
+
tree.registerDoc(canonicalId, space, {
|
|
77
|
+
label: raw.label || "Site Config",
|
|
78
|
+
type: raw.type || "jun-config"
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
for (const dupe of site.candidates.value) {
|
|
82
|
+
if (dupe.id === canonicalId) continue;
|
|
83
|
+
const extraMeta = dupe.meta ?? {};
|
|
84
|
+
const canonicalMeta = tree.treeMap.get(canonicalId)?.meta ?? {};
|
|
85
|
+
const merged = {};
|
|
86
|
+
for (const [k, v] of Object.entries(extraMeta)) {
|
|
87
|
+
if (!(k in canonicalMeta) && k !== "siteConfig") merged[k] = v;
|
|
88
|
+
}
|
|
89
|
+
if (Object.keys(merged).length) tree.updateMeta(canonicalId, merged);
|
|
90
|
+
tree.deleteEntry(dupe.id);
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{ immediate: true }
|
|
94
|
+
);
|
|
95
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading the site's configuration — the SSR half.
|
|
3
|
+
*
|
|
4
|
+
* The Site Config is a DOCUMENT: a hidden top-level `jun-config` doc whose meta
|
|
5
|
+
* IS the configuration and whose page is the settings UI. Everything is a
|
|
6
|
+
* document, settings included.
|
|
7
|
+
*
|
|
8
|
+
* Two sources have to be reconciled:
|
|
9
|
+
* - the Nitro doc cache, over `<apiBase>/site-config`, which is all SSR has
|
|
10
|
+
* (the live CRDT tree is empty server-side);
|
|
11
|
+
* - the live CRDT meta, once the provider syncs.
|
|
12
|
+
*
|
|
13
|
+
* **The merge is not a spread.** `{ ...ssr, ...live }` looks right and is
|
|
14
|
+
* wrong: config defaults are stored as `undefined` (picking the default CLEARS
|
|
15
|
+
* the key), so a spread resurrects every key the owner has deleted, using the
|
|
16
|
+
* stale SSR snapshot. The rule is LIVE-AUTHORITATIVE-ONCE-NON-EMPTY — the
|
|
17
|
+
* moment the live config has any content at all, it replaces the snapshot
|
|
18
|
+
* wholesale.
|
|
19
|
+
*
|
|
20
|
+
* Phase 2 adds the write side (`useJunSiteConfig`: `ensure()`, `set()`, the
|
|
21
|
+
* duplicate-healing watcher). This composable stays the read path.
|
|
22
|
+
*/
|
|
23
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
24
|
+
export type JunConfigMap = Record<string, unknown>;
|
|
25
|
+
/** Trim a config value to a usable string, or `undefined`. */
|
|
26
|
+
export declare function junConfigStr(v: unknown): string | undefined;
|
|
27
|
+
/** A boolean config value that defaults to ON — only an explicit `false` disables. */
|
|
28
|
+
export declare function junConfigOn(v: unknown): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The effective site config: the SSR snapshot until the live document has
|
|
31
|
+
* anything in it, then the live document.
|
|
32
|
+
*/
|
|
33
|
+
export declare function useJunSiteConfigValues(live?: Ref<JunConfigMap> | ComputedRef<JunConfigMap>): Promise<ComputedRef<JunConfigMap>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { useFetch } from "#app";
|
|
3
|
+
import { useJunOptions } from "./useJunOptions.js";
|
|
4
|
+
export function junConfigStr(v) {
|
|
5
|
+
return typeof v === "string" && v.trim() ? v : void 0;
|
|
6
|
+
}
|
|
7
|
+
export function junConfigOn(v) {
|
|
8
|
+
return v !== false;
|
|
9
|
+
}
|
|
10
|
+
export async function useJunSiteConfigValues(live) {
|
|
11
|
+
const { apiBase } = useJunOptions();
|
|
12
|
+
const { data: ssr } = await useFetch(`${apiBase}/site-config`, {
|
|
13
|
+
key: "jun-site-config",
|
|
14
|
+
default: () => ({})
|
|
15
|
+
});
|
|
16
|
+
return computed(() => {
|
|
17
|
+
const liveValue = live?.value;
|
|
18
|
+
if (liveValue && Object.keys(liveValue).length > 0) return liveValue;
|
|
19
|
+
return ssr.value ?? {};
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The site's shared entrance motion, on top of @vueuse/motion.
|
|
3
|
+
*
|
|
4
|
+
* Timing lives here so every list across the site moves to the same beat.
|
|
5
|
+
*
|
|
6
|
+
* <article
|
|
7
|
+
* v-for="(item, i) in items"
|
|
8
|
+
* :key="item.id"
|
|
9
|
+
* v-motion="junStagger(i)"
|
|
10
|
+
* >…</article>
|
|
11
|
+
*/
|
|
12
|
+
export interface JunStaggerOptions {
|
|
13
|
+
/** Per-index delay. */
|
|
14
|
+
delayMs?: number;
|
|
15
|
+
durationMs?: number;
|
|
16
|
+
/** Distance travelled on the way up. */
|
|
17
|
+
yPx?: number;
|
|
18
|
+
/** Offset applied before the per-index delay. */
|
|
19
|
+
baseDelayMs?: number;
|
|
20
|
+
}
|
|
21
|
+
/** Fade up with a stagger — the standard list entrance. */
|
|
22
|
+
export declare function junStagger(index: number, options?: JunStaggerOptions): {
|
|
23
|
+
initial: {
|
|
24
|
+
opacity: number;
|
|
25
|
+
y: number;
|
|
26
|
+
};
|
|
27
|
+
enter: {
|
|
28
|
+
opacity: number;
|
|
29
|
+
y: number;
|
|
30
|
+
transition: {
|
|
31
|
+
duration: number;
|
|
32
|
+
delay: number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Headline entrance — fades in over 1s with NO vertical movement. Used by
|
|
38
|
+
* `<JunPageHero>` on the title block, where a lift fights the page transition.
|
|
39
|
+
*/
|
|
40
|
+
export declare function junHeroEnter(options?: {
|
|
41
|
+
delayMs?: number;
|
|
42
|
+
durationMs?: number;
|
|
43
|
+
}): {
|
|
44
|
+
initial: {
|
|
45
|
+
opacity: number;
|
|
46
|
+
};
|
|
47
|
+
enter: {
|
|
48
|
+
opacity: number;
|
|
49
|
+
transition: {
|
|
50
|
+
duration: number;
|
|
51
|
+
delay: number;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export function junStagger(index, options) {
|
|
2
|
+
const delay = options?.delayMs ?? 100;
|
|
3
|
+
const duration = options?.durationMs ?? 600;
|
|
4
|
+
const y = options?.yPx ?? 20;
|
|
5
|
+
const base = options?.baseDelayMs ?? 0;
|
|
6
|
+
return {
|
|
7
|
+
initial: { opacity: 0, y },
|
|
8
|
+
enter: {
|
|
9
|
+
opacity: 1,
|
|
10
|
+
y: 0,
|
|
11
|
+
transition: { duration, delay: base + index * delay }
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export function junHeroEnter(options) {
|
|
16
|
+
return {
|
|
17
|
+
initial: { opacity: 0 },
|
|
18
|
+
enter: {
|
|
19
|
+
opacity: 1,
|
|
20
|
+
transition: { duration: options?.durationMs ?? 1e3, delay: options?.delayMs ?? 0 }
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function useJunStudio(): {
|
|
2
|
+
loginOpen: import("vue").Ref<boolean, boolean>;
|
|
3
|
+
editMode: import("vue").Ref<boolean, boolean>;
|
|
4
|
+
editing: import("vue").ComputedRef<boolean>;
|
|
5
|
+
canEdit: import("vue").ComputedRef<boolean>;
|
|
6
|
+
effectiveRole: import("vue").Ref<string | null, string | null>;
|
|
7
|
+
openLogin: () => void;
|
|
8
|
+
closeLogin: () => void;
|
|
9
|
+
setEditMode: (on: boolean) => void;
|
|
10
|
+
toggleEdit: () => void;
|
|
11
|
+
};
|