@clay-ds/react 0.2.1 → 0.3.1

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.
@@ -53,6 +53,20 @@ export declare const sectionSchemas: {
53
53
  label: z.ZodString;
54
54
  href: z.ZodString;
55
55
  }, z.core.$strip>>>;
56
+ media: z.ZodOptional<z.ZodObject<{
57
+ src: z.ZodString;
58
+ type: z.ZodOptional<z.ZodEnum<{
59
+ image: "image";
60
+ video: "video";
61
+ }>>;
62
+ alt: z.ZodOptional<z.ZodString>;
63
+ fit: z.ZodOptional<z.ZodEnum<{
64
+ fill: "fill";
65
+ contain: "contain";
66
+ cover: "cover";
67
+ }>>;
68
+ aspectRatio: z.ZodOptional<z.ZodString>;
69
+ }, z.core.$strip>>;
56
70
  containerWidth: z.ZodOptional<z.ZodEnum<{
57
71
  full: "full";
58
72
  default: "default";
@@ -106,6 +120,20 @@ export declare const sectionSchemas: {
106
120
  label: z.ZodString;
107
121
  href: z.ZodOptional<z.ZodString>;
108
122
  }, z.core.$strip>>;
123
+ media: z.ZodOptional<z.ZodObject<{
124
+ src: z.ZodString;
125
+ type: z.ZodOptional<z.ZodEnum<{
126
+ image: "image";
127
+ video: "video";
128
+ }>>;
129
+ alt: z.ZodOptional<z.ZodString>;
130
+ fit: z.ZodOptional<z.ZodEnum<{
131
+ fill: "fill";
132
+ contain: "contain";
133
+ cover: "cover";
134
+ }>>;
135
+ aspectRatio: z.ZodOptional<z.ZodString>;
136
+ }, z.core.$strip>>;
109
137
  }, z.core.$strip>>;
110
138
  containerWidth: z.ZodOptional<z.ZodEnum<{
111
139
  full: "full";
@@ -130,6 +158,20 @@ export declare const sectionSchemas: {
130
158
  miniTitle: z.ZodOptional<z.ZodString>;
131
159
  heading: z.ZodString;
132
160
  description: z.ZodOptional<z.ZodString>;
161
+ media: z.ZodOptional<z.ZodObject<{
162
+ src: z.ZodString;
163
+ type: z.ZodOptional<z.ZodEnum<{
164
+ image: "image";
165
+ video: "video";
166
+ }>>;
167
+ alt: z.ZodOptional<z.ZodString>;
168
+ fit: z.ZodOptional<z.ZodEnum<{
169
+ fill: "fill";
170
+ contain: "contain";
171
+ cover: "cover";
172
+ }>>;
173
+ aspectRatio: z.ZodOptional<z.ZodString>;
174
+ }, z.core.$strip>>;
133
175
  }, z.core.$strip>>>;
134
176
  revealCards: z.ZodOptional<z.ZodArray<z.ZodObject<{
135
177
  name: z.ZodString;
package/dist/page-spec.js CHANGED
@@ -4616,6 +4616,18 @@ function superRefine(fn, params) {
4616
4616
  }
4617
4617
  const cta = object({ label: string(), href: string() });
4618
4618
  const containerWidth = _enum(["default", "wide", "full"]).optional();
4619
+ const media = object({
4620
+ /** Absolute URL of the image or video asset */
4621
+ src: string(),
4622
+ /** Asset type — defaults to 'image' at render time */
4623
+ type: _enum(["image", "video"]).optional(),
4624
+ /** Alt text for images (leave empty for decorative media) */
4625
+ alt: string().optional(),
4626
+ /** CSS object-fit behaviour — defaults to 'cover' */
4627
+ fit: _enum(["contain", "cover", "fill"]).optional(),
4628
+ /** CSS aspect-ratio value, e.g. '16/9' or '4/3' */
4629
+ aspectRatio: string().optional()
4630
+ });
4619
4631
  const headerSectionSchema = object({
4620
4632
  layout: _enum([
4621
4633
  "centered-image",
@@ -4638,6 +4650,8 @@ const headerSectionSchema = object({
4638
4650
  logoKeys: array(string()).optional(),
4639
4651
  /** CTA buttons */
4640
4652
  ctas: array(cta).optional(),
4653
+ /** Optional hero media (external image/video URL) */
4654
+ media: media.optional(),
4641
4655
  containerWidth
4642
4656
  });
4643
4657
  const customerLogoSectionSchema = object({
@@ -4678,7 +4692,9 @@ const featuresSectionSchema = object({
4678
4692
  topic: string().optional(),
4679
4693
  bullets: array(string()).optional(),
4680
4694
  cta: object({ label: string(), href: string().optional() }).optional(),
4681
- cta2: object({ label: string(), href: string().optional() }).optional()
4695
+ cta2: object({ label: string(), href: string().optional() }).optional(),
4696
+ /** Optional item media (external image/video URL) */
4697
+ media: media.optional()
4682
4698
  })
4683
4699
  ),
4684
4700
  containerWidth
@@ -4700,7 +4716,9 @@ const cardsSectionSchema = object({
4700
4716
  object({
4701
4717
  miniTitle: string().optional(),
4702
4718
  heading: string(),
4703
- description: string().optional()
4719
+ description: string().optional(),
4720
+ /** Optional card media (external image/video URL) */
4721
+ media: media.optional()
4704
4722
  })
4705
4723
  ).optional(),
4706
4724
  revealCards: array(