From dee4293ef582ebf4fb3f6f9a72ffff83c4efbe32 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Lapersonne Date: Tue, 17 Dec 2024 12:19:43 +0100 Subject: [PATCH] refactor(review): more rename from wrappers to providers (#79) Signed-off-by: Pierre-Yves Lapersonne --- CHANGELOG.md | 2 +- .../OUDSThemesOrange.md | 20 +++++++++---------- .../OUDSBorderSemanticTokensProvider.swift | 6 +++--- .../OUDSColorSemanticTokensProvider.swift | 6 +++--- .../OUDSElevationSemanticTokensProvider.swift | 6 +++--- .../OUDSFontSemanticTokensProvider.swift | 6 +++--- .../OUDSGridSemanticTokensProvider.swift | 6 +++--- .../OUDSOpacitySemanticTokensProvider.swift | 6 +++--- .../OUDSSizeSemanticTokensProvider.swift | 6 +++--- .../OUDSSpaceSemanticTokensProvider.swift | 6 +++--- .../SemanticTokensProviders+TypeAliases.swift | 10 +++++----- .../OUDSTokensSemantic.md | 12 +++++------ .../MultipleColorSemanticTokenTests.swift | 2 +- ...ipleElevationCompositeRawTokensTests.swift | 2 +- ...FontLetterSpacingSemanticTokensTests.swift | 2 +- ...pleFontLineHeightSemanticTokensTests.swift | 2 +- .../MultipleFontSizeSemanticTokensTests.swift | 2 +- .../MultipleSizeSemanticTokenTests.swift | 2 +- .../MultipleSpaceSemanticTokensTests.swift | 2 +- ...pleTypographyCompositeRawTokensTests.swift | 2 +- 20 files changed, 54 insertions(+), 54 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18448f9ab3..aee3195651 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- [Library] New architecture with tokens wrapper ([#79](https://github.com/Orange-OpenSource/ouds-ios/issues/79)) +- [Library] New architecture with tokens provider ([#79](https://github.com/Orange-OpenSource/ouds-ios/issues/79)) - [DemoApp] Prepare new architecture to add components illustration ([#328](https://github.com/Orange-OpenSource/ouds-ios/issues/328)) ### Changed diff --git a/OUDS/Core/Themes/Orange/Sources/_OUDSThemesOrange.docc/OUDSThemesOrange.md b/OUDS/Core/Themes/Orange/Sources/_OUDSThemesOrange.docc/OUDSThemesOrange.md index d92f6aac81..f9efbf15e4 100644 --- a/OUDS/Core/Themes/Orange/Sources/_OUDSThemesOrange.docc/OUDSThemesOrange.md +++ b/OUDS/Core/Themes/Orange/Sources/_OUDSThemesOrange.docc/OUDSThemesOrange.md @@ -64,7 +64,7 @@ You can enrich the ``OrangeTheme`` by subclassing it or by overriding some token You may want to define your own theme, thus you can override the ``OrangeTheme`` with your own class or just override the providers. -You will have to override the tokens wrapper you need. To do that, make a subclass of the wrapper you target: +You will have to override the tokens provider you need. To do that, make a subclass of the provider you target: - spaces tokens are `OUDSSpaceSemanticTokensProvider` - sizes tokens are in `OUDSSizeSemanticTokensProvider` - colors tokens are all defined in `OrangeThemeColorSemanticTokensProvider` @@ -78,7 +78,7 @@ You will have to override the tokens wrapper you need. To do that, make a subcla import OUDSTokensSemantic // To use semantic tokens if needed import OUDSTokensRaw // To use raw tokens if needed -// Token wrapper for spaces +// Token provider for spaces class YourAppThemeSpaceTokensProvider: OUDSSpaceSemanticTokensProvider { override var spaceFixedMedium: SpaceSemanticToken { @@ -89,7 +89,7 @@ class YourAppThemeSpaceTokensProvider: OUDSSpaceSemanticTokensProvider { } } -// Token wrapper for sizes +// Token provider for sizes class YourAppThemeSizeTokensProvider: OUDSSizeSemanticTokensProvider { override var sizeIconDecorative2xl: SizeSemanticToken { @@ -100,7 +100,7 @@ class YourAppThemeSizeTokensProvider: OUDSSizeSemanticTokensProvider { } } -// Token wrapper for colors +// Token provider for colors class YourAppThemeColorTokensProvider: OrangeThemeColorSemanticTokensProvider { override var colorBgSecondary: MultipleColorSemanticTokens { @@ -111,7 +111,7 @@ class YourAppThemeColorTokensProvider: OrangeThemeColorSemanticTokensProvider { } } -// Token wrapper for border +// Token provider for border class YourAppThemeBorderTokensProvider: OUDSBorderSemanticTokensProvider { override var borderStyleDefault: BorderStyleSemanticToken { @@ -125,7 +125,7 @@ class YourAppThemeBorderTokensProvider: OUDSBorderSemanticTokensProvider { } } -// Token wrapper for elevation +// Token provider for elevation class YourAppThemeElevationTokensProvider: OUDSElevationSemanticTokensProvider { override var elevationStickyEmphasized: ElevationCompositeSemanticToken { @@ -133,7 +133,7 @@ class YourAppThemeElevationTokensProvider: OUDSElevationSemanticTokensProvider { } } -// Token wrapper for opacity +// Token provider for opacity class YourAppThemeOpacityTokensProvider: OUDSOpacitySemanticTokensProvider { override var opacityStrong: OpacitySemanticToken { @@ -141,7 +141,7 @@ class YourAppThemeOpacityTokensProvider: OUDSOpacitySemanticTokensProvider { } } -// Token wrapper for grid +// Token provider for grid class YourAppThemeGridTokensProvider: OUDSGridSemanticTokensProvider { override var gridExtraCompactColumnGap: GridSemanticToken { @@ -155,7 +155,7 @@ class YourAppThemeGridTokensProvider: OUDSGridSemanticTokensProvider { } } -// Token wrapper for font +// Token provider for font class YourAppThemeFontTokensProvider: OUDSFontSemanticTokensProvider { override var typeDisplayLarge: MultipleFontCompositeRawTokens { @@ -209,7 +209,7 @@ struct YourApp: App { ### By overriding -Quite simple and similar to the previous solution, but give only the wrapper to the ``OrangeTheme``. +Quite simple and similar to the previous solution, but give only the provider to the ``OrangeTheme``. For example for colors: diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSBorderSemanticTokensProvider.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSBorderSemanticTokensProvider.swift index ad5f295748..09d1be6ea2 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSBorderSemanticTokensProvider.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSBorderSemanticTokensProvider.swift @@ -14,11 +14,11 @@ import OUDSFoundations /// A class which wraps all **border semantic tokens** and expose them. -/// This wrapper should be integrated as a ``AllBorderSemanticTokens`` implementation inside `OUDSTheme` so as to provide +/// This provider should be integrated as a ``AllBorderSemanticTokens`` implementation inside `OUDSTheme` so as to provide /// all tokens to the users. It helps users to override some of the tokens and assign them to an `OUDSTheme` implementation to use. /// /// ```swift -/// // Define your own wrapper for border semantic tokens +/// // Define your own provider for border semantic tokens /// class CustomBorderTokensProvider: OUDSBorderSemanticTokensProvider { /// /// // Then override the border semantic tokens you want, using the border raw tokens available @@ -53,7 +53,7 @@ import OUDSFoundations /// ``` open class OUDSBorderSemanticTokensProvider { - /// Intializes the wrapper + /// Intializes the provider public init() { OUDSLogger.debug("Init of OUDSBorderSemanticTokensProvider") } diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSColorSemanticTokensProvider.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSColorSemanticTokensProvider.swift index d8c8c310e6..179430c861 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSColorSemanticTokensProvider.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSColorSemanticTokensProvider.swift @@ -14,11 +14,11 @@ import OUDSFoundations /// A class which wraps all **color semantic tokens**, *multiple* or not, and expose them. -/// This wrapper should be integrated as a ``AllColorSemanticTokens`` implementation inside `OUDSTheme` so as to provide +/// This provider should be integrated as a ``AllColorSemanticTokens`` implementation inside `OUDSTheme` so as to provide /// all tokens to the users. It helps users to override some of the tokens and assign them to an `OUDSTheme` implementation to use. /// /// ```swift -/// // Define your own wrapper for color semantic tokens +/// // Define your own provider for color semantic tokens /// class CustomColorTokensProviderr: OUDSColorSemanticTokensProvider { /// /// // Then override the color semantic tokens you want, using the color raw tokens available @@ -51,7 +51,7 @@ import OUDSFoundations /// ``` open class OUDSColorSemanticTokensProvider { - /// Intializes the wrapper + /// Intializes the provider public init() { OUDSLogger.debug("Init of OUDSColorSemanticTokensProvider") } diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSElevationSemanticTokensProvider.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSElevationSemanticTokensProvider.swift index 9dc64ad42c..9e34fbd84f 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSElevationSemanticTokensProvider.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSElevationSemanticTokensProvider.swift @@ -14,11 +14,11 @@ import OUDSFoundations /// A class which wraps all **elevation semantic tokens**, *multiple*, *composite* or not, and expose them. -/// This wrapper should be integrated as a ``AllElevationSemanticTokens`` implementation inside `OUDSTheme` so as to provide +/// This provider should be integrated as a ``AllElevationSemanticTokens`` implementation inside `OUDSTheme` so as to provide /// all tokens to the users. It helps users to override some of the tokens and assign them to an `OUDSTheme` implementation to use. /// /// ```swift -/// // Define your own wrapper for elevation semantic tokens +/// // Define your own provider for elevation semantic tokens /// class CustomElevationTokensProvider: OUDSElevationSemanticTokensProvider { /// /// // Then override the elevation semantic tokens you want, using the elevation raw tokens available @@ -47,7 +47,7 @@ import OUDSFoundations /// ``` open class OUDSElevationSemanticTokensProvider { - /// Intializes the wrapper + /// Intializes the provider public init() { OUDSLogger.debug("Init of OUDSElevationSemanticTokensProvider") } diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSFontSemanticTokensProvider.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSFontSemanticTokensProvider.swift index d60f001448..42b9b3b604 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSFontSemanticTokensProvider.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSFontSemanticTokensProvider.swift @@ -14,11 +14,11 @@ import OUDSFoundations /// A class which wraps all **font semantic tokens**, *multiple*, *composite* or not, and expose them. -/// This wrapper should be integrated as a ``AllFontSemanticTokens`` implementation inside `OUDSTheme` so as to provide +/// This provider should be integrated as a ``AllFontSemanticTokens`` implementation inside `OUDSTheme` so as to provide /// all tokens to the users. It helps users to override some of the tokens and assign them to an `OUDSTheme` implementation to use. /// /// ```swift -/// // Define your own wrapper for font semantic tokens +/// // Define your own provider for font semantic tokens /// class CustomFontTokensProvider: OUDSFontSemanticTokensProvider { /// /// // Then override the font semantic tokens you want, using the font raw tokens available @@ -51,7 +51,7 @@ import OUDSFoundations /// ``` open class OUDSFontSemanticTokensProvider { - /// Intializes the wrapper + /// Intializes the provider public init() { OUDSLogger.debug("Init of OUDSFontSemanticTokensProvider") } diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSGridSemanticTokensProvider.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSGridSemanticTokensProvider.swift index ae55da5bcc..9862fe50a8 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSGridSemanticTokensProvider.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSGridSemanticTokensProvider.swift @@ -14,11 +14,11 @@ import OUDSFoundations /// A class which wraps all **grid semantic tokens** and expose them. -/// This wrapper should be integrated as a ``AllGridSemanticTokens`` implementation inside `OUDSTheme` so as to provide +/// This provider should be integrated as a ``AllGridSemanticTokens`` implementation inside `OUDSTheme` so as to provide /// all tokens to the users. It helps users to override some of the tokens and assign them to an `OUDSTheme` implementation to use. /// /// ```swift -/// // Define your own wrapper for grid semantic tokens +/// // Define your own provider for grid semantic tokens /// class CustomGridTokensProvider: OUDSGridSemanticTokensProvider { /// /// // Then override the grid semantic tokens you want, using the grid raw tokens available @@ -55,7 +55,7 @@ import OUDSFoundations /// ``` open class OUDSGridSemanticTokensProvider { - /// Intializes the wrapper + /// Intializes the provider public init() { OUDSLogger.debug("Init of OUDSGridSemanticTokensProvider") } diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSOpacitySemanticTokensProvider.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSOpacitySemanticTokensProvider.swift index 9be9399c10..7caff77f94 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSOpacitySemanticTokensProvider.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSOpacitySemanticTokensProvider.swift @@ -14,11 +14,11 @@ import OUDSFoundations /// A class which wraps all **opacity semantic tokens** and expose them. -/// This wrapper should be integrated as a ``AllOpacitySemanticTokens`` implementation inside `OUDSTheme` so as to provide +/// This provider should be integrated as a ``AllOpacitySemanticTokens`` implementation inside `OUDSTheme` so as to provide /// all tokens to the users. It helps users to override some of the tokens and assign them to an `OUDSTheme` implementation to use. /// /// ```swift -/// // Define your own wrapper for opacity semantic tokens +/// // Define your own provider for opacity semantic tokens /// class CustomOpacityTokensProvider: OUDSOpacitySemanticTokensProvider { /// /// // Then override the opacity semantic tokens you want, using the opacity raw tokens available @@ -47,7 +47,7 @@ import OUDSFoundations /// ``` open class OUDSOpacitySemanticTokensProvider { - /// Intializes the wrapper + /// Intializes the provider public init() { OUDSLogger.debug("Init of OUDSOpacitySemanticTokensProvider") } diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSSizeSemanticTokensProvider.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSSizeSemanticTokensProvider.swift index c791635ff8..933e424f43 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSSizeSemanticTokensProvider.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSSizeSemanticTokensProvider.swift @@ -14,11 +14,11 @@ import OUDSFoundations /// A class which wraps all **size semantic tokens**, *multiple* or not, and expose them. -/// This wrapper should be integrated as a ``AllSizeSemanticTokens`` implementation inside `OUDSTheme` so as to provide +/// This provider should be integrated as a ``AllSizeSemanticTokens`` implementation inside `OUDSTheme` so as to provide /// all tokens to the users. It helps users to override some of the tokens and assign them to an `OUDSTheme` implementation to use. /// /// ```swift -/// // Define your own wrapper for size semantic tokens +/// // Define your own provider for size semantic tokens /// class CustomSizeTokensProvider: OUDSSizeSemanticTokensProvider { /// /// // Then override the size semantic tokens you want, using the dimension raw tokens available @@ -51,7 +51,7 @@ import OUDSFoundations /// ``` open class OUDSSizeSemanticTokensProvider { - /// Intializes the wrapper + /// Intializes the provider public init() { OUDSLogger.debug("Init of OUDSSizeSemanticTokensProvider") } diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSSpaceSemanticTokensProvider.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSSpaceSemanticTokensProvider.swift index 27aab571cf..d4c88dffdb 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSSpaceSemanticTokensProvider.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/OUDSSpaceSemanticTokensProvider.swift @@ -14,11 +14,11 @@ import OUDSFoundations /// A class which wraps all **space semantic tokens**, *multiple* or not, and expose them. -/// This wrapper should be integrated as a ``AllSpaceSemanticTokens`` implementation inside `OUDSTheme` so as to provide +/// This provider should be integrated as a ``AllSpaceSemanticTokens`` implementation inside `OUDSTheme` so as to provide /// all tokens to the users. It helps users to override some of the tokens and assign them to an `OUDSTheme` implementation to use. /// /// ```swift -/// // Define your own wrapper for space semantic tokens +/// // Define your own provider for space semantic tokens /// class CustomSpaceTokensProvider: OUDSSpaceSemanticTokensProvider { /// /// // Then override the space semantic tokens you want, using the dimension raw tokens available @@ -51,7 +51,7 @@ import OUDSFoundations /// ``` open class OUDSSpaceSemanticTokensProvider { - /// Intializes the wrapper + /// Intializes the provider public init() { OUDSLogger.debug("Init of OUDSSpaceSemanticTokensProvider") } diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/SemanticTokensProviders+TypeAliases.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/SemanticTokensProviders+TypeAliases.swift index 6eec008dc1..730812a039 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/SemanticTokensProviders+TypeAliases.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Providers/SemanticTokensProviders+TypeAliases.swift @@ -27,26 +27,26 @@ public typealias AllOpacitySemanticTokens = OpacitySemanticTokens public typealias AllGridSemanticTokens = GridSemanticTokens /// A type alias which merges ``ColorSemanticTokens`` and ``ColorMultipleSemanticTokens``. -/// It helps in the end to define a wrapper for all the semantic tokens of colors, multiple or not, generated or not. +/// It helps in the end to define a provider for all the semantic tokens of colors, multiple or not, generated or not. /// For example ``OUDSColorSemanticTokensProvider`` matches this type alias. public typealias AllColorSemanticTokens = ColorSemanticTokens & ColorMultipleSemanticTokens /// A type alias which merges ``ElevationSemanticTokens``, ``ElevationCompositeSemanticTokens`` and ``ElevationMultipleSemanticTokens``. -/// It helps in the end to define a wrapper for all the semantic tokens of elevations, multiple or not, generated or not. +/// It helps in the end to define a provider for all the semantic tokens of elevations, multiple or not, generated or not. /// For example ``OUDSElevationSemanticTokensProvider`` matches this type alias. public typealias AllElevationSemanticTokens = ElevationSemanticTokens & ElevationCompositeSemanticTokens & ElevationMultipleSemanticTokens /// A type alias which merges ``FontSemanticTokens``, ``FontCompositeSemanticTokens`` and ``FontMultipleSemanticTokens``. -/// It helps in the end to define a wrapper for all the semantic tokens of fonts, multiple, composite, or not, generated or not. +/// It helps in the end to define a provider for all the semantic tokens of fonts, multiple, composite, or not, generated or not. /// For example ``OUDSFontSemanticTokensProvider`` matches this type alias. public typealias AllFontSemanticTokens = FontSemanticTokens & FontCompositeSemanticTokens & FontMultipleSemanticTokens /// A type alias which merges ``SizeSemanticTokens`` and ``SizeMultipleSemanticTokens``. -/// It helps in the end to define a wrapper for all the semantic tokens of size, multiple or not, generated or not. +/// It helps in the end to define a provider for all the semantic tokens of size, multiple or not, generated or not. /// For example ``OUDSSizeSemanticTokensProvider`` matches this type alias. public typealias AllSizeSemanticTokens = SizeSemanticTokens & SizeMultipleSemanticTokens /// A type alias which merges ``SpaceSemanticTokens`` and ``SpaceMultipleSemanticTokens``. -/// It helps in the end to define a wrapper for all the semantic tokens of space, multiple or not, generated or not. +/// It helps in the end to define a provider for all the semantic tokens of space, multiple or not, generated or not. /// For example ``OUDSSpaceSemanticTokensProvider`` matches this type alias. public typealias AllSpaceSemanticTokens = SpaceSemanticTokens & SpaceMultipleSemanticTokens diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/_OUDSTokensSemantic.docc/OUDSTokensSemantic.md b/OUDS/Core/Tokens/SemanticTokens/Sources/_OUDSTokensSemantic.docc/OUDSTokensSemantic.md index 5d628f6f02..ac55faa5ab 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/_OUDSTokensSemantic.docc/OUDSTokensSemantic.md +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/_OUDSTokensSemantic.docc/OUDSTokensSemantic.md @@ -26,10 +26,10 @@ protocol ColorSemanticTokens { // ... } -// Ensure you have a wrapper +// Ensure you have a provider open class OUDSColorSemanticTokensProvider { } -// Define the semantic tokens to expose through the theme thanks to the wrapper +// Define the semantic tokens to expose through the theme thanks to the provider extension OUDSColorSemanticTokensProvider: ColorSemanticTokens { // Color is available in the module of OUDSTheme @@ -75,10 +75,10 @@ public protocol ColorMultipleSemanticTokens { ... } // These protoocols are merged in type aliase public typealias AllColorSemanticTokens = ColorSemanticTokens & ColorMultipleSemanticTokens -// For example, the wrapper for the colors basically is: +// For example, the provider for the colors basically is: open class OUDSColorSemanticTokensProvider { ... } -// The wrapper is composed by protocols containing tokens +// The provider is composed by protocols containing tokens extension OUDSColorSemanticTokensProvider: ColorSemanticTokens { @objc open var colorOpacityInvisibleBlackLight: ColorSemanticToken { ColorRawTokens.colorOpacityBlack0 } @objc open var colorOpacityInvisibleWhiteLight: ColorSemanticToken { ColorRawTokens.colorOpacityWhite0 } @@ -87,12 +87,12 @@ extension OUDSColorSemanticTokensProvider: ColorMultipleSemanticTokens { @objc open var colorOpacityInvisibleBlack: MultipleColorSemanticTokens { MultipleColorSemanticTokens(light: colorOpacityInvisibleBlackLight, dark: colorOpacityInvisibleBlackDark) } } -// The "abstract" object of theme expose the wrapper through this subset of protocols +// The "abstract" object of theme expose the provider through this subset of protocols open class OUDSTheme: @unchecked Sendable { public let colors: AllColorSemanticTokens } -// And finaly, the default theme, which can be subclassed, exposes the tokens through the wrapper +// And finaly, the default theme, which can be subclassed, exposes the tokens through the provider open class OrangeTheme: OUDSTheme, @unchecked Sendable { ... } theme.colors.colorOpacityInvisibleBlack diff --git a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleColorSemanticTokenTests.swift b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleColorSemanticTokenTests.swift index 9204565ef8..58dae46be0 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleColorSemanticTokenTests.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleColorSemanticTokenTests.swift @@ -17,7 +17,7 @@ import XCTest // swiftlint:disable required_deinit -/// To ensure the `MultipleColorRawToken` is tested as a wrapper of semantic tokens for light and dark color schemes. +/// To ensure the `MultipleColorRawToken` is tested as a provider of semantic tokens for light and dark color schemes. final class MultipleColorRawTokenTests: XCTestCase { /// Tests if the unique value is applied for light and dark modes diff --git a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleElevationCompositeRawTokensTests.swift b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleElevationCompositeRawTokensTests.swift index c1ba065fe7..8eb100ec4a 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleElevationCompositeRawTokensTests.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleElevationCompositeRawTokensTests.swift @@ -17,7 +17,7 @@ import XCTest // swiftlint:disable required_deinit -/// To ensure the `MultipleElevationCompositeRawTokens` is tested as a wrapper of semantic tokens for light and dark color schemes. +/// To ensure the `MultipleElevationCompositeRawTokens` is tested as a provider of semantic tokens for light and dark color schemes. final class MultipleElevationCompositeRawTokensTests: XCTestCase { /// Tests if the unique value is applied for light and dark modes diff --git a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontLetterSpacingSemanticTokensTests.swift b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontLetterSpacingSemanticTokensTests.swift index cf3ea4fa37..c114ba365a 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontLetterSpacingSemanticTokensTests.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontLetterSpacingSemanticTokensTests.swift @@ -18,7 +18,7 @@ import XCTest // swiftlint:disable required_deinit // swiftlint:disable type_name -/// To ensure the `MultipleFontLetterSpacingSemanticTokens` is tested as a wrapper of semantic tokens for compact and regular size classes. +/// To ensure the `MultipleFontLetterSpacingSemanticTokens` is tested as a provider of semantic tokens for compact and regular size classes. final class MultipleFontLetterSpacingSemanticTokensTests: XCTestCase { /// Tests if the unique value is applied for light and dark modes diff --git a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontLineHeightSemanticTokensTests.swift b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontLineHeightSemanticTokensTests.swift index e2782a6b6c..dd5622e55a 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontLineHeightSemanticTokensTests.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontLineHeightSemanticTokensTests.swift @@ -18,7 +18,7 @@ import XCTest // swiftlint:disable required_deinit // swiftlint:disable type_name -/// To ensure the `MultipleFontLineHeightSemanticTokens` is tested as a wrapper of semantic tokens for compact and regular size classes. +/// To ensure the `MultipleFontLineHeightSemanticTokens` is tested as a provider of semantic tokens for compact and regular size classes. final class MultipleFontLineHeightSemanticTokensTests: XCTestCase { /// Tests if the unique value is applied for light and dark modes diff --git a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontSizeSemanticTokensTests.swift b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontSizeSemanticTokensTests.swift index 21105bba4a..18819f5aea 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontSizeSemanticTokensTests.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontSizeSemanticTokensTests.swift @@ -17,7 +17,7 @@ import XCTest // swiftlint:disable required_deinit -/// To ensure the `MultipleFontSizeSemanticTokens` is tested as a wrapper of semantic tokens for compact and regular size classes. +/// To ensure the `MultipleFontSizeSemanticTokens` is tested as a provider of semantic tokens for compact and regular size classes. final class MultipleFontSizeSemanticTokensTests: XCTestCase { /// Tests if the unique value is applied for light and dark modes diff --git a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSizeSemanticTokenTests.swift b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSizeSemanticTokenTests.swift index b1f914c864..23c4c01457 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSizeSemanticTokenTests.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSizeSemanticTokenTests.swift @@ -16,7 +16,7 @@ import XCTest // swiftlint:disable required_deinit -/// To ensure the `MultipleSizeSemanticTokens` is tested as a wrapper of semantic tokens for compact and regular size classes. +/// To ensure the `MultipleSizeSemanticTokens` is tested as a provider of semantic tokens for compact and regular size classes. final class MultipleSizeSemanticTokensTests: XCTestCase { /// Tests if compact and regular values are preserved when defined diff --git a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSpaceSemanticTokensTests.swift b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSpaceSemanticTokensTests.swift index d5370285ed..f0d625c53c 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSpaceSemanticTokensTests.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSpaceSemanticTokensTests.swift @@ -17,7 +17,7 @@ import XCTest // swiftlint:disable required_deinit -/// To ensure the `MultipleSpaceSemanticTokens` is tested as a wrapper of semantic tokens for compact and regular size classes. +/// To ensure the `MultipleSpaceSemanticTokens` is tested as a provider of semantic tokens for compact and regular size classes. final class MultipleSpaceSemanticTokensTests: XCTestCase { /// Tests if compact and regular values are preserved when defined diff --git a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleTypographyCompositeRawTokensTests.swift b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleTypographyCompositeRawTokensTests.swift index deb3f72a12..1927a9d6cd 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleTypographyCompositeRawTokensTests.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleTypographyCompositeRawTokensTests.swift @@ -17,7 +17,7 @@ import XCTest // swiftlint:disable required_deinit -/// To ensure the `MultipleFontCompositeRawTokens` is tested as a wrapper of semantic tokens for compact and regular size classes. +/// To ensure the `MultipleFontCompositeRawTokens` is tested as a provider of semantic tokens for compact and regular size classes. final class MultipleFontCompositeRawTokensTests: XCTestCase { /// Tests if the unique value is applied for compact and regular size classes