diff --git a/CHANGELOG.md b/CHANGELOG.md index a4dae12..7dfea10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ All notable changes to PatternSpaceSDK will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project follows semantic versioning. +## [0.6.0] - 2026-06-17 + +### Added +- Preset ID constants for three Linear HDR presets: `extLinearSRGBHDR`, `linearHDRP3D65`, `linearHDRBT2020` +- `OutputColorPresetFamily.linearHDR` convenience constant for clients reading Linear HDR preset metadata + +### Changed +- `PatternSpaceProtocolMetadata.sdkVersion` is now `0.6.0`; PatternSpace JSON protocol remains `1.2` +- Protocol documentation and README examples now describe Linear HDR presets and Peak White gating semantics + ## [0.5.1] - 2026-06-17 ### Added diff --git a/Documentation/Protocol.md b/Documentation/Protocol.md index a7e36d3..73b30f1 100644 --- a/Documentation/Protocol.md +++ b/Documentation/Protocol.md @@ -58,7 +58,7 @@ Returns protocol, app, SDK, route, feature, platform, and auth metadata. Integra "result": { "protocolVersion": "1.2", "app": { "name": "PatternSpace", "version": "1.2.0", "build": "1" }, - "sdkVersion": "0.5.1", + "sdkVersion": "0.6.0", "platform": "macOS", "authRequired": true, "namespaces": { @@ -202,10 +202,10 @@ Returns display inventory and selected display metadata. "peakWhite": 4.0, "effectivePeakWhite": 2.0, "peakWhiteRange": { "minimum": 0.25, "maximum": 4.0 }, - "supportsPeakWhiteControl": true, + "supportsPeakWhiteControl": false, "displayProfileResolved": true, "outputColorPresetId": "deviceNative", - "supportedOutputColorPresetIds": ["deviceNative", "managedSRGB", "managedDisplayP3", "managedRec2020", "hdrP3D65PQ", "hdrBT2020PQ"], + "supportedOutputColorPresetIds": ["deviceNative", "sdrReferenceSRGB", "hdrP3D65PQ", "hdrBT2020PQ", "extLinearSRGBHDR", "linearHDRP3D65", "linearHDRBT2020"], "outputColorPresetImplementationStatus": "native" } ] @@ -251,7 +251,9 @@ Other display errors include `displayNotFound` (`-32007`) and `notAuthorized` (` ### Output Color Preset Catalog -Output presets replace the old closed color-management mode API. The SDK defines convenience constants for known preset IDs, but IDs and metadata vocabularies are open strings. Adding a host preset should not require an SDK update. SDK `0.5.1` includes convenience constants for the Phase 3 SDR reference vocabulary, including P3-D65 gamma 2.2/2.4/2.6 and the open-string `proPhotoROMM` transfer/input encoding token. +Output presets replace the old closed color-management mode API. The SDK defines convenience constants for known preset IDs, but IDs and metadata vocabularies are open strings. Adding a host preset should not require an SDK update. SDK `0.6.0` includes convenience constants for SDR Reference, HDR PQ, and Linear HDR presets, including `extLinearSRGBHDR`, `linearHDRP3D65`, and `linearHDRBT2020`. + +Remote patches follow the active preset's input encoding exactly: SDR Reference decodes the configured transfer function, HDR PQ decodes normalized PQ signals, Linear HDR treats values as linear light, and Device Native passes values through raw. Built-in PatternSpace Library patterns are generated internally in linear light. They use the active preset's output color space when applicable, and Linear HDR presets apply Peak White. HDR PQ presets do not make Library patterns PQ-encoded; use HDR PQ when an external measurement workflow sends PQ patch values. `catalogRevision` is an opaque cache token sourced from the host catalog. It is identical across `display.listOutputColorPresets` and `display.getOutputColorPreset` while the catalog is unchanged, and it changes whenever the preset set, summary metadata, or full config for any preset changes. Clients may cache full configs by `(presetId, catalogRevision)`. @@ -273,7 +275,7 @@ Returns lightweight preset summaries for UI/discovery. "displayId": "69734272", "selectedPresetId": "hdrBT2020PQ", "scope": "host", - "catalogRevision": "2026-06-16.1", + "catalogRevision": "2026-06-17.1", "presets": [ { "id": "hdrBT2020PQ", @@ -308,7 +310,7 @@ Returns the full self-describing config for a known preset. "id": 12, "result": { "displayId": "69734272", - "catalogRevision": "2026-06-16.1", + "catalogRevision": "2026-06-17.1", "preset": { "id": "hdrBT2020PQ", "label": "BT.2020 PQ", @@ -371,9 +373,9 @@ Sets the host-global output color preset and returns the selected display that a "peakWhite": 3.0, "effectivePeakWhite": 2.0, "peakWhiteRange": { "minimum": 0.25, "maximum": 4.0 }, - "supportsPeakWhiteControl": true, + "supportsPeakWhiteControl": false, "outputColorPresetId": "hdrBT2020PQ", - "supportedOutputColorPresetIds": ["deviceNative", "managedSRGB", "managedDisplayP3", "managedRec2020", "hdrP3D65PQ", "hdrBT2020PQ"], + "supportedOutputColorPresetIds": ["deviceNative", "sdrReferenceSRGB", "hdrP3D65PQ", "hdrBT2020PQ", "extLinearSRGBHDR", "linearHDRP3D65", "linearHDRBT2020"], "outputColorPresetImplementationStatus": "native" } } diff --git a/README.md b/README.md index c7e9efc..79ca865 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ let package = Package( name: "MyTool", platforms: [.macOS(.v12), .iOS(.v15)], dependencies: [ - .package(url: "https://github.com/caplaz/PatternSpaceSDK.git", from: "0.5.1") + .package(url: "https://github.com/caplaz/PatternSpaceSDK.git", from: "0.6.0") ], targets: [ .executableTarget( @@ -207,10 +207,10 @@ final class Delegate: PatternSpaceServerDelegate { peakWhite: 2.0, effectivePeakWhite: 2.0, peakWhiteRange: PeakWhiteRange(maximum: 4.0), - supportsPeakWhiteControl: true, + supportsPeakWhiteControl: false, displayProfileResolved: true, outputColorPresetId: .deviceNative, - supportedOutputColorPresetIds: [.deviceNative, .managedSRGB, .managedDisplayP3, .managedRec2020], + supportedOutputColorPresetIds: [.deviceNative, .sdrReferenceSRGB, .hdrP3D65PQ, .extLinearSRGBHDR], outputColorPresetImplementationStatus: "native" ) ] @@ -246,10 +246,10 @@ final class Delegate: PatternSpaceServerDelegate { peakWhite: params.peakWhite, effectivePeakWhite: min(params.peakWhite, 2.0), peakWhiteRange: PeakWhiteRange(maximum: 4.0), - supportsPeakWhiteControl: true, + supportsPeakWhiteControl: false, displayProfileResolved: true, outputColorPresetId: .deviceNative, - supportedOutputColorPresetIds: [.deviceNative, .managedSRGB, .managedDisplayP3, .managedRec2020], + supportedOutputColorPresetIds: [.deviceNative, .sdrReferenceSRGB, .hdrP3D65PQ, .extLinearSRGBHDR], outputColorPresetImplementationStatus: "native" ) } @@ -262,7 +262,7 @@ final class Delegate: PatternSpaceServerDelegate { displayId: displayId, selectedPresetId: .deviceNative, scope: .host, - catalogRevision: "2026-06-16.1", + catalogRevision: "2026-06-17.1", presets: [ OutputColorPresetSummary( id: .deviceNative, @@ -274,10 +274,10 @@ final class Delegate: PatternSpaceServerDelegate { implementationStatus: .native ), OutputColorPresetSummary( - id: .managedDisplayP3, - label: "Managed Display P3", - group: "managed", - family: .sdrReference, + id: .extLinearSRGBHDR, + label: "Extended Linear sRGB HDR", + group: "linearHDR", + family: .linearHDR, supported: true, requiresPro: true, implementationStatus: .native @@ -292,7 +292,7 @@ final class Delegate: PatternSpaceServerDelegate { } return GetOutputColorPresetResult( displayId: params.displayId, - catalogRevision: "2026-06-16.1", + catalogRevision: "2026-06-17.1", preset: OutputColorPresetConfig( id: params.presetId, label: "Device Native", diff --git a/Sources/PatternSpaceSDKCore/Models/OutputColorPresetSchemas.swift b/Sources/PatternSpaceSDKCore/Models/OutputColorPresetSchemas.swift index b81a72b..12ba883 100644 --- a/Sources/PatternSpaceSDKCore/Models/OutputColorPresetSchemas.swift +++ b/Sources/PatternSpaceSDKCore/Models/OutputColorPresetSchemas.swift @@ -33,6 +33,9 @@ public extension OutputColorPresetID { static let managedRec2020 = Self(rawValue: "managedRec2020") static let hdrP3D65PQ = Self(rawValue: "hdrP3D65PQ") static let hdrBT2020PQ = Self(rawValue: "hdrBT2020PQ") + static let extLinearSRGBHDR = Self(rawValue: "extLinearSRGBHDR") + static let linearHDRP3D65 = Self(rawValue: "linearHDRP3D65") + static let linearHDRBT2020 = Self(rawValue: "linearHDRBT2020") static let sdrReferenceSRGB = Self(rawValue: "sdrReferenceSRGB") static let sdrReferenceAdobeRGB1998 = Self(rawValue: "sdrReferenceAdobeRGB1998") @@ -90,6 +93,7 @@ public extension OutputColorPresetFamily { static let device = Self(rawValue: "device") static let sdrReference = Self(rawValue: "sdrReference") static let hdrReference = Self(rawValue: "hdrReference") + static let linearHDR = Self(rawValue: "linearHDR") } public struct OutputColorPresetGamut: OutputColorPresetOpenStringValue { diff --git a/Sources/PatternSpaceSDKCore/Models/ProtocolMetadata.swift b/Sources/PatternSpaceSDKCore/Models/ProtocolMetadata.swift index 258e2e1..b94bc21 100644 --- a/Sources/PatternSpaceSDKCore/Models/ProtocolMetadata.swift +++ b/Sources/PatternSpaceSDKCore/Models/ProtocolMetadata.swift @@ -6,5 +6,5 @@ public enum PatternSpaceProtocolMetadata { public static let protocolVersion = "1.2" /// SDK package version exposing this protocol surface. - public static let sdkVersion = "0.5.1" + public static let sdkVersion = "0.6.0" } diff --git a/Tests/PatternSpaceSDKCoreTests/DeviceSchemasTests.swift b/Tests/PatternSpaceSDKCoreTests/DeviceSchemasTests.swift index cf10a8f..8c79266 100644 --- a/Tests/PatternSpaceSDKCoreTests/DeviceSchemasTests.swift +++ b/Tests/PatternSpaceSDKCoreTests/DeviceSchemasTests.swift @@ -48,7 +48,7 @@ import Foundation "connectedClientCount":1, "appVersion":"1.1.0", "buildNumber":"123", - "sdkVersion":"0.5.1", + "sdkVersion":"0.6.0", "protocolVersion":"1.2", "outputColorPresetId":"hdrBT2020PQ", "outputColorPresetImplementationStatus":"native",