-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc9dcb9
commit 30a0ebf
Showing
5 changed files
with
89 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// Responses | ||
export type CounterGetResponse = { | ||
value: number; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const _languages = { | ||
system: 'System', | ||
en: 'EN', | ||
ru: 'RU', | ||
} as const; | ||
export type Language = keyof typeof _languages; | ||
export type LanguageUI = typeof _languages[Language]; | ||
export const languageToUI: Record<Language, LanguageUI> = { | ||
system: 'System', | ||
en: 'EN', | ||
ru: 'RU', | ||
}; | ||
export const languageUIToInternal: Record<LanguageUI, Language> = { | ||
System: 'system', | ||
EN: 'en', | ||
RU: 'ru', | ||
}; | ||
export const languages: Language[] = ['system', 'en', 'ru']; | ||
export const languagesUI: LanguageUI[] = ['System', 'EN', 'RU']; | ||
|
||
const _appearances = { | ||
system: 'System', | ||
light: 'Light', | ||
dark: 'Dark', | ||
} as const; | ||
export type Appearance = keyof typeof _appearances; | ||
export type AppearanceUI = typeof _appearances[Appearance]; | ||
export const appearanceToUI: Record<Appearance, AppearanceUI> = { | ||
system: 'System', | ||
light: 'Light', | ||
dark: 'Dark', | ||
}; | ||
export const appearanceUIToInternal: Record<AppearanceUI, Appearance> = { | ||
System: 'system', | ||
Light: 'light', | ||
Dark: 'dark', | ||
}; | ||
export const appearances: Appearance[] = ['system', 'light', 'dark']; | ||
export const appearancesUI: AppearanceUI[] = ['System', 'Light', 'Dark']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// `stores` layer | ||
interface IStore { | ||
hydrate?: () => PVoid; | ||
} | ||
type Stores = Record<string, IStore>; | ||
|
||
type StoreDefaultKeys = 'set' | 'setMany' | 'hydrate'; | ||
type StoreKeysOf<S> = keyof Omit<S, StoreDefaultKeys>; | ||
|
||
// `services` layer | ||
interface IService { | ||
init: () => PVoid; | ||
} | ||
type Services = Record<string, IService>; | ||
|
||
// System | ||
type PVoid = Promise<void>; | ||
type AnyObj = Record<string, unknown>; | ||
type PureFunc = () => void; | ||
type PureFuncAsync = () => PVoid; | ||
type PureFuncArg<T> = (value?: T) => void; | ||
|
||
// Design system | ||
type StatusBarStyle = 'light' | 'dark' | undefined; | ||
type ThemeColors = { | ||
textColor: string; | ||
bgColor: string; | ||
bg2Color: string; | ||
}; |