@automattic/jetpack-components 1.1.16 → 1.1.18

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
@@ -2,6 +2,17 @@
2
2
 
3
3
  ### This is a list detailing changes for the Jetpack RNA Components package releases.
4
4
 
5
+ ## [1.1.18] - 2025-08-11
6
+ ### Changed
7
+ - Update package dependencies. [#44677]
8
+
9
+ ### Fixed
10
+ - I18n: Improve context hints in comments for translators. [#44686]
11
+
12
+ ## [1.1.17] - 2025-08-04
13
+ ### Changed
14
+ - Internal updates.
15
+
5
16
  ## [1.1.16] - 2025-07-30
6
17
  ### Changed
7
18
  - Internal updates.
@@ -1489,6 +1500,8 @@
1489
1500
  ### Changed
1490
1501
  - Update node version requirement to 14.16.1
1491
1502
 
1503
+ [1.1.18]: https://github.com/Automattic/jetpack-components/compare/1.1.17...1.1.18
1504
+ [1.1.17]: https://github.com/Automattic/jetpack-components/compare/1.1.16...1.1.17
1492
1505
  [1.1.16]: https://github.com/Automattic/jetpack-components/compare/1.1.15...1.1.16
1493
1506
  [1.1.15]: https://github.com/Automattic/jetpack-components/compare/1.1.14...1.1.15
1494
1507
  [1.1.14]: https://github.com/Automattic/jetpack-components/compare/1.1.13...1.1.14
@@ -33,7 +33,7 @@ const AdminPage = ({ children, className, moduleName = __('Jetpack', 'jetpack-co
33
33
  catch (error) {
34
34
  // eslint-disable-next-line no-alert
35
35
  window.alert(sprintf(
36
- /* translators: placeholder is an error message. */
36
+ /* translators: %s: an error message. */
37
37
  __('There was an error testing Jetpack. Error: %s', 'jetpack-components'), error.message));
38
38
  }
39
39
  }, []);
@@ -26,7 +26,7 @@ const PricingCard = ({ currencyCode = 'USD', priceDetails = __('/month, paid yea
26
26
  const currencyObjectBefore = getCurrencyObject(props.priceBefore, currencyCode);
27
27
  const currencyObjectAfter = getCurrencyObject(props.priceAfter, currencyCode);
28
28
  return (_jsxs("div", { className: "jp-components__pricing-card", children: [props.icon && (_jsx("div", { className: "jp-components__pricing-card__icon", children: 'string' === typeof props.icon ? (_jsx("img", { src: props.icon, alt: sprintf(
29
- /* translators: placeholder is a product name */
29
+ /* translators: %s: the product name */
30
30
  __('Icon for the product %s', 'jetpack-components'), props.title) })) : (props.icon) })), _jsx("h1", { className: "jp-components__pricing-card__title", children: props.title }), _jsxs("div", { className: "jp-components__pricing-card__pricing", children: [props.priceAfter === 0 && _jsx(LoadingPlaceholder, { width: "100%", height: 48 }), props.priceBefore !== props.priceAfter && props.priceAfter > 0 && (_jsxs("div", { className: "jp-components__pricing-card__price-before", children: [_jsx("span", { className: "jp-components__pricing-card__currency", children: currencyObjectBefore.symbol }), _jsx("span", { className: "jp-components__pricing-card__price", children: currencyObjectBefore.integer }), showPriceDecimals(currencyObjectBefore) && (_jsxs("span", { className: "jp-components__pricing-card__price-decimal", children: [' ', currencyObjectBefore.fraction] })), _jsx("div", { className: "jp-components__pricing-card__price-strikethrough" })] })), props.priceAfter > 0 && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "jp-components__pricing-card__price-after", children: [_jsx("span", { className: "jp-components__pricing-card__currency", children: currencyObjectAfter.symbol }), _jsx("span", { className: "jp-components__pricing-card__price", children: currencyObjectAfter.integer }), showPriceDecimals(currencyObjectAfter) && (_jsx("span", { className: "jp-components__pricing-card__price-decimal", children: currencyObjectAfter.fraction }))] }), _jsx("span", { className: "jp-components__pricing-card__price-details", children: priceDetails })] }))] }), props.children && (_jsx("div", { className: "jp-components__pricing-card__extra-content-wrapper", children: props.children })), props.tosText && _jsx("div", { className: "jp-components__pricing-card__tos", children: props.tosText }), props.ctaText && (_jsxs(_Fragment, { children: [!props.tosText && (_jsx("div", { className: "jp-components__pricing-card__tos", children: _jsx(TermsOfService, { agreeButtonLabel: props.ctaText }) })), _jsx("div", { className: "jp-components__pricing-card__cta", children: _jsx(Button, { className: "jp-components__pricing-card__button", label: props.ctaText, onClick: props.onCtaClick, children: props.ctaText }) })] })), props.infoText && (_jsx("div", { className: "jp-components__pricing-card__info", children: props.infoText }))] }));
31
31
  };
32
32
  export default PricingCard;
@@ -16,7 +16,7 @@ const getItemLabels = (isComingSoon, isIncluded, featureNameLabel) => {
16
16
  if (isComingSoon) {
17
17
  return {
18
18
  lg: COMING_SOON_TEXT,
19
- // translators: Name of the current feature
19
+ // translators: %s: Name of the current feature
20
20
  default: sprintf(__('%s coming soon', 'jetpack-components'), featureNameLabel),
21
21
  };
22
22
  }
@@ -25,7 +25,7 @@ const getItemLabels = (isComingSoon, isIncluded, featureNameLabel) => {
25
25
  default: isIncluded
26
26
  ? featureNameLabel
27
27
  : sprintf(
28
- /* translators: Name of the current feature */
28
+ /* translators: %s: Name of the current feature */
29
29
  __('%s not included', 'jetpack-components'), featureNameLabel),
30
30
  };
31
31
  };
@@ -20,7 +20,7 @@ const ProductOffer = ({ addProductUrl, buttonDisclaimer, buttonText = '', classN
20
20
  const { isFree, price, currency, offPrice } = pricing;
21
21
  const needsPurchase = !isFree && !hasRequiredPlan;
22
22
  const defautlButtonText = sprintf(
23
- /* translators: placeholder is product name. */
23
+ /* translators: %s: the product name. */
24
24
  __('Add %s', 'jetpack-components'), title);
25
25
  return (_jsxs("div", { className: clsx(styles.wrapper, className, {
26
26
  [styles['is-bundle-card']]: isBundle,
@@ -52,7 +52,7 @@ const AdminPage: FC< AdminPageProps > = ( {
52
52
  // eslint-disable-next-line no-alert
53
53
  window.alert(
54
54
  sprintf(
55
- /* translators: placeholder is an error message. */
55
+ /* translators: %s: an error message. */
56
56
  __( 'There was an error testing Jetpack. Error: %s', 'jetpack-components' ),
57
57
  error.message
58
58
  )
@@ -43,7 +43,7 @@ const PricingCard: FC< PricingCardProps > = ( {
43
43
  <img
44
44
  src={ props.icon }
45
45
  alt={ sprintf(
46
- /* translators: placeholder is a product name */
46
+ /* translators: %s: the product name */
47
47
  __( 'Icon for the product %s', 'jetpack-components' ),
48
48
  props.title
49
49
  ) }
@@ -33,7 +33,7 @@ const getItemLabels = ( isComingSoon, isIncluded, featureNameLabel ) => {
33
33
  if ( isComingSoon ) {
34
34
  return {
35
35
  lg: COMING_SOON_TEXT,
36
- // translators: Name of the current feature
36
+ // translators: %s: Name of the current feature
37
37
  default: sprintf( __( '%s coming soon', 'jetpack-components' ), featureNameLabel ),
38
38
  };
39
39
  }
@@ -43,7 +43,7 @@ const getItemLabels = ( isComingSoon, isIncluded, featureNameLabel ) => {
43
43
  default: isIncluded
44
44
  ? featureNameLabel
45
45
  : sprintf(
46
- /* translators: Name of the current feature */
46
+ /* translators: %s: Name of the current feature */
47
47
  __( '%s not included', 'jetpack-components' ),
48
48
  featureNameLabel
49
49
  ),
@@ -42,7 +42,7 @@ const ProductOffer: FC< ProductOfferProps > = ( {
42
42
  const needsPurchase = ! isFree && ! hasRequiredPlan;
43
43
 
44
44
  const defautlButtonText = sprintf(
45
- /* translators: placeholder is product name. */
45
+ /* translators: %s: the product name. */
46
46
  __( 'Add %s', 'jetpack-components' ),
47
47
  title
48
48
  );
package/package.json CHANGED
@@ -1,44 +1,70 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-components",
3
- "version": "1.1.16",
3
+ "version": "1.1.18",
4
4
  "description": "Jetpack Components Package",
5
- "author": "Automattic",
6
- "license": "GPL-2.0-or-later",
7
5
  "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/components/#readme",
6
+ "bugs": {
7
+ "url": "https://github.com/Automattic/jetpack/labels/[JS Package] Components"
8
+ },
8
9
  "repository": {
9
10
  "type": "git",
10
11
  "url": "https://github.com/Automattic/jetpack.git",
11
12
  "directory": "projects/js-packages/components"
12
13
  },
13
- "bugs": {
14
- "url": "https://github.com/Automattic/jetpack/labels/[JS Package] Components"
14
+ "license": "GPL-2.0-or-later",
15
+ "author": "Automattic",
16
+ "sideEffects": [
17
+ "*.css",
18
+ "*.scss"
19
+ ],
20
+ "type": "module",
21
+ "exports": {
22
+ ".": {
23
+ "types": "./build/index.d.ts",
24
+ "default": "./build/index.js"
25
+ },
26
+ "./tools/jp-redirect": {
27
+ "types": "./build/tools/jp-redirect/index.d.ts",
28
+ "default": "./build/tools/jp-redirect/index.js"
29
+ }
30
+ },
31
+ "scripts": {
32
+ "build": "pnpm run clean && pnpm run compile-ts",
33
+ "clean": "rm -rf build/",
34
+ "compile-ts": "tsc --pretty --project tsconfig.build.json",
35
+ "test": "NODE_OPTIONS=--experimental-vm-modules jest",
36
+ "test-coverage": "pnpm run test --coverage",
37
+ "typecheck": "tsc --noEmit"
15
38
  },
39
+ "browserslist": [
40
+ "extends @wordpress/browserslist-config"
41
+ ],
16
42
  "dependencies": {
17
43
  "@automattic/format-currency": "1.0.1",
18
- "@automattic/jetpack-api": "^1.0.5",
19
- "@automattic/jetpack-boost-score-api": "^1.0.7",
20
- "@automattic/jetpack-script-data": "^0.5.0",
21
- "@automattic/number-formatters": "^1.0.9",
44
+ "@automattic/jetpack-api": "^1.0.7",
45
+ "@automattic/jetpack-boost-score-api": "^1.0.9",
46
+ "@automattic/jetpack-script-data": "^0.5.1",
47
+ "@automattic/number-formatters": "^1.0.10",
22
48
  "@babel/runtime": "^7",
23
- "@wordpress/browserslist-config": "6.26.0",
24
- "@wordpress/components": "29.12.0",
25
- "@wordpress/compose": "7.26.0",
26
- "@wordpress/data": "10.26.0",
27
- "@wordpress/date": "5.26.0",
28
- "@wordpress/element": "6.26.0",
29
- "@wordpress/i18n": "5.26.0",
30
- "@wordpress/icons": "10.26.0",
31
- "@wordpress/notices": "5.26.0",
49
+ "@wordpress/browserslist-config": "6.27.0",
50
+ "@wordpress/components": "30.0.0",
51
+ "@wordpress/compose": "7.27.0",
52
+ "@wordpress/data": "10.27.0",
53
+ "@wordpress/date": "5.27.0",
54
+ "@wordpress/element": "6.27.0",
55
+ "@wordpress/i18n": "6.0.0",
56
+ "@wordpress/icons": "10.27.0",
57
+ "@wordpress/notices": "5.27.0",
32
58
  "clsx": "2.1.1",
33
59
  "prop-types": "^15.7.2",
34
60
  "qrcode.react": "4.2.0",
35
61
  "react-slider": "2.0.5",
36
- "social-logos": "^3.2.7",
62
+ "social-logos": "^3.2.8",
37
63
  "uplot": "1.6.31",
38
64
  "uplot-react": "1.1.4"
39
65
  },
40
66
  "devDependencies": {
41
- "@automattic/jetpack-base-styles": "^1.0.6",
67
+ "@automattic/jetpack-base-styles": "^1.0.7",
42
68
  "@babel/core": "7.28.0",
43
69
  "@babel/preset-react": "7.27.1",
44
70
  "@jest/globals": "30.0.4",
@@ -65,31 +91,5 @@
65
91
  "peerDependencies": {
66
92
  "react": "^18.0.0",
67
93
  "react-dom": "^18.0.0"
68
- },
69
- "type": "module",
70
- "browserslist": [
71
- "extends @wordpress/browserslist-config"
72
- ],
73
- "exports": {
74
- ".": {
75
- "types": "./build/index.d.ts",
76
- "default": "./build/index.js"
77
- },
78
- "./tools/jp-redirect": {
79
- "types": "./build/tools/jp-redirect/index.d.ts",
80
- "default": "./build/tools/jp-redirect/index.js"
81
- }
82
- },
83
- "sideEffects": [
84
- "*.css",
85
- "*.scss"
86
- ],
87
- "scripts": {
88
- "build": "pnpm run clean && pnpm run compile-ts",
89
- "clean": "rm -rf build/",
90
- "compile-ts": "tsc --pretty --project tsconfig.build.json",
91
- "test": "NODE_OPTIONS=--experimental-vm-modules jest",
92
- "test-coverage": "pnpm run test --coverage",
93
- "typecheck": "tsc --noEmit"
94
94
  }
95
95
  }