Compare commits

...

6 commits

Author SHA1 Message Date
Benjamin Nussbaum
677320d45d wip
Some checks failed
tests / ci (push) Has been cancelled
2025-09-15 20:57:40 +02:00
Benjamin Nussbaum
cea5de8b1b wip 2025-09-15 20:32:12 +02:00
Benjamin Nussbaum
3fecfe14bd fix: pint 2025-09-15 20:00:41 +02:00
Benjamin Nussbaum
f7d9618f56 fix(ci): do not add latest tag to pre-releases 2025-09-15 20:00:41 +02:00
Benjamin Nussbaum
12c82e02d7 feat: adds compatibility with TRMNL Design Framework v2 2025-09-15 20:00:41 +02:00
Benjamin Nussbaum
f20977a822 chore: update dependencies 2025-09-14 17:15:11 +02:00
17 changed files with 221 additions and 181 deletions

View file

@ -3,7 +3,7 @@
"laravel-boost": {
"command": "php",
"args": [
"./artisan",
"artisan",
"boost:mcp"
]
}

View file

@ -14,12 +14,16 @@ This application is a Laravel application and its main Laravel ecosystems packag
- php - 8.4.12
- laravel/framework (LARAVEL) - v12
- laravel/prompts (PROMPTS) - v0
- laravel/sanctum (SANCTUM) - v4
- laravel/socialite (SOCIALITE) - v5
- livewire/flux (FLUXUI_FREE) - v2
- livewire/livewire (LIVEWIRE) - v3
- livewire/volt (VOLT) - v1
- larastan/larastan (LARASTAN) - v3
- laravel/pint (PINT) - v1
- laravel/sail (SAIL) - v1
- pestphp/pest (PEST) - v4
- phpunit/phpunit (PHPUNIT) - v12
- tailwindcss (TAILWINDCSS) - v4
@ -384,8 +388,6 @@ $delete = fn(Product $product) => $product->delete();
<!-- HTML / UI Here -->
</code-snippet>
<code-snippet name="Real-Time Search With Volt" lang="php">
<flux:input
wire:model.live.debounce.300ms="search"
@ -393,8 +395,6 @@ $delete = fn(Product $product) => $product->delete();
/>
</code-snippet>
<code-snippet name="Loading States With Volt" lang="php">
<flux:button wire:click="save" wire:loading.attr="disabled">
<span wire:loading.remove>Save</span>
@ -503,8 +503,6 @@ it('may reset the password', function () {
});
</code-snippet>
<code-snippet name="Pest Smoke Testing Example" lang="php">
$pages = visit(['/', '/about', '/contact']);

View file

@ -11,12 +11,16 @@ This application is a Laravel application and its main Laravel ecosystems packag
- php - 8.4.12
- laravel/framework (LARAVEL) - v12
- laravel/prompts (PROMPTS) - v0
- laravel/sanctum (SANCTUM) - v4
- laravel/socialite (SOCIALITE) - v5
- livewire/flux (FLUXUI_FREE) - v2
- livewire/livewire (LIVEWIRE) - v3
- livewire/volt (VOLT) - v1
- larastan/larastan (LARASTAN) - v3
- laravel/pint (PINT) - v1
- laravel/sail (SAIL) - v1
- pestphp/pest (PEST) - v4
- phpunit/phpunit (PHPUNIT) - v12
- tailwindcss (TAILWINDCSS) - v4
@ -381,8 +385,6 @@ $delete = fn(Product $product) => $product->delete();
<!-- HTML / UI Here -->
</code-snippet>
<code-snippet name="Real-Time Search With Volt" lang="php">
<flux:input
wire:model.live.debounce.300ms="search"
@ -390,8 +392,6 @@ $delete = fn(Product $product) => $product->delete();
/>
</code-snippet>
<code-snippet name="Loading States With Volt" lang="php">
<flux:button wire:click="save" wire:loading.attr="disabled">
<span wire:loading.remove>Save</span>
@ -500,8 +500,6 @@ it('may reset the password', function () {
});
</code-snippet>
<code-snippet name="Pest Smoke Testing Example" lang="php">
$pages = visit(['/', '/about', '/contact']);

View file

@ -43,7 +43,7 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=tag
latest
type=raw,value=latest,enable=${{ github.event.release.prerelease == false }}
- name: Build and push Docker image
uses: docker/build-push-action@v6

View file

@ -11,12 +11,16 @@ This application is a Laravel application and its main Laravel ecosystems packag
- php - 8.4.12
- laravel/framework (LARAVEL) - v12
- laravel/prompts (PROMPTS) - v0
- laravel/sanctum (SANCTUM) - v4
- laravel/socialite (SOCIALITE) - v5
- livewire/flux (FLUXUI_FREE) - v2
- livewire/livewire (LIVEWIRE) - v3
- livewire/volt (VOLT) - v1
- larastan/larastan (LARASTAN) - v3
- laravel/pint (PINT) - v1
- laravel/sail (SAIL) - v1
- pestphp/pest (PEST) - v4
- phpunit/phpunit (PHPUNIT) - v12
- tailwindcss (TAILWINDCSS) - v4
@ -381,8 +385,6 @@ $delete = fn(Product $product) => $product->delete();
<!-- HTML / UI Here -->
</code-snippet>
<code-snippet name="Real-Time Search With Volt" lang="php">
<flux:input
wire:model.live.debounce.300ms="search"
@ -390,8 +392,6 @@ $delete = fn(Product $product) => $product->delete();
/>
</code-snippet>
<code-snippet name="Loading States With Volt" lang="php">
<flux:button wire:click="save" wire:loading.attr="disabled">
<span wire:loading.remove>Save</span>
@ -500,8 +500,6 @@ it('may reset the password', function () {
});
</code-snippet>
<code-snippet name="Pest Smoke Testing Example" lang="php">
$pages = visit(['/', '/about', '/contact']);

View file

@ -3,7 +3,7 @@
"laravel-boost": {
"command": "php",
"args": [
"./artisan",
"artisan",
"boost:mcp"
]
}

View file

@ -11,12 +11,16 @@ This application is a Laravel application and its main Laravel ecosystems packag
- php - 8.4.12
- laravel/framework (LARAVEL) - v12
- laravel/prompts (PROMPTS) - v0
- laravel/sanctum (SANCTUM) - v4
- laravel/socialite (SOCIALITE) - v5
- livewire/flux (FLUXUI_FREE) - v2
- livewire/livewire (LIVEWIRE) - v3
- livewire/volt (VOLT) - v1
- larastan/larastan (LARASTAN) - v3
- laravel/pint (PINT) - v1
- laravel/sail (SAIL) - v1
- pestphp/pest (PEST) - v4
- phpunit/phpunit (PHPUNIT) - v12
- tailwindcss (TAILWINDCSS) - v4
@ -381,8 +385,6 @@ $delete = fn(Product $product) => $product->delete();
<!-- HTML / UI Here -->
</code-snippet>
<code-snippet name="Real-Time Search With Volt" lang="php">
<flux:input
wire:model.live.debounce.300ms="search"
@ -390,8 +392,6 @@ $delete = fn(Product $product) => $product->delete();
/>
</code-snippet>
<code-snippet name="Loading States With Volt" lang="php">
<flux:button wire:click="save" wire:loading.attr="disabled">
<span wire:loading.remove>Save</span>
@ -500,8 +500,6 @@ it('may reset the password', function () {
});
</code-snippet>
<code-snippet name="Pest Smoke Testing Example" lang="php">
$pages = visit(['/', '/about', '/contact']);

View file

@ -24,4 +24,13 @@ final class DeviceModel extends Model
'offset_y' => 'integer',
'published_at' => 'datetime',
];
public function getColorDepthAttribute(): ?string
{
if (! $this->bit_depth) {
return null;
}
return $this->bit_depth.'bit';
}
}

View file

@ -278,7 +278,7 @@ class Plugin extends Model
*
* @throws LiquidException
*/
public function render(string $size = 'full', bool $standalone = true): string
public function render(string $size = 'full', bool $standalone = true, ?Device $device = null): string
{
if ($this->render_markup) {
$renderedContent = '';
@ -344,6 +344,7 @@ class Plugin extends Model
if ($standalone) {
return view('trmnl-layouts.single', [
'colorDepth' => $device?->deviceModel?->color_depth,
'slot' => $renderedContent,
])->render();
}
@ -354,6 +355,7 @@ class Plugin extends Model
if ($this->render_markup_view) {
if ($standalone) {
return view('trmnl-layouts.single', [
'colorDepth' => $device?->deviceModel?->color_depth,
'slot' => view($this->render_markup_view, [
'size' => $size,
'data' => $this->data_payload,

View file

@ -7,11 +7,11 @@ use App\Models\Device;
use App\Models\DeviceModel;
use App\Models\Plugin;
use Exception;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use Imagick;
use ImagickException;
use ImagickPixel;
use Log;
use Ramsey\Uuid\Uuid;
use RuntimeException;
use Spatie\Browsershot\Browsershot;
@ -63,6 +63,15 @@ class ImageGenerationService
}
}
// Validate that the PNG file was created and is valid
if (! file_exists($pngPath)) {
throw new RuntimeException('PNG file was not created: '.$pngPath);
}
if (filesize($pngPath) === 0) {
throw new RuntimeException('PNG file is empty: '.$pngPath);
}
// Convert image based on DeviceModel settings or fallback to device settings
self::convertImage($pngPath, $bmpPath, $imageSettings);
@ -293,14 +302,19 @@ class ImageGenerationService
*/
private static function convertToBmpImageMagick(string $pngPath, string $bmpPath): void
{
$imagick = new Imagick($pngPath);
$imagick->setImageType(Imagick::IMGTYPE_GRAYSCALE);
$imagick->quantizeImage(2, Imagick::COLORSPACE_GRAY, 0, true, false);
$imagick->setImageDepth(1);
$imagick->stripImage();
$imagick->setFormat('BMP3');
$imagick->writeImage($bmpPath);
$imagick->clear();
try {
$imagick = new Imagick($pngPath);
$imagick->setImageType(Imagick::IMGTYPE_GRAYSCALE);
$imagick->quantizeImage(2, Imagick::COLORSPACE_GRAY, 0, true, false);
$imagick->setImageDepth(1);
$imagick->stripImage();
$imagick->setFormat('BMP3');
$imagick->writeImage($bmpPath);
$imagick->clear();
} catch (ImagickException $e) {
Log::error('ImageMagick conversion failed for PNG: '.$pngPath.' - '.$e->getMessage());
throw $e;
}
}
/**
@ -308,26 +322,31 @@ class ImageGenerationService
*/
private static function convertToPngImageMagick(string $pngPath, ?int $width, ?int $height, ?int $rotate, $quantize = true): void
{
$imagick = new Imagick($pngPath);
if ($width !== 800 || $height !== 480) {
$imagick->resizeImage($width, $height, Imagick::FILTER_LANCZOS, 1, true);
}
if ($rotate !== null && $rotate !== 0) {
$imagick->rotateImage(new ImagickPixel('black'), $rotate);
}
try {
$imagick = new Imagick($pngPath);
if ($width !== 800 || $height !== 480) {
$imagick->resizeImage($width, $height, Imagick::FILTER_LANCZOS, 1, true);
}
if ($rotate !== null && $rotate !== 0) {
$imagick->rotateImage(new ImagickPixel('black'), $rotate);
}
$imagick->setImageType(Imagick::IMGTYPE_GRAYSCALE);
$imagick->setOption('dither', 'FloydSteinberg');
$imagick->setImageType(Imagick::IMGTYPE_GRAYSCALE);
$imagick->setOption('dither', 'FloydSteinberg');
if ($quantize) {
$imagick->quantizeImage(2, Imagick::COLORSPACE_GRAY, 0, true, false);
if ($quantize) {
$imagick->quantizeImage(2, Imagick::COLORSPACE_GRAY, 0, true, false);
}
$imagick->setImageDepth(8);
$imagick->stripImage();
$imagick->setFormat('png');
$imagick->writeImage($pngPath);
$imagick->clear();
} catch (ImagickException $e) {
Log::error('ImageMagick conversion failed for PNG: '.$pngPath.' - '.$e->getMessage());
throw $e;
}
$imagick->setImageDepth(8);
$imagick->stripImage();
$imagick->setFormat('png');
$imagick->writeImage($pngPath);
$imagick->clear();
}
public static function cleanupFolder(): void

View file

@ -13,7 +13,7 @@
"php": "^8.2",
"ext-imagick": "*",
"ext-zip": "*",
"bnussbau/laravel-trmnl-blade": "1.2.*",
"bnussbau/laravel-trmnl-blade": "2.0.*",
"intervention/image": "^3.11",
"keepsuit/laravel-liquid": "^0.5.2",
"laravel/framework": "^12.1",

242
composer.lock generated
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": "ecbc891180c22676e2d03b6c8a02b6e3",
"content-hash": "349a46b94103f479caae00ca7e6a99c2",
"packages": [
{
"name": "aws/aws-crt-php",
@ -62,16 +62,16 @@
},
{
"name": "aws/aws-sdk-php",
"version": "3.356.8",
"version": "3.356.17",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
"reference": "3efa8c62c11fedb17b90f60b2d3a9f815b406e63"
"reference": "d0357fbe2535bb7d832e594a4ff2ff8da29d229c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/3efa8c62c11fedb17b90f60b2d3a9f815b406e63",
"reference": "3efa8c62c11fedb17b90f60b2d3a9f815b406e63",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/d0357fbe2535bb7d832e594a4ff2ff8da29d229c",
"reference": "d0357fbe2535bb7d832e594a4ff2ff8da29d229c",
"shasum": ""
},
"require": {
@ -84,7 +84,7 @@
"guzzlehttp/psr7": "^2.4.5",
"mtdowling/jmespath.php": "^2.8.0",
"php": ">=8.1",
"psr/http-message": "^2.0"
"psr/http-message": "^1.0 || ^2.0"
},
"require-dev": {
"andrewsville/php-token-reflection": "^1.4",
@ -153,22 +153,22 @@
"support": {
"forum": "https://github.com/aws/aws-sdk-php/discussions",
"issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.356.8"
"source": "https://github.com/aws/aws-sdk-php/tree/3.356.17"
},
"time": "2025-08-29T18:06:18+00:00"
"time": "2025-09-12T18:07:37+00:00"
},
{
"name": "bnussbau/laravel-trmnl-blade",
"version": "1.2.1",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/bnussbau/laravel-trmnl-blade.git",
"reference": "fe11d1d7d896d6f0ea44664c1c6b5f00f1bdab36"
"reference": "3b60522bea8ae5dbca94834706247339e1e53582"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bnussbau/laravel-trmnl-blade/zipball/fe11d1d7d896d6f0ea44664c1c6b5f00f1bdab36",
"reference": "fe11d1d7d896d6f0ea44664c1c6b5f00f1bdab36",
"url": "https://api.github.com/repos/bnussbau/laravel-trmnl-blade/zipball/3b60522bea8ae5dbca94834706247339e1e53582",
"reference": "3b60522bea8ae5dbca94834706247339e1e53582",
"shasum": ""
},
"require": {
@ -223,7 +223,7 @@
],
"support": {
"issues": "https://github.com/bnussbau/laravel-trmnl-blade/issues",
"source": "https://github.com/bnussbau/laravel-trmnl-blade/tree/1.2.1"
"source": "https://github.com/bnussbau/laravel-trmnl-blade/tree/2.0.0"
},
"funding": [
{
@ -239,29 +239,29 @@
"type": "github"
}
],
"time": "2025-08-11T16:14:12+00:00"
"time": "2025-09-14T07:54:31+00:00"
},
{
"name": "brick/math",
"version": "0.13.1",
"version": "0.14.0",
"source": {
"type": "git",
"url": "https://github.com/brick/math.git",
"reference": "fc7ed316430118cc7836bf45faff18d5dfc8de04"
"reference": "113a8ee2656b882d4c3164fa31aa6e12cbb7aaa2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/brick/math/zipball/fc7ed316430118cc7836bf45faff18d5dfc8de04",
"reference": "fc7ed316430118cc7836bf45faff18d5dfc8de04",
"url": "https://api.github.com/repos/brick/math/zipball/113a8ee2656b882d4c3164fa31aa6e12cbb7aaa2",
"reference": "113a8ee2656b882d4c3164fa31aa6e12cbb7aaa2",
"shasum": ""
},
"require": {
"php": "^8.1"
"php": "^8.2"
},
"require-dev": {
"php-coveralls/php-coveralls": "^2.2",
"phpunit/phpunit": "^10.1",
"vimeo/psalm": "6.8.8"
"phpstan/phpstan": "2.1.22",
"phpunit/phpunit": "^11.5"
},
"type": "library",
"autoload": {
@ -291,7 +291,7 @@
],
"support": {
"issues": "https://github.com/brick/math/issues",
"source": "https://github.com/brick/math/tree/0.13.1"
"source": "https://github.com/brick/math/tree/0.14.0"
},
"funding": [
{
@ -299,7 +299,7 @@
"type": "github"
}
],
"time": "2025-03-29T13:50:30+00:00"
"time": "2025-08-29T12:40:03+00:00"
},
{
"name": "carbonphp/carbon-doctrine-types",
@ -1691,20 +1691,20 @@
},
{
"name": "laravel/framework",
"version": "v12.26.4",
"version": "v12.28.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "085a367a32ba86fcfa647bfc796098ae6f795b09"
"reference": "868c1f2d3dba4df6d21e3a8d818479f094cfd942"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/085a367a32ba86fcfa647bfc796098ae6f795b09",
"reference": "085a367a32ba86fcfa647bfc796098ae6f795b09",
"url": "https://api.github.com/repos/laravel/framework/zipball/868c1f2d3dba4df6d21e3a8d818479f094cfd942",
"reference": "868c1f2d3dba4df6d21e3a8d818479f094cfd942",
"shasum": ""
},
"require": {
"brick/math": "^0.11|^0.12|^0.13",
"brick/math": "^0.11|^0.12|^0.13|^0.14",
"composer-runtime-api": "^2.2",
"doctrine/inflector": "^2.0.5",
"dragonmantank/cron-expression": "^3.4",
@ -1778,6 +1778,7 @@
"illuminate/filesystem": "self.version",
"illuminate/hashing": "self.version",
"illuminate/http": "self.version",
"illuminate/json-schema": "self.version",
"illuminate/log": "self.version",
"illuminate/macroable": "self.version",
"illuminate/mail": "self.version",
@ -1810,7 +1811,8 @@
"league/flysystem-read-only": "^3.25.1",
"league/flysystem-sftp-v3": "^3.25.1",
"mockery/mockery": "^1.6.10",
"orchestra/testbench-core": "^10.6.3",
"opis/json-schema": "^2.4.1",
"orchestra/testbench-core": "^10.6.5",
"pda/pheanstalk": "^5.0.6|^7.0.0",
"php-http/discovery": "^1.15",
"phpstan/phpstan": "^2.0",
@ -1904,7 +1906,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2025-08-29T14:15:53+00:00"
"time": "2025-09-04T14:58:12+00:00"
},
{
"name": "laravel/prompts",
@ -2857,16 +2859,16 @@
},
{
"name": "livewire/flux",
"version": "v2.2.6",
"version": "v2.3.2",
"source": {
"type": "git",
"url": "https://github.com/livewire/flux.git",
"reference": "a0e8f33a5cd54ead4d8e27721961425ccbae2e33"
"reference": "e0704b125d5f9544aa32e0cfccb11baaf44d77a0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/livewire/flux/zipball/a0e8f33a5cd54ead4d8e27721961425ccbae2e33",
"reference": "a0e8f33a5cd54ead4d8e27721961425ccbae2e33",
"url": "https://api.github.com/repos/livewire/flux/zipball/e0704b125d5f9544aa32e0cfccb11baaf44d77a0",
"reference": "e0704b125d5f9544aa32e0cfccb11baaf44d77a0",
"shasum": ""
},
"require": {
@ -2917,9 +2919,9 @@
],
"support": {
"issues": "https://github.com/livewire/flux/issues",
"source": "https://github.com/livewire/flux/tree/v2.2.6"
"source": "https://github.com/livewire/flux/tree/v2.3.2"
},
"time": "2025-08-27T02:05:01+00:00"
"time": "2025-09-08T01:11:34+00:00"
},
{
"name": "livewire/livewire",
@ -3318,16 +3320,16 @@
},
{
"name": "nesbot/carbon",
"version": "3.10.2",
"version": "3.10.3",
"source": {
"type": "git",
"url": "https://github.com/CarbonPHP/carbon.git",
"reference": "76b5c07b8a9d2025ed1610e14cef1f3fd6ad2c24"
"reference": "8e3643dcd149ae0fe1d2ff4f2c8e4bbfad7c165f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/76b5c07b8a9d2025ed1610e14cef1f3fd6ad2c24",
"reference": "76b5c07b8a9d2025ed1610e14cef1f3fd6ad2c24",
"url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/8e3643dcd149ae0fe1d2ff4f2c8e4bbfad7c165f",
"reference": "8e3643dcd149ae0fe1d2ff4f2c8e4bbfad7c165f",
"shasum": ""
},
"require": {
@ -3345,13 +3347,13 @@
"require-dev": {
"doctrine/dbal": "^3.6.3 || ^4.0",
"doctrine/orm": "^2.15.2 || ^3.0",
"friendsofphp/php-cs-fixer": "^3.75.0",
"friendsofphp/php-cs-fixer": "^v3.87.1",
"kylekatarnls/multi-tester": "^2.5.3",
"phpmd/phpmd": "^2.15.0",
"phpstan/extension-installer": "^1.4.3",
"phpstan/phpstan": "^2.1.17",
"phpunit/phpunit": "^10.5.46",
"squizlabs/php_codesniffer": "^3.13.0"
"phpstan/phpstan": "^2.1.22",
"phpunit/phpunit": "^10.5.53",
"squizlabs/php_codesniffer": "^3.13.4"
},
"bin": [
"bin/carbon"
@ -3419,7 +3421,7 @@
"type": "tidelift"
}
],
"time": "2025-08-02T09:36:06+00:00"
"time": "2025-09-06T13:39:36+00:00"
},
{
"name": "nette/schema",
@ -4631,20 +4633,20 @@
},
{
"name": "ramsey/uuid",
"version": "4.9.0",
"version": "4.9.1",
"source": {
"type": "git",
"url": "https://github.com/ramsey/uuid.git",
"reference": "4e0e23cc785f0724a0e838279a9eb03f28b092a0"
"reference": "81f941f6f729b1e3ceea61d9d014f8b6c6800440"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ramsey/uuid/zipball/4e0e23cc785f0724a0e838279a9eb03f28b092a0",
"reference": "4e0e23cc785f0724a0e838279a9eb03f28b092a0",
"url": "https://api.github.com/repos/ramsey/uuid/zipball/81f941f6f729b1e3ceea61d9d014f8b6c6800440",
"reference": "81f941f6f729b1e3ceea61d9d014f8b6c6800440",
"shasum": ""
},
"require": {
"brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13",
"brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13 || ^0.14",
"php": "^8.0",
"ramsey/collection": "^1.2 || ^2.0"
},
@ -4703,9 +4705,9 @@
],
"support": {
"issues": "https://github.com/ramsey/uuid/issues",
"source": "https://github.com/ramsey/uuid/tree/4.9.0"
"source": "https://github.com/ramsey/uuid/tree/4.9.1"
},
"time": "2025-06-25T14:20:11+00:00"
"time": "2025-09-04T20:59:21+00:00"
},
{
"name": "spatie/browsershot",
@ -8382,16 +8384,16 @@
},
{
"name": "larastan/larastan",
"version": "v3.6.1",
"version": "v3.7.1",
"source": {
"type": "git",
"url": "https://github.com/larastan/larastan.git",
"reference": "3c223047e374befd1b64959784685d6ecccf66aa"
"reference": "2e653fd19585a825e283b42f38378b21ae481cc7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/larastan/larastan/zipball/3c223047e374befd1b64959784685d6ecccf66aa",
"reference": "3c223047e374befd1b64959784685d6ecccf66aa",
"url": "https://api.github.com/repos/larastan/larastan/zipball/2e653fd19585a825e283b42f38378b21ae481cc7",
"reference": "2e653fd19585a825e283b42f38378b21ae481cc7",
"shasum": ""
},
"require": {
@ -8405,7 +8407,7 @@
"illuminate/pipeline": "^11.44.2 || ^12.4.1",
"illuminate/support": "^11.44.2 || ^12.4.1",
"php": "^8.2",
"phpstan/phpstan": "^2.1.11"
"phpstan/phpstan": "^2.1.23"
},
"require-dev": {
"doctrine/coding-standard": "^13",
@ -8459,7 +8461,7 @@
],
"support": {
"issues": "https://github.com/larastan/larastan/issues",
"source": "https://github.com/larastan/larastan/tree/v3.6.1"
"source": "https://github.com/larastan/larastan/tree/v3.7.1"
},
"funding": [
{
@ -8467,20 +8469,20 @@
"type": "github"
}
],
"time": "2025-08-25T07:24:56+00:00"
"time": "2025-09-10T19:42:11+00:00"
},
{
"name": "laravel/boost",
"version": "v1.0.20",
"version": "v1.1.4",
"source": {
"type": "git",
"url": "https://github.com/laravel/boost.git",
"reference": "c2ac67ce42c39ffe6c3c073c9202d54a96eaa5b5"
"reference": "70f909465bf73dad7e791fad8b7716b3b2712076"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/boost/zipball/c2ac67ce42c39ffe6c3c073c9202d54a96eaa5b5",
"reference": "c2ac67ce42c39ffe6c3c073c9202d54a96eaa5b5",
"url": "https://api.github.com/repos/laravel/boost/zipball/70f909465bf73dad7e791fad8b7716b3b2712076",
"reference": "70f909465bf73dad7e791fad8b7716b3b2712076",
"shasum": ""
},
"require": {
@ -8491,7 +8493,7 @@
"illuminate/support": "^10.0|^11.0|^12.0",
"laravel/mcp": "^0.1.1",
"laravel/prompts": "^0.1.9|^0.3",
"laravel/roster": "^0.2.4",
"laravel/roster": "^0.2.5",
"php": "^8.1"
},
"require-dev": {
@ -8532,7 +8534,7 @@
"issues": "https://github.com/laravel/boost/issues",
"source": "https://github.com/laravel/boost"
},
"time": "2025-08-28T14:46:17+00:00"
"time": "2025-09-04T12:16:09+00:00"
},
{
"name": "laravel/mcp",
@ -8748,16 +8750,16 @@
},
{
"name": "laravel/roster",
"version": "v0.2.5",
"version": "v0.2.6",
"source": {
"type": "git",
"url": "https://github.com/laravel/roster.git",
"reference": "0252fa419733c61b3ebeba8e4e2b9ad2a63f3a17"
"reference": "5615acdf860c5a5c61d04aba44f2d3312550c514"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/roster/zipball/0252fa419733c61b3ebeba8e4e2b9ad2a63f3a17",
"reference": "0252fa419733c61b3ebeba8e4e2b9ad2a63f3a17",
"url": "https://api.github.com/repos/laravel/roster/zipball/5615acdf860c5a5c61d04aba44f2d3312550c514",
"reference": "5615acdf860c5a5c61d04aba44f2d3312550c514",
"shasum": ""
},
"require": {
@ -8805,7 +8807,7 @@
"issues": "https://github.com/laravel/roster/issues",
"source": "https://github.com/laravel/roster"
},
"time": "2025-08-29T07:47:42+00:00"
"time": "2025-09-04T07:31:39+00:00"
},
{
"name": "laravel/sail",
@ -9114,39 +9116,39 @@
},
{
"name": "pestphp/pest",
"version": "v4.0.4",
"version": "v4.1.0",
"source": {
"type": "git",
"url": "https://github.com/pestphp/pest.git",
"reference": "47fb1d77631d608022cc7af96cac90ac741c8394"
"reference": "b7406938ac9e8d08cf96f031922b0502a8523268"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pestphp/pest/zipball/47fb1d77631d608022cc7af96cac90ac741c8394",
"reference": "47fb1d77631d608022cc7af96cac90ac741c8394",
"url": "https://api.github.com/repos/pestphp/pest/zipball/b7406938ac9e8d08cf96f031922b0502a8523268",
"reference": "b7406938ac9e8d08cf96f031922b0502a8523268",
"shasum": ""
},
"require": {
"brianium/paratest": "^7.11.2",
"brianium/paratest": "^7.12.0",
"nunomaduro/collision": "^8.8.2",
"nunomaduro/termwind": "^2.3.1",
"pestphp/pest-plugin": "^4.0.0",
"pestphp/pest-plugin-arch": "^4.0.0",
"pestphp/pest-plugin-mutate": "^4.0.1",
"pestphp/pest-plugin-profanity": "^4.0.1",
"pestphp/pest-plugin-profanity": "^4.1.0",
"php": "^8.3.0",
"phpunit/phpunit": "^12.3.7",
"symfony/process": "^7.3.0"
"phpunit/phpunit": "^12.3.8",
"symfony/process": "^7.3.3"
},
"conflict": {
"filp/whoops": "<2.18.3",
"phpunit/phpunit": ">12.3.7",
"phpunit/phpunit": ">12.3.8",
"sebastian/exporter": "<7.0.0",
"webmozart/assert": "<1.11.0"
},
"require-dev": {
"pestphp/pest-dev-tools": "^4.0.0",
"pestphp/pest-plugin-browser": "^4.0.2",
"pestphp/pest-plugin-browser": "^4.1.0",
"pestphp/pest-plugin-type-coverage": "^4.0.2",
"psy/psysh": "^0.12.10"
},
@ -9214,7 +9216,7 @@
],
"support": {
"issues": "https://github.com/pestphp/pest/issues",
"source": "https://github.com/pestphp/pest/tree/v4.0.4"
"source": "https://github.com/pestphp/pest/tree/v4.1.0"
},
"funding": [
{
@ -9226,7 +9228,7 @@
"type": "github"
}
],
"time": "2025-08-28T18:19:42+00:00"
"time": "2025-09-10T13:41:09+00:00"
},
{
"name": "pestphp/pest-plugin",
@ -9589,16 +9591,16 @@
},
{
"name": "pestphp/pest-plugin-profanity",
"version": "v4.0.1",
"version": "v4.1.0",
"source": {
"type": "git",
"url": "https://github.com/pestphp/pest-plugin-profanity.git",
"reference": "823d5d8ae07a265c70f5e1a9ce50639543b0bf11"
"reference": "e279c844b6868da92052be27b5202c2ad7216e80"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pestphp/pest-plugin-profanity/zipball/823d5d8ae07a265c70f5e1a9ce50639543b0bf11",
"reference": "823d5d8ae07a265c70f5e1a9ce50639543b0bf11",
"url": "https://api.github.com/repos/pestphp/pest-plugin-profanity/zipball/e279c844b6868da92052be27b5202c2ad7216e80",
"reference": "e279c844b6868da92052be27b5202c2ad7216e80",
"shasum": ""
},
"require": {
@ -9639,9 +9641,9 @@
"unit"
],
"support": {
"source": "https://github.com/pestphp/pest-plugin-profanity/tree/v4.0.1"
"source": "https://github.com/pestphp/pest-plugin-profanity/tree/v4.1.0"
},
"time": "2025-08-20T12:58:03+00:00"
"time": "2025-09-10T06:17:03+00:00"
},
{
"name": "phar-io/manifest",
@ -9985,16 +9987,16 @@
},
{
"name": "phpstan/phpstan",
"version": "2.1.22",
"version": "2.1.25",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "41600c8379eb5aee63e9413fe9e97273e25d57e4"
"reference": "4087d28bd252895874e174d65e26b2c202ed893a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/41600c8379eb5aee63e9413fe9e97273e25d57e4",
"reference": "41600c8379eb5aee63e9413fe9e97273e25d57e4",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/4087d28bd252895874e174d65e26b2c202ed893a",
"reference": "4087d28bd252895874e174d65e26b2c202ed893a",
"shasum": ""
},
"require": {
@ -10039,20 +10041,20 @@
"type": "github"
}
],
"time": "2025-08-04T19:17:37+00:00"
"time": "2025-09-12T14:26:42+00:00"
},
{
"name": "phpunit/php-code-coverage",
"version": "12.3.5",
"version": "12.3.7",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "96dc0466673e215bf5536301039017f03cd45c6b"
"reference": "bbede0f5593dad37af3be6a6f8e6ae1885e8a0a9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/96dc0466673e215bf5536301039017f03cd45c6b",
"reference": "96dc0466673e215bf5536301039017f03cd45c6b",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/bbede0f5593dad37af3be6a6f8e6ae1885e8a0a9",
"reference": "bbede0f5593dad37af3be6a6f8e6ae1885e8a0a9",
"shasum": ""
},
"require": {
@ -10108,7 +10110,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/12.3.5"
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/12.3.7"
},
"funding": [
{
@ -10128,7 +10130,7 @@
"type": "tidelift"
}
],
"time": "2025-09-01T08:07:42+00:00"
"time": "2025-09-10T09:59:06+00:00"
},
{
"name": "phpunit/php-file-iterator",
@ -10377,16 +10379,16 @@
},
{
"name": "phpunit/phpunit",
"version": "12.3.7",
"version": "12.3.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "b8fa997c49682979ad6bfaa0d7fb25f54954965e"
"reference": "9d68c1b41fc21aac106c71cde4669fe7b99fca10"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b8fa997c49682979ad6bfaa0d7fb25f54954965e",
"reference": "b8fa997c49682979ad6bfaa0d7fb25f54954965e",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9d68c1b41fc21aac106c71cde4669fe7b99fca10",
"reference": "9d68c1b41fc21aac106c71cde4669fe7b99fca10",
"shasum": ""
},
"require": {
@ -10400,7 +10402,7 @@
"phar-io/manifest": "^2.0.4",
"phar-io/version": "^3.2.1",
"php": ">=8.3",
"phpunit/php-code-coverage": "^12.3.3",
"phpunit/php-code-coverage": "^12.3.6",
"phpunit/php-file-iterator": "^6.0.0",
"phpunit/php-invoker": "^6.0.0",
"phpunit/php-text-template": "^5.0.0",
@ -10410,7 +10412,7 @@
"sebastian/diff": "^7.0.0",
"sebastian/environment": "^8.0.3",
"sebastian/exporter": "^7.0.0",
"sebastian/global-state": "^8.0.0",
"sebastian/global-state": "^8.0.2",
"sebastian/object-enumerator": "^7.0.0",
"sebastian/type": "^6.0.3",
"sebastian/version": "^6.0.0",
@ -10454,7 +10456,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/12.3.7"
"source": "https://github.com/sebastianbergmann/phpunit/tree/12.3.8"
},
"funding": [
{
@ -10478,20 +10480,20 @@
"type": "tidelift"
}
],
"time": "2025-08-28T05:15:46+00:00"
"time": "2025-09-03T06:25:17+00:00"
},
{
"name": "sebastian/cli-parser",
"version": "4.0.0",
"version": "4.2.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/cli-parser.git",
"reference": "6d584c727d9114bcdc14c86711cd1cad51778e7c"
"reference": "90f41072d220e5c40df6e8635f5dafba2d9d4d04"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/6d584c727d9114bcdc14c86711cd1cad51778e7c",
"reference": "6d584c727d9114bcdc14c86711cd1cad51778e7c",
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/90f41072d220e5c40df6e8635f5dafba2d9d4d04",
"reference": "90f41072d220e5c40df6e8635f5dafba2d9d4d04",
"shasum": ""
},
"require": {
@ -10503,7 +10505,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "4.0-dev"
"dev-main": "4.2-dev"
}
},
"autoload": {
@ -10527,15 +10529,27 @@
"support": {
"issues": "https://github.com/sebastianbergmann/cli-parser/issues",
"security": "https://github.com/sebastianbergmann/cli-parser/security/policy",
"source": "https://github.com/sebastianbergmann/cli-parser/tree/4.0.0"
"source": "https://github.com/sebastianbergmann/cli-parser/tree/4.2.0"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
},
{
"url": "https://liberapay.com/sebastianbergmann",
"type": "liberapay"
},
{
"url": "https://thanks.dev/u/gh/sebastianbergmann",
"type": "thanks_dev"
},
{
"url": "https://tidelift.com/funding/github/packagist/sebastian/cli-parser",
"type": "tidelift"
}
],
"time": "2025-02-07T04:53:50+00:00"
"time": "2025-09-14T09:36:45+00:00"
},
{
"name": "sebastian/comparator",

12
package-lock.json generated
View file

@ -1186,9 +1186,9 @@
}
},
"node_modules/axios": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.11.0.tgz",
"integrity": "sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==",
"version": "1.12.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz",
"integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==",
"license": "MIT",
"dependencies": {
"follow-redirects": "^1.15.6",
@ -3112,9 +3112,9 @@
}
},
"node_modules/vite": {
"version": "6.3.5",
"resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz",
"integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==",
"version": "6.3.6",
"resolved": "https://registry.npmjs.org/vite/-/vite-6.3.6.tgz",
"integrity": "sha512-0msEVHJEScQbhkbVTb/4iHZdJ6SXp/AvxL2sjwYQFfBqleHtnCqv1J3sa9zbWz/6kW1m9Tfzn92vW+kZ1WV6QA==",
"license": "MIT",
"dependencies": {
"esbuild": "^0.25.0",

View file

@ -1,3 +1,7 @@
<x-trmnl::screen>
@props([
'colorDepth' => '1bit',
])
<x-trmnl::screen colorDepth="{{$colorDepth}}">
{!! $slot !!}
</x-trmnl::screen>

View file

@ -3,7 +3,7 @@
'darkMode' => false,
'deviceVariant' => 'og',
'deviceOrientation' => null,
'colorDepth' => '2bit',
'colorDepth' => '1bit',
'scaleLevel' => null,
])

View file

@ -85,7 +85,7 @@ Route::get('/display', function (Request $request) {
// Check and update stale data if needed
if ($plugin->isDataStale() || $plugin->current_image === null) {
$plugin->updateDataPayload();
$markup = $plugin->render();
$markup = $plugin->render(device: $device);
GenerateScreenJob::dispatchSync($device->id, $plugin->id, $markup);
}

View file

@ -39,9 +39,9 @@ it('loads plugins from catalog URL', function () {
'zip_url' => 'https://example.com/plugin.zip',
],
'byos' => [
'byos_laravel' => [
'compatibility' => true,
]
'byos_laravel' => [
'compatibility' => true,
],
],
'logo_url' => 'https://example.com/logo.png',
],