@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,99 @@
|
|
|
1
|
+
export interface JunPlayerTrack {
|
|
2
|
+
/** The track DOCUMENT's id — also the identity used for "is this playing?". */
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
artist?: string;
|
|
6
|
+
album?: string;
|
|
7
|
+
/** Seconds, from the file's own tags where they exist. */
|
|
8
|
+
duration?: number;
|
|
9
|
+
/** Uploaded audio: streamed through a grant, never downloaded whole. */
|
|
10
|
+
uploadId?: string;
|
|
11
|
+
mimeType?: string;
|
|
12
|
+
/** A direct audio URL, for a track that is not an upload. */
|
|
13
|
+
url?: string;
|
|
14
|
+
coverUploadId?: string;
|
|
15
|
+
coverMimeType?: string;
|
|
16
|
+
/** Where the track's own page lives, for the bar's title link. */
|
|
17
|
+
href?: string;
|
|
18
|
+
/** The stage/playlist it came from — shown under the title in the bar. */
|
|
19
|
+
stage?: string;
|
|
20
|
+
}
|
|
21
|
+
export type JunRepeatMode = 'off' | 'all' | 'one';
|
|
22
|
+
export declare function useJunPlayer(): {
|
|
23
|
+
queue: import("vue").Ref<{
|
|
24
|
+
id: string;
|
|
25
|
+
label: string;
|
|
26
|
+
artist?: string | undefined;
|
|
27
|
+
album?: string
|
|
28
|
+
/** Seconds, from the file's own tags where they exist. */
|
|
29
|
+
| undefined;
|
|
30
|
+
duration?: number
|
|
31
|
+
/** Uploaded audio: streamed through a grant, never downloaded whole. */
|
|
32
|
+
| undefined;
|
|
33
|
+
uploadId?: string | undefined;
|
|
34
|
+
mimeType?: string
|
|
35
|
+
/** A direct audio URL, for a track that is not an upload. */
|
|
36
|
+
| undefined;
|
|
37
|
+
url?: string | undefined;
|
|
38
|
+
coverUploadId?: string | undefined;
|
|
39
|
+
coverMimeType?: string
|
|
40
|
+
/** Where the track's own page lives, for the bar's title link. */
|
|
41
|
+
| undefined;
|
|
42
|
+
href?: string
|
|
43
|
+
/** The stage/playlist it came from — shown under the title in the bar. */
|
|
44
|
+
| undefined;
|
|
45
|
+
stage?: string | undefined;
|
|
46
|
+
}[], JunPlayerTrack[] | {
|
|
47
|
+
id: string;
|
|
48
|
+
label: string;
|
|
49
|
+
artist?: string | undefined;
|
|
50
|
+
album?: string
|
|
51
|
+
/** Seconds, from the file's own tags where they exist. */
|
|
52
|
+
| undefined;
|
|
53
|
+
duration?: number
|
|
54
|
+
/** Uploaded audio: streamed through a grant, never downloaded whole. */
|
|
55
|
+
| undefined;
|
|
56
|
+
uploadId?: string | undefined;
|
|
57
|
+
mimeType?: string
|
|
58
|
+
/** A direct audio URL, for a track that is not an upload. */
|
|
59
|
+
| undefined;
|
|
60
|
+
url?: string | undefined;
|
|
61
|
+
coverUploadId?: string | undefined;
|
|
62
|
+
coverMimeType?: string
|
|
63
|
+
/** Where the track's own page lives, for the bar's title link. */
|
|
64
|
+
| undefined;
|
|
65
|
+
href?: string
|
|
66
|
+
/** The stage/playlist it came from — shown under the title in the bar. */
|
|
67
|
+
| undefined;
|
|
68
|
+
stage?: string | undefined;
|
|
69
|
+
}[]>;
|
|
70
|
+
index: import("vue").Ref<number, number>;
|
|
71
|
+
current: import("vue").ComputedRef<JunPlayerTrack | null>;
|
|
72
|
+
hasQueue: import("vue").ComputedRef<boolean>;
|
|
73
|
+
dismissed: import("vue").Ref<boolean, boolean>;
|
|
74
|
+
playing: import("vue").Ref<boolean, boolean>;
|
|
75
|
+
currentTime: import("vue").Ref<number, number>;
|
|
76
|
+
duration: import("vue").Ref<number, number>;
|
|
77
|
+
volume: import("vue").Ref<number, number>;
|
|
78
|
+
muted: import("vue").Ref<boolean, boolean>;
|
|
79
|
+
shuffle: import("vue").Ref<boolean, boolean>;
|
|
80
|
+
repeat: import("vue").Ref<JunRepeatMode, JunRepeatMode>;
|
|
81
|
+
expanded: import("vue").Ref<boolean, boolean>;
|
|
82
|
+
attach: (node: HTMLAudioElement | null) => void;
|
|
83
|
+
play: () => void;
|
|
84
|
+
pause: () => void;
|
|
85
|
+
toggle: () => void;
|
|
86
|
+
playQueue: (tracks: JunPlayerTrack[], startIndex?: number) => void;
|
|
87
|
+
enqueue: (track: JunPlayerTrack) => void;
|
|
88
|
+
select: (i: number) => void;
|
|
89
|
+
next: () => boolean;
|
|
90
|
+
prev: () => void;
|
|
91
|
+
seek: (seconds: number) => void;
|
|
92
|
+
setVolume: (v: number) => void;
|
|
93
|
+
setMuted: (m: boolean) => void;
|
|
94
|
+
toggleShuffle: () => void;
|
|
95
|
+
cycleRepeat: () => void;
|
|
96
|
+
onEnded: () => void;
|
|
97
|
+
stop: (remember?: boolean) => void;
|
|
98
|
+
isCurrent: (id: string) => boolean;
|
|
99
|
+
};
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { computed, ref, shallowRef } from "vue";
|
|
2
|
+
const queue = ref([]);
|
|
3
|
+
const index = ref(-1);
|
|
4
|
+
const playing = ref(false);
|
|
5
|
+
const currentTime = ref(0);
|
|
6
|
+
const duration = ref(0);
|
|
7
|
+
const volume = ref(1);
|
|
8
|
+
const muted = ref(false);
|
|
9
|
+
const shuffle = ref(false);
|
|
10
|
+
const repeat = ref("off");
|
|
11
|
+
const expanded = ref(false);
|
|
12
|
+
const order = ref([]);
|
|
13
|
+
const el = shallowRef(null);
|
|
14
|
+
const DISMISSED_KEY = "jun:player:dismissed";
|
|
15
|
+
const dismissed = ref(false);
|
|
16
|
+
function readDismissed() {
|
|
17
|
+
if (!import.meta.client) return false;
|
|
18
|
+
try {
|
|
19
|
+
return window.localStorage.getItem(DISMISSED_KEY) === "1";
|
|
20
|
+
} catch {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function writeDismissed(value) {
|
|
25
|
+
dismissed.value = value;
|
|
26
|
+
if (!import.meta.client) return;
|
|
27
|
+
try {
|
|
28
|
+
if (value) window.localStorage.setItem(DISMISSED_KEY, "1");
|
|
29
|
+
else window.localStorage.removeItem(DISMISSED_KEY);
|
|
30
|
+
} catch {
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (import.meta.client) dismissed.value = readDismissed();
|
|
34
|
+
function identityOrder(n) {
|
|
35
|
+
return Array.from({ length: n }, (_, i) => i);
|
|
36
|
+
}
|
|
37
|
+
function shuffled(n, keepFirst) {
|
|
38
|
+
const rest = identityOrder(n).filter((i) => i !== keepFirst);
|
|
39
|
+
for (let i = rest.length - 1; i > 0; i--) {
|
|
40
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
41
|
+
[rest[i], rest[j]] = [rest[j], rest[i]];
|
|
42
|
+
}
|
|
43
|
+
return keepFirst >= 0 ? [keepFirst, ...rest] : rest;
|
|
44
|
+
}
|
|
45
|
+
function reorder() {
|
|
46
|
+
order.value = shuffle.value ? shuffled(queue.value.length, index.value) : identityOrder(queue.value.length);
|
|
47
|
+
}
|
|
48
|
+
export function useJunPlayer() {
|
|
49
|
+
const current = computed(() => queue.value[index.value] ?? null);
|
|
50
|
+
const hasQueue = computed(() => queue.value.length > 0);
|
|
51
|
+
const orderPos = computed(() => order.value.indexOf(index.value));
|
|
52
|
+
function isCurrent(id) {
|
|
53
|
+
return current.value?.id === id;
|
|
54
|
+
}
|
|
55
|
+
function attach(node) {
|
|
56
|
+
el.value = node;
|
|
57
|
+
if (node) {
|
|
58
|
+
node.volume = volume.value;
|
|
59
|
+
node.muted = muted.value;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function play() {
|
|
63
|
+
void el.value?.play().catch(() => {
|
|
64
|
+
playing.value = false;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function pause() {
|
|
68
|
+
el.value?.pause();
|
|
69
|
+
}
|
|
70
|
+
function toggle() {
|
|
71
|
+
if (!current.value) return;
|
|
72
|
+
if (playing.value) pause();
|
|
73
|
+
else play();
|
|
74
|
+
}
|
|
75
|
+
function playQueue(tracks, startIndex = 0) {
|
|
76
|
+
const wantedId = tracks[Math.min(Math.max(startIndex, 0), tracks.length - 1)]?.id;
|
|
77
|
+
const next2 = tracks.filter((t) => t.uploadId || t.url);
|
|
78
|
+
if (!next2.length) return;
|
|
79
|
+
const found = wantedId ? next2.findIndex((t) => t.id === wantedId) : -1;
|
|
80
|
+
const target = found >= 0 ? found : 0;
|
|
81
|
+
if (dismissed.value) writeDismissed(false);
|
|
82
|
+
const sameTrack = current.value?.id === next2[target]?.id;
|
|
83
|
+
queue.value = next2;
|
|
84
|
+
if (sameTrack) {
|
|
85
|
+
index.value = target;
|
|
86
|
+
reorder();
|
|
87
|
+
toggle();
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
index.value = target;
|
|
91
|
+
reorder();
|
|
92
|
+
currentTime.value = 0;
|
|
93
|
+
playing.value = true;
|
|
94
|
+
}
|
|
95
|
+
function enqueue(track) {
|
|
96
|
+
if (!track.uploadId && !track.url) return;
|
|
97
|
+
if (dismissed.value) writeDismissed(false);
|
|
98
|
+
queue.value = [...queue.value, track];
|
|
99
|
+
reorder();
|
|
100
|
+
if (index.value < 0) {
|
|
101
|
+
index.value = queue.value.length - 1;
|
|
102
|
+
playing.value = true;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
function select(i) {
|
|
106
|
+
if (i < 0 || i >= queue.value.length) return;
|
|
107
|
+
index.value = i;
|
|
108
|
+
currentTime.value = 0;
|
|
109
|
+
playing.value = true;
|
|
110
|
+
}
|
|
111
|
+
function next() {
|
|
112
|
+
if (!hasQueue.value) return false;
|
|
113
|
+
const pos = orderPos.value;
|
|
114
|
+
if (pos < order.value.length - 1) {
|
|
115
|
+
select(order.value[pos + 1]);
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
if (repeat.value === "all") {
|
|
119
|
+
if (shuffle.value) order.value = shuffled(queue.value.length, -1);
|
|
120
|
+
select(order.value[0]);
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
function prev() {
|
|
126
|
+
if (currentTime.value > 3) {
|
|
127
|
+
seek(0);
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
const pos = orderPos.value;
|
|
131
|
+
if (pos > 0) select(order.value[pos - 1]);
|
|
132
|
+
else seek(0);
|
|
133
|
+
}
|
|
134
|
+
function seek(seconds) {
|
|
135
|
+
const node = el.value;
|
|
136
|
+
const to = Math.max(0, Math.min(seconds, duration.value || seconds));
|
|
137
|
+
currentTime.value = to;
|
|
138
|
+
if (node) node.currentTime = to;
|
|
139
|
+
}
|
|
140
|
+
function setVolume(v) {
|
|
141
|
+
volume.value = Math.max(0, Math.min(1, v));
|
|
142
|
+
if (el.value) el.value.volume = volume.value;
|
|
143
|
+
if (volume.value > 0 && muted.value) setMuted(false);
|
|
144
|
+
}
|
|
145
|
+
function setMuted(m) {
|
|
146
|
+
muted.value = m;
|
|
147
|
+
if (el.value) el.value.muted = m;
|
|
148
|
+
}
|
|
149
|
+
function toggleShuffle() {
|
|
150
|
+
shuffle.value = !shuffle.value;
|
|
151
|
+
reorder();
|
|
152
|
+
}
|
|
153
|
+
function cycleRepeat() {
|
|
154
|
+
repeat.value = repeat.value === "off" ? "all" : repeat.value === "all" ? "one" : "off";
|
|
155
|
+
}
|
|
156
|
+
function onEnded() {
|
|
157
|
+
if (repeat.value === "one") {
|
|
158
|
+
seek(0);
|
|
159
|
+
play();
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
if (!next()) playing.value = false;
|
|
163
|
+
}
|
|
164
|
+
function stop(remember = true) {
|
|
165
|
+
pause();
|
|
166
|
+
playing.value = false;
|
|
167
|
+
queue.value = [];
|
|
168
|
+
index.value = -1;
|
|
169
|
+
currentTime.value = 0;
|
|
170
|
+
duration.value = 0;
|
|
171
|
+
expanded.value = false;
|
|
172
|
+
if (remember) writeDismissed(true);
|
|
173
|
+
}
|
|
174
|
+
return {
|
|
175
|
+
// state
|
|
176
|
+
queue,
|
|
177
|
+
index,
|
|
178
|
+
current,
|
|
179
|
+
hasQueue,
|
|
180
|
+
dismissed,
|
|
181
|
+
playing,
|
|
182
|
+
currentTime,
|
|
183
|
+
duration,
|
|
184
|
+
volume,
|
|
185
|
+
muted,
|
|
186
|
+
shuffle,
|
|
187
|
+
repeat,
|
|
188
|
+
expanded,
|
|
189
|
+
// actions
|
|
190
|
+
attach,
|
|
191
|
+
play,
|
|
192
|
+
pause,
|
|
193
|
+
toggle,
|
|
194
|
+
playQueue,
|
|
195
|
+
enqueue,
|
|
196
|
+
select,
|
|
197
|
+
next,
|
|
198
|
+
prev,
|
|
199
|
+
seek,
|
|
200
|
+
setVolume,
|
|
201
|
+
setMuted,
|
|
202
|
+
toggleShuffle,
|
|
203
|
+
cycleRepeat,
|
|
204
|
+
onEnded,
|
|
205
|
+
stop,
|
|
206
|
+
isCurrent
|
|
207
|
+
};
|
|
208
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The site's awareness wiring. Two halves.
|
|
3
|
+
*
|
|
4
|
+
* `useJunPresenceBroadcast()` — mounted ONCE, in the layout. Broadcasts the
|
|
5
|
+
* standard `docId` awareness field plus a `page` route path on every
|
|
6
|
+
* navigation. **That `docId` field is the wire contract** @abraca/nuxt's whole
|
|
7
|
+
* presence toolkit reads — `useAwarenessPeers().peersInDoc`, `useItemPresence`,
|
|
8
|
+
* `APresence`'s docId filter. Without this broadcast the toolkit sees nobody,
|
|
9
|
+
* anywhere, and every presence feature silently shows an empty site.
|
|
10
|
+
*
|
|
11
|
+
* `useJunTravellers()` — the read side: every OTHER connected peer that has an
|
|
12
|
+
* identity attached, plus a docId → peers index for the navbar dots and
|
|
13
|
+
* anything else that wants "who is where" at a glance.
|
|
14
|
+
*
|
|
15
|
+
* Presence is the one place colour may enter the monochrome chrome — it is
|
|
16
|
+
* pubkey-derived per visitor, so dots and accents carry it while text stays
|
|
17
|
+
* neutral.
|
|
18
|
+
*/
|
|
19
|
+
import { type ComputedRef } from 'vue';
|
|
20
|
+
export interface JunTraveller {
|
|
21
|
+
clientId: number;
|
|
22
|
+
name: string;
|
|
23
|
+
color: string;
|
|
24
|
+
idle: boolean;
|
|
25
|
+
docId: string | null;
|
|
26
|
+
page: string | null;
|
|
27
|
+
}
|
|
28
|
+
export declare function useJunPresenceBroadcast(): void;
|
|
29
|
+
export declare function useJunTravellers(): {
|
|
30
|
+
travellers: ComputedRef<JunTraveller[]>;
|
|
31
|
+
byDocId: ComputedRef<Map<string, JunTraveller[]>>;
|
|
32
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { computed, watch } from "vue";
|
|
2
|
+
import {
|
|
3
|
+
useAbracadabra,
|
|
4
|
+
useAwareness,
|
|
5
|
+
useAwarenessPeers,
|
|
6
|
+
useRoute,
|
|
7
|
+
useSlugRoute
|
|
8
|
+
} from "#imports";
|
|
9
|
+
export function useJunPresenceBroadcast() {
|
|
10
|
+
if (import.meta.server) return;
|
|
11
|
+
const { setField } = useAwareness();
|
|
12
|
+
const route = useRoute();
|
|
13
|
+
const { docId } = useSlugRoute();
|
|
14
|
+
const abra = useAbracadabra();
|
|
15
|
+
const currentDocId = computed(
|
|
16
|
+
() => docId.value ?? (route.path === "/" ? abra.spaceDocId.value ?? null : null)
|
|
17
|
+
);
|
|
18
|
+
watch(
|
|
19
|
+
[currentDocId, () => route.path],
|
|
20
|
+
([id, path]) => {
|
|
21
|
+
setField("docId", id ?? null);
|
|
22
|
+
setField("page", path);
|
|
23
|
+
},
|
|
24
|
+
{ immediate: true }
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
export function useJunTravellers() {
|
|
28
|
+
const { peers } = useAwarenessPeers();
|
|
29
|
+
const travellers = computed(
|
|
30
|
+
() => peers.value.filter((p) => !!p.user).map((p) => {
|
|
31
|
+
const state = p;
|
|
32
|
+
return {
|
|
33
|
+
clientId: p.clientId,
|
|
34
|
+
name: p.user?.name || "Traveller",
|
|
35
|
+
color: p.user?.color || "var(--ui-text-muted)",
|
|
36
|
+
idle: p.idle,
|
|
37
|
+
docId: typeof state.docId === "string" ? state.docId : null,
|
|
38
|
+
page: typeof state.page === "string" ? state.page : null
|
|
39
|
+
};
|
|
40
|
+
})
|
|
41
|
+
);
|
|
42
|
+
const byDocId = computed(() => {
|
|
43
|
+
const map = /* @__PURE__ */ new Map();
|
|
44
|
+
for (const t of travellers.value) {
|
|
45
|
+
if (!t.docId) continue;
|
|
46
|
+
const list = map.get(t.docId) ?? [];
|
|
47
|
+
list.push(t);
|
|
48
|
+
map.set(t.docId, list);
|
|
49
|
+
}
|
|
50
|
+
return map;
|
|
51
|
+
});
|
|
52
|
+
return { travellers, byDocId };
|
|
53
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** The attribute that makes an element a drag target. Its value is the key. */
|
|
2
|
+
export declare const JUN_ACTION_ATTR = "data-jun-action";
|
|
3
|
+
export interface JunPressDragOptions {
|
|
4
|
+
/** Fired on `pointerdown`. Open or unfold whatever is about to be dragged into. */
|
|
5
|
+
onOpen?: () => void;
|
|
6
|
+
/** Released in place, having never become a drag. The trigger's own default. */
|
|
7
|
+
onTap?: () => void;
|
|
8
|
+
/** Released over a `data-jun-action` element. */
|
|
9
|
+
onPick?: (key: string, el: HTMLElement) => void;
|
|
10
|
+
/** Dragged, then released over nothing — or cancelled by the browser. */
|
|
11
|
+
onCancel?: () => void;
|
|
12
|
+
/** Consulted on `pointerdown`; a falsy answer means no gesture at all. */
|
|
13
|
+
enabled?: () => boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function useJunPressDrag(options?: JunPressDragOptions): {
|
|
16
|
+
start: (e: PointerEvent) => void;
|
|
17
|
+
pressing: import("vue").Ref<boolean, boolean>;
|
|
18
|
+
dragging: import("vue").Ref<boolean, boolean>;
|
|
19
|
+
hot: import("vue").Ref<string | null, string | null>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { onScopeDispose, ref } from "vue";
|
|
2
|
+
export const JUN_ACTION_ATTR = "data-jun-action";
|
|
3
|
+
const DRAG_PX = 6;
|
|
4
|
+
export function useJunPressDrag(options = {}) {
|
|
5
|
+
const pressing = ref(false);
|
|
6
|
+
const dragging = ref(false);
|
|
7
|
+
const hot = ref(null);
|
|
8
|
+
let pointerId = -1;
|
|
9
|
+
let startX = 0;
|
|
10
|
+
let startY = 0;
|
|
11
|
+
function actionAt(x, y) {
|
|
12
|
+
const under = document.elementFromPoint(x, y);
|
|
13
|
+
const el = under?.closest?.(`[${JUN_ACTION_ATTR}]`);
|
|
14
|
+
if (!el) return null;
|
|
15
|
+
if (el.hasAttribute("disabled") || el.getAttribute("aria-disabled") === "true") return null;
|
|
16
|
+
const key = el.getAttribute(JUN_ACTION_ATTR);
|
|
17
|
+
return key ? { key, el } : null;
|
|
18
|
+
}
|
|
19
|
+
function stop() {
|
|
20
|
+
pressing.value = false;
|
|
21
|
+
dragging.value = false;
|
|
22
|
+
hot.value = null;
|
|
23
|
+
pointerId = -1;
|
|
24
|
+
window.removeEventListener("pointermove", onMove);
|
|
25
|
+
window.removeEventListener("pointerup", onUp);
|
|
26
|
+
window.removeEventListener("pointercancel", onPointerCancel);
|
|
27
|
+
window.removeEventListener("contextmenu", onContextMenu, true);
|
|
28
|
+
}
|
|
29
|
+
function onMove(e) {
|
|
30
|
+
if (e.pointerId !== pointerId) return;
|
|
31
|
+
if (!dragging.value && Math.hypot(e.clientX - startX, e.clientY - startY) > DRAG_PX) {
|
|
32
|
+
dragging.value = true;
|
|
33
|
+
}
|
|
34
|
+
if (!dragging.value) return;
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
hot.value = actionAt(e.clientX, e.clientY)?.key ?? null;
|
|
37
|
+
}
|
|
38
|
+
function onUp(e) {
|
|
39
|
+
if (e.pointerId !== pointerId) return;
|
|
40
|
+
const dragged = dragging.value;
|
|
41
|
+
const hit = dragged ? actionAt(e.clientX, e.clientY) : null;
|
|
42
|
+
stop();
|
|
43
|
+
if (hit) {
|
|
44
|
+
suppressClick();
|
|
45
|
+
options.onPick?.(hit.key, hit.el);
|
|
46
|
+
} else if (!dragged) options.onTap?.();
|
|
47
|
+
else options.onCancel?.();
|
|
48
|
+
}
|
|
49
|
+
function onPointerCancel(e) {
|
|
50
|
+
if (e.pointerId !== pointerId) return;
|
|
51
|
+
stop();
|
|
52
|
+
options.onCancel?.();
|
|
53
|
+
}
|
|
54
|
+
function onContextMenu(e) {
|
|
55
|
+
e.preventDefault();
|
|
56
|
+
}
|
|
57
|
+
function suppressClick() {
|
|
58
|
+
const swallow = (e) => {
|
|
59
|
+
e.stopPropagation();
|
|
60
|
+
e.preventDefault();
|
|
61
|
+
};
|
|
62
|
+
window.addEventListener("click", swallow, { capture: true, once: true });
|
|
63
|
+
setTimeout(() => {
|
|
64
|
+
window.removeEventListener("click", swallow, { capture: true });
|
|
65
|
+
}, 350);
|
|
66
|
+
}
|
|
67
|
+
function start(e) {
|
|
68
|
+
if (options.enabled && !options.enabled()) return;
|
|
69
|
+
if (e.button !== 0) return;
|
|
70
|
+
if (pressing.value) return;
|
|
71
|
+
pointerId = e.pointerId;
|
|
72
|
+
startX = e.clientX;
|
|
73
|
+
startY = e.clientY;
|
|
74
|
+
pressing.value = true;
|
|
75
|
+
dragging.value = false;
|
|
76
|
+
hot.value = null;
|
|
77
|
+
window.addEventListener("pointermove", onMove);
|
|
78
|
+
window.addEventListener("pointerup", onUp);
|
|
79
|
+
window.addEventListener("pointercancel", onPointerCancel);
|
|
80
|
+
window.addEventListener("contextmenu", onContextMenu, true);
|
|
81
|
+
options.onOpen?.();
|
|
82
|
+
}
|
|
83
|
+
onScopeDispose(stop);
|
|
84
|
+
return { start, pressing, dragging, hot };
|
|
85
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function useJunRecent(): {
|
|
2
|
+
/** Ids, most recent first. Resolve against the live tree before showing. */
|
|
3
|
+
recent: import("vue").ComputedRef<{
|
|
4
|
+
id: string;
|
|
5
|
+
at: number;
|
|
6
|
+
}[]>;
|
|
7
|
+
record: (id: string | null | undefined) => void;
|
|
8
|
+
clear: () => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { computed, ref } from "vue";
|
|
2
|
+
const LIMIT = 12;
|
|
3
|
+
const STORAGE_KEY = "jun:recent";
|
|
4
|
+
const trail = ref([]);
|
|
5
|
+
let loaded = false;
|
|
6
|
+
function load() {
|
|
7
|
+
if (loaded || !import.meta.client) return;
|
|
8
|
+
loaded = true;
|
|
9
|
+
try {
|
|
10
|
+
const raw = localStorage.getItem(STORAGE_KEY);
|
|
11
|
+
const parsed = raw ? JSON.parse(raw) : null;
|
|
12
|
+
if (!Array.isArray(parsed)) return;
|
|
13
|
+
trail.value = parsed.filter((e) => !!e && typeof e.id === "string" && typeof e.at === "number").slice(0, LIMIT);
|
|
14
|
+
} catch {
|
|
15
|
+
trail.value = [];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function persist() {
|
|
19
|
+
if (!import.meta.client) return;
|
|
20
|
+
try {
|
|
21
|
+
localStorage.setItem(STORAGE_KEY, JSON.stringify(trail.value));
|
|
22
|
+
} catch {
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export function useJunRecent() {
|
|
26
|
+
load();
|
|
27
|
+
function record(id) {
|
|
28
|
+
if (!id || !import.meta.client) return;
|
|
29
|
+
const now = Date.now();
|
|
30
|
+
const rest = trail.value.filter((e) => e.id !== id);
|
|
31
|
+
trail.value = [{ id, at: now }, ...rest].slice(0, LIMIT);
|
|
32
|
+
persist();
|
|
33
|
+
}
|
|
34
|
+
function clear() {
|
|
35
|
+
trail.value = [];
|
|
36
|
+
persist();
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
/** Ids, most recent first. Resolve against the live tree before showing. */
|
|
40
|
+
recent: computed(() => trail.value),
|
|
41
|
+
record,
|
|
42
|
+
clear
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare function useJunRename(): {
|
|
2
|
+
renameDoc: (docId: string, label: string) => void;
|
|
3
|
+
docIdForAlias: (slug: string) => string | null;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* The backstop for renames that DON'T come through `renameDoc`.
|
|
7
|
+
*
|
|
8
|
+
* @abraca/nuxt owns rename surfaces of its own — typing in a document's H1
|
|
9
|
+
* (AEditor mirrors the header into the tree label), the sub-page list's rename
|
|
10
|
+
* popover, the sidebar tree. Those write the label directly, so no alias is
|
|
11
|
+
* recorded and the page's old URL dies with the rename.
|
|
12
|
+
*
|
|
13
|
+
* This watcher closes the gap generically: it snapshots the slug map and,
|
|
14
|
+
* whenever a document's canonical slug changes, appends the slug it just
|
|
15
|
+
* vacated. Mount it ONCE in the layout. It is gated on `canEdit` — visitors are
|
|
16
|
+
* viewer-role and the server would drop their writes anyway, and only the owner
|
|
17
|
+
* can rename in the first place.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useJunSlugAliasTracker(): void;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { watch } from "vue";
|
|
2
|
+
import { useDocSlugs, useDocTree } from "#imports";
|
|
3
|
+
import { useJunStudio } from "./useJunStudio.js";
|
|
4
|
+
const MAX_ALIASES = 8;
|
|
5
|
+
function readAliases(meta) {
|
|
6
|
+
return Array.isArray(meta.slugAliases) ? meta.slugAliases.filter((s) => typeof s === "string") : [];
|
|
7
|
+
}
|
|
8
|
+
export function useJunRename() {
|
|
9
|
+
const tree = useDocTree();
|
|
10
|
+
const { slugMap } = useDocSlugs();
|
|
11
|
+
function renameDoc(docId, label) {
|
|
12
|
+
const next = label.trim();
|
|
13
|
+
if (!docId || !next) return;
|
|
14
|
+
const raw = tree.raw;
|
|
15
|
+
const entry = raw.get(docId);
|
|
16
|
+
if (!entry || entry.label === next) return;
|
|
17
|
+
const prevSlug = slugMap.value.idToSlug[docId];
|
|
18
|
+
const meta = { ...entry.meta ?? {} };
|
|
19
|
+
if (prevSlug) {
|
|
20
|
+
const aliases = readAliases(meta);
|
|
21
|
+
meta.slugAliases = [...aliases.filter((s) => s !== prevSlug), prevSlug].slice(-MAX_ALIASES);
|
|
22
|
+
}
|
|
23
|
+
raw.set(docId, { ...entry, label: next, meta, updatedAt: Date.now() });
|
|
24
|
+
}
|
|
25
|
+
function docIdForAlias(slug) {
|
|
26
|
+
if (!slug) return null;
|
|
27
|
+
for (const entry of tree.entries.value) {
|
|
28
|
+
if (entry.trashed) continue;
|
|
29
|
+
const aliases = entry.meta?.slugAliases;
|
|
30
|
+
if (Array.isArray(aliases) && aliases.includes(slug)) return entry.id;
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
return { renameDoc, docIdForAlias };
|
|
35
|
+
}
|
|
36
|
+
export function useJunSlugAliasTracker() {
|
|
37
|
+
if (!import.meta.client) return;
|
|
38
|
+
const { canEdit } = useJunStudio();
|
|
39
|
+
const tree = useDocTree();
|
|
40
|
+
const { slugMap } = useDocSlugs();
|
|
41
|
+
let previous = null;
|
|
42
|
+
watch(
|
|
43
|
+
() => slugMap.value.idToSlug,
|
|
44
|
+
(next) => {
|
|
45
|
+
const before = previous;
|
|
46
|
+
previous = { ...next };
|
|
47
|
+
if (!before || !canEdit.value) return;
|
|
48
|
+
for (const [docId, oldSlug] of Object.entries(before)) {
|
|
49
|
+
const newSlug = next[docId];
|
|
50
|
+
if (!newSlug || newSlug === oldSlug) continue;
|
|
51
|
+
const entry = tree.raw.get(docId);
|
|
52
|
+
if (!entry) continue;
|
|
53
|
+
const meta = { ...entry.meta ?? {} };
|
|
54
|
+
const aliases = readAliases(meta);
|
|
55
|
+
if (aliases.includes(oldSlug)) continue;
|
|
56
|
+
meta.slugAliases = [...aliases, oldSlug].slice(-MAX_ALIASES);
|
|
57
|
+
tree.raw.set(docId, { ...entry, meta });
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{ immediate: true, deep: false }
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useJunRouteGeoHeal(): void;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { onMounted, onUnmounted, watch } from "vue";
|
|
2
|
+
import { useDocTree } from "#imports";
|
|
3
|
+
import { junSimplifyPath } from "../utils/junSimplifyPath.js";
|
|
4
|
+
import { useJunStudio } from "./useJunStudio.js";
|
|
5
|
+
const MAX_POINTS = 200;
|
|
6
|
+
const START_DELAY_MS = 2500;
|
|
7
|
+
export function useJunRouteGeoHeal() {
|
|
8
|
+
if (!import.meta.client) return;
|
|
9
|
+
const { canEdit } = useJunStudio();
|
|
10
|
+
const tree = useDocTree();
|
|
11
|
+
let done = false;
|
|
12
|
+
function heal() {
|
|
13
|
+
if (done || !canEdit.value) return;
|
|
14
|
+
const raw = tree.raw;
|
|
15
|
+
const oversized = tree.entries.value.filter((e) => {
|
|
16
|
+
const geo = e.meta?.routeGeo;
|
|
17
|
+
return Array.isArray(geo) && geo.length > MAX_POINTS;
|
|
18
|
+
});
|
|
19
|
+
if (!oversized.length) return;
|
|
20
|
+
done = true;
|
|
21
|
+
let saved = 0;
|
|
22
|
+
for (const entry of oversized) {
|
|
23
|
+
const current = raw.get(entry.id);
|
|
24
|
+
if (!current) continue;
|
|
25
|
+
const meta = { ...current.meta ?? {} };
|
|
26
|
+
const geo = meta.routeGeo;
|
|
27
|
+
if (!Array.isArray(geo) || geo.length <= MAX_POINTS) continue;
|
|
28
|
+
const slim = junSimplifyPath(geo, MAX_POINTS);
|
|
29
|
+
if (slim.length >= geo.length) continue;
|
|
30
|
+
saved += geo.length - slim.length;
|
|
31
|
+
meta.routeGeo = slim;
|
|
32
|
+
raw.set(entry.id, { ...current, meta });
|
|
33
|
+
}
|
|
34
|
+
if (saved && import.meta.dev) {
|
|
35
|
+
console.info(`[jun] route-geo heal: dropped ${saved} redundant coordinate pairs from the document tree`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
onMounted(() => {
|
|
39
|
+
const timer = setTimeout(heal, START_DELAY_MS);
|
|
40
|
+
onUnmounted(() => clearTimeout(timer));
|
|
41
|
+
});
|
|
42
|
+
watch([() => tree.entries.value.length, canEdit], () => {
|
|
43
|
+
if (!done) heal();
|
|
44
|
+
});
|
|
45
|
+
}
|