@udixio/theme 1.0.0-beta.2 → 1.0.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.container.d.ts +5 -0
- package/dist/app.module.d.ts +2 -2
- package/dist/app.service.d.ts +9 -3
- package/dist/color/color.interface.d.ts +1 -2
- package/dist/color/color.module.d.ts +2 -2
- package/dist/color/entities/color.entity.d.ts +6 -1
- package/dist/color/entities/index.d.ts +1 -0
- package/dist/color/index.d.ts +5 -0
- package/dist/color/models/default-color.model.d.ts +2 -3
- package/dist/color/models/index.d.ts +1 -0
- package/dist/color/services/color-manager.service.d.ts +18 -0
- package/dist/color/services/color.service.d.ts +21 -0
- package/dist/color/services/index.d.ts +2 -0
- package/dist/config/config.interface.d.ts +13 -0
- package/dist/config/config.module.d.ts +2 -0
- package/dist/config/config.service.d.ts +12 -0
- package/dist/config/index.d.ts +3 -0
- package/dist/index.d.ts +11 -0
- package/dist/main.d.ts +2 -1
- package/dist/material-color-utilities/index.d.ts +1 -0
- package/dist/plugin/index.d.ts +3 -0
- package/dist/plugin/plugin.abstract.d.ts +7 -0
- package/dist/plugin/plugin.module.d.ts +2 -0
- package/dist/plugin/plugin.service.d.ts +12 -0
- package/dist/plugins/font/font.plugin.d.ts +38 -0
- package/dist/plugins/font/index.d.ts +1 -0
- package/dist/plugins/tailwind/index.d.ts +3 -0
- package/dist/plugins/tailwind/main.d.ts +13 -0
- package/dist/plugins/tailwind/plugins-tailwind/font.d.ts +5 -0
- package/dist/plugins/tailwind/plugins-tailwind/index.d.ts +2 -0
- package/dist/plugins/tailwind/plugins-tailwind/state.d.ts +4 -0
- package/dist/plugins/tailwind/plugins-tailwind/themer.d.ts +4 -0
- package/dist/plugins/tailwind/tailwind.plugin.d.ts +17 -0
- package/dist/theme/entities/index.d.ts +2 -0
- package/dist/theme/entities/variant.entity.d.ts +2 -1
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/models/index.d.ts +1 -0
- package/dist/theme/services/index.d.ts +3 -0
- package/dist/theme/services/scheme.service.d.ts +7 -2
- package/dist/theme/services/theme.service.d.ts +16 -7
- package/dist/theme/services/variant.service.d.ts +8 -2
- package/dist/theme/theme.module.d.ts +2 -2
- package/dist/theme.cjs.development.js +1316 -579
- package/dist/theme.cjs.development.js.map +1 -1
- package/dist/theme.cjs.production.min.js +1 -1
- package/dist/theme.cjs.production.min.js.map +1 -1
- package/dist/theme.esm.js +1284 -580
- package/dist/theme.esm.js.map +1 -1
- package/package.json +21 -22
- package/src/app.container.ts +46 -0
- package/src/app.module.ts +5 -8
- package/src/app.service.spec.ts +1 -1
- package/src/app.service.ts +20 -8
- package/src/color/color.interface.ts +1 -3
- package/src/color/color.module.ts +8 -10
- package/src/color/entities/color.entity.ts +14 -3
- package/src/color/entities/index.ts +1 -0
- package/src/color/index.ts +5 -0
- package/src/color/models/default-color.model.ts +205 -202
- package/src/color/models/index.ts +1 -0
- package/src/color/{color-manager.service.ts → services/color-manager.service.ts} +22 -17
- package/src/color/{color.service.spec.ts → services/color.service.spec.ts} +1 -1
- package/src/color/services/color.service.ts +75 -0
- package/src/color/services/index.ts +2 -0
- package/src/config/config.interface.ts +14 -0
- package/src/config/config.module.ts +7 -0
- package/src/config/config.service.ts +95 -0
- package/src/config/index.ts +3 -0
- package/src/index.ts +11 -0
- package/src/main.ts +10 -7
- package/src/material-color-utilities/index.ts +1 -0
- package/src/plugin/index.ts +3 -0
- package/src/plugin/plugin.abstract.ts +9 -0
- package/src/plugin/plugin.module.ts +7 -0
- package/src/plugin/plugin.service.ts +48 -0
- package/src/plugins/font/font.plugin.ts +172 -0
- package/src/plugins/font/index.ts +1 -0
- package/src/plugins/tailwind/index.ts +3 -0
- package/src/plugins/tailwind/main.ts +19 -0
- package/src/plugins/tailwind/plugins-tailwind/font.ts +69 -0
- package/src/plugins/tailwind/plugins-tailwind/index.ts +2 -0
- package/src/plugins/tailwind/plugins-tailwind/state.ts +88 -0
- package/src/plugins/tailwind/plugins-tailwind/themer.ts +53 -0
- package/src/plugins/tailwind/tailwind.plugin.ts +64 -0
- package/src/theme/entities/index.ts +2 -0
- package/src/theme/entities/variant.entity.ts +2 -1
- package/src/theme/index.ts +4 -0
- package/src/theme/models/index.ts +1 -0
- package/src/theme/models/variant.model.ts +7 -0
- package/src/theme/services/index.ts +3 -0
- package/src/theme/services/scheme.service.ts +39 -11
- package/src/theme/services/theme.service.ts +30 -14
- package/src/theme/services/variant.service.ts +40 -5
- package/src/theme/theme.module.ts +8 -9
- package/dist/color/color-manager.service.d.ts +0 -15
- package/dist/color/color.service.d.ts +0 -13
- package/src/color/color.service.ts +0 -52
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AwilixContainer, BuildResolver, DisposableResolver } from 'awilix';
|
|
2
|
+
export type Module = Record<string, BuildResolver<any> & DisposableResolver<any>>;
|
|
3
|
+
export declare function importContainer(container: AwilixContainer, services: Module[]): AwilixContainer<any>;
|
|
4
|
+
declare const AppContainer: AwilixContainer<any>;
|
|
5
|
+
export default AppContainer;
|
package/dist/app.module.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Module } from './app.container';
|
|
2
|
+
export declare const AppModule: Module;
|
package/dist/app.service.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { ColorService } from './color
|
|
2
|
-
import { ThemeService } from './theme
|
|
1
|
+
import { ColorService } from './color';
|
|
2
|
+
import { ThemeService } from './theme';
|
|
3
|
+
import { PluginService } from './plugin/plugin.service';
|
|
3
4
|
export declare class AppService {
|
|
4
5
|
colorService: ColorService;
|
|
5
6
|
themeService: ThemeService;
|
|
6
|
-
|
|
7
|
+
pluginService: PluginService;
|
|
8
|
+
constructor({ colorService, themeService, pluginService, }: {
|
|
9
|
+
colorService: ColorService;
|
|
10
|
+
themeService: ThemeService;
|
|
11
|
+
pluginService: PluginService;
|
|
12
|
+
});
|
|
7
13
|
}
|
|
@@ -4,6 +4,5 @@ export interface ColorInterface {
|
|
|
4
4
|
removeColor(key: string): boolean;
|
|
5
5
|
getColor(key: string): ColorEntity;
|
|
6
6
|
updateColor(key: string, newColor: ColorOptions): ColorEntity;
|
|
7
|
-
|
|
8
|
-
addColors(colors: Record<string, ColorOptions>): ColorEntity[];
|
|
7
|
+
getColors(): ReadonlyMap<string, ColorEntity>;
|
|
9
8
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Module } from '../app.container';
|
|
2
|
+
export declare const ColorModule: Module;
|
|
@@ -3,7 +3,7 @@ import { SchemeEntity } from '../../theme/entities/scheme.entity';
|
|
|
3
3
|
import { DynamicColor } from '../../material-color-utilities/dynamic_color';
|
|
4
4
|
import { ContrastCurve } from '../../material-color-utilities';
|
|
5
5
|
import { SchemeService } from '../../theme/services/scheme.service';
|
|
6
|
-
import { ColorManagerService } from '../color-manager.service';
|
|
6
|
+
import { ColorManagerService } from '../services/color-manager.service';
|
|
7
7
|
export interface ColorOptions {
|
|
8
8
|
palette: (scheme: SchemeEntity) => TonalPalette;
|
|
9
9
|
tone: (scheme: SchemeEntity) => number;
|
|
@@ -32,6 +32,11 @@ export declare class ColorEntity {
|
|
|
32
32
|
}>): void;
|
|
33
33
|
getHex(): string;
|
|
34
34
|
getArgb(): number;
|
|
35
|
+
getRgb(): {
|
|
36
|
+
r: number;
|
|
37
|
+
g: number;
|
|
38
|
+
b: number;
|
|
39
|
+
};
|
|
35
40
|
getName(): string;
|
|
36
41
|
getDynamicColor(): DynamicColor;
|
|
37
42
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './color.entity';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ColorManagerService } from '../color-manager.service';
|
|
1
|
+
import { AddColorsOptions } from '../services/color.service';
|
|
3
2
|
export type DynamicColorKey = 'background' | 'onBackground' | 'surface' | 'surfaceDim' | 'surfaceBright' | 'surfaceContainerLowest' | 'surfaceContainerLow' | 'surfaceContainer' | 'surfaceContainerHigh' | 'surfaceContainerHighest' | 'onSurface' | 'surfaceVariant' | 'onSurfaceVariant' | 'inverseSurface' | 'inverseOnSurface' | 'outline' | 'outlineVariant' | 'shadow' | 'scrim' | 'surfaceTint' | 'primary' | 'onPrimary' | 'primaryContainer' | 'onPrimaryContainer' | 'inversePrimary' | 'secondary' | 'onSecondary' | 'secondaryContainer' | 'onSecondaryContainer' | 'tertiary' | 'onTertiary' | 'tertiaryContainer' | 'onTertiaryContainer' | 'error' | 'onError' | 'errorContainer' | 'onErrorContainer' | 'primaryFixed' | 'primaryFixedDim' | 'onPrimaryFixed' | 'onPrimaryFixedVariant' | 'secondaryFixed' | 'secondaryFixedDim' | 'onSecondaryFixed' | 'onSecondaryFixedVariant' | 'tertiaryFixed' | 'tertiaryFixedDim' | 'onTertiaryFixed' | 'onTertiaryFixedVariant';
|
|
4
|
-
export declare const
|
|
3
|
+
export declare const defaultColors: AddColorsOptions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './default-color.model';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DynamicColor } from '../../material-color-utilities/dynamic_color';
|
|
2
|
+
import { SchemeEntity } from '../../theme/entities/scheme.entity';
|
|
3
|
+
import { ColorEntity, ColorOptions } from '../entities/color.entity';
|
|
4
|
+
import { SchemeService } from '../../theme/services/scheme.service';
|
|
5
|
+
import { ColorService } from './color.service';
|
|
6
|
+
export declare const highestSurface: (s: SchemeEntity, colorService: ColorManagerService | ColorService) => DynamicColor;
|
|
7
|
+
export declare class ColorManagerService {
|
|
8
|
+
private colorMap;
|
|
9
|
+
private readonly schemeService;
|
|
10
|
+
constructor({ schemeService }: {
|
|
11
|
+
schemeService: SchemeService;
|
|
12
|
+
});
|
|
13
|
+
createOrUpdate(key: string, args: Partial<ColorOptions>): ColorEntity;
|
|
14
|
+
remove(key: string): boolean;
|
|
15
|
+
get(key: string): ColorEntity;
|
|
16
|
+
getAll(): ReadonlyMap<string, ColorEntity>;
|
|
17
|
+
addFromPalette(key: string): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ColorManagerService } from './color-manager.service';
|
|
2
|
+
import { ColorInterface } from '../color.interface';
|
|
3
|
+
import { ColorEntity, ColorOptions } from '../entities';
|
|
4
|
+
type AddColors = {
|
|
5
|
+
colors?: Record<string, Partial<ColorOptions>>;
|
|
6
|
+
fromPalettes?: string[] | string;
|
|
7
|
+
};
|
|
8
|
+
export type AddColorsOptions = AddColors | ((colorService: ColorService) => AddColors);
|
|
9
|
+
export declare class ColorService implements ColorInterface {
|
|
10
|
+
private readonly colorManagerService;
|
|
11
|
+
constructor({ colorManagerService, }: {
|
|
12
|
+
colorManagerService: ColorManagerService;
|
|
13
|
+
});
|
|
14
|
+
getColors(): ReadonlyMap<string, ColorEntity>;
|
|
15
|
+
addColor(key: string, color: Partial<ColorOptions>): ColorEntity;
|
|
16
|
+
addColors(args: AddColorsOptions | AddColorsOptions[]): void;
|
|
17
|
+
getColor(key: string): ColorEntity;
|
|
18
|
+
removeColor(key: string): boolean;
|
|
19
|
+
updateColor(key: string, newColor: Partial<ColorOptions>): ColorEntity;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VariantEntity } from '../theme';
|
|
2
|
+
import { AddColorsOptions } from '../color';
|
|
3
|
+
import { PluginConstructor } from '../plugin/plugin.service';
|
|
4
|
+
export interface ConfigInterface {
|
|
5
|
+
sourceColor: string;
|
|
6
|
+
contrastLevel?: 0;
|
|
7
|
+
isDark?: boolean;
|
|
8
|
+
variant?: VariantEntity;
|
|
9
|
+
colors?: AddColorsOptions | AddColorsOptions[];
|
|
10
|
+
useDefaultColors?: boolean;
|
|
11
|
+
palettes?: Record<string, string>;
|
|
12
|
+
plugins?: (PluginConstructor | [PluginConstructor, object])[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ConfigInterface } from './config.interface';
|
|
2
|
+
import { AppService } from '../app.service';
|
|
3
|
+
export declare function defineConfig(configObject: ConfigInterface): ConfigInterface;
|
|
4
|
+
export declare class ConfigService {
|
|
5
|
+
configPath: string;
|
|
6
|
+
private appService;
|
|
7
|
+
constructor({ appService }: {
|
|
8
|
+
appService: AppService;
|
|
9
|
+
});
|
|
10
|
+
loadConfig(): void;
|
|
11
|
+
private getConfig;
|
|
12
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
+
export { default as AppContainer } from './app.container';
|
|
2
|
+
export * from './app.container';
|
|
3
|
+
export * from './app.module';
|
|
4
|
+
export * from './app.service';
|
|
5
|
+
export * from './color';
|
|
6
|
+
export * from './config';
|
|
1
7
|
export * from './main';
|
|
8
|
+
export * from './material-color-utilities';
|
|
9
|
+
export * from './plugin';
|
|
10
|
+
export * from './plugins/font';
|
|
11
|
+
export * from './plugins/tailwind';
|
|
12
|
+
export * from './theme';
|
package/dist/main.d.ts
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AppService } from '../app.service';
|
|
2
|
+
import { PluginConstructor } from './plugin.service';
|
|
3
|
+
export declare abstract class PluginAbstract {
|
|
4
|
+
static dependencies: PluginConstructor[];
|
|
5
|
+
protected abstract appService: AppService;
|
|
6
|
+
protected abstract options: object;
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PluginAbstract } from './plugin.abstract';
|
|
2
|
+
import { AppService } from '../app.service';
|
|
3
|
+
export type PluginConstructor = (new (appService: AppService, options: any) => PluginAbstract) & {
|
|
4
|
+
dependencies: PluginConstructor[];
|
|
5
|
+
};
|
|
6
|
+
export declare class PluginService {
|
|
7
|
+
private pluginInstances;
|
|
8
|
+
private pluginConstructors;
|
|
9
|
+
addPlugin(plugin: PluginConstructor, config: object): void;
|
|
10
|
+
loadPlugins(appService: AppService): void;
|
|
11
|
+
getPlugin<T extends PluginAbstract>(plugin: new (appService: AppService, options: any) => T): T;
|
|
12
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { PluginAbstract } from '../../plugin';
|
|
2
|
+
import { AppService } from '../../app.service';
|
|
3
|
+
export declare enum FontFamily {
|
|
4
|
+
Expressive = "expressive",
|
|
5
|
+
Neutral = "neutral"
|
|
6
|
+
}
|
|
7
|
+
export type FontStyle = {
|
|
8
|
+
fontSize: number;
|
|
9
|
+
lineHeight: number;
|
|
10
|
+
fontWeight: number;
|
|
11
|
+
letterSpacing?: number;
|
|
12
|
+
fontFamily: FontFamily;
|
|
13
|
+
};
|
|
14
|
+
export type FontRole = 'display' | 'headline' | 'title' | 'label' | 'body';
|
|
15
|
+
export type FontSize = 'large' | 'medium' | 'small';
|
|
16
|
+
interface FontPluginOptions {
|
|
17
|
+
fontFamily?: {
|
|
18
|
+
expressive?: string[];
|
|
19
|
+
neutral?: string[];
|
|
20
|
+
};
|
|
21
|
+
fontStyles?: Partial<Record<FontRole, Record<FontSize, Partial<FontStyle>>>>;
|
|
22
|
+
}
|
|
23
|
+
export declare class FontPlugin extends PluginAbstract {
|
|
24
|
+
protected appService: AppService;
|
|
25
|
+
protected options: FontPluginOptions;
|
|
26
|
+
private readonly fontFamily;
|
|
27
|
+
private readonly fontStyles;
|
|
28
|
+
constructor(appService: AppService, options: FontPluginOptions);
|
|
29
|
+
static config(options: FontPluginOptions): FontPluginOptions;
|
|
30
|
+
getFonts(): {
|
|
31
|
+
fontStyles: Record<FontRole, Record<FontSize, FontStyle>>;
|
|
32
|
+
fontFamily: {
|
|
33
|
+
expressive: string[];
|
|
34
|
+
neutral: string[];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './font.plugin';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PluginsConfig } from 'tailwindcss/types/config';
|
|
2
|
+
import { AppService } from '../../app.service';
|
|
3
|
+
export type Theme = {
|
|
4
|
+
colors: Record<string, string>;
|
|
5
|
+
fontFamily: {
|
|
6
|
+
expressive: string[];
|
|
7
|
+
neutral: string[];
|
|
8
|
+
};
|
|
9
|
+
plugins: Partial<PluginsConfig>;
|
|
10
|
+
};
|
|
11
|
+
export declare const createTheme: () => Theme & {
|
|
12
|
+
appService: AppService;
|
|
13
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FontRole, FontSize, FontStyle } from '../../font/font.plugin';
|
|
2
|
+
export declare const font: (fontStyles: Record<FontRole, Record<FontSize, FontStyle>>, responsiveBreakPoints: Record<string, number>) => {
|
|
3
|
+
handler: import("tailwindcss/types/config").PluginCreator;
|
|
4
|
+
config?: Partial<import("tailwindcss/types/config").Config>;
|
|
5
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PluginAbstract } from '../../plugin/plugin.abstract';
|
|
2
|
+
import { AppService } from '../../app.service';
|
|
3
|
+
import { Theme } from './main';
|
|
4
|
+
import { FontPlugin } from '../font/font.plugin';
|
|
5
|
+
interface TailwindPluginOptions {
|
|
6
|
+
darkMode?: 'class' | 'media';
|
|
7
|
+
responsiveBreakPoints?: Record<string, number>;
|
|
8
|
+
}
|
|
9
|
+
export declare class TailwindPlugin extends PluginAbstract {
|
|
10
|
+
protected appService: AppService;
|
|
11
|
+
protected options: TailwindPluginOptions;
|
|
12
|
+
static dependencies: (typeof FontPlugin)[];
|
|
13
|
+
constructor(appService: AppService, options: TailwindPluginOptions);
|
|
14
|
+
static config(options: TailwindPluginOptions): TailwindPluginOptions;
|
|
15
|
+
getTheme(): Theme;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -2,5 +2,6 @@ import { Hct, TonalPalette } from '@material/material-color-utilities';
|
|
|
2
2
|
export declare const getRotatedHue: (sourceColor: Hct, hues: number[], rotations: number[]) => number;
|
|
3
3
|
export declare class VariantEntity {
|
|
4
4
|
palettes: Record<string, (sourceColorHct: Hct) => TonalPalette>;
|
|
5
|
-
|
|
5
|
+
customPalettes?: ((colorHct: Hct) => TonalPalette) | undefined;
|
|
6
|
+
constructor(palettes?: Record<string, (sourceColorHct: Hct) => TonalPalette>, customPalettes?: ((colorHct: Hct) => TonalPalette) | undefined);
|
|
6
7
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './variant.model';
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { SchemeEntity, SchemeOptions } from '../entities/scheme.entity';
|
|
2
2
|
import { Hct, TonalPalette } from '@material/material-color-utilities';
|
|
3
3
|
export type SchemeServiceOptions = Omit<SchemeOptions, 'palettes' | 'sourceColorArgb'> & {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
sourcesColorHex: Record<string, string> & {
|
|
5
|
+
primary?: string;
|
|
6
|
+
};
|
|
7
|
+
palettes: Record<string, {
|
|
8
|
+
sourceColorkey?: string;
|
|
9
|
+
tonalPalette: (sourceColorHct: Hct) => TonalPalette;
|
|
10
|
+
}>;
|
|
6
11
|
};
|
|
7
12
|
export declare class SchemeService {
|
|
8
13
|
private schemeEntity?;
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import { SchemeService, SchemeServiceOptions } from './scheme.service';
|
|
2
2
|
import { VariantService } from './variant.service';
|
|
3
3
|
import { VariantEntity } from '../entities/variant.entity';
|
|
4
|
-
type ThemeOptions = Omit<SchemeServiceOptions, 'palettes'
|
|
4
|
+
type ThemeOptions = Omit<SchemeServiceOptions, 'palettes' | 'sourcesColorHex'> & {
|
|
5
|
+
sourceColorHex: string;
|
|
6
|
+
};
|
|
5
7
|
export declare class ThemeService {
|
|
6
|
-
private schemeService;
|
|
7
|
-
private variantService;
|
|
8
|
-
constructor(schemeService
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
private readonly schemeService;
|
|
9
|
+
private readonly variantService;
|
|
10
|
+
constructor({ schemeService, variantService, }: {
|
|
11
|
+
schemeService: SchemeService;
|
|
12
|
+
variantService: VariantService;
|
|
13
|
+
});
|
|
14
|
+
create(options: ThemeOptions & {
|
|
15
|
+
variant: VariantEntity;
|
|
16
|
+
}): void;
|
|
17
|
+
update(options: Partial<ThemeOptions> & {
|
|
18
|
+
variant?: VariantEntity;
|
|
19
|
+
}): void;
|
|
20
|
+
addCustomPalette(key: string, colorHex: string): void;
|
|
12
21
|
}
|
|
13
22
|
export {};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { SchemeService } from './scheme.service';
|
|
2
2
|
import { VariantEntity } from '../entities/variant.entity';
|
|
3
3
|
export declare class VariantService {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
customPalettes: Record<string, string>;
|
|
5
|
+
private variantEntity?;
|
|
6
|
+
private readonly schemeService;
|
|
7
|
+
constructor({ schemeService }: {
|
|
8
|
+
schemeService: SchemeService;
|
|
9
|
+
});
|
|
10
|
+
addCustomPalette(key: string, colorHex: string): void;
|
|
6
11
|
set(variantEntity: VariantEntity): void;
|
|
12
|
+
private update;
|
|
7
13
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Module } from '../app.container';
|
|
2
|
+
export declare const ThemeModule: Module;
|