@dawcore/components 0.0.20 → 0.0.21

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 CHANGED
@@ -168,7 +168,7 @@ A clip is treated as MIDI iff `clip.midiNotes != null`. MIDI clips skip audio fe
168
168
 
169
169
  **Theming:** the piano-roll honors `--daw-piano-roll-note-color` (default `#2a7070`), `--daw-piano-roll-selected-note-color` (default `#3d9e9e`), and `--daw-piano-roll-background` (default `#1a1a2e`).
170
170
 
171
- See `examples/dawcore-tone/midi.html` for a runnable demo (C major scale, PolySynth playback).
171
+ See `examples/dawcore-tone/midi.html` for a runnable demo (C major scale, PolySynth playback). For SoundFont sample playback, pass `createToneAdapter({ soundFontCache })` and see `examples/dawcore-tone/soundfont.html`.
172
172
 
173
173
  ## Pre-Computed Peaks
174
174
 
package/dist/index.d.mts CHANGED
@@ -427,6 +427,30 @@ declare class PeakPipeline {
427
427
  private _getWaveformData;
428
428
  }
429
429
 
430
+ declare class DawRulerElement extends LitElement {
431
+ samplesPerPixel: number;
432
+ sampleRate: number;
433
+ duration: number;
434
+ rulerHeight: number;
435
+ scaleMode: 'temporal' | 'beats';
436
+ ticksPerPixel: number;
437
+ meterEntries: MeterEntry[];
438
+ ppqn: number;
439
+ totalWidth: number;
440
+ private _tickData;
441
+ private _musicalTickData;
442
+ static styles: lit.CSSResult;
443
+ willUpdate(): void;
444
+ render(): lit.TemplateResult<1>;
445
+ updated(): void;
446
+ private _drawTicks;
447
+ }
448
+ declare global {
449
+ interface HTMLElementTagNameMap {
450
+ 'daw-ruler': DawRulerElement;
451
+ }
452
+ }
453
+
430
454
  declare class DawTrackControlsElement extends LitElement {
431
455
  /** Track ID — set by the editor to link controls to a track row. */
432
456
  trackId: string | null;
@@ -436,6 +460,7 @@ declare class DawTrackControlsElement extends LitElement {
436
460
  muted: boolean;
437
461
  soloed: boolean;
438
462
  static styles: lit.CSSResult;
463
+ protected firstUpdated(): void;
439
464
  private _onVolumeInput;
440
465
  private _onPanInput;
441
466
  private _onMuteClick;
@@ -992,6 +1017,7 @@ declare class DawEditorElement extends LitElement implements MidiLoaderHost {
992
1017
  isMidiClip(trackId: string, clipId: string): boolean;
993
1018
  private _pointer;
994
1019
  private _viewport;
1020
+ private _scrollSync;
995
1021
  static styles: lit.CSSResult[];
996
1022
  get effectiveSampleRate(): number;
997
1023
  resolveAudioContextSampleRate(rate: number): void;
@@ -1225,6 +1251,10 @@ declare class DawEditorElement extends LitElement implements MidiLoaderHost {
1225
1251
  _startPlayhead(): void;
1226
1252
  _stopPlayhead(): void;
1227
1253
  private _getPlayhead;
1254
+ /** True when the controls column should be rendered (and its selector is valid). */
1255
+ private get _showControls();
1256
+ /** True when the ruler header band should be rendered (and its selector is valid). */
1257
+ private get _showRuler();
1228
1258
  private _getOrderedTracks;
1229
1259
  render(): lit.TemplateResult<1>;
1230
1260
  }
@@ -1234,30 +1264,6 @@ declare global {
1234
1264
  }
1235
1265
  }
1236
1266
 
1237
- declare class DawRulerElement extends LitElement {
1238
- samplesPerPixel: number;
1239
- sampleRate: number;
1240
- duration: number;
1241
- rulerHeight: number;
1242
- scaleMode: 'temporal' | 'beats';
1243
- ticksPerPixel: number;
1244
- meterEntries: MeterEntry[];
1245
- ppqn: number;
1246
- totalWidth: number;
1247
- private _tickData;
1248
- private _musicalTickData;
1249
- static styles: lit.CSSResult;
1250
- willUpdate(): void;
1251
- render(): lit.TemplateResult<1>;
1252
- updated(): void;
1253
- private _drawTicks;
1254
- }
1255
- declare global {
1256
- interface HTMLElementTagNameMap {
1257
- 'daw-ruler': DawRulerElement;
1258
- }
1259
- }
1260
-
1261
1267
  declare class DawSelectionElement extends LitElement {
1262
1268
  startPx: number;
1263
1269
  endPx: number;
package/dist/index.d.ts CHANGED
@@ -427,6 +427,30 @@ declare class PeakPipeline {
427
427
  private _getWaveformData;
428
428
  }
429
429
 
430
+ declare class DawRulerElement extends LitElement {
431
+ samplesPerPixel: number;
432
+ sampleRate: number;
433
+ duration: number;
434
+ rulerHeight: number;
435
+ scaleMode: 'temporal' | 'beats';
436
+ ticksPerPixel: number;
437
+ meterEntries: MeterEntry[];
438
+ ppqn: number;
439
+ totalWidth: number;
440
+ private _tickData;
441
+ private _musicalTickData;
442
+ static styles: lit.CSSResult;
443
+ willUpdate(): void;
444
+ render(): lit.TemplateResult<1>;
445
+ updated(): void;
446
+ private _drawTicks;
447
+ }
448
+ declare global {
449
+ interface HTMLElementTagNameMap {
450
+ 'daw-ruler': DawRulerElement;
451
+ }
452
+ }
453
+
430
454
  declare class DawTrackControlsElement extends LitElement {
431
455
  /** Track ID — set by the editor to link controls to a track row. */
432
456
  trackId: string | null;
@@ -436,6 +460,7 @@ declare class DawTrackControlsElement extends LitElement {
436
460
  muted: boolean;
437
461
  soloed: boolean;
438
462
  static styles: lit.CSSResult;
463
+ protected firstUpdated(): void;
439
464
  private _onVolumeInput;
440
465
  private _onPanInput;
441
466
  private _onMuteClick;
@@ -992,6 +1017,7 @@ declare class DawEditorElement extends LitElement implements MidiLoaderHost {
992
1017
  isMidiClip(trackId: string, clipId: string): boolean;
993
1018
  private _pointer;
994
1019
  private _viewport;
1020
+ private _scrollSync;
995
1021
  static styles: lit.CSSResult[];
996
1022
  get effectiveSampleRate(): number;
997
1023
  resolveAudioContextSampleRate(rate: number): void;
@@ -1225,6 +1251,10 @@ declare class DawEditorElement extends LitElement implements MidiLoaderHost {
1225
1251
  _startPlayhead(): void;
1226
1252
  _stopPlayhead(): void;
1227
1253
  private _getPlayhead;
1254
+ /** True when the controls column should be rendered (and its selector is valid). */
1255
+ private get _showControls();
1256
+ /** True when the ruler header band should be rendered (and its selector is valid). */
1257
+ private get _showRuler();
1228
1258
  private _getOrderedTracks;
1229
1259
  render(): lit.TemplateResult<1>;
1230
1260
  }
@@ -1234,30 +1264,6 @@ declare global {
1234
1264
  }
1235
1265
  }
1236
1266
 
1237
- declare class DawRulerElement extends LitElement {
1238
- samplesPerPixel: number;
1239
- sampleRate: number;
1240
- duration: number;
1241
- rulerHeight: number;
1242
- scaleMode: 'temporal' | 'beats';
1243
- ticksPerPixel: number;
1244
- meterEntries: MeterEntry[];
1245
- ppqn: number;
1246
- totalWidth: number;
1247
- private _tickData;
1248
- private _musicalTickData;
1249
- static styles: lit.CSSResult;
1250
- willUpdate(): void;
1251
- render(): lit.TemplateResult<1>;
1252
- updated(): void;
1253
- private _drawTicks;
1254
- }
1255
- declare global {
1256
- interface HTMLElementTagNameMap {
1257
- 'daw-ruler': DawRulerElement;
1258
- }
1259
- }
1260
-
1261
1267
  declare class DawSelectionElement extends LitElement {
1262
1268
  startPx: number;
1263
1269
  endPx: number;