@webikon/webentor-core 0.15.1 → 0.15.2

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
@@ -1,5 +1,9 @@
1
1
  # Webentor Core Changelog
2
2
 
3
+ ## 0.15.2
4
+
5
+ - **Preserve text alignment on core blocks under WordPress 7.0.** WP 7.0 moved Paragraph's "Align text" control into `supports.typography.textAlign`, which the `disableTypography` filter was wiping by nulling the whole typography object. The filter now keeps `textAlign` and strips only the rest, so Paragraph/Heading keep alignment while native typography stays hidden. No consumer migration needed.
6
+
3
7
  ## 0.15.1
4
8
 
5
9
  - **Fix focal-point cropping in responsive `<source srcset>`.** `get_resized_image_object()` re-derived its `src` via `bis_get_attachment_image_src()` without the `$crop` flag, so Better Image Sizes never read the attachment's `focal_point` meta for the srcset — the `<picture>` `<source>` entries (1x/2x) loaded the center-fit file while only the fallback `<img>` honored the focal point. It now passes `$crop` through, matching `get_resized_image_url()`, so focal-point crops apply at every breakpoint. Also stops generating the redundant crop-less duplicate file. No API change for consumers.
@@ -96,7 +96,10 @@ function initCustomTypographyFilter() {
96
96
  });
97
97
 
98
98
  /**
99
- * Globally disable typography settings for blocks
99
+ * Disable native typography controls, but keep `textAlign`.
100
+ *
101
+ * WP 7.0 moved the "Align text" control into `supports.typography.textAlign`,
102
+ * so nulling the whole object would strip alignment too.
100
103
  *
101
104
  * @param {object} settings block settings
102
105
  * @param {string} name block name
@@ -107,7 +110,8 @@ function initCustomTypographyFilter() {
107
110
  'webentor/core/disableTypography',
108
111
  function (settings) {
109
112
  if (settings?.supports?.typography) {
110
- settings.supports.typography = null;
113
+ const { textAlign } = settings.supports.typography;
114
+ settings.supports.typography = textAlign ? { textAlign } : null;
111
115
  }
112
116
 
113
117
  return settings;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@webikon/webentor-core",
3
3
  "homepage": "https://webikon.sk",
4
- "version": "0.15.1",
4
+ "version": "0.15.2",
5
5
  "description": "Core functionality and useful utilities for Webentor Stack",
6
6
  "license": "MIT",
7
7
  "author": "Webikon s.r.o.",
@@ -3,10 +3,10 @@
3
3
  "wp-block-editor",
4
4
  "wp-blocks",
5
5
  "wp-components",
6
- "wp-hooks",
7
6
  "wp-compose",
8
7
  "wp-data",
9
8
  "wp-element",
9
+ "wp-hooks",
10
10
  "wp-html-entities",
11
11
  "wp-primitives"
12
12
  ]
@@ -4,7 +4,7 @@
4
4
  "name": "_utils"
5
5
  },
6
6
  "editor.deps.json": {
7
- "file": "assets/editor.deps-mcEs1sHu.json",
7
+ "file": "assets/editor.deps-BY0wt7iZ.json",
8
8
  "src": "editor.deps.json"
9
9
  },
10
10
  "resources/blocks/e-accordion/script.ts": {