From 66b5cc935f219e638165d2650f1b10ed60529f04 Mon Sep 17 00:00:00 2001 From: Alejandro S Date: Wed, 8 Feb 2023 17:21:02 -0400 Subject: [PATCH 01/18] Include reference to Laravel app --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8bd8aba..cb33c79 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,9 @@ Inspired by [Laravel Livewire](https://laravel-livewire.com/) and [Sprig](https: Check out the [Yoyo Demo App](https://app.getyoyo.dev) to get a better idea of what you can build with Yoyo. It showcases many different types of Yoyo components. You can also clone and install the demo apps: -- [Yoyo App with built-in templating](https://github.com/clickfwd/yoyo-app) - [Yoyo Blade App](https://github.com/clickfwd/yoyo-blade-app) +- [Yoyo Laravel App](https://github.com/clickfwd/yoyo-laravel-app) +- [Yoyo PHP template App](https://github.com/clickfwd/yoyo-app) - [Yoyo Twig App](https://github.com/clickfwd/yoyo-twig-app) ## Documentation From 6c47fff336419a5263b311098fa645f4309aa1dc Mon Sep 17 00:00:00 2001 From: Alejandro S Date: Tue, 14 Feb 2023 14:32:48 -0400 Subject: [PATCH 02/18] Ensure components are compiled only once. --- src/yoyo/YoyoCompiler.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/yoyo/YoyoCompiler.php b/src/yoyo/YoyoCompiler.php index 409fed6..8b4f54c 100644 --- a/src/yoyo/YoyoCompiler.php +++ b/src/yoyo/YoyoCompiler.php @@ -193,6 +193,11 @@ protected function addComponentRootAttributes($element) return; } + // Skip when component already compiled + if ($element->hasAttribute(self::yoprefix('name')) && $element->hasAttribute(self::hxprefix('vals'))) { + return; + } + $element->setAttribute(self::YOYO_PREFIX, ''); $element->setAttribute(self::YOYO_PREFIX_FINDER, ''); From 6ac4df80be7c0212151a0faabd504b45844979cb Mon Sep 17 00:00:00 2001 From: Alejandro S Date: Tue, 14 Feb 2023 14:33:07 -0400 Subject: [PATCH 03/18] New Yoyo::actionArgs method --- src/yoyo/Yoyo.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/yoyo/Yoyo.php b/src/yoyo/Yoyo.php index 6226317..dd59dd1 100644 --- a/src/yoyo/Yoyo.php +++ b/src/yoyo/Yoyo.php @@ -204,6 +204,13 @@ public function action($action): self return $this; } + public function actionArgs(...$args) + { + $this->request()->merge(['actionArgs' => $args]); + + return $this; + } + /** * Renders the component on initial page load. */ From 727cc80b1d765422f7d1611ac45eccda0e78e03b Mon Sep 17 00:00:00 2001 From: Alejandro S Date: Tue, 14 Feb 2023 14:33:37 -0400 Subject: [PATCH 04/18] New Request `set`, `triggerName` and `header methods. --- src/yoyo/Request.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/yoyo/Request.php b/src/yoyo/Request.php index cf83b2c..a5d6772 100644 --- a/src/yoyo/Request.php +++ b/src/yoyo/Request.php @@ -98,6 +98,20 @@ public function startsWith($prefix) return $vars; } + public function set($key, $value) + { + $this->request[$key] = $value; + + return $this; + } + + public function merge($data) + { + $this->request = array_merge($this->request, $data); + + return $this; + } + public function drop($key) { $this->dropped[] = $key; @@ -145,4 +159,13 @@ public function triggerId() { return $this->server['HTTP_HX_TRIGGER']; } + + public function triggerName() + { + return $this->server['HTTP_HX_TRIGGER_NAME'] ?? null; + } + public function header($name) + { + return $this->server['HTTP_'.strtoupper($name)] ?? null; + } } From 70bdd3a469a705fc4cbdabbd9ce41c5a85b2955a Mon Sep 17 00:00:00 2001 From: jreviews Date: Tue, 14 Feb 2023 18:34:04 +0000 Subject: [PATCH 05/18] Fix styling --- src/yoyo/Request.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/yoyo/Request.php b/src/yoyo/Request.php index a5d6772..ea43546 100644 --- a/src/yoyo/Request.php +++ b/src/yoyo/Request.php @@ -164,6 +164,7 @@ public function triggerName() { return $this->server['HTTP_HX_TRIGGER_NAME'] ?? null; } + public function header($name) { return $this->server['HTTP_'.strtoupper($name)] ?? null; From 6f26f53dd9d697df55021ddace1025abd2149829 Mon Sep 17 00:00:00 2001 From: Alejandro S Date: Wed, 22 Feb 2023 08:07:57 -0400 Subject: [PATCH 06/18] wip --- composer.json | 2 +- src/yoyo/YoyoCompiler.php | 4 ++-- tests/app/Yoyo/ActionArguments.php | 4 ++++ tests/app/Yoyo/CounterDynamicProperties.php | 6 ++++++ .../DependencyInjectionClassWithNamedArgumentMapping.php | 2 ++ 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 33b8480..8cf7f4b 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": "^7.3|^8.0|^8.1", + "php": "^7.3|^8.0|^8.1|^8.2", "illuminate/container": "^8.0||^9.0" }, "require-dev": { diff --git a/src/yoyo/YoyoCompiler.php b/src/yoyo/YoyoCompiler.php index 8b4f54c..dc24950 100644 --- a/src/yoyo/YoyoCompiler.php +++ b/src/yoyo/YoyoCompiler.php @@ -135,8 +135,8 @@ public function compile($html): string $html = preg_replace('/ '.$prefix.':(.*)="(.*)"/U', " $prefix_finder $prefix:\$1=\"\$2\"", $html); $html = preg_replace('/ ' . $prefix . ':(.*)=\'(.*)\'/U', " {$prefix_finder} {$prefix}:\$1='\$2'", $html); - $html = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'); - + $html = htmlspecialchars_decode(iconv('UTF-8', 'ISO-8859-1', htmlentities($html, ENT_COMPAT, 'UTF-8')), ENT_QUOTES); + $dom = new DOMDocument(); $internalErrors = libxml_use_internal_errors(true); diff --git a/tests/app/Yoyo/ActionArguments.php b/tests/app/Yoyo/ActionArguments.php index 90e5558..f8ba8cf 100644 --- a/tests/app/Yoyo/ActionArguments.php +++ b/tests/app/Yoyo/ActionArguments.php @@ -6,6 +6,10 @@ class ActionArguments extends Component { + protected $a; + + protected $b; + public function someAction($a, $b) { $this->a = $a; diff --git a/tests/app/Yoyo/CounterDynamicProperties.php b/tests/app/Yoyo/CounterDynamicProperties.php index 8cea367..a33875d 100644 --- a/tests/app/Yoyo/CounterDynamicProperties.php +++ b/tests/app/Yoyo/CounterDynamicProperties.php @@ -4,6 +4,7 @@ use Clickfwd\Yoyo\Component; +#[\AllowDynamicProperties] class CounterDynamicProperties extends Component { public function getQueryString() @@ -11,6 +12,11 @@ public function getQueryString() return $this->getDynamicProperties(); } + /** + * The 'count' property value is not known ahead of time and can be set programatically; + * + * @return void + */ public function getDynamicProperties() { return ['count']; diff --git a/tests/app/Yoyo/DependencyInjectionClassWithNamedArgumentMapping.php b/tests/app/Yoyo/DependencyInjectionClassWithNamedArgumentMapping.php index f668f2a..eda1b93 100644 --- a/tests/app/Yoyo/DependencyInjectionClassWithNamedArgumentMapping.php +++ b/tests/app/Yoyo/DependencyInjectionClassWithNamedArgumentMapping.php @@ -8,6 +8,8 @@ class DependencyInjectionClassWithNamedArgumentMapping extends Component { + protected $id; + protected $post; // $foo variable passed to component is automaticaly injected in Post::__constructor From edcd1ce93e76f93bebaef57941d7d88418290b63 Mon Sep 17 00:00:00 2001 From: Alejandro S Date: Tue, 9 May 2023 14:34:50 -0400 Subject: [PATCH 07/18] wip --- src/yoyo/Concerns/ResponseHeaders.php | 2 +- src/yoyo/QueryString.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/yoyo/Concerns/ResponseHeaders.php b/src/yoyo/Concerns/ResponseHeaders.php index 47c3628..c9a88a0 100644 --- a/src/yoyo/Concerns/ResponseHeaders.php +++ b/src/yoyo/Concerns/ResponseHeaders.php @@ -32,7 +32,7 @@ public function refresh() return $this; } - public function replace($url) + public function replaceUrl($url) { $this->header('HX-Replace-Url', $url); diff --git a/src/yoyo/QueryString.php b/src/yoyo/QueryString.php index 2b23ccf..b58bf46 100644 --- a/src/yoyo/QueryString.php +++ b/src/yoyo/QueryString.php @@ -63,6 +63,10 @@ public function getPageQueryParams() // If a query string value matches the default value, remove it from the URL foreach ($queryParams as $key => $val) { + if (is_object($val) && method_exists($val, 'toArray')) { + $queryParams[$key] = $val->toArray(); + } + if (isset($this->defaults[$key]) && $val === $this->defaults[$key] || $val === '') { unset($queryParams[$key]); } From 81b56eef6a63d2dfea7881724a3b821fcb329434 Mon Sep 17 00:00:00 2001 From: Alejandro S Date: Tue, 9 May 2023 15:03:30 -0400 Subject: [PATCH 08/18] php 8.2 compat --- src/yoyo/YoyoCompiler.php | 6 +++--- tests/Unit/YoyoCompileTest.php | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/yoyo/YoyoCompiler.php b/src/yoyo/YoyoCompiler.php index dc24950..f8bfa7c 100644 --- a/src/yoyo/YoyoCompiler.php +++ b/src/yoyo/YoyoCompiler.php @@ -131,12 +131,12 @@ public function compile($html): string $prefix_finder = self::YOYO_PREFIX_FINDER; // U modifier needed to match children tags when there are no line breaks in the HTML code - $html = preg_replace('/ '.$prefix.':(.*)="(.*)"/U', " $prefix_finder $prefix:\$1=\"\$2\"", $html); $html = preg_replace('/ ' . $prefix . ':(.*)=\'(.*)\'/U', " {$prefix_finder} {$prefix}:\$1='\$2'", $html); - $html = htmlspecialchars_decode(iconv('UTF-8', 'ISO-8859-1', htmlentities($html, ENT_COMPAT, 'UTF-8')), ENT_QUOTES); - + // Converts non-ascii characters to numeric html entities + $html = mb_encode_numericentity($html, [0x80, 0x10FFFF, 0, ~0], 'UTF-8' ); + $dom = new DOMDocument(); $internalErrors = libxml_use_internal_errors(true); diff --git a/tests/Unit/YoyoCompileTest.php b/tests/Unit/YoyoCompileTest.php index 03fe79b..a0bfa28 100644 --- a/tests/Unit/YoyoCompileTest.php +++ b/tests/Unit/YoyoCompileTest.php @@ -126,3 +126,13 @@ expect(compile_html_with_vars('foo', '
', ['foo' => 'bar'])) ->toContain(hxattr('vals', encode_vals([yoprefix_value('id') => 'foo', 'foo' => 'bar']))); }); + +it('correctly compiles component with non-ascii characters', function () { + expect(compile_html('foo', '

áéíóü

')) + ->toContain('áéíóü'); +}); + +it('correctly compiles component with Chinese characters', function () { + expect(compile_html('foo', '

极简、极速、极致、 海豚PHP、PHP开发框架、后台框架

')) + ->toContain('极简、极速、极致、 海豚PHP、PHP开发框架、后台框架'); +}); \ No newline at end of file From 2428d8f9296340a79bcf4d248413783e26a4ffe6 Mon Sep 17 00:00:00 2001 From: jreviews Date: Tue, 9 May 2023 19:03:55 +0000 Subject: [PATCH 09/18] Fix styling --- src/yoyo/YoyoCompiler.php | 2 +- tests/Unit/YoyoCompileTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yoyo/YoyoCompiler.php b/src/yoyo/YoyoCompiler.php index f8bfa7c..1dc1ee0 100644 --- a/src/yoyo/YoyoCompiler.php +++ b/src/yoyo/YoyoCompiler.php @@ -135,7 +135,7 @@ public function compile($html): string $html = preg_replace('/ ' . $prefix . ':(.*)=\'(.*)\'/U', " {$prefix_finder} {$prefix}:\$1='\$2'", $html); // Converts non-ascii characters to numeric html entities - $html = mb_encode_numericentity($html, [0x80, 0x10FFFF, 0, ~0], 'UTF-8' ); + $html = mb_encode_numericentity($html, [0x80, 0x10FFFF, 0, ~0], 'UTF-8'); $dom = new DOMDocument(); diff --git a/tests/Unit/YoyoCompileTest.php b/tests/Unit/YoyoCompileTest.php index a0bfa28..6e4874c 100644 --- a/tests/Unit/YoyoCompileTest.php +++ b/tests/Unit/YoyoCompileTest.php @@ -135,4 +135,4 @@ it('correctly compiles component with Chinese characters', function () { expect(compile_html('foo', '

极简、极速、极致、 海豚PHP、PHP开发框架、后台框架

')) ->toContain('极简、极速、极致、 海豚PHP、PHP开发框架、后台框架'); -}); \ No newline at end of file +}); From 661686f312ff0c886bb393513a217da837797622 Mon Sep 17 00:00:00 2001 From: Alejandro S Date: Wed, 26 Jul 2023 19:08:10 -0400 Subject: [PATCH 10/18] Fix ResponseHeaders::refresh error due to missing parameter. --- src/yoyo/Concerns/ResponseHeaders.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yoyo/Concerns/ResponseHeaders.php b/src/yoyo/Concerns/ResponseHeaders.php index c9a88a0..b95191f 100644 --- a/src/yoyo/Concerns/ResponseHeaders.php +++ b/src/yoyo/Concerns/ResponseHeaders.php @@ -27,7 +27,7 @@ public function redirect($url) public function refresh() { - $this->header('HX-Refresh'); + $this->header('HX-Refresh', 'true'); return $this; } From 241baa8fc3c1b327e2c999ec26974abc4e84f345 Mon Sep 17 00:00:00 2001 From: Alejandro S Date: Tue, 1 Aug 2023 11:21:22 -0400 Subject: [PATCH 11/18] Bump htmx to v1.9.4 and include new config options. --- src/yoyo/Services/Configuration.php | 34 ++++++++++++++++------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/src/yoyo/Services/Configuration.php b/src/yoyo/Services/Configuration.php index 2c281fd..594fccf 100644 --- a/src/yoyo/Services/Configuration.php +++ b/src/yoyo/Services/Configuration.php @@ -10,31 +10,35 @@ class Configuration private static $options; - public static $htmx = '1.8.4'; + public static $htmx = '1.9.4'; protected static $allowedConfigOptions = [ - 'addedClass', - 'allowEval', - 'attributesToSettle', - 'defaultFocusScroll', - 'defaultSettleDelay', - 'defaultSwapDelay', - 'defaultSwapStyle', - 'disableSelector', - 'historyCacheSize', 'historyEnabled', + 'historyCacheSize', + 'refreshOnHistoryMiss', + 'defaultSwapStyle', + 'defaultSwapDelay', + 'defaultSettleDelay', 'includeIndicatorStyles', 'indicatorClass', - 'inlineScriptNonce', - 'refreshOnHistoryMiss', 'requestClass', - 'scrollBehavior', + 'addedClass', 'settlingClass', 'swappingClass', - 'timeout', - 'useTemplateFragments', + 'allowEval', + 'inlineScriptNonce', + 'attributesToSettle', 'withCredentials', + 'timeout', 'wsReconnectDelay', + 'wsBinaryType', + 'disableSelector', + 'useTemplateFragments', + 'scrollBehavior', + 'defaultFocusScroll', + 'getCacheBusterParam', + 'globalViewTransitions', + 'methodsThatUseUrlParams', ]; public function __construct($options) From 5662a7e18e175eb0669c31f9ace5b120a6f48342 Mon Sep 17 00:00:00 2001 From: Alejandro S Date: Tue, 1 Aug 2023 11:22:05 -0400 Subject: [PATCH 12/18] Add new Response::reselect method for the HX-Reselect header. --- src/yoyo/Concerns/ResponseHeaders.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/yoyo/Concerns/ResponseHeaders.php b/src/yoyo/Concerns/ResponseHeaders.php index b95191f..3a4a722 100644 --- a/src/yoyo/Concerns/ResponseHeaders.php +++ b/src/yoyo/Concerns/ResponseHeaders.php @@ -46,6 +46,13 @@ public function reswap($swap) return $this; } + public function reselect($selector) + { + $this->header('HX-Reselect', $selector); + + return $this; + } + public function retarget($selector) { $this->header('HX-Retarget', $selector); From a7bef2cf3f34fcc971b9eed7a8de0ac10fcc3b75 Mon Sep 17 00:00:00 2001 From: Alejandro S Date: Wed, 20 Dec 2023 16:43:20 -0400 Subject: [PATCH 13/18] Fix headers already sent error when setting status code in response --- src/yoyo/Services/Response.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/yoyo/Services/Response.php b/src/yoyo/Services/Response.php index 8ff75d1..a6ac830 100644 --- a/src/yoyo/Services/Response.php +++ b/src/yoyo/Services/Response.php @@ -41,12 +41,10 @@ public function send(string $content = ''): string header("$key: $value"); } - if ($this->statusCode == 204) { - http_response_code(204); + if (! headers_sent()) { + http_response_code($this->statusCode ?? 200); } - http_response_code($this->statusCode ?? 200); - return $content ?: ''; } From bd5c3725821c2c8549ce1f1268773e79f8c37acc Mon Sep 17 00:00:00 2001 From: Alejandro S Date: Wed, 20 Dec 2023 17:10:30 -0400 Subject: [PATCH 14/18] wip --- src/yoyo/Services/Response.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/yoyo/Services/Response.php b/src/yoyo/Services/Response.php index a6ac830..70c3f46 100644 --- a/src/yoyo/Services/Response.php +++ b/src/yoyo/Services/Response.php @@ -41,6 +41,7 @@ public function send(string $content = ''): string header("$key: $value"); } + // Prevent headers already sent error if (! headers_sent()) { http_response_code($this->statusCode ?? 200); } From 02490ebd6757dafc0450b11a1eb0a8508022dee3 Mon Sep 17 00:00:00 2001 From: Alejandro S Date: Mon, 25 Dec 2023 14:44:21 -0400 Subject: [PATCH 15/18] bump php 8.3 and laravel 10 container --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 8cf7f4b..d9fabb2 100644 --- a/composer.json +++ b/composer.json @@ -20,8 +20,8 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": "^7.3|^8.0|^8.1|^8.2", - "illuminate/container": "^8.0||^9.0" + "php": "^7.3|^8.0|^8.1|^8.2|^8.3", + "illuminate/container": "^8.0||^9.0||^10.0" }, "require-dev": { "phpunit/phpunit": "^9.3", From d7024b2ea8d301859f6ce1eb5960b5d0bc129eca Mon Sep 17 00:00:00 2001 From: Angelo Galleja Date: Thu, 8 Feb 2024 13:08:08 +0100 Subject: [PATCH 16/18] Add support for port in UrlStateManagerService.php https://github.com/clickfwd/yoyo/discussions/25#discussioncomment-8399764 --- src/yoyo/Services/UrlStateManagerService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/yoyo/Services/UrlStateManagerService.php b/src/yoyo/Services/UrlStateManagerService.php index b06494e..d39c865 100644 --- a/src/yoyo/Services/UrlStateManagerService.php +++ b/src/yoyo/Services/UrlStateManagerService.php @@ -27,7 +27,8 @@ public function pushState($queryParams) $parsedUrl = parse_url($this->currentUrl); - $url = $parsedUrl['scheme'].'://'.$parsedUrl['host'].$parsedUrl['path'].($queryParams ? '?'.http_build_query($queryParams) : ''); + $port = isset($parsedUrl['port']) ? (':'.$parsedUrl['port']) : ''; + $url = $parsedUrl['scheme'].'://'.$parsedUrl['host'].$port.$parsedUrl['path'].($queryParams ? '?'.http_build_query($queryParams) : ''); if ($url !== $this->currentUrl) { $response->header('Yoyo-Push', $url); From ab24d8c2f1e02b29e5a9d1a44fd575d1c4658abe Mon Sep 17 00:00:00 2001 From: Alejandro S Date: Tue, 16 Apr 2024 09:20:17 -0400 Subject: [PATCH 17/18] Fix Safari/iOS errors due to evt.target and evt.srcElement now being null. --- src/assets/js/yoyo.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/assets/js/yoyo.js b/src/assets/js/yoyo.js index 6dd933f..695da94 100644 --- a/src/assets/js/yoyo.js +++ b/src/assets/js/yoyo.js @@ -43,23 +43,23 @@ }, afterProcessNode(evt) { // Create non-existent target - if (evt.srcElement) { + if (evt.detail.elt) { this.createNonExistentIdTarget( - evt.srcElement.getAttribute('hx-target') + evt.detail.elt.getAttribute('hx-target') ) } // Initialize spinners let component - if (!evt.srcElement || !isComponent(evt.srcElement)) { + if (!evt.detail.elt || !isComponent(evt.detail.elt)) { // For innerHTML swap find the component root node component = YoyoEngine.closest( evt.detail.elt, '[hx-swap~=innerHTML]' ) } else { - component = getComponent(evt.srcElement) + component = getComponent(evt.detail.elt) } if (!component) { @@ -69,7 +69,7 @@ initializeComponentSpinners(component) }, bootstrapRequest(evt) { - const elt = evt.target + const elt = evt.detail.elt let component = getComponent(elt) const componentName = getComponentName(component) @@ -133,13 +133,13 @@ let component = getComponentById(evt.detail.target.id) if (!component) { - if (!evt.target) { + if (!evt.detail.elt) { return } // Needed when using yoyo:select to replace a specific part of the response // so stop spinning callbacks are run to remove animations in the parts of the component // that were not replaced - component = getComponent(evt.target) + component = getComponent(evt.detail.elt) if (component) { spinningStop(component) } @@ -713,7 +713,7 @@ YoyoEngine.defineExtension('yoyo', { } if (name === 'htmx:configRequest') { - if (!evt.target) return + if (!evt.detail.elt) return Yoyo.bootstrapRequest(evt) } @@ -761,7 +761,7 @@ YoyoEngine.defineExtension('yoyo', { } if (name === 'htmx:beforeSwap') { - if (!evt.target) return + if (!evt.detail.elt) return // Add triggering element info to event detail so it can be read in after swap events // For example to push the href url to browser history using the href from the element that's no longer present on the page @@ -794,7 +794,7 @@ YoyoEngine.defineExtension('yoyo', { // Push component response to history cache // Make sure we trigger once for the new element - this was failing in Safari mobile // Causing a duplicate snapshot - if (!evt.target || !evt.target.isConnected) return + if (!evt.detail.elt || !evt.detail.elt.isConnected) return Yoyo.afterSettleActions(evt) } From e39ee96d988120fc4f97867a2cf231d0ac64d922 Mon Sep 17 00:00:00 2001 From: Alejandro S Date: Tue, 16 Apr 2024 09:36:14 -0400 Subject: [PATCH 18/18] Bump version to v0.9.1 --- CHANGELOG.md | 15 ++++++++++++++- composer.json | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6fc3ed..502465e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,19 @@ # Changelog -## [Unreleased](https://github.com/clickfwd/yoyo/compare/0.9.0...develop) +## [Unreleased](https://github.com/clickfwd/yoyo/compare/0.9.1...develop) + +## [0.9.1 (2024-04-16)](https://github.com/clickfwd/yoyo/compare/0.9.0...0.9.1) + +- Fix Safari/iOS errors due to evt.target and evt.srcElement now being null. +- Add support for port in UrlStateManagerService.php +- PHP 8.2/8.3 compat +- Fix ResponseHeaders::refresh error due to missing parameter. +- Fix headers already sent error when setting status code in response +- Ensure components are compiled only once. +- Bump htmx to v1.9.4 and include new config options. +- New Request::set, Request::triggerName and Request::header methods. +- New Response::reselect method for the HX-Reselect header. +- New New Yoyo::actionArgs method. ## [0.9.0 (2023-04-02)](https://github.com/clickfwd/yoyo/compare/0.8.1...0.9.0) diff --git a/composer.json b/composer.json index d9fabb2..73df484 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "framework", "yoyo" ], - "version": "0.9.0", + "version": "0.9.1", "license": "MIT", "homepage": "https://github.com/Clickfwd/yoyo", "support": {