@kolkrabbi/kol-hardware 0.6.0 → 0.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-hardware",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "private": false,
5
5
  "description": "Panel controls for instruments",
6
6
  "license": "MIT",
@@ -20,8 +20,8 @@
20
20
  "react-dom": "^18.3.0 || ^19.0.0"
21
21
  },
22
22
  "devDependencies": {
23
+ "@kolkrabbi/kol-component": "^0.290.0",
23
24
  "@kolkrabbi/kol-icons": "^0.41.0",
24
- "@kolkrabbi/kol-component": "^0.287.0",
25
25
  "@kolkrabbi/kol-theme": "^0.183.0"
26
26
  },
27
27
  "files": [
@@ -189,7 +189,8 @@ function EnvelopeHandles({ adsr, sec, onDragStart, onDrag, onDragEnd }) {
189
189
  *
190
190
  * TIME is the scope's clock: `bpm` sets its speed (60 BPM = one unit a second, so `t` reads as
191
191
  * seconds at the default and as beats at any other). Play / pause stops it where it is. `now`
192
- * (`() => t`) hands the clock to the host — a desk transport — and the scope reads it instead.
192
+ * (`() => t`) hands the clock to the host — a desk transport — and the scope reads it instead;
193
+ * Play/Pause, BPM and Trigger are then not drawn, since the host's transport does their jobs.
193
194
  *
194
195
  * ADSR: four handles on the scope — A (attack time), D (decay time), S (at the end of the hold:
195
196
  * sideways = how long the gate holds, up/down = the sustain level), R (release time). The scope
@@ -225,14 +226,18 @@ export default function EnvelopeGenerator({ generator, reference = 'panel', clas
225
226
  const passSec = mode === 'equation' ? sec : envelopeLength(adsr)
226
227
  const panel = reference === true || reference === 'panel'
227
228
 
229
+ /* a host clock (`now`) owns play, speed and restart — the controls for them would do nothing, so
230
+ * they are not drawn (EnvelopeGeneratorHostClockControls, kol-mirror 2026-10-22). Cycle still
231
+ * acts: it decides whether the host's time wraps over the pass or holds at its end. */
232
+ const ownClock = !g.now
228
233
  const transport = (
229
234
  <div className="flex h-6 shrink-0 items-center gap-3">
230
- <Button tone="ghost" size="sm" iconOnly={g.playing ? 'pause' : 'play'} aria-label={g.playing ? 'Pause' : 'Play'} onClick={() => g.setPlaying(!g.playing)} />
231
- <Field label="BPM" value={g.bpm} chars={3} onCommit={(v) => g.setBpm(Math.max(1, Math.min(999, num(v, g.bpm))))} />
235
+ {ownClock && <Button tone="ghost" size="sm" iconOnly={g.playing ? 'pause' : 'play'} aria-label={g.playing ? 'Pause' : 'Play'} onClick={() => g.setPlaying(!g.playing)} />}
236
+ {ownClock && <Field label="BPM" value={g.bpm} chars={3} onCommit={(v) => g.setBpm(Math.max(1, Math.min(999, num(v, g.bpm))))} />}
232
237
  {mode === 'adsr' && (
233
238
  <>
234
239
  <Toggle value={g.cycle} onChange={g.setCycle} label="cycle" />
235
- <Button tone="ghost" size="sm" onClick={g.fire}>Trigger</Button>
240
+ {ownClock && <Button tone="ghost" size="sm" onClick={g.fire}>Trigger</Button>}
236
241
  </>
237
242
  )}
238
243
  <span className="ml-auto text-fg-48">{mode === 'adsr' ? `${passSec.toFixed(2)} s` : ''}</span>