@automattic/jetpack-shared-extension-utils 1.4.13 → 1.5.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
CHANGED
|
@@ -5,6 +5,10 @@ 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.0] - 2026-02-23
|
|
9
|
+
### Changed
|
|
10
|
+
- Update `JetpackEditorPanelLogo` to respect the `jetpack_show_editor_panel_branding` PHP filter. [#47094]
|
|
11
|
+
|
|
8
12
|
## [1.4.13] - 2026-02-18
|
|
9
13
|
### Changed
|
|
10
14
|
- Set `.repository.url` in `package.json` to the mirror repo rather than the monorepo. [#47149]
|
|
@@ -874,6 +878,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
874
878
|
### Changed
|
|
875
879
|
- Core: prepare utility for release
|
|
876
880
|
|
|
881
|
+
[1.5.0]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.4.13...1.5.0
|
|
877
882
|
[1.4.13]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.4.12...1.4.13
|
|
878
883
|
[1.4.12]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.4.11...1.4.12
|
|
879
884
|
[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.
|
|
3
|
+
"version": "1.5.0",
|
|
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": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"@automattic/color-studio": "4.1.0",
|
|
33
33
|
"@automattic/jetpack-analytics": "^1.0.8",
|
|
34
34
|
"@automattic/jetpack-base-styles": "^1.0.17",
|
|
35
|
-
"@automattic/jetpack-components": "^1.4.
|
|
36
|
-
"@automattic/jetpack-connection": "^1.4.
|
|
35
|
+
"@automattic/jetpack-components": "^1.4.15",
|
|
36
|
+
"@automattic/jetpack-connection": "^1.4.36",
|
|
37
37
|
"@automattic/jetpack-script-data": "^0.5.5",
|
|
38
38
|
"@types/jest": "30.0.0",
|
|
39
39
|
"@wordpress/api-fetch": "7.39.0",
|
|
@@ -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
|
-
*
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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;
|