@athenaintel/react 0.10.34 → 0.10.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/dist/assets/AssetPanel.d.ts +6 -0
- package/dist/assets/AthenaAssetEmbed.d.ts +17 -0
- package/dist/assets/AthenaLayout.d.ts +13 -0
- package/dist/assets/asset-embed-messages.d.ts +27 -0
- package/dist/assets/asset-panel-store.d.ts +65 -0
- package/dist/assets/asset-panel-url.d.ts +17 -0
- package/dist/assets/use-asset-embed.d.ts +45 -0
- package/dist/auth/AthenaAuthContext.d.ts +26 -0
- package/dist/auth/AthenaAuthProvider.d.ts +43 -0
- package/dist/auth/AthenaSSOProvider.d.ts +91 -0
- package/dist/auth/index.d.ts +7 -0
- package/dist/auth/types.d.ts +66 -0
- package/dist/chat/AthenaChat.d.ts +64 -0
- package/dist/chat/ComposerEditorContext.d.ts +30 -0
- package/dist/chat/athena-citation-links.d.ts +18 -0
- package/dist/chat/super-grouping/CollapsibleGroup.d.ts +15 -0
- package/dist/chat/super-grouping/SuperGroupingCard.d.ts +35 -0
- package/dist/chat/super-grouping/grouping-function.d.ts +19 -0
- package/dist/chat/super-grouping/tool-status-labels.d.ts +1 -0
- package/dist/chat/super-grouping/toolkit-map.d.ts +9 -0
- package/dist/chat/tiptap-composer.d.ts +7 -0
- package/dist/chat/tiptap-text.d.ts +4 -0
- package/dist/chat/tooltip-icon-button.d.ts +7 -0
- package/dist/composer/AttachmentContext.d.ts +27 -0
- package/dist/composer/ComposerAttachmentPreview.d.ts +9 -0
- package/dist/composer/ComposerDropZone.d.ts +13 -0
- package/dist/composer/ComposerQuotePreview.d.ts +12 -0
- package/dist/composer/FileUploadButton.d.ts +15 -0
- package/dist/composer/QuoteContext.d.ts +33 -0
- package/dist/composer/build-composed-message.d.ts +15 -0
- package/dist/composer/clipboard.d.ts +6 -0
- package/dist/composer/index.d.ts +18 -0
- package/dist/composer/useAppendToComposer.d.ts +14 -0
- package/dist/composer/useComposerAttachment.d.ts +14 -0
- package/dist/composer/useFileUpload.d.ts +35 -0
- package/dist/composer/useSendMessage.d.ts +21 -0
- package/dist/index.cjs +1531 -1426
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +81 -1545
- package/dist/index.js +1532 -1427
- package/dist/index.js.map +1 -1
- package/dist/lib/athena-urls.d.ts +32 -0
- package/dist/lib/posthog/capture-gate.d.ts +72 -0
- package/dist/lib/posthog/wrap-posthog-client.d.ts +11 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/mentions/composer-keybinds.d.ts +5 -0
- package/dist/mentions/mention-extension.d.ts +6 -0
- package/dist/mentions/mention-icons.d.ts +4 -0
- package/dist/mentions/mention-node-view.d.ts +2 -0
- package/dist/mentions/mention-suggestion-list.d.ts +14 -0
- package/dist/mentions/mention-suggestion-popup.d.ts +15 -0
- package/dist/mentions/mention-suggestions-extension.d.ts +11 -0
- package/dist/mentions/mention-types.d.ts +21 -0
- package/dist/mentions/mention-utils.d.ts +23 -0
- package/dist/mentions/scope-registry.d.ts +21 -0
- package/dist/mentions/types.d.ts +39 -0
- package/dist/mentions/use-mention-suggestions.d.ts +28 -0
- package/dist/provider/AthenaContext.d.ts +11 -0
- package/dist/provider/AthenaProvider.d.ts +86 -0
- package/dist/provider/PostHogProvider.d.ts +14 -0
- package/dist/provider/citation-links.d.ts +61 -0
- package/dist/provider/config.d.ts +20 -0
- package/dist/provider/types.d.ts +4 -0
- package/dist/runtime/auth.d.ts +45 -0
- package/dist/runtime/converter.d.ts +5 -0
- package/dist/runtime/external-message-converter.d.ts +21 -0
- package/dist/runtime/schemas.d.ts +24 -0
- package/dist/runtime/useAthenaRuntime.d.ts +47 -0
- package/dist/theme/index.d.ts +215 -0
- package/dist/threads/ThreadList.d.ts +4 -0
- package/dist/threads/adapter.d.ts +42 -0
- package/dist/threads/api.d.ts +49 -0
- package/dist/threads/index.d.ts +5 -0
- package/dist/threads/title.d.ts +4 -0
- package/dist/threads/useActiveThreadStateHydration.d.ts +14 -0
- package/dist/threads/useAthenaThreadManager.d.ts +25 -0
- package/dist/threads/useThreadTitlePolling.d.ts +14 -0
- package/dist/toolkits/index.d.ts +89 -0
- package/dist/tools/NestedPtcMessages.d.ts +14 -0
- package/dist/tools/append-document-tool-ui.d.ts +2 -0
- package/dist/tools/asset-utils.d.ts +6 -0
- package/dist/tools/auto-open-tools.d.ts +8 -0
- package/dist/tools/read-asset-tool-ui.d.ts +2 -0
- package/dist/tools/tool-fallback.d.ts +34 -0
- package/dist/tools/tool-uis.d.ts +62 -0
- package/dist/ui/button.d.ts +10 -0
- package/dist/ui/collapsible.d.ts +5 -0
- package/dist/ui/tooltip.d.ts +7 -0
- package/package.json +9 -10
- package/dist/auth.d.ts +0 -240
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "ghost" | "link" | "outline" | "secondary" | null | undefined;
|
|
5
|
+
size?: "default" | "icon" | "icon-lg" | "icon-sm" | "icon-xs" | "lg" | "sm" | "xs" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Collapsible as CollapsiblePrimitive } from "radix-ui";
|
|
2
|
+
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Tooltip as TooltipPrimitive } from "radix-ui";
|
|
3
|
+
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@athenaintel/react",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.35",
|
|
4
4
|
"description": "Athena React SDK — Build AI-powered chat applications with the Athena platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"require": "./dist/index.cjs"
|
|
14
14
|
},
|
|
15
15
|
"./auth": {
|
|
16
|
-
"types": "./dist/auth.d.ts",
|
|
16
|
+
"types": "./dist/auth/index.d.ts",
|
|
17
17
|
"import": "./dist/auth.js",
|
|
18
18
|
"require": "./dist/auth.cjs"
|
|
19
19
|
},
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
26
|
"dev": "bun run build:css && vite build --watch",
|
|
27
|
-
"build": "vite build && bun run build:css",
|
|
27
|
+
"build": "vite build && tsc -p tsconfig.build.json && bun run build:css",
|
|
28
28
|
"build:css": "cp src/styles.css dist/styles.css",
|
|
29
29
|
"test": "bun test src/**/*.test.ts src/**/*.test.tsx",
|
|
30
|
-
"typecheck": "
|
|
30
|
+
"typecheck": "tsc --noEmit",
|
|
31
31
|
"prepublishOnly": "bun run build",
|
|
32
32
|
"preinstall": "node -e \"if(!(process.env.npm_config_user_agent||'').startsWith('bun/')){console.error('\\n✗ This monorepo requires bun. Run \\`bun install\\` at the repo root.\\n https://bun.com/docs/installation\\n');process.exit(1)}\""
|
|
33
33
|
},
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@assistant-ui/react": "0.14.
|
|
50
|
-
"@assistant-ui/react-langgraph": "0.14.
|
|
49
|
+
"@assistant-ui/react": "0.14.24",
|
|
50
|
+
"@assistant-ui/react-langgraph": "0.14.10",
|
|
51
51
|
"@floating-ui/react": "^0.27.7",
|
|
52
52
|
"@tanstack/react-store": "^0.9.1",
|
|
53
53
|
"@tiptap/core": "^2.11",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@tiptap/react": "^2.11",
|
|
62
62
|
"@tiptap/starter-kit": "^2.11",
|
|
63
63
|
"@tiptap/suggestion": "^2.11",
|
|
64
|
-
"assistant-stream": "0.3.
|
|
64
|
+
"assistant-stream": "0.3.24",
|
|
65
65
|
"class-variance-authority": "^0.7.1",
|
|
66
66
|
"cnfast": "0.0.8",
|
|
67
67
|
"lucide-react": "^0.575.0",
|
|
@@ -77,9 +77,8 @@
|
|
|
77
77
|
"posthog-js": "^1.386.6",
|
|
78
78
|
"react": "^19.0.0",
|
|
79
79
|
"react-dom": "^19.0.0",
|
|
80
|
-
"typescript": "
|
|
81
|
-
"vite": "^6.0.0"
|
|
82
|
-
"vite-plugin-dts": "^4.5.0"
|
|
80
|
+
"typescript": "7.0.2",
|
|
81
|
+
"vite": "^6.0.0"
|
|
83
82
|
},
|
|
84
83
|
"repository": {
|
|
85
84
|
"type": "git",
|
package/dist/auth.d.ts
DELETED
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
import { Context } from 'react';
|
|
2
|
-
import { JSX } from 'react/jsx-runtime';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Internal context used by `AthenaAuthProvider` to share auth state.
|
|
7
|
-
* Consumed by `useAthenaAuth()` and automatically by `AthenaProvider`.
|
|
8
|
-
*/
|
|
9
|
-
export declare const AthenaAuthContext: Context<AthenaAuthState | null>;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Wraps your app with Athena authentication powered by PropelAuth.
|
|
13
|
-
*
|
|
14
|
-
* Place this **above** `<AthenaProvider>` in the component tree.
|
|
15
|
-
* When present, `AthenaProvider` will automatically use the access token
|
|
16
|
-
* from this provider — no need to pass `token` or `apiKey` manually.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```tsx
|
|
20
|
-
* import { AthenaAuthProvider } from '@athenaintel/react/auth';
|
|
21
|
-
* import { AthenaProvider, AthenaChat } from '@athenaintel/react';
|
|
22
|
-
*
|
|
23
|
-
* function App() {
|
|
24
|
-
* return (
|
|
25
|
-
* <AthenaAuthProvider authUrl="https://auth.yourdomain.com">
|
|
26
|
-
* <AthenaProvider>
|
|
27
|
-
* <AthenaChat />
|
|
28
|
-
* </AthenaProvider>
|
|
29
|
-
* </AthenaAuthProvider>
|
|
30
|
-
* );
|
|
31
|
-
* }
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export declare function AthenaAuthProvider({ children, authUrl, postLoginRedirectUrl, displayWhileLoading, }: AthenaAuthProviderProps): JSX.Element;
|
|
35
|
-
|
|
36
|
-
export declare interface AthenaAuthProviderProps {
|
|
37
|
-
children: ReactNode;
|
|
38
|
-
/**
|
|
39
|
-
* Your PropelAuth auth URL (e.g. `https://auth.yourdomain.com`).
|
|
40
|
-
* Found in the PropelAuth dashboard under Frontend Integration.
|
|
41
|
-
*/
|
|
42
|
-
authUrl: string;
|
|
43
|
-
/**
|
|
44
|
-
* Where to redirect after a successful login.
|
|
45
|
-
* Defaults to the current page URL.
|
|
46
|
-
*/
|
|
47
|
-
postLoginRedirectUrl?: string;
|
|
48
|
-
/**
|
|
49
|
-
* Custom element displayed while the auth state is loading.
|
|
50
|
-
* Defaults to `null` (renders nothing).
|
|
51
|
-
*/
|
|
52
|
-
displayWhileLoading?: ReactNode;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Auth state exposed by `useAthenaAuth()`.
|
|
57
|
-
*/
|
|
58
|
-
export declare interface AthenaAuthState {
|
|
59
|
-
/** Whether the user is currently logged in. */
|
|
60
|
-
isLoggedIn: boolean;
|
|
61
|
-
/** Whether the auth state is still loading. */
|
|
62
|
-
isLoading: boolean;
|
|
63
|
-
/** The authenticated user, or `null` when not logged in. */
|
|
64
|
-
user: AthenaUser | null;
|
|
65
|
-
/** The current access token, or `null` when not logged in. */
|
|
66
|
-
accessToken: string | null;
|
|
67
|
-
/** Organizations the user belongs to. */
|
|
68
|
-
orgs: AthenaOrg[];
|
|
69
|
-
/** Log the user out. Redirects to the login page by default. */
|
|
70
|
-
logout: (redirectOnLogout?: boolean) => Promise<void>;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Athena organization membership.
|
|
75
|
-
*/
|
|
76
|
-
export declare interface AthenaOrg {
|
|
77
|
-
orgId: string;
|
|
78
|
-
orgName: string;
|
|
79
|
-
urlSafeOrgName: string;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Organization membership returned by the SSO endpoint.
|
|
84
|
-
*/
|
|
85
|
-
export declare interface AthenaSSOOrgInfo {
|
|
86
|
-
orgId: string;
|
|
87
|
-
orgName: string;
|
|
88
|
-
urlSafeOrgName: string;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Wraps your app with Athena authentication powered by an external SSO
|
|
93
|
-
* identity provider (e.g. Microsoft Entra / Azure AD, Okta, etc.).
|
|
94
|
-
*
|
|
95
|
-
* The SSO login flow is handled entirely by your backend. This provider
|
|
96
|
-
* verifies the session by fetching `ssoUserInfoUrl` and exposes the
|
|
97
|
-
* same `AthenaAuthState` context that `AthenaAuthProvider` (PropelAuth)
|
|
98
|
-
* provides, so downstream components like `<AthenaProvider>` and
|
|
99
|
-
* `useAthenaAuth()` work identically.
|
|
100
|
-
*
|
|
101
|
-
* Place this **above** `<AthenaProvider>` in the component tree.
|
|
102
|
-
*
|
|
103
|
-
* @example
|
|
104
|
-
* ```tsx
|
|
105
|
-
* import { AthenaSSOProvider } from '@athenaintel/react/auth';
|
|
106
|
-
* import { AthenaProvider, AthenaChat } from '@athenaintel/react';
|
|
107
|
-
*
|
|
108
|
-
* function App() {
|
|
109
|
-
* return (
|
|
110
|
-
* <AthenaSSOProvider
|
|
111
|
-
* ssoUserInfoUrl="https://api.yourdomain.com/api/sso/userinfo"
|
|
112
|
-
* ssoLoginUrl="https://api.yourdomain.com/api/sso/initiate"
|
|
113
|
-
* >
|
|
114
|
-
* <AthenaProvider>
|
|
115
|
-
* <AthenaChat />
|
|
116
|
-
* </AthenaProvider>
|
|
117
|
-
* </AthenaSSOProvider>
|
|
118
|
-
* );
|
|
119
|
-
* }
|
|
120
|
-
* ```
|
|
121
|
-
*/
|
|
122
|
-
export declare function AthenaSSOProvider({ children, ssoBaseUrl, ssoUserInfoUrl, ssoLoginUrl, ssoLogoutUrl, displayWhileLoading, displayOnError, revalidateOnWindowFocus, }: AthenaSSOProviderProps): JSX.Element | null;
|
|
123
|
-
|
|
124
|
-
export declare interface AthenaSSOProviderProps {
|
|
125
|
-
children: ReactNode;
|
|
126
|
-
/**
|
|
127
|
-
* Base URL used to resolve the Athena SSO endpoints.
|
|
128
|
-
*
|
|
129
|
-
* When omitted, the provider defaults to same-origin relative paths:
|
|
130
|
-
* `/api/sso/userinfo`, `/api/sso/initiate`, and `/api/sso/logout`.
|
|
131
|
-
*
|
|
132
|
-
* Use this when your frontend and backend live on different origins
|
|
133
|
-
* (for example `https://app.example.com` + `https://api.example.com`).
|
|
134
|
-
*/
|
|
135
|
-
ssoBaseUrl?: string;
|
|
136
|
-
/**
|
|
137
|
-
* Optional override for the SSO user-info endpoint that returns the
|
|
138
|
-
* authenticated user's data and access token.
|
|
139
|
-
*
|
|
140
|
-
* The endpoint must return JSON matching `AthenaSSOUserInfo`:
|
|
141
|
-
* ```json
|
|
142
|
-
* {
|
|
143
|
-
* "user": { "user_id": "…", "email": "…", … },
|
|
144
|
-
* "orgMemberInfos": [{ "orgId": "…", "orgName": "…", "urlSafeOrgName": "…" }],
|
|
145
|
-
* "accessToken": "…"
|
|
146
|
-
* }
|
|
147
|
-
* ```
|
|
148
|
-
*
|
|
149
|
-
* The request is sent with `credentials: 'include'` so that
|
|
150
|
-
* session cookies are forwarded automatically.
|
|
151
|
-
*/
|
|
152
|
-
ssoUserInfoUrl?: string;
|
|
153
|
-
/**
|
|
154
|
-
* Optional override for the URL to redirect the user to when no valid
|
|
155
|
-
* SSO session exists.
|
|
156
|
-
* This is typically the SSO initiation endpoint on your backend
|
|
157
|
-
* (e.g. `https://api.yourdomain.com/api/sso/initiate`).
|
|
158
|
-
*/
|
|
159
|
-
ssoLoginUrl?: string;
|
|
160
|
-
/**
|
|
161
|
-
* Optional override for the backend SSO logout endpoint.
|
|
162
|
-
* Defaults to `/api/sso/logout` (or `${ssoBaseUrl}/api/sso/logout`).
|
|
163
|
-
*/
|
|
164
|
-
ssoLogoutUrl?: string;
|
|
165
|
-
/**
|
|
166
|
-
* Custom element displayed while the SSO session is being verified.
|
|
167
|
-
* Defaults to `null` (renders nothing).
|
|
168
|
-
*/
|
|
169
|
-
displayWhileLoading?: ReactNode;
|
|
170
|
-
/**
|
|
171
|
-
* Custom element displayed when SSO authentication fails.
|
|
172
|
-
* If not provided, the user is automatically redirected to `ssoLoginUrl`.
|
|
173
|
-
*/
|
|
174
|
-
displayOnError?: ReactNode;
|
|
175
|
-
/**
|
|
176
|
-
* Re-validate the SSO session when the window regains focus.
|
|
177
|
-
* Disabled by default. When enabled, token expiry and user switching
|
|
178
|
-
* are picked up without requiring a full page reload.
|
|
179
|
-
*/
|
|
180
|
-
revalidateOnWindowFocus?: boolean;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* User data returned by the Athena SSO `/api/sso/userinfo` endpoint.
|
|
185
|
-
* Field names use snake_case to match the backend response format.
|
|
186
|
-
*/
|
|
187
|
-
export declare interface AthenaSSOUserData {
|
|
188
|
-
user_id: string;
|
|
189
|
-
email: string;
|
|
190
|
-
first_name: string;
|
|
191
|
-
last_name: string;
|
|
192
|
-
username: string;
|
|
193
|
-
picture_url: string;
|
|
194
|
-
properties: Record<string, unknown>;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Full response from the Athena SSO `/api/sso/userinfo` endpoint.
|
|
199
|
-
*/
|
|
200
|
-
export declare interface AthenaSSOUserInfo {
|
|
201
|
-
user: AthenaSSOUserData;
|
|
202
|
-
orgMemberInfos: AthenaSSOOrgInfo[];
|
|
203
|
-
accessToken: string;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* Athena user information — a simplified, PropelAuth-agnostic representation.
|
|
208
|
-
*/
|
|
209
|
-
export declare interface AthenaUser {
|
|
210
|
-
userId: string;
|
|
211
|
-
email: string;
|
|
212
|
-
firstName?: string;
|
|
213
|
-
lastName?: string;
|
|
214
|
-
username?: string;
|
|
215
|
-
pictureUrl?: string;
|
|
216
|
-
properties?: Record<string, unknown>;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Read the current Athena auth state.
|
|
221
|
-
*
|
|
222
|
-
* Must be used inside an `<AthenaAuthProvider>`.
|
|
223
|
-
*
|
|
224
|
-
* @example
|
|
225
|
-
* ```tsx
|
|
226
|
-
* function UserMenu() {
|
|
227
|
-
* const { user, isLoggedIn, logout } = useAthenaAuth();
|
|
228
|
-
* if (!isLoggedIn) return null;
|
|
229
|
-
* return (
|
|
230
|
-
* <div>
|
|
231
|
-
* <span>{user?.email}</span>
|
|
232
|
-
* <button onClick={() => logout()}>Log out</button>
|
|
233
|
-
* </div>
|
|
234
|
-
* );
|
|
235
|
-
* }
|
|
236
|
-
* ```
|
|
237
|
-
*/
|
|
238
|
-
export declare function useAthenaAuth(): AthenaAuthState;
|
|
239
|
-
|
|
240
|
-
export { }
|