From 24c53eb51df46600f63154202ffee916dfba07ad Mon Sep 17 00:00:00 2001 From: Tommaso Negri Date: Sun, 12 Jul 2026 15:06:51 +0200 Subject: [PATCH] move files around --- Package.swift | 6 +++--- Sources/phbar/Models/{Block => }/PHBlock.swift | 0 .../PHBlock+Loading.swift | 0 .../PHBlock+Refresh.swift | 0 .../{Block => PHBlock}/PHBlockKind.swift | 0 .../phbar/Models/{Config => }/PHConfig.swift | 0 .../PHConfig+Loading.swift | 0 .../PHConfig+Screen.swift | 0 .../Models/{Config => PHConfig}/config.toml | 0 Sources/phbar/Models/{Event => }/PHEvent.swift | 0 .../{Event => PHEvent}/PHEventLoader.swift | 0 .../{Event => PHEvent}/PHEventManifest.swift | 0 .../{Event => PHEvent}/PHEventRegistry.swift | 0 .../{Event => PHEvent}/PHEventSource.swift | 0 .../PHEventSubscription.swift | 0 .../PHExternalEventSource.swift | 0 .../phbar/Models/{Event => PHEvent}/README.md | 0 .../phbar/Models/{Gesture => }/PHGesture.swift | 0 .../PHGestureEvent.swift | 0 .../phbar/Models/{Config => }/PHPaths.swift | 0 Sources/phbar/Models/{Theme => }/PHTheme.swift | 0 .../PHTheme+Loading.swift | 0 .../{Theme => PHTheme}/PHThemeStyle.swift | 6 +++--- .../PHThemeStyle/PHThemeStyleColor.swift} | 2 +- .../PHThemeStyle/PHThemeStylePadding.swift} | 2 +- .../{Theme/Text => PHTheme}/PHThemeText.swift | 0 .../PHThemeText}/PHThemeTextStyle.swift | 0 .../PHThemeText}/PHThemeTextWeight.swift | 0 .../{Theme => PHTheme}/PHThemeWindow.swift | 8 ++++---- .../PHThemeWindow/PHThemeWindowAnchor.swift} | 6 +++--- .../PHThemeWindowDimension.swift} | 2 +- .../PHThemeWindow/PHThemeWindowMargin.swift} | 2 +- .../PHThemeWindow/PHThemeWindowPoint.swift} | 2 +- .../phbar/Models/{Theme => PHTheme}/theme.toml | 0 Tests/phbarTests/phbarTests.swift | 18 +++++++++--------- 35 files changed, 27 insertions(+), 27 deletions(-) rename Sources/phbar/Models/{Block => }/PHBlock.swift (100%) rename Sources/phbar/Models/{Block/Extensions => PHBlock}/PHBlock+Loading.swift (100%) rename Sources/phbar/Models/{Block/Extensions => PHBlock}/PHBlock+Refresh.swift (100%) rename Sources/phbar/Models/{Block => PHBlock}/PHBlockKind.swift (100%) rename Sources/phbar/Models/{Config => }/PHConfig.swift (100%) rename Sources/phbar/Models/{Config/Extensions => PHConfig}/PHConfig+Loading.swift (100%) rename Sources/phbar/Models/{Config/Extensions => PHConfig}/PHConfig+Screen.swift (100%) rename Sources/phbar/Models/{Config => PHConfig}/config.toml (100%) rename Sources/phbar/Models/{Event => }/PHEvent.swift (100%) rename Sources/phbar/Models/{Event => PHEvent}/PHEventLoader.swift (100%) rename Sources/phbar/Models/{Event => PHEvent}/PHEventManifest.swift (100%) rename Sources/phbar/Models/{Event => PHEvent}/PHEventRegistry.swift (100%) rename Sources/phbar/Models/{Event => PHEvent}/PHEventSource.swift (100%) rename Sources/phbar/Models/{Event => PHEvent}/PHEventSubscription.swift (100%) rename Sources/phbar/Models/{Event => PHEvent}/PHExternalEventSource.swift (100%) rename Sources/phbar/Models/{Event => PHEvent}/README.md (100%) rename Sources/phbar/Models/{Gesture => }/PHGesture.swift (100%) rename Sources/phbar/Models/{Gesture => PHGesture}/PHGestureEvent.swift (100%) rename Sources/phbar/Models/{Config => }/PHPaths.swift (100%) rename Sources/phbar/Models/{Theme => }/PHTheme.swift (100%) rename Sources/phbar/Models/{Theme/Extensions => PHTheme}/PHTheme+Loading.swift (100%) rename Sources/phbar/Models/{Theme => PHTheme}/PHThemeStyle.swift (72%) rename Sources/phbar/Models/{Theme/PHThemeColor.swift => PHTheme/PHThemeStyle/PHThemeStyleColor.swift} (89%) rename Sources/phbar/Models/{Theme/PHThemePadding.swift => PHTheme/PHThemeStyle/PHThemeStylePadding.swift} (78%) rename Sources/phbar/Models/{Theme/Text => PHTheme}/PHThemeText.swift (100%) rename Sources/phbar/Models/{Theme/Text => PHTheme/PHThemeText}/PHThemeTextStyle.swift (100%) rename Sources/phbar/Models/{Theme/Text => PHTheme/PHThemeText}/PHThemeTextWeight.swift (100%) rename Sources/phbar/Models/{Theme => PHTheme}/PHThemeWindow.swift (79%) rename Sources/phbar/Models/{Theme/PHThemeAnchor.swift => PHTheme/PHThemeWindow/PHThemeWindowAnchor.swift} (91%) rename Sources/phbar/Models/{Theme/PHThemeDimension.swift => PHTheme/PHThemeWindow/PHThemeWindowDimension.swift} (96%) rename Sources/phbar/Models/{Theme/PHThemeMargin.swift => PHTheme/PHThemeWindow/PHThemeWindowMargin.swift} (91%) rename Sources/phbar/Models/{Theme/PHThemePoint.swift => PHTheme/PHThemeWindow/PHThemeWindowPoint.swift} (81%) rename Sources/phbar/Models/{Theme => PHTheme}/theme.toml (100%) diff --git a/Package.swift b/Package.swift index f9aa604..b24140d 100644 --- a/Package.swift +++ b/Package.swift @@ -32,11 +32,11 @@ let package = Package( .target(name: "phbarEvents"), ], exclude: [ - "Models/Event/README.md" + "Models/PHEvent/README.md" ], resources: [ - .process("Models/Config/config.toml"), - .process("Models/Theme/theme.toml"), + .process("Models/PHConfig/config.toml"), + .process("Models/PHTheme/theme.toml"), ] ), .testTarget( diff --git a/Sources/phbar/Models/Block/PHBlock.swift b/Sources/phbar/Models/PHBlock.swift similarity index 100% rename from Sources/phbar/Models/Block/PHBlock.swift rename to Sources/phbar/Models/PHBlock.swift diff --git a/Sources/phbar/Models/Block/Extensions/PHBlock+Loading.swift b/Sources/phbar/Models/PHBlock/PHBlock+Loading.swift similarity index 100% rename from Sources/phbar/Models/Block/Extensions/PHBlock+Loading.swift rename to Sources/phbar/Models/PHBlock/PHBlock+Loading.swift diff --git a/Sources/phbar/Models/Block/Extensions/PHBlock+Refresh.swift b/Sources/phbar/Models/PHBlock/PHBlock+Refresh.swift similarity index 100% rename from Sources/phbar/Models/Block/Extensions/PHBlock+Refresh.swift rename to Sources/phbar/Models/PHBlock/PHBlock+Refresh.swift diff --git a/Sources/phbar/Models/Block/PHBlockKind.swift b/Sources/phbar/Models/PHBlock/PHBlockKind.swift similarity index 100% rename from Sources/phbar/Models/Block/PHBlockKind.swift rename to Sources/phbar/Models/PHBlock/PHBlockKind.swift diff --git a/Sources/phbar/Models/Config/PHConfig.swift b/Sources/phbar/Models/PHConfig.swift similarity index 100% rename from Sources/phbar/Models/Config/PHConfig.swift rename to Sources/phbar/Models/PHConfig.swift diff --git a/Sources/phbar/Models/Config/Extensions/PHConfig+Loading.swift b/Sources/phbar/Models/PHConfig/PHConfig+Loading.swift similarity index 100% rename from Sources/phbar/Models/Config/Extensions/PHConfig+Loading.swift rename to Sources/phbar/Models/PHConfig/PHConfig+Loading.swift diff --git a/Sources/phbar/Models/Config/Extensions/PHConfig+Screen.swift b/Sources/phbar/Models/PHConfig/PHConfig+Screen.swift similarity index 100% rename from Sources/phbar/Models/Config/Extensions/PHConfig+Screen.swift rename to Sources/phbar/Models/PHConfig/PHConfig+Screen.swift diff --git a/Sources/phbar/Models/Config/config.toml b/Sources/phbar/Models/PHConfig/config.toml similarity index 100% rename from Sources/phbar/Models/Config/config.toml rename to Sources/phbar/Models/PHConfig/config.toml diff --git a/Sources/phbar/Models/Event/PHEvent.swift b/Sources/phbar/Models/PHEvent.swift similarity index 100% rename from Sources/phbar/Models/Event/PHEvent.swift rename to Sources/phbar/Models/PHEvent.swift diff --git a/Sources/phbar/Models/Event/PHEventLoader.swift b/Sources/phbar/Models/PHEvent/PHEventLoader.swift similarity index 100% rename from Sources/phbar/Models/Event/PHEventLoader.swift rename to Sources/phbar/Models/PHEvent/PHEventLoader.swift diff --git a/Sources/phbar/Models/Event/PHEventManifest.swift b/Sources/phbar/Models/PHEvent/PHEventManifest.swift similarity index 100% rename from Sources/phbar/Models/Event/PHEventManifest.swift rename to Sources/phbar/Models/PHEvent/PHEventManifest.swift diff --git a/Sources/phbar/Models/Event/PHEventRegistry.swift b/Sources/phbar/Models/PHEvent/PHEventRegistry.swift similarity index 100% rename from Sources/phbar/Models/Event/PHEventRegistry.swift rename to Sources/phbar/Models/PHEvent/PHEventRegistry.swift diff --git a/Sources/phbar/Models/Event/PHEventSource.swift b/Sources/phbar/Models/PHEvent/PHEventSource.swift similarity index 100% rename from Sources/phbar/Models/Event/PHEventSource.swift rename to Sources/phbar/Models/PHEvent/PHEventSource.swift diff --git a/Sources/phbar/Models/Event/PHEventSubscription.swift b/Sources/phbar/Models/PHEvent/PHEventSubscription.swift similarity index 100% rename from Sources/phbar/Models/Event/PHEventSubscription.swift rename to Sources/phbar/Models/PHEvent/PHEventSubscription.swift diff --git a/Sources/phbar/Models/Event/PHExternalEventSource.swift b/Sources/phbar/Models/PHEvent/PHExternalEventSource.swift similarity index 100% rename from Sources/phbar/Models/Event/PHExternalEventSource.swift rename to Sources/phbar/Models/PHEvent/PHExternalEventSource.swift diff --git a/Sources/phbar/Models/Event/README.md b/Sources/phbar/Models/PHEvent/README.md similarity index 100% rename from Sources/phbar/Models/Event/README.md rename to Sources/phbar/Models/PHEvent/README.md diff --git a/Sources/phbar/Models/Gesture/PHGesture.swift b/Sources/phbar/Models/PHGesture.swift similarity index 100% rename from Sources/phbar/Models/Gesture/PHGesture.swift rename to Sources/phbar/Models/PHGesture.swift diff --git a/Sources/phbar/Models/Gesture/PHGestureEvent.swift b/Sources/phbar/Models/PHGesture/PHGestureEvent.swift similarity index 100% rename from Sources/phbar/Models/Gesture/PHGestureEvent.swift rename to Sources/phbar/Models/PHGesture/PHGestureEvent.swift diff --git a/Sources/phbar/Models/Config/PHPaths.swift b/Sources/phbar/Models/PHPaths.swift similarity index 100% rename from Sources/phbar/Models/Config/PHPaths.swift rename to Sources/phbar/Models/PHPaths.swift diff --git a/Sources/phbar/Models/Theme/PHTheme.swift b/Sources/phbar/Models/PHTheme.swift similarity index 100% rename from Sources/phbar/Models/Theme/PHTheme.swift rename to Sources/phbar/Models/PHTheme.swift diff --git a/Sources/phbar/Models/Theme/Extensions/PHTheme+Loading.swift b/Sources/phbar/Models/PHTheme/PHTheme+Loading.swift similarity index 100% rename from Sources/phbar/Models/Theme/Extensions/PHTheme+Loading.swift rename to Sources/phbar/Models/PHTheme/PHTheme+Loading.swift diff --git a/Sources/phbar/Models/Theme/PHThemeStyle.swift b/Sources/phbar/Models/PHTheme/PHThemeStyle.swift similarity index 72% rename from Sources/phbar/Models/Theme/PHThemeStyle.swift rename to Sources/phbar/Models/PHTheme/PHThemeStyle.swift index 8c44608..9f51b5b 100644 --- a/Sources/phbar/Models/Theme/PHThemeStyle.swift +++ b/Sources/phbar/Models/PHTheme/PHThemeStyle.swift @@ -1,8 +1,8 @@ struct PHThemeStyle: Decodable { let name: String - let foreground: PHThemeColor? - let background: PHThemeColor? - let padding: PHThemePadding? + let foreground: PHThemeStyleColor? + let background: PHThemeStyleColor? + let padding: PHThemeStylePadding? static let `default`: Self = { PHThemeStyle( diff --git a/Sources/phbar/Models/Theme/PHThemeColor.swift b/Sources/phbar/Models/PHTheme/PHThemeStyle/PHThemeStyleColor.swift similarity index 89% rename from Sources/phbar/Models/Theme/PHThemeColor.swift rename to Sources/phbar/Models/PHTheme/PHThemeStyle/PHThemeStyleColor.swift index 1e1c90f..9117d22 100644 --- a/Sources/phbar/Models/Theme/PHThemeColor.swift +++ b/Sources/phbar/Models/PHTheme/PHThemeStyle/PHThemeStyleColor.swift @@ -1,6 +1,6 @@ import SwiftUI -struct PHThemeColor: Decodable, ShapeStyle { +struct PHThemeStyleColor: Decodable, ShapeStyle { typealias Resolved = SwiftUI.Color let color: String diff --git a/Sources/phbar/Models/Theme/PHThemePadding.swift b/Sources/phbar/Models/PHTheme/PHThemeStyle/PHThemeStylePadding.swift similarity index 78% rename from Sources/phbar/Models/Theme/PHThemePadding.swift rename to Sources/phbar/Models/PHTheme/PHThemeStyle/PHThemeStylePadding.swift index c26c676..3fd8219 100644 --- a/Sources/phbar/Models/Theme/PHThemePadding.swift +++ b/Sources/phbar/Models/PHTheme/PHThemeStyle/PHThemeStylePadding.swift @@ -1,4 +1,4 @@ -struct PHThemePadding: Decodable { +struct PHThemeStylePadding: Decodable { let trailing: Double? let leading: Double? diff --git a/Sources/phbar/Models/Theme/Text/PHThemeText.swift b/Sources/phbar/Models/PHTheme/PHThemeText.swift similarity index 100% rename from Sources/phbar/Models/Theme/Text/PHThemeText.swift rename to Sources/phbar/Models/PHTheme/PHThemeText.swift diff --git a/Sources/phbar/Models/Theme/Text/PHThemeTextStyle.swift b/Sources/phbar/Models/PHTheme/PHThemeText/PHThemeTextStyle.swift similarity index 100% rename from Sources/phbar/Models/Theme/Text/PHThemeTextStyle.swift rename to Sources/phbar/Models/PHTheme/PHThemeText/PHThemeTextStyle.swift diff --git a/Sources/phbar/Models/Theme/Text/PHThemeTextWeight.swift b/Sources/phbar/Models/PHTheme/PHThemeText/PHThemeTextWeight.swift similarity index 100% rename from Sources/phbar/Models/Theme/Text/PHThemeTextWeight.swift rename to Sources/phbar/Models/PHTheme/PHThemeText/PHThemeTextWeight.swift diff --git a/Sources/phbar/Models/Theme/PHThemeWindow.swift b/Sources/phbar/Models/PHTheme/PHThemeWindow.swift similarity index 79% rename from Sources/phbar/Models/Theme/PHThemeWindow.swift rename to Sources/phbar/Models/PHTheme/PHThemeWindow.swift index e9c80c2..413210f 100644 --- a/Sources/phbar/Models/Theme/PHThemeWindow.swift +++ b/Sources/phbar/Models/PHTheme/PHThemeWindow.swift @@ -8,13 +8,13 @@ struct PHThemeWindow: Decodable { /// Window height in points. var height: Double? = 30 /// Window width: a point value or a percentage of the screen width. - var width: PHThemeDimension? = .percentage(1.0) + var width: PHThemeWindowDimension? = .percentage(1.0) /// Semantic placement within the screen. - var anchor: PHThemeAnchor? = .top + var anchor: PHThemeWindowAnchor? = .top /// Insets from the anchored edges. - var margin: PHThemeMargin? = .init() + var margin: PHThemeWindowMargin? = .init() /// Absolute origin. Overrides `anchor` and `margin` when set. - var origin: PHThemePoint? + var origin: PHThemeWindowPoint? private enum CodingKeys: String, CodingKey { case name diff --git a/Sources/phbar/Models/Theme/PHThemeAnchor.swift b/Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowAnchor.swift similarity index 91% rename from Sources/phbar/Models/Theme/PHThemeAnchor.swift rename to Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowAnchor.swift index 5b51c2e..78aa1df 100644 --- a/Sources/phbar/Models/Theme/PHThemeAnchor.swift +++ b/Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowAnchor.swift @@ -6,7 +6,7 @@ import Foundation /// Single-edge anchors (`top`, `bottom`, `leading`, `trailing`) pin to that /// edge and center along the opposite axis. Corner anchors pin to two edges. /// `center` centers the window on both axes. -enum PHThemeAnchor: String, Decodable { +enum PHThemeWindowAnchor: String, Decodable { case top, bottom, leading, trailing case topLeading = "top-leading" case topTrailing = "top-trailing" @@ -15,14 +15,14 @@ enum PHThemeAnchor: String, Decodable { case center } -extension PHThemeAnchor { +extension PHThemeWindowAnchor { /// Compute the top-left origin (in screen coordinates) of a window of `size` /// placed against this anchor within `screen`, offset by `margin` along the /// anchored edges. /// /// Edges the anchor does not reference are ignored, so margins only affect /// the relevant sides. - func origin(in screen: CGRect, size: CGSize, margin: PHThemeMargin) -> CGPoint { + func origin(in screen: CGRect, size: CGSize, margin: PHThemeWindowMargin) -> CGPoint { let top = margin.top ?? 0 let bottom = margin.bottom ?? 0 let leading = margin.leading ?? 0 diff --git a/Sources/phbar/Models/Theme/PHThemeDimension.swift b/Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowDimension.swift similarity index 96% rename from Sources/phbar/Models/Theme/PHThemeDimension.swift rename to Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowDimension.swift index 67babe1..27e8a6a 100644 --- a/Sources/phbar/Models/Theme/PHThemeDimension.swift +++ b/Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowDimension.swift @@ -6,7 +6,7 @@ import Foundation /// /// Decoded from either a number (`width = 400`) or a percentage string /// (`width = "100%"`). -enum PHThemeDimension: Decodable, Equatable { +enum PHThemeWindowDimension: Decodable, Equatable { case points(Double) case percentage(Double) diff --git a/Sources/phbar/Models/Theme/PHThemeMargin.swift b/Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowMargin.swift similarity index 91% rename from Sources/phbar/Models/Theme/PHThemeMargin.swift rename to Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowMargin.swift index 58471b5..d10afca 100644 --- a/Sources/phbar/Models/Theme/PHThemeMargin.swift +++ b/Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowMargin.swift @@ -4,7 +4,7 @@ import Foundation /// /// Only the edges referenced by the anchor are consumed; the rest are ignored, /// so a margin only affects the relevant sides of the placement. -struct PHThemeMargin: Decodable, Equatable { +struct PHThemeWindowMargin: Decodable, Equatable { let top: Double? let bottom: Double? let leading: Double? diff --git a/Sources/phbar/Models/Theme/PHThemePoint.swift b/Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowPoint.swift similarity index 81% rename from Sources/phbar/Models/Theme/PHThemePoint.swift rename to Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowPoint.swift index 1228896..977e6ee 100644 --- a/Sources/phbar/Models/Theme/PHThemePoint.swift +++ b/Sources/phbar/Models/PHTheme/PHThemeWindow/PHThemeWindowPoint.swift @@ -4,7 +4,7 @@ import Foundation /// /// When set on a window, it overrides anchor/margin placement entirely — the /// window appears at exactly these coordinates. -struct PHThemePoint: Decodable, Equatable { +struct PHThemeWindowPoint: Decodable, Equatable { let x: Double let y: Double } diff --git a/Sources/phbar/Models/Theme/theme.toml b/Sources/phbar/Models/PHTheme/theme.toml similarity index 100% rename from Sources/phbar/Models/Theme/theme.toml rename to Sources/phbar/Models/PHTheme/theme.toml diff --git a/Tests/phbarTests/phbarTests.swift b/Tests/phbarTests/phbarTests.swift index a9f4bc6..08e8852 100644 --- a/Tests/phbarTests/phbarTests.swift +++ b/Tests/phbarTests/phbarTests.swift @@ -456,7 +456,7 @@ private final class FakeEventSource: PHEventSource { // MARK: - PHThemeDimension private struct DimensionWrapper: Decodable { - let v: PHThemeDimension + let v: PHThemeWindowDimension } @Test func dimensionDecodesPoints() throws { @@ -479,8 +479,8 @@ private struct DimensionWrapper: Decodable { } @Test func dimensionResolvesAgainstLength() { - #expect(PHThemeDimension.points(250).resolve(against: 1000) == 250) - #expect(PHThemeDimension.percentage(0.25).resolve(against: 1000) == 250) + #expect(PHThemeWindowDimension.points(250).resolve(against: 1000) == 250) + #expect(PHThemeWindowDimension.percentage(0.25).resolve(against: 1000) == 250) } // MARK: - PHThemeAnchor geometry @@ -488,21 +488,21 @@ private struct DimensionWrapper: Decodable { @Test func anchorPlacesAtTopEdge() { let screen = CGRect(x: 0, y: 0, width: 1000, height: 800) let size = CGSize(width: 1000, height: 30) - let origin = PHThemeAnchor.top.origin(in: screen, size: size, margin: .init()) + let origin = PHThemeWindowAnchor.top.origin(in: screen, size: size, margin: .init()) #expect(origin == CGPoint(x: 0, y: 770)) } @Test func anchorRespectsTopMargin() { let screen = CGRect(x: 0, y: 0, width: 1000, height: 800) let size = CGSize(width: 1000, height: 30) - let origin = PHThemeAnchor.top.origin(in: screen, size: size, margin: .init(top: 10)) + let origin = PHThemeWindowAnchor.top.origin(in: screen, size: size, margin: .init(top: 10)) #expect(origin == CGPoint(x: 0, y: 760)) } @Test func anchorPlacesBottomLeadingCorner() { let screen = CGRect(x: 0, y: 0, width: 1000, height: 800) let size = CGSize(width: 200, height: 40) - let origin = PHThemeAnchor.bottomLeading.origin( + let origin = PHThemeWindowAnchor.bottomLeading.origin( in: screen, size: size, margin: .init(bottom: 8, leading: 12) ) #expect(origin == CGPoint(x: 12, y: 8)) @@ -511,7 +511,7 @@ private struct DimensionWrapper: Decodable { @Test func anchorTrailingCentersVertically() { let screen = CGRect(x: 0, y: 0, width: 1000, height: 800) let size = CGSize(width: 200, height: 40) - let origin = PHThemeAnchor.trailing.origin( + let origin = PHThemeWindowAnchor.trailing.origin( in: screen, size: size, margin: .init(trailing: 20) ) #expect(origin == CGPoint(x: 780, y: 380)) @@ -520,7 +520,7 @@ private struct DimensionWrapper: Decodable { @Test func anchorCentersOnBothAxesIgnoringMargin() { let screen = CGRect(x: 0, y: 0, width: 1000, height: 800) let size = CGSize(width: 200, height: 40) - let origin = PHThemeAnchor.center.origin(in: screen, size: size, margin: .init(top: 999)) + let origin = PHThemeWindowAnchor.center.origin(in: screen, size: size, margin: .init(top: 999)) #expect(origin == CGPoint(x: 400, y: 380)) } @@ -641,7 +641,7 @@ private func makeBlocksConfigDir() throws -> URL { @Test func computeFrameUsesAbsoluteOriginOverAnchor() throws { let screen = try #require(NSScreen.main) let theme = PHTheme( - windows: [PHThemeWindow(name: "abs", anchor: .bottom, origin: PHThemePoint(x: 100, y: 200))], + windows: [PHThemeWindow(name: "abs", anchor: .bottom, origin: PHThemeWindowPoint(x: 100, y: 200))], texts: nil, styles: nil )