@omnia/velcron 8.0.296-dev → 8.0.297-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/models/index.d.ts +1 -1
- package/internal-do-not-import-from-here/shared/models/index.js +1 -1
- package/internal-do-not-import-from-here/shared/models/{theming → theme}/Blueprints.d.ts +5 -5
- package/internal-do-not-import-from-here/shared/models/theme/Color.d.ts +13 -0
- package/internal-do-not-import-from-here/shared/models/theme/Color.js +2 -0
- package/internal-do-not-import-from-here/shared/models/theme/LegacyThemeDefinition.d.ts +28 -0
- package/internal-do-not-import-from-here/shared/models/theme/LegacyThemeDefinition.js +2 -0
- package/internal-do-not-import-from-here/shared/models/{theming/ThemingBase.d.ts → theme/ThemeBase.d.ts} +3 -3
- package/internal-do-not-import-from-here/shared/models/theme/ThemeBase.js +12 -0
- package/internal-do-not-import-from-here/shared/models/theme/ThemeBoot.d.ts +7 -0
- package/internal-do-not-import-from-here/shared/models/theme/ThemeBoot.js +2 -0
- package/internal-do-not-import-from-here/shared/models/{theming/ThemeDefinitionV2.d.ts → theme/ThemeDefinition.d.ts} +117 -14
- package/internal-do-not-import-from-here/shared/models/{theming/ThemeDefinitionV2.js → theme/ThemeDefinition.js} +4 -0
- package/internal-do-not-import-from-here/shared/models/{theming → theme}/Typography.d.ts +3 -10
- package/internal-do-not-import-from-here/shared/models/{theming → theme}/UseThemeMethods.d.ts +1 -1
- package/internal-do-not-import-from-here/shared/models/{theming → theme}/UseThemeMethods.js +28 -28
- package/internal-do-not-import-from-here/shared/models/{theming → theme}/index.d.ts +5 -3
- package/internal-do-not-import-from-here/shared/models/{theming → theme}/index.js +5 -3
- package/internal-do-not-import-from-here/shared/models/velcron/VelcronDefinition.d.ts +6 -1
- package/package.json +1 -1
- package/parser/VelcronStyles.d.ts +4 -4
- package/internal-do-not-import-from-here/shared/models/theming/ThemingBase.js +0 -12
- package/internal-do-not-import-from-here/shared/models/theming/ThemingDefinitionV3.d.ts +0 -44
- package/internal-do-not-import-from-here/shared/models/theming/ThemingDefinitionV3.js +0 -6
- /package/internal-do-not-import-from-here/shared/models/{theming → theme}/Blueprints.js +0 -0
- /package/internal-do-not-import-from-here/shared/models/{theming → theme}/SharedBlueprintMethods.d.ts +0 -0
- /package/internal-do-not-import-from-here/shared/models/{theming → theme}/SharedBlueprintMethods.js +0 -0
- /package/internal-do-not-import-from-here/shared/models/{theming → theme}/SharedColorMethods.d.ts +0 -0
- /package/internal-do-not-import-from-here/shared/models/{theming → theme}/SharedColorMethods.js +0 -0
- /package/internal-do-not-import-from-here/shared/models/{theming → theme}/Spacing.d.ts +0 -0
- /package/internal-do-not-import-from-here/shared/models/{theming → theme}/Spacing.js +0 -0
- /package/internal-do-not-import-from-here/shared/models/{theming → theme}/Typography.js +0 -0
- /package/internal-do-not-import-from-here/shared/models/{theming → theme}/useSpacingScaling.d.ts +0 -0
- /package/internal-do-not-import-from-here/shared/models/{theming → theme}/useSpacingScaling.js +0 -0
|
@@ -14,7 +14,7 @@ export * from "./OmniaSharedBootstrapData";
|
|
|
14
14
|
export * from "./StringExtensions";
|
|
15
15
|
export * from "./DynamicState";
|
|
16
16
|
export * from "./Id";
|
|
17
|
-
export * from "./
|
|
17
|
+
export * from "./theme";
|
|
18
18
|
export * from "./hub";
|
|
19
19
|
export * from "./velcron";
|
|
20
20
|
export * from "./DependencyInjection";
|
|
@@ -18,7 +18,7 @@ tslib_1.__exportStar(require("./OmniaSharedBootstrapData"), exports);
|
|
|
18
18
|
tslib_1.__exportStar(require("./StringExtensions"), exports);
|
|
19
19
|
tslib_1.__exportStar(require("./DynamicState"), exports);
|
|
20
20
|
tslib_1.__exportStar(require("./Id"), exports);
|
|
21
|
-
tslib_1.__exportStar(require("./
|
|
21
|
+
tslib_1.__exportStar(require("./theme"), exports);
|
|
22
22
|
tslib_1.__exportStar(require("./hub"), exports);
|
|
23
23
|
tslib_1.__exportStar(require("./velcron"), exports);
|
|
24
24
|
tslib_1.__exportStar(require("./DependencyInjection"), exports);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BackgroundDefinition, BlueprintsReference, ColorSchemaType, ColorValue, FillDefinitionValue } from "./
|
|
1
|
+
import { BackgroundDefinition, BlueprintsReference, ColorSchemaType, ColorValue, FillDefinitionValue } from "./ThemeDefinition";
|
|
2
2
|
import { SpacingDefinition, Spacing } from "./Spacing";
|
|
3
3
|
import { TypographyFontDefinition, TypographyValue } from "./Typography";
|
|
4
4
|
import { TypographyBlueprint } from "./Typography";
|
|
5
|
-
import {
|
|
5
|
+
import { ThemeBase } from "./ThemeBase";
|
|
6
6
|
import { VelcronAppDefinition, VelcronRendererResolverReference } from "../velcron";
|
|
7
7
|
import { guid } from "../Guid";
|
|
8
8
|
export interface BoxDimensions extends Spacing {
|
|
@@ -28,13 +28,13 @@ export interface ContainerBlueprint extends Blueprints, BlueprintsReference {
|
|
|
28
28
|
name?: string;
|
|
29
29
|
background?: BackgroundDefinition;
|
|
30
30
|
}
|
|
31
|
-
export interface TypographyBlueprints extends
|
|
31
|
+
export interface TypographyBlueprints extends ThemeBase {
|
|
32
32
|
primary: TypographyBlueprint;
|
|
33
33
|
}
|
|
34
34
|
export interface IFontBlueprints extends Blueprints, BlueprintsReference {
|
|
35
35
|
fonts: Array<TypographyFontDefinition>;
|
|
36
36
|
}
|
|
37
|
-
export interface SpacingBlueprints extends
|
|
37
|
+
export interface SpacingBlueprints extends ThemeBase {
|
|
38
38
|
primary: SpacingBlueprint;
|
|
39
39
|
}
|
|
40
40
|
export interface ChromeBlueprint {
|
|
@@ -49,7 +49,7 @@ export interface ChromeBlueprint {
|
|
|
49
49
|
spacing?: Spacing;
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
export interface ComponentBlueprints extends
|
|
52
|
+
export interface ComponentBlueprints extends ThemeBase {
|
|
53
53
|
buttons?: ButtonBlueprints;
|
|
54
54
|
tabs?: TabsBlueprints;
|
|
55
55
|
blocks?: ChromeBlueprints;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { guid } from "../Guid";
|
|
2
|
+
export interface LegacyThemeDefinition {
|
|
3
|
+
id: guid;
|
|
4
|
+
name: string;
|
|
5
|
+
readOnly: boolean;
|
|
6
|
+
colors: LegacyThemeDefinitionColors;
|
|
7
|
+
chrome: LegacyThemeColorDefinition;
|
|
8
|
+
body: LegacyThemeColorDefinition;
|
|
9
|
+
}
|
|
10
|
+
export interface LegacyThemeDefinitionColors {
|
|
11
|
+
primary: string;
|
|
12
|
+
secondary: string;
|
|
13
|
+
}
|
|
14
|
+
export interface LegacyThemeColorDefinition {
|
|
15
|
+
bg: string;
|
|
16
|
+
fg: string;
|
|
17
|
+
text: string;
|
|
18
|
+
darkBg: boolean;
|
|
19
|
+
darkFg: boolean;
|
|
20
|
+
border?: LegacyBorderDefinition;
|
|
21
|
+
}
|
|
22
|
+
export interface LegacyBorderDefinition {
|
|
23
|
+
color: string;
|
|
24
|
+
width: number;
|
|
25
|
+
elevation: number;
|
|
26
|
+
radiustop: number;
|
|
27
|
+
radiusbottom: number;
|
|
28
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { guid } from "../Guid";
|
|
2
|
-
export interface
|
|
2
|
+
export interface ThemeBase {
|
|
3
3
|
id: guid;
|
|
4
|
-
type?:
|
|
4
|
+
type?: ThemeTypes;
|
|
5
5
|
name?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare enum
|
|
7
|
+
export declare enum ThemeTypes {
|
|
8
8
|
Theme = 0,
|
|
9
9
|
ColorSchema = 1,
|
|
10
10
|
Typography = 2,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThemeTypes = void 0;
|
|
4
|
+
var ThemeTypes;
|
|
5
|
+
(function (ThemeTypes) {
|
|
6
|
+
ThemeTypes[ThemeTypes["Theme"] = 0] = "Theme";
|
|
7
|
+
ThemeTypes[ThemeTypes["ColorSchema"] = 1] = "ColorSchema";
|
|
8
|
+
ThemeTypes[ThemeTypes["Typography"] = 2] = "Typography";
|
|
9
|
+
ThemeTypes[ThemeTypes["Spacing"] = 3] = "Spacing";
|
|
10
|
+
ThemeTypes[ThemeTypes["Blueprints"] = 4] = "Blueprints";
|
|
11
|
+
ThemeTypes[ThemeTypes["Fonts"] = 5] = "Fonts";
|
|
12
|
+
})(ThemeTypes || (exports.ThemeTypes = ThemeTypes = {}));
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { guid } from "../Guid";
|
|
2
|
+
import { Id } from "../Id";
|
|
2
3
|
import { BoxDimensions, ButtonBlueprint, ComponentBlueprints, SpacingBlueprints, TypographyBlueprints } from "./Blueprints";
|
|
4
|
+
import { Color } from "./Color";
|
|
5
|
+
import { LegacyBorderDefinition, LegacyThemeDefinition } from "./LegacyThemeDefinition";
|
|
6
|
+
import { ThemeBase } from "./ThemeBase";
|
|
3
7
|
export type ThemeContextType = "default" | "admin" | "preview" | "color-context" | "designer";
|
|
4
8
|
export interface ColorTypeResult<resultType> {
|
|
5
9
|
base: resultType;
|
|
@@ -22,13 +26,6 @@ export interface ColorStyles {
|
|
|
22
26
|
color: object | string;
|
|
23
27
|
all: object | string;
|
|
24
28
|
}
|
|
25
|
-
export interface ColorSchema extends BlueprintsReference {
|
|
26
|
-
name: string;
|
|
27
|
-
base: ColorDefinition;
|
|
28
|
-
onBase: ColorDefinition;
|
|
29
|
-
container: ColorDefinition;
|
|
30
|
-
onContainer: ColorDefinition;
|
|
31
|
-
}
|
|
32
29
|
export interface ColorSchemas extends ColorSchemasReference {
|
|
33
30
|
primary: ColorSchema;
|
|
34
31
|
secondary: ColorSchema;
|
|
@@ -69,13 +66,11 @@ export interface ThemeDefinitionReference {
|
|
|
69
66
|
spacing: BlueprintsReference;
|
|
70
67
|
components: BlueprintsReference;
|
|
71
68
|
}
|
|
72
|
-
export interface
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
spacing: SpacingBlueprints;
|
|
78
|
-
components: ComponentBlueprints;
|
|
69
|
+
export interface ResolvedThemeDefinition extends ThemeBase {
|
|
70
|
+
colors?: ColorSchemas;
|
|
71
|
+
typography?: TypographyBlueprints;
|
|
72
|
+
spacing?: SpacingBlueprints;
|
|
73
|
+
components?: ComponentBlueprints;
|
|
79
74
|
}
|
|
80
75
|
export interface ThemeSelection {
|
|
81
76
|
adminThemeId?: guid;
|
|
@@ -148,6 +143,7 @@ export type BackgroundMedia = "image" | "video";
|
|
|
148
143
|
export interface BackgroundMediaDefinition {
|
|
149
144
|
type: BackgroundMedia;
|
|
150
145
|
src: string;
|
|
146
|
+
position?: string;
|
|
151
147
|
}
|
|
152
148
|
export interface FillDefinition {
|
|
153
149
|
colors: Array<ColorValue | ColorGradientValue>;
|
|
@@ -168,3 +164,110 @@ export interface BorderStylingDefinition {
|
|
|
168
164
|
fill?: FillDefinition;
|
|
169
165
|
pattern?: "solid" | "dotted" | "dashed";
|
|
170
166
|
}
|
|
167
|
+
export interface ThemeDefinitionSettings {
|
|
168
|
+
items: Array<LegacyThemeDefinition>;
|
|
169
|
+
}
|
|
170
|
+
export interface ThemeColors {
|
|
171
|
+
primary: Color;
|
|
172
|
+
secondary: Color;
|
|
173
|
+
}
|
|
174
|
+
export interface ThemeStyling {
|
|
175
|
+
bg: {
|
|
176
|
+
color: Color;
|
|
177
|
+
css: string;
|
|
178
|
+
dark: boolean;
|
|
179
|
+
};
|
|
180
|
+
fg: {
|
|
181
|
+
color: Color;
|
|
182
|
+
css: string;
|
|
183
|
+
dark: boolean;
|
|
184
|
+
text: {
|
|
185
|
+
color: Color;
|
|
186
|
+
css: string;
|
|
187
|
+
csslighter1: string;
|
|
188
|
+
csslighter2: string;
|
|
189
|
+
csslighter3: string;
|
|
190
|
+
csslighter4: string;
|
|
191
|
+
csslighter5: string;
|
|
192
|
+
csslighter6: string;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
text: {
|
|
196
|
+
color: Color;
|
|
197
|
+
css: string;
|
|
198
|
+
csslighter1: string;
|
|
199
|
+
csslighter2: string;
|
|
200
|
+
csslighter3: string;
|
|
201
|
+
csslighter4: string;
|
|
202
|
+
csslighter5: string;
|
|
203
|
+
csslighter6: string;
|
|
204
|
+
};
|
|
205
|
+
components: {
|
|
206
|
+
color: Color;
|
|
207
|
+
text: {
|
|
208
|
+
color: Color;
|
|
209
|
+
};
|
|
210
|
+
expansionPanel: {
|
|
211
|
+
css: string;
|
|
212
|
+
};
|
|
213
|
+
skeletonLoader: {
|
|
214
|
+
css: string;
|
|
215
|
+
};
|
|
216
|
+
slider: {
|
|
217
|
+
color: string;
|
|
218
|
+
trackColor: string;
|
|
219
|
+
};
|
|
220
|
+
tabs: {
|
|
221
|
+
css: string;
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
border: LegacyBorderDefinition;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
*Theme Definition
|
|
228
|
+
*
|
|
229
|
+
*/
|
|
230
|
+
export interface ThemeTargetRegistration {
|
|
231
|
+
id: guid;
|
|
232
|
+
title: string;
|
|
233
|
+
defaultThemeDefinitionId: guid;
|
|
234
|
+
defaultAccessibilityDefinitionId: guid;
|
|
235
|
+
}
|
|
236
|
+
export interface ThemeTargetMapping {
|
|
237
|
+
id: guid;
|
|
238
|
+
targetRegistrationId: guid;
|
|
239
|
+
default: LegacyThemeDefinition;
|
|
240
|
+
accessibility?: LegacyThemeDefinition;
|
|
241
|
+
}
|
|
242
|
+
export type ColorSchemaId = Id<guid, "ColorSchemaId">;
|
|
243
|
+
export declare function ColorSchemaId(id: guid): ColorSchemaId;
|
|
244
|
+
export type ThemeDefinitionId = Id<guid, "ThemeDefinitionId">;
|
|
245
|
+
export declare function ThemeDefinitionId(id: guid): ThemeDefinitionId;
|
|
246
|
+
export interface ColorSchemasReferenceId {
|
|
247
|
+
primaryId: ColorSchemaId;
|
|
248
|
+
secondaryId: ColorSchemaId;
|
|
249
|
+
accent1Id: ColorSchemaId;
|
|
250
|
+
accent2Id: ColorSchemaId;
|
|
251
|
+
accent3Id: ColorSchemaId;
|
|
252
|
+
accent4Id: ColorSchemaId;
|
|
253
|
+
accent5Id: ColorSchemaId;
|
|
254
|
+
neutralId: ColorSchemaId;
|
|
255
|
+
backgroundId: ColorSchemaId;
|
|
256
|
+
errorId: ColorSchemaId;
|
|
257
|
+
infoId: ColorSchemaId;
|
|
258
|
+
warningId: ColorSchemaId;
|
|
259
|
+
successId: ColorSchemaId;
|
|
260
|
+
notificationId: ColorSchemaId;
|
|
261
|
+
}
|
|
262
|
+
export interface ThemeDefinition extends ThemeBase {
|
|
263
|
+
colors?: ColorSchemasReferenceId;
|
|
264
|
+
typographyId?: ThemeDefinitionId;
|
|
265
|
+
spacingId?: ThemeDefinitionId;
|
|
266
|
+
componentsId?: ThemeDefinitionId;
|
|
267
|
+
}
|
|
268
|
+
export interface ColorSchema extends ThemeBase {
|
|
269
|
+
base: ColorDefinition;
|
|
270
|
+
onBase: ColorDefinition;
|
|
271
|
+
container: ColorDefinition;
|
|
272
|
+
onContainer: ColorDefinition;
|
|
273
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RadialGradientShapes = exports.ColorTypes = exports.ColorSchemaTypes = void 0;
|
|
4
|
+
exports.ColorSchemaId = ColorSchemaId;
|
|
5
|
+
exports.ThemeDefinitionId = ThemeDefinitionId;
|
|
4
6
|
var ColorSchemaTypes;
|
|
5
7
|
(function (ColorSchemaTypes) {
|
|
6
8
|
ColorSchemaTypes["primary"] = "primary";
|
|
@@ -31,3 +33,5 @@ var RadialGradientShapes;
|
|
|
31
33
|
RadialGradientShapes[RadialGradientShapes["circle"] = 0] = "circle";
|
|
32
34
|
RadialGradientShapes[RadialGradientShapes["ellipse"] = 1] = "ellipse";
|
|
33
35
|
})(RadialGradientShapes || (exports.RadialGradientShapes = RadialGradientShapes = {}));
|
|
36
|
+
function ColorSchemaId(id) { return id; }
|
|
37
|
+
function ThemeDefinitionId(id) { return id; }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { guid } from "../Guid";
|
|
2
|
-
import { FillDefinition } from "./
|
|
3
|
-
import {
|
|
4
|
-
export interface
|
|
2
|
+
import { FillDefinition } from "./ThemeDefinition";
|
|
3
|
+
import { ThemeBase } from "./ThemeBase";
|
|
4
|
+
export interface TypographyFontDefinition extends ThemeBase {
|
|
5
5
|
family: string;
|
|
6
6
|
cdn?: string;
|
|
7
7
|
manifestId?: guid;
|
|
@@ -68,13 +68,6 @@ export interface TypographyTypeBreakPoint {
|
|
|
68
68
|
lineHeight: number;
|
|
69
69
|
letterSpacing?: number;
|
|
70
70
|
}
|
|
71
|
-
export interface TypographyFontDefinition {
|
|
72
|
-
id?: guid;
|
|
73
|
-
name?: string;
|
|
74
|
-
family: string;
|
|
75
|
-
cdn?: string;
|
|
76
|
-
manifestId?: guid;
|
|
77
|
-
}
|
|
78
71
|
export interface TypographyFontRef {
|
|
79
72
|
family: string;
|
|
80
73
|
}
|
package/internal-do-not-import-from-here/shared/models/{theming → theme}/UseThemeMethods.d.ts
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ContainerBlueprint, ContainerVariant } from "./Blueprints";
|
|
2
|
-
import { ColorDefinition, ColorSchema, ColorSchemaType, ColorSchemaTypes, ColorType, ColorTypes } from "./
|
|
2
|
+
import { ColorDefinition, ColorSchema, ColorSchemaType, ColorSchemaTypes, ColorType, ColorTypes } from "./ThemeDefinition";
|
|
3
3
|
export declare function useThemeMethods(getThemeDefinition: () => any): {
|
|
4
4
|
containerBlueprint: (type: ContainerVariant | ContainerBlueprint | string) => any;
|
|
5
5
|
colorSchema: (colorSchemaType: ColorSchemaTypes | ColorSchemaType) => ColorSchema;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useThemeMethods = useThemeMethods;
|
|
4
|
-
const
|
|
4
|
+
const ThemeDefinition_1 = require("./ThemeDefinition");
|
|
5
5
|
// temp change ThemeDefinitionInstance to any because fx/shared can't reference higher level fx/ux
|
|
6
6
|
function useThemeMethods(getThemeDefinition) {
|
|
7
7
|
function containerBlueprint(type) {
|
|
@@ -23,85 +23,85 @@ function useThemeMethods(getThemeDefinition) {
|
|
|
23
23
|
return null;
|
|
24
24
|
}
|
|
25
25
|
function colorSchema(colorSchemaType) {
|
|
26
|
-
if (colorSchemaType ===
|
|
26
|
+
if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.primary) {
|
|
27
27
|
return getThemeDefinition().colors.primary;
|
|
28
28
|
}
|
|
29
|
-
else if (colorSchemaType ===
|
|
29
|
+
else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.secondary) {
|
|
30
30
|
return getThemeDefinition().colors.secondary;
|
|
31
31
|
}
|
|
32
|
-
else if (colorSchemaType ===
|
|
32
|
+
else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.accent1) {
|
|
33
33
|
return getThemeDefinition().colors.accent1;
|
|
34
34
|
}
|
|
35
|
-
else if (colorSchemaType ===
|
|
35
|
+
else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.accent2) {
|
|
36
36
|
return getThemeDefinition().colors.accent2;
|
|
37
37
|
}
|
|
38
|
-
else if (colorSchemaType ===
|
|
38
|
+
else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.accent3) {
|
|
39
39
|
return getThemeDefinition().colors.accent3;
|
|
40
40
|
}
|
|
41
|
-
else if (colorSchemaType ===
|
|
41
|
+
else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.accent4) {
|
|
42
42
|
return getThemeDefinition().colors.accent4;
|
|
43
43
|
}
|
|
44
|
-
else if (colorSchemaType ===
|
|
44
|
+
else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.accent5) {
|
|
45
45
|
return getThemeDefinition().colors.accent5;
|
|
46
46
|
}
|
|
47
|
-
else if (colorSchemaType ===
|
|
47
|
+
else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.background) {
|
|
48
48
|
return getThemeDefinition().colors.background;
|
|
49
49
|
}
|
|
50
|
-
else if (colorSchemaType ===
|
|
50
|
+
else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.neutral) {
|
|
51
51
|
return getThemeDefinition().colors.neutral;
|
|
52
52
|
}
|
|
53
|
-
else if (colorSchemaType ===
|
|
53
|
+
else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.error) {
|
|
54
54
|
return getThemeDefinition().colors.error;
|
|
55
55
|
}
|
|
56
|
-
else if (colorSchemaType ===
|
|
56
|
+
else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.success) {
|
|
57
57
|
return getThemeDefinition().colors.success;
|
|
58
58
|
}
|
|
59
59
|
return getThemeDefinition().colors.background;
|
|
60
60
|
}
|
|
61
61
|
function color(colorSchemaType, colorType) {
|
|
62
62
|
const mappedColorSchema = colorSchema(colorSchemaType);
|
|
63
|
-
if (colorType ===
|
|
63
|
+
if (colorType === ThemeDefinition_1.ColorTypes.base) {
|
|
64
64
|
return mappedColorSchema.base.color;
|
|
65
65
|
}
|
|
66
|
-
else if (colorType ===
|
|
66
|
+
else if (colorType === ThemeDefinition_1.ColorTypes.onBase) {
|
|
67
67
|
return mappedColorSchema.onBase.color;
|
|
68
68
|
}
|
|
69
|
-
else if (colorType ===
|
|
69
|
+
else if (colorType === ThemeDefinition_1.ColorTypes.container) {
|
|
70
70
|
return mappedColorSchema.container.color;
|
|
71
71
|
}
|
|
72
|
-
else if (colorType ===
|
|
72
|
+
else if (colorType === ThemeDefinition_1.ColorTypes.onContainer) {
|
|
73
73
|
return mappedColorSchema.onContainer.color;
|
|
74
74
|
}
|
|
75
75
|
return colorType;
|
|
76
76
|
}
|
|
77
77
|
function colorDefinition(colorSchemaType, colorType) {
|
|
78
78
|
const mappedColorSchema = colorSchema(colorSchemaType);
|
|
79
|
-
if (colorType ===
|
|
79
|
+
if (colorType === ThemeDefinition_1.ColorTypes.base) {
|
|
80
80
|
return mappedColorSchema.base;
|
|
81
81
|
}
|
|
82
|
-
else if (colorType ===
|
|
82
|
+
else if (colorType === ThemeDefinition_1.ColorTypes.onBase) {
|
|
83
83
|
return mappedColorSchema.onBase;
|
|
84
84
|
}
|
|
85
|
-
else if (colorType ===
|
|
85
|
+
else if (colorType === ThemeDefinition_1.ColorTypes.container) {
|
|
86
86
|
return mappedColorSchema.container;
|
|
87
87
|
}
|
|
88
|
-
else if (colorType ===
|
|
88
|
+
else if (colorType === ThemeDefinition_1.ColorTypes.onContainer) {
|
|
89
89
|
return mappedColorSchema.onContainer;
|
|
90
90
|
}
|
|
91
91
|
return mappedColorSchema.base;
|
|
92
92
|
}
|
|
93
93
|
function complementaryColorType(colorType) {
|
|
94
|
-
if (colorType ===
|
|
95
|
-
return
|
|
94
|
+
if (colorType === ThemeDefinition_1.ColorTypes.base) {
|
|
95
|
+
return ThemeDefinition_1.ColorTypes.onBase;
|
|
96
96
|
}
|
|
97
|
-
else if (colorType ===
|
|
98
|
-
return
|
|
97
|
+
else if (colorType === ThemeDefinition_1.ColorTypes.onBase) {
|
|
98
|
+
return ThemeDefinition_1.ColorTypes.base;
|
|
99
99
|
}
|
|
100
|
-
else if (colorType ===
|
|
101
|
-
return
|
|
100
|
+
else if (colorType === ThemeDefinition_1.ColorTypes.container) {
|
|
101
|
+
return ThemeDefinition_1.ColorTypes.onContainer;
|
|
102
102
|
}
|
|
103
|
-
else if (colorType ===
|
|
104
|
-
return
|
|
103
|
+
else if (colorType === ThemeDefinition_1.ColorTypes.onContainer) {
|
|
104
|
+
return ThemeDefinition_1.ColorTypes.container;
|
|
105
105
|
}
|
|
106
106
|
return colorType;
|
|
107
107
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./ThemingDefinitionV3";
|
|
1
|
+
export * from "./ThemeBase";
|
|
2
|
+
export * from "./ThemeDefinition";
|
|
4
3
|
export * from "./Typography";
|
|
5
4
|
export * from "./UseThemeMethods";
|
|
6
5
|
export * from "./Spacing";
|
|
@@ -8,3 +7,6 @@ export * from "./SharedBlueprintMethods";
|
|
|
8
7
|
export * from "./SharedColorMethods";
|
|
9
8
|
export * from "./Blueprints";
|
|
10
9
|
export * from "./useSpacingScaling";
|
|
10
|
+
export * from "./Color";
|
|
11
|
+
export * from "./ThemeBoot";
|
|
12
|
+
export * from "./LegacyThemeDefinition";
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./
|
|
5
|
-
tslib_1.__exportStar(require("./
|
|
6
|
-
tslib_1.__exportStar(require("./ThemingDefinitionV3"), exports);
|
|
4
|
+
tslib_1.__exportStar(require("./ThemeBase"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./ThemeDefinition"), exports);
|
|
7
6
|
tslib_1.__exportStar(require("./Typography"), exports);
|
|
8
7
|
//export * from "./OmniaThemes";
|
|
9
8
|
tslib_1.__exportStar(require("./UseThemeMethods"), exports);
|
|
@@ -12,3 +11,6 @@ tslib_1.__exportStar(require("./SharedBlueprintMethods"), exports);
|
|
|
12
11
|
tslib_1.__exportStar(require("./SharedColorMethods"), exports);
|
|
13
12
|
tslib_1.__exportStar(require("./Blueprints"), exports);
|
|
14
13
|
tslib_1.__exportStar(require("./useSpacingScaling"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./Color"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./ThemeBoot"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./LegacyThemeDefinition"), exports);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ContainerBlueprint, ContainerVariant, IFontAwesomeIcon, VelcronColorStyling, VelcronOverflowValues } from "@omnia/fx-models";
|
|
2
2
|
import { DynamicState } from "../DynamicState";
|
|
3
3
|
import { VelcronEvent, VelcronOnActiveEvent, VelcronOnEditModeEvent, VelcronOnLoadEvent, VelcronOnPersistingStateEvent, VelcronOnSavingEvent } from "./VelcronEvents";
|
|
4
|
+
import { AnimationOptionsWithOverrides, VariantDefinition, Variants } from "motion";
|
|
4
5
|
/**
|
|
5
6
|
* Velcron definition base
|
|
6
7
|
*/
|
|
@@ -76,7 +77,11 @@ export interface VelcronEditor<TSettings = any> {
|
|
|
76
77
|
}
|
|
77
78
|
export interface VelcronLazyApp {
|
|
78
79
|
minHeight?: VelcronBindableProp<number | string>;
|
|
79
|
-
|
|
80
|
+
initial?: false | VariantDefinition;
|
|
81
|
+
animate?: VariantDefinition;
|
|
82
|
+
inView?: VariantDefinition;
|
|
83
|
+
variants?: Variants;
|
|
84
|
+
transition?: AnimationOptionsWithOverrides;
|
|
80
85
|
}
|
|
81
86
|
export interface VelcronAppDefinition<TState extends DynamicState = DynamicState> extends VelcronDefinitionBase, VelcronColorStyling {
|
|
82
87
|
type: "velcron";
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { VelcronBorder, VelcronColorStyling, VelcronDefinitionHasEffects, VelcronDefinitionHasOverflow, VelcronDimensions, VelcronEffects, VelcronRenderContext } from "../models";
|
|
2
2
|
import { VelcronUnitProvider } from "../models/VelcronUnitProvider";
|
|
3
3
|
import { SpacingBlueprint, VelcronBindableProp, VelcronDefinition } from "..";
|
|
4
|
-
import { CSSProperties,
|
|
4
|
+
import { CSSProperties, StylexValue } from "internal/fx/ux/Styles.stylex";
|
|
5
5
|
export declare class VelcronStyles {
|
|
6
|
-
static styleProvider: (baseStyles: CSSProperties, definition: VelcronDefinition, renderCtx: VelcronRenderContext) =>
|
|
6
|
+
static styleProvider: (baseStyles: CSSProperties, definition: VelcronDefinition, renderCtx: VelcronRenderContext) => StylexValue;
|
|
7
7
|
static effectsProvider: (effects: VelcronEffects, renderCtx: VelcronRenderContext) => VelcronEffects;
|
|
8
8
|
static unitProvider: VelcronUnitProvider;
|
|
9
9
|
spacingScaling: {
|
|
@@ -20,13 +20,13 @@ export declare class VelcronStyles {
|
|
|
20
20
|
scaling: (value: import("..").SpacingValue) => boolean;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
-
static registerStyleProvider(fn: (styleBase: CSSProperties, definition: VelcronDefinition, renderCtx: VelcronRenderContext) =>
|
|
23
|
+
static registerStyleProvider(fn: (styleBase: CSSProperties, definition: VelcronDefinition, renderCtx: VelcronRenderContext) => StylexValue, unitProvider: VelcronUnitProvider): void;
|
|
24
24
|
static registerEffectsProvider(fn: (effects: VelcronEffects, renderCtx: VelcronRenderContext) => VelcronEffects): void;
|
|
25
25
|
static applyEffects(definition: VelcronDefinitionHasEffects, renderCtx: VelcronRenderContext, applyTo: (effects: VelcronEffects) => any): any;
|
|
26
26
|
static insertBackgroundColor(styleBase: CSSProperties, color: VelcronColorStyling, renderCtx: VelcronRenderContext): void;
|
|
27
27
|
static insertBorderRadiusStyles(styleBase: CSSProperties, settings: VelcronDimensions, renderCtx: VelcronRenderContext): void;
|
|
28
28
|
static insertBorderStyles(styleBase: CSSProperties, borderSettings: VelcronBorder, renderCtx: VelcronRenderContext): void;
|
|
29
|
-
static create(definition: VelcronDefinition, renderCtx: VelcronRenderContext):
|
|
29
|
+
static create(definition: VelcronDefinition, renderCtx: VelcronRenderContext): StylexValue;
|
|
30
30
|
static applySpacingDimension(value: string | number, spacing: SpacingBlueprint): string | number;
|
|
31
31
|
static applyOverflow(definition: VelcronDefinitionHasOverflow, renderCtx: VelcronRenderContext, styleBase: any): void;
|
|
32
32
|
static applySpacingStyles<T>(spacing: VelcronBindableProp<T>, renderCtx: VelcronRenderContext, styleBase: any, spacingDef: SpacingBlueprint, styleType: string, objectIsDatabound?: (obj: T) => void, additionalPropsToDataBind?: object): void;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ThemingTypes = void 0;
|
|
4
|
-
var ThemingTypes;
|
|
5
|
-
(function (ThemingTypes) {
|
|
6
|
-
ThemingTypes[ThemingTypes["Theme"] = 0] = "Theme";
|
|
7
|
-
ThemingTypes[ThemingTypes["ColorSchema"] = 1] = "ColorSchema";
|
|
8
|
-
ThemingTypes[ThemingTypes["Typography"] = 2] = "Typography";
|
|
9
|
-
ThemingTypes[ThemingTypes["Spacing"] = 3] = "Spacing";
|
|
10
|
-
ThemingTypes[ThemingTypes["Blueprints"] = 4] = "Blueprints";
|
|
11
|
-
ThemingTypes[ThemingTypes["Fonts"] = 5] = "Fonts";
|
|
12
|
-
})(ThemingTypes || (exports.ThemingTypes = ThemingTypes = {}));
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { guid } from "../Guid";
|
|
2
|
-
import { Id } from "../Id";
|
|
3
|
-
import { ComponentBlueprints, SpacingBlueprints, TypographyBlueprints } from "./Blueprints";
|
|
4
|
-
import { ColorDefinition, ColorSchemas } from "./ThemeDefinitionV2";
|
|
5
|
-
import { ThemingBase } from "./ThemingBase";
|
|
6
|
-
export type ColorSchemaId = Id<guid, "ColorSchemaId">;
|
|
7
|
-
export declare function ColorSchemaId(id: guid): ColorSchemaId;
|
|
8
|
-
export type ThemeDefinitionId = Id<guid, "ThemeDefinitionId">;
|
|
9
|
-
export declare function ThemeDefinitionId(id: guid): ThemeDefinitionId;
|
|
10
|
-
export interface ColorSchemasReferenceV2 {
|
|
11
|
-
primaryId: ColorSchemaId;
|
|
12
|
-
secondaryId: ColorSchemaId;
|
|
13
|
-
accent1Id: ColorSchemaId;
|
|
14
|
-
accent2Id: ColorSchemaId;
|
|
15
|
-
accent3Id: ColorSchemaId;
|
|
16
|
-
accent4Id: ColorSchemaId;
|
|
17
|
-
accent5Id: ColorSchemaId;
|
|
18
|
-
neutralId: ColorSchemaId;
|
|
19
|
-
backgroundId: ColorSchemaId;
|
|
20
|
-
errorId: ColorSchemaId;
|
|
21
|
-
infoId: ColorSchemaId;
|
|
22
|
-
warningId: ColorSchemaId;
|
|
23
|
-
successId: ColorSchemaId;
|
|
24
|
-
notificationId: ColorSchemaId;
|
|
25
|
-
}
|
|
26
|
-
export interface ThemeDefinitionV3 extends ThemingBase {
|
|
27
|
-
name?: string;
|
|
28
|
-
colors?: ColorSchemasReferenceV2;
|
|
29
|
-
typographyId?: ThemeDefinitionId;
|
|
30
|
-
spacingId?: ThemeDefinitionId;
|
|
31
|
-
componentsId?: ThemeDefinitionId;
|
|
32
|
-
}
|
|
33
|
-
export interface ColorSchemaV3 extends ThemingBase {
|
|
34
|
-
base: ColorDefinition;
|
|
35
|
-
onBase: ColorDefinition;
|
|
36
|
-
container: ColorDefinition;
|
|
37
|
-
onContainer: ColorDefinition;
|
|
38
|
-
}
|
|
39
|
-
export interface ResolvedThemeDefinition extends ThemingBase {
|
|
40
|
-
colors?: ColorSchemas;
|
|
41
|
-
typography?: TypographyBlueprints;
|
|
42
|
-
spacing?: SpacingBlueprints;
|
|
43
|
-
components?: ComponentBlueprints;
|
|
44
|
-
}
|
|
File without changes
|
|
File without changes
|
/package/internal-do-not-import-from-here/shared/models/{theming → theme}/SharedBlueprintMethods.js
RENAMED
|
File without changes
|
/package/internal-do-not-import-from-here/shared/models/{theming → theme}/SharedColorMethods.d.ts
RENAMED
|
File without changes
|
/package/internal-do-not-import-from-here/shared/models/{theming → theme}/SharedColorMethods.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/internal-do-not-import-from-here/shared/models/{theming → theme}/useSpacingScaling.d.ts
RENAMED
|
File without changes
|
/package/internal-do-not-import-from-here/shared/models/{theming → theme}/useSpacingScaling.js
RENAMED
|
File without changes
|