@automattic/jetpack-shared-extension-utils 2.0.5 → 2.0.8
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
CHANGED
|
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.0.8] - 2026-07-13
|
|
9
|
+
### Changed
|
|
10
|
+
- Internal updates.
|
|
11
|
+
|
|
12
|
+
## [2.0.7] - 2026-07-09
|
|
13
|
+
### Changed
|
|
14
|
+
- Update package dependencies. [#49272]
|
|
15
|
+
|
|
16
|
+
## [2.0.6] - 2026-07-06
|
|
17
|
+
### Changed
|
|
18
|
+
- Use store objects instead of string IDs. [#49810]
|
|
19
|
+
- Update package dependencies. [#50097] [#50183]
|
|
20
|
+
|
|
8
21
|
## [2.0.5] - 2026-06-26
|
|
9
22
|
### Changed
|
|
10
23
|
- Internal updates.
|
|
@@ -995,6 +1008,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
995
1008
|
### Changed
|
|
996
1009
|
- Core: prepare utility for release
|
|
997
1010
|
|
|
1011
|
+
[2.0.8]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.7...2.0.8
|
|
1012
|
+
[2.0.7]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.6...2.0.7
|
|
1013
|
+
[2.0.6]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.5...2.0.6
|
|
998
1014
|
[2.0.5]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.4...2.0.5
|
|
999
1015
|
[2.0.4]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.3...2.0.4
|
|
1000
1016
|
[2.0.3]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.2...2.0.3
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/jetpack-shared-extension-utils",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "Utility functions used by the block editor extensions",
|
|
5
5
|
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/shared-extension-utils/#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
".": "./index.js",
|
|
17
17
|
"./components": "./src/components/index.js",
|
|
18
18
|
"./components/wpcom-support-link": "./src/components/wpcom-support-link.jsx",
|
|
19
|
-
"./icons": "./src/icons.
|
|
19
|
+
"./icons": "./src/icons.jsx",
|
|
20
20
|
"./site-type-utils": "./src/site-type-utils.js",
|
|
21
21
|
"./store/wordpress-com": "./src/store/wordpress-com/index.ts",
|
|
22
22
|
"./store/wordpress-com/types": "./src/store/wordpress-com/types.ts"
|
|
@@ -29,27 +29,28 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@automattic/color-studio": "4.1.0",
|
|
31
31
|
"@automattic/jetpack-analytics": "^1.0.15",
|
|
32
|
-
"@automattic/jetpack-base-styles": "^1.2.
|
|
33
|
-
"@automattic/jetpack-components": "^1.12.
|
|
34
|
-
"@automattic/jetpack-connection": "^
|
|
35
|
-
"@automattic/jetpack-script-data": "^0.6.
|
|
36
|
-
"@automattic/jetpack-shared-stores": "^0.1.
|
|
32
|
+
"@automattic/jetpack-base-styles": "^1.2.9",
|
|
33
|
+
"@automattic/jetpack-components": "^1.12.16",
|
|
34
|
+
"@automattic/jetpack-connection": "^2.0.1",
|
|
35
|
+
"@automattic/jetpack-script-data": "^0.6.5",
|
|
36
|
+
"@automattic/jetpack-shared-stores": "^0.1.5",
|
|
37
37
|
"@types/jest": "30.0.0",
|
|
38
|
-
"@wordpress/api-fetch": "7.
|
|
39
|
-
"@wordpress/block-editor": "15.
|
|
40
|
-
"@wordpress/components": "
|
|
41
|
-
"@wordpress/compose": "8.
|
|
42
|
-
"@wordpress/data": "10.
|
|
43
|
-
"@wordpress/dom-ready": "4.
|
|
44
|
-
"@wordpress/element": "8.0
|
|
45
|
-
"@wordpress/hooks": "4.
|
|
46
|
-
"@wordpress/i18n": "6.
|
|
47
|
-
"@wordpress/plugins": "7.
|
|
48
|
-
"@wordpress/primitives": "4.
|
|
49
|
-
"@wordpress/ui": "0.
|
|
50
|
-
"@wordpress/url": "4.
|
|
38
|
+
"@wordpress/api-fetch": "7.50.0",
|
|
39
|
+
"@wordpress/block-editor": "15.23.0",
|
|
40
|
+
"@wordpress/components": "36.1.0",
|
|
41
|
+
"@wordpress/compose": "8.3.0",
|
|
42
|
+
"@wordpress/data": "10.50.0",
|
|
43
|
+
"@wordpress/dom-ready": "4.50.0",
|
|
44
|
+
"@wordpress/element": "8.2.0",
|
|
45
|
+
"@wordpress/hooks": "4.50.0",
|
|
46
|
+
"@wordpress/i18n": "6.23.0",
|
|
47
|
+
"@wordpress/plugins": "7.50.0",
|
|
48
|
+
"@wordpress/primitives": "4.50.0",
|
|
49
|
+
"@wordpress/ui": "0.17.0",
|
|
50
|
+
"@wordpress/url": "4.50.0",
|
|
51
51
|
"clsx": "2.1.1",
|
|
52
|
-
"debug": "4.4.3"
|
|
52
|
+
"debug": "4.4.3",
|
|
53
|
+
"social-logos": "^3.3.17"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
56
|
"@automattic/jetpack-webpack-config": "workspace:*",
|
|
@@ -58,6 +59,7 @@
|
|
|
58
59
|
"@testing-library/dom": "10.4.1",
|
|
59
60
|
"@testing-library/react": "16.3.2",
|
|
60
61
|
"@testing-library/user-event": "14.6.1",
|
|
62
|
+
"@types/react": "18.3.28",
|
|
61
63
|
"@typescript/native-preview": "7.0.0-dev.20260225.1",
|
|
62
64
|
"babel-jest": "30.4.1",
|
|
63
65
|
"jest": "30.4.2",
|
|
@@ -10,7 +10,7 @@ import './style.scss';
|
|
|
10
10
|
* Returns null when panel branding is disabled via the
|
|
11
11
|
* `jetpack_show_editor_panel_branding` PHP filter.
|
|
12
12
|
*
|
|
13
|
-
* @return {import('react').
|
|
13
|
+
* @return {import('react').JSX.Element|null} Jetpack logo component or null
|
|
14
14
|
*/
|
|
15
15
|
const JetpackEditorPanelLogo = () => {
|
|
16
16
|
const branding = getScriptData()?.jetpack?.flags?.showJetpackBranding;
|
|
@@ -3,17 +3,22 @@ import { Link } from '@wordpress/ui';
|
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @
|
|
9
|
-
* @
|
|
10
|
-
* @
|
|
11
|
-
* @
|
|
12
|
-
* @param {Function} [props.onClick] - Callback function to be called when the link is clicked.
|
|
13
|
-
* @param {object} [props.style] - CSS properties to be applied to the link.
|
|
14
|
-
* @return {import('react').JSX.Element} The component to render.
|
|
6
|
+
* @typedef {object} WpcomSupportLinkProps
|
|
7
|
+
* @property {string} supportLink - Support link URL.
|
|
8
|
+
* @property {number} supportPostId - Support post ID.
|
|
9
|
+
* @property {import('react').ReactNode} [children] - Support link content.
|
|
10
|
+
* @property {Function} [onClick] - Callback function to be called when the link is clicked.
|
|
11
|
+
* @property {object} [style] - CSS properties to be applied to the link.
|
|
15
12
|
*/
|
|
13
|
+
|
|
16
14
|
export const WpcomSupportLink = forwardRef(
|
|
15
|
+
/**
|
|
16
|
+
* Renders a link that opens a WP.com support article in the Help Center.
|
|
17
|
+
*
|
|
18
|
+
* @param {WpcomSupportLinkProps} props - The component props.
|
|
19
|
+
* @param {import('react').Ref<HTMLAnchorElement>} ref - Forwarded ref.
|
|
20
|
+
* @return {import('react').JSX.Element} The component to render.
|
|
21
|
+
*/
|
|
17
22
|
( { supportLink, supportPostId, children, onClick, style }, ref ) => {
|
|
18
23
|
const helpCenterDispatch = useDispatch( 'automattic/help-center' );
|
|
19
24
|
const setShowSupportDoc = helpCenterDispatch?.setShowSupportDoc;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { store as jetpackModulesStore } from '@automattic/jetpack-shared-stores';
|
|
2
2
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
3
3
|
import { useMemo, useCallback } from '@wordpress/element';
|
|
4
4
|
|
|
@@ -19,7 +19,7 @@ import { useMemo, useCallback } from '@wordpress/element';
|
|
|
19
19
|
const useModuleStatus = name => {
|
|
20
20
|
const { isModuleActive, isChangingStatus, isLoadingModules } = useSelect(
|
|
21
21
|
selectData => {
|
|
22
|
-
const data = selectData(
|
|
22
|
+
const data = selectData( jetpackModulesStore );
|
|
23
23
|
return {
|
|
24
24
|
isModuleActive: data.isModuleActive( name ),
|
|
25
25
|
isChangingStatus: data.isModuleUpdating( name ),
|
|
@@ -29,7 +29,7 @@ const useModuleStatus = name => {
|
|
|
29
29
|
[ name ]
|
|
30
30
|
);
|
|
31
31
|
|
|
32
|
-
const { updateJetpackModuleStatus } = useDispatch(
|
|
32
|
+
const { updateJetpackModuleStatus } = useDispatch( jetpackModulesStore );
|
|
33
33
|
|
|
34
34
|
const changeStatus = useCallback(
|
|
35
35
|
value =>
|
package/src/icons.scss
CHANGED
|
@@ -4,22 +4,22 @@
|
|
|
4
4
|
fill: gb.$gray-700;
|
|
5
5
|
|
|
6
6
|
&.is-facebook {
|
|
7
|
-
fill: var(--color-facebook);
|
|
7
|
+
fill: var(--jetpack-social-logo-color-facebook);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
&.is-twitter {
|
|
11
|
-
fill: var(--color-twitter);
|
|
11
|
+
fill: var(--jetpack-social-logo-color-twitter);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
&.is-linkedin {
|
|
15
|
-
fill: var(--color-linkedin);
|
|
15
|
+
fill: var(--jetpack-social-logo-color-linkedin);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
&.is-tumblr {
|
|
19
|
-
fill: var(--color-tumblr);
|
|
19
|
+
fill: var(--jetpack-social-logo-color-tumblr);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
&.is-google {
|
|
23
|
-
fill: var(--color-
|
|
23
|
+
fill: var(--jetpack-social-logo-color-google-plus);
|
|
24
24
|
}
|
|
25
25
|
}
|