@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,65 @@
|
|
|
1
|
+
import { computed, ref, watch } from "vue";
|
|
2
|
+
import { useFileBlobStore } from "#imports";
|
|
3
|
+
import { useJunEffectiveConfig } from "./useJunSiteConfig.js";
|
|
4
|
+
const FITS = ["cover", "contain", "tile"];
|
|
5
|
+
const OPACITY_MIN = 0.05;
|
|
6
|
+
const OPACITY_MAX = 1;
|
|
7
|
+
const FULL_PX = 1024;
|
|
8
|
+
const SOFT_PX = 64;
|
|
9
|
+
export function junBackgroundUpload(value) {
|
|
10
|
+
if (!value || /^(?:https?:)?\/\//i.test(value) || value.startsWith("/") || value.startsWith("data:")) return null;
|
|
11
|
+
const [docId, uploadId, ...rest] = value.split("/");
|
|
12
|
+
if (!docId || !uploadId || rest.length) return null;
|
|
13
|
+
return { docId, uploadId };
|
|
14
|
+
}
|
|
15
|
+
export function useJunBackgroundSettings() {
|
|
16
|
+
const config = useJunEffectiveConfig();
|
|
17
|
+
return computed(() => {
|
|
18
|
+
const c = config.value;
|
|
19
|
+
const stored = typeof c.themeBackgroundImage === "string" ? c.themeBackgroundImage.trim() : "";
|
|
20
|
+
const opacity = typeof c.themeBackgroundOpacity === "number" && Number.isFinite(c.themeBackgroundOpacity) ? Math.min(OPACITY_MAX, Math.max(OPACITY_MIN, c.themeBackgroundOpacity)) : 1;
|
|
21
|
+
return {
|
|
22
|
+
ref: stored,
|
|
23
|
+
fit: typeof c.themeBackgroundFit === "string" && FITS.includes(c.themeBackgroundFit) ? c.themeBackgroundFit : "cover",
|
|
24
|
+
opacity,
|
|
25
|
+
blur: c.themeBackgroundBlur === true,
|
|
26
|
+
active: !!stored
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
export function useJunBackgroundImage() {
|
|
31
|
+
const settings = useJunBackgroundSettings();
|
|
32
|
+
const { getBlobUrl, getThumbUrl } = useFileBlobStore();
|
|
33
|
+
const url = ref("");
|
|
34
|
+
watch(
|
|
35
|
+
// Both the reference AND the softening, because softening changes which
|
|
36
|
+
// RESOLUTION is fetched rather than which filter is applied. See below.
|
|
37
|
+
() => [settings.value.ref, settings.value.blur],
|
|
38
|
+
async ([value, soft]) => {
|
|
39
|
+
if (!value) {
|
|
40
|
+
url.value = "";
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const upload = junBackgroundUpload(value);
|
|
44
|
+
if (!upload) {
|
|
45
|
+
url.value = `url("${value.replace(/"/g, "%22")}")`;
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const want = soft ? SOFT_PX : FULL_PX;
|
|
49
|
+
const resolved = await getThumbUrl(upload.docId, upload.uploadId, { w: want }) ?? await getBlobUrl(upload.docId, upload.uploadId);
|
|
50
|
+
if (settings.value.ref !== value || settings.value.blur !== soft) return;
|
|
51
|
+
url.value = resolved ? `url("${resolved}")` : "";
|
|
52
|
+
},
|
|
53
|
+
{ immediate: true }
|
|
54
|
+
);
|
|
55
|
+
return {
|
|
56
|
+
settings,
|
|
57
|
+
url,
|
|
58
|
+
size: computed(() => {
|
|
59
|
+
const fit = settings.value.fit;
|
|
60
|
+
return fit === "tile" ? "auto" : fit;
|
|
61
|
+
}),
|
|
62
|
+
repeat: computed(() => settings.value.fit === "tile" ? "repeat" : "no-repeat")
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export const JUN_BACKGROUND_VOCAB = { FITS, OPACITY_MIN, OPACITY_MAX };
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useJunCampfire — everything the site's user center needs to know about
|
|
3
|
+
* itself, resolved once so no component has to.
|
|
4
|
+
*
|
|
5
|
+
* Four things live here, and they are separate exports because they have
|
|
6
|
+
* different costs: the settings are pure computeds anything may read, the
|
|
7
|
+
* people list walks awareness on every tick, the channel resolves against the
|
|
8
|
+
* document tree, and the name directory keeps module-level state.
|
|
9
|
+
*
|
|
10
|
+
* ## Settings
|
|
11
|
+
*
|
|
12
|
+
* Two layers, the same contract the navbar uses: `jun.campfire` is what a FRESH
|
|
13
|
+
* site boots with, and the Site Config document is the owner's live choice,
|
|
14
|
+
* which wins. The config stores `undefined` for the DEFAULT rather than the
|
|
15
|
+
* value, so "never touched" and "set back to the default" are the same thing —
|
|
16
|
+
* which is what lets a site change `jun.campfire.rosterStyle` later and have
|
|
17
|
+
* existing deployments follow.
|
|
18
|
+
*
|
|
19
|
+
* Every value is validated against its vocabulary here rather than at each call
|
|
20
|
+
* site: a config document is CRDT data an older client may have written.
|
|
21
|
+
*
|
|
22
|
+
* ## Why the channel is not the space document
|
|
23
|
+
*
|
|
24
|
+
* It used to be, and that is why chat did not work. `messages:send` is gated on
|
|
25
|
+
* `can_write()` against the channel document, and visitors are `viewer`
|
|
26
|
+
* site-wide — so every visitor message was rejected, invisibly, behind the
|
|
27
|
+
* client's own optimistic echo. `jun:campfire` (in `server/plugins/jun-rpc.ts`)
|
|
28
|
+
* opens ONE hidden `kind: "channel"` child of the space root with
|
|
29
|
+
* `public_access = "editor"`, and this resolves it by its `meta.campfire` flag.
|
|
30
|
+
*
|
|
31
|
+
* When no such document exists — the runner has not opened it, or `features.rpc`
|
|
32
|
+
* is off — this returns `null` rather than falling back to the space root.
|
|
33
|
+
* Falling back is what produced the original bug: a channel that accepts
|
|
34
|
+
* messages from the owner and silently drops everyone else's is worse than no
|
|
35
|
+
* channel at all, because nothing on screen distinguishes the two.
|
|
36
|
+
*/
|
|
37
|
+
import { type ComputedRef } from 'vue';
|
|
38
|
+
import type { JunCampfirePillMode, JunCampfirePlacement, JunCampfireRosterStyle, JunCampfireSize, JunCampfireTab } from '../types.js';
|
|
39
|
+
export interface JunCampfireSettings {
|
|
40
|
+
/** Is the hearth mounted at all? */
|
|
41
|
+
enabled: boolean;
|
|
42
|
+
/** What the place is called. Header, empty state, every aria label. */
|
|
43
|
+
title: string;
|
|
44
|
+
/** The mark on the hearth — a validated `i-lucide-*` id. */
|
|
45
|
+
icon: string;
|
|
46
|
+
chat: boolean;
|
|
47
|
+
roster: boolean;
|
|
48
|
+
identity: boolean;
|
|
49
|
+
reactions: boolean;
|
|
50
|
+
follow: boolean;
|
|
51
|
+
showPages: boolean;
|
|
52
|
+
showBots: boolean;
|
|
53
|
+
allowRename: boolean;
|
|
54
|
+
reactionSet: string[];
|
|
55
|
+
historyLimit: number;
|
|
56
|
+
placement: JunCampfirePlacement;
|
|
57
|
+
size: JunCampfireSize;
|
|
58
|
+
pillMode: JunCampfirePillMode;
|
|
59
|
+
rosterStyle: JunCampfireRosterStyle;
|
|
60
|
+
openTab: JunCampfireTab;
|
|
61
|
+
blur: boolean;
|
|
62
|
+
ember: boolean;
|
|
63
|
+
label: string;
|
|
64
|
+
/**
|
|
65
|
+
* True when no panel would have anything in it — the hearth is then a
|
|
66
|
+
* decoration, and the pill stops offering to open.
|
|
67
|
+
*/
|
|
68
|
+
hasPanel: boolean;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A reaction palette from a stored string. Split on GRAPHEMES rather than code
|
|
72
|
+
* units: `👋` is two code units and `❤️` is a base character plus a variation
|
|
73
|
+
* selector, so a naive `split('')` shreds both into mojibake.
|
|
74
|
+
*/
|
|
75
|
+
export declare function junCampfireReactions(raw: string): string[];
|
|
76
|
+
export declare function useJunCampfireSettings(): ComputedRef<JunCampfireSettings>;
|
|
77
|
+
/** The vocabularies, so the settings page never keeps a second copy. */
|
|
78
|
+
export declare const JUN_CAMPFIRE_VOCAB: {
|
|
79
|
+
PLACEMENTS: JunCampfirePlacement[];
|
|
80
|
+
PILL_MODES: JunCampfirePillMode[];
|
|
81
|
+
ROSTER_STYLES: JunCampfireRosterStyle[];
|
|
82
|
+
TABS: JunCampfireTab[];
|
|
83
|
+
SIZES: JunCampfireSize[];
|
|
84
|
+
HISTORY_MIN: number;
|
|
85
|
+
HISTORY_MAX: number;
|
|
86
|
+
REACTIONS_MAX: number;
|
|
87
|
+
TITLE_MAX: number;
|
|
88
|
+
ICON_RE: RegExp;
|
|
89
|
+
};
|
|
90
|
+
export interface JunCampfirePerson {
|
|
91
|
+
/** The awareness client id of the session shown. See `sessions`. */
|
|
92
|
+
clientId: number;
|
|
93
|
+
publicKey: string;
|
|
94
|
+
name: string;
|
|
95
|
+
color: string;
|
|
96
|
+
idle: boolean;
|
|
97
|
+
isSelf: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* A process rather than a person: an AI agent, or a headless runner that is
|
|
100
|
+
* connected to the root document without ever standing on a page.
|
|
101
|
+
*/
|
|
102
|
+
isBot: boolean;
|
|
103
|
+
docId: string | null;
|
|
104
|
+
page: string | null;
|
|
105
|
+
statusIcon: string | null;
|
|
106
|
+
statusText: string | null;
|
|
107
|
+
/** How many tabs this person has open. `1` for almost everyone. */
|
|
108
|
+
sessions: number;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The people at the fire.
|
|
112
|
+
*
|
|
113
|
+
* **Deduplicated by public key**, and that is the fix for the count reading
|
|
114
|
+
* several times too high: awareness is per SESSION, so a visitor with the site
|
|
115
|
+
* open in two tabs was two people, and the owner with a tab plus a studio
|
|
116
|
+
* window was two more. A person is a key, not a socket. The awake session wins
|
|
117
|
+
* the `docId`/`page` — an idle background tab must not report where its owner
|
|
118
|
+
* is.
|
|
119
|
+
*
|
|
120
|
+
* `others` is built from awareness, which excludes the local session by
|
|
121
|
+
* construction. `self` is built from the LOCAL identity rather than fished back
|
|
122
|
+
* out of that list: the only sessions of mine awareness can see are my other
|
|
123
|
+
* tabs, and describing me by a background tab's route is both wrong and
|
|
124
|
+
* unstable.
|
|
125
|
+
*/
|
|
126
|
+
export declare function useJunCampfirePeople(): {
|
|
127
|
+
others: ComputedRef<JunCampfirePerson[]>;
|
|
128
|
+
self: ComputedRef<JunCampfirePerson>;
|
|
129
|
+
/** Everyone, self first. What the roster renders. */
|
|
130
|
+
everyone: ComputedRef<JunCampfirePerson[]>;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* How the user center describes the company. A custom label wins verbatim,
|
|
134
|
+
* with `{n}` interpolated — a site whose visitors are "readers" or "guests"
|
|
135
|
+
* should not have to accept the default wording.
|
|
136
|
+
*/
|
|
137
|
+
export declare function junCampfireLabel(others: number, custom: string): string;
|
|
138
|
+
/**
|
|
139
|
+
* The campfire's channel document, or `null` when the runner has not opened one.
|
|
140
|
+
*
|
|
141
|
+
* `null` is a real answer and the panel says so: it means visitor sends would be
|
|
142
|
+
* rejected by the server, and showing a working-looking composer over that is
|
|
143
|
+
* exactly the bug this whole change exists to fix.
|
|
144
|
+
*
|
|
145
|
+
* **Oldest first, ties broken on the id — and `jun:campfire` sorts candidates
|
|
146
|
+
* the same way.** If the two rules ever disagreed, half the visitors would be
|
|
147
|
+
* talking in a room the other half cannot see, with nothing on either screen to
|
|
148
|
+
* suggest it. `Array.find` was that bug waiting to happen: it answers in Y.Map
|
|
149
|
+
* iteration order, which is not stable between clients.
|
|
150
|
+
*/
|
|
151
|
+
export declare function useJunCampfireChannel(): ComputedRef<string | null>;
|
|
152
|
+
export declare function useJunCampfireNames(): {
|
|
153
|
+
remember: (publicKey: string, name: string) => void;
|
|
154
|
+
flush: () => void;
|
|
155
|
+
nameFor: (publicKey: string, fallback?: string) => string;
|
|
156
|
+
};
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { useAbracadabra, useAwarenessPeers, useDocTree } from "#imports";
|
|
3
|
+
import { useJunOptions } from "./useJunOptions.js";
|
|
4
|
+
import { useJunEffectiveConfig } from "./useJunSiteConfig.js";
|
|
5
|
+
const PLACEMENTS = ["bottom-right", "bottom-left", "top-right", "top-left"];
|
|
6
|
+
const PILL_MODES = ["full", "compact", "count", "ember"];
|
|
7
|
+
const ROSTER_STYLES = ["list", "grid", "facepile", "dots"];
|
|
8
|
+
const TABS = ["auto", "here", "fire", "you"];
|
|
9
|
+
const SIZES = ["sm", "md", "lg"];
|
|
10
|
+
const HISTORY_MIN = 5;
|
|
11
|
+
const HISTORY_MAX = 300;
|
|
12
|
+
const REACTIONS_MAX = 8;
|
|
13
|
+
const TITLE_MAX = 32;
|
|
14
|
+
const ICON_RE = /^i-lucide-[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
15
|
+
export function junCampfireReactions(raw) {
|
|
16
|
+
const out = [];
|
|
17
|
+
if (typeof Intl !== "undefined" && "Segmenter" in Intl) {
|
|
18
|
+
const seg = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
19
|
+
for (const { segment } of seg.segment(raw)) {
|
|
20
|
+
const g = segment.trim();
|
|
21
|
+
if (g) out.push(g);
|
|
22
|
+
}
|
|
23
|
+
} else {
|
|
24
|
+
for (const g of raw.split(/\s+/)) {
|
|
25
|
+
if (g) out.push(g);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return out.slice(0, REACTIONS_MAX);
|
|
29
|
+
}
|
|
30
|
+
export function useJunCampfireSettings() {
|
|
31
|
+
const opts = useJunOptions();
|
|
32
|
+
const config = useJunEffectiveConfig();
|
|
33
|
+
function pick(stored, allowed, fallback) {
|
|
34
|
+
return typeof stored === "string" && allowed.includes(stored) ? stored : fallback;
|
|
35
|
+
}
|
|
36
|
+
function flag(stored, fallback) {
|
|
37
|
+
return typeof stored === "boolean" ? stored : fallback;
|
|
38
|
+
}
|
|
39
|
+
return computed(() => {
|
|
40
|
+
const c = config.value;
|
|
41
|
+
const build = opts.campfire;
|
|
42
|
+
const stored = typeof c.campfireReactionSet === "string" ? junCampfireReactions(c.campfireReactionSet) : [];
|
|
43
|
+
const title = (typeof c.campfireTitle === "string" && c.campfireTitle.trim() ? c.campfireTitle.trim().slice(0, TITLE_MAX) : build.title) || "User Center";
|
|
44
|
+
const reactions = flag(c.campfireReactions, build.reactions);
|
|
45
|
+
const chat = flag(c.campfireChat, build.chat);
|
|
46
|
+
const roster = flag(c.campfireRoster, build.roster);
|
|
47
|
+
const identity = flag(c.campfireIdentity, build.identity);
|
|
48
|
+
return {
|
|
49
|
+
// The build flag decides whether the hearth exists; this decides whether
|
|
50
|
+
// it is lit. Same shape as every navigation key — which is what lets an
|
|
51
|
+
// owner light it from the settings page without a redeploy.
|
|
52
|
+
enabled: flag(c.campfireEnabled, opts.features.campfire === true),
|
|
53
|
+
title,
|
|
54
|
+
icon: typeof c.campfireIcon === "string" && ICON_RE.test(c.campfireIcon) ? c.campfireIcon : ICON_RE.test(build.icon) ? build.icon : "i-lucide-users-round",
|
|
55
|
+
chat,
|
|
56
|
+
roster,
|
|
57
|
+
identity,
|
|
58
|
+
reactions,
|
|
59
|
+
follow: flag(c.campfireFollow, build.follow),
|
|
60
|
+
showPages: flag(c.campfireShowPages, build.showPages),
|
|
61
|
+
showBots: flag(c.campfireShowBots, build.showBots),
|
|
62
|
+
allowRename: flag(c.campfireAllowRename, build.allowRename),
|
|
63
|
+
// An emptied palette falls back rather than leaving the reaction row a
|
|
64
|
+
// blank strip: clearing the field means "I did not mean to configure
|
|
65
|
+
// this", and there is a switch for meaning "off".
|
|
66
|
+
reactionSet: stored.length ? stored : build.reactionSet,
|
|
67
|
+
historyLimit: Math.min(
|
|
68
|
+
HISTORY_MAX,
|
|
69
|
+
Math.max(
|
|
70
|
+
HISTORY_MIN,
|
|
71
|
+
typeof c.campfireHistoryLimit === "number" && Number.isFinite(c.campfireHistoryLimit) ? Math.round(c.campfireHistoryLimit) : build.historyLimit
|
|
72
|
+
)
|
|
73
|
+
),
|
|
74
|
+
placement: pick(c.campfirePlacement, PLACEMENTS, build.placement),
|
|
75
|
+
size: pick(c.campfireSize, SIZES, build.size),
|
|
76
|
+
pillMode: pick(c.campfirePillMode, PILL_MODES, build.pillMode),
|
|
77
|
+
rosterStyle: pick(c.campfireRosterStyle, ROSTER_STYLES, build.rosterStyle),
|
|
78
|
+
openTab: pick(c.campfireOpenTab, TABS, build.openTab),
|
|
79
|
+
blur: flag(c.campfireBlur, build.blur),
|
|
80
|
+
ember: flag(c.campfireEmber, build.ember),
|
|
81
|
+
label: typeof c.campfireLabel === "string" ? c.campfireLabel : build.label,
|
|
82
|
+
hasPanel: chat || roster || identity
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
export const JUN_CAMPFIRE_VOCAB = {
|
|
87
|
+
PLACEMENTS,
|
|
88
|
+
PILL_MODES,
|
|
89
|
+
ROSTER_STYLES,
|
|
90
|
+
TABS,
|
|
91
|
+
SIZES,
|
|
92
|
+
HISTORY_MIN,
|
|
93
|
+
HISTORY_MAX,
|
|
94
|
+
REACTIONS_MAX,
|
|
95
|
+
TITLE_MAX,
|
|
96
|
+
ICON_RE
|
|
97
|
+
};
|
|
98
|
+
export function useJunCampfirePeople() {
|
|
99
|
+
const { peers, isIdle } = useAwarenessPeers();
|
|
100
|
+
const abra = useAbracadabra();
|
|
101
|
+
const settings = useJunCampfireSettings();
|
|
102
|
+
const others = computed(() => {
|
|
103
|
+
const mine = abra.publicKeyB64.value;
|
|
104
|
+
const byKey = /* @__PURE__ */ new Map();
|
|
105
|
+
for (const p of peers.value) {
|
|
106
|
+
const state = p;
|
|
107
|
+
const user = p.user;
|
|
108
|
+
if (!user) continue;
|
|
109
|
+
if (mine && user.publicKey === mine) continue;
|
|
110
|
+
const key = user.publicKey || `client:${p.clientId}`;
|
|
111
|
+
const page = typeof state.page === "string" ? state.page : null;
|
|
112
|
+
const idle = typeof p.idle === "boolean" ? p.idle : isIdle(p.clientId);
|
|
113
|
+
const person = {
|
|
114
|
+
clientId: p.clientId,
|
|
115
|
+
publicKey: user.publicKey ?? "",
|
|
116
|
+
name: user.name || "Traveller",
|
|
117
|
+
color: user.color || "var(--ui-text-muted)",
|
|
118
|
+
idle,
|
|
119
|
+
isSelf: false,
|
|
120
|
+
// A session that never broadcasts a `page` is not walking the site —
|
|
121
|
+
// it is a runner holding the root document open. The janitor sets
|
|
122
|
+
// `page` on purpose, precisely so it counts as a person here.
|
|
123
|
+
isBot: user.isAgent === true || page === null,
|
|
124
|
+
docId: typeof state.docId === "string" ? state.docId : null,
|
|
125
|
+
page,
|
|
126
|
+
statusIcon: typeof user.statusIcon === "string" ? user.statusIcon : null,
|
|
127
|
+
statusText: typeof user.statusText === "string" ? user.statusText : null,
|
|
128
|
+
sessions: 1
|
|
129
|
+
};
|
|
130
|
+
const seen = byKey.get(key);
|
|
131
|
+
if (!seen) {
|
|
132
|
+
byKey.set(key, person);
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
seen.sessions++;
|
|
136
|
+
if (seen.idle && !person.idle) byKey.set(key, { ...person, sessions: seen.sessions });
|
|
137
|
+
}
|
|
138
|
+
const all = [...byKey.values()];
|
|
139
|
+
return settings.value.showBots ? all : all.filter((p) => !p.isBot);
|
|
140
|
+
});
|
|
141
|
+
const self = computed(() => ({
|
|
142
|
+
clientId: -1,
|
|
143
|
+
publicKey: abra.publicKeyB64.value ?? "",
|
|
144
|
+
name: abra.userName.value || "You",
|
|
145
|
+
color: abra.userColor.value || "var(--ui-text-muted)",
|
|
146
|
+
idle: false,
|
|
147
|
+
isSelf: true,
|
|
148
|
+
isBot: false,
|
|
149
|
+
docId: abra.spaceDocId.value ?? null,
|
|
150
|
+
page: null,
|
|
151
|
+
statusIcon: abra.userStatusIcon?.value || null,
|
|
152
|
+
statusText: abra.userStatusText?.value || null,
|
|
153
|
+
sessions: 1
|
|
154
|
+
}));
|
|
155
|
+
return {
|
|
156
|
+
others,
|
|
157
|
+
self,
|
|
158
|
+
everyone: computed(() => [self.value, ...others.value])
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
export function junCampfireLabel(others, custom) {
|
|
162
|
+
if (custom) return custom.replace(/\{n\}/g, String(others));
|
|
163
|
+
if (others === 0) return "nobody else here";
|
|
164
|
+
if (others === 1) return "1 other here";
|
|
165
|
+
return `${others} others here`;
|
|
166
|
+
}
|
|
167
|
+
export function useJunCampfireChannel() {
|
|
168
|
+
const { entries } = useDocTree();
|
|
169
|
+
return computed(() => {
|
|
170
|
+
const candidates = entries.value.filter(
|
|
171
|
+
(e) => e.meta?.campfire === true && !e.trashed
|
|
172
|
+
);
|
|
173
|
+
if (candidates.length < 2) return candidates[0]?.id ?? null;
|
|
174
|
+
return [...candidates].sort(
|
|
175
|
+
(a, b) => (a.createdAt ?? 0) - (b.createdAt ?? 0) || (a.id < b.id ? -1 : 1)
|
|
176
|
+
)[0].id;
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
const NAMES_KEY = "jun:campfire:names";
|
|
180
|
+
const NAMES_CAP = 200;
|
|
181
|
+
let directory = null;
|
|
182
|
+
function loadDirectory() {
|
|
183
|
+
if (directory) return directory;
|
|
184
|
+
directory = /* @__PURE__ */ new Map();
|
|
185
|
+
if (typeof localStorage === "undefined") return directory;
|
|
186
|
+
try {
|
|
187
|
+
const raw = localStorage.getItem(NAMES_KEY);
|
|
188
|
+
if (raw) {
|
|
189
|
+
for (const [k, v] of Object.entries(JSON.parse(raw))) {
|
|
190
|
+
if (typeof v === "string") directory.set(k, v);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
} catch {
|
|
194
|
+
}
|
|
195
|
+
return directory;
|
|
196
|
+
}
|
|
197
|
+
function persistDirectory() {
|
|
198
|
+
if (typeof localStorage === "undefined" || !directory) return;
|
|
199
|
+
try {
|
|
200
|
+
const entries = [...directory.entries()].slice(-NAMES_CAP);
|
|
201
|
+
directory = new Map(entries);
|
|
202
|
+
localStorage.setItem(NAMES_KEY, JSON.stringify(Object.fromEntries(entries)));
|
|
203
|
+
} catch {
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
export function useJunCampfireNames() {
|
|
207
|
+
const dir = loadDirectory();
|
|
208
|
+
let dirty = false;
|
|
209
|
+
function remember(publicKey, name) {
|
|
210
|
+
if (!publicKey || !name || name === "User" || name === "Traveller") return;
|
|
211
|
+
if (dir.get(publicKey) === name) return;
|
|
212
|
+
dir.delete(publicKey);
|
|
213
|
+
dir.set(publicKey, name);
|
|
214
|
+
dirty = true;
|
|
215
|
+
}
|
|
216
|
+
function flush() {
|
|
217
|
+
if (!dirty) return;
|
|
218
|
+
dirty = false;
|
|
219
|
+
persistDirectory();
|
|
220
|
+
}
|
|
221
|
+
function nameFor(publicKey, fallback = "Traveller") {
|
|
222
|
+
return dir.get(publicKey) || fallback;
|
|
223
|
+
}
|
|
224
|
+
return { remember, flush, nameFor };
|
|
225
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useJunChrome — where the site's own furniture currently is.
|
|
3
|
+
*
|
|
4
|
+
* The floating bars used to be positioned by literal: the studio bar was
|
|
5
|
+
* `bottom-4 left-4` and knew nothing at all, and the hearth carried four
|
|
6
|
+
* hard-coded corners in which `top-[4.5rem]` was the height of one particular
|
|
7
|
+
* navbar in one particular placement. Both were correct for the configuration
|
|
8
|
+
* they were written against and wrong for every other one — a left rail buried
|
|
9
|
+
* the studio bar, a bottom dock sat on top of it, and a top-corner hearth
|
|
10
|
+
* cleared a bar that might be a rail, or at the bottom, or auto-hidden.
|
|
11
|
+
*
|
|
12
|
+
* So the geometry is MEASURED and published, the same contract `--jun-player-h`
|
|
13
|
+
* and `--jun-nav-rail-w` already established here:
|
|
14
|
+
*
|
|
15
|
+
* - `--jun-chrome-top` / `-right` / `-bottom` / `-left` — how many pixels of
|
|
16
|
+
* each viewport edge the navbar and the player have taken. A bar positions
|
|
17
|
+
* itself at `calc(var(--jun-chrome-bottom) + 1rem)` and is correct on all
|
|
18
|
+
* five navbar placements without knowing which one it is in.
|
|
19
|
+
* - `--jun-studio-h` / `--jun-hearth-h` — each bar's own measured height, so
|
|
20
|
+
* two bars sharing a corner stack instead of overlapping. They fall back to
|
|
21
|
+
* `0px`, which is exactly right for the visitor who has no studio bar.
|
|
22
|
+
*
|
|
23
|
+
* CSS variables rather than reactive numbers, deliberately: the bars then get a
|
|
24
|
+
* transition on `bottom`/`left` for free, so a navbar that moves is answered by
|
|
25
|
+
* bars that GLIDE out of its way rather than teleporting. It also means nothing
|
|
26
|
+
* re-renders when the geometry changes.
|
|
27
|
+
*
|
|
28
|
+
* **Measurement is bursty, not continuous.** A permanent rAF loop for the whole
|
|
29
|
+
* session to watch something that moves a handful of times is not a trade worth
|
|
30
|
+
* making. Anything that could have moved the navbar starts a burst; a burst
|
|
31
|
+
* keeps running while the numbers are still changing and stops shortly after
|
|
32
|
+
* they settle. That is what tracks the 1000ms placement transition and the
|
|
33
|
+
* auto-hide slide without polling between them.
|
|
34
|
+
*/
|
|
35
|
+
import { type Ref } from 'vue';
|
|
36
|
+
/**
|
|
37
|
+
* The corner a bar should actually use: its own, unless the navbar has taken
|
|
38
|
+
* that edge, in which case it moves to the opposite one.
|
|
39
|
+
*
|
|
40
|
+
* The same mirror the player already does — when the navbar owns the bottom,
|
|
41
|
+
* the player's pill goes to the top. A bar stacked in a second row above a
|
|
42
|
+
* bottom dock is three surfaces competing for one edge; moving it to the free
|
|
43
|
+
* edge is what the layout was already doing everywhere else.
|
|
44
|
+
*/
|
|
45
|
+
export type JunCorner = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
46
|
+
export declare function junMirrorCorner(corner: JunCorner, placement: string): JunCorner;
|
|
47
|
+
/**
|
|
48
|
+
* Keep `--jun-chrome-*` current for as long as this component is mounted.
|
|
49
|
+
*
|
|
50
|
+
* Refcounted and self-starting, so it does not matter which bar mounts first or
|
|
51
|
+
* whether the layout remembered to call it. The navbar itself never has to
|
|
52
|
+
* know anyone is listening.
|
|
53
|
+
*/
|
|
54
|
+
export declare function useJunChromeInsets(): {
|
|
55
|
+
navPlacement: Ref<string, string>;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Publish one bar's measured height as `--jun-<name>-h`, so whatever shares its
|
|
59
|
+
* corner can clear it with a `calc()` instead of a guessed constant.
|
|
60
|
+
*
|
|
61
|
+
* The variable is REMOVED on unmount rather than zeroed, which is the same
|
|
62
|
+
* thing to a `var(--jun-studio-h, 0px)` reader and means a stale value can
|
|
63
|
+
* never outlive the bar that wrote it — the hearth would otherwise keep dodging
|
|
64
|
+
* a studio bar that signed out ten minutes ago.
|
|
65
|
+
*/
|
|
66
|
+
export declare function useJunChromeSlot(name: string, el: Ref<HTMLElement | null>): void;
|