@zen-ui-capri/system 0.0.0-stage → 1.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/.agents/skills/capri-zen-ui/SKILL.md +59 -0
- package/AGENTS.md +57 -0
- package/CLAUDE.md +7 -0
- package/LICENSE +21 -0
- package/README.md +93 -2
- package/bin/capri.mjs +1187 -0
- package/dist/lib/audio/ZenAudioController.d.ts +10 -0
- package/dist/lib/audio/ZenAudioController.d.ts.map +1 -0
- package/dist/lib/audio/useZenAudioSynth.d.ts +26 -0
- package/dist/lib/audio/useZenAudioSynth.d.ts.map +1 -0
- package/dist/lib/capri/capri-engine.d.ts +127 -0
- package/dist/lib/capri/capri-engine.d.ts.map +1 -0
- package/dist/lib/components/ZenAIConstruct.d.ts +24 -0
- package/dist/lib/components/ZenAIConstruct.d.ts.map +1 -0
- package/dist/lib/components/ZenAmbientBackground.d.ts +8 -0
- package/dist/lib/components/ZenAmbientBackground.d.ts.map +1 -0
- package/dist/lib/components/ZenBadge.d.ts +21 -0
- package/dist/lib/components/ZenBadge.d.ts.map +1 -0
- package/dist/lib/components/ZenButton.d.ts +24 -0
- package/dist/lib/components/ZenButton.d.ts.map +1 -0
- package/dist/lib/components/ZenCard.d.ts +36 -0
- package/dist/lib/components/ZenCard.d.ts.map +1 -0
- package/dist/lib/components/ZenDataDisplay.d.ts +50 -0
- package/dist/lib/components/ZenDataDisplay.d.ts.map +1 -0
- package/dist/lib/components/ZenDataTable.d.ts +20 -0
- package/dist/lib/components/ZenDataTable.d.ts.map +1 -0
- package/dist/lib/components/ZenDossierPanel.d.ts +33 -0
- package/dist/lib/components/ZenDossierPanel.d.ts.map +1 -0
- package/dist/lib/components/ZenDropdown.d.ts +19 -0
- package/dist/lib/components/ZenDropdown.d.ts.map +1 -0
- package/dist/lib/components/ZenFeedback.d.ts +24 -0
- package/dist/lib/components/ZenFeedback.d.ts.map +1 -0
- package/dist/lib/components/ZenForms.d.ts +84 -0
- package/dist/lib/components/ZenForms.d.ts.map +1 -0
- package/dist/lib/components/ZenHeading.d.ts +15 -0
- package/dist/lib/components/ZenHeading.d.ts.map +1 -0
- package/dist/lib/components/ZenIcon.d.ts +24 -0
- package/dist/lib/components/ZenIcon.d.ts.map +1 -0
- package/dist/lib/components/ZenInput.d.ts +12 -0
- package/dist/lib/components/ZenInput.d.ts.map +1 -0
- package/dist/lib/components/ZenModal.d.ts +12 -0
- package/dist/lib/components/ZenModal.d.ts.map +1 -0
- package/dist/lib/components/ZenNavbar.d.ts +11 -0
- package/dist/lib/components/ZenNavbar.d.ts.map +1 -0
- package/dist/lib/components/ZenNavigation.d.ts +52 -0
- package/dist/lib/components/ZenNavigation.d.ts.map +1 -0
- package/dist/lib/components/ZenOverlays.d.ts +48 -0
- package/dist/lib/components/ZenOverlays.d.ts.map +1 -0
- package/dist/lib/components/ZenSegmentedControl.d.ts +18 -0
- package/dist/lib/components/ZenSegmentedControl.d.ts.map +1 -0
- package/dist/lib/components/ZenSwitch.d.ts +11 -0
- package/dist/lib/components/ZenSwitch.d.ts.map +1 -0
- package/dist/lib/components/ZenTabs.d.ts +17 -0
- package/dist/lib/components/ZenTabs.d.ts.map +1 -0
- package/dist/lib/components/ZenTimelineCard.d.ts +14 -0
- package/dist/lib/components/ZenTimelineCard.d.ts.map +1 -0
- package/dist/lib/components/ZenToast.d.ts +18 -0
- package/dist/lib/components/ZenToast.d.ts.map +1 -0
- package/dist/lib/cosmos/ZenCosmosCanvas.d.ts +10 -0
- package/dist/lib/cosmos/ZenCosmosCanvas.d.ts.map +1 -0
- package/dist/lib/cosmos/ZenTelemetryHud.d.ts +45 -0
- package/dist/lib/cosmos/ZenTelemetryHud.d.ts.map +1 -0
- package/dist/lib/index.d.ts +33 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +3922 -0
- package/dist/lib/theme/ZenThemeProvider.d.ts +47 -0
- package/dist/lib/theme/ZenThemeProvider.d.ts.map +1 -0
- package/dist/lib/tokens.css +888 -0
- package/dist/lib/universal/zen-universal.d.ts +77 -0
- package/dist/lib/universal/zen-universal.d.ts.map +1 -0
- package/dist/lib/universal/zen-universal.js +18 -0
- package/dist/lib/zen-universal-C0PD8AI9.js +1352 -0
- package/package.json +78 -4
- package/src/lib/audio/ZenAudioController.tsx +114 -0
- package/src/lib/audio/useZenAudioSynth.ts +289 -0
- package/src/lib/capri/capri-engine.ts +939 -0
- package/src/lib/components/ZenAIConstruct.tsx +594 -0
- package/src/lib/components/ZenAmbientBackground.tsx +210 -0
- package/src/lib/components/ZenBadge.tsx +111 -0
- package/src/lib/components/ZenButton.tsx +127 -0
- package/src/lib/components/ZenCard.tsx +180 -0
- package/src/lib/components/ZenDataDisplay.tsx +349 -0
- package/src/lib/components/ZenDataTable.tsx +143 -0
- package/src/lib/components/ZenDossierPanel.tsx +120 -0
- package/src/lib/components/ZenDropdown.tsx +208 -0
- package/src/lib/components/ZenFeedback.tsx +137 -0
- package/src/lib/components/ZenForms.tsx +664 -0
- package/src/lib/components/ZenHeading.tsx +63 -0
- package/src/lib/components/ZenIcon.tsx +220 -0
- package/src/lib/components/ZenInput.tsx +120 -0
- package/src/lib/components/ZenModal.tsx +103 -0
- package/src/lib/components/ZenNavbar.tsx +106 -0
- package/src/lib/components/ZenNavigation.tsx +300 -0
- package/src/lib/components/ZenOverlays.tsx +386 -0
- package/src/lib/components/ZenSegmentedControl.tsx +113 -0
- package/src/lib/components/ZenSwitch.tsx +63 -0
- package/src/lib/components/ZenTabs.tsx +103 -0
- package/src/lib/components/ZenTimelineCard.tsx +64 -0
- package/src/lib/components/ZenToast.tsx +96 -0
- package/src/lib/cosmos/ZenCosmosCanvas.tsx +931 -0
- package/src/lib/cosmos/ZenTelemetryHud.tsx +385 -0
- package/src/lib/index.ts +293 -0
- package/src/lib/styles/zen-tokens.css +888 -0
- package/src/lib/theme/ZenThemeProvider.tsx +328 -0
- package/src/lib/universal/zen-universal.ts +743 -0
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useRef,
|
|
3
|
+
useImperativeHandle,
|
|
4
|
+
type Ref,
|
|
5
|
+
} from 'react';
|
|
6
|
+
import { ZenSegmentedControl } from '../components/ZenSegmentedControl';
|
|
7
|
+
|
|
8
|
+
export interface CelestialCatalogEntry {
|
|
9
|
+
readonly id: string;
|
|
10
|
+
readonly badge: string;
|
|
11
|
+
readonly name: string;
|
|
12
|
+
readonly shortName: string;
|
|
13
|
+
readonly classification: string;
|
|
14
|
+
readonly massLabel: string;
|
|
15
|
+
readonly tempLumLabel: string;
|
|
16
|
+
readonly accentHex: string;
|
|
17
|
+
readonly hitRadius: number;
|
|
18
|
+
readonly reticleSize: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const DEFAULT_CELESTIAL_CATALOG: readonly CelestialCatalogEntry[] = [
|
|
22
|
+
{
|
|
23
|
+
id: 'alpha-cen-a',
|
|
24
|
+
badge: 'STELLAR CORE 01 · PRIMARY',
|
|
25
|
+
name: 'Alpha Centauri A (Rigil Kentaurus)',
|
|
26
|
+
shortName: 'Alpha Cen A',
|
|
27
|
+
classification: 'G2V Main-Sequence Yellow Star',
|
|
28
|
+
massLabel: '1.100 M☉ (2.19 × 10³⁰ kg)',
|
|
29
|
+
tempLumLabel: '5,790 K · 1.519 L☉',
|
|
30
|
+
accentHex: '#FBBF24',
|
|
31
|
+
hitRadius: 0.56,
|
|
32
|
+
reticleSize: 132,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 'alpha-cen-b',
|
|
36
|
+
badge: 'STELLAR CORE 02 · SECONDARY',
|
|
37
|
+
name: 'Alpha Centauri B (Toliman)',
|
|
38
|
+
shortName: 'Alpha Cen B',
|
|
39
|
+
classification: 'K1V Main-Sequence Orange Star',
|
|
40
|
+
massLabel: '0.907 M☉ (1.80 × 10³⁰ kg)',
|
|
41
|
+
tempLumLabel: '5,260 K · 0.500 L☉',
|
|
42
|
+
accentHex: '#FB923C',
|
|
43
|
+
hitRadius: 0.45,
|
|
44
|
+
reticleSize: 106,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: 'proxima-c',
|
|
48
|
+
badge: 'STELLAR CORE 03 · TERTIARY',
|
|
49
|
+
name: 'Proxima Centauri (Alpha Cen C)',
|
|
50
|
+
shortName: 'Proxima C',
|
|
51
|
+
classification: 'M5.5Ve Red Dwarf Flare Star',
|
|
52
|
+
massLabel: '0.540 M☉ (Trisolaran Active Flare)',
|
|
53
|
+
tempLumLabel: '3,042 K · 0.080 L☉',
|
|
54
|
+
accentHex: '#F87171',
|
|
55
|
+
hitRadius: 0.36,
|
|
56
|
+
reticleSize: 86,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 'trisolaris',
|
|
60
|
+
badge: 'TRISOLARAN HOMEWORLD',
|
|
61
|
+
name: 'Planet Trisolaris',
|
|
62
|
+
shortName: 'Trisolaris',
|
|
63
|
+
classification: 'Silicate-Basalt Rocky Exoplanet',
|
|
64
|
+
massLabel: '1.08 M⊕ (6.45 × 10²⁴ kg)',
|
|
65
|
+
tempLumLabel: '3-Sun Tidal & Radiative Flux',
|
|
66
|
+
accentHex: '#60A5FA',
|
|
67
|
+
hitRadius: 0.36,
|
|
68
|
+
reticleSize: 86,
|
|
69
|
+
},
|
|
70
|
+
];
|
|
71
|
+
|
|
72
|
+
export interface ZenTelemetryPayload {
|
|
73
|
+
readonly badge: string;
|
|
74
|
+
readonly name: string;
|
|
75
|
+
readonly classification: string;
|
|
76
|
+
readonly accentHex: string;
|
|
77
|
+
readonly reticleSize: number;
|
|
78
|
+
readonly screenX: number;
|
|
79
|
+
readonly screenY: number;
|
|
80
|
+
readonly massLabel: string;
|
|
81
|
+
readonly tempLumLabel: string;
|
|
82
|
+
readonly velocityLabel: string;
|
|
83
|
+
readonly statusLabel: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface ZenTelemetryBridge {
|
|
87
|
+
readonly commitFrame: (payload: ZenTelemetryPayload | null) => void;
|
|
88
|
+
readonly isOccludedTarget: (target: EventTarget | null) => boolean;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface ZenTelemetryHudProps {
|
|
92
|
+
readonly bridgeRef?: Ref<ZenTelemetryBridge>;
|
|
93
|
+
readonly declarativeData?: Omit<
|
|
94
|
+
ZenTelemetryPayload,
|
|
95
|
+
'screenX' | 'screenY' | 'reticleSize'
|
|
96
|
+
> | null;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const OCCLUDE_SELECTOR =
|
|
100
|
+
'[data-zen-occlude="true"], a, button, input, select, textarea, [role="button"], [role="radiogroup"], [role="tablist"], [role="listbox"], [role="dialog"]';
|
|
101
|
+
|
|
102
|
+
export function ZenTelemetryHud({
|
|
103
|
+
bridgeRef,
|
|
104
|
+
declarativeData,
|
|
105
|
+
}: ZenTelemetryHudProps) {
|
|
106
|
+
const hudContainerRef = useRef<HTMLDivElement | null>(null);
|
|
107
|
+
const reticleRef = useRef<HTMLDivElement | null>(null);
|
|
108
|
+
const badgeRef = useRef<HTMLSpanElement | null>(null);
|
|
109
|
+
const nameRef = useRef<HTMLDivElement | null>(null);
|
|
110
|
+
const classRef = useRef<HTMLDivElement | null>(null);
|
|
111
|
+
const massRef = useRef<HTMLSpanElement | null>(null);
|
|
112
|
+
const tempLumRef = useRef<HTMLSpanElement | null>(null);
|
|
113
|
+
const velRef = useRef<HTMLSpanElement | null>(null);
|
|
114
|
+
const statusRef = useRef<HTMLSpanElement | null>(null);
|
|
115
|
+
|
|
116
|
+
useImperativeHandle(
|
|
117
|
+
bridgeRef,
|
|
118
|
+
() => ({
|
|
119
|
+
isOccludedTarget: (target: EventTarget | null) => {
|
|
120
|
+
const el = target as HTMLElement | null;
|
|
121
|
+
return Boolean(el?.closest?.(OCCLUDE_SELECTOR));
|
|
122
|
+
},
|
|
123
|
+
commitFrame: (payload: ZenTelemetryPayload | null) => {
|
|
124
|
+
const hudEl = hudContainerRef.current;
|
|
125
|
+
const retEl = reticleRef.current;
|
|
126
|
+
if (!hudEl || !retEl) return;
|
|
127
|
+
|
|
128
|
+
if (!payload) {
|
|
129
|
+
hudEl.style.opacity = '0';
|
|
130
|
+
retEl.style.opacity = '0';
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const {
|
|
135
|
+
screenX,
|
|
136
|
+
screenY,
|
|
137
|
+
reticleSize,
|
|
138
|
+
accentHex,
|
|
139
|
+
badge,
|
|
140
|
+
name,
|
|
141
|
+
classification,
|
|
142
|
+
massLabel,
|
|
143
|
+
tempLumLabel,
|
|
144
|
+
velocityLabel,
|
|
145
|
+
statusLabel,
|
|
146
|
+
} = payload;
|
|
147
|
+
|
|
148
|
+
retEl.style.opacity = '1';
|
|
149
|
+
retEl.style.width = `${reticleSize}px`;
|
|
150
|
+
retEl.style.height = `${reticleSize}px`;
|
|
151
|
+
retEl.style.borderColor = accentHex;
|
|
152
|
+
retEl.style.transform = `translate3d(${screenX - reticleSize * 0.5}px, ${
|
|
153
|
+
screenY - reticleSize * 0.5
|
|
154
|
+
}px, 0)`;
|
|
155
|
+
|
|
156
|
+
const cardX = Math.min(
|
|
157
|
+
Math.max(screenX + reticleSize * 0.5 + 16, 16),
|
|
158
|
+
window.innerWidth - 336
|
|
159
|
+
);
|
|
160
|
+
const cardY = Math.min(
|
|
161
|
+
Math.max(screenY - 76, 88),
|
|
162
|
+
window.innerHeight - 200
|
|
163
|
+
);
|
|
164
|
+
|
|
165
|
+
hudEl.style.opacity = '1';
|
|
166
|
+
hudEl.style.transform = `translate3d(${cardX}px, ${cardY}px, 0)`;
|
|
167
|
+
hudEl.style.borderColor = `${accentHex}77`;
|
|
168
|
+
|
|
169
|
+
if (badgeRef.current) {
|
|
170
|
+
badgeRef.current.textContent = badge;
|
|
171
|
+
badgeRef.current.style.color = accentHex;
|
|
172
|
+
}
|
|
173
|
+
if (nameRef.current) {
|
|
174
|
+
nameRef.current.textContent = name;
|
|
175
|
+
}
|
|
176
|
+
if (classRef.current) {
|
|
177
|
+
classRef.current.textContent = classification;
|
|
178
|
+
}
|
|
179
|
+
if (massRef.current) {
|
|
180
|
+
massRef.current.textContent = massLabel;
|
|
181
|
+
}
|
|
182
|
+
if (tempLumRef.current) {
|
|
183
|
+
tempLumRef.current.textContent = tempLumLabel;
|
|
184
|
+
}
|
|
185
|
+
if (velRef.current) {
|
|
186
|
+
velRef.current.textContent = velocityLabel;
|
|
187
|
+
}
|
|
188
|
+
if (statusRef.current) {
|
|
189
|
+
statusRef.current.textContent = statusLabel;
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
}),
|
|
193
|
+
[]
|
|
194
|
+
);
|
|
195
|
+
|
|
196
|
+
return (
|
|
197
|
+
<>
|
|
198
|
+
<div className="fixed inset-0 z-40 pointer-events-none overflow-hidden">
|
|
199
|
+
<div
|
|
200
|
+
ref={reticleRef}
|
|
201
|
+
style={{ opacity: 0 }}
|
|
202
|
+
className="fixed top-0 left-0 rounded-full border border-dashed transition-opacity duration-150"
|
|
203
|
+
/>
|
|
204
|
+
|
|
205
|
+
<div
|
|
206
|
+
ref={hudContainerRef}
|
|
207
|
+
style={{ opacity: 0 }}
|
|
208
|
+
className="fixed top-0 left-0 w-80 rounded-2xl border bg-[var(--zen-bg-elevated)]/95 backdrop-blur-md p-4 text-[var(--zen-ink-primary)] shadow-[var(--zen-shadow-hud)] transition-opacity duration-150"
|
|
209
|
+
>
|
|
210
|
+
<div className="flex items-center justify-between gap-2 mb-1">
|
|
211
|
+
<span
|
|
212
|
+
ref={badgeRef}
|
|
213
|
+
className="zen-telemetry-label font-semibold"
|
|
214
|
+
/>
|
|
215
|
+
<span className="zen-telemetry-label">LIVE TELEMETRY</span>
|
|
216
|
+
</div>
|
|
217
|
+
<div
|
|
218
|
+
ref={nameRef}
|
|
219
|
+
className="zen-font-display font-bold text-sm tracking-tight text-[var(--zen-ink-primary)] leading-snug"
|
|
220
|
+
/>
|
|
221
|
+
<div
|
|
222
|
+
ref={classRef}
|
|
223
|
+
className="zen-font-mono text-xs text-[var(--zen-ink-secondary)] mb-2.5"
|
|
224
|
+
/>
|
|
225
|
+
|
|
226
|
+
<div className="grid grid-cols-2 gap-2 pt-2 border-t border-[var(--zen-border-subtle)] zen-font-mono text-xs">
|
|
227
|
+
<div>
|
|
228
|
+
<div className="zen-telemetry-label">Mass</div>
|
|
229
|
+
<span
|
|
230
|
+
ref={massRef}
|
|
231
|
+
className="text-[var(--zen-ink-primary)] font-medium"
|
|
232
|
+
/>
|
|
233
|
+
</div>
|
|
234
|
+
<div>
|
|
235
|
+
<div className="zen-telemetry-label">Thermal / Lum</div>
|
|
236
|
+
<span
|
|
237
|
+
ref={tempLumRef}
|
|
238
|
+
className="text-[var(--zen-ink-primary)] font-medium"
|
|
239
|
+
/>
|
|
240
|
+
</div>
|
|
241
|
+
<div>
|
|
242
|
+
<div className="zen-telemetry-label">Orbital Speed</div>
|
|
243
|
+
<span
|
|
244
|
+
ref={velRef}
|
|
245
|
+
className="text-[var(--zen-accent-primary)] font-semibold"
|
|
246
|
+
/>
|
|
247
|
+
</div>
|
|
248
|
+
<div>
|
|
249
|
+
<div className="zen-telemetry-label">State</div>
|
|
250
|
+
<span
|
|
251
|
+
ref={statusRef}
|
|
252
|
+
className="text-[var(--zen-ink-secondary)] truncate block"
|
|
253
|
+
/>
|
|
254
|
+
</div>
|
|
255
|
+
</div>
|
|
256
|
+
</div>
|
|
257
|
+
</div>
|
|
258
|
+
|
|
259
|
+
{declarativeData && (
|
|
260
|
+
<div
|
|
261
|
+
role="region"
|
|
262
|
+
aria-live="polite"
|
|
263
|
+
aria-label="Locked celestial telemetry inspector"
|
|
264
|
+
data-zen-occlude="true"
|
|
265
|
+
style={{ borderColor: `${declarativeData.accentHex}77` }}
|
|
266
|
+
className="w-full rounded-2xl border bg-[var(--zen-surface-2)] p-5 text-[var(--zen-ink-primary)] shadow-[var(--zen-shadow-resting)]"
|
|
267
|
+
>
|
|
268
|
+
<div className="flex items-center justify-between gap-2 mb-1.5">
|
|
269
|
+
<span
|
|
270
|
+
style={{ color: declarativeData.accentHex }}
|
|
271
|
+
className="zen-telemetry-label font-semibold"
|
|
272
|
+
>
|
|
273
|
+
{declarativeData.badge}
|
|
274
|
+
</span>
|
|
275
|
+
<span className="zen-telemetry-label">DECLARATIVE LOCK · A11Y</span>
|
|
276
|
+
</div>
|
|
277
|
+
<div className="zen-font-display font-bold text-lg text-[var(--zen-ink-primary)]">
|
|
278
|
+
{declarativeData.name}
|
|
279
|
+
</div>
|
|
280
|
+
<div className="zen-font-mono text-xs text-[var(--zen-ink-secondary)] mb-3">
|
|
281
|
+
{declarativeData.classification}
|
|
282
|
+
</div>
|
|
283
|
+
|
|
284
|
+
<div className="grid grid-cols-2 sm:grid-cols-4 gap-3 pt-3 border-t border-[var(--zen-border-subtle)] zen-font-mono text-xs">
|
|
285
|
+
<div>
|
|
286
|
+
<div className="zen-telemetry-label">Mass</div>
|
|
287
|
+
<span className="text-[var(--zen-ink-primary)] font-medium">
|
|
288
|
+
{declarativeData.massLabel}
|
|
289
|
+
</span>
|
|
290
|
+
</div>
|
|
291
|
+
<div>
|
|
292
|
+
<div className="zen-telemetry-label">Thermal / Lum</div>
|
|
293
|
+
<span className="text-[var(--zen-ink-primary)] font-medium">
|
|
294
|
+
{declarativeData.tempLumLabel}
|
|
295
|
+
</span>
|
|
296
|
+
</div>
|
|
297
|
+
<div>
|
|
298
|
+
<div className="zen-telemetry-label">Orbital Speed</div>
|
|
299
|
+
<span className="text-[var(--zen-accent-primary)] font-semibold">
|
|
300
|
+
{declarativeData.velocityLabel}
|
|
301
|
+
</span>
|
|
302
|
+
</div>
|
|
303
|
+
<div>
|
|
304
|
+
<div className="zen-telemetry-label">State</div>
|
|
305
|
+
<span className="text-[var(--zen-ink-secondary)]">
|
|
306
|
+
{declarativeData.statusLabel}
|
|
307
|
+
</span>
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
|
310
|
+
</div>
|
|
311
|
+
)}
|
|
312
|
+
</>
|
|
313
|
+
);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export type ZenTelemetryTargetId =
|
|
317
|
+
| 'auto'
|
|
318
|
+
| 'alpha-cen-a'
|
|
319
|
+
| 'alpha-cen-b'
|
|
320
|
+
| 'proxima-c'
|
|
321
|
+
| 'trisolaris';
|
|
322
|
+
|
|
323
|
+
export interface ZenTelemetryInspectorProps {
|
|
324
|
+
readonly activeTarget: ZenTelemetryTargetId;
|
|
325
|
+
readonly onSelectTarget: (target: ZenTelemetryTargetId) => void;
|
|
326
|
+
readonly catalog?: readonly CelestialCatalogEntry[];
|
|
327
|
+
readonly className?: string;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
export function ZenTelemetryInspector({
|
|
331
|
+
activeTarget,
|
|
332
|
+
onSelectTarget,
|
|
333
|
+
catalog = DEFAULT_CELESTIAL_CATALOG,
|
|
334
|
+
className = '',
|
|
335
|
+
}: ZenTelemetryInspectorProps) {
|
|
336
|
+
const selectedEntry = catalog.find((c) => c.id === activeTarget) ?? null;
|
|
337
|
+
|
|
338
|
+
return (
|
|
339
|
+
<div className={`space-y-4 ${className}`.trim()}>
|
|
340
|
+
<div className="flex flex-wrap items-center justify-between gap-3">
|
|
341
|
+
<div>
|
|
342
|
+
<div className="zen-telemetry-label text-[var(--zen-accent-primary)]">
|
|
343
|
+
SPATIAL TELEMETRY TARGET SELECTOR
|
|
344
|
+
</div>
|
|
345
|
+
<p className="text-xs text-[var(--zen-ink-secondary)] mt-0.5">
|
|
346
|
+
Hover celestial bodies in 3D space or lock a target below via keyboard roving tabindex.
|
|
347
|
+
</p>
|
|
348
|
+
</div>
|
|
349
|
+
|
|
350
|
+
<ZenSegmentedControl<ZenTelemetryTargetId>
|
|
351
|
+
ariaLabel="Select celestial telemetry target"
|
|
352
|
+
size="sm"
|
|
353
|
+
value={activeTarget}
|
|
354
|
+
onChange={onSelectTarget}
|
|
355
|
+
items={[
|
|
356
|
+
{ value: 'auto', label: 'Pointer Raycast' },
|
|
357
|
+
...catalog.map((c) => ({
|
|
358
|
+
value: c.id as ZenTelemetryTargetId,
|
|
359
|
+
label: c.shortName,
|
|
360
|
+
})),
|
|
361
|
+
]}
|
|
362
|
+
/>
|
|
363
|
+
</div>
|
|
364
|
+
|
|
365
|
+
{selectedEntry && (
|
|
366
|
+
<ZenTelemetryHud
|
|
367
|
+
declarativeData={{
|
|
368
|
+
badge: selectedEntry.badge,
|
|
369
|
+
name: selectedEntry.name,
|
|
370
|
+
classification: selectedEntry.classification,
|
|
371
|
+
accentHex: selectedEntry.accentHex,
|
|
372
|
+
massLabel: selectedEntry.massLabel,
|
|
373
|
+
tempLumLabel: selectedEntry.tempLumLabel,
|
|
374
|
+
velocityLabel:
|
|
375
|
+
selectedEntry.id === 'trisolaris' ? '47.2 km/s' : '24.6 km/s',
|
|
376
|
+
statusLabel:
|
|
377
|
+
selectedEntry.id === 'trisolaris'
|
|
378
|
+
? 'STABLE ERA · TEMPERATE (Pull: Alpha Cen A)'
|
|
379
|
+
: 'Barycentric N-Body Integration Active',
|
|
380
|
+
}}
|
|
381
|
+
/>
|
|
382
|
+
)}
|
|
383
|
+
</div>
|
|
384
|
+
);
|
|
385
|
+
}
|
package/src/lib/index.ts
ADDED
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
export const ZEN_UI_VERSION = '1.1.0';
|
|
2
|
+
export const ZEN_PACKAGE_NAME = '@zen-ui/system';
|
|
3
|
+
|
|
4
|
+
export {
|
|
5
|
+
ZenThemeProvider,
|
|
6
|
+
useZenTheme,
|
|
7
|
+
syncZenScrollbarStyles,
|
|
8
|
+
ZEN_THEMES,
|
|
9
|
+
type ZenThemeId,
|
|
10
|
+
type ZenThemeMode,
|
|
11
|
+
type ZenDensityMode,
|
|
12
|
+
type ZenRadiusMode,
|
|
13
|
+
type ZenThemeMetadata,
|
|
14
|
+
type ZenThemeTokenOverrides,
|
|
15
|
+
type ZenThemeContextValue,
|
|
16
|
+
type ZenThemeProviderProps,
|
|
17
|
+
} from './theme/ZenThemeProvider';
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
ZenButton,
|
|
21
|
+
ZenCopyButton,
|
|
22
|
+
type ZenButtonVariant,
|
|
23
|
+
type ZenButtonSize,
|
|
24
|
+
type ZenButtonProps,
|
|
25
|
+
type ZenCopyButtonProps,
|
|
26
|
+
} from './components/ZenButton';
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
ZenIcon,
|
|
30
|
+
ZEN_ICON_NAMES,
|
|
31
|
+
ZEN_ICON_SIZE_PX,
|
|
32
|
+
ZEN_ICON_SVG_INNER,
|
|
33
|
+
renderZenIconSvgMarkup,
|
|
34
|
+
type ZenIconName,
|
|
35
|
+
type ZenIconSize,
|
|
36
|
+
type ZenIconTone,
|
|
37
|
+
type ZenIconProps,
|
|
38
|
+
} from './components/ZenIcon';
|
|
39
|
+
|
|
40
|
+
export {
|
|
41
|
+
ZenBadge,
|
|
42
|
+
ZenTagList,
|
|
43
|
+
ZenKbd,
|
|
44
|
+
type ZenBadgeTone,
|
|
45
|
+
type ZenBadgeProps,
|
|
46
|
+
type ZenTagListProps,
|
|
47
|
+
type ZenKbdProps,
|
|
48
|
+
} from './components/ZenBadge';
|
|
49
|
+
|
|
50
|
+
export {
|
|
51
|
+
ZenHeading,
|
|
52
|
+
type ZenHeadingLevel,
|
|
53
|
+
type ZenHeadingSize,
|
|
54
|
+
type ZenHeadingProps,
|
|
55
|
+
} from './components/ZenHeading';
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
ZenCard,
|
|
59
|
+
ZenMetricStrip,
|
|
60
|
+
ZenArchitectureNote,
|
|
61
|
+
ZenCheckList,
|
|
62
|
+
type ZenCardVariant,
|
|
63
|
+
type ZenCardPadding,
|
|
64
|
+
type ZenCardProps,
|
|
65
|
+
type ZenMetricItem,
|
|
66
|
+
type ZenMetricStripProps,
|
|
67
|
+
type ZenArchitectureNoteProps,
|
|
68
|
+
type ZenCheckListProps,
|
|
69
|
+
} from './components/ZenCard';
|
|
70
|
+
|
|
71
|
+
export {
|
|
72
|
+
ZenDossierPanel,
|
|
73
|
+
type ZenDossierItem,
|
|
74
|
+
type ZenDossierPanelProps,
|
|
75
|
+
} from './components/ZenDossierPanel';
|
|
76
|
+
|
|
77
|
+
export {
|
|
78
|
+
ZenTimelineCard,
|
|
79
|
+
type ZenTimelineCardProps,
|
|
80
|
+
} from './components/ZenTimelineCard';
|
|
81
|
+
|
|
82
|
+
export {
|
|
83
|
+
ZenSegmentedControl,
|
|
84
|
+
type ZenSegmentItem,
|
|
85
|
+
type ZenSegmentedControlProps,
|
|
86
|
+
} from './components/ZenSegmentedControl';
|
|
87
|
+
|
|
88
|
+
export {
|
|
89
|
+
ZenTabs,
|
|
90
|
+
type ZenTabItem,
|
|
91
|
+
type ZenTabsProps,
|
|
92
|
+
} from './components/ZenTabs';
|
|
93
|
+
|
|
94
|
+
export {
|
|
95
|
+
ZenInput,
|
|
96
|
+
type ZenInputProps,
|
|
97
|
+
} from './components/ZenInput';
|
|
98
|
+
|
|
99
|
+
export {
|
|
100
|
+
ZenDropdown,
|
|
101
|
+
type ZenDropdownOption,
|
|
102
|
+
type ZenDropdownProps,
|
|
103
|
+
} from './components/ZenDropdown';
|
|
104
|
+
|
|
105
|
+
export {
|
|
106
|
+
ZenSwitch,
|
|
107
|
+
type ZenSwitchProps,
|
|
108
|
+
} from './components/ZenSwitch';
|
|
109
|
+
|
|
110
|
+
export {
|
|
111
|
+
ZenModal,
|
|
112
|
+
type ZenModalProps,
|
|
113
|
+
} from './components/ZenModal';
|
|
114
|
+
|
|
115
|
+
export {
|
|
116
|
+
ZenToastStack,
|
|
117
|
+
useZenToast,
|
|
118
|
+
type ZenToastTone,
|
|
119
|
+
type ZenToastItem,
|
|
120
|
+
type ZenToastStackProps,
|
|
121
|
+
} from './components/ZenToast';
|
|
122
|
+
|
|
123
|
+
export {
|
|
124
|
+
ZenDataTable,
|
|
125
|
+
type ZenTableColumn,
|
|
126
|
+
type ZenDataTableProps,
|
|
127
|
+
} from './components/ZenDataTable';
|
|
128
|
+
|
|
129
|
+
export {
|
|
130
|
+
ZenNavbar,
|
|
131
|
+
type ZenNavbarProps,
|
|
132
|
+
} from './components/ZenNavbar';
|
|
133
|
+
|
|
134
|
+
export {
|
|
135
|
+
ZenAIConstruct,
|
|
136
|
+
type ZenAIPersonaMode,
|
|
137
|
+
type ZenAICameraFraming,
|
|
138
|
+
type ZenAIDirective,
|
|
139
|
+
type ZenAIConstructProps,
|
|
140
|
+
} from './components/ZenAIConstruct';
|
|
141
|
+
|
|
142
|
+
export {
|
|
143
|
+
ZenAmbientBackground,
|
|
144
|
+
type ZenBackgroundVariant,
|
|
145
|
+
type ZenAmbientBackgroundProps,
|
|
146
|
+
} from './components/ZenAmbientBackground';
|
|
147
|
+
|
|
148
|
+
export {
|
|
149
|
+
ZenTextarea,
|
|
150
|
+
ZenNumberStepper,
|
|
151
|
+
ZenCheckbox,
|
|
152
|
+
ZenRadioGroup,
|
|
153
|
+
ZenSlider,
|
|
154
|
+
ZenChipFilter,
|
|
155
|
+
ZenFileUpload,
|
|
156
|
+
type ZenTextareaProps,
|
|
157
|
+
type ZenNumberStepperProps,
|
|
158
|
+
type ZenCheckboxProps,
|
|
159
|
+
type ZenRadioOption,
|
|
160
|
+
type ZenRadioGroupProps,
|
|
161
|
+
type ZenSliderProps,
|
|
162
|
+
type ZenChipOption,
|
|
163
|
+
type ZenChipFilterProps,
|
|
164
|
+
type ZenUploadedFile,
|
|
165
|
+
type ZenFileUploadProps,
|
|
166
|
+
} from './components/ZenForms';
|
|
167
|
+
|
|
168
|
+
export {
|
|
169
|
+
ZenBreadcrumbs,
|
|
170
|
+
ZenPagination,
|
|
171
|
+
ZenStepper,
|
|
172
|
+
ZenSidebar,
|
|
173
|
+
ZenIconButton,
|
|
174
|
+
type ZenBreadcrumbItem,
|
|
175
|
+
type ZenBreadcrumbsProps,
|
|
176
|
+
type ZenPaginationProps,
|
|
177
|
+
type ZenStepItem,
|
|
178
|
+
type ZenStepperProps,
|
|
179
|
+
type ZenSidebarItem,
|
|
180
|
+
type ZenSidebarProps,
|
|
181
|
+
type ZenIconButtonProps,
|
|
182
|
+
} from './components/ZenNavigation';
|
|
183
|
+
|
|
184
|
+
export {
|
|
185
|
+
ZenCommandPalette,
|
|
186
|
+
ZenDrawer,
|
|
187
|
+
ZenAccordion,
|
|
188
|
+
ZenTooltip,
|
|
189
|
+
ZenDivider,
|
|
190
|
+
type ZenCommandItem,
|
|
191
|
+
type ZenCommandPaletteProps,
|
|
192
|
+
type ZenDrawerProps,
|
|
193
|
+
type ZenAccordionItem,
|
|
194
|
+
type ZenAccordionProps,
|
|
195
|
+
type ZenTooltipProps,
|
|
196
|
+
type ZenDividerProps,
|
|
197
|
+
} from './components/ZenOverlays';
|
|
198
|
+
|
|
199
|
+
export {
|
|
200
|
+
ZenSparkline,
|
|
201
|
+
ZenKpiCard,
|
|
202
|
+
ZenProgressBar,
|
|
203
|
+
ZenCircularGauge,
|
|
204
|
+
ZenAvatar,
|
|
205
|
+
ZenCodeBlock,
|
|
206
|
+
type ZenSparklineProps,
|
|
207
|
+
type ZenKpiCardProps,
|
|
208
|
+
type ZenProgressBarProps,
|
|
209
|
+
type ZenCircularGaugeProps,
|
|
210
|
+
type ZenAvatarProps,
|
|
211
|
+
type ZenCodeBlockProps,
|
|
212
|
+
} from './components/ZenDataDisplay';
|
|
213
|
+
|
|
214
|
+
export {
|
|
215
|
+
ZenAlert,
|
|
216
|
+
ZenSkeleton,
|
|
217
|
+
ZenEmptyState,
|
|
218
|
+
type ZenAlertTone,
|
|
219
|
+
type ZenAlertProps,
|
|
220
|
+
type ZenSkeletonProps,
|
|
221
|
+
type ZenEmptyStateProps,
|
|
222
|
+
} from './components/ZenFeedback';
|
|
223
|
+
|
|
224
|
+
export {
|
|
225
|
+
useZenAudioSynth,
|
|
226
|
+
ZEN_SYNTH_PRESETS,
|
|
227
|
+
type ZenSynthPresetId,
|
|
228
|
+
type ZenSynthPreset,
|
|
229
|
+
type UseZenAudioSynthOptions,
|
|
230
|
+
type ZenAudioSynthController,
|
|
231
|
+
} from './audio/useZenAudioSynth';
|
|
232
|
+
|
|
233
|
+
export {
|
|
234
|
+
ZenAudioController,
|
|
235
|
+
type ZenAudioControllerProps,
|
|
236
|
+
} from './audio/ZenAudioController';
|
|
237
|
+
|
|
238
|
+
export {
|
|
239
|
+
ZenTelemetryHud,
|
|
240
|
+
ZenTelemetryInspector,
|
|
241
|
+
DEFAULT_CELESTIAL_CATALOG,
|
|
242
|
+
type CelestialCatalogEntry,
|
|
243
|
+
type ZenTelemetryPayload,
|
|
244
|
+
type ZenTelemetryBridge,
|
|
245
|
+
type ZenTelemetryHudProps,
|
|
246
|
+
type ZenTelemetryTargetId,
|
|
247
|
+
type ZenTelemetryInspectorProps,
|
|
248
|
+
} from './cosmos/ZenTelemetryHud';
|
|
249
|
+
|
|
250
|
+
export {
|
|
251
|
+
default as ZenCosmosCanvas,
|
|
252
|
+
type ZenCosmosCanvasProps,
|
|
253
|
+
} from './cosmos/ZenCosmosCanvas';
|
|
254
|
+
|
|
255
|
+
export {
|
|
256
|
+
ZEN_UNIVERSAL_THEMES,
|
|
257
|
+
ZenThemeController,
|
|
258
|
+
ZenUniversalAudio,
|
|
259
|
+
ZenAIConstructElement,
|
|
260
|
+
ZenAmbientBackgroundElement,
|
|
261
|
+
ZenThemeSwitcherElement,
|
|
262
|
+
ZenIconElement,
|
|
263
|
+
zenTheme,
|
|
264
|
+
zenAudio,
|
|
265
|
+
escapeZenHtml,
|
|
266
|
+
sanitizeZenAssetUrl,
|
|
267
|
+
registerZenElements,
|
|
268
|
+
type ZenUniversalPolarity,
|
|
269
|
+
type ZenUniversalThemeState,
|
|
270
|
+
type ZenThemeSubscriber,
|
|
271
|
+
} from './universal/zen-universal';
|
|
272
|
+
|
|
273
|
+
export {
|
|
274
|
+
CapriEngine,
|
|
275
|
+
capri,
|
|
276
|
+
CAPRI_SUBROUTINE_SKILLS,
|
|
277
|
+
type CapriSubroutineId,
|
|
278
|
+
type CapriAuditViolationCode,
|
|
279
|
+
type CapriAuditViolation,
|
|
280
|
+
type CapriThreatCategory,
|
|
281
|
+
type CapriPromptInjectionThreat,
|
|
282
|
+
type CapriPromptGuardResult,
|
|
283
|
+
type CapriAuditReport,
|
|
284
|
+
type CapriTelemetrySnapshot,
|
|
285
|
+
type CapriLandmarkNode,
|
|
286
|
+
type CapriUserFlowStep,
|
|
287
|
+
type CapriComponentInventory,
|
|
288
|
+
type CapriArchitectureDocu,
|
|
289
|
+
type CapriSubroutineSkill,
|
|
290
|
+
type CapriEngineListener,
|
|
291
|
+
} from './capri/capri-engine';
|
|
292
|
+
|
|
293
|
+
|