@ory/elements-react 1.0.0-next.23 → 1.0.0-next.24
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/CHANGELOG.md +12 -0
- package/DEVELOPMENT.md +79 -0
- package/LICENSE +201 -0
- package/README.md +103 -44
- package/dist/theme/default/index.css +11 -11
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.js +38 -18
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +29 -9
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +1 -1
- package/tsconfig.test.json +9 -0
- package/.vscode/i18n-ally-reviews.yml +0 -3
- package/.vscode/settings.json +0 -4
- package/api-report/elements-react-client.api.json +0 -356
- package/api-report/elements-react-client.api.md +0 -33
- package/api-report/elements-react-theme.api.json +0 -1468
- package/api-report/elements-react-theme.api.md +0 -149
- package/api-report/elements-react.api.json +0 -3759
- package/api-report/elements-react.api.md +0 -442
- package/api-report/temp/elements-react-client.api.md +0 -33
- package/api-report/temp/elements-react-theme.api.md +0 -149
- package/api-report/temp/elements-react.api.md +0 -442
- package/config/api-extractor-client.json +0 -463
- package/config/api-extractor-core.json +0 -457
- package/config/api-extractor-theme.json +0 -463
- package/jest.config.ts +0 -23
- package/postcss.config.ts +0 -7
- package/tailwind.config.ts +0 -60
- package/tsconfig.spec.json +0 -20
package/package.json
CHANGED
package/.vscode/settings.json
DELETED
|
@@ -1,356 +0,0 @@
|
|
|
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": "TypeAlias",
|
|
177
|
-
"canonicalReference": "@ory/elements-react!SessionContextData:type",
|
|
178
|
-
"docComment": "",
|
|
179
|
-
"excerptTokens": [
|
|
180
|
-
{
|
|
181
|
-
"kind": "Content",
|
|
182
|
-
"text": "type SessionContextData = "
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
"kind": "Content",
|
|
186
|
-
"text": "{\n isLoading: boolean;\n initialized: boolean;\n session: "
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
"kind": "Reference",
|
|
190
|
-
"text": "Session",
|
|
191
|
-
"canonicalReference": "@ory/client-fetch!Session:interface"
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
"kind": "Content",
|
|
195
|
-
"text": " | null;\n error: "
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
"kind": "Reference",
|
|
199
|
-
"text": "Error",
|
|
200
|
-
"canonicalReference": "!Error:interface"
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
"kind": "Content",
|
|
204
|
-
"text": " | undefined;\n refetch: () => "
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
"kind": "Reference",
|
|
208
|
-
"text": "Promise",
|
|
209
|
-
"canonicalReference": "!Promise:interface"
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
"kind": "Content",
|
|
213
|
-
"text": "<void>;\n}"
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
"kind": "Content",
|
|
217
|
-
"text": ";"
|
|
218
|
-
}
|
|
219
|
-
],
|
|
220
|
-
"fileUrlPath": "dist/client/session-provider.d.ts",
|
|
221
|
-
"releaseTag": "Public",
|
|
222
|
-
"name": "SessionContextData",
|
|
223
|
-
"typeTokenRange": {
|
|
224
|
-
"startIndex": 1,
|
|
225
|
-
"endIndex": 8
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
"kind": "Function",
|
|
230
|
-
"canonicalReference": "@ory/elements-react!SessionProvider:function(1)",
|
|
231
|
-
"docComment": "/**\n * A provider that fetches the session from the Ory Network and provides it to the children.\n *\n * To use this provider, wrap your application in it:\n * ```tsx\n * import { SessionProvider } from \"@ory/elements-react\"\n *\n * export default function App() {\n * return (\n * <SessionProvider>\n * <MyApp />\n * </SessionProvider>\n * )\n * }\n * ```\n *\n * If you have a session from the server, you can pass it to the provider:\n * ```tsx\n * <SessionProvider session={serverSession}>\n * ```\n *\n * @param props - The provider props\n *\n * @see\n *\n * {@link useSession}\n */\n",
|
|
232
|
-
"excerptTokens": [
|
|
233
|
-
{
|
|
234
|
-
"kind": "Content",
|
|
235
|
-
"text": "declare function SessionProvider({ "
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
"kind": "Reference",
|
|
239
|
-
"text": "session",
|
|
240
|
-
"canonicalReference": "@ory/elements-react!~__type#session"
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
"kind": "Content",
|
|
244
|
-
"text": ": initialSession, children, baseUrl, }: "
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
"kind": "Reference",
|
|
248
|
-
"text": "SessionProviderProps",
|
|
249
|
-
"canonicalReference": "@ory/elements-react!SessionProviderProps:type"
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
"kind": "Content",
|
|
253
|
-
"text": "): "
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
"kind": "Reference",
|
|
257
|
-
"text": "react_jsx_runtime.JSX.Element",
|
|
258
|
-
"canonicalReference": "@types/react!JSX.Element:interface"
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
"kind": "Content",
|
|
262
|
-
"text": ";"
|
|
263
|
-
}
|
|
264
|
-
],
|
|
265
|
-
"fileUrlPath": "dist/client/session-provider.d.ts",
|
|
266
|
-
"returnTypeTokenRange": {
|
|
267
|
-
"startIndex": 5,
|
|
268
|
-
"endIndex": 6
|
|
269
|
-
},
|
|
270
|
-
"releaseTag": "Public",
|
|
271
|
-
"overloadIndex": 1,
|
|
272
|
-
"parameters": [
|
|
273
|
-
{
|
|
274
|
-
"parameterName": "{ session: initialSession, children, baseUrl, }",
|
|
275
|
-
"parameterTypeTokenRange": {
|
|
276
|
-
"startIndex": 3,
|
|
277
|
-
"endIndex": 4
|
|
278
|
-
},
|
|
279
|
-
"isOptional": false
|
|
280
|
-
}
|
|
281
|
-
],
|
|
282
|
-
"name": "SessionProvider"
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
"kind": "TypeAlias",
|
|
286
|
-
"canonicalReference": "@ory/elements-react!SessionProviderProps:type",
|
|
287
|
-
"docComment": "",
|
|
288
|
-
"excerptTokens": [
|
|
289
|
-
{
|
|
290
|
-
"kind": "Content",
|
|
291
|
-
"text": "type SessionProviderProps = "
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
"kind": "Content",
|
|
295
|
-
"text": "{\n session?: "
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
"kind": "Reference",
|
|
299
|
-
"text": "Session",
|
|
300
|
-
"canonicalReference": "@ory/client-fetch!Session:interface"
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
"kind": "Content",
|
|
304
|
-
"text": " | null;\n baseUrl?: string;\n} & "
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
"kind": "Reference",
|
|
308
|
-
"text": "React.PropsWithChildren",
|
|
309
|
-
"canonicalReference": "@types/react!React.PropsWithChildren:type"
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
"kind": "Content",
|
|
313
|
-
"text": ";"
|
|
314
|
-
}
|
|
315
|
-
],
|
|
316
|
-
"fileUrlPath": "dist/client/session-provider.d.ts",
|
|
317
|
-
"releaseTag": "Public",
|
|
318
|
-
"name": "SessionProviderProps",
|
|
319
|
-
"typeTokenRange": {
|
|
320
|
-
"startIndex": 1,
|
|
321
|
-
"endIndex": 5
|
|
322
|
-
}
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
"kind": "Function",
|
|
326
|
-
"canonicalReference": "@ory/elements-react!useSession:function(1)",
|
|
327
|
-
"docComment": "/**\n * A hook to get the current session from the Ory Network.\n *\n * Usage:\n * ```ts\n * const session = useSession()\n *\n * if (session.state == \"loading\") {\n * return <div>Loading...</div>\n * }\n *\n * if (session.state == \"authenticated\") {\n * return <div>Session: {session.session.id}</div>\n * }\n * ```\n *\n * :::note This is a client-side hook and must be used within a React component. On the server, you can use the getServerSession function from `@ory/nextjs` and hydrate SessionProvider with the session. :::\n *\n * @returns The current session, and error or loading state.\n */\n",
|
|
328
|
-
"excerptTokens": [
|
|
329
|
-
{
|
|
330
|
-
"kind": "Content",
|
|
331
|
-
"text": "declare function useSession(): "
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
"kind": "Reference",
|
|
335
|
-
"text": "SessionContextData",
|
|
336
|
-
"canonicalReference": "@ory/elements-react!SessionContextData:type"
|
|
337
|
-
},
|
|
338
|
-
{
|
|
339
|
-
"kind": "Content",
|
|
340
|
-
"text": ";"
|
|
341
|
-
}
|
|
342
|
-
],
|
|
343
|
-
"fileUrlPath": "dist/client/useSession.d.ts",
|
|
344
|
-
"returnTypeTokenRange": {
|
|
345
|
-
"startIndex": 1,
|
|
346
|
-
"endIndex": 2
|
|
347
|
-
},
|
|
348
|
-
"releaseTag": "Public",
|
|
349
|
-
"overloadIndex": 1,
|
|
350
|
-
"parameters": [],
|
|
351
|
-
"name": "useSession"
|
|
352
|
-
}
|
|
353
|
-
]
|
|
354
|
-
}
|
|
355
|
-
]
|
|
356
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
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 * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
|
-
import { Session } from '@ory/client-fetch';
|
|
9
|
-
|
|
10
|
-
// @public (undocumented)
|
|
11
|
-
export type SessionContextData = {
|
|
12
|
-
isLoading: boolean;
|
|
13
|
-
initialized: boolean;
|
|
14
|
-
session: Session | null;
|
|
15
|
-
error: Error | undefined;
|
|
16
|
-
refetch: () => Promise<void>;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
// @public
|
|
20
|
-
export function SessionProvider({ session: initialSession, children, baseUrl, }: SessionProviderProps): react_jsx_runtime.JSX.Element;
|
|
21
|
-
|
|
22
|
-
// @public (undocumented)
|
|
23
|
-
export type SessionProviderProps = {
|
|
24
|
-
session?: Session | null;
|
|
25
|
-
baseUrl?: string;
|
|
26
|
-
} & React.PropsWithChildren;
|
|
27
|
-
|
|
28
|
-
// @public
|
|
29
|
-
export function useSession(): SessionContextData;
|
|
30
|
-
|
|
31
|
-
// (No @packageDocumentation comment for this package)
|
|
32
|
-
|
|
33
|
-
```
|