From ec5e38571fd6c7d5b98812d460fb7524a823b696 Mon Sep 17 00:00:00 2001 From: jeremyfelt Date: Thu, 1 May 2025 06:44:06 -0700 Subject: [PATCH 1/2] Adjust block build process, config, dist files --- .distignore | 5 +++++ build/toggle-block/block.json | 2 +- build/toggle-block/index.asset.php | 2 +- build/toggle-block/index.js | 2 +- build/toggle-block/view.css | 7 +++++++ phpstan.neon.dist | 5 +++++ plugin.php | 10 +++++----- src/toggle-block/block.json | 2 +- webpack.config.js | 17 +++++++++++++++++ 9 files changed, 43 insertions(+), 9 deletions(-) create mode 100644 build/toggle-block/view.css create mode 100644 phpstan.neon.dist diff --git a/.distignore b/.distignore index 6b9f73d..b360158 100644 --- a/.distignore +++ b/.distignore @@ -2,12 +2,17 @@ .github assets node_modules +src vendor .distignore +.editorconfig .eslintrc.js .gitignore .phpcs.xml.dist +.prettierrc.js composer.json composer.lock package-lock.json package.json +phpstan.neon.dist +webpack.config.js diff --git a/build/toggle-block/block.json b/build/toggle-block/block.json index 3668239..c069a18 100644 --- a/build/toggle-block/block.json +++ b/build/toggle-block/block.json @@ -13,7 +13,7 @@ "file:view.js" ], "style": [ - "file:../src/view.css" + "file:view.css" ], "attributes": { "bodyClass": { diff --git a/build/toggle-block/index.asset.php b/build/toggle-block/index.asset.php index f9ecafe..768b55b 100644 --- a/build/toggle-block/index.asset.php +++ b/build/toggle-block/index.asset.php @@ -1 +1 @@ - array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-hooks', 'wp-i18n'), 'version' => '1b8472592ef953dd9320'); + array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-hooks', 'wp-i18n'), 'version' => 'bff6c727c01bcb9ce96f'); diff --git a/build/toggle-block/index.js b/build/toggle-block/index.js index b78a411..5aba0b0 100644 --- a/build/toggle-block/index.js +++ b/build/toggle-block/index.js @@ -1 +1 @@ -(()=>{"use strict";function t(){return t=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var o=0,r=Array(e);o{"use strict";function t(){return t=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var o=0,r=Array(e);o Date: Thu, 1 May 2025 06:47:41 -0700 Subject: [PATCH 2/2] Bump 0.4.0 --- README.md | 7 +++++++ composer.json | 2 +- composer.lock | 2 +- package-lock.json | 4 ++-- package.json | 2 +- plugin.php | 2 +- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a18d8c4..2f31ea6 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,13 @@ The "Controls ID" entered in this panel must match the "HTML anchor" assigned to ## Changelog +### 0.4.0 + +* Add an attribute to toggle a toggle block-specific class on the body element. +* Allow the toggle block to be placed inside the `core/navigation` block. +* Add transform support from/to `core/navigation-link` blocks. +* Update to latest dependencies, build process, and code standards. + ### 0.3.1 * Add persisting `toggle-block-has-been-toggled` class to toggled element when first toggled. diff --git a/composer.json b/composer.json index a254f6f..1080411 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "happyprime/toggle-block", "description": "Add a toggle to show and hide another block.", - "version": "0.3.1", + "version": "0.4.0", "type": "wordpress-plugin", "minimum-stability": "stable", "license": "GPLv2-or-later", diff --git a/composer.lock b/composer.lock index 0b5e853..e39d9b6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8e6ad698379cc1aa1fea84d9412d2df3", + "content-hash": "baa8c2b19816c8309f7898f2a9a44a30", "packages": [], "packages-dev": [ { diff --git a/package-lock.json b/package-lock.json index 1149489..6f443c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "toggle-block", - "version": "0.3.1", + "version": "0.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "toggle-block", - "version": "0.3.1", + "version": "0.4.0", "license": "GPL-2.0-or-later", "devDependencies": { "@babel/core": "^7.27.1", diff --git a/package.json b/package.json index 4adc2d2..e5424ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "toggle-block", - "version": "0.3.1", + "version": "0.4.0", "description": "Add a toggle to show and hide another block", "author": "Happy Prime", "license": "GPL-2.0-or-later", diff --git a/plugin.php b/plugin.php index 42cfb34..ea1c5d9 100644 --- a/plugin.php +++ b/plugin.php @@ -2,7 +2,7 @@ /** * Plugin Name: Toggle Block * Description: Add a toggle to show and hide another block. - * Version: 0.3.1 + * Version: 0.4.0 * Plugin URI: https://github.com/happyprime/toggle-block/ * Author: Happy Prime * Author URI: https://happyprime.co