@u-krupaveho-kraba/form-editor-schemas 0.1.0

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.
@@ -0,0 +1,72 @@
1
+ import * as z from "zod/mini";
2
+ /**
3
+ * One theme in the Host-owned theme library (ticket 151, ADR 0022). `id` is
4
+ * absent for a preset the Host never persisted; `locked` marks a Brand Kit
5
+ * theme the editor may select but not edit in place.
6
+ */
7
+ export declare const ThemeEntrySchema: z.ZodMiniObject<{
8
+ id: z.ZodMiniOptional<z.ZodMiniString<string>>;
9
+ name: z.ZodMiniString<string>;
10
+ locked: z.ZodMiniBoolean<boolean>;
11
+ value: z.ZodMiniObject<{
12
+ corners: z.ZodMiniEnum<{
13
+ lg: "lg";
14
+ md: "md";
15
+ none: "none";
16
+ sm: "sm";
17
+ }>;
18
+ mainColor: z.ZodMiniTemplateLiteral<`#${string}`>;
19
+ secondaryColor: z.ZodMiniTuple<readonly [z.ZodMiniTemplateLiteral<`#${string}`>, z.ZodMiniTemplateLiteral<`#${string}`>, z.ZodMiniTemplateLiteral<`#${string}`>, z.ZodMiniTemplateLiteral<`#${string}`>], null>;
20
+ backgroundColor: z.ZodMiniTemplateLiteral<`#${string}`>;
21
+ fontFamily: z.ZodMiniString<string>;
22
+ }, z.core.$strip>;
23
+ }, z.core.$strip>;
24
+ export type ThemeEntry = z.infer<typeof ThemeEntrySchema>;
25
+ /**
26
+ * A label-only grouping of themes ("Presets", "Your saved themes") -- the
27
+ * Host owns both the labels and the placement; the Theme Panel never
28
+ * computes either (ADR 0022).
29
+ */
30
+ export declare const ThemeGroupSchema: z.ZodMiniObject<{
31
+ label: z.ZodMiniString<string>;
32
+ themes: z.ZodMiniArray<z.ZodMiniObject<{
33
+ id: z.ZodMiniOptional<z.ZodMiniString<string>>;
34
+ name: z.ZodMiniString<string>;
35
+ locked: z.ZodMiniBoolean<boolean>;
36
+ value: z.ZodMiniObject<{
37
+ corners: z.ZodMiniEnum<{
38
+ lg: "lg";
39
+ md: "md";
40
+ none: "none";
41
+ sm: "sm";
42
+ }>;
43
+ mainColor: z.ZodMiniTemplateLiteral<`#${string}`>;
44
+ secondaryColor: z.ZodMiniTuple<readonly [z.ZodMiniTemplateLiteral<`#${string}`>, z.ZodMiniTemplateLiteral<`#${string}`>, z.ZodMiniTemplateLiteral<`#${string}`>, z.ZodMiniTemplateLiteral<`#${string}`>], null>;
45
+ backgroundColor: z.ZodMiniTemplateLiteral<`#${string}`>;
46
+ fontFamily: z.ZodMiniString<string>;
47
+ }, z.core.$strip>;
48
+ }, z.core.$strip>>;
49
+ }, z.core.$strip>;
50
+ export type ThemeGroup = z.infer<typeof ThemeGroupSchema>;
51
+ /**
52
+ * What the panel sends to `onThemeSave` (ADR 0022). `id` present means
53
+ * "update this owned theme in place"; absent means "fork a new one" -- the
54
+ * Host assigns the new id, the panel never generates one itself.
55
+ */
56
+ export declare const ThemeSavePayloadSchema: z.ZodMiniObject<{
57
+ id: z.ZodMiniOptional<z.ZodMiniString<string>>;
58
+ name: z.ZodMiniString<string>;
59
+ value: z.ZodMiniObject<{
60
+ corners: z.ZodMiniEnum<{
61
+ lg: "lg";
62
+ md: "md";
63
+ none: "none";
64
+ sm: "sm";
65
+ }>;
66
+ mainColor: z.ZodMiniTemplateLiteral<`#${string}`>;
67
+ secondaryColor: z.ZodMiniTuple<readonly [z.ZodMiniTemplateLiteral<`#${string}`>, z.ZodMiniTemplateLiteral<`#${string}`>, z.ZodMiniTemplateLiteral<`#${string}`>, z.ZodMiniTemplateLiteral<`#${string}`>], null>;
68
+ backgroundColor: z.ZodMiniTemplateLiteral<`#${string}`>;
69
+ fontFamily: z.ZodMiniString<string>;
70
+ }, z.core.$strip>;
71
+ }, z.core.$strip>;
72
+ export type ThemeSavePayload = z.infer<typeof ThemeSavePayloadSchema>;