0ddf350f1f
Lyrebird 2.0 moved `@UIParam` / `UIParamNode` out of `LyrebirdUI` into the core `LyrebirdSynth` module (the `Lyrebird` product); `LyrebirdUI` no longer re-exports them. Migrate: - add `import LyrebirdSynth` to every file that uses `@UIParam`/`UIParamNode` (the pedal controls, tempo-syncable params, and the SwiftUI views). - Package.swift: the `LyrebirdShoeGazeUI` target now also depends on the `Lyrebird` product (previously only `LyrebirdUI`), so `import LyrebirdSynth` resolves there under explicit module maps. - Package.resolved (SwiftPM + both Xcode projects) pinned to Lyrebird 2.0.0. Also: app marketing/project version bumps, Xcode upgrade-check, and a CHANGELOG wording tweak carried in the same working tree. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
26 lines
1021 B
Swift
26 lines
1021 B
Swift
// PedalRebuildEnvironment.swift
|
|
// Lyrebird
|
|
//
|
|
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
import SwiftUI
|
|
import LyrebirdSynth
|
|
import LyrebirdShoeGaze
|
|
|
|
/// Environment action a leaf pedal control can call to ask the host to rebuild the board that
|
|
/// contains the given pedal — needed when a pedal setting that is *not* a live `@UIParam` (e.g.
|
|
/// the Neural Amp's model file, stored in ``Pedal/resourcePath``) changes and only takes effect
|
|
/// after the pedal's graph is rebuilt. Set once near the builder root; defaults to a no-op.
|
|
private struct PedalRebuildActionKey: EnvironmentKey {
|
|
static let defaultValue: @MainActor @Sendable (Pedal) -> Void = { _ in }
|
|
}
|
|
|
|
extension EnvironmentValues {
|
|
/// Rebuilds the board containing the passed pedal. No-op unless the host installs it.
|
|
var pedalRebuildAction: @MainActor @Sendable (Pedal) -> Void {
|
|
get { self[PedalRebuildActionKey.self] }
|
|
set { self[PedalRebuildActionKey.self] = newValue }
|
|
}
|
|
}
|