@automattic/jetpack-components 1.6.1 → 1.8.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/CHANGELOG.md +21 -0
- package/build/components/admin-page/index.js +6 -12
- package/build/components/admin-page/style.module.scss +0 -1
- package/build/components/admin-page/types.d.ts +0 -12
- package/build/components/jetpack-footer/index.d.ts +8 -0
- package/build/components/jetpack-footer/index.js +26 -59
- package/build/components/jetpack-footer/style.scss +20 -90
- package/build/components/jetpack-footer/types.d.ts +3 -32
- package/build/components/navigator-modal/header.d.ts +9 -1
- package/build/components/navigator-modal/header.js +8 -3
- package/build/components/navigator-modal/screen.d.ts +3 -12
- package/build/components/navigator-modal/screen.js +2 -2
- package/components/admin-page/index.tsx +4 -27
- package/components/admin-page/style.module.scss +0 -1
- package/components/admin-page/types.ts +0 -15
- package/components/jetpack-footer/README.md +23 -10
- package/components/jetpack-footer/index.tsx +78 -117
- package/components/jetpack-footer/style.scss +20 -90
- package/components/jetpack-footer/types.ts +3 -39
- package/components/navigator-modal/header.tsx +23 -3
- package/components/navigator-modal/screen.tsx +45 -47
- package/package.json +13 -11
- package/tools/copy-scss-to-build.mjs +1 -5
- package/build/tools/get-site-admin-url/index.d.ts +0 -8
- package/build/tools/get-site-admin-url/index.js +0 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/jetpack-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Jetpack Components Package",
|
|
5
5
|
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/components/#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@automattic/format-currency": "1.0.1",
|
|
48
|
-
"@automattic/jetpack-api": "^1.0.
|
|
49
|
-
"@automattic/jetpack-boost-score-api": "^1.0.
|
|
48
|
+
"@automattic/jetpack-api": "^1.0.21",
|
|
49
|
+
"@automattic/jetpack-boost-score-api": "^1.0.36",
|
|
50
50
|
"@automattic/jetpack-script-data": "^0.6.1",
|
|
51
|
-
"@automattic/number-formatters": "^1.1.
|
|
51
|
+
"@automattic/number-formatters": "^1.1.4",
|
|
52
52
|
"@babel/runtime": "^7",
|
|
53
53
|
"@wordpress/admin-ui": "1.10.0",
|
|
54
54
|
"@wordpress/browserslist-config": "6.42.0",
|
|
@@ -60,11 +60,13 @@
|
|
|
60
60
|
"@wordpress/i18n": "6.15.0",
|
|
61
61
|
"@wordpress/icons": "12.0.0",
|
|
62
62
|
"@wordpress/notices": "5.42.0",
|
|
63
|
+
"@wordpress/theme": "0.9.0",
|
|
64
|
+
"@wordpress/ui": "0.9.0",
|
|
63
65
|
"clsx": "2.1.1",
|
|
64
66
|
"prop-types": "^15.7.2",
|
|
65
67
|
"qrcode.react": "4.2.0",
|
|
66
68
|
"react-slider": "2.0.5",
|
|
67
|
-
"social-logos": "^3.3.
|
|
69
|
+
"social-logos": "^3.3.12",
|
|
68
70
|
"uplot": "1.6.31",
|
|
69
71
|
"uplot-react": "1.1.4"
|
|
70
72
|
},
|
|
@@ -72,22 +74,22 @@
|
|
|
72
74
|
"@automattic/jetpack-base-styles": "^1.0.20",
|
|
73
75
|
"@babel/core": "7.29.0",
|
|
74
76
|
"@babel/preset-react": "7.28.5",
|
|
75
|
-
"@jest/globals": "30.
|
|
76
|
-
"@storybook/addon-docs": "10.3.
|
|
77
|
-
"@storybook/react": "10.3.
|
|
77
|
+
"@jest/globals": "30.3.0",
|
|
78
|
+
"@storybook/addon-docs": "10.3.3",
|
|
79
|
+
"@storybook/react": "10.3.3",
|
|
78
80
|
"@testing-library/dom": "10.4.1",
|
|
79
|
-
"@testing-library/react": "16.3.
|
|
81
|
+
"@testing-library/react": "16.3.2",
|
|
80
82
|
"@testing-library/user-event": "14.6.1",
|
|
81
83
|
"@types/jest": "30.0.0",
|
|
82
84
|
"@types/react": "18.3.28",
|
|
83
85
|
"@types/react-dom": "18.3.7",
|
|
84
86
|
"@types/react-slider": "1.3.6",
|
|
85
87
|
"@typescript/native-preview": "7.0.0-dev.20260225.1",
|
|
86
|
-
"jest": "30.
|
|
88
|
+
"jest": "30.3.0",
|
|
87
89
|
"react": "18.3.1",
|
|
88
90
|
"react-dom": "18.3.1",
|
|
89
91
|
"require-from-string": "2.0.2",
|
|
90
|
-
"storybook": "10.3.
|
|
92
|
+
"storybook": "10.3.3",
|
|
91
93
|
"ts-dedent": "2.2.0",
|
|
92
94
|
"typescript": "5.9.3",
|
|
93
95
|
"webpack": "5.105.2",
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { fileURLToPath } from 'node:url';
|
|
4
|
-
|
|
5
|
-
const __filename = fileURLToPath( import.meta.url );
|
|
6
|
-
const __dirname = path.dirname( __filename );
|
|
7
3
|
|
|
8
4
|
// `tools/` -> package root.
|
|
9
|
-
const packageRoot = path.resolve(
|
|
5
|
+
const packageRoot = path.resolve( import.meta.dirname, '..' );
|
|
10
6
|
const buildRoot = path.join( packageRoot, 'build' );
|
|
11
7
|
|
|
12
8
|
const IGNORED_DIRS = new Set( [ 'build', 'node_modules', '.git' ] );
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { getScriptData } from '@automattic/jetpack-script-data';
|
|
2
|
-
/**
|
|
3
|
-
* Returns the site admin URL.
|
|
4
|
-
*
|
|
5
|
-
* @deprecated use `getAdminUrl` from `@automattic/jetpack-script-data` instead.
|
|
6
|
-
*
|
|
7
|
-
* @return {?string} The site admin URL or null if not available.
|
|
8
|
-
*/
|
|
9
|
-
export default function getSiteAdminUrl() {
|
|
10
|
-
return (getScriptData()?.site?.admin_url ||
|
|
11
|
-
window.Initial_State?.adminUrl ||
|
|
12
|
-
window.Jetpack_Editor_Initial_State?.adminUrl ||
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- Not using @ts-expect-error because myJetpackInitialState is typed in "my-jetpack" package and that doesn't expect this error
|
|
14
|
-
// @ts-ignore The usage of myJetpackInitialState is not typed inside this generic package. We should get rid of it in the future.
|
|
15
|
-
window?.myJetpackInitialState?.adminUrl ||
|
|
16
|
-
null);
|
|
17
|
-
}
|