@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
|
@@ -5,54 +5,25 @@ import { PageBlockDefinitionAppearance } from "./aux";
|
|
|
5
5
|
// Enums
|
|
6
6
|
//
|
|
7
7
|
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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:
|
|
53
|
-
gap:
|
|
54
|
-
columnAlign:
|
|
55
|
-
columnResizing:
|
|
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> =
|