@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
package/dist/module.mjs
ADDED
|
@@ -0,0 +1,957 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { defineNuxtModule, createResolver, hasNuxtModule, installModule, addImportsDir, addComponentsDir, addPluginTemplate, addPlugin, addLayout, extendPages, addServerImportsDir, addServerHandler, addServerPlugin } from '@nuxt/kit';
|
|
3
|
+
import { defu } from 'defu';
|
|
4
|
+
import { JUN_RUNTIME_BACKDROPS } from '../dist/runtime/types.js';
|
|
5
|
+
|
|
6
|
+
const PAGE_TYPES = {
|
|
7
|
+
journal: {
|
|
8
|
+
label: "Journal",
|
|
9
|
+
icon: "i-lucide-feather",
|
|
10
|
+
renderer: "JunJournalRenderer",
|
|
11
|
+
default: true,
|
|
12
|
+
feedItems: true
|
|
13
|
+
},
|
|
14
|
+
entry: {
|
|
15
|
+
label: "Journal entry",
|
|
16
|
+
icon: "i-lucide-feather",
|
|
17
|
+
renderer: "JunEntryRenderer",
|
|
18
|
+
default: true,
|
|
19
|
+
// The reference site hardcoded this shape inside its catch-all page,
|
|
20
|
+
// author name and all. Declared here it belongs to the TYPE, so a site
|
|
21
|
+
// that adds a page type gets structured data without editing a page.
|
|
22
|
+
jsonLd: {
|
|
23
|
+
"@context": "https://schema.org",
|
|
24
|
+
"@type": "BlogPosting",
|
|
25
|
+
"headline": { from: "title" },
|
|
26
|
+
"description": { from: "description" },
|
|
27
|
+
"datePublished": { from: "meta.date", format: "iso-date" },
|
|
28
|
+
"keywords": { from: "meta.tags" },
|
|
29
|
+
"author": { "@type": "Person", "name": { from: "authorName" } }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
links: {
|
|
33
|
+
label: "Links",
|
|
34
|
+
icon: "i-lucide-link",
|
|
35
|
+
renderer: "JunLinksRenderer",
|
|
36
|
+
default: true
|
|
37
|
+
},
|
|
38
|
+
cv: {
|
|
39
|
+
label: "Journey",
|
|
40
|
+
icon: "i-lucide-milestone",
|
|
41
|
+
renderer: "JunCvRenderer",
|
|
42
|
+
default: true,
|
|
43
|
+
jsonLd: {
|
|
44
|
+
"@context": "https://schema.org",
|
|
45
|
+
"@type": "ProfilePage",
|
|
46
|
+
"name": { from: "title" },
|
|
47
|
+
"description": { from: "description" },
|
|
48
|
+
"about": { "@type": "Person", "name": { from: "authorName" } }
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
apps: {
|
|
52
|
+
label: "Apps",
|
|
53
|
+
icon: "i-lucide-grid-2x2",
|
|
54
|
+
renderer: "JunAppsRenderer",
|
|
55
|
+
default: true
|
|
56
|
+
},
|
|
57
|
+
app: {
|
|
58
|
+
label: "Project",
|
|
59
|
+
icon: "i-lucide-box",
|
|
60
|
+
renderer: "JunProjectRenderer",
|
|
61
|
+
default: true,
|
|
62
|
+
jsonLd: {
|
|
63
|
+
"@context": "https://schema.org",
|
|
64
|
+
"@type": "SoftwareApplication",
|
|
65
|
+
"name": { from: "title" },
|
|
66
|
+
"description": { from: "description" },
|
|
67
|
+
"url": { from: "meta.url" },
|
|
68
|
+
"author": { "@type": "Person", "name": { from: "authorName" } }
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
live: {
|
|
72
|
+
label: "Live",
|
|
73
|
+
icon: "i-lucide-radio",
|
|
74
|
+
renderer: "JunLiveRenderer",
|
|
75
|
+
default: true,
|
|
76
|
+
feedItems: true
|
|
77
|
+
},
|
|
78
|
+
now: {
|
|
79
|
+
label: "Post",
|
|
80
|
+
icon: "i-lucide-radio",
|
|
81
|
+
renderer: "JunNowRenderer",
|
|
82
|
+
default: true
|
|
83
|
+
},
|
|
84
|
+
home: {
|
|
85
|
+
label: "Home",
|
|
86
|
+
icon: "i-lucide-house",
|
|
87
|
+
renderer: "JunHomeRenderer",
|
|
88
|
+
// Registered but not the default for `/`: the space root renders through
|
|
89
|
+
// the ordinary pipeline unless its own type says otherwise, which is how
|
|
90
|
+
// every page type here works. Setting the ROOT document's type to
|
|
91
|
+
// `jun-home` is the opt-in, and the same context menu reverses it.
|
|
92
|
+
default: true,
|
|
93
|
+
jsonLd: {
|
|
94
|
+
"@context": "https://schema.org",
|
|
95
|
+
"@type": "ProfilePage",
|
|
96
|
+
"name": { from: "title" },
|
|
97
|
+
"description": { from: "description" }
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
uses: {
|
|
101
|
+
label: "Uses",
|
|
102
|
+
icon: "i-lucide-wrench",
|
|
103
|
+
renderer: "JunUsesRenderer",
|
|
104
|
+
default: true
|
|
105
|
+
},
|
|
106
|
+
library: {
|
|
107
|
+
label: "Library",
|
|
108
|
+
icon: "i-lucide-library",
|
|
109
|
+
renderer: "JunLibraryRenderer",
|
|
110
|
+
default: true
|
|
111
|
+
},
|
|
112
|
+
wall: {
|
|
113
|
+
label: "Wall",
|
|
114
|
+
icon: "i-lucide-images",
|
|
115
|
+
renderer: "JunWallRenderer",
|
|
116
|
+
default: true
|
|
117
|
+
},
|
|
118
|
+
redirect: {
|
|
119
|
+
label: "Redirect",
|
|
120
|
+
icon: "i-lucide-corner-up-right",
|
|
121
|
+
renderer: "JunRedirectRenderer",
|
|
122
|
+
default: true
|
|
123
|
+
},
|
|
124
|
+
guestbook: {
|
|
125
|
+
label: "Guestbook",
|
|
126
|
+
icon: "i-lucide-pen-line",
|
|
127
|
+
renderer: "JunGuestbookRenderer",
|
|
128
|
+
default: true
|
|
129
|
+
},
|
|
130
|
+
stats: {
|
|
131
|
+
label: "Pulse",
|
|
132
|
+
icon: "i-lucide-activity",
|
|
133
|
+
renderer: "JunStatsRenderer",
|
|
134
|
+
default: true
|
|
135
|
+
},
|
|
136
|
+
config: {
|
|
137
|
+
label: "Site settings",
|
|
138
|
+
icon: "i-lucide-settings",
|
|
139
|
+
renderer: "JunConfigRenderer",
|
|
140
|
+
default: true
|
|
141
|
+
},
|
|
142
|
+
window: {
|
|
143
|
+
label: "Window",
|
|
144
|
+
icon: "i-lucide-app-window",
|
|
145
|
+
renderer: "JunWindowRenderer",
|
|
146
|
+
default: true
|
|
147
|
+
},
|
|
148
|
+
cinema: {
|
|
149
|
+
label: "Cinema",
|
|
150
|
+
icon: "i-lucide-clapperboard",
|
|
151
|
+
renderer: "JunCinemaRenderer",
|
|
152
|
+
default: true
|
|
153
|
+
},
|
|
154
|
+
movie: {
|
|
155
|
+
label: "Film",
|
|
156
|
+
icon: "i-lucide-film",
|
|
157
|
+
renderer: "JunMovieRenderer",
|
|
158
|
+
default: true,
|
|
159
|
+
jsonLd: {
|
|
160
|
+
"@context": "https://schema.org",
|
|
161
|
+
"@type": "Movie",
|
|
162
|
+
"name": { from: "title" },
|
|
163
|
+
"description": { from: "description" },
|
|
164
|
+
"datePublished": { from: "meta.year" },
|
|
165
|
+
"director": { "@type": "Person", "name": { from: "meta.director" } }
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
festival: {
|
|
169
|
+
label: "Festival",
|
|
170
|
+
icon: "i-lucide-disc-3",
|
|
171
|
+
renderer: "JunFestivalRenderer",
|
|
172
|
+
default: true,
|
|
173
|
+
jsonLd: {
|
|
174
|
+
"@context": "https://schema.org",
|
|
175
|
+
"@type": "MusicPlaylist",
|
|
176
|
+
"name": { from: "title" },
|
|
177
|
+
"description": { from: "description" }
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
track: {
|
|
181
|
+
label: "Track",
|
|
182
|
+
icon: "i-lucide-music-2",
|
|
183
|
+
renderer: "JunTrackRenderer",
|
|
184
|
+
default: true,
|
|
185
|
+
jsonLd: {
|
|
186
|
+
"@context": "https://schema.org",
|
|
187
|
+
"@type": "MusicRecording",
|
|
188
|
+
"name": { from: "title" },
|
|
189
|
+
"description": { from: "description" },
|
|
190
|
+
"byArtist": { "@type": "MusicGroup", "name": { from: "meta.mediaArtist" } }
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
services: {
|
|
194
|
+
label: "Signals",
|
|
195
|
+
icon: "i-lucide-radar",
|
|
196
|
+
renderer: "JunServicesRenderer",
|
|
197
|
+
default: true
|
|
198
|
+
},
|
|
199
|
+
mosaic: {
|
|
200
|
+
label: "Mosaic",
|
|
201
|
+
icon: "i-lucide-layout-dashboard",
|
|
202
|
+
renderer: "JunMosaicRenderer",
|
|
203
|
+
default: true
|
|
204
|
+
},
|
|
205
|
+
globe: {
|
|
206
|
+
label: "Globe",
|
|
207
|
+
icon: "i-lucide-globe-2",
|
|
208
|
+
renderer: "JunGlobeRenderer",
|
|
209
|
+
// OFF by default, and that is the point: with it off the renderer chunk is
|
|
210
|
+
// never referenced, so mapbox-gl never enters the bundle graph and no site
|
|
211
|
+
// pays for a dependency it did not ask for. It is also the module's only
|
|
212
|
+
// page type that needs an external service token.
|
|
213
|
+
default: false
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
const BUILTIN_META_EXCLUDE_KEYS = [
|
|
217
|
+
"draft",
|
|
218
|
+
"bodyIsMirror",
|
|
219
|
+
"body",
|
|
220
|
+
"mediaUploads",
|
|
221
|
+
"galleryUploads",
|
|
222
|
+
"images",
|
|
223
|
+
"seedTest",
|
|
224
|
+
"siteConfig",
|
|
225
|
+
"redirectPermanent",
|
|
226
|
+
"navLabel",
|
|
227
|
+
"signerId",
|
|
228
|
+
"appreciatedBy",
|
|
229
|
+
"publishAt",
|
|
230
|
+
// Former URLs of a renamed page — routing bookkeeping, never owner-edited.
|
|
231
|
+
"slugAliases",
|
|
232
|
+
// The home renderer's own composition. `homeSections` is an ARRAY of section
|
|
233
|
+
// ids and `homeLayout` is picked from a card row — a chip for either would
|
|
234
|
+
// be an editable string that can only be got wrong.
|
|
235
|
+
"homeLayout",
|
|
236
|
+
"homeSections",
|
|
237
|
+
// Snapped route geometry for a globe leg. `routeGeo` is a POLYLINE: letting
|
|
238
|
+
// the editor chip it stringifies tens of thousands of coordinate pairs on the
|
|
239
|
+
// main thread and locks the tab. Drawn by the map, edited by the route panel.
|
|
240
|
+
"routeGeo",
|
|
241
|
+
"routeKm",
|
|
242
|
+
"routeMin",
|
|
243
|
+
// Where an imported film or track actually lives. `useDocImport` leaves the
|
|
244
|
+
// upload id on a `fileBlock` inside the document body for video and audio
|
|
245
|
+
// (it only promotes IMAGES to a cover), so the media renderers read it back
|
|
246
|
+
// out and park it here. Bookkeeping, never owner-typed.
|
|
247
|
+
"mediaUploadId",
|
|
248
|
+
"mediaDocId",
|
|
249
|
+
"mediaMimeType",
|
|
250
|
+
// Waveform peaks — an array of a few hundred floats. Same class of hazard as
|
|
251
|
+
// `routeGeo`: a chip would stringify the lot on the main thread.
|
|
252
|
+
"peaks",
|
|
253
|
+
// The mosaic's own composition. `paneSpan` is edited by dragging a corner,
|
|
254
|
+
// `paneRect` is four numbers in grid units, and `mosaicLayout` is picked from
|
|
255
|
+
// a card row — a chip for any of them is an editable string that can only be
|
|
256
|
+
// got wrong.
|
|
257
|
+
"mosaicLayout",
|
|
258
|
+
"paneDoc",
|
|
259
|
+
"paneWidget",
|
|
260
|
+
"paneSpan",
|
|
261
|
+
"paneRect",
|
|
262
|
+
"paneInteractive"
|
|
263
|
+
];
|
|
264
|
+
const DEFAULT_SERVICE_ADAPTERS = [
|
|
265
|
+
"github-repo",
|
|
266
|
+
"github-user",
|
|
267
|
+
"npm",
|
|
268
|
+
"crates",
|
|
269
|
+
"rss",
|
|
270
|
+
"http",
|
|
271
|
+
"og"
|
|
272
|
+
];
|
|
273
|
+
const DEFAULT_PANEL_TYPES = [
|
|
274
|
+
"table",
|
|
275
|
+
"sheets",
|
|
276
|
+
"kanban",
|
|
277
|
+
"calendar",
|
|
278
|
+
"gallery",
|
|
279
|
+
"dashboard",
|
|
280
|
+
"timeline",
|
|
281
|
+
"slides",
|
|
282
|
+
"media",
|
|
283
|
+
"outline",
|
|
284
|
+
"chart",
|
|
285
|
+
"code",
|
|
286
|
+
"spatial",
|
|
287
|
+
"call"
|
|
288
|
+
];
|
|
289
|
+
const DEFAULT_GUEST_NAMES = {
|
|
290
|
+
adjectives: [
|
|
291
|
+
"Wandering",
|
|
292
|
+
"Roaming",
|
|
293
|
+
"Nomadic",
|
|
294
|
+
"Drifting",
|
|
295
|
+
"Dawn",
|
|
296
|
+
"Dusk",
|
|
297
|
+
"Twilight",
|
|
298
|
+
"Restless",
|
|
299
|
+
"Distant",
|
|
300
|
+
"Wayfaring",
|
|
301
|
+
"Sunlit",
|
|
302
|
+
"Windswept",
|
|
303
|
+
"Lantern",
|
|
304
|
+
"Northbound",
|
|
305
|
+
"Vagabond",
|
|
306
|
+
"Starlit",
|
|
307
|
+
"Wayward",
|
|
308
|
+
"Ember",
|
|
309
|
+
"Trailworn",
|
|
310
|
+
"Faraway"
|
|
311
|
+
],
|
|
312
|
+
nouns: [
|
|
313
|
+
"Fox",
|
|
314
|
+
"Heron",
|
|
315
|
+
"Wolf",
|
|
316
|
+
"Sparrow",
|
|
317
|
+
"Cyclist",
|
|
318
|
+
"Wanderer",
|
|
319
|
+
"Nomad",
|
|
320
|
+
"Pilgrim",
|
|
321
|
+
"Drifter",
|
|
322
|
+
"Crane",
|
|
323
|
+
"Ibex",
|
|
324
|
+
"Marten",
|
|
325
|
+
"Lynx",
|
|
326
|
+
"Owl",
|
|
327
|
+
"Swallow",
|
|
328
|
+
"Voyager",
|
|
329
|
+
"Rover",
|
|
330
|
+
"Strider",
|
|
331
|
+
"Finch",
|
|
332
|
+
"Albatross"
|
|
333
|
+
]
|
|
334
|
+
};
|
|
335
|
+
const DEFAULT_PALETTES = {
|
|
336
|
+
home: {
|
|
337
|
+
light: { blobA: "#c2916a", blobB: "#ede5d8", fogA: "#ddd2c0", fogB: "#b09e84" },
|
|
338
|
+
dark: { blobA: "#b07a45", blobB: "#0c0a08", fogA: "#33291a", fogB: "#6f5636" }
|
|
339
|
+
},
|
|
340
|
+
journal: {
|
|
341
|
+
light: { blobA: "#b87589", blobB: "#efe6e9", fogA: "#dfd2d5", fogB: "#ab8d94" },
|
|
342
|
+
dark: { blobA: "#a34a5e", blobB: "#0c090a", fogA: "#32222a", fogB: "#6b414d" }
|
|
343
|
+
},
|
|
344
|
+
apps: {
|
|
345
|
+
light: { blobA: "#6a8aa0", blobB: "#e6eaee", fogA: "#d4d9df", fogB: "#92a1ae" },
|
|
346
|
+
dark: { blobA: "#4a7499", blobB: "#080a0d", fogA: "#1f2833", fogB: "#3d5468" }
|
|
347
|
+
},
|
|
348
|
+
live: {
|
|
349
|
+
light: { blobA: "#6a9078", blobB: "#e5ebe6", fogA: "#d4dbd5", fogB: "#92a89c" },
|
|
350
|
+
dark: { blobA: "#488258", blobB: "#080a08", fogA: "#1d271c", fogB: "#3d593c" }
|
|
351
|
+
},
|
|
352
|
+
globe: {
|
|
353
|
+
light: { blobA: "#5e7896", blobB: "#e0e4ea", fogA: "#d0d5de", fogB: "#8a96a8" },
|
|
354
|
+
dark: { blobA: "#456490", blobB: "#06080c", fogA: "#1a2131", fogB: "#364764" }
|
|
355
|
+
},
|
|
356
|
+
// Projector light in a dark room — warm amber against near-black.
|
|
357
|
+
cinema: {
|
|
358
|
+
light: { blobA: "#a8763f", blobB: "#ece4d6", fogA: "#dcd0bb", fogB: "#a8956f" },
|
|
359
|
+
dark: { blobA: "#8a5a22", blobB: "#0a0806", fogA: "#2b2015", fogB: "#5c3f1d" }
|
|
360
|
+
},
|
|
361
|
+
// Stage lighting: magenta wash, the one palette allowed to be loud.
|
|
362
|
+
festival: {
|
|
363
|
+
light: { blobA: "#9b6ba8", blobB: "#eae2ee", fogA: "#d9cfe0", fogB: "#9f8caa" },
|
|
364
|
+
dark: { blobA: "#7c3f96", blobB: "#0a070c", fogA: "#2a1c33", fogB: "#553069" }
|
|
365
|
+
},
|
|
366
|
+
// The fallback: near-greyscale, just enough chroma to read as alive.
|
|
367
|
+
subtle: {
|
|
368
|
+
light: { blobA: "#8a868c", blobB: "#e8e6e8", fogA: "#d7d5d7", fogB: "#9d9aa0" },
|
|
369
|
+
dark: { blobA: "#726a79", blobB: "#0a0a0b", fogA: "#292731", fogB: "#4d4756" }
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
const DEFAULT_CONTEXT_MENU = {
|
|
373
|
+
enabled: true,
|
|
374
|
+
visitor: true,
|
|
375
|
+
open: true,
|
|
376
|
+
newTab: true,
|
|
377
|
+
slideover: true,
|
|
378
|
+
copyLink: true,
|
|
379
|
+
copyMarkdown: false,
|
|
380
|
+
copyTitle: false,
|
|
381
|
+
share: true,
|
|
382
|
+
subscribe: true,
|
|
383
|
+
copyId: false,
|
|
384
|
+
duplicate: true,
|
|
385
|
+
changeType: true,
|
|
386
|
+
setIcon: true,
|
|
387
|
+
pin: true,
|
|
388
|
+
hide: true,
|
|
389
|
+
moveToTop: true,
|
|
390
|
+
trash: true,
|
|
391
|
+
suppressNative: false
|
|
392
|
+
};
|
|
393
|
+
const DEFAULT_NAVIGATION = {
|
|
394
|
+
placement: "top",
|
|
395
|
+
shape: "pill",
|
|
396
|
+
size: "md",
|
|
397
|
+
itemMode: "text",
|
|
398
|
+
activeStyle: "underline",
|
|
399
|
+
autoHide: true,
|
|
400
|
+
blur: true,
|
|
401
|
+
homeItem: false,
|
|
402
|
+
showIndices: true,
|
|
403
|
+
keyboardNav: true,
|
|
404
|
+
freshnessDots: true,
|
|
405
|
+
showLogo: true,
|
|
406
|
+
// The convention, and the one a visitor expects from a mark in the top-left.
|
|
407
|
+
logoAction: "home",
|
|
408
|
+
// On, because ⌘K is not an affordance on a phone.
|
|
409
|
+
searchButton: true,
|
|
410
|
+
centerActive: true,
|
|
411
|
+
// Both off. The dot stack reads as a "who's online" widget in a navbar whose
|
|
412
|
+
// whole idea is slight ambient presence, and the hover roster names every
|
|
413
|
+
// visitor and the page they are on — which is a disclosure a site should opt
|
|
414
|
+
// into rather than inherit. The campfire is where a real user center lives.
|
|
415
|
+
travellers: false,
|
|
416
|
+
travellersList: false
|
|
417
|
+
};
|
|
418
|
+
const DEFAULT_CAMPFIRE = {
|
|
419
|
+
title: "User Center",
|
|
420
|
+
icon: "i-lucide-users-round",
|
|
421
|
+
chat: true,
|
|
422
|
+
roster: true,
|
|
423
|
+
identity: true,
|
|
424
|
+
reactions: true,
|
|
425
|
+
follow: true,
|
|
426
|
+
showPages: true,
|
|
427
|
+
showBots: false,
|
|
428
|
+
allowRename: true,
|
|
429
|
+
// Warmth, welcome, a shared drink. Never sparkles.
|
|
430
|
+
reactionSet: ["\u{1F525}", "\u2764\uFE0F", "\u{1F44B}", "\u2615"],
|
|
431
|
+
historyLimit: 60,
|
|
432
|
+
placement: "bottom-right",
|
|
433
|
+
size: "md",
|
|
434
|
+
pillMode: "full",
|
|
435
|
+
rosterStyle: "list",
|
|
436
|
+
openTab: "auto",
|
|
437
|
+
blur: true,
|
|
438
|
+
ember: true,
|
|
439
|
+
label: ""
|
|
440
|
+
};
|
|
441
|
+
const FONT_FAMILIES = [
|
|
442
|
+
{ name: "Outfit", provider: "google", fallbacks: ["system-ui", "sans-serif"], weights: [300, 400, 500, 600, 700], styles: ["normal"], display: "swap" },
|
|
443
|
+
{ name: "Instrument Serif", provider: "google", fallbacks: ["Georgia", "serif"], weights: [400], styles: ["normal", "italic"], display: "swap" },
|
|
444
|
+
{ name: "Newsreader", provider: "google", fallbacks: ["Georgia", "serif"], weights: [400, 500, 600], styles: ["normal", "italic"], display: "swap" },
|
|
445
|
+
{ name: "Space Grotesk", provider: "google", fallbacks: ["system-ui", "sans-serif"], weights: [300, 400, 500, 600, 700], styles: ["normal"], display: "swap" },
|
|
446
|
+
{ name: "JetBrains Mono", provider: "google", fallbacks: ["ui-monospace", "monospace"], weights: [400, 500, 600], styles: ["normal"], display: "swap" }
|
|
447
|
+
];
|
|
448
|
+
function resolveJanitor(options, featureOn) {
|
|
449
|
+
const name = options?.name ?? "janitor";
|
|
450
|
+
return {
|
|
451
|
+
enabled: (options?.enabled ?? true) && featureOn,
|
|
452
|
+
mode: options?.mode ?? "observe",
|
|
453
|
+
name,
|
|
454
|
+
// Staff grey. Presence colour is pubkey-derived per visitor and carries the
|
|
455
|
+
// site's only colour; the janitor deliberately sits outside that scheme.
|
|
456
|
+
color: options?.color ?? "#8b8b8b",
|
|
457
|
+
baseline: options?.baseline ?? "after-seed",
|
|
458
|
+
identity: { mode: "own", seed: name, ...options?.identity ?? {} },
|
|
459
|
+
// Always on duty by default. A night shift is funnier, but a janitor nobody
|
|
460
|
+
// ever overlaps with is a joke told to an empty room.
|
|
461
|
+
shiftHours: options?.shiftHours ?? [0, 24],
|
|
462
|
+
budget: {
|
|
463
|
+
choresPerHour: 40,
|
|
464
|
+
linesPerHour: 20,
|
|
465
|
+
maxDocRemovalRatio: 0.5,
|
|
466
|
+
choresPerShift: 12,
|
|
467
|
+
...options?.budget ?? {}
|
|
468
|
+
},
|
|
469
|
+
ignoreDocIds: options?.ignoreDocIds ?? [],
|
|
470
|
+
phrases: options?.phrases ?? {},
|
|
471
|
+
tuning: options?.tuning ?? {}
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
const module$1 = defineNuxtModule({
|
|
475
|
+
meta: {
|
|
476
|
+
name: "@abraca/junis",
|
|
477
|
+
configKey: "jun",
|
|
478
|
+
compatibility: { nuxt: ">=4.0.0" }
|
|
479
|
+
},
|
|
480
|
+
defaults: {
|
|
481
|
+
brand: {
|
|
482
|
+
// The system is `Jun!s` — the bang is part of the name, not decoration,
|
|
483
|
+
// and `<JunLogo>` gives it its own span so a lockup can weight it.
|
|
484
|
+
name: "Jun!s",
|
|
485
|
+
tagline: "A website that is a document tree",
|
|
486
|
+
themeColor: "#0e0f11",
|
|
487
|
+
schemaType: "Person"
|
|
488
|
+
},
|
|
489
|
+
pageTypes: {},
|
|
490
|
+
pageTypeAliases: {},
|
|
491
|
+
features: {
|
|
492
|
+
intro: true,
|
|
493
|
+
backdrop: "blobs",
|
|
494
|
+
presence: true,
|
|
495
|
+
awareBlobs: true,
|
|
496
|
+
// Kept, deliberately unmounted — see runtime/types.ts for why.
|
|
497
|
+
peerCursors: false,
|
|
498
|
+
travellersChip: false,
|
|
499
|
+
campfire: false,
|
|
500
|
+
studio: true,
|
|
501
|
+
// Handing edit mode to every visitor is an open-demo choice, never a
|
|
502
|
+
// default. It grants nothing on its own — the server's write role is
|
|
503
|
+
// still required — but a site that has not asked for it must not get it.
|
|
504
|
+
openEditing: false,
|
|
505
|
+
search: true,
|
|
506
|
+
feeds: true,
|
|
507
|
+
sitemap: true,
|
|
508
|
+
rpc: true,
|
|
509
|
+
docCache: true,
|
|
510
|
+
bootstrap: true,
|
|
511
|
+
lightbox: true,
|
|
512
|
+
announcement: true,
|
|
513
|
+
footer: true,
|
|
514
|
+
slideover: true,
|
|
515
|
+
contextMenu: true,
|
|
516
|
+
// On, but nothing is requested until a visitor presses play — the facade
|
|
517
|
+
// is what makes "on by default" defensible.
|
|
518
|
+
thirdPartyEmbeds: true,
|
|
519
|
+
// `player` is deliberately ABSENT here: it follows the `festival` page
|
|
520
|
+
// type, which is not known until the enabled set is resolved in setup().
|
|
521
|
+
// A default of `true` would mount an audio element on sites with no music
|
|
522
|
+
// page; a default of `false` would need a second edit to turn the music
|
|
523
|
+
// page on. Resolved in setup() instead.
|
|
524
|
+
//
|
|
525
|
+
// A strong claim about what a visitor's scrubbing reveals to strangers.
|
|
526
|
+
// That one is an opt-in.
|
|
527
|
+
watchTogether: false,
|
|
528
|
+
// A demo-site gag that holds a write-capable identity and deletes prose.
|
|
529
|
+
// A site that has not asked for one must never be given one.
|
|
530
|
+
janitor: false
|
|
531
|
+
},
|
|
532
|
+
contextMenu: DEFAULT_CONTEXT_MENU,
|
|
533
|
+
navigation: DEFAULT_NAVIGATION,
|
|
534
|
+
campfire: DEFAULT_CAMPFIRE,
|
|
535
|
+
backdrops: JUN_RUNTIME_BACKDROPS,
|
|
536
|
+
layout: {},
|
|
537
|
+
pages: true,
|
|
538
|
+
layoutName: "jun",
|
|
539
|
+
nodePanel: "navigate",
|
|
540
|
+
siteConfigDefaults: {},
|
|
541
|
+
seed: { enabled: true, tree: "default" },
|
|
542
|
+
guestNames: DEFAULT_GUEST_NAMES,
|
|
543
|
+
metaExcludeKeys: [],
|
|
544
|
+
apiBase: "/api/_jun",
|
|
545
|
+
fonts: true,
|
|
546
|
+
autoInstall: true,
|
|
547
|
+
embeds: { remoteThumbnails: false },
|
|
548
|
+
mosaic: { maxPanes: 24, maxDepth: 1 },
|
|
549
|
+
services: { adapters: DEFAULT_SERVICE_ADAPTERS, ttl: 600 }
|
|
550
|
+
},
|
|
551
|
+
async setup(options, nuxt) {
|
|
552
|
+
const resolver = createResolver(import.meta.url);
|
|
553
|
+
const iconOptions = nuxt.options.icon ??= {};
|
|
554
|
+
iconOptions.cssLayer ??= "base";
|
|
555
|
+
if (options.autoInstall !== false) {
|
|
556
|
+
if (!hasNuxtModule("@nuxt/ui")) await installModule("@nuxt/ui");
|
|
557
|
+
if (!hasNuxtModule("@nuxt/image")) await installModule("@nuxt/image");
|
|
558
|
+
if (!hasNuxtModule("@nuxt/icon")) await installModule("@nuxt/icon");
|
|
559
|
+
if (!hasNuxtModule("@nuxtjs/color-mode")) {
|
|
560
|
+
await installModule("@nuxtjs/color-mode", { classSuffix: "", preference: "system" });
|
|
561
|
+
}
|
|
562
|
+
if (options.fonts !== false && !hasNuxtModule("@nuxt/fonts")) await installModule("@nuxt/fonts");
|
|
563
|
+
if (!hasNuxtModule("@vueuse/motion/nuxt")) await installModule("@vueuse/motion/nuxt");
|
|
564
|
+
if (!hasNuxtModule("@abraca/nuxt")) await installModule("@abraca/nuxt");
|
|
565
|
+
} else if (!hasNuxtModule("@abraca/nuxt")) {
|
|
566
|
+
throw new Error(
|
|
567
|
+
"[@abraca/junis] requires @abraca/nuxt. Add it to `modules` before @abraca/junis, or leave `jun.autoInstall` on."
|
|
568
|
+
);
|
|
569
|
+
}
|
|
570
|
+
const enabled = [];
|
|
571
|
+
for (const [key, def] of Object.entries(PAGE_TYPES)) {
|
|
572
|
+
const opt = options.pageTypes?.[key];
|
|
573
|
+
if (opt === false) continue;
|
|
574
|
+
if (opt === void 0 && !def.default) continue;
|
|
575
|
+
const override = typeof opt === "object" ? opt : {};
|
|
576
|
+
enabled.push({
|
|
577
|
+
key,
|
|
578
|
+
type: override.type ?? `jun-${key}`,
|
|
579
|
+
def,
|
|
580
|
+
label: override.label ?? def.label,
|
|
581
|
+
icon: override.icon ?? def.icon
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
const missing = enabled.filter(
|
|
585
|
+
(e) => !existsSync(resolver.resolve(`./runtime/components/renderers/${e.def.renderer}.vue`))
|
|
586
|
+
);
|
|
587
|
+
if (missing.length) {
|
|
588
|
+
throw new Error(
|
|
589
|
+
`[@abraca/junis] ${missing.length} enabled page type(s) have no renderer:
|
|
590
|
+
` + missing.map((e) => ` \u2022 ${e.key} \u2192 runtime/components/renderers/${e.def.renderer}.vue`).join("\n") + `
|
|
591
|
+
Switch them off with \`jun.pageTypes: { ${missing.map((e) => `${e.key}: false`).join(", ")} }\` \u2014 but check the file is really absent first, because a stale entry there silently costs a working renderer.`
|
|
592
|
+
);
|
|
593
|
+
}
|
|
594
|
+
const typeId = (k) => enabled.find((e) => e.key === k)?.type;
|
|
595
|
+
const present = (...keys) => keys.map(typeId).filter(Boolean);
|
|
596
|
+
const layout = {
|
|
597
|
+
immersive: options.layout?.immersive ?? ["graph", "map", ...present("globe")],
|
|
598
|
+
panel: options.layout?.panel ?? DEFAULT_PANEL_TYPES,
|
|
599
|
+
feed: options.layout?.feed ?? present("home", "apps", "journal", "live", "wall", "cinema", "festival", "services", "mosaic"),
|
|
600
|
+
selfPadded: options.layout?.selfPadded ?? present(
|
|
601
|
+
"entry",
|
|
602
|
+
"now",
|
|
603
|
+
"app",
|
|
604
|
+
"uses",
|
|
605
|
+
"library",
|
|
606
|
+
"redirect",
|
|
607
|
+
"guestbook",
|
|
608
|
+
"stats",
|
|
609
|
+
"window",
|
|
610
|
+
"movie",
|
|
611
|
+
"track"
|
|
612
|
+
),
|
|
613
|
+
readingWidth: options.layout?.readingWidth ?? { prose: "max-w-3xl", default: "max-w-6xl" }
|
|
614
|
+
};
|
|
615
|
+
function defaultPaletteMap() {
|
|
616
|
+
const groups = [
|
|
617
|
+
["journal", ["journal", "entry"]],
|
|
618
|
+
["apps", ["apps", "app"]],
|
|
619
|
+
["live", ["live", "now"]],
|
|
620
|
+
["globe", ["globe"]],
|
|
621
|
+
// A film and its shelf, a track and its festival: the same rule the
|
|
622
|
+
// editorial pairs follow, so walking into a detail page does not
|
|
623
|
+
// change the ambient tone.
|
|
624
|
+
["cinema", ["cinema", "movie"]],
|
|
625
|
+
["festival", ["festival", "track"]]
|
|
626
|
+
];
|
|
627
|
+
const map = { "/": "home" };
|
|
628
|
+
for (const [palette, keys] of groups) {
|
|
629
|
+
for (const type of present(...keys)) map[type] = palette;
|
|
630
|
+
}
|
|
631
|
+
return map;
|
|
632
|
+
}
|
|
633
|
+
const runtime = {
|
|
634
|
+
brand: {
|
|
635
|
+
name: options.brand?.name ?? "Jun!s",
|
|
636
|
+
tagline: options.brand?.tagline ?? "",
|
|
637
|
+
// A site with no explicit SEO description describes itself with its
|
|
638
|
+
// tagline rather than with its own title, which is what a page with
|
|
639
|
+
// no prose otherwise ends up doing.
|
|
640
|
+
seoDescription: options.brand?.seoDescription ?? options.brand?.tagline ?? "",
|
|
641
|
+
avatar: options.brand?.avatar ?? "",
|
|
642
|
+
// The sun. It is the one mark that carries a colour, and that colour
|
|
643
|
+
// is the site's own accent — so the default logo introduces the theme
|
|
644
|
+
// rather than ignoring it. The Site Config document overrides both.
|
|
645
|
+
logoMark: options.brand?.logoMark ?? "sun",
|
|
646
|
+
logoVariant: options.brand?.logoVariant ?? "mark",
|
|
647
|
+
themeColor: options.brand?.themeColor ?? "#0e0f11",
|
|
648
|
+
schemaType: options.brand?.schemaType ?? "Person"
|
|
649
|
+
},
|
|
650
|
+
features: {
|
|
651
|
+
...options.features,
|
|
652
|
+
// The player FOLLOWS the festival page type unless the site says
|
|
653
|
+
// otherwise. It is one `<audio>` element and a Media Session handler
|
|
654
|
+
// mounted in the layout for the whole session — worth it for a site
|
|
655
|
+
// with music, pure cost for one without, and neither default is right
|
|
656
|
+
// for both. So it is derived rather than guessed.
|
|
657
|
+
player: options.features?.player ?? enabled.some((e) => e.key === "festival")
|
|
658
|
+
},
|
|
659
|
+
layout,
|
|
660
|
+
siteConfigDefaults: options.siteConfigDefaults ?? {},
|
|
661
|
+
guestNames: defu(options.guestNames, DEFAULT_GUEST_NAMES),
|
|
662
|
+
pageTypes: enabled.map((e) => e.type),
|
|
663
|
+
// The types whose CHILDREN syndicate. Resolved here so the feed never
|
|
664
|
+
// has to know a page-type id, and a site that remaps one keeps its feed.
|
|
665
|
+
feedItemTypes: enabled.filter((e) => e.def.feedItems).map((e) => e.type),
|
|
666
|
+
typeIds: Object.fromEntries(enabled.map((e) => [e.key, e.type])),
|
|
667
|
+
typeIcons: Object.fromEntries(enabled.map((e) => [e.type, e.icon])),
|
|
668
|
+
typeLabels: Object.fromEntries(enabled.map((e) => [e.type, e.label])),
|
|
669
|
+
pageTypeAliases: options.pageTypeAliases ?? {},
|
|
670
|
+
jsonLd: Object.fromEntries(
|
|
671
|
+
enabled.filter((e) => e.def.jsonLd).map((e) => [e.type, e.def.jsonLd])
|
|
672
|
+
),
|
|
673
|
+
metaExcludeKeys: [...BUILTIN_META_EXCLUDE_KEYS, ...options.metaExcludeKeys ?? []],
|
|
674
|
+
palettes: options.palettes ?? DEFAULT_PALETTES,
|
|
675
|
+
paletteMap: options.paletteMap ?? defaultPaletteMap(),
|
|
676
|
+
apiBase: options.apiBase ?? "/api/_jun",
|
|
677
|
+
mapboxToken: options.mapboxToken ?? "",
|
|
678
|
+
embeds: { remoteThumbnails: options.embeds?.remoteThumbnails ?? false },
|
|
679
|
+
mosaic: {
|
|
680
|
+
maxPanes: options.mosaic?.maxPanes ?? 24,
|
|
681
|
+
maxDepth: options.mosaic?.maxDepth ?? 1
|
|
682
|
+
},
|
|
683
|
+
services: {
|
|
684
|
+
// Replacement, not a merge: a site listing two adapters means two, and
|
|
685
|
+
// `defu` would hand it those two plus all seven of ours.
|
|
686
|
+
adapters: options.services?.adapters ?? DEFAULT_SERVICE_ADAPTERS,
|
|
687
|
+
ttl: options.services?.ttl ?? 600
|
|
688
|
+
},
|
|
689
|
+
nodePanel: options.nodePanel ?? "navigate",
|
|
690
|
+
contextMenu: defu(options.contextMenu, DEFAULT_CONTEXT_MENU),
|
|
691
|
+
navigation: defu(options.navigation, DEFAULT_NAVIGATION),
|
|
692
|
+
// `defu` MERGES arrays rather than replacing them, so a site that sets
|
|
693
|
+
// its own `reactionSet` would otherwise get its emoji plus ours. A
|
|
694
|
+
// replacement default is the only sane semantic for a palette.
|
|
695
|
+
campfire: {
|
|
696
|
+
...defu(options.campfire, DEFAULT_CAMPFIRE),
|
|
697
|
+
reactionSet: options.campfire?.reactionSet ?? DEFAULT_CAMPFIRE.reactionSet
|
|
698
|
+
},
|
|
699
|
+
// `shader` is filtered out even if a site lists it: the settings page
|
|
700
|
+
// offers RUNTIME choices, and the shader's file is only in the graph when
|
|
701
|
+
// the build put it there. Offering it would produce an empty backdrop.
|
|
702
|
+
backdrops: (options.backdrops ?? JUN_RUNTIME_BACKDROPS).filter(
|
|
703
|
+
(k) => k !== "shader" && JUN_RUNTIME_BACKDROPS.includes(k)
|
|
704
|
+
)
|
|
705
|
+
};
|
|
706
|
+
nuxt.options.runtimeConfig.public.jun = defu(
|
|
707
|
+
nuxt.options.runtimeConfig.public.jun,
|
|
708
|
+
runtime
|
|
709
|
+
);
|
|
710
|
+
nuxt.options.runtimeConfig.jun = defu(
|
|
711
|
+
// Through `unknown`, like the janitor plugin's read of the same block.
|
|
712
|
+
// Nuxt GENERATES a type for `runtimeConfig.jun` from whatever the last
|
|
713
|
+
// prepare wrote there — a concrete literal shape, with `tree: {}[]` and
|
|
714
|
+
// widened enums — so it no longer overlaps the option interfaces it was
|
|
715
|
+
// built from, and a direct assertion stops compiling the moment the
|
|
716
|
+
// generated types are refreshed.
|
|
717
|
+
nuxt.options.runtimeConfig.jun,
|
|
718
|
+
{
|
|
719
|
+
seed: options.seed ?? {},
|
|
720
|
+
janitor: resolveJanitor(options.janitor, runtime.features.janitor === true),
|
|
721
|
+
// Server-only, and it must stay that way: a token in the public block
|
|
722
|
+
// is a token published to every visitor. `NUXT_JUN_GITHUB_TOKEN`
|
|
723
|
+
// overrides it in a deployment without touching the config.
|
|
724
|
+
githubToken: options.githubToken ?? ""
|
|
725
|
+
}
|
|
726
|
+
);
|
|
727
|
+
const abra = nuxt.options.abracadabra ??= {};
|
|
728
|
+
abra.guestName ??= runtime.guestNames;
|
|
729
|
+
if (options.fonts !== false) {
|
|
730
|
+
const fonts = nuxt.options.fonts ??= {};
|
|
731
|
+
fonts.families = [...fonts.families ?? [], ...FONT_FAMILIES];
|
|
732
|
+
}
|
|
733
|
+
nuxt.options.appConfig.ui = defu(nuxt.options.appConfig.ui ?? {}, {
|
|
734
|
+
colors: { primary: "stone", neutral: "stone" },
|
|
735
|
+
editorToolbar: { slots: { root: "z-[60]" } }
|
|
736
|
+
});
|
|
737
|
+
nuxt.hook("pages:routerOptions", ({ files }) => {
|
|
738
|
+
files.splice(1, 0, { path: resolver.resolve("./runtime/router.options") });
|
|
739
|
+
});
|
|
740
|
+
const junTransition = { name: "jun-fade" };
|
|
741
|
+
nuxt.options.app.pageTransition = defu(
|
|
742
|
+
nuxt.options.app.pageTransition,
|
|
743
|
+
junTransition
|
|
744
|
+
);
|
|
745
|
+
nuxt.options.app.layoutTransition = defu(
|
|
746
|
+
nuxt.options.app.layoutTransition,
|
|
747
|
+
junTransition
|
|
748
|
+
);
|
|
749
|
+
addImportsDir(resolver.resolve("./runtime/composables"));
|
|
750
|
+
addImportsDir(resolver.resolve("./runtime/utils"));
|
|
751
|
+
addComponentsDir({
|
|
752
|
+
path: resolver.resolve("./runtime/components/renderers"),
|
|
753
|
+
pathPrefix: false
|
|
754
|
+
});
|
|
755
|
+
addComponentsDir({
|
|
756
|
+
path: resolver.resolve("./runtime/components"),
|
|
757
|
+
pathPrefix: false,
|
|
758
|
+
// The shader backdrop is EXCLUDED from the scan unless it is the chosen
|
|
759
|
+
// backdrop, and this is not an optimisation.
|
|
760
|
+
//
|
|
761
|
+
// It imports `shaders/vue`, an optional peer. Merely having the file in
|
|
762
|
+
// a scanned directory is enough for Vite's dep scanner to find that
|
|
763
|
+
// import and crawl it — "New dependencies found: shaders/vue" — and the
|
|
764
|
+
// crawl blows the stack on `paper-design/shaders`' deep imports, which
|
|
765
|
+
// 500s the whole site. The feature flag does NOT protect against this:
|
|
766
|
+
// the scanner never sees the `v-if` that would have kept the component
|
|
767
|
+
// from rendering.
|
|
768
|
+
//
|
|
769
|
+
// So the guarantee has to be the same one page-type renderers get: when
|
|
770
|
+
// the feature is off, the file is not in the graph at all.
|
|
771
|
+
ignore: runtime.features.backdrop === "shader" ? [] : ["**/JunShaderBackdrop.client.vue"]
|
|
772
|
+
});
|
|
773
|
+
addPluginTemplate({
|
|
774
|
+
filename: "jun-page-types.client.mjs",
|
|
775
|
+
mode: "client",
|
|
776
|
+
getContents: () => {
|
|
777
|
+
const imports = enabled.map(
|
|
778
|
+
(e) => `const ${e.key}Renderer = defineAsyncComponent(() => import(${JSON.stringify(
|
|
779
|
+
resolver.resolve(`./runtime/components/renderers/${e.def.renderer}.vue`)
|
|
780
|
+
)}))`
|
|
781
|
+
);
|
|
782
|
+
const entries = enabled.map((e) => [
|
|
783
|
+
` ${JSON.stringify(e.type)}: {`,
|
|
784
|
+
` label: ${JSON.stringify(e.label)},`,
|
|
785
|
+
` icon: ${JSON.stringify(e.icon)},`,
|
|
786
|
+
` component: ${e.key}Renderer,`,
|
|
787
|
+
` hasEditor: false,`,
|
|
788
|
+
` metaSchema: junMetaSchema(${JSON.stringify(e.key)}),`,
|
|
789
|
+
` },`
|
|
790
|
+
].join("\n"));
|
|
791
|
+
return [
|
|
792
|
+
"// AUTO-GENERATED by @abraca/junis \u2014 page-type registration.",
|
|
793
|
+
"// Renderers are lazy: each drags in a heavy dep graph transitively",
|
|
794
|
+
"// (globe \u2192 mapbox, live \u2192 the media stack), and importing them all at",
|
|
795
|
+
"// boot pulls the entire graph through Vite's transform pipeline on",
|
|
796
|
+
"// every cold start.",
|
|
797
|
+
"import { defineAsyncComponent } from 'vue'",
|
|
798
|
+
"import { defineNuxtPlugin, useRuntimeConfig } from '#app'",
|
|
799
|
+
`import { junMetaSchema } from ${JSON.stringify(resolver.resolve("./runtime/utils/junMetaSchemas"))}`,
|
|
800
|
+
"",
|
|
801
|
+
...imports,
|
|
802
|
+
"",
|
|
803
|
+
"export default defineNuxtPlugin((nuxtApp) => {",
|
|
804
|
+
" const jun = useRuntimeConfig().public.jun",
|
|
805
|
+
" nuxtApp.hook('abracadabra:before-boot', (ctx) => {",
|
|
806
|
+
" ctx.attachPlugin({",
|
|
807
|
+
" name: 'jun-is',",
|
|
808
|
+
" version: '0.1.0',",
|
|
809
|
+
" metaExcludeKeys: jun.metaExcludeKeys,",
|
|
810
|
+
" pageTypes: {",
|
|
811
|
+
...entries,
|
|
812
|
+
" },",
|
|
813
|
+
" })",
|
|
814
|
+
" })",
|
|
815
|
+
"})",
|
|
816
|
+
""
|
|
817
|
+
].join("\n");
|
|
818
|
+
}
|
|
819
|
+
});
|
|
820
|
+
addPlugin({
|
|
821
|
+
src: resolver.resolve("./runtime/plugins/jun-drag-affordance.client"),
|
|
822
|
+
mode: "client"
|
|
823
|
+
});
|
|
824
|
+
if (options.layoutName !== false) {
|
|
825
|
+
addLayout(
|
|
826
|
+
{ src: resolver.resolve("./runtime/layouts/jun.vue") },
|
|
827
|
+
options.layoutName ?? "jun"
|
|
828
|
+
);
|
|
829
|
+
}
|
|
830
|
+
if (options.pages !== false) {
|
|
831
|
+
nuxt.hook("app:resolve", (app) => {
|
|
832
|
+
if (!app.errorComponent || app.errorComponent.startsWith(nuxt.options.appDir)) {
|
|
833
|
+
app.errorComponent = resolver.resolve("./runtime/error.vue");
|
|
834
|
+
}
|
|
835
|
+
});
|
|
836
|
+
}
|
|
837
|
+
if (options.pages !== false) {
|
|
838
|
+
extendPages((pages) => {
|
|
839
|
+
pages.push({
|
|
840
|
+
name: "jun-index",
|
|
841
|
+
path: "/",
|
|
842
|
+
file: resolver.resolve("./runtime/pages/index.vue")
|
|
843
|
+
});
|
|
844
|
+
pages.push({
|
|
845
|
+
name: "jun-doc",
|
|
846
|
+
path: "/:slug(.*)*",
|
|
847
|
+
file: resolver.resolve("./runtime/pages/doc.vue")
|
|
848
|
+
});
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
const base = runtime.apiBase;
|
|
852
|
+
addServerImportsDir(resolver.resolve("./runtime/server/utils"));
|
|
853
|
+
addServerHandler({ route: `${base}/nav`, handler: resolver.resolve("./runtime/server/api/nav.get") });
|
|
854
|
+
addServerHandler({ route: `${base}/site-config`, handler: resolver.resolve("./runtime/server/api/site-config.get") });
|
|
855
|
+
addServerHandler({ route: `${base}/resolve/**`, handler: resolver.resolve("./runtime/server/api/resolve/[...slug].get") });
|
|
856
|
+
if (enabled.some((e) => e.key === "stats")) {
|
|
857
|
+
addServerHandler({ route: `${base}/stats`, handler: resolver.resolve("./runtime/server/api/stats.get") });
|
|
858
|
+
}
|
|
859
|
+
if (enabled.some((e) => e.key === "services")) {
|
|
860
|
+
addServerHandler({ route: `${base}/service`, handler: resolver.resolve("./runtime/server/api/service.get") });
|
|
861
|
+
}
|
|
862
|
+
if (runtime.features.search) {
|
|
863
|
+
addServerHandler({ route: `${base}/search`, handler: resolver.resolve("./runtime/server/api/search.get") });
|
|
864
|
+
}
|
|
865
|
+
if (runtime.features.feeds) {
|
|
866
|
+
addServerHandler({ route: "/feed.xml", handler: resolver.resolve("./runtime/server/routes/feed.xml.get") });
|
|
867
|
+
addServerHandler({ route: "/feed.json", handler: resolver.resolve("./runtime/server/routes/feed.json.get") });
|
|
868
|
+
}
|
|
869
|
+
if (runtime.features.sitemap) {
|
|
870
|
+
addServerHandler({ route: "/sitemap.xml", handler: resolver.resolve("./runtime/server/routes/sitemap.xml.get") });
|
|
871
|
+
}
|
|
872
|
+
if (runtime.features.docCache) {
|
|
873
|
+
addServerPlugin(resolver.resolve("./runtime/server/plugins/jun-doc-cache"));
|
|
874
|
+
}
|
|
875
|
+
if (runtime.features.rpc) {
|
|
876
|
+
addServerPlugin(resolver.resolve("./runtime/server/plugins/jun-rpc"));
|
|
877
|
+
}
|
|
878
|
+
if (runtime.features.bootstrap && options.seed?.enabled !== false) {
|
|
879
|
+
addServerPlugin(resolver.resolve("./runtime/server/plugins/jun-bootstrap"));
|
|
880
|
+
}
|
|
881
|
+
if (runtime.features.janitor && options.janitor?.enabled !== false) {
|
|
882
|
+
addServerPlugin(resolver.resolve("./runtime/server/plugins/jun-janitor"));
|
|
883
|
+
}
|
|
884
|
+
nuxt.options.nitro.externals = defu(nuxt.options.nitro.externals, {
|
|
885
|
+
inline: ["happy-dom"]
|
|
886
|
+
});
|
|
887
|
+
if (options.pwa !== false && hasNuxtModule("@vite-pwa/nuxt")) {
|
|
888
|
+
const nuxtAny = nuxt.options;
|
|
889
|
+
nuxtAny.pwa = defu(nuxtAny.pwa, {
|
|
890
|
+
registerType: "autoUpdate",
|
|
891
|
+
manifest: {
|
|
892
|
+
id: "/",
|
|
893
|
+
name: runtime.brand.name,
|
|
894
|
+
short_name: runtime.brand.name,
|
|
895
|
+
description: runtime.brand.seoDescription,
|
|
896
|
+
start_url: "/",
|
|
897
|
+
scope: "/",
|
|
898
|
+
display: "standalone",
|
|
899
|
+
background_color: runtime.brand.themeColor,
|
|
900
|
+
theme_color: runtime.brand.themeColor,
|
|
901
|
+
// No default icons: pointing the manifest at files a site does not
|
|
902
|
+
// have produces a broken install prompt rather than none.
|
|
903
|
+
...options.brand?.icons?.length ? { icons: options.brand.icons } : {}
|
|
904
|
+
},
|
|
905
|
+
workbox: {
|
|
906
|
+
globPatterns: ["**/*.{js,css,html,ico,png,svg,webmanifest,woff2}"],
|
|
907
|
+
// Navigations stay NETWORK-FIRST and there is no offline fallback:
|
|
908
|
+
// this is a realtime SSR site, and the CRDT layer owns offline data.
|
|
909
|
+
// A service worker serving stale HTML would fight it.
|
|
910
|
+
navigateFallback: null,
|
|
911
|
+
cleanupOutdatedCaches: true,
|
|
912
|
+
clientsClaim: true,
|
|
913
|
+
skipWaiting: true,
|
|
914
|
+
runtimeCaching: [{
|
|
915
|
+
urlPattern: ({ request }) => request.mode === "navigate",
|
|
916
|
+
handler: "NetworkFirst",
|
|
917
|
+
options: {
|
|
918
|
+
cacheName: "jun-pages",
|
|
919
|
+
networkTimeoutSeconds: 4,
|
|
920
|
+
expiration: { maxEntries: 64, maxAgeSeconds: 60 * 60 * 24 * 7 }
|
|
921
|
+
}
|
|
922
|
+
}]
|
|
923
|
+
},
|
|
924
|
+
// A service worker in dev caches the very navigations you are trying
|
|
925
|
+
// to debug. Verify PWA behaviour against a production build.
|
|
926
|
+
devOptions: { enabled: false }
|
|
927
|
+
});
|
|
928
|
+
}
|
|
929
|
+
if (options.imageDomains?.length) {
|
|
930
|
+
const image = nuxt.options.image ??= {};
|
|
931
|
+
image.domains = [...image.domains ?? [], ...options.imageDomains];
|
|
932
|
+
}
|
|
933
|
+
if (hasNuxtModule("nuxt-og-image")) {
|
|
934
|
+
const nuxtAny = nuxt.options;
|
|
935
|
+
nuxtAny.ogImage = defu(nuxtAny.ogImage, { zeroRuntime: true });
|
|
936
|
+
}
|
|
937
|
+
nuxt.options.nitro.devStorage = defu(nuxt.options.nitro.devStorage, {
|
|
938
|
+
"cache:nuxt:payload": { driver: "memory" }
|
|
939
|
+
});
|
|
940
|
+
if (runtime.features.backdrop === "shader") {
|
|
941
|
+
nuxt.hook("vite:extendConfig", (config) => {
|
|
942
|
+
const c = config;
|
|
943
|
+
c.optimizeDeps ??= {};
|
|
944
|
+
c.optimizeDeps.exclude = [...c.optimizeDeps.exclude ?? [], "shaders/vue", "shaders"];
|
|
945
|
+
c.ssr ??= {};
|
|
946
|
+
c.ssr.noExternal = [...c.ssr.noExternal ?? [], "shaders"];
|
|
947
|
+
});
|
|
948
|
+
}
|
|
949
|
+
nuxt.hook("vite:extendConfig", (config) => {
|
|
950
|
+
const c = config;
|
|
951
|
+
c.resolve ??= {};
|
|
952
|
+
c.resolve.dedupe = [...c.resolve.dedupe ?? [], "yjs", "y-protocols", "mapbox-gl"];
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
});
|
|
956
|
+
|
|
957
|
+
export { module$1 as default };
|