feat(components): add large set of new UI components and demos, reorganize groups, and bump a few dependencies
This commit is contained in:
136
readme.hints.md
136
readme.hints.md
@@ -912,6 +912,93 @@ appui.getBottomBarVisible();
|
||||
- `ts_web/elements/00group-appui/dees-appui-bottombar/dees-appui-bottombar.demo.ts` - Demo
|
||||
- `ts_web/elements/interfaces/appconfig.ts` - New interfaces added
|
||||
|
||||
## Media Components (2026-01-26)
|
||||
|
||||
New media viewer components and a unified preview composite component.
|
||||
|
||||
### Directory: `ts_web/elements/00group-media/`
|
||||
|
||||
#### dees-image-viewer
|
||||
- Image display with zoom, pan, fit, and download controls
|
||||
- Properties: `src`, `alt`, `fit` ('contain'|'cover'|'actual'), `showToolbar`
|
||||
- Features: mouse wheel zoom, click-drag pan, double-click toggle, checkerboard transparency background
|
||||
- Toolbar matches PDF viewer pattern (48px height, 32px buttons, 16px icons, 6px border-radius)
|
||||
|
||||
#### dees-audio-viewer
|
||||
- Audio player with waveform visualization via Web Audio API
|
||||
- Properties: `src`, `title`, `artist`, `showWaveform`, `autoplay`, `loop`
|
||||
- Features: canvas waveform rendering, play/pause, seek, volume control, mute toggle, loop toggle
|
||||
- Uses `HTMLAudioElement` for playback, `AudioContext.decodeAudioData` for waveform data
|
||||
|
||||
#### dees-video-viewer
|
||||
- Video player with custom overlay controls
|
||||
- Properties: `src`, `poster`, `showControls`, `autoplay`, `loop`, `muted`
|
||||
- Features: custom controls bar with gradient, seekbar, volume slider, fullscreen toggle, auto-hide controls, 16:9 aspect ratio
|
||||
|
||||
### dees-preview (Composite Component)
|
||||
- Auto-detects content type and delegates to the appropriate viewer
|
||||
- Directory: `ts_web/elements/dees-preview/`
|
||||
- Properties: `url`, `file` (File object), `base64`, `textContent`, `contentType` (override), `language`, `mimeType`, `filename`, `showToolbar`, `showFilename`
|
||||
- Content type detection priority: explicit override → MIME type → file extension → fallback
|
||||
- Renders: image→DeesImageViewer, pdf→DeesPdfViewer, code→DeesDataviewCodebox, audio→DeesAudioViewer, video→DeesVideoViewer, text→pre, unknown→placeholder
|
||||
- Header bar with file type icon, filename, and type badge
|
||||
|
||||
### dees-dataview-codebox modification
|
||||
- Removed `<dees-windowcontrols>` elements from the appbar (Step 1 of the plan)
|
||||
- Now shows clean centered filename title bar without fake window buttons
|
||||
|
||||
### Icon Sizing Convention
|
||||
- All `dees-icon` elements in buttons need explicit `font-size: 16px` CSS rule
|
||||
- Toolbar buttons: 32px × 32px, border-radius: 6px
|
||||
- Placeholder/error icons: `font-size: 32px`
|
||||
- Pattern: `.button-class dees-icon { font-size: 16px; }`
|
||||
|
||||
## Tile Component System (2026-01-27)
|
||||
|
||||
A family of 200×260px content preview cards with a shared abstract base class. All tiles support lazy loading (IntersectionObserver with 200px margin), hover lift effect, click events, loading/error states, and three sizes (small: 150×195, default: 200×260, large: 250×325).
|
||||
|
||||
### Architecture
|
||||
|
||||
- **DeesTileBase** (`dees-tile-shared/DeesTileBase.ts`) — Abstract base class extending DeesElement
|
||||
- Common properties: `clickable`, `loading`, `error`, `size`, `label`
|
||||
- IntersectionObserver lazy loading via `onBecameVisible()` hook
|
||||
- Click dispatch via `tile-click` CustomEvent (detail from `getTileClickDetail()`)
|
||||
- Subclasses implement `renderTileContent(): TemplateResult`
|
||||
|
||||
### Components
|
||||
|
||||
| Tag | Class | Description |
|
||||
|-----|-------|-------------|
|
||||
| `dees-tile-pdf` | `DeesTilePdf` | PDF page thumbnail with hover-to-browse pages. Canvas-rendered via PDF.js/CanvasPool. |
|
||||
| `dees-tile-image` | `DeesTileImage` | Image thumbnail with `object-fit: cover`, dimension detection on load |
|
||||
| `dees-tile-audio` | `DeesTileAudio` | Music icon + mini waveform (AudioContext decode), duration badge |
|
||||
| `dees-tile-video` | `DeesTileVideo` | Auto-captured first frame, duration badge, hover muted auto-preview |
|
||||
| `dees-tile-note` | `DeesTileNote` | First ~12 lines of text in monospace, gradient fade, optional language badge |
|
||||
| `dees-tile-folder` | `DeesTileFolder` | 2×2 grid of mini-previews (thumbnails or type icons), item count badge |
|
||||
|
||||
### Deprecations
|
||||
|
||||
- `dees-pdf-preview` → Use `dees-tile-pdf` instead. Old tag still works as a thin wrapper with console warning.
|
||||
- `dees-pdf` deprecation comment updated to reference `DeesTilePdf`.
|
||||
|
||||
### File Structure
|
||||
|
||||
All tile components live in `ts_web/elements/00group-media/dees-tile-*/`:
|
||||
- `component.ts` — Main component class
|
||||
- `demo.ts` — Demo function
|
||||
- `index.ts` — Re-export
|
||||
- `styles.ts` — (PDF tile only) Component-specific styles
|
||||
- Shared base: `dees-tile-shared/{DeesTileBase,styles,index}.ts`
|
||||
|
||||
### Interface: ITileFolderItem
|
||||
```typescript
|
||||
interface ITileFolderItem {
|
||||
type: 'pdf' | 'image' | 'audio' | 'video' | 'note' | 'folder' | 'unknown';
|
||||
thumbnailSrc?: string;
|
||||
name: string;
|
||||
}
|
||||
```
|
||||
|
||||
## StatsGrid Enhancements (2026-01-12)
|
||||
|
||||
### Column Spanning
|
||||
@@ -973,4 +1060,51 @@ Features:
|
||||
- `trend` - Sparkline with recent data
|
||||
- `text` - Text value display
|
||||
- `multiPercentage` - Multiple progress bars
|
||||
- `cpuCores` - Vertical bar visualization for CPU cores
|
||||
- `cpuCores` - Vertical bar visualization for CPU cores
|
||||
|
||||
## Component Group Taxonomy (2026-01-27)
|
||||
|
||||
All components are organized into `00group-*` directories with 14 groups visible in the wcctools sidebar. The `demoGroups` property (plural, `string[]`) replaces the old `demoGroup` (singular). Components can belong to multiple groups.
|
||||
|
||||
### Group Directories
|
||||
| Directory | Group Name | Count |
|
||||
|-----------|-----------|-------|
|
||||
| `00group-appui` | App UI | 10 |
|
||||
| `00group-button` | Button | 3 |
|
||||
| `00group-chart` | Chart | 2 |
|
||||
| `00group-dataview` | Data View | 4 |
|
||||
| `00group-feedback` | Feedback | 6 |
|
||||
| `00group-form` | Form | 2 |
|
||||
| `00group-input` | Input | 18 |
|
||||
| `00group-layout` | Layout | 7 |
|
||||
| `00group-media` | Media | 14 (viewers + PDF + tiles) |
|
||||
| `00group-overlay` | Overlay | 4 |
|
||||
| `00group-simple` | Simple | 3 |
|
||||
| `00group-utility` | Utility | 5 |
|
||||
| `00group-workspace` | Workspace | 9 |
|
||||
| `00group-runtime` | (internal) | - |
|
||||
|
||||
### Multi-Group Components
|
||||
Some components appear in multiple groups via `demoGroups = ['Primary', 'Secondary']`:
|
||||
- `dees-chart-log`: Chart, Workspace
|
||||
- `dees-dataview-codebox`: Data View, Workspace
|
||||
- `dees-input-code`: Input, Workspace
|
||||
- `dees-input-wysiwyg`: Input, Workspace
|
||||
- `dees-form-submit`: Form, Button
|
||||
- `dees-preview`: Media, Data View
|
||||
- `dees-pdf*` / `dees-tile-pdf`: Media, PDF
|
||||
- `dees-stepper`: Layout, Form
|
||||
- `dees-label`: Layout, Input
|
||||
- `dees-toast`: Feedback, Overlay
|
||||
- `dees-actionbar`: Feedback, Overlay
|
||||
|
||||
### Import Conventions
|
||||
- Within same group: `import '../sibling-component/file.js'`
|
||||
- Cross-group (from depth-2): `import '../../00group-X/component/file.js'`
|
||||
- Shared utilities: `import '../../00plugins.js'`, `import '../../00theme.js'`, etc.
|
||||
|
||||
### Key Notes
|
||||
- The old `demoGroup` property (singular, string) is fully removed
|
||||
- All 79 components with demos use `demoGroups` (plural, string[])
|
||||
- `00group-pdf` no longer exists; PDF components are in `00group-media`
|
||||
- `dees-search` and `dees-tooltip` remain standalone (no demos)
|
||||
Reference in New Issue
Block a user