@vedhae/cms-schema 4.2.12 → 4.2.13

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,21 @@
1
+ import { z } from "zod";
2
+ export declare const AnnouncementSchema: z.ZodObject<{
3
+ page: z.ZodLiteral<"global">;
4
+ section: z.ZodLiteral<"announcement">;
5
+ active: z.ZodBoolean;
6
+ text: z.ZodString;
7
+ speed: z.ZodDefault<z.ZodNumber>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ page: "global";
10
+ section: "announcement";
11
+ active: boolean;
12
+ text: string;
13
+ speed: number;
14
+ }, {
15
+ page: "global";
16
+ section: "announcement";
17
+ active: boolean;
18
+ text: string;
19
+ speed?: number | undefined;
20
+ }>;
21
+ export type Announcement = z.infer<typeof AnnouncementSchema>;
@@ -0,0 +1,8 @@
1
+ import { z } from "zod";
2
+ export const AnnouncementSchema = z.object({
3
+ page: z.literal("global"),
4
+ section: z.literal("announcement"),
5
+ active: z.boolean(),
6
+ text: z.string().min(1),
7
+ speed: z.number().default(30), // seconds
8
+ });
@@ -89,10 +89,10 @@ export declare const CardSectionSchema: z.ZodObject<{
89
89
  }>, "many">;
90
90
  }, "strip", z.ZodTypeAny, {
91
91
  title: string;
92
- order: number;
93
92
  page: "home";
94
93
  section: "one" | "two";
95
94
  active: boolean;
95
+ order: number;
96
96
  items: {
97
97
  name: string;
98
98
  link: string;
@@ -106,10 +106,10 @@ export declare const CardSectionSchema: z.ZodObject<{
106
106
  }[];
107
107
  }, {
108
108
  title: string;
109
- order: number;
110
109
  page: "home";
111
110
  section: "one" | "two";
112
111
  active: boolean;
112
+ order: number;
113
113
  items: {
114
114
  name: string;
115
115
  link: string;
@@ -24,16 +24,6 @@ export declare const HeroSectionSchema: z.ZodObject<{
24
24
  alt: string;
25
25
  desc?: string | undefined;
26
26
  }>, "many">>;
27
- banner: z.ZodDefault<z.ZodObject<{
28
- enabled: z.ZodDefault<z.ZodBoolean>;
29
- text: z.ZodOptional<z.ZodString>;
30
- }, "strip", z.ZodTypeAny, {
31
- enabled: boolean;
32
- text?: string | undefined;
33
- }, {
34
- enabled?: boolean | undefined;
35
- text?: string | undefined;
36
- }>>;
37
27
  }, "strip", z.ZodTypeAny, {
38
28
  title: string;
39
29
  page: "home";
@@ -48,10 +38,6 @@ export declare const HeroSectionSchema: z.ZodObject<{
48
38
  alt: string;
49
39
  desc?: string | undefined;
50
40
  }[];
51
- banner: {
52
- enabled: boolean;
53
- text?: string | undefined;
54
- };
55
41
  description?: string | undefined;
56
42
  }, {
57
43
  title: string;
@@ -68,9 +54,5 @@ export declare const HeroSectionSchema: z.ZodObject<{
68
54
  alt: string;
69
55
  desc?: string | undefined;
70
56
  }[] | undefined;
71
- banner?: {
72
- enabled?: boolean | undefined;
73
- text?: string | undefined;
74
- } | undefined;
75
57
  }>;
76
58
  export type HeroSection = z.infer<typeof HeroSectionSchema>;
@@ -10,8 +10,4 @@ export const HeroSectionSchema = z.object({
10
10
  ctaText: z.string().min(1),
11
11
  ctaLink: z.string().min(1),
12
12
  imageLinks: z.array(ImageAssetSchema).default([]),
13
- banner: z.object({
14
- enabled: z.boolean().default(false),
15
- text: z.string().min(1).optional(),
16
- }).default({ enabled: false })
17
13
  });
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export { HeroSectionSchema } from "./hero.schema.js";
3
3
  export { CardSectionSchema } from "./cardSection.schema.js";
4
4
  export { HomeDividerSchema } from "./homeDivider.schema.js";
5
5
  export { FooterSchema } from "./footer.schema.js";
6
+ export { AnnouncementSchema } from "./announcement.schema.js";
6
7
  export { ProductSchema } from "./product.schema.js";
7
8
  export { ProductHeroSchema } from "./productHero.schema.js";
8
9
  export { AboutHeroSchema, AboutContentSchema, AboutImagesSchema, } from "./about.schema.js";
@@ -11,6 +12,7 @@ export type { HeroSection } from "./hero.schema.js";
11
12
  export type { CardSection } from "./cardSection.schema.js";
12
13
  export type { HomeDivider } from "./homeDivider.schema.js";
13
14
  export type { FooterSection } from "./footer.schema.js";
15
+ export type { Announcement } from "./announcement.schema.js";
14
16
  export type { Product } from "./product.schema.js";
15
17
  export type { ProductHero } from "./productHero.schema.js";
16
18
  export type { AboutHero, AboutContent, AboutImages, } from "./about.schema.js";
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ export { HeroSectionSchema } from "./hero.schema.js";
7
7
  export { CardSectionSchema } from "./cardSection.schema.js";
8
8
  export { HomeDividerSchema } from "./homeDivider.schema.js";
9
9
  export { FooterSchema } from "./footer.schema.js";
10
+ export { AnnouncementSchema } from "./announcement.schema.js";
10
11
  // Products
11
12
  export { ProductSchema } from "./product.schema.js";
12
13
  export { ProductHeroSchema } from "./productHero.schema.js";
@@ -44,8 +44,8 @@ export declare const ProductSchema: z.ZodEffects<z.ZodObject<{
44
44
  updatedAt: z.ZodNumber;
45
45
  }, "strip", z.ZodTypeAny, {
46
46
  title: string;
47
- order: number;
48
47
  active: boolean;
48
+ order: number;
49
49
  imageLinks: {
50
50
  url: string;
51
51
  path: string;
@@ -74,8 +74,8 @@ export declare const ProductSchema: z.ZodEffects<z.ZodObject<{
74
74
  priceSubText?: string | undefined;
75
75
  }, {
76
76
  title: string;
77
- order: number;
78
77
  active: boolean;
78
+ order: number;
79
79
  imageLinks: {
80
80
  url: string;
81
81
  path: string;
@@ -104,8 +104,8 @@ export declare const ProductSchema: z.ZodEffects<z.ZodObject<{
104
104
  priceSubText?: string | undefined;
105
105
  }>, {
106
106
  title: string;
107
- order: number;
108
107
  active: boolean;
108
+ order: number;
109
109
  imageLinks: {
110
110
  url: string;
111
111
  path: string;
@@ -134,8 +134,8 @@ export declare const ProductSchema: z.ZodEffects<z.ZodObject<{
134
134
  priceSubText?: string | undefined;
135
135
  }, {
136
136
  title: string;
137
- order: number;
138
137
  active: boolean;
138
+ order: number;
139
139
  imageLinks: {
140
140
  url: string;
141
141
  path: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vedhae/cms-schema",
3
- "version": "4.2.12",
3
+ "version": "4.2.13",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",