@automattic/jetpack-shared-extension-utils 1.4.12 → 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 +10 -0
- package/declarations.d.ts +10 -0
- package/package.json +7 -8
- package/src/components/jetpack-editor-panel-logo/index.jsx +23 -11
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.0] - 2026-02-23
|
|
9
|
+
### Changed
|
|
10
|
+
- Update `JetpackEditorPanelLogo` to respect the `jetpack_show_editor_panel_branding` PHP filter. [#47094]
|
|
11
|
+
|
|
12
|
+
## [1.4.13] - 2026-02-18
|
|
13
|
+
### Changed
|
|
14
|
+
- Set `.repository.url` in `package.json` to the mirror repo rather than the monorepo. [#47149]
|
|
15
|
+
|
|
8
16
|
## [1.4.12] - 2026-02-16
|
|
9
17
|
### Changed
|
|
10
18
|
- Update package dependencies. [#47099]
|
|
@@ -870,6 +878,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
870
878
|
### Changed
|
|
871
879
|
- Core: prepare utility for release
|
|
872
880
|
|
|
881
|
+
[1.5.0]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.4.13...1.5.0
|
|
882
|
+
[1.4.13]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.4.12...1.4.13
|
|
873
883
|
[1.4.12]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.4.11...1.4.12
|
|
874
884
|
[1.4.11]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.4.10...1.4.11
|
|
875
885
|
[1.4.10]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.4.9...1.4.10
|
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": {
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "https://github.com/Automattic/jetpack.git"
|
|
12
|
-
"directory": "projects/js-packages/shared-extension-utils"
|
|
11
|
+
"url": "git+https://github.com/Automattic/jetpack-shared-extension-utils.git"
|
|
13
12
|
},
|
|
14
13
|
"license": "GPL-2.0-or-later",
|
|
15
14
|
"author": "Automattic",
|
|
@@ -31,11 +30,11 @@
|
|
|
31
30
|
},
|
|
32
31
|
"dependencies": {
|
|
33
32
|
"@automattic/color-studio": "4.1.0",
|
|
34
|
-
"@automattic/jetpack-analytics": "^1.0.
|
|
35
|
-
"@automattic/jetpack-base-styles": "^1.0.
|
|
36
|
-
"@automattic/jetpack-components": "^1.4.
|
|
37
|
-
"@automattic/jetpack-connection": "^1.4.
|
|
38
|
-
"@automattic/jetpack-script-data": "^0.5.
|
|
33
|
+
"@automattic/jetpack-analytics": "^1.0.8",
|
|
34
|
+
"@automattic/jetpack-base-styles": "^1.0.17",
|
|
35
|
+
"@automattic/jetpack-components": "^1.4.15",
|
|
36
|
+
"@automattic/jetpack-connection": "^1.4.36",
|
|
37
|
+
"@automattic/jetpack-script-data": "^0.5.5",
|
|
39
38
|
"@types/jest": "30.0.0",
|
|
40
39
|
"@wordpress/api-fetch": "7.39.0",
|
|
41
40
|
"@wordpress/block-editor": "15.12.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;
|