@omnia/fx-models 8.0.141-dev → 8.0.142-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.
@@ -1,5 +1,5 @@
1
1
  import { GuidValue } from "../Guid";
2
- import { BoxDimensions, ComponentBlueprints, SpacingBlueprints, TypographyBlueprints } from "./Blueprints";
2
+ import { BoxDimensions, ButtonBlueprint, ComponentBlueprints, SpacingBlueprints, TypographyBlueprints } from "./Blueprints";
3
3
  export type ThemeContextType = "default" | "admin" | "preview" | "color-context" | "designer";
4
4
  export interface ColorTypeResult<resultType> {
5
5
  base: resultType;
@@ -78,6 +78,22 @@ export interface ITemplateRegistration<TTemplateType = any> {
78
78
  hidden?: boolean;
79
79
  custom?: boolean;
80
80
  }
81
+ export type RegistrationType = "button" | "chrome";
82
+ export interface ITemplateRegistration2<TTemplateType = any, TType = RegistrationType> {
83
+ type: RegistrationType;
84
+ id: GuidValue;
85
+ template: TTemplateType;
86
+ hidden?: boolean;
87
+ custom?: boolean;
88
+ }
89
+ export interface ITemplateRegistration<TTemplateType = any> {
90
+ id: GuidValue;
91
+ template: TTemplateType;
92
+ hidden?: boolean;
93
+ custom?: boolean;
94
+ }
95
+ export interface ButtonBlueprintRegistration extends ITemplateRegistration2<ButtonBlueprint, "button"> {
96
+ }
81
97
  export type ColorSchemaType = keyof typeof ColorSchemaTypes;
82
98
  export declare enum ColorSchemaTypes {
83
99
  primary = "primary",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/fx-models",
3
3
  "license": "MIT",
4
- "version": "8.0.141-dev",
4
+ "version": "8.0.142-dev",
5
5
  "description": "Provide Omnia Fx Models Stuffs.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -1,10 +1,11 @@
1
- import { BorderStylingDefinition, ButtonBlueprint, ChromeBlueprint, ChromeBlueprints, ColorSchema, ComponentBlueprints, FillDefinition, ITemplateRegistration, IconBlueprints, SpacingBlueprints, SpacingDefinition, TabsBlueprint, ThemeDefinitionV2, TypographyBlueprints } from "@omnia/fx-models";
1
+ import { BorderStylingDefinition, ButtonBlueprint, ChromeBlueprint, ChromeBlueprints, ColorSchema, ComponentBlueprints, FillDefinition, ITemplateRegistration, ITemplateRegistration2, IconBlueprints, SpacingBlueprints, SpacingDefinition, TabsBlueprint, ThemeDefinitionV2, TypographyBlueprints } from "@omnia/fx-models";
2
2
  import { ApiPath } from "../Extends";
3
3
  export interface IThemeRegistrationApiHandler {
4
4
  getAllThemeRegistrations(): ITemplateRegistration<ThemeDefinitionV2>[];
5
5
  registerTheme(definitions: ITemplateRegistration<ThemeDefinitionV2> | ITemplateRegistration<ThemeDefinitionV2>[]): any;
6
6
  registerColorSchema(colorSchema: ITemplateRegistration<ColorSchema> | ITemplateRegistration<ColorSchema>[]): any;
7
7
  getAllColorSchemaRegistrations(): any;
8
+ registerTest(definitions: ITemplateRegistration2<any> | ITemplateRegistration2<any>[]): any;
8
9
  templates: {
9
10
  get: {
10
11
  spacingDefinition: () => ITemplateRegistration<SpacingDefinition>[];