@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,319 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref } from "vue";
|
|
3
|
+
import {
|
|
4
|
+
JUN_LIBRARY_STATUSES,
|
|
5
|
+
junMotion,
|
|
6
|
+
junStagger,
|
|
7
|
+
useAbracadabra,
|
|
8
|
+
useChildTree,
|
|
9
|
+
useDocSlugs,
|
|
10
|
+
useDocTree,
|
|
11
|
+
useJunGroupedDnD,
|
|
12
|
+
useJunRename,
|
|
13
|
+
useJunStudio,
|
|
14
|
+
useJunUpload,
|
|
15
|
+
useJunViewingAccent
|
|
16
|
+
} from "#imports";
|
|
17
|
+
const props = defineProps({
|
|
18
|
+
docId: { type: String, required: true },
|
|
19
|
+
docLabel: { type: String, required: false },
|
|
20
|
+
docMeta: { type: Object, required: false },
|
|
21
|
+
childProvider: { type: null, required: false },
|
|
22
|
+
editable: { type: Boolean, required: false }
|
|
23
|
+
});
|
|
24
|
+
const abra = useAbracadabra();
|
|
25
|
+
const tree = useChildTree(abra.doc, props.docId);
|
|
26
|
+
const { getDocUrl } = useDocSlugs();
|
|
27
|
+
const { getEntry } = useDocTree();
|
|
28
|
+
const { editing } = useJunStudio();
|
|
29
|
+
const { renameDoc } = useJunRename();
|
|
30
|
+
const { uploadTo, imageFiles } = useJunUpload();
|
|
31
|
+
const { accentInsetStyle, accentTitle } = useJunViewingAccent();
|
|
32
|
+
const pageTitle = computed(() => getEntry(props.docId)?.label ?? props.docLabel ?? "Library");
|
|
33
|
+
const subtitle = computed(() => {
|
|
34
|
+
const meta = getEntry(props.docId)?.meta;
|
|
35
|
+
const ex = meta?.excerpt ?? props.docMeta?.excerpt;
|
|
36
|
+
return typeof ex === "string" && ex.trim() ? ex : void 0;
|
|
37
|
+
});
|
|
38
|
+
function renamePage(t) {
|
|
39
|
+
renameDoc(props.docId, t);
|
|
40
|
+
}
|
|
41
|
+
function renameSubtitle(s) {
|
|
42
|
+
tree.updateMeta(props.docId, { excerpt: s || void 0 });
|
|
43
|
+
}
|
|
44
|
+
const items = computed(
|
|
45
|
+
() => (tree.childrenOf(null) ?? []).filter((e) => !!e.label)
|
|
46
|
+
);
|
|
47
|
+
const SECTION_ORDER = [
|
|
48
|
+
{ status: "reading", title: "Reading now" },
|
|
49
|
+
{ status: "want", title: "Up next" },
|
|
50
|
+
{ status: "read", title: "Finished" }
|
|
51
|
+
];
|
|
52
|
+
const shelvesEl = ref(null);
|
|
53
|
+
const {
|
|
54
|
+
orderedItems,
|
|
55
|
+
dragId,
|
|
56
|
+
hoverGroup,
|
|
57
|
+
onItemDragStart,
|
|
58
|
+
onItemDragEnd,
|
|
59
|
+
onGroupDragOver,
|
|
60
|
+
onGroupDragLeave,
|
|
61
|
+
onGroupDrop
|
|
62
|
+
} = useJunGroupedDnD({
|
|
63
|
+
tree,
|
|
64
|
+
containerDocId: props.docId,
|
|
65
|
+
items,
|
|
66
|
+
containerEl: shelvesEl,
|
|
67
|
+
groupKey: "status",
|
|
68
|
+
// "Unsorted" is where FOREIGN status values land — a bucket, not a value.
|
|
69
|
+
// Dropping into it clears the key, which shelves the book under "Up next"
|
|
70
|
+
// (the state a book starts in) rather than inventing a status nothing reads.
|
|
71
|
+
groupValueFor: (section) => section === "unsorted" ? void 0 : section,
|
|
72
|
+
ghostIconFor: () => "i-lucide-book"
|
|
73
|
+
});
|
|
74
|
+
const sections = computed(() => {
|
|
75
|
+
const all = orderedItems.value;
|
|
76
|
+
const out = SECTION_ORDER.map((s) => ({
|
|
77
|
+
...s,
|
|
78
|
+
// An entry with no status is "up next" — the state a book starts in.
|
|
79
|
+
items: all.filter((e) => (e.meta?.status ?? "want") === s.status)
|
|
80
|
+
})).filter((s) => s.items.length || editing.value);
|
|
81
|
+
const known = new Set(SECTION_ORDER.map((s) => s.status));
|
|
82
|
+
const unsorted = all.filter((e) => !known.has(e.meta?.status ?? "want"));
|
|
83
|
+
if (unsorted.length) out.push({ status: "unsorted", title: "Unsorted", items: unsorted });
|
|
84
|
+
return out;
|
|
85
|
+
});
|
|
86
|
+
function addEntry(status) {
|
|
87
|
+
const id = tree.createChild(null, "New book", "doc");
|
|
88
|
+
tree.updateMeta(id, { status });
|
|
89
|
+
}
|
|
90
|
+
const statusOptions = [...JUN_LIBRARY_STATUSES];
|
|
91
|
+
function setRating(entry, value) {
|
|
92
|
+
const next = (entry.meta?.rating ?? 0) === value ? void 0 : value;
|
|
93
|
+
tree.updateMeta(entry.id, { rating: next });
|
|
94
|
+
}
|
|
95
|
+
const coverDropId = ref(null);
|
|
96
|
+
function onRowDragOver(entry, e) {
|
|
97
|
+
if (!editing.value || !e.dataTransfer?.types.includes("Files")) return;
|
|
98
|
+
e.preventDefault();
|
|
99
|
+
e.dataTransfer.dropEffect = "copy";
|
|
100
|
+
coverDropId.value = entry.id;
|
|
101
|
+
}
|
|
102
|
+
async function onRowDrop(entry, e) {
|
|
103
|
+
if (!editing.value) return;
|
|
104
|
+
const img = imageFiles(e.dataTransfer)[0];
|
|
105
|
+
if (!img) return;
|
|
106
|
+
e.preventDefault();
|
|
107
|
+
coverDropId.value = null;
|
|
108
|
+
const res = await uploadTo(entry.id, img);
|
|
109
|
+
if (res) tree.updateMeta(entry.id, { coverUploadId: res.id, coverMimeType: res.mimeType });
|
|
110
|
+
}
|
|
111
|
+
</script>
|
|
112
|
+
|
|
113
|
+
<template>
|
|
114
|
+
<div class="relative mx-auto w-full max-w-3xl px-4 pt-12 pb-16 sm:px-8">
|
|
115
|
+
<JunPageHero
|
|
116
|
+
:title="pageTitle"
|
|
117
|
+
:subtitle="subtitle"
|
|
118
|
+
:editable="editing"
|
|
119
|
+
@rename="renamePage"
|
|
120
|
+
@rename-subtitle="renameSubtitle"
|
|
121
|
+
/>
|
|
122
|
+
|
|
123
|
+
<div
|
|
124
|
+
v-if="!items.length && !editing"
|
|
125
|
+
class="py-16 text-center"
|
|
126
|
+
>
|
|
127
|
+
<UIcon
|
|
128
|
+
name="i-lucide-library"
|
|
129
|
+
class="mb-3 size-10 text-dimmed"
|
|
130
|
+
/>
|
|
131
|
+
<p class="text-sm text-muted">
|
|
132
|
+
The shelves are empty.
|
|
133
|
+
</p>
|
|
134
|
+
</div>
|
|
135
|
+
|
|
136
|
+
<div ref="shelvesEl">
|
|
137
|
+
<section
|
|
138
|
+
v-for="(section, si) in sections"
|
|
139
|
+
:key="section.status"
|
|
140
|
+
class="mb-8 rounded-xl transition-shadow duration-200 last:mb-0"
|
|
141
|
+
:class="hoverGroup === section.status ? 'ring-2 ring-inset ring-black/20 dark:ring-white/25' : ''"
|
|
142
|
+
@dragover="onGroupDragOver(section.status, $event)"
|
|
143
|
+
@dragleave="onGroupDragLeave($event)"
|
|
144
|
+
@drop="onGroupDrop(section.status, $event)"
|
|
145
|
+
>
|
|
146
|
+
<div class="mb-3 flex items-baseline gap-3 px-1">
|
|
147
|
+
<h2 class="text-xs font-medium tracking-[0.22em] text-dimmed uppercase">
|
|
148
|
+
{{ section.title }}
|
|
149
|
+
</h2>
|
|
150
|
+
<div class="h-px flex-1 bg-black/10 dark:bg-white/10" />
|
|
151
|
+
<UButton
|
|
152
|
+
v-if="editing && section.status !== 'unsorted'"
|
|
153
|
+
icon="i-lucide-plus"
|
|
154
|
+
size="xs"
|
|
155
|
+
color="neutral"
|
|
156
|
+
variant="ghost"
|
|
157
|
+
aria-label="Add entry"
|
|
158
|
+
@click="addEntry(section.status)"
|
|
159
|
+
/>
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
<TransitionGroup
|
|
163
|
+
tag="ul"
|
|
164
|
+
name="jun-library"
|
|
165
|
+
class="flex flex-col gap-3 px-1"
|
|
166
|
+
>
|
|
167
|
+
<li
|
|
168
|
+
v-for="(entry, i) in section.items"
|
|
169
|
+
:key="entry.id"
|
|
170
|
+
v-motion="junMotion(junStagger(Math.min(si * 2 + i, 8), { delayMs: 60 }))"
|
|
171
|
+
:data-dnd-id="entry.id"
|
|
172
|
+
:draggable="editing ? true : void 0"
|
|
173
|
+
:class="[
|
|
174
|
+
'rounded-xl transition-[transform,box-shadow,opacity] duration-200',
|
|
175
|
+
editing ? dragId === entry.id ? 'cursor-grabbing' : 'cursor-grab' : '',
|
|
176
|
+
dragId === entry.id ? 'scale-[1.02] opacity-90 shadow-lg shadow-black/20' : ''
|
|
177
|
+
]"
|
|
178
|
+
@dragstart="onItemDragStart(entry, $event)"
|
|
179
|
+
@dragend="onItemDragEnd($event)"
|
|
180
|
+
>
|
|
181
|
+
<JunItemMenu
|
|
182
|
+
:entry="entry"
|
|
183
|
+
:tree="tree"
|
|
184
|
+
:siblings="section.items.map((e) => e.id)"
|
|
185
|
+
no-open
|
|
186
|
+
>
|
|
187
|
+
<NuxtLink
|
|
188
|
+
:to="getDocUrl(entry.id)"
|
|
189
|
+
class="jun-card group relative flex items-center gap-4 rounded-xl px-4 py-3.5 transition-all duration-300 hover:scale-[1.01] hover:shadow-xl"
|
|
190
|
+
:class="coverDropId === entry.id ? 'ring-2 ring-black/40 dark:ring-white/50' : ''"
|
|
191
|
+
:title="accentTitle(entry.id)"
|
|
192
|
+
@dragover="onRowDragOver(entry, $event)"
|
|
193
|
+
@dragleave="coverDropId === entry.id && (coverDropId = null)"
|
|
194
|
+
@drop="onRowDrop(entry, $event)"
|
|
195
|
+
>
|
|
196
|
+
<span
|
|
197
|
+
v-if="accentInsetStyle(entry.id)"
|
|
198
|
+
aria-hidden="true"
|
|
199
|
+
class="pointer-events-none absolute inset-0 rounded-[inherit]"
|
|
200
|
+
:style="accentInsetStyle(entry.id)"
|
|
201
|
+
/>
|
|
202
|
+
|
|
203
|
+
<span
|
|
204
|
+
class="relative flex h-14 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md bg-black/5 text-black/50 ring-1 ring-black/5 dark:bg-white/10 dark:text-white/60 dark:ring-white/10"
|
|
205
|
+
>
|
|
206
|
+
<JunMedia
|
|
207
|
+
v-if="entry.meta?.coverUploadId"
|
|
208
|
+
:doc-id="entry.id"
|
|
209
|
+
:upload-id="entry.meta.coverUploadId"
|
|
210
|
+
:mime-type="entry.meta.coverMimeType || 'image/jpeg'"
|
|
211
|
+
:alt="entry.label"
|
|
212
|
+
:size="128"
|
|
213
|
+
media-class="h-full w-full object-cover"
|
|
214
|
+
/>
|
|
215
|
+
<UIcon
|
|
216
|
+
v-else
|
|
217
|
+
name="i-lucide-book"
|
|
218
|
+
class="size-4.5"
|
|
219
|
+
/>
|
|
220
|
+
</span>
|
|
221
|
+
|
|
222
|
+
<span class="min-w-0 flex-1">
|
|
223
|
+
<span class="block truncate text-sm font-medium tracking-wide text-highlighted sm:text-base">
|
|
224
|
+
{{ entry.label }}
|
|
225
|
+
</span>
|
|
226
|
+
<span
|
|
227
|
+
v-if="entry.meta?.author"
|
|
228
|
+
class="block truncate text-xs text-muted sm:text-sm"
|
|
229
|
+
>
|
|
230
|
+
{{ entry.meta.author }}
|
|
231
|
+
</span>
|
|
232
|
+
</span>
|
|
233
|
+
|
|
234
|
+
<span
|
|
235
|
+
v-if="entry.meta?.rating || editing"
|
|
236
|
+
class="flex shrink-0 items-center gap-0.5"
|
|
237
|
+
@click.stop.prevent
|
|
238
|
+
>
|
|
239
|
+
<button
|
|
240
|
+
v-for="star in 5"
|
|
241
|
+
:key="star"
|
|
242
|
+
type="button"
|
|
243
|
+
:disabled="!editing"
|
|
244
|
+
:aria-label="`Rate ${star} of 5`"
|
|
245
|
+
class="disabled:cursor-default"
|
|
246
|
+
:class="editing ? 'cursor-pointer transition-transform hover:scale-110' : ''"
|
|
247
|
+
@click="editing && setRating(entry, star)"
|
|
248
|
+
>
|
|
249
|
+
<UIcon
|
|
250
|
+
name="i-lucide-star"
|
|
251
|
+
class="size-3.5"
|
|
252
|
+
:class="star <= (entry.meta?.rating ?? 0) ? 'fill-current text-highlighted' : 'text-dimmed opacity-40'"
|
|
253
|
+
/>
|
|
254
|
+
</button>
|
|
255
|
+
</span>
|
|
256
|
+
|
|
257
|
+
<a
|
|
258
|
+
v-if="entry.meta?.url"
|
|
259
|
+
:href="entry.meta.url"
|
|
260
|
+
target="_blank"
|
|
261
|
+
rel="noopener noreferrer"
|
|
262
|
+
class="shrink-0 text-dimmed transition-colors hover:text-default"
|
|
263
|
+
aria-label="Open link"
|
|
264
|
+
@click.stop
|
|
265
|
+
>
|
|
266
|
+
<UIcon
|
|
267
|
+
name="i-lucide-arrow-up-right"
|
|
268
|
+
class="size-3.5"
|
|
269
|
+
/>
|
|
270
|
+
</a>
|
|
271
|
+
</NuxtLink>
|
|
272
|
+
</JunItemMenu>
|
|
273
|
+
|
|
274
|
+
<div
|
|
275
|
+
v-if="editing"
|
|
276
|
+
class="mt-1.5 flex flex-wrap gap-1.5 pr-2 pl-14"
|
|
277
|
+
>
|
|
278
|
+
<AMetaChip
|
|
279
|
+
field-type="select"
|
|
280
|
+
label="Status"
|
|
281
|
+
icon="i-lucide-bookmark"
|
|
282
|
+
:options="statusOptions"
|
|
283
|
+
:meta="entry.meta ?? {}"
|
|
284
|
+
meta-key="status"
|
|
285
|
+
@patch="tree.updateMeta(entry.id, $event)"
|
|
286
|
+
/>
|
|
287
|
+
<AMetaChip
|
|
288
|
+
field-type="text"
|
|
289
|
+
label="Author"
|
|
290
|
+
icon="i-lucide-user-round"
|
|
291
|
+
:meta="entry.meta ?? {}"
|
|
292
|
+
meta-key="author"
|
|
293
|
+
@patch="tree.updateMeta(entry.id, $event)"
|
|
294
|
+
/>
|
|
295
|
+
<AMetaChip
|
|
296
|
+
field-type="url"
|
|
297
|
+
label="URL"
|
|
298
|
+
:meta="entry.meta ?? {}"
|
|
299
|
+
meta-key="url"
|
|
300
|
+
@patch="tree.updateMeta(entry.id, $event)"
|
|
301
|
+
/>
|
|
302
|
+
</div>
|
|
303
|
+
</li>
|
|
304
|
+
</TransitionGroup>
|
|
305
|
+
|
|
306
|
+
<p
|
|
307
|
+
v-if="editing && !section.items.length"
|
|
308
|
+
class="px-1 text-xs text-dimmed italic"
|
|
309
|
+
>
|
|
310
|
+
Empty shelf — drag a book here.
|
|
311
|
+
</p>
|
|
312
|
+
</section>
|
|
313
|
+
</div>
|
|
314
|
+
</div>
|
|
315
|
+
</template>
|
|
316
|
+
|
|
317
|
+
<style scoped>
|
|
318
|
+
.jun-library-move{transition:transform .32s cubic-bezier(.22,1,.36,1)}.jun-library-enter-active{transition:opacity .3s ease,transform .3s cubic-bezier(.22,1,.36,1)}.jun-library-leave-active{position:absolute;transition:opacity .2s ease}.jun-library-enter-from,.jun-library-leave-to{opacity:0;transform:translateY(-6px)}@media (prefers-reduced-motion:reduce){.jun-library-enter-active,.jun-library-leave-active,.jun-library-move{transition:none}}
|
|
319
|
+
</style>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
docId: string;
|
|
3
|
+
docLabel?: string;
|
|
4
|
+
docMeta?: Record<string, unknown>;
|
|
5
|
+
childProvider?: unknown;
|
|
6
|
+
editable?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
docId: string;
|
|
3
|
+
docLabel?: string;
|
|
4
|
+
docMeta?: Record<string, unknown>;
|
|
5
|
+
childProvider?: unknown;
|
|
6
|
+
editable?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref } from "vue";
|
|
3
|
+
import {
|
|
4
|
+
junMotion,
|
|
5
|
+
junStagger,
|
|
6
|
+
useAbracadabra,
|
|
7
|
+
useChildTree,
|
|
8
|
+
useDocTree,
|
|
9
|
+
useJunListDnD,
|
|
10
|
+
useJunRename,
|
|
11
|
+
useJunStudio,
|
|
12
|
+
useJunViewingAccent,
|
|
13
|
+
useToast,
|
|
14
|
+
useTrash
|
|
15
|
+
} from "#imports";
|
|
16
|
+
const props = defineProps({
|
|
17
|
+
docId: { type: String, required: true },
|
|
18
|
+
docLabel: { type: String, required: false },
|
|
19
|
+
docMeta: { type: Object, required: false },
|
|
20
|
+
childProvider: { type: null, required: false },
|
|
21
|
+
editable: { type: Boolean, required: false }
|
|
22
|
+
});
|
|
23
|
+
const abra = useAbracadabra();
|
|
24
|
+
const tree = useChildTree(abra.doc, props.docId);
|
|
25
|
+
const { getEntry } = useDocTree();
|
|
26
|
+
const { editing } = useJunStudio();
|
|
27
|
+
const { renameDoc } = useJunRename();
|
|
28
|
+
const { accentInsetStyle, accentTitle } = useJunViewingAccent();
|
|
29
|
+
const toast = useToast();
|
|
30
|
+
const { restoreFromTrash } = useTrash();
|
|
31
|
+
const pageTitle = computed(() => getEntry(props.docId)?.label ?? props.docLabel ?? "Links");
|
|
32
|
+
const subtitle = computed(() => {
|
|
33
|
+
const meta = getEntry(props.docId)?.meta;
|
|
34
|
+
const ex = meta?.excerpt ?? props.docMeta?.excerpt;
|
|
35
|
+
return typeof ex === "string" && ex.trim() ? ex : void 0;
|
|
36
|
+
});
|
|
37
|
+
function renamePage(t) {
|
|
38
|
+
renameDoc(props.docId, t);
|
|
39
|
+
}
|
|
40
|
+
function renameSubtitle(s) {
|
|
41
|
+
tree.updateMeta(props.docId, { excerpt: s || void 0 });
|
|
42
|
+
}
|
|
43
|
+
const items = computed(
|
|
44
|
+
() => (tree.childrenOf(null) ?? []).filter((e) => !!e.label)
|
|
45
|
+
);
|
|
46
|
+
const pageEl = ref(null);
|
|
47
|
+
const {
|
|
48
|
+
orderedItems,
|
|
49
|
+
dragId,
|
|
50
|
+
externalHover,
|
|
51
|
+
onItemDragStart,
|
|
52
|
+
onItemDragEnd,
|
|
53
|
+
onContainerDragOver,
|
|
54
|
+
onContainerDragLeave,
|
|
55
|
+
onContainerDrop
|
|
56
|
+
} = useJunListDnD({
|
|
57
|
+
tree,
|
|
58
|
+
containerDocId: props.docId,
|
|
59
|
+
items,
|
|
60
|
+
containerEl: pageEl,
|
|
61
|
+
reorderable: true,
|
|
62
|
+
ghostIconFor: () => "i-lucide-link"
|
|
63
|
+
});
|
|
64
|
+
function addLink() {
|
|
65
|
+
const id = tree.createChild(null, "New link", "doc");
|
|
66
|
+
tree.updateMeta(id, { url: "", icon: "link" });
|
|
67
|
+
}
|
|
68
|
+
function deleteLink(entry) {
|
|
69
|
+
tree.deleteEntry(entry.id);
|
|
70
|
+
toast.add({
|
|
71
|
+
title: `Moved \u201C${entry.label}\u201D to trash`,
|
|
72
|
+
icon: "i-lucide-trash-2",
|
|
73
|
+
duration: 6e3,
|
|
74
|
+
actions: [
|
|
75
|
+
{
|
|
76
|
+
label: "Undo",
|
|
77
|
+
color: "neutral",
|
|
78
|
+
variant: "outline",
|
|
79
|
+
onClick: () => restoreFromTrash(entry.id)
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
</script>
|
|
85
|
+
|
|
86
|
+
<template>
|
|
87
|
+
<div
|
|
88
|
+
ref="pageEl"
|
|
89
|
+
class="relative mx-auto w-full max-w-3xl rounded-xl px-4 pt-12 pb-16 transition-shadow duration-200 sm:px-8"
|
|
90
|
+
:class="externalHover ? 'ring-2 ring-inset ring-black/20 dark:ring-white/25' : ''"
|
|
91
|
+
@dragover="onContainerDragOver"
|
|
92
|
+
@dragleave="onContainerDragLeave"
|
|
93
|
+
@drop="onContainerDrop"
|
|
94
|
+
>
|
|
95
|
+
<JunPageHero
|
|
96
|
+
:title="pageTitle"
|
|
97
|
+
:subtitle="subtitle"
|
|
98
|
+
:editable="editing"
|
|
99
|
+
@rename="renamePage"
|
|
100
|
+
@rename-subtitle="renameSubtitle"
|
|
101
|
+
/>
|
|
102
|
+
|
|
103
|
+
<div
|
|
104
|
+
v-if="editing"
|
|
105
|
+
class="mb-6"
|
|
106
|
+
>
|
|
107
|
+
<UButton
|
|
108
|
+
icon="i-lucide-plus"
|
|
109
|
+
size="sm"
|
|
110
|
+
color="neutral"
|
|
111
|
+
variant="soft"
|
|
112
|
+
label="Add link"
|
|
113
|
+
@click="addLink"
|
|
114
|
+
/>
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
<div
|
|
118
|
+
v-if="!items.length"
|
|
119
|
+
class="py-16 text-center"
|
|
120
|
+
>
|
|
121
|
+
<UIcon
|
|
122
|
+
name="i-lucide-link"
|
|
123
|
+
class="mb-3 size-10 text-dimmed"
|
|
124
|
+
/>
|
|
125
|
+
<p class="text-sm text-muted">
|
|
126
|
+
Nothing linked yet.
|
|
127
|
+
</p>
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<TransitionGroup
|
|
131
|
+
v-else
|
|
132
|
+
tag="ul"
|
|
133
|
+
name="jun-links"
|
|
134
|
+
class="flex flex-col gap-3"
|
|
135
|
+
>
|
|
136
|
+
<li
|
|
137
|
+
v-for="(entry, i) in orderedItems"
|
|
138
|
+
:key="entry.id"
|
|
139
|
+
v-motion="junMotion(junStagger(i, { delayMs: 70 }))"
|
|
140
|
+
:data-dnd-id="entry.id"
|
|
141
|
+
:draggable="editing ? true : void 0"
|
|
142
|
+
:class="editing ? dragId === entry.id ? 'cursor-grabbing opacity-70' : 'cursor-grab' : ''"
|
|
143
|
+
@dragstart="onItemDragStart(entry, $event)"
|
|
144
|
+
@dragend="onItemDragEnd($event)"
|
|
145
|
+
>
|
|
146
|
+
<JunItemMenu
|
|
147
|
+
:entry="entry"
|
|
148
|
+
:tree="tree"
|
|
149
|
+
>
|
|
150
|
+
<div class="group/link relative">
|
|
151
|
+
<JunLinksRow
|
|
152
|
+
:entry="entry"
|
|
153
|
+
:accent="accentInsetStyle(entry.id)"
|
|
154
|
+
:accent-title="accentTitle(entry.id)"
|
|
155
|
+
:force-internal="editing"
|
|
156
|
+
/>
|
|
157
|
+
<UButton
|
|
158
|
+
v-if="editing"
|
|
159
|
+
icon="i-lucide-trash-2"
|
|
160
|
+
color="neutral"
|
|
161
|
+
variant="ghost"
|
|
162
|
+
size="xs"
|
|
163
|
+
class="absolute top-1/2 -right-9 hidden -translate-y-1/2 opacity-0 transition-opacity group-hover/link:opacity-100 sm:inline-flex"
|
|
164
|
+
aria-label="Delete link"
|
|
165
|
+
@click.stop.prevent="deleteLink(entry)"
|
|
166
|
+
/>
|
|
167
|
+
</div>
|
|
168
|
+
</JunItemMenu>
|
|
169
|
+
|
|
170
|
+
<!-- The row's meta, edited in place with the same chip vocabulary the
|
|
171
|
+
editor's meta header uses. An empty URL means "link to own page". -->
|
|
172
|
+
<div
|
|
173
|
+
v-if="editing"
|
|
174
|
+
class="mt-1.5 flex flex-wrap gap-1.5 pr-2 pl-14"
|
|
175
|
+
>
|
|
176
|
+
<AMetaChip
|
|
177
|
+
field-type="url"
|
|
178
|
+
label="Link URL (empty = own page)"
|
|
179
|
+
:meta="entry.meta ?? {}"
|
|
180
|
+
meta-key="url"
|
|
181
|
+
@patch="tree.updateMeta(entry.id, $event)"
|
|
182
|
+
/>
|
|
183
|
+
<AMetaChip
|
|
184
|
+
field-type="icon"
|
|
185
|
+
label="Icon"
|
|
186
|
+
:meta="entry.meta ?? {}"
|
|
187
|
+
meta-key="icon"
|
|
188
|
+
@patch="tree.updateMeta(entry.id, $event)"
|
|
189
|
+
/>
|
|
190
|
+
<AMetaChip
|
|
191
|
+
field-type="text"
|
|
192
|
+
label="Description"
|
|
193
|
+
icon="i-lucide-text"
|
|
194
|
+
:meta="entry.meta ?? {}"
|
|
195
|
+
meta-key="description"
|
|
196
|
+
@patch="tree.updateMeta(entry.id, $event)"
|
|
197
|
+
/>
|
|
198
|
+
</div>
|
|
199
|
+
</li>
|
|
200
|
+
</TransitionGroup>
|
|
201
|
+
</div>
|
|
202
|
+
</template>
|
|
203
|
+
|
|
204
|
+
<style scoped>
|
|
205
|
+
.jun-links-move{transition:transform .32s cubic-bezier(.22,1,.36,1)}@media (prefers-reduced-motion:reduce){.jun-links-move{transition:none}}
|
|
206
|
+
</style>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
docId: string;
|
|
3
|
+
docLabel?: string;
|
|
4
|
+
docMeta?: Record<string, unknown>;
|
|
5
|
+
childProvider?: unknown;
|
|
6
|
+
editable?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
docId: string;
|
|
3
|
+
docLabel?: string;
|
|
4
|
+
docMeta?: Record<string, unknown>;
|
|
5
|
+
childProvider?: unknown;
|
|
6
|
+
editable?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|