@ory/elements-react 1.0.0-next.12 → 1.0.0-next.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/api-report/elements-react-client.api.json +228 -0
  3. package/api-report/elements-react-client.api.md +22 -0
  4. package/api-report/elements-react-theme.api.json +47 -24
  5. package/api-report/elements-react-theme.api.md +5 -5
  6. package/api-report/elements-react.api.json +0 -33
  7. package/api-report/elements-react.api.md +0 -8
  8. package/api-report/temp/elements-react-client.api.md +22 -0
  9. package/api-report/temp/elements-react-theme.api.md +5 -5
  10. package/api-report/temp/elements-react.api.md +0 -8
  11. package/config/api-extractor-client.json +463 -0
  12. package/dist/client/frontendClient.d.mts +5 -0
  13. package/dist/client/frontendClient.d.ts +5 -0
  14. package/dist/client/frontendClient.js +40 -0
  15. package/dist/client/frontendClient.js.map +1 -0
  16. package/dist/client/frontendClient.mjs +19 -0
  17. package/dist/client/frontendClient.mjs.map +1 -0
  18. package/dist/client/index.d.mts +3 -0
  19. package/dist/client/index.d.ts +3 -0
  20. package/dist/client/index.js +29 -0
  21. package/dist/client/index.js.map +1 -0
  22. package/dist/client/index.mjs +5 -0
  23. package/dist/client/index.mjs.map +1 -0
  24. package/dist/client/useSession.d.mts +41 -0
  25. package/dist/client/useSession.d.ts +41 -0
  26. package/dist/client/useSession.js +79 -0
  27. package/dist/client/useSession.js.map +1 -0
  28. package/dist/client/useSession.mjs +54 -0
  29. package/dist/client/useSession.mjs.map +1 -0
  30. package/dist/index.d.mts +2 -18
  31. package/dist/index.d.ts +2 -18
  32. package/dist/index.js +16 -5562
  33. package/dist/index.js.map +1 -1
  34. package/dist/index.mjs +19 -5564
  35. package/dist/index.mjs.map +1 -1
  36. package/dist/theme/default/index.css +3 -0
  37. package/dist/theme/default/index.css.map +1 -1
  38. package/dist/theme/default/index.d.mts +3 -3
  39. package/dist/theme/default/index.d.ts +3 -3
  40. package/dist/theme/default/index.js +84 -62
  41. package/dist/theme/default/index.js.map +1 -1
  42. package/dist/theme/default/index.mjs +103 -83
  43. package/dist/theme/default/index.mjs.map +1 -1
  44. package/package.json +9 -2
@@ -0,0 +1,41 @@
1
+ import * as zustand from 'zustand';
2
+ import { Session } from '@ory/client-fetch';
3
+
4
+ type SessionStore = {
5
+ setIsLoading: (loading: boolean) => void;
6
+ setSession: (session: Session) => void;
7
+ isLoading: boolean;
8
+ session: Session | undefined;
9
+ error: string | undefined;
10
+ setError: (error: string | undefined) => void;
11
+ };
12
+ declare const sessionStore: zustand.UseBoundStore<Omit<zustand.StoreApi<SessionStore>, "subscribe"> & {
13
+ subscribe: {
14
+ (listener: (selectedState: SessionStore, previousSelectedState: SessionStore) => void): () => void;
15
+ <U>(selector: (state: SessionStore) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
16
+ equalityFn?: ((a: U, b: U) => boolean) | undefined;
17
+ fireImmediately?: boolean | undefined;
18
+ } | undefined): () => void;
19
+ };
20
+ }>;
21
+ /**
22
+ * A hook to get the current session from the Ory Network.
23
+ *
24
+ * Usage:
25
+ * ```ts
26
+ * const { session, error, isLoading } = useSession()
27
+ * ```
28
+ *
29
+ * @returns The current session, error and loading state.
30
+ */
31
+ declare const useSession: (config?: {
32
+ sdk: {
33
+ url: string;
34
+ };
35
+ }) => {
36
+ session: Session | undefined;
37
+ error: string | undefined;
38
+ isLoading: boolean;
39
+ };
40
+
41
+ export { sessionStore, useSession };
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var useSession_exports = {};
21
+ __export(useSession_exports, {
22
+ sessionStore: () => sessionStore,
23
+ useSession: () => useSession
24
+ });
25
+ module.exports = __toCommonJS(useSession_exports);
26
+ var import_react = require("react");
27
+ var import_zustand = require("zustand");
28
+ var import_middleware = require("zustand/middleware");
29
+ var import_frontendClient = require("./frontendClient");
30
+ const sessionStore = (0, import_zustand.create)()(
31
+ (0, import_middleware.subscribeWithSelector)((set) => ({
32
+ isLoading: false,
33
+ setIsLoading: (isLoading) => set({ isLoading }),
34
+ session: void 0,
35
+ setSession: (session) => set({ session }),
36
+ error: void 0,
37
+ setError: (error) => set({ error })
38
+ }))
39
+ );
40
+ const useSession = (config) => {
41
+ const store = (0, import_zustand.useStore)(sessionStore);
42
+ const fetchSession = (0, import_react.useCallback)(async () => {
43
+ var _a;
44
+ const { session, isLoading, setSession, setIsLoading, setError } = sessionStore.getState();
45
+ if (!!session || isLoading) {
46
+ return;
47
+ }
48
+ setIsLoading(true);
49
+ try {
50
+ const sessionData = await (0, import_frontendClient.frontendClient)(
51
+ (_a = config == null ? void 0 : config.sdk.url) != null ? _a : window.location.protocol + "//" + window.location.host
52
+ ).toSession();
53
+ setSession(sessionData);
54
+ } catch (e) {
55
+ setError(e instanceof Error ? e.message : "Unknown error occurred");
56
+ if (!(config == null ? void 0 : config.sdk.url)) {
57
+ console.error(
58
+ "Could not fetch session. Make sure you have set the SDK URL in the config."
59
+ );
60
+ }
61
+ } finally {
62
+ setIsLoading(false);
63
+ }
64
+ }, [config == null ? void 0 : config.sdk.url]);
65
+ (0, import_react.useEffect)(() => {
66
+ void fetchSession();
67
+ }, [fetchSession]);
68
+ return {
69
+ session: store.session,
70
+ error: store.error,
71
+ isLoading: store.isLoading
72
+ };
73
+ };
74
+ // Annotate the CommonJS export names for ESM import in node:
75
+ 0 && (module.exports = {
76
+ sessionStore,
77
+ useSession
78
+ });
79
+ //# sourceMappingURL=useSession.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/client/useSession.ts"],"sourcesContent":["// Copyright © 2024 Ory Corp\n// SPDX-License-Identifier: Apache-2.0\n\"use client\"\n\nimport { Session } from \"@ory/client-fetch\"\nimport { useCallback, useEffect } from \"react\"\nimport { create, useStore } from \"zustand\"\nimport { subscribeWithSelector } from \"zustand/middleware\"\nimport { frontendClient } from \"./frontendClient\"\n\ntype SessionStore = {\n setIsLoading: (loading: boolean) => void\n setSession: (session: Session) => void\n isLoading: boolean\n session: Session | undefined\n error: string | undefined\n setError: (error: string | undefined) => void\n}\n\nexport const sessionStore = create<SessionStore>()(\n subscribeWithSelector((set) => ({\n isLoading: false,\n setIsLoading: (isLoading: boolean) => set({ isLoading }),\n session: undefined,\n setSession: (session: Session) => set({ session }),\n error: undefined,\n setError: (error: string | undefined) => set({ error }),\n })),\n)\n\n/**\n * A hook to get the current session from the Ory Network.\n *\n * Usage:\n * ```ts\n * const { session, error, isLoading } = useSession()\n * ```\n *\n * @returns The current session, error and loading state.\n */\nexport const useSession = (config?: { sdk: { url: string } }) => {\n const store = useStore(sessionStore)\n\n const fetchSession = useCallback(async () => {\n const { session, isLoading, setSession, setIsLoading, setError } =\n sessionStore.getState()\n\n if (!!session || isLoading) {\n return\n }\n\n setIsLoading(true)\n\n try {\n const sessionData = await frontendClient(\n config?.sdk.url ??\n window.location.protocol + \"//\" + window.location.host,\n ).toSession()\n setSession(sessionData)\n } catch (e) {\n setError(e instanceof Error ? e.message : \"Unknown error occurred\")\n if (!config?.sdk.url) {\n console.error(\n \"Could not fetch session. Make sure you have set the SDK URL in the config.\",\n )\n }\n } finally {\n setIsLoading(false)\n }\n }, [config?.sdk.url])\n\n useEffect(() => {\n void fetchSession()\n }, [fetchSession])\n\n return {\n session: store.session,\n error: store.error,\n isLoading: store.isLoading,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,mBAAuC;AACvC,qBAAiC;AACjC,wBAAsC;AACtC,4BAA+B;AAWxB,MAAM,mBAAe,uBAAqB;AAAA,MAC/C,yCAAsB,CAAC,SAAS;AAAA,IAC9B,WAAW;AAAA,IACX,cAAc,CAAC,cAAuB,IAAI,EAAE,UAAU,CAAC;AAAA,IACvD,SAAS;AAAA,IACT,YAAY,CAAC,YAAqB,IAAI,EAAE,QAAQ,CAAC;AAAA,IACjD,OAAO;AAAA,IACP,UAAU,CAAC,UAA8B,IAAI,EAAE,MAAM,CAAC;AAAA,EACxD,EAAE;AACJ;AAYO,MAAM,aAAa,CAAC,WAAsC;AAC/D,QAAM,YAAQ,yBAAS,YAAY;AAEnC,QAAM,mBAAe,0BAAY,YAAY;AA3C/C;AA4CI,UAAM,EAAE,SAAS,WAAW,YAAY,cAAc,SAAS,IAC7D,aAAa,SAAS;AAExB,QAAI,CAAC,CAAC,WAAW,WAAW;AAC1B;AAAA,IACF;AAEA,iBAAa,IAAI;AAEjB,QAAI;AACF,YAAM,cAAc,UAAM;AAAA,SACxB,sCAAQ,IAAI,QAAZ,YACE,OAAO,SAAS,WAAW,OAAO,OAAO,SAAS;AAAA,MACtD,EAAE,UAAU;AACZ,iBAAW,WAAW;AAAA,IACxB,SAAS,GAAG;AACV,eAAS,aAAa,QAAQ,EAAE,UAAU,wBAAwB;AAClE,UAAI,EAAC,iCAAQ,IAAI,MAAK;AACpB,gBAAQ;AAAA,UACN;AAAA,QACF;AAAA,MACF;AAAA,IACF,UAAE;AACA,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,iCAAQ,IAAI,GAAG,CAAC;AAEpB,8BAAU,MAAM;AACd,SAAK,aAAa;AAAA,EACpB,GAAG,CAAC,YAAY,CAAC;AAEjB,SAAO;AAAA,IACL,SAAS,MAAM;AAAA,IACf,OAAO,MAAM;AAAA,IACb,WAAW,MAAM;AAAA,EACnB;AACF;","names":[]}
@@ -0,0 +1,54 @@
1
+ "use client";
2
+ import { useCallback, useEffect } from "react";
3
+ import { create, useStore } from "zustand";
4
+ import { subscribeWithSelector } from "zustand/middleware";
5
+ import { frontendClient } from "./frontendClient";
6
+ const sessionStore = create()(
7
+ subscribeWithSelector((set) => ({
8
+ isLoading: false,
9
+ setIsLoading: (isLoading) => set({ isLoading }),
10
+ session: void 0,
11
+ setSession: (session) => set({ session }),
12
+ error: void 0,
13
+ setError: (error) => set({ error })
14
+ }))
15
+ );
16
+ const useSession = (config) => {
17
+ const store = useStore(sessionStore);
18
+ const fetchSession = useCallback(async () => {
19
+ var _a;
20
+ const { session, isLoading, setSession, setIsLoading, setError } = sessionStore.getState();
21
+ if (!!session || isLoading) {
22
+ return;
23
+ }
24
+ setIsLoading(true);
25
+ try {
26
+ const sessionData = await frontendClient(
27
+ (_a = config == null ? void 0 : config.sdk.url) != null ? _a : window.location.protocol + "//" + window.location.host
28
+ ).toSession();
29
+ setSession(sessionData);
30
+ } catch (e) {
31
+ setError(e instanceof Error ? e.message : "Unknown error occurred");
32
+ if (!(config == null ? void 0 : config.sdk.url)) {
33
+ console.error(
34
+ "Could not fetch session. Make sure you have set the SDK URL in the config."
35
+ );
36
+ }
37
+ } finally {
38
+ setIsLoading(false);
39
+ }
40
+ }, [config == null ? void 0 : config.sdk.url]);
41
+ useEffect(() => {
42
+ void fetchSession();
43
+ }, [fetchSession]);
44
+ return {
45
+ session: store.session,
46
+ error: store.error,
47
+ isLoading: store.isLoading
48
+ };
49
+ };
50
+ export {
51
+ sessionStore,
52
+ useSession
53
+ };
54
+ //# sourceMappingURL=useSession.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/client/useSession.ts"],"sourcesContent":["// Copyright © 2024 Ory Corp\n// SPDX-License-Identifier: Apache-2.0\n\"use client\"\n\nimport { Session } from \"@ory/client-fetch\"\nimport { useCallback, useEffect } from \"react\"\nimport { create, useStore } from \"zustand\"\nimport { subscribeWithSelector } from \"zustand/middleware\"\nimport { frontendClient } from \"./frontendClient\"\n\ntype SessionStore = {\n setIsLoading: (loading: boolean) => void\n setSession: (session: Session) => void\n isLoading: boolean\n session: Session | undefined\n error: string | undefined\n setError: (error: string | undefined) => void\n}\n\nexport const sessionStore = create<SessionStore>()(\n subscribeWithSelector((set) => ({\n isLoading: false,\n setIsLoading: (isLoading: boolean) => set({ isLoading }),\n session: undefined,\n setSession: (session: Session) => set({ session }),\n error: undefined,\n setError: (error: string | undefined) => set({ error }),\n })),\n)\n\n/**\n * A hook to get the current session from the Ory Network.\n *\n * Usage:\n * ```ts\n * const { session, error, isLoading } = useSession()\n * ```\n *\n * @returns The current session, error and loading state.\n */\nexport const useSession = (config?: { sdk: { url: string } }) => {\n const store = useStore(sessionStore)\n\n const fetchSession = useCallback(async () => {\n const { session, isLoading, setSession, setIsLoading, setError } =\n sessionStore.getState()\n\n if (!!session || isLoading) {\n return\n }\n\n setIsLoading(true)\n\n try {\n const sessionData = await frontendClient(\n config?.sdk.url ??\n window.location.protocol + \"//\" + window.location.host,\n ).toSession()\n setSession(sessionData)\n } catch (e) {\n setError(e instanceof Error ? e.message : \"Unknown error occurred\")\n if (!config?.sdk.url) {\n console.error(\n \"Could not fetch session. Make sure you have set the SDK URL in the config.\",\n )\n }\n } finally {\n setIsLoading(false)\n }\n }, [config?.sdk.url])\n\n useEffect(() => {\n void fetchSession()\n }, [fetchSession])\n\n return {\n session: store.session,\n error: store.error,\n isLoading: store.isLoading,\n }\n}\n"],"mappings":";AAKA,SAAS,aAAa,iBAAiB;AACvC,SAAS,QAAQ,gBAAgB;AACjC,SAAS,6BAA6B;AACtC,SAAS,sBAAsB;AAWxB,MAAM,eAAe,OAAqB;AAAA,EAC/C,sBAAsB,CAAC,SAAS;AAAA,IAC9B,WAAW;AAAA,IACX,cAAc,CAAC,cAAuB,IAAI,EAAE,UAAU,CAAC;AAAA,IACvD,SAAS;AAAA,IACT,YAAY,CAAC,YAAqB,IAAI,EAAE,QAAQ,CAAC;AAAA,IACjD,OAAO;AAAA,IACP,UAAU,CAAC,UAA8B,IAAI,EAAE,MAAM,CAAC;AAAA,EACxD,EAAE;AACJ;AAYO,MAAM,aAAa,CAAC,WAAsC;AAC/D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,eAAe,YAAY,YAAY;AA3C/C;AA4CI,UAAM,EAAE,SAAS,WAAW,YAAY,cAAc,SAAS,IAC7D,aAAa,SAAS;AAExB,QAAI,CAAC,CAAC,WAAW,WAAW;AAC1B;AAAA,IACF;AAEA,iBAAa,IAAI;AAEjB,QAAI;AACF,YAAM,cAAc,MAAM;AAAA,SACxB,sCAAQ,IAAI,QAAZ,YACE,OAAO,SAAS,WAAW,OAAO,OAAO,SAAS;AAAA,MACtD,EAAE,UAAU;AACZ,iBAAW,WAAW;AAAA,IACxB,SAAS,GAAG;AACV,eAAS,aAAa,QAAQ,EAAE,UAAU,wBAAwB;AAClE,UAAI,EAAC,iCAAQ,IAAI,MAAK;AACpB,gBAAQ;AAAA,UACN;AAAA,QACF;AAAA,MACF;AAAA,IACF,UAAE;AACA,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,iCAAQ,IAAI,GAAG,CAAC;AAEpB,YAAU,MAAM;AACd,SAAK,aAAa;AAAA,EACpB,GAAG,CAAC,YAAY,CAAC;AAEjB,SAAO;AAAA,IACL,SAAS,MAAM;AAAA,IACf,OAAO,MAAM;AAAA,IACb,WAAW,MAAM;AAAA,EACnB;AACF;","names":[]}
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { UiNodeInputAttributes, UiNode, UiNodeAnchorAttributes, UiNodeTextAttributes, UiNodeImageAttributes, UiNodeGroupEnum, UiText, ConfigurationParameters, FlowType, LoginFlow, RegistrationFlow, RecoveryFlow, VerificationFlow, SettingsFlow, FlowError, UpdateLoginFlowBody, UpdateRegistrationFlowBody, UpdateVerificationFlowBody, UpdateRecoveryFlowBody, UpdateSettingsFlowBody, OnRedirectHandler, Session } from '@ory/client-fetch';
1
+ import { UiNodeInputAttributes, UiNode, UiNodeAnchorAttributes, UiNodeTextAttributes, UiNodeImageAttributes, UiNodeGroupEnum, UiText, ConfigurationParameters, FlowType, LoginFlow, RegistrationFlow, RecoveryFlow, VerificationFlow, SettingsFlow, FlowError, UpdateLoginFlowBody, UpdateRegistrationFlowBody, UpdateVerificationFlowBody, UpdateRecoveryFlowBody, UpdateSettingsFlowBody, OnRedirectHandler } from '@ory/client-fetch';
2
2
  import { ComponentPropsWithoutRef, FormEventHandler, MouseEventHandler, PropsWithChildren, DetailedHTMLProps, HTMLAttributes, ComponentType, Dispatch } from 'react';
3
3
  import * as class_variance_authority_types from 'class-variance-authority/types';
4
4
  import { VariantProps } from 'class-variance-authority';
@@ -546,20 +546,4 @@ declare function messageTestId(message: UiText): {
546
546
  "data-testid": string;
547
547
  };
548
548
 
549
- /**
550
- * A hook to get the current session from the Ory Network.
551
- *
552
- * Usage:
553
- * ```ts
554
- * const { session, error, isLoading } = useSession()
555
- * ```
556
- *
557
- * @returns The current session, error and loading state.
558
- */
559
- declare const useSession: () => {
560
- session: Session | undefined;
561
- error: string | undefined;
562
- isLoading: boolean;
563
- };
564
-
565
- export { type ErrorFlowContainer, type FlowContainerSetter, type FlowContextValue, type FormValues, HeadlessPageHeader, type IntlConfig, type LoginFlowContainer, type OnSubmitHandlerProps, OryCard, type OryCardAuthMethodListItemProps, OryCardContent, type OryCardContentProps, type OryCardDividerProps, OryCardFooter, type OryCardFooterProps, OryCardHeader, type OryCardHeaderProps, type OryCardLogoProps, type OryCardRootProps as OryCardProps, OryCardValidationMessages, type OryClientConfiguration, type OryCurrentIdentifierProps, type OryFlowComponentOverrides, type OryFlowComponents, type OryFlowContainer, OryForm, OryFormGroupDivider, type OryFormGroupProps, OryFormGroups, type OryFormGroupsProps, OryFormOidcButtons, type OryFormOidcButtonsProps, type OryFormOidcRootProps, type OryFormProps, type OryFormRootProps, OryFormSection, type OryFormSectionContentProps, type OryFormSectionFooterProps, type OryFormSectionProps, OryFormSocialButtonsForm, locales as OryLocales, type OryMessageContentProps, type OryMessageRootProps, type OryNodeAnchorProps, type OryNodeButtonProps, type OryNodeImageProps, type OryNodeInputProps, type OryNodeLabelProps, type OryNodeOidcButtonProps, type OryNodeTextProps, type OryPageHeaderProps, OryProvider, type OryProviderProps, OrySettingsCard, type OrySettingsOidcProps, type OrySettingsPasskeyProps, type OrySettingsRecoveryCodesProps, type OrySettingsTotpProps, type OrySettingsWebauthnProps, OryTwoStepCard, type RecoveryFlowContainer, type RegistrationFlowContainer, type SettingsFlowContainer, type VerificationFlowContainer, messageTestId, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryFlow, useSession };
549
+ export { type ErrorFlowContainer, type FlowContainerSetter, type FlowContextValue, type FormValues, HeadlessPageHeader, type IntlConfig, type LoginFlowContainer, type OnSubmitHandlerProps, OryCard, type OryCardAuthMethodListItemProps, OryCardContent, type OryCardContentProps, type OryCardDividerProps, OryCardFooter, type OryCardFooterProps, OryCardHeader, type OryCardHeaderProps, type OryCardLogoProps, type OryCardRootProps as OryCardProps, OryCardValidationMessages, type OryClientConfiguration, type OryCurrentIdentifierProps, type OryFlowComponentOverrides, type OryFlowComponents, type OryFlowContainer, OryForm, OryFormGroupDivider, type OryFormGroupProps, OryFormGroups, type OryFormGroupsProps, OryFormOidcButtons, type OryFormOidcButtonsProps, type OryFormOidcRootProps, type OryFormProps, type OryFormRootProps, OryFormSection, type OryFormSectionContentProps, type OryFormSectionFooterProps, type OryFormSectionProps, OryFormSocialButtonsForm, locales as OryLocales, type OryMessageContentProps, type OryMessageRootProps, type OryNodeAnchorProps, type OryNodeButtonProps, type OryNodeImageProps, type OryNodeInputProps, type OryNodeLabelProps, type OryNodeOidcButtonProps, type OryNodeTextProps, type OryPageHeaderProps, OryProvider, type OryProviderProps, OrySettingsCard, type OrySettingsOidcProps, type OrySettingsPasskeyProps, type OrySettingsRecoveryCodesProps, type OrySettingsTotpProps, type OrySettingsWebauthnProps, OryTwoStepCard, type RecoveryFlowContainer, type RegistrationFlowContainer, type SettingsFlowContainer, type VerificationFlowContainer, messageTestId, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryFlow };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { UiNodeInputAttributes, UiNode, UiNodeAnchorAttributes, UiNodeTextAttributes, UiNodeImageAttributes, UiNodeGroupEnum, UiText, ConfigurationParameters, FlowType, LoginFlow, RegistrationFlow, RecoveryFlow, VerificationFlow, SettingsFlow, FlowError, UpdateLoginFlowBody, UpdateRegistrationFlowBody, UpdateVerificationFlowBody, UpdateRecoveryFlowBody, UpdateSettingsFlowBody, OnRedirectHandler, Session } from '@ory/client-fetch';
1
+ import { UiNodeInputAttributes, UiNode, UiNodeAnchorAttributes, UiNodeTextAttributes, UiNodeImageAttributes, UiNodeGroupEnum, UiText, ConfigurationParameters, FlowType, LoginFlow, RegistrationFlow, RecoveryFlow, VerificationFlow, SettingsFlow, FlowError, UpdateLoginFlowBody, UpdateRegistrationFlowBody, UpdateVerificationFlowBody, UpdateRecoveryFlowBody, UpdateSettingsFlowBody, OnRedirectHandler } from '@ory/client-fetch';
2
2
  import { ComponentPropsWithoutRef, FormEventHandler, MouseEventHandler, PropsWithChildren, DetailedHTMLProps, HTMLAttributes, ComponentType, Dispatch } from 'react';
3
3
  import * as class_variance_authority_types from 'class-variance-authority/types';
4
4
  import { VariantProps } from 'class-variance-authority';
@@ -546,20 +546,4 @@ declare function messageTestId(message: UiText): {
546
546
  "data-testid": string;
547
547
  };
548
548
 
549
- /**
550
- * A hook to get the current session from the Ory Network.
551
- *
552
- * Usage:
553
- * ```ts
554
- * const { session, error, isLoading } = useSession()
555
- * ```
556
- *
557
- * @returns The current session, error and loading state.
558
- */
559
- declare const useSession: () => {
560
- session: Session | undefined;
561
- error: string | undefined;
562
- isLoading: boolean;
563
- };
564
-
565
- export { type ErrorFlowContainer, type FlowContainerSetter, type FlowContextValue, type FormValues, HeadlessPageHeader, type IntlConfig, type LoginFlowContainer, type OnSubmitHandlerProps, OryCard, type OryCardAuthMethodListItemProps, OryCardContent, type OryCardContentProps, type OryCardDividerProps, OryCardFooter, type OryCardFooterProps, OryCardHeader, type OryCardHeaderProps, type OryCardLogoProps, type OryCardRootProps as OryCardProps, OryCardValidationMessages, type OryClientConfiguration, type OryCurrentIdentifierProps, type OryFlowComponentOverrides, type OryFlowComponents, type OryFlowContainer, OryForm, OryFormGroupDivider, type OryFormGroupProps, OryFormGroups, type OryFormGroupsProps, OryFormOidcButtons, type OryFormOidcButtonsProps, type OryFormOidcRootProps, type OryFormProps, type OryFormRootProps, OryFormSection, type OryFormSectionContentProps, type OryFormSectionFooterProps, type OryFormSectionProps, OryFormSocialButtonsForm, locales as OryLocales, type OryMessageContentProps, type OryMessageRootProps, type OryNodeAnchorProps, type OryNodeButtonProps, type OryNodeImageProps, type OryNodeInputProps, type OryNodeLabelProps, type OryNodeOidcButtonProps, type OryNodeTextProps, type OryPageHeaderProps, OryProvider, type OryProviderProps, OrySettingsCard, type OrySettingsOidcProps, type OrySettingsPasskeyProps, type OrySettingsRecoveryCodesProps, type OrySettingsTotpProps, type OrySettingsWebauthnProps, OryTwoStepCard, type RecoveryFlowContainer, type RegistrationFlowContainer, type SettingsFlowContainer, type VerificationFlowContainer, messageTestId, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryFlow, useSession };
549
+ export { type ErrorFlowContainer, type FlowContainerSetter, type FlowContextValue, type FormValues, HeadlessPageHeader, type IntlConfig, type LoginFlowContainer, type OnSubmitHandlerProps, OryCard, type OryCardAuthMethodListItemProps, OryCardContent, type OryCardContentProps, type OryCardDividerProps, OryCardFooter, type OryCardFooterProps, OryCardHeader, type OryCardHeaderProps, type OryCardLogoProps, type OryCardRootProps as OryCardProps, OryCardValidationMessages, type OryClientConfiguration, type OryCurrentIdentifierProps, type OryFlowComponentOverrides, type OryFlowComponents, type OryFlowContainer, OryForm, OryFormGroupDivider, type OryFormGroupProps, OryFormGroups, type OryFormGroupsProps, OryFormOidcButtons, type OryFormOidcButtonsProps, type OryFormOidcRootProps, type OryFormProps, type OryFormRootProps, OryFormSection, type OryFormSectionContentProps, type OryFormSectionFooterProps, type OryFormSectionProps, OryFormSocialButtonsForm, locales as OryLocales, type OryMessageContentProps, type OryMessageRootProps, type OryNodeAnchorProps, type OryNodeButtonProps, type OryNodeImageProps, type OryNodeInputProps, type OryNodeLabelProps, type OryNodeOidcButtonProps, type OryNodeTextProps, type OryPageHeaderProps, OryProvider, type OryProviderProps, OrySettingsCard, type OrySettingsOidcProps, type OrySettingsPasskeyProps, type OrySettingsRecoveryCodesProps, type OrySettingsTotpProps, type OrySettingsWebauthnProps, OryTwoStepCard, type RecoveryFlowContainer, type RegistrationFlowContainer, type SettingsFlowContainer, type VerificationFlowContainer, messageTestId, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryFlow };