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
// SPDX-FileCopyrightText: Copyright (c) 2026 Mike Li/Mikewolfli/Wei Li(mikewolfli@163.com)
// SPDX-License-Identifier: MIT
//! Reusable companion controls: swatch grid, filter row, legend, chart tooltip, tooltip
//! pipeline, zoom/pan controller and toast queue.
//!
//! # Why these live together
//!
//! Each of these controls is the *partner* of a primary control rather than a standalone
//! feature: a colour dialog, a table, a chart, an image view. They share the same shape —
//! small owned state, one signal per user intent, and no dependency on the primary control —
//! so they are declared under one module. Each control has its own file so the 2000-line
//! production limit (principle #9) is not crossed as the set grows.
//!
//! The capability property/event tables in `src/widget/capability/` remain the single
//! publication surface; this module adds no entries there.
//!
//! # Reused models instead of local copies
//!
//! * [`FilterRow`] stores [`FilterCondition`](crate::widget::view_widgets::filter_expr::FilterCondition)
//! and [`FilterOperator`](crate::widget::view_widgets::filter_expr::FilterOperator), so a
//! filter row, `DataGrid` and a query builder evaluate one filter model.
//! * [`ToastHost`] accepts `Toast` and `ToastItem` from the existing toast module and reuses
//! its `ToastLevel`.
//!
//! # `WidgetKind` mapping
//!
//! The shared `WidgetKind` enum is intentionally not extended here (it is owned by the
//! capability/schema surface). Each companion declares the closest existing kind for base
//! bookkeeping: `Swatch` → `ColorHistory`, `FilterRow` → `QueryBuilder`, `Legend` → `Chart`,
//! `ChartTooltip`/`TooltipManager` → `Tooltip`, `ZoomPanController` → `ImageView`,
//! `ToastHost` → `PopupWindow`, `MenuPanel` → `Menu`, `SpeedDial` → `FAB`,
//! `SwipeActions` → `SwipeToDismiss` and `DrawerSectionHeader` → `Label`. The kind is
//! bookkeeping only; behaviour is implemented here.
//!
//! # What the borrowed kinds cost in audits (G-306)
//!
//! The mapping is not invisible to kind-level accounting: any `WidgetKind` statistic, and
//! any registry audit that asks "which module implements this kind?", counts a companion
//! under the kind it borrows. A `Swatch` is counted as `ColorHistory`, a `FilterRow` as
//! `QueryBuilder`, a `Legend` as `Chart`, a `ChartTooltip`/`TooltipManager` as `Tooltip`, a
//! `ZoomPanController` as `ImageView` and a `ToastHost` as `PopupWindow`. The direction is
//! one-way — the borrowed kind never claims the companion as its own type — but a report
//! saying "N controls of kind X" includes the companion even when X's module does not
//! implement it. Because the capability tables publish no row for these controls (see
//! "Reused models instead of local copies" above), a reader that needs an exact answer
//! must consult this table rather than the reported kind alone; a registry test that pins
//! the borrowed-kind → borrower pairs would make the deviation testable instead of only
//! documented.
//!
//! # Safety
//!
//! These modules contain no `unsafe` code and own all of their state. There are therefore no
//! unsafe preconditions to uphold: geometry and property inputs are validated and clamped in
//! safe Rust, and every collection is indexed through checked accessors.
pub use crate;
pub use crateStickyHeader;
pub use crate;
pub use crate;
pub use crateColumnChooser;
pub use crateGridFindBar;
pub use crateThumbnailCache;
pub use ;
pub use DrawerSectionHeader;
pub use FilterRow;
pub use ;
pub use ;
pub use ;
pub use PlaylistPanel;
pub use ;
pub use Swatch;
pub use ;
pub use ;
pub use TooltipManager;
pub use ;