@gopherium/react-auth 0.14.0 → 0.15.0
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 +2 -2
- package/dist/wpds/index.d.ts +1 -1
- package/dist/wpds/index.js +1 -1
- package/dist/wpds/nav.d.ts +2 -5
- package/dist/wpds/nav.js +4 -8
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Session authentication for React apps backed by gouncer's authkit.
|
|
|
10
10
|
- `@gopherium/react-auth/admin` is the user administration API client.
|
|
11
11
|
- `@gopherium/react-auth/wpds` renders the WordPress Design System UI:
|
|
12
12
|
`LoginScreen` (brand prop), `AccountPanel`, `UsersScreen`,
|
|
13
|
-
`NewUserScreen`, `
|
|
13
|
+
`NewUserScreen`, `usersMenuItem`, `SetupCodeStep`, which asks for
|
|
14
14
|
the one-time setup code as Jenkins' "Unlock Jenkins" does, and
|
|
15
15
|
`SetupAccountStep`, the account rows of WordPress's installer with
|
|
16
16
|
its password strength meter. Import
|
|
@@ -71,7 +71,7 @@ with a `Field.VisualLabel`, as the step's Confirm Password row is.
|
|
|
71
71
|
- The client calls same-origin `/api/auth/*` and `/api/users` paths. In
|
|
72
72
|
development, proxy `/api` to your backend so the `__Host-` session
|
|
73
73
|
cookie is first-party.
|
|
74
|
-
- `/wpds` needs the `@wordpress/ui`
|
|
74
|
+
- `/wpds` needs the `@wordpress/ui` and `@wordpress/icons` peers.
|
|
75
75
|
- The account step loads zxcvbn, about 400 kB gzipped, as its own chunk
|
|
76
76
|
the first time it renders. Vite reports that chunk as larger than
|
|
77
77
|
500 kB.
|
package/dist/wpds/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { AccountPanel } from './AccountPanel.js';
|
|
2
2
|
export { LoginScreen } from './LoginScreen.js';
|
|
3
|
-
export {
|
|
3
|
+
export { usersMenuItem } from './nav.js';
|
|
4
4
|
export { NewUserScreen } from './NewUserScreen.js';
|
|
5
5
|
export { RequestResetScreen } from './RequestResetScreen.js';
|
|
6
6
|
export { ResetPasswordScreen } from './ResetPasswordScreen.js';
|
package/dist/wpds/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
export { AccountPanel } from './AccountPanel.js';
|
|
3
3
|
export { LoginScreen } from './LoginScreen.js';
|
|
4
|
-
export {
|
|
4
|
+
export { usersMenuItem } from './nav.js';
|
|
5
5
|
export { NewUserScreen } from './NewUserScreen.js';
|
|
6
6
|
export { RequestResetScreen } from './RequestResetScreen.js';
|
|
7
7
|
export { ResetPasswordScreen } from './ResetPasswordScreen.js';
|
package/dist/wpds/nav.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { ComponentProps, ReactElement } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
* administration screen.
|
|
5
|
-
*/
|
|
6
|
-
export declare const usersNavItem: {
|
|
2
|
+
/** The ready-made menu row for the user administration screen. */
|
|
3
|
+
export declare const usersMenuItem: {
|
|
7
4
|
label: string;
|
|
8
5
|
to: string;
|
|
9
6
|
icon: ReactElement<ComponentProps<'svg'>>;
|
package/dist/wpds/nav.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
2
|
import { _x } from '@wordpress/i18n';
|
|
3
|
+
import { people } from '@wordpress/icons';
|
|
4
4
|
import { DOMAIN } from '../domain.js';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* usersNavItem is the ready-made navigation entry for the user
|
|
8
|
-
* administration screen.
|
|
9
|
-
*/
|
|
10
|
-
export const usersNavItem = {
|
|
5
|
+
/** The ready-made menu row for the user administration screen. */
|
|
6
|
+
export const usersMenuItem = {
|
|
11
7
|
get label() {
|
|
12
8
|
return _x('Users', 'admin section', DOMAIN);
|
|
13
9
|
},
|
|
14
10
|
to: '/users',
|
|
15
|
-
icon:
|
|
11
|
+
icon: people,
|
|
16
12
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gopherium/react-auth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Session authentication for React apps backed by gouncer's authkit.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"@testing-library/jest-dom": "^6.9.1 || ^7.0.0",
|
|
53
53
|
"@testing-library/react": "^16.3.2",
|
|
54
54
|
"@wordpress/i18n": ">=6.30.0 <7.0.0",
|
|
55
|
+
"@wordpress/icons": ">=18.0.0 <19.0.0",
|
|
55
56
|
"@wordpress/theme": ">=2.3.0 <3.0.0",
|
|
56
57
|
"@wordpress/ui": ">=0.24.0 <0.25.0",
|
|
57
58
|
"msw": "^2.15.0",
|
|
@@ -65,6 +66,9 @@
|
|
|
65
66
|
"@testing-library/react": {
|
|
66
67
|
"optional": true
|
|
67
68
|
},
|
|
69
|
+
"@wordpress/icons": {
|
|
70
|
+
"optional": true
|
|
71
|
+
},
|
|
68
72
|
"@wordpress/theme": {
|
|
69
73
|
"optional": true
|
|
70
74
|
},
|
|
@@ -89,6 +93,7 @@
|
|
|
89
93
|
"@vitejs/plugin-react": "^6.0.3",
|
|
90
94
|
"@vitest/coverage-v8": "^5.0.3",
|
|
91
95
|
"@wordpress/i18n": "6.30.0",
|
|
96
|
+
"@wordpress/icons": "18.0.0",
|
|
92
97
|
"@wordpress/theme": "2.3.0",
|
|
93
98
|
"@wordpress/ui": "0.24.0",
|
|
94
99
|
"eslint": "^9.39.1",
|