@blimu/react 1.1.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/README.md +1 -1
  2. package/dist/client/auth.service.cjs +9 -10
  3. package/dist/client/auth.service.cjs.map +1 -1
  4. package/dist/client/auth.service.d.ts.map +1 -1
  5. package/dist/client/auth.service.js +0 -1
  6. package/dist/client/auth.service.js.map +1 -1
  7. package/dist/client/runtime-client.cjs +1 -1
  8. package/dist/client/runtime-client.cjs.map +1 -1
  9. package/dist/client/runtime-client.d.ts +1 -1
  10. package/dist/client/runtime-client.d.ts.map +1 -1
  11. package/dist/client/runtime-client.js +1 -1
  12. package/dist/client/runtime-client.js.map +1 -1
  13. package/dist/components/index.cjs +6 -6
  14. package/dist/components/index.d.ts +6 -6
  15. package/dist/components/index.d.ts.map +1 -1
  16. package/dist/components/index.js +3 -3
  17. package/dist/components/members-list.cjs +2 -2
  18. package/dist/components/members-list.cjs.map +1 -1
  19. package/dist/components/members-list.d.ts.map +1 -1
  20. package/dist/components/members-list.js +2 -2
  21. package/dist/components/members-list.js.map +1 -1
  22. package/dist/components/sign-in-button.cjs +1 -1
  23. package/dist/components/sign-in-button.cjs.map +1 -1
  24. package/dist/components/sign-in-button.d.ts.map +1 -1
  25. package/dist/components/sign-in-button.js +1 -1
  26. package/dist/components/sign-in-button.js.map +1 -1
  27. package/dist/components/ui/avatar.cjs +1 -1
  28. package/dist/components/ui/avatar.cjs.map +1 -1
  29. package/dist/components/ui/avatar.d.ts +2 -2
  30. package/dist/components/ui/avatar.d.ts.map +1 -1
  31. package/dist/components/ui/avatar.js +1 -1
  32. package/dist/components/ui/avatar.js.map +1 -1
  33. package/dist/components/ui/badge.d.ts +2 -2
  34. package/dist/components/ui/badge.d.ts.map +1 -1
  35. package/dist/components/ui/dropdown-menu.cjs +2 -2
  36. package/dist/components/ui/dropdown-menu.cjs.map +1 -1
  37. package/dist/components/ui/dropdown-menu.d.ts +2 -2
  38. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  39. package/dist/components/ui/dropdown-menu.js +2 -2
  40. package/dist/components/ui/dropdown-menu.js.map +1 -1
  41. package/dist/components/ui/popover.d.ts +2 -2
  42. package/dist/components/ui/popover.d.ts.map +1 -1
  43. package/dist/components/ui/separator.d.ts +1 -1
  44. package/dist/components/ui/separator.d.ts.map +1 -1
  45. package/dist/components/user-avatar.cjs +1 -1
  46. package/dist/components/user-avatar.cjs.map +1 -1
  47. package/dist/components/user-avatar.d.ts +5 -5
  48. package/dist/components/user-avatar.d.ts.map +1 -1
  49. package/dist/components/user-avatar.js +1 -1
  50. package/dist/components/user-avatar.js.map +1 -1
  51. package/dist/components/user-button/user-button.cjs +1 -1
  52. package/dist/components/user-button/user-button.cjs.map +1 -1
  53. package/dist/components/user-button/user-button.d.ts +1 -1
  54. package/dist/components/user-button/user-button.d.ts.map +1 -1
  55. package/dist/components/user-button/user-button.js +1 -1
  56. package/dist/components/user-button/user-button.js.map +1 -1
  57. package/dist/hooks/index.cjs +2 -2
  58. package/dist/hooks/index.d.ts +3 -3
  59. package/dist/hooks/index.d.ts.map +1 -1
  60. package/dist/hooks/index.js +1 -1
  61. package/dist/hooks/use-auth.cjs.map +1 -1
  62. package/dist/hooks/use-auth.d.ts.map +1 -1
  63. package/dist/hooks/use-auth.js.map +1 -1
  64. package/dist/hooks/use-members.cjs +3 -3
  65. package/dist/hooks/use-members.cjs.map +1 -1
  66. package/dist/hooks/use-members.d.ts +5 -5
  67. package/dist/hooks/use-members.d.ts.map +1 -1
  68. package/dist/hooks/use-members.js +3 -3
  69. package/dist/hooks/use-members.js.map +1 -1
  70. package/dist/index.cjs +6 -6
  71. package/dist/index.d.ts +5 -5
  72. package/dist/index.d.ts.map +1 -1
  73. package/dist/index.js +3 -3
  74. package/dist/lib/variants.d.ts +1 -1
  75. package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs +1 -1
  76. package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs.map +1 -1
  77. package/dist/node_modules/js-cookie/dist/js.cookie.cjs +2 -1
  78. package/dist/node_modules/js-cookie/dist/js.cookie.cjs.map +1 -1
  79. package/dist/node_modules/lucide-react/dist/esm/Icon.cjs +3 -2
  80. package/dist/node_modules/lucide-react/dist/esm/Icon.cjs.map +1 -1
  81. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs +3 -2
  82. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs.map +1 -1
  83. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs +2 -1
  84. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs.map +1 -1
  85. package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs +1 -1
  86. package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs.map +1 -1
  87. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs +1 -1
  88. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs.map +1 -1
  89. package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs +1 -1
  90. package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs.map +1 -1
  91. package/dist/node_modules/lucide-react/dist/esm/icons/log-out.cjs +1 -1
  92. package/dist/node_modules/lucide-react/dist/esm/icons/log-out.cjs.map +1 -1
  93. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +3 -2
  94. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs.map +1 -1
  95. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +2 -1
  96. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs.map +1 -1
  97. package/dist/node_modules/tailwindcss/dist/plugin.cjs +2 -1
  98. package/dist/node_modules/tailwindcss/dist/plugin.cjs.map +1 -1
  99. package/dist/providers/blimu/blimu.context.cjs.map +1 -1
  100. package/dist/providers/blimu/blimu.context.d.ts +4 -4
  101. package/dist/providers/blimu/blimu.context.d.ts.map +1 -1
  102. package/dist/providers/blimu/blimu.context.js.map +1 -1
  103. package/dist/providers/blimu/blimu.provider.cjs.map +1 -1
  104. package/dist/providers/blimu/blimu.provider.d.ts +1 -1
  105. package/dist/providers/blimu/blimu.provider.d.ts.map +1 -1
  106. package/dist/providers/blimu/blimu.provider.js.map +1 -1
  107. package/dist/providers/index.cjs +2 -2
  108. package/dist/providers/index.d.ts +3 -3
  109. package/dist/providers/index.d.ts.map +1 -1
  110. package/dist/providers/index.js +1 -1
  111. package/dist/providers/theme/index.d.ts +2 -2
  112. package/dist/providers/theme/index.d.ts.map +1 -1
  113. package/dist/providers/theme/theme.provider.cjs.map +1 -1
  114. package/dist/providers/theme/theme.provider.d.ts.map +1 -1
  115. package/dist/providers/theme/theme.provider.js.map +1 -1
  116. package/dist/styles/styles.css +34 -40
  117. package/dist/styles/tw-styles.css +34 -40
  118. package/dist/tailwind.cjs +39 -39
  119. package/dist/tailwind.cjs.map +1 -1
  120. package/dist/tailwind.js +38 -38
  121. package/dist/tailwind.js.map +1 -1
  122. package/dist/types/index.cjs.map +1 -1
  123. package/dist/types/index.d.ts +22 -8
  124. package/dist/types/index.d.ts.map +1 -1
  125. package/dist/types/index.js.map +1 -1
  126. package/package.json +29 -13
@@ -1,8 +1,8 @@
1
1
  export { useBlimu } from '../providers/blimu/blimu.hook';
2
- export { useAuth, useUser } from './use-auth';
3
2
  export type { UseAuthReturn } from './use-auth';
3
+ export { useAuth, useUser } from './use-auth';
4
4
  export { useClient } from './use-client';
5
- export { useStore } from './use-store';
6
- export { useMembers } from './use-members';
7
5
  export type { ResourceMember, UseMembersOptions, UseMembersResult } from './use-members';
6
+ export { useMembers } from './use-members';
7
+ export { useStore } from './use-store';
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC9C,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { useBlimu } from "../providers/blimu/blimu.hook.js";
2
2
  import { useAuth, useUser } from "./use-auth.js";
3
3
  import { useClient } from "./use-client.js";
4
- import { useStore } from "./use-store.js";
5
4
  import { useMembers } from "./use-members.js";
5
+ import { useStore } from "./use-store.js";
6
6
  export {
7
7
  useAuth,
8
8
  useBlimu,
@@ -1 +1 @@
1
- {"version":3,"file":"use-auth.cjs","sources":["../../src/hooks/use-auth.ts"],"sourcesContent":["import { useMemo } from 'react';\n\nimport { useAuthContext } from '../providers/auth/auth.hook';\nimport { AuthStateGuards, type AuthContextValue } from '../types';\n\n/**\n * Return type for useAuth hook\n */\nexport type UseAuthReturn = AuthContextValue & {\n isIdle: boolean;\n isLoading: boolean;\n isAuthenticated: boolean;\n isUnauthenticated: boolean;\n isReady: boolean;\n isError: boolean;\n};\n\n/**\n * Hook for accessing authentication state and actions\n *\n * Provides a type-safe interface to authentication state with discriminated union states\n * and convenient boolean properties for common checks.\n *\n * @example Using boolean properties\n * ```tsx\n * function MyComponent() {\n * const { isAuthenticated, isLoading, login, logout } = useAuth();\n *\n * if (isLoading) {\n * return <Spinner />;\n * }\n *\n * if (isAuthenticated) {\n * return (\n * <div>\n * <p>Welcome!</p>\n * <button onClick={logout}>Logout</button>\n * </div>\n * );\n * }\n *\n * return <LoginForm onLogin={login} />;\n * }\n * ```\n *\n * @example Using discriminated union state for advanced cases\n * ```tsx\n * function AuthStatus() {\n * const { state, isError } = useAuth();\n *\n * if (isError && state.status === 'error') {\n * return <div>Error: {state.error}</div>;\n * }\n *\n * return <div>Status: {state.status}</div>;\n * }\n * ```\n */\nexport function useAuth(): UseAuthReturn {\n const context = useAuthContext();\n const { state } = context;\n\n const booleanState = useMemo(\n () => ({\n isIdle: AuthStateGuards.isIdle(state),\n isLoading: AuthStateGuards.isLoading(state),\n isAuthenticated: AuthStateGuards.isAuthenticated(state),\n isUnauthenticated: AuthStateGuards.isUnauthenticated(state),\n isReady: AuthStateGuards.isReady(state),\n isError: AuthStateGuards.isError(state),\n }),\n [state],\n );\n\n return {\n ...context,\n ...booleanState,\n };\n}\n\n/**\n * Hook for getting current user information with auth state\n *\n * Returns the user object if authenticated (null otherwise) along with boolean state properties.\n *\n * @example\n * ```tsx\n * function UserProfile() {\n * const { user, isAuthenticated, isLoading } = useUser();\n *\n * if (isLoading) {\n * return <Spinner />;\n * }\n *\n * if (!isAuthenticated || !user) {\n * return <div>Not authenticated</div>;\n * }\n *\n * return (\n * <div>\n * <h1>{user.firstName} {user.lastName}</h1>\n * <p>{user.email}</p>\n * </div>\n * );\n * }\n * ```\n */\nexport function useUser() {\n const { state } = useAuthContext();\n\n const user = AuthStateGuards.isAuthenticated(state) ? state.user : null;\n\n const booleanState = useMemo(\n () => ({\n isIdle: AuthStateGuards.isIdle(state),\n isLoading: AuthStateGuards.isLoading(state),\n isAuthenticated: AuthStateGuards.isAuthenticated(state),\n isUnauthenticated: AuthStateGuards.isUnauthenticated(state),\n isError: AuthStateGuards.isError(state),\n }),\n [state],\n );\n\n return {\n user,\n ...booleanState,\n };\n}\n"],"names":["useAuthContext","useMemo","AuthStateGuards"],"mappings":";;;;;AA0DO,SAAS,UAAyB;AACvC,QAAM,UAAUA,UAAAA,eAAA;AAChB,QAAM,EAAE,UAAU;AAElB,QAAM,eAAeC,MAAAA;AAAAA,IACnB,OAAO;AAAA,MACL,QAAQC,YAAAA,gBAAgB,OAAO,KAAK;AAAA,MACpC,WAAWA,YAAAA,gBAAgB,UAAU,KAAK;AAAA,MAC1C,iBAAiBA,YAAAA,gBAAgB,gBAAgB,KAAK;AAAA,MACtD,mBAAmBA,YAAAA,gBAAgB,kBAAkB,KAAK;AAAA,MAC1D,SAASA,YAAAA,gBAAgB,QAAQ,KAAK;AAAA,MACtC,SAASA,YAAAA,gBAAgB,QAAQ,KAAK;AAAA,IAAA;AAAA,IAExC,CAAC,KAAK;AAAA,EAAA;AAGR,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,EAAA;AAEP;AA6BO,SAAS,UAAU;AACxB,QAAM,EAAE,MAAA,IAAUF,yBAAA;AAElB,QAAM,OAAOE,YAAAA,gBAAgB,gBAAgB,KAAK,IAAI,MAAM,OAAO;AAEnE,QAAM,eAAeD,MAAAA;AAAAA,IACnB,OAAO;AAAA,MACL,QAAQC,YAAAA,gBAAgB,OAAO,KAAK;AAAA,MACpC,WAAWA,YAAAA,gBAAgB,UAAU,KAAK;AAAA,MAC1C,iBAAiBA,YAAAA,gBAAgB,gBAAgB,KAAK;AAAA,MACtD,mBAAmBA,YAAAA,gBAAgB,kBAAkB,KAAK;AAAA,MAC1D,SAASA,YAAAA,gBAAgB,QAAQ,KAAK;AAAA,IAAA;AAAA,IAExC,CAAC,KAAK;AAAA,EAAA;AAGR,SAAO;AAAA,IACL;AAAA,IACA,GAAG;AAAA,EAAA;AAEP;;;"}
1
+ {"version":3,"file":"use-auth.cjs","sources":["../../src/hooks/use-auth.ts"],"sourcesContent":["import { useMemo } from 'react';\n\nimport { useAuthContext } from '../providers/auth/auth.hook';\nimport { type AuthContextValue, AuthStateGuards } from '../types';\n\n/**\n * Return type for useAuth hook\n */\nexport type UseAuthReturn = AuthContextValue & {\n isIdle: boolean;\n isLoading: boolean;\n isAuthenticated: boolean;\n isUnauthenticated: boolean;\n isReady: boolean;\n isError: boolean;\n};\n\n/**\n * Hook for accessing authentication state and actions\n *\n * Provides a type-safe interface to authentication state with discriminated union states\n * and convenient boolean properties for common checks.\n *\n * @example Using boolean properties\n * ```tsx\n * function MyComponent() {\n * const { isAuthenticated, isLoading, login, logout } = useAuth();\n *\n * if (isLoading) {\n * return <Spinner />;\n * }\n *\n * if (isAuthenticated) {\n * return (\n * <div>\n * <p>Welcome!</p>\n * <button onClick={logout}>Logout</button>\n * </div>\n * );\n * }\n *\n * return <LoginForm onLogin={login} />;\n * }\n * ```\n *\n * @example Using discriminated union state for advanced cases\n * ```tsx\n * function AuthStatus() {\n * const { state, isError } = useAuth();\n *\n * if (isError && state.status === 'error') {\n * return <div>Error: {state.error}</div>;\n * }\n *\n * return <div>Status: {state.status}</div>;\n * }\n * ```\n */\nexport function useAuth(): UseAuthReturn {\n const context = useAuthContext();\n const { state } = context;\n\n const booleanState = useMemo(\n () => ({\n isIdle: AuthStateGuards.isIdle(state),\n isLoading: AuthStateGuards.isLoading(state),\n isAuthenticated: AuthStateGuards.isAuthenticated(state),\n isUnauthenticated: AuthStateGuards.isUnauthenticated(state),\n isReady: AuthStateGuards.isReady(state),\n isError: AuthStateGuards.isError(state),\n }),\n [state],\n );\n\n return {\n ...context,\n ...booleanState,\n };\n}\n\n/**\n * Hook for getting current user information with auth state\n *\n * Returns the user object if authenticated (null otherwise) along with boolean state properties.\n *\n * @example\n * ```tsx\n * function UserProfile() {\n * const { user, isAuthenticated, isLoading } = useUser();\n *\n * if (isLoading) {\n * return <Spinner />;\n * }\n *\n * if (!isAuthenticated || !user) {\n * return <div>Not authenticated</div>;\n * }\n *\n * return (\n * <div>\n * <h1>{user.firstName} {user.lastName}</h1>\n * <p>{user.email}</p>\n * </div>\n * );\n * }\n * ```\n */\nexport function useUser() {\n const { state } = useAuthContext();\n\n const user = AuthStateGuards.isAuthenticated(state) ? state.user : null;\n\n const booleanState = useMemo(\n () => ({\n isIdle: AuthStateGuards.isIdle(state),\n isLoading: AuthStateGuards.isLoading(state),\n isAuthenticated: AuthStateGuards.isAuthenticated(state),\n isUnauthenticated: AuthStateGuards.isUnauthenticated(state),\n isError: AuthStateGuards.isError(state),\n }),\n [state],\n );\n\n return {\n user,\n ...booleanState,\n };\n}\n"],"names":["useAuthContext","useMemo","AuthStateGuards"],"mappings":";;;;;AA0DO,SAAS,UAAyB;AACvC,QAAM,UAAUA,UAAAA,eAAA;AAChB,QAAM,EAAE,UAAU;AAElB,QAAM,eAAeC,MAAAA;AAAAA,IACnB,OAAO;AAAA,MACL,QAAQC,YAAAA,gBAAgB,OAAO,KAAK;AAAA,MACpC,WAAWA,YAAAA,gBAAgB,UAAU,KAAK;AAAA,MAC1C,iBAAiBA,YAAAA,gBAAgB,gBAAgB,KAAK;AAAA,MACtD,mBAAmBA,YAAAA,gBAAgB,kBAAkB,KAAK;AAAA,MAC1D,SAASA,YAAAA,gBAAgB,QAAQ,KAAK;AAAA,MACtC,SAASA,YAAAA,gBAAgB,QAAQ,KAAK;AAAA,IAAA;AAAA,IAExC,CAAC,KAAK;AAAA,EAAA;AAGR,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,EAAA;AAEP;AA6BO,SAAS,UAAU;AACxB,QAAM,EAAE,MAAA,IAAUF,yBAAA;AAElB,QAAM,OAAOE,YAAAA,gBAAgB,gBAAgB,KAAK,IAAI,MAAM,OAAO;AAEnE,QAAM,eAAeD,MAAAA;AAAAA,IACnB,OAAO;AAAA,MACL,QAAQC,YAAAA,gBAAgB,OAAO,KAAK;AAAA,MACpC,WAAWA,YAAAA,gBAAgB,UAAU,KAAK;AAAA,MAC1C,iBAAiBA,YAAAA,gBAAgB,gBAAgB,KAAK;AAAA,MACtD,mBAAmBA,YAAAA,gBAAgB,kBAAkB,KAAK;AAAA,MAC1D,SAASA,YAAAA,gBAAgB,QAAQ,KAAK;AAAA,IAAA;AAAA,IAExC,CAAC,KAAK;AAAA,EAAA;AAGR,SAAO;AAAA,IACL;AAAA,IACA,GAAG;AAAA,EAAA;AAEP;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-auth.d.ts","sourceRoot":"","sources":["../../src/hooks/use-auth.ts"],"names":[],"mappings":"AAGA,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG;IAC7C,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,OAAO,IAAI,aAAa,CAoBvC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,OAAO;;;;;;;EAoBtB"}
1
+ {"version":3,"file":"use-auth.d.ts","sourceRoot":"","sources":["../../src/hooks/use-auth.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,gBAAgB,EAAmB,MAAM,UAAU,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG;IAC7C,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,OAAO,IAAI,aAAa,CAoBvC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,OAAO;;;;;;;EAoBtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-auth.js","sources":["../../src/hooks/use-auth.ts"],"sourcesContent":["import { useMemo } from 'react';\n\nimport { useAuthContext } from '../providers/auth/auth.hook';\nimport { AuthStateGuards, type AuthContextValue } from '../types';\n\n/**\n * Return type for useAuth hook\n */\nexport type UseAuthReturn = AuthContextValue & {\n isIdle: boolean;\n isLoading: boolean;\n isAuthenticated: boolean;\n isUnauthenticated: boolean;\n isReady: boolean;\n isError: boolean;\n};\n\n/**\n * Hook for accessing authentication state and actions\n *\n * Provides a type-safe interface to authentication state with discriminated union states\n * and convenient boolean properties for common checks.\n *\n * @example Using boolean properties\n * ```tsx\n * function MyComponent() {\n * const { isAuthenticated, isLoading, login, logout } = useAuth();\n *\n * if (isLoading) {\n * return <Spinner />;\n * }\n *\n * if (isAuthenticated) {\n * return (\n * <div>\n * <p>Welcome!</p>\n * <button onClick={logout}>Logout</button>\n * </div>\n * );\n * }\n *\n * return <LoginForm onLogin={login} />;\n * }\n * ```\n *\n * @example Using discriminated union state for advanced cases\n * ```tsx\n * function AuthStatus() {\n * const { state, isError } = useAuth();\n *\n * if (isError && state.status === 'error') {\n * return <div>Error: {state.error}</div>;\n * }\n *\n * return <div>Status: {state.status}</div>;\n * }\n * ```\n */\nexport function useAuth(): UseAuthReturn {\n const context = useAuthContext();\n const { state } = context;\n\n const booleanState = useMemo(\n () => ({\n isIdle: AuthStateGuards.isIdle(state),\n isLoading: AuthStateGuards.isLoading(state),\n isAuthenticated: AuthStateGuards.isAuthenticated(state),\n isUnauthenticated: AuthStateGuards.isUnauthenticated(state),\n isReady: AuthStateGuards.isReady(state),\n isError: AuthStateGuards.isError(state),\n }),\n [state],\n );\n\n return {\n ...context,\n ...booleanState,\n };\n}\n\n/**\n * Hook for getting current user information with auth state\n *\n * Returns the user object if authenticated (null otherwise) along with boolean state properties.\n *\n * @example\n * ```tsx\n * function UserProfile() {\n * const { user, isAuthenticated, isLoading } = useUser();\n *\n * if (isLoading) {\n * return <Spinner />;\n * }\n *\n * if (!isAuthenticated || !user) {\n * return <div>Not authenticated</div>;\n * }\n *\n * return (\n * <div>\n * <h1>{user.firstName} {user.lastName}</h1>\n * <p>{user.email}</p>\n * </div>\n * );\n * }\n * ```\n */\nexport function useUser() {\n const { state } = useAuthContext();\n\n const user = AuthStateGuards.isAuthenticated(state) ? state.user : null;\n\n const booleanState = useMemo(\n () => ({\n isIdle: AuthStateGuards.isIdle(state),\n isLoading: AuthStateGuards.isLoading(state),\n isAuthenticated: AuthStateGuards.isAuthenticated(state),\n isUnauthenticated: AuthStateGuards.isUnauthenticated(state),\n isError: AuthStateGuards.isError(state),\n }),\n [state],\n );\n\n return {\n user,\n ...booleanState,\n };\n}\n"],"names":[],"mappings":";;;AA0DO,SAAS,UAAyB;AACvC,QAAM,UAAU,eAAA;AAChB,QAAM,EAAE,UAAU;AAElB,QAAM,eAAe;AAAA,IACnB,OAAO;AAAA,MACL,QAAQ,gBAAgB,OAAO,KAAK;AAAA,MACpC,WAAW,gBAAgB,UAAU,KAAK;AAAA,MAC1C,iBAAiB,gBAAgB,gBAAgB,KAAK;AAAA,MACtD,mBAAmB,gBAAgB,kBAAkB,KAAK;AAAA,MAC1D,SAAS,gBAAgB,QAAQ,KAAK;AAAA,MACtC,SAAS,gBAAgB,QAAQ,KAAK;AAAA,IAAA;AAAA,IAExC,CAAC,KAAK;AAAA,EAAA;AAGR,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,EAAA;AAEP;AA6BO,SAAS,UAAU;AACxB,QAAM,EAAE,MAAA,IAAU,eAAA;AAElB,QAAM,OAAO,gBAAgB,gBAAgB,KAAK,IAAI,MAAM,OAAO;AAEnE,QAAM,eAAe;AAAA,IACnB,OAAO;AAAA,MACL,QAAQ,gBAAgB,OAAO,KAAK;AAAA,MACpC,WAAW,gBAAgB,UAAU,KAAK;AAAA,MAC1C,iBAAiB,gBAAgB,gBAAgB,KAAK;AAAA,MACtD,mBAAmB,gBAAgB,kBAAkB,KAAK;AAAA,MAC1D,SAAS,gBAAgB,QAAQ,KAAK;AAAA,IAAA;AAAA,IAExC,CAAC,KAAK;AAAA,EAAA;AAGR,SAAO;AAAA,IACL;AAAA,IACA,GAAG;AAAA,EAAA;AAEP;"}
1
+ {"version":3,"file":"use-auth.js","sources":["../../src/hooks/use-auth.ts"],"sourcesContent":["import { useMemo } from 'react';\n\nimport { useAuthContext } from '../providers/auth/auth.hook';\nimport { type AuthContextValue, AuthStateGuards } from '../types';\n\n/**\n * Return type for useAuth hook\n */\nexport type UseAuthReturn = AuthContextValue & {\n isIdle: boolean;\n isLoading: boolean;\n isAuthenticated: boolean;\n isUnauthenticated: boolean;\n isReady: boolean;\n isError: boolean;\n};\n\n/**\n * Hook for accessing authentication state and actions\n *\n * Provides a type-safe interface to authentication state with discriminated union states\n * and convenient boolean properties for common checks.\n *\n * @example Using boolean properties\n * ```tsx\n * function MyComponent() {\n * const { isAuthenticated, isLoading, login, logout } = useAuth();\n *\n * if (isLoading) {\n * return <Spinner />;\n * }\n *\n * if (isAuthenticated) {\n * return (\n * <div>\n * <p>Welcome!</p>\n * <button onClick={logout}>Logout</button>\n * </div>\n * );\n * }\n *\n * return <LoginForm onLogin={login} />;\n * }\n * ```\n *\n * @example Using discriminated union state for advanced cases\n * ```tsx\n * function AuthStatus() {\n * const { state, isError } = useAuth();\n *\n * if (isError && state.status === 'error') {\n * return <div>Error: {state.error}</div>;\n * }\n *\n * return <div>Status: {state.status}</div>;\n * }\n * ```\n */\nexport function useAuth(): UseAuthReturn {\n const context = useAuthContext();\n const { state } = context;\n\n const booleanState = useMemo(\n () => ({\n isIdle: AuthStateGuards.isIdle(state),\n isLoading: AuthStateGuards.isLoading(state),\n isAuthenticated: AuthStateGuards.isAuthenticated(state),\n isUnauthenticated: AuthStateGuards.isUnauthenticated(state),\n isReady: AuthStateGuards.isReady(state),\n isError: AuthStateGuards.isError(state),\n }),\n [state],\n );\n\n return {\n ...context,\n ...booleanState,\n };\n}\n\n/**\n * Hook for getting current user information with auth state\n *\n * Returns the user object if authenticated (null otherwise) along with boolean state properties.\n *\n * @example\n * ```tsx\n * function UserProfile() {\n * const { user, isAuthenticated, isLoading } = useUser();\n *\n * if (isLoading) {\n * return <Spinner />;\n * }\n *\n * if (!isAuthenticated || !user) {\n * return <div>Not authenticated</div>;\n * }\n *\n * return (\n * <div>\n * <h1>{user.firstName} {user.lastName}</h1>\n * <p>{user.email}</p>\n * </div>\n * );\n * }\n * ```\n */\nexport function useUser() {\n const { state } = useAuthContext();\n\n const user = AuthStateGuards.isAuthenticated(state) ? state.user : null;\n\n const booleanState = useMemo(\n () => ({\n isIdle: AuthStateGuards.isIdle(state),\n isLoading: AuthStateGuards.isLoading(state),\n isAuthenticated: AuthStateGuards.isAuthenticated(state),\n isUnauthenticated: AuthStateGuards.isUnauthenticated(state),\n isError: AuthStateGuards.isError(state),\n }),\n [state],\n );\n\n return {\n user,\n ...booleanState,\n };\n}\n"],"names":[],"mappings":";;;AA0DO,SAAS,UAAyB;AACvC,QAAM,UAAU,eAAA;AAChB,QAAM,EAAE,UAAU;AAElB,QAAM,eAAe;AAAA,IACnB,OAAO;AAAA,MACL,QAAQ,gBAAgB,OAAO,KAAK;AAAA,MACpC,WAAW,gBAAgB,UAAU,KAAK;AAAA,MAC1C,iBAAiB,gBAAgB,gBAAgB,KAAK;AAAA,MACtD,mBAAmB,gBAAgB,kBAAkB,KAAK;AAAA,MAC1D,SAAS,gBAAgB,QAAQ,KAAK;AAAA,MACtC,SAAS,gBAAgB,QAAQ,KAAK;AAAA,IAAA;AAAA,IAExC,CAAC,KAAK;AAAA,EAAA;AAGR,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,EAAA;AAEP;AA6BO,SAAS,UAAU;AACxB,QAAM,EAAE,MAAA,IAAU,eAAA;AAElB,QAAM,OAAO,gBAAgB,gBAAgB,KAAK,IAAI,MAAM,OAAO;AAEnE,QAAM,eAAe;AAAA,IACnB,OAAO;AAAA,MACL,QAAQ,gBAAgB,OAAO,KAAK;AAAA,MACpC,WAAW,gBAAgB,UAAU,KAAK;AAAA,MAC1C,iBAAiB,gBAAgB,gBAAgB,KAAK;AAAA,MACtD,mBAAmB,gBAAgB,kBAAkB,KAAK;AAAA,MAC1D,SAAS,gBAAgB,QAAQ,KAAK;AAAA,IAAA;AAAA,IAExC,CAAC,KAAK;AAAA,EAAA;AAGR,SAAO;AAAA,IACL;AAAA,IACA,GAAG;AAAA,EAAA;AAEP;"}
@@ -7,7 +7,7 @@ function useMembers({
7
7
  resourceId,
8
8
  page = 1,
9
9
  limit = 20,
10
- search = "",
10
+ search: _search = "",
11
11
  enabled = true
12
12
  }) {
13
13
  const { client } = blimu_hook.useBlimu();
@@ -22,7 +22,7 @@ function useMembers({
22
22
  setIsLoading(true);
23
23
  setError(null);
24
24
  try {
25
- const runtimeClient = client.getClient();
25
+ const _runtimeClient = client.getClient();
26
26
  const response = {
27
27
  items: [],
28
28
  total: 0,
@@ -39,7 +39,7 @@ function useMembers({
39
39
  } finally {
40
40
  setIsLoading(false);
41
41
  }
42
- }, [client, resourceType, resourceId, page, limit, search, enabled]);
42
+ }, [client, resourceType, resourceId, page, limit, enabled]);
43
43
  React.useEffect(() => {
44
44
  fetchMembers();
45
45
  }, [fetchMembers]);
@@ -1 +1 @@
1
- {"version":3,"file":"use-members.cjs","sources":["../../src/hooks/use-members.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nimport { useBlimu } from '../providers';\n\nexport interface ResourceMember {\n userId: string;\n role: string;\n inherited: boolean;\n user: {\n id: string;\n email: string;\n firstName: string | null;\n lastName: string | null;\n avatarUrl: string | null;\n emailVerified: boolean;\n createdAt: string;\n updatedAt: string;\n lastLoginAt: string | null;\n };\n}\n\nexport interface UseMembersOptions {\n resourceType: string;\n resourceId: string;\n page?: number;\n limit?: number;\n search?: string;\n enabled?: boolean;\n}\n\nexport interface UseMembersResult {\n members: ResourceMember[];\n total: number;\n page: number;\n limit: number;\n isLoading: boolean;\n error: Error | null;\n refetch: () => Promise<void>;\n hasNextPage: boolean;\n hasPreviousPage: boolean;\n}\n\n/**\n * Hook to fetch and manage members list for a resource\n *\n * @example\n * ```tsx\n * const { members, isLoading, error } = useMembers({\n * resourceType: 'organization',\n * resourceId: 'org_123',\n * page: 1,\n * limit: 20,\n * });\n * ```\n */\nexport function useMembers({\n resourceType,\n resourceId,\n page = 1,\n limit = 20,\n search = '',\n enabled = true,\n}: UseMembersOptions): UseMembersResult {\n const { client } = useBlimu();\n const [members, setMembers] = useState<ResourceMember[]>([]);\n const [total, setTotal] = useState(0);\n const [isLoading, setIsLoading] = useState(false);\n const [error, setError] = useState<Error | null>(null);\n\n const fetchMembers = useCallback(async () => {\n if (!enabled || !resourceType || !resourceId) {\n return;\n }\n\n setIsLoading(true);\n setError(null);\n\n try {\n // TODO: Implement when resourceMembers API is available in runtime client\n // For now, this is a placeholder that will need to be implemented\n // when the runtime client exposes the resourceMembers service\n const runtimeClient = client.getClient();\n \n // This will need to be implemented when the API is available\n // const response = await runtimeClient.resourceMembers.list(resourceType, resourceId, {\n // page,\n // limit,\n // search,\n // });\n \n // Placeholder response\n const response = {\n items: [],\n total: 0,\n page,\n limit,\n };\n\n setMembers(response.items);\n setTotal(response.total);\n } catch (err) {\n const error = err instanceof Error ? err : new Error('Failed to fetch members');\n setError(error);\n setMembers([]);\n setTotal(0);\n } finally {\n setIsLoading(false);\n }\n }, [client, resourceType, resourceId, page, limit, search, enabled]);\n\n useEffect(() => {\n fetchMembers();\n }, [fetchMembers]);\n\n const hasNextPage = total > page * limit;\n const hasPreviousPage = page > 1;\n\n return {\n members,\n total,\n page,\n limit,\n isLoading,\n error,\n refetch: fetchMembers,\n hasNextPage,\n hasPreviousPage,\n };\n}\n"],"names":["useBlimu","useState","useCallback","error","useEffect"],"mappings":";;;;AAuDO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,UAAU;AACZ,GAAwC;AACtC,QAAM,EAAE,OAAA,IAAWA,oBAAA;AACnB,QAAM,CAAC,SAAS,UAAU,IAAIC,MAAAA,SAA2B,CAAA,CAAE;AAC3D,QAAM,CAAC,OAAO,QAAQ,IAAIA,MAAAA,SAAS,CAAC;AACpC,QAAM,CAAC,WAAW,YAAY,IAAIA,MAAAA,SAAS,KAAK;AAChD,QAAM,CAAC,OAAO,QAAQ,IAAIA,MAAAA,SAAuB,IAAI;AAErD,QAAM,eAAeC,MAAAA,YAAY,YAAY;AAC3C,QAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,YAAY;AAC5C;AAAA,IACF;AAEA,iBAAa,IAAI;AACjB,aAAS,IAAI;AAEb,QAAI;AAIF,YAAM,gBAAgB,OAAO,UAAA;AAU7B,YAAM,WAAW;AAAA,QACf,OAAO,CAAA;AAAA,QACP,OAAO;AAAA,QACP;AAAA,QACA;AAAA,MAAA;AAGF,iBAAW,SAAS,KAAK;AACzB,eAAS,SAAS,KAAK;AAAA,IACzB,SAAS,KAAK;AACZ,YAAMC,SAAQ,eAAe,QAAQ,MAAM,IAAI,MAAM,yBAAyB;AAC9E,eAASA,MAAK;AACd,iBAAW,CAAA,CAAE;AACb,eAAS,CAAC;AAAA,IACZ,UAAA;AACE,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,QAAQ,cAAc,YAAY,MAAM,OAAO,QAAQ,OAAO,CAAC;AAEnEC,QAAAA,UAAU,MAAM;AACd,iBAAA;AAAA,EACF,GAAG,CAAC,YAAY,CAAC;AAEjB,QAAM,cAAc,QAAQ,OAAO;AACnC,QAAM,kBAAkB,OAAO;AAE/B,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA;AAAA,EAAA;AAEJ;;"}
1
+ {"version":3,"file":"use-members.cjs","sources":["../../src/hooks/use-members.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nimport { useBlimu } from '../providers';\n\nexport interface ResourceMember {\n userId: string;\n role: string;\n inherited: boolean;\n user: {\n id: string;\n email: string;\n firstName: string | null;\n lastName: string | null;\n avatarUrl: string | null;\n emailVerified: boolean;\n createdAt: string;\n updatedAt: string;\n lastLoginAt: string | null;\n };\n}\n\nexport interface UseMembersOptions {\n resourceType: string;\n resourceId: string;\n page?: number | undefined;\n limit?: number | undefined;\n search?: string | undefined;\n enabled?: boolean | undefined;\n}\n\nexport interface UseMembersResult {\n members: ResourceMember[];\n total: number;\n page: number;\n limit: number;\n isLoading: boolean;\n error: Error | null;\n refetch: () => Promise<void>;\n hasNextPage: boolean;\n hasPreviousPage: boolean;\n}\n\n/**\n * Hook to fetch and manage members list for a resource\n *\n * @example\n * ```tsx\n * const { members, isLoading, error } = useMembers({\n * resourceType: 'organization',\n * resourceId: 'org_123',\n * page: 1,\n * limit: 20,\n * });\n * ```\n */\nexport function useMembers({\n resourceType,\n resourceId,\n page = 1,\n limit = 20,\n search: _search = '',\n enabled = true,\n}: UseMembersOptions): UseMembersResult {\n const { client } = useBlimu();\n const [members, setMembers] = useState<ResourceMember[]>([]);\n const [total, setTotal] = useState(0);\n const [isLoading, setIsLoading] = useState(false);\n const [error, setError] = useState<Error | null>(null);\n\n const fetchMembers = useCallback(async () => {\n if (!enabled || !resourceType || !resourceId) {\n return;\n }\n\n setIsLoading(true);\n setError(null);\n\n try {\n // TODO: Implement when resourceMembers API is available in runtime client\n // For now, this is a placeholder that will need to be implemented\n // when the runtime client exposes the resourceMembers service\n const _runtimeClient = client.getClient();\n\n // This will need to be implemented when the API is available\n // const response = await runtimeClient.resourceMembers.list(resourceType, resourceId, {\n // page,\n // limit,\n // search,\n // });\n\n // Placeholder response\n const response = {\n items: [],\n total: 0,\n page,\n limit,\n };\n\n setMembers(response.items);\n setTotal(response.total);\n } catch (err) {\n const error = err instanceof Error ? err : new Error('Failed to fetch members');\n setError(error);\n setMembers([]);\n setTotal(0);\n } finally {\n setIsLoading(false);\n }\n }, [client, resourceType, resourceId, page, limit, enabled]);\n\n useEffect(() => {\n fetchMembers();\n }, [fetchMembers]);\n\n const hasNextPage = total > page * limit;\n const hasPreviousPage = page > 1;\n\n return {\n members,\n total,\n page,\n limit,\n isLoading,\n error,\n refetch: fetchMembers,\n hasNextPage,\n hasPreviousPage,\n };\n}\n"],"names":["useBlimu","useState","useCallback","error","useEffect"],"mappings":";;;;AAuDO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ,UAAU;AAAA,EAClB,UAAU;AACZ,GAAwC;AACtC,QAAM,EAAE,OAAA,IAAWA,oBAAA;AACnB,QAAM,CAAC,SAAS,UAAU,IAAIC,MAAAA,SAA2B,CAAA,CAAE;AAC3D,QAAM,CAAC,OAAO,QAAQ,IAAIA,MAAAA,SAAS,CAAC;AACpC,QAAM,CAAC,WAAW,YAAY,IAAIA,MAAAA,SAAS,KAAK;AAChD,QAAM,CAAC,OAAO,QAAQ,IAAIA,MAAAA,SAAuB,IAAI;AAErD,QAAM,eAAeC,MAAAA,YAAY,YAAY;AAC3C,QAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,YAAY;AAC5C;AAAA,IACF;AAEA,iBAAa,IAAI;AACjB,aAAS,IAAI;AAEb,QAAI;AAIF,YAAM,iBAAiB,OAAO,UAAA;AAU9B,YAAM,WAAW;AAAA,QACf,OAAO,CAAA;AAAA,QACP,OAAO;AAAA,QACP;AAAA,QACA;AAAA,MAAA;AAGF,iBAAW,SAAS,KAAK;AACzB,eAAS,SAAS,KAAK;AAAA,IACzB,SAAS,KAAK;AACZ,YAAMC,SAAQ,eAAe,QAAQ,MAAM,IAAI,MAAM,yBAAyB;AAC9E,eAASA,MAAK;AACd,iBAAW,CAAA,CAAE;AACb,eAAS,CAAC;AAAA,IACZ,UAAA;AACE,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,QAAQ,cAAc,YAAY,MAAM,OAAO,OAAO,CAAC;AAE3DC,QAAAA,UAAU,MAAM;AACd,iBAAA;AAAA,EACF,GAAG,CAAC,YAAY,CAAC;AAEjB,QAAM,cAAc,QAAQ,OAAO;AACnC,QAAM,kBAAkB,OAAO;AAE/B,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA;AAAA,EAAA;AAEJ;;"}
@@ -17,10 +17,10 @@ export interface ResourceMember {
17
17
  export interface UseMembersOptions {
18
18
  resourceType: string;
19
19
  resourceId: string;
20
- page?: number;
21
- limit?: number;
22
- search?: string;
23
- enabled?: boolean;
20
+ page?: number | undefined;
21
+ limit?: number | undefined;
22
+ search?: string | undefined;
23
+ enabled?: boolean | undefined;
24
24
  }
25
25
  export interface UseMembersResult {
26
26
  members: ResourceMember[];
@@ -46,5 +46,5 @@ export interface UseMembersResult {
46
46
  * });
47
47
  * ```
48
48
  */
49
- export declare function useMembers({ resourceType, resourceId, page, limit, search, enabled, }: UseMembersOptions): UseMembersResult;
49
+ export declare function useMembers({ resourceType, resourceId, page, limit, search: _search, enabled, }: UseMembersOptions): UseMembersResult;
50
50
  //# sourceMappingURL=use-members.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-members.d.ts","sourceRoot":"","sources":["../../src/hooks/use-members.ts"],"names":[],"mappings":"AAIA,MAA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,KAAU,EACV,MAAM,EAAE,OAAY,EACpB,OAAc,GACf,EAAE,iBAAiB,GAAG,gBAAgB,CAkEtC"}
@@ -5,7 +5,7 @@ function useMembers({
5
5
  resourceId,
6
6
  page = 1,
7
7
  limit = 20,
8
- search = "",
8
+ search: _search = "",
9
9
  enabled = true
10
10
  }) {
11
11
  const { client } = useBlimu();
@@ -20,7 +20,7 @@ function useMembers({
20
20
  setIsLoading(true);
21
21
  setError(null);
22
22
  try {
23
- const runtimeClient = client.getClient();
23
+ const _runtimeClient = client.getClient();
24
24
  const response = {
25
25
  items: [],
26
26
  total: 0,
@@ -37,7 +37,7 @@ function useMembers({
37
37
  } finally {
38
38
  setIsLoading(false);
39
39
  }
40
- }, [client, resourceType, resourceId, page, limit, search, enabled]);
40
+ }, [client, resourceType, resourceId, page, limit, enabled]);
41
41
  useEffect(() => {
42
42
  fetchMembers();
43
43
  }, [fetchMembers]);
@@ -1 +1 @@
1
- {"version":3,"file":"use-members.js","sources":["../../src/hooks/use-members.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nimport { useBlimu } from '../providers';\n\nexport interface ResourceMember {\n userId: string;\n role: string;\n inherited: boolean;\n user: {\n id: string;\n email: string;\n firstName: string | null;\n lastName: string | null;\n avatarUrl: string | null;\n emailVerified: boolean;\n createdAt: string;\n updatedAt: string;\n lastLoginAt: string | null;\n };\n}\n\nexport interface UseMembersOptions {\n resourceType: string;\n resourceId: string;\n page?: number;\n limit?: number;\n search?: string;\n enabled?: boolean;\n}\n\nexport interface UseMembersResult {\n members: ResourceMember[];\n total: number;\n page: number;\n limit: number;\n isLoading: boolean;\n error: Error | null;\n refetch: () => Promise<void>;\n hasNextPage: boolean;\n hasPreviousPage: boolean;\n}\n\n/**\n * Hook to fetch and manage members list for a resource\n *\n * @example\n * ```tsx\n * const { members, isLoading, error } = useMembers({\n * resourceType: 'organization',\n * resourceId: 'org_123',\n * page: 1,\n * limit: 20,\n * });\n * ```\n */\nexport function useMembers({\n resourceType,\n resourceId,\n page = 1,\n limit = 20,\n search = '',\n enabled = true,\n}: UseMembersOptions): UseMembersResult {\n const { client } = useBlimu();\n const [members, setMembers] = useState<ResourceMember[]>([]);\n const [total, setTotal] = useState(0);\n const [isLoading, setIsLoading] = useState(false);\n const [error, setError] = useState<Error | null>(null);\n\n const fetchMembers = useCallback(async () => {\n if (!enabled || !resourceType || !resourceId) {\n return;\n }\n\n setIsLoading(true);\n setError(null);\n\n try {\n // TODO: Implement when resourceMembers API is available in runtime client\n // For now, this is a placeholder that will need to be implemented\n // when the runtime client exposes the resourceMembers service\n const runtimeClient = client.getClient();\n \n // This will need to be implemented when the API is available\n // const response = await runtimeClient.resourceMembers.list(resourceType, resourceId, {\n // page,\n // limit,\n // search,\n // });\n \n // Placeholder response\n const response = {\n items: [],\n total: 0,\n page,\n limit,\n };\n\n setMembers(response.items);\n setTotal(response.total);\n } catch (err) {\n const error = err instanceof Error ? err : new Error('Failed to fetch members');\n setError(error);\n setMembers([]);\n setTotal(0);\n } finally {\n setIsLoading(false);\n }\n }, [client, resourceType, resourceId, page, limit, search, enabled]);\n\n useEffect(() => {\n fetchMembers();\n }, [fetchMembers]);\n\n const hasNextPage = total > page * limit;\n const hasPreviousPage = page > 1;\n\n return {\n members,\n total,\n page,\n limit,\n isLoading,\n error,\n refetch: fetchMembers,\n hasNextPage,\n hasPreviousPage,\n };\n}\n"],"names":["error"],"mappings":";;AAuDO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,UAAU;AACZ,GAAwC;AACtC,QAAM,EAAE,OAAA,IAAW,SAAA;AACnB,QAAM,CAAC,SAAS,UAAU,IAAI,SAA2B,CAAA,CAAE;AAC3D,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,CAAC;AACpC,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAChD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAuB,IAAI;AAErD,QAAM,eAAe,YAAY,YAAY;AAC3C,QAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,YAAY;AAC5C;AAAA,IACF;AAEA,iBAAa,IAAI;AACjB,aAAS,IAAI;AAEb,QAAI;AAIF,YAAM,gBAAgB,OAAO,UAAA;AAU7B,YAAM,WAAW;AAAA,QACf,OAAO,CAAA;AAAA,QACP,OAAO;AAAA,QACP;AAAA,QACA;AAAA,MAAA;AAGF,iBAAW,SAAS,KAAK;AACzB,eAAS,SAAS,KAAK;AAAA,IACzB,SAAS,KAAK;AACZ,YAAMA,SAAQ,eAAe,QAAQ,MAAM,IAAI,MAAM,yBAAyB;AAC9E,eAASA,MAAK;AACd,iBAAW,CAAA,CAAE;AACb,eAAS,CAAC;AAAA,IACZ,UAAA;AACE,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,QAAQ,cAAc,YAAY,MAAM,OAAO,QAAQ,OAAO,CAAC;AAEnE,YAAU,MAAM;AACd,iBAAA;AAAA,EACF,GAAG,CAAC,YAAY,CAAC;AAEjB,QAAM,cAAc,QAAQ,OAAO;AACnC,QAAM,kBAAkB,OAAO;AAE/B,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"use-members.js","sources":["../../src/hooks/use-members.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nimport { useBlimu } from '../providers';\n\nexport interface ResourceMember {\n userId: string;\n role: string;\n inherited: boolean;\n user: {\n id: string;\n email: string;\n firstName: string | null;\n lastName: string | null;\n avatarUrl: string | null;\n emailVerified: boolean;\n createdAt: string;\n updatedAt: string;\n lastLoginAt: string | null;\n };\n}\n\nexport interface UseMembersOptions {\n resourceType: string;\n resourceId: string;\n page?: number | undefined;\n limit?: number | undefined;\n search?: string | undefined;\n enabled?: boolean | undefined;\n}\n\nexport interface UseMembersResult {\n members: ResourceMember[];\n total: number;\n page: number;\n limit: number;\n isLoading: boolean;\n error: Error | null;\n refetch: () => Promise<void>;\n hasNextPage: boolean;\n hasPreviousPage: boolean;\n}\n\n/**\n * Hook to fetch and manage members list for a resource\n *\n * @example\n * ```tsx\n * const { members, isLoading, error } = useMembers({\n * resourceType: 'organization',\n * resourceId: 'org_123',\n * page: 1,\n * limit: 20,\n * });\n * ```\n */\nexport function useMembers({\n resourceType,\n resourceId,\n page = 1,\n limit = 20,\n search: _search = '',\n enabled = true,\n}: UseMembersOptions): UseMembersResult {\n const { client } = useBlimu();\n const [members, setMembers] = useState<ResourceMember[]>([]);\n const [total, setTotal] = useState(0);\n const [isLoading, setIsLoading] = useState(false);\n const [error, setError] = useState<Error | null>(null);\n\n const fetchMembers = useCallback(async () => {\n if (!enabled || !resourceType || !resourceId) {\n return;\n }\n\n setIsLoading(true);\n setError(null);\n\n try {\n // TODO: Implement when resourceMembers API is available in runtime client\n // For now, this is a placeholder that will need to be implemented\n // when the runtime client exposes the resourceMembers service\n const _runtimeClient = client.getClient();\n\n // This will need to be implemented when the API is available\n // const response = await runtimeClient.resourceMembers.list(resourceType, resourceId, {\n // page,\n // limit,\n // search,\n // });\n\n // Placeholder response\n const response = {\n items: [],\n total: 0,\n page,\n limit,\n };\n\n setMembers(response.items);\n setTotal(response.total);\n } catch (err) {\n const error = err instanceof Error ? err : new Error('Failed to fetch members');\n setError(error);\n setMembers([]);\n setTotal(0);\n } finally {\n setIsLoading(false);\n }\n }, [client, resourceType, resourceId, page, limit, enabled]);\n\n useEffect(() => {\n fetchMembers();\n }, [fetchMembers]);\n\n const hasNextPage = total > page * limit;\n const hasPreviousPage = page > 1;\n\n return {\n members,\n total,\n page,\n limit,\n isLoading,\n error,\n refetch: fetchMembers,\n hasNextPage,\n hasPreviousPage,\n };\n}\n"],"names":["error"],"mappings":";;AAuDO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,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.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const membersList = require("./components/members-list.cjs");
3
4
  const redirectToSignIn = require("./components/redirect-to-sign-in.cjs");
4
- const userButton = require("./components/user-button/user-button.cjs");
5
- const userAvatar = require("./components/user-avatar.cjs");
6
5
  const signInButton = require("./components/sign-in-button.cjs");
7
- const membersList = require("./components/members-list.cjs");
6
+ const userAvatar = require("./components/user-avatar.cjs");
7
+ const userButton = require("./components/user-button/user-button.cjs");
8
8
  const blimu_hook = require("./providers/blimu/blimu.hook.cjs");
9
9
  const useAuth = require("./hooks/use-auth.cjs");
10
10
  const useClient = require("./hooks/use-client.cjs");
@@ -16,11 +16,11 @@ const publishableKey = require("./utils/publishable-key.cjs");
16
16
  const tailwind = require("./tailwind.cjs");
17
17
  const theme_provider = require("./providers/theme/theme.provider.cjs");
18
18
  const theme_hook = require("./providers/theme/theme.hook.cjs");
19
+ exports.MembersList = membersList.MembersList;
19
20
  exports.RedirectToSignIn = redirectToSignIn.RedirectToSignIn;
20
- exports.UserButton = userButton.UserButton;
21
- exports.UserAvatar = userAvatar.UserAvatar;
22
21
  exports.SignInButton = signInButton.SignInButton;
23
- exports.MembersList = membersList.MembersList;
22
+ exports.UserAvatar = userAvatar.UserAvatar;
23
+ exports.UserButton = userButton.UserButton;
24
24
  exports.useBlimu = blimu_hook.useBlimu;
25
25
  exports.useAuth = useAuth.useAuth;
26
26
  exports.useUser = useAuth.useUser;
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- export type { RedirectToSignInProps, UserButtonProps, UserAvatarProps, SignInButtonProps, MembersListProps, } from './components';
2
- export { RedirectToSignIn, UserButton, UserAvatar, SignInButton, MembersList } from './components';
3
- export { useAuth, useBlimu, useUser, useMembers, useClient } from './hooks';
4
- export type { ResourceMember, UseMembersOptions, UseMembersResult, UseAuthReturn } from './hooks';
1
+ export type { MembersListProps, RedirectToSignInProps, SignInButtonProps, UserAvatarProps, UserButtonProps, } from './components';
2
+ export { MembersList, RedirectToSignIn, SignInButton, UserAvatar, UserButton } from './components';
3
+ export type { ResourceMember, UseAuthReturn, UseMembersOptions, UseMembersResult } from './hooks';
4
+ export { useAuth, useBlimu, useClient, useMembers, useUser } from './hooks';
5
+ export type { AppearanceConfig, Theme, ThemeContextValue } from './providers';
5
6
  export { BlimuProvider, ThemeProvider, useTheme } from './providers';
6
- export type { Theme, ThemeContextValue, AppearanceConfig } from './providers';
7
7
  export type { AuthContextValue, AuthState, BlimuConfig, User } from './types';
8
8
  export { AuthStateGuards } from './types';
9
9
  export { BlimuRuntimeClientWrapper } from './client/runtime-client';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkCA,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACnG,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC5E,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClG,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACrE,YAAY,EAAE,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG9E,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG1C,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAGpE,YAAY,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,+BAA+B,GAChC,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkCA,YAAY,EACV,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACnG,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAClG,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC5E,YAAY,EAAE,gBAAgB,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGrE,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG1C,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAGpE,YAAY,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,+BAA+B,GAChC,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
+ import { MembersList } from "./components/members-list.js";
1
2
  import { RedirectToSignIn } from "./components/redirect-to-sign-in.js";
2
- import { UserButton } from "./components/user-button/user-button.js";
3
- import { UserAvatar } from "./components/user-avatar.js";
4
3
  import { SignInButton } from "./components/sign-in-button.js";
5
- import { MembersList } from "./components/members-list.js";
4
+ import { UserAvatar } from "./components/user-avatar.js";
5
+ import { UserButton } from "./components/user-button/user-button.js";
6
6
  import { useBlimu } from "./providers/blimu/blimu.hook.js";
7
7
  import { useAuth, useUser } from "./hooks/use-auth.js";
8
8
  import { useClient } from "./hooks/use-client.js";
@@ -13,7 +13,7 @@ import { type VariantProps } from 'class-variance-authority';
13
13
  * ```
14
14
  */
15
15
  export declare const buttonVariants: (props?: ({
16
- variant?: "default" | "outline" | "ghost" | "destructive" | null | undefined;
16
+ variant?: "destructive" | "default" | "outline" | "ghost" | null | undefined;
17
17
  size?: "sm" | "lg" | "default" | "icon" | null | undefined;
18
18
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
19
19
  export type ButtonVariants = VariantProps<typeof buttonVariants>;
@@ -207,7 +207,7 @@ var MenuContentImpl = React__namespace.forwardRef(
207
207
  const pointerGraceIntentRef = React__namespace.useRef(null);
208
208
  const pointerDirRef = React__namespace.useRef("right");
209
209
  const lastPointerXRef = React__namespace.useRef(0);
210
- const ScrollLockWrapper = disableOutsideScroll ? Combination : React__namespace.Fragment;
210
+ const ScrollLockWrapper = disableOutsideScroll ? Combination.default : React__namespace.Fragment;
211
211
  const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot, allowPinchZoom: true } : void 0;
212
212
  const handleTypeaheadSearch = (key) => {
213
213
  const search = searchRef.current + key;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/@radix-ui/react-menu/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/menu.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs, composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SELECTION_KEYS = [\"Enter\", \" \"];\nvar FIRST_KEYS = [\"ArrowDown\", \"PageUp\", \"Home\"];\nvar LAST_KEYS = [\"ArrowUp\", \"PageDown\", \"End\"];\nvar FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];\nvar SUB_OPEN_KEYS = {\n ltr: [...SELECTION_KEYS, \"ArrowRight\"],\n rtl: [...SELECTION_KEYS, \"ArrowLeft\"]\n};\nvar SUB_CLOSE_KEYS = {\n ltr: [\"ArrowLeft\"],\n rtl: [\"ArrowRight\"]\n};\nvar MENU_NAME = \"Menu\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(MENU_NAME);\nvar [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [\n createCollectionScope,\n createPopperScope,\n createRovingFocusGroupScope\n]);\nvar usePopperScope = createPopperScope();\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);\nvar [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);\nvar Menu = (props) => {\n const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;\n const popperScope = usePopperScope(__scopeMenu);\n const [content, setContent] = React.useState(null);\n const isUsingKeyboardRef = React.useRef(false);\n const handleOpenChange = useCallbackRef(onOpenChange);\n const direction = useDirection(dir);\n React.useEffect(() => {\n const handleKeyDown = () => {\n isUsingKeyboardRef.current = true;\n document.addEventListener(\"pointerdown\", handlePointer, { capture: true, once: true });\n document.addEventListener(\"pointermove\", handlePointer, { capture: true, once: true });\n };\n const handlePointer = () => isUsingKeyboardRef.current = false;\n document.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => {\n document.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n document.removeEventListener(\"pointerdown\", handlePointer, { capture: true });\n document.removeEventListener(\"pointermove\", handlePointer, { capture: true });\n };\n }, []);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ jsx(\n MenuRootProvider,\n {\n scope: __scopeMenu,\n onClose: React.useCallback(() => handleOpenChange(false), [handleOpenChange]),\n isUsingKeyboardRef,\n dir: direction,\n modal,\n children\n }\n )\n }\n ) });\n};\nMenu.displayName = MENU_NAME;\nvar ANCHOR_NAME = \"MenuAnchor\";\nvar MenuAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...anchorProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nMenuAnchor.displayName = ANCHOR_NAME;\nvar PORTAL_NAME = \"MenuPortal\";\nvar [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar MenuPortal = (props) => {\n const { __scopeMenu, forceMount, children, container } = props;\n const context = useMenuContext(PORTAL_NAME, __scopeMenu);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nMenuPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"MenuContent\";\nvar [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME);\nvar MenuContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsx(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });\n }\n);\nvar MenuRootContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const content = ref.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: context.open,\n disableOutsideScroll: true,\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n ),\n onDismiss: () => context.onOpenChange(false)\n }\n );\n }\n);\nvar MenuRootContentNonModal = React.forwardRef((props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n onDismiss: () => context.onOpenChange(false)\n }\n );\n});\nvar Slot = createSlot(\"MenuContent.ScrollLock\");\nvar MenuContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeMenu,\n loop = false,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEntryFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n disableOutsideScroll,\n ...contentProps\n } = props;\n const context = useMenuContext(CONTENT_NAME, __scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const getItems = useCollection(__scopeMenu);\n const [currentItemId, setCurrentItemId] = React.useState(null);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange);\n const timerRef = React.useRef(0);\n const searchRef = React.useRef(\"\");\n const pointerGraceTimerRef = React.useRef(0);\n const pointerGraceIntentRef = React.useRef(null);\n const pointerDirRef = React.useRef(\"right\");\n const lastPointerXRef = React.useRef(0);\n const ScrollLockWrapper = disableOutsideScroll ? RemoveScroll : React.Fragment;\n const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot, allowPinchZoom: true } : void 0;\n const handleTypeaheadSearch = (key) => {\n const search = searchRef.current + key;\n const items = getItems().filter((item) => !item.disabled);\n const currentItem = document.activeElement;\n const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue;\n const values = items.map((item) => item.textValue);\n const nextMatch = getNextMatch(values, search, currentMatch);\n const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current;\n (function updateSearch(value) {\n searchRef.current = value;\n window.clearTimeout(timerRef.current);\n if (value !== \"\") timerRef.current = window.setTimeout(() => updateSearch(\"\"), 1e3);\n })(search);\n if (newItem) {\n setTimeout(() => newItem.focus());\n }\n };\n React.useEffect(() => {\n return () => window.clearTimeout(timerRef.current);\n }, []);\n useFocusGuards();\n const isPointerMovingToSubmenu = React.useCallback((event) => {\n const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;\n return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);\n }, []);\n return /* @__PURE__ */ jsx(\n MenuContentProvider,\n {\n scope: __scopeMenu,\n searchRef,\n onItemEnter: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n onItemLeave: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) return;\n contentRef.current?.focus();\n setCurrentItemId(null);\n },\n [isPointerMovingToSubmenu]\n ),\n onTriggerLeave: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n pointerGraceTimerRef,\n onPointerGraceIntentChange: React.useCallback((intent) => {\n pointerGraceIntentRef.current = intent;\n }, []),\n children: /* @__PURE__ */ jsx(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n trapped: trapFocus,\n onMountAutoFocus: composeEventHandlers(onOpenAutoFocus, (event) => {\n event.preventDefault();\n contentRef.current?.focus({ preventScroll: true });\n }),\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n children: /* @__PURE__ */ jsx(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n dir: rootContext.dir,\n orientation: \"vertical\",\n loop,\n currentTabStopId: currentItemId,\n onCurrentTabStopIdChange: setCurrentItemId,\n onEntryFocus: composeEventHandlers(onEntryFocus, (event) => {\n if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();\n }),\n preventScrollOnEntryFocus: true,\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n role: \"menu\",\n \"aria-orientation\": \"vertical\",\n \"data-state\": getOpenState(context.open),\n \"data-radix-menu-content\": \"\",\n dir: rootContext.dir,\n ...popperScope,\n ...contentProps,\n ref: composedRefs,\n style: { outline: \"none\", ...contentProps.style },\n onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => {\n const target = event.target;\n const isKeyDownInside = target.closest(\"[data-radix-menu-content]\") === event.currentTarget;\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n const isCharacterKey = event.key.length === 1;\n if (isKeyDownInside) {\n if (event.key === \"Tab\") event.preventDefault();\n if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);\n }\n const content = contentRef.current;\n if (event.target !== content) return;\n if (!FIRST_LAST_KEYS.includes(event.key)) return;\n event.preventDefault();\n const items = getItems().filter((item) => !item.disabled);\n const candidateNodes = items.map((item) => item.ref.current);\n if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();\n focusFirst(candidateNodes);\n }),\n onBlur: composeEventHandlers(props.onBlur, (event) => {\n if (!event.currentTarget.contains(event.target)) {\n window.clearTimeout(timerRef.current);\n searchRef.current = \"\";\n }\n }),\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n const target = event.target;\n const pointerXHasChanged = lastPointerXRef.current !== event.clientX;\n if (event.currentTarget.contains(target) && pointerXHasChanged) {\n const newDir = event.clientX > lastPointerXRef.current ? \"right\" : \"left\";\n pointerDirRef.current = newDir;\n lastPointerXRef.current = event.clientX;\n }\n })\n )\n }\n )\n }\n )\n }\n )\n }\n ) })\n }\n );\n }\n);\nMenuContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"MenuGroup\";\nvar MenuGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...groupProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { role: \"group\", ...groupProps, ref: forwardedRef });\n }\n);\nMenuGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"MenuLabel\";\nvar MenuLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...labelProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });\n }\n);\nMenuLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"MenuItem\";\nvar ITEM_SELECT = \"menu.itemSelect\";\nvar MenuItem = React.forwardRef(\n (props, forwardedRef) => {\n const { disabled = false, onSelect, ...itemProps } = props;\n const ref = React.useRef(null);\n const rootContext = useMenuRootContext(ITEM_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(ITEM_NAME, props.__scopeMenu);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const isPointerDownRef = React.useRef(false);\n const handleSelect = () => {\n const menuItem = ref.current;\n if (!disabled && menuItem) {\n const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true });\n menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true });\n dispatchDiscreteCustomEvent(menuItem, itemSelectEvent);\n if (itemSelectEvent.defaultPrevented) {\n isPointerDownRef.current = false;\n } else {\n rootContext.onClose();\n }\n }\n };\n return /* @__PURE__ */ jsx(\n MenuItemImpl,\n {\n ...itemProps,\n ref: composedRefs,\n disabled,\n onClick: composeEventHandlers(props.onClick, handleSelect),\n onPointerDown: (event) => {\n props.onPointerDown?.(event);\n isPointerDownRef.current = true;\n },\n onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {\n if (!isPointerDownRef.current) event.currentTarget?.click();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (disabled || isTypingAhead && event.key === \" \") return;\n if (SELECTION_KEYS.includes(event.key)) {\n event.currentTarget.click();\n event.preventDefault();\n }\n })\n }\n );\n }\n);\nMenuItem.displayName = ITEM_NAME;\nvar MenuItemImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;\n const contentContext = useMenuContentContext(ITEM_NAME, __scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [isFocused, setIsFocused] = React.useState(false);\n const [textContent, setTextContent] = React.useState(\"\");\n React.useEffect(() => {\n const menuItem = ref.current;\n if (menuItem) {\n setTextContent((menuItem.textContent ?? \"\").trim());\n }\n }, [itemProps.children]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeMenu,\n disabled,\n textValue: textValue ?? textContent,\n children: /* @__PURE__ */ jsx(RovingFocusGroup.Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"menuitem\",\n \"data-highlighted\": isFocused ? \"\" : void 0,\n \"aria-disabled\": disabled || void 0,\n \"data-disabled\": disabled ? \"\" : void 0,\n ...itemProps,\n ref: composedRefs,\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n if (disabled) {\n contentContext.onItemLeave(event);\n } else {\n contentContext.onItemEnter(event);\n if (!event.defaultPrevented) {\n const item = event.currentTarget;\n item.focus({ preventScroll: true });\n }\n }\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => contentContext.onItemLeave(event))\n ),\n onFocus: composeEventHandlers(props.onFocus, () => setIsFocused(true)),\n onBlur: composeEventHandlers(props.onBlur, () => setIsFocused(false))\n }\n ) })\n }\n );\n }\n);\nvar CHECKBOX_ITEM_NAME = \"MenuCheckboxItem\";\nvar MenuCheckboxItem = React.forwardRef(\n (props, forwardedRef) => {\n const { checked = false, onCheckedChange, ...checkboxItemProps } = props;\n return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n MenuItem,\n {\n role: \"menuitemcheckbox\",\n \"aria-checked\": isIndeterminate(checked) ? \"mixed\" : checked,\n ...checkboxItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: composeEventHandlers(\n checkboxItemProps.onSelect,\n () => onCheckedChange?.(isIndeterminate(checked) ? true : !checked),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"MenuRadioGroup\";\nvar [RadioGroupProvider, useRadioGroupContext] = createMenuContext(\n RADIO_GROUP_NAME,\n { value: void 0, onValueChange: () => {\n } }\n);\nvar MenuRadioGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { value, onValueChange, ...groupProps } = props;\n const handleValueChange = useCallbackRef(onValueChange);\n return /* @__PURE__ */ jsx(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });\n }\n);\nMenuRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"MenuRadioItem\";\nvar MenuRadioItem = React.forwardRef(\n (props, forwardedRef) => {\n const { value, ...radioItemProps } = props;\n const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu);\n const checked = value === context.value;\n return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n MenuItem,\n {\n role: \"menuitemradio\",\n \"aria-checked\": checked,\n ...radioItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: composeEventHandlers(\n radioItemProps.onSelect,\n () => context.onValueChange?.(value),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuRadioItem.displayName = RADIO_ITEM_NAME;\nvar ITEM_INDICATOR_NAME = \"MenuItemIndicator\";\nvar [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(\n ITEM_INDICATOR_NAME,\n { checked: false }\n);\nvar MenuItemIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;\n const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);\n return /* @__PURE__ */ jsx(\n Presence,\n {\n present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...itemIndicatorProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(indicatorContext.checked)\n }\n )\n }\n );\n }\n);\nMenuItemIndicator.displayName = ITEM_INDICATOR_NAME;\nvar SEPARATOR_NAME = \"MenuSeparator\";\nvar MenuSeparator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...separatorProps } = props;\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"separator\",\n \"aria-orientation\": \"horizontal\",\n ...separatorProps,\n ref: forwardedRef\n }\n );\n }\n);\nMenuSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"MenuArrow\";\nvar MenuArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nMenuArrow.displayName = ARROW_NAME;\nvar SUB_NAME = \"MenuSub\";\nvar [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME);\nvar MenuSub = (props) => {\n const { __scopeMenu, children, open = false, onOpenChange } = props;\n const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const [trigger, setTrigger] = React.useState(null);\n const [content, setContent] = React.useState(null);\n const handleOpenChange = useCallbackRef(onOpenChange);\n React.useEffect(() => {\n if (parentMenuContext.open === false) handleOpenChange(false);\n return () => handleOpenChange(false);\n }, [parentMenuContext.open, handleOpenChange]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ jsx(\n MenuSubProvider,\n {\n scope: __scopeMenu,\n contentId: useId(),\n triggerId: useId(),\n trigger,\n onTriggerChange: setTrigger,\n children\n }\n )\n }\n ) });\n};\nMenuSub.displayName = SUB_NAME;\nvar SUB_TRIGGER_NAME = \"MenuSubTrigger\";\nvar MenuSubTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const openTimerRef = React.useRef(null);\n const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;\n const scope = { __scopeMenu: props.__scopeMenu };\n const clearOpenTimer = React.useCallback(() => {\n if (openTimerRef.current) window.clearTimeout(openTimerRef.current);\n openTimerRef.current = null;\n }, []);\n React.useEffect(() => clearOpenTimer, [clearOpenTimer]);\n React.useEffect(() => {\n const pointerGraceTimer = pointerGraceTimerRef.current;\n return () => {\n window.clearTimeout(pointerGraceTimer);\n onPointerGraceIntentChange(null);\n };\n }, [pointerGraceTimerRef, onPointerGraceIntentChange]);\n return /* @__PURE__ */ jsx(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ jsx(\n MenuItemImpl,\n {\n id: subContext.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": context.open,\n \"aria-controls\": subContext.contentId,\n \"data-state\": getOpenState(context.open),\n ...props,\n ref: composeRefs(forwardedRef, subContext.onTriggerChange),\n onClick: (event) => {\n props.onClick?.(event);\n if (props.disabled || event.defaultPrevented) return;\n event.currentTarget.focus();\n if (!context.open) context.onOpenChange(true);\n },\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n contentContext.onItemEnter(event);\n if (event.defaultPrevented) return;\n if (!props.disabled && !context.open && !openTimerRef.current) {\n contentContext.onPointerGraceIntentChange(null);\n openTimerRef.current = window.setTimeout(() => {\n context.onOpenChange(true);\n clearOpenTimer();\n }, 100);\n }\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => {\n clearOpenTimer();\n const contentRect = context.content?.getBoundingClientRect();\n if (contentRect) {\n const side = context.content?.dataset.side;\n const rightSide = side === \"right\";\n const bleed = rightSide ? -5 : 5;\n const contentNearEdge = contentRect[rightSide ? \"left\" : \"right\"];\n const contentFarEdge = contentRect[rightSide ? \"right\" : \"left\"];\n contentContext.onPointerGraceIntentChange({\n area: [\n // Apply a bleed on clientX to ensure that our exit point is\n // consistently within polygon bounds\n { x: event.clientX + bleed, y: event.clientY },\n { x: contentNearEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.bottom },\n { x: contentNearEdge, y: contentRect.bottom }\n ],\n side\n });\n window.clearTimeout(pointerGraceTimerRef.current);\n pointerGraceTimerRef.current = window.setTimeout(\n () => contentContext.onPointerGraceIntentChange(null),\n 300\n );\n } else {\n contentContext.onTriggerLeave(event);\n if (event.defaultPrevented) return;\n contentContext.onPointerGraceIntentChange(null);\n }\n })\n ),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (props.disabled || isTypingAhead && event.key === \" \") return;\n if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {\n context.onOpenChange(true);\n context.content?.focus();\n event.preventDefault();\n }\n })\n }\n ) });\n }\n);\nMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"MenuSubContent\";\nvar MenuSubContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...subContentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n id: subContext.contentId,\n \"aria-labelledby\": subContext.triggerId,\n ...subContentProps,\n ref: composedRefs,\n align: \"start\",\n side: rootContext.dir === \"rtl\" ? \"left\" : \"right\",\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n trapFocus: false,\n onOpenAutoFocus: (event) => {\n if (rootContext.isUsingKeyboardRef.current) ref.current?.focus();\n event.preventDefault();\n },\n onCloseAutoFocus: (event) => event.preventDefault(),\n onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => {\n if (event.target !== subContext.trigger) context.onOpenChange(false);\n }),\n onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (event) => {\n rootContext.onClose();\n event.preventDefault();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isKeyDownInside = event.currentTarget.contains(event.target);\n const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);\n if (isKeyDownInside && isCloseKey) {\n context.onOpenChange(false);\n subContext.trigger?.focus();\n event.preventDefault();\n }\n })\n }\n ) }) }) });\n }\n);\nMenuSubContent.displayName = SUB_CONTENT_NAME;\nfunction getOpenState(open) {\n return open ? \"open\" : \"closed\";\n}\nfunction isIndeterminate(checked) {\n return checked === \"indeterminate\";\n}\nfunction getCheckedState(checked) {\n return isIndeterminate(checked) ? \"indeterminate\" : checked ? \"checked\" : \"unchecked\";\n}\nfunction focusFirst(candidates) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus();\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nfunction getNextMatch(values, search, currentMatch) {\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const normalizedSearch = isRepeated ? search[0] : search;\n const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;\n let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));\n const excludeCurrentMatch = normalizedSearch.length === 1;\n if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch);\n const nextMatch = wrappedValues.find(\n (value) => value.toLowerCase().startsWith(normalizedSearch.toLowerCase())\n );\n return nextMatch !== currentMatch ? nextMatch : void 0;\n}\nfunction isPointInPolygon(point, polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const ii = polygon[i];\n const jj = polygon[j];\n const xi = ii.x;\n const yi = ii.y;\n const xj = jj.x;\n const yj = jj.y;\n const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) inside = !inside;\n }\n return inside;\n}\nfunction isPointerInGraceArea(event, area) {\n if (!area) return false;\n const cursorPos = { x: event.clientX, y: event.clientY };\n return isPointInPolygon(cursorPos, area);\n}\nfunction whenMouse(handler) {\n return (event) => event.pointerType === \"mouse\" ? handler(event) : void 0;\n}\nvar Root3 = Menu;\nvar Anchor2 = MenuAnchor;\nvar Portal = MenuPortal;\nvar Content2 = MenuContent;\nvar Group = MenuGroup;\nvar Label = MenuLabel;\nvar Item2 = MenuItem;\nvar CheckboxItem = MenuCheckboxItem;\nvar RadioGroup = MenuRadioGroup;\nvar RadioItem = MenuRadioItem;\nvar ItemIndicator = MenuItemIndicator;\nvar Separator = MenuSeparator;\nvar Arrow2 = MenuArrow;\nvar Sub = MenuSub;\nvar SubTrigger = MenuSubTrigger;\nvar SubContent = MenuSubContent;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n CheckboxItem,\n Content2 as Content,\n Group,\n Item2 as Item,\n ItemIndicator,\n Label,\n Menu,\n MenuAnchor,\n MenuArrow,\n MenuCheckboxItem,\n MenuContent,\n MenuGroup,\n MenuItem,\n MenuItemIndicator,\n MenuLabel,\n MenuPortal,\n MenuRadioGroup,\n MenuRadioItem,\n MenuSeparator,\n MenuSub,\n MenuSubContent,\n MenuSubTrigger,\n Portal,\n RadioGroup,\n RadioItem,\n Root3 as Root,\n Separator,\n Sub,\n SubContent,\n SubTrigger,\n createMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createCollection","createContextScope","createPopperScope","createRovingFocusGroupScope","React","useCallbackRef","useDirection","jsx","PopperPrimitive.Root","PopperPrimitive.Anchor","Presence","PortalPrimitive","useComposedRefs","hideOthers","composeEventHandlers","createSlot","RemoveScroll","useFocusGuards","FocusScope","DismissableLayer","RovingFocusGroup.Root","PopperPrimitive.Content","Primitive","dispatchDiscreteCustomEvent","RovingFocusGroup.Item","PopperPrimitive.Arrow","composeRefs","index"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAI,iBAAiB,CAAC,SAAS,GAAG;AAClC,IAAI,aAAa,CAAC,aAAa,UAAU,MAAM;AAC/C,IAAI,YAAY,CAAC,WAAW,YAAY,KAAK;AAC7C,IAAI,kBAAkB,CAAC,GAAG,YAAY,GAAG,SAAS;AAClD,IAAI,gBAAgB;AAAA,EAClB,KAAK,CAAC,GAAG,gBA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,IAAC,SAAS;AACV,IAAC,WAAW;AACZ,IAAC,QAAQ;AACT,IAAC,QAAQ;AACT,IAAC,QAAQ;AACT,IAAC,eAAe;AAChB,IAAC,aAAa;AACd,IAAC,YAAY;AACb,IAAC,gBAAgB;AACjB,IAAC,YAAY;AACb,IAAC,SAAS;AAEV,IAAC,aAAa;AACd,IAAC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/@radix-ui/react-menu/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/menu.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs, composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SELECTION_KEYS = [\"Enter\", \" \"];\nvar FIRST_KEYS = [\"ArrowDown\", \"PageUp\", \"Home\"];\nvar LAST_KEYS = [\"ArrowUp\", \"PageDown\", \"End\"];\nvar FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];\nvar SUB_OPEN_KEYS = {\n ltr: [...SELECTION_KEYS, \"ArrowRight\"],\n rtl: [...SELECTION_KEYS, \"ArrowLeft\"]\n};\nvar SUB_CLOSE_KEYS = {\n ltr: [\"ArrowLeft\"],\n rtl: [\"ArrowRight\"]\n};\nvar MENU_NAME = \"Menu\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(MENU_NAME);\nvar [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [\n createCollectionScope,\n createPopperScope,\n createRovingFocusGroupScope\n]);\nvar usePopperScope = createPopperScope();\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);\nvar [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);\nvar Menu = (props) => {\n const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;\n const popperScope = usePopperScope(__scopeMenu);\n const [content, setContent] = React.useState(null);\n const isUsingKeyboardRef = React.useRef(false);\n const handleOpenChange = useCallbackRef(onOpenChange);\n const direction = useDirection(dir);\n React.useEffect(() => {\n const handleKeyDown = () => {\n isUsingKeyboardRef.current = true;\n document.addEventListener(\"pointerdown\", handlePointer, { capture: true, once: true });\n document.addEventListener(\"pointermove\", handlePointer, { capture: true, once: true });\n };\n const handlePointer = () => isUsingKeyboardRef.current = false;\n document.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => {\n document.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n document.removeEventListener(\"pointerdown\", handlePointer, { capture: true });\n document.removeEventListener(\"pointermove\", handlePointer, { capture: true });\n };\n }, []);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ jsx(\n MenuRootProvider,\n {\n scope: __scopeMenu,\n onClose: React.useCallback(() => handleOpenChange(false), [handleOpenChange]),\n isUsingKeyboardRef,\n dir: direction,\n modal,\n children\n }\n )\n }\n ) });\n};\nMenu.displayName = MENU_NAME;\nvar ANCHOR_NAME = \"MenuAnchor\";\nvar MenuAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...anchorProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nMenuAnchor.displayName = ANCHOR_NAME;\nvar PORTAL_NAME = \"MenuPortal\";\nvar [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar MenuPortal = (props) => {\n const { __scopeMenu, forceMount, children, container } = props;\n const context = useMenuContext(PORTAL_NAME, __scopeMenu);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nMenuPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"MenuContent\";\nvar [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME);\nvar MenuContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsx(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });\n }\n);\nvar MenuRootContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const content = ref.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: context.open,\n disableOutsideScroll: true,\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n ),\n onDismiss: () => context.onOpenChange(false)\n }\n );\n }\n);\nvar MenuRootContentNonModal = React.forwardRef((props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n onDismiss: () => context.onOpenChange(false)\n }\n );\n});\nvar Slot = createSlot(\"MenuContent.ScrollLock\");\nvar MenuContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeMenu,\n loop = false,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEntryFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n disableOutsideScroll,\n ...contentProps\n } = props;\n const context = useMenuContext(CONTENT_NAME, __scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const getItems = useCollection(__scopeMenu);\n const [currentItemId, setCurrentItemId] = React.useState(null);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange);\n const timerRef = React.useRef(0);\n const searchRef = React.useRef(\"\");\n const pointerGraceTimerRef = React.useRef(0);\n const pointerGraceIntentRef = React.useRef(null);\n const pointerDirRef = React.useRef(\"right\");\n const lastPointerXRef = React.useRef(0);\n const ScrollLockWrapper = disableOutsideScroll ? RemoveScroll : React.Fragment;\n const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot, allowPinchZoom: true } : void 0;\n const handleTypeaheadSearch = (key) => {\n const search = searchRef.current + key;\n const items = getItems().filter((item) => !item.disabled);\n const currentItem = document.activeElement;\n const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue;\n const values = items.map((item) => item.textValue);\n const nextMatch = getNextMatch(values, search, currentMatch);\n const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current;\n (function updateSearch(value) {\n searchRef.current = value;\n window.clearTimeout(timerRef.current);\n if (value !== \"\") timerRef.current = window.setTimeout(() => updateSearch(\"\"), 1e3);\n })(search);\n if (newItem) {\n setTimeout(() => newItem.focus());\n }\n };\n React.useEffect(() => {\n return () => window.clearTimeout(timerRef.current);\n }, []);\n useFocusGuards();\n const isPointerMovingToSubmenu = React.useCallback((event) => {\n const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;\n return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);\n }, []);\n return /* @__PURE__ */ jsx(\n MenuContentProvider,\n {\n scope: __scopeMenu,\n searchRef,\n onItemEnter: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n onItemLeave: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) return;\n contentRef.current?.focus();\n setCurrentItemId(null);\n },\n [isPointerMovingToSubmenu]\n ),\n onTriggerLeave: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n pointerGraceTimerRef,\n onPointerGraceIntentChange: React.useCallback((intent) => {\n pointerGraceIntentRef.current = intent;\n }, []),\n children: /* @__PURE__ */ jsx(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n trapped: trapFocus,\n onMountAutoFocus: composeEventHandlers(onOpenAutoFocus, (event) => {\n event.preventDefault();\n contentRef.current?.focus({ preventScroll: true });\n }),\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n children: /* @__PURE__ */ jsx(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n dir: rootContext.dir,\n orientation: \"vertical\",\n loop,\n currentTabStopId: currentItemId,\n onCurrentTabStopIdChange: setCurrentItemId,\n onEntryFocus: composeEventHandlers(onEntryFocus, (event) => {\n if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();\n }),\n preventScrollOnEntryFocus: true,\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n role: \"menu\",\n \"aria-orientation\": \"vertical\",\n \"data-state\": getOpenState(context.open),\n \"data-radix-menu-content\": \"\",\n dir: rootContext.dir,\n ...popperScope,\n ...contentProps,\n ref: composedRefs,\n style: { outline: \"none\", ...contentProps.style },\n onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => {\n const target = event.target;\n const isKeyDownInside = target.closest(\"[data-radix-menu-content]\") === event.currentTarget;\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n const isCharacterKey = event.key.length === 1;\n if (isKeyDownInside) {\n if (event.key === \"Tab\") event.preventDefault();\n if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);\n }\n const content = contentRef.current;\n if (event.target !== content) return;\n if (!FIRST_LAST_KEYS.includes(event.key)) return;\n event.preventDefault();\n const items = getItems().filter((item) => !item.disabled);\n const candidateNodes = items.map((item) => item.ref.current);\n if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();\n focusFirst(candidateNodes);\n }),\n onBlur: composeEventHandlers(props.onBlur, (event) => {\n if (!event.currentTarget.contains(event.target)) {\n window.clearTimeout(timerRef.current);\n searchRef.current = \"\";\n }\n }),\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n const target = event.target;\n const pointerXHasChanged = lastPointerXRef.current !== event.clientX;\n if (event.currentTarget.contains(target) && pointerXHasChanged) {\n const newDir = event.clientX > lastPointerXRef.current ? \"right\" : \"left\";\n pointerDirRef.current = newDir;\n lastPointerXRef.current = event.clientX;\n }\n })\n )\n }\n )\n }\n )\n }\n )\n }\n ) })\n }\n );\n }\n);\nMenuContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"MenuGroup\";\nvar MenuGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...groupProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { role: \"group\", ...groupProps, ref: forwardedRef });\n }\n);\nMenuGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"MenuLabel\";\nvar MenuLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...labelProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });\n }\n);\nMenuLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"MenuItem\";\nvar ITEM_SELECT = \"menu.itemSelect\";\nvar MenuItem = React.forwardRef(\n (props, forwardedRef) => {\n const { disabled = false, onSelect, ...itemProps } = props;\n const ref = React.useRef(null);\n const rootContext = useMenuRootContext(ITEM_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(ITEM_NAME, props.__scopeMenu);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const isPointerDownRef = React.useRef(false);\n const handleSelect = () => {\n const menuItem = ref.current;\n if (!disabled && menuItem) {\n const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true });\n menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true });\n dispatchDiscreteCustomEvent(menuItem, itemSelectEvent);\n if (itemSelectEvent.defaultPrevented) {\n isPointerDownRef.current = false;\n } else {\n rootContext.onClose();\n }\n }\n };\n return /* @__PURE__ */ jsx(\n MenuItemImpl,\n {\n ...itemProps,\n ref: composedRefs,\n disabled,\n onClick: composeEventHandlers(props.onClick, handleSelect),\n onPointerDown: (event) => {\n props.onPointerDown?.(event);\n isPointerDownRef.current = true;\n },\n onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {\n if (!isPointerDownRef.current) event.currentTarget?.click();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (disabled || isTypingAhead && event.key === \" \") return;\n if (SELECTION_KEYS.includes(event.key)) {\n event.currentTarget.click();\n event.preventDefault();\n }\n })\n }\n );\n }\n);\nMenuItem.displayName = ITEM_NAME;\nvar MenuItemImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;\n const contentContext = useMenuContentContext(ITEM_NAME, __scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [isFocused, setIsFocused] = React.useState(false);\n const [textContent, setTextContent] = React.useState(\"\");\n React.useEffect(() => {\n const menuItem = ref.current;\n if (menuItem) {\n setTextContent((menuItem.textContent ?? \"\").trim());\n }\n }, [itemProps.children]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeMenu,\n disabled,\n textValue: textValue ?? textContent,\n children: /* @__PURE__ */ jsx(RovingFocusGroup.Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"menuitem\",\n \"data-highlighted\": isFocused ? \"\" : void 0,\n \"aria-disabled\": disabled || void 0,\n \"data-disabled\": disabled ? \"\" : void 0,\n ...itemProps,\n ref: composedRefs,\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n if (disabled) {\n contentContext.onItemLeave(event);\n } else {\n contentContext.onItemEnter(event);\n if (!event.defaultPrevented) {\n const item = event.currentTarget;\n item.focus({ preventScroll: true });\n }\n }\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => contentContext.onItemLeave(event))\n ),\n onFocus: composeEventHandlers(props.onFocus, () => setIsFocused(true)),\n onBlur: composeEventHandlers(props.onBlur, () => setIsFocused(false))\n }\n ) })\n }\n );\n }\n);\nvar CHECKBOX_ITEM_NAME = \"MenuCheckboxItem\";\nvar MenuCheckboxItem = React.forwardRef(\n (props, forwardedRef) => {\n const { checked = false, onCheckedChange, ...checkboxItemProps } = props;\n return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n MenuItem,\n {\n role: \"menuitemcheckbox\",\n \"aria-checked\": isIndeterminate(checked) ? \"mixed\" : checked,\n ...checkboxItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: composeEventHandlers(\n checkboxItemProps.onSelect,\n () => onCheckedChange?.(isIndeterminate(checked) ? true : !checked),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"MenuRadioGroup\";\nvar [RadioGroupProvider, useRadioGroupContext] = createMenuContext(\n RADIO_GROUP_NAME,\n { value: void 0, onValueChange: () => {\n } }\n);\nvar MenuRadioGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { value, onValueChange, ...groupProps } = props;\n const handleValueChange = useCallbackRef(onValueChange);\n return /* @__PURE__ */ jsx(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });\n }\n);\nMenuRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"MenuRadioItem\";\nvar MenuRadioItem = React.forwardRef(\n (props, forwardedRef) => {\n const { value, ...radioItemProps } = props;\n const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu);\n const checked = value === context.value;\n return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n MenuItem,\n {\n role: \"menuitemradio\",\n \"aria-checked\": checked,\n ...radioItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: composeEventHandlers(\n radioItemProps.onSelect,\n () => context.onValueChange?.(value),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuRadioItem.displayName = RADIO_ITEM_NAME;\nvar ITEM_INDICATOR_NAME = \"MenuItemIndicator\";\nvar [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(\n ITEM_INDICATOR_NAME,\n { checked: false }\n);\nvar MenuItemIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;\n const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);\n return /* @__PURE__ */ jsx(\n Presence,\n {\n present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...itemIndicatorProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(indicatorContext.checked)\n }\n )\n }\n );\n }\n);\nMenuItemIndicator.displayName = ITEM_INDICATOR_NAME;\nvar SEPARATOR_NAME = \"MenuSeparator\";\nvar MenuSeparator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...separatorProps } = props;\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"separator\",\n \"aria-orientation\": \"horizontal\",\n ...separatorProps,\n ref: forwardedRef\n }\n );\n }\n);\nMenuSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"MenuArrow\";\nvar MenuArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nMenuArrow.displayName = ARROW_NAME;\nvar SUB_NAME = \"MenuSub\";\nvar [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME);\nvar MenuSub = (props) => {\n const { __scopeMenu, children, open = false, onOpenChange } = props;\n const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const [trigger, setTrigger] = React.useState(null);\n const [content, setContent] = React.useState(null);\n const handleOpenChange = useCallbackRef(onOpenChange);\n React.useEffect(() => {\n if (parentMenuContext.open === false) handleOpenChange(false);\n return () => handleOpenChange(false);\n }, [parentMenuContext.open, handleOpenChange]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ jsx(\n MenuSubProvider,\n {\n scope: __scopeMenu,\n contentId: useId(),\n triggerId: useId(),\n trigger,\n onTriggerChange: setTrigger,\n children\n }\n )\n }\n ) });\n};\nMenuSub.displayName = SUB_NAME;\nvar SUB_TRIGGER_NAME = \"MenuSubTrigger\";\nvar MenuSubTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const openTimerRef = React.useRef(null);\n const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;\n const scope = { __scopeMenu: props.__scopeMenu };\n const clearOpenTimer = React.useCallback(() => {\n if (openTimerRef.current) window.clearTimeout(openTimerRef.current);\n openTimerRef.current = null;\n }, []);\n React.useEffect(() => clearOpenTimer, [clearOpenTimer]);\n React.useEffect(() => {\n const pointerGraceTimer = pointerGraceTimerRef.current;\n return () => {\n window.clearTimeout(pointerGraceTimer);\n onPointerGraceIntentChange(null);\n };\n }, [pointerGraceTimerRef, onPointerGraceIntentChange]);\n return /* @__PURE__ */ jsx(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ jsx(\n MenuItemImpl,\n {\n id: subContext.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": context.open,\n \"aria-controls\": subContext.contentId,\n \"data-state\": getOpenState(context.open),\n ...props,\n ref: composeRefs(forwardedRef, subContext.onTriggerChange),\n onClick: (event) => {\n props.onClick?.(event);\n if (props.disabled || event.defaultPrevented) return;\n event.currentTarget.focus();\n if (!context.open) context.onOpenChange(true);\n },\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n contentContext.onItemEnter(event);\n if (event.defaultPrevented) return;\n if (!props.disabled && !context.open && !openTimerRef.current) {\n contentContext.onPointerGraceIntentChange(null);\n openTimerRef.current = window.setTimeout(() => {\n context.onOpenChange(true);\n clearOpenTimer();\n }, 100);\n }\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => {\n clearOpenTimer();\n const contentRect = context.content?.getBoundingClientRect();\n if (contentRect) {\n const side = context.content?.dataset.side;\n const rightSide = side === \"right\";\n const bleed = rightSide ? -5 : 5;\n const contentNearEdge = contentRect[rightSide ? \"left\" : \"right\"];\n const contentFarEdge = contentRect[rightSide ? \"right\" : \"left\"];\n contentContext.onPointerGraceIntentChange({\n area: [\n // Apply a bleed on clientX to ensure that our exit point is\n // consistently within polygon bounds\n { x: event.clientX + bleed, y: event.clientY },\n { x: contentNearEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.bottom },\n { x: contentNearEdge, y: contentRect.bottom }\n ],\n side\n });\n window.clearTimeout(pointerGraceTimerRef.current);\n pointerGraceTimerRef.current = window.setTimeout(\n () => contentContext.onPointerGraceIntentChange(null),\n 300\n );\n } else {\n contentContext.onTriggerLeave(event);\n if (event.defaultPrevented) return;\n contentContext.onPointerGraceIntentChange(null);\n }\n })\n ),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (props.disabled || isTypingAhead && event.key === \" \") return;\n if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {\n context.onOpenChange(true);\n context.content?.focus();\n event.preventDefault();\n }\n })\n }\n ) });\n }\n);\nMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"MenuSubContent\";\nvar MenuSubContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...subContentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n id: subContext.contentId,\n \"aria-labelledby\": subContext.triggerId,\n ...subContentProps,\n ref: composedRefs,\n align: \"start\",\n side: rootContext.dir === \"rtl\" ? \"left\" : \"right\",\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n trapFocus: false,\n onOpenAutoFocus: (event) => {\n if (rootContext.isUsingKeyboardRef.current) ref.current?.focus();\n event.preventDefault();\n },\n onCloseAutoFocus: (event) => event.preventDefault(),\n onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => {\n if (event.target !== subContext.trigger) context.onOpenChange(false);\n }),\n onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (event) => {\n rootContext.onClose();\n event.preventDefault();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isKeyDownInside = event.currentTarget.contains(event.target);\n const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);\n if (isKeyDownInside && isCloseKey) {\n context.onOpenChange(false);\n subContext.trigger?.focus();\n event.preventDefault();\n }\n })\n }\n ) }) }) });\n }\n);\nMenuSubContent.displayName = SUB_CONTENT_NAME;\nfunction getOpenState(open) {\n return open ? \"open\" : \"closed\";\n}\nfunction isIndeterminate(checked) {\n return checked === \"indeterminate\";\n}\nfunction getCheckedState(checked) {\n return isIndeterminate(checked) ? \"indeterminate\" : checked ? \"checked\" : \"unchecked\";\n}\nfunction focusFirst(candidates) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus();\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nfunction getNextMatch(values, search, currentMatch) {\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const normalizedSearch = isRepeated ? search[0] : search;\n const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;\n let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));\n const excludeCurrentMatch = normalizedSearch.length === 1;\n if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch);\n const nextMatch = wrappedValues.find(\n (value) => value.toLowerCase().startsWith(normalizedSearch.toLowerCase())\n );\n return nextMatch !== currentMatch ? nextMatch : void 0;\n}\nfunction isPointInPolygon(point, polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const ii = polygon[i];\n const jj = polygon[j];\n const xi = ii.x;\n const yi = ii.y;\n const xj = jj.x;\n const yj = jj.y;\n const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) inside = !inside;\n }\n return inside;\n}\nfunction isPointerInGraceArea(event, area) {\n if (!area) return false;\n const cursorPos = { x: event.clientX, y: event.clientY };\n return isPointInPolygon(cursorPos, area);\n}\nfunction whenMouse(handler) {\n return (event) => event.pointerType === \"mouse\" ? handler(event) : void 0;\n}\nvar Root3 = Menu;\nvar Anchor2 = MenuAnchor;\nvar Portal = MenuPortal;\nvar Content2 = MenuContent;\nvar Group = MenuGroup;\nvar Label = MenuLabel;\nvar Item2 = MenuItem;\nvar CheckboxItem = MenuCheckboxItem;\nvar RadioGroup = MenuRadioGroup;\nvar RadioItem = MenuRadioItem;\nvar ItemIndicator = MenuItemIndicator;\nvar Separator = MenuSeparator;\nvar Arrow2 = MenuArrow;\nvar Sub = MenuSub;\nvar SubTrigger = MenuSubTrigger;\nvar SubContent = MenuSubContent;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n CheckboxItem,\n Content2 as Content,\n Group,\n Item2 as Item,\n ItemIndicator,\n Label,\n Menu,\n MenuAnchor,\n MenuArrow,\n MenuCheckboxItem,\n MenuContent,\n MenuGroup,\n MenuItem,\n MenuItemIndicator,\n MenuLabel,\n MenuPortal,\n MenuRadioGroup,\n MenuRadioItem,\n MenuSeparator,\n MenuSub,\n MenuSubContent,\n MenuSubTrigger,\n Portal,\n RadioGroup,\n RadioItem,\n Root3 as Root,\n Separator,\n Sub,\n SubContent,\n SubTrigger,\n createMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createCollection","createContextScope","createPopperScope","createRovingFocusGroupScope","React","useCallbackRef","useDirection","jsx","PopperPrimitive.Root","PopperPrimitive.Anchor","Presence","PortalPrimitive","useComposedRefs","hideOthers","composeEventHandlers","createSlot","RemoveScroll","useFocusGuards","FocusScope","DismissableLayer","RovingFocusGroup.Root","PopperPrimitive.Content","Primitive","dispatchDiscreteCustomEvent","RovingFocusGroup.Item","PopperPrimitive.Arrow","composeRefs","index"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAI,iBAAiB,CAAC,SAAS,GAAG;AAClC,IAAI,aAAa,CAAC,aAAa,UAAU,MAAM;AAC/C,IAAI,YAAY,CAAC,WAAW,YAAY,KAAK;AAC7C,IAAI,kBAAkB,CAAC,GAAG,YAAY,GAAG,SAAS;AAClD,IAAI,gBAAgB;AAAA,EAClB,KAAK,CAAC,GAAG,gBAAgB,YAAY;AAAA,EACrC,KAAK,CAAC,GAAG,gBAAgB,WAAW;AACtC;AACA,IAAI,iBAAiB;AAAA,EACnB,KAAK,CAAC,WAAW;AAAA,EACjB,KAAK,CAAC,YAAY;AACpB;AACA,IAAI,YAAY;AAChB,IAAI,CAAC,YAAY,eAAe,qBAAqB,IAAIA,QAAAA,iBAAiB,SAAS;AAChF,IAAC,CAAC,mBAAmB,eAAe,IAAIC,MAAAA,mBAAmB,WAAW;AAAA,EACvE;AAAA,EACAC,QAAAA;AAAAA,EACAC,QAAAA;AACF,CAAC;AACD,IAAI,iBAAiBD,QAAAA,kBAAiB;AACtC,IAAI,2BAA2BC,QAAAA,4BAA2B;AAC1D,IAAI,CAAC,cAAc,cAAc,IAAI,kBAAkB,SAAS;AAChE,IAAI,CAAC,kBAAkB,kBAAkB,IAAI,kBAAkB,SAAS;AACrE,IAAC,OAAO,CAAC,UAAU;AACpB,QAAM,EAAE,aAAa,OAAO,OAAO,UAAU,KAAK,cAAc,QAAQ,KAAI,IAAK;AACjF,QAAM,cAAc,eAAe,WAAW;AAC9C,QAAM,C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B,UAAM,KAAK,QAAQ,CAAC;AACpB,UAAM,KAAK,GAAG;AACd,UAAM,KAAK,GAAG;AACd,UAAM,KAAK,GAAG;AACd,UAAM,KAAK,GAAG;AACd,UAAM,YAAY,KAAK,MAAM,KAAK,KAAK,KAAK,KAAK,OAAO,IAAI,OAAO,KAAK,MAAM;AAC9E,QAAI,UAAW,UAAS,CAAC;AAAA,EAC3B;AACA,SAAO;AACT;AACA,SAAS,qBAAqB,OAAO,MAAM;AACzC,MAAI,CAAC,KAAM,QAAO;AAClB,QAAM,YAAY,EAAE,GAAG,MAAM,SAAS,GAAG,MAAM,QAAO;AACtD,SAAO,iBAAiB,WAAW,IAAI;AACzC;AACA,SAAS,UAAU,SAAS;AAC1B,SAAO,CAAC,UAAU,MAAM,gBAAgB,UAAU,QAAQ,KAAK,IAAI;AACrE;AACG,IAAC,QAAQ;AACT,IAAC,UAAU;AACX,IAAC,SAAS;AACV,IAAC,WAAW;AACZ,IAAC,QAAQ;AACT,IAAC,QAAQ;AACT,IAAC,QAAQ;AACT,IAAC,eAAe;AAChB,IAAC,aAAa;AACd,IAAC,YAAY;AACb,IAAC,gBAAgB;AACjB,IAAC,YAAY;AACb,IAAC,SAAS;AAEV,IAAC,aAAa;AACd,IAAC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
2
3
  function assign(target) {
3
4
  for (var i = 1; i < arguments.length; i++) {
4
5
  var source = arguments[i];
@@ -95,5 +96,5 @@ function init(converter, defaultAttributes) {
95
96
  );
96
97
  }
97
98
  var api = init(defaultConverter, { path: "/" });
98
- module.exports = api;
99
+ exports.default = api;
99
100
  //# sourceMappingURL=js.cookie.cjs.map