@automattic/jetpack-shared-extension-utils 1.5.21 → 2.0.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,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
+ ## [2.0.0] - 2026-06-15
9
+ ### Removed
10
+ - Remove `react-native` export condition. [#49526]
11
+
12
+ ## [1.5.22] - 2026-06-09
13
+ ### Changed
14
+ - Update package dependencies. [#49273]
15
+
8
16
  ## [1.5.21] - 2026-06-08
9
17
  ### Changed
10
18
  - Update dependencies. [#49431]
@@ -966,6 +974,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
966
974
  ### Changed
967
975
  - Core: prepare utility for release
968
976
 
977
+ [2.0.0]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.5.22...2.0.0
978
+ [1.5.22]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.5.21...1.5.22
969
979
  [1.5.21]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.5.20...1.5.21
970
980
  [1.5.20]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.5.19...1.5.20
971
981
  [1.5.19]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.5.18...1.5.19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-shared-extension-utils",
3
- "version": "1.5.21",
3
+ "version": "2.0.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": {
@@ -13,10 +13,7 @@
13
13
  "license": "GPL-2.0-or-later",
14
14
  "author": "Automattic",
15
15
  "exports": {
16
- ".": {
17
- "react-native": "./index.native.js",
18
- "default": "./index.js"
19
- },
16
+ ".": "./index.js",
20
17
  "./components": "./src/components/index.js",
21
18
  "./components/wpcom-support-link": "./src/components/wpcom-support-link.jsx",
22
19
  "./icons": "./src/icons.js",
@@ -32,24 +29,24 @@
32
29
  "dependencies": {
33
30
  "@automattic/color-studio": "4.1.0",
34
31
  "@automattic/jetpack-analytics": "^1.0.15",
35
- "@automattic/jetpack-base-styles": "^1.2.5",
36
- "@automattic/jetpack-components": "^1.12.5",
37
- "@automattic/jetpack-connection": "^1.4.58",
32
+ "@automattic/jetpack-base-styles": "^1.2.6",
33
+ "@automattic/jetpack-components": "^1.12.7",
34
+ "@automattic/jetpack-connection": "^1.4.60",
38
35
  "@automattic/jetpack-script-data": "^0.6.4",
39
36
  "@types/jest": "30.0.0",
40
- "@wordpress/api-fetch": "7.46.0",
41
- "@wordpress/block-editor": "15.19.0",
42
- "@wordpress/components": "33.1.0",
43
- "@wordpress/compose": "7.46.0",
44
- "@wordpress/data": "10.46.0",
45
- "@wordpress/dom-ready": "4.46.0",
46
- "@wordpress/element": "6.46.0",
47
- "@wordpress/hooks": "4.46.0",
48
- "@wordpress/i18n": "6.19.0",
49
- "@wordpress/plugins": "7.46.0",
50
- "@wordpress/primitives": "4.46.0",
37
+ "@wordpress/api-fetch": "7.48.0",
38
+ "@wordpress/block-editor": "15.21.0",
39
+ "@wordpress/components": "35.0.0",
40
+ "@wordpress/compose": "8.1.0",
41
+ "@wordpress/data": "10.48.0",
42
+ "@wordpress/dom-ready": "4.48.0",
43
+ "@wordpress/element": "8.0.0",
44
+ "@wordpress/hooks": "4.48.0",
45
+ "@wordpress/i18n": "6.21.0",
46
+ "@wordpress/plugins": "7.48.0",
47
+ "@wordpress/primitives": "4.48.0",
51
48
  "@wordpress/ui": "0.13.0",
52
- "@wordpress/url": "4.46.0",
49
+ "@wordpress/url": "4.48.0",
53
50
  "clsx": "2.1.1",
54
51
  "debug": "4.4.3"
55
52
  },
package/index.native.js DELETED
@@ -1,3 +0,0 @@
1
- export * from './index.js';
2
-
3
- export { default as getHostAppNamespace } from './src/get-host-app-namespace';
@@ -1,4 +0,0 @@
1
- // The native mobile editor does not implement or use this module, but importing
2
- // the web module results in critical errors due to web-specific dependencies.
3
- // Thus, we provide a stub module here to avoid those errors.
4
- export default () => null;
@@ -1,34 +0,0 @@
1
- import { SvgXml } from '@wordpress/primitives';
2
-
3
- /**
4
- * Generate an icon as a React component from the SVG markup defined in a block.json metadata file.
5
- * This prevents us from duplicating the markup in various places.
6
- *
7
- * Note: using an `img` tag and passing the SVG markup as a data URI doesn't allow us to
8
- * dynamically set the icon color later on.
9
- *
10
- * @param {object} metadata - Block.json content
11
- * @return {import('react').JSX.Element|string} Icon component
12
- */
13
- export function getBlockIconComponent( metadata ) {
14
- // If the SVG has been passed as a string, use SvgXml to correctly parse it.
15
- if ( typeof metadata.icon === 'string' && metadata.icon.startsWith( '<svg' ) ) {
16
- return <SvgXml xml={ metadata.icon } />;
17
- }
18
- return metadata.icon || '';
19
- }
20
-
21
- /**
22
- * A block icon needs to be redefined on the front end as a React component, since a string - even
23
- * SVG markup - is interpreted as a dashicon. This function returns the object that must be passed
24
- * to the `icon` attribute when registering the block in the front end. It also sets the color
25
- * of the icon.
26
- *
27
- * @param {object} metadata - Block.json content
28
- * @return {object} Icon property for client registration
29
- */
30
- export function getBlockIconProp( metadata ) {
31
- return {
32
- src: getBlockIconComponent( metadata ),
33
- };
34
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { store as blockEditorStore } from '@wordpress/block-editor';
5
- import { select } from '@wordpress/data';
6
-
7
- /**
8
- * Retrieves host app's namespace e.g. "WordPress" or "Jetpack".
9
- *
10
- * @return {string} hostAppNamespace The host app's namespace.
11
- */
12
- export default function getHostAppNamespace() {
13
- return select( blockEditorStore ).getSettings().hostAppNamespace;
14
- }
@@ -1,23 +0,0 @@
1
- .jetpack-gutenberg-social-icon {
2
- fill: $gray-700;
3
-
4
- &.is-facebook {
5
- fill: var(--color-facebook);
6
- }
7
-
8
- &.is-twitter {
9
- fill: var(--color-twitter);
10
- }
11
-
12
- &.is-linkedin {
13
- fill: var(--color-linkedin);
14
- }
15
-
16
- &.is-tumblr {
17
- fill: var(--color-tumblr);
18
- }
19
-
20
- &.is-google {
21
- fill: var(--color-gplus);
22
- }
23
- }