@omnia/fx-models 8.0.552-dev → 8.0.555-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/Layout.d.ts CHANGED
@@ -118,7 +118,8 @@ export declare enum SectionTypes {
118
118
  Tab = 2,
119
119
  Accordion = 3,
120
120
  Stepper = 4,
121
- Slider = 5
121
+ Slider = 5,
122
+ Container = 6
122
123
  }
123
124
  export interface Section<T extends SectionSettings = SectionSettings> extends LayoutItem {
124
125
  name?: string;
@@ -145,6 +146,8 @@ export interface SectionSettings extends LayoutItemSettings {
145
146
  minHeight: string;
146
147
  spacingBlock: SpacingValue;
147
148
  spacingColumn: SpacingValue;
149
+ spacingBlockV2: SpacingValue;
150
+ spacingColumnV2: SpacingValue;
148
151
  minWidthBlock: string;
149
152
  margin?: Spacing;
150
153
  marginSectionLeft?: SpacingValue;
@@ -162,6 +165,7 @@ export interface SectionSettings extends LayoutItemSettings {
162
165
  /** End This section replaces the old title settings */
163
166
  useFullSpace: boolean;
164
167
  useWidthFromTheme?: boolean;
168
+ useLayoutMargin?: boolean;
165
169
  useCustomTheme: boolean;
166
170
  themeDefinition: LegacyThemeDefinition;
167
171
  hidden?: boolean;
package/Layout.js CHANGED
@@ -8,6 +8,7 @@ var SectionTypes;
8
8
  SectionTypes[SectionTypes["Accordion"] = 3] = "Accordion";
9
9
  SectionTypes[SectionTypes["Stepper"] = 4] = "Stepper";
10
10
  SectionTypes[SectionTypes["Slider"] = 5] = "Slider";
11
+ SectionTypes[SectionTypes["Container"] = 6] = "Container";
11
12
  })(SectionTypes || (exports.SectionTypes = SectionTypes = {}));
12
13
  var JsonNullValueHandling;
13
14
  (function (JsonNullValueHandling) {
@@ -1,4 +1,4 @@
1
1
  import { useThemeProviderStore } from "./ThemeProvider";
2
- type SetupThemeProvider = Pick<ReturnType<typeof useThemeProviderStore>["actions"], "registerStore" | "registerDefaultTypographyBlueprints" | "registerDefaultSpacingBlueprints" | "registerDefaultLightColorSchema" | "registerDefaultDarkColorSchema" | "registerComponentBlueprintStrategy" | "defineCustomFontLoader">;
2
+ type SetupThemeProvider = Pick<ReturnType<typeof useThemeProviderStore>["actions"], "registerStore" | "registerDefaultTypographyBlueprints" | "registerDefaultSpacingBlueprints" | "registerDefaultLightColorSchema" | "registerDefaultDarkColorSchema" | "registerComponentBlueprintStrategy" | "registerDefaultThemeTemplate" | "defineCustomFontLoader">;
3
3
  export declare function defineThemeProvider(setup: (ctx: SetupThemeProvider) => void): void;
4
4
  export {};
@@ -1,4 +1,4 @@
1
- import { BlueprintVariant, guid } from "internal/fx/shared/models";
1
+ import { BlueprintVariant, guid, SpacingPreset } from "internal/fx/shared/models";
2
2
  import { useThemeStore } from "./ThemeStore";
3
3
  export declare const useSpacingBlueprintStore: () => {
4
4
  state: {
@@ -35,6 +35,7 @@ export declare const useSpacingBlueprintStore: () => {
35
35
  scaling: (value: import("internal/fx/shared").SpacingValue) => boolean;
36
36
  };
37
37
  };
38
+ presetValue(preset: SpacingPreset): void;
38
39
  };
39
40
  deactivated(): void;
40
41
  } & {
@@ -16,15 +16,12 @@ export declare const useThemeProviderStore: () => {
16
16
  setAdminTheme(theme: ResolvedThemeDefinition): void;
17
17
  setDefaultTheme(theme: ResolvedThemeDefinition): void;
18
18
  loadCustomFont(font: TypographyFontDefinition): void;
19
+ registerDefaultThemeTemplate(theme: ResolvedThemeDefinition): void;
19
20
  }>;
20
21
  get: {
21
22
  readonly adminTheme: ResolvedThemeDefinition;
22
23
  readonly defaultTheme: ResolvedThemeDefinition;
23
- readonly defaultTypographyBlueprints: TypographyBlueprint;
24
- readonly defaultSpacingBlueprints: SpacingBlueprint;
25
- readonly defaultLightColorSchema: ColorSchemas;
26
- readonly defaultDarkColorSchema: ColorSchemas;
27
- readonly componentBlueprintStrategy: ComponentBlueprintStrategyType;
24
+ readonly defaultThemeTemplate: ResolvedThemeDefinition;
28
25
  };
29
26
  readonly events: {
30
27
  onMutatedAdminTheme: import("internal/fx/shared").MessageBusExposeOnlySubscription<ResolvedThemeDefinition>;
@@ -32,7 +29,7 @@ export declare const useThemeProviderStore: () => {
32
29
  };
33
30
  validations: {
34
31
  checkPlatformStoreRegistered(): void;
35
- checkDefaultBlueprintsRegistered(type: "typography" | "spacing" | "light" | "dark" | "component"): void;
32
+ checkDefaultBlueprintsRegistered(type: "typography" | "spacing" | "light" | "dark" | "component" | "theme-template"): void;
36
33
  };
37
34
  } & {
38
35
  dispose?: () => void;
@@ -1,9 +1,7 @@
1
1
  export * from "./ColorManager";
2
2
  export * from "./ComponentBlueprintStore";
3
- export * from "./FontStore";
4
3
  export { useColorSchemaStore, type ColorSchemaStoreType, type InternalColorSchemaStoreType } from "./ColorSchemaStore";
5
4
  export * from "./SpacingBlueprintStore";
6
- export * from "./TemplateRegistrationStore";
7
5
  export * from "./ThemeContextStore";
8
6
  export * from "./ThemeMigrations";
9
7
  export * from "./ThemeNormalizer";
@@ -1,3 +1,4 @@
1
+ import { ThemeContextType } from "./theme";
1
2
  export declare enum IconTypes {
2
3
  FontAwesome = "IFontAwesomeIcon",
3
4
  Fabric = "IFabricIcon",
@@ -9,6 +10,7 @@ export declare enum IconTypes {
9
10
  export interface IIcon {
10
11
  iconType: IconTypes;
11
12
  role?: string;
13
+ themeType?: ThemeContextType;
12
14
  }
13
15
  export interface IFontAwesomeIcon extends IIcon {
14
16
  faClass: string;
@@ -3,6 +3,7 @@ import { guid } from "./Guid";
3
3
  import { TenantIdentifier } from "./Tenant";
4
4
  import { OmniaBackendRuntimes, OmniaClientRuntimes } from "./Enums";
5
5
  import { ActorId } from "./activity-hub";
6
+ import { ThemeBoot } from "./theme";
6
7
  export interface OmniaSharedBootstrapData {
7
8
  uiThreadId: guid;
8
9
  workerThreadId: guid;
@@ -32,6 +33,7 @@ export interface OmniaSharedBootstrapData {
32
33
  * Don't use it, only for test perf
33
34
  */
34
35
  location: typeof window.location;
36
+ theming?: ThemeBoot;
35
37
  }
36
38
  export interface OmniaAnalytics {
37
39
  paq: any[];
@@ -6,6 +6,7 @@ export type Spacing = {
6
6
  left?: SpacingValue;
7
7
  };
8
8
  export type SpacingScale = "l" | "s";
9
+ export type SpacingPreset = "preset-layout" | "preset-section" | "preset-column" | "preset-block";
9
10
  export interface SpacingDefinition {
10
11
  name?: string;
11
12
  xs?: number;
@@ -14,7 +15,7 @@ export interface SpacingDefinition {
14
15
  l?: number;
15
16
  xl?: number;
16
17
  }
17
- export type SpacingValue = "xs" | "s" | "m" | "l" | "xl" | "l:xs" | "l:s" | "l:m" | "l:l" | "l:xl" | "s:xs" | "s:s" | "s:m" | "s:l" | "s:xl" | number;
18
+ export type SpacingValue = "xs" | "s" | "m" | "l" | "xl" | "l:xs" | "l:s" | "l:m" | "l:l" | "l:xl" | "s:xs" | "s:s" | "s:m" | "s:l" | "s:xl" | number | SpacingPreset;
18
19
  export declare enum SpacingTypes {
19
20
  xs = "xs",
20
21
  s = "s",
@@ -4,6 +4,7 @@ import { Id } from "../Id";
4
4
  import { BlueprintVariant, BoxDimensions, ButtonBlueprint, ComponentBlueprints, ContainerFillBlueprints, MediaResources, SpacingBlueprint, TextFillBlueprints } from "./Blueprints";
5
5
  import { Color } from "./Color";
6
6
  import { LegacyBorderDefinition, LegacyThemeDefinition } from "./LegacyThemeDefinition";
7
+ import { Spacing, SpacingValue } from "./Spacing";
7
8
  import { ThemeBase } from "./ThemeBase";
8
9
  import { TypographyBlueprint } from "./Typography";
9
10
  export type ThemeContextType = "default" | "admin" | "designer" | "preview";
@@ -76,8 +77,18 @@ export interface ThemeDefinitionReference {
76
77
  export interface ThemeSettings {
77
78
  layoutWrapper?: {
78
79
  width?: number;
80
+ margin?: SpacingValue;
81
+ };
82
+ blockSpacing?: SpacingValue;
83
+ sectionMargin?: Spacing;
84
+ columnSpacing?: SpacingValue;
85
+ iconStyling?: {
86
+ style?: ThemeIconStyle;
87
+ pack?: ThemeIconPack;
79
88
  };
80
89
  }
90
+ export type ThemeIconStyle = "solid" | "regular" | "light" | "thin";
91
+ export type ThemeIconPack = "classic" | "duotone" | "sharp" | "sharp-duotone";
81
92
  export interface ResolvedThemeDefinition extends ThemeDefinition<ColorSchemas> {
82
93
  typography?: TypographyBlueprint;
83
94
  spacing?: SpacingBlueprint;
@@ -40,6 +40,7 @@ export interface BuiltInComponentRenderers {
40
40
  "link": unknown;
41
41
  "motion": unknown;
42
42
  "scroll": unknown;
43
+ "markdown": unknown;
43
44
  }
44
45
  export interface ColorSchemaReference {
45
46
  name: string;
@@ -327,6 +328,12 @@ export interface VelcronFlowDefinition extends VelcronDefinition, VelcronColorSt
327
328
  placeholder?: VelcronBindableProp<string>;
328
329
  events?: VelcronOnUpdatedEvent;
329
330
  }
331
+ export interface VelcronMarkdownDefinition extends VelcronDefinition, VelcronColorStyling {
332
+ type: "markdown";
333
+ value?: VelcronBindableProp<string>;
334
+ placeholder?: VelcronBindableProp<string>;
335
+ events?: VelcronOnUpdatedEvent;
336
+ }
330
337
  export interface VelcronMotionDefinition extends VelcronDefinition {
331
338
  initial?: false | VariantDefinition;
332
339
  animate?: VariantDefinition;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/fx-models",
3
3
  "license": "MIT",
4
- "version": "8.0.552-dev",
4
+ "version": "8.0.555-dev",
5
5
  "description": "Provide Omnia Fx Models Stuffs.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -11,9 +11,6 @@ export declare class FontAwesomeIcon implements IFontAwesomeIcon {
11
11
  iconType: IconTypes;
12
12
  constructor(faClass: string);
13
13
  toString(): string;
14
- setStyle(style: "solid" | "regular" | "light" | "duotone" | "thin", force?: boolean): this;
15
- private setDefaultIconStyle;
16
- private setIconStyle;
17
14
  }
18
15
  export declare class MaterialIcon implements IMaterialIcon {
19
16
  maClass: string;
@@ -9,53 +9,10 @@ class FontAwesomeIcon {
9
9
  constructor(faClass) {
10
10
  this.faClass = faClass;
11
11
  this.iconType = models_1.IconTypes.FontAwesome;
12
- this.setDefaultIconStyle();
13
12
  }
14
13
  toString() {
15
14
  return this.faClass;
16
15
  }
17
- //
18
- setStyle(style, force) {
19
- if (!force && this.faClass.indexOf(" ") === -1) {
20
- return;
21
- }
22
- /**Brand icons cannot have different styles */
23
- if (this.faClass.indexOf("fa-brands") > -1) {
24
- return;
25
- }
26
- if (style === "solid") {
27
- this.setIconStyle("fas");
28
- }
29
- else if (style === "regular") {
30
- this.setIconStyle("fa");
31
- }
32
- else if (style === "light") {
33
- this.setIconStyle("fal");
34
- }
35
- else if (style === "duotone") {
36
- this.setIconStyle("fa-duotone");
37
- }
38
- else if (style === "thin") {
39
- this.setIconStyle("fat");
40
- }
41
- return this;
42
- }
43
- setDefaultIconStyle() {
44
- if (this.faClass) {
45
- const split = this.faClass.split(" ");
46
- if (split.length === 1) {
47
- this.setIconStyle("fa-duotone");
48
- }
49
- }
50
- }
51
- setIconStyle(style) {
52
- if (!this.faClass) {
53
- return;
54
- }
55
- const split = this.faClass.split(" ");
56
- const end = split[split.length - 1];
57
- this.faClass = style + " " + end;
58
- }
59
16
  }
60
17
  exports.FontAwesomeIcon = FontAwesomeIcon;
61
18
  class MaterialIcon {
@@ -1,18 +0,0 @@
1
- import { Future, ITemplateRegistration, TypographyFontDefinition } from "internal/fx/shared/models";
2
- export declare const useFontStore: () => {
3
- actions: import("internal/fx/shared").StoreReturnDefineAction<{
4
- ensureLoadFonts: () => Future<ITemplateRegistration<TypographyFontDefinition, import("internal/fx/shared").TemplateRegistrationType>[]>;
5
- addFont(font: TypographyFontDefinition): void;
6
- editFont(font: TypographyFontDefinition): void;
7
- onFinishLoad(): Future<Record<string, ITemplateRegistration<any, import("internal/fx/shared").TemplateRegistrationType>>>;
8
- saveFont(): Promise<boolean>;
9
- delete(font: TypographyFontDefinition): Promise<void>;
10
- }>;
11
- get: {
12
- readonly availableFonts: TypographyFontDefinition[];
13
- findFont(family: string): ITemplateRegistration<TypographyFontDefinition, import("internal/fx/shared").TemplateRegistrationType>;
14
- readonly finishLoad: boolean;
15
- };
16
- } & {
17
- dispose?: () => void;
18
- };
@@ -1,20 +0,0 @@
1
- import { guid, ITemplateRegistration, TemplateRegistrationType, Future } from "internal/fx/shared/models";
2
- export declare const useTemplateRegistrationStore: () => {
3
- state: {
4
- registrations: Record<string, ITemplateRegistration<any, TemplateRegistrationType>>;
5
- };
6
- events: import("internal/fx/shared").StoreEvents<{
7
- registrations: Record<string, ITemplateRegistration<any, TemplateRegistrationType>>;
8
- }, Record<string, import("internal/fx/shared").IMessageBusTopicPublishSubscriber<any>>>;
9
- actions: import("internal/fx/shared").StoreReturnDefineAction<{
10
- upsertRegistration<TTemplateRegistration extends ITemplateRegistration<any>>(registration: TTemplateRegistration): Promise<boolean>;
11
- deleteRegistration(registrationId: guid): Promise<boolean>;
12
- ensureLoadTemplates: () => Future<Record<string, ITemplateRegistration<any, TemplateRegistrationType>>>;
13
- }>;
14
- get: {
15
- byId: <TTemplateRegistration extends ITemplateRegistration<any>>(id: guid) => ITemplateRegistration<any, TemplateRegistrationType>;
16
- getByType: <TTemplateRegistration extends ITemplateRegistration<any>>(type: TemplateRegistrationType) => Array<TTemplateRegistration>;
17
- };
18
- } & {
19
- dispose?: () => void;
20
- };