Files
luma/Sources/LumaCore/Models/CustomInstrumentDefUIState.swift
Ole André Vadla Ravnås d1606523b5 Support multi-file custom instruments
- Store source files as named CustomInstrumentFile rows per def
- Render sidebar with disclosure groups
- Drive editor via Monaco project models with activePath
- Validate Add/Rename/Delete dialogs and submit on Enter
- Fork installed hook packs into editable custom instruments
- Reload instances on def change; clear stale compat reasons live
- Focus editor on selection (native + Monaco)
2026-05-13 08:54:48 +02:00

25 lines
658 B
Swift

import Foundation
import GRDB
public struct CustomInstrumentDefUIState: Codable, Equatable, Identifiable, Sendable, FetchableRecord, PersistableRecord {
public static let databaseTableName = "custom_instrument_def_ui_state"
public var defID: UUID
public var sidebarExpansion: SidebarExpansion
public var id: UUID { defID }
enum CodingKeys: String, CodingKey {
case defID = "def_id"
case sidebarExpansion = "sidebar_expansion"
}
public init(
defID: UUID,
sidebarExpansion: SidebarExpansion = .expanded
) {
self.defID = defID
self.sidebarExpansion = sidebarExpansion
}
}