@pudge-ui/mcp-server 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -0
- package/dist/__tests__/catalog.test.d.ts +1 -0
- package/dist/__tests__/catalog.test.js +50 -0
- package/dist/__tests__/search.test.d.ts +1 -0
- package/dist/__tests__/search.test.js +44 -0
- package/dist/__tests__/validation.test.d.ts +1 -0
- package/dist/__tests__/validation.test.js +34 -0
- package/dist/assembler.d.ts +6 -0
- package/dist/assembler.js +95 -0
- package/dist/catalog.d.ts +22 -0
- package/dist/catalog.js +10 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +33 -0
- package/dist/search.d.ts +5 -0
- package/dist/search.js +21 -0
- package/dist/tools.d.ts +105 -0
- package/dist/tools.js +129 -0
- package/package.json +55 -0
- package/spec/components/_index.yaml +822 -0
- package/spec/components/buttons/clear-button.md +89 -0
- package/spec/components/buttons/fn-grid.md +104 -0
- package/spec/components/buttons/gel-button.md +125 -0
- package/spec/components/buttons/icon-button.md +108 -0
- package/spec/components/buttons/keypad-button.md +123 -0
- package/spec/components/buttons/push-button.md +139 -0
- package/spec/components/buttons/rec-button.md +105 -0
- package/spec/components/buttons/rubber-button.md +100 -0
- package/spec/components/buttons/segmented-control.md +95 -0
- package/spec/components/data/assembled-panel.md +135 -0
- package/spec/components/data/data-table.md +116 -0
- package/spec/components/data/film-strip.md +110 -0
- package/spec/components/data/media-grid.md +98 -0
- package/spec/components/dials/click-wheel.md +115 -0
- package/spec/components/dials/cylindrical-horizontal.md +130 -0
- package/spec/components/dials/cylindrical-scroll.md +141 -0
- package/spec/components/dials/cylindrical-vertical.md +100 -0
- package/spec/components/dials/mode-dial.md +123 -0
- package/spec/components/dials/radial-knob.md +150 -0
- package/spec/components/dials/rotary-encoder.md +118 -0
- package/spec/components/forms/color-picker.md +99 -0
- package/spec/components/forms/file-input.md +105 -0
- package/spec/components/forms/search-bar.md +96 -0
- package/spec/components/forms/select.md +143 -0
- package/spec/components/forms/text-input.md +114 -0
- package/spec/components/forms/textarea.md +85 -0
- package/spec/components/indicators/accordion.md +137 -0
- package/spec/components/indicators/badges.md +87 -0
- package/spec/components/indicators/chips.md +93 -0
- package/spec/components/indicators/led-dots.md +103 -0
- package/spec/components/indicators/mode-badge.md +97 -0
- package/spec/components/indicators/profile-badge.md +99 -0
- package/spec/components/indicators/skeleton.md +94 -0
- package/spec/components/indicators/spinners.md +95 -0
- package/spec/components/indicators/status-chips.md +85 -0
- package/spec/components/indicators/transport-controls.md +114 -0
- package/spec/components/meters/battery-icon.md +104 -0
- package/spec/components/meters/eq-bars.md +93 -0
- package/spec/components/meters/ev-meter.md +96 -0
- package/spec/components/meters/exposure-scale.md +110 -0
- package/spec/components/meters/gauge-full.md +102 -0
- package/spec/components/meters/gauge-semi.md +113 -0
- package/spec/components/meters/histogram.md +70 -0
- package/spec/components/meters/level-indicator.md +95 -0
- package/spec/components/meters/oscilloscope.md +83 -0
- package/spec/components/meters/progress-bar.md +84 -0
- package/spec/components/meters/signal-bars.md +80 -0
- package/spec/components/meters/signal-meter.md +84 -0
- package/spec/components/meters/vu-meter.md +88 -0
- package/spec/components/meters/waveform.md +70 -0
- package/spec/components/navigation/breadcrumbs.md +94 -0
- package/spec/components/navigation/context-menu.md +94 -0
- package/spec/components/navigation/d-pad.md +121 -0
- package/spec/components/navigation/drawer.md +103 -0
- package/spec/components/navigation/menu-grid.md +113 -0
- package/spec/components/navigation/menu-list.md +134 -0
- package/spec/components/navigation/pagination.md +100 -0
- package/spec/components/navigation/rack-panel.md +124 -0
- package/spec/components/navigation/scrollbar.md +97 -0
- package/spec/components/navigation/status-bar.md +117 -0
- package/spec/components/navigation/tab-bar.md +104 -0
- package/spec/components/overlays/chassis-panel.md +94 -0
- package/spec/components/overlays/device-bezel.md +83 -0
- package/spec/components/overlays/dialog.md +100 -0
- package/spec/components/overlays/focus-brackets.md +124 -0
- package/spec/components/overlays/grid-overlay.md +93 -0
- package/spec/components/overlays/modal.md +89 -0
- package/spec/components/overlays/panel.md +114 -0
- package/spec/components/overlays/plastic-card.md +92 -0
- package/spec/components/overlays/popover.md +75 -0
- package/spec/components/overlays/toast.md +93 -0
- package/spec/components/overlays/tooltip.md +85 -0
- package/spec/components/readouts/camera-readout.md +123 -0
- package/spec/components/readouts/dot-matrix.md +88 -0
- package/spec/components/readouts/lcd-readout.md +116 -0
- package/spec/components/readouts/resource-monitor.md +98 -0
- package/spec/components/readouts/seven-segment.md +110 -0
- package/spec/components/readouts/signal-display.md +93 -0
- package/spec/components/readouts/timecode-display.md +94 -0
- package/spec/components/sliders/crossfader.md +102 -0
- package/spec/components/sliders/dual-range.md +97 -0
- package/spec/components/sliders/range-fader.md +100 -0
- package/spec/components/sliders/scrubber.md +104 -0
- package/spec/components/sliders/stepper.md +106 -0
- package/spec/components/sliders/vertical-fader.md +116 -0
- package/spec/components/sliders/volume-slider.md +107 -0
- package/spec/components/toggles/dip-switch.md +100 -0
- package/spec/components/toggles/led-checkbox.md +108 -0
- package/spec/components/toggles/power-toggle.md +93 -0
- package/spec/components/toggles/radio-button.md +106 -0
- package/spec/components/toggles/rocker-switch.md +92 -0
- package/spec/components/toggles/slide-switch.md +121 -0
- package/spec/components/toggles/toggle-switch.md +135 -0
- package/spec/compositions/audio-mixer-strip.md +62 -0
- package/spec/compositions/camera-viewfinder.md +66 -0
- package/spec/compositions/phone-interface.md +66 -0
- package/spec/foundation/accessibility.md +33 -0
- package/spec/foundation/canvas.md +20 -0
- package/spec/foundation/depth-model.md +82 -0
- package/spec/foundation/layout.md +33 -0
- package/spec/foundation/materials.md +68 -0
- package/spec/foundation/naming.md +33 -0
- package/spec/foundation/philosophy.md +27 -0
- package/spec/foundation/theme.md +39 -0
- package/spec/foundation/tokens.md +148 -0
- package/spec/guides/extension.md +189 -0
- package/spec/guides/for-llms.md +129 -0
- package/spec/guides/prompt-templates.md +143 -0
- package/spec/spec/components/_index.yaml +822 -0
- package/spec/spec/components/buttons/clear-button.md +89 -0
- package/spec/spec/components/buttons/fn-grid.md +104 -0
- package/spec/spec/components/buttons/gel-button.md +125 -0
- package/spec/spec/components/buttons/icon-button.md +108 -0
- package/spec/spec/components/buttons/keypad-button.md +123 -0
- package/spec/spec/components/buttons/push-button.md +139 -0
- package/spec/spec/components/buttons/rec-button.md +105 -0
- package/spec/spec/components/buttons/rubber-button.md +100 -0
- package/spec/spec/components/buttons/segmented-control.md +95 -0
- package/spec/spec/components/data/assembled-panel.md +135 -0
- package/spec/spec/components/data/data-table.md +116 -0
- package/spec/spec/components/data/film-strip.md +110 -0
- package/spec/spec/components/data/media-grid.md +98 -0
- package/spec/spec/components/dials/click-wheel.md +115 -0
- package/spec/spec/components/dials/cylindrical-horizontal.md +130 -0
- package/spec/spec/components/dials/cylindrical-scroll.md +141 -0
- package/spec/spec/components/dials/cylindrical-vertical.md +100 -0
- package/spec/spec/components/dials/mode-dial.md +123 -0
- package/spec/spec/components/dials/radial-knob.md +150 -0
- package/spec/spec/components/dials/rotary-encoder.md +118 -0
- package/spec/spec/components/forms/color-picker.md +99 -0
- package/spec/spec/components/forms/file-input.md +105 -0
- package/spec/spec/components/forms/search-bar.md +96 -0
- package/spec/spec/components/forms/select.md +143 -0
- package/spec/spec/components/forms/text-input.md +114 -0
- package/spec/spec/components/forms/textarea.md +85 -0
- package/spec/spec/components/indicators/accordion.md +137 -0
- package/spec/spec/components/indicators/badges.md +87 -0
- package/spec/spec/components/indicators/chips.md +93 -0
- package/spec/spec/components/indicators/led-dots.md +103 -0
- package/spec/spec/components/indicators/mode-badge.md +97 -0
- package/spec/spec/components/indicators/profile-badge.md +99 -0
- package/spec/spec/components/indicators/skeleton.md +94 -0
- package/spec/spec/components/indicators/spinners.md +95 -0
- package/spec/spec/components/indicators/status-chips.md +85 -0
- package/spec/spec/components/indicators/transport-controls.md +114 -0
- package/spec/spec/components/meters/battery-icon.md +104 -0
- package/spec/spec/components/meters/eq-bars.md +93 -0
- package/spec/spec/components/meters/ev-meter.md +96 -0
- package/spec/spec/components/meters/exposure-scale.md +110 -0
- package/spec/spec/components/meters/gauge-full.md +102 -0
- package/spec/spec/components/meters/gauge-semi.md +113 -0
- package/spec/spec/components/meters/histogram.md +70 -0
- package/spec/spec/components/meters/level-indicator.md +95 -0
- package/spec/spec/components/meters/oscilloscope.md +83 -0
- package/spec/spec/components/meters/progress-bar.md +84 -0
- package/spec/spec/components/meters/signal-bars.md +80 -0
- package/spec/spec/components/meters/signal-meter.md +84 -0
- package/spec/spec/components/meters/vu-meter.md +88 -0
- package/spec/spec/components/meters/waveform.md +70 -0
- package/spec/spec/components/navigation/breadcrumbs.md +94 -0
- package/spec/spec/components/navigation/context-menu.md +94 -0
- package/spec/spec/components/navigation/d-pad.md +121 -0
- package/spec/spec/components/navigation/drawer.md +103 -0
- package/spec/spec/components/navigation/menu-grid.md +113 -0
- package/spec/spec/components/navigation/menu-list.md +134 -0
- package/spec/spec/components/navigation/pagination.md +100 -0
- package/spec/spec/components/navigation/rack-panel.md +124 -0
- package/spec/spec/components/navigation/scrollbar.md +97 -0
- package/spec/spec/components/navigation/status-bar.md +117 -0
- package/spec/spec/components/navigation/tab-bar.md +104 -0
- package/spec/spec/components/overlays/chassis-panel.md +94 -0
- package/spec/spec/components/overlays/device-bezel.md +83 -0
- package/spec/spec/components/overlays/dialog.md +100 -0
- package/spec/spec/components/overlays/focus-brackets.md +124 -0
- package/spec/spec/components/overlays/grid-overlay.md +93 -0
- package/spec/spec/components/overlays/modal.md +89 -0
- package/spec/spec/components/overlays/panel.md +114 -0
- package/spec/spec/components/overlays/plastic-card.md +92 -0
- package/spec/spec/components/overlays/popover.md +75 -0
- package/spec/spec/components/overlays/toast.md +93 -0
- package/spec/spec/components/overlays/tooltip.md +85 -0
- package/spec/spec/components/readouts/camera-readout.md +123 -0
- package/spec/spec/components/readouts/dot-matrix.md +88 -0
- package/spec/spec/components/readouts/lcd-readout.md +116 -0
- package/spec/spec/components/readouts/resource-monitor.md +98 -0
- package/spec/spec/components/readouts/seven-segment.md +110 -0
- package/spec/spec/components/readouts/signal-display.md +93 -0
- package/spec/spec/components/readouts/timecode-display.md +94 -0
- package/spec/spec/components/sliders/crossfader.md +102 -0
- package/spec/spec/components/sliders/dual-range.md +97 -0
- package/spec/spec/components/sliders/range-fader.md +100 -0
- package/spec/spec/components/sliders/scrubber.md +104 -0
- package/spec/spec/components/sliders/stepper.md +106 -0
- package/spec/spec/components/sliders/vertical-fader.md +116 -0
- package/spec/spec/components/sliders/volume-slider.md +107 -0
- package/spec/spec/components/toggles/dip-switch.md +100 -0
- package/spec/spec/components/toggles/led-checkbox.md +108 -0
- package/spec/spec/components/toggles/power-toggle.md +93 -0
- package/spec/spec/components/toggles/radio-button.md +106 -0
- package/spec/spec/components/toggles/rocker-switch.md +92 -0
- package/spec/spec/components/toggles/slide-switch.md +121 -0
- package/spec/spec/components/toggles/toggle-switch.md +135 -0
- package/spec/spec/compositions/audio-mixer-strip.md +62 -0
- package/spec/spec/compositions/camera-viewfinder.md +66 -0
- package/spec/spec/compositions/phone-interface.md +66 -0
- package/spec/spec/foundation/accessibility.md +33 -0
- package/spec/spec/foundation/canvas.md +20 -0
- package/spec/spec/foundation/depth-model.md +82 -0
- package/spec/spec/foundation/layout.md +33 -0
- package/spec/spec/foundation/materials.md +68 -0
- package/spec/spec/foundation/naming.md +33 -0
- package/spec/spec/foundation/philosophy.md +27 -0
- package/spec/spec/foundation/theme.md +39 -0
- package/spec/spec/foundation/tokens.md +148 -0
- package/spec/spec/guides/extension.md +189 -0
- package/spec/spec/guides/for-llms.md +129 -0
- package/spec/spec/guides/prompt-templates.md +143 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Battery Icon
|
|
3
|
+
id: battery-icon
|
|
4
|
+
class: .battery-icon
|
|
5
|
+
category: meters
|
|
6
|
+
index: 9
|
|
7
|
+
materials: [panel]
|
|
8
|
+
sizes: [md]
|
|
9
|
+
interactive: false
|
|
10
|
+
requires_js: false
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Battery Icon
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Every mobile phone, camera, and portable device from the era.
|
|
18
|
+
**Mechanism**: Miniaturized bar gauge shaped like physical battery (rectangular body + positive terminal nub on right). Fill level = remaining charge. Three color states: green (>40%), amber (20-40%), red (<20%).
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Body | 28x14px |
|
|
25
|
+
| Border | 2px solid |
|
|
26
|
+
| Terminal nub | 3x6px on right side |
|
|
27
|
+
| Fill padding | 2px inside body |
|
|
28
|
+
|
|
29
|
+
## CSS Recipe
|
|
30
|
+
|
|
31
|
+
### Container
|
|
32
|
+
```css
|
|
33
|
+
.battery-icon { display: inline-flex; align-items: center; gap: 2px; }
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Body
|
|
37
|
+
```css
|
|
38
|
+
.battery-body {
|
|
39
|
+
width: 28px; height: 14px; border: 2px solid var(--border-mid);
|
|
40
|
+
border-radius: 3px; padding: 2px; position: relative;
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Terminal Nub (Pseudo-element)
|
|
45
|
+
```css
|
|
46
|
+
.battery-body::after {
|
|
47
|
+
content: ''; position: absolute; right: -5px; top: 50%; transform: translateY(-50%);
|
|
48
|
+
width: 3px; height: 6px; background: var(--border-mid); border-radius: 0 1px 1px 0;
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Fill
|
|
53
|
+
```css
|
|
54
|
+
.battery-fill { height: 100%; border-radius: 1px; background: var(--green-on); transition: width 0.3s, background 0.3s; }
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Charge Level Variants
|
|
58
|
+
```css
|
|
59
|
+
.battery-fill.medium { background: var(--amber); }
|
|
60
|
+
.battery-fill.low { background: var(--red-alert); }
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## HTML Structure
|
|
64
|
+
```html
|
|
65
|
+
<!-- Full -->
|
|
66
|
+
<div class="battery-icon">
|
|
67
|
+
<div class="battery-body"><div class="battery-fill" style="width:80%"></div></div>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<!-- Medium -->
|
|
71
|
+
<div class="battery-icon">
|
|
72
|
+
<div class="battery-body"><div class="battery-fill medium" style="width:40%"></div></div>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<!-- Low -->
|
|
76
|
+
<div class="battery-icon">
|
|
77
|
+
<div class="battery-body"><div class="battery-fill low" style="width:15%"></div></div>
|
|
78
|
+
</div>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Size Variants
|
|
82
|
+
No explicit size variants.
|
|
83
|
+
|
|
84
|
+
## Material Variants
|
|
85
|
+
|
|
86
|
+
| Charge Level | Class | Color |
|
|
87
|
+
|-------------|-------|-------|
|
|
88
|
+
| >40% | default | Green (`--green-on`) |
|
|
89
|
+
| 20-40% | `.medium` | Amber (`--amber`) |
|
|
90
|
+
| <20% | `.low` | Red (`--red-alert`) |
|
|
91
|
+
|
|
92
|
+
## Theme Behavior
|
|
93
|
+
- Border color adapts via `--border-mid`
|
|
94
|
+
- Fill colors are fixed accent colors
|
|
95
|
+
|
|
96
|
+
## Constraints
|
|
97
|
+
1. Terminal nub on RIGHT side via `::after` pseudo-element.
|
|
98
|
+
2. Fill color classes MUST match charge thresholds: green > amber > red.
|
|
99
|
+
3. Fill width set via inline style as percentage.
|
|
100
|
+
4. Body border is 2px (thicker than most borders) for icon visibility.
|
|
101
|
+
|
|
102
|
+
## Accessibility
|
|
103
|
+
- Use `role="img"` with `aria-label` (e.g., "Battery: 80%")
|
|
104
|
+
- Color state should be supplemented with text for accessibility
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Equalizer Bars
|
|
3
|
+
id: eq-bars
|
|
4
|
+
class: .eq-bars
|
|
5
|
+
category: meters
|
|
6
|
+
index: 4
|
|
7
|
+
materials: [phosphor-screen]
|
|
8
|
+
sizes: [md]
|
|
9
|
+
interactive: false
|
|
10
|
+
requires_js: false
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Equalizer Bars
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Winamp visualization, Windows Media Player EQ display, car stereo graphic EQ.
|
|
18
|
+
**Mechanism**: Graphic equalizer showing gain/cut per frequency band. Unlike VU (signal level), EQ shows frequency response curve. Bars represent fixed bands (60Hz, 250Hz, 1kHz, 4kHz, 16kHz). Height = boost/cut applied.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Container height | 90px |
|
|
25
|
+
| Band width | 14px |
|
|
26
|
+
| Band gap | 3px |
|
|
27
|
+
|
|
28
|
+
## CSS Recipe
|
|
29
|
+
|
|
30
|
+
### Wrapper
|
|
31
|
+
```css
|
|
32
|
+
.eq-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Container
|
|
36
|
+
```css
|
|
37
|
+
.eq-bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Band (Default: Blue)
|
|
41
|
+
```css
|
|
42
|
+
.eq-band {
|
|
43
|
+
width: 14px; border-radius: 2px 2px 0 0;
|
|
44
|
+
background: linear-gradient(180deg, var(--blue-info), #2255aa);
|
|
45
|
+
min-height: 4px;
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Color Variants
|
|
50
|
+
```css
|
|
51
|
+
.eq-band.warm { background: linear-gradient(180deg, var(--pink-action), #994466); }
|
|
52
|
+
.eq-band.bright { background: linear-gradient(180deg, var(--gold-warm), #997722); }
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## HTML Structure
|
|
56
|
+
```html
|
|
57
|
+
<div class="eq-wrap">
|
|
58
|
+
<div class="eq-bars">
|
|
59
|
+
<div class="eq-band warm" style="height:30%"></div>
|
|
60
|
+
<div class="eq-band warm" style="height:50%"></div>
|
|
61
|
+
<div class="eq-band" style="height:70%"></div>
|
|
62
|
+
<div class="eq-band" style="height:90%"></div>
|
|
63
|
+
<div class="eq-band" style="height:75%"></div>
|
|
64
|
+
<div class="eq-band bright" style="height:55%"></div>
|
|
65
|
+
<div class="eq-band bright" style="height:35%"></div>
|
|
66
|
+
<div class="eq-band bright" style="height:20%"></div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Size Variants
|
|
72
|
+
No explicit size variants.
|
|
73
|
+
|
|
74
|
+
## Material Variants
|
|
75
|
+
|
|
76
|
+
| Color Variant | Frequency Range |
|
|
77
|
+
|---------------|----------------|
|
|
78
|
+
| `.warm` (pink) | Low/mid frequencies |
|
|
79
|
+
| default (blue) | Mid frequencies |
|
|
80
|
+
| `.bright` (gold) | High frequencies |
|
|
81
|
+
|
|
82
|
+
## Theme Behavior
|
|
83
|
+
- Band colors are fixed accent colors
|
|
84
|
+
- No theme-dependent changes
|
|
85
|
+
|
|
86
|
+
## Constraints
|
|
87
|
+
1. Color variants MUST distinguish frequency ranges: warm=low, default=mid, bright=high.
|
|
88
|
+
2. Bands are narrower than VU bars (14px vs 12px) with tighter gap (3px vs 4px).
|
|
89
|
+
3. Each band gradient runs lighter at top, darker at bottom.
|
|
90
|
+
|
|
91
|
+
## Accessibility
|
|
92
|
+
- Decorative visualization
|
|
93
|
+
- Use `aria-hidden="true"` or `role="img"` with `aria-label`
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: EV Meter
|
|
3
|
+
id: ev-meter
|
|
4
|
+
class: .ev-meter
|
|
5
|
+
category: meters
|
|
6
|
+
index: 2
|
|
7
|
+
materials: [panel]
|
|
8
|
+
sizes: [md]
|
|
9
|
+
interactive: false
|
|
10
|
+
requires_js: false
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# EV Meter
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Camera viewfinder exposure meter (present in every DSLR/mirrorless since 1960s).
|
|
18
|
+
**Mechanism**: Shows difference between metered light level and selected exposure settings. Zero (center) = correct exposure. Positive = overexposure, negative = underexposure. Originally a moving-coil galvanometer needle in film-era cameras.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Track | 18px wide x 120px tall |
|
|
25
|
+
| Zero line | 1px at vertical center |
|
|
26
|
+
| Fill bar | Extends from center (up or down) |
|
|
27
|
+
| Readout | 10px Michroma below |
|
|
28
|
+
|
|
29
|
+
## CSS Recipe
|
|
30
|
+
|
|
31
|
+
### Container
|
|
32
|
+
```css
|
|
33
|
+
.ev-meter { display: flex; flex-direction: column; align-items: center; gap: 4px; }
|
|
34
|
+
.ev-sign { font-size: 10px; color: var(--text-muted); letter-spacing: 1px; font-family: var(--font-ui); }
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Track
|
|
38
|
+
```css
|
|
39
|
+
.ev-track {
|
|
40
|
+
width: 18px; height: 120px; background: var(--bg-inset);
|
|
41
|
+
border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
|
|
42
|
+
position: relative; overflow: hidden; box-shadow: inset 1px 0 3px rgba(0,0,0,0.4);
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Zero Line
|
|
47
|
+
```css
|
|
48
|
+
.ev-zero-line { position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: #555; z-index: 2; }
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Fill Bar
|
|
52
|
+
```css
|
|
53
|
+
.ev-fill-bar {
|
|
54
|
+
position: absolute; left: 3px; right: 3px;
|
|
55
|
+
background: var(--amber); border-radius: 1px; z-index: 1;
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Readout
|
|
60
|
+
```css
|
|
61
|
+
.ev-readout { font-family: var(--font-display); font-size: 10px; color: var(--amber); letter-spacing: 1px; }
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## HTML Structure
|
|
65
|
+
```html
|
|
66
|
+
<div class="ev-meter">
|
|
67
|
+
<span class="ev-sign">+</span>
|
|
68
|
+
<div class="ev-track">
|
|
69
|
+
<div class="ev-zero-line"></div>
|
|
70
|
+
<div class="ev-fill-bar" style="top:30%;height:20%"></div>
|
|
71
|
+
</div>
|
|
72
|
+
<span class="ev-sign">−</span>
|
|
73
|
+
<span class="ev-readout">+0.7</span>
|
|
74
|
+
</div>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Size Variants
|
|
78
|
+
No explicit size variants.
|
|
79
|
+
|
|
80
|
+
## Material Variants
|
|
81
|
+
- Track: Recessed panel
|
|
82
|
+
- Fill: Solid amber
|
|
83
|
+
|
|
84
|
+
## Theme Behavior
|
|
85
|
+
- Track adapts via tokens
|
|
86
|
+
- Amber fill and readout are fixed
|
|
87
|
+
|
|
88
|
+
## Constraints
|
|
89
|
+
1. Zero line MUST be at exact vertical center (50%).
|
|
90
|
+
2. Fill bar extends from center upward (overexposure) or downward (underexposure).
|
|
91
|
+
3. Fill position uses `top` and `height` percentages.
|
|
92
|
+
4. + sign at top, - sign at bottom (standard photographic convention).
|
|
93
|
+
|
|
94
|
+
## Accessibility
|
|
95
|
+
- Use `role="meter"` with `aria-valuenow`, `aria-valuemin`, `aria-valuemax`
|
|
96
|
+
- `aria-label="Exposure compensation"`
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Exposure Scale
|
|
3
|
+
id: exp-scale
|
|
4
|
+
class: .exp-scale
|
|
5
|
+
category: meters
|
|
6
|
+
index: 11
|
|
7
|
+
materials: [panel]
|
|
8
|
+
sizes: [md]
|
|
9
|
+
interactive: false
|
|
10
|
+
requires_js: false
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Exposure Scale
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Bottom-of-viewfinder EV ruler in SLR/DSLR cameras (since Nikon F3, ~1980).
|
|
18
|
+
**Mechanism**: Horizontal tick ruler showing exposure compensation scale (-2 to +2 EV). Tick marks at 1/3-stop increments. Floating dot indicator shows current EV compensation. Major ticks (full-stop) taller than minor ticks (1/3-stop).
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Width | 200px |
|
|
25
|
+
| Track height | 12px |
|
|
26
|
+
| Major tick | 8px height |
|
|
27
|
+
| Minor tick | 4-5px height |
|
|
28
|
+
| Indicator dot | 6px diameter |
|
|
29
|
+
|
|
30
|
+
## CSS Recipe
|
|
31
|
+
|
|
32
|
+
### Container
|
|
33
|
+
```css
|
|
34
|
+
.exp-scale { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 200px; }
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Track
|
|
38
|
+
```css
|
|
39
|
+
.exp-track { width: 100%; height: 12px; position: relative; display: flex; align-items: center; }
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Ruler Line
|
|
43
|
+
```css
|
|
44
|
+
.exp-ruler { width: 100%; height: 1px; background: #333; position: absolute; }
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Tick Marks
|
|
48
|
+
```css
|
|
49
|
+
.exp-ticks { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 2px; }
|
|
50
|
+
.exp-tick { width: 1px; background: #333; }
|
|
51
|
+
.exp-tick.major { height: 8px; background: #555; }
|
|
52
|
+
.exp-tick.minor { height: 5px; }
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Indicator Dot
|
|
56
|
+
```css
|
|
57
|
+
.exp-indicator {
|
|
58
|
+
position: absolute; bottom: 0; width: 6px; height: 6px;
|
|
59
|
+
background: var(--amber); border-radius: 50%; transform: translateX(-50%);
|
|
60
|
+
box-shadow: 0 0 6px var(--amber-glow);
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Labels
|
|
65
|
+
```css
|
|
66
|
+
.exp-labels { width: 100%; display: flex; justify-content: space-between; padding: 0 2px; }
|
|
67
|
+
.exp-labels span { font-size: 7px; color: var(--text-muted); letter-spacing: 1px; font-family: var(--font-ui); }
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## HTML Structure
|
|
71
|
+
```html
|
|
72
|
+
<div class="exp-scale">
|
|
73
|
+
<div class="exp-track">
|
|
74
|
+
<div class="exp-ruler"></div>
|
|
75
|
+
<div class="exp-ticks">
|
|
76
|
+
<div class="exp-tick major" style="height:8px"></div>
|
|
77
|
+
<div class="exp-tick minor" style="height:4px"></div>
|
|
78
|
+
<div class="exp-tick minor" style="height:4px"></div>
|
|
79
|
+
<div class="exp-tick major" style="height:8px"></div>
|
|
80
|
+
<!-- ... repeat for -2 to +2 range -->
|
|
81
|
+
<div class="exp-tick major" style="height:8px"></div>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="exp-indicator" style="left:62%"></div>
|
|
84
|
+
</div>
|
|
85
|
+
<div class="exp-labels"><span>-2</span><span>-1</span><span>0</span><span>+1</span><span>+2</span></div>
|
|
86
|
+
</div>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Size Variants
|
|
90
|
+
No explicit size variants.
|
|
91
|
+
|
|
92
|
+
## Material Variants
|
|
93
|
+
- Ruler and ticks: Subtle gray lines
|
|
94
|
+
- Indicator: Amber dot with glow
|
|
95
|
+
|
|
96
|
+
## Theme Behavior
|
|
97
|
+
- Tick and ruler colors are fixed subtle grays
|
|
98
|
+
- Amber indicator and glow are fixed
|
|
99
|
+
- Labels use `--text-muted`
|
|
100
|
+
|
|
101
|
+
## Constraints
|
|
102
|
+
1. Major ticks MUST be taller than minor ticks (8px vs 4-5px).
|
|
103
|
+
2. Tick spacing represents 1/3-stop increments between major full-stop marks.
|
|
104
|
+
3. Indicator position set via `left` percentage.
|
|
105
|
+
4. Labels MUST show -2, -1, 0, +1, +2 at equal spacing.
|
|
106
|
+
5. Labels are 7px font (very small, viewfinder annotation style).
|
|
107
|
+
|
|
108
|
+
## Accessibility
|
|
109
|
+
- Use `role="img"` with `aria-label` describing current EV value
|
|
110
|
+
- Or `role="meter"` if interactive
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Gauge Full Circle
|
|
3
|
+
id: gauge-full
|
|
4
|
+
class: .gauge-full
|
|
5
|
+
category: meters
|
|
6
|
+
index: 13
|
|
7
|
+
materials: [panel, chrome]
|
|
8
|
+
sizes: [md]
|
|
9
|
+
interactive: false
|
|
10
|
+
requires_js: true
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Gauge Full Circle
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Compass (ship/aircraft), RPM tachometer, clock face, radio tuning dial.
|
|
18
|
+
**Mechanism**: Full 360-degree rotating indicator. Magnetic compass: magnetized needle aligns with Earth's magnetic field. Tachometer: moving-coil meter with extended angular range or servo-driven indicator.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Container | 120x120px circle |
|
|
25
|
+
| Needle | 2px wide x 48px tall |
|
|
26
|
+
| Pivot | 8px diameter at center |
|
|
27
|
+
| Cardinal labels | N/S/E/W at four positions |
|
|
28
|
+
|
|
29
|
+
## CSS Recipe
|
|
30
|
+
|
|
31
|
+
### Container
|
|
32
|
+
```css
|
|
33
|
+
.gauge-full {
|
|
34
|
+
width: 120px; height: 120px; border-radius: 50%;
|
|
35
|
+
background: var(--bg-inset); border: 2px solid var(--border-mid);
|
|
36
|
+
position: relative;
|
|
37
|
+
box-shadow: inset 0 1px 6px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Needle
|
|
42
|
+
```css
|
|
43
|
+
.gauge-full-needle {
|
|
44
|
+
position: absolute; top: 12px; left: 50%; width: 2px; height: 48px;
|
|
45
|
+
background: linear-gradient(180deg, var(--red-alert), transparent);
|
|
46
|
+
transform-origin: bottom center;
|
|
47
|
+
margin-left: -1px; z-index: 2;
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Pivot
|
|
52
|
+
```css
|
|
53
|
+
.gauge-full-pivot {
|
|
54
|
+
position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
|
|
55
|
+
width: 8px; height: 8px; border-radius: 50%;
|
|
56
|
+
background: radial-gradient(circle, #888, #333);
|
|
57
|
+
z-index: 3;
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Cardinal Labels
|
|
62
|
+
```css
|
|
63
|
+
.gauge-full-label {
|
|
64
|
+
position: absolute; font-family: var(--font-ui); font-size: 7px; font-weight: 600;
|
|
65
|
+
color: var(--text-muted); letter-spacing: 1px;
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## HTML Structure
|
|
70
|
+
```html
|
|
71
|
+
<div class="gauge-full">
|
|
72
|
+
<div class="gauge-full-needle" style="transform:rotate(45deg)"></div>
|
|
73
|
+
<div class="gauge-full-pivot"></div>
|
|
74
|
+
<span class="gauge-full-label" style="top:8px;left:50%;transform:translateX(-50%)">N</span>
|
|
75
|
+
<span class="gauge-full-label" style="right:8px;top:50%;transform:translateY(-50%)">E</span>
|
|
76
|
+
<span class="gauge-full-label" style="bottom:8px;left:50%;transform:translateX(-50%)">S</span>
|
|
77
|
+
<span class="gauge-full-label" style="left:8px;top:50%;transform:translateY(-50%)">W</span>
|
|
78
|
+
</div>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Size Variants
|
|
82
|
+
No explicit size variants.
|
|
83
|
+
|
|
84
|
+
## Material Variants
|
|
85
|
+
- Container: Recessed panel with thick border
|
|
86
|
+
- Needle: Red-to-transparent gradient
|
|
87
|
+
- Pivot: Metallic radial gradient
|
|
88
|
+
|
|
89
|
+
## Theme Behavior
|
|
90
|
+
- Container adapts via tokens
|
|
91
|
+
- Needle red and text colors adapt via accent tokens
|
|
92
|
+
|
|
93
|
+
## Constraints
|
|
94
|
+
1. Needle rotates full 360 degrees from center point.
|
|
95
|
+
2. Cardinal labels (N/S/E/W) are positioned absolutely at four compass points.
|
|
96
|
+
3. Needle uses `transform-origin: bottom center` -- tip points outward.
|
|
97
|
+
4. Needle gradient fades from red tip to transparent tail.
|
|
98
|
+
5. Pivot is centered with `translate(-50%,-50%)`.
|
|
99
|
+
|
|
100
|
+
## Accessibility
|
|
101
|
+
- Use `role="img"` with `aria-label` (e.g., "Compass heading: 45 degrees NE")
|
|
102
|
+
- Requires JS to update needle rotation
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Gauge Semicircular
|
|
3
|
+
id: gauge-semi
|
|
4
|
+
class: .gauge-semi
|
|
5
|
+
category: meters
|
|
6
|
+
index: 12
|
|
7
|
+
materials: [panel, chrome]
|
|
8
|
+
sizes: [md]
|
|
9
|
+
interactive: false
|
|
10
|
+
requires_js: true
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Gauge Semicircular
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Analog VU meters (Dorrough, Sifam), vintage radio signal strength meters, ammeter/voltmeter panel meters.
|
|
18
|
+
**Mechanism**: D'Arsonval moving-coil galvanometer. Lightweight coil in permanent magnet field. Current through coil creates rotation. Needle attached to coil moves across calibrated scale. Hairspring provides restoring force. Jeweled bearing (sapphire) at pivot.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Container | 160x90px semicircle |
|
|
25
|
+
| Needle | 2px wide x 70px tall |
|
|
26
|
+
| Pivot | 10px diameter at bottom center |
|
|
27
|
+
| Scale arc | 90-120 degrees |
|
|
28
|
+
| Needle range | -60deg to +60deg |
|
|
29
|
+
|
|
30
|
+
## CSS Recipe
|
|
31
|
+
|
|
32
|
+
### Container (Faceplate)
|
|
33
|
+
```css
|
|
34
|
+
.gauge-semi {
|
|
35
|
+
width: 160px; height: 90px; position: relative;
|
|
36
|
+
background: var(--bg-inset); border: 1px solid var(--border-subtle);
|
|
37
|
+
border-radius: 80px 80px 0 0; overflow: hidden;
|
|
38
|
+
box-shadow: inset 0 1px 4px rgba(0,0,0,0.5);
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Scale Arc
|
|
43
|
+
```css
|
|
44
|
+
.gauge-semi-scale {
|
|
45
|
+
position: absolute; inset: 8px; inset-block-end: 0; border-radius: 72px 72px 0 0;
|
|
46
|
+
border: 1px solid var(--border-mid); border-bottom: none;
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Needle
|
|
51
|
+
```css
|
|
52
|
+
.gauge-semi-needle {
|
|
53
|
+
position: absolute; bottom: 0; left: 50%; width: 2px; height: 70px;
|
|
54
|
+
background: linear-gradient(0deg, var(--red-alert), transparent 20%, var(--text-primary) 20%);
|
|
55
|
+
transform-origin: bottom center; transform: rotate(-60deg);
|
|
56
|
+
transition: transform 0.5s var(--spring);
|
|
57
|
+
z-index: 2;
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Pivot Bearing
|
|
62
|
+
```css
|
|
63
|
+
.gauge-semi-pivot {
|
|
64
|
+
position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
|
|
65
|
+
width: 10px; height: 10px; border-radius: 50%;
|
|
66
|
+
background: radial-gradient(circle, #666, #222);
|
|
67
|
+
z-index: 3;
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Scale Labels
|
|
72
|
+
```css
|
|
73
|
+
.gauge-semi-labels {
|
|
74
|
+
position: absolute; bottom: 6px; left: 10px; right: 10px;
|
|
75
|
+
display: flex; justify-content: space-between;
|
|
76
|
+
font-family: var(--font-ui); font-size: 7px; color: var(--text-muted);
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## HTML Structure
|
|
81
|
+
```html
|
|
82
|
+
<div class="gauge-semi">
|
|
83
|
+
<div class="gauge-semi-scale"></div>
|
|
84
|
+
<div class="gauge-semi-needle" style="transform:rotate(-20deg)"></div>
|
|
85
|
+
<div class="gauge-semi-pivot"></div>
|
|
86
|
+
<div class="gauge-semi-labels"><span>-20</span><span>VU</span><span>+3</span></div>
|
|
87
|
+
</div>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Size Variants
|
|
91
|
+
No explicit size variants.
|
|
92
|
+
|
|
93
|
+
## Material Variants
|
|
94
|
+
- Faceplate: Recessed panel
|
|
95
|
+
- Needle: Red-tipped indicator
|
|
96
|
+
- Pivot: Metallic radial gradient (jeweled bearing)
|
|
97
|
+
|
|
98
|
+
## Theme Behavior
|
|
99
|
+
- Faceplate adapts via tokens
|
|
100
|
+
- Needle tip red and body color adapt via `--red-alert` and `--text-primary`
|
|
101
|
+
- Pivot metallic gradient is fixed
|
|
102
|
+
|
|
103
|
+
## Constraints
|
|
104
|
+
1. Needle MUST use `transform-origin: bottom center` for pivot rotation.
|
|
105
|
+
2. Needle rotation range is -60deg to +60deg (set via `transform: rotate(Ndeg)`).
|
|
106
|
+
3. Transition MUST use `--spring` easing for ballistic needle movement (overshoot).
|
|
107
|
+
4. Needle gradient has red tip at bottom 20% -- the visible tip of the pointer.
|
|
108
|
+
5. Pivot is positioned at `bottom: -4px` to appear as center pivot point.
|
|
109
|
+
|
|
110
|
+
## Accessibility
|
|
111
|
+
- Use `role="meter"` with `aria-valuenow`
|
|
112
|
+
- `aria-label` should describe the measured value
|
|
113
|
+
- Requires JS to update needle rotation
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Histogram
|
|
3
|
+
id: histogram-wrap
|
|
4
|
+
class: .histogram-wrap
|
|
5
|
+
category: meters
|
|
6
|
+
index: 5
|
|
7
|
+
materials: [phosphor-screen]
|
|
8
|
+
sizes: [md]
|
|
9
|
+
interactive: false
|
|
10
|
+
requires_js: true
|
|
11
|
+
canvas: true
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Histogram
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Sony camera histogram overlay, Final Cut Pro waveform monitor, DaVinci Resolve parade scope.
|
|
18
|
+
**Mechanism**: Shows distribution of brightness values in an image. X-axis = brightness (black to white), Y-axis = pixel count at that brightness. Used by camera operators to judge exposure.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Canvas | 200x80px |
|
|
25
|
+
| Container padding | 2px |
|
|
26
|
+
| Border-radius | var(--radius-sm) |
|
|
27
|
+
|
|
28
|
+
## CSS Recipe
|
|
29
|
+
|
|
30
|
+
### Container
|
|
31
|
+
```css
|
|
32
|
+
.histogram-wrap {
|
|
33
|
+
background: #0a0a0a; border: 1px solid #1e1e1e;
|
|
34
|
+
border-radius: var(--radius-sm); padding: 2px;
|
|
35
|
+
box-shadow: inset 0 1px 4px rgba(0,0,0,0.6);
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Canvas
|
|
40
|
+
```css
|
|
41
|
+
.histogram-canvas { display: block; border-radius: 2px; }
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## HTML Structure
|
|
45
|
+
```html
|
|
46
|
+
<div class="histogram-wrap">
|
|
47
|
+
<canvas class="histogram-canvas" width="200" height="80" id="histCanvas"></canvas>
|
|
48
|
+
</div>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Size Variants
|
|
52
|
+
No explicit size variants.
|
|
53
|
+
|
|
54
|
+
## Material Variants
|
|
55
|
+
Single material: Phosphor screen with deep black background.
|
|
56
|
+
|
|
57
|
+
## Theme Behavior
|
|
58
|
+
- Container uses hardcoded dark colors (monitor displays are always dark)
|
|
59
|
+
- Canvas content rendered by JS
|
|
60
|
+
|
|
61
|
+
## Constraints
|
|
62
|
+
1. Canvas renders 200x80px luminance distribution.
|
|
63
|
+
2. For each x pixel, calculate height using sine-based curve with random variation.
|
|
64
|
+
3. Draw 1px-wide vertical bars with amber gradient (`rgba(245,166,35,0.1)` to `rgba(245,166,35,0.6)`).
|
|
65
|
+
4. Container background MUST be near-black (`#0a0a0a`).
|
|
66
|
+
5. Requires JS for canvas rendering.
|
|
67
|
+
|
|
68
|
+
## Accessibility
|
|
69
|
+
- Use `role="img"` on canvas with `aria-label` describing the histogram
|
|
70
|
+
- Provide text fallback for screen readers
|