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

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 +41 -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 +31 -5565
  33. package/dist/index.js.map +1 -1
  34. package/dist/index.mjs +34 -5567
  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
package/CHANGELOG.md CHANGED
@@ -1,3 +1,44 @@
1
+ ## 1.0.0-next.14 (2024-11-08)
2
+
3
+
4
+ ### 🚀 Features
5
+
6
+ - force OIDC account selection on settings
7
+
8
+
9
+ ### 🩹 Fixes
10
+
11
+ - redirect to login if session expired during settings
12
+
13
+
14
+ ### ❤️ Thank You
15
+
16
+ - Jonas Hungershausen
17
+
18
+ ## 1.0.0-next.13 (2024-11-05)
19
+
20
+
21
+ ### 🩹 Fixes
22
+
23
+ - ⚠️ move useSession hook to /client entry point
24
+
25
+ - oidc linking & unlinking form properties
26
+
27
+ - hide two step registration message
28
+
29
+ - implement component merging instead of usign lodash
30
+
31
+ - replace translation merge with custom function
32
+
33
+
34
+ #### ⚠️ Breaking Changes
35
+
36
+ - ⚠️ move useSession hook to /client entry point
37
+
38
+ ### ❤️ Thank You
39
+
40
+ - Jonas Hungershausen
41
+
1
42
  ## 1.0.0-next.12 (2024-10-29)
2
43
 
3
44
 
@@ -0,0 +1,228 @@
1
+ {
2
+ "metadata": {
3
+ "toolPackage": "@microsoft/api-extractor",
4
+ "toolVersion": "7.47.9",
5
+ "schemaVersion": 1011,
6
+ "oldestForwardsCompatibleVersion": 1001,
7
+ "tsdocConfig": {
8
+ "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
9
+ "noStandardTags": true,
10
+ "tagDefinitions": [
11
+ {
12
+ "tagName": "@alpha",
13
+ "syntaxKind": "modifier"
14
+ },
15
+ {
16
+ "tagName": "@beta",
17
+ "syntaxKind": "modifier"
18
+ },
19
+ {
20
+ "tagName": "@defaultValue",
21
+ "syntaxKind": "block"
22
+ },
23
+ {
24
+ "tagName": "@decorator",
25
+ "syntaxKind": "block",
26
+ "allowMultiple": true
27
+ },
28
+ {
29
+ "tagName": "@deprecated",
30
+ "syntaxKind": "block"
31
+ },
32
+ {
33
+ "tagName": "@eventProperty",
34
+ "syntaxKind": "modifier"
35
+ },
36
+ {
37
+ "tagName": "@example",
38
+ "syntaxKind": "block",
39
+ "allowMultiple": true
40
+ },
41
+ {
42
+ "tagName": "@experimental",
43
+ "syntaxKind": "modifier"
44
+ },
45
+ {
46
+ "tagName": "@inheritDoc",
47
+ "syntaxKind": "inline"
48
+ },
49
+ {
50
+ "tagName": "@internal",
51
+ "syntaxKind": "modifier"
52
+ },
53
+ {
54
+ "tagName": "@label",
55
+ "syntaxKind": "inline"
56
+ },
57
+ {
58
+ "tagName": "@link",
59
+ "syntaxKind": "inline",
60
+ "allowMultiple": true
61
+ },
62
+ {
63
+ "tagName": "@override",
64
+ "syntaxKind": "modifier"
65
+ },
66
+ {
67
+ "tagName": "@packageDocumentation",
68
+ "syntaxKind": "modifier"
69
+ },
70
+ {
71
+ "tagName": "@param",
72
+ "syntaxKind": "block",
73
+ "allowMultiple": true
74
+ },
75
+ {
76
+ "tagName": "@privateRemarks",
77
+ "syntaxKind": "block"
78
+ },
79
+ {
80
+ "tagName": "@public",
81
+ "syntaxKind": "modifier"
82
+ },
83
+ {
84
+ "tagName": "@readonly",
85
+ "syntaxKind": "modifier"
86
+ },
87
+ {
88
+ "tagName": "@remarks",
89
+ "syntaxKind": "block"
90
+ },
91
+ {
92
+ "tagName": "@returns",
93
+ "syntaxKind": "block"
94
+ },
95
+ {
96
+ "tagName": "@sealed",
97
+ "syntaxKind": "modifier"
98
+ },
99
+ {
100
+ "tagName": "@see",
101
+ "syntaxKind": "block"
102
+ },
103
+ {
104
+ "tagName": "@throws",
105
+ "syntaxKind": "block",
106
+ "allowMultiple": true
107
+ },
108
+ {
109
+ "tagName": "@typeParam",
110
+ "syntaxKind": "block",
111
+ "allowMultiple": true
112
+ },
113
+ {
114
+ "tagName": "@virtual",
115
+ "syntaxKind": "modifier"
116
+ },
117
+ {
118
+ "tagName": "@betaDocumentation",
119
+ "syntaxKind": "modifier"
120
+ },
121
+ {
122
+ "tagName": "@internalRemarks",
123
+ "syntaxKind": "block"
124
+ },
125
+ {
126
+ "tagName": "@preapproved",
127
+ "syntaxKind": "modifier"
128
+ }
129
+ ],
130
+ "supportForTags": {
131
+ "@alpha": true,
132
+ "@beta": true,
133
+ "@defaultValue": true,
134
+ "@decorator": true,
135
+ "@deprecated": true,
136
+ "@eventProperty": true,
137
+ "@example": true,
138
+ "@experimental": true,
139
+ "@inheritDoc": true,
140
+ "@internal": true,
141
+ "@label": true,
142
+ "@link": true,
143
+ "@override": true,
144
+ "@packageDocumentation": true,
145
+ "@param": true,
146
+ "@privateRemarks": true,
147
+ "@public": true,
148
+ "@readonly": true,
149
+ "@remarks": true,
150
+ "@returns": true,
151
+ "@sealed": true,
152
+ "@see": true,
153
+ "@throws": true,
154
+ "@typeParam": true,
155
+ "@virtual": true,
156
+ "@betaDocumentation": true,
157
+ "@internalRemarks": true,
158
+ "@preapproved": true
159
+ },
160
+ "reportUnsupportedHtmlElements": false
161
+ }
162
+ },
163
+ "kind": "Package",
164
+ "canonicalReference": "@ory/elements-react!",
165
+ "docComment": "",
166
+ "name": "@ory/elements-react",
167
+ "preserveMemberOrder": false,
168
+ "members": [
169
+ {
170
+ "kind": "EntryPoint",
171
+ "canonicalReference": "@ory/elements-react!",
172
+ "name": "",
173
+ "preserveMemberOrder": false,
174
+ "members": [
175
+ {
176
+ "kind": "Function",
177
+ "canonicalReference": "@ory/elements-react!useSession:function(1)",
178
+ "docComment": "/**\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 */\n",
179
+ "excerptTokens": [
180
+ {
181
+ "kind": "Content",
182
+ "text": "useSession: (config?: "
183
+ },
184
+ {
185
+ "kind": "Content",
186
+ "text": "{\n sdk: {\n url: string;\n };\n}"
187
+ },
188
+ {
189
+ "kind": "Content",
190
+ "text": ") => "
191
+ },
192
+ {
193
+ "kind": "Content",
194
+ "text": "{\n session: "
195
+ },
196
+ {
197
+ "kind": "Reference",
198
+ "text": "Session",
199
+ "canonicalReference": "@ory/client-fetch!Session:interface"
200
+ },
201
+ {
202
+ "kind": "Content",
203
+ "text": " | undefined;\n error: string | undefined;\n isLoading: boolean;\n}"
204
+ }
205
+ ],
206
+ "fileUrlPath": "dist/client/useSession.d.ts",
207
+ "returnTypeTokenRange": {
208
+ "startIndex": 3,
209
+ "endIndex": 6
210
+ },
211
+ "releaseTag": "Public",
212
+ "overloadIndex": 1,
213
+ "parameters": [
214
+ {
215
+ "parameterName": "config",
216
+ "parameterTypeTokenRange": {
217
+ "startIndex": 1,
218
+ "endIndex": 2
219
+ },
220
+ "isOptional": true
221
+ }
222
+ ],
223
+ "name": "useSession"
224
+ }
225
+ ]
226
+ }
227
+ ]
228
+ }
@@ -0,0 +1,22 @@
1
+ ## API Report File for "@ory/elements-react"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import { Session } from '@ory/client-fetch';
8
+
9
+ // @public
10
+ export const useSession: (config?: {
11
+ sdk: {
12
+ url: string;
13
+ };
14
+ }) => {
15
+ session: Session | undefined;
16
+ error: string | undefined;
17
+ isLoading: boolean;
18
+ };
19
+
20
+ // (No @packageDocumentation comment for this package)
21
+
22
+ ```
@@ -628,6 +628,53 @@
628
628
  "endIndex": 8
629
629
  }
630
630
  },
631
+ {
632
+ "kind": "Function",
633
+ "canonicalReference": "@ory/elements-react!getOryComponents:function(1)",
634
+ "docComment": "",
635
+ "excerptTokens": [
636
+ {
637
+ "kind": "Content",
638
+ "text": "declare function getOryComponents(overrides?: "
639
+ },
640
+ {
641
+ "kind": "Reference",
642
+ "text": "OryFlowComponentOverrides",
643
+ "canonicalReference": "@ory/elements-react!~OryFlowComponentOverrides:type"
644
+ },
645
+ {
646
+ "kind": "Content",
647
+ "text": "): "
648
+ },
649
+ {
650
+ "kind": "Reference",
651
+ "text": "OryFlowComponents",
652
+ "canonicalReference": "@ory/elements-react!~OryFlowComponents:type"
653
+ },
654
+ {
655
+ "kind": "Content",
656
+ "text": ";"
657
+ }
658
+ ],
659
+ "fileUrlPath": "dist/theme/default/index.d.ts",
660
+ "returnTypeTokenRange": {
661
+ "startIndex": 3,
662
+ "endIndex": 4
663
+ },
664
+ "releaseTag": "Public",
665
+ "overloadIndex": 1,
666
+ "parameters": [
667
+ {
668
+ "parameterName": "overrides",
669
+ "parameterTypeTokenRange": {
670
+ "startIndex": 1,
671
+ "endIndex": 2
672
+ },
673
+ "isOptional": true
674
+ }
675
+ ],
676
+ "name": "getOryComponents"
677
+ },
631
678
  {
632
679
  "kind": "Function",
633
680
  "canonicalReference": "@ory/elements-react!Login:function(1)",
@@ -750,30 +797,6 @@
750
797
  "endIndex": 8
751
798
  }
752
799
  },
753
- {
754
- "kind": "Variable",
755
- "canonicalReference": "@ory/elements-react!OryDefaultComponents:var",
756
- "docComment": "",
757
- "excerptTokens": [
758
- {
759
- "kind": "Content",
760
- "text": "OryDefaultComponents: "
761
- },
762
- {
763
- "kind": "Reference",
764
- "text": "OryFlowComponents",
765
- "canonicalReference": "@ory/elements-react!~OryFlowComponents:type"
766
- }
767
- ],
768
- "fileUrlPath": "dist/theme/default/index.d.ts",
769
- "isReadonly": true,
770
- "releaseTag": "Public",
771
- "name": "OryDefaultComponents",
772
- "variableTypeTokenRange": {
773
- "startIndex": 1,
774
- "endIndex": 2
775
- }
776
- },
777
800
  {
778
801
  "kind": "Function",
779
802
  "canonicalReference": "@ory/elements-react!Recovery:function(1)",
@@ -71,6 +71,11 @@ export type ErrorFlowContextProps = {
71
71
  config: OryClientConfiguration;
72
72
  };
73
73
 
74
+ // Warning: (ae-forgotten-export) The symbol "OryFlowComponents" needs to be exported by the entry point index.d.ts
75
+ //
76
+ // @public (undocumented)
77
+ export function getOryComponents(overrides?: OryFlowComponentOverrides): OryFlowComponents;
78
+
74
79
  // @public (undocumented)
75
80
  export function Login({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<LoginFlowContextProps>): react_jsx_runtime.JSX.Element;
76
81
 
@@ -81,11 +86,6 @@ export type LoginFlowContextProps = {
81
86
  config: OryClientConfiguration;
82
87
  };
83
88
 
84
- // Warning: (ae-forgotten-export) The symbol "OryFlowComponents" needs to be exported by the entry point index.d.ts
85
- //
86
- // @public (undocumented)
87
- export const OryDefaultComponents: OryFlowComponents;
88
-
89
89
  // @public (undocumented)
90
90
  export function Recovery({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<RecoveryFlowContextProps>): react_jsx_runtime.JSX.Element;
91
91
 
@@ -3634,39 +3634,6 @@
3634
3634
  "parameters": [],
3635
3635
  "name": "useOryFlow"
3636
3636
  },
3637
- {
3638
- "kind": "Function",
3639
- "canonicalReference": "@ory/elements-react!useSession:function(1)",
3640
- "docComment": "/**\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 */\n",
3641
- "excerptTokens": [
3642
- {
3643
- "kind": "Content",
3644
- "text": "useSession: () => "
3645
- },
3646
- {
3647
- "kind": "Content",
3648
- "text": "{\n session: "
3649
- },
3650
- {
3651
- "kind": "Reference",
3652
- "text": "Session",
3653
- "canonicalReference": "@ory/client-fetch!Session:interface"
3654
- },
3655
- {
3656
- "kind": "Content",
3657
- "text": " | undefined;\n error: string | undefined;\n isLoading: boolean;\n}"
3658
- }
3659
- ],
3660
- "fileUrlPath": "dist/index.d.ts",
3661
- "returnTypeTokenRange": {
3662
- "startIndex": 1,
3663
- "endIndex": 4
3664
- },
3665
- "releaseTag": "Public",
3666
- "overloadIndex": 1,
3667
- "parameters": [],
3668
- "name": "useSession"
3669
- },
3670
3637
  {
3671
3638
  "kind": "TypeAlias",
3672
3639
  "canonicalReference": "@ory/elements-react!VerificationFlowContainer:type",
@@ -22,7 +22,6 @@ import { PropsWithChildren } from 'react';
22
22
  import * as react_jsx_runtime from 'react/jsx-runtime';
23
23
  import { RecoveryFlow } from '@ory/client-fetch';
24
24
  import { RegistrationFlow } from '@ory/client-fetch';
25
- import { Session } from '@ory/client-fetch';
26
25
  import { SettingsFlow } from '@ory/client-fetch';
27
26
  import { UiNode } from '@ory/client-fetch';
28
27
  import { UiNodeAnchorAttributes } from '@ory/client-fetch';
@@ -399,13 +398,6 @@ export function useNodeSorter(): (a: UiNode, b: UiNode, ctx: {
399
398
  // @public
400
399
  export function useOryFlow(): FlowContextValue;
401
400
 
402
- // @public
403
- export const useSession: () => {
404
- session: Session | undefined;
405
- error: string | undefined;
406
- isLoading: boolean;
407
- };
408
-
409
401
  // @public
410
402
  export type VerificationFlowContainer = OryFlow<FlowType.Verification, VerificationFlow>;
411
403
 
@@ -0,0 +1,22 @@
1
+ ## API Report File for "@ory/elements-react"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import { Session } from '@ory/client-fetch';
8
+
9
+ // @public
10
+ export const useSession: (config?: {
11
+ sdk: {
12
+ url: string;
13
+ };
14
+ }) => {
15
+ session: Session | undefined;
16
+ error: string | undefined;
17
+ isLoading: boolean;
18
+ };
19
+
20
+ // (No @packageDocumentation comment for this package)
21
+
22
+ ```
@@ -71,6 +71,11 @@ export type ErrorFlowContextProps = {
71
71
  config: OryClientConfiguration;
72
72
  };
73
73
 
74
+ // Warning: (ae-forgotten-export) The symbol "OryFlowComponents" needs to be exported by the entry point index.d.ts
75
+ //
76
+ // @public (undocumented)
77
+ export function getOryComponents(overrides?: OryFlowComponentOverrides): OryFlowComponents;
78
+
74
79
  // @public (undocumented)
75
80
  export function Login({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<LoginFlowContextProps>): react_jsx_runtime.JSX.Element;
76
81
 
@@ -81,11 +86,6 @@ export type LoginFlowContextProps = {
81
86
  config: OryClientConfiguration;
82
87
  };
83
88
 
84
- // Warning: (ae-forgotten-export) The symbol "OryFlowComponents" needs to be exported by the entry point index.d.ts
85
- //
86
- // @public (undocumented)
87
- export const OryDefaultComponents: OryFlowComponents;
88
-
89
89
  // @public (undocumented)
90
90
  export function Recovery({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<RecoveryFlowContextProps>): react_jsx_runtime.JSX.Element;
91
91
 
@@ -22,7 +22,6 @@ import { PropsWithChildren } from 'react';
22
22
  import * as react_jsx_runtime from 'react/jsx-runtime';
23
23
  import { RecoveryFlow } from '@ory/client-fetch';
24
24
  import { RegistrationFlow } from '@ory/client-fetch';
25
- import { Session } from '@ory/client-fetch';
26
25
  import { SettingsFlow } from '@ory/client-fetch';
27
26
  import { UiNode } from '@ory/client-fetch';
28
27
  import { UiNodeAnchorAttributes } from '@ory/client-fetch';
@@ -399,13 +398,6 @@ export function useNodeSorter(): (a: UiNode, b: UiNode, ctx: {
399
398
  // @public
400
399
  export function useOryFlow(): FlowContextValue;
401
400
 
402
- // @public
403
- export const useSession: () => {
404
- session: Session | undefined;
405
- error: string | undefined;
406
- isLoading: boolean;
407
- };
408
-
409
401
  // @public
410
402
  export type VerificationFlowContainer = OryFlow<FlowType.Verification, VerificationFlow>;
411
403