@slashclick/ui 0.1.13
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 +108 -0
- package/dist/components/auth/providers.cjs +83 -0
- package/dist/components/auth/providers.cjs.map +1 -0
- package/dist/components/auth/providers.d.ts +19 -0
- package/dist/components/auth/providers.d.ts.map +1 -0
- package/dist/components/auth/providers.js +59 -0
- package/dist/components/auth/providers.js.map +1 -0
- package/dist/components/card/back-button.cjs +45 -0
- package/dist/components/card/back-button.cjs.map +1 -0
- package/dist/components/card/back-button.d.ts +7 -0
- package/dist/components/card/back-button.d.ts.map +1 -0
- package/dist/components/card/back-button.js +11 -0
- package/dist/components/card/back-button.js.map +1 -0
- package/dist/components/card/card-wrapper.cjs +56 -0
- package/dist/components/card/card-wrapper.cjs.map +1 -0
- package/dist/components/card/card-wrapper.d.ts +11 -0
- package/dist/components/card/card-wrapper.d.ts.map +1 -0
- package/dist/components/card/card-wrapper.js +36 -0
- package/dist/components/card/card-wrapper.js.map +1 -0
- package/dist/components/card/header.cjs +52 -0
- package/dist/components/card/header.cjs.map +1 -0
- package/dist/components/card/header.d.ts +8 -0
- package/dist/components/card/header.d.ts.map +1 -0
- package/dist/components/card/header.js +18 -0
- package/dist/components/card/header.js.map +1 -0
- package/dist/components/combobox/ComboList.cjs +78 -0
- package/dist/components/combobox/ComboList.cjs.map +1 -0
- package/dist/components/combobox/ComboList.d.ts +14 -0
- package/dist/components/combobox/ComboList.d.ts.map +1 -0
- package/dist/components/combobox/ComboList.js +61 -0
- package/dist/components/combobox/ComboList.js.map +1 -0
- package/dist/components/combobox/index.cjs +119 -0
- package/dist/components/combobox/index.cjs.map +1 -0
- package/dist/components/combobox/index.d.ts +6 -0
- package/dist/components/combobox/index.d.ts.map +1 -0
- package/dist/components/combobox/index.js +101 -0
- package/dist/components/combobox/index.js.map +1 -0
- package/dist/components/dashboard/account-select.cjs +69 -0
- package/dist/components/dashboard/account-select.cjs.map +1 -0
- package/dist/components/dashboard/account-select.d.ts +12 -0
- package/dist/components/dashboard/account-select.d.ts.map +1 -0
- package/dist/components/dashboard/account-select.js +41 -0
- package/dist/components/dashboard/account-select.js.map +1 -0
- package/dist/components/dashboard/account-switcher.cjs +72 -0
- package/dist/components/dashboard/account-switcher.cjs.map +1 -0
- package/dist/components/dashboard/account-switcher.d.ts +12 -0
- package/dist/components/dashboard/account-switcher.d.ts.map +1 -0
- package/dist/components/dashboard/account-switcher.js +44 -0
- package/dist/components/dashboard/account-switcher.js.map +1 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.cjs +100 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.d.ts +3 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.js +81 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.js.map +1 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.styles.cjs +77 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.styles.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.styles.d.ts +13 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.styles.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.styles.js +40 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.styles.js.map +1 -0
- package/dist/components/dashboard/sidebar/EntityList.cjs +121 -0
- package/dist/components/dashboard/sidebar/EntityList.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/EntityList.d.ts +3 -0
- package/dist/components/dashboard/sidebar/EntityList.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/EntityList.js +87 -0
- package/dist/components/dashboard/sidebar/EntityList.js.map +1 -0
- package/dist/components/dashboard/sidebar/EntityList.styles.cjs +95 -0
- package/dist/components/dashboard/sidebar/EntityList.styles.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/EntityList.styles.d.ts +42 -0
- package/dist/components/dashboard/sidebar/EntityList.styles.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/EntityList.styles.js +57 -0
- package/dist/components/dashboard/sidebar/EntityList.styles.js.map +1 -0
- package/dist/components/dashboard/sidebar/SectionHeader.cjs +99 -0
- package/dist/components/dashboard/sidebar/SectionHeader.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/SectionHeader.d.ts +3 -0
- package/dist/components/dashboard/sidebar/SectionHeader.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/SectionHeader.js +81 -0
- package/dist/components/dashboard/sidebar/SectionHeader.js.map +1 -0
- package/dist/components/dashboard/sidebar/SectionHeader.styles.cjs +116 -0
- package/dist/components/dashboard/sidebar/SectionHeader.styles.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/SectionHeader.styles.d.ts +29 -0
- package/dist/components/dashboard/sidebar/SectionHeader.styles.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/SectionHeader.styles.js +77 -0
- package/dist/components/dashboard/sidebar/SectionHeader.styles.js.map +1 -0
- package/dist/components/dashboard/sidebar/index.cjs +41 -0
- package/dist/components/dashboard/sidebar/index.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/index.d.ts +6 -0
- package/dist/components/dashboard/sidebar/index.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/index.js +12 -0
- package/dist/components/dashboard/sidebar/index.js.map +1 -0
- package/dist/components/dashboard/sidebar/sidebar.cjs +50 -0
- package/dist/components/dashboard/sidebar/sidebar.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/sidebar.d.ts +15 -0
- package/dist/components/dashboard/sidebar/sidebar.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/sidebar.js +26 -0
- package/dist/components/dashboard/sidebar/sidebar.js.map +1 -0
- package/dist/components/dashboard/sidebar/tabs.cjs +52 -0
- package/dist/components/dashboard/sidebar/tabs.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/tabs.d.ts +3 -0
- package/dist/components/dashboard/sidebar/tabs.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/tabs.js +37 -0
- package/dist/components/dashboard/sidebar/tabs.js.map +1 -0
- package/dist/components/dashboard/sidebar/types.cjs +17 -0
- package/dist/components/dashboard/sidebar/types.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/types.d.ts +36 -0
- package/dist/components/dashboard/sidebar/types.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/types.js +1 -0
- package/dist/components/dashboard/sidebar/types.js.map +1 -0
- package/dist/components/dashboard/sidebar-nav.cjs +99 -0
- package/dist/components/dashboard/sidebar-nav.cjs.map +1 -0
- package/dist/components/dashboard/sidebar-nav.d.ts +24 -0
- package/dist/components/dashboard/sidebar-nav.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar-nav.js +75 -0
- package/dist/components/dashboard/sidebar-nav.js.map +1 -0
- package/dist/components/dashboard/utils/build-nav.cjs +103 -0
- package/dist/components/dashboard/utils/build-nav.cjs.map +1 -0
- package/dist/components/dashboard/utils/build-nav.d.ts +7 -0
- package/dist/components/dashboard/utils/build-nav.d.ts.map +1 -0
- package/dist/components/dashboard/utils/build-nav.js +78 -0
- package/dist/components/dashboard/utils/build-nav.js.map +1 -0
- package/dist/components/dashboard/utils.cjs +2 -0
- package/dist/components/dashboard/utils.cjs.map +1 -0
- package/dist/components/dashboard/utils.d.ts +1 -0
- package/dist/components/dashboard/utils.d.ts.map +1 -0
- package/dist/components/dashboard/utils.js +1 -0
- package/dist/components/dashboard/utils.js.map +1 -0
- package/dist/components/dashboard/with-dashboard.cjs +189 -0
- package/dist/components/dashboard/with-dashboard.cjs.map +1 -0
- package/dist/components/dashboard/with-dashboard.d.ts +6 -0
- package/dist/components/dashboard/with-dashboard.d.ts.map +1 -0
- package/dist/components/dashboard/with-dashboard.js +175 -0
- package/dist/components/dashboard/with-dashboard.js.map +1 -0
- package/dist/components/detail/DetailLayout.styles.cjs +116 -0
- package/dist/components/detail/DetailLayout.styles.cjs.map +1 -0
- package/dist/components/detail/DetailLayout.styles.d.ts +26 -0
- package/dist/components/detail/DetailLayout.styles.d.ts.map +1 -0
- package/dist/components/detail/DetailLayout.styles.js +74 -0
- package/dist/components/detail/DetailLayout.styles.js.map +1 -0
- package/dist/components/detail/index.cjs +45 -0
- package/dist/components/detail/index.cjs.map +1 -0
- package/dist/components/detail/index.d.ts +2 -0
- package/dist/components/detail/index.d.ts.map +1 -0
- package/dist/components/detail/index.js +23 -0
- package/dist/components/detail/index.js.map +1 -0
- package/dist/components/flowbite/card-images.cjs +104 -0
- package/dist/components/flowbite/card-images.cjs.map +1 -0
- package/dist/components/flowbite/card-images.d.ts +3 -0
- package/dist/components/flowbite/card-images.d.ts.map +1 -0
- package/dist/components/flowbite/card-images.js +84 -0
- package/dist/components/flowbite/card-images.js.map +1 -0
- package/dist/components/flowbite/gallery.cjs +53 -0
- package/dist/components/flowbite/gallery.cjs.map +1 -0
- package/dist/components/flowbite/gallery.d.ts +4 -0
- package/dist/components/flowbite/gallery.d.ts.map +1 -0
- package/dist/components/flowbite/gallery.js +23 -0
- package/dist/components/flowbite/gallery.js.map +1 -0
- package/dist/components/flowbite/masonry.cjs +73 -0
- package/dist/components/flowbite/masonry.cjs.map +1 -0
- package/dist/components/flowbite/masonry.d.ts +13 -0
- package/dist/components/flowbite/masonry.d.ts.map +1 -0
- package/dist/components/flowbite/masonry.js +43 -0
- package/dist/components/flowbite/masonry.js.map +1 -0
- package/dist/components/flowbite/search-hero.cjs +109 -0
- package/dist/components/flowbite/search-hero.cjs.map +1 -0
- package/dist/components/flowbite/search-hero.d.ts +6 -0
- package/dist/components/flowbite/search-hero.d.ts.map +1 -0
- package/dist/components/flowbite/search-hero.js +89 -0
- package/dist/components/flowbite/search-hero.js.map +1 -0
- package/dist/components/generic/copyright.cjs +32 -0
- package/dist/components/generic/copyright.cjs.map +1 -0
- package/dist/components/generic/copyright.d.ts +4 -0
- package/dist/components/generic/copyright.d.ts.map +1 -0
- package/dist/components/generic/copyright.js +8 -0
- package/dist/components/generic/copyright.js.map +1 -0
- package/dist/components/generic/icons.cjs +186 -0
- package/dist/components/generic/icons.cjs.map +1 -0
- package/dist/components/generic/icons.d.ts +19 -0
- package/dist/components/generic/icons.d.ts.map +1 -0
- package/dist/components/generic/icons.js +164 -0
- package/dist/components/generic/icons.js.map +1 -0
- package/dist/components/generic/link.cjs +76 -0
- package/dist/components/generic/link.cjs.map +1 -0
- package/dist/components/generic/link.d.ts +8 -0
- package/dist/components/generic/link.d.ts.map +1 -0
- package/dist/components/generic/link.js +54 -0
- package/dist/components/generic/link.js.map +1 -0
- package/dist/components/header/header.cjs +130 -0
- package/dist/components/header/header.cjs.map +1 -0
- package/dist/components/header/header.d.ts +14 -0
- package/dist/components/header/header.d.ts.map +1 -0
- package/dist/components/header/header.js +106 -0
- package/dist/components/header/header.js.map +1 -0
- package/dist/components/header/internal/main-nav.cjs +67 -0
- package/dist/components/header/internal/main-nav.cjs.map +1 -0
- package/dist/components/header/internal/main-nav.d.ts +6 -0
- package/dist/components/header/internal/main-nav.d.ts.map +1 -0
- package/dist/components/header/internal/main-nav.js +33 -0
- package/dist/components/header/internal/main-nav.js.map +1 -0
- package/dist/components/header/internal/mobile-nav.cjs +210 -0
- package/dist/components/header/internal/mobile-nav.cjs.map +1 -0
- package/dist/components/header/internal/mobile-nav.d.ts +18 -0
- package/dist/components/header/internal/mobile-nav.d.ts.map +1 -0
- package/dist/components/header/internal/mobile-nav.js +178 -0
- package/dist/components/header/internal/mobile-nav.js.map +1 -0
- package/dist/components/header/internal/mode-toggle.cjs +73 -0
- package/dist/components/header/internal/mode-toggle.cjs.map +1 -0
- package/dist/components/header/internal/mode-toggle.d.ts +8 -0
- package/dist/components/header/internal/mode-toggle.d.ts.map +1 -0
- package/dist/components/header/internal/mode-toggle.js +54 -0
- package/dist/components/header/internal/mode-toggle.js.map +1 -0
- package/dist/components/header/internal/site-header.cjs +64 -0
- package/dist/components/header/internal/site-header.cjs.map +1 -0
- package/dist/components/header/internal/site-header.d.ts +17 -0
- package/dist/components/header/internal/site-header.d.ts.map +1 -0
- package/dist/components/header/internal/site-header.js +40 -0
- package/dist/components/header/internal/site-header.js.map +1 -0
- package/dist/components/header/langbutton/langbutton.cjs +54 -0
- package/dist/components/header/langbutton/langbutton.cjs.map +1 -0
- package/dist/components/header/langbutton/langbutton.d.ts +5 -0
- package/dist/components/header/langbutton/langbutton.d.ts.map +1 -0
- package/dist/components/header/langbutton/langbutton.js +35 -0
- package/dist/components/header/langbutton/langbutton.js.map +1 -0
- package/dist/components/header/userbutton/user-dropdown.cjs +72 -0
- package/dist/components/header/userbutton/user-dropdown.cjs.map +1 -0
- package/dist/components/header/userbutton/user-dropdown.d.ts +11 -0
- package/dist/components/header/userbutton/user-dropdown.d.ts.map +1 -0
- package/dist/components/header/userbutton/user-dropdown.js +64 -0
- package/dist/components/header/userbutton/user-dropdown.js.map +1 -0
- package/dist/components/header/userbutton/userbutton.cjs +50 -0
- package/dist/components/header/userbutton/userbutton.cjs.map +1 -0
- package/dist/components/header/userbutton/userbutton.d.ts +10 -0
- package/dist/components/header/userbutton/userbutton.d.ts.map +1 -0
- package/dist/components/header/userbutton/userbutton.js +16 -0
- package/dist/components/header/userbutton/userbutton.js.map +1 -0
- package/dist/components/hooks/use-page-nav.cjs +89 -0
- package/dist/components/hooks/use-page-nav.cjs.map +1 -0
- package/dist/components/hooks/use-page-nav.d.ts +5 -0
- package/dist/components/hooks/use-page-nav.d.ts.map +1 -0
- package/dist/components/hooks/use-page-nav.js +61 -0
- package/dist/components/hooks/use-page-nav.js.map +1 -0
- package/dist/components/hooks/use-user-entities.cjs +30 -0
- package/dist/components/hooks/use-user-entities.cjs.map +1 -0
- package/dist/components/hooks/use-user-entities.d.ts +2 -0
- package/dist/components/hooks/use-user-entities.d.ts.map +1 -0
- package/dist/components/hooks/use-user-entities.js +6 -0
- package/dist/components/hooks/use-user-entities.js.map +1 -0
- package/dist/components/icons/apple.cjs +47 -0
- package/dist/components/icons/apple.cjs.map +1 -0
- package/dist/components/icons/apple.d.ts +2 -0
- package/dist/components/icons/apple.d.ts.map +1 -0
- package/dist/components/icons/apple.js +23 -0
- package/dist/components/icons/apple.js.map +1 -0
- package/dist/components/icons/facebook.cjs +49 -0
- package/dist/components/icons/facebook.cjs.map +1 -0
- package/dist/components/icons/facebook.d.ts +2 -0
- package/dist/components/icons/facebook.d.ts.map +1 -0
- package/dist/components/icons/facebook.js +25 -0
- package/dist/components/icons/facebook.js.map +1 -0
- package/dist/components/icons/github.cjs +49 -0
- package/dist/components/icons/github.cjs.map +1 -0
- package/dist/components/icons/github.d.ts +2 -0
- package/dist/components/icons/github.d.ts.map +1 -0
- package/dist/components/icons/github.js +25 -0
- package/dist/components/icons/github.js.map +1 -0
- package/dist/components/icons/google.cjs +49 -0
- package/dist/components/icons/google.cjs.map +1 -0
- package/dist/components/icons/google.d.ts +2 -0
- package/dist/components/icons/google.d.ts.map +1 -0
- package/dist/components/icons/google.js +25 -0
- package/dist/components/icons/google.js.map +1 -0
- package/dist/components/icons/logo.cjs +49 -0
- package/dist/components/icons/logo.cjs.map +1 -0
- package/dist/components/icons/logo.d.ts +4 -0
- package/dist/components/icons/logo.d.ts.map +1 -0
- package/dist/components/icons/logo.js +25 -0
- package/dist/components/icons/logo.js.map +1 -0
- package/dist/components/lightbox/GallerySection.cjs +53 -0
- package/dist/components/lightbox/GallerySection.cjs.map +1 -0
- package/dist/components/lightbox/GallerySection.d.ts +12 -0
- package/dist/components/lightbox/GallerySection.d.ts.map +1 -0
- package/dist/components/lightbox/GallerySection.js +29 -0
- package/dist/components/lightbox/GallerySection.js.map +1 -0
- package/dist/components/lightbox/ImageLightbox.cjs +244 -0
- package/dist/components/lightbox/ImageLightbox.cjs.map +1 -0
- package/dist/components/lightbox/ImageLightbox.d.ts +3 -0
- package/dist/components/lightbox/ImageLightbox.d.ts.map +1 -0
- package/dist/components/lightbox/ImageLightbox.js +220 -0
- package/dist/components/lightbox/ImageLightbox.js.map +1 -0
- package/dist/components/lightbox/ImageLightbox.types.cjs +17 -0
- package/dist/components/lightbox/ImageLightbox.types.cjs.map +1 -0
- package/dist/components/lightbox/ImageLightbox.types.d.ts +28 -0
- package/dist/components/lightbox/ImageLightbox.types.d.ts.map +1 -0
- package/dist/components/lightbox/ImageLightbox.types.js +1 -0
- package/dist/components/lightbox/ImageLightbox.types.js.map +1 -0
- package/dist/components/lightbox/index.cjs +38 -0
- package/dist/components/lightbox/index.cjs.map +1 -0
- package/dist/components/lightbox/index.d.ts +8 -0
- package/dist/components/lightbox/index.d.ts.map +1 -0
- package/dist/components/lightbox/index.js +11 -0
- package/dist/components/lightbox/index.js.map +1 -0
- package/dist/components/lightbox/useEntityLightbox.cjs +57 -0
- package/dist/components/lightbox/useEntityLightbox.cjs.map +1 -0
- package/dist/components/lightbox/useEntityLightbox.d.ts +25 -0
- package/dist/components/lightbox/useEntityLightbox.d.ts.map +1 -0
- package/dist/components/lightbox/useEntityLightbox.js +33 -0
- package/dist/components/lightbox/useEntityLightbox.js.map +1 -0
- package/dist/components/lightbox/useLightbox.cjs +59 -0
- package/dist/components/lightbox/useLightbox.cjs.map +1 -0
- package/dist/components/lightbox/useLightbox.d.ts +9 -0
- package/dist/components/lightbox/useLightbox.d.ts.map +1 -0
- package/dist/components/lightbox/useLightbox.js +35 -0
- package/dist/components/lightbox/useLightbox.js.map +1 -0
- package/dist/components/search/search.cjs +71 -0
- package/dist/components/search/search.cjs.map +1 -0
- package/dist/components/search/search.d.ts +2 -0
- package/dist/components/search/search.d.ts.map +1 -0
- package/dist/components/search/search.js +63 -0
- package/dist/components/search/search.js.map +1 -0
- package/dist/components/tailwind/contact.cjs +380 -0
- package/dist/components/tailwind/contact.cjs.map +1 -0
- package/dist/components/tailwind/contact.d.ts +2 -0
- package/dist/components/tailwind/contact.d.ts.map +1 -0
- package/dist/components/tailwind/contact.js +356 -0
- package/dist/components/tailwind/contact.js.map +1 -0
- package/dist/components/tailwind/content-page.cjs +58 -0
- package/dist/components/tailwind/content-page.cjs.map +1 -0
- package/dist/components/tailwind/content-page.d.ts +18 -0
- package/dist/components/tailwind/content-page.d.ts.map +1 -0
- package/dist/components/tailwind/content-page.js +32 -0
- package/dist/components/tailwind/content-page.js.map +1 -0
- package/dist/components/tailwind/feature.cjs +95 -0
- package/dist/components/tailwind/feature.cjs.map +1 -0
- package/dist/components/tailwind/feature.d.ts +2 -0
- package/dist/components/tailwind/feature.d.ts.map +1 -0
- package/dist/components/tailwind/feature.js +75 -0
- package/dist/components/tailwind/feature.js.map +1 -0
- package/dist/components/tailwind/featurelist.cjs +99 -0
- package/dist/components/tailwind/featurelist.cjs.map +1 -0
- package/dist/components/tailwind/featurelist.d.ts +2 -0
- package/dist/components/tailwind/featurelist.d.ts.map +1 -0
- package/dist/components/tailwind/featurelist.js +65 -0
- package/dist/components/tailwind/featurelist.js.map +1 -0
- package/dist/components/tailwind/footer.cjs +104 -0
- package/dist/components/tailwind/footer.cjs.map +1 -0
- package/dist/components/tailwind/footer.d.ts +2 -0
- package/dist/components/tailwind/footer.d.ts.map +1 -0
- package/dist/components/tailwind/footer.js +80 -0
- package/dist/components/tailwind/footer.js.map +1 -0
- package/dist/components/tailwind/hero.cjs +130 -0
- package/dist/components/tailwind/hero.cjs.map +1 -0
- package/dist/components/tailwind/hero.d.ts +22 -0
- package/dist/components/tailwind/hero.d.ts.map +1 -0
- package/dist/components/tailwind/hero.js +106 -0
- package/dist/components/tailwind/hero.js.map +1 -0
- package/dist/components/tailwind/pricing.cjs +214 -0
- package/dist/components/tailwind/pricing.cjs.map +1 -0
- package/dist/components/tailwind/pricing.d.ts +6 -0
- package/dist/components/tailwind/pricing.d.ts.map +1 -0
- package/dist/components/tailwind/pricing.js +190 -0
- package/dist/components/tailwind/pricing.js.map +1 -0
- package/dist/components/tailwind/privacy.cjs +138 -0
- package/dist/components/tailwind/privacy.cjs.map +1 -0
- package/dist/components/tailwind/privacy.d.ts +2 -0
- package/dist/components/tailwind/privacy.d.ts.map +1 -0
- package/dist/components/tailwind/privacy.js +114 -0
- package/dist/components/tailwind/privacy.js.map +1 -0
- package/dist/components/tailwind/providerIcons.cjs +48 -0
- package/dist/components/tailwind/providerIcons.cjs.map +1 -0
- package/dist/components/tailwind/providerIcons.d.ts +4 -0
- package/dist/components/tailwind/providerIcons.d.ts.map +1 -0
- package/dist/components/tailwind/providerIcons.js +24 -0
- package/dist/components/tailwind/providerIcons.js.map +1 -0
- package/dist/components/ui/avatar.cjs +120 -0
- package/dist/components/ui/avatar.cjs.map +1 -0
- package/dist/components/ui/avatar.d.ts +7 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +86 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/breadcrumb.cjs +63 -0
- package/dist/components/ui/breadcrumb.cjs.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +29 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button.cjs +105 -0
- package/dist/components/ui/button.cjs.map +1 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +82 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/card.cjs +129 -0
- package/dist/components/ui/card.cjs.map +1 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +102 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/checkbox.cjs +98 -0
- package/dist/components/ui/checkbox.cjs.map +1 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +66 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/command.cjs +200 -0
- package/dist/components/ui/command.cjs.map +1 -0
- package/dist/components/ui/command.d.ts +83 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +160 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/dialog.cjs +204 -0
- package/dist/components/ui/dialog.cjs.map +1 -0
- package/dist/components/ui/dialog.d.ts +14 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +163 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/drawer.cjs +191 -0
- package/dist/components/ui/drawer.cjs.map +1 -0
- package/dist/components/ui/drawer.d.ts +14 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +160 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.cjs +323 -0
- package/dist/components/ui/dropdown-menu.cjs.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +26 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +277 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/input.cjs +72 -0
- package/dist/components/ui/input.cjs.map +1 -0
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +50 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/label.cjs +85 -0
- package/dist/components/ui/label.cjs.map +1 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +53 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/menubar.cjs +351 -0
- package/dist/components/ui/menubar.cjs.map +1 -0
- package/dist/components/ui/menubar.d.ts +27 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +304 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/navigation-menu.cjs +257 -0
- package/dist/components/ui/navigation-menu.cjs.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +15 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +217 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/popover.cjs +109 -0
- package/dist/components/ui/popover.cjs.map +1 -0
- package/dist/components/ui/popover.d.ts +8 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +74 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/resizable.cjs +124 -0
- package/dist/components/ui/resizable.cjs.map +1 -0
- package/dist/components/ui/resizable.d.ts +26 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +90 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.cjs +132 -0
- package/dist/components/ui/scroll-area.cjs.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +99 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.cjs +254 -0
- package/dist/components/ui/select.cjs.map +1 -0
- package/dist/components/ui/select.d.ts +14 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +213 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/sheet.cjs +203 -0
- package/dist/components/ui/sheet.cjs.map +1 -0
- package/dist/components/ui/sheet.d.ts +14 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +164 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/skeleton.cjs +66 -0
- package/dist/components/ui/skeleton.cjs.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +44 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/spinner.cjs +128 -0
- package/dist/components/ui/spinner.cjs.map +1 -0
- package/dist/components/ui/spinner.d.ts +12 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +105 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.cjs +98 -0
- package/dist/components/ui/switch.cjs.map +1 -0
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +66 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/tabs.cjs +136 -0
- package/dist/components/ui/tabs.cjs.map +1 -0
- package/dist/components/ui/tabs.d.ts +8 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +101 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.cjs +69 -0
- package/dist/components/ui/textarea.cjs.map +1 -0
- package/dist/components/ui/textarea.d.ts +4 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +47 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toast.cjs +169 -0
- package/dist/components/ui/toast.cjs.map +1 -0
- package/dist/components/ui/toast.d.ts +15 -0
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/toast.js +131 -0
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/toaster.cjs +78 -0
- package/dist/components/ui/toaster.cjs.map +1 -0
- package/dist/components/ui/toaster.d.ts +2 -0
- package/dist/components/ui/toaster.d.ts.map +1 -0
- package/dist/components/ui/toaster.js +63 -0
- package/dist/components/ui/toaster.js.map +1 -0
- package/dist/components/ui/tooltip.cjs +126 -0
- package/dist/components/ui/tooltip.cjs.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +91 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/use-toast.cjs +187 -0
- package/dist/components/ui/use-toast.cjs.map +1 -0
- package/dist/components/ui/use-toast.d.ts +45 -0
- package/dist/components/ui/use-toast.d.ts.map +1 -0
- package/dist/components/ui/use-toast.js +153 -0
- package/dist/components/ui/use-toast.js.map +1 -0
- package/dist/components/upgrade-prompt/UpgradePrompt.cjs +80 -0
- package/dist/components/upgrade-prompt/UpgradePrompt.cjs.map +1 -0
- package/dist/components/upgrade-prompt/UpgradePrompt.d.ts +12 -0
- package/dist/components/upgrade-prompt/UpgradePrompt.d.ts.map +1 -0
- package/dist/components/upgrade-prompt/UpgradePrompt.js +46 -0
- package/dist/components/upgrade-prompt/UpgradePrompt.js.map +1 -0
- package/dist/components/upgrade-prompt/index.cjs +29 -0
- package/dist/components/upgrade-prompt/index.cjs.map +1 -0
- package/dist/components/upgrade-prompt/index.d.ts +3 -0
- package/dist/components/upgrade-prompt/index.d.ts.map +1 -0
- package/dist/components/upgrade-prompt/index.js +5 -0
- package/dist/components/upgrade-prompt/index.js.map +1 -0
- package/dist/hooks/useRecaptcha.cjs +91 -0
- package/dist/hooks/useRecaptcha.cjs.map +1 -0
- package/dist/hooks/useRecaptcha.d.ts +16 -0
- package/dist/hooks/useRecaptcha.d.ts.map +1 -0
- package/dist/hooks/useRecaptcha.js +67 -0
- package/dist/hooks/useRecaptcha.js.map +1 -0
- package/dist/lib/utils.cjs +48 -0
- package/dist/lib/utils.cjs.map +1 -0
- package/dist/lib/utils.d.cjs +17 -0
- package/dist/lib/utils.d.cjs.map +1 -0
- package/dist/lib/utils.d.js +1 -0
- package/dist/lib/utils.d.js.map +1 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +22 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/styles.css +2 -0
- package/dist/types/nav.cjs +17 -0
- package/dist/types/nav.cjs.map +1 -0
- package/dist/types/nav.d.ts +17 -0
- package/dist/types/nav.d.ts.map +1 -0
- package/dist/types/nav.js +1 -0
- package/dist/types/nav.js.map +1 -0
- package/dist/types/sitemap.cjs +17 -0
- package/dist/types/sitemap.cjs.map +1 -0
- package/dist/types/sitemap.d.ts +19 -0
- package/dist/types/sitemap.d.ts.map +1 -0
- package/dist/types/sitemap.js +1 -0
- package/dist/types/sitemap.js.map +1 -0
- package/dist/types/unist.cjs +17 -0
- package/dist/types/unist.cjs.map +1 -0
- package/dist/types/unist.js +1 -0
- package/dist/types/unist.js.map +1 -0
- package/package.json +121 -0
- package/styles/theme.css +52 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var site_header_exports = {};
|
|
20
|
+
__export(site_header_exports, {
|
|
21
|
+
SiteHeader: () => SiteHeader
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(site_header_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_command = require("../../ui/command");
|
|
26
|
+
var import_main_nav = require("./main-nav");
|
|
27
|
+
var import_mode_toggle = require("./mode-toggle");
|
|
28
|
+
var import_userbutton = require("../userbutton/userbutton");
|
|
29
|
+
var import_langbutton = require("../langbutton/langbutton");
|
|
30
|
+
function SiteHeader({
|
|
31
|
+
user,
|
|
32
|
+
signOut,
|
|
33
|
+
cookies,
|
|
34
|
+
theme,
|
|
35
|
+
resolvedTheme,
|
|
36
|
+
setTheme,
|
|
37
|
+
sitemap,
|
|
38
|
+
siteName
|
|
39
|
+
}) {
|
|
40
|
+
var _a;
|
|
41
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("header", { className: "border-border/40 bg-background/95 supports-backdrop-filter:bg-background/60 backdrop-blur-xs top-0 z-50 w-full border-b", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "max-w-(--breakpoint-2xl) container mx-auto flex h-14 items-center px-2 py-2", children: [
|
|
42
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_main_nav.MainNav, { userId: (_a = user == null ? void 0 : user.username) != null ? _a : user == null ? void 0 : user.id, sitemap, siteName }),
|
|
43
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-1 items-center justify-between space-x-2 md:justify-end", children: [
|
|
44
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full flex-1 md:w-auto md:flex-none", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_command.Command, {}) }),
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("nav", { className: "flex items-center gap-3", children: [
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_langbutton.LangButton, { cookies }),
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
48
|
+
import_mode_toggle.ModeToggle,
|
|
49
|
+
{
|
|
50
|
+
theme,
|
|
51
|
+
resolvedTheme,
|
|
52
|
+
setTheme
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_userbutton.UserButton, { signOut, user })
|
|
56
|
+
] })
|
|
57
|
+
] })
|
|
58
|
+
] }) });
|
|
59
|
+
}
|
|
60
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
61
|
+
0 && (module.exports = {
|
|
62
|
+
SiteHeader
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=site-header.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../components/header/internal/site-header.tsx"],"sourcesContent":["import { Command } from '../../ui/command'\nimport { MainNav } from './main-nav'\n// import { MobileNav } from './mobile-nav'\nimport { ModeToggle } from './mode-toggle'\nimport { UserButton } from '../userbutton/userbutton'\nimport { LangButton } from '../langbutton/langbutton'\nimport { User } from '@auth/core/types'\n\ntype UserWithUsername = User & { username?: string | null }\nimport type { Cookies } from 'next-client-cookies'\n\nexport function SiteHeader({\n user,\n signOut,\n cookies,\n theme,\n resolvedTheme,\n setTheme,\n sitemap,\n siteName,\n}: {\n user: UserWithUsername | undefined\n signOut: () => Promise<void>\n cookies: Cookies\n theme: string | undefined\n resolvedTheme: string | undefined\n setTheme: (theme: string) => void\n sitemap?: any\n siteName?: string\n}) {\n return (\n <header className=\"border-border/40 bg-background/95 supports-backdrop-filter:bg-background/60 backdrop-blur-xs top-0 z-50 w-full border-b\">\n <div className=\"max-w-(--breakpoint-2xl) container mx-auto flex h-14 items-center px-2 py-2\">\n <MainNav userId={user?.username ?? user?.id} sitemap={sitemap} siteName={siteName} />\n {/* <MobileNav /> */}\n <div className=\"flex flex-1 items-center justify-between space-x-2 md:justify-end\">\n <div className=\"w-full flex-1 md:w-auto md:flex-none\">\n <Command />\n </div>\n <nav className=\"flex items-center gap-3\">\n <LangButton cookies={cookies} />\n <ModeToggle\n theme={theme}\n resolvedTheme={resolvedTheme}\n setTheme={setTheme}\n />\n <UserButton signOut={signOut} user={user} />\n </nav>\n </div>\n </div>\n </header>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiCQ;AAjCR,qBAAwB;AACxB,sBAAwB;AAExB,yBAA2B;AAC3B,wBAA2B;AAC3B,wBAA2B;AAMpB,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GASG;AA7BH;AA8BE,SACE,4CAAC,YAAO,WAAU,2HAChB,uDAAC,SAAI,WAAU,+EACb;AAAA,gDAAC,2BAAQ,SAAQ,kCAAM,aAAN,YAAkB,6BAAM,IAAI,SAAkB,UAAoB;AAAA,IAEnF,6CAAC,SAAI,WAAU,qEACb;AAAA,kDAAC,SAAI,WAAU,wCACb,sDAAC,0BAAQ,GACX;AAAA,MACA,6CAAC,SAAI,WAAU,2BACb;AAAA,oDAAC,gCAAW,SAAkB;AAAA,QAC9B;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA,QACA,4CAAC,gCAAW,SAAkB,MAAY;AAAA,SAC5C;AAAA,OACF;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { User } from '@auth/core/types';
|
|
2
|
+
type UserWithUsername = User & {
|
|
3
|
+
username?: string | null;
|
|
4
|
+
};
|
|
5
|
+
import type { Cookies } from 'next-client-cookies';
|
|
6
|
+
export declare function SiteHeader({ user, signOut, cookies, theme, resolvedTheme, setTheme, sitemap, siteName, }: {
|
|
7
|
+
user: UserWithUsername | undefined;
|
|
8
|
+
signOut: () => Promise<void>;
|
|
9
|
+
cookies: Cookies;
|
|
10
|
+
theme: string | undefined;
|
|
11
|
+
resolvedTheme: string | undefined;
|
|
12
|
+
setTheme: (theme: string) => void;
|
|
13
|
+
sitemap?: any;
|
|
14
|
+
siteName?: string;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=site-header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site-header.d.ts","sourceRoot":"","sources":["../../../../components/header/internal/site-header.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEvC,KAAK,gBAAgB,GAAG,IAAI,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAA;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,OAAO,EACP,OAAO,EACP,KAAK,EACL,aAAa,EACb,QAAQ,EACR,OAAO,EACP,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,gBAAgB,GAAG,SAAS,CAAA;IAClC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,OAAO,CAAC,EAAE,GAAG,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,+BAuBA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Command } from "../../ui/command";
|
|
3
|
+
import { MainNav } from "./main-nav";
|
|
4
|
+
import { ModeToggle } from "./mode-toggle";
|
|
5
|
+
import { UserButton } from "../userbutton/userbutton";
|
|
6
|
+
import { LangButton } from "../langbutton/langbutton";
|
|
7
|
+
function SiteHeader({
|
|
8
|
+
user,
|
|
9
|
+
signOut,
|
|
10
|
+
cookies,
|
|
11
|
+
theme,
|
|
12
|
+
resolvedTheme,
|
|
13
|
+
setTheme,
|
|
14
|
+
sitemap,
|
|
15
|
+
siteName
|
|
16
|
+
}) {
|
|
17
|
+
var _a;
|
|
18
|
+
return /* @__PURE__ */ jsx("header", { className: "border-border/40 bg-background/95 supports-backdrop-filter:bg-background/60 backdrop-blur-xs top-0 z-50 w-full border-b", children: /* @__PURE__ */ jsxs("div", { className: "max-w-(--breakpoint-2xl) container mx-auto flex h-14 items-center px-2 py-2", children: [
|
|
19
|
+
/* @__PURE__ */ jsx(MainNav, { userId: (_a = user == null ? void 0 : user.username) != null ? _a : user == null ? void 0 : user.id, sitemap, siteName }),
|
|
20
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-1 items-center justify-between space-x-2 md:justify-end", children: [
|
|
21
|
+
/* @__PURE__ */ jsx("div", { className: "w-full flex-1 md:w-auto md:flex-none", children: /* @__PURE__ */ jsx(Command, {}) }),
|
|
22
|
+
/* @__PURE__ */ jsxs("nav", { className: "flex items-center gap-3", children: [
|
|
23
|
+
/* @__PURE__ */ jsx(LangButton, { cookies }),
|
|
24
|
+
/* @__PURE__ */ jsx(
|
|
25
|
+
ModeToggle,
|
|
26
|
+
{
|
|
27
|
+
theme,
|
|
28
|
+
resolvedTheme,
|
|
29
|
+
setTheme
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ jsx(UserButton, { signOut, user })
|
|
33
|
+
] })
|
|
34
|
+
] })
|
|
35
|
+
] }) });
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
SiteHeader
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=site-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../components/header/internal/site-header.tsx"],"sourcesContent":["import { Command } from '../../ui/command'\nimport { MainNav } from './main-nav'\n// import { MobileNav } from './mobile-nav'\nimport { ModeToggle } from './mode-toggle'\nimport { UserButton } from '../userbutton/userbutton'\nimport { LangButton } from '../langbutton/langbutton'\nimport { User } from '@auth/core/types'\n\ntype UserWithUsername = User & { username?: string | null }\nimport type { Cookies } from 'next-client-cookies'\n\nexport function SiteHeader({\n user,\n signOut,\n cookies,\n theme,\n resolvedTheme,\n setTheme,\n sitemap,\n siteName,\n}: {\n user: UserWithUsername | undefined\n signOut: () => Promise<void>\n cookies: Cookies\n theme: string | undefined\n resolvedTheme: string | undefined\n setTheme: (theme: string) => void\n sitemap?: any\n siteName?: string\n}) {\n return (\n <header className=\"border-border/40 bg-background/95 supports-backdrop-filter:bg-background/60 backdrop-blur-xs top-0 z-50 w-full border-b\">\n <div className=\"max-w-(--breakpoint-2xl) container mx-auto flex h-14 items-center px-2 py-2\">\n <MainNav userId={user?.username ?? user?.id} sitemap={sitemap} siteName={siteName} />\n {/* <MobileNav /> */}\n <div className=\"flex flex-1 items-center justify-between space-x-2 md:justify-end\">\n <div className=\"w-full flex-1 md:w-auto md:flex-none\">\n <Command />\n </div>\n <nav className=\"flex items-center gap-3\">\n <LangButton cookies={cookies} />\n <ModeToggle\n theme={theme}\n resolvedTheme={resolvedTheme}\n setTheme={setTheme}\n />\n <UserButton signOut={signOut} user={user} />\n </nav>\n </div>\n </div>\n </header>\n )\n}\n"],"mappings":"AAiCQ,cAME,YANF;AAjCR,SAAS,eAAe;AACxB,SAAS,eAAe;AAExB,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAMpB,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GASG;AA7BH;AA8BE,SACE,oBAAC,YAAO,WAAU,2HAChB,+BAAC,SAAI,WAAU,+EACb;AAAA,wBAAC,WAAQ,SAAQ,kCAAM,aAAN,YAAkB,6BAAM,IAAI,SAAkB,UAAoB;AAAA,IAEnF,qBAAC,SAAI,WAAU,qEACb;AAAA,0BAAC,SAAI,WAAU,wCACb,8BAAC,WAAQ,GACX;AAAA,MACA,qBAAC,SAAI,WAAU,2BACb;AAAA,4BAAC,cAAW,SAAkB;AAAA,QAC9B;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA,QACA,oBAAC,cAAW,SAAkB,MAAY;AAAA,SAC5C;AAAA,OACF;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var langbutton_exports = {};
|
|
21
|
+
__export(langbutton_exports, {
|
|
22
|
+
LangButton: () => LangButton
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(langbutton_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_dropdown_menu = require("../../ui/dropdown-menu");
|
|
27
|
+
var import_button = require("../../ui/button");
|
|
28
|
+
var import_solid = require("@heroicons/react/20/solid");
|
|
29
|
+
const locales = ["en", "de"];
|
|
30
|
+
function LangButton({ cookies }) {
|
|
31
|
+
const handleLocaleChange = (locale) => {
|
|
32
|
+
cookies.set("NEXT_LOCALE", locale);
|
|
33
|
+
window.location.reload();
|
|
34
|
+
};
|
|
35
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown_menu.DropdownMenu, { children: [
|
|
36
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_button.Button, { variant: "ghost", size: "icon", className: "h-9 w-9", children: [
|
|
37
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_solid.LanguageIcon, { className: "h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all" }),
|
|
38
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Toggle language" })
|
|
39
|
+
] }) }),
|
|
40
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuContent, { align: "end", children: locales.map((locale) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
41
|
+
import_dropdown_menu.DropdownMenuItem,
|
|
42
|
+
{
|
|
43
|
+
onClick: () => handleLocaleChange(locale),
|
|
44
|
+
children: locale
|
|
45
|
+
},
|
|
46
|
+
locale
|
|
47
|
+
)) })
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
+
0 && (module.exports = {
|
|
52
|
+
LangButton
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=langbutton.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../components/header/langbutton/langbutton.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\n\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from '../../ui/dropdown-menu'\nimport { Button } from '../../ui/button'\nimport { LanguageIcon } from '@heroicons/react/20/solid'\nconst locales = ['en', 'de']\n\nexport function LangButton({ cookies }: { cookies: any }) {\n const handleLocaleChange = (locale: string) => {\n cookies.set('NEXT_LOCALE', locale)\n window.location.reload()\n }\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" size=\"icon\" className=\"h-9 w-9\">\n <LanguageIcon className=\"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all\" />\n <span className=\"sr-only\">Toggle language</span>\n </Button>\n </DropdownMenuTrigger>\n\n <DropdownMenuContent align=\"end\">\n {locales.map((locale) => (\n <DropdownMenuItem\n key={locale}\n onClick={() => handleLocaleChange(locale)}\n >\n {locale}\n </DropdownMenuItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAuBQ;AAnBR,2BAKO;AACP,oBAAuB;AACvB,mBAA6B;AAC7B,MAAM,UAAU,CAAC,MAAM,IAAI;AAEpB,SAAS,WAAW,EAAE,QAAQ,GAAqB;AACxD,QAAM,qBAAqB,CAAC,WAAmB;AAC7C,YAAQ,IAAI,eAAe,MAAM;AACjC,WAAO,SAAS,OAAO;AAAA,EACzB;AAEA,SACE,6CAAC,qCACC;AAAA,gDAAC,4CAAoB,SAAO,MAC1B,uDAAC,wBAAO,SAAQ,SAAQ,MAAK,QAAO,WAAU,WAC5C;AAAA,kDAAC,6BAAa,WAAU,2DAA0D;AAAA,MAClF,4CAAC,UAAK,WAAU,WAAU,6BAAe;AAAA,OAC3C,GACF;AAAA,IAEA,4CAAC,4CAAoB,OAAM,OACxB,kBAAQ,IAAI,CAAC,WACZ;AAAA,MAAC;AAAA;AAAA,QAEC,SAAS,MAAM,mBAAmB,MAAM;AAAA,QAEvC;AAAA;AAAA,MAHI;AAAA,IAIP,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"langbutton.d.ts","sourceRoot":"","sources":["../../../../components/header/langbutton/langbutton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAY9B,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,qBA2BvD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import {
|
|
4
|
+
DropdownMenu,
|
|
5
|
+
DropdownMenuContent,
|
|
6
|
+
DropdownMenuItem,
|
|
7
|
+
DropdownMenuTrigger
|
|
8
|
+
} from "../../ui/dropdown-menu";
|
|
9
|
+
import { Button } from "../../ui/button";
|
|
10
|
+
import { LanguageIcon } from "@heroicons/react/20/solid";
|
|
11
|
+
const locales = ["en", "de"];
|
|
12
|
+
function LangButton({ cookies }) {
|
|
13
|
+
const handleLocaleChange = (locale) => {
|
|
14
|
+
cookies.set("NEXT_LOCALE", locale);
|
|
15
|
+
window.location.reload();
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
18
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "icon", className: "h-9 w-9", children: [
|
|
19
|
+
/* @__PURE__ */ jsx(LanguageIcon, { className: "h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all" }),
|
|
20
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle language" })
|
|
21
|
+
] }) }),
|
|
22
|
+
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", children: locales.map((locale) => /* @__PURE__ */ jsx(
|
|
23
|
+
DropdownMenuItem,
|
|
24
|
+
{
|
|
25
|
+
onClick: () => handleLocaleChange(locale),
|
|
26
|
+
children: locale
|
|
27
|
+
},
|
|
28
|
+
locale
|
|
29
|
+
)) })
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
LangButton
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=langbutton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../components/header/langbutton/langbutton.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\n\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from '../../ui/dropdown-menu'\nimport { Button } from '../../ui/button'\nimport { LanguageIcon } from '@heroicons/react/20/solid'\nconst locales = ['en', 'de']\n\nexport function LangButton({ cookies }: { cookies: any }) {\n const handleLocaleChange = (locale: string) => {\n cookies.set('NEXT_LOCALE', locale)\n window.location.reload()\n }\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" size=\"icon\" className=\"h-9 w-9\">\n <LanguageIcon className=\"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all\" />\n <span className=\"sr-only\">Toggle language</span>\n </Button>\n </DropdownMenuTrigger>\n\n <DropdownMenuContent align=\"end\">\n {locales.map((locale) => (\n <DropdownMenuItem\n key={locale}\n onClick={() => handleLocaleChange(locale)}\n >\n {locale}\n </DropdownMenuItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n"],"mappings":";AAuBQ,SACE,KADF;AAnBR;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAC7B,MAAM,UAAU,CAAC,MAAM,IAAI;AAEpB,SAAS,WAAW,EAAE,QAAQ,GAAqB;AACxD,QAAM,qBAAqB,CAAC,WAAmB;AAC7C,YAAQ,IAAI,eAAe,MAAM;AACjC,WAAO,SAAS,OAAO;AAAA,EACzB;AAEA,SACE,qBAAC,gBACC;AAAA,wBAAC,uBAAoB,SAAO,MAC1B,+BAAC,UAAO,SAAQ,SAAQ,MAAK,QAAO,WAAU,WAC5C;AAAA,0BAAC,gBAAa,WAAU,2DAA0D;AAAA,MAClF,oBAAC,UAAK,WAAU,WAAU,6BAAe;AAAA,OAC3C,GACF;AAAA,IAEA,oBAAC,uBAAoB,OAAM,OACxB,kBAAQ,IAAI,CAAC,WACZ;AAAA,MAAC;AAAA;AAAA,QAEC,SAAS,MAAM,mBAAmB,MAAM;AAAA,QAEvC;AAAA;AAAA,MAHI;AAAA,IAIP,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var user_dropdown_exports = {};
|
|
20
|
+
__export(user_dropdown_exports, {
|
|
21
|
+
default: () => user_dropdown_default
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(user_dropdown_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_dropdown_menu = require("../../ui/dropdown-menu");
|
|
26
|
+
var import_avatar = require("../../ui/avatar");
|
|
27
|
+
const links = ["stories", "characters", "locations", "timelines"];
|
|
28
|
+
const UserLinks = ({ user }) => {
|
|
29
|
+
const handle = (user == null ? void 0 : user.username) || (user == null ? void 0 : user.id);
|
|
30
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: links.map((link) => {
|
|
31
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: `/${handle}/${link}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuItem, { children: link }) }, "user" + link);
|
|
32
|
+
}) });
|
|
33
|
+
};
|
|
34
|
+
const CreateLinks = () => {
|
|
35
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: links.map((link) => {
|
|
36
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: `/create/${link}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuItem, { children: link }) }, "create" + link);
|
|
37
|
+
}) });
|
|
38
|
+
};
|
|
39
|
+
const UserDropdown = ({
|
|
40
|
+
user,
|
|
41
|
+
logOut
|
|
42
|
+
}) => {
|
|
43
|
+
var _a;
|
|
44
|
+
const handle = (user == null ? void 0 : user.username) || (user == null ? void 0 : user.id);
|
|
45
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown_menu.DropdownMenu, { children: [
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_avatar.Avatar, { "data-tour": "user-profile", className: "h-9 w-9 cursor-pointer", children: [
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_avatar.AvatarImage, { src: (user == null ? void 0 : user.image) || "", alt: (user == null ? void 0 : user.name) || "User" }),
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_avatar.AvatarFallback, { children: (_a = user == null ? void 0 : user.name) == null ? void 0 : _a.split("")[0] })
|
|
49
|
+
] }) }),
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown_menu.DropdownMenuContent, { className: "w-56", children: [
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuLabel, { children: user == null ? void 0 : user.name }),
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuSeparator, {}),
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: `/${handle}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuItem, { children: "Profile" }) }) }),
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuSeparator, {}),
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown_menu.DropdownMenuGroup, { children: [
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(UserLinks, { user }),
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown_menu.DropdownMenuSub, { children: [
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuSubTrigger, { children: "Create New" }),
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown_menu.DropdownMenuSubContent, { children: [
|
|
60
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CreateLinks, {}),
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuSeparator, {}),
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: `/create/`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuItem, { children: "More..." }) })
|
|
63
|
+
] }) })
|
|
64
|
+
] })
|
|
65
|
+
] }),
|
|
66
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuSeparator, {}),
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuItem, { onClick: logOut, children: "Log out" })
|
|
68
|
+
] })
|
|
69
|
+
] });
|
|
70
|
+
};
|
|
71
|
+
var user_dropdown_default = UserDropdown;
|
|
72
|
+
//# sourceMappingURL=user-dropdown.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../components/header/userbutton/user-dropdown.tsx"],"sourcesContent":["import {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuSeparator,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from '../../ui/dropdown-menu'\nimport { Avatar, AvatarFallback, AvatarImage } from '../../ui/avatar'\nconst links = ['stories', 'characters', 'locations', 'timelines']\nimport React from 'react'\nimport { User } from '@auth/core/types'\n\ntype UserWithUsername = User & { username?: string | null }\n\nconst UserLinks: ({\n user,\n}: {\n user: UserWithUsername\n}) => React.JSX.Element = ({ user }: { user: UserWithUsername }) => {\n const handle = user?.username || user?.id\n return (\n <>\n {links.map((link) => {\n return (\n <a key={'user' + link} href={`/${handle}/${link}`}>\n <DropdownMenuItem>{link}</DropdownMenuItem>\n </a>\n )\n })}\n </>\n )\n}\n\nconst CreateLinks = () => {\n return (\n <>\n {links.map((link) => {\n return (\n <a key={'create' + link} href={`/create/${link}`}>\n <DropdownMenuItem>{link}</DropdownMenuItem>\n </a>\n )\n })}\n </>\n )\n}\n\nconst UserDropdown = ({\n user,\n logOut,\n}: {\n user: UserWithUsername\n logOut: () => void\n}) => {\n const handle = user?.username || user?.id\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Avatar data-tour=\"user-profile\" className=\"h-9 w-9 cursor-pointer\">\n <AvatarImage src={user?.image || ''} alt={user?.name || 'User'} />\n <AvatarFallback>{user?.name?.split('')[0]}</AvatarFallback>\n </Avatar>\n </DropdownMenuTrigger>\n <DropdownMenuContent className=\"w-56\">\n <DropdownMenuLabel>{user?.name}</DropdownMenuLabel>\n <DropdownMenuSeparator />\n <DropdownMenuGroup>\n <a href={`/${handle}`}>\n <DropdownMenuItem>Profile</DropdownMenuItem>\n </a>\n </DropdownMenuGroup>\n <DropdownMenuSeparator />\n <DropdownMenuGroup>\n <UserLinks user={user} />\n <DropdownMenuSub>\n <DropdownMenuSubTrigger>Create New</DropdownMenuSubTrigger>\n <DropdownMenuPortal>\n <DropdownMenuSubContent>\n <CreateLinks />\n <DropdownMenuSeparator />\n <a href={`/create/`}>\n <DropdownMenuItem>More...</DropdownMenuItem>\n </a>\n </DropdownMenuSubContent>\n </DropdownMenuPortal>\n </DropdownMenuSub>\n </DropdownMenuGroup>\n <DropdownMenuSeparator />\n <DropdownMenuItem onClick={logOut}>Log out</DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n\nexport default UserDropdown\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2BI;AA3BJ,2BAYO;AACP,oBAAoD;AACpD,MAAM,QAAQ,CAAC,WAAW,cAAc,aAAa,WAAW;AAMhE,MAAM,YAIoB,CAAC,EAAE,KAAK,MAAkC;AAClE,QAAM,UAAS,6BAAM,cAAY,6BAAM;AACvC,SACE,2EACG,gBAAM,IAAI,CAAC,SAAS;AACnB,WACE,4CAAC,OAAsB,MAAM,IAAI,MAAM,IAAI,IAAI,IAC7C,sDAAC,yCAAkB,gBAAK,KADlB,SAAS,IAEjB;AAAA,EAEJ,CAAC,GACH;AAEJ;AAEA,MAAM,cAAc,MAAM;AACxB,SACE,2EACG,gBAAM,IAAI,CAAC,SAAS;AACnB,WACE,4CAAC,OAAwB,MAAM,WAAW,IAAI,IAC5C,sDAAC,yCAAkB,gBAAK,KADlB,WAAW,IAEnB;AAAA,EAEJ,CAAC,GACH;AAEJ;AAEA,MAAM,eAAe,CAAC;AAAA,EACpB;AAAA,EACA;AACF,MAGM;AA3DN;AA4DE,QAAM,UAAS,6BAAM,cAAY,6BAAM;AACvC,SACE,6CAAC,qCACC;AAAA,gDAAC,4CAAoB,SAAO,MAC1B,uDAAC,wBAAO,aAAU,gBAAe,WAAU,0BACzC;AAAA,kDAAC,6BAAY,MAAK,6BAAM,UAAS,IAAI,MAAK,6BAAM,SAAQ,QAAQ;AAAA,MAChE,4CAAC,gCAAgB,6CAAM,SAAN,mBAAY,MAAM,IAAI,IAAG;AAAA,OAC5C,GACF;AAAA,IACA,6CAAC,4CAAoB,WAAU,QAC7B;AAAA,kDAAC,0CAAmB,uCAAM,MAAK;AAAA,MAC/B,4CAAC,8CAAsB;AAAA,MACvB,4CAAC,0CACC,sDAAC,OAAE,MAAM,IAAI,MAAM,IACjB,sDAAC,yCAAiB,qBAAO,GAC3B,GACF;AAAA,MACA,4CAAC,8CAAsB;AAAA,MACvB,6CAAC,0CACC;AAAA,oDAAC,aAAU,MAAY;AAAA,QACvB,6CAAC,wCACC;AAAA,sDAAC,+CAAuB,wBAAU;AAAA,UAClC,4CAAC,2CACC,uDAAC,+CACC;AAAA,wDAAC,eAAY;AAAA,YACb,4CAAC,8CAAsB;AAAA,YACvB,4CAAC,OAAE,MAAM,YACP,sDAAC,yCAAiB,qBAAO,GAC3B;AAAA,aACF,GACF;AAAA,WACF;AAAA,SACF;AAAA,MACA,4CAAC,8CAAsB;AAAA,MACvB,4CAAC,yCAAiB,SAAS,QAAQ,qBAAO;AAAA,OAC5C;AAAA,KACF;AAEJ;AAEA,IAAO,wBAAQ;","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { User } from '@auth/core/types';
|
|
3
|
+
type UserWithUsername = User & {
|
|
4
|
+
username?: string | null;
|
|
5
|
+
};
|
|
6
|
+
declare const UserDropdown: ({ user, logOut, }: {
|
|
7
|
+
user: UserWithUsername;
|
|
8
|
+
logOut: () => void;
|
|
9
|
+
}) => React.JSX.Element;
|
|
10
|
+
export default UserDropdown;
|
|
11
|
+
//# sourceMappingURL=user-dropdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-dropdown.d.ts","sourceRoot":"","sources":["../../../../components/header/userbutton/user-dropdown.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEvC,KAAK,gBAAgB,GAAG,IAAI,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAA;AAmC3D,QAAA,MAAM,YAAY,GAAI,mBAGnB;IACD,IAAI,EAAE,gBAAgB,CAAA;IACtB,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB,sBAuCA,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import {
|
|
3
|
+
DropdownMenu,
|
|
4
|
+
DropdownMenuContent,
|
|
5
|
+
DropdownMenuGroup,
|
|
6
|
+
DropdownMenuItem,
|
|
7
|
+
DropdownMenuLabel,
|
|
8
|
+
DropdownMenuPortal,
|
|
9
|
+
DropdownMenuSeparator,
|
|
10
|
+
DropdownMenuSub,
|
|
11
|
+
DropdownMenuSubContent,
|
|
12
|
+
DropdownMenuSubTrigger,
|
|
13
|
+
DropdownMenuTrigger
|
|
14
|
+
} from "../../ui/dropdown-menu";
|
|
15
|
+
import { Avatar, AvatarFallback, AvatarImage } from "../../ui/avatar";
|
|
16
|
+
const links = ["stories", "characters", "locations", "timelines"];
|
|
17
|
+
const UserLinks = ({ user }) => {
|
|
18
|
+
const handle = (user == null ? void 0 : user.username) || (user == null ? void 0 : user.id);
|
|
19
|
+
return /* @__PURE__ */ jsx(Fragment, { children: links.map((link) => {
|
|
20
|
+
return /* @__PURE__ */ jsx("a", { href: `/${handle}/${link}`, children: /* @__PURE__ */ jsx(DropdownMenuItem, { children: link }) }, "user" + link);
|
|
21
|
+
}) });
|
|
22
|
+
};
|
|
23
|
+
const CreateLinks = () => {
|
|
24
|
+
return /* @__PURE__ */ jsx(Fragment, { children: links.map((link) => {
|
|
25
|
+
return /* @__PURE__ */ jsx("a", { href: `/create/${link}`, children: /* @__PURE__ */ jsx(DropdownMenuItem, { children: link }) }, "create" + link);
|
|
26
|
+
}) });
|
|
27
|
+
};
|
|
28
|
+
const UserDropdown = ({
|
|
29
|
+
user,
|
|
30
|
+
logOut
|
|
31
|
+
}) => {
|
|
32
|
+
var _a;
|
|
33
|
+
const handle = (user == null ? void 0 : user.username) || (user == null ? void 0 : user.id);
|
|
34
|
+
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
35
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Avatar, { "data-tour": "user-profile", className: "h-9 w-9 cursor-pointer", children: [
|
|
36
|
+
/* @__PURE__ */ jsx(AvatarImage, { src: (user == null ? void 0 : user.image) || "", alt: (user == null ? void 0 : user.name) || "User" }),
|
|
37
|
+
/* @__PURE__ */ jsx(AvatarFallback, { children: (_a = user == null ? void 0 : user.name) == null ? void 0 : _a.split("")[0] })
|
|
38
|
+
] }) }),
|
|
39
|
+
/* @__PURE__ */ jsxs(DropdownMenuContent, { className: "w-56", children: [
|
|
40
|
+
/* @__PURE__ */ jsx(DropdownMenuLabel, { children: user == null ? void 0 : user.name }),
|
|
41
|
+
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
42
|
+
/* @__PURE__ */ jsx(DropdownMenuGroup, { children: /* @__PURE__ */ jsx("a", { href: `/${handle}`, children: /* @__PURE__ */ jsx(DropdownMenuItem, { children: "Profile" }) }) }),
|
|
43
|
+
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
44
|
+
/* @__PURE__ */ jsxs(DropdownMenuGroup, { children: [
|
|
45
|
+
/* @__PURE__ */ jsx(UserLinks, { user }),
|
|
46
|
+
/* @__PURE__ */ jsxs(DropdownMenuSub, { children: [
|
|
47
|
+
/* @__PURE__ */ jsx(DropdownMenuSubTrigger, { children: "Create New" }),
|
|
48
|
+
/* @__PURE__ */ jsx(DropdownMenuPortal, { children: /* @__PURE__ */ jsxs(DropdownMenuSubContent, { children: [
|
|
49
|
+
/* @__PURE__ */ jsx(CreateLinks, {}),
|
|
50
|
+
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
51
|
+
/* @__PURE__ */ jsx("a", { href: `/create/`, children: /* @__PURE__ */ jsx(DropdownMenuItem, { children: "More..." }) })
|
|
52
|
+
] }) })
|
|
53
|
+
] })
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
56
|
+
/* @__PURE__ */ jsx(DropdownMenuItem, { onClick: logOut, children: "Log out" })
|
|
57
|
+
] })
|
|
58
|
+
] });
|
|
59
|
+
};
|
|
60
|
+
var user_dropdown_default = UserDropdown;
|
|
61
|
+
export {
|
|
62
|
+
user_dropdown_default as default
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=user-dropdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../components/header/userbutton/user-dropdown.tsx"],"sourcesContent":["import {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuSeparator,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from '../../ui/dropdown-menu'\nimport { Avatar, AvatarFallback, AvatarImage } from '../../ui/avatar'\nconst links = ['stories', 'characters', 'locations', 'timelines']\nimport React from 'react'\nimport { User } from '@auth/core/types'\n\ntype UserWithUsername = User & { username?: string | null }\n\nconst UserLinks: ({\n user,\n}: {\n user: UserWithUsername\n}) => React.JSX.Element = ({ user }: { user: UserWithUsername }) => {\n const handle = user?.username || user?.id\n return (\n <>\n {links.map((link) => {\n return (\n <a key={'user' + link} href={`/${handle}/${link}`}>\n <DropdownMenuItem>{link}</DropdownMenuItem>\n </a>\n )\n })}\n </>\n )\n}\n\nconst CreateLinks = () => {\n return (\n <>\n {links.map((link) => {\n return (\n <a key={'create' + link} href={`/create/${link}`}>\n <DropdownMenuItem>{link}</DropdownMenuItem>\n </a>\n )\n })}\n </>\n )\n}\n\nconst UserDropdown = ({\n user,\n logOut,\n}: {\n user: UserWithUsername\n logOut: () => void\n}) => {\n const handle = user?.username || user?.id\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Avatar data-tour=\"user-profile\" className=\"h-9 w-9 cursor-pointer\">\n <AvatarImage src={user?.image || ''} alt={user?.name || 'User'} />\n <AvatarFallback>{user?.name?.split('')[0]}</AvatarFallback>\n </Avatar>\n </DropdownMenuTrigger>\n <DropdownMenuContent className=\"w-56\">\n <DropdownMenuLabel>{user?.name}</DropdownMenuLabel>\n <DropdownMenuSeparator />\n <DropdownMenuGroup>\n <a href={`/${handle}`}>\n <DropdownMenuItem>Profile</DropdownMenuItem>\n </a>\n </DropdownMenuGroup>\n <DropdownMenuSeparator />\n <DropdownMenuGroup>\n <UserLinks user={user} />\n <DropdownMenuSub>\n <DropdownMenuSubTrigger>Create New</DropdownMenuSubTrigger>\n <DropdownMenuPortal>\n <DropdownMenuSubContent>\n <CreateLinks />\n <DropdownMenuSeparator />\n <a href={`/create/`}>\n <DropdownMenuItem>More...</DropdownMenuItem>\n </a>\n </DropdownMenuSubContent>\n </DropdownMenuPortal>\n </DropdownMenuSub>\n </DropdownMenuGroup>\n <DropdownMenuSeparator />\n <DropdownMenuItem onClick={logOut}>Log out</DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n\nexport default UserDropdown\n"],"mappings":"AA2BI,mBAIQ,KAiCJ,YArCJ;AA3BJ;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,QAAQ,gBAAgB,mBAAmB;AACpD,MAAM,QAAQ,CAAC,WAAW,cAAc,aAAa,WAAW;AAMhE,MAAM,YAIoB,CAAC,EAAE,KAAK,MAAkC;AAClE,QAAM,UAAS,6BAAM,cAAY,6BAAM;AACvC,SACE,gCACG,gBAAM,IAAI,CAAC,SAAS;AACnB,WACE,oBAAC,OAAsB,MAAM,IAAI,MAAM,IAAI,IAAI,IAC7C,8BAAC,oBAAkB,gBAAK,KADlB,SAAS,IAEjB;AAAA,EAEJ,CAAC,GACH;AAEJ;AAEA,MAAM,cAAc,MAAM;AACxB,SACE,gCACG,gBAAM,IAAI,CAAC,SAAS;AACnB,WACE,oBAAC,OAAwB,MAAM,WAAW,IAAI,IAC5C,8BAAC,oBAAkB,gBAAK,KADlB,WAAW,IAEnB;AAAA,EAEJ,CAAC,GACH;AAEJ;AAEA,MAAM,eAAe,CAAC;AAAA,EACpB;AAAA,EACA;AACF,MAGM;AA3DN;AA4DE,QAAM,UAAS,6BAAM,cAAY,6BAAM;AACvC,SACE,qBAAC,gBACC;AAAA,wBAAC,uBAAoB,SAAO,MAC1B,+BAAC,UAAO,aAAU,gBAAe,WAAU,0BACzC;AAAA,0BAAC,eAAY,MAAK,6BAAM,UAAS,IAAI,MAAK,6BAAM,SAAQ,QAAQ;AAAA,MAChE,oBAAC,kBAAgB,6CAAM,SAAN,mBAAY,MAAM,IAAI,IAAG;AAAA,OAC5C,GACF;AAAA,IACA,qBAAC,uBAAoB,WAAU,QAC7B;AAAA,0BAAC,qBAAmB,uCAAM,MAAK;AAAA,MAC/B,oBAAC,yBAAsB;AAAA,MACvB,oBAAC,qBACC,8BAAC,OAAE,MAAM,IAAI,MAAM,IACjB,8BAAC,oBAAiB,qBAAO,GAC3B,GACF;AAAA,MACA,oBAAC,yBAAsB;AAAA,MACvB,qBAAC,qBACC;AAAA,4BAAC,aAAU,MAAY;AAAA,QACvB,qBAAC,mBACC;AAAA,8BAAC,0BAAuB,wBAAU;AAAA,UAClC,oBAAC,sBACC,+BAAC,0BACC;AAAA,gCAAC,eAAY;AAAA,YACb,oBAAC,yBAAsB;AAAA,YACvB,oBAAC,OAAE,MAAM,YACP,8BAAC,oBAAiB,qBAAO,GAC3B;AAAA,aACF,GACF;AAAA,WACF;AAAA,SACF;AAAA,MACA,oBAAC,yBAAsB;AAAA,MACvB,oBAAC,oBAAiB,SAAS,QAAQ,qBAAO;AAAA,OAC5C;AAAA,KACF;AAEJ;AAEA,IAAO,wBAAQ;","names":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var userbutton_exports = {};
|
|
31
|
+
__export(userbutton_exports, {
|
|
32
|
+
UserButton: () => UserButton
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(userbutton_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_user_dropdown = __toESM(require("./user-dropdown"), 1);
|
|
37
|
+
const UserButton = ({
|
|
38
|
+
user,
|
|
39
|
+
signOut
|
|
40
|
+
}) => {
|
|
41
|
+
return user ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_user_dropdown.default, { user, logOut: signOut }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", { href: "/signin", className: "text-sm font-semibold leading-6 text-white", children: [
|
|
42
|
+
"Log in ",
|
|
43
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": "true", children: "\u2192" })
|
|
44
|
+
] });
|
|
45
|
+
};
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
UserButton
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=userbutton.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../components/header/userbutton/userbutton.tsx"],"sourcesContent":["'use client'\nimport UserDropdown from './user-dropdown'\nimport { User } from '@auth/core/types'\n\ntype UserWithUsername = User & { username?: string | null }\n\nexport const UserButton = ({\n user,\n signOut,\n}: {\n user: UserWithUsername | undefined\n signOut: () => Promise<void>\n}) => {\n return user ? (\n <UserDropdown user={user} logOut={signOut} />\n ) : (\n <a href=\"/signin\" className=\"text-sm font-semibold leading-6 text-white\">\n Log in <span aria-hidden=\"true\">→</span>\n </a>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAcI;AAbJ,2BAAyB;AAKlB,MAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA;AACF,MAGM;AACJ,SAAO,OACL,4CAAC,qBAAAA,SAAA,EAAa,MAAY,QAAQ,SAAS,IAE3C,6CAAC,OAAE,MAAK,WAAU,WAAU,8CAA6C;AAAA;AAAA,IAChE,4CAAC,UAAK,eAAY,QAAO,oBAAM;AAAA,KACxC;AAEJ;","names":["UserDropdown"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { User } from '@auth/core/types';
|
|
2
|
+
type UserWithUsername = User & {
|
|
3
|
+
username?: string | null;
|
|
4
|
+
};
|
|
5
|
+
export declare const UserButton: ({ user, signOut, }: {
|
|
6
|
+
user: UserWithUsername | undefined;
|
|
7
|
+
signOut: () => Promise<void>;
|
|
8
|
+
}) => import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=userbutton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userbutton.d.ts","sourceRoot":"","sources":["../../../../components/header/userbutton/userbutton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEvC,KAAK,gBAAgB,GAAG,IAAI,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAA;AAE3D,eAAO,MAAM,UAAU,GAAI,oBAGxB;IACD,IAAI,EAAE,gBAAgB,GAAG,SAAS,CAAA;IAClC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC7B,gCAQA,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import UserDropdown from "./user-dropdown";
|
|
4
|
+
const UserButton = ({
|
|
5
|
+
user,
|
|
6
|
+
signOut
|
|
7
|
+
}) => {
|
|
8
|
+
return user ? /* @__PURE__ */ jsx(UserDropdown, { user, logOut: signOut }) : /* @__PURE__ */ jsxs("a", { href: "/signin", className: "text-sm font-semibold leading-6 text-white", children: [
|
|
9
|
+
"Log in ",
|
|
10
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\u2192" })
|
|
11
|
+
] });
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
UserButton
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=userbutton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../components/header/userbutton/userbutton.tsx"],"sourcesContent":["'use client'\nimport UserDropdown from './user-dropdown'\nimport { User } from '@auth/core/types'\n\ntype UserWithUsername = User & { username?: string | null }\n\nexport const UserButton = ({\n user,\n signOut,\n}: {\n user: UserWithUsername | undefined\n signOut: () => Promise<void>\n}) => {\n return user ? (\n <UserDropdown user={user} logOut={signOut} />\n ) : (\n <a href=\"/signin\" className=\"text-sm font-semibold leading-6 text-white\">\n Log in <span aria-hidden=\"true\">→</span>\n </a>\n )\n}\n"],"mappings":";AAcI,cAEA,YAFA;AAbJ,OAAO,kBAAkB;AAKlB,MAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA;AACF,MAGM;AACJ,SAAO,OACL,oBAAC,gBAAa,MAAY,QAAQ,SAAS,IAE3C,qBAAC,OAAE,MAAK,WAAU,WAAU,8CAA6C;AAAA;AAAA,IAChE,oBAAC,UAAK,eAAY,QAAO,oBAAM;AAAA,KACxC;AAEJ;","names":[]}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var use_page_nav_exports = {};
|
|
30
|
+
__export(use_page_nav_exports, {
|
|
31
|
+
usePageNav: () => usePageNav
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(use_page_nav_exports);
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
+
var import_build_nav = require("../dashboard/utils/build-nav");
|
|
36
|
+
var import_build_nav2 = require("../dashboard/utils/build-nav");
|
|
37
|
+
var import_utils = require("../../lib/utils");
|
|
38
|
+
var import_link = __toESM(require("next/link"), 1);
|
|
39
|
+
var import_react = require("react");
|
|
40
|
+
var import_dropdown_menu = require("../ui/dropdown-menu");
|
|
41
|
+
const usePageNav = (sitemap, pathname, t, userId) => {
|
|
42
|
+
const [pages, setPages] = (0, import_react.useState)([]);
|
|
43
|
+
(0, import_react.useEffect)(() => {
|
|
44
|
+
const keyIndex = (0, import_build_nav2.createKeyIndex)(sitemap);
|
|
45
|
+
const reducedPages = (0, import_build_nav.createPagesSubNav)(keyIndex, "pages", {});
|
|
46
|
+
setPages(reducedPages);
|
|
47
|
+
}, [userId]);
|
|
48
|
+
return {
|
|
49
|
+
pages: pages == null ? void 0 : pages.map(
|
|
50
|
+
(page) => {
|
|
51
|
+
var _a;
|
|
52
|
+
return (page == null ? void 0 : page.children) ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown_menu.DropdownMenu, { children: [
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
+
import_link.default,
|
|
55
|
+
{
|
|
56
|
+
href: page == null ? void 0 : page.href,
|
|
57
|
+
className: (0, import_utils.cn)(
|
|
58
|
+
"hover:text-foreground/80 transition-colors",
|
|
59
|
+
pathname === (page == null ? void 0 : page.href) ? "text-foreground" : "text-foreground/60"
|
|
60
|
+
),
|
|
61
|
+
children: t(page == null ? void 0 : page.title)
|
|
62
|
+
},
|
|
63
|
+
page == null ? void 0 : page.title
|
|
64
|
+
) }),
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuContent, { className: "w-56", children: (_a = page == null ? void 0 : page.children) == null ? void 0 : _a.map((link) => {
|
|
66
|
+
var _a2;
|
|
67
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.default, { href: `${(_a2 = link == null ? void 0 : link.href) == null ? void 0 : _a2.replace(":user", userId || "")}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuItem, { children: t(link == null ? void 0 : link.title) }) }) }, link == null ? void 0 : link.title);
|
|
68
|
+
}) })
|
|
69
|
+
] }, page == null ? void 0 : page.title) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
70
|
+
import_link.default,
|
|
71
|
+
{
|
|
72
|
+
href: page == null ? void 0 : page.href,
|
|
73
|
+
className: (0, import_utils.cn)(
|
|
74
|
+
"hover:text-foreground/80 transition-colors",
|
|
75
|
+
pathname === (page == null ? void 0 : page.href) ? "text-foreground" : "text-foreground/60"
|
|
76
|
+
),
|
|
77
|
+
children: t(page == null ? void 0 : page.title)
|
|
78
|
+
},
|
|
79
|
+
page == null ? void 0 : page.title
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
86
|
+
0 && (module.exports = {
|
|
87
|
+
usePageNav
|
|
88
|
+
});
|
|
89
|
+
//# sourceMappingURL=use-page-nav.cjs.map
|