@automattic/jetpack-shared-extension-utils 1.4.10 → 1.4.11

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,13 @@ 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.4.11] - 2026-02-10
9
+ ### Added
10
+ - Shared Extension Utils: Add separate site type utils export. [#46938]
11
+
12
+ ### Removed
13
+ - Removed Chrome AI tokens type and mapping. [#46896]
14
+
8
15
  ## [1.4.10] - 2026-02-04
9
16
  ### Changed
10
17
  - Update dependencies. [#46944]
@@ -859,6 +866,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
859
866
  ### Changed
860
867
  - Core: prepare utility for release
861
868
 
869
+ [1.4.11]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.4.10...1.4.11
862
870
  [1.4.10]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.4.9...1.4.10
863
871
  [1.4.9]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.4.8...1.4.9
864
872
  [1.4.8]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.4.7...1.4.8
@@ -0,0 +1,5 @@
1
+ import type { ConnectionScriptData } from '@automattic/jetpack-connection';
2
+
3
+ interface Window {
4
+ JP_CONNECTION_INITIAL_STATE: ConnectionScriptData;
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-shared-extension-utils",
3
- "version": "1.4.10",
3
+ "version": "1.4.11",
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,6 +20,7 @@
20
20
  },
21
21
  "./components": "./src/components/index.js",
22
22
  "./icons": "./src/icons.js",
23
+ "./site-type-utils": "./src/site-type-utils.js",
23
24
  "./store/wordpress-com": "./src/store/wordpress-com/index.ts",
24
25
  "./store/wordpress-com/types": "./src/store/wordpress-com/types.ts"
25
26
  },
@@ -32,8 +33,8 @@
32
33
  "@automattic/color-studio": "4.1.0",
33
34
  "@automattic/jetpack-analytics": "^1.0.7",
34
35
  "@automattic/jetpack-base-styles": "^1.0.15",
35
- "@automattic/jetpack-components": "^1.4.11",
36
- "@automattic/jetpack-connection": "^1.4.32",
36
+ "@automattic/jetpack-components": "^1.4.12",
37
+ "@automattic/jetpack-connection": "^1.4.33",
37
38
  "@automattic/jetpack-script-data": "^0.5.4",
38
39
  "@types/jest": "30.0.0",
39
40
  "@wordpress/api-fetch": "7.39.0",
@@ -1,5 +1,5 @@
1
1
  import jetpackAnalytics from '@automattic/jetpack-analytics';
2
- import { useConnection } from '@automattic/jetpack-connection';
2
+ import useConnection from '@automattic/jetpack-connection/use-connection';
3
3
  import { useEffect, useState, useCallback } from '@wordpress/element';
4
4
 
5
5
  const { tracks } = jetpackAnalytics;
@@ -49,7 +49,6 @@ export function mapAiFeatureResponseToAiFeatureProps(
49
49
  tierPlansEnabled: !! response[ 'tier-plans-enabled' ],
50
50
  costs: response.costs,
51
51
  featuresControl: response[ 'features-control' ],
52
- chromeAiTokens: response[ 'chrome-ai-tokens' ],
53
52
  };
54
53
  }
55
54
 
@@ -91,10 +91,6 @@ export type FeatureControl = {
91
91
 
92
92
  export type FeaturesControl = { [ key: string ]: FeatureControl };
93
93
 
94
- export type ChromeAiTokens = {
95
- [ key: string ]: string;
96
- };
97
-
98
94
  export type AiFeatureProps = {
99
95
  hasFeature: boolean;
100
96
  isOverLimit: boolean;
@@ -118,7 +114,6 @@ export type AiFeatureProps = {
118
114
  };
119
115
  };
120
116
  featuresControl?: FeaturesControl;
121
- chromeAiTokens?: ChromeAiTokens;
122
117
  };
123
118
 
124
119
  // Type used in the `wordpress-com/plans` store.
@@ -163,5 +158,4 @@ export type SiteAIAssistantFeatureEndpointResponseProps = {
163
158
  };
164
159
  };
165
160
  'features-control'?: FeaturesControl;
166
- 'chrome-ai-tokens'?: ChromeAiTokens;
167
161
  };