@awsui/theming-runtime
Advanced tools
Comparing version 1.0.17 to 1.0.18
{ | ||
"commit": "b11a1bc48e07b3f78c9ae4ed4a25e2c0c8342f62" | ||
"commit": "0eddb5c3c978e2a31ea0dad2dbc5d576365057f2" | ||
} |
@@ -15,4 +15,4 @@ { | ||
"name": "@awsui/theming-runtime", | ||
"version": "1.0.17", | ||
"version": "1.0.18", | ||
"license": "Apache-2.0" | ||
} |
import type Stylesheet from './stylesheet'; | ||
export declare type PropertiesMap = Record<string, string>; | ||
export declare type SelectorCustomizer = (selector: string) => string; | ||
export type PropertiesMap = Record<string, string>; | ||
export type SelectorCustomizer = (selector: string) => string; | ||
interface Creator<T> { | ||
create(): T; | ||
} | ||
export declare type StylesheetCreator = Creator<Stylesheet>; | ||
export type StylesheetCreator = Creator<Stylesheet>; | ||
export {}; |
import { Theme, Context, Mode } from './interfaces'; | ||
export declare type TokenCategory<T extends string, V> = Record<T, V>; | ||
export type TokenCategory<T extends string, V> = Record<T, V>; | ||
export declare class ThemeBuilder { | ||
@@ -4,0 +4,0 @@ theme: Theme; |
@@ -11,9 +11,9 @@ export interface OptionalState { | ||
} | ||
export declare type Token = string; | ||
export declare type Value = string; | ||
export declare type Reference = string; | ||
export declare type GlobalValue = Value; | ||
export declare type GlobalReference = Reference; | ||
export declare type ModeValue<S extends string = string> = Record<S, Value | Reference>; | ||
export declare type Assignment = GlobalValue | GlobalReference | ModeValue; | ||
export type Token = string; | ||
export type Value = string; | ||
export type Reference = string; | ||
export type GlobalValue = Value; | ||
export type GlobalReference = Reference; | ||
export type ModeValue<S extends string = string> = Record<S, Value | Reference>; | ||
export type Assignment = GlobalValue | GlobalReference | ModeValue; | ||
export interface Context { | ||
@@ -32,3 +32,3 @@ id: string; | ||
} | ||
declare type Tokens = Partial<Record<string, GlobalValue | TypedModeValueOverride>>; | ||
type Tokens = Partial<Record<string, GlobalValue | TypedModeValueOverride>>; | ||
export interface Override { | ||
@@ -40,3 +40,3 @@ tokens: Tokens; | ||
} | ||
export declare type TypedModeValueOverride<S extends string = string> = Partial<Record<S, Value>>; | ||
export type TypedModeValueOverride<S extends string = string> = Partial<Record<S, Value>>; | ||
/** | ||
@@ -43,0 +43,0 @@ * A theme preset contains information to render themed components or applying |
import { Context, Mode } from '.'; | ||
import { Theme, Value } from './interfaces'; | ||
declare type ModeTokenResolution = Record<string, Value>; | ||
declare type SpecificTokenResolution = Value; | ||
type ModeTokenResolution = Record<string, Value>; | ||
type SpecificTokenResolution = Value; | ||
interface ThemeResolution<TR> { | ||
[token: string]: TR; | ||
} | ||
declare type ModeTokenResolutionPath = Record<string, Array<string>>; | ||
declare type SpecificTokenResolutionPath = Array<string>; | ||
export declare type FullResolution = ThemeResolution<ModeTokenResolution | SpecificTokenResolution>; | ||
export declare type SpecificResolution = ThemeResolution<SpecificTokenResolution>; | ||
export declare type FullResolutionPaths = ThemeResolution<ModeTokenResolutionPath | SpecificTokenResolutionPath>; | ||
type ModeTokenResolutionPath = Record<string, Array<string>>; | ||
type SpecificTokenResolutionPath = Array<string>; | ||
export type FullResolution = ThemeResolution<ModeTokenResolution | SpecificTokenResolution>; | ||
export type SpecificResolution = ThemeResolution<SpecificTokenResolution>; | ||
export type FullResolutionPaths = ThemeResolution<ModeTokenResolutionPath | SpecificTokenResolutionPath>; | ||
interface FullResolutionWithPaths { | ||
@@ -20,3 +20,3 @@ resolvedTheme: FullResolution; | ||
export declare function resolveContext(theme: Theme, context: Context): FullResolution; | ||
declare type Reducer = (tokenResolution: ModeTokenResolution | SpecificTokenResolution, token: string, theme: Theme) => SpecificTokenResolution | undefined; | ||
type Reducer = (tokenResolution: ModeTokenResolution | SpecificTokenResolution, token: string, theme: Theme) => SpecificTokenResolution | undefined; | ||
export declare function reduce(resolution: FullResolution | SpecificResolution, theme: Theme, reducer: Reducer): SpecificResolution; | ||
@@ -23,0 +23,0 @@ export declare const defaultsReducer: () => (tokenResolution: ModeTokenResolution | SpecificTokenResolution, token: string, theme: Theme) => string; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68253