// ABI Hash: ac4b47a1f21f4d9086caf4d3704f55b286499ffca77e7decd793d3dff8d289f4 import SwiftUI import SwiftData import UniformTypeIdentifiers import AppKit import Foundation import CryptoKit import OSLog /// A public view that displays hierarchical data in columns with drag-and-drop support /// and context menu options. Can be used from external Swift Framework targets. @MainActor public struct ColumnView: View { @Binding public var selection: Item? // Public properties public let items: [Item] public let childrenKeyPath: KeyPath public let onMove: ((Item, Item?) -> Void)? public let onRename: ((Item.ID) -> Void)? public let onDelete: ((Item.ID) -> Void)? public let onCreateSubfolder: ((Item.ID) -> Void)? public let content: (Item) -> Content public let updateTrigger: Int /// Initializes a ColumnView with all necessary parameters /// - Parameters: /// - items: The root items to display /// - childrenKeyPath: KeyPath to access children of an item /// - updateTrigger: // /// - onMove: Closure called when an item is moved (item, newParent) /// - onRename: Closure called when rename is selected /// - onDelete: Closure called when delete is selected /// - onCreateSubfolder: Closure called when new subfolder is selected /// - content: ViewBuilder for item content public init( items: [Item], selection: Binding, childrenKeyPath: KeyPath, updateTrigger: Int = 0, onMove: ((Item, Item?) -> Void)? = nil, onRename: ((Item.ID) -> Void)? = nil, onDelete: ((Item.ID) -> Void)? = nil, onCreateSubfolder: ((Item.ID) -> Void)? = nil, @ViewBuilder content: @escaping (Item) -> Content ) { fatalError() } public var body: some View { fatalError() } } public enum FactoryBadgeSize: Sendable, Equatable, CaseIterable { case small case regular case large } public enum FactoryBadgeStyle: Sendable, Equatable { case info // blue case cyan case warning // orange case success // green case purple case neutral case error // red case custom(color: Color) /// Resolves the style to a concrete Color using the FactoryColors palette. @MainActor public func resolveColor() -> Color { fatalError() } } /// A compact, appearance-adaptive badge component for displaying status, labels, or metadata. /// /// **Appearance Behavior:** /// - **Dark Mode:** Renders deep midnight navy text (`#0A0F1D`, RGB 0.04/0.06/0.11, near-black) over /// a solid, full-opacity fill using the resolved ``FactoryBadgeStyle``/``FactoryColors`` color. /// The high-luminance fill ensures maximum contrast against the dark text. /// - **Light Mode:** Renders the resolved style color as saturated foreground text over a 15 % /// opacity tinted wash of the same color, producing a subtle "chip" aesthetic on light surfaces. /// /// All size variants (``FactoryBadgeSize``) use bold monospaced system fonts and capsule-shaped /// backgrounds. The component is main-actor isolated and safe for use in SwiftUI view hierarchies. @MainActor public struct FactoryBadge: View { public let text: String public let style: FactoryBadgeStyle public let size: FactoryBadgeSize /// Creates a new FactoryBadge with the specified text, style, and size. /// - Parameters: /// - text: The string to display inside the badge. /// - style: The semantic style determining the badge's color. Defaults to `.info`. /// - size: The size variant controlling font size and padding. Defaults to `.small`. public init(_ text: String, style: FactoryBadgeStyle = .info, size: FactoryBadgeSize = .small) { fatalError() } public var body: some View { fatalError() } } /// A Sendable palette of appearance-adaptive colors for Factory applications. /// /// Each color declares a light-mode and a dark-mode variant that automatically resolve based on /// the current `NSAppearance` (or `colorScheme` in SwiftUI). /// /// **Contrast Design:** /// - **Dark Mode variants** resolve to *bright, high-luminance* colors calibrated for dark /// backgrounds. They are designed to serve as solid capsule fills behind dark foreground text /// (e.g., ``FactoryBadge``'s midnight-navy text at `#0A0F1D`). The elevated luminance ensures /// WCAG-AA compliant contrast against near-black text. /// - **Light Mode variants** resolve to *deeper, saturated* tones suited for light surfaces. /// They work both as foreground text colors and, at 15 % opacity, as subtle tinted washes /// (as used by ``FactoryBadge`` in light mode). /// /// All colors are `@MainActor` isolated and `Sendable`, making them safe for use across /// SwiftUI view hierarchies and async contexts. @MainActor public struct FactoryColors: Sendable { /// Deep rich cobalt blue in light mode; bright electric sky/cyan-tinted blue in dark mode. public static let blue = Color.blue /// Vibrant teal/cyan color. public static let cyan = Color.cyan /// Clean emerald/mint success green. public static let green = Color.green /// High-visibility warning orange. public static let orange = Color.orange /// Rich violet/purple. public static let purple = Color.purple /// High-contrast error/alert red. public static let red = Color.red /// Balanced slate/zinc secondary tone. public static let neutral = Color.gray } public struct FactoryFlowLayout: Layout { public let horizontalSpacing: CGFloat = 0 public let verticalSpacing: CGFloat = 0 public init(horizontalSpacing: CGFloat = 8, verticalSpacing: CGFloat = 8) { fatalError() } public func sizeThatFits( proposal: ProposedViewSize, subviews: Subviews, cache: inout Void ) -> CGSize { fatalError() } public func placeSubviews( in bounds: CGRect, proposal: ProposedViewSize, subviews: Subviews, cache: inout Void ) { fatalError() } } @MainActor public struct FactoryOptionAccordion: View { public init( title: String, sections: [FactoryOptionSection], selection: Binding>, isExpanded: Binding? = nil, initiallyExpanded: Bool = false, emptySummaryBehavior: FactoryOptionEmptySummaryBehavior = .hidden, allowsCollapsedDeselection: Bool = true, showClearButton: Bool = true, columnMode: FactoryOptionColumnMode = .adaptive(), ordering: FactoryOptionOrdering = .columnMajor, searchVisibility: FactoryOptionSearchVisibility = .automatic(), accentColor: Color = FactoryColors.green, @ViewBuilder headerAccessory: () -> Accessory ) { fatalError() } public init( title: String, sections: [FactoryOptionSection], selection: Binding, allowsDeselection: Bool = false, isExpanded: Binding? = nil, initiallyExpanded: Bool = false, emptySummaryBehavior: FactoryOptionEmptySummaryBehavior = .hidden, allowsCollapsedDeselection: Bool = true, showClearButton: Bool = true, columnMode: FactoryOptionColumnMode = .adaptive(), ordering: FactoryOptionOrdering = .columnMajor, searchVisibility: FactoryOptionSearchVisibility = .automatic(), accentColor: Color = FactoryColors.green, @ViewBuilder headerAccessory: () -> Accessory ) { fatalError() } public init( title: String, sections: [FactoryOptionSection], selection: Binding>, isExpanded: Binding? = nil, initiallyExpanded: Bool = false, emptySummaryBehavior: FactoryOptionEmptySummaryBehavior = .hidden, allowsCollapsedDeselection: Bool = true, showClearButton: Bool = true, columnMode: FactoryOptionColumnMode = .adaptive(), ordering: FactoryOptionOrdering = .columnMajor, searchVisibility: FactoryOptionSearchVisibility = .automatic(), accentColor: Color = FactoryColors.green ) { fatalError() } public init( title: String, sections: [FactoryOptionSection], selection: Binding, allowsDeselection: Bool = false, isExpanded: Binding? = nil, initiallyExpanded: Bool = false, emptySummaryBehavior: FactoryOptionEmptySummaryBehavior = .hidden, allowsCollapsedDeselection: Bool = true, showClearButton: Bool = true, columnMode: FactoryOptionColumnMode = .adaptive(), ordering: FactoryOptionOrdering = .columnMajor, searchVisibility: FactoryOptionSearchVisibility = .automatic(), accentColor: Color = FactoryColors.green ) { fatalError() } public init( title: String, items: [FactoryOptionItem], selection: Binding>, isExpanded: Binding? = nil, initiallyExpanded: Bool = false, emptySummaryBehavior: FactoryOptionEmptySummaryBehavior = .hidden, allowsCollapsedDeselection: Bool = true, showClearButton: Bool = true, columnMode: FactoryOptionColumnMode = .adaptive(), ordering: FactoryOptionOrdering = .columnMajor, searchVisibility: FactoryOptionSearchVisibility = .automatic(), accentColor: Color = FactoryColors.green ) { fatalError() } public init( title: String, titles: [String], selection: Binding>, isExpanded: Binding? = nil, initiallyExpanded: Bool = false, emptySummaryBehavior: FactoryOptionEmptySummaryBehavior = .hidden, allowsCollapsedDeselection: Bool = true, showClearButton: Bool = true, columnMode: FactoryOptionColumnMode = .adaptive(), ordering: FactoryOptionOrdering = .columnMajor, searchVisibility: FactoryOptionSearchVisibility = .automatic(), accentColor: Color = FactoryColors.green ) { fatalError() } public init( title: String, items: [FactoryOptionItem], selection: Binding, allowsDeselection: Bool = false, isExpanded: Binding? = nil, initiallyExpanded: Bool = false, emptySummaryBehavior: FactoryOptionEmptySummaryBehavior = .hidden, allowsCollapsedDeselection: Bool = true, showClearButton: Bool = true, columnMode: FactoryOptionColumnMode = .adaptive(), ordering: FactoryOptionOrdering = .columnMajor, searchVisibility: FactoryOptionSearchVisibility = .automatic(), accentColor: Color = FactoryColors.green ) { fatalError() } public init( title: String, titles: [String], selection: Binding, allowsDeselection: Bool = false, isExpanded: Binding? = nil, initiallyExpanded: Bool = false, emptySummaryBehavior: FactoryOptionEmptySummaryBehavior = .hidden, allowsCollapsedDeselection: Bool = true, showClearButton: Bool = true, columnMode: FactoryOptionColumnMode = .adaptive(), ordering: FactoryOptionOrdering = .columnMajor, searchVisibility: FactoryOptionSearchVisibility = .automatic(), accentColor: Color = FactoryColors.green ) { fatalError() } public var body: some View { get { fatalError() } } } @MainActor public struct FactoryOptionGrid: View { public init( sections: [FactoryOptionSection], selection: Binding>, collapsedSectionIDs: Binding>? = nil, columnMode: FactoryOptionColumnMode = .adaptive(), ordering: FactoryOptionOrdering = .columnMajor, searchVisibility: FactoryOptionSearchVisibility = .automatic(), accentColor: Color = FactoryColors.green, horizontalSpacing: CGFloat = 8, verticalSpacing: CGFloat = 8 ) { fatalError() } public init( sections: [FactoryOptionSection], selection: Binding, allowsDeselection: Bool = false, collapsedSectionIDs: Binding>? = nil, columnMode: FactoryOptionColumnMode = .adaptive(), ordering: FactoryOptionOrdering = .columnMajor, searchVisibility: FactoryOptionSearchVisibility = .automatic(), accentColor: Color = FactoryColors.green, horizontalSpacing: CGFloat = 8, verticalSpacing: CGFloat = 8 ) { fatalError() } public init( items: [FactoryOptionItem], selection: Binding>, columnMode: FactoryOptionColumnMode = .adaptive(), ordering: FactoryOptionOrdering = .columnMajor, searchVisibility: FactoryOptionSearchVisibility = .automatic(), accentColor: Color = FactoryColors.green, horizontalSpacing: CGFloat = 8, verticalSpacing: CGFloat = 8 ) { fatalError() } public init( titles: [String], selection: Binding>, columnMode: FactoryOptionColumnMode = .adaptive(), ordering: FactoryOptionOrdering = .columnMajor, searchVisibility: FactoryOptionSearchVisibility = .automatic(), accentColor: Color = FactoryColors.green, horizontalSpacing: CGFloat = 8, verticalSpacing: CGFloat = 8 ) { fatalError() } public init( items: [FactoryOptionItem], selection: Binding, allowsDeselection: Bool = false, columnMode: FactoryOptionColumnMode = .adaptive(), ordering: FactoryOptionOrdering = .columnMajor, searchVisibility: FactoryOptionSearchVisibility = .automatic(), accentColor: Color = FactoryColors.green, horizontalSpacing: CGFloat = 8, verticalSpacing: CGFloat = 8 ) { fatalError() } public init( titles: [String], selection: Binding, allowsDeselection: Bool = false, columnMode: FactoryOptionColumnMode = .adaptive(), ordering: FactoryOptionOrdering = .columnMajor, searchVisibility: FactoryOptionSearchVisibility = .automatic(), accentColor: Color = FactoryColors.green, horizontalSpacing: CGFloat = 8, verticalSpacing: CGFloat = 8 ) { fatalError() } public var body: some View { get { fatalError() } } } public struct FactoryOptionItem: Identifiable, Hashable, Codable, Sendable { public let id: String public let title: String public let subtitle: String? public init(id: String, title: String, subtitle: String? = nil) { fatalError() } } public struct FactoryOptionSection: Identifiable, Hashable, Codable, Sendable { public let id: String public let title: String? public let items: [FactoryOptionItem] public let isCollapsible: Bool public let initiallyExpanded: Bool public init( id: String, title: String? = nil, items: [FactoryOptionItem], isCollapsible: Bool = false, initiallyExpanded: Bool = true ) { fatalError() } public init( id: String, title: String? = nil, titles: [String], isCollapsible: Bool = false, initiallyExpanded: Bool = true ) { fatalError() } } public enum FactoryOptionColumnMode: Sendable, Equatable { case adaptive(minColumnWidth: CGFloat = 185, maxColumns: Int? = nil) case fixed(columnCount: Int) } public enum FactoryOptionOrdering: Sendable, Equatable { case columnMajor case rowMajor } public enum FactoryOptionSelectionMode: Sendable, Equatable { case multiple case single } public enum FactoryOptionEmptySummaryBehavior: Sendable, Equatable { case hidden case placeholder(String) } public enum FactoryOptionSearchVisibility: Sendable, Equatable { case automatic(threshold: Int = 20) case always case never } public extension View { func factoryToast(message: Binding) -> some View { get { fatalError() } } } /// Protects SwiftData persistence layers from LLM-induced schema corruption. public enum SchemaGuardian { /// Generates a deterministic fingerprint of the provided schema string. public static func generateFingerprint(from schemaLayout: String) -> String { fatalError() } /// Compares the expected fingerprint against the stored database metadata. /// If there is a mismatch (e.g., hallucinated schema change), it deletes the store to prevent corruption. /// - Parameters: /// - expectedFingerprint: The hardcoded SHA256 hash of the expected schema. /// - storeURL: The specific URL to the app's isolated `.store` file. public static func verifyOrReset(expectedFingerprint: String, storeURL: URL) { fatalError() } } public struct TokenField: View { @Binding public var tokens: [String] public let placeholder: String public init(tokens: Binding<[String]>, placeholder: String) { fatalError() } public var body: some View {uminescence { fatalError() } } }