@udixio/theme 1.0.0-beta.3 → 1.0.0-beta.31

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.
Files changed (97) hide show
  1. package/dist/app.container.d.ts +5 -0
  2. package/dist/app.module.d.ts +2 -2
  3. package/dist/app.service.d.ts +9 -3
  4. package/dist/color/color.interface.d.ts +1 -2
  5. package/dist/color/color.module.d.ts +2 -2
  6. package/dist/color/entities/color.entity.d.ts +6 -1
  7. package/dist/color/entities/index.d.ts +1 -0
  8. package/dist/color/index.d.ts +5 -0
  9. package/dist/color/models/default-color.model.d.ts +2 -3
  10. package/dist/color/models/index.d.ts +1 -0
  11. package/dist/color/services/color-manager.service.d.ts +18 -0
  12. package/dist/color/services/color.service.d.ts +21 -0
  13. package/dist/color/services/index.d.ts +2 -0
  14. package/dist/config/config.interface.d.ts +13 -0
  15. package/dist/config/config.module.d.ts +2 -0
  16. package/dist/config/config.service.d.ts +12 -0
  17. package/dist/config/index.d.ts +3 -0
  18. package/dist/index.d.ts +11 -0
  19. package/dist/main.d.ts +6 -1
  20. package/dist/material-color-utilities/index.d.ts +1 -0
  21. package/dist/plugin/index.d.ts +3 -0
  22. package/dist/plugin/plugin.module.d.ts +2 -0
  23. package/dist/plugin/plugin.service.d.ts +8 -0
  24. package/dist/plugin/pluginAbstract.d.ts +18 -0
  25. package/dist/plugins/font/font.plugin.d.ts +49 -0
  26. package/dist/plugins/font/index.d.ts +1 -0
  27. package/dist/plugins/tailwind/index.d.ts +3 -0
  28. package/dist/plugins/tailwind/main.d.ts +13 -0
  29. package/dist/plugins/tailwind/plugins-tailwind/font.d.ts +5 -0
  30. package/dist/plugins/tailwind/plugins-tailwind/index.d.ts +2 -0
  31. package/dist/plugins/tailwind/plugins-tailwind/state.d.ts +4 -0
  32. package/dist/plugins/tailwind/plugins-tailwind/themer.d.ts +10 -0
  33. package/dist/plugins/tailwind/tailwind.plugin.d.ts +18 -0
  34. package/dist/theme/entities/index.d.ts +2 -0
  35. package/dist/theme/entities/variant.entity.d.ts +2 -1
  36. package/dist/theme/index.d.ts +4 -0
  37. package/dist/theme/models/index.d.ts +1 -0
  38. package/dist/theme/services/index.d.ts +3 -0
  39. package/dist/theme/services/scheme.service.d.ts +7 -2
  40. package/dist/theme/services/theme.service.d.ts +16 -7
  41. package/dist/theme/services/variant.service.d.ts +8 -2
  42. package/dist/theme/theme.module.d.ts +2 -2
  43. package/dist/theme.cjs.development.js +1418 -906
  44. package/dist/theme.cjs.development.js.map +1 -1
  45. package/dist/theme.cjs.production.min.js +1 -1
  46. package/dist/theme.cjs.production.min.js.map +1 -1
  47. package/dist/theme.esm.js +1385 -907
  48. package/dist/theme.esm.js.map +1 -1
  49. package/package.json +21 -22
  50. package/src/app.container.ts +46 -0
  51. package/src/app.module.ts +5 -8
  52. package/src/app.service.spec.ts +1 -1
  53. package/src/app.service.ts +20 -8
  54. package/src/color/color.interface.ts +1 -3
  55. package/src/color/color.module.ts +8 -10
  56. package/src/color/entities/color.entity.ts +13 -1
  57. package/src/color/entities/index.ts +1 -0
  58. package/src/color/index.ts +5 -0
  59. package/src/color/models/default-color.model.ts +205 -202
  60. package/src/color/models/index.ts +1 -0
  61. package/src/color/{color-manager.service.ts → services/color-manager.service.ts} +23 -15
  62. package/src/color/{color.service.spec.ts → services/color.service.spec.ts} +1 -1
  63. package/src/color/services/color.service.ts +75 -0
  64. package/src/color/services/index.ts +2 -0
  65. package/src/config/config.interface.ts +14 -0
  66. package/src/config/config.module.ts +7 -0
  67. package/src/config/config.service.ts +104 -0
  68. package/src/config/index.ts +3 -0
  69. package/src/index.ts +11 -0
  70. package/src/main.ts +13 -7
  71. package/src/material-color-utilities/index.ts +1 -0
  72. package/src/plugin/index.ts +3 -0
  73. package/src/plugin/plugin.module.ts +7 -0
  74. package/src/plugin/plugin.service.ts +42 -0
  75. package/src/plugin/pluginAbstract.ts +44 -0
  76. package/src/plugins/font/font.plugin.ts +203 -0
  77. package/src/plugins/font/index.ts +1 -0
  78. package/src/plugins/tailwind/index.ts +3 -0
  79. package/src/plugins/tailwind/main.ts +16 -0
  80. package/src/plugins/tailwind/plugins-tailwind/font.ts +69 -0
  81. package/src/plugins/tailwind/plugins-tailwind/index.ts +2 -0
  82. package/src/plugins/tailwind/plugins-tailwind/state.ts +88 -0
  83. package/src/plugins/tailwind/plugins-tailwind/themer.ts +137 -0
  84. package/src/plugins/tailwind/tailwind.plugin.ts +72 -0
  85. package/src/theme/entities/index.ts +2 -0
  86. package/src/theme/entities/variant.entity.ts +2 -1
  87. package/src/theme/index.ts +4 -0
  88. package/src/theme/models/index.ts +1 -0
  89. package/src/theme/models/variant.model.ts +7 -0
  90. package/src/theme/services/index.ts +3 -0
  91. package/src/theme/services/scheme.service.ts +39 -11
  92. package/src/theme/services/theme.service.ts +30 -14
  93. package/src/theme/services/variant.service.ts +40 -5
  94. package/src/theme/theme.module.ts +8 -9
  95. package/dist/color/color-manager.service.d.ts +0 -15
  96. package/dist/color/color.service.d.ts +0 -14
  97. package/src/color/color.service.ts +0 -58
@@ -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;
@@ -1,2 +1,2 @@
1
- export declare class AppModule {
2
- }
1
+ import { Module } from './app.container';
2
+ export declare const AppModule: Module;
@@ -1,7 +1,13 @@
1
- import { ColorService } from './color/color.service';
2
- import { ThemeService } from './theme/services/theme.service';
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
- constructor(colorService: ColorService, themeService: ThemeService);
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
- getAllColors(): ReadonlyMap<string, ColorEntity>;
8
- addColors(colors: Record<string, ColorOptions>): ColorEntity[];
7
+ getColors(): ReadonlyMap<string, ColorEntity>;
9
8
  }
@@ -1,2 +1,2 @@
1
- export declare class ColorModule {
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';
@@ -0,0 +1,5 @@
1
+ export * from './color.interface';
2
+ export * from './color.module';
3
+ export * from './entities';
4
+ export * from './models';
5
+ export * from './services';
@@ -1,4 +1,3 @@
1
- import { ColorOptions } from '../entities/color.entity';
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 defaultColors: (colorManagerService: ColorManagerService) => Partial<Record<DynamicColorKey, Partial<ColorOptions>>>;
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,2 @@
1
+ export * from './color-manager.service';
2
+ export * from './color.service';
@@ -0,0 +1,13 @@
1
+ import { AddColorsOptions } from '../color';
2
+ import { VariantEntity } from '../theme';
3
+ import { PluginAbstract } from '../plugin';
4
+ export interface ConfigInterface {
5
+ sourceColor: string;
6
+ contrastLevel?: number;
7
+ isDark?: boolean;
8
+ variant?: VariantEntity;
9
+ colors?: AddColorsOptions | AddColorsOptions[];
10
+ useDefaultColors?: boolean;
11
+ palettes?: Record<string, string>;
12
+ plugins?: PluginAbstract<any, any>[];
13
+ }
@@ -0,0 +1,2 @@
1
+ import { Module } from '../app.container';
2
+ export declare const ConfigModule: Module;
@@ -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(config?: ConfigInterface): void;
11
+ private getConfig;
12
+ }
@@ -0,0 +1,3 @@
1
+ export * from './config.interface';
2
+ export * from './config.module';
3
+ export * from './config.service';
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
@@ -1,2 +1,7 @@
1
1
  import { AppService } from './app.service';
2
- export declare function main(): Promise<[AppService, () => Promise<void>]>;
2
+ import { ConfigInterface } from './config';
3
+ export declare function bootstrap(): AppService;
4
+ export declare function bootstrapFromConfig(args?: {
5
+ path?: string;
6
+ config?: ConfigInterface;
7
+ }): AppService;
@@ -1,2 +1,3 @@
1
1
  export * from './contrastCurve';
2
+ export * from './dynamic_color';
2
3
  export * from './toneDeltaPair';
@@ -0,0 +1,3 @@
1
+ export * from './pluginAbstract';
2
+ export * from './plugin.module';
3
+ export * from './plugin.service';
@@ -0,0 +1,2 @@
1
+ import { Module } from '../app.container';
2
+ export declare const PluginModule: Module;
@@ -0,0 +1,8 @@
1
+ import { PluginAbstract } from './pluginAbstract';
2
+ import { AppService } from '../app.service';
3
+ export declare class PluginService {
4
+ private plugins;
5
+ addPlugin(plugin: PluginAbstract<any, any>): void;
6
+ loadPlugins(appService: AppService): void;
7
+ getPlugin<T extends PluginAbstract<any, any>>(plugin: new (...args: any) => T): T;
8
+ }
@@ -0,0 +1,18 @@
1
+ import { AppService } from '../app.service';
2
+ export type PluginConstructor<Plugin extends PluginImplAbstract<any>> = new (...args: any) => Plugin;
3
+ export declare abstract class PluginAbstract<Plugin extends PluginImplAbstract<Options>, Options extends object> {
4
+ abstract readonly dependencies: (new (...args: any) => PluginAbstract<any, any>)[];
5
+ abstract readonly name: string;
6
+ options: Options;
7
+ abstract readonly pluginClass: PluginConstructor<Plugin>;
8
+ protected pluginInstance: Plugin | undefined;
9
+ constructor(options: Options);
10
+ init(appService: AppService): this;
11
+ getInstance(): Plugin;
12
+ }
13
+ export declare abstract class PluginImplAbstract<Options extends object> {
14
+ protected appService: AppService;
15
+ protected options: Options;
16
+ constructor(appService: AppService, options: Options);
17
+ abstract onInit(): void;
18
+ }
@@ -0,0 +1,49 @@
1
+ import { PluginAbstract, PluginImplAbstract } from '../../plugin';
2
+ export declare enum FontFamily {
3
+ Expressive = "expressive",
4
+ Neutral = "neutral"
5
+ }
6
+ export type FontStyle = {
7
+ fontSize: number;
8
+ lineHeight: number;
9
+ fontWeight: number;
10
+ letterSpacing?: number;
11
+ fontFamily: FontFamily;
12
+ };
13
+ export type FontRole = 'display' | 'headline' | 'title' | 'label' | 'body';
14
+ export type FontSize = 'large' | 'medium' | 'small';
15
+ interface FontPluginOptions {
16
+ fontFamily?: {
17
+ expressive?: string[];
18
+ neutral?: string[];
19
+ };
20
+ fontStyles?: Partial<Record<FontRole, Record<FontSize, Partial<FontStyle>>>>;
21
+ }
22
+ export declare class FontPlugin extends PluginAbstract<FontPluginImpl, FontPluginOptions> {
23
+ dependencies: never[];
24
+ name: string;
25
+ pluginClass: typeof FontPluginImpl;
26
+ }
27
+ declare class FontPluginImpl extends PluginImplAbstract<FontPluginOptions> {
28
+ private _fontFamily;
29
+ get fontFamily(): {
30
+ expressive: string[];
31
+ neutral: string[];
32
+ };
33
+ set fontFamily(value: {
34
+ expressive: string[];
35
+ neutral: string[];
36
+ } | undefined);
37
+ private _fontStyles;
38
+ get fontStyles(): Record<FontRole, Record<FontSize, FontStyle>>;
39
+ set fontStyles(value: Record<FontRole, Record<FontSize, FontStyle>> | undefined);
40
+ getFonts(): {
41
+ fontStyles: Record<FontRole, Record<FontSize, FontStyle>>;
42
+ fontFamily: {
43
+ expressive: string[];
44
+ neutral: string[];
45
+ };
46
+ };
47
+ onInit(): void;
48
+ }
49
+ export {};
@@ -0,0 +1 @@
1
+ export * from './font.plugin';
@@ -0,0 +1,3 @@
1
+ export * from './main';
2
+ export * from './plugins-tailwind';
3
+ export * from './tailwind.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,2 @@
1
+ export * from './state';
2
+ export * from './themer';
@@ -0,0 +1,4 @@
1
+ export declare const state: (colorkeys: string[]) => {
2
+ handler: import("tailwindcss/types/config").PluginCreator;
3
+ config?: Partial<import("tailwindcss/types/config").Config>;
4
+ };
@@ -0,0 +1,10 @@
1
+ import { AppService } from '../../../app.service';
2
+ export declare const themer: (args: {
3
+ colors: Record<string, {
4
+ light: string;
5
+ dark: string;
6
+ }>;
7
+ darkMode: "class" | "media";
8
+ subThemes?: Record<string, string>;
9
+ appService: AppService;
10
+ }) => any;
@@ -0,0 +1,18 @@
1
+ import { PluginAbstract, PluginImplAbstract } from '../../plugin';
2
+ import { Theme } from './main';
3
+ import { FontPlugin } from '../font';
4
+ interface TailwindPluginOptions {
5
+ darkMode?: 'class' | 'media';
6
+ responsiveBreakPoints?: Record<string, number>;
7
+ subThemes?: Record<string, string>;
8
+ }
9
+ export declare class TailwindPlugin extends PluginAbstract<TailwindImplPlugin, TailwindPluginOptions> {
10
+ dependencies: (typeof FontPlugin)[];
11
+ name: string;
12
+ pluginClass: typeof TailwindImplPlugin;
13
+ }
14
+ declare class TailwindImplPlugin extends PluginImplAbstract<TailwindPluginOptions> {
15
+ onInit(): void;
16
+ getTheme(): Theme;
17
+ }
18
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './scheme.entity';
2
+ export * from './variant.entity';
@@ -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
- constructor(palettes?: Record<string, (sourceColorHct: Hct) => TonalPalette>);
5
+ customPalettes?: ((colorHct: Hct) => TonalPalette) | undefined;
6
+ constructor(palettes?: Record<string, (sourceColorHct: Hct) => TonalPalette>, customPalettes?: ((colorHct: Hct) => TonalPalette) | undefined);
6
7
  }
@@ -0,0 +1,4 @@
1
+ export * from './entities';
2
+ export * from './models';
3
+ export * from './services';
4
+ export * from './theme.module';
@@ -0,0 +1 @@
1
+ export * from './variant.model';
@@ -0,0 +1,3 @@
1
+ export * from './scheme.service';
2
+ export * from './theme.service';
3
+ export * from './variant.service';
@@ -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
- sourceColorHex: string;
5
- palettes: Record<string, (sourceColorHct: Hct) => TonalPalette>;
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: SchemeService, variantService: VariantService);
9
- create(options: ThemeOptions): void;
10
- addVariant(variant: VariantEntity): void;
11
- update(options: Partial<ThemeOptions>): void;
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
- private schemeService;
5
- constructor(schemeService: SchemeService);
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
- export declare class ThemeModule {
2
- }
1
+ import { Module } from '../app.container';
2
+ export declare const ThemeModule: Module;