@omnia/fx-models 8.0.457-dev → 8.0.458-dev
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/internal-do-not-import-from-here/shared/aurora/stores/ColorManager.d.ts +9 -0
- package/internal-do-not-import-from-here/shared/aurora/stores/ColorSchemaStore.d.ts +46 -0
- package/internal-do-not-import-from-here/shared/aurora/stores/ComponentBlueprintStore.d.ts +54 -0
- package/internal-do-not-import-from-here/shared/aurora/stores/DefineThemeProvider.d.ts +4 -0
- package/internal-do-not-import-from-here/shared/aurora/stores/FontStore.d.ts +18 -0
- package/internal-do-not-import-from-here/shared/aurora/stores/SpacingBlueprintStore.d.ts +42 -0
- package/internal-do-not-import-from-here/shared/aurora/stores/TemplateRegistrationStore.d.ts +20 -0
- package/internal-do-not-import-from-here/shared/aurora/stores/ThemeContextStore.d.ts +16 -0
- package/internal-do-not-import-from-here/shared/aurora/stores/ThemeMigrations.d.ts +12 -0
- package/internal-do-not-import-from-here/shared/aurora/stores/ThemeNormalizer.d.ts +5 -0
- package/internal-do-not-import-from-here/shared/aurora/stores/ThemeProvider.d.ts +39 -0
- package/internal-do-not-import-from-here/shared/aurora/stores/ThemeSharedModels.d.ts +33 -0
- package/internal-do-not-import-from-here/shared/aurora/stores/ThemeStore.d.ts +91 -0
- package/internal-do-not-import-from-here/shared/aurora/stores/TypographyBlueprintManager.d.ts +22 -0
- package/internal-do-not-import-from-here/shared/aurora/stores/TypographyBlueprintStore.d.ts +34 -0
- package/internal-do-not-import-from-here/shared/aurora/stores/VariantManager.d.ts +7 -0
- package/internal-do-not-import-from-here/shared/aurora/stores/index.d.ts +15 -0
- package/internal-do-not-import-from-here/shared/aurora/styles/StyleFormatters.d.ts +4 -0
- package/internal-do-not-import-from-here/shared/aurora/styles/index.d.ts +1 -0
- package/internal-do-not-import-from-here/shared/models/theme/Blueprints.d.ts +16 -3
- package/internal-do-not-import-from-here/velcron/core/models/VelcronDefinitions.d.ts +4 -4
- package/package.json +1 -1
@@ -0,0 +1,9 @@
|
|
1
|
+
import { ColorDefinition } from "internal/fx/shared/models";
|
2
|
+
export declare function useColorManager(): {
|
3
|
+
isWcagCompliant: (color1: string, color2: string, level: "AA" | "AAA") => boolean;
|
4
|
+
getColorDefinition: (color: string, isBaseColorDark: boolean) => ColorDefinition;
|
5
|
+
isDarkColor: (color: any) => boolean;
|
6
|
+
addOpacityToColor: (color: any, opacity: any) => any;
|
7
|
+
isValidColor: (color: string) => boolean;
|
8
|
+
hasOpacity: (color: string) => boolean;
|
9
|
+
};
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { type StoreEvents, type StoreReturnDefineAction } from "internal/fx/shared";
|
2
|
+
import { ColorDefinition, ColorGradientValue, ColorSchema, ColorSchemaType, ColorSchemaTypes, ColorTypes, ColorValue, guid } from "internal/fx/shared/models";
|
3
|
+
import { useThemeStore } from "./ThemeStore";
|
4
|
+
export type ColorSchemaStoreType = {
|
5
|
+
state: {
|
6
|
+
base: ColorDefinition;
|
7
|
+
onBase: ColorDefinition;
|
8
|
+
name: string;
|
9
|
+
colorSchemaType: ColorSchemaTypes | ColorSchemaType;
|
10
|
+
id: guid;
|
11
|
+
};
|
12
|
+
events: StoreEvents<{
|
13
|
+
base: ColorDefinition;
|
14
|
+
onBase: ColorDefinition;
|
15
|
+
name: string;
|
16
|
+
colorSchemaType: ColorSchemaTypes | ColorSchemaType;
|
17
|
+
id: guid;
|
18
|
+
}>;
|
19
|
+
actions: StoreReturnDefineAction<{
|
20
|
+
setColorSchema(colorSchemaType: ColorSchemaTypes | ColorSchemaType, container?: boolean): void;
|
21
|
+
setCustomColorSchema(colorSchema: ColorSchema, container?: boolean): void;
|
22
|
+
setColor(colorDefinition: ColorDefinition, colorType: ColorTypes): void;
|
23
|
+
setThemeStore(themeStoreInstance: ReturnType<typeof useThemeStore>): void;
|
24
|
+
}>;
|
25
|
+
get: {
|
26
|
+
themeStore: ReturnType<typeof useThemeStore>;
|
27
|
+
colorValue(color: ColorValue | ColorGradientValue, colorSchema?: ColorSchema): string;
|
28
|
+
colorSchema: ColorSchema;
|
29
|
+
theme: "dark" | "light";
|
30
|
+
base: ColorDefinition;
|
31
|
+
onBase: ColorDefinition;
|
32
|
+
};
|
33
|
+
dispose(force?: boolean): void;
|
34
|
+
};
|
35
|
+
export type InternalColorSchemaStoreType = ColorSchemaStoreType & {
|
36
|
+
actions: {
|
37
|
+
disableAutoDispose(): void;
|
38
|
+
};
|
39
|
+
};
|
40
|
+
export declare const useColorSchemaStore: () => ColorSchemaStoreType & {
|
41
|
+
actions: {
|
42
|
+
disableAutoDispose(): void;
|
43
|
+
};
|
44
|
+
} & {
|
45
|
+
dispose?: () => void;
|
46
|
+
};
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import { Blueprint, BlueprintsStrategyBase, BlueprintVariant, ButtonBlueprint, ButtonBlueprintVariant, ComponentBlueprints, ContainerFillValue, HeaderBlueprint, IconBlueprint, InputBlueprint, OIconSizes, TabsBlueprint, TextStyleDefinition, TypographyBlueprint, WebBlueprintItemDefintionType } from "internal/fx/shared/models";
|
2
|
+
type blueprintType = "default";
|
3
|
+
export declare const useComponentBlueprintStore: () => {
|
4
|
+
state: {
|
5
|
+
blueprints: ComponentBlueprints;
|
6
|
+
};
|
7
|
+
events: import("internal/fx/shared").StoreEvents<{
|
8
|
+
blueprints: ComponentBlueprints;
|
9
|
+
}, Record<string, import("internal/fx/shared").IMessageBusTopicPublishSubscriber<any>>>;
|
10
|
+
actions: import("internal/fx/shared").StoreReturnDefineAction<{
|
11
|
+
ensure(): {
|
12
|
+
buttons: () => void;
|
13
|
+
};
|
14
|
+
setBlueprint(type: blueprintType): void;
|
15
|
+
setBluePrints(componentBlueprints: ComponentBlueprints): void;
|
16
|
+
}>;
|
17
|
+
get: {
|
18
|
+
byType<TType extends Blueprint>(type: WebBlueprintItemDefintionType): any;
|
19
|
+
readonly blueprints: ComponentBlueprints;
|
20
|
+
fallbackBlueprints: {
|
21
|
+
get(): ComponentBlueprints;
|
22
|
+
byType(strategyType: BlueprintsStrategyBase): ComponentBlueprints;
|
23
|
+
};
|
24
|
+
button: {
|
25
|
+
iconBlueprintBySize(sizeType: OIconSizes): ButtonBlueprint;
|
26
|
+
blueprintByType(type: ButtonBlueprintVariant | ButtonBlueprint): any;
|
27
|
+
};
|
28
|
+
input: {
|
29
|
+
blueprintByType(type: BlueprintVariant | InputBlueprint): InputBlueprint;
|
30
|
+
};
|
31
|
+
tabs: {
|
32
|
+
blueprintByType(type: BlueprintVariant | TabsBlueprint): TabsBlueprint;
|
33
|
+
};
|
34
|
+
icon: {
|
35
|
+
blueprint(size: OIconSizes): IconBlueprint;
|
36
|
+
size: {
|
37
|
+
byBluePrint(blueprint: IconBlueprint, typographyBlueprint: TypographyBlueprint): TextStyleDefinition;
|
38
|
+
byIconSize(size: OIconSizes, typographyBlueprint: TypographyBlueprint): TextStyleDefinition;
|
39
|
+
};
|
40
|
+
};
|
41
|
+
containerFill: {
|
42
|
+
hasVariant(type: BlueprintVariant | string): boolean;
|
43
|
+
getByType(type: ContainerFillValue): any;
|
44
|
+
};
|
45
|
+
header: {
|
46
|
+
hasVariant(type: BlueprintVariant | string): boolean;
|
47
|
+
blueprintByType(type: BlueprintVariant | HeaderBlueprint): HeaderBlueprint;
|
48
|
+
};
|
49
|
+
};
|
50
|
+
deactivated(): void;
|
51
|
+
} & {
|
52
|
+
dispose?: () => void;
|
53
|
+
};
|
54
|
+
export {};
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { useThemeProviderStore } from "./ThemeProvider";
|
2
|
+
type SetupThemeProvider = Pick<ReturnType<typeof useThemeProviderStore>["actions"], "registerStore" | "registerDefaultTypographyBlueprints" | "registerDefaultSpacingBlueprints" | "registerDefaultLightColorSchema" | "registerDefaultDarkColorSchema" | "registerComponentBlueprintStrategy" | "defineCustomFontLoader">;
|
3
|
+
export declare function defineThemeProvider(setup: (ctx: SetupThemeProvider) => void): void;
|
4
|
+
export {};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { Future, ITemplateRegistration, TypographyFontDefinition } from "internal/fx/shared/models";
|
2
|
+
export declare const useFontStore: () => {
|
3
|
+
actions: import("internal/fx/shared").StoreReturnDefineAction<{
|
4
|
+
ensureLoadFonts: () => Future<ITemplateRegistration<TypographyFontDefinition, import("internal/fx/shared").TemplateRegistrationType>[]>;
|
5
|
+
addFont(font: TypographyFontDefinition): void;
|
6
|
+
editFont(font: TypographyFontDefinition): void;
|
7
|
+
onFinishLoad(): Future<Record<string, ITemplateRegistration<any, import("internal/fx/shared").TemplateRegistrationType>>>;
|
8
|
+
saveFont(): Promise<boolean>;
|
9
|
+
delete(font: TypographyFontDefinition): Promise<void>;
|
10
|
+
}>;
|
11
|
+
get: {
|
12
|
+
readonly availableFonts: TypographyFontDefinition[];
|
13
|
+
findFont(family: string): ITemplateRegistration<TypographyFontDefinition, import("internal/fx/shared").TemplateRegistrationType>;
|
14
|
+
readonly finishLoad: boolean;
|
15
|
+
};
|
16
|
+
} & {
|
17
|
+
dispose?: () => void;
|
18
|
+
};
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { BlueprintVariant, guid } from "internal/fx/shared/models";
|
2
|
+
import { useThemeStore } from "./ThemeStore";
|
3
|
+
export declare const useSpacingBlueprintStore: () => {
|
4
|
+
state: {
|
5
|
+
blueprint: import("internal/fx/shared").SpacingBlueprint;
|
6
|
+
blueprintType: BlueprintVariant;
|
7
|
+
id: guid;
|
8
|
+
isCustomBlueprint: boolean;
|
9
|
+
};
|
10
|
+
events: import("internal/fx/shared").StoreEvents<{
|
11
|
+
blueprint: import("internal/fx/shared").SpacingBlueprint;
|
12
|
+
blueprintType: BlueprintVariant;
|
13
|
+
id: guid;
|
14
|
+
isCustomBlueprint: boolean;
|
15
|
+
}, Record<string, import("internal/fx/shared").IMessageBusTopicPublishSubscriber<any>>>;
|
16
|
+
actions: import("internal/fx/shared").StoreReturnDefineAction<{
|
17
|
+
setBlueprint(): void;
|
18
|
+
setThemeStore(themeStoreInstance: ReturnType<typeof useThemeStore>): void;
|
19
|
+
}>;
|
20
|
+
get: {
|
21
|
+
readonly defaultSpacingBlueprint: import("internal/fx/shared").SpacingBlueprint;
|
22
|
+
readonly themeStore: ReturnType<typeof useThemeStore>;
|
23
|
+
readonly blueprint: import("internal/fx/shared").SpacingBlueprint;
|
24
|
+
readonly spacingScaling: {
|
25
|
+
get: {
|
26
|
+
valueWithoutScale: (value: import("internal/fx/shared").SpacingValue) => string | number;
|
27
|
+
scaleFromValue: (value: import("internal/fx/shared").SpacingValue) => import("internal/fx/shared").SpacingScale;
|
28
|
+
scale: (value: import("internal/fx/shared").Spacing | import("internal/fx/shared").SpacingValue) => import("internal/fx/shared").SpacingScale;
|
29
|
+
};
|
30
|
+
add: {
|
31
|
+
scaleToValue: (value: import("internal/fx/shared").SpacingValue, scale: import("internal/fx/shared").SpacingScale) => string | number;
|
32
|
+
fallBackScale: (value: import("internal/fx/shared").SpacingValue, scale: import("internal/fx/shared").SpacingScale) => string | number;
|
33
|
+
};
|
34
|
+
has: {
|
35
|
+
scaling: (value: import("internal/fx/shared").SpacingValue) => boolean;
|
36
|
+
};
|
37
|
+
};
|
38
|
+
};
|
39
|
+
deactivated(): void;
|
40
|
+
} & {
|
41
|
+
dispose?: () => void;
|
42
|
+
};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { guid, ITemplateRegistration, TemplateRegistrationType, Future } from "internal/fx/shared/models";
|
2
|
+
export declare const useTemplateRegistrationStore: () => {
|
3
|
+
state: {
|
4
|
+
registrations: Record<string, ITemplateRegistration<any, TemplateRegistrationType>>;
|
5
|
+
};
|
6
|
+
events: import("internal/fx/shared").StoreEvents<{
|
7
|
+
registrations: Record<string, ITemplateRegistration<any, TemplateRegistrationType>>;
|
8
|
+
}, Record<string, import("internal/fx/shared").IMessageBusTopicPublishSubscriber<any>>>;
|
9
|
+
actions: import("internal/fx/shared").StoreReturnDefineAction<{
|
10
|
+
upsertRegistration<TTemplateRegistration extends ITemplateRegistration<any>>(registration: TTemplateRegistration): Promise<boolean>;
|
11
|
+
deleteRegistration(registrationId: guid): Promise<boolean>;
|
12
|
+
ensureLoadTemplates: () => Future<Record<string, ITemplateRegistration<any, TemplateRegistrationType>>>;
|
13
|
+
}>;
|
14
|
+
get: {
|
15
|
+
byId: <TTemplateRegistration extends ITemplateRegistration<any>>(id: guid) => ITemplateRegistration<any, TemplateRegistrationType>;
|
16
|
+
getByType: <TTemplateRegistration extends ITemplateRegistration<any>>(type: TemplateRegistrationType) => Array<TTemplateRegistration>;
|
17
|
+
};
|
18
|
+
} & {
|
19
|
+
dispose?: () => void;
|
20
|
+
};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { ThemeContextType } from "internal/fx/shared/models";
|
2
|
+
import { useThemeStore } from "./ThemeStore";
|
3
|
+
export declare const useThemeContextStore: () => {
|
4
|
+
actions: import("internal/fx/shared").StoreReturnDefineAction<{
|
5
|
+
saveTheme(variant: ThemeContextType): void;
|
6
|
+
}>;
|
7
|
+
get: {
|
8
|
+
readonly defaultTheme: ReturnType<typeof useThemeStore>;
|
9
|
+
readonly adminTheme: ReturnType<typeof useThemeStore>;
|
10
|
+
readonly previewTheme: ReturnType<typeof useThemeStore>;
|
11
|
+
readonly designerTheme: ReturnType<typeof useThemeStore>;
|
12
|
+
byType(type: ThemeContextType): ReturnType<typeof useThemeStore>;
|
13
|
+
};
|
14
|
+
} & {
|
15
|
+
dispose?: () => void;
|
16
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { SpacingBlueprint, TypographyBlueprint } from "internal/fx/shared/models";
|
2
|
+
export declare function ThemeMigrations(): {
|
3
|
+
spacing: {
|
4
|
+
migrate: (blueprint: SpacingBlueprint) => SpacingBlueprint;
|
5
|
+
};
|
6
|
+
typography: {
|
7
|
+
migrate: (blueprint: TypographyBlueprint) => TypographyBlueprint;
|
8
|
+
};
|
9
|
+
theme: {
|
10
|
+
migrate(themeDefinition: any): any;
|
11
|
+
};
|
12
|
+
};
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { ResolvedThemeDefinition, TypographyBlueprint } from "internal/fx/shared/models";
|
2
|
+
export declare function ThemeNormalizer(): {
|
3
|
+
normalizeTypography: (typography: TypographyBlueprint) => TypographyBlueprint;
|
4
|
+
normalize: (themeDefinition: ResolvedThemeDefinition) => ResolvedThemeDefinition;
|
5
|
+
};
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { ColorSchemas, guid, ResolvedThemeDefinition, SpacingBlueprint, TypographyBlueprint, TypographyFontDefinition } from "internal/fx/shared/models";
|
2
|
+
import { ThemeRegistrationStoreType, ThemeRegistration, ComponentBlueprintStrategyType } from "./ThemeSharedModels";
|
3
|
+
export declare const useThemeProviderStore: () => {
|
4
|
+
actions: import("internal/fx/shared").StoreReturnDefineAction<{
|
5
|
+
registerStore(store: () => ThemeRegistrationStoreType): void;
|
6
|
+
initiateStore(): void;
|
7
|
+
registerDefaultTypographyBlueprints(blueprints: TypographyBlueprint): void;
|
8
|
+
registerDefaultSpacingBlueprints(blueprints: SpacingBlueprint): void;
|
9
|
+
registerDefaultLightColorSchema(blueprints: ColorSchemas): void;
|
10
|
+
registerDefaultDarkColorSchema(blueprints: ColorSchemas): void;
|
11
|
+
registerComponentBlueprintStrategy(strategy: ComponentBlueprintStrategyType): void;
|
12
|
+
defineCustomFontLoader(loader: (font: TypographyFontDefinition) => void): void;
|
13
|
+
loadAll(): Promise<import("./ThemeSharedModels").ThemesResolved>;
|
14
|
+
save(theme: ThemeRegistration): Promise<any>;
|
15
|
+
delete(id: guid): Promise<any>;
|
16
|
+
setAdminTheme(theme: ResolvedThemeDefinition): void;
|
17
|
+
setDefaultTheme(theme: ResolvedThemeDefinition): void;
|
18
|
+
loadCustomFont(font: TypographyFontDefinition): void;
|
19
|
+
}>;
|
20
|
+
get: {
|
21
|
+
readonly adminTheme: ResolvedThemeDefinition;
|
22
|
+
readonly defaultTheme: ResolvedThemeDefinition;
|
23
|
+
readonly defaultTypographyBlueprints: TypographyBlueprint;
|
24
|
+
readonly defaultSpacingBlueprints: SpacingBlueprint;
|
25
|
+
readonly defaultLightColorSchema: ColorSchemas;
|
26
|
+
readonly defaultDarkColorSchema: ColorSchemas;
|
27
|
+
readonly componentBlueprintStrategy: ComponentBlueprintStrategyType;
|
28
|
+
};
|
29
|
+
readonly events: {
|
30
|
+
onMutatedAdminTheme: import("internal/fx/shared").MessageBusExposeOnlySubscription<ResolvedThemeDefinition>;
|
31
|
+
onMutatedDefaultTheme: import("internal/fx/shared").MessageBusExposeOnlySubscription<ResolvedThemeDefinition>;
|
32
|
+
};
|
33
|
+
validations: {
|
34
|
+
checkPlatformStoreRegistered(): void;
|
35
|
+
checkDefaultBlueprintsRegistered(type: "typography" | "spacing" | "light" | "dark" | "component"): void;
|
36
|
+
};
|
37
|
+
} & {
|
38
|
+
dispose?: () => void;
|
39
|
+
};
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { ColorSchema, ComponentBlueprints, guid, ITemplateRegistration, ResolvedThemeDefinition, SpacingBlueprint, TemplateRegistrationType, ThemeDefinition, TypographyBlueprint } from "internal/fx/shared/models";
|
2
|
+
import { StoreEvents, StoreReturnDefineAction } from "internal/fx/shared";
|
3
|
+
export type ThemeRegistration = ITemplateRegistration<ResolvedThemeDefinition, TemplateRegistrationType> | ITemplateRegistration<ColorSchema> | ITemplateRegistration<TypographyBlueprint> | ITemplateRegistration<ComponentBlueprints> | ITemplateRegistration<SpacingBlueprint>;
|
4
|
+
export type ThemesResolved = Array<ThemeDefinition | ColorSchema | TypographyBlueprint | SpacingBlueprint | ComponentBlueprints>;
|
5
|
+
export type ThemeRegistrationStoreType = {
|
6
|
+
state: {
|
7
|
+
adminTheme: ResolvedThemeDefinition;
|
8
|
+
defaultTheme: ResolvedThemeDefinition;
|
9
|
+
};
|
10
|
+
events: StoreEvents<{
|
11
|
+
adminTheme: ResolvedThemeDefinition;
|
12
|
+
defaultTheme: ResolvedThemeDefinition;
|
13
|
+
}>;
|
14
|
+
actions: StoreReturnDefineAction<{
|
15
|
+
loadAll(): Promise<ThemesResolved>;
|
16
|
+
save(theme: ThemeRegistration): Promise<any>;
|
17
|
+
delete(id: guid): Promise<any>;
|
18
|
+
}>;
|
19
|
+
get: {
|
20
|
+
readonly adminTheme: ResolvedThemeDefinition;
|
21
|
+
readonly defaultTheme: ResolvedThemeDefinition;
|
22
|
+
};
|
23
|
+
};
|
24
|
+
export type ComponentBlueprintStrategyType = {
|
25
|
+
roundness: {
|
26
|
+
readonly none: ComponentBlueprints;
|
27
|
+
readonly xs: ComponentBlueprints;
|
28
|
+
readonly s: ComponentBlueprints;
|
29
|
+
readonly m: ComponentBlueprints;
|
30
|
+
readonly l: ComponentBlueprints;
|
31
|
+
readonly full: ComponentBlueprints;
|
32
|
+
};
|
33
|
+
};
|
@@ -0,0 +1,91 @@
|
|
1
|
+
import { ColorSchema, ColorSchemaType, ColorSchemaTypes, ColorType, ColorTypes, BlueprintVariant, ResolvedThemeDefinition, guid, TextFillDefinitionValue, ContainerFillValue, ContainerFillBlueprint } from "internal/fx/shared/models";
|
2
|
+
import { type ColorSchemaStoreType } from "./ColorSchemaStore";
|
3
|
+
export declare const useThemeStore: () => {
|
4
|
+
id: guid;
|
5
|
+
state: {
|
6
|
+
currentTheme: ResolvedThemeDefinition;
|
7
|
+
};
|
8
|
+
events: import("internal/fx/shared").StoreEvents<{
|
9
|
+
currentTheme: ResolvedThemeDefinition;
|
10
|
+
}, Record<string, import("internal/fx/shared").IMessageBusTopicPublishSubscriber<any>>>;
|
11
|
+
actions: import("internal/fx/shared").StoreReturnDefineAction<{
|
12
|
+
setTheme(themeDefinition: ResolvedThemeDefinition): void;
|
13
|
+
}>;
|
14
|
+
get: {
|
15
|
+
getOrSetColorSchema(colorSchemaType: ColorSchemaTypes | ColorSchemaType): {
|
16
|
+
value: ColorSchemaStoreType;
|
17
|
+
setValue(value: ColorSchemaStoreType): void;
|
18
|
+
};
|
19
|
+
componentBlueprintStore(): {
|
20
|
+
state: {
|
21
|
+
blueprints: import("internal/fx/shared").ComponentBlueprints;
|
22
|
+
};
|
23
|
+
events: import("internal/fx/shared").StoreEvents<{
|
24
|
+
blueprints: import("internal/fx/shared").ComponentBlueprints;
|
25
|
+
}, Record<string, import("internal/fx/shared").IMessageBusTopicPublishSubscriber<any>>>;
|
26
|
+
actions: import("internal/fx/shared").StoreReturnDefineAction<{
|
27
|
+
ensure(): {
|
28
|
+
buttons: () => void;
|
29
|
+
};
|
30
|
+
setBlueprint(type: "default"): void;
|
31
|
+
setBluePrints(componentBlueprints: import("internal/fx/shared").ComponentBlueprints): void;
|
32
|
+
}>;
|
33
|
+
get: {
|
34
|
+
byType<TType extends import("internal/fx/shared").Blueprint>(type: import("internal/fx/shared").WebBlueprintItemDefintionType): any;
|
35
|
+
readonly blueprints: import("internal/fx/shared").ComponentBlueprints;
|
36
|
+
fallbackBlueprints: {
|
37
|
+
get(): import("internal/fx/shared").ComponentBlueprints;
|
38
|
+
byType(strategyType: import("internal/fx/shared").BlueprintsStrategyBase): import("internal/fx/shared").ComponentBlueprints;
|
39
|
+
};
|
40
|
+
button: {
|
41
|
+
iconBlueprintBySize(sizeType: import("internal/fx/shared").OIconSizes): import("internal/fx/shared").ButtonBlueprint;
|
42
|
+
blueprintByType(type: import("internal/fx/shared").ButtonBlueprintVariant | import("internal/fx/shared").ButtonBlueprint): any;
|
43
|
+
};
|
44
|
+
input: {
|
45
|
+
blueprintByType(type: BlueprintVariant | import("internal/fx/shared").InputBlueprint): import("internal/fx/shared").InputBlueprint;
|
46
|
+
};
|
47
|
+
tabs: {
|
48
|
+
blueprintByType(type: BlueprintVariant | import("internal/fx/shared").TabsBlueprint): import("internal/fx/shared").TabsBlueprint;
|
49
|
+
};
|
50
|
+
icon: {
|
51
|
+
blueprint(size: import("internal/fx/shared").OIconSizes): import("internal/fx/shared").IconBlueprint;
|
52
|
+
size: {
|
53
|
+
byBluePrint(blueprint: import("internal/fx/shared").IconBlueprint, typographyBlueprint: import("internal/fx/shared").TypographyBlueprint): import("internal/fx/shared").TextStyleDefinition;
|
54
|
+
byIconSize(size: import("internal/fx/shared").OIconSizes, typographyBlueprint: import("internal/fx/shared").TypographyBlueprint): import("internal/fx/shared").TextStyleDefinition;
|
55
|
+
};
|
56
|
+
};
|
57
|
+
containerFill: {
|
58
|
+
hasVariant(type: BlueprintVariant | string): boolean;
|
59
|
+
getByType(type: ContainerFillValue): any;
|
60
|
+
};
|
61
|
+
header: {
|
62
|
+
hasVariant(type: BlueprintVariant | string): boolean;
|
63
|
+
blueprintByType(type: BlueprintVariant | import("internal/fx/shared").HeaderBlueprint): import("internal/fx/shared").HeaderBlueprint;
|
64
|
+
};
|
65
|
+
};
|
66
|
+
deactivated(): void;
|
67
|
+
} & {
|
68
|
+
dispose?: () => void;
|
69
|
+
};
|
70
|
+
colorSchema(colorSchemaType: ColorSchemaTypes | ColorSchemaType | ColorSchema): ColorSchema;
|
71
|
+
typography(): import("internal/fx/shared").TypographyBlueprint;
|
72
|
+
fills(): {
|
73
|
+
text: {
|
74
|
+
hasVariant(type: BlueprintVariant | string): boolean;
|
75
|
+
byValue(value: TextFillDefinitionValue): TextFillDefinitionValue;
|
76
|
+
};
|
77
|
+
container: {
|
78
|
+
hasVariant(type: BlueprintVariant | string): boolean;
|
79
|
+
bluePrints(): import("internal/fx/shared").ContainerFillBlueprints;
|
80
|
+
byValue(value: ContainerFillValue): ContainerFillBlueprint;
|
81
|
+
};
|
82
|
+
};
|
83
|
+
spacing(): import("internal/fx/shared").SpacingBlueprint;
|
84
|
+
component(): import("internal/fx/shared").ComponentBlueprints;
|
85
|
+
color(colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: ColorTypes | ColorType): string;
|
86
|
+
colorDefinition(colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: ColorTypes | ColorType): import("internal/fx/shared").ColorDefinition;
|
87
|
+
currentTheme(): ResolvedThemeDefinition;
|
88
|
+
};
|
89
|
+
} & {
|
90
|
+
dispose?: () => void;
|
91
|
+
};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { TextStyleDefinition, TypographyBlueprint } from "internal/fx/shared/models";
|
2
|
+
interface BreakpointScale {
|
3
|
+
lg: number;
|
4
|
+
md: number;
|
5
|
+
sm: number;
|
6
|
+
}
|
7
|
+
export declare function useTypographyBlueprintManager(): {
|
8
|
+
typeScale: {
|
9
|
+
getFontSize: (blueprint: TypographyBlueprint, scaleSlots: BreakpointScale) => void;
|
10
|
+
createTextStyleDefinition: (blueprint: TypographyBlueprint, scaleSlots: BreakpointScale) => TextStyleDefinition;
|
11
|
+
};
|
12
|
+
textStyledefinition: {
|
13
|
+
createAll(blueprint: TypographyBlueprint): TypographyBlueprint;
|
14
|
+
update(definition: TextStyleDefinition, blueprint: TypographyBlueprint): TextStyleDefinition;
|
15
|
+
strip(definition: TextStyleDefinition): TextStyleDefinition;
|
16
|
+
};
|
17
|
+
blueprint: {
|
18
|
+
initFromScale(blueprint: TypographyBlueprint): TypographyBlueprint;
|
19
|
+
strip(blueprint: TypographyBlueprint): TypographyBlueprint;
|
20
|
+
};
|
21
|
+
};
|
22
|
+
export {};
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { guid, TextStyleDefinition, TextStyleSize, TextStyleSizes, TextStyleType, TextStyleTypes, TypographyBlueprint, TypographyFontDefinition } from "internal/fx/shared/models";
|
2
|
+
import { useThemeStore } from "./ThemeStore";
|
3
|
+
export declare const useTypographyBlueprintStore: () => {
|
4
|
+
state: {
|
5
|
+
blueprint: TypographyBlueprint;
|
6
|
+
id: guid;
|
7
|
+
availableFonts: TypographyFontDefinition[];
|
8
|
+
isCustomBlueprint: boolean;
|
9
|
+
};
|
10
|
+
events: import("internal/fx/shared").StoreEvents<{
|
11
|
+
blueprint: TypographyBlueprint;
|
12
|
+
id: guid;
|
13
|
+
availableFonts: TypographyFontDefinition[];
|
14
|
+
isCustomBlueprint: boolean;
|
15
|
+
}, Record<string, import("internal/fx/shared").IMessageBusTopicPublishSubscriber<any>>>;
|
16
|
+
rules: {
|
17
|
+
isStyleActive: (textStyleType: TextStyleType, size: TextStyleSizes) => boolean;
|
18
|
+
};
|
19
|
+
actions: import("internal/fx/shared").StoreReturnDefineAction<{
|
20
|
+
normalize(blueprint: TypographyBlueprint): TypographyBlueprint;
|
21
|
+
setBlueprint(): void;
|
22
|
+
setThemeStore(themeStoreInstance: ReturnType<typeof useThemeStore>): void;
|
23
|
+
}>;
|
24
|
+
get: {
|
25
|
+
readonly defaultTypographyBlueprint: TypographyBlueprint;
|
26
|
+
textStyleName: (textStyle: TextStyleType, size: TextStyleSizes) => any;
|
27
|
+
readonly themeStore: ReturnType<typeof useThemeStore>;
|
28
|
+
readonly blueprint: TypographyBlueprint;
|
29
|
+
typography(typographyType: TextStyleTypes | TextStyleType, size: TextStyleSize | TextStyleSizes): TextStyleDefinition;
|
30
|
+
};
|
31
|
+
deactivated(): void;
|
32
|
+
} & {
|
33
|
+
dispose?: () => void;
|
34
|
+
};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
export declare function useVariantManager<TVariants extends Record<string, any>, TVariant>(): {
|
2
|
+
countVariants: (variants: TVariants, variantTypes: Array<string>) => number;
|
3
|
+
getEmptyVariant: (variants: TVariants, variantTypes: Array<string>) => string;
|
4
|
+
hasEmptySlots: (variants: TVariants, variantTypes: Array<string>) => boolean;
|
5
|
+
hasVariant: (variants: TVariants, variant: string) => boolean;
|
6
|
+
getVariant: (variants: TVariants, variant: string) => any;
|
7
|
+
};
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export * from "./ColorManager";
|
2
|
+
export * from "./ComponentBlueprintStore";
|
3
|
+
export * from "./FontStore";
|
4
|
+
export { useColorSchemaStore, type ColorSchemaStoreType } from "./ColorSchemaStore";
|
5
|
+
export * from "./SpacingBlueprintStore";
|
6
|
+
export * from "./TemplateRegistrationStore";
|
7
|
+
export * from "./ThemeContextStore";
|
8
|
+
export * from "./ThemeMigrations";
|
9
|
+
export * from "./ThemeNormalizer";
|
10
|
+
export * from "./DefineThemeProvider";
|
11
|
+
export * from "./ThemeSharedModels";
|
12
|
+
export * from "./ThemeStore";
|
13
|
+
export * from "./TypographyBlueprintManager";
|
14
|
+
export * from "./TypographyBlueprintStore";
|
15
|
+
export * from "./VariantManager";
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./StyleFormatters";
|
@@ -3,6 +3,7 @@ import { SpacingDefinition, Spacing, SpacingValue } from "./Spacing";
|
|
3
3
|
import { TypographyFontDefinition, TextStyleValue } from "./Typography";
|
4
4
|
import { ThemeBase } from "./ThemeBase";
|
5
5
|
import { VelcronRendererResolverReference } from "../velcron";
|
6
|
+
import { TextAlignment } from "@omnia/fx-models";
|
6
7
|
export interface BlueprintStrategy {
|
7
8
|
buttons: {
|
8
9
|
primary: ButtonBlueprint;
|
@@ -30,12 +31,24 @@ export interface VariantBlueprints<T> extends Blueprints {
|
|
30
31
|
variant7?: T;
|
31
32
|
variant8?: T;
|
32
33
|
}
|
34
|
+
export interface HeaderIconSettings {
|
35
|
+
blueprint?: IconBlueprint;
|
36
|
+
background?: BackgroundDefinition;
|
37
|
+
spacing?: Spacing;
|
38
|
+
}
|
33
39
|
export interface HeaderBlueprint extends Blueprint {
|
40
|
+
/**velcron */
|
34
41
|
renderer?: VelcronRendererResolverReference;
|
35
42
|
state?: any;
|
43
|
+
/**Settings */
|
44
|
+
background?: BackgroundDefinition;
|
45
|
+
textAlign?: TextAlignment;
|
46
|
+
padding?: SpacingValue;
|
47
|
+
text?: TextBlueprint;
|
48
|
+
iconSettings?: HeaderIconSettings;
|
36
49
|
}
|
37
50
|
export interface HeaderBlueprints extends Blueprints, VariantBlueprints<HeaderBlueprint>, BlueprintsReference {
|
38
|
-
primary?:
|
51
|
+
primary?: HeaderBlueprint;
|
39
52
|
}
|
40
53
|
export interface TextFillBlueprints extends VariantBlueprints<TextFillBlueprint>, Blueprints, BlueprintsReference {
|
41
54
|
}
|
@@ -156,7 +169,7 @@ export interface TabsBlueprint extends Blueprint {
|
|
156
169
|
text?: TextBlueprint;
|
157
170
|
icon?: IconBlueprint;
|
158
171
|
active?: {
|
159
|
-
|
172
|
+
renderer?: VelcronRendererResolverReference;
|
160
173
|
padding?: Spacing;
|
161
174
|
iconPadding?: SpacingValue;
|
162
175
|
background?: BackgroundDefinition;
|
@@ -165,7 +178,7 @@ export interface TabsBlueprint extends Blueprint {
|
|
165
178
|
};
|
166
179
|
inactive?: {
|
167
180
|
background?: BackgroundDefinition;
|
168
|
-
|
181
|
+
renderer?: VelcronRendererResolverReference;
|
169
182
|
};
|
170
183
|
}
|
171
184
|
export interface TextBlueprint extends Blueprint {
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { VelcronOnUpdatedEvent, VelcronOnClosedEvent, VelcronOnCloseRequestedEvent, VelcronOnPressEvent, VelcronSpacing, VelcronStyling, VelcronCustomComponentDefinition, VelcronAppDefinition, VelcronRendererResolverReference, EventHook, Future, TextBlueprint, VelcronBindableProp, VelcronEditor, ContainerFillBlueprint, BackgroundDefinition, BlueprintVariant, IconBlueprint, ButtonBlueprint, VelcronOnPressOutsideEvent, VelcronOnPointerEnterEvent, VelcronOnPointerLeaveEvent, VelcronColorStyling, VelcronOverflowValues, VelcronImageRatios } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
2
2
|
import { VelcronComponentArrayType, VelcronPrimitiveType } from "./VelcronTypes";
|
3
3
|
import { AssignOperators, VelcronHorizontalAlignments, VelcronIconTypes, VelcronActionTypes, VelcronVerticalAlignments } from "./Enums";
|
4
|
-
import { DynamicState, VelcronDefinition, VelcronEffects
|
4
|
+
import { DynamicState, VelcronDefinition, VelcronEffects } from "..";
|
5
5
|
import { guid, PropertyConfiguration, PropertyValue, PropertyDefinition, PropertySetupBase } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
6
|
-
import { useVelcronColorSchemaStore } from "../stores/VelcronColorSchema";
|
7
6
|
import { Properties } from "csstype";
|
8
7
|
import type { AnimationOptionsWithOverrides, InViewOptions, VariantDefinition, Variants } from "motion";
|
8
|
+
import { useColorSchemaStore, useThemeStore } from "internal/fx/ux/mobile";
|
9
9
|
export interface ResolvedComponentRenderer {
|
10
10
|
component: unknown;
|
11
11
|
definition: VelcronDefinition;
|
@@ -83,8 +83,8 @@ export interface VelcronRenderContext {
|
|
83
83
|
id?: string;
|
84
84
|
rootContext: DynamicState;
|
85
85
|
currentContext: DynamicState;
|
86
|
-
theming?: ReturnType<typeof
|
87
|
-
colors?: ReturnType<typeof
|
86
|
+
theming?: ReturnType<typeof useThemeStore>;
|
87
|
+
colors?: ReturnType<typeof useColorSchemaStore>;
|
88
88
|
actions?: {
|
89
89
|
[name: string]: Array<string>;
|
90
90
|
};
|