- Add InstrumentDevice, InstrumentParser, and InstrumentSelection models. - Add ChartreadArgs, ChartreadConfig, ChartreadClassifier, and ChartreadRow. - Add LabColor, ColorDifference (CIEDE2000), and MeasurementArtefacts. - Extend ArgyllRunner with instlist, chartread streaming, and average. - Implement MeasurementWorkflowViewModel and Stage3View. - Add SwatchPatchView for live intended/measured ΔE₀₀ display. - Route RootView to Stage 3 and wire workflow resume from .ti2. - Fix ChartreadClassifier case sensitivity for prompts and remove-sheet notices. - Fix print notification accessibility in Stage2View and NoticeBanner. - Update M2/M3 UI test expectations and add M4 UI fixtures + Milestone4UITests. - Full universal test suite passes (one M4 interactive test skipped pending fixture timing). Refs #18 #19 #20 #21 #22 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
72 lines
2.3 KiB
Swift
72 lines
2.3 KiB
Swift
import AppKit
|
|
import SwiftUI
|
|
import ICCeryCore
|
|
|
|
/// Root layout: 270 pt sidebar + main stage area with the notification
|
|
/// banner pinned to the top (docs/21 §Shell).
|
|
struct RootView: View {
|
|
@Bindable var workflow: TargetWorkflowViewModel
|
|
@State private var showingSettings = false
|
|
@State private var showingAbout = false
|
|
|
|
private var model: WizardViewModel { workflow.wizard }
|
|
|
|
var body: some View {
|
|
HStack(spacing: 0) {
|
|
SidebarView(
|
|
workflow: workflow,
|
|
onOpenSettings: { showingSettings = true },
|
|
onOpenAbout: { showingAbout = true }
|
|
)
|
|
|
|
Rectangle()
|
|
.fill(Theme.border)
|
|
.frame(width: 1)
|
|
|
|
VStack(spacing: 0) {
|
|
if let notice = model.notice {
|
|
NoticeBanner(notice: notice, onClose: model.dismissNotice)
|
|
}
|
|
stageContent
|
|
}
|
|
}
|
|
.frame(minWidth: 1100, minHeight: 700)
|
|
.background(Theme.background)
|
|
// #151: re-probe artefacts when the window regains focus —
|
|
// files deleted in Finder must re-lock stages.
|
|
.onReceive(
|
|
NotificationCenter.default.publisher(
|
|
for: NSWindow.didBecomeKeyNotification
|
|
)
|
|
) { _ in model.windowDidBecomeKey() }
|
|
.sheet(isPresented: $showingSettings) {
|
|
SettingsView()
|
|
}
|
|
.sheet(isPresented: $workflow.showingSavePreset) {
|
|
SavePresetDialog(workflow: workflow)
|
|
}
|
|
.sheet(isPresented: $workflow.showingManagePresets) {
|
|
ManagePresetsDialog(workflow: workflow)
|
|
}
|
|
.alert("ICCery 2.0.0", isPresented: $showingAbout) {
|
|
Button("OK") {}
|
|
} message: {
|
|
Text("Native macOS printer profiling workstation.\nFull About dialog lands in issue #31.")
|
|
}
|
|
}
|
|
|
|
@ViewBuilder
|
|
private var stageContent: some View {
|
|
switch model.stage {
|
|
case .generate:
|
|
Stage1View(workflow: workflow)
|
|
case .layOutPrint:
|
|
Stage2View(workflow: workflow)
|
|
case .measure:
|
|
Stage3View(model: workflow.measurement)
|
|
default:
|
|
StagePlaceholderView(stage: model.stage)
|
|
}
|
|
}
|
|
}
|