euv-example 0.48.2

Cross-platform native showcase application demonstrating euv fine-grained reactivity, multi-mode rendering, window controls, and euv-ui components.
Documentation
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
use super::*;

/// Decoded Media Studio sample assets assembled off the UI critical path and committed atomically.
#[derive(Clone, Getter)]
pub struct MediaSampleBundle {
    /// Decoded LZW GIF89a animation sample.
    pub(crate) gif: GifAnimation,
    /// Sample LIVE Photo motion asset.
    pub(crate) live: LivePhotoAsset,
    /// Decoded ISOBMFF MP4 HDR video track.
    pub(crate) video: VideoTrack,
    /// Synthesized WAV audio waveform track.
    pub(crate) audio: AudioTrack,
    /// Multi-page native PDF sample document.
    pub(crate) pdf: PdfDocument,
}

/// Pre-built `.wasm` OTA registry entry `(url, bytes, etag, fault)` generated off the UI critical path.
#[derive(Clone, Getter)]
pub struct WasmRegistryEntry {
    /// Target CDN bundle URL.
    pub(crate) url: String,
    /// Encoded WebAssembly module bytes.
    pub(crate) bytes: Vec<u8>,
    /// Cache ETag token for conditional fetches.
    pub(crate) etag: String,
    /// Fault injection mode exercised by the registry fetcher.
    #[get(type(copy))]
    pub(crate) fault: WasmFaultKind,
}

/// Collection of pre-built `.wasm` OTA registry payloads generated off the UI critical path.
#[derive(Clone, Getter)]
pub struct WasmSampleBundle {
    /// Ordered list of registry entries ready to register on the UI thread.
    pub(crate) entries: Vec<WasmRegistryEntry>,
}

/// Lazily initialized signals powering the `/reactive` showcase page.
#[derive(Clone, Copy, Getter)]
pub struct ReactiveSignals {
    /// Interactive counter signal for fine-grained reactivity demos.
    #[get(type(copy))]
    pub(crate) counter: Signal<i32>,
    /// Derived memo computing `counter * 2` without redundant notifications.
    #[get(type(copy))]
    pub(crate) doubled: Memo<i32>,
}

/// Lazily initialized signals powering the `/render` and `/window` showcase pages.
#[derive(Clone, Copy, Getter)]
pub struct RenderWindowSignals {
    /// Active component-scoped demo render pipeline preview index (`0 = Auto`, `1 = Software`, `2 = Hardware`, `3 = Hybrid`).
    #[get(type(copy))]
    pub(crate) render_mode_index: Signal<usize>,
    /// Active component-scoped demo FPS cap index on `/window` (`0 = Native Uncapped` .. `6 = 360`).
    #[get(type(copy))]
    pub(crate) demo_fps_cap_index: Signal<usize>,
    /// Controlled fullscreen window toggle state.
    #[get(type(copy))]
    pub(crate) fullscreen: Signal<bool>,
    /// Live Dynamic Island / Live Activity active state.
    #[get(type(copy))]
    pub(crate) island_active: Signal<bool>,
    /// Live Dynamic Island progress percentage (`0..=100`).
    #[get(type(copy))]
    pub(crate) island_progress: Signal<u8>,
    /// Live Camera system permission status text.
    #[get(type(copy))]
    pub(crate) camera_perm_status: Signal<String>,
    /// Live protocol registration and deep link telemetry text.
    #[get(type(copy))]
    pub(crate) protocol_status: Signal<String>,
    /// Total accessibility live announcements emitted interactively.
    #[get(type(copy))]
    pub(crate) a11y_announcements: Signal<u32>,
    /// Total haptic pulses emitted interactively.
    #[get(type(copy))]
    pub(crate) haptic_pulses: Signal<u32>,
    /// Simulated target platform index for cross-platform Dynamic Island & permissions matrix (`0..7`).
    #[get(type(copy))]
    pub(crate) os_target_platform_idx: Signal<usize>,
    /// Active Dynamic Island presentation mode index (`0..6`).
    #[get(type(copy))]
    pub(crate) island_mode_idx: Signal<usize>,
    /// Live notification delivery stack displayed via `EuvSonner`.
    #[get(type(copy))]
    pub(crate) system_notifications: Signal<Vec<(String, String)>>,
    /// Per-permission status map across all 14 `SystemPermission` categories.
    #[get(type(copy))]
    pub(crate) permission_statuses: Signal<Vec<PermissionStatus>>,
}

/// Lazily initialized signals powering the `/forms` showcase page.
#[derive(Clone, Copy, Getter)]
pub struct FormsSignals {
    /// Controlled form text input value.
    #[get(type(copy))]
    pub(crate) username: Signal<String>,
    /// Controlled multi-line textarea value.
    #[get(type(copy))]
    pub(crate) bio: Signal<String>,
    /// Controlled numeric stepper value.
    #[get(type(copy))]
    pub(crate) stepper_value: Signal<i64>,
    /// Controlled radio group selection index.
    #[get(type(copy))]
    pub(crate) radio_index: Signal<usize>,
    /// Controlled continuous slider value.
    #[get(type(copy))]
    pub(crate) slider_value: Signal<f32>,
    /// Controlled select dropdown index.
    #[get(type(copy))]
    pub(crate) select_index: Signal<usize>,
    /// Controlled select dropdown open state.
    #[get(type(copy))]
    pub(crate) select_open: Signal<bool>,
    /// Controlled star rating value.
    #[get(type(copy))]
    pub(crate) rating_value: Signal<usize>,
    /// Controlled toggle pill pressed state.
    #[get(type(copy))]
    pub(crate) pin_toggled: Signal<bool>,
    /// Controlled toggle switch for hardware acceleration preference.
    #[get(type(copy))]
    pub(crate) hardware_accel: Signal<bool>,
    /// Controlled checkbox for terms acknowledgment.
    #[get(type(copy))]
    pub(crate) agree_terms: Signal<bool>,
    /// Controlled tab bar index.
    #[get(type(copy))]
    pub(crate) active_tab: Signal<usize>,
    /// Controlled pagination page number.
    #[get(type(copy))]
    pub(crate) page_index: Signal<usize>,
    /// Controlled steps indicator active index.
    #[get(type(copy))]
    pub(crate) step_index: Signal<usize>,
    /// Controlled accordion expanded item index.
    #[get(type(copy))]
    pub(crate) accordion_open: Signal<Option<usize>>,
    /// Controlled accent color selection for `EuvColorPicker`.
    #[get(type(copy))]
    pub(crate) picker_color: Signal<Color>,
    /// Controlled 24-hour `(hour, minute)` selection for `EuvTimePicker`.
    #[get(type(copy))]
    pub(crate) picker_time: Signal<(u8, u8)>,
    /// Controlled dynamic tag list for `EuvTagInput`.
    #[get(type(copy))]
    pub(crate) tag_items: Signal<Vec<String>>,
    /// Controlled selected node label for interactive `EuvTree`.
    #[get(type(copy))]
    pub(crate) tree_selected: Signal<Option<String>>,
    /// Controlled active breadcrumb index for interactive `EuvBreadcrumb`.
    #[get(type(copy))]
    pub(crate) breadcrumb_active: Signal<usize>,
}

/// Lazily initialized signals powering the `/overlays` showcase page.
#[derive(Clone, Copy, Getter)]
pub struct OverlaysSignals {
    /// Controlled modal visibility flag.
    #[get(type(copy))]
    pub(crate) modal_open: Signal<bool>,
    /// Controlled drawer visibility flag.
    #[get(type(copy))]
    pub(crate) drawer_open: Signal<bool>,
    /// Controlled bottom sheet visibility flag.
    #[get(type(copy))]
    pub(crate) sheet_open: Signal<bool>,
    /// Controlled popover visibility flag.
    #[get(type(copy))]
    pub(crate) popover_open: Signal<bool>,
    /// Controlled dropdown menu open flag.
    #[get(type(copy))]
    pub(crate) dropdown_open: Signal<bool>,
    /// Controlled dropdown last selected index.
    #[get(type(copy))]
    pub(crate) dropdown_selected: Signal<Option<usize>>,
    /// Controlled toast banner visibility flag.
    #[get(type(copy))]
    pub(crate) toast_visible: Signal<bool>,
    /// Controlled corner notification visibility flag.
    #[get(type(copy))]
    pub(crate) notif_visible: Signal<bool>,
    /// Controlled loading overlay active flag.
    #[get(type(copy))]
    pub(crate) loading_active: Signal<bool>,
}

/// Lazily initialized signals powering the `/data` virtualized list page.
#[derive(Clone, Copy, Getter)]
pub struct DataSignals {
    /// Reactive vertical scroll offset driving the 10,000-row virtualized list.
    #[get(type(copy))]
    pub(crate) list_scroll_y: Signal<f32>,
}

/// Lazily initialized signals powering the `/game3d` PBR + BVH ray-tracing page.
#[derive(Clone, Copy, Debug, Getter)]
pub struct Engine3dSignals {
    /// Shared mutable runtime 3D graphics/ray-tracing configuration adjusted live from UI controls.
    #[get(type(copy))]
    pub(crate) engine3d_quality: Signal<RenderQualityConfig>,
    /// Reactive 3D quality preset index (`0=Low, 1=Medium, 2=High, 3=Ultra, 4=Cinematic`).
    #[get(type(copy))]
    pub(crate) engine3d_preset_idx: Signal<usize>,
    /// Reactive 3D ray-tracing mode index (`0=Off, 1=Shadows, 2=Shadows+Refl, 3=Full GI`).
    #[get(type(copy))]
    pub(crate) engine3d_rt_idx: Signal<usize>,
    /// Reactive 3D internal resolution scale percentage (`40.0..=125.0`).
    #[get(type(copy))]
    pub(crate) engine3d_res_scale: Signal<f32>,
    /// Reactive 3D open-world time of day (`6.0..=23.0` hours).
    #[get(type(copy))]
    pub(crate) engine3d_time_of_day: Signal<f32>,
    /// Pending live 3D model import request counter consumed on the next 3D tick.
    #[get(type(copy))]
    pub(crate) engine3d_import_queue: Signal<u64>,
    /// Human-readable status of the most recent 3D model import.
    #[get(type(copy))]
    pub(crate) engine3d_import_status: Signal<String>,
    /// Active 3D camera perspective mode (`0=Chase, 1=Hood, 2=Orbit, 3=Aerial`).
    #[get(type(copy))]
    pub(crate) engine3d_camera_mode: Signal<u8>,
}

/// Lazily initialized signals powering the `/dynamic` OTA & WASM showcase page.
#[derive(Clone, Copy, Getter)]
pub struct DynamicSignals {
    /// Sibling counter preserved untouched during surgical component-level dynamic updates.
    #[get(type(copy))]
    pub(crate) sibling_counter: Signal<i32>,
    /// Human-readable log of the most recent action dispatched from a dynamically updated control.
    #[get(type(copy))]
    pub(crate) dynamic_action_log: Signal<String>,
    /// Simulated offline network mode toggle for verifying verified offline WASM cache hits.
    #[get(type(copy))]
    pub(crate) wasm_offline: Signal<bool>,
    /// Live human-readable readout of the latest dynamic WASM download or fault verification case.
    #[get(type(copy))]
    pub(crate) wasm_fault_status: Signal<String>,
    /// Active background worker handle building `.wasm` OTA fixtures off the UI thread.
    #[get(type(copy))]
    pub(crate) wasm_bg_task: Signal<Option<BackgroundTask<WasmSampleBundle>>>,
}

/// Lazily initialized signals powering the `/lab` UI & Edge Lab page.
#[derive(Clone, Copy, Getter)]
pub struct LabSignals {
    /// Controlled shadcn `EuvAlertDialog` open state.
    #[get(type(copy))]
    pub(crate) alert_dialog_open: Signal<bool>,
    /// Controlled shadcn `EuvAlertDialog` confirmed status.
    #[get(type(copy))]
    pub(crate) alert_dialog_confirmed: Signal<bool>,
    /// Controlled shadcn `EuvCollapsible` expanded state.
    #[get(type(copy))]
    pub(crate) collapsible_open: Signal<bool>,
    /// Controlled shadcn `EuvToggleGroup` active option index.
    #[get(type(copy))]
    pub(crate) toggle_group_index: Signal<usize>,
    /// Controlled shadcn `EuvInputOtp` passcode string.
    #[get(type(copy))]
    pub(crate) otp_code: Signal<String>,
    /// Controlled shadcn `EuvCommand` search filter text.
    #[get(type(copy))]
    pub(crate) command_query: Signal<String>,
    /// Controlled shadcn `EuvCommand` selected action index.
    #[get(type(copy))]
    pub(crate) command_selected: Signal<Option<usize>>,
    /// Controlled shadcn `EuvHoverCard` open flag.
    #[get(type(copy))]
    pub(crate) hover_card_open: Signal<bool>,
    /// Controlled shadcn `EuvCalendar` selected day of month.
    #[get(type(copy))]
    pub(crate) calendar_day: Signal<u32>,
    /// Controlled shadcn `EuvMenubar` active menu index.
    #[get(type(copy))]
    pub(crate) menubar_active: Signal<Option<usize>>,
    /// Controlled shadcn `EuvCarousel` active slide index.
    #[get(type(copy))]
    pub(crate) carousel_index: Signal<usize>,
    /// Controlled search query for `EuvCombobox` in the UI & Edge Lab.
    #[get(type(copy))]
    pub(crate) lab_combobox_query: Signal<String>,
    /// Controlled selected index for `EuvCombobox`.
    #[get(type(copy))]
    pub(crate) lab_combobox_selected: Signal<usize>,
    /// Controlled open flag for `EuvCombobox`.
    #[get(type(copy))]
    pub(crate) lab_combobox_open: Signal<bool>,
    /// Controlled filter string for `EuvDataTable`.
    #[get(type(copy))]
    pub(crate) lab_table_filter: Signal<String>,
    /// Controlled sort order for `EuvDataTable`.
    #[get(type(copy))]
    pub(crate) lab_table_sort_asc: Signal<bool>,
    /// Controlled selected row index for `EuvDataTable`.
    #[get(type(copy))]
    pub(crate) lab_table_selected: Signal<Option<usize>>,
    /// Controlled selected day for `EuvDatePicker`.
    #[get(type(copy))]
    pub(crate) lab_date_day: Signal<u32>,
    /// Controlled open flag for `EuvDatePicker`.
    #[get(type(copy))]
    pub(crate) lab_date_open: Signal<bool>,
    /// Controlled domain input value for `EuvInputGroup`.
    #[get(type(copy))]
    pub(crate) lab_input_group_val: Signal<String>,
    /// Controlled selected index for `EuvNativeSelect`.
    #[get(type(copy))]
    pub(crate) lab_native_select_idx: Signal<usize>,
    /// Controlled active dropdown index for `EuvNavigationMenu`.
    #[get(type(copy))]
    pub(crate) lab_nav_menu_active: Signal<Option<usize>>,
    /// Controlled split ratio for `EuvResizable`.
    #[get(type(copy))]
    pub(crate) lab_split_ratio: Signal<f32>,
    /// Toggle controlling whether the nested edge-case box blocks scroll penetration (`true`) or allows chaining (`false`).
    #[get(type(copy))]
    pub(crate) lab_block_scroll_chain: Signal<bool>,
    /// Toggle controlling whether the nested edge-case box stops click event bubbling (`true`) or allows bubbling (`false`).
    #[get(type(copy))]
    pub(crate) lab_stop_click_bubble: Signal<bool>,
    /// Counter tracking clicks received by the outer parent card in the event bubbling test.
    #[get(type(copy))]
    pub(crate) lab_parent_clicks: Signal<u32>,
    /// Counter tracking clicks received by the inner button in the event bubbling test.
    #[get(type(copy))]
    pub(crate) lab_child_clicks: Signal<u32>,
    /// Persistent counter proving live resize never destroys or resets page state.
    #[get(type(copy))]
    pub(crate) lab_resize_preserve_count: Signal<u32>,
    /// Controlled direction mode toggle (`false=LTR, true=RTL`).
    #[get(type(copy))]
    pub(crate) lab_rtl_mode: Signal<bool>,
}

/// Lazily initialized signals powering the `/media` Media Studio page.
#[derive(Clone, Copy, Getter)]
pub struct MediaSignals {
    /// Reactive animated GIF playback state for the Media Studio showcase.
    #[get(type(copy))]
    pub(crate) media_gif: Signal<GifAnimation>,
    /// Reactive LIVE Photo motion state for the Media Studio showcase.
    #[get(type(copy))]
    pub(crate) media_live: Signal<LivePhotoAsset>,
    /// Reactive cross-platform video track state for the Media Studio showcase.
    #[get(type(copy))]
    pub(crate) media_video: Signal<VideoTrack>,
    /// Reactive WAV audio track and waveform state for the Media Studio showcase.
    #[get(type(copy))]
    pub(crate) media_audio: Signal<AudioTrack>,
    /// Reactive multi-page PDF document state for the Media Studio showcase.
    #[get(type(copy))]
    pub(crate) media_pdf: Signal<PdfDocument>,
    /// Most recently clicked native HTML hyperlink URI in the Media Studio showcase.
    #[get(type(copy))]
    pub(crate) media_html_link_log: Signal<String>,
    /// Reactive indicator set while Media Studio codecs decode on a background worker thread.
    #[get(type(copy))]
    pub(crate) media_loading: Signal<bool>,
    /// Active background worker handle decoding Media Studio sample codecs off the UI thread.
    #[get(type(copy))]
    pub(crate) media_bg_task: Signal<Option<BackgroundTask<MediaSampleBundle>>>,
}

/// Lazily initialized signals powering the `/markdown` Markdown & Code Studio page.
#[derive(Clone, Copy, Getter)]
pub struct MarkdownSignals {
    /// Latest copied code block telemetry readout on `/markdown`.
    #[get(type(copy))]
    pub(crate) markdown_copy_log: Signal<String>,
    /// Latest clicked Markdown hyperlink URL readout on `/markdown`.
    #[get(type(copy))]
    pub(crate) markdown_link_log: Signal<String>,
    /// Total GFM checklist tasks toggled interactively on `/markdown`.
    #[get(type(copy))]
    pub(crate) markdown_tasks_toggled: Signal<u32>,
    /// Selected code example language tab index on `/markdown` (`0=Rust, 1=TS, 2=JSON, 3=Diff`).
    #[get(type(copy))]
    pub(crate) markdown_lang_tab: Signal<usize>,
    /// Toggle controlling whether text inside the Markdown & Code Studio is selectable.
    #[get(type(copy))]
    pub(crate) markdown_selectable: Signal<bool>,
}

/// Lazily initialized signals powering the `/stress` Stress Lab page.
#[derive(Clone, Copy, Getter)]
pub struct StressSignals {
    /// Live interactive UI stress benchmark results for `/stress`.
    #[get(type(copy))]
    pub(crate) stress_results: Signal<Vec<StressCaseResult>>,
    /// Latest interactive UI stress benchmark status readout for `/stress`.
    #[get(type(copy))]
    pub(crate) stress_summary: Signal<String>,
}

/// Lazily initialized signals powering the `/charts` ECharts Studio page.
#[derive(Clone, Copy, Getter)]
pub struct ChartsSignals {
    /// Active category filter index on `/charts` (`0=All`, `1=Cartesian`, `2=Financial`, `3=Radial`, `4=Hierarchy`, `5=Geo & Flow`).
    #[get(type(copy))]
    pub(crate) charts_category_idx: Signal<usize>,
    /// Live interaction readout updated when hovering, clicking, toggling legends, or dragging DataZoom on `/charts`.
    #[get(type(copy))]
    pub(crate) charts_event_log: Signal<String>,
}

/// Lazily initialized signals powering the `/water` gyroscope liquid physics studio page.
#[derive(Clone, Copy, Debug, Getter)]
pub struct WaterSignals {
    /// Liquid tank fill ratio percentage (`25.0..=80.0`).
    #[get(type(copy))]
    pub(crate) fill_pct: Signal<f32>,
    /// Active viscosity preset index (`0 = Water 1.0 mPa·s`, `1 = Light Oil`, `2 = Honey`).
    #[get(type(copy))]
    pub(crate) viscosity_idx: Signal<usize>,
    /// Toggle controlling whether Archimedes buoyant bodies (orb and ice cube) are active.
    #[get(type(copy))]
    pub(crate) buoyant_enabled: Signal<bool>,
    /// Fullscreen portal visibility flag for the liquid tank.
    #[get(type(copy))]
    pub(crate) fullscreen_open: Signal<bool>,
    /// Status message displayed for browser/OS motion sensor permission requests.
    #[get(type(copy))]
    pub(crate) sensor_perm_status: Signal<String>,
    /// Reactive live physics, gravity, and frame-timing telemetry mirrored from `GyroLiquidGameScene`.
    #[get(type(copy))]
    pub(crate) stats: Signal<GyroLiquidStats>,
}

/// Zero-boot-cost lazy `GameScene` wrapper deferring `GyroLiquidGameScene` allocation until `/water` is visited.
#[derive(Clone, Debug, Getter)]
pub struct LazyWaterScene {
    /// Shared lazily allocated liquid scene handle (`None` at boot until `/water` is visited).
    pub(crate) scene_cell: Rc<RefCell<Option<GyroLiquidGameScene>>>,
    /// Shared lazy cell holding `/water` control and telemetry signals.
    pub(crate) signals_cell: Rc<Cell<Option<WaterSignals>>>,
}

/// Reactive application state powering the cross-platform showcase with minimal boot signals and lazy route-scoped signal groups.
#[derive(Clone, Getter)]
pub struct ShowcaseState {
    /// Active route path signal.
    #[get(type(copy))]
    pub(crate) route: Signal<String>,
    /// Root ownership scope retaining lazily materialized showcase signals across route evictions and global WASM slot swaps.
    #[get(type(copy))]
    pub(crate) state_scope: Scope,
    /// Active reactive theme state across all 17 design schemes and light/dark modes.
    pub(crate) theme: UiThemeState,
    /// Embedded deterministic 2D physics game host rendered directly inside `euv`.
    pub(crate) game_host: GameEngineHost,
    /// Embedded AAA 3D open-world PBR + BVH ray-tracing game host.
    pub(crate) game3d_host: GameEngineHost,
    /// Embedded real-time SI PBF gyroscope liquid water host (zero allocation at boot until `/water` is visited).
    pub(crate) water_host: GameEngineHost,
    /// Lazily materialized `GyroLiquidGameScene` handle shared between `water_host` and `/water` UI controls.
    pub(crate) water_scene_cell: Rc<RefCell<Option<GyroLiquidGameScene>>>,
    /// Shared hub managing live component-level and page-level dynamic OTA updates.
    pub(crate) dynamic_hub: DynamicUpdateHub,
    /// Cross-platform in-memory WASM CDN registry serving real `.wasm` binaries and fault scenarios.
    pub(crate) wasm_registry: RegistryWasmFetcher,
    /// Dynamic WASM download, verification, sandbox execution, cache, and rollback manager.
    pub(crate) wasm_manager: WasmDynamicManager,
    /// Controlled global Command Palette modal visibility flag.
    #[get(type(copy))]
    pub(crate) cmd_palette_open: Signal<bool>,
    /// Controlled global Command Palette filter query.
    #[get(type(copy))]
    pub(crate) cmd_palette_query: Signal<String>,
    /// Reactive preference controlling whether shell chrome auto-hides on content scroll.
    #[get(type(copy))]
    pub(crate) auto_hide_chrome: Signal<bool>,
    /// Reactive preference controlling live FPS counter pill visibility in the topbar.
    #[get(type(copy))]
    pub(crate) show_fps_hud: Signal<bool>,
    /// Reactive preference controlling horizontal swipe navigation across registered routes.
    #[get(type(copy))]
    pub(crate) swipe_routing: Signal<bool>,
    /// Reactive accessibility preference minimizing non-essential animations.
    #[get(type(copy))]
    pub(crate) reduced_motion: Signal<bool>,
    /// Adaptive render router switch mode (`false` = Recommend Only, `true` = Auto Switch).
    #[get(type(copy))]
    pub(crate) adaptive_auto_switch: Signal<bool>,
    /// Active render backend reported honestly for the current host session.
    #[get(type(copy))]
    pub(crate) adaptive_active_backend: Signal<String>,
    /// Recommended render backend selected by the adaptive router.
    #[get(type(copy))]
    pub(crate) adaptive_recommended_backend: Signal<String>,
    /// Whether a CPU software mirror is currently active in the presentation path.
    #[get(type(copy))]
    pub(crate) adaptive_cpu_mirror_active: Signal<bool>,
    /// Honest present timing source (`Compositor Measured`, `Submission Proxy`, or `Unobservable`).
    #[get(type(copy))]
    pub(crate) adaptive_present_timing_source: Signal<String>,
    /// Active dirty-region upload strategy (`Direct GPU`, `Multi-Rect Dirty`, `Merged BBox`, `Full Frame`).
    #[get(type(copy))]
    pub(crate) adaptive_upload_strategy: Signal<String>,
    /// Cumulative seamless backend handoff attempts.
    #[get(type(copy))]
    pub(crate) adaptive_handoff_attempts: Signal<u64>,
    /// Cumulative seamless backend handoff successes.
    #[get(type(copy))]
    pub(crate) adaptive_handoff_successes: Signal<u64>,
    /// Cumulative seamless backend handoff aborts.
    #[get(type(copy))]
    pub(crate) adaptive_handoff_aborts: Signal<u64>,
    /// Persistent lazy-loading page-lifecycle router shared across the showcase shell.
    pub(crate) router: EuvRouter,
    /// Guard flag ensuring routes are registered on `router` once.
    pub(crate) router_ready: Rc<Cell<bool>>,
    /// Total lazy page `on_mount` lifecycle hooks executed.
    #[get(type(copy))]
    pub(crate) lifecycle_mounts: Signal<u32>,
    /// Total `PageRetention::Freeze` `on_freeze` hooks executed on route leave.
    #[get(type(copy))]
    pub(crate) lifecycle_freezes: Signal<u32>,
    /// Total `on_resume` hooks executed when returning to a frozen page.
    #[get(type(copy))]
    pub(crate) lifecycle_resumes: Signal<u32>,
    /// Total `on_destroy` hooks executed on page disposal.
    #[get(type(copy))]
    pub(crate) lifecycle_destroys: Signal<u32>,
    /// Latest human-readable page lifecycle transition log line.
    #[get(type(copy))]
    pub(crate) lifecycle_last_event: Signal<String>,
    /// Rolling log of recent normalized cross-platform `SystemEvent` entries.
    #[get(type(copy))]
    pub(crate) system_event_log: Signal<Vec<String>>,
    /// Total count of normalized `SystemEvent` notifications observed in this session.
    #[get(type(copy))]
    pub(crate) system_event_count: Signal<u32>,
    /// Reactive flag indicating whether showcase pages are currently frozen in background.
    #[get(type(copy))]
    pub(crate) bg_frozen: Signal<bool>,
    /// Total count of background freeze transitions executed across showcase pages.
    #[get(type(copy))]
    pub(crate) bg_freeze_count: Signal<u32>,
    /// Total count of lossless foreground restore transitions executed across showcase pages.
    #[get(type(copy))]
    pub(crate) bg_restore_count: Signal<u32>,
    /// Snapshot of whether the 2D physics game host was running immediately before entering background.
    pub(crate) bg_snap_game2d_running: Rc<Cell<bool>>,
    /// Snapshot of whether the 3D ray-tracing host was running immediately before entering background.
    pub(crate) bg_snap_game3d_running: Rc<Cell<bool>>,
    /// Snapshot of whether the gyroscope liquid water host was running immediately before entering background.
    pub(crate) bg_snap_water_running: Rc<Cell<bool>>,
    /// Snapshot of whether Media Studio animated GIF playback was playing before background.
    pub(crate) bg_snap_gif_playing: Rc<Cell<bool>>,
    /// Snapshot of whether Media Studio LIVE Photo motion burst was playing before background.
    pub(crate) bg_snap_live_playing: Rc<Cell<bool>>,
    /// Snapshot of whether Media Studio video playback was playing before background.
    pub(crate) bg_snap_video_playing: Rc<Cell<bool>>,
    /// Snapshot of whether Media Studio audio playback was playing before background.
    pub(crate) bg_snap_audio_playing: Rc<Cell<bool>>,
    /// Guard flag ensuring Media Studio sample codecs/frames hydrate lazily on first `/media` visit.
    pub(crate) media_loaded: Rc<Cell<bool>>,
    /// Guard flag ensuring `.wasm` OTA binaries populate lazily on first `/dynamic` visit.
    pub(crate) wasm_registry_loaded: Rc<Cell<bool>>,
    /// Guard flag ensuring Stress Lab workload catalog hydrates lazily on first `/stress` visit.
    pub(crate) stress_loaded: Rc<Cell<bool>>,
    /// Guard flag ensuring ECharts Studio 20-series catalog hydrates lazily on first `/charts` visit.
    pub(crate) charts_loaded: Rc<Cell<bool>>,
    /// Enables off-main-thread background workers for heavy `/media`, `/dynamic`, and `/game3d` route payloads on interactive native targets.
    pub(crate) bg_workers_enabled: Rc<Cell<bool>>,
    /// Default host platform index applied lazily when `/window` signals initialize.
    pub(crate) default_host_plat_idx: Rc<Cell<usize>>,
    /// Lazily materialized `/reactive` signals (`None` at boot).
    pub(crate) reactive_signals: Rc<Cell<Option<ReactiveSignals>>>,
    /// Lazily materialized `/render` and `/window` signals (`None` at boot).
    pub(crate) render_window_signals: Rc<Cell<Option<RenderWindowSignals>>>,
    /// Lazily materialized `/forms` signals (`None` at boot).
    pub(crate) forms_signals: Rc<Cell<Option<FormsSignals>>>,
    /// Lazily materialized `/overlays` signals (`None` at boot).
    pub(crate) overlays_signals: Rc<Cell<Option<OverlaysSignals>>>,
    /// Lazily materialized `/data` signals (`None` at boot).
    pub(crate) data_signals: Rc<Cell<Option<DataSignals>>>,
    /// Lazily materialized `/game3d` signals (`None` at boot).
    pub(crate) engine3d_signals: Rc<Cell<Option<Engine3dSignals>>>,
    /// Lazily materialized `/dynamic` signals (`None` at boot).
    pub(crate) dynamic_signals: Rc<Cell<Option<DynamicSignals>>>,
    /// Lazily materialized `/lab` signals (`None` at boot).
    pub(crate) lab_signals: Rc<Cell<Option<LabSignals>>>,
    /// Lazily materialized `/media` signals (`None` at boot).
    pub(crate) media_signals: Rc<Cell<Option<MediaSignals>>>,
    /// Lazily materialized `/markdown` signals (`None` at boot).
    pub(crate) markdown_signals: Rc<Cell<Option<MarkdownSignals>>>,
    /// Lazily materialized `/stress` signals (`None` at boot).
    pub(crate) stress_signals: Rc<Cell<Option<StressSignals>>>,
    /// Lazily materialized `/charts` signals (`None` at boot).
    pub(crate) charts_signals: Rc<Cell<Option<ChartsSignals>>>,
    /// Lazily materialized `/water` signals (`None` at boot).
    pub(crate) water_signals: Rc<Cell<Option<WaterSignals>>>,
}

/// Full-featured 2D arcade arena scene powered by `GameWorld`, `PhysicsWorld2D`, `Camera2D`, `ParticleSystem`, `TileMap`, `ActionMap`, and `AudioBus`.
#[derive(Clone, Data, Debug)]
pub struct DemoPhysicsScene {
    /// Generational ECS entity arena holding player, drones, projectiles, and obstacles.
    pub(crate) world: GameWorld,
    /// Spatial-hash 2D rigid-body physics and raycast solver.
    pub(crate) physics: PhysicsWorld2D,
    /// 2D follow camera with trauma-based screen shake and frustum culling.
    #[get(type(copy))]
    pub(crate) camera: Camera2D,
    /// Zero-allocation pooled neon particle engine.
    pub(crate) particles: ParticleSystem,
    /// Frustum-culled tiled arena map with solid corner pillars.
    pub(crate) tilemap: TileMap,
    /// Declarative arcade input bindings (WASD, Arrows, Space/Click fire, E dash, R wave).
    pub(crate) actions: ActionMap,
    /// Deterministic cross-platform sound cue bus.
    pub(crate) audio: AudioBus,
    /// Player ship entity handle.
    #[get(type(copy))]
    pub(crate) player_id: EntityId,
    /// Remaining weapon cooldown in seconds.
    #[get(type(copy))]
    pub(crate) fire_cooldown: f32,
    /// Remaining dash cooldown in seconds.
    #[get(type(copy))]
    pub(crate) dash_cooldown: f32,
    /// Current player arcade score.
    #[get(type(copy))]
    pub(crate) score: u32,
    /// Current wave counter.
    #[get(type(copy))]
    pub(crate) wave: u32,
    /// Toggle for wireframe collider debug visualization.
    #[get(type(copy))]
    pub(crate) show_colliders: bool,
    /// Smoothed real-time frames-per-second telemetry.
    #[get(type(copy))]
    pub(crate) smoothed_fps: f32,
    /// Total fixed physics ticks simulated.
    #[get(type(copy))]
    pub(crate) ticks: u64,
    /// Last rendered viewport size in logical pixels for responsive camera framing in inline and fullscreen modes.
    #[get(type(copy))]
    pub(crate) viewport_size: Size,
    /// Whether the full arena tilemap, entities, and particle pool have been lazily initialized.
    #[get(type(copy))]
    pub(crate) initialized: bool,
    /// Double-buffered immutable 2D world snapshots enabling discontinuity-safe alpha interpolation.
    pub(crate) snapshots: DoubleBufferedSnapshot<World2DSnapshot>,
    /// Reusable per-tick despawn buffer preventing fresh `Vec` allocation during collision resolution.
    pub(crate) to_despawn_scratch: Vec<(EntityId, Point, bool)>,
    /// Fixed tick counter corresponding to `cached_interp`.
    #[get(type(copy))]
    pub(crate) last_sampled_tick: u64,
    /// Quantized alpha (`(alpha * 1000.0).round() as i32`) corresponding to `cached_interp`.
    #[get(type(copy))]
    pub(crate) last_sampled_alpha_milli: i32,
    /// Cached interpolated snapshot preventing duplicate interpolation on HUD-only repaints.
    pub(crate) cached_interp: Option<World2DSnapshot>,
}

/// Interactive AAA 3D open-world city scene with PBR shading, BVH ray tracing, model importing, and runtime settings.
#[derive(Clone, Data, Debug)]
pub struct DemoOpenWorld3DScene {
    /// Open-world 3D city scene graph with instanced towers, reflective wet boulevard, and drivable GT car.
    pub(crate) world: World3D,
    /// Zero-allocation PBR + BVH ray-tracing renderer.
    pub(crate) renderer: Renderer3D,
    /// Shared arcade action bindings for driving/flying the 3D scene.
    pub(crate) actions: ActionMap,
    /// Shared lazy cell holding `/game3d` control signals (`None` at boot until `/game3d` is entered).
    pub(crate) signals_cell: Rc<Cell<Option<Engine3dSignals>>>,
    /// Root ownership scope retaining lazily materialized `/game3d` signals across route evictions.
    #[get(type(copy))]
    pub(crate) state_scope: Scope,
    /// Shared flag enabling off-main-thread `World3D::create_open_world_city()` initialization on interactive native apps.
    pub(crate) bg_workers_enabled: Rc<Cell<bool>>,
    /// Active background task constructing the Vice Boulevard 3D city meshes and BVH off the UI thread.
    pub(crate) bg_city_task: Option<BackgroundTask<World3D>>,
    /// Last processed import counter.
    #[get(type(copy))]
    pub(crate) last_import_seq: u64,
    /// Smoothed real-time FPS telemetry.
    #[get(type(copy))]
    pub(crate) smoothed_fps: f32,
    /// Whether the 3D city meshes, materials, and BVH acceleration structure have been lazily built.
    #[get(type(copy))]
    pub(crate) initialized: bool,
    /// Double-buffered immutable 3D world snapshots for high-refresh alpha interpolation and camera-cut snapping.
    pub(crate) snapshots: DoubleBufferedSnapshot<World3DSnapshot>,
    /// Bounded reusable RGBA8 frame pool avoiding steady-state per-frame heap allocations on CPU fallback.
    pub(crate) frame_pool: RenderBufferPool,
    /// Same-device GPU composite target tracking independent world and HUD dirty revisions.
    pub(crate) gpu_target: GpuCompositeTarget,
    /// Monotonic frame submission fence value guarding pooled 3D frame leases.
    #[get(type(copy))]
    pub(crate) frame_fence: u64,
    /// Last applied 3D camera mode for instant discontinuity-safe camera-cut detection.
    #[get(type(copy))]
    pub(crate) last_camera_mode: u8,
    /// Monotonic fixed simulation tick counter for 3D snapshot commits.
    #[get(type(copy))]
    pub(crate) ticks: u64,
    /// Cached rendered 3D world frame reused across HUD-only overlay updates without re-ray-tracing.
    pub(crate) cached_world_frame: Option<ImageBuffer>,
    /// World revision matching `cached_world_frame`.
    #[get(type(copy))]
    pub(crate) cached_world_rev: u64,
    /// Quantized interpolation alpha matching `cached_world_frame`.
    #[get(type(copy))]
    pub(crate) cached_alpha_milli: i32,
    /// Internal render dimensions `(width, height)` matching `cached_world_frame`.
    #[get(type(copy))]
    pub(crate) cached_dims: (u32, u32),
    /// Active quality configuration matching `cached_world_frame`.
    #[get(type(copy))]
    pub(crate) cached_quality: RenderQualityConfig,
}