@omnia/velcron 8.0.458-dev → 8.0.460-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.
@@ -2,3 +2,8 @@ export declare enum ServiceLocatorUrlType {
2
2
  Api = 0,
3
3
  Resource = 1
4
4
  }
5
+ export declare enum TextAlignment {
6
+ left = "left",
7
+ center = "center",
8
+ right = "right"
9
+ }
@@ -1,8 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ServiceLocatorUrlType = void 0;
3
+ exports.TextAlignment = exports.ServiceLocatorUrlType = void 0;
4
4
  var ServiceLocatorUrlType;
5
5
  (function (ServiceLocatorUrlType) {
6
6
  ServiceLocatorUrlType[ServiceLocatorUrlType["Api"] = 0] = "Api";
7
7
  ServiceLocatorUrlType[ServiceLocatorUrlType["Resource"] = 1] = "Resource";
8
8
  })(ServiceLocatorUrlType || (exports.ServiceLocatorUrlType = ServiceLocatorUrlType = {}));
9
+ var TextAlignment;
10
+ (function (TextAlignment) {
11
+ TextAlignment["left"] = "left";
12
+ TextAlignment["center"] = "center";
13
+ TextAlignment["right"] = "right";
14
+ })(TextAlignment || (exports.TextAlignment = TextAlignment = {}));
@@ -1,3 +1,14 @@
1
1
  export declare const OIconSizeDefinitions: readonly ["x-large", "large", "default", "x-small", "small"];
2
2
  export type OIconSizes = typeof OIconSizeDefinitions[number];
3
3
  export declare const OIconSizesName = "OIconSizes";
4
+ export declare const ODividerTypeDefinitions: readonly ["top", "bottom", "left", "right"];
5
+ export type ODividerTypes = typeof ODividerTypeDefinitions[number];
6
+ export declare const ODividerTypesName = "ODividerTypes";
7
+ export type OBorderCombination = `${ODividerTypes}` | `${ODividerTypes} ${ODividerTypes}` | `${ODividerTypes} ${ODividerTypes} ${ODividerTypes}` | `${ODividerTypes} ${ODividerTypes} ${ODividerTypes} ${ODividerTypes}`;
8
+ export declare const DisplayBreakpoints: readonly ["s", "m", "l"];
9
+ export type DisplayBreakpointTypes = typeof DisplayBreakpoints[number];
10
+ export type ContainerBreakpointTypes = "layout" | "column" | "parent";
11
+ /** text */
12
+ export declare const OTextAlignmentDefinitions: readonly ["left", "center", "right"];
13
+ export type OTextAlignmentTypes = typeof OTextAlignmentDefinitions[number];
14
+ export declare const OTextAlignmentTypesName = "OTextAlignmentTypes";
@@ -1,5 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OIconSizesName = exports.OIconSizeDefinitions = void 0;
3
+ exports.OTextAlignmentTypesName = exports.OTextAlignmentDefinitions = exports.DisplayBreakpoints = exports.ODividerTypesName = exports.ODividerTypeDefinitions = exports.OIconSizesName = exports.OIconSizeDefinitions = void 0;
4
4
  exports.OIconSizeDefinitions = ["x-large", "large", "default", "x-small", "small"];
5
5
  exports.OIconSizesName = "OIconSizes";
6
+ exports.ODividerTypeDefinitions = ["top", "bottom", "left", "right"];
7
+ exports.ODividerTypesName = "ODividerTypes";
8
+ exports.DisplayBreakpoints = ["s", "m", "l"];
9
+ /** text */
10
+ exports.OTextAlignmentDefinitions = ["left", "center", "right"];
11
+ exports.OTextAlignmentTypesName = "OTextAlignmentTypes";
@@ -3,7 +3,8 @@ import { SpacingDefinition, Spacing, SpacingValue } from "./Spacing";
3
3
  import { TypographyFontDefinition, TextStyleValue } from "./Typography";
4
4
  import { ThemeBase } from "./ThemeBase";
5
5
  import { VelcronRendererResolverReference } from "../velcron";
6
- import { TextAlignment } from "@omnia/fx-models";
6
+ import { TextAlignment } from "../Enums";
7
+ import { HorizontalAlignments, VerticalAlignments } from "@omnia/fx-models";
7
8
  export interface BlueprintStrategy {
8
9
  buttons: {
9
10
  primary: ButtonBlueprint;
@@ -31,21 +32,28 @@ export interface VariantBlueprints<T> extends Blueprints {
31
32
  variant7?: T;
32
33
  variant8?: T;
33
34
  }
34
- export interface HeaderIconSettings {
35
+ export interface HeaderIconBlueprint {
35
36
  blueprint?: IconBlueprint;
36
37
  background?: BackgroundDefinition;
37
- spacing?: Spacing;
38
+ alignX?: HorizontalAlignments;
39
+ alignY?: VerticalAlignments;
40
+ backgroundHeight?: number;
41
+ margin?: Spacing;
38
42
  }
39
43
  export interface HeaderBlueprint extends Blueprint {
40
44
  /**velcron */
41
45
  renderer?: VelcronRendererResolverReference;
46
+ iconMargin?: SpacingValue;
47
+ noIcon?: boolean;
42
48
  state?: any;
43
49
  /**Settings */
44
50
  background?: BackgroundDefinition;
45
51
  textAlign?: TextAlignment;
46
- padding?: SpacingValue;
52
+ upperCase?: boolean;
53
+ padding?: Spacing;
54
+ margin?: Spacing;
47
55
  text?: TextBlueprint;
48
- iconSettings?: HeaderIconSettings;
56
+ icon?: HeaderIconBlueprint;
49
57
  }
50
58
  export interface HeaderBlueprints extends Blueprints, VariantBlueprints<HeaderBlueprint>, BlueprintsReference {
51
59
  primary?: HeaderBlueprint;
@@ -113,13 +121,16 @@ export interface ButtonBlueprintVariant {
113
121
  category: ButtonBlueprintType;
114
122
  }
115
123
  export interface ButtonBlueprint extends Blueprint {
116
- paddingX?: SpacingValue;
117
- iconPaddingX?: SpacingValue;
124
+ padding?: Spacing;
125
+ iconMargin?: SpacingValue;
118
126
  height?: number;
119
127
  background?: BackgroundDefinition;
120
128
  alterCase?: boolean;
121
129
  text?: TextBlueprint;
122
130
  icon?: IconBlueprint;
131
+ iconPosition?: HorizontalAlignments;
132
+ iconBackground?: BackgroundDefinition;
133
+ iconBackgroundHeight?: number;
123
134
  viewTemplate?: VelcronRendererResolverReference;
124
135
  }
125
136
  export interface ButtonBlueprints extends Blueprints {
@@ -5,7 +5,7 @@ import { DynamicState, VelcronDefinition, VelcronEffects } from "..";
5
5
  import { guid, PropertyConfiguration, PropertyValue, PropertyDefinition, PropertySetupBase } from "@omnia/velcron/internal-do-not-import-from-here/shared/models";
6
6
  import { Properties } from "csstype";
7
7
  import type { AnimationOptionsWithOverrides, InViewOptions, VariantDefinition, Variants } from "motion";
8
- import { useColorSchemaStore, useThemeStore } from "internal/fx/ux/mobile";
8
+ import { useColorSchemaStore } from "internal/fx/ux/mobile";
9
9
  export interface ResolvedComponentRenderer {
10
10
  component: unknown;
11
11
  definition: VelcronDefinition;
@@ -83,7 +83,6 @@ export interface VelcronRenderContext {
83
83
  id?: string;
84
84
  rootContext: DynamicState;
85
85
  currentContext: DynamicState;
86
- theming?: ReturnType<typeof useThemeStore>;
87
86
  colors?: ReturnType<typeof useColorSchemaStore>;
88
87
  actions?: {
89
88
  [name: string]: Array<string>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/velcron",
3
3
  "license": "MIT",
4
- "version": "8.0.458-dev",
4
+ "version": "8.0.460-dev",
5
5
  "description": "Provide Omnia Velcron Stuffs.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -5,6 +5,7 @@ const __1 = require("..");
5
5
  //import { ColorSchemaType, InternalColorSchemaStoreType, ServiceContainerContext, useColorSchemaStore, useInject, useThemeStore } from "internal/fx/ux/mobile";
6
6
  // import { InternalColorSchemaStoreType, useColorSchemaStore, useThemeStore } from "internal/fx/ux/aurora/shared-mobile";
7
7
  const stores_1 = require("internal/fx/shared/aurora/stores");
8
+ const shared_1 = require("internal/fx/shared");
8
9
  class VelcronRenderers {
9
10
  static { this.components = {}; }
10
11
  static { this.referenceResolvers = {}; }
@@ -91,7 +92,6 @@ class VelcronRenderers {
91
92
  hooks: currentRenderCtx.hooks,
92
93
  computed: currentRenderCtx.computed,
93
94
  colors: currentRenderCtx.colors,
94
- theming: currentRenderCtx.theming,
95
95
  $editmode: currentRenderCtx.$editmode,
96
96
  $display: currentRenderCtx.$display,
97
97
  $active: currentRenderCtx.$active,
@@ -105,17 +105,18 @@ class VelcronRenderers {
105
105
  const colorSchemaType = __1.VelcronDataBinder.bind(currentRenderCtx, definition.colorSchemaType);
106
106
  if (colorSchemaType && result.colors.state.colorSchemaType !== colorSchemaType) {
107
107
  const themeStore = (0, stores_1.useThemeStore)();
108
- // const { value, setValue } = themeStore.get.getOrSetColorSchema(colorSchemaType);
109
- // let colorSchemaStoreRef: InternalColorSchemaStoreType;
110
- // if (value) {
111
- // colorSchemaStoreRef = value as InternalColorSchemaStoreType;
112
- // } else {
113
- // colorSchemaStoreRef = useInject(ServiceContainerContext).createInstance(useColorSchemaStore, null, true);
114
- // (colorSchemaStoreRef as InternalColorSchemaStoreType).actions.disableAutoDispose();
115
- // colorSchemaStoreRef.actions.setColorSchema(colorSchemaType);
116
- // setValue(colorSchemaStoreRef);
117
- // }
118
- // result.colors = colorSchemaStoreRef;
108
+ const { value, setValue } = themeStore.get.getOrSetColorSchema(colorSchemaType);
109
+ let colorSchemaStoreRef;
110
+ if (value) {
111
+ colorSchemaStoreRef = value;
112
+ }
113
+ else {
114
+ colorSchemaStoreRef = (0, shared_1.useInject)(shared_1.ServiceContainerContext).createInstance(stores_1.useColorSchemaStore, null, true);
115
+ colorSchemaStoreRef.actions.disableAutoDispose();
116
+ colorSchemaStoreRef.actions.setColorSchema(colorSchemaType);
117
+ setValue(colorSchemaStoreRef);
118
+ }
119
+ result.colors = colorSchemaStoreRef;
119
120
  }
120
121
  }
121
122
  return result;
@@ -109,7 +109,7 @@ class VelcronStyles {
109
109
  /** Generic styling */
110
110
  if (definition.margin) {
111
111
  const margin = VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, definition.margin);
112
- const spacing = renderCtx.theming.get.spacing();
112
+ const spacing = renderCtx.colors.get.themeStore.get.spacing();
113
113
  if (typeof margin === "object") {
114
114
  styleBase.marginTop = this.unitProvider.formatDimension(__1.SpacingMethods.getSpacingValueFromBlueprint(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, margin.top), spacing, margin.scale));
115
115
  styleBase.marginRight = this.unitProvider.formatDimension(__1.SpacingMethods.getSpacingValueFromBlueprint(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, margin.right), spacing, margin.scale));
@@ -126,7 +126,7 @@ class VelcronStyles {
126
126
  }
127
127
  if (definition.padding) {
128
128
  const padding = VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, definition.padding);
129
- const spacing = renderCtx.theming.get.spacing();
129
+ const spacing = renderCtx.colors.get.themeStore.get.spacing();
130
130
  if (typeof padding === "object") {
131
131
  styleBase.paddingTop = this.unitProvider.formatDimension(__1.SpacingMethods.getSpacingValueFromBlueprint(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, padding.top), spacing, padding.scale));
132
132
  styleBase.paddingRight = this.unitProvider.formatDimension(__1.SpacingMethods.getSpacingValueFromBlueprint(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, padding.right), spacing, padding.scale));
@@ -192,7 +192,7 @@ class VelcronStyles {
192
192
  }
193
193
  if (definition.type === VelcronConstants_1.VelcronConstants.components.row) {
194
194
  const flexDefinition = definition;
195
- const spacingBlueprint = renderCtx.theming.get.spacing();
195
+ const spacingBlueprint = renderCtx.colors.get.themeStore.get.spacing();
196
196
  const gapX = flexDefinition.gapX || flexDefinition?.gapX?.toString() === "0"
197
197
  ? __1.SpacingMethods.getSpacingValueFromBlueprint(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, flexDefinition.gapX), spacingBlueprint)
198
198
  : __1.SpacingMethods.getSpacingValueFromBlueprint(VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, flexDefinition.gapY), spacingBlueprint);
@@ -225,7 +225,7 @@ class VelcronStyles {
225
225
  alignY = "stretch";
226
226
  }
227
227
  if (flexDefinition.position) {
228
- const spacing = renderCtx.theming.get.spacing();
228
+ const spacing = renderCtx.colors.get.themeStore.get.spacing();
229
229
  this.applySpacingStyles(flexDefinition.position, renderCtx, styleBase, spacing, "", (pos) => (styleBase.position = VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, pos.type)), {
230
230
  position: "type",
231
231
  });
@@ -274,7 +274,7 @@ class VelcronStyles {
274
274
  this.insertBackgroundColor(styleBase, flexDefinition, renderCtx);
275
275
  }
276
276
  if (definition.type === VelcronConstants_1.VelcronConstants.components.grid) {
277
- const spacingBlueprint = renderCtx.theming.get.spacing();
277
+ const spacingBlueprint = renderCtx.colors.get.themeStore.get.spacing();
278
278
  const gridDefinition = definition;
279
279
  const columns = VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, gridDefinition.columns);
280
280
  const minWidth = VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, gridDefinition.minColumnWidth);