@supernova-studio/model 0.0.5 → 0.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supernova-studio/model",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Supernova Data Models",
5
5
  "main": "index.ts",
6
6
  "source": "index.ts",
@@ -5,54 +5,25 @@ import { PageBlockDefinitionAppearance } from "./aux";
5
5
  // Enums
6
6
  //
7
7
 
8
- export enum PageBlockDefinitionLayoutType {
9
- /** Layout will stack all its items in this group into column */
10
- column = "Column",
11
- /** Layout will stack all its items in this group into row */
12
- row = "Row",
13
- }
8
+ export const PageBlockDefinitionLayoutType = z.enum(["Column", "Row"]);
9
+ export const PageBlockDefinitionLayoutGap = z.enum(["Small", "Medium", "Large", "None"]);
10
+ export const PageBlockDefinitionLayoutAlign = z.enum(["Start", "Center", "End"]);
11
+ export const PageBlockDefinitionLayoutResizing = z.enum(["Fill", "Hug"]);
14
12
 
15
- export enum PageBlockDefinitionLayoutGap {
16
- /** small gap between columns/row */
17
- small = "Small",
18
- /** medium gap between columns/row */
19
- medium = "Medium",
20
- /** large gap between columns/row */
21
- large = "Large",
22
- /** no gap between columns/row */
23
- none = "None",
24
- }
25
-
26
- export enum PageBlockDefinitionLayoutAlign {
27
- /** Vertically on top */
28
- start = "Start",
29
- /** Vertically centered */
30
- center = "Center",
31
- /** Vertically on the bottom */
32
- end = "End",
33
- }
34
-
35
- export enum PageBlockDefinitionLayoutResizing {
36
- /** Will fill all available space for the column */
37
- fill = "Fill",
38
- /** Will hug content inside the column */
39
- hug = "Hug",
40
- }
41
-
42
- export const PageBlockDefinitionLayoutTypeSchema = z.nativeEnum(PageBlockDefinitionLayoutType);
43
- export const PageBlockDefinitionLayoutGapSchema = z.nativeEnum(PageBlockDefinitionLayoutGap);
44
- export const PageBlockDefinitionLayoutAlignSchema = z.nativeEnum(PageBlockDefinitionLayoutAlign);
45
- export const PageBlockDefinitionLayoutResizingSchema = z.nativeEnum(PageBlockDefinitionLayoutResizing);
13
+ export type PageBlockDefinitionLayoutType = z.infer<typeof PageBlockDefinitionLayoutType>;
14
+ export type PageBlockDefinitionLayoutGap = z.infer<typeof PageBlockDefinitionLayoutGap>;
15
+ export type PageBlockDefinitionLayoutAlign = z.infer<typeof PageBlockDefinitionLayoutAlign>;
16
+ export type PageBlockDefinitionLayoutResizing = z.infer<typeof PageBlockDefinitionLayoutResizing>;
46
17
 
47
18
  //
48
19
  // Definitions
49
20
  //
50
21
 
51
22
  export const PageBlockDefinitionLayoutBase = z.object({
52
- type: PageBlockDefinitionLayoutTypeSchema,
53
- gap: PageBlockDefinitionLayoutGapSchema.optional(),
54
- columnAlign: PageBlockDefinitionLayoutAlignSchema.optional(),
55
- columnResizing: PageBlockDefinitionLayoutResizingSchema.optional(),
23
+ type: PageBlockDefinitionLayoutType,
24
+ gap: PageBlockDefinitionLayoutGap.optional(),
25
+ columnAlign: PageBlockDefinitionLayoutAlign.optional(),
26
+ columnResizing: PageBlockDefinitionLayoutResizing.optional(),
56
27
  });
57
28
 
58
29
  export const PageBlockDefinitionLayout: z.ZodType<PageBlockDefinitionLayout, ZodTypeDef, PageBlockDefinitionLayout> =