global.d.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import "../../src/types/index";
  2. import defaultLocaleJSON from "../src/variants/locales/default.json";
  3. import defaultThemeJSON from "../src/variants/themes/default.json";
  4. declare global {
  5. namespace NCoreUIKit {
  6. type PaletteNames = "gmcore";
  7. interface PaletteKey extends Record<PaletteType, unknown>, Record<PaletteNames, unknown> {
  8. }
  9. type ProjectLocalizationL = typeof defaultLocaleJSON[0];
  10. type GeneratedProjectTranslations = {
  11. [K in keyof ProjectLocalizationL["translations"]]: ProjectLocalizationL["translations"][K];
  12. };
  13. interface Translation extends GeneratedTranslations, GeneratedProjectTranslations {
  14. }
  15. type DefaultPaletteL = typeof defaultThemeJSON.palettes[0];
  16. type ProjectDataL = DefaultPaletteL["themes"]["dark"]["project"];
  17. type DefaultProjectColorsL = ProjectDataL;
  18. interface ProjectColorPalette extends DefaultProjectColors, DefaultProjectColorsL {
  19. }
  20. type SystemDataL = DefaultPaletteL["themes"]["dark"]["system"];
  21. type DefaultSystemColorsL = SystemDataL;
  22. interface SystemColorPalette extends DefaultSystemColors, DefaultSystemColorsL {
  23. }
  24. type ContentDataL = DefaultPaletteL["themes"]["dark"]["content"];
  25. type DefaultContentColorsL = ContentDataL;
  26. interface ContentColorPalette extends DefaultContentColors, DefaultContentColorsL {
  27. }
  28. }
  29. }