@zen-ui-capri/system 1.1.0 → 1.1.1
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/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +1 -1
- package/package.json +2 -2
- package/src/lib/audio/ZenAudioController.tsx +114 -114
- package/src/lib/index.ts +1 -1
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const ZEN_UI_VERSION = "1.1.
|
|
1
|
+
export declare const ZEN_UI_VERSION = "1.1.1";
|
|
2
2
|
export declare const ZEN_PACKAGE_NAME = "@zen-ui/system";
|
|
3
3
|
export { ZenThemeProvider, useZenTheme, syncZenScrollbarStyles, ZEN_THEMES, type ZenThemeId, type ZenThemeMode, type ZenDensityMode, type ZenRadiusMode, type ZenThemeMetadata, type ZenThemeTokenOverrides, type ZenThemeContextValue, type ZenThemeProviderProps, } from './theme/ZenThemeProvider';
|
|
4
4
|
export { ZenButton, ZenCopyButton, type ZenButtonVariant, type ZenButtonSize, type ZenButtonProps, type ZenCopyButtonProps, } from './components/ZenButton';
|
package/dist/lib/index.js
CHANGED
|
@@ -3834,7 +3834,7 @@ function Kr({
|
|
|
3834
3834
|
/* @__PURE__ */ e(lt, { bridgeRef: s })
|
|
3835
3835
|
] });
|
|
3836
3836
|
}
|
|
3837
|
-
const Yr = "1.1.
|
|
3837
|
+
const Yr = "1.1.1", Xr = "@zen-ui/system";
|
|
3838
3838
|
export {
|
|
3839
3839
|
he as CAPRI_SUBROUTINE_SKILLS,
|
|
3840
3840
|
en as CapriEngine,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zen-ui-capri/system",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "zeN-UI // CAPRI — Universal Multi-Framework Design System (51 Primitives, 40 Vector Icons, 8 Dark/Light Themes & Capri 5-Subroutine AI Co-Pilot)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -77,4 +77,4 @@
|
|
|
77
77
|
"typescript": "~5.8.2",
|
|
78
78
|
"vite": "^6.2.0"
|
|
79
79
|
}
|
|
80
|
-
}
|
|
80
|
+
}
|
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
import { Volume2, VolumeX, Disc3 } from 'lucide-react';
|
|
2
|
-
import type { ZenAudioSynthController, ZenSynthPresetId } from './useZenAudioSynth';
|
|
3
|
-
import { ZenButton } from '../components/ZenButton';
|
|
4
|
-
import { ZenSegmentedControl } from '../components/ZenSegmentedControl';
|
|
5
|
-
|
|
6
|
-
export interface ZenAudioControllerProps {
|
|
7
|
-
readonly synth: ZenAudioSynthController;
|
|
8
|
-
readonly mode?: 'pill' | 'deck';
|
|
9
|
-
readonly activeLabel?: string;
|
|
10
|
-
readonly idleLabel?: string;
|
|
11
|
-
readonly className?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function ZenAudioController({
|
|
15
|
-
synth,
|
|
16
|
-
mode = 'pill',
|
|
17
|
-
activeLabel = 'Lo-Fi Radio: ON',
|
|
18
|
-
idleLabel = 'Lo-Fi Background',
|
|
19
|
-
className = '',
|
|
20
|
-
}: ZenAudioControllerProps) {
|
|
21
|
-
if (mode === 'pill') {
|
|
22
|
-
return (
|
|
23
|
-
<ZenButton
|
|
24
|
-
variant="secondary"
|
|
25
|
-
size="sm"
|
|
26
|
-
mono
|
|
27
|
-
pressed={synth.active}
|
|
28
|
-
onClick={synth.toggle}
|
|
29
|
-
aria-label="Toggle procedural ambient synthesizer"
|
|
30
|
-
className={className}
|
|
31
|
-
iconLeft={
|
|
32
|
-
synth.active ? (
|
|
33
|
-
<Volume2 className="w-3.5 h-3.5 animate-pulse" />
|
|
34
|
-
) : (
|
|
35
|
-
<VolumeX className="w-3.5 h-3.5 text-[var(--zen-accent-primary)]" />
|
|
36
|
-
)
|
|
37
|
-
}
|
|
38
|
-
>
|
|
39
|
-
{synth.active ? activeLabel : idleLabel}
|
|
40
|
-
</ZenButton>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<div
|
|
46
|
-
data-zen-occlude="true"
|
|
47
|
-
className={`p-5 rounded-3xl zen-surface-static flex flex-col gap-4 ${className}`.trim()}
|
|
48
|
-
>
|
|
49
|
-
<div className="flex flex-wrap items-center justify-between gap-3">
|
|
50
|
-
<div className="flex items-center gap-3">
|
|
51
|
-
<Disc3
|
|
52
|
-
className={`w-6 h-6 text-[var(--zen-accent-primary)] ${
|
|
53
|
-
synth.active ? 'animate-spin' : ''
|
|
54
|
-
}`}
|
|
55
|
-
/>
|
|
56
|
-
<div>
|
|
57
|
-
<div className="zen-telemetry-label text-[var(--zen-accent-primary)]">
|
|
58
|
-
WEB AUDIO PROCEDURAL SYNTHESIZER
|
|
59
|
-
</div>
|
|
60
|
-
<div className="zen-font-display font-bold text-base text-[var(--zen-ink-primary)]">
|
|
61
|
-
Zero-Dependency Acoustic Engine
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
|
|
66
|
-
<ZenButton
|
|
67
|
-
variant={synth.active ? 'primary' : 'secondary'}
|
|
68
|
-
size="sm"
|
|
69
|
-
mono
|
|
70
|
-
pressed={synth.active}
|
|
71
|
-
onClick={synth.toggle}
|
|
72
|
-
iconLeft={
|
|
73
|
-
synth.active ? (
|
|
74
|
-
<Volume2 className="w-3.5 h-3.5" />
|
|
75
|
-
) : (
|
|
76
|
-
<VolumeX className="w-3.5 h-3.5" />
|
|
77
|
-
)
|
|
78
|
-
}
|
|
79
|
-
>
|
|
80
|
-
{synth.active ? 'SYNTH ACTIVE' : 'START SYNTH'}
|
|
81
|
-
</ZenButton>
|
|
82
|
-
</div>
|
|
83
|
-
|
|
84
|
-
<div className="flex flex-col sm:flex-row sm:items-center justify-between gap-4 pt-2 border-t border-[var(--zen-border-subtle)]">
|
|
85
|
-
<ZenSegmentedControl<ZenSynthPresetId>
|
|
86
|
-
ariaLabel="Select synthesizer voicing preset"
|
|
87
|
-
size="sm"
|
|
88
|
-
value={synth.presetId}
|
|
89
|
-
onChange={synth.setPresetId}
|
|
90
|
-
items={synth.presets.map((p) => ({
|
|
91
|
-
value: p.id,
|
|
92
|
-
label: p.label.split(' (')[0],
|
|
93
|
-
}))}
|
|
94
|
-
/>
|
|
95
|
-
|
|
96
|
-
<div className="flex items-center gap-1.5" aria-label="8-step bar sequencer">
|
|
97
|
-
{Array.from({ length: 8 }).map((_, idx) => {
|
|
98
|
-
const isBeat = synth.active && synth.currentStep === idx;
|
|
99
|
-
return (
|
|
100
|
-
<span
|
|
101
|
-
key={idx}
|
|
102
|
-
className={`h-2.5 w-2.5 rounded-full transition-all ${
|
|
103
|
-
isBeat
|
|
104
|
-
? 'bg-[var(--zen-accent-primary)] scale-125'
|
|
105
|
-
: 'bg-[var(--zen-border-default)]'
|
|
106
|
-
}`}
|
|
107
|
-
/>
|
|
108
|
-
);
|
|
109
|
-
})}
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
</div>
|
|
113
|
-
);
|
|
114
|
-
}
|
|
1
|
+
import { Volume2, VolumeX, Disc3 } from 'lucide-react';
|
|
2
|
+
import type { ZenAudioSynthController, ZenSynthPresetId } from './useZenAudioSynth';
|
|
3
|
+
import { ZenButton } from '../components/ZenButton';
|
|
4
|
+
import { ZenSegmentedControl } from '../components/ZenSegmentedControl';
|
|
5
|
+
|
|
6
|
+
export interface ZenAudioControllerProps {
|
|
7
|
+
readonly synth: ZenAudioSynthController;
|
|
8
|
+
readonly mode?: 'pill' | 'deck';
|
|
9
|
+
readonly activeLabel?: string;
|
|
10
|
+
readonly idleLabel?: string;
|
|
11
|
+
readonly className?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function ZenAudioController({
|
|
15
|
+
synth,
|
|
16
|
+
mode = 'pill',
|
|
17
|
+
activeLabel = 'Lo-Fi Radio: ON',
|
|
18
|
+
idleLabel = 'Lo-Fi Background',
|
|
19
|
+
className = '',
|
|
20
|
+
}: ZenAudioControllerProps) {
|
|
21
|
+
if (mode === 'pill') {
|
|
22
|
+
return (
|
|
23
|
+
<ZenButton
|
|
24
|
+
variant="secondary"
|
|
25
|
+
size="sm"
|
|
26
|
+
mono
|
|
27
|
+
pressed={synth.active}
|
|
28
|
+
onClick={synth.toggle}
|
|
29
|
+
aria-label="Toggle procedural ambient synthesizer"
|
|
30
|
+
className={className}
|
|
31
|
+
iconLeft={
|
|
32
|
+
synth.active ? (
|
|
33
|
+
<Volume2 className="w-3.5 h-3.5 animate-pulse" />
|
|
34
|
+
) : (
|
|
35
|
+
<VolumeX className="w-3.5 h-3.5 text-[var(--zen-accent-primary)]" />
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
>
|
|
39
|
+
{synth.active ? activeLabel : idleLabel}
|
|
40
|
+
</ZenButton>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<div
|
|
46
|
+
data-zen-occlude="true"
|
|
47
|
+
className={`p-5 rounded-3xl zen-surface-static flex flex-col gap-4 ${className}`.trim()}
|
|
48
|
+
>
|
|
49
|
+
<div className="flex flex-wrap items-center justify-between gap-3">
|
|
50
|
+
<div className="flex items-center gap-3">
|
|
51
|
+
<Disc3
|
|
52
|
+
className={`w-6 h-6 text-[var(--zen-accent-primary)] ${
|
|
53
|
+
synth.active ? 'animate-spin' : ''
|
|
54
|
+
}`}
|
|
55
|
+
/>
|
|
56
|
+
<div>
|
|
57
|
+
<div className="zen-telemetry-label text-[var(--zen-accent-primary)]">
|
|
58
|
+
WEB AUDIO PROCEDURAL SYNTHESIZER
|
|
59
|
+
</div>
|
|
60
|
+
<div className="zen-font-display font-bold text-base text-[var(--zen-ink-primary)]">
|
|
61
|
+
Zero-Dependency Acoustic Engine
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<ZenButton
|
|
67
|
+
variant={synth.active ? 'primary' : 'secondary'}
|
|
68
|
+
size="sm"
|
|
69
|
+
mono
|
|
70
|
+
pressed={synth.active}
|
|
71
|
+
onClick={synth.toggle}
|
|
72
|
+
iconLeft={
|
|
73
|
+
synth.active ? (
|
|
74
|
+
<Volume2 className="w-3.5 h-3.5" />
|
|
75
|
+
) : (
|
|
76
|
+
<VolumeX className="w-3.5 h-3.5" />
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
>
|
|
80
|
+
{synth.active ? 'SYNTH ACTIVE' : 'START SYNTH'}
|
|
81
|
+
</ZenButton>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div className="flex flex-col sm:flex-row sm:items-center justify-between gap-4 pt-2 border-t border-[var(--zen-border-subtle)]">
|
|
85
|
+
<ZenSegmentedControl<ZenSynthPresetId>
|
|
86
|
+
ariaLabel="Select synthesizer voicing preset"
|
|
87
|
+
size="sm"
|
|
88
|
+
value={synth.presetId}
|
|
89
|
+
onChange={synth.setPresetId}
|
|
90
|
+
items={synth.presets.map((p) => ({
|
|
91
|
+
value: p.id,
|
|
92
|
+
label: p.label.split(' (')[0],
|
|
93
|
+
}))}
|
|
94
|
+
/>
|
|
95
|
+
|
|
96
|
+
<div className="flex items-center gap-1.5" aria-label="8-step bar sequencer">
|
|
97
|
+
{Array.from({ length: 8 }).map((_, idx) => {
|
|
98
|
+
const isBeat = synth.active && synth.currentStep === idx;
|
|
99
|
+
return (
|
|
100
|
+
<span
|
|
101
|
+
key={idx}
|
|
102
|
+
className={`h-2.5 w-2.5 rounded-full transition-all ${
|
|
103
|
+
isBeat
|
|
104
|
+
? 'bg-[var(--zen-accent-primary)] scale-125'
|
|
105
|
+
: 'bg-[var(--zen-border-default)]'
|
|
106
|
+
}`}
|
|
107
|
+
/>
|
|
108
|
+
);
|
|
109
|
+
})}
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
);
|
|
114
|
+
}
|
package/src/lib/index.ts
CHANGED