@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.
Files changed (582) hide show
  1. package/README.md +108 -0
  2. package/dist/components/auth/providers.cjs +83 -0
  3. package/dist/components/auth/providers.cjs.map +1 -0
  4. package/dist/components/auth/providers.d.ts +19 -0
  5. package/dist/components/auth/providers.d.ts.map +1 -0
  6. package/dist/components/auth/providers.js +59 -0
  7. package/dist/components/auth/providers.js.map +1 -0
  8. package/dist/components/card/back-button.cjs +45 -0
  9. package/dist/components/card/back-button.cjs.map +1 -0
  10. package/dist/components/card/back-button.d.ts +7 -0
  11. package/dist/components/card/back-button.d.ts.map +1 -0
  12. package/dist/components/card/back-button.js +11 -0
  13. package/dist/components/card/back-button.js.map +1 -0
  14. package/dist/components/card/card-wrapper.cjs +56 -0
  15. package/dist/components/card/card-wrapper.cjs.map +1 -0
  16. package/dist/components/card/card-wrapper.d.ts +11 -0
  17. package/dist/components/card/card-wrapper.d.ts.map +1 -0
  18. package/dist/components/card/card-wrapper.js +36 -0
  19. package/dist/components/card/card-wrapper.js.map +1 -0
  20. package/dist/components/card/header.cjs +52 -0
  21. package/dist/components/card/header.cjs.map +1 -0
  22. package/dist/components/card/header.d.ts +8 -0
  23. package/dist/components/card/header.d.ts.map +1 -0
  24. package/dist/components/card/header.js +18 -0
  25. package/dist/components/card/header.js.map +1 -0
  26. package/dist/components/combobox/ComboList.cjs +78 -0
  27. package/dist/components/combobox/ComboList.cjs.map +1 -0
  28. package/dist/components/combobox/ComboList.d.ts +14 -0
  29. package/dist/components/combobox/ComboList.d.ts.map +1 -0
  30. package/dist/components/combobox/ComboList.js +61 -0
  31. package/dist/components/combobox/ComboList.js.map +1 -0
  32. package/dist/components/combobox/index.cjs +119 -0
  33. package/dist/components/combobox/index.cjs.map +1 -0
  34. package/dist/components/combobox/index.d.ts +6 -0
  35. package/dist/components/combobox/index.d.ts.map +1 -0
  36. package/dist/components/combobox/index.js +101 -0
  37. package/dist/components/combobox/index.js.map +1 -0
  38. package/dist/components/dashboard/account-select.cjs +69 -0
  39. package/dist/components/dashboard/account-select.cjs.map +1 -0
  40. package/dist/components/dashboard/account-select.d.ts +12 -0
  41. package/dist/components/dashboard/account-select.d.ts.map +1 -0
  42. package/dist/components/dashboard/account-select.js +41 -0
  43. package/dist/components/dashboard/account-select.js.map +1 -0
  44. package/dist/components/dashboard/account-switcher.cjs +72 -0
  45. package/dist/components/dashboard/account-switcher.cjs.map +1 -0
  46. package/dist/components/dashboard/account-switcher.d.ts +12 -0
  47. package/dist/components/dashboard/account-switcher.d.ts.map +1 -0
  48. package/dist/components/dashboard/account-switcher.js +44 -0
  49. package/dist/components/dashboard/account-switcher.js.map +1 -0
  50. package/dist/components/dashboard/sidebar/CollapsibleSection.cjs +100 -0
  51. package/dist/components/dashboard/sidebar/CollapsibleSection.cjs.map +1 -0
  52. package/dist/components/dashboard/sidebar/CollapsibleSection.d.ts +3 -0
  53. package/dist/components/dashboard/sidebar/CollapsibleSection.d.ts.map +1 -0
  54. package/dist/components/dashboard/sidebar/CollapsibleSection.js +81 -0
  55. package/dist/components/dashboard/sidebar/CollapsibleSection.js.map +1 -0
  56. package/dist/components/dashboard/sidebar/CollapsibleSection.styles.cjs +77 -0
  57. package/dist/components/dashboard/sidebar/CollapsibleSection.styles.cjs.map +1 -0
  58. package/dist/components/dashboard/sidebar/CollapsibleSection.styles.d.ts +13 -0
  59. package/dist/components/dashboard/sidebar/CollapsibleSection.styles.d.ts.map +1 -0
  60. package/dist/components/dashboard/sidebar/CollapsibleSection.styles.js +40 -0
  61. package/dist/components/dashboard/sidebar/CollapsibleSection.styles.js.map +1 -0
  62. package/dist/components/dashboard/sidebar/EntityList.cjs +121 -0
  63. package/dist/components/dashboard/sidebar/EntityList.cjs.map +1 -0
  64. package/dist/components/dashboard/sidebar/EntityList.d.ts +3 -0
  65. package/dist/components/dashboard/sidebar/EntityList.d.ts.map +1 -0
  66. package/dist/components/dashboard/sidebar/EntityList.js +87 -0
  67. package/dist/components/dashboard/sidebar/EntityList.js.map +1 -0
  68. package/dist/components/dashboard/sidebar/EntityList.styles.cjs +95 -0
  69. package/dist/components/dashboard/sidebar/EntityList.styles.cjs.map +1 -0
  70. package/dist/components/dashboard/sidebar/EntityList.styles.d.ts +42 -0
  71. package/dist/components/dashboard/sidebar/EntityList.styles.d.ts.map +1 -0
  72. package/dist/components/dashboard/sidebar/EntityList.styles.js +57 -0
  73. package/dist/components/dashboard/sidebar/EntityList.styles.js.map +1 -0
  74. package/dist/components/dashboard/sidebar/SectionHeader.cjs +99 -0
  75. package/dist/components/dashboard/sidebar/SectionHeader.cjs.map +1 -0
  76. package/dist/components/dashboard/sidebar/SectionHeader.d.ts +3 -0
  77. package/dist/components/dashboard/sidebar/SectionHeader.d.ts.map +1 -0
  78. package/dist/components/dashboard/sidebar/SectionHeader.js +81 -0
  79. package/dist/components/dashboard/sidebar/SectionHeader.js.map +1 -0
  80. package/dist/components/dashboard/sidebar/SectionHeader.styles.cjs +116 -0
  81. package/dist/components/dashboard/sidebar/SectionHeader.styles.cjs.map +1 -0
  82. package/dist/components/dashboard/sidebar/SectionHeader.styles.d.ts +29 -0
  83. package/dist/components/dashboard/sidebar/SectionHeader.styles.d.ts.map +1 -0
  84. package/dist/components/dashboard/sidebar/SectionHeader.styles.js +77 -0
  85. package/dist/components/dashboard/sidebar/SectionHeader.styles.js.map +1 -0
  86. package/dist/components/dashboard/sidebar/index.cjs +41 -0
  87. package/dist/components/dashboard/sidebar/index.cjs.map +1 -0
  88. package/dist/components/dashboard/sidebar/index.d.ts +6 -0
  89. package/dist/components/dashboard/sidebar/index.d.ts.map +1 -0
  90. package/dist/components/dashboard/sidebar/index.js +12 -0
  91. package/dist/components/dashboard/sidebar/index.js.map +1 -0
  92. package/dist/components/dashboard/sidebar/sidebar.cjs +50 -0
  93. package/dist/components/dashboard/sidebar/sidebar.cjs.map +1 -0
  94. package/dist/components/dashboard/sidebar/sidebar.d.ts +15 -0
  95. package/dist/components/dashboard/sidebar/sidebar.d.ts.map +1 -0
  96. package/dist/components/dashboard/sidebar/sidebar.js +26 -0
  97. package/dist/components/dashboard/sidebar/sidebar.js.map +1 -0
  98. package/dist/components/dashboard/sidebar/tabs.cjs +52 -0
  99. package/dist/components/dashboard/sidebar/tabs.cjs.map +1 -0
  100. package/dist/components/dashboard/sidebar/tabs.d.ts +3 -0
  101. package/dist/components/dashboard/sidebar/tabs.d.ts.map +1 -0
  102. package/dist/components/dashboard/sidebar/tabs.js +37 -0
  103. package/dist/components/dashboard/sidebar/tabs.js.map +1 -0
  104. package/dist/components/dashboard/sidebar/types.cjs +17 -0
  105. package/dist/components/dashboard/sidebar/types.cjs.map +1 -0
  106. package/dist/components/dashboard/sidebar/types.d.ts +36 -0
  107. package/dist/components/dashboard/sidebar/types.d.ts.map +1 -0
  108. package/dist/components/dashboard/sidebar/types.js +1 -0
  109. package/dist/components/dashboard/sidebar/types.js.map +1 -0
  110. package/dist/components/dashboard/sidebar-nav.cjs +99 -0
  111. package/dist/components/dashboard/sidebar-nav.cjs.map +1 -0
  112. package/dist/components/dashboard/sidebar-nav.d.ts +24 -0
  113. package/dist/components/dashboard/sidebar-nav.d.ts.map +1 -0
  114. package/dist/components/dashboard/sidebar-nav.js +75 -0
  115. package/dist/components/dashboard/sidebar-nav.js.map +1 -0
  116. package/dist/components/dashboard/utils/build-nav.cjs +103 -0
  117. package/dist/components/dashboard/utils/build-nav.cjs.map +1 -0
  118. package/dist/components/dashboard/utils/build-nav.d.ts +7 -0
  119. package/dist/components/dashboard/utils/build-nav.d.ts.map +1 -0
  120. package/dist/components/dashboard/utils/build-nav.js +78 -0
  121. package/dist/components/dashboard/utils/build-nav.js.map +1 -0
  122. package/dist/components/dashboard/utils.cjs +2 -0
  123. package/dist/components/dashboard/utils.cjs.map +1 -0
  124. package/dist/components/dashboard/utils.d.ts +1 -0
  125. package/dist/components/dashboard/utils.d.ts.map +1 -0
  126. package/dist/components/dashboard/utils.js +1 -0
  127. package/dist/components/dashboard/utils.js.map +1 -0
  128. package/dist/components/dashboard/with-dashboard.cjs +189 -0
  129. package/dist/components/dashboard/with-dashboard.cjs.map +1 -0
  130. package/dist/components/dashboard/with-dashboard.d.ts +6 -0
  131. package/dist/components/dashboard/with-dashboard.d.ts.map +1 -0
  132. package/dist/components/dashboard/with-dashboard.js +175 -0
  133. package/dist/components/dashboard/with-dashboard.js.map +1 -0
  134. package/dist/components/detail/DetailLayout.styles.cjs +116 -0
  135. package/dist/components/detail/DetailLayout.styles.cjs.map +1 -0
  136. package/dist/components/detail/DetailLayout.styles.d.ts +26 -0
  137. package/dist/components/detail/DetailLayout.styles.d.ts.map +1 -0
  138. package/dist/components/detail/DetailLayout.styles.js +74 -0
  139. package/dist/components/detail/DetailLayout.styles.js.map +1 -0
  140. package/dist/components/detail/index.cjs +45 -0
  141. package/dist/components/detail/index.cjs.map +1 -0
  142. package/dist/components/detail/index.d.ts +2 -0
  143. package/dist/components/detail/index.d.ts.map +1 -0
  144. package/dist/components/detail/index.js +23 -0
  145. package/dist/components/detail/index.js.map +1 -0
  146. package/dist/components/flowbite/card-images.cjs +104 -0
  147. package/dist/components/flowbite/card-images.cjs.map +1 -0
  148. package/dist/components/flowbite/card-images.d.ts +3 -0
  149. package/dist/components/flowbite/card-images.d.ts.map +1 -0
  150. package/dist/components/flowbite/card-images.js +84 -0
  151. package/dist/components/flowbite/card-images.js.map +1 -0
  152. package/dist/components/flowbite/gallery.cjs +53 -0
  153. package/dist/components/flowbite/gallery.cjs.map +1 -0
  154. package/dist/components/flowbite/gallery.d.ts +4 -0
  155. package/dist/components/flowbite/gallery.d.ts.map +1 -0
  156. package/dist/components/flowbite/gallery.js +23 -0
  157. package/dist/components/flowbite/gallery.js.map +1 -0
  158. package/dist/components/flowbite/masonry.cjs +73 -0
  159. package/dist/components/flowbite/masonry.cjs.map +1 -0
  160. package/dist/components/flowbite/masonry.d.ts +13 -0
  161. package/dist/components/flowbite/masonry.d.ts.map +1 -0
  162. package/dist/components/flowbite/masonry.js +43 -0
  163. package/dist/components/flowbite/masonry.js.map +1 -0
  164. package/dist/components/flowbite/search-hero.cjs +109 -0
  165. package/dist/components/flowbite/search-hero.cjs.map +1 -0
  166. package/dist/components/flowbite/search-hero.d.ts +6 -0
  167. package/dist/components/flowbite/search-hero.d.ts.map +1 -0
  168. package/dist/components/flowbite/search-hero.js +89 -0
  169. package/dist/components/flowbite/search-hero.js.map +1 -0
  170. package/dist/components/generic/copyright.cjs +32 -0
  171. package/dist/components/generic/copyright.cjs.map +1 -0
  172. package/dist/components/generic/copyright.d.ts +4 -0
  173. package/dist/components/generic/copyright.d.ts.map +1 -0
  174. package/dist/components/generic/copyright.js +8 -0
  175. package/dist/components/generic/copyright.js.map +1 -0
  176. package/dist/components/generic/icons.cjs +186 -0
  177. package/dist/components/generic/icons.cjs.map +1 -0
  178. package/dist/components/generic/icons.d.ts +19 -0
  179. package/dist/components/generic/icons.d.ts.map +1 -0
  180. package/dist/components/generic/icons.js +164 -0
  181. package/dist/components/generic/icons.js.map +1 -0
  182. package/dist/components/generic/link.cjs +76 -0
  183. package/dist/components/generic/link.cjs.map +1 -0
  184. package/dist/components/generic/link.d.ts +8 -0
  185. package/dist/components/generic/link.d.ts.map +1 -0
  186. package/dist/components/generic/link.js +54 -0
  187. package/dist/components/generic/link.js.map +1 -0
  188. package/dist/components/header/header.cjs +130 -0
  189. package/dist/components/header/header.cjs.map +1 -0
  190. package/dist/components/header/header.d.ts +14 -0
  191. package/dist/components/header/header.d.ts.map +1 -0
  192. package/dist/components/header/header.js +106 -0
  193. package/dist/components/header/header.js.map +1 -0
  194. package/dist/components/header/internal/main-nav.cjs +67 -0
  195. package/dist/components/header/internal/main-nav.cjs.map +1 -0
  196. package/dist/components/header/internal/main-nav.d.ts +6 -0
  197. package/dist/components/header/internal/main-nav.d.ts.map +1 -0
  198. package/dist/components/header/internal/main-nav.js +33 -0
  199. package/dist/components/header/internal/main-nav.js.map +1 -0
  200. package/dist/components/header/internal/mobile-nav.cjs +210 -0
  201. package/dist/components/header/internal/mobile-nav.cjs.map +1 -0
  202. package/dist/components/header/internal/mobile-nav.d.ts +18 -0
  203. package/dist/components/header/internal/mobile-nav.d.ts.map +1 -0
  204. package/dist/components/header/internal/mobile-nav.js +178 -0
  205. package/dist/components/header/internal/mobile-nav.js.map +1 -0
  206. package/dist/components/header/internal/mode-toggle.cjs +73 -0
  207. package/dist/components/header/internal/mode-toggle.cjs.map +1 -0
  208. package/dist/components/header/internal/mode-toggle.d.ts +8 -0
  209. package/dist/components/header/internal/mode-toggle.d.ts.map +1 -0
  210. package/dist/components/header/internal/mode-toggle.js +54 -0
  211. package/dist/components/header/internal/mode-toggle.js.map +1 -0
  212. package/dist/components/header/internal/site-header.cjs +64 -0
  213. package/dist/components/header/internal/site-header.cjs.map +1 -0
  214. package/dist/components/header/internal/site-header.d.ts +17 -0
  215. package/dist/components/header/internal/site-header.d.ts.map +1 -0
  216. package/dist/components/header/internal/site-header.js +40 -0
  217. package/dist/components/header/internal/site-header.js.map +1 -0
  218. package/dist/components/header/langbutton/langbutton.cjs +54 -0
  219. package/dist/components/header/langbutton/langbutton.cjs.map +1 -0
  220. package/dist/components/header/langbutton/langbutton.d.ts +5 -0
  221. package/dist/components/header/langbutton/langbutton.d.ts.map +1 -0
  222. package/dist/components/header/langbutton/langbutton.js +35 -0
  223. package/dist/components/header/langbutton/langbutton.js.map +1 -0
  224. package/dist/components/header/userbutton/user-dropdown.cjs +72 -0
  225. package/dist/components/header/userbutton/user-dropdown.cjs.map +1 -0
  226. package/dist/components/header/userbutton/user-dropdown.d.ts +11 -0
  227. package/dist/components/header/userbutton/user-dropdown.d.ts.map +1 -0
  228. package/dist/components/header/userbutton/user-dropdown.js +64 -0
  229. package/dist/components/header/userbutton/user-dropdown.js.map +1 -0
  230. package/dist/components/header/userbutton/userbutton.cjs +50 -0
  231. package/dist/components/header/userbutton/userbutton.cjs.map +1 -0
  232. package/dist/components/header/userbutton/userbutton.d.ts +10 -0
  233. package/dist/components/header/userbutton/userbutton.d.ts.map +1 -0
  234. package/dist/components/header/userbutton/userbutton.js +16 -0
  235. package/dist/components/header/userbutton/userbutton.js.map +1 -0
  236. package/dist/components/hooks/use-page-nav.cjs +89 -0
  237. package/dist/components/hooks/use-page-nav.cjs.map +1 -0
  238. package/dist/components/hooks/use-page-nav.d.ts +5 -0
  239. package/dist/components/hooks/use-page-nav.d.ts.map +1 -0
  240. package/dist/components/hooks/use-page-nav.js +61 -0
  241. package/dist/components/hooks/use-page-nav.js.map +1 -0
  242. package/dist/components/hooks/use-user-entities.cjs +30 -0
  243. package/dist/components/hooks/use-user-entities.cjs.map +1 -0
  244. package/dist/components/hooks/use-user-entities.d.ts +2 -0
  245. package/dist/components/hooks/use-user-entities.d.ts.map +1 -0
  246. package/dist/components/hooks/use-user-entities.js +6 -0
  247. package/dist/components/hooks/use-user-entities.js.map +1 -0
  248. package/dist/components/icons/apple.cjs +47 -0
  249. package/dist/components/icons/apple.cjs.map +1 -0
  250. package/dist/components/icons/apple.d.ts +2 -0
  251. package/dist/components/icons/apple.d.ts.map +1 -0
  252. package/dist/components/icons/apple.js +23 -0
  253. package/dist/components/icons/apple.js.map +1 -0
  254. package/dist/components/icons/facebook.cjs +49 -0
  255. package/dist/components/icons/facebook.cjs.map +1 -0
  256. package/dist/components/icons/facebook.d.ts +2 -0
  257. package/dist/components/icons/facebook.d.ts.map +1 -0
  258. package/dist/components/icons/facebook.js +25 -0
  259. package/dist/components/icons/facebook.js.map +1 -0
  260. package/dist/components/icons/github.cjs +49 -0
  261. package/dist/components/icons/github.cjs.map +1 -0
  262. package/dist/components/icons/github.d.ts +2 -0
  263. package/dist/components/icons/github.d.ts.map +1 -0
  264. package/dist/components/icons/github.js +25 -0
  265. package/dist/components/icons/github.js.map +1 -0
  266. package/dist/components/icons/google.cjs +49 -0
  267. package/dist/components/icons/google.cjs.map +1 -0
  268. package/dist/components/icons/google.d.ts +2 -0
  269. package/dist/components/icons/google.d.ts.map +1 -0
  270. package/dist/components/icons/google.js +25 -0
  271. package/dist/components/icons/google.js.map +1 -0
  272. package/dist/components/icons/logo.cjs +49 -0
  273. package/dist/components/icons/logo.cjs.map +1 -0
  274. package/dist/components/icons/logo.d.ts +4 -0
  275. package/dist/components/icons/logo.d.ts.map +1 -0
  276. package/dist/components/icons/logo.js +25 -0
  277. package/dist/components/icons/logo.js.map +1 -0
  278. package/dist/components/lightbox/GallerySection.cjs +53 -0
  279. package/dist/components/lightbox/GallerySection.cjs.map +1 -0
  280. package/dist/components/lightbox/GallerySection.d.ts +12 -0
  281. package/dist/components/lightbox/GallerySection.d.ts.map +1 -0
  282. package/dist/components/lightbox/GallerySection.js +29 -0
  283. package/dist/components/lightbox/GallerySection.js.map +1 -0
  284. package/dist/components/lightbox/ImageLightbox.cjs +244 -0
  285. package/dist/components/lightbox/ImageLightbox.cjs.map +1 -0
  286. package/dist/components/lightbox/ImageLightbox.d.ts +3 -0
  287. package/dist/components/lightbox/ImageLightbox.d.ts.map +1 -0
  288. package/dist/components/lightbox/ImageLightbox.js +220 -0
  289. package/dist/components/lightbox/ImageLightbox.js.map +1 -0
  290. package/dist/components/lightbox/ImageLightbox.types.cjs +17 -0
  291. package/dist/components/lightbox/ImageLightbox.types.cjs.map +1 -0
  292. package/dist/components/lightbox/ImageLightbox.types.d.ts +28 -0
  293. package/dist/components/lightbox/ImageLightbox.types.d.ts.map +1 -0
  294. package/dist/components/lightbox/ImageLightbox.types.js +1 -0
  295. package/dist/components/lightbox/ImageLightbox.types.js.map +1 -0
  296. package/dist/components/lightbox/index.cjs +38 -0
  297. package/dist/components/lightbox/index.cjs.map +1 -0
  298. package/dist/components/lightbox/index.d.ts +8 -0
  299. package/dist/components/lightbox/index.d.ts.map +1 -0
  300. package/dist/components/lightbox/index.js +11 -0
  301. package/dist/components/lightbox/index.js.map +1 -0
  302. package/dist/components/lightbox/useEntityLightbox.cjs +57 -0
  303. package/dist/components/lightbox/useEntityLightbox.cjs.map +1 -0
  304. package/dist/components/lightbox/useEntityLightbox.d.ts +25 -0
  305. package/dist/components/lightbox/useEntityLightbox.d.ts.map +1 -0
  306. package/dist/components/lightbox/useEntityLightbox.js +33 -0
  307. package/dist/components/lightbox/useEntityLightbox.js.map +1 -0
  308. package/dist/components/lightbox/useLightbox.cjs +59 -0
  309. package/dist/components/lightbox/useLightbox.cjs.map +1 -0
  310. package/dist/components/lightbox/useLightbox.d.ts +9 -0
  311. package/dist/components/lightbox/useLightbox.d.ts.map +1 -0
  312. package/dist/components/lightbox/useLightbox.js +35 -0
  313. package/dist/components/lightbox/useLightbox.js.map +1 -0
  314. package/dist/components/search/search.cjs +71 -0
  315. package/dist/components/search/search.cjs.map +1 -0
  316. package/dist/components/search/search.d.ts +2 -0
  317. package/dist/components/search/search.d.ts.map +1 -0
  318. package/dist/components/search/search.js +63 -0
  319. package/dist/components/search/search.js.map +1 -0
  320. package/dist/components/tailwind/contact.cjs +380 -0
  321. package/dist/components/tailwind/contact.cjs.map +1 -0
  322. package/dist/components/tailwind/contact.d.ts +2 -0
  323. package/dist/components/tailwind/contact.d.ts.map +1 -0
  324. package/dist/components/tailwind/contact.js +356 -0
  325. package/dist/components/tailwind/contact.js.map +1 -0
  326. package/dist/components/tailwind/content-page.cjs +58 -0
  327. package/dist/components/tailwind/content-page.cjs.map +1 -0
  328. package/dist/components/tailwind/content-page.d.ts +18 -0
  329. package/dist/components/tailwind/content-page.d.ts.map +1 -0
  330. package/dist/components/tailwind/content-page.js +32 -0
  331. package/dist/components/tailwind/content-page.js.map +1 -0
  332. package/dist/components/tailwind/feature.cjs +95 -0
  333. package/dist/components/tailwind/feature.cjs.map +1 -0
  334. package/dist/components/tailwind/feature.d.ts +2 -0
  335. package/dist/components/tailwind/feature.d.ts.map +1 -0
  336. package/dist/components/tailwind/feature.js +75 -0
  337. package/dist/components/tailwind/feature.js.map +1 -0
  338. package/dist/components/tailwind/featurelist.cjs +99 -0
  339. package/dist/components/tailwind/featurelist.cjs.map +1 -0
  340. package/dist/components/tailwind/featurelist.d.ts +2 -0
  341. package/dist/components/tailwind/featurelist.d.ts.map +1 -0
  342. package/dist/components/tailwind/featurelist.js +65 -0
  343. package/dist/components/tailwind/featurelist.js.map +1 -0
  344. package/dist/components/tailwind/footer.cjs +104 -0
  345. package/dist/components/tailwind/footer.cjs.map +1 -0
  346. package/dist/components/tailwind/footer.d.ts +2 -0
  347. package/dist/components/tailwind/footer.d.ts.map +1 -0
  348. package/dist/components/tailwind/footer.js +80 -0
  349. package/dist/components/tailwind/footer.js.map +1 -0
  350. package/dist/components/tailwind/hero.cjs +130 -0
  351. package/dist/components/tailwind/hero.cjs.map +1 -0
  352. package/dist/components/tailwind/hero.d.ts +22 -0
  353. package/dist/components/tailwind/hero.d.ts.map +1 -0
  354. package/dist/components/tailwind/hero.js +106 -0
  355. package/dist/components/tailwind/hero.js.map +1 -0
  356. package/dist/components/tailwind/pricing.cjs +214 -0
  357. package/dist/components/tailwind/pricing.cjs.map +1 -0
  358. package/dist/components/tailwind/pricing.d.ts +6 -0
  359. package/dist/components/tailwind/pricing.d.ts.map +1 -0
  360. package/dist/components/tailwind/pricing.js +190 -0
  361. package/dist/components/tailwind/pricing.js.map +1 -0
  362. package/dist/components/tailwind/privacy.cjs +138 -0
  363. package/dist/components/tailwind/privacy.cjs.map +1 -0
  364. package/dist/components/tailwind/privacy.d.ts +2 -0
  365. package/dist/components/tailwind/privacy.d.ts.map +1 -0
  366. package/dist/components/tailwind/privacy.js +114 -0
  367. package/dist/components/tailwind/privacy.js.map +1 -0
  368. package/dist/components/tailwind/providerIcons.cjs +48 -0
  369. package/dist/components/tailwind/providerIcons.cjs.map +1 -0
  370. package/dist/components/tailwind/providerIcons.d.ts +4 -0
  371. package/dist/components/tailwind/providerIcons.d.ts.map +1 -0
  372. package/dist/components/tailwind/providerIcons.js +24 -0
  373. package/dist/components/tailwind/providerIcons.js.map +1 -0
  374. package/dist/components/ui/avatar.cjs +120 -0
  375. package/dist/components/ui/avatar.cjs.map +1 -0
  376. package/dist/components/ui/avatar.d.ts +7 -0
  377. package/dist/components/ui/avatar.d.ts.map +1 -0
  378. package/dist/components/ui/avatar.js +86 -0
  379. package/dist/components/ui/avatar.js.map +1 -0
  380. package/dist/components/ui/breadcrumb.cjs +63 -0
  381. package/dist/components/ui/breadcrumb.cjs.map +1 -0
  382. package/dist/components/ui/breadcrumb.d.ts +11 -0
  383. package/dist/components/ui/breadcrumb.d.ts.map +1 -0
  384. package/dist/components/ui/breadcrumb.js +29 -0
  385. package/dist/components/ui/breadcrumb.js.map +1 -0
  386. package/dist/components/ui/button.cjs +105 -0
  387. package/dist/components/ui/button.cjs.map +1 -0
  388. package/dist/components/ui/button.d.ts +11 -0
  389. package/dist/components/ui/button.d.ts.map +1 -0
  390. package/dist/components/ui/button.js +82 -0
  391. package/dist/components/ui/button.js.map +1 -0
  392. package/dist/components/ui/card.cjs +129 -0
  393. package/dist/components/ui/card.cjs.map +1 -0
  394. package/dist/components/ui/card.d.ts +9 -0
  395. package/dist/components/ui/card.d.ts.map +1 -0
  396. package/dist/components/ui/card.js +102 -0
  397. package/dist/components/ui/card.js.map +1 -0
  398. package/dist/components/ui/checkbox.cjs +98 -0
  399. package/dist/components/ui/checkbox.cjs.map +1 -0
  400. package/dist/components/ui/checkbox.d.ts +5 -0
  401. package/dist/components/ui/checkbox.d.ts.map +1 -0
  402. package/dist/components/ui/checkbox.js +66 -0
  403. package/dist/components/ui/checkbox.js.map +1 -0
  404. package/dist/components/ui/command.cjs +200 -0
  405. package/dist/components/ui/command.cjs.map +1 -0
  406. package/dist/components/ui/command.d.ts +83 -0
  407. package/dist/components/ui/command.d.ts.map +1 -0
  408. package/dist/components/ui/command.js +160 -0
  409. package/dist/components/ui/command.js.map +1 -0
  410. package/dist/components/ui/dialog.cjs +204 -0
  411. package/dist/components/ui/dialog.cjs.map +1 -0
  412. package/dist/components/ui/dialog.d.ts +14 -0
  413. package/dist/components/ui/dialog.d.ts.map +1 -0
  414. package/dist/components/ui/dialog.js +163 -0
  415. package/dist/components/ui/dialog.js.map +1 -0
  416. package/dist/components/ui/drawer.cjs +191 -0
  417. package/dist/components/ui/drawer.cjs.map +1 -0
  418. package/dist/components/ui/drawer.d.ts +14 -0
  419. package/dist/components/ui/drawer.d.ts.map +1 -0
  420. package/dist/components/ui/drawer.js +160 -0
  421. package/dist/components/ui/drawer.js.map +1 -0
  422. package/dist/components/ui/dropdown-menu.cjs +323 -0
  423. package/dist/components/ui/dropdown-menu.cjs.map +1 -0
  424. package/dist/components/ui/dropdown-menu.d.ts +26 -0
  425. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  426. package/dist/components/ui/dropdown-menu.js +277 -0
  427. package/dist/components/ui/dropdown-menu.js.map +1 -0
  428. package/dist/components/ui/input.cjs +72 -0
  429. package/dist/components/ui/input.cjs.map +1 -0
  430. package/dist/components/ui/input.d.ts +4 -0
  431. package/dist/components/ui/input.d.ts.map +1 -0
  432. package/dist/components/ui/input.js +50 -0
  433. package/dist/components/ui/input.js.map +1 -0
  434. package/dist/components/ui/label.cjs +85 -0
  435. package/dist/components/ui/label.cjs.map +1 -0
  436. package/dist/components/ui/label.d.ts +5 -0
  437. package/dist/components/ui/label.d.ts.map +1 -0
  438. package/dist/components/ui/label.js +53 -0
  439. package/dist/components/ui/label.js.map +1 -0
  440. package/dist/components/ui/menubar.cjs +351 -0
  441. package/dist/components/ui/menubar.cjs.map +1 -0
  442. package/dist/components/ui/menubar.d.ts +27 -0
  443. package/dist/components/ui/menubar.d.ts.map +1 -0
  444. package/dist/components/ui/menubar.js +304 -0
  445. package/dist/components/ui/menubar.js.map +1 -0
  446. package/dist/components/ui/navigation-menu.cjs +257 -0
  447. package/dist/components/ui/navigation-menu.cjs.map +1 -0
  448. package/dist/components/ui/navigation-menu.d.ts +15 -0
  449. package/dist/components/ui/navigation-menu.d.ts.map +1 -0
  450. package/dist/components/ui/navigation-menu.js +217 -0
  451. package/dist/components/ui/navigation-menu.js.map +1 -0
  452. package/dist/components/ui/popover.cjs +109 -0
  453. package/dist/components/ui/popover.cjs.map +1 -0
  454. package/dist/components/ui/popover.d.ts +8 -0
  455. package/dist/components/ui/popover.d.ts.map +1 -0
  456. package/dist/components/ui/popover.js +74 -0
  457. package/dist/components/ui/popover.js.map +1 -0
  458. package/dist/components/ui/resizable.cjs +124 -0
  459. package/dist/components/ui/resizable.cjs.map +1 -0
  460. package/dist/components/ui/resizable.d.ts +26 -0
  461. package/dist/components/ui/resizable.d.ts.map +1 -0
  462. package/dist/components/ui/resizable.js +90 -0
  463. package/dist/components/ui/resizable.js.map +1 -0
  464. package/dist/components/ui/scroll-area.cjs +132 -0
  465. package/dist/components/ui/scroll-area.cjs.map +1 -0
  466. package/dist/components/ui/scroll-area.d.ts +6 -0
  467. package/dist/components/ui/scroll-area.d.ts.map +1 -0
  468. package/dist/components/ui/scroll-area.js +99 -0
  469. package/dist/components/ui/scroll-area.js.map +1 -0
  470. package/dist/components/ui/select.cjs +254 -0
  471. package/dist/components/ui/select.cjs.map +1 -0
  472. package/dist/components/ui/select.d.ts +14 -0
  473. package/dist/components/ui/select.d.ts.map +1 -0
  474. package/dist/components/ui/select.js +213 -0
  475. package/dist/components/ui/select.js.map +1 -0
  476. package/dist/components/ui/sheet.cjs +203 -0
  477. package/dist/components/ui/sheet.cjs.map +1 -0
  478. package/dist/components/ui/sheet.d.ts +14 -0
  479. package/dist/components/ui/sheet.d.ts.map +1 -0
  480. package/dist/components/ui/sheet.js +164 -0
  481. package/dist/components/ui/sheet.js.map +1 -0
  482. package/dist/components/ui/skeleton.cjs +66 -0
  483. package/dist/components/ui/skeleton.cjs.map +1 -0
  484. package/dist/components/ui/skeleton.d.ts +3 -0
  485. package/dist/components/ui/skeleton.d.ts.map +1 -0
  486. package/dist/components/ui/skeleton.js +44 -0
  487. package/dist/components/ui/skeleton.js.map +1 -0
  488. package/dist/components/ui/spinner.cjs +128 -0
  489. package/dist/components/ui/spinner.cjs.map +1 -0
  490. package/dist/components/ui/spinner.d.ts +12 -0
  491. package/dist/components/ui/spinner.d.ts.map +1 -0
  492. package/dist/components/ui/spinner.js +105 -0
  493. package/dist/components/ui/spinner.js.map +1 -0
  494. package/dist/components/ui/switch.cjs +98 -0
  495. package/dist/components/ui/switch.cjs.map +1 -0
  496. package/dist/components/ui/switch.d.ts +5 -0
  497. package/dist/components/ui/switch.d.ts.map +1 -0
  498. package/dist/components/ui/switch.js +66 -0
  499. package/dist/components/ui/switch.js.map +1 -0
  500. package/dist/components/ui/tabs.cjs +136 -0
  501. package/dist/components/ui/tabs.cjs.map +1 -0
  502. package/dist/components/ui/tabs.d.ts +8 -0
  503. package/dist/components/ui/tabs.d.ts.map +1 -0
  504. package/dist/components/ui/tabs.js +101 -0
  505. package/dist/components/ui/tabs.js.map +1 -0
  506. package/dist/components/ui/textarea.cjs +69 -0
  507. package/dist/components/ui/textarea.cjs.map +1 -0
  508. package/dist/components/ui/textarea.d.ts +4 -0
  509. package/dist/components/ui/textarea.d.ts.map +1 -0
  510. package/dist/components/ui/textarea.js +47 -0
  511. package/dist/components/ui/textarea.js.map +1 -0
  512. package/dist/components/ui/toast.cjs +169 -0
  513. package/dist/components/ui/toast.cjs.map +1 -0
  514. package/dist/components/ui/toast.d.ts +15 -0
  515. package/dist/components/ui/toast.d.ts.map +1 -0
  516. package/dist/components/ui/toast.js +131 -0
  517. package/dist/components/ui/toast.js.map +1 -0
  518. package/dist/components/ui/toaster.cjs +78 -0
  519. package/dist/components/ui/toaster.cjs.map +1 -0
  520. package/dist/components/ui/toaster.d.ts +2 -0
  521. package/dist/components/ui/toaster.d.ts.map +1 -0
  522. package/dist/components/ui/toaster.js +63 -0
  523. package/dist/components/ui/toaster.js.map +1 -0
  524. package/dist/components/ui/tooltip.cjs +126 -0
  525. package/dist/components/ui/tooltip.cjs.map +1 -0
  526. package/dist/components/ui/tooltip.d.ts +8 -0
  527. package/dist/components/ui/tooltip.d.ts.map +1 -0
  528. package/dist/components/ui/tooltip.js +91 -0
  529. package/dist/components/ui/tooltip.js.map +1 -0
  530. package/dist/components/ui/use-toast.cjs +187 -0
  531. package/dist/components/ui/use-toast.cjs.map +1 -0
  532. package/dist/components/ui/use-toast.d.ts +45 -0
  533. package/dist/components/ui/use-toast.d.ts.map +1 -0
  534. package/dist/components/ui/use-toast.js +153 -0
  535. package/dist/components/ui/use-toast.js.map +1 -0
  536. package/dist/components/upgrade-prompt/UpgradePrompt.cjs +80 -0
  537. package/dist/components/upgrade-prompt/UpgradePrompt.cjs.map +1 -0
  538. package/dist/components/upgrade-prompt/UpgradePrompt.d.ts +12 -0
  539. package/dist/components/upgrade-prompt/UpgradePrompt.d.ts.map +1 -0
  540. package/dist/components/upgrade-prompt/UpgradePrompt.js +46 -0
  541. package/dist/components/upgrade-prompt/UpgradePrompt.js.map +1 -0
  542. package/dist/components/upgrade-prompt/index.cjs +29 -0
  543. package/dist/components/upgrade-prompt/index.cjs.map +1 -0
  544. package/dist/components/upgrade-prompt/index.d.ts +3 -0
  545. package/dist/components/upgrade-prompt/index.d.ts.map +1 -0
  546. package/dist/components/upgrade-prompt/index.js +5 -0
  547. package/dist/components/upgrade-prompt/index.js.map +1 -0
  548. package/dist/hooks/useRecaptcha.cjs +91 -0
  549. package/dist/hooks/useRecaptcha.cjs.map +1 -0
  550. package/dist/hooks/useRecaptcha.d.ts +16 -0
  551. package/dist/hooks/useRecaptcha.d.ts.map +1 -0
  552. package/dist/hooks/useRecaptcha.js +67 -0
  553. package/dist/hooks/useRecaptcha.js.map +1 -0
  554. package/dist/lib/utils.cjs +48 -0
  555. package/dist/lib/utils.cjs.map +1 -0
  556. package/dist/lib/utils.d.cjs +17 -0
  557. package/dist/lib/utils.d.cjs.map +1 -0
  558. package/dist/lib/utils.d.js +1 -0
  559. package/dist/lib/utils.d.js.map +1 -0
  560. package/dist/lib/utils.d.ts +5 -0
  561. package/dist/lib/utils.d.ts.map +1 -0
  562. package/dist/lib/utils.js +22 -0
  563. package/dist/lib/utils.js.map +1 -0
  564. package/dist/styles.css +2 -0
  565. package/dist/types/nav.cjs +17 -0
  566. package/dist/types/nav.cjs.map +1 -0
  567. package/dist/types/nav.d.ts +17 -0
  568. package/dist/types/nav.d.ts.map +1 -0
  569. package/dist/types/nav.js +1 -0
  570. package/dist/types/nav.js.map +1 -0
  571. package/dist/types/sitemap.cjs +17 -0
  572. package/dist/types/sitemap.cjs.map +1 -0
  573. package/dist/types/sitemap.d.ts +19 -0
  574. package/dist/types/sitemap.d.ts.map +1 -0
  575. package/dist/types/sitemap.js +1 -0
  576. package/dist/types/sitemap.js.map +1 -0
  577. package/dist/types/unist.cjs +17 -0
  578. package/dist/types/unist.cjs.map +1 -0
  579. package/dist/types/unist.js +1 -0
  580. package/dist/types/unist.js.map +1 -0
  581. package/package.json +121 -0
  582. 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,5 @@
1
+ import * as React from 'react';
2
+ export declare function LangButton({ cookies }: {
3
+ cookies: any;
4
+ }): React.JSX.Element;
5
+ //# sourceMappingURL=langbutton.d.ts.map
@@ -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\">&rarr;</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\">&rarr;</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