@dawcore/components 0.0.16 → 0.0.18

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/index.d.mts CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as lit from 'lit';
2
2
  import { LitElement, PropertyValues, ReactiveController, ReactiveControllerHost } from 'lit';
3
- import { MidiNoteData, FadeType, Peaks, Bits, PeakData, MeterEntry, SnapTo, ClipTrack, KeyboardShortcut } from '@waveform-playlist/core';
3
+ import { MidiNoteData, SpectrogramConfig, FadeType, Peaks, Bits, PeakData, MeterEntry, SnapTo, ColorMapValue, ClipTrack, KeyboardShortcut } from '@waveform-playlist/core';
4
4
  import WaveformData from 'waveform-data';
5
5
  import { PlayoutAdapter, PlaylistEngine } from '@waveform-playlist/engine';
6
+ import { ClipRegistration, CanvasRegistration, ViewportState } from '@dawcore/spectrogram';
6
7
 
7
8
  declare class DawClipElement extends LitElement {
8
9
  src: string;
@@ -38,7 +39,7 @@ declare global {
38
39
  }
39
40
  }
40
41
 
41
- type TrackRenderMode = 'waveform' | 'piano-roll';
42
+ type TrackRenderMode = 'waveform' | 'piano-roll' | 'spectrogram';
42
43
  interface TrackDescriptor {
43
44
  name: string;
44
45
  src: string;
@@ -47,6 +48,7 @@ interface TrackDescriptor {
47
48
  muted: boolean;
48
49
  soloed: boolean;
49
50
  renderMode: TrackRenderMode;
51
+ spectrogramConfig?: SpectrogramConfig | null;
50
52
  clips: ClipDescriptor[];
51
53
  }
52
54
  /**
@@ -104,6 +106,7 @@ interface TrackConfig {
104
106
  muted?: boolean;
105
107
  soloed?: boolean;
106
108
  renderMode?: TrackRenderMode;
109
+ spectrogramConfig?: SpectrogramConfig | null;
107
110
  clips?: ClipConfig[];
108
111
  /**
109
112
  * Convenience: creates a single piano-roll `<daw-clip>` child with these
@@ -151,6 +154,7 @@ declare class DawTrackElement extends LitElement {
151
154
  muted: boolean;
152
155
  soloed: boolean;
153
156
  renderMode: TrackRenderMode;
157
+ spectrogramConfig: SpectrogramConfig | null;
154
158
  readonly trackId: `${string}-${string}-${string}-${string}-${string}`;
155
159
  createRenderRoot(): this;
156
160
  connectedCallback(): void;
@@ -779,6 +783,9 @@ interface DawClipSplitDetail {
779
783
  readonly leftClipId: string;
780
784
  readonly rightClipId: string;
781
785
  }
786
+ interface DawSpectrogramReadyDetail {
787
+ trackId: string;
788
+ }
782
789
  interface DawEventMap {
783
790
  'daw-selection': CustomEvent<DawSelectionDetail>;
784
791
  'daw-seek': CustomEvent<DawSeekDetail>;
@@ -806,6 +813,7 @@ interface DawEventMap {
806
813
  'daw-clip-move': CustomEvent<DawClipMoveDetail>;
807
814
  'daw-clip-trim': CustomEvent<DawClipTrimDetail>;
808
815
  'daw-clip-split': CustomEvent<DawClipSplitDetail>;
816
+ 'daw-spectrogram-ready': CustomEvent<DawSpectrogramReadyDetail>;
809
817
  }
810
818
  type DawEvent<K extends keyof DawEventMap> = DawEventMap[K];
811
819
  interface LoadFilesResult {
@@ -836,6 +844,44 @@ declare class DawEditorElement extends LitElement {
836
844
  * floor already provides this; this attribute controls the temporal mode.
837
845
  */
838
846
  indefinitePlayback: boolean;
847
+ /**
848
+ * Default spectrogram FFT/render config inherited by tracks with
849
+ * `render-mode="spectrogram"` that do not set their own. Wired into the
850
+ * orchestrator by `SpectrogramController` in Task 14.
851
+ */
852
+ get spectrogramConfig(): SpectrogramConfig | null;
853
+ set spectrogramConfig(value: SpectrogramConfig | null);
854
+ private _spectrogramConfig;
855
+ /**
856
+ * Default color map for spectrogram tracks. Tracks may override via
857
+ * their own per-track property in a future iteration. Separate from
858
+ * `spectrogramConfig` because `ColorMapValue` is not part of the
859
+ * `SpectrogramConfig` shape.
860
+ */
861
+ get spectrogramColorMap(): ColorMapValue | null;
862
+ set spectrogramColorMap(value: ColorMapValue | null);
863
+ private _spectrogramColorMap;
864
+ private _ensureSpectrogramController;
865
+ /** Called by <daw-spectrogram> after transferControlToOffscreen. */
866
+ _spectrogramRegisterCanvas(reg: {
867
+ canvasId: string;
868
+ canvas: OffscreenCanvas;
869
+ clipId: string;
870
+ trackId: string;
871
+ channelIndex: number;
872
+ chunkIndex: number;
873
+ globalPixelOffset: number;
874
+ widthPx: number;
875
+ heightPx: number;
876
+ }): void;
877
+ /** Called by <daw-spectrogram> on chunk unmount / element disconnect. */
878
+ _spectrogramUnregisterCanvas(canvasId: string): void;
879
+ /**
880
+ * Push a clip's decoded audio into the spectrogram controller. No-op
881
+ * unless the track is in spectrogram render-mode and the controller
882
+ * already exists (it bootstraps from canvas registration).
883
+ */
884
+ private _maybeRegisterSpectrogramClipAudio;
839
885
  scaleMode: 'temporal' | 'beats';
840
886
  get ticksPerPixel(): number;
841
887
  set ticksPerPixel(value: number);
@@ -892,6 +938,7 @@ declare class DawEditorElement extends LitElement {
892
938
  private _audioResume;
893
939
  eagerResume?: string;
894
940
  private _recordingController;
941
+ private _spectrogramController;
895
942
  private _clipPointer;
896
943
  get _clipHandler(): ClipPointerHandler | null;
897
944
  get engine(): PlaylistEngine | null;
@@ -932,9 +979,21 @@ declare class DawEditorElement extends LitElement {
932
979
  connectedCallback(): void;
933
980
  disconnectedCallback(): void;
934
981
  willUpdate(changedProperties: Map<string, unknown>): void;
982
+ /**
983
+ * Cache of the last ViewportState forwarded to the spectrogram controller.
984
+ * Lit's `updated()` fires on every reactive state change (`_isPlaying`,
985
+ * `_selectedTrackId`, etc.) — most of which don't affect the spectrogram
986
+ * viewport. Skip the cross-controller call when nothing changed.
987
+ *
988
+ * The orchestrator dedupes too, but this avoids the call entirely.
989
+ */
990
+ private _lastSpectrogramViewport;
991
+ protected updated(_changed: Map<string, unknown>): void;
935
992
  private _onTrackConnected;
936
993
  private _onTrackRemoved;
937
994
  private _onTrackUpdate;
995
+ /** Drop the controller when no spectrogram tracks remain. */
996
+ private _disposeSpectrogramControllerIfEmpty;
938
997
  private static _CONTROL_PROPS;
939
998
  private _onTrackControl;
940
999
  private _onTrackRemoveRequest;
@@ -1228,6 +1287,89 @@ declare global {
1228
1287
  }
1229
1288
  }
1230
1289
 
1290
+ declare class DawSpectrogramElement extends LitElement {
1291
+ clipId: string;
1292
+ trackId: string;
1293
+ channelIndex: number;
1294
+ length: number;
1295
+ waveHeight: number;
1296
+ get samplesPerPixel(): number;
1297
+ set samplesPerPixel(value: number);
1298
+ private _samplesPerPixel;
1299
+ get sampleRate(): number;
1300
+ set sampleRate(value: number);
1301
+ private _sampleRate;
1302
+ clipOffsetSeconds: number;
1303
+ visibleStart: number;
1304
+ visibleEnd: number;
1305
+ originX: number;
1306
+ static styles: lit.CSSResult;
1307
+ private _canvases;
1308
+ private _registeredCanvasIds;
1309
+ /**
1310
+ * Walk up to the editor host. `closest('daw-editor')` does NOT cross
1311
+ * shadow boundaries — and this element lives inside the editor's shadow
1312
+ * DOM — so use getRootNode().host to step out.
1313
+ */
1314
+ private _findHostEditor;
1315
+ willUpdate(changed: PropertyValues): void;
1316
+ private _rebuildChunks;
1317
+ protected updated(_changed: PropertyValues): void;
1318
+ private _registerCanvases;
1319
+ private _unregisterAllCanvases;
1320
+ disconnectedCallback(): void;
1321
+ render(): lit.TemplateResult<1>;
1322
+ }
1323
+ declare global {
1324
+ interface HTMLElementTagNameMap {
1325
+ 'daw-spectrogram': DawSpectrogramElement;
1326
+ }
1327
+ }
1328
+
1329
+ interface SpectrogramControllerHost extends ReactiveControllerHost {
1330
+ dispatchEvent(event: Event): boolean;
1331
+ }
1332
+ /**
1333
+ * Lit reactive controller that owns a `SpectrogramOrchestrator` for the
1334
+ * `<daw-editor>` host. Creates the orchestrator lazily on first canvas
1335
+ * registration so editors without spectrogram tracks pay nothing.
1336
+ *
1337
+ * Holds editor-level defaults and per-track overrides separately; merges
1338
+ * them down to a single (config, colorMap) pair for the orchestrator on
1339
+ * each change.
1340
+ *
1341
+ * v1 limitation: orchestrator accepts ONE config / colorMap at a time, so
1342
+ * the "first registered track wins" rule applies when multiple tracks are
1343
+ * in spectrogram mode with different overrides. Multi-track per-clip
1344
+ * configs are deferred to a follow-up.
1345
+ */
1346
+ declare class SpectrogramController implements ReactiveController {
1347
+ private host;
1348
+ private workerFactory;
1349
+ private orchestrator;
1350
+ private editorConfig;
1351
+ private editorColorMap;
1352
+ private trackConfigs;
1353
+ private trackColorMaps;
1354
+ constructor(host: SpectrogramControllerHost, workerFactory: () => Worker);
1355
+ hostConnected(): void;
1356
+ hostDisconnected(): void;
1357
+ setEditorConfig(config: SpectrogramConfig | null): void;
1358
+ setEditorColorMap(colorMap: ColorMapValue | null): void;
1359
+ setTrackConfig(trackId: string, config: SpectrogramConfig | null): void;
1360
+ setTrackColorMap(trackId: string, colorMap: ColorMapValue | null): void;
1361
+ registerClipAudio(reg: ClipRegistration): void;
1362
+ unregisterClipAudio(clipId: string): void;
1363
+ registerCanvas(reg: CanvasRegistration): void;
1364
+ unregisterCanvas(canvasId: string): void;
1365
+ setViewport(state: ViewportState): void;
1366
+ dispose(): void;
1367
+ private ensureOrchestrator;
1368
+ private reapply;
1369
+ private mergedConfig;
1370
+ private mergedColorMap;
1371
+ }
1372
+
1231
1373
  interface AudioResumeHost extends ReactiveControllerHost, HTMLElement {
1232
1374
  /** Returns the AudioContext to resume on user gesture */
1233
1375
  readonly audioContext: AudioContext;
@@ -1284,4 +1426,4 @@ interface SplitHost {
1284
1426
  */
1285
1427
  declare function splitAtPlayhead(host: SplitHost): boolean;
1286
1428
 
1287
- export { AudioResumeController, type ClipConfig, type ClipDescriptor, type ClipEngineContract, ClipPointerHandler, type ClipPointerHost, type DawClipConnectedDetail, DawClipElement, type DawClipErrorDetail, type DawClipIdDetail, type DawClipMoveDetail, type DawClipSplitDetail, type DawClipTrimDetail, type DawClipUpdateDetail, DawEditorElement, type DawErrorDetail, type DawEvent, type DawEventMap, type DawFilesLoadErrorDetail, DawGridElement, DawKeyboardShortcutsElement, DawPauseButtonElement, DawPianoRollElement, DawPlayButtonElement, DawPlayheadElement, DawRecordButtonElement, type DawRecordingCompleteDetail, type DawRecordingErrorDetail, type DawRecordingStartDetail, DawRulerElement, type DawSeekDetail, type DawSelectionDetail, DawSelectionElement, DawStopButtonElement, type DawTrackConnectedDetail, type DawTrackControlDetail, DawTrackControlsElement, DawTrackElement, type DawTrackErrorDetail, type DawTrackIdDetail, type DawTrackRemoveDetail, type DawTrackSelectDetail, DawTransportButton, DawTransportElement, DawWaveformElement, type DomClipDescriptor, type DropClipDescriptor, type KeyBinding, type LoadFilesResult, type PlaybackShortcutMap, type PointerEngineContract, RecordingController, type RecordingOptions, type RecordingSession, type SplitEngineContract, type SplitHost, type SplittingShortcutMap, type TrackConfig, type TrackDescriptor, type TrackRenderMode, type UndoShortcutMap, type WaveformSegment, isDomClip, splitAtPlayhead };
1429
+ export { AudioResumeController, type ClipConfig, type ClipDescriptor, type ClipEngineContract, ClipPointerHandler, type ClipPointerHost, type DawClipConnectedDetail, DawClipElement, type DawClipErrorDetail, type DawClipIdDetail, type DawClipMoveDetail, type DawClipSplitDetail, type DawClipTrimDetail, type DawClipUpdateDetail, DawEditorElement, type DawErrorDetail, type DawEvent, type DawEventMap, type DawFilesLoadErrorDetail, DawGridElement, DawKeyboardShortcutsElement, DawPauseButtonElement, DawPianoRollElement, DawPlayButtonElement, DawPlayheadElement, DawRecordButtonElement, type DawRecordingCompleteDetail, type DawRecordingErrorDetail, type DawRecordingStartDetail, DawRulerElement, type DawSeekDetail, type DawSelectionDetail, DawSelectionElement, DawSpectrogramElement, DawStopButtonElement, type DawTrackConnectedDetail, type DawTrackControlDetail, DawTrackControlsElement, DawTrackElement, type DawTrackErrorDetail, type DawTrackIdDetail, type DawTrackRemoveDetail, type DawTrackSelectDetail, DawTransportButton, DawTransportElement, DawWaveformElement, type DomClipDescriptor, type DropClipDescriptor, type KeyBinding, type LoadFilesResult, type PlaybackShortcutMap, type PointerEngineContract, RecordingController, type RecordingOptions, type RecordingSession, SpectrogramController, type SplitEngineContract, type SplitHost, type SplittingShortcutMap, type TrackConfig, type TrackDescriptor, type TrackRenderMode, type UndoShortcutMap, type WaveformSegment, isDomClip, splitAtPlayhead };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as lit from 'lit';
2
2
  import { LitElement, PropertyValues, ReactiveController, ReactiveControllerHost } from 'lit';
3
- import { MidiNoteData, FadeType, Peaks, Bits, PeakData, MeterEntry, SnapTo, ClipTrack, KeyboardShortcut } from '@waveform-playlist/core';
3
+ import { MidiNoteData, SpectrogramConfig, FadeType, Peaks, Bits, PeakData, MeterEntry, SnapTo, ColorMapValue, ClipTrack, KeyboardShortcut } from '@waveform-playlist/core';
4
4
  import WaveformData from 'waveform-data';
5
5
  import { PlayoutAdapter, PlaylistEngine } from '@waveform-playlist/engine';
6
+ import { ClipRegistration, CanvasRegistration, ViewportState } from '@dawcore/spectrogram';
6
7
 
7
8
  declare class DawClipElement extends LitElement {
8
9
  src: string;
@@ -38,7 +39,7 @@ declare global {
38
39
  }
39
40
  }
40
41
 
41
- type TrackRenderMode = 'waveform' | 'piano-roll';
42
+ type TrackRenderMode = 'waveform' | 'piano-roll' | 'spectrogram';
42
43
  interface TrackDescriptor {
43
44
  name: string;
44
45
  src: string;
@@ -47,6 +48,7 @@ interface TrackDescriptor {
47
48
  muted: boolean;
48
49
  soloed: boolean;
49
50
  renderMode: TrackRenderMode;
51
+ spectrogramConfig?: SpectrogramConfig | null;
50
52
  clips: ClipDescriptor[];
51
53
  }
52
54
  /**
@@ -104,6 +106,7 @@ interface TrackConfig {
104
106
  muted?: boolean;
105
107
  soloed?: boolean;
106
108
  renderMode?: TrackRenderMode;
109
+ spectrogramConfig?: SpectrogramConfig | null;
107
110
  clips?: ClipConfig[];
108
111
  /**
109
112
  * Convenience: creates a single piano-roll `<daw-clip>` child with these
@@ -151,6 +154,7 @@ declare class DawTrackElement extends LitElement {
151
154
  muted: boolean;
152
155
  soloed: boolean;
153
156
  renderMode: TrackRenderMode;
157
+ spectrogramConfig: SpectrogramConfig | null;
154
158
  readonly trackId: `${string}-${string}-${string}-${string}-${string}`;
155
159
  createRenderRoot(): this;
156
160
  connectedCallback(): void;
@@ -779,6 +783,9 @@ interface DawClipSplitDetail {
779
783
  readonly leftClipId: string;
780
784
  readonly rightClipId: string;
781
785
  }
786
+ interface DawSpectrogramReadyDetail {
787
+ trackId: string;
788
+ }
782
789
  interface DawEventMap {
783
790
  'daw-selection': CustomEvent<DawSelectionDetail>;
784
791
  'daw-seek': CustomEvent<DawSeekDetail>;
@@ -806,6 +813,7 @@ interface DawEventMap {
806
813
  'daw-clip-move': CustomEvent<DawClipMoveDetail>;
807
814
  'daw-clip-trim': CustomEvent<DawClipTrimDetail>;
808
815
  'daw-clip-split': CustomEvent<DawClipSplitDetail>;
816
+ 'daw-spectrogram-ready': CustomEvent<DawSpectrogramReadyDetail>;
809
817
  }
810
818
  type DawEvent<K extends keyof DawEventMap> = DawEventMap[K];
811
819
  interface LoadFilesResult {
@@ -836,6 +844,44 @@ declare class DawEditorElement extends LitElement {
836
844
  * floor already provides this; this attribute controls the temporal mode.
837
845
  */
838
846
  indefinitePlayback: boolean;
847
+ /**
848
+ * Default spectrogram FFT/render config inherited by tracks with
849
+ * `render-mode="spectrogram"` that do not set their own. Wired into the
850
+ * orchestrator by `SpectrogramController` in Task 14.
851
+ */
852
+ get spectrogramConfig(): SpectrogramConfig | null;
853
+ set spectrogramConfig(value: SpectrogramConfig | null);
854
+ private _spectrogramConfig;
855
+ /**
856
+ * Default color map for spectrogram tracks. Tracks may override via
857
+ * their own per-track property in a future iteration. Separate from
858
+ * `spectrogramConfig` because `ColorMapValue` is not part of the
859
+ * `SpectrogramConfig` shape.
860
+ */
861
+ get spectrogramColorMap(): ColorMapValue | null;
862
+ set spectrogramColorMap(value: ColorMapValue | null);
863
+ private _spectrogramColorMap;
864
+ private _ensureSpectrogramController;
865
+ /** Called by <daw-spectrogram> after transferControlToOffscreen. */
866
+ _spectrogramRegisterCanvas(reg: {
867
+ canvasId: string;
868
+ canvas: OffscreenCanvas;
869
+ clipId: string;
870
+ trackId: string;
871
+ channelIndex: number;
872
+ chunkIndex: number;
873
+ globalPixelOffset: number;
874
+ widthPx: number;
875
+ heightPx: number;
876
+ }): void;
877
+ /** Called by <daw-spectrogram> on chunk unmount / element disconnect. */
878
+ _spectrogramUnregisterCanvas(canvasId: string): void;
879
+ /**
880
+ * Push a clip's decoded audio into the spectrogram controller. No-op
881
+ * unless the track is in spectrogram render-mode and the controller
882
+ * already exists (it bootstraps from canvas registration).
883
+ */
884
+ private _maybeRegisterSpectrogramClipAudio;
839
885
  scaleMode: 'temporal' | 'beats';
840
886
  get ticksPerPixel(): number;
841
887
  set ticksPerPixel(value: number);
@@ -892,6 +938,7 @@ declare class DawEditorElement extends LitElement {
892
938
  private _audioResume;
893
939
  eagerResume?: string;
894
940
  private _recordingController;
941
+ private _spectrogramController;
895
942
  private _clipPointer;
896
943
  get _clipHandler(): ClipPointerHandler | null;
897
944
  get engine(): PlaylistEngine | null;
@@ -932,9 +979,21 @@ declare class DawEditorElement extends LitElement {
932
979
  connectedCallback(): void;
933
980
  disconnectedCallback(): void;
934
981
  willUpdate(changedProperties: Map<string, unknown>): void;
982
+ /**
983
+ * Cache of the last ViewportState forwarded to the spectrogram controller.
984
+ * Lit's `updated()` fires on every reactive state change (`_isPlaying`,
985
+ * `_selectedTrackId`, etc.) — most of which don't affect the spectrogram
986
+ * viewport. Skip the cross-controller call when nothing changed.
987
+ *
988
+ * The orchestrator dedupes too, but this avoids the call entirely.
989
+ */
990
+ private _lastSpectrogramViewport;
991
+ protected updated(_changed: Map<string, unknown>): void;
935
992
  private _onTrackConnected;
936
993
  private _onTrackRemoved;
937
994
  private _onTrackUpdate;
995
+ /** Drop the controller when no spectrogram tracks remain. */
996
+ private _disposeSpectrogramControllerIfEmpty;
938
997
  private static _CONTROL_PROPS;
939
998
  private _onTrackControl;
940
999
  private _onTrackRemoveRequest;
@@ -1228,6 +1287,89 @@ declare global {
1228
1287
  }
1229
1288
  }
1230
1289
 
1290
+ declare class DawSpectrogramElement extends LitElement {
1291
+ clipId: string;
1292
+ trackId: string;
1293
+ channelIndex: number;
1294
+ length: number;
1295
+ waveHeight: number;
1296
+ get samplesPerPixel(): number;
1297
+ set samplesPerPixel(value: number);
1298
+ private _samplesPerPixel;
1299
+ get sampleRate(): number;
1300
+ set sampleRate(value: number);
1301
+ private _sampleRate;
1302
+ clipOffsetSeconds: number;
1303
+ visibleStart: number;
1304
+ visibleEnd: number;
1305
+ originX: number;
1306
+ static styles: lit.CSSResult;
1307
+ private _canvases;
1308
+ private _registeredCanvasIds;
1309
+ /**
1310
+ * Walk up to the editor host. `closest('daw-editor')` does NOT cross
1311
+ * shadow boundaries — and this element lives inside the editor's shadow
1312
+ * DOM — so use getRootNode().host to step out.
1313
+ */
1314
+ private _findHostEditor;
1315
+ willUpdate(changed: PropertyValues): void;
1316
+ private _rebuildChunks;
1317
+ protected updated(_changed: PropertyValues): void;
1318
+ private _registerCanvases;
1319
+ private _unregisterAllCanvases;
1320
+ disconnectedCallback(): void;
1321
+ render(): lit.TemplateResult<1>;
1322
+ }
1323
+ declare global {
1324
+ interface HTMLElementTagNameMap {
1325
+ 'daw-spectrogram': DawSpectrogramElement;
1326
+ }
1327
+ }
1328
+
1329
+ interface SpectrogramControllerHost extends ReactiveControllerHost {
1330
+ dispatchEvent(event: Event): boolean;
1331
+ }
1332
+ /**
1333
+ * Lit reactive controller that owns a `SpectrogramOrchestrator` for the
1334
+ * `<daw-editor>` host. Creates the orchestrator lazily on first canvas
1335
+ * registration so editors without spectrogram tracks pay nothing.
1336
+ *
1337
+ * Holds editor-level defaults and per-track overrides separately; merges
1338
+ * them down to a single (config, colorMap) pair for the orchestrator on
1339
+ * each change.
1340
+ *
1341
+ * v1 limitation: orchestrator accepts ONE config / colorMap at a time, so
1342
+ * the "first registered track wins" rule applies when multiple tracks are
1343
+ * in spectrogram mode with different overrides. Multi-track per-clip
1344
+ * configs are deferred to a follow-up.
1345
+ */
1346
+ declare class SpectrogramController implements ReactiveController {
1347
+ private host;
1348
+ private workerFactory;
1349
+ private orchestrator;
1350
+ private editorConfig;
1351
+ private editorColorMap;
1352
+ private trackConfigs;
1353
+ private trackColorMaps;
1354
+ constructor(host: SpectrogramControllerHost, workerFactory: () => Worker);
1355
+ hostConnected(): void;
1356
+ hostDisconnected(): void;
1357
+ setEditorConfig(config: SpectrogramConfig | null): void;
1358
+ setEditorColorMap(colorMap: ColorMapValue | null): void;
1359
+ setTrackConfig(trackId: string, config: SpectrogramConfig | null): void;
1360
+ setTrackColorMap(trackId: string, colorMap: ColorMapValue | null): void;
1361
+ registerClipAudio(reg: ClipRegistration): void;
1362
+ unregisterClipAudio(clipId: string): void;
1363
+ registerCanvas(reg: CanvasRegistration): void;
1364
+ unregisterCanvas(canvasId: string): void;
1365
+ setViewport(state: ViewportState): void;
1366
+ dispose(): void;
1367
+ private ensureOrchestrator;
1368
+ private reapply;
1369
+ private mergedConfig;
1370
+ private mergedColorMap;
1371
+ }
1372
+
1231
1373
  interface AudioResumeHost extends ReactiveControllerHost, HTMLElement {
1232
1374
  /** Returns the AudioContext to resume on user gesture */
1233
1375
  readonly audioContext: AudioContext;
@@ -1284,4 +1426,4 @@ interface SplitHost {
1284
1426
  */
1285
1427
  declare function splitAtPlayhead(host: SplitHost): boolean;
1286
1428
 
1287
- export { AudioResumeController, type ClipConfig, type ClipDescriptor, type ClipEngineContract, ClipPointerHandler, type ClipPointerHost, type DawClipConnectedDetail, DawClipElement, type DawClipErrorDetail, type DawClipIdDetail, type DawClipMoveDetail, type DawClipSplitDetail, type DawClipTrimDetail, type DawClipUpdateDetail, DawEditorElement, type DawErrorDetail, type DawEvent, type DawEventMap, type DawFilesLoadErrorDetail, DawGridElement, DawKeyboardShortcutsElement, DawPauseButtonElement, DawPianoRollElement, DawPlayButtonElement, DawPlayheadElement, DawRecordButtonElement, type DawRecordingCompleteDetail, type DawRecordingErrorDetail, type DawRecordingStartDetail, DawRulerElement, type DawSeekDetail, type DawSelectionDetail, DawSelectionElement, DawStopButtonElement, type DawTrackConnectedDetail, type DawTrackControlDetail, DawTrackControlsElement, DawTrackElement, type DawTrackErrorDetail, type DawTrackIdDetail, type DawTrackRemoveDetail, type DawTrackSelectDetail, DawTransportButton, DawTransportElement, DawWaveformElement, type DomClipDescriptor, type DropClipDescriptor, type KeyBinding, type LoadFilesResult, type PlaybackShortcutMap, type PointerEngineContract, RecordingController, type RecordingOptions, type RecordingSession, type SplitEngineContract, type SplitHost, type SplittingShortcutMap, type TrackConfig, type TrackDescriptor, type TrackRenderMode, type UndoShortcutMap, type WaveformSegment, isDomClip, splitAtPlayhead };
1429
+ export { AudioResumeController, type ClipConfig, type ClipDescriptor, type ClipEngineContract, ClipPointerHandler, type ClipPointerHost, type DawClipConnectedDetail, DawClipElement, type DawClipErrorDetail, type DawClipIdDetail, type DawClipMoveDetail, type DawClipSplitDetail, type DawClipTrimDetail, type DawClipUpdateDetail, DawEditorElement, type DawErrorDetail, type DawEvent, type DawEventMap, type DawFilesLoadErrorDetail, DawGridElement, DawKeyboardShortcutsElement, DawPauseButtonElement, DawPianoRollElement, DawPlayButtonElement, DawPlayheadElement, DawRecordButtonElement, type DawRecordingCompleteDetail, type DawRecordingErrorDetail, type DawRecordingStartDetail, DawRulerElement, type DawSeekDetail, type DawSelectionDetail, DawSelectionElement, DawSpectrogramElement, DawStopButtonElement, type DawTrackConnectedDetail, type DawTrackControlDetail, DawTrackControlsElement, DawTrackElement, type DawTrackErrorDetail, type DawTrackIdDetail, type DawTrackRemoveDetail, type DawTrackSelectDetail, DawTransportButton, DawTransportElement, DawWaveformElement, type DomClipDescriptor, type DropClipDescriptor, type KeyBinding, type LoadFilesResult, type PlaybackShortcutMap, type PointerEngineContract, RecordingController, type RecordingOptions, type RecordingSession, SpectrogramController, type SplitEngineContract, type SplitHost, type SplittingShortcutMap, type TrackConfig, type TrackDescriptor, type TrackRenderMode, type UndoShortcutMap, type WaveformSegment, isDomClip, splitAtPlayhead };