@omnia/fx-models 8.0.457-dev → 8.0.459-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/BlockTitleSettings.d.ts +2 -2
- package/Enums.d.ts +0 -8
- package/Enums.js +1 -8
- 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/BackgroundStyling.d.ts +31 -0
- package/internal-do-not-import-from-here/shared/aurora/styles/BlueprintValues.d.ts +6 -0
- package/internal-do-not-import-from-here/shared/aurora/styles/BorderStyling.d.ts +18 -0
- package/internal-do-not-import-from-here/shared/aurora/styles/Colors.d.ts +10 -0
- package/internal-do-not-import-from-here/shared/aurora/styles/FillStyling.d.ts +11 -0
- package/internal-do-not-import-from-here/shared/aurora/styles/General.d.ts +12 -0
- package/internal-do-not-import-from-here/shared/aurora/styles/IconStyling.d.ts +6 -0
- package/internal-do-not-import-from-here/shared/aurora/styles/InputStyling.d.ts +6 -0
- package/internal-do-not-import-from-here/shared/aurora/styles/Spacing.d.ts +12 -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/Stylex.d.ts +156 -0
- package/internal-do-not-import-from-here/shared/aurora/styles/StylexTypings.d.ts +894 -0
- package/internal-do-not-import-from-here/shared/aurora/styles/TextStyling.d.ts +8 -0
- package/internal-do-not-import-from-here/shared/aurora/styles/Typography.d.ts +102 -0
- package/internal-do-not-import-from-here/shared/aurora/styles/UseContainerQuery.d.ts +8 -0
- package/internal-do-not-import-from-here/shared/aurora/styles/UseStyling.d.ts +81 -0
- package/internal-do-not-import-from-here/shared/aurora/styles/index.d.ts +13 -0
- package/internal-do-not-import-from-here/shared/models/Enums.d.ts +5 -0
- package/internal-do-not-import-from-here/shared/models/Enums.js +7 -1
- package/internal-do-not-import-from-here/shared/models/OxideTypeDefinitions.d.ts +11 -0
- package/internal-do-not-import-from-here/shared/models/OxideTypeDefinitions.js +7 -1
- 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/oxide/OxideTypeDefinitions.d.ts +0 -9
- package/oxide/OxideTypeDefinitions.js +2 -9
- package/package.json +1 -1
package/BlockTitleSettings.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
import { IIcon } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
1
|
+
import { BorderPositions, IconPositions, IconSizes } from "./Enums";
|
2
|
+
import { IIcon, TextAlignment } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
3
3
|
import { Spacing, VelcronRendererResolverReference } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
4
4
|
import { BusinessProfileProperty } from "./BusinessProfile";
|
5
5
|
import { ShapeDividerSettings } from "./ShapeDividerSettingsModel";
|
package/Enums.d.ts
CHANGED
@@ -538,11 +538,6 @@ export declare enum LayoutItemTypes {
|
|
538
538
|
sectionItem = "sectionItem",
|
539
539
|
block = "block"
|
540
540
|
}
|
541
|
-
export declare enum TextAlignment {
|
542
|
-
left = "left",
|
543
|
-
center = "center",
|
544
|
-
right = "right"
|
545
|
-
}
|
546
541
|
export declare enum IconPositions {
|
547
542
|
Left = 1,
|
548
543
|
Right = 2,
|
@@ -695,9 +690,6 @@ export declare enum DisplayBreakpointCodes {
|
|
695
690
|
* */
|
696
691
|
Large = "lg"
|
697
692
|
}
|
698
|
-
export declare const DisplayBreakpoints: readonly ["s", "m", "l"];
|
699
|
-
export type DisplayBreakpointTypes = typeof DisplayBreakpoints[number];
|
700
|
-
export type ContainerBreakpointTypes = "layout" | "column" | "parent";
|
701
693
|
export declare enum LocalServingMessageType {
|
702
694
|
Connected = "connected",
|
703
695
|
FullReload = "full-reload",
|
package/Enums.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.DateOperator = exports.TimePeriodTypes = exports.TargetUser = exports.RedirectRuleType = exports.MultilingualScopes = exports.OmniaRoleTypes = exports.TargetResolverTypes = exports.PermissionRoles = exports.FirstDayOfWeeks = exports.TimeFormats = exports.CompareBusinessProfilePathType = exports.StatusMessageOverlayType = exports.HttpStatusCode = exports.QueueMessageStatus = exports.StaticEndpoint = exports.LegacyThemeType = exports.FeatureInstanceStatus = exports.RoleDefinitions = exports.Parameters = exports.ParamTypes = exports.PropertyIndexedType = exports.UserPickingType = exports.BoolFilter = exports.PrincipalTypes = exports.AppInstanceScopedQueryTypes = exports.AppInstanceStatus = exports.VideoRatio = exports.AdminNavigationBuiltInCategory = exports.AdminVisibility = exports.AuthenticationValidationStatuses = exports.IconSources = exports.LanguageTags = exports.LocalizationTargetTypes = exports.BundleTargetTypes = exports.ServerManifestTypes = exports.ClientManifestTypes = exports.RuleLogicalOperator = exports.ResourceEvaluators = exports.ConsoleStateStorageMessageTypes = exports.ConsoleMessageTypes = exports.LogLevels = exports.ManifestLoadStatus = exports.LogSources = exports.AppTemplatePermissionLevel = exports.SecurityAccessType = exports.SecurityIdentities = exports.SecurityRoleScopes = exports.SecurityProviderTypes = exports.BuiltInAppInstanceInternalNames = exports.BuiltInEnterprisePropertyInternalNames = void 0;
|
4
|
-
exports.CompletionImpactType = exports.LayoutActionOpenType = exports.ReCaptChaSecretFormNames = exports.reCaptchaSecretKey = exports.WPServiceDefinition = exports.StatusFilter = exports.PersistentDiskTypes = exports.CookieKeys = exports.LocalServingMessageType = exports.
|
4
|
+
exports.CompletionImpactType = exports.LayoutActionOpenType = exports.ReCaptChaSecretFormNames = exports.reCaptchaSecretKey = exports.WPServiceDefinition = exports.StatusFilter = exports.PersistentDiskTypes = exports.CookieKeys = exports.LocalServingMessageType = exports.DisplayBreakpointCodes = exports.IdentityUserIdTypeMatch = exports.OmniaClientRuntimes = exports.OmniaBackendRuntimes = exports.PropertyEditModeElementNameType = exports.DirectionRules = exports.MediaPickerEnums = exports.PropertyArchiveType = exports.ImageSources = exports.IconSizes = exports.BlockRenderingModes = exports.LayoutCanvasModes = exports.ChromeTypes = exports.LayoutItemActions = exports.LayoutEditorModes = exports.TabbedDisplayModes = exports.TabbedIconPositions = exports.Positions = exports.BorderPositions = exports.IconPositions = exports.LayoutItemTypes = exports.LayoutDrawerTabs = exports.VerticalAlignments = exports.HorizontalAlignments = exports.BladeSizes = exports.ImageResolution = exports.AppInstanceAction = exports.VDataGridHeaderType = exports.VDataGridHeaderAlign = exports.ButtonSizes = exports.ButtonModes = exports.ButtonIconPosition = exports.TooltipPosition = exports.RichTextModes = void 0;
|
5
5
|
const models_1 = require("@omnia/fx-models/internal-do-not-import-from-here/shared/models");
|
6
6
|
var BuiltInEnterprisePropertyInternalNames;
|
7
7
|
(function (BuiltInEnterprisePropertyInternalNames) {
|
@@ -606,12 +606,6 @@ var LayoutItemTypes;
|
|
606
606
|
LayoutItemTypes["sectionItem"] = "sectionItem";
|
607
607
|
LayoutItemTypes["block"] = "block";
|
608
608
|
})(LayoutItemTypes || (exports.LayoutItemTypes = LayoutItemTypes = {}));
|
609
|
-
var TextAlignment;
|
610
|
-
(function (TextAlignment) {
|
611
|
-
TextAlignment["left"] = "left";
|
612
|
-
TextAlignment["center"] = "center";
|
613
|
-
TextAlignment["right"] = "right";
|
614
|
-
})(TextAlignment || (exports.TextAlignment = TextAlignment = {}));
|
615
609
|
var IconPositions;
|
616
610
|
(function (IconPositions) {
|
617
611
|
IconPositions[IconPositions["Left"] = 1] = "Left";
|
@@ -796,7 +790,6 @@ var DisplayBreakpointCodes;
|
|
796
790
|
* */
|
797
791
|
DisplayBreakpointCodes["Large"] = "lg";
|
798
792
|
})(DisplayBreakpointCodes || (exports.DisplayBreakpointCodes = DisplayBreakpointCodes = {}));
|
799
|
-
exports.DisplayBreakpoints = ["s", "m", "l"];
|
800
793
|
var LocalServingMessageType;
|
801
794
|
(function (LocalServingMessageType) {
|
802
795
|
LocalServingMessageType["Connected"] = "connected";
|
@@ -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,31 @@
|
|
1
|
+
import { BackgroundDefinition } from "internal/fx/shared/models";
|
2
|
+
import { StylexValue } from "./Stylex";
|
3
|
+
import { useColorSchemaStore } from "../stores";
|
4
|
+
export declare namespace BackgroundStyling {
|
5
|
+
function backgroundGrid(): Readonly<StylexValue>;
|
6
|
+
function getBlueprintBackgroundStylex(definition: BackgroundDefinition, gradientFillFallbackColor?: string, colors?: ReturnType<typeof useColorSchemaStore>): Readonly<StylexValue>;
|
7
|
+
function getBlueprintBackgroundObjectStylex(definition: BackgroundDefinition, gradientFillFallbackColor?: string, colors?: ReturnType<typeof useColorSchemaStore>): {
|
8
|
+
borderTopLeftRadius?: StylexValue;
|
9
|
+
borderTopRightRadius?: StylexValue;
|
10
|
+
borderBottomRightRadius?: StylexValue;
|
11
|
+
borderBottomLeftRadius?: StylexValue;
|
12
|
+
border?: StylexValue;
|
13
|
+
background?: StylexValue;
|
14
|
+
borderTop?: StylexValue;
|
15
|
+
borderRight?: StylexValue;
|
16
|
+
borderBottom?: StylexValue;
|
17
|
+
borderLeft?: StylexValue;
|
18
|
+
} & {
|
19
|
+
background?: StylexValue;
|
20
|
+
backdropFilter?: StylexValue;
|
21
|
+
} & {
|
22
|
+
position?: StylexValue;
|
23
|
+
backgroundImage?: StylexValue;
|
24
|
+
backgroundPosition?: StylexValue;
|
25
|
+
backgroundRepeat?: StylexValue;
|
26
|
+
backgroundSize?: StylexValue;
|
27
|
+
width?: StylexValue;
|
28
|
+
height?: StylexValue;
|
29
|
+
$nest?: StylexValue;
|
30
|
+
};
|
31
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { Spacing } from "internal/fx/shared/models";
|
2
|
+
import { useSpacingBlueprintStore } from "../stores";
|
3
|
+
export declare namespace BlueprintValues {
|
4
|
+
function getBlueprintSpacingValue(value: any, blueprint?: ReturnType<typeof useSpacingBlueprintStore>): number;
|
5
|
+
function getBlueprintSpacingValues(value: Spacing, blueprint?: ReturnType<typeof useSpacingBlueprintStore>): Spacing;
|
6
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { BorderStylingDefinition } from "internal/fx/shared/models";
|
2
|
+
import { StylexValue } from "./Stylex";
|
3
|
+
import { useColorSchemaStore } from "../stores";
|
4
|
+
export declare namespace BorderStyling {
|
5
|
+
function getBlueprintBorderStylex(definition: BorderStylingDefinition, gradientFillFallbackColor?: string, colors?: ReturnType<typeof useColorSchemaStore>): Readonly<StylexValue>;
|
6
|
+
function getBlueprintBorderObjectStylex(definition: BorderStylingDefinition, gradientFill?: string, colors?: ReturnType<typeof useColorSchemaStore>): {
|
7
|
+
borderTopLeftRadius?: StylexValue;
|
8
|
+
borderTopRightRadius?: StylexValue;
|
9
|
+
borderBottomRightRadius?: StylexValue;
|
10
|
+
borderBottomLeftRadius?: StylexValue;
|
11
|
+
border?: StylexValue;
|
12
|
+
background?: StylexValue;
|
13
|
+
borderTop?: StylexValue;
|
14
|
+
borderRight?: StylexValue;
|
15
|
+
borderBottom?: StylexValue;
|
16
|
+
borderLeft?: StylexValue;
|
17
|
+
};
|
18
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export declare namespace colorStyling {
|
2
|
+
function dividingOpacity(dark: boolean): "rgba(255,255,255,0.15)" | "rgba(0,0,0,0.15)";
|
3
|
+
function backgroundOpacity(dark: boolean, opacity?: Number): string;
|
4
|
+
function backgroundOpacityOnColor(color: string, dark: boolean, opacity?: Number): any;
|
5
|
+
function getColorStylingx(color: string, opacity?: number): {
|
6
|
+
all: Readonly<import("./Stylex").StylexValue>;
|
7
|
+
background: import("./Stylex").StylexValue;
|
8
|
+
color: import("./Stylex").StylexValue;
|
9
|
+
};
|
10
|
+
}
|