@amazeelabs/silverback-gutenberg 2.7.0 → 2.7.1
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
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.7.1](https://github.com/amazeeio-solutions/silverback-template/compare/@amazeelabs/silverback-gutenberg@2.7.0...@amazeelabs/silverback-gutenberg@2.7.1) (2026-01-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @amazeelabs/silverback-gutenberg
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [2.7.0](https://github.com/amazeeio-solutions/silverback-template/compare/@amazeelabs/silverback-gutenberg@2.6.3...@amazeelabs/silverback-gutenberg@2.7.0) (2025-12-09)
|
|
7
15
|
|
|
8
16
|
|
|
@@ -35,7 +35,7 @@ class BlockSerializer {
|
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
protected function get_comment_delimited_block_content($block_name = null, $block_attributes = null, $block_content = '') {
|
|
38
|
+
protected function get_comment_delimited_block_content(?string $block_name = null, ?array $block_attributes = null, string $block_content = '') {
|
|
39
39
|
if ( is_null( $block_name ) ) {
|
|
40
40
|
return $block_content;
|
|
41
41
|
}
|
|
@@ -60,7 +60,7 @@ class BlockSerializer {
|
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
protected function strip_core_block_namespace( $block_name = null ) {
|
|
63
|
+
protected function strip_core_block_namespace( ?string $block_name = null ) {
|
|
64
64
|
if ( is_string( $block_name ) && 0 === strpos( $block_name, 'core/' ) ) {
|
|
65
65
|
return substr( $block_name, 5 );
|
|
66
66
|
}
|
|
@@ -71,7 +71,7 @@ class LinkProcessor {
|
|
|
71
71
|
$this->cacheableMetadata->addCacheableDependency($other_object);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
public function processLinks(string $html, string $direction, LanguageInterface $language = NULL) {
|
|
74
|
+
public function processLinks(string $html, string $direction, ?LanguageInterface $language = NULL) {
|
|
75
75
|
if (!in_array($direction, ['inbound', 'outbound'], TRUE)) {
|
|
76
76
|
throw new \Exception('Unknown direction: "' . $direction . '".');
|
|
77
77
|
}
|
|
@@ -99,7 +99,7 @@ class LinkProcessor {
|
|
|
99
99
|
return $processed;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
protected function processBlocks(&$blocks, string $direction, LanguageInterface $language = NULL): void {
|
|
102
|
+
protected function processBlocks(&$blocks, string $direction, ?LanguageInterface $language = NULL): void {
|
|
103
103
|
$processUrlCallback = fn(string $url) => $this->processUrl($url, $direction, $language);
|
|
104
104
|
$processLinksCallback = fn(string $html) => $this->processLinks($html, $direction, $language);
|
|
105
105
|
foreach ($blocks as &$block) {
|
|
@@ -203,7 +203,7 @@ class LinkProcessor {
|
|
|
203
203
|
return $this->buildUrl($parts);
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
protected function processLink(\DOMElement $link, string $direction, LanguageInterface $language = NULL) {
|
|
206
|
+
protected function processLink(\DOMElement $link, string $direction, ?LanguageInterface $language = NULL) {
|
|
207
207
|
if ($direction === 'outbound' && !$language) {
|
|
208
208
|
throw new \Exception('$language is required for "outbound" direction.');
|
|
209
209
|
}
|
|
@@ -229,7 +229,7 @@ class LinkProcessor {
|
|
|
229
229
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
public function processUrl(string $url, string $direction, LanguageInterface $language = NULL, array &$metadata = NULL): string {
|
|
232
|
+
public function processUrl(string $url, string $direction, ?LanguageInterface $language = NULL, ?array &$metadata = NULL): string {
|
|
233
233
|
$metadata = [];
|
|
234
234
|
|
|
235
235
|
if ($direction === 'outbound' && !$language) {
|
|
@@ -7,7 +7,7 @@ use Drupal\media_library\MediaLibraryState;
|
|
|
7
7
|
|
|
8
8
|
class MediaService extends Original {
|
|
9
9
|
|
|
10
|
-
public function renderDialog(array $media_types, array $media_bundles = NULL) {
|
|
10
|
+
public function renderDialog(array $media_types, ?array $media_bundles = NULL) {
|
|
11
11
|
// Instead of guessing media types as the parent method does, use given
|
|
12
12
|
// media types as media type IDs. So the blocks have full control over
|
|
13
13
|
// allowed media types.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amazeelabs/silverback-gutenberg",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"precommit": "pnpm precommit:fix && pnpm precommit:check && pnpm test:unit",
|
|
6
6
|
"precommit:fix": "pnpm --filter @custom/cms precommit:fix packages/@amazeelabs/silverback-gutenberg/drupal",
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
"publishConfig": {
|
|
13
13
|
"access": "public"
|
|
14
14
|
},
|
|
15
|
-
"gitHead": "
|
|
15
|
+
"gitHead": "8e0638f5452e77742f99aebe4a65606aac751103"
|
|
16
16
|
}
|