-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWidgetComponentEnum.php
More file actions
44 lines (40 loc) · 2.08 KB
/
Copy pathWidgetComponentEnum.php
File metadata and controls
44 lines (40 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
declare(strict_types=1);
namespace Capell\ThemeLiquidGlass\Enums;
use Capell\ThemeLiquidGlass\LiquidGlassThemeServiceProvider;
/**
* Liquid Glass's own bespoke layout-builder widget component keys.
*
* These are registered against the shared, cross-package
* `Capell\Core\Support\Renderables\RenderableRegistry` (type
* `layout-widget`) by {@see LiquidGlassThemeServiceProvider},
* mirroring the established pattern `Capell\Blog\Providers\BlogServiceProvider`
* and `Capell\LayoutBuilder\Support\LayoutBuilderCoreRegistrar` already use
* for their own widget component enums: a `Widget` row's `meta.component`
* (or `component` column) is set to one of these case *values*, and
* `Widget::getComponent()` resolves that key to the real Blade view through
* `RenderableRegistry` before `<x-dynamic-component>` renders it.
*
* These three are Liquid Glass's own bespoke, non-foundation sections (cta,
* showcase, presets) — see LiquidGlassThemeServiceProvider's widget mapping
* docblock for why navigation/footer/hero/features/proof/content-listing do
* not need bespoke component keys of their own.
*
* Wave 4c (§D "Free pair", programme headline "glassmorphism showcase") adds
* five signature widgets on top of the original three: GlassFeatureCard,
* TranslucentStatBand, LayeredDepthHero, RefractionGrid, and
* FloatingGlassNav — see each one's own Blade view for its variant/payload
* contract and `LiquidGlassThemeServiceProvider::registerBespokeWidgetRenderables()`
* for how they are registered.
*/
enum WidgetComponentEnum: string
{
case Cta = 'capell.widget.liquid-glass.cta';
case Showcase = 'capell.widget.liquid-glass.showcase';
case Presets = 'capell.widget.liquid-glass.presets';
case GlassFeatureCard = 'capell.widget.liquid-glass.glass-feature-card';
case TranslucentStatBand = 'capell.widget.liquid-glass.translucent-stat-band';
case LayeredDepthHero = 'capell.widget.liquid-glass.layered-depth-hero';
case RefractionGrid = 'capell.widget.liquid-glass.refraction-grid';
case FloatingGlassNav = 'capell.widget.liquid-glass.floating-glass-nav';
}