Skip to content

Commit 83c1cfb

Browse files
committed
chore: bump to 1.12.0
Release includes: - feat: Folio section label generation — AI-generated 1–3 word labels fill the empty narrow column of columns:28-72 when no subheading is available (intelligence.js, edit.js, api.php, templates.php) - fix: rate limiter off-by-one allowed unlimited requests after the 60th - fix: add current_user_can() to dismiss-notice AJAX handler - fix: JSON-aware sanitizer for _aldus_locked_blocks meta - fix: initEngine() concurrent-call race now deduplicates via stored promise - fix: ref-sync useEffects now carry proper dependency arrays - fix: aldusDebug-gated logging in runInference catch blocks Made-with: Cursor
1 parent 81d2e13 commit 83c1cfb

6 files changed

Lines changed: 63 additions & 6 deletions

File tree

aldus.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Plugin Name: Aldus — Block Compositor
55
* Plugin URI: https://github.com/RegionallyFamous/aldus
66
* Description: You write it. Aldus designs it. Sixteen layout styles for your content — pick the one that fits, and it becomes real WordPress blocks.
7-
* Version: 1.11.0
7+
* Version: 1.12.0
88
* Requires at least: 6.4
99
* Requires PHP: 8.0
1010
* Author: Regionally Famous
@@ -21,7 +21,7 @@
2121
exit;
2222
}
2323

24-
define( 'ALDUS_VERSION', '1.11.0' );
24+
define( 'ALDUS_VERSION', '1.12.0' );
2525
define( 'ALDUS_PATH', plugin_dir_path( __FILE__ ) );
2626
define( 'ALDUS_URL', plugin_dir_url( __FILE__ ) );
2727

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aldus",
3-
"version": "1.11.0",
3+
"version": "1.12.0",
44
"description": "AI Block Compositor for WordPress",
55
"scripts": {
66
"build": "wp-scripts build",

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: regionallyfamous
33
Tags: blocks, gutenberg, layout, design, composer
44
Requires at least: 6.4
55
Tested up to: 6.9
6-
Stable tag: 1.11.0
6+
Stable tag: 1.12.0
77
Requires PHP: 8.0
88
License: GPLv2 or later
99
License URI: https://www.gnu.org/licenses/gpl-2.0.html

src/block.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://schemas.wp.org/trunk/block.json",
33
"apiVersion": 3,
44
"name": "aldus/layout-generator",
5-
"version": "1.11.0",
5+
"version": "1.12.0",
66
"title": "Aldus",
77
"category": "aldus",
88
"icon": "table-col-after",

src/edit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2522,7 +2522,7 @@ async function inferTokens(
25222522

25232523
// JS build version — must match ALDUS_VERSION in aldus.php.
25242524
// Set by the release script; used only for the mismatch warning below.
2525-
const ALDUS_JS_VERSION = '1.11.0';
2525+
const ALDUS_JS_VERSION = '1.12.0';
25262526

25272527
export default function Edit( { clientId, attributes, setAttributes } ) {
25282528
const blockProps = useBlockProps( {

tests/integration/AssembleEndpointTest.php

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,63 @@ public function test_valid_tokens_are_accepted(): void {
149149
$this->assertSame( 200, $response->get_status() );
150150
}
151151

152+
public function test_code_items_are_accepted_and_rendered(): void {
153+
wp_set_current_user( $this->editor_id );
154+
155+
$request = new WP_REST_Request( 'POST', '/aldus/v1/assemble' );
156+
$request->set_body_params( [
157+
'items' => [
158+
[ 'type' => 'code', 'content' => 'const answer = 42;', 'url' => '', 'id' => 'a' ],
159+
],
160+
'personality' => 'Dispatch',
161+
'tokens' => [ 'code:block' ],
162+
] );
163+
164+
$response = rest_do_request( $request );
165+
$data = $response->get_data();
166+
167+
$this->assertSame( 200, $response->get_status() );
168+
$this->assertStringContainsString( '<!-- wp:code -->', $data['blocks'] );
169+
}
170+
171+
public function test_details_items_fall_back_to_generic_markup(): void {
172+
wp_set_current_user( $this->editor_id );
173+
174+
$request = new WP_REST_Request( 'POST', '/aldus/v1/assemble' );
175+
$request->set_body_params( [
176+
'items' => [
177+
[ 'type' => 'details', 'content' => 'Frequently asked question', 'url' => '', 'id' => 'a' ],
178+
],
179+
'personality' => 'Dispatch',
180+
'tokens' => [ 'paragraph' ],
181+
] );
182+
183+
$response = rest_do_request( $request );
184+
$data = $response->get_data();
185+
186+
$this->assertSame( 200, $response->get_status() );
187+
$this->assertStringContainsString( '<!-- wp:paragraph -->', $data['blocks'] );
188+
}
189+
190+
public function test_empty_layouts_fall_back_to_generic_blocks(): void {
191+
wp_set_current_user( $this->editor_id );
192+
193+
$request = new WP_REST_Request( 'POST', '/aldus/v1/assemble' );
194+
$request->set_body_params( [
195+
'items' => [
196+
[ 'type' => 'paragraph', 'content' => 'Fallback paragraph', 'url' => '', 'id' => 'a' ],
197+
],
198+
'personality' => 'Dispatch',
199+
'tokens' => [ 'gallery:3-col' ],
200+
] );
201+
202+
$response = rest_do_request( $request );
203+
$data = $response->get_data();
204+
205+
$this->assertSame( 200, $response->get_status() );
206+
$this->assertStringContainsString( '<!-- wp:paragraph -->', $data['blocks'] );
207+
}
208+
152209
public function test_empty_tokens_still_returns_output(): void {
153210
wp_set_current_user( $this->editor_id );
154211

0 commit comments

Comments
 (0)