diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e4bc32..054af4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,3 +43,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - refactor: share captured URL-to-path display conversion through `Text::urlToPath()` while retaining original diagnostic URLs and adapter-owned presentation models. - feat(events): add the shared execution inspector, stable chronology, grouped filters, bounded optional context and traces, and explicit lifecycle correlation. - refactor: centralize exception messages and panel titles in typed enums while preserving diagnostics, labels, and configurable names. +- refactor: use shared `PanelIcon` enum values for built-in panel SVG keys. diff --git a/src/Panel/PanelIcon.php b/src/Panel/PanelIcon.php new file mode 100644 index 0000000..94caa26 --- /dev/null +++ b/src/Panel/PanelIcon.php @@ -0,0 +1,88 @@ + 'asset', + 'CONFIGURATION' => 'config', + 'DATABASE' => 'db', + 'DUMP' => 'dump', + 'EVENTS' => 'events', + 'INERTIA' => 'inertia', + 'LOGS' => 'logs', + 'MAIL' => 'mail', + 'PROFILING' => 'profiling', + 'QUEUE' => 'queue', + 'REQUEST' => 'request', + 'ROUTER' => 'router', + 'TIMELINE' => 'timeline', + 'USER' => 'user', + 'VITE' => 'brand-javascript', + ]; + + self::assertCount( + count($keys), + PanelIcon::cases(), + 'Every built-in icon must have a stable key assertion.', + ); + + foreach (PanelIcon::cases() as $icon) { + self::assertSame( + $keys[$icon->name], + $icon->value, + 'Existing panel icon keys must remain unchanged.', + ); + self::assertStringContainsString( + 'value), + 'Every built-in panel icon must resolve to a bundled SVG.', + ); + } + } +}