@m5kdev/web-ui 0.9.2 → 0.9.3

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 (175) hide show
  1. package/dist/packages/backend/dist/src/modules/auth/auth.dto.d.mts +2 -2
  2. package/dist/packages/backend/dist/src/modules/auth/auth.dto.d.ts +2 -2
  3. package/dist/packages/backend/dist/src/types.d.mts +7 -7
  4. package/dist/packages/backend/dist/src/types.d.ts +7 -7
  5. package/dist/src/components/AvatarUpload.js +2 -2
  6. package/dist/src/components/AvatarUpload.mjs +2 -2
  7. package/dist/src/components/CardsSelect.js +1 -1
  8. package/dist/src/components/CardsSelect.mjs +1 -1
  9. package/dist/src/components/CollapsibleSidebarMenuItem.js +1 -1
  10. package/dist/src/components/CollapsibleSidebarMenuItem.mjs +1 -1
  11. package/dist/src/components/ColorPicker.d.mts +1 -1
  12. package/dist/src/components/ColorPicker.js +2 -2
  13. package/dist/src/components/ColorPicker.mjs +2 -2
  14. package/dist/src/components/CopyButton.d.mts +1 -1
  15. package/dist/src/components/CopyButton.js +3 -3
  16. package/dist/src/components/CopyButton.mjs +3 -3
  17. package/dist/src/components/CropDialog.js +2 -2
  18. package/dist/src/components/CropDialog.mjs +2 -2
  19. package/dist/src/components/DialogProvider.d.mts +1 -1
  20. package/dist/src/components/DialogProvider.js +1 -1
  21. package/dist/src/components/DialogProvider.mjs +1 -1
  22. package/dist/src/components/FileDropzone.js +1 -1
  23. package/dist/src/components/FileDropzone.mjs +1 -1
  24. package/dist/src/components/MultiSelectDropdown.js +1 -1
  25. package/dist/src/components/MultiSelectDropdown.mjs +1 -1
  26. package/dist/src/components/PageAlert.js +4 -3
  27. package/dist/src/components/PageAlert.js.map +1 -1
  28. package/dist/src/components/PageAlert.mjs +2 -2
  29. package/dist/src/components/SelectChips.d.mts +1 -1
  30. package/dist/src/components/SelectChips.js +1 -1
  31. package/dist/src/components/SelectChips.mjs +1 -1
  32. package/dist/src/components/Steps.js +1 -1
  33. package/dist/src/components/Steps.mjs +1 -1
  34. package/dist/src/components/TablerIconPicker.d.mts +1 -1
  35. package/dist/src/components/TablerIconPicker.js +1 -1
  36. package/dist/src/components/TablerIconPicker.mjs +1 -1
  37. package/dist/src/components/mode-toggle.js +1 -1
  38. package/dist/src/components/mode-toggle.mjs +1 -1
  39. package/dist/src/components/nav-main.d.mts +1 -1
  40. package/dist/src/components/nav-main.js +1 -1
  41. package/dist/src/components/nav-main.mjs +1 -1
  42. package/dist/src/components/pricing-cards.js +1 -1
  43. package/dist/src/components/pricing-cards.mjs +1 -1
  44. package/dist/src/components/shared/ButtonCopy.js +2 -2
  45. package/dist/src/components/shared/ButtonCopy.mjs +2 -2
  46. package/dist/src/components/team-switcher.js +1 -1
  47. package/dist/src/components/team-switcher.mjs +1 -1
  48. package/dist/src/components/ui/alert.d.mts +1 -1
  49. package/dist/src/components/ui/alert.js +2 -1
  50. package/dist/src/components/ui/alert.js.map +1 -1
  51. package/dist/src/components/ui/alert.mjs +1 -1
  52. package/dist/src/components/ui/badge.d.mts +1 -1
  53. package/dist/src/components/ui/badge.js +2 -1
  54. package/dist/src/components/ui/badge.js.map +1 -1
  55. package/dist/src/components/ui/badge.mjs +1 -1
  56. package/dist/src/components/ui/breadcrumb.js +2 -2
  57. package/dist/src/components/ui/breadcrumb.mjs +2 -2
  58. package/dist/src/components/ui/button.js +3 -2
  59. package/dist/src/components/ui/button.js.map +1 -1
  60. package/dist/src/components/ui/button.mjs +1 -1
  61. package/dist/src/components/ui/checkbox.js +1 -1
  62. package/dist/src/components/ui/checkbox.mjs +1 -1
  63. package/dist/src/components/ui/dialog.js +1 -1
  64. package/dist/src/components/ui/dialog.mjs +1 -1
  65. package/dist/src/components/ui/dropdown-menu.js +1 -1
  66. package/dist/src/components/ui/dropdown-menu.mjs +1 -1
  67. package/dist/src/components/ui/form.d.mts +1 -1
  68. package/dist/src/components/ui/form.js +1 -1
  69. package/dist/src/components/ui/form.mjs +1 -1
  70. package/dist/src/components/ui/label.js +1 -1
  71. package/dist/src/components/ui/label.mjs +1 -1
  72. package/dist/src/components/ui/pagination.js +1 -1
  73. package/dist/src/components/ui/pagination.mjs +1 -1
  74. package/dist/src/components/ui/resizable-navbar.js +1 -1
  75. package/dist/src/components/ui/resizable-navbar.mjs +1 -1
  76. package/dist/src/components/ui/select.js +1 -1
  77. package/dist/src/components/ui/select.mjs +1 -1
  78. package/dist/src/components/ui/sheet.d.mts +1 -1
  79. package/dist/src/components/ui/sheet.js +2 -2
  80. package/dist/src/components/ui/sheet.mjs +2 -2
  81. package/dist/src/components/ui/sidebar.js +3 -3
  82. package/dist/src/components/ui/sidebar.mjs +3 -3
  83. package/dist/src/components/ui/spinner.d.mts +1 -1
  84. package/dist/src/components/ui/spinner.js +1 -1
  85. package/dist/src/components/ui/spinner.mjs +1 -1
  86. package/dist/src/components/ui/toast.js +2 -2
  87. package/dist/src/components/ui/toast.mjs +2 -2
  88. package/dist/src/modules/app/components/AppLoader.d.mts +1 -1
  89. package/dist/src/modules/app/components/AppLoader.js +1 -1
  90. package/dist/src/modules/app/components/AppLoader.mjs +1 -1
  91. package/dist/src/modules/app/components/AppSidebarHeader.js +2 -2
  92. package/dist/src/modules/app/components/AppSidebarHeader.mjs +4 -4
  93. package/dist/src/modules/app/components/AppSidebarHeader.mjs.map +1 -1
  94. package/dist/src/modules/app/components/AppSidebarInvites.js +2 -2
  95. package/dist/src/modules/app/components/AppSidebarInvites.mjs +4 -4
  96. package/dist/src/modules/app/components/AppSidebarInvites.mjs.map +1 -1
  97. package/dist/src/modules/app/components/AppSidebarUser.js +1 -1
  98. package/dist/src/modules/app/components/AppSidebarUser.mjs +1 -1
  99. package/dist/src/modules/auth/components/AdminUserManagement.js +3 -3
  100. package/dist/src/modules/auth/components/AdminUserManagement.mjs +3 -3
  101. package/dist/src/modules/auth/components/AdminWaitlist.js +2 -2
  102. package/dist/src/modules/auth/components/AdminWaitlist.mjs +2 -2
  103. package/dist/src/modules/auth/components/AuthProviders.js +2 -2
  104. package/dist/src/modules/auth/components/AuthProviders.mjs +2 -2
  105. package/dist/src/modules/auth/components/ClaimAccountRoute.js +1 -1
  106. package/dist/src/modules/auth/components/ClaimAccountRoute.mjs +1 -1
  107. package/dist/src/modules/auth/components/ErrorAuthRoute.js +2 -2
  108. package/dist/src/modules/auth/components/ErrorAuthRoute.mjs +5 -5
  109. package/dist/src/modules/auth/components/ErrorAuthRoute.mjs.map +1 -1
  110. package/dist/src/modules/auth/components/ForgotPasswordForm.js +2 -2
  111. package/dist/src/modules/auth/components/ForgotPasswordForm.mjs +2 -2
  112. package/dist/src/modules/auth/components/ForgotPasswordRoute.js +2 -2
  113. package/dist/src/modules/auth/components/ForgotPasswordRoute.mjs +4 -4
  114. package/dist/src/modules/auth/components/ForgotPasswordRoute.mjs.map +1 -1
  115. package/dist/src/modules/auth/components/InviteFriends.js +2 -2
  116. package/dist/src/modules/auth/components/InviteFriends.mjs +2 -2
  117. package/dist/src/modules/auth/components/LastUsedBadge.d.mts +1 -1
  118. package/dist/src/modules/auth/components/LastUsedBadge.js +2 -2
  119. package/dist/src/modules/auth/components/LastUsedBadge.mjs +2 -2
  120. package/dist/src/modules/auth/components/LoginForm.js +2 -2
  121. package/dist/src/modules/auth/components/LoginForm.mjs +5 -5
  122. package/dist/src/modules/auth/components/LoginForm.mjs.map +1 -1
  123. package/dist/src/modules/auth/components/LoginRoute.js +2 -2
  124. package/dist/src/modules/auth/components/LoginRoute.mjs +5 -5
  125. package/dist/src/modules/auth/components/LoginRoute.mjs.map +1 -1
  126. package/dist/src/modules/auth/components/LogoutRoute.js +1 -1
  127. package/dist/src/modules/auth/components/LogoutRoute.mjs +1 -1
  128. package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.js +2 -2
  129. package/dist/src/modules/auth/components/OrganizationAcceptInvitationRoute.mjs +2 -2
  130. package/dist/src/modules/auth/components/OrganizationMembersRoute.js +4 -4
  131. package/dist/src/modules/auth/components/OrganizationMembersRoute.mjs +4 -4
  132. package/dist/src/modules/auth/components/OrganizationPreferences.js +2 -2
  133. package/dist/src/modules/auth/components/OrganizationPreferences.mjs +2 -2
  134. package/dist/src/modules/auth/components/OrganizationSettingsRoute.js +3 -3
  135. package/dist/src/modules/auth/components/OrganizationSettingsRoute.mjs +3 -3
  136. package/dist/src/modules/auth/components/OrganizationSwitcher.js +4 -4
  137. package/dist/src/modules/auth/components/OrganizationSwitcher.mjs +6 -6
  138. package/dist/src/modules/auth/components/OrganizationSwitcher.mjs.map +1 -1
  139. package/dist/src/modules/auth/components/PreferencesEditor.js +1 -1
  140. package/dist/src/modules/auth/components/PreferencesEditor.mjs +1 -1
  141. package/dist/src/modules/auth/components/ProfileRoute.js +2 -2
  142. package/dist/src/modules/auth/components/ProfileRoute.mjs +2 -2
  143. package/dist/src/modules/auth/components/RangeNuqsDatePicker.js +2 -2
  144. package/dist/src/modules/auth/components/RangeNuqsDatePicker.mjs +2 -2
  145. package/dist/src/modules/auth/components/ResetPasswordForm.js +2 -2
  146. package/dist/src/modules/auth/components/ResetPasswordForm.mjs +4 -4
  147. package/dist/src/modules/auth/components/ResetPasswordForm.mjs.map +1 -1
  148. package/dist/src/modules/auth/components/ResetPasswordRoute.js +2 -2
  149. package/dist/src/modules/auth/components/ResetPasswordRoute.mjs +4 -4
  150. package/dist/src/modules/auth/components/ResetPasswordRoute.mjs.map +1 -1
  151. package/dist/src/modules/auth/components/SignupFormRoute.js +2 -2
  152. package/dist/src/modules/auth/components/SignupFormRoute.mjs +2 -2
  153. package/dist/src/modules/auth/components/SignupRoute.js +2 -2
  154. package/dist/src/modules/auth/components/SignupRoute.mjs +4 -4
  155. package/dist/src/modules/auth/components/SignupRoute.mjs.map +1 -1
  156. package/dist/src/modules/auth/components/UserPreferences.js +1 -1
  157. package/dist/src/modules/auth/components/UserPreferences.mjs +1 -1
  158. package/dist/src/modules/auth/components/WaitlistCard.js +2 -2
  159. package/dist/src/modules/auth/components/WaitlistCard.mjs +2 -2
  160. package/dist/src/modules/auth/components/WaitlistCodeValidation.js +2 -2
  161. package/dist/src/modules/auth/components/WaitlistCodeValidation.mjs +2 -2
  162. package/dist/src/modules/billing/components/BillingBetaPage.js +1 -1
  163. package/dist/src/modules/billing/components/BillingBetaPage.mjs +1 -1
  164. package/dist/src/modules/billing/components/BillingInvoicePage.js +3 -3
  165. package/dist/src/modules/billing/components/BillingInvoicePage.mjs +3 -3
  166. package/dist/src/modules/billing/components/BillingSinglePlanSelect.js +3 -3
  167. package/dist/src/modules/billing/components/BillingSinglePlanSelect.mjs +5 -5
  168. package/dist/src/modules/billing/components/BillingSinglePlanSelect.mjs.map +1 -1
  169. package/dist/src/modules/table/components/ColumnOrderAndVisibility.js +1 -1
  170. package/dist/src/modules/table/components/ColumnOrderAndVisibility.mjs +1 -1
  171. package/dist/src/modules/table/components/NuqsTable.js +2 -2
  172. package/dist/src/modules/table/components/NuqsTable.mjs +2 -2
  173. package/dist/src/modules/table/components/TableFiltering.js +2 -2
  174. package/dist/src/modules/table/components/TableFiltering.mjs +2 -2
  175. package/package.json +5 -5
@@ -1,7 +1,7 @@
1
1
  import { useEffect } from "react";
2
- import { Spinner } from "@heroui/react";
3
2
  import { jsx } from "react/jsx-runtime";
4
3
  import { useNavigate } from "react-router";
4
+ import { Spinner } from "@heroui/react";
5
5
  import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
6
6
  //#region src/modules/auth/components/LogoutRoute.tsx
7
7
  function Logout() {
@@ -1,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../../_virtual/_rolldown/runtime.js");
3
3
  let react = require("react");
4
- let _heroui_react = require("@heroui/react");
5
- let react_jsx_runtime = require("react/jsx-runtime");
6
4
  let react_i18next = require("react-i18next");
5
+ let react_jsx_runtime = require("react/jsx-runtime");
7
6
  let react_router = require("react-router");
7
+ let _heroui_react = require("@heroui/react");
8
8
  let sonner = require("sonner");
9
9
  let _m5kdev_frontend_modules_auth_auth_lib = require("@m5kdev/frontend/modules/auth/auth.lib");
10
10
  let _m5kdev_frontend_modules_auth_hooks_useSession = require("@m5kdev/frontend/modules/auth/hooks/useSession");
@@ -1,8 +1,8 @@
1
1
  import { useEffect, useMemo, useState } from "react";
2
- import { Card, CardBody, CardHeader, Spinner } from "@heroui/react";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
2
  import { useTranslation } from "react-i18next";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
5
4
  import { useLocation, useNavigate, useSearchParams } from "react-router";
5
+ import { Card, CardBody, CardHeader, Spinner } from "@heroui/react";
6
6
  import { toast } from "sonner";
7
7
  import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
8
8
  import { useSession } from "@m5kdev/frontend/modules/auth/hooks/useSession";
@@ -1,13 +1,13 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../../_virtual/_rolldown/runtime.js");
3
- let react = require("react");
4
- let _heroui_react = require("@heroui/react");
5
- let react_jsx_runtime = require("react/jsx-runtime");
6
3
  let lucide_react = require("lucide-react");
4
+ let react = require("react");
7
5
  let react_i18next = require("react-i18next");
6
+ let react_jsx_runtime = require("react/jsx-runtime");
7
+ let _heroui_react = require("@heroui/react");
8
8
  let sonner = require("sonner");
9
- let _m5kdev_frontend_modules_auth_auth_lib = require("@m5kdev/frontend/modules/auth/auth.lib");
10
9
  let _tanstack_react_query = require("@tanstack/react-query");
10
+ let _m5kdev_frontend_modules_auth_auth_lib = require("@m5kdev/frontend/modules/auth/auth.lib");
11
11
  let _m5kdev_frontend_modules_auth_hooks_useSession = require("@m5kdev/frontend/modules/auth/hooks/useSession");
12
12
  //#region src/modules/auth/components/OrganizationMembersRoute.tsx
13
13
  const ORGANIZATION_ROLES = [
@@ -1,11 +1,11 @@
1
- import { useCallback, useEffect, useMemo, useRef, useState } from "react";
2
- import { Button, Card, CardBody, CardHeader, Chip, Input, Select, SelectItem, Spinner, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow } from "@heroui/react";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
1
  import { Copy, Trash2, UserPlus, Users } from "lucide-react";
2
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
5
3
  import { useTranslation } from "react-i18next";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { Button, Card, CardBody, CardHeader, Chip, Input, Select, SelectItem, Spinner, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow } from "@heroui/react";
6
6
  import { toast } from "sonner";
7
- import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
8
7
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
8
+ import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
9
9
  import { useSession } from "@m5kdev/frontend/modules/auth/hooks/useSession";
10
10
  //#region src/modules/auth/components/OrganizationMembersRoute.tsx
11
11
  const ORGANIZATION_ROLES = [
@@ -2,9 +2,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../../_virtual/_rolldown/runtime.js");
3
3
  const require_src_modules_auth_components_PreferencesEditor = require("./PreferencesEditor.js");
4
4
  let react = require("react");
5
- let _heroui_react = require("@heroui/react");
6
- let react_jsx_runtime = require("react/jsx-runtime");
7
5
  let react_i18next = require("react-i18next");
6
+ let react_jsx_runtime = require("react/jsx-runtime");
7
+ let _heroui_react = require("@heroui/react");
8
8
  let _tanstack_react_query = require("@tanstack/react-query");
9
9
  let _m5kdev_frontend_modules_auth_hooks_useSession = require("@m5kdev/frontend/modules/auth/hooks/useSession");
10
10
  //#region src/modules/auth/components/OrganizationPreferences.tsx
@@ -1,8 +1,8 @@
1
1
  import { PreferencesEditor } from "./PreferencesEditor.mjs";
2
2
  import { useCallback, useMemo } from "react";
3
- import { Card, CardBody, CardHeader } from "@heroui/react";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
3
  import { useTranslation } from "react-i18next";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { Card, CardBody, CardHeader } from "@heroui/react";
6
6
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
7
7
  import { useSession } from "@m5kdev/frontend/modules/auth/hooks/useSession";
8
8
  //#region src/modules/auth/components/OrganizationPreferences.tsx
@@ -1,12 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../../_virtual/_rolldown/runtime.js");
3
3
  let react = require("react");
4
- let _heroui_react = require("@heroui/react");
5
- let react_jsx_runtime = require("react/jsx-runtime");
6
4
  let react_i18next = require("react-i18next");
5
+ let react_jsx_runtime = require("react/jsx-runtime");
6
+ let _heroui_react = require("@heroui/react");
7
7
  let sonner = require("sonner");
8
- let _m5kdev_frontend_modules_auth_auth_lib = require("@m5kdev/frontend/modules/auth/auth.lib");
9
8
  let _tanstack_react_query = require("@tanstack/react-query");
9
+ let _m5kdev_frontend_modules_auth_auth_lib = require("@m5kdev/frontend/modules/auth/auth.lib");
10
10
  let _m5kdev_frontend_modules_auth_hooks_useSession = require("@m5kdev/frontend/modules/auth/hooks/useSession");
11
11
  //#region src/modules/auth/components/OrganizationSettingsRoute.tsx
12
12
  function OrganizationStateCard({ title, message }) {
@@ -1,10 +1,10 @@
1
1
  import { useCallback, useEffect, useMemo, useState } from "react";
2
- import { Button, Card, CardBody, CardHeader, Chip, Input, Spinner, Textarea } from "@heroui/react";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
2
  import { useTranslation } from "react-i18next";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { Button, Card, CardBody, CardHeader, Chip, Input, Spinner, Textarea } from "@heroui/react";
5
5
  import { toast } from "sonner";
6
- import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
7
6
  import { useQuery, useQueryClient } from "@tanstack/react-query";
7
+ import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
8
8
  import { useSession } from "@m5kdev/frontend/modules/auth/hooks/useSession";
9
9
  //#region src/modules/auth/components/OrganizationSettingsRoute.tsx
10
10
  function OrganizationStateCard({ title, message }) {
@@ -2,15 +2,15 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../../_virtual/_rolldown/runtime.js");
3
3
  const require_src_lib_utils = require("../../../lib/utils.js");
4
4
  const require_src_components_ui_sidebar = require("../../../components/ui/sidebar.js");
5
- let react = require("react");
6
- let _heroui_react = require("@heroui/react");
7
- let react_jsx_runtime = require("react/jsx-runtime");
8
5
  let lucide_react = require("lucide-react");
6
+ let react = require("react");
9
7
  let react_i18next = require("react-i18next");
8
+ let react_jsx_runtime = require("react/jsx-runtime");
10
9
  let react_router = require("react-router");
10
+ let _heroui_react = require("@heroui/react");
11
11
  let sonner = require("sonner");
12
- let _m5kdev_frontend_modules_auth_auth_lib = require("@m5kdev/frontend/modules/auth/auth.lib");
13
12
  let _tanstack_react_query = require("@tanstack/react-query");
13
+ let _m5kdev_frontend_modules_auth_auth_lib = require("@m5kdev/frontend/modules/auth/auth.lib");
14
14
  let _m5kdev_frontend_modules_auth_hooks_useSession = require("@m5kdev/frontend/modules/auth/hooks/useSession");
15
15
  //#region src/modules/auth/components/OrganizationSwitcher.tsx
16
16
  function OrganizationSwitcher({ onInvalidateScopedQueries, managerRoles = ["admin", "owner"], managerPath = "/organization/members", fallbackPath = "/" }) {
@@ -1,14 +1,14 @@
1
1
  import { cn } from "../../../lib/utils.mjs";
2
2
  import { useSidebar } from "../../../components/ui/sidebar.mjs";
3
- import { useCallback, useMemo, useState } from "react";
4
- import { Button, Select, SelectItem } from "@heroui/react";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
3
  import { Building2 } from "lucide-react";
4
+ import { useCallback, useMemo, useState } from "react";
7
5
  import { useTranslation } from "react-i18next";
8
- import { Link as Link$1 } from "react-router";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { Link } from "react-router";
8
+ import { Button, Select, SelectItem } from "@heroui/react";
9
9
  import { toast } from "sonner";
10
- import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
11
10
  import { useQuery } from "@tanstack/react-query";
11
+ import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
12
12
  import { useSession } from "@m5kdev/frontend/modules/auth/hooks/useSession";
13
13
  //#region src/modules/auth/components/OrganizationSwitcher.tsx
14
14
  function OrganizationSwitcher({ onInvalidateScopedQueries, managerRoles = ["admin", "owner"], managerPath = "/organization/members", fallbackPath = "/" }) {
@@ -50,7 +50,7 @@ function OrganizationSwitcher({ onInvalidateScopedQueries, managerRoles = ["admi
50
50
  t
51
51
  ]);
52
52
  if (!open) return /* @__PURE__ */ jsx(Button, {
53
- as: Link$1,
53
+ as: Link,
54
54
  to: canManageOrganization ? managerPath : fallbackPath,
55
55
  variant: "light",
56
56
  size: "sm",
@@ -1 +1 @@
1
- {"version":3,"file":"OrganizationSwitcher.mjs","names":["Link"],"sources":["../../../../../src/modules/auth/components/OrganizationSwitcher.tsx"],"sourcesContent":["import { Button, Select, SelectItem } from \"@heroui/react\";\r\nimport { authClient } from \"@m5kdev/frontend/modules/auth/auth.lib\";\r\nimport { useSession } from \"@m5kdev/frontend/modules/auth/hooks/useSession\";\r\nimport { useQuery } from \"@tanstack/react-query\";\r\nimport { Building2 } from \"lucide-react\";\r\nimport { useCallback, useMemo, useState } from \"react\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { Link } from \"react-router\";\r\nimport { toast } from \"sonner\";\r\nimport { useSidebar } from \"../../../components/ui/sidebar\";\r\nimport { cn } from \"../../../lib/utils\";\r\n\r\ntype OrganizationOption = {\r\n id: string;\r\n name: string;\r\n slug: string;\r\n};\r\n\r\nexport type OrganizationSwitcherProps = {\r\n onInvalidateScopedQueries?: () => void | Promise<void>;\r\n managerRoles?: string[];\r\n managerPath?: string;\r\n fallbackPath?: string;\r\n};\r\n\r\nexport function OrganizationSwitcher({\r\n onInvalidateScopedQueries,\r\n managerRoles = [\"admin\", \"owner\"],\r\n managerPath = \"/organization/members\",\r\n fallbackPath = \"/\",\r\n}: OrganizationSwitcherProps) {\r\n const { t } = useTranslation();\r\n const { data: session, registerSession } = useSession();\r\n const { open } = useSidebar();\r\n const [isSwitching, setIsSwitching] = useState(false);\r\n const activeOrganizationId = session?.session.activeOrganizationId ?? null;\r\n const activeOrganizationRole =\r\n (session?.session as { activeOrganizationRole?: string } | undefined)?.activeOrganizationRole ??\r\n \"\";\r\n const managerRoleSet = useMemo(() => new Set(managerRoles), [managerRoles]);\r\n const canManageOrganization = managerRoleSet.has(activeOrganizationRole);\r\n\r\n const {\r\n data: organizations = [],\r\n isError,\r\n error,\r\n refetch,\r\n } = useQuery({\r\n queryKey: [\"auth-organization-list\"],\r\n queryFn: async () => {\r\n const { data, error } = await authClient.organization.list();\r\n if (error) {\r\n throw new Error(\r\n error.message ?? t(\"web-ui:organization.switcher.failedToLoadOrganizations\")\r\n );\r\n }\r\n return (data ?? []) as OrganizationOption[];\r\n },\r\n });\r\n\r\n const handleSwitchOrganization = useCallback(\r\n async (organizationId: string) => {\r\n if (!organizationId || organizationId === activeOrganizationId || isSwitching) {\r\n return;\r\n }\r\n\r\n try {\r\n setIsSwitching(true);\r\n const { error } = await authClient.organization.setActive({ organizationId });\r\n if (error) {\r\n throw new Error(\r\n error.message ?? t(\"web-ui:organization.switcher.failedToSwitchOrganization\")\r\n );\r\n }\r\n\r\n registerSession(() => {\r\n void onInvalidateScopedQueries?.();\r\n });\r\n toast.success(t(\"web-ui:organization.switcher.organizationSwitched\"));\r\n } catch (error) {\r\n toast.error(\r\n error instanceof Error\r\n ? error.message\r\n : t(\"web-ui:organization.switcher.failedToSwitchOrganization\")\r\n );\r\n } finally {\r\n setIsSwitching(false);\r\n }\r\n },\r\n [activeOrganizationId, isSwitching, onInvalidateScopedQueries, registerSession, t]\r\n );\r\n\r\n if (!open) {\r\n return (\r\n <Button\r\n as={Link}\r\n to={canManageOrganization ? managerPath : fallbackPath}\r\n variant=\"light\"\r\n size=\"sm\"\r\n isIconOnly\r\n aria-label={t(\"web-ui:organization.switcher.label\")}\r\n >\r\n <Building2 className=\"h-4 w-4\" />\r\n </Button>\r\n );\r\n }\r\n\r\n if (isError) {\r\n return (\r\n <div className=\"mb-4 flex flex-col gap-2\">\r\n <p className=\"text-sm text-destructive\">\r\n {error instanceof Error\r\n ? error.message\r\n : t(\"web-ui:organization.switcher.failedToLoadOrganizations\")}\r\n </p>\r\n <Button size=\"sm\" variant=\"flat\" onPress={() => void refetch()}>\r\n {t(\"web-ui:organization.switcher.retry\")}\r\n </Button>\r\n </div>\r\n );\r\n }\r\n\r\n return (\r\n <div className=\"mb-4\">\r\n <Select\r\n size=\"sm\"\r\n label={t(\"web-ui:organization.switcher.label\")}\r\n selectedKeys={activeOrganizationId ? [activeOrganizationId] : []}\r\n disallowEmptySelection\r\n isDisabled={isSwitching || organizations.length === 0}\r\n onSelectionChange={(keys) => {\r\n const selectedOrganizationId = Array.from(keys as Set<string>)[0];\r\n if (selectedOrganizationId) {\r\n void handleSwitchOrganization(selectedOrganizationId);\r\n }\r\n }}\r\n classNames={{\r\n trigger: cn(\"min-h-10\"),\r\n value: cn(\"text-sm\"),\r\n }}\r\n >\r\n {organizations.map((organization) => (\r\n <SelectItem key={organization.id}>{organization.name}</SelectItem>\r\n ))}\r\n </Select>\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;;;;;;;;AAyBA,SAAgB,qBAAqB,EACnC,2BACA,eAAe,CAAC,SAAS,QAAQ,EACjC,cAAc,yBACd,eAAe,OACa;CAC5B,MAAM,EAAE,MAAM,gBAAgB;CAC9B,MAAM,EAAE,MAAM,SAAS,oBAAoB,YAAY;CACvD,MAAM,EAAE,SAAS,YAAY;CAC7B,MAAM,CAAC,aAAa,kBAAkB,SAAS,MAAM;CACrD,MAAM,uBAAuB,SAAS,QAAQ,wBAAwB;CACtE,MAAM,0BACH,SAAS,UAA6D,0BACvE;CAEF,MAAM,wBADiB,cAAc,IAAI,IAAI,aAAa,EAAE,CAAC,aAAa,CAAC,CAC9B,IAAI,uBAAuB;CAExE,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b,oBAAC,QAAD;GACE,MAAK;GACL,OAAO,EAAE,qCAAqC;GAC9C,cAAc,uBAAuB,CAAC,qBAAqB,GAAG,EAAE;GAChE,wBAAA;GACA,YAAY,eAAe,cAAc,WAAW;GACpD,oBAAoB,SAAS;IAC3B,MAAM,yBAAyB,MAAM,KAAK,KAAoB,CAAC;AAC/D,QAAI,uBACG,0BAAyB,uBAAuB;;GAGzD,YAAY;IACV,SAAS,GAAG,WAAW;IACvB,OAAO,GAAG,UAAU;IACrB;aAEA,cAAc,KAAK,iBAClB,oBAAC,YAAD,EAAA,UAAmC,aAAa,MAAkB,EAAjD,aAAa,GAAoC,CAClE;GACK,CAAA;EACL,CAAA"}
1
+ {"version":3,"file":"OrganizationSwitcher.mjs","names":[],"sources":["../../../../../src/modules/auth/components/OrganizationSwitcher.tsx"],"sourcesContent":["import { Button, Select, SelectItem } from \"@heroui/react\";\r\nimport { authClient } from \"@m5kdev/frontend/modules/auth/auth.lib\";\r\nimport { useSession } from \"@m5kdev/frontend/modules/auth/hooks/useSession\";\r\nimport { useQuery } from \"@tanstack/react-query\";\r\nimport { Building2 } from \"lucide-react\";\r\nimport { useCallback, useMemo, useState } from \"react\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { Link } from \"react-router\";\r\nimport { toast } from \"sonner\";\r\nimport { useSidebar } from \"../../../components/ui/sidebar\";\r\nimport { cn } from \"../../../lib/utils\";\r\n\r\ntype OrganizationOption = {\r\n id: string;\r\n name: string;\r\n slug: string;\r\n};\r\n\r\nexport type OrganizationSwitcherProps = {\r\n onInvalidateScopedQueries?: () => void | Promise<void>;\r\n managerRoles?: string[];\r\n managerPath?: string;\r\n fallbackPath?: string;\r\n};\r\n\r\nexport function OrganizationSwitcher({\r\n onInvalidateScopedQueries,\r\n managerRoles = [\"admin\", \"owner\"],\r\n managerPath = \"/organization/members\",\r\n fallbackPath = \"/\",\r\n}: OrganizationSwitcherProps) {\r\n const { t } = useTranslation();\r\n const { data: session, registerSession } = useSession();\r\n const { open } = useSidebar();\r\n const [isSwitching, setIsSwitching] = useState(false);\r\n const activeOrganizationId = session?.session.activeOrganizationId ?? null;\r\n const activeOrganizationRole =\r\n (session?.session as { activeOrganizationRole?: string } | undefined)?.activeOrganizationRole ??\r\n \"\";\r\n const managerRoleSet = useMemo(() => new Set(managerRoles), [managerRoles]);\r\n const canManageOrganization = managerRoleSet.has(activeOrganizationRole);\r\n\r\n const {\r\n data: organizations = [],\r\n isError,\r\n error,\r\n refetch,\r\n } = useQuery({\r\n queryKey: [\"auth-organization-list\"],\r\n queryFn: async () => {\r\n const { data, error } = await authClient.organization.list();\r\n if (error) {\r\n throw new Error(\r\n error.message ?? t(\"web-ui:organization.switcher.failedToLoadOrganizations\")\r\n );\r\n }\r\n return (data ?? []) as OrganizationOption[];\r\n },\r\n });\r\n\r\n const handleSwitchOrganization = useCallback(\r\n async (organizationId: string) => {\r\n if (!organizationId || organizationId === activeOrganizationId || isSwitching) {\r\n return;\r\n }\r\n\r\n try {\r\n setIsSwitching(true);\r\n const { error } = await authClient.organization.setActive({ organizationId });\r\n if (error) {\r\n throw new Error(\r\n error.message ?? t(\"web-ui:organization.switcher.failedToSwitchOrganization\")\r\n );\r\n }\r\n\r\n registerSession(() => {\r\n void onInvalidateScopedQueries?.();\r\n });\r\n toast.success(t(\"web-ui:organization.switcher.organizationSwitched\"));\r\n } catch (error) {\r\n toast.error(\r\n error instanceof Error\r\n ? error.message\r\n : t(\"web-ui:organization.switcher.failedToSwitchOrganization\")\r\n );\r\n } finally {\r\n setIsSwitching(false);\r\n }\r\n },\r\n [activeOrganizationId, isSwitching, onInvalidateScopedQueries, registerSession, t]\r\n );\r\n\r\n if (!open) {\r\n return (\r\n <Button\r\n as={Link}\r\n to={canManageOrganization ? managerPath : fallbackPath}\r\n variant=\"light\"\r\n size=\"sm\"\r\n isIconOnly\r\n aria-label={t(\"web-ui:organization.switcher.label\")}\r\n >\r\n <Building2 className=\"h-4 w-4\" />\r\n </Button>\r\n );\r\n }\r\n\r\n if (isError) {\r\n return (\r\n <div className=\"mb-4 flex flex-col gap-2\">\r\n <p className=\"text-sm text-destructive\">\r\n {error instanceof Error\r\n ? error.message\r\n : t(\"web-ui:organization.switcher.failedToLoadOrganizations\")}\r\n </p>\r\n <Button size=\"sm\" variant=\"flat\" onPress={() => void refetch()}>\r\n {t(\"web-ui:organization.switcher.retry\")}\r\n </Button>\r\n </div>\r\n );\r\n }\r\n\r\n return (\r\n <div className=\"mb-4\">\r\n <Select\r\n size=\"sm\"\r\n label={t(\"web-ui:organization.switcher.label\")}\r\n selectedKeys={activeOrganizationId ? [activeOrganizationId] : []}\r\n disallowEmptySelection\r\n isDisabled={isSwitching || organizations.length === 0}\r\n onSelectionChange={(keys) => {\r\n const selectedOrganizationId = Array.from(keys as Set<string>)[0];\r\n if (selectedOrganizationId) {\r\n void handleSwitchOrganization(selectedOrganizationId);\r\n }\r\n }}\r\n classNames={{\r\n trigger: cn(\"min-h-10\"),\r\n value: cn(\"text-sm\"),\r\n }}\r\n >\r\n {organizations.map((organization) => (\r\n <SelectItem key={organization.id}>{organization.name}</SelectItem>\r\n ))}\r\n </Select>\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;;;;;;;;AAyBA,SAAgB,qBAAqB,EACnC,2BACA,eAAe,CAAC,SAAS,QAAQ,EACjC,cAAc,yBACd,eAAe,OACa;CAC5B,MAAM,EAAE,MAAM,gBAAgB;CAC9B,MAAM,EAAE,MAAM,SAAS,oBAAoB,YAAY;CACvD,MAAM,EAAE,SAAS,YAAY;CAC7B,MAAM,CAAC,aAAa,kBAAkB,SAAS,MAAM;CACrD,MAAM,uBAAuB,SAAS,QAAQ,wBAAwB;CACtE,MAAM,0BACH,SAAS,UAA6D,0BACvE;CAEF,MAAM,wBADiB,cAAc,IAAI,IAAI,aAAa,EAAE,CAAC,aAAa,CAAC,CAC9B,IAAI,uBAAuB;CAExE,MAAM,EACJ,MAAM,gBAAgB,EAAE,EACxB,SACA,OACA,YACE,SA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C,cAAc,uBAAuB,CAAC,qBAAqB,GAAG,EAAE;GAChE,wBAAA;GACA,YAAY,eAAe,cAAc,WAAW;GACpD,oBAAoB,SAAS;IAC3B,MAAM,yBAAyB,MAAM,KAAK,KAAoB,CAAC;AAC/D,QAAI,uBACG,0BAAyB,uBAAuB;;GAGzD,YAAY;IACV,SAAS,GAAG,WAAW;IACvB,OAAO,GAAG,UAAU;IACrB;aAEA,cAAc,KAAK,iBAClB,oBAAC,YAAD,EAAA,UAAmC,aAAa,MAAkB,EAAjD,aAAa,GAAoC,CAClE;GACK,CAAA;EACL,CAAA"}
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../../_virtual/_rolldown/runtime.js");
3
- let _heroui_react = require("@heroui/react");
4
3
  let react_jsx_runtime = require("react/jsx-runtime");
4
+ let _heroui_react = require("@heroui/react");
5
5
  let sonner = require("sonner");
6
6
  //#region src/modules/auth/components/PreferencesEditor.tsx
7
7
  function PreferencesEditor({ schema, controls, values, isLoading, isPending, labels, updateValues }) {
@@ -1,5 +1,5 @@
1
- import { Button, Form, Input, Select, SelectItem, Switch } from "@heroui/react";
2
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Button, Form, Input, Select, SelectItem, Switch } from "@heroui/react";
3
3
  import { toast } from "sonner";
4
4
  //#region src/modules/auth/components/PreferencesEditor.tsx
5
5
  function PreferencesEditor({ schema, controls, values, isLoading, isPending, labels, updateValues }) {
@@ -2,9 +2,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../../_virtual/_rolldown/runtime.js");
3
3
  const require_src_components_AvatarUpload = require("../../../components/AvatarUpload.js");
4
4
  const require_src_components_ui_form = require("../../../components/ui/form.js");
5
- let _heroui_react = require("@heroui/react");
6
- let react_jsx_runtime = require("react/jsx-runtime");
7
5
  let react_i18next = require("react-i18next");
6
+ let react_jsx_runtime = require("react/jsx-runtime");
7
+ let _heroui_react = require("@heroui/react");
8
8
  let sonner = require("sonner");
9
9
  let react_hook_form = require("react-hook-form");
10
10
  let _m5kdev_frontend_modules_auth_auth_lib = require("@m5kdev/frontend/modules/auth/auth.lib");
@@ -1,8 +1,8 @@
1
1
  import { AvatarUpload } from "../../../components/AvatarUpload.mjs";
2
2
  import { Form as Form$1, FormControl, FormField, FormItem, FormLabel, FormMessage } from "../../../components/ui/form.mjs";
3
- import { Button, Card, CardBody, CardHeader, Input } from "@heroui/react";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
3
  import { useTranslation } from "react-i18next";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { Button, Card, CardBody, CardHeader, Input } from "@heroui/react";
6
6
  import { toast } from "sonner";
7
7
  import { useForm } from "react-hook-form";
8
8
  import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../../_virtual/_rolldown/runtime.js");
3
3
  let react = require("react");
4
- let _heroui_react = require("@heroui/react");
5
- let react_jsx_runtime = require("react/jsx-runtime");
6
4
  let react_i18next = require("react-i18next");
5
+ let react_jsx_runtime = require("react/jsx-runtime");
6
+ let _heroui_react = require("@heroui/react");
7
7
  let _internationalized_date = require("@internationalized/date");
8
8
  let luxon = require("luxon");
9
9
  let _m5kdev_frontend_modules_table_hooks_useNuqsQueryParams = require("@m5kdev/frontend/modules/table/hooks/useNuqsQueryParams");
@@ -1,7 +1,7 @@
1
1
  import { startTransition, useEffect, useMemo, useState } from "react";
2
- import { DateRangePicker, Select, SelectItem } from "@heroui/react";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
2
  import { useTranslation } from "react-i18next";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { DateRangePicker, Select, SelectItem } from "@heroui/react";
5
5
  import { CalendarDate, getLocalTimeZone, today } from "@internationalized/date";
6
6
  import { DateTime } from "luxon";
7
7
  import { useNuqsQueryParams } from "@m5kdev/frontend/modules/table/hooks/useNuqsQueryParams";
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../../_virtual/_rolldown/runtime.js");
3
- let _heroui_react = require("@heroui/react");
4
- let react_jsx_runtime = require("react/jsx-runtime");
5
3
  let react_i18next = require("react-i18next");
4
+ let react_jsx_runtime = require("react/jsx-runtime");
6
5
  let react_router = require("react-router");
6
+ let _heroui_react = require("@heroui/react");
7
7
  let sonner = require("sonner");
8
8
  let react_hook_form = require("react-hook-form");
9
9
  let _m5kdev_frontend_modules_auth_auth_lib = require("@m5kdev/frontend/modules/auth/auth.lib");
@@ -1,7 +1,7 @@
1
- import { Button, Card, CardBody, CardHeader, Input } from "@heroui/react";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
1
  import { useTranslation } from "react-i18next";
4
- import { Link as Link$1, useSearchParams } from "react-router";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { Link, useSearchParams } from "react-router";
4
+ import { Button, Card, CardBody, CardHeader, Input } from "@heroui/react";
5
5
  import { toast } from "sonner";
6
6
  import { useForm } from "react-hook-form";
7
7
  import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
@@ -86,7 +86,7 @@ function ResetPasswordForm() {
86
86
  children: [
87
87
  t("web-ui:auth.forgotPassword.rememberPassword"),
88
88
  " ",
89
- /* @__PURE__ */ jsx(Link$1, {
89
+ /* @__PURE__ */ jsx(Link, {
90
90
  to: "/login",
91
91
  className: "underline underline-offset-4 hover:text-primary",
92
92
  children: t("web-ui:auth.login.button")
@@ -1 +1 @@
1
- {"version":3,"file":"ResetPasswordForm.mjs","names":["Link"],"sources":["../../../../../src/modules/auth/components/ResetPasswordForm.tsx"],"sourcesContent":["import { Button, Card, CardBody, CardHeader, Input } from \"@heroui/react\";\r\nimport { authClient } from \"@m5kdev/frontend/modules/auth/auth.lib\";\r\nimport { type SubmitHandler, useForm } from \"react-hook-form\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { Link, useSearchParams } from \"react-router\";\r\nimport { toast } from \"sonner\";\r\n\r\ntype Inputs = {\r\n password: string;\r\n confirmPassword: string;\r\n};\r\n\r\nexport function ResetPasswordForm() {\r\n const { t } = useTranslation();\r\n const {\r\n register,\r\n handleSubmit,\r\n setError,\r\n formState: { errors },\r\n } = useForm<Inputs>();\r\n const [searchParams] = useSearchParams();\r\n const token = searchParams.get(\"token\");\r\n\r\n const onSubmit: SubmitHandler<Inputs> = (data) => {\r\n if (data.password !== data.confirmPassword) {\r\n setError(\"confirmPassword\", { message: t(\"web-ui:auth.resetPassword.passwordMismatch\") });\r\n return;\r\n }\r\n\r\n if (!token) {\r\n throw new Error(t(\"web-ui:auth.resetPassword.tokenRequired\"));\r\n }\r\n\r\n authClient\r\n .resetPassword({\r\n newPassword: data.password,\r\n token,\r\n })\r\n .then(() => {\r\n toast.success(t(\"web-ui:auth.resetPassword.success\"));\r\n // Optionally, redirect\r\n })\r\n .catch(() => {\r\n toast.error(t(\"web-ui:auth.resetPassword.error\"));\r\n });\r\n };\r\n\r\n return (\r\n <div className=\"flex flex-col gap-6\">\r\n <Card>\r\n <CardHeader className=\"text-center flex flex-col gap-1\">\r\n <h2 className=\"text-xl font-semibold\">{t(\"web-ui:auth.resetPassword.title\")}</h2>\r\n <p className=\"text-sm text-default-600\">{t(\"web-ui:auth.resetPassword.description\")}</p>\r\n </CardHeader>\r\n <CardBody className=\"gap-6\">\r\n <form onSubmit={handleSubmit(onSubmit)} className=\"grid gap-6\">\r\n <div className=\"grid gap-2\">\r\n <Input\r\n labelPlacement=\"outside\"\r\n label={t(\"web-ui:auth.resetPassword.newPassword\")}\r\n placeholder={t(\"web-ui:auth.resetPassword.newPassword\")}\r\n type=\"password\"\r\n variant=\"bordered\"\r\n isRequired\r\n {...register(\"password\", {\r\n required: t(\"web-ui:auth.resetPassword.passwordRequired\"),\r\n })}\r\n />\r\n {errors.password && (\r\n <span className=\"text-red-500 text-xs\">{errors.password.message}</span>\r\n )}\r\n </div>\r\n <div className=\"grid gap-2\">\r\n <Input\r\n labelPlacement=\"outside\"\r\n label={t(\"web-ui:auth.resetPassword.confirmPassword\")}\r\n placeholder={t(\"web-ui:auth.resetPassword.confirmPassword\")}\r\n type=\"password\"\r\n variant=\"bordered\"\r\n isRequired\r\n {...register(\"confirmPassword\", {\r\n required: t(\"web-ui:auth.resetPassword.confirmPasswordRequired\"),\r\n })}\r\n />\r\n {errors.confirmPassword && (\r\n <span className=\"text-red-500 text-xs\">{errors.confirmPassword.message}</span>\r\n )}\r\n </div>\r\n <Button type=\"submit\" className=\"w-full\" color=\"primary\">\r\n {t(\"web-ui:auth.resetPassword.button\")}\r\n </Button>\r\n </form>\r\n </CardBody>\r\n </Card>\r\n <div className=\"text-center text-xs text-muted-foreground\">\r\n {t(\"web-ui:auth.forgotPassword.rememberPassword\")}{\" \"}\r\n <Link to=\"/login\" className=\"underline underline-offset-4 hover:text-primary\">\r\n {t(\"web-ui:auth.login.button\")}\r\n </Link>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;;;AAYA,SAAgB,oBAAoB;CAClC,MAAM,EAAE,MAAM,gBAAgB;CAC9B,MAAM,EACJ,UACA,cACA,UACA,WAAW,EAAE,aACX,SAAiB;CACrB,MAAM,CAAC,gBAAgB,iBAAiB;CACxC,MAAM,QAAQ,aAAa,IAAI,QAAQ;CAEvC,MAAM,YAAmC,SAAS;AAChD,MAAI,KAAK,aAAa,KAAK,iBAAiB;AAC1C,YAAS,mBAAmB,EAAE,SAAS,EAAE,6CAA6C,EAAE,CAAC;AACzF;;AAGF,MAAI,CAAC,MACH,OAAM,IAAI,MAAM,EAAE,0CAA0C,CAAC;AAG/D,aACG,cAAc;GACb,aAAa,KAAK;GAClB;GACD,CAAC,CACD,WAAW;AACV,SAAM,QAAQ,EAAE,oCAAoC,CAAC;IAErD,CACD,YAAY;AACX,SAAM,MAAM,EAAE,kCAAkC,CAAC;IACjD;;A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F"}
1
+ {"version":3,"file":"ResetPasswordForm.mjs","names":[],"sources":["../../../../../src/modules/auth/components/ResetPasswordForm.tsx"],"sourcesContent":["import { Button, Card, CardBody, CardHeader, Input } from \"@heroui/react\";\r\nimport { authClient } from \"@m5kdev/frontend/modules/auth/auth.lib\";\r\nimport { type SubmitHandler, useForm } from \"react-hook-form\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { Link, useSearchParams } from \"react-router\";\r\nimport { toast } from \"sonner\";\r\n\r\ntype Inputs = {\r\n password: string;\r\n confirmPassword: string;\r\n};\r\n\r\nexport function ResetPasswordForm() {\r\n const { t } = useTranslation();\r\n const {\r\n register,\r\n handleSubmit,\r\n setError,\r\n formState: { errors },\r\n } = useForm<Inputs>();\r\n const [searchParams] = useSearchParams();\r\n const token = searchParams.get(\"token\");\r\n\r\n const onSubmit: SubmitHandler<Inputs> = (data) => {\r\n if (data.password !== data.confirmPassword) {\r\n setError(\"confirmPassword\", { message: t(\"web-ui:auth.resetPassword.passwordMismatch\") });\r\n return;\r\n }\r\n\r\n if (!token) {\r\n throw new Error(t(\"web-ui:auth.resetPassword.tokenRequired\"));\r\n }\r\n\r\n authClient\r\n .resetPassword({\r\n newPassword: data.password,\r\n token,\r\n })\r\n .then(() => {\r\n toast.success(t(\"web-ui:auth.resetPassword.success\"));\r\n // Optionally, redirect\r\n })\r\n .catch(() => {\r\n toast.error(t(\"web-ui:auth.resetPassword.error\"));\r\n });\r\n };\r\n\r\n return (\r\n <div className=\"flex flex-col gap-6\">\r\n <Card>\r\n <CardHeader className=\"text-center flex flex-col gap-1\">\r\n <h2 className=\"text-xl font-semibold\">{t(\"web-ui:auth.resetPassword.title\")}</h2>\r\n <p className=\"text-sm text-default-600\">{t(\"web-ui:auth.resetPassword.description\")}</p>\r\n </CardHeader>\r\n <CardBody className=\"gap-6\">\r\n <form onSubmit={handleSubmit(onSubmit)} className=\"grid gap-6\">\r\n <div className=\"grid gap-2\">\r\n <Input\r\n labelPlacement=\"outside\"\r\n label={t(\"web-ui:auth.resetPassword.newPassword\")}\r\n placeholder={t(\"web-ui:auth.resetPassword.newPassword\")}\r\n type=\"password\"\r\n variant=\"bordered\"\r\n isRequired\r\n {...register(\"password\", {\r\n required: t(\"web-ui:auth.resetPassword.passwordRequired\"),\r\n })}\r\n />\r\n {errors.password && (\r\n <span className=\"text-red-500 text-xs\">{errors.password.message}</span>\r\n )}\r\n </div>\r\n <div className=\"grid gap-2\">\r\n <Input\r\n labelPlacement=\"outside\"\r\n label={t(\"web-ui:auth.resetPassword.confirmPassword\")}\r\n placeholder={t(\"web-ui:auth.resetPassword.confirmPassword\")}\r\n type=\"password\"\r\n variant=\"bordered\"\r\n isRequired\r\n {...register(\"confirmPassword\", {\r\n required: t(\"web-ui:auth.resetPassword.confirmPasswordRequired\"),\r\n })}\r\n />\r\n {errors.confirmPassword && (\r\n <span className=\"text-red-500 text-xs\">{errors.confirmPassword.message}</span>\r\n )}\r\n </div>\r\n <Button type=\"submit\" className=\"w-full\" color=\"primary\">\r\n {t(\"web-ui:auth.resetPassword.button\")}\r\n </Button>\r\n </form>\r\n </CardBody>\r\n </Card>\r\n <div className=\"text-center text-xs text-muted-foreground\">\r\n {t(\"web-ui:auth.forgotPassword.rememberPassword\")}{\" \"}\r\n <Link to=\"/login\" className=\"underline underline-offset-4 hover:text-primary\">\r\n {t(\"web-ui:auth.login.button\")}\r\n </Link>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;;;AAYA,SAAgB,oBAAoB;CAClC,MAAM,EAAE,MAAM,gBAAgB;CAC9B,MAAM,EACJ,UACA,cACA,UACA,WAAW,EAAE,aACX,SAAiB;CACrB,MAAM,CAAC,gBAAgB,iBAAiB;CACxC,MAAM,QAAQ,aAAa,IAAI,QAAQ;CAEvC,MAAM,YAAmC,SAAS;AAChD,MAAI,KAAK,aAAa,KAAK,iBAAiB;AAC1C,YAAS,mBAAmB,EAAE,SAAS,EAAE,6CAA6C,EAAE,CAAC;AACzF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MAAS,OAAM;gBAC5C,EAAE,mCAAmC;MAC/B,CAAA;KACJ;;GACE,CAAA,CACN,EAAA,CAAA,EACP,qBAAC,OAAD;GAAK,WAAU;aAAf;IACG,EAAE,8CAA8C;IAAE;IACnD,oBAAC,MAAD;KAAM,IAAG;KAAS,WAAU;eACzB,EAAE,2BAA2B;KACzB,CAAA;IACH;KACF"}
@@ -1,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../../_virtual/_rolldown/runtime.js");
3
3
  const require_src_modules_auth_components_ResetPasswordForm = require("./ResetPasswordForm.js");
4
- let _heroui_react = require("@heroui/react");
5
- let react_jsx_runtime = require("react/jsx-runtime");
6
4
  let react_i18next = require("react-i18next");
5
+ let react_jsx_runtime = require("react/jsx-runtime");
7
6
  let react_router = require("react-router");
7
+ let _heroui_react = require("@heroui/react");
8
8
  //#region src/modules/auth/components/ResetPasswordRoute.tsx
9
9
  function ResetPasswordRoute() {
10
10
  const { t } = (0, react_i18next.useTranslation)();
@@ -1,8 +1,8 @@
1
1
  import { ResetPasswordForm } from "./ResetPasswordForm.mjs";
2
- import { Card, CardBody, CardHeader } from "@heroui/react";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
2
  import { useTranslation } from "react-i18next";
5
- import { Link as Link$1 } from "react-router";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { Link } from "react-router";
5
+ import { Card, CardBody, CardHeader } from "@heroui/react";
6
6
  //#region src/modules/auth/components/ResetPasswordRoute.tsx
7
7
  function ResetPasswordRoute() {
8
8
  const { t } = useTranslation();
@@ -22,7 +22,7 @@ function ResetPasswordRoute() {
22
22
  children: [
23
23
  t("web-ui:auth.forgotPassword.rememberPassword"),
24
24
  " ",
25
- /* @__PURE__ */ jsx(Link$1, {
25
+ /* @__PURE__ */ jsx(Link, {
26
26
  to: "/login",
27
27
  className: "underline underline-offset-4 hover:text-primary",
28
28
  children: t("web-ui:auth.login.button")
@@ -1 +1 @@
1
- {"version":3,"file":"ResetPasswordRoute.mjs","names":["Link"],"sources":["../../../../../src/modules/auth/components/ResetPasswordRoute.tsx"],"sourcesContent":["import { Card, CardBody, CardHeader } from \"@heroui/react\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { Link } from \"react-router\";\r\nimport { ResetPasswordForm } from \"./ResetPasswordForm\";\r\n\r\nexport function ResetPasswordRoute() {\r\n const { t } = useTranslation();\r\n return (\r\n <div className=\"flex flex-col gap-6\">\r\n <Card>\r\n <CardHeader className=\"text-center flex flex-col gap-1\">\r\n <h2 className=\"text-xl font-semibold\">{t(\"web-ui:auth.resetPassword.title\")}</h2>\r\n <p className=\"text-sm text-default-600\">{t(\"web-ui:auth.resetPassword.description\")}</p>\r\n </CardHeader>\r\n <CardBody>\r\n <ResetPasswordForm />\r\n </CardBody>\r\n </Card>\r\n <div className=\"text-center text-xs text-muted-foreground\">\r\n {t(\"web-ui:auth.forgotPassword.rememberPassword\")}{\" \"}\r\n <Link to=\"/login\" className=\"underline underline-offset-4 hover:text-primary\">\r\n {t(\"web-ui:auth.login.button\")}\r\n </Link>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;AAKA,SAAgB,qBAAqB;CACnC,MAAM,EAAE,MAAM,gBAAgB;AAC9B,QACE,qBAAC,OAAD;EAAK,WAAU;YAAf,CACE,qBAAC,MAAD,EAAA,UAAA,CACE,qBAAC,YAAD;GAAY,WAAU;aAAtB,CACE,oBAAC,MAAD;IAAI,WAAU;cAAyB,EAAE,kCAAkC;IAAM,CAAA,EACjF,oBAAC,KAAD;IAAG,WAAU;cAA4B,EAAE,wCAAwC;IAAK,CAAA,CAC7E;MACb,oBAAC,UAAD,EAAA,UACE,oBAAC,mBAAD,EAAqB,CAAA,EACZ,CAAA,CACN,EAAA,CAAA,EACP,qBAAC,OAAD;GAAK,WAAU;aAAf;IACG,EAAE,8CAA8C;IAAE;IACnD,oBAACA,QAAD;KAAM,IAAG;KAAS,WAAU;eACzB,EAAE,2BAA2B;KACzB,CAAA;IACH;KACF"}
1
+ {"version":3,"file":"ResetPasswordRoute.mjs","names":[],"sources":["../../../../../src/modules/auth/components/ResetPasswordRoute.tsx"],"sourcesContent":["import { Card, CardBody, CardHeader } from \"@heroui/react\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { Link } from \"react-router\";\r\nimport { ResetPasswordForm } from \"./ResetPasswordForm\";\r\n\r\nexport function ResetPasswordRoute() {\r\n const { t } = useTranslation();\r\n return (\r\n <div className=\"flex flex-col gap-6\">\r\n <Card>\r\n <CardHeader className=\"text-center flex flex-col gap-1\">\r\n <h2 className=\"text-xl font-semibold\">{t(\"web-ui:auth.resetPassword.title\")}</h2>\r\n <p className=\"text-sm text-default-600\">{t(\"web-ui:auth.resetPassword.description\")}</p>\r\n </CardHeader>\r\n <CardBody>\r\n <ResetPasswordForm />\r\n </CardBody>\r\n </Card>\r\n <div className=\"text-center text-xs text-muted-foreground\">\r\n {t(\"web-ui:auth.forgotPassword.rememberPassword\")}{\" \"}\r\n <Link to=\"/login\" className=\"underline underline-offset-4 hover:text-primary\">\r\n {t(\"web-ui:auth.login.button\")}\r\n </Link>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;AAKA,SAAgB,qBAAqB;CACnC,MAAM,EAAE,MAAM,gBAAgB;AAC9B,QACE,qBAAC,OAAD;EAAK,WAAU;YAAf,CACE,qBAAC,MAAD,EAAA,UAAA,CACE,qBAAC,YAAD;GAAY,WAAU;aAAtB,CACE,oBAAC,MAAD;IAAI,WAAU;cAAyB,EAAE,kCAAkC;IAAM,CAAA,EACjF,oBAAC,KAAD;IAAG,WAAU;cAA4B,EAAE,wCAAwC;IAAK,CAAA,CAC7E;MACb,oBAAC,UAAD,EAAA,UACE,oBAAC,mBAAD,EAAqB,CAAA,EACZ,CAAA,CACN,EAAA,CAAA,EACP,qBAAC,OAAD;GAAK,WAAU;aAAf;IACG,EAAE,8CAA8C;IAAE;IACnD,oBAAC,MAAD;KAAM,IAAG;KAAS,WAAU;eACzB,EAAE,2BAA2B;KACzB,CAAA;IACH;KACF"}
@@ -1,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../../_virtual/_rolldown/runtime.js");
3
3
  let react = require("react");
4
- let _heroui_react = require("@heroui/react");
5
- let react_jsx_runtime = require("react/jsx-runtime");
6
4
  let react_i18next = require("react-i18next");
5
+ let react_jsx_runtime = require("react/jsx-runtime");
7
6
  let react_router = require("react-router");
7
+ let _heroui_react = require("@heroui/react");
8
8
  let sonner = require("sonner");
9
9
  let react_hook_form = require("react-hook-form");
10
10
  let _m5kdev_frontend_modules_auth_auth_lib = require("@m5kdev/frontend/modules/auth/auth.lib");
@@ -1,8 +1,8 @@
1
1
  import { useState } from "react";
2
- import { Alert, Button, Input } from "@heroui/react";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
2
  import { useTranslation } from "react-i18next";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
5
4
  import { useNavigate } from "react-router";
5
+ import { Alert, Button, Input } from "@heroui/react";
6
6
  import { toast } from "sonner";
7
7
  import { useForm } from "react-hook-form";
8
8
  import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
@@ -4,10 +4,10 @@ const require_src_modules_auth_components_AuthProviders = require("./AuthProvide
4
4
  const require_src_modules_auth_components_SignupFormRoute = require("./SignupFormRoute.js");
5
5
  const require_src_modules_auth_components_WaitlistCard = require("./WaitlistCard.js");
6
6
  const require_src_modules_auth_components_WaitlistCodeValidation = require("./WaitlistCodeValidation.js");
7
- let _heroui_react = require("@heroui/react");
8
- let react_jsx_runtime = require("react/jsx-runtime");
9
7
  let react_i18next = require("react-i18next");
8
+ let react_jsx_runtime = require("react/jsx-runtime");
10
9
  let react_router = require("react-router");
10
+ let _heroui_react = require("@heroui/react");
11
11
  let nuqs = require("nuqs");
12
12
  //#region src/modules/auth/components/SignupRoute.tsx
13
13
  function SignupRoute({ providers, useTRPC }) {
@@ -2,10 +2,10 @@ import { AuthProviders } from "./AuthProviders.mjs";
2
2
  import { SignupForm } from "./SignupFormRoute.mjs";
3
3
  import { WaitlistCard } from "./WaitlistCard.mjs";
4
4
  import { WaitlistCodeValidation } from "./WaitlistCodeValidation.mjs";
5
- import { Card, CardBody, CardHeader } from "@heroui/react";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
5
  import { useTranslation } from "react-i18next";
8
- import { Link as Link$1 } from "react-router";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { Link } from "react-router";
8
+ import { Card, CardBody, CardHeader } from "@heroui/react";
9
9
  import { useQueryState } from "nuqs";
10
10
  //#region src/modules/auth/components/SignupRoute.tsx
11
11
  function SignupRoute({ providers, useTRPC }) {
@@ -47,7 +47,7 @@ function SignupRoute({ providers, useTRPC }) {
47
47
  children: [
48
48
  t("web-ui:auth.signup.alreadyHaveAccount"),
49
49
  " ",
50
- /* @__PURE__ */ jsx(Link$1, {
50
+ /* @__PURE__ */ jsx(Link, {
51
51
  to: "/login",
52
52
  className: "underline underline-offset-4 hover:text-primary",
53
53
  children: t("web-ui:auth.login.button")
@@ -1 +1 @@
1
- {"version":3,"file":"SignupRoute.mjs","names":["Link"],"sources":["../../../../../src/modules/auth/components/SignupRoute.tsx"],"sourcesContent":["import { Card, CardBody, CardHeader } from \"@heroui/react\";\r\nimport { useQueryState } from \"nuqs\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { Link } from \"react-router\";\r\nimport { SignupForm } from \"./SignupFormRoute\";\r\nimport type { UseBackendTRPC } from \"../../../types\";\r\nimport { AuthProviders } from \"./AuthProviders\";\r\nimport { WaitlistCard } from \"./WaitlistCard\";\r\nimport { WaitlistCodeValidation } from \"./WaitlistCodeValidation\";\r\n\r\ninterface SignupRouteProps {\r\n providers?: string[];\r\n useTRPC?: UseBackendTRPC;\r\n}\r\n\r\nexport function SignupRoute({ providers, useTRPC }: SignupRouteProps) {\r\n const { t } = useTranslation();\r\n\r\n const [code] = useQueryState(\"code\");\r\n const [email] = useQueryState(\"email\");\r\n\r\n const hasWaitlist = !!useTRPC;\r\n\r\n return (\r\n <div className=\"flex flex-col gap-6\">\r\n {hasWaitlist && !code ? (\r\n <WaitlistCard useTRPC={useTRPC} />\r\n ) : (\r\n <Card>\r\n <CardHeader className=\"text-center flex flex-col gap-1\">\r\n <p className=\"text-xl font-semibold\">{t(\"web-ui:auth.signup.createAccount\")}</p>\r\n <p className=\"text-sm text-default-600\">{t(\"web-ui:auth.signup.description\")}</p>\r\n </CardHeader>\r\n <CardBody>\r\n <div className=\"grid gap-6\">\r\n {hasWaitlist && code && useTRPC && (\r\n <WaitlistCodeValidation code={code} useTRPC={useTRPC} />\r\n )}\r\n <AuthProviders providers={providers} code={code} requestSignUp />\r\n <SignupForm code={code} email={email} waitlist={hasWaitlist} />\r\n </div>\r\n </CardBody>\r\n </Card>\r\n )}\r\n <div className=\"text-center text-xs text-muted-foreground\">\r\n {t(\"web-ui:auth.signup.alreadyHaveAccount\")}{\" \"}\r\n <Link to=\"/login\" className=\"underline underline-offset-4 hover:text-primary\">\r\n {t(\"web-ui:auth.login.button\")}\r\n </Link>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;;;;;AAeA,SAAgB,YAAY,EAAE,WAAW,WAA6B;CACpE,MAAM,EAAE,MAAM,gBAAgB;CAE9B,MAAM,CAAC,QAAQ,cAAc,OAAO;CACpC,MAAM,CAAC,SAAS,cAAc,QAAQ;CAEtC,MAAM,cAAc,CAAC,CAAC;AAEtB,QACE,qBAAC,OAAD;EAAK,WAAU;YAAf,CACG,eAAe,CAAC,OACf,oBAAC,cAAD,EAAuB,SAAW,CAAA,GAElC,qBAAC,MAAD,EAAA,UAAA,CACE,qBAAC,YAAD;GAAY,WAAU;aAAtB,CACE,oBAAC,KAAD;IAAG,WAAU;cAAyB,EAAE,mCAAmC;IAAK,CAAA,EAChF,oBAAC,KAAD;IAAG,WAAU;cAA4B,EAAE,iCAAiC;IAAK,CAAA,CACtE;MACb,oBAAC,UAAD,EAAA,UACE,qBAAC,OAAD;GAAK,WAAU;aAAf;IACG,eAAe,QAAQ,WACtB,oBAAC,wBAAD;KAA8B;KAAe;KAAW,CAAA;IAE1D,oBAAC,eAAD;KAA0B;KAAiB;KAAM,eAAA;KAAgB,CAAA;IACjE,oBAAC,YAAD;KAAkB;KAAa;KAAO,UAAU;KAAe,CAAA;IAC3D;MACG,CAAA,CACN,EAAA,CAAA,EAET,qBAAC,OAAD;GAAK,WAAU;aAAf;IACG,EAAE,wCAAwC;IAAE;IAC7C,oBAACA,QAAD;KAAM,IAAG;KAAS,WAAU;eACzB,EAAE,2BAA2B;KACzB,CAAA;IACH;KACF"}
1
+ {"version":3,"file":"SignupRoute.mjs","names":[],"sources":["../../../../../src/modules/auth/components/SignupRoute.tsx"],"sourcesContent":["import { Card, CardBody, CardHeader } from \"@heroui/react\";\r\nimport { useQueryState } from \"nuqs\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport { Link } from \"react-router\";\r\nimport { SignupForm } from \"./SignupFormRoute\";\r\nimport type { UseBackendTRPC } from \"../../../types\";\r\nimport { AuthProviders } from \"./AuthProviders\";\r\nimport { WaitlistCard } from \"./WaitlistCard\";\r\nimport { WaitlistCodeValidation } from \"./WaitlistCodeValidation\";\r\n\r\ninterface SignupRouteProps {\r\n providers?: string[];\r\n useTRPC?: UseBackendTRPC;\r\n}\r\n\r\nexport function SignupRoute({ providers, useTRPC }: SignupRouteProps) {\r\n const { t } = useTranslation();\r\n\r\n const [code] = useQueryState(\"code\");\r\n const [email] = useQueryState(\"email\");\r\n\r\n const hasWaitlist = !!useTRPC;\r\n\r\n return (\r\n <div className=\"flex flex-col gap-6\">\r\n {hasWaitlist && !code ? (\r\n <WaitlistCard useTRPC={useTRPC} />\r\n ) : (\r\n <Card>\r\n <CardHeader className=\"text-center flex flex-col gap-1\">\r\n <p className=\"text-xl font-semibold\">{t(\"web-ui:auth.signup.createAccount\")}</p>\r\n <p className=\"text-sm text-default-600\">{t(\"web-ui:auth.signup.description\")}</p>\r\n </CardHeader>\r\n <CardBody>\r\n <div className=\"grid gap-6\">\r\n {hasWaitlist && code && useTRPC && (\r\n <WaitlistCodeValidation code={code} useTRPC={useTRPC} />\r\n )}\r\n <AuthProviders providers={providers} code={code} requestSignUp />\r\n <SignupForm code={code} email={email} waitlist={hasWaitlist} />\r\n </div>\r\n </CardBody>\r\n </Card>\r\n )}\r\n <div className=\"text-center text-xs text-muted-foreground\">\r\n {t(\"web-ui:auth.signup.alreadyHaveAccount\")}{\" \"}\r\n <Link to=\"/login\" className=\"underline underline-offset-4 hover:text-primary\">\r\n {t(\"web-ui:auth.login.button\")}\r\n </Link>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;;;;;AAeA,SAAgB,YAAY,EAAE,WAAW,WAA6B;CACpE,MAAM,EAAE,MAAM,gBAAgB;CAE9B,MAAM,CAAC,QAAQ,cAAc,OAAO;CACpC,MAAM,CAAC,SAAS,cAAc,QAAQ;CAEtC,MAAM,cAAc,CAAC,CAAC;AAEtB,QACE,qBAAC,OAAD;EAAK,WAAU;YAAf,CACG,eAAe,CAAC,OACf,oBAAC,cAAD,EAAuB,SAAW,CAAA,GAElC,qBAAC,MAAD,EAAA,UAAA,CACE,qBAAC,YAAD;GAAY,WAAU;aAAtB,CACE,oBAAC,KAAD;IAAG,WAAU;cAAyB,EAAE,mCAAmC;IAAK,CAAA,EAChF,oBAAC,KAAD;IAAG,WAAU;cAA4B,EAAE,iCAAiC;IAAK,CAAA,CACtE;MACb,oBAAC,UAAD,EAAA,UACE,qBAAC,OAAD;GAAK,WAAU;aAAf;IACG,eAAe,QAAQ,WACtB,oBAAC,wBAAD;KAA8B;KAAe;KAAW,CAAA;IAE1D,oBAAC,eAAD;KAA0B;KAAiB;KAAM,eAAA;KAAgB,CAAA;IACjE,oBAAC,YAAD;KAAkB;KAAa;KAAO,UAAU;KAAe,CAAA;IAC3D;MACG,CAAA,CACN,EAAA,CAAA,EAET,qBAAC,OAAD;GAAK,WAAU;aAAf;IACG,EAAE,wCAAwC;IAAE;IAC7C,oBAAC,MAAD;KAAM,IAAG;KAAS,WAAU;eACzB,EAAE,2BAA2B;KACzB,CAAA;IACH;KACF"}
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../../_virtual/_rolldown/runtime.js");
3
3
  const require_src_modules_auth_components_PreferencesEditor = require("./PreferencesEditor.js");
4
- let react_jsx_runtime = require("react/jsx-runtime");
5
4
  let react_i18next = require("react-i18next");
5
+ let react_jsx_runtime = require("react/jsx-runtime");
6
6
  //#region src/modules/auth/components/UserPreferences.tsx
7
7
  function UserPreferences({ schema, controls, preferences, isLoading, isPending, updatePreferences }) {
8
8
  const { t } = (0, react_i18next.useTranslation)("web-ui");
@@ -1,6 +1,6 @@
1
1
  import { PreferencesEditor } from "./PreferencesEditor.mjs";
2
- import { jsx } from "react/jsx-runtime";
3
2
  import { useTranslation } from "react-i18next";
3
+ import { jsx } from "react/jsx-runtime";
4
4
  //#region src/modules/auth/components/UserPreferences.tsx
5
5
  function UserPreferences({ schema, controls, preferences, isLoading, isPending, updatePreferences }) {
6
6
  const { t } = useTranslation("web-ui");
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../../_virtual/_rolldown/runtime.js");
3
3
  let react = require("react");
4
- let _heroui_react = require("@heroui/react");
5
- let react_jsx_runtime = require("react/jsx-runtime");
6
4
  let react_i18next = require("react-i18next");
5
+ let react_jsx_runtime = require("react/jsx-runtime");
6
+ let _heroui_react = require("@heroui/react");
7
7
  let sonner = require("sonner");
8
8
  let _tanstack_react_query = require("@tanstack/react-query");
9
9
  //#region src/modules/auth/components/WaitlistCard.tsx
@@ -1,7 +1,7 @@
1
1
  import { useState } from "react";
2
- import { Alert, Button, Card, CardBody, CardHeader, Input } from "@heroui/react";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
2
  import { useTranslation } from "react-i18next";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { Alert, Button, Card, CardBody, CardHeader, Input } from "@heroui/react";
5
5
  import { toast } from "sonner";
6
6
  import { useMutation } from "@tanstack/react-query";
7
7
  //#region src/modules/auth/components/WaitlistCard.tsx
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../../_virtual/_rolldown/runtime.js");
3
- let _heroui_react = require("@heroui/react");
4
- let react_jsx_runtime = require("react/jsx-runtime");
5
3
  let react_i18next = require("react-i18next");
4
+ let react_jsx_runtime = require("react/jsx-runtime");
5
+ let _heroui_react = require("@heroui/react");
6
6
  let _tanstack_react_query = require("@tanstack/react-query");
7
7
  //#region src/modules/auth/components/WaitlistCodeValidation.tsx
8
8
  function WaitlistCodeValidation({ useTRPC, code }) {
@@ -1,6 +1,6 @@
1
- import { Alert } from "@heroui/react";
2
- import { jsx } from "react/jsx-runtime";
3
1
  import { useTranslation } from "react-i18next";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { Alert } from "@heroui/react";
4
4
  import { useQuery } from "@tanstack/react-query";
5
5
  //#region src/modules/auth/components/WaitlistCodeValidation.tsx
6
6
  function WaitlistCodeValidation({ useTRPC, code }) {
@@ -4,9 +4,9 @@ const require_src_lib_utils = require("../../../lib/utils.js");
4
4
  const require_src_components_ui_card = require("../../../components/ui/card.js");
5
5
  const require_src_components_ui_separator = require("../../../components/ui/separator.js");
6
6
  const require_src_components_ui_badge = require("../../../components/ui/badge.js");
7
- let react_jsx_runtime = require("react/jsx-runtime");
8
7
  let lucide_react = require("lucide-react");
9
8
  let react_i18next = require("react-i18next");
9
+ let react_jsx_runtime = require("react/jsx-runtime");
10
10
  //#region src/modules/billing/components/BillingBetaPage.tsx
11
11
  function BillingBetaPage({ appName, className, footer }) {
12
12
  const { t } = (0, react_i18next.useTranslation)("web-ui");
@@ -2,9 +2,9 @@ import { cn } from "../../../lib/utils.mjs";
2
2
  import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "../../../components/ui/card.mjs";
3
3
  import { Separator } from "../../../components/ui/separator.mjs";
4
4
  import { Badge } from "../../../components/ui/badge.mjs";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
5
  import { Bell, CheckCircle2, Clock3, Sparkles } from "lucide-react";
7
6
  import { useTranslation } from "react-i18next";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region src/modules/billing/components/BillingBetaPage.tsx
9
9
  function BillingBetaPage({ appName, className, footer }) {
10
10
  const { t } = useTranslation("web-ui");
@@ -1,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../../_virtual/_rolldown/runtime.js");
3
- let _heroui_react = require("@heroui/react");
4
- let react_jsx_runtime = require("react/jsx-runtime");
5
3
  let lucide_react = require("lucide-react");
6
- let _tanstack_react_query = require("@tanstack/react-query");
4
+ let react_jsx_runtime = require("react/jsx-runtime");
5
+ let _heroui_react = require("@heroui/react");
7
6
  let _m5kdev_frontend_modules_billing_hooks_useSubscription = require("@m5kdev/frontend/modules/billing/hooks/useSubscription");
7
+ let _tanstack_react_query = require("@tanstack/react-query");
8
8
  //#region src/modules/billing/components/BillingInvoicePage.tsx
9
9
  function BillingInvoicePage({ useTRPC, serverUrl }) {
10
10
  const { data: invoices, isLoading } = (0, _tanstack_react_query.useQuery)(useTRPC().billing.listInvoices.queryOptions());