@automattic/jetpack-shared-extension-utils 1.3.3 → 1.3.5

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.3.5] - 2025-07-21
9
+ ### Changed
10
+ - Update package dependencies. [#44356]
11
+
12
+ ## [1.3.4] - 2025-07-14
13
+ ### Removed
14
+ - Remove no-longer-needed dependency on `lodash`. [#44269]
15
+
8
16
  ## [1.3.3] - 2025-07-10
9
17
  ### Changed
10
18
  - Internal updates.
@@ -715,6 +723,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
715
723
  ### Changed
716
724
  - Core: prepare utility for release
717
725
 
726
+ [1.3.5]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.3.4...1.3.5
727
+ [1.3.4]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.3.3...1.3.4
718
728
  [1.3.3]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.3.2...1.3.3
719
729
  [1.3.2]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.3.1...1.3.2
720
730
  [1.3.1]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.3.0...1.3.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-shared-extension-utils",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
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": {
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@automattic/color-studio": "4.1.0",
22
22
  "@automattic/jetpack-analytics": "^1.0.3",
23
- "@automattic/jetpack-base-styles": "^1.0.4",
24
- "@automattic/jetpack-components": "^1.1.13",
25
- "@automattic/jetpack-connection": "^1.2.13",
23
+ "@automattic/jetpack-base-styles": "^1.0.5",
24
+ "@automattic/jetpack-components": "^1.1.14",
25
+ "@automattic/jetpack-connection": "^1.2.14",
26
26
  "@automattic/jetpack-script-data": "^0.5.0",
27
27
  "@wordpress/api-fetch": "7.26.0",
28
28
  "@wordpress/block-editor": "14.21.0",
@@ -37,12 +37,11 @@
37
37
  "@wordpress/primitives": "4.26.0",
38
38
  "@wordpress/url": "4.26.0",
39
39
  "clsx": "2.1.1",
40
- "debug": "4.4.1",
41
- "lodash": "4.17.21"
40
+ "debug": "4.4.1"
42
41
  },
43
42
  "devDependencies": {
44
43
  "@automattic/jetpack-webpack-config": "workspace:*",
45
- "@babel/core": "7.27.7",
44
+ "@babel/core": "7.28.0",
46
45
  "@babel/plugin-transform-react-jsx": "7.27.1",
47
46
  "@babel/preset-react": "7.27.1",
48
47
  "@babel/runtime": "7.27.6",
@@ -8,32 +8,39 @@
8
8
  background: studio.$studio-black;
9
9
  padding: 0 20px;
10
10
  border-radius: 2px;
11
- box-shadow: 0 0 1px inset studio.$studio-white; }
11
+ box-shadow: 0 0 1px inset studio.$studio-white;
12
+ }
12
13
 
13
- .jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .banner-title,
14
- .jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .banner-description {
15
- color: studio.$studio-white; }
14
+ .jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .banner-title,
15
+ .jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .banner-description {
16
+ color: studio.$studio-white;
17
+ }
16
18
 
17
- .jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .jetpack-upgrade-plan-banner__title,
18
- .jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .jetpack-upgrade-plan-banner__description {
19
- margin-right: 10px; }
19
+ .jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .jetpack-upgrade-plan-banner__title,
20
+ .jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .jetpack-upgrade-plan-banner__description {
21
+ margin-right: 10px;
22
+ }
20
23
 
21
- .jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .components-button {
22
- flex-shrink: 0;
23
- line-height: 1;
24
- margin-left: auto;
25
- height: 28px; }
24
+ .jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .components-button {
25
+ flex-shrink: 0;
26
+ line-height: 1;
27
+ margin-left: auto;
28
+ height: 28px;
29
+ }
26
30
 
27
- .jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .components-button.is-primary {
28
- background: studio.$studio-pink-40;
29
- color: studio.$studio-white; }
31
+ .jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .components-button.is-primary {
32
+ background: studio.$studio-pink-40;
33
+ color: studio.$studio-white;
34
+ }
30
35
 
31
- .jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .components-button.is-primary:hover {
32
- background: studio.$studio-pink-30; }
36
+ .jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .components-button.is-primary:hover {
37
+ background: studio.$studio-pink-30;
38
+ }
33
39
 
34
- .jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .components-button.is-primary.is-busy {
35
- background-size: 100px 100%;
36
- background-image: linear-gradient(-45deg, studio.$studio-pink-40 28%, studio.$studio-pink-60 28%, studio.$studio-pink-60 72%, studio.$studio-pink-40 72%); }
40
+ .jetpack-upgrade-plan-banner .jetpack-upgrade-plan-banner__wrapper .components-button.is-primary.is-busy {
41
+ background-size: 100px 100%;
42
+ background-image: linear-gradient(-45deg, studio.$studio-pink-40 28%, studio.$studio-pink-60 28%, studio.$studio-pink-60 72%, studio.$studio-pink-40 72%);
43
+ }
37
44
 
38
45
  .jetpack-upgrade-plan-banner.block-editor-block-list__block {
39
46
  margin-top: 0;
@@ -2,22 +2,22 @@
2
2
  fill: $gray-700;
3
3
 
4
4
  &.is-facebook {
5
- fill: var( --color-facebook );
5
+ fill: var(--color-facebook);
6
6
  }
7
7
 
8
8
  &.is-twitter {
9
- fill: var( --color-twitter );
9
+ fill: var(--color-twitter);
10
10
  }
11
11
 
12
12
  &.is-linkedin {
13
- fill: var( --color-linkedin );
13
+ fill: var(--color-linkedin);
14
14
  }
15
15
 
16
16
  &.is-tumblr {
17
- fill: var( --color-tumblr );
17
+ fill: var(--color-tumblr);
18
18
  }
19
19
 
20
20
  &.is-google {
21
- fill: var( --color-gplus );
21
+ fill: var(--color-gplus);
22
22
  }
23
23
  }
package/src/icons.scss CHANGED
@@ -4,22 +4,22 @@
4
4
  fill: gb.$gray-700;
5
5
 
6
6
  &.is-facebook {
7
- fill: var( --color-facebook );
7
+ fill: var(--color-facebook);
8
8
  }
9
9
 
10
10
  &.is-twitter {
11
- fill: var( --color-twitter );
11
+ fill: var(--color-twitter);
12
12
  }
13
13
 
14
14
  &.is-linkedin {
15
- fill: var( --color-linkedin );
15
+ fill: var(--color-linkedin);
16
16
  }
17
17
 
18
18
  &.is-tumblr {
19
- fill: var( --color-tumblr );
19
+ fill: var(--color-tumblr);
20
20
  }
21
21
 
22
22
  &.is-google {
23
- fill: var( --color-gplus );
23
+ fill: var(--color-gplus);
24
24
  }
25
25
  }
package/src/plan-utils.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import { isWoASite, isSimpleSite } from '@automattic/jetpack-script-data';
2
2
  import { __ } from '@wordpress/i18n';
3
3
  import { addQueryArgs } from '@wordpress/url';
4
- import { get } from 'lodash';
5
4
  import getJetpackData from './get-jetpack-data';
6
5
  import getJetpackExtensionAvailability from './get-jetpack-extension-availability';
7
6
  import getSiteFragment from './get-site-fragment';
@@ -19,7 +18,7 @@ import getSiteFragment from './get-site-fragment';
19
18
  */
20
19
  export function getUpgradeUrl( { planSlug, plan, postId, postType } ) {
21
20
  // WP.com plan objects have a dedicated `path_slug` field, Jetpack plan objects don't.
22
- const planPathSlug = planSlug.startsWith( 'jetpack_' ) ? planSlug : get( plan, [ 'path_slug' ] );
21
+ const planPathSlug = planSlug.startsWith( 'jetpack_' ) ? planSlug : plan?.path_slug;
23
22
 
24
23
  // The full site editor has no set post type.
25
24
  const redirect_to = (
@@ -158,7 +157,7 @@ const usableBlockWithFreePlan = [
158
157
  * @return {boolean} True if the Upgrade Nudge is enable. Otherwise, False.
159
158
  */
160
159
  export function isUpgradeNudgeEnabled() {
161
- return get( getJetpackData(), 'jetpack.enable_upgrade_nudge', false );
160
+ return getJetpackData()?.jetpack?.enable_upgrade_nudge ?? false;
162
161
  }
163
162
 
164
163
  /*
@@ -1,7 +1,7 @@
1
1
  .block-editor-block-list__layout
2
- // Override core styles inherited from `.has-warning`:
3
- // we do want blocks with upgrade nudge warning to be interactive
4
- .block-editor-block-list__block.has-warning.is-interactive {
2
+ // Override core styles inherited from `.has-warning`:
3
+ // we do want blocks with upgrade nudge warning to be interactive
4
+ .block-editor-block-list__block.has-warning.is-interactive {
5
5
 
6
6
  > * {
7
7
  pointer-events: auto;
@@ -11,4 +11,4 @@
11
11
  &::after {
12
12
  content: none;
13
13
  }
14
- }
14
+ }