@vedhae/cms-schema 1.0.0 → 1.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.
@@ -1,9 +1,5 @@
1
1
  import { z } from "zod";
2
- /**
3
- * Canonical Hero CMS shape
4
- * This is what admin, worker, frontend agree on
5
- */
6
- export declare const HeroSchema: z.ZodObject<{
2
+ export declare const HeroSectionSchema: z.ZodObject<{
7
3
  page: z.ZodLiteral<"home">;
8
4
  section: z.ZodLiteral<"hero">;
9
5
  active: z.ZodBoolean;
@@ -18,4 +14,4 @@ export declare const HeroSchema: z.ZodObject<{
18
14
  alt: z.ZodString;
19
15
  }, z.core.$strip>>;
20
16
  }, z.core.$strip>;
21
- export type HeroSection = z.infer<typeof HeroSchema>;
17
+ export type HeroSection = z.infer<typeof HeroSectionSchema>;
@@ -1,10 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { ImageAssetSchema } from "./image.schema";
3
- /**
4
- * Canonical Hero CMS shape
5
- * This is what admin, worker, frontend agree on
6
- */
7
- export const HeroSchema = z.object({
3
+ export const HeroSectionSchema = z.object({
8
4
  page: z.literal("home"),
9
5
  section: z.literal("hero"),
10
6
  active: z.boolean(),
@@ -1,8 +1,4 @@
1
1
  import { z } from "zod";
2
- /**
3
- * Shared image asset definition
4
- * Used across all CMS sections
5
- */
6
2
  export declare const ImageAssetSchema: z.ZodObject<{
7
3
  url: z.ZodString;
8
4
  path: z.ZodString;
@@ -1,10 +1,6 @@
1
1
  import { z } from "zod";
2
- /**
3
- * Shared image asset definition
4
- * Used across all CMS sections
5
- */
6
2
  export const ImageAssetSchema = z.object({
7
3
  url: z.string().url(),
8
4
  path: z.string(),
9
- alt: z.string().min(1),
5
+ alt: z.string(),
10
6
  });
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { ImageAssetSchema } from "./image.schema";
2
- export { HeroSchema } from "./hero.schema";
2
+ export { HeroSectionSchema } from "./hero.schema";
3
3
  export { ShopByCategorySchema } from "./shopByCategory.schema";
4
4
  export { ShopByPersonSchema } from "./shopByPerson.schema";
5
5
  export type { ImageAsset } from "./image.schema";
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // schemas
2
2
  export { ImageAssetSchema } from "./image.schema";
3
- export { HeroSchema } from "./hero.schema";
3
+ export { HeroSectionSchema } from "./hero.schema";
4
4
  export { ShopByCategorySchema } from "./shopByCategory.schema";
5
5
  export { ShopByPersonSchema } from "./shopByPerson.schema";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vedhae/cms-schema",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",