@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,233 @@
|
|
|
1
|
+
import { onBeforeUnmount, onMounted, ref, watch } from "vue";
|
|
2
|
+
import { useRoute } from "vue-router";
|
|
3
|
+
const EDGES = [
|
|
4
|
+
"top",
|
|
5
|
+
"bottom",
|
|
6
|
+
"left-top",
|
|
7
|
+
"left-bottom",
|
|
8
|
+
"right-top",
|
|
9
|
+
"right-bottom"
|
|
10
|
+
];
|
|
11
|
+
const CORNER_BAND = 72;
|
|
12
|
+
const ALIGN = ["x-left", "x-right", "y-top", "y-bottom"];
|
|
13
|
+
const SETTLE_MS = 260;
|
|
14
|
+
const GAP = 16;
|
|
15
|
+
const PLAYER_SIDE_ROOM = 220;
|
|
16
|
+
const published = {
|
|
17
|
+
edges: { "top": 0, "bottom": 0, "left-top": 0, "left-bottom": 0, "right-top": 0, "right-bottom": 0 },
|
|
18
|
+
align: { "x-left": GAP, "x-right": GAP, "y-top": GAP, "y-bottom": GAP },
|
|
19
|
+
radius: null
|
|
20
|
+
};
|
|
21
|
+
const navPlacement = ref("top");
|
|
22
|
+
let consumers = 0;
|
|
23
|
+
let raf = 0;
|
|
24
|
+
let quietUntil = 0;
|
|
25
|
+
export function junMirrorCorner(corner, placement) {
|
|
26
|
+
const navAtBottom = placement === "bottom";
|
|
27
|
+
const navAtTop = placement === "top" || placement === "top-bar";
|
|
28
|
+
if (navAtBottom && corner.startsWith("bottom")) {
|
|
29
|
+
return corner.replace("bottom", "top");
|
|
30
|
+
}
|
|
31
|
+
if (navAtTop && corner.startsWith("top")) {
|
|
32
|
+
return corner.replace("top", "bottom");
|
|
33
|
+
}
|
|
34
|
+
return corner;
|
|
35
|
+
}
|
|
36
|
+
function measure() {
|
|
37
|
+
const out = {
|
|
38
|
+
edges: { "top": 0, "bottom": 0, "left-top": 0, "left-bottom": 0, "right-top": 0, "right-bottom": 0 },
|
|
39
|
+
align: { "x-left": GAP, "x-right": GAP, "y-top": GAP, "y-bottom": GAP },
|
|
40
|
+
radius: null
|
|
41
|
+
};
|
|
42
|
+
const html = document.documentElement;
|
|
43
|
+
const vw = html.clientWidth;
|
|
44
|
+
const vh = html.clientHeight;
|
|
45
|
+
const placement = html.getAttribute("data-jun-nav") ?? "top";
|
|
46
|
+
navPlacement.value = placement;
|
|
47
|
+
const nav = document.querySelector(".jun-nav-panel");
|
|
48
|
+
if (nav) {
|
|
49
|
+
const r = nav.getBoundingClientRect();
|
|
50
|
+
if (r.width > 0 && r.height > 0) {
|
|
51
|
+
const rail = placement === "rail-left" || placement === "rail-right";
|
|
52
|
+
if (rail) {
|
|
53
|
+
const push = placement === "rail-left" ? Math.max(0, r.right) : Math.max(0, vw - r.left);
|
|
54
|
+
const side = placement === "rail-left" ? "left" : "right";
|
|
55
|
+
if (r.top < CORNER_BAND) out.edges[`${side}-top`] = push;
|
|
56
|
+
if (r.bottom > vh - CORNER_BAND) out.edges[`${side}-bottom`] = push;
|
|
57
|
+
} else if (placement === "bottom") out.edges.bottom = Math.max(0, vh - r.top);
|
|
58
|
+
else out.edges.top = Math.max(0, r.bottom);
|
|
59
|
+
const docked = r.left <= 1 && r.right >= vw - 1;
|
|
60
|
+
if (!rail && !docked) {
|
|
61
|
+
out.align["x-left"] = Math.max(GAP, r.left);
|
|
62
|
+
out.align["x-right"] = Math.max(GAP, vw - r.right);
|
|
63
|
+
if (placement === "bottom") out.align["y-bottom"] = Math.max(GAP, vh - r.bottom);
|
|
64
|
+
else out.align["y-top"] = Math.max(GAP, r.top);
|
|
65
|
+
}
|
|
66
|
+
if (!docked) {
|
|
67
|
+
const rad = getComputedStyle(nav).borderTopLeftRadius;
|
|
68
|
+
if (rad && Number.parseFloat(rad) > 0) out.radius = rad;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
const player = document.querySelector(".jun-player");
|
|
73
|
+
if (player) {
|
|
74
|
+
const pr = player.getBoundingClientRect();
|
|
75
|
+
if (pr.width > 0 && pr.height > 0 && Math.min(pr.left, vw - pr.right) < PLAYER_SIDE_ROOM) {
|
|
76
|
+
if (placement === "bottom") out.edges.top = Math.max(out.edges.top, pr.bottom);
|
|
77
|
+
else out.edges.bottom = Math.max(out.edges.bottom, vh - pr.top);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
const panel = document.querySelector(".jun-panel-page");
|
|
81
|
+
if (panel) {
|
|
82
|
+
const pr = panel.getBoundingClientRect();
|
|
83
|
+
if (pr.height > 0) {
|
|
84
|
+
out.edges.top = Math.max(out.edges.top, pr.top, leadingBarBottom(panel, pr));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return out;
|
|
88
|
+
}
|
|
89
|
+
function leadingBarBottom(panel, pr) {
|
|
90
|
+
const MAX_BAR_H = 72;
|
|
91
|
+
let found = 0;
|
|
92
|
+
const visit = (el, depth) => {
|
|
93
|
+
if (depth > 3 || found) return;
|
|
94
|
+
for (const child of Array.from(el.children)) {
|
|
95
|
+
const r = child.getBoundingClientRect();
|
|
96
|
+
const fullWidth = pr.width - r.width <= 4;
|
|
97
|
+
const flushTop = Math.abs(r.top - pr.top) <= 2;
|
|
98
|
+
if (r.height > 0 && r.height <= MAX_BAR_H && fullWidth && flushTop) {
|
|
99
|
+
found = r.bottom;
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
visit(child, depth + 1);
|
|
103
|
+
if (found) return;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
visit(panel, 0);
|
|
107
|
+
return found;
|
|
108
|
+
}
|
|
109
|
+
let writing = false;
|
|
110
|
+
function publish() {
|
|
111
|
+
const next = measure();
|
|
112
|
+
const style = document.documentElement.style;
|
|
113
|
+
let changed = false;
|
|
114
|
+
writing = true;
|
|
115
|
+
for (const edge of EDGES) {
|
|
116
|
+
if (Math.abs(next.edges[edge] - published.edges[edge]) < 0.5) continue;
|
|
117
|
+
published.edges[edge] = next.edges[edge];
|
|
118
|
+
style.setProperty(`--jun-chrome-${edge}`, `${Math.round(next.edges[edge])}px`);
|
|
119
|
+
changed = true;
|
|
120
|
+
}
|
|
121
|
+
for (const key of ALIGN) {
|
|
122
|
+
if (Math.abs(next.align[key] - published.align[key]) < 0.5) continue;
|
|
123
|
+
published.align[key] = next.align[key];
|
|
124
|
+
style.setProperty(`--jun-chrome-${key}`, `${Math.round(next.align[key])}px`);
|
|
125
|
+
changed = true;
|
|
126
|
+
}
|
|
127
|
+
if (next.radius !== published.radius) {
|
|
128
|
+
published.radius = next.radius;
|
|
129
|
+
if (next.radius) style.setProperty("--jun-chrome-radius", next.radius);
|
|
130
|
+
else style.removeProperty("--jun-chrome-radius");
|
|
131
|
+
changed = true;
|
|
132
|
+
}
|
|
133
|
+
writing = false;
|
|
134
|
+
return changed;
|
|
135
|
+
}
|
|
136
|
+
function frame() {
|
|
137
|
+
raf = 0;
|
|
138
|
+
if (!consumers) return;
|
|
139
|
+
if (publish()) quietUntil = performance.now() + SETTLE_MS;
|
|
140
|
+
if (performance.now() < quietUntil) raf = requestAnimationFrame(frame);
|
|
141
|
+
}
|
|
142
|
+
function nudge() {
|
|
143
|
+
if (!consumers || writing) return;
|
|
144
|
+
quietUntil = performance.now() + SETTLE_MS;
|
|
145
|
+
if (!raf) raf = requestAnimationFrame(frame);
|
|
146
|
+
}
|
|
147
|
+
let navObserver = null;
|
|
148
|
+
let resizeObserver = null;
|
|
149
|
+
function attach() {
|
|
150
|
+
window.addEventListener("resize", nudge, { passive: true });
|
|
151
|
+
window.addEventListener("scroll", nudge, { passive: true });
|
|
152
|
+
document.addEventListener("transitionrun", nudge, { passive: true, capture: true });
|
|
153
|
+
document.addEventListener("transitionend", nudge, { passive: true, capture: true });
|
|
154
|
+
navObserver = new MutationObserver(nudge);
|
|
155
|
+
navObserver.observe(document.documentElement, {
|
|
156
|
+
attributes: true,
|
|
157
|
+
attributeFilter: ["data-jun-nav", "style"]
|
|
158
|
+
});
|
|
159
|
+
resizeObserver = new ResizeObserver(nudge);
|
|
160
|
+
const nav = document.querySelector(".jun-nav-panel");
|
|
161
|
+
if (nav) resizeObserver.observe(nav);
|
|
162
|
+
nudge();
|
|
163
|
+
}
|
|
164
|
+
function detach() {
|
|
165
|
+
window.removeEventListener("resize", nudge);
|
|
166
|
+
window.removeEventListener("scroll", nudge);
|
|
167
|
+
document.removeEventListener("transitionrun", nudge, true);
|
|
168
|
+
document.removeEventListener("transitionend", nudge, true);
|
|
169
|
+
navObserver?.disconnect();
|
|
170
|
+
navObserver = null;
|
|
171
|
+
resizeObserver?.disconnect();
|
|
172
|
+
resizeObserver = null;
|
|
173
|
+
if (raf) cancelAnimationFrame(raf);
|
|
174
|
+
raf = 0;
|
|
175
|
+
}
|
|
176
|
+
export function useJunChromeInsets() {
|
|
177
|
+
const route = useRoute();
|
|
178
|
+
if (import.meta.client) {
|
|
179
|
+
navPlacement.value = document.documentElement.getAttribute("data-jun-nav") ?? navPlacement.value;
|
|
180
|
+
}
|
|
181
|
+
onMounted(() => {
|
|
182
|
+
consumers++;
|
|
183
|
+
if (consumers === 1) attach();
|
|
184
|
+
else nudge();
|
|
185
|
+
});
|
|
186
|
+
watch(() => route.fullPath, () => {
|
|
187
|
+
nudge();
|
|
188
|
+
for (const ms of [400, 1200]) setTimeout(nudge, ms);
|
|
189
|
+
});
|
|
190
|
+
onBeforeUnmount(() => {
|
|
191
|
+
consumers = Math.max(0, consumers - 1);
|
|
192
|
+
if (!consumers) detach();
|
|
193
|
+
});
|
|
194
|
+
return { navPlacement };
|
|
195
|
+
}
|
|
196
|
+
export function useJunChromeSlot(name, el) {
|
|
197
|
+
const prop = `--jun-${name}-h`;
|
|
198
|
+
let observer = null;
|
|
199
|
+
let last = -1;
|
|
200
|
+
function write(h) {
|
|
201
|
+
if (Math.abs(h - last) < 0.5) return;
|
|
202
|
+
last = h;
|
|
203
|
+
document.documentElement.style.setProperty(prop, `${Math.round(h)}px`);
|
|
204
|
+
}
|
|
205
|
+
function clear() {
|
|
206
|
+
last = -1;
|
|
207
|
+
document.documentElement.style.removeProperty(prop);
|
|
208
|
+
}
|
|
209
|
+
const stop = watch(
|
|
210
|
+
el,
|
|
211
|
+
(node) => {
|
|
212
|
+
observer?.disconnect();
|
|
213
|
+
observer = null;
|
|
214
|
+
if (!node) {
|
|
215
|
+
clear();
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
observer = new ResizeObserver((entries) => {
|
|
219
|
+
const box = entries[0]?.borderBoxSize?.[0];
|
|
220
|
+
write(box ? box.blockSize : entries[0].target.offsetHeight);
|
|
221
|
+
});
|
|
222
|
+
observer.observe(node);
|
|
223
|
+
write(node.offsetHeight);
|
|
224
|
+
},
|
|
225
|
+
{ immediate: true, flush: "post" }
|
|
226
|
+
);
|
|
227
|
+
onBeforeUnmount(() => {
|
|
228
|
+
stop();
|
|
229
|
+
observer?.disconnect();
|
|
230
|
+
observer = null;
|
|
231
|
+
clear();
|
|
232
|
+
});
|
|
233
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface JunColorMode {
|
|
2
|
+
/** The RESOLVED mode — `system` has already been evaluated. */
|
|
3
|
+
value: string;
|
|
4
|
+
/** The user's preference: `light`, `dark`, `system`, or a custom name. */
|
|
5
|
+
preference: string;
|
|
6
|
+
unknown: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function useJunColorMode(): JunColorMode;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { reactive } from "vue";
|
|
2
|
+
import { useNuxtApp } from "#app";
|
|
3
|
+
const fallback = reactive({
|
|
4
|
+
value: "light",
|
|
5
|
+
preference: "light",
|
|
6
|
+
unknown: false
|
|
7
|
+
});
|
|
8
|
+
export function useJunColorMode() {
|
|
9
|
+
const mode = useNuxtApp().$colorMode;
|
|
10
|
+
return mode ?? fallback;
|
|
11
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** The groups, in the order they appear. */
|
|
2
|
+
export type JunCommandGroup = 'Go' | 'Appearance' | 'Studio' | 'Player' | 'Share';
|
|
3
|
+
export interface JunCommand {
|
|
4
|
+
/** Stable across renders — it is the list key and the selection identity. */
|
|
5
|
+
key: string;
|
|
6
|
+
label: string;
|
|
7
|
+
/** Lucide name, kebab-case. Never an emoji. */
|
|
8
|
+
icon: string;
|
|
9
|
+
group: JunCommandGroup;
|
|
10
|
+
/** Extra search targets. Never rendered. */
|
|
11
|
+
keywords: string[];
|
|
12
|
+
/** A quiet right-aligned note: the current value, or what will happen. */
|
|
13
|
+
hint?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Whether running it should CLOSE the palette. Defaults to true.
|
|
16
|
+
*
|
|
17
|
+
* The theme and surface rows deliberately stay open — the change is visible
|
|
18
|
+
* through the glass while the panel is up, and flipping between two of them
|
|
19
|
+
* to compare is the actual use. Closing on every command would make that
|
|
20
|
+
* three round trips through ⌘K.
|
|
21
|
+
*/
|
|
22
|
+
keepOpen?: boolean;
|
|
23
|
+
run: () => void;
|
|
24
|
+
}
|
|
25
|
+
/** Contributed commands. See `registerJunCommands`. */
|
|
26
|
+
export type JunCommandBuilder = () => JunCommand[];
|
|
27
|
+
/**
|
|
28
|
+
* Contribute commands to the palette. Call from a client plugin; the builder
|
|
29
|
+
* runs on every palette open, so it may read live state.
|
|
30
|
+
*
|
|
31
|
+
* Returns an unregister function, so a plugin that owns a page type can drop
|
|
32
|
+
* its commands when that page unmounts.
|
|
33
|
+
*/
|
|
34
|
+
export declare function registerJunCommands(builder: JunCommandBuilder): () => void;
|
|
35
|
+
export declare function useJunCommands(): {
|
|
36
|
+
commands: import("vue").ComputedRef<JunCommand[]>;
|
|
37
|
+
};
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { useRouter } from "vue-router";
|
|
3
|
+
import { useDocSlugs, useToast } from "#imports";
|
|
4
|
+
import { useJunOptions } from "./useJunOptions.js";
|
|
5
|
+
import { useJunCreatePage } from "./useJunCreatePage.js";
|
|
6
|
+
import { useJunCurrentDoc } from "./useJunCurrentDoc.js";
|
|
7
|
+
import { useJunStudio } from "./useJunStudio.js";
|
|
8
|
+
import { useJunThemeTransition } from "./useJunThemeTransition.js";
|
|
9
|
+
import { useJunPlayer } from "./useJunPlayer.js";
|
|
10
|
+
import { useJunEffectiveConfig, useJunSiteConfig } from "./useJunSiteConfig.js";
|
|
11
|
+
const builders = [];
|
|
12
|
+
export function registerJunCommands(builder) {
|
|
13
|
+
builders.push(builder);
|
|
14
|
+
return () => {
|
|
15
|
+
const i = builders.indexOf(builder);
|
|
16
|
+
if (i >= 0) builders.splice(i, 1);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
const SURFACES = [
|
|
20
|
+
{ value: "glass", label: "Glass" },
|
|
21
|
+
{ value: "soft", label: "Soft" },
|
|
22
|
+
{ value: "solid", label: "Solid" }
|
|
23
|
+
];
|
|
24
|
+
const SURFACE_DEFAULT = "soft";
|
|
25
|
+
const PLACEMENTS = [
|
|
26
|
+
{ value: "top", label: "Floating top" },
|
|
27
|
+
{ value: "top-bar", label: "Docked bar" },
|
|
28
|
+
{ value: "bottom", label: "Bottom" },
|
|
29
|
+
{ value: "rail-left", label: "Left rail" },
|
|
30
|
+
{ value: "rail-right", label: "Right rail" }
|
|
31
|
+
];
|
|
32
|
+
export function useJunCommands() {
|
|
33
|
+
const router = useRouter();
|
|
34
|
+
const { getDocUrl } = useDocSlugs();
|
|
35
|
+
const { features, navigation } = useJunOptions();
|
|
36
|
+
const { canEdit, editMode, toggleEdit, openLogin } = useJunStudio();
|
|
37
|
+
const { toggle: toggleTheme, isDark } = useJunThemeTransition();
|
|
38
|
+
const player = useJunPlayer();
|
|
39
|
+
const effective = useJunEffectiveConfig();
|
|
40
|
+
const siteConfig = useJunSiteConfig();
|
|
41
|
+
const { createPage } = useJunCreatePage();
|
|
42
|
+
const { currentDocId, isRoot } = useJunCurrentDoc();
|
|
43
|
+
const toast = useToast();
|
|
44
|
+
function setSetting(key, value, fallback) {
|
|
45
|
+
siteConfig.set({ [key]: value === fallback ? void 0 : value });
|
|
46
|
+
}
|
|
47
|
+
const currentSurface = computed(() => effective.value.themeSurface ?? SURFACE_DEFAULT);
|
|
48
|
+
const currentPlacement = computed(() => effective.value.navPlacement ?? navigation.placement);
|
|
49
|
+
const settingsUrl = computed(() => siteConfig.docId.value ? getDocUrl(siteConfig.docId.value) ?? null : null);
|
|
50
|
+
async function copyLink() {
|
|
51
|
+
const url = new URL(router.currentRoute.value.fullPath, window.location.origin).href;
|
|
52
|
+
try {
|
|
53
|
+
await navigator.clipboard.writeText(url);
|
|
54
|
+
toast.add({ title: "Link copied", icon: "i-lucide-link", color: "neutral" });
|
|
55
|
+
} catch {
|
|
56
|
+
toast.add({ title: "Could not copy the link", icon: "i-lucide-link-2-off", color: "neutral" });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const commands = computed(() => {
|
|
60
|
+
const out = [];
|
|
61
|
+
out.push({
|
|
62
|
+
key: "go:home",
|
|
63
|
+
label: "Go home",
|
|
64
|
+
icon: "i-lucide-home",
|
|
65
|
+
group: "Go",
|
|
66
|
+
keywords: ["home", "start", "index", "front", "root"],
|
|
67
|
+
run: () => void router.push("/")
|
|
68
|
+
});
|
|
69
|
+
if (features.feeds) {
|
|
70
|
+
out.push({
|
|
71
|
+
key: "go:feed",
|
|
72
|
+
label: "Open the feed",
|
|
73
|
+
icon: "i-lucide-rss",
|
|
74
|
+
group: "Go",
|
|
75
|
+
keywords: ["rss", "feed", "subscribe", "atom", "syndication"],
|
|
76
|
+
hint: "feed.xml",
|
|
77
|
+
run: () => {
|
|
78
|
+
window.open("/feed.xml", "_blank", "noopener");
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
if (canEdit.value && settingsUrl.value) {
|
|
83
|
+
out.push({
|
|
84
|
+
key: "go:settings",
|
|
85
|
+
label: "Site settings",
|
|
86
|
+
icon: "i-lucide-settings",
|
|
87
|
+
group: "Go",
|
|
88
|
+
keywords: ["settings", "config", "configure", "preferences", "options", "admin"],
|
|
89
|
+
run: () => void router.push(settingsUrl.value)
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
out.push({
|
|
93
|
+
key: "theme:toggle",
|
|
94
|
+
label: isDark.value ? "Switch to light mode" : "Switch to dark mode",
|
|
95
|
+
icon: isDark.value ? "i-lucide-sun" : "i-lucide-moon",
|
|
96
|
+
group: "Appearance",
|
|
97
|
+
keywords: ["theme", "dark", "light", "mode", "colour", "color", "night", "day", "contrast"],
|
|
98
|
+
keepOpen: true,
|
|
99
|
+
run: () => toggleTheme()
|
|
100
|
+
});
|
|
101
|
+
if (canEdit.value) {
|
|
102
|
+
for (const s of SURFACES) {
|
|
103
|
+
if (s.value === currentSurface.value) continue;
|
|
104
|
+
out.push({
|
|
105
|
+
key: `surface:${s.value}`,
|
|
106
|
+
label: `Surface \u2014 ${s.label}`,
|
|
107
|
+
icon: s.value === "glass" ? "i-lucide-layers" : s.value === "soft" ? "i-lucide-square" : "i-lucide-square-dashed-bottom",
|
|
108
|
+
group: "Appearance",
|
|
109
|
+
keywords: ["surface", "glass", "blur", "frosted", "performance", "transparency", s.value],
|
|
110
|
+
keepOpen: true,
|
|
111
|
+
run: () => setSetting("themeSurface", s.value, SURFACE_DEFAULT)
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
for (const p of PLACEMENTS) {
|
|
115
|
+
if (p.value === currentPlacement.value) continue;
|
|
116
|
+
out.push({
|
|
117
|
+
key: `nav:${p.value}`,
|
|
118
|
+
label: `Navigation \u2014 ${p.label}`,
|
|
119
|
+
icon: p.value.startsWith("rail") ? p.value === "rail-left" ? "i-lucide-panel-left" : "i-lucide-panel-right" : p.value === "bottom" ? "i-lucide-panel-bottom" : "i-lucide-panel-top",
|
|
120
|
+
group: "Appearance",
|
|
121
|
+
keywords: ["navigation", "navbar", "nav", "menu", "placement", "rail", "bar", p.value],
|
|
122
|
+
keepOpen: true,
|
|
123
|
+
run: () => setSetting("navPlacement", p.value, navigation.placement)
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
if (features.studio) {
|
|
128
|
+
if (canEdit.value) {
|
|
129
|
+
if (currentDocId.value && !isRoot.value) {
|
|
130
|
+
out.push({
|
|
131
|
+
key: "page:new-child",
|
|
132
|
+
label: "New page here",
|
|
133
|
+
icon: "i-lucide-file-plus",
|
|
134
|
+
group: "Studio",
|
|
135
|
+
keywords: ["new", "page", "child", "add", "create", "sub", "under", "here", "document"],
|
|
136
|
+
hint: "child of this page",
|
|
137
|
+
run: () => {
|
|
138
|
+
createPage({ parentId: currentDocId.value });
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
out.push({
|
|
143
|
+
key: "page:new-top",
|
|
144
|
+
label: "New top-level page",
|
|
145
|
+
icon: "i-lucide-plus",
|
|
146
|
+
group: "Studio",
|
|
147
|
+
keywords: ["new", "page", "top", "root", "add", "create", "section", "document"],
|
|
148
|
+
run: () => {
|
|
149
|
+
createPage({});
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
out.push({
|
|
153
|
+
key: "studio:edit",
|
|
154
|
+
label: editMode.value ? "Leave edit mode" : "Enter edit mode",
|
|
155
|
+
icon: editMode.value ? "i-lucide-eye" : "i-lucide-pen-line",
|
|
156
|
+
group: "Studio",
|
|
157
|
+
keywords: ["edit", "editing", "studio", "write", "author", "mode", "preview"],
|
|
158
|
+
run: () => toggleEdit()
|
|
159
|
+
});
|
|
160
|
+
} else {
|
|
161
|
+
out.push({
|
|
162
|
+
key: "studio:login",
|
|
163
|
+
label: "Studio \u2014 sign in",
|
|
164
|
+
icon: "i-lucide-pen-line",
|
|
165
|
+
group: "Studio",
|
|
166
|
+
keywords: ["studio", "sign in", "login", "log in", "owner", "admin", "edit"],
|
|
167
|
+
run: () => openLogin()
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
if (features.player && player.hasQueue.value) {
|
|
172
|
+
out.push({
|
|
173
|
+
key: "player:toggle",
|
|
174
|
+
label: player.playing.value ? "Pause" : "Play",
|
|
175
|
+
icon: player.playing.value ? "i-lucide-pause" : "i-lucide-play",
|
|
176
|
+
group: "Player",
|
|
177
|
+
keywords: ["play", "pause", "music", "audio", "track", "sound", "resume", "stop"],
|
|
178
|
+
hint: player.current.value?.label ?? void 0,
|
|
179
|
+
run: () => player.toggle()
|
|
180
|
+
});
|
|
181
|
+
out.push({
|
|
182
|
+
key: "player:next",
|
|
183
|
+
label: "Next track",
|
|
184
|
+
icon: "i-lucide-skip-forward",
|
|
185
|
+
group: "Player",
|
|
186
|
+
keywords: ["next", "skip", "forward", "music", "track"],
|
|
187
|
+
keepOpen: true,
|
|
188
|
+
run: () => player.next()
|
|
189
|
+
});
|
|
190
|
+
out.push({
|
|
191
|
+
key: "player:prev",
|
|
192
|
+
label: "Previous track",
|
|
193
|
+
icon: "i-lucide-skip-back",
|
|
194
|
+
group: "Player",
|
|
195
|
+
keywords: ["previous", "back", "rewind", "music", "track"],
|
|
196
|
+
keepOpen: true,
|
|
197
|
+
run: () => player.prev()
|
|
198
|
+
});
|
|
199
|
+
out.push({
|
|
200
|
+
key: "player:stop",
|
|
201
|
+
label: "Stop the music",
|
|
202
|
+
icon: "i-lucide-square",
|
|
203
|
+
group: "Player",
|
|
204
|
+
keywords: ["stop", "close", "quit", "silence", "music", "player"],
|
|
205
|
+
run: () => player.stop()
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
out.push({
|
|
209
|
+
key: "share:copy",
|
|
210
|
+
label: "Copy link to this page",
|
|
211
|
+
icon: "i-lucide-link",
|
|
212
|
+
group: "Share",
|
|
213
|
+
keywords: ["copy", "link", "url", "share", "clipboard", "permalink"],
|
|
214
|
+
run: () => void copyLink()
|
|
215
|
+
});
|
|
216
|
+
for (const build of builders) {
|
|
217
|
+
try {
|
|
218
|
+
out.push(...build());
|
|
219
|
+
} catch {
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return out;
|
|
223
|
+
});
|
|
224
|
+
return { commands };
|
|
225
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface JunCreateOptions {
|
|
2
|
+
/** The page title, and therefore its slug. Defaults to `New Page`. */
|
|
3
|
+
label?: string;
|
|
4
|
+
/** Where it goes. `null`/omitted puts it at the top level. */
|
|
5
|
+
parentId?: string | null;
|
|
6
|
+
/**
|
|
7
|
+
* The page type. Defaults to `doc` — the module's editor — which is the right
|
|
8
|
+
* answer for a page whose author has not said what it is: every renderer
|
|
9
|
+
* tolerates foreign children, so it can be converted later without loss.
|
|
10
|
+
*/
|
|
11
|
+
type?: string;
|
|
12
|
+
/** Open it afterwards. On by default: creating a page is a way of going to it. */
|
|
13
|
+
navigate?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function useJunCreatePage(): {
|
|
16
|
+
createPage: (options?: JunCreateOptions) => string | null;
|
|
17
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useAbracadabra, useChildTree, useDocSlugs, useRouter } from "#imports";
|
|
2
|
+
export function useJunCreatePage() {
|
|
3
|
+
const abra = useAbracadabra();
|
|
4
|
+
const tree = useChildTree(abra.doc, "jun-create-page");
|
|
5
|
+
const { getDocUrl } = useDocSlugs();
|
|
6
|
+
const router = useRouter();
|
|
7
|
+
function createPage(options = {}) {
|
|
8
|
+
const parent = options.parentId ?? abra.spaceDocId.value ?? null;
|
|
9
|
+
if (!parent) return null;
|
|
10
|
+
const label = (options.label ?? "").trim() || "New Page";
|
|
11
|
+
const type = options.type ?? "doc";
|
|
12
|
+
const id = crypto.randomUUID();
|
|
13
|
+
const now = Date.now();
|
|
14
|
+
tree.treeMap.set(id, {
|
|
15
|
+
label,
|
|
16
|
+
parentId: parent,
|
|
17
|
+
order: now,
|
|
18
|
+
type,
|
|
19
|
+
createdAt: now,
|
|
20
|
+
updatedAt: now
|
|
21
|
+
});
|
|
22
|
+
tree.registerDoc(id, parent, { label, type });
|
|
23
|
+
if (options.navigate !== false) {
|
|
24
|
+
const url = getDocUrl(id);
|
|
25
|
+
if (url) void router.push(url);
|
|
26
|
+
}
|
|
27
|
+
return id;
|
|
28
|
+
}
|
|
29
|
+
return { createPage };
|
|
30
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { useAbracadabra, useRoute, useSlugRoute } from "#imports";
|
|
3
|
+
export function useJunCurrentDoc() {
|
|
4
|
+
const { docId } = useSlugRoute();
|
|
5
|
+
const route = useRoute();
|
|
6
|
+
const abra = useAbracadabra();
|
|
7
|
+
const currentDocId = computed(
|
|
8
|
+
() => docId.value ?? (route.path === "/" ? abra.spaceDocId.value ?? null : null)
|
|
9
|
+
);
|
|
10
|
+
const isRoot = computed(
|
|
11
|
+
() => !!currentDocId.value && currentDocId.value === abra.spaceDocId.value
|
|
12
|
+
);
|
|
13
|
+
return { currentDocId, isRoot, spaceDocId: computed(() => abra.spaceDocId.value ?? null) };
|
|
14
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { JunTreeEntryValue } from '../types.js';
|
|
2
|
+
export type JunMenuSurface = 'nav' | 'list' | 'card' | 'breadcrumb' | 'page';
|
|
3
|
+
export interface JunMenuCtx {
|
|
4
|
+
docId: string;
|
|
5
|
+
label: string;
|
|
6
|
+
type?: string;
|
|
7
|
+
meta?: Record<string, unknown>;
|
|
8
|
+
/** Where the menu was opened. Lets a builder offer surface-specific items. */
|
|
9
|
+
surface: JunMenuSurface;
|
|
10
|
+
/** True while the owner is in edit mode. */
|
|
11
|
+
editing: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** A `UContextMenu`/`UDropdownMenu` item. Kept structural — Nuxt UI's own type is not exported in a usable form. */
|
|
14
|
+
export interface JunMenuItem {
|
|
15
|
+
label?: string;
|
|
16
|
+
icon?: string;
|
|
17
|
+
color?: 'error' | 'neutral' | 'primary' | 'success' | 'warning' | 'info';
|
|
18
|
+
kbds?: string[];
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
type?: 'label' | 'separator' | 'checkbox';
|
|
21
|
+
checked?: boolean;
|
|
22
|
+
children?: JunMenuItem[];
|
|
23
|
+
onSelect?: (e?: Event) => void;
|
|
24
|
+
}
|
|
25
|
+
export type JunMenuGroups = JunMenuItem[][];
|
|
26
|
+
/**
|
|
27
|
+
* A contributed builder. Returns extra GROUPS, appended before the danger
|
|
28
|
+
* group. Return `null` to contribute nothing for this context.
|
|
29
|
+
*/
|
|
30
|
+
export type JunMenuBuilder = (ctx: JunMenuCtx) => JunMenuGroups | null;
|
|
31
|
+
/**
|
|
32
|
+
* Contribute items to every Jun context menu. Call from a client plugin; the
|
|
33
|
+
* builder runs on every menu open, so it may branch on `ctx.surface`,
|
|
34
|
+
* `ctx.type` or `ctx.editing`.
|
|
35
|
+
*/
|
|
36
|
+
export declare function registerJunMenuItems(builder: JunMenuBuilder): () => void;
|
|
37
|
+
/** The structural subset of `useChildTree()` the owner items need. */
|
|
38
|
+
export interface JunMenuTree {
|
|
39
|
+
deleteEntry: (id: string) => void;
|
|
40
|
+
updateMeta: (id: string, patch: Record<string, unknown>) => void;
|
|
41
|
+
duplicateEntry?: (id: string) => string;
|
|
42
|
+
moveEntry?: (id: string, parentId: string | null, order: number) => void;
|
|
43
|
+
treeMap: {
|
|
44
|
+
get: (id: string) => JunTreeEntryValue | undefined;
|
|
45
|
+
set: (id: string, v: JunTreeEntryValue) => unknown;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export interface JunMenuOptions {
|
|
49
|
+
/** Required for every owner item. Without it the menu is read-only. */
|
|
50
|
+
tree?: JunMenuTree;
|
|
51
|
+
/** Start the surface's own rename affordance. Omit and "Rename" is hidden. */
|
|
52
|
+
onRename?: () => void;
|
|
53
|
+
/** Start the surface's nav-label editor. Nav pills only. */
|
|
54
|
+
onNavLabel?: () => void;
|
|
55
|
+
/** Hide "Open" when the whole row already navigates there. */
|
|
56
|
+
noOpen?: boolean;
|
|
57
|
+
/** Sibling ids in display order — enables "Pin to top" without a second tree read. */
|
|
58
|
+
siblings?: string[];
|
|
59
|
+
/** One-off items, appended after the built ones and before the danger group. */
|
|
60
|
+
extra?: JunMenuGroups;
|
|
61
|
+
/** Called after the document moves to trash. */
|
|
62
|
+
onDeleted?: (id: string) => void;
|
|
63
|
+
}
|
|
64
|
+
export declare function useJunDocMenu(): {
|
|
65
|
+
itemsFor: (ctx: JunMenuCtx, o?: JunMenuOptions) => JunMenuGroups;
|
|
66
|
+
/** Read the live edit flag without every call site importing the studio. */
|
|
67
|
+
editing: import("vue").ComputedRef<boolean>;
|
|
68
|
+
copy: (text: string, what: string) => Promise<void>;
|
|
69
|
+
absoluteUrl: (path: string) => string;
|
|
70
|
+
urlFor: (id: string) => string | null;
|
|
71
|
+
};
|