@automattic/jetpack-shared-extension-utils 1.4.13 → 1.5.1

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,14 @@ 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
+ ## [1.5.1] - 2026-02-26
9
+ ### Changed
10
+ - Update package dependencies. [#47300]
11
+
12
+ ## [1.5.0] - 2026-02-23
13
+ ### Changed
14
+ - Update `JetpackEditorPanelLogo` to respect the `jetpack_show_editor_panel_branding` PHP filter. [#47094]
15
+
8
16
  ## [1.4.13] - 2026-02-18
9
17
  ### Changed
10
18
  - Set `.repository.url` in `package.json` to the mirror repo rather than the monorepo. [#47149]
@@ -874,6 +882,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
874
882
  ### Changed
875
883
  - Core: prepare utility for release
876
884
 
885
+ [1.5.1]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.5.0...1.5.1
886
+ [1.5.0]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.4.13...1.5.0
877
887
  [1.4.13]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.4.12...1.4.13
878
888
  [1.4.12]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.4.11...1.4.12
879
889
  [1.4.11]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.4.10...1.4.11
package/declarations.d.ts CHANGED
@@ -3,3 +3,13 @@ import type { ConnectionScriptData } from '@automattic/jetpack-connection';
3
3
  interface Window {
4
4
  JP_CONNECTION_INITIAL_STATE: ConnectionScriptData;
5
5
  }
6
+
7
+ declare module '@automattic/jetpack-script-data' {
8
+ interface JetpackScriptData {
9
+ jetpack?: {
10
+ flags: {
11
+ showJetpackBranding: boolean;
12
+ };
13
+ };
14
+ }
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-shared-extension-utils",
3
- "version": "1.4.13",
3
+ "version": "1.5.1",
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": {
@@ -31,23 +31,23 @@
31
31
  "dependencies": {
32
32
  "@automattic/color-studio": "4.1.0",
33
33
  "@automattic/jetpack-analytics": "^1.0.8",
34
- "@automattic/jetpack-base-styles": "^1.0.17",
35
- "@automattic/jetpack-components": "^1.4.14",
36
- "@automattic/jetpack-connection": "^1.4.35",
37
- "@automattic/jetpack-script-data": "^0.5.5",
34
+ "@automattic/jetpack-base-styles": "^1.0.18",
35
+ "@automattic/jetpack-components": "^1.4.16",
36
+ "@automattic/jetpack-connection": "^1.4.37",
37
+ "@automattic/jetpack-script-data": "^0.6.0",
38
38
  "@types/jest": "30.0.0",
39
- "@wordpress/api-fetch": "7.39.0",
40
- "@wordpress/block-editor": "15.12.0",
41
- "@wordpress/components": "32.1.0",
42
- "@wordpress/compose": "7.39.0",
43
- "@wordpress/data": "10.39.0",
44
- "@wordpress/dom-ready": "4.39.0",
45
- "@wordpress/element": "6.39.0",
46
- "@wordpress/hooks": "4.39.0",
47
- "@wordpress/i18n": "6.12.0",
48
- "@wordpress/plugins": "7.39.0",
49
- "@wordpress/primitives": "4.39.0",
50
- "@wordpress/url": "4.39.0",
39
+ "@wordpress/api-fetch": "7.40.0",
40
+ "@wordpress/block-editor": "15.13.1",
41
+ "@wordpress/components": "32.2.0",
42
+ "@wordpress/compose": "7.40.0",
43
+ "@wordpress/data": "10.40.0",
44
+ "@wordpress/dom-ready": "4.40.0",
45
+ "@wordpress/element": "6.40.0",
46
+ "@wordpress/hooks": "4.40.0",
47
+ "@wordpress/i18n": "6.13.0",
48
+ "@wordpress/plugins": "7.40.0",
49
+ "@wordpress/primitives": "4.40.0",
50
+ "@wordpress/url": "4.40.0",
51
51
  "clsx": "2.1.1",
52
52
  "debug": "4.4.3"
53
53
  },
@@ -1,21 +1,33 @@
1
1
  import { JetpackLogo } from '@automattic/jetpack-components';
2
+ import { getScriptData } from '@automattic/jetpack-script-data';
2
3
  import { __ } from '@wordpress/i18n';
3
4
 
4
5
  import './style.scss';
5
6
 
6
7
  /**
7
- * The Jetpack logo used for block editor panels
8
+ * The Jetpack logo used for block editor panels.
8
9
  *
9
- * @return {import('react').Component} Jetpack logo component
10
+ * Returns null when panel branding is disabled via the
11
+ * `jetpack_show_editor_panel_branding` PHP filter.
12
+ *
13
+ * @return {import('react').Component|null} Jetpack logo component or null
10
14
  */
11
- const JetpackEditorPanelLogo = () => (
12
- <JetpackLogo
13
- className="jetpack-editor-panel-logo"
14
- height={ 16 }
15
- logoColor="#1E1E1E"
16
- showText={ false }
17
- title={ __( 'This feature is powered by Jetpack', 'jetpack-shared-extension-utils' ) }
18
- />
19
- );
15
+ const JetpackEditorPanelLogo = () => {
16
+ const branding = getScriptData()?.jetpack?.flags?.showJetpackBranding;
17
+ // undefined means the key isn't present (older PHP), so default to showing branding.
18
+ if ( branding !== undefined && ! branding ) {
19
+ return null;
20
+ }
21
+
22
+ return (
23
+ <JetpackLogo
24
+ className="jetpack-editor-panel-logo"
25
+ height={ 16 }
26
+ logoColor="#1E1E1E"
27
+ showText={ false }
28
+ title={ __( 'This feature is powered by Jetpack', 'jetpack-shared-extension-utils' ) }
29
+ />
30
+ );
31
+ };
20
32
 
21
33
  export default JetpackEditorPanelLogo;