@absolutejs/auth 0.22.5 → 0.22.7

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 (69) hide show
  1. package/dist/example/components/auth/AuthContainer.d.ts +1 -0
  2. package/dist/example/components/auth/OAuthButton.d.ts +7 -0
  3. package/dist/example/components/auth/OAuthButtons.d.ts +5 -0
  4. package/dist/example/components/hamburger/HamburgerDropdown.d.ts +10 -0
  5. package/dist/example/components/hamburger/HamburgerHeader.d.ts +5 -0
  6. package/dist/example/components/hamburger/HamburgerMenu.d.ts +14 -0
  7. package/dist/example/components/hamburger/HamburgerUserButtons.d.ts +8 -0
  8. package/dist/example/components/navbar/DropdownContainer.d.ts +17 -0
  9. package/dist/example/components/navbar/Navbar.d.ts +7 -0
  10. package/dist/example/components/navbar/NavbarDropdown.d.ts +10 -0
  11. package/dist/example/components/navbar/NavbarLink.d.ts +8 -0
  12. package/dist/example/components/navbar/NavbarLinks.d.ts +6 -0
  13. package/dist/example/components/navbar/NavbarUserButtons.d.ts +7 -0
  14. package/dist/example/components/page/Head.d.ts +6 -0
  15. package/dist/example/components/protected/AccountOverview.d.ts +6 -0
  16. package/dist/example/components/protected/DeleteAccountSection.d.ts +5 -0
  17. package/dist/example/components/protected/LinkedAuthIdentitiesPanel.d.ts +1 -0
  18. package/dist/example/components/protected/LinkedProvidersPanel.d.ts +1 -0
  19. package/dist/example/components/protected/ProviderButtons.d.ts +1 -0
  20. package/dist/example/components/protected/SettingsNoticeToast.d.ts +1 -0
  21. package/dist/example/components/protected/UserInfo.d.ts +7 -0
  22. package/dist/example/components/utils/AnimatedComponents.d.ts +1 -0
  23. package/dist/example/components/utils/Divider.d.ts +7 -0
  24. package/dist/example/components/utils/HighlightedJson.d.ts +5 -0
  25. package/dist/example/components/utils/JsonLine.d.ts +6 -0
  26. package/dist/example/components/utils/Modal.d.ts +9 -0
  27. package/dist/example/components/utils/ProfilePicture.d.ts +8 -0
  28. package/dist/example/components/utils/ProviderDropdown.d.ts +8 -0
  29. package/dist/example/components/utils/Toast.d.ts +14 -0
  30. package/dist/example/components/utils/ToastProvider.d.ts +30 -0
  31. package/dist/example/db/schema.d.ts +2570 -0
  32. package/dist/example/eden/treaty.d.ts +1 -0
  33. package/dist/example/handlers/userHandlers.d.ts +254 -0
  34. package/dist/example/hooks/useAuthIdentityPayload.d.ts +37 -0
  35. package/dist/example/hooks/useAuthStatus.d.ts +19 -0
  36. package/dist/example/hooks/useContainerQuery.d.ts +10 -0
  37. package/dist/example/hooks/useMediaQuery.d.ts +11 -0
  38. package/dist/example/linkedProviders/persistCallbackAuthorization.d.ts +30 -0
  39. package/dist/example/linkedProviders/resolver.d.ts +1 -0
  40. package/dist/example/linkedProviders/stores.d.ts +9 -0
  41. package/dist/example/pages/Connectors.d.ts +1 -0
  42. package/dist/example/pages/Home.d.ts +1 -0
  43. package/dist/example/pages/NotAuthorized.d.ts +1 -0
  44. package/dist/example/pages/Protected.d.ts +1 -0
  45. package/dist/example/pages/Settings.d.ts +1 -0
  46. package/dist/example/server.d.ts +902 -0
  47. package/dist/example/styles/authModalStyles.d.ts +22 -0
  48. package/dist/example/styles/navbarStyles.d.ts +15 -0
  49. package/dist/example/styles/styles.d.ts +15 -0
  50. package/dist/example/utils/absoluteAuthConfig.d.ts +4 -0
  51. package/dist/example/utils/constants.d.ts +1 -0
  52. package/dist/example/utils/navbarData.d.ts +2 -0
  53. package/dist/example/utils/providerData.d.ts +9 -0
  54. package/dist/example/utils/providersConfiguration.d.ts +1 -0
  55. package/dist/example/utils/typeGuards.d.ts +1 -0
  56. package/dist/example/utils/types.d.ts +26 -0
  57. package/dist/index.d.ts +1 -0
  58. package/dist/index.js +729 -612
  59. package/dist/index.js.map +8 -7
  60. package/dist/src/index.d.ts +1 -0
  61. package/dist/src/neonAuthSessionStore.d.ts +563 -0
  62. package/package.json +86 -74
  63. package/.claude/settings.local.json +0 -5
  64. package/.env.example +0 -212
  65. package/.prettierignore +0 -4
  66. package/.prettierrc.json +0 -9
  67. package/CLAUDE.md +0 -91
  68. package/drizzle.config.ts +0 -14
  69. package/eslint.config.mjs +0 -251
@@ -0,0 +1 @@
1
+ export declare const AuthContainer: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { ProviderOption } from 'citra';
2
+ type OAuthButtonProps = {
3
+ action?: 'login' | 'signup' | 'link';
4
+ provider: Lowercase<ProviderOption> | undefined;
5
+ };
6
+ export declare const OAuthButton: ({ action, provider }: OAuthButtonProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ type OAuthButtonsProps = {
2
+ action?: 'login' | 'signup';
3
+ };
4
+ export declare const OAuthButtons: ({ action }: OAuthButtonsProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ import { NavbarElement } from '../../utils/types';
3
+ type HamburgerDropdownProps = {
4
+ label: string;
5
+ href: string;
6
+ links: NavbarElement[];
7
+ icon?: ReactNode;
8
+ };
9
+ export declare const HamburgerDropdown: ({ label, icon, href, links }: HamburgerDropdownProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,5 @@
1
+ type HamburgerHeaderProps = {
2
+ onClose: () => void;
3
+ };
4
+ export declare const HamburgerHeader: ({ onClose }: HamburgerHeaderProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,14 @@
1
+ import { SpringRef, SpringValue } from '@react-spring/web';
2
+ import { User } from '../../db/schema';
3
+ type HamburgerMenuProps = {
4
+ spring: {
5
+ transform: SpringValue<string>;
6
+ };
7
+ springApi: SpringRef<{
8
+ transform: string;
9
+ }>;
10
+ user: User | undefined;
11
+ handleSignOut: () => Promise<void>;
12
+ };
13
+ export declare const HamburgerMenu: ({ spring, springApi, user, handleSignOut }: HamburgerMenuProps) => import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,8 @@
1
+ import { User } from '../../db/schema';
2
+ type HamburgerUserButtonsProps = {
3
+ user: User | undefined;
4
+ handleSignOut: () => Promise<void>;
5
+ openModal: () => void;
6
+ };
7
+ export declare const HamburgerUserButtons: ({ user, handleSignOut, openModal }: HamburgerUserButtonsProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,17 @@
1
+ import { SpringRef, SpringValue } from '@react-spring/web';
2
+ import { ReactNode, RefObject } from 'react';
3
+ type DropdownContainerProps = {
4
+ spring: {
5
+ opacity: SpringValue<number>;
6
+ scale: SpringValue<number>;
7
+ };
8
+ springApi: SpringRef<{
9
+ opacity: number;
10
+ scale: number;
11
+ }>;
12
+ onClose?: () => void;
13
+ children?: ReactNode;
14
+ ignoredElements?: RefObject<HTMLElement | null>[];
15
+ };
16
+ export declare const DropdownContainer: ({ springApi, onClose, children, ignoredElements }: DropdownContainerProps) => import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,7 @@
1
+ import { User } from '../../db/schema';
2
+ type NavbarProps = {
3
+ user: User | undefined;
4
+ handleSignOut: () => Promise<void>;
5
+ };
6
+ export declare const Navbar: ({ user, handleSignOut }: NavbarProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ import { NavbarLink as NavbarLinkType } from '../../utils/types';
3
+ type NavbarDropdownProps = {
4
+ label: string;
5
+ href: string;
6
+ links: NavbarLinkType[];
7
+ icon?: ReactNode;
8
+ };
9
+ export declare const NavbarDropdown: ({ label, href, links }: NavbarDropdownProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from 'react';
2
+ type NavbarLinkProps = {
3
+ icon?: ReactNode;
4
+ href: string;
5
+ label: string;
6
+ };
7
+ export declare const NavbarLink: ({ icon, href, label }: NavbarLinkProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ import { NavbarElement } from '../../utils/types';
2
+ type NavbarLinksProps = {
3
+ navbarData: NavbarElement[];
4
+ };
5
+ export declare const NavbarLinks: ({ navbarData }: NavbarLinksProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,7 @@
1
+ import { User } from '../../db/schema';
2
+ type NavbarUserButtonsProps = {
3
+ user: User | undefined;
4
+ handleSignOut: () => Promise<void>;
5
+ };
6
+ export declare const NavbarUserButtons: ({ user, handleSignOut }: NavbarUserButtonsProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ type HeadProps = {
2
+ title?: string;
3
+ icon?: string;
4
+ };
5
+ export declare const Head: ({ title, icon }: HeadProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { User } from '../../db/schema';
2
+ type AccountOverviewProps = {
3
+ user: User | undefined;
4
+ };
5
+ export declare const AccountOverview: ({ user }: AccountOverviewProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,5 @@
1
+ type DeleteAccountSectionProps = {
2
+ onSignedOut: () => Promise<void>;
3
+ };
4
+ export declare const DeleteAccountSection: ({ onSignedOut }: DeleteAccountSectionProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1 @@
1
+ export declare const LinkedAuthIdentitiesPanel: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const LinkedProvidersPanel: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const ProviderButtons: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const SettingsNoticeToast: () => null;
@@ -0,0 +1,7 @@
1
+ import { User } from '../../db/schema';
2
+ type UserInfoProps = {
3
+ user: User | undefined;
4
+ heading?: string;
5
+ };
6
+ export declare const UserInfo: ({ user, heading }: UserInfoProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export declare const AnimatedFaChevronDown: import("@react-spring/web").AnimatedComponent<import("react-icons/lib").IconType>;
@@ -0,0 +1,7 @@
1
+ type DividerProps = {
2
+ color?: string;
3
+ height?: string;
4
+ text?: string;
5
+ };
6
+ export declare const Divider: ({ color, text, height }: DividerProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ type HighlightedJsonProps = {
2
+ data: unknown;
3
+ };
4
+ export declare const HighlightedJson: ({ data }: HighlightedJsonProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,6 @@
1
+ type JsonLineProps = {
2
+ line: string;
3
+ needsNewline: boolean;
4
+ };
5
+ export declare const JsonLine: ({ line, needsNewline }: JsonLineProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ type ModalProps = {
3
+ isOpen: boolean;
4
+ onClose?: () => void;
5
+ onOpen?: (dialogRef: HTMLDialogElement | null) => void;
6
+ children: ReactNode;
7
+ };
8
+ export declare const Modal: ({ isOpen, onClose, onOpen, children }: ModalProps) => import("react/jsx-runtime").JSX.Element | null;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ type ProfilePictureProps = {
2
+ userImage: string | null | undefined;
3
+ backupImage: string;
4
+ width?: string;
5
+ height?: string;
6
+ };
7
+ export declare const ProfilePicture: ({ userImage, backupImage, width, height }: ProfilePictureProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import { ProviderOption } from 'citra';
2
+ import { Dispatch, SetStateAction } from 'react';
3
+ type ProviderDropdownProps = {
4
+ providers?: Lowercase<ProviderOption>[];
5
+ setCurrentProvider: Dispatch<SetStateAction<Lowercase<ProviderOption> | undefined>>;
6
+ };
7
+ export declare const ProviderDropdown: ({ providers, setCurrentProvider }: ProviderDropdownProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,14 @@
1
+ type ToastProps = {
2
+ message: string;
3
+ action?: {
4
+ label: string;
5
+ onClick: () => void;
6
+ };
7
+ style?: {
8
+ background?: string;
9
+ color?: string;
10
+ };
11
+ removeToast: () => void;
12
+ };
13
+ export declare const Toast: ({ message, action, style, removeToast }: ToastProps) => import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,30 @@
1
+ import { ReactNode } from 'react';
2
+ import { Toast } from './Toast';
3
+ type Toast = {
4
+ id: number;
5
+ message: string;
6
+ action?: {
7
+ label: string;
8
+ onClick: () => void;
9
+ };
10
+ style?: {
11
+ background?: string;
12
+ color?: string;
13
+ };
14
+ };
15
+ type AddToastProps = {
16
+ message: string;
17
+ action?: Toast['action'];
18
+ style?: Toast['style'];
19
+ duration?: number;
20
+ };
21
+ type ToastContextType = {
22
+ addToast: (opts: AddToastProps) => void;
23
+ registerHost: (host: HTMLElement | null) => void;
24
+ };
25
+ export declare const useToast: () => ToastContextType;
26
+ type ToastProviderProps = {
27
+ children: ReactNode;
28
+ };
29
+ export declare const ToastProvider: ({ children }: ToastProviderProps) => import("react/jsx-runtime").JSX.Element;
30
+ export {};