|
|
@@ -26,27 +26,43 @@ import {
|
|
|
ChevronRightIcon
|
|
|
} from "lucide-react-native";
|
|
|
|
|
|
-const codeGlobalDts = `import "ncore-ui-kit";
|
|
|
-
|
|
|
-// Kendi projenizin kök dizinine global.d.ts oluşturun.
|
|
|
-// Ardından NCoreUIKit tiplerini extend edin.
|
|
|
-declare module "ncore-ui-kit" {
|
|
|
- export namespace NCoreUIKit {
|
|
|
- export type ThemeKey = "dark" | "light";
|
|
|
- export type PaletteKey = "default" | "red" | "green";
|
|
|
- export type LocalesKey = "tr-TR" | "en-US";
|
|
|
-
|
|
|
- export interface ThemeColors {
|
|
|
- // Theme colors override here if needed
|
|
|
- myCustomColor: string;
|
|
|
+const codeGlobalDts = `import defaultLocaleJSON from "./variants/locales/default.json";
|
|
|
+import defaultThemeJSON from "./variants/themes/default.json";
|
|
|
+
|
|
|
+declare global {
|
|
|
+ namespace NCoreUIKit {
|
|
|
+ type PaletteNames = "gmcore";
|
|
|
+
|
|
|
+ interface PaletteKey extends Record<PaletteType, unknown>, Record<PaletteNames, unknown> {
|
|
|
+ }
|
|
|
+
|
|
|
+ type ProjectLocalizationL = typeof defaultLocaleJSON[0];
|
|
|
+
|
|
|
+ type GeneratedProjectTranslations = {
|
|
|
+ [K in keyof ProjectLocalizationL["translations"]]: ProjectLocalizationL["translations"][K];
|
|
|
+ };
|
|
|
+
|
|
|
+ interface Translation extends GeneratedTranslations, GeneratedProjectTranslations {
|
|
|
+ }
|
|
|
+
|
|
|
+ type DefaultPaletteL = typeof defaultThemeJSON.palettes[0];
|
|
|
+
|
|
|
+ type ProjectDataL = DefaultPaletteL["themes"]["dark"]["project"];
|
|
|
+ type DefaultProjectColorsL = ProjectDataL;
|
|
|
+
|
|
|
+ interface ProjectColorPalette extends DefaultProjectColors, DefaultProjectColorsL {
|
|
|
}
|
|
|
|
|
|
- export interface LanguageObject {
|
|
|
- translations: {
|
|
|
- "welcome-msg": string;
|
|
|
- "submit-btn": string;
|
|
|
- // Add your project's custom keys here
|
|
|
- }
|
|
|
+ type SystemDataL = DefaultPaletteL["themes"]["dark"]["system"];
|
|
|
+ type DefaultSystemColorsL = SystemDataL;
|
|
|
+
|
|
|
+ interface SystemColorPalette extends DefaultSystemColors, DefaultSystemColorsL {
|
|
|
+ }
|
|
|
+
|
|
|
+ type ContentDataL = DefaultPaletteL["themes"]["dark"]["content"];
|
|
|
+ type DefaultContentColorsL = ContentDataL;
|
|
|
+
|
|
|
+ interface ContentColorPalette extends DefaultContentColors, DefaultContentColorsL {
|
|
|
}
|
|
|
}
|
|
|
}`;
|