Use livewire/blaze to speed up views

This commit is contained in:
DariusIII
2026-02-24 21:51:06 +01:00
parent ec98395cde
commit 3759ce2ae1
26 changed files with 162 additions and 1 deletions
+1
View File
@@ -27,6 +27,7 @@ class AppServiceProvider extends ServiceProvider
{
Paginator::useTailwind();
// Share global data with layouts and all admin views
// Admin child views need direct registration because @section blocks
// are evaluated before the layout composer runs
+2
View File
@@ -67,6 +67,7 @@
"laravel/tinker": "^2.10.1",
"laravel/ui": "^4.6",
"leventcz/laravel-top": "^1.2",
"livewire/blaze": "^1.0",
"livewire/livewire": "^3.6",
"livewire/volt": "^1.6",
"mailerlite/laravel-elasticsearch": "^11.2",
@@ -84,6 +85,7 @@
"sentry/sentry-laravel": "^4.13",
"spatie/laravel-directory-cleanup": "^1.10",
"spatie/laravel-fractal": "^6.3",
"spatie/laravel-html": "^3.13",
"spatie/laravel-ignition": "^2.9",
"spatie/laravel-image-optimizer": "^1.8",
"spatie/laravel-permission": "^7.0.0",
Generated
+136 -1
View File
@@ -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": "e613b6a8e65f476554f9e78b14a32c15",
"content-hash": "7ad69d6fae92e4f969fec8d85a796a09",
"packages": [
{
"name": "aharen/omdbapi",
@@ -4271,6 +4271,63 @@
},
"time": "2025-03-02T22:07:29+00:00"
},
{
"name": "livewire/blaze",
"version": "v1.0.0",
"source": {
"type": "git",
"url": "https://github.com/livewire/blaze.git",
"reference": "f585b2af3c319ac71553cf93e780a626c4ebe02b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/livewire/blaze/zipball/f585b2af3c319ac71553cf93e780a626c4ebe02b",
"reference": "f585b2af3c319ac71553cf93e780a626c4ebe02b",
"shasum": ""
},
"require": {
"illuminate/support": "^10.0|^11.0|^12.0",
"illuminate/view": "^10.0|^11.0|^12.0",
"php": "^8.1"
},
"conflict": {
"livewire/flux": "<2.12.1"
},
"require-dev": {
"livewire/flux": "dev-main",
"orchestra/testbench": "^8.0|^9.0|^10.0",
"pestphp/pest": "^2.0|^3.0",
"pestphp/pest-plugin-laravel": "^2.0|^3.0"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Livewire\\Blaze\\BlazeServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Livewire\\Blaze\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Caleb Porzio"
}
],
"description": "A tool for optimizing Blade component performance by folding them into parent templates",
"support": {
"issues": "https://github.com/livewire/blaze/issues",
"source": "https://github.com/livewire/blaze/tree/v1.0.0"
},
"time": "2026-02-24T16:02:42+00:00"
},
{
"name": "livewire/livewire",
"version": "v3.7.10",
@@ -8115,6 +8172,84 @@
],
"time": "2026-02-21T15:58:07+00:00"
},
{
"name": "spatie/laravel-html",
"version": "3.13.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-html.git",
"reference": "0579bf41959b4c4068206ec9bf1fcd1b59d8fa25"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-html/zipball/0579bf41959b4c4068206ec9bf1fcd1b59d8fa25",
"reference": "0579bf41959b4c4068206ec9bf1fcd1b59d8fa25",
"shasum": ""
},
"require": {
"illuminate/http": "^10.0|^11.0|^12.0|^13.0",
"illuminate/support": "^10.0|^11.0|^12.0|^13.0",
"php": "^8.2"
},
"require-dev": {
"mockery/mockery": "^1.3",
"orchestra/testbench": "^8.0|^9.0|^10.0|^11.0",
"pestphp/pest": "^2.34|^3.7|^4.0"
},
"type": "library",
"extra": {
"laravel": {
"aliases": {
"Html": "Spatie\\Html\\Facades\\Html"
},
"providers": [
"Spatie\\Html\\HtmlServiceProvider"
]
}
},
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Spatie\\Html\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Sebastian De Deyne",
"email": "sebastian@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
},
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "A fluent html builder",
"homepage": "https://github.com/spatie/laravel-html",
"keywords": [
"html",
"spatie"
],
"support": {
"source": "https://github.com/spatie/laravel-html/tree/3.13.0"
},
"funding": [
{
"url": "https://spatie.be/open-source/support-us",
"type": "custom"
}
],
"time": "2026-02-22T09:05:56+00:00"
},
{
"name": "spatie/laravel-ignition",
"version": "2.11.0",
@@ -1,3 +1,4 @@
@blaze(fold: true)
<!-- resources/views/components/application-logo.blade.php -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6">
<path d="M12 0L24 24H0z"/>

Before

Width:  |  Height:  |  Size: 198 B

After

Width:  |  Height:  |  Size: 217 B

@@ -1,3 +1,4 @@
@blaze
@props([
'type' => 'default'
])
@@ -1,3 +1,4 @@
@blaze(fold: true)
<div class="flex items-center [&_a:first-child]:rounded-r-none [&_a:last-child]:rounded-l-none" role="group">
{{ $slot }}
</div>
@@ -1,3 +1,4 @@
@blaze(fold: true)
<a {{ $attributes->merge(['class' => 'bg-blue-500 text-white px-3 py-2 rounded-lg inline-block transition']) }}>
{{ $slot }}
</a>
@@ -1,3 +1,4 @@
@blaze(fold: true)
<button {{ $attributes->merge(['class' => 'bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-2 rounded-lg inline-block transition']) }}>
{{ $slot }}
</button>
@@ -1,3 +1,4 @@
@blaze(fold: true)
<button {{ $attributes->merge(['class' => 'bg-blue-500 text-white px-3 py-2 rounded-lg inline-block transition']) }}>
{{ $slot }}
</button>
@@ -1,3 +1,4 @@
@blaze
@props(['label', 'for', 'help' => null])
<div class="space-y-1">
@@ -1,3 +1,4 @@
@blaze
@props([
'type' => 'default'
])
@@ -1,3 +1,4 @@
@blaze(fold: true)
<div class="flex items-center [&_a:first-child]:rounded-r-none [&_a:last-child]:rounded-l-none" role="group">
{{ $slot }}
</div>
@@ -1,3 +1,4 @@
@blaze(fold: true)
<a {{ $attributes->merge(['class' => 'bg-blue-500 text-white px-3 py-2 rounded-lg inline-block transition']) }}>
{{ $slot }}
</a>
@@ -1,3 +1,4 @@
@blaze(fold: true)
<button {{ $attributes->merge(['class' => 'bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-2 rounded-lg inline-block transition']) }}>
{{ $slot }}
</button>
@@ -1,3 +1,4 @@
@blaze(fold: true)
<button {{ $attributes->merge(['class' => 'bg-blue-500 text-white px-3 py-2 rounded-lg inline-block transition']) }}>
{{ $slot }}
</button>
@@ -1 +1,2 @@
@blaze(fold: true)
<input {{ $attributes->merge(['type' => 'text', 'class' => 'px-3 py-2 border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:ring-blue-500 rounded-lg border shadow-sm bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 transition']) }}>
@@ -1,3 +1,4 @@
@blaze(fold: true)
<label {{ $attributes->merge(['class' => 'block w-full mb-1']) }}>
{{ $slot }}
</label>
@@ -1,3 +1,4 @@
@blaze(fold: true)
<div class="inline-block relative w-64">
<select {{ $attributes->merge(['class' => 'block appearance-none w-full bg-white dark:bg-gray-800 border border-gray-400 hover:border-gray-500 px-4 py-2 pr-8 rounded-lg shadow leading-tight focus:outline-none focus:shadow-outline']) }}>
{{ $slot }}
@@ -1 +1,2 @@
@blaze(fold: true)
<textarea {{ $attributes->merge(['type' => 'text', 'class' => 'px-3 py-2 border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:ring-blue-500 rounded-lg border shadow-sm bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 transition']) }}>{{ $slot }}</textarea>
@@ -1,2 +1,3 @@
@blaze(fold: true)
<input {{ $attributes->merge(['type' => 'text', 'class' => 'px-3 py-2 border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:ring-blue-500 rounded-lg border shadow-sm bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 transition']) }}>
@@ -1,3 +1,4 @@
@blaze(fold: true)
<label {{ $attributes->merge(['class' => 'block w-full mb-1']) }}>
{{ $slot }}
</label>
@@ -1,3 +1,4 @@
@blaze
{{-- Report button trigger - the modal is rendered once in layouts/main via partials/report-modal --}}
@props([
'releaseId' => null,
@@ -1,3 +1,4 @@
@blaze
@props([
'placeholder' => 'Search releases...',
'name' => 'search',
@@ -1,3 +1,4 @@
@blaze(fold: true)
<select {{ $attributes->merge(['class' => 'px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 transition']) }}>
{{ $slot }}
</select>
@@ -1 +1,2 @@
@blaze(fold: true)
<textarea {{ $attributes->merge(['type' => 'text', 'class' => 'px-3 py-2 border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:ring-blue-500 rounded-lg border shadow-sm bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 transition']) }}>{{ $slot }}</textarea>
@@ -1,3 +1,4 @@
@blaze
@props([
'currentView' => 'list',
'covgroup' => null,