iOS milestone 4 groundwork: bespoke editor registry and data sources
Device editors ask BespokeEditors for headers, whole bodies, drawings and card actions; DeviceDataSource gives them DSP data and hidden settings, backed by app slots (SlotDataSource) or AUs (AUDataSource, hidden values in SizzleDeviceAU). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
42f66534bf
commit
3b035d6a7d
@@ -33,6 +33,10 @@ struct DeviceEditor: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
if let h = BespokeEditors.header(model) { h }
|
||||
if let b = BespokeEditors.body(model) {
|
||||
SnapScroll { b }
|
||||
} else {
|
||||
if pages.count > 1 {
|
||||
HStack(spacing: 4) {
|
||||
ForEach(pages.indices, id: \.self) { i in
|
||||
@@ -55,6 +59,7 @@ struct DeviceEditor: View {
|
||||
}
|
||||
}
|
||||
SnapScroll { cards }
|
||||
}
|
||||
}
|
||||
.padding(10)
|
||||
.background(Theme.background)
|
||||
@@ -79,9 +84,12 @@ struct CardView: View {
|
||||
HStack(spacing: 6) {
|
||||
Rectangle().fill(tone).frame(width: 8, height: 8)
|
||||
Text(panel.title.uppercased()).font(Theme.mono(11)).foregroundColor(tone)
|
||||
Spacer(minLength: 0)
|
||||
if let a = panel.action, let v = BespokeEditors.action(a, tone: tone, model: model) { v }
|
||||
}
|
||||
if let viz = panel.viz, viz.kind != "wavetable" {
|
||||
VizView(viz: viz, tone: tone, model: model)
|
||||
if let viz = panel.viz {
|
||||
if let v = BespokeEditors.viz(viz, tone: tone, model: model) { v }
|
||||
else if viz.kind != "wavetable" { VizView(viz: viz, tone: tone, model: model) }
|
||||
}
|
||||
if let captions = panel.faders {
|
||||
FaderBank(infos: infos, captions: captions, scale: panel.faderScale ?? 1, tone: tone, model: model)
|
||||
|
||||
Reference in New Issue
Block a user