@omnia/velcron 8.0.295-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.
Files changed (38) hide show
  1. package/internal-do-not-import-from-here/shared/models/index.d.ts +1 -1
  2. package/internal-do-not-import-from-here/shared/models/index.js +1 -1
  3. package/internal-do-not-import-from-here/shared/models/{theming → theme}/Blueprints.d.ts +5 -5
  4. package/internal-do-not-import-from-here/shared/models/theme/Color.d.ts +13 -0
  5. package/internal-do-not-import-from-here/shared/models/theme/Color.js +2 -0
  6. package/internal-do-not-import-from-here/shared/models/theme/LegacyThemeDefinition.d.ts +28 -0
  7. package/internal-do-not-import-from-here/shared/models/theme/LegacyThemeDefinition.js +2 -0
  8. package/internal-do-not-import-from-here/shared/models/{theming/ThemingBase.d.ts → theme/ThemeBase.d.ts} +3 -3
  9. package/internal-do-not-import-from-here/shared/models/theme/ThemeBase.js +12 -0
  10. package/internal-do-not-import-from-here/shared/models/theme/ThemeBoot.d.ts +7 -0
  11. package/internal-do-not-import-from-here/shared/models/theme/ThemeBoot.js +2 -0
  12. package/internal-do-not-import-from-here/shared/models/{theming/ThemeDefinitionV2.d.ts → theme/ThemeDefinition.d.ts} +117 -14
  13. package/internal-do-not-import-from-here/shared/models/{theming/ThemeDefinitionV2.js → theme/ThemeDefinition.js} +4 -0
  14. package/internal-do-not-import-from-here/shared/models/{theming → theme}/Typography.d.ts +3 -10
  15. package/internal-do-not-import-from-here/shared/models/{theming → theme}/UseThemeMethods.d.ts +1 -1
  16. package/internal-do-not-import-from-here/shared/models/{theming → theme}/UseThemeMethods.js +28 -28
  17. package/internal-do-not-import-from-here/shared/models/{theming → theme}/index.d.ts +5 -3
  18. package/internal-do-not-import-from-here/shared/models/{theming → theme}/index.js +5 -3
  19. package/internal-do-not-import-from-here/shared/models/velcron/VelcronDefinition.d.ts +13 -2
  20. package/models/VelcronDefinitions.d.ts +13 -17
  21. package/package.json +1 -1
  22. package/parser/VelcronDataBinder.d.ts +1 -1
  23. package/parser/VelcronDataBinder.js +3 -2
  24. package/parser/VelcronStyles.d.ts +7 -6
  25. package/parser/VelcronStyles.js +68 -66
  26. package/internal-do-not-import-from-here/shared/models/theming/ThemingBase.js +0 -12
  27. package/internal-do-not-import-from-here/shared/models/theming/ThemingDefinitionV3.d.ts +0 -44
  28. package/internal-do-not-import-from-here/shared/models/theming/ThemingDefinitionV3.js +0 -6
  29. /package/internal-do-not-import-from-here/shared/models/{theming → theme}/Blueprints.js +0 -0
  30. /package/internal-do-not-import-from-here/shared/models/{theming → theme}/SharedBlueprintMethods.d.ts +0 -0
  31. /package/internal-do-not-import-from-here/shared/models/{theming → theme}/SharedBlueprintMethods.js +0 -0
  32. /package/internal-do-not-import-from-here/shared/models/{theming → theme}/SharedColorMethods.d.ts +0 -0
  33. /package/internal-do-not-import-from-here/shared/models/{theming → theme}/SharedColorMethods.js +0 -0
  34. /package/internal-do-not-import-from-here/shared/models/{theming → theme}/Spacing.d.ts +0 -0
  35. /package/internal-do-not-import-from-here/shared/models/{theming → theme}/Spacing.js +0 -0
  36. /package/internal-do-not-import-from-here/shared/models/{theming → theme}/Typography.js +0 -0
  37. /package/internal-do-not-import-from-here/shared/models/{theming → theme}/useSpacingScaling.d.ts +0 -0
  38. /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 "./theming";
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("./theming"), exports);
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 "./ThemeDefinitionV2";
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 { ThemingBase } from "./ThemingBase";
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 ThemingBase {
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 ThemingBase {
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 ThemingBase {
52
+ export interface ComponentBlueprints extends ThemeBase {
53
53
  buttons?: ButtonBlueprints;
54
54
  tabs?: TabsBlueprints;
55
55
  blocks?: ChromeBlueprints;
@@ -0,0 +1,13 @@
1
+ export interface Color {
2
+ base: string;
3
+ lighten5: string;
4
+ lighten4: string;
5
+ lighten3: string;
6
+ lighten2: string;
7
+ lighten1: string;
8
+ darken1: string;
9
+ darken2: string;
10
+ darken3: string;
11
+ darken4: string;
12
+ dark: boolean;
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,10 +1,10 @@
1
1
  import { guid } from "../Guid";
2
- export interface ThemingBase {
2
+ export interface ThemeBase {
3
3
  id: guid;
4
- type?: ThemingTypes;
4
+ type?: ThemeTypes;
5
5
  name?: string;
6
6
  }
7
- export declare enum ThemingTypes {
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 = {}));
@@ -0,0 +1,7 @@
1
+ import { ResolvedThemeDefinition } from "./ThemeDefinition";
2
+ export interface ThemeBoot {
3
+ hashs: Map<string, string>;
4
+ version: string;
5
+ adminTheme: ResolvedThemeDefinition;
6
+ defaultTheme: ResolvedThemeDefinition;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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 ThemeDefinitionV2 extends ThemeDefinitionReference {
73
- id: guid;
74
- name?: string;
75
- colors: ColorSchemas;
76
- typography: TypographyBlueprints;
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 "./ThemeDefinitionV2";
3
- import { ThemingBase } from "./ThemingBase";
4
- export interface TypographyFontDefinitionV2 extends ThemingBase {
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
  }
@@ -1,5 +1,5 @@
1
1
  import { ContainerBlueprint, ContainerVariant } from "./Blueprints";
2
- import { ColorDefinition, ColorSchema, ColorSchemaType, ColorSchemaTypes, ColorType, ColorTypes } from "./ThemeDefinitionV2";
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 ThemeDefinitionV2_1 = require("./ThemeDefinitionV2");
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 === ThemeDefinitionV2_1.ColorSchemaTypes.primary) {
26
+ if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.primary) {
27
27
  return getThemeDefinition().colors.primary;
28
28
  }
29
- else if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.secondary) {
29
+ else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.secondary) {
30
30
  return getThemeDefinition().colors.secondary;
31
31
  }
32
- else if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.accent1) {
32
+ else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.accent1) {
33
33
  return getThemeDefinition().colors.accent1;
34
34
  }
35
- else if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.accent2) {
35
+ else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.accent2) {
36
36
  return getThemeDefinition().colors.accent2;
37
37
  }
38
- else if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.accent3) {
38
+ else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.accent3) {
39
39
  return getThemeDefinition().colors.accent3;
40
40
  }
41
- else if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.accent4) {
41
+ else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.accent4) {
42
42
  return getThemeDefinition().colors.accent4;
43
43
  }
44
- else if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.accent5) {
44
+ else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.accent5) {
45
45
  return getThemeDefinition().colors.accent5;
46
46
  }
47
- else if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.background) {
47
+ else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.background) {
48
48
  return getThemeDefinition().colors.background;
49
49
  }
50
- else if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.neutral) {
50
+ else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.neutral) {
51
51
  return getThemeDefinition().colors.neutral;
52
52
  }
53
- else if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.error) {
53
+ else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.error) {
54
54
  return getThemeDefinition().colors.error;
55
55
  }
56
- else if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.success) {
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 === ThemeDefinitionV2_1.ColorTypes.base) {
63
+ if (colorType === ThemeDefinition_1.ColorTypes.base) {
64
64
  return mappedColorSchema.base.color;
65
65
  }
66
- else if (colorType === ThemeDefinitionV2_1.ColorTypes.onBase) {
66
+ else if (colorType === ThemeDefinition_1.ColorTypes.onBase) {
67
67
  return mappedColorSchema.onBase.color;
68
68
  }
69
- else if (colorType === ThemeDefinitionV2_1.ColorTypes.container) {
69
+ else if (colorType === ThemeDefinition_1.ColorTypes.container) {
70
70
  return mappedColorSchema.container.color;
71
71
  }
72
- else if (colorType === ThemeDefinitionV2_1.ColorTypes.onContainer) {
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 === ThemeDefinitionV2_1.ColorTypes.base) {
79
+ if (colorType === ThemeDefinition_1.ColorTypes.base) {
80
80
  return mappedColorSchema.base;
81
81
  }
82
- else if (colorType === ThemeDefinitionV2_1.ColorTypes.onBase) {
82
+ else if (colorType === ThemeDefinition_1.ColorTypes.onBase) {
83
83
  return mappedColorSchema.onBase;
84
84
  }
85
- else if (colorType === ThemeDefinitionV2_1.ColorTypes.container) {
85
+ else if (colorType === ThemeDefinition_1.ColorTypes.container) {
86
86
  return mappedColorSchema.container;
87
87
  }
88
- else if (colorType === ThemeDefinitionV2_1.ColorTypes.onContainer) {
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 === ThemeDefinitionV2_1.ColorTypes.base) {
95
- return ThemeDefinitionV2_1.ColorTypes.onBase;
94
+ if (colorType === ThemeDefinition_1.ColorTypes.base) {
95
+ return ThemeDefinition_1.ColorTypes.onBase;
96
96
  }
97
- else if (colorType === ThemeDefinitionV2_1.ColorTypes.onBase) {
98
- return ThemeDefinitionV2_1.ColorTypes.base;
97
+ else if (colorType === ThemeDefinition_1.ColorTypes.onBase) {
98
+ return ThemeDefinition_1.ColorTypes.base;
99
99
  }
100
- else if (colorType === ThemeDefinitionV2_1.ColorTypes.container) {
101
- return ThemeDefinitionV2_1.ColorTypes.onContainer;
100
+ else if (colorType === ThemeDefinition_1.ColorTypes.container) {
101
+ return ThemeDefinition_1.ColorTypes.onContainer;
102
102
  }
103
- else if (colorType === ThemeDefinitionV2_1.ColorTypes.onContainer) {
104
- return ThemeDefinitionV2_1.ColorTypes.container;
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 "./ThemingBase";
2
- export * from "./ThemeDefinitionV2";
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("./ThemingBase"), exports);
5
- tslib_1.__exportStar(require("./ThemeDefinitionV2"), exports);
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
- import { IFontAwesomeIcon, VelcronOverflowValues } from "@omnia/fx-models";
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
  */
@@ -74,10 +75,20 @@ export interface VelcronEditor<TSettings = any> {
74
75
  multiple?: boolean;
75
76
  component?: unknown;
76
77
  }
77
- export interface VelcronAppDefinition<TState extends DynamicState = DynamicState> extends VelcronDefinitionBase {
78
+ export interface VelcronLazyApp {
79
+ minHeight?: VelcronBindableProp<number | string>;
80
+ initial?: false | VariantDefinition;
81
+ animate?: VariantDefinition;
82
+ inView?: VariantDefinition;
83
+ variants?: Variants;
84
+ transition?: AnimationOptionsWithOverrides;
85
+ }
86
+ export interface VelcronAppDefinition<TState extends DynamicState = DynamicState> extends VelcronDefinitionBase, VelcronColorStyling {
78
87
  type: "velcron";
79
88
  version?: string;
80
89
  name?: string;
90
+ lazy?: VelcronLazyApp;
91
+ blueprint?: ContainerBlueprint | ContainerVariant;
81
92
  body?: Array<VelcronDefinition>;
82
93
  events?: VelcronOnLoadEvent & VelcronOnEditModeEvent & VelcronOnSavingEvent & VelcronOnPersistingStateEvent & VelcronOnActiveEvent;
83
94
  actions?: {
@@ -5,6 +5,7 @@ import { DynamicState, VelcronDefinition, VelcronEffects, useVelcronThemingStore
5
5
  import { guid, PropertyConfiguration, PropertyValue, PropertyDefinition, PropertySetupBase } from "@omnia/fx/models";
6
6
  import { useVelcronColorSchemaStore } from "../stores/VelcronColorSchema";
7
7
  import { Properties } from "csstype";
8
+ import type { AnimationOptionsWithOverrides, InViewOptions, VariantDefinition, Variants } from "motion";
8
9
  export interface ResolvedComponentRenderer {
9
10
  component: unknown;
10
11
  definition: VelcronDefinition;
@@ -37,6 +38,7 @@ export interface BuiltInComponentRenderers {
37
38
  "slide-panel": unknown;
38
39
  "editor": unknown;
39
40
  "link": unknown;
41
+ "motion": unknown;
40
42
  }
41
43
  export interface ColorSchemaReference {
42
44
  name: string;
@@ -327,23 +329,17 @@ export interface VelcronFlowDefinition extends VelcronDefinition, VelcronColorSt
327
329
  placeholder?: VelcronBindableProp<string>;
328
330
  events?: VelcronOnUpdatedEvent;
329
331
  }
330
- export interface VelcronRiveDefinition extends VelcronDefinition {
331
- type: "rive";
332
- url: VelcronBindableProp;
333
- loop?: VelcronBindableProp<boolean>;
334
- autoplay?: VelcronBindableProp<boolean>;
335
- count?: VelcronBindableProp<number>;
336
- direction?: VelcronBindableProp<"normal" | "reverse">;
337
- hover?: VelcronBindableProp<boolean>;
338
- }
339
- export interface VelcronLottieDefinition extends VelcronDefinition {
340
- type: "lottie";
341
- url: VelcronBindableProp;
342
- loop?: VelcronBindableProp<boolean>;
343
- autoplay?: VelcronBindableProp<boolean>;
344
- count?: VelcronBindableProp<number>;
345
- direction?: VelcronBindableProp<"normal" | "reverse">;
346
- hover?: VelcronBindableProp<boolean>;
332
+ export interface VelcronMotionDefinition extends VelcronDefinition {
333
+ initial?: false | VariantDefinition;
334
+ animate?: VariantDefinition;
335
+ inView?: VariantDefinition;
336
+ hover?: VariantDefinition;
337
+ press?: VariantDefinition;
338
+ variants?: Variants;
339
+ transition?: AnimationOptionsWithOverrides;
340
+ inViewOptions?: InViewOptions & {
341
+ once?: boolean;
342
+ };
347
343
  }
348
344
  export interface VelcronSlidePanelSlidesOptions {
349
345
  foreach: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/velcron",
3
3
  "license": "MIT",
4
- "version": "8.0.295-dev",
4
+ "version": "8.0.297-dev",
5
5
  "description": "Provide Omnia Velcron Stuffs.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -9,5 +9,5 @@ export declare class VelcronDataBinder {
9
9
  static tryUpdateBoundValue(renderContext: VelcronRenderContext, bindPath: string, value: unknown): void;
10
10
  static bindMany<T>(renderContext: VelcronRenderContext, definition: {
11
11
  [P in keyof T]?: VelcronBindableProp<T[P]>;
12
- }, propertiesToBind: Array<keyof T>, state: Partial<T>): void;
12
+ }, propertiesToBind: Array<keyof T>, objectToBindTo: Partial<T>): T;
13
13
  }
@@ -141,13 +141,14 @@ class VelcronDataBinder {
141
141
  VelcronData_1.VelcronData.getOrSet(renderContext, VelcronData_1.VelcronData.getBindPath(bindPath), value);
142
142
  }
143
143
  }
144
- static bindMany(renderContext, definition, propertiesToBind, state) {
144
+ static bindMany(renderContext, definition, propertiesToBind, objectToBindTo) {
145
145
  propertiesToBind.forEach((property) => {
146
146
  const definitionValue = definition[property];
147
147
  if (definitionValue !== undefined) {
148
- state[property] = VelcronDataBinder.bind(renderContext, definitionValue);
148
+ objectToBindTo[property] = VelcronDataBinder.bind(renderContext, definitionValue);
149
149
  }
150
150
  });
151
+ return objectToBindTo;
151
152
  }
152
153
  }
153
154
  exports.VelcronDataBinder = VelcronDataBinder;
@@ -1,8 +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, StylexValue } from "internal/fx/ux/Styles.stylex";
4
5
  export declare class VelcronStyles {
5
- static styleProvider: (baseStyles: object, definition: VelcronDefinition, renderCtx: VelcronRenderContext) => any;
6
+ static styleProvider: (baseStyles: CSSProperties, definition: VelcronDefinition, renderCtx: VelcronRenderContext) => StylexValue;
6
7
  static effectsProvider: (effects: VelcronEffects, renderCtx: VelcronRenderContext) => VelcronEffects;
7
8
  static unitProvider: VelcronUnitProvider;
8
9
  spacingScaling: {
@@ -19,13 +20,13 @@ export declare class VelcronStyles {
19
20
  scaling: (value: import("..").SpacingValue) => boolean;
20
21
  };
21
22
  };
22
- static registerStyleProvider(fn: (styleBase: object, definition: VelcronDefinition, renderCtx: VelcronRenderContext) => object | string, unitProvider: VelcronUnitProvider): void;
23
+ static registerStyleProvider(fn: (styleBase: CSSProperties, definition: VelcronDefinition, renderCtx: VelcronRenderContext) => StylexValue, unitProvider: VelcronUnitProvider): void;
23
24
  static registerEffectsProvider(fn: (effects: VelcronEffects, renderCtx: VelcronRenderContext) => VelcronEffects): void;
24
25
  static applyEffects(definition: VelcronDefinitionHasEffects, renderCtx: VelcronRenderContext, applyTo: (effects: VelcronEffects) => any): any;
25
- static insertBackgroundColor(styleBase: any, color: VelcronColorStyling, renderCtx: VelcronRenderContext): void;
26
- static insertBorderRadiusStyles(styleBase: any, settings: VelcronDimensions, renderCtx: VelcronRenderContext): void;
27
- static insertBorderStyles(styleBase: any, borderSettings: VelcronBorder, renderCtx: VelcronRenderContext): void;
28
- static create(definition: VelcronDefinition, renderCtx: VelcronRenderContext): object | string;
26
+ static insertBackgroundColor(styleBase: CSSProperties, color: VelcronColorStyling, renderCtx: VelcronRenderContext): void;
27
+ static insertBorderRadiusStyles(styleBase: CSSProperties, settings: VelcronDimensions, renderCtx: VelcronRenderContext): void;
28
+ static insertBorderStyles(styleBase: CSSProperties, borderSettings: VelcronBorder, renderCtx: VelcronRenderContext): void;
29
+ static create(definition: VelcronDefinition, renderCtx: VelcronRenderContext): StylexValue;
29
30
  static applySpacingDimension(value: string | number, spacing: SpacingBlueprint): string | number;
30
31
  static applyOverflow(definition: VelcronDefinitionHasOverflow, renderCtx: VelcronRenderContext, styleBase: any): void;
31
32
  static applySpacingStyles<T>(spacing: VelcronBindableProp<T>, renderCtx: VelcronRenderContext, styleBase: any, spacingDef: SpacingBlueprint, styleType: string, objectIsDatabound?: (obj: T) => void, additionalPropsToDataBind?: object): void;
@@ -36,7 +36,7 @@ class VelcronStyles {
36
36
  colorValue = renderCtx.colors.get.base;
37
37
  }
38
38
  if (colorValue) {
39
- styleBase["backgroundColor"] = toned ? colorValue.colorToned : colorValue.color;
39
+ styleBase.backgroundColor = toned ? colorValue.colorToned : colorValue.color;
40
40
  }
41
41
  }
42
42
  }
@@ -49,16 +49,16 @@ class VelcronStyles {
49
49
  const bottom = VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, settings.bottom);
50
50
  const left = VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, settings.left);
51
51
  if (top || top === 0) {
52
- styleBase["borderTopLeftRadius"] = this.unitProvider.formatDimension(top);
52
+ styleBase.borderTopLeftRadius = this.unitProvider.formatDimension(top);
53
53
  }
54
54
  if (right || right === 0) {
55
- styleBase["borderTopRightRadius"] = this.unitProvider.formatDimension(right);
55
+ styleBase.borderTopRightRadius = this.unitProvider.formatDimension(right);
56
56
  }
57
57
  if (bottom || bottom === 0) {
58
- styleBase["borderBottomRightRadius"] = this.unitProvider.formatDimension(bottom);
58
+ styleBase.borderBottomRightRadius = this.unitProvider.formatDimension(bottom);
59
59
  }
60
60
  if (left || left === 0) {
61
- styleBase["borderBottomLeftRadius"] = this.unitProvider.formatDimension(left);
61
+ styleBase.borderBottomLeftRadius = this.unitProvider.formatDimension(left);
62
62
  }
63
63
  }
64
64
  static insertBorderStyles(styleBase, borderSettings, renderCtx) {
@@ -82,22 +82,22 @@ class VelcronStyles {
82
82
  const left = VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, borderSettings.left);
83
83
  const width = VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, borderSettings.width);
84
84
  if (top || top === 0) {
85
- styleBase["borderTopStyle"] = "solid";
86
- styleBase["borderTopColor"] = borderColor;
85
+ styleBase.borderTopStyle = "solid";
86
+ styleBase.borderTopColor = borderColor;
87
87
  }
88
88
  if (right || right === 0) {
89
- styleBase["borderRightStyle"] = "solid";
90
- styleBase["borderRightColor"] = borderColor;
89
+ styleBase.borderRightStyle = "solid";
90
+ styleBase.borderRightColor = borderColor;
91
91
  }
92
92
  if (bottom || bottom === 0) {
93
- styleBase["borderBottomStyle"] = "solid";
94
- styleBase["borderBottomColor"] = borderColor;
93
+ styleBase.borderBottomStyle = "solid";
94
+ styleBase.borderBottomColor = borderColor;
95
95
  }
96
96
  if (left || left === 0) {
97
- styleBase["borderLeftStyle"] = "solid";
98
- styleBase["borderLeftColor"] = borderColor;
97
+ styleBase.borderLeftStyle = "solid";
98
+ styleBase.borderLeftColor = borderColor;
99
99
  }
100
- styleBase["borderWidth"] = width
100
+ styleBase.borderWidth = width
101
101
  ? this.unitProvider.formatDimension(width)
102
102
  : this.unitProvider.formatDimension(1);
103
103
  }
@@ -111,38 +111,40 @@ class VelcronStyles {
111
111
  const margin = VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, definition.margin);
112
112
  const spacing = renderCtx.theming.get.spacing();
113
113
  if (typeof margin === "object") {
114
- styleBase["marginTop"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, margin.top), spacing, margin.scale));
115
- styleBase["marginRight"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, margin.right), spacing, margin.scale));
116
- styleBase["marginBottom"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, margin.bottom), spacing, margin.scale));
117
- styleBase["marginLeft"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, margin.left), spacing, margin.scale));
114
+ styleBase.marginTop = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, margin.top), spacing, margin.scale));
115
+ styleBase.marginRight = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, margin.right), spacing, margin.scale));
116
+ styleBase.marginBottom = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, margin.bottom), spacing, margin.scale));
117
+ styleBase.marginLeft = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, margin.left), spacing, margin.scale));
118
118
  }
119
119
  else {
120
120
  const value = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, margin), spacing));
121
- styleBase["marginTop"] = value;
122
- styleBase["marginRight"] = value;
123
- styleBase["marginBottom"] = value;
124
- styleBase["marginLeft"] = value;
121
+ styleBase.marginTop = value;
122
+ styleBase.marginRight = value;
123
+ styleBase.marginBottom = value;
124
+ styleBase.marginLeft = value;
125
125
  }
126
126
  }
127
127
  if (definition.padding) {
128
128
  const padding = VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, definition.padding);
129
129
  const spacing = renderCtx.theming.get.spacing();
130
130
  if (typeof padding === "object") {
131
- styleBase["paddingTop"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, padding.top), spacing, padding.scale));
132
- styleBase["paddingRight"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, padding.right), spacing, padding.scale));
133
- styleBase["paddingBottom"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, padding.bottom), spacing, padding.scale));
134
- styleBase["paddingLeft"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, padding.left), spacing, padding.scale));
131
+ styleBase.paddingTop = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, padding.top), spacing, padding.scale));
132
+ styleBase.paddingRight = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, padding.right), spacing, padding.scale));
133
+ styleBase.paddingBottom = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, padding.bottom), spacing, padding.scale));
134
+ styleBase.paddingLeft = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, padding.left), spacing, padding.scale));
135
135
  }
136
136
  else {
137
137
  const value = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, padding), spacing));
138
- styleBase["paddingTop"] = value;
139
- styleBase["paddingRight"] = value;
140
- styleBase["paddingBottom"] = value;
141
- styleBase["paddingLeft"] = value;
138
+ styleBase.paddingTop = value;
139
+ styleBase.paddingRight = value;
140
+ styleBase.paddingBottom = value;
141
+ styleBase.paddingLeft = value;
142
142
  }
143
143
  }
144
144
  if (definition.type === VelcronConstants_1.VelcronConstants.components.velcron) {
145
- this.applyOverflow(definition, renderCtx, styleBase);
145
+ const appDefinition = definition;
146
+ this.applyOverflow(appDefinition, renderCtx, styleBase);
147
+ this.insertBackgroundColor(styleBase, appDefinition, renderCtx);
146
148
  }
147
149
  if (definition.type === VelcronConstants_1.VelcronConstants.components.image) {
148
150
  const imageDefinition = definition;
@@ -165,10 +167,10 @@ class VelcronStyles {
165
167
  color = renderCtx.colors.get.onBase;
166
168
  }
167
169
  if (color) {
168
- styleBase["color"] = toned ? color.colorToned : color.color + "!important";
170
+ styleBase.color = toned ? color.colorToned : color.color + "!important";
169
171
  }
170
172
  if (noWrap) {
171
- styleBase["whiteSpace"] = "nowrap";
173
+ styleBase.whiteSpace = "nowrap";
172
174
  }
173
175
  }
174
176
  if (definition.type === VelcronConstants_1.VelcronConstants.components.flex) {
@@ -179,11 +181,11 @@ class VelcronStyles {
179
181
  const minWidth = VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, flexDefinition.minWidth);
180
182
  const height = VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, flexDefinition.height);
181
183
  const minHeight = VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, flexDefinition.minHeight);
182
- styleBase["width"] = this.unitProvider.formatDimension(width);
183
- styleBase["maxWidth"] = this.unitProvider.formatDimension(width);
184
- styleBase["minWidth"] = this.unitProvider.formatDimension(minWidth);
185
- styleBase["height"] = this.unitProvider.formatDimension(height);
186
- styleBase["minHeight"] = this.unitProvider.formatDimension(minHeight);
184
+ styleBase.width = this.unitProvider.formatDimension(width);
185
+ styleBase.maxWidth = this.unitProvider.formatDimension(width);
186
+ styleBase.minWidth = this.unitProvider.formatDimension(minWidth);
187
+ styleBase.height = this.unitProvider.formatDimension(height);
188
+ styleBase.minHeight = this.unitProvider.formatDimension(minHeight);
187
189
  }
188
190
  if (definition.type === VelcronConstants_1.VelcronConstants.components.row) {
189
191
  const flexDefinition = definition;
@@ -221,25 +223,25 @@ class VelcronStyles {
221
223
  }
222
224
  if (flexDefinition.position) {
223
225
  const spacing = renderCtx.theming.get.spacing();
224
- this.applySpacingStyles(flexDefinition.position, renderCtx, styleBase, spacing, "", (pos) => (styleBase["position"] = VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, pos.type)), {
226
+ this.applySpacingStyles(flexDefinition.position, renderCtx, styleBase, spacing, "", (pos) => (styleBase.position = VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, pos.type)), {
225
227
  position: "type",
226
228
  });
227
229
  }
228
230
  this.applyOverflow(definition, renderCtx, styleBase);
229
- styleBase["flexDirection"] = direction;
230
- styleBase["display"] = "flex";
231
- styleBase["flex"] = "1 1 auto";
232
- styleBase["flexWrap"] = wrap ? "wrap" : null;
233
- styleBase["justifyContent"] = alignX;
234
- styleBase["alignItems"] = alignY;
235
- styleBase["rowGap"] = this.unitProvider.formatDimension(gapY);
236
- styleBase["columnGap"] = this.unitProvider.formatDimension(gapX);
237
- styleBase["flexBasis"] = height ? this.unitProvider.formatDimension(height) : undefined;
238
- styleBase["width"] = this.unitProvider.formatDimension(width);
239
- styleBase["maxWidth"] = this.unitProvider.formatDimension(width);
240
- styleBase["minWidth"] = this.unitProvider.formatDimension(minWidth);
241
- styleBase["height"] = this.unitProvider.formatDimension(height);
242
- styleBase["minHeight"] = this.unitProvider.formatDimension(minHeight);
231
+ styleBase.flexDirection = direction;
232
+ styleBase.display = "flex";
233
+ styleBase.flex = "1 1 auto";
234
+ styleBase.flexWrap = wrap ? "wrap" : null;
235
+ styleBase.justifyContent = alignX;
236
+ styleBase.alignItems = alignY;
237
+ styleBase.rowGap = this.unitProvider.formatDimension(gapY);
238
+ styleBase.columnGap = this.unitProvider.formatDimension(gapX);
239
+ styleBase.flexBasis = height ? this.unitProvider.formatDimension(height) : undefined;
240
+ styleBase.width = this.unitProvider.formatDimension(width);
241
+ styleBase.maxWidth = this.unitProvider.formatDimension(width);
242
+ styleBase.minWidth = this.unitProvider.formatDimension(minWidth);
243
+ styleBase.height = this.unitProvider.formatDimension(height);
244
+ styleBase.minHeight = this.unitProvider.formatDimension(minHeight);
243
245
  this.insertBackgroundColor(styleBase, flexDefinition, renderCtx);
244
246
  }
245
247
  if (definition.type === VelcronConstants_1.VelcronConstants.components.column) {
@@ -257,12 +259,12 @@ class VelcronStyles {
257
259
  }
258
260
  const flexBasis = width ? this.unitProvider.formatDimension(width) : "0px";
259
261
  this.applyOverflow(definition, renderCtx, styleBase);
260
- styleBase["flexBasis"] = flexBasis;
261
- styleBase["flexGrow"] = grow || grow === 0 ? grow : 1;
262
- styleBase["flexShrink"] = styleBase["flexGrow"];
263
- styleBase["maxWidth"] = width ? this.unitProvider.formatDimension(width) : "100%";
264
- styleBase["alignSelf"] = yAlignment;
265
- styleBase["minWidth"] = this.unitProvider.formatDimension(minWidth);
262
+ styleBase.flexBasis = flexBasis;
263
+ styleBase.flexGrow = grow || grow === 0 ? grow : 1;
264
+ styleBase.flexShrink = styleBase.flexGrow;
265
+ styleBase.maxWidth = width ? this.unitProvider.formatDimension(width) : "100%";
266
+ styleBase.alignSelf = yAlignment;
267
+ styleBase.minWidth = this.unitProvider.formatDimension(minWidth);
266
268
  this.insertBackgroundColor(styleBase, flexDefinition, renderCtx);
267
269
  }
268
270
  if (definition.type === VelcronConstants_1.VelcronConstants.components.grid) {
@@ -276,11 +278,11 @@ class VelcronStyles {
276
278
  const gapY = gridDefinition.gapY || gridDefinition?.gapY?.toString() === "0"
277
279
  ? (0, __1.getSpacingValueFromBlueprint)(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, gridDefinition.gapY), spacingBlueprint)
278
280
  : gapX;
279
- styleBase["display"] = "grid";
280
- styleBase["width"] = "100%";
281
+ styleBase.display = "grid";
282
+ styleBase.width = "100%";
281
283
  if (minWidth) {
282
284
  const widthWithDimension = this.unitProvider.formatDimension(minWidth);
283
- styleBase["gridTemplateColumns"] = `repeat(auto-fit, minmax(${widthWithDimension}, 1fr))`;
285
+ styleBase.gridTemplateColumns = `repeat(auto-fit, minmax(${widthWithDimension}, 1fr))`;
284
286
  }
285
287
  else if (columns) {
286
288
  let templateColumnString = "";
@@ -295,10 +297,10 @@ class VelcronStyles {
295
297
  templateColumnString += "1fr ";
296
298
  }
297
299
  }
298
- styleBase["gridTemplateColumns"] = templateColumnString;
300
+ styleBase.gridTemplateColumns = templateColumnString;
299
301
  }
300
- styleBase["rowGap"] = this.unitProvider.formatDimension(gapY);
301
- styleBase["columnGap"] = this.unitProvider.formatDimension(gapX);
302
+ styleBase.rowGap = this.unitProvider.formatDimension(gapY);
303
+ styleBase.columnGap = this.unitProvider.formatDimension(gapX);
302
304
  }
303
305
  if (definition.border) {
304
306
  const typedDefinition = definition;
@@ -310,7 +312,7 @@ class VelcronStyles {
310
312
  this.insertBorderRadiusStyles(styleBase, typedDefinition.borderRadius, renderCtx);
311
313
  }
312
314
  }
313
- return VelcronStyles.styleProvider(styleBase, definition, renderCtx);
315
+ return this.styleProvider(styleBase, definition, renderCtx);
314
316
  }
315
317
  static applySpacingDimension(value, spacing) {
316
318
  return this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(value, spacing));
@@ -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
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ColorSchemaId = ColorSchemaId;
4
- exports.ThemeDefinitionId = ThemeDefinitionId;
5
- function ColorSchemaId(id) { return id; }
6
- function ThemeDefinitionId(id) { return id; }