@automattic/jetpack-shared-extension-utils 2.0.4 → 2.0.6

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,15 @@ 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.6] - 2026-07-06
9
+ ### Changed
10
+ - Use store objects instead of string IDs. [#49810]
11
+ - Update package dependencies. [#50097] [#50183]
12
+
13
+ ## [2.0.5] - 2026-06-26
14
+ ### Changed
15
+ - Internal updates.
16
+
8
17
  ## [2.0.4] - 2026-06-25
9
18
  ### Changed
10
19
  - Update dependencies. [#49431]
@@ -991,6 +1000,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
991
1000
  ### Changed
992
1001
  - Core: prepare utility for release
993
1002
 
1003
+ [2.0.6]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.5...2.0.6
1004
+ [2.0.5]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.4...2.0.5
994
1005
  [2.0.4]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.3...2.0.4
995
1006
  [2.0.3]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.2...2.0.3
996
1007
  [2.0.2]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.1...2.0.2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-shared-extension-utils",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
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": {
@@ -29,37 +29,36 @@
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.7",
33
- "@automattic/jetpack-components": "^1.12.12",
34
- "@automattic/jetpack-connection": "^1.4.65",
35
- "@automattic/jetpack-script-data": "^0.6.4",
36
- "@automattic/jetpack-shared-stores": "^0.1.1",
32
+ "@automattic/jetpack-base-styles": "^1.2.8",
33
+ "@automattic/jetpack-components": "^1.12.14",
34
+ "@automattic/jetpack-connection": "^1.5.0",
35
+ "@automattic/jetpack-script-data": "^0.6.5",
36
+ "@automattic/jetpack-shared-stores": "^0.1.3",
37
37
  "@types/jest": "30.0.0",
38
- "@wordpress/api-fetch": "7.48.1",
39
- "@wordpress/block-editor": "15.21.1",
40
- "@wordpress/components": "35.0.1",
41
- "@wordpress/compose": "8.1.1",
42
- "@wordpress/data": "10.48.1",
43
- "@wordpress/dom-ready": "4.48.1",
44
- "@wordpress/element": "8.0.1",
45
- "@wordpress/hooks": "4.48.1",
46
- "@wordpress/i18n": "6.21.1",
47
- "@wordpress/plugins": "7.48.1",
48
- "@wordpress/primitives": "4.48.1",
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
49
  "@wordpress/ui": "0.13.0",
50
- "@wordpress/url": "4.48.1",
50
+ "@wordpress/url": "4.50.0",
51
51
  "clsx": "2.1.1",
52
52
  "debug": "4.4.3"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@automattic/jetpack-webpack-config": "workspace:*",
56
56
  "@babel/core": "7.29.7",
57
- "@babel/plugin-transform-react-jsx": "7.29.7",
58
- "@babel/preset-react": "7.29.7",
59
57
  "@babel/runtime": "7.29.7",
60
58
  "@testing-library/dom": "10.4.1",
61
59
  "@testing-library/react": "16.3.2",
62
60
  "@testing-library/user-event": "14.6.1",
61
+ "@types/react": "18.3.28",
63
62
  "@typescript/native-preview": "7.0.0-dev.20260225.1",
64
63
  "babel-jest": "30.4.1",
65
64
  "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').Component|null} Jetpack logo component or null
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
- * Renders a link that opens a WP.com support article in the Help Center.
7
- *
8
- * @param {object} props - The component props.
9
- * @param {string} props.supportLink - Support link URL.
10
- * @param {number} props.supportPostId - Support post ID.
11
- * @param {import('react').Component} props.children - Support link content.
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 { JETPACK_MODULES_STORE_ID } from '@automattic/jetpack-shared-stores';
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( JETPACK_MODULES_STORE_ID );
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( JETPACK_MODULES_STORE_ID );
32
+ const { updateJetpackModuleStatus } = useDispatch( jetpackModulesStore );
33
33
 
34
34
  const changeStatus = useCallback(
35
35
  value =>