Repository navigation
Expand file tree
/
Copy pathschema.ts
More file actions
1752 lines (1590 loc) · 60.3 KB
/
Copy pathschema.ts
File metadata and controls
1752 lines (1590 loc) · 60.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import { sqliteTable, text, integer, index } from "drizzle-orm/sqlite-core";
import { createInsertSchema } from "drizzle-zod";
import { z } from "zod";
/**
* Boot-critical schemas.
*
* Shared platform components: import from shared/component-registry only.
* Do NOT add new re-exports from site_ folders under component-registry — site-only Zod
* must be resolved via the site-aware registry (shared union site) at runtime.
* Site registry Zod schemas are re-exported via ./site-component-schemas
* (single coupling point; see site-component-schemas.stub.ts for pack-without-content).
*/
// ============================================
// Database Schemas
// ============================================
export const users = sqliteTable("users", {
id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
username: text("username").notNull().unique(),
password: text("password").notNull(),
});
export const insertUserSchema = createInsertSchema(users).pick({
username: true,
password: true,
});
export type InsertUser = z.infer<typeof insertUserSchema>;
export type User = typeof users.$inferSelect;
// Managed by raw SQL in server/db.ts (CREATE TABLE IF NOT EXISTS); defined here
// so drizzle-kit push does not treat it as extraneous and attempt to drop it.
export const errorLog = sqliteTable(
"error_log",
{
id: integer("id").primaryKey({ autoIncrement: true }),
ts: integer("ts").notNull(),
level: text("level").notNull(),
module: text("module").notNull(),
message: text("message").notNull(),
errName: text("err_name"),
errStack: text("err_stack"),
},
(table) => [
index("error_log_ts_idx").on(table.ts),
index("error_log_level_idx").on(table.level),
],
);
export type ErrorLogRow = typeof errorLog.$inferSelect;
// ============================================
// Re-export Common Schemas from Component Registry
// ============================================
export {
ctaButtonSchema,
videoConfigSchema,
videoOverlayOnMutedSchema,
imageSchema,
leadFormFieldConfigSchema,
leadFormDataSchema,
webhookConfigSchema,
cardItemSchema,
statItemSchema,
logoItemSchema,
type CtaButton,
type VideoConfig,
type VideoOverlayOnMuted,
type ImageDef,
type LeadFormData,
type WebhookConfig,
type CardItem,
type StatItem,
type LogoItem,
} from "./component-registry/_common/schema";
// Alias for backward compatibility
export { leadFormDataSchema as productShowcaseFormSchema } from "./component-registry/_common/schema";
// Local binding for use within this file
import { ctaButtonSchema as commonCtaButtonSchema } from "./component-registry/_common/schema";
// ============================================
// Re-export Hero Schemas from Component Registry
// Only export unified schema and shared sub-schemas (not individual variants)
// ============================================
export {
trustBarSchema,
awardBadgeSchema,
heroImageSchema,
brandMarkSchema,
reviewLogoSchema,
productShowcaseTrustBarSchema,
bulletItemSchema,
heroCourseTutorSchema,
heroCourseFeatureSchema,
heroSectionSchema,
heroCredibilityPillLogoSchema,
heroCredibilityPillSchema,
heroCredibilityMarqueeItemSchema,
heroCredibilitySchema,
heroOrbitBadgeSchema,
heroOrbitDiagramSchema,
heroOrbitSchema,
type TrustBar,
type AwardBadge,
type HeroImage,
type BrandMark,
type ReviewLogo,
type ProductShowcaseTrustBar,
type BulletItem,
type HeroCourseTutor,
type HeroCourseFeature,
type HeroSection,
type HeroCredibilityPillLogo,
type HeroCredibilityPill,
type HeroCredibilityMarqueeItem,
type HeroCredibility,
type HeroOrbitBadge,
type HeroOrbitDiagram,
type HeroOrbit,
} from "./component-registry/hero/v1.0/schema";
// Variant types for type narrowing (schemas are internal to component registry)
export type {
HeroSingleColumn,
HeroBlogHero,
HeroShowcase,
HeroProductShowcase,
HeroSimpleTwoColumn,
HeroSimpleStacked,
HeroTwoColumn,
HeroCourse,
HeroApplyFormProductShowcase,
HeroExercise,
HeroWorkshop,
} from "./component-registry/hero/v1.0/schema";
// HeroCredibility is already exported via the re-export block above
// ============================================
// Re-export AiFlexSelector Schemas from Component Registry
// ============================================
export {
aiFlexSelectorDefaultSchema,
type AiFlexSelectorDefault,
} from "./site-component-schemas";
// ============================================
// Re-export Survey Schemas from Component Registry
// ============================================
export {
surveyDefaultSchema,
type SurveyDefault,
} from "./site-component-schemas";
// ============================================
// Re-export AiFlexPath Schemas from Component Registry
// ============================================
export {
aiFlexPathDefaultSchema,
aiFlexPathDragAndDropSchema,
aiFlexPathCourseColorSelectorSchema,
aiFlexPathSimplifiedSchema,
aiFlexPathSectionSchema,
type AiFlexPathDefault,
type AiFlexPathDragAndDrop,
type AiFlexPathCourseColorSelector,
type AiFlexPathSimplified,
type AiFlexPathSection,
} from "./site-component-schemas";
// ============================================
// Re-export AI Learning Schemas from Component Registry
// ============================================
export {
chatExampleSchema,
aiLearningBulletSchema,
aiLearningFeatureSchema,
aiLearningFeatureTabsSectionSchema,
aiLearningHighlightSectionSchema,
aiLearningSectionSchema,
type ChatExample,
type AiLearningFeatureTabsSection,
type AiLearningHighlightSection,
type AiLearningSection,
} from "./site-component-schemas";
// Type alias for backward compatibility
export type AILearningSection = import("./site-component-schemas").AiLearningSection;
// ============================================
// Re-export Mentorship Schemas from Component Registry
// ============================================
export {
mentorshipSectionSchema,
type MentorshipSection,
} from "./site-component-schemas";
// ============================================
// Re-export Certificate Schemas from Component Registry
// ============================================
export {
certificateSectionSchema,
type CertificateSection,
} from "./site-component-schemas";
// ============================================
// Re-export TextBlock Schemas from Component Registry
// ============================================
export {
textBlockSectionSchema,
type TextBlockSection,
} from "../shared/component-registry/text_block/v1.0/schema";
// ============================================
// Re-export Spacer Schemas from Component Registry
// ============================================
export {
spacerSizeSchema,
spacerSectionSchema,
type SpacerSize,
type SpacerSection,
} from "./component-registry/spacer/v1.0/schema";
// ============================================
// Re-export Why Learn AI Schemas from Component Registry
// ============================================
export {
whyLearnAISectionSchema,
type WhyLearnAISection,
} from "./site-component-schemas";
// ============================================
// Re-export Pricing Schemas from Component Registry
// ============================================
export {
pricingFeatureSchema,
pricingPlanSchema,
pricingSectionSchema,
pricingPlanCardsSchema,
pricingPlanCardsNewSchema,
pricingPlanCardsPlanSchema,
pricingPlanCardsNewPlanSchema,
pricingPlanCardsFeatureSchema,
pricingPlanCardsPlanFeatureSchema,
pricingPlanCardsAddonSchema,
type PricingFeature,
type PricingPlan,
type PricingSection,
type PricingPlanCardsPlan,
type PricingPlanCardsFeature,
type PricingPlanCardsSection,
type PricingPlanCardsPlanFeature,
type PricingPlanCardsNewPlan,
type PricingPlanCardsNewSection,
} from "./site-component-schemas";
// ============================================
// Re-export FAQ Schemas from Component Registry
// ============================================
export {
faqItemSchema,
faqSectionSchema,
type FaqItem,
type FaqSection,
type FAQ,
} from "./component-registry/faq/v1.0/schema";
export {
breadcrumbItemSchema,
breadcrumbSectionSchema,
type BreadcrumbItem,
type BreadcrumbSection,
} from "./component-registry/breadcrumb/v1.0/schema";
export {
geekchartSectionSchema,
type GeekchartSection,
} from "./component-registry/geekchart/v1.0/schema";
// Type alias for backward compatibility
export type FAQItem = import("./component-registry/faq/v1.0/schema").FaqItem;
export type FAQSection = import("./component-registry/faq/v1.0/schema").FaqSection;
// ============================================
// Re-export Testimonials Schemas from Component Registry
// ============================================
export {
testimonialItemSchema,
testimonialsSectionSchema,
type TestimonialItem,
type TestimonialsSection,
} from "./site-component-schemas";
// ============================================
// Re-export Testimonials Grid Schemas from Component Registry
// ============================================
export {
testimonialsGridItemSchema,
testimonialsGridSectionSchema,
type TestimonialsGridItem,
type TestimonialsGridSection,
} from "./site-component-schemas";
// ============================================
// Re-export Who's Hiring Schemas from Component Registry
// ============================================
export {
whosHiringSectionSchema,
type WhosHiringSection,
} from "./site-component-schemas";
// ============================================
// Re-export Footer Schemas from Component Registry
// ============================================
export {
footerSectionSchema,
type FooterSection,
} from "./site-component-schemas";
// ============================================
// Re-export Two Column Schemas from Component Registry
// ============================================
export {
twoColumnBulletSchema,
bulletGroupSchema,
benefitItemSchema,
twoColumnColumnSchema,
twoColumnSectionSchema,
type TwoColumnBullet,
type BulletGroup,
type BenefitItem,
type TwoColumnColumn,
type TwoColumnSection,
} from "./site-component-schemas";
// ============================================
// Re-export Value Proof Panel Schemas from Component Registry
// ============================================
export {
evidenceItemSchema,
valueProofPanelMediaSchema,
valueProofPanelSectionSchema,
type EvidenceItem,
type ValueProofPanelMedia,
type ValueProofPanelSection,
} from "./site-component-schemas";
// ============================================
// Re-export Split Cards Schemas from Component Registry
// ============================================
export {
toolIconSchema,
splitCardsBenefitSchema,
splitCardsSectionSchema,
type ToolIcon,
type SplitCardsBenefit,
type SplitCardsSection,
} from "./site-component-schemas";
// ============================================
// Re-export Numbered Steps Schemas from Component Registry
// ============================================
export {
numberedStepsStepSchema,
numberedStepsSectionSchema,
type NumberedStepsStep,
type NumberedStepsSection,
} from "./site-component-schemas";
// Variant types for type narrowing
export type {
NumberedStepsDefaultSection,
NumberedStepsBubbleTextSection,
NumberedStepsVerticalCardsSection,
} from "./site-component-schemas";
// ============================================
// Re-export Syllabus Schemas from Component Registry
// ============================================
export {
syllabusModuleSchema,
focusAreaSchema,
moduleCardSchema,
techLogoSchema,
syllabusDefaultSchema,
syllabusLandingSchema,
syllabusProgramModulesSchema,
syllabusTimelineItemSchema,
syllabusTimelineModuleSchema,
syllabusTimelineSchema,
syllabusSectionSchema,
type SyllabusModule,
type FocusArea,
type ModuleCard,
type TechLogo,
type SyllabusDefault,
type SyllabusLanding,
type SyllabusProgramModules,
type SyllabusTimelineItem,
type SyllabusTimelineModule,
type SyllabusTimeline,
type SyllabusSection,
} from "./site-component-schemas";
// ============================================
// Re-export Projects Schemas from Component Registry
// ============================================
export {
projectItemSchema,
projectsSectionSchema,
type ProjectItem,
type ProjectsSection,
} from "./site-component-schemas";
// ============================================
// Re-export Features Grid Schemas from Component Registry
// Only export unified schema and item schemas (not individual variants)
// ============================================
export {
featuresGridHighlightItemSchema,
featuresGridDetailedItemSchema,
featuresGridTextOnlyItemSchema,
featuresGridSectionSchema,
type FeaturesGridHighlightItem,
type FeaturesGridDetailedItem,
type FeaturesGridTextOnlyItem,
type FeaturesGridSection,
} from "./site-component-schemas";
// Variant types for type narrowing (schemas are internal to component registry)
export type {
FeaturesGridHighlightSection,
FeaturesGridDetailedSection,
FeaturesGridSpotlightSection,
FeaturesGridStatsCardsSection,
FeaturesGridStatsTextCardSection,
FeaturesGridStatsTextSection,
FeaturesGridTextOnlySection,
FeaturesGridCardHeaderSection,
FeaturesGridStatsCardsItem,
SpotlightConfig,
FeaturesGridStatsChartsSection,
FeaturesGridStatsChartsCardBars,
FeaturesGridStatsChartsCardGauge,
FeaturesGridStatsChartsCardTrend,
} from "./site-component-schemas";
// ============================================
// Re-export Testimonials Slide Schemas from Component Registry
// ============================================
export {
testimonialsSlideTestimonialSchema,
testimonialsSlideSectionSchema,
type TestimonialsSlideTestimonial,
type TestimonialsSlideSection,
} from "./site-component-schemas";
// ============================================
// Re-export CTA Banner Schemas from Component Registry
// ============================================
export {
ctaBannerSectionSchema,
ctaBannerDefaultSchema,
ctaBannerFormSchema,
ctaBannerStripSchema,
ctaBannerResourceShowcaseSchema,
ctaBannerPromotionSchema,
type CtaBannerSection,
type CtaBannerDefault,
type CtaBannerForm,
type CtaBannerStrip,
type CtaBannerResourceShowcase,
type CtaBannerPromotion,
} from "./site-component-schemas";
// Type alias for backward compatibility
export type CTABannerSection = import("./site-component-schemas").CtaBannerSection;
export type CTAButton = import("./component-registry/_common/schema").CtaButton;
export type LeadFormFieldConfig = z.infer<typeof import("./component-registry/_common/schema").leadFormFieldConfigSchema>;
// ============================================
// Re-export Project Showcase Schemas from Component Registry
// ============================================
export {
projectShowcaseCreatorSchema,
projectShowcaseMediaSchema,
projectShowcaseItemSchema,
projectShowcaseSectionSchema,
projectsShowcaseSectionSchema,
type ProjectShowcaseCreator,
type ProjectShowcaseMedia,
type ProjectShowcaseItem,
type ProjectShowcaseSection,
type ProjectsShowcaseSection,
} from "./site-component-schemas";
// ============================================
// Re-export Comparison Table Schemas from Component Registry
// ============================================
export {
comparisonTableColumnSchema,
comparisonTableCtaButtonSchema,
comparisonTableCellSchema,
comparisonTableCellValueSchema,
comparisonTableRowSchema,
comparisonTableSectionSchema,
type ComparisonTableCtaButton,
type ComparisonTableCell,
type ComparisonTableCellValue,
type ComparisonTableColumn,
type ComparisonTableRow,
type ComparisonTableSection,
} from "./site-component-schemas";
// ============================================
// Re-export Geeks vs Others Comparison Schemas from Component Registry
// ============================================
export {
geeksVsOthersColumnSchema,
geeksVsOthersRowSchema,
geeksVsOthersComparisonSectionSchema,
type GeeksVsOthersColumn,
type GeeksVsOthersRow,
type GeeksVsOthersComparisonSection,
} from "./site-component-schemas";
// ============================================
// Re-export Bento Cards Schemas from Component Registry
// ============================================
export {
bentoCardItemSchema,
bentoCardsSectionSchema,
type BentoCardItem,
type BentoCardsSection,
} from "./site-component-schemas";
// ============================================
// Image Registry Schemas (not in component registry)
// ============================================
export const imageSrcsetEntrySchema = z.object({
w: z.number(),
url: z.string(),
});
export const imagePresetSchema = z.object({
aspect_ratio: z.string().nullable(),
widths: z.array(z.number()),
quality: z.number(),
description: z.string(),
sizes: z.string().optional(),
});
export const imageEntrySchema = z.object({
src: z.string(),
alt: z.string(),
focal_point: z.enum(["center", "top", "bottom", "left", "right", "top-left", "top-right", "bottom-left", "bottom-right"]).optional(),
tags: z.array(z.string()).optional(),
protected: z.boolean().optional(),
usage_count: z.number().optional(),
hash: z.string().optional(),
width: z.number().optional(),
height: z.number().optional(),
preset: z.array(z.string()).optional(),
widths_generated: z.array(z.number()).optional(),
format: z.enum(["webp", "avif", "jpeg", "png"]).optional(),
srcset: z.array(imageSrcsetEntrySchema).optional(),
source_url: z.string().optional(),
failed_at: z.string().optional(),
queued_at: z.string().optional(),
source_item: z.string().optional(),
parentId: z.string().optional(),
quality_override: z.number().optional(),
/** How the asset entered the registry. Missing = legacy non-AI. */
origin: z.enum(["upload", "import", "ai"]).optional(),
ai: z
.object({
generated: z.literal(true),
/** @deprecated Prefer sidecar; kept optional for legacy rows */
model: z.string().optional(),
/** @deprecated Prefer sidecar; kept optional for legacy rows */
prompt: z.string().optional(),
generated_at: z.string().optional(),
requested_by: z
.object({
kind: z.enum(["user", "agent", "system"]),
id: z.string().optional(),
name: z.string().optional(),
})
.optional(),
/** Public URL or path of AI meta sidecar JSON (prompt/model). */
meta_src: z.string().optional(),
})
.optional(),
/** ISO timestamp of last public viewport impression (AI GC grace input). */
last_impression_at: z.string().optional(),
/** ISO timestamp when the asset was first registered (gallery Newest sort). */
registered_at: z.string().optional(),
});
export const tagDefinitionSchema = z.object({
label: z.string(),
description: z.string(),
presets: z.array(z.string()),
srcset_widths: z.array(z.number()).optional(),
detection: z.object({
yaml_fields: z.array(z.string()).optional(),
component_keys: z.array(z.string()).optional(),
filename_patterns: z.array(z.string()).optional(),
aspect_ratio_range: z.object({
min: z.number(),
max: z.number(),
}).optional(),
}).optional(),
});
export const imageRegistrySchema = z.object({
presets: z.record(z.string(), imagePresetSchema),
tagDefinitions: z.record(z.string(), tagDefinitionSchema).optional(),
images: z.record(z.string(), imageEntrySchema),
});
export const imageRefSchema = z.object({
id: z.string(),
preset: z.enum(["hero-wide", "hero-tall", "card", "card-wide", "avatar", "logo", "icon", "full"]).optional(),
alt: z.string().optional(),
className: z.string().optional(),
});
export type ImagePreset = z.infer<typeof imagePresetSchema>;
export type ImageEntry = z.infer<typeof imageEntrySchema>;
export type TagDefinition = z.infer<typeof tagDefinitionSchema>;
export type ImageRegistry = z.infer<typeof imageRegistrySchema>;
export type ImageRef = z.infer<typeof imageRefSchema>;
// ============================================
// Programs List Section (not in component registry yet)
// ============================================
export const programsListSectionSchema = z.object({
type: z.literal("programs_list"),
version: z.string().optional(),
title: z.string(),
subtitle: z.string().optional(),
filter_by_location: z.string().optional(),
});
// ============================================
// About Section (not in component registry yet)
// ============================================
export const aboutSectionSchema = z.object({
type: z.literal("about"),
version: z.string().optional(),
height: z.string().optional(),
title: z.string(),
description: z.string(),
link_text: z.string(),
link_url: z.string(),
image_src: z.string(),
image_alt: z.string(),
});
export type AboutSection = z.infer<typeof aboutSectionSchema>;
// ============================================
// Stats Section (not in component registry yet)
// ============================================
export const statsSectionSchema = z.object({
type: z.literal("stats"),
version: z.string().optional(),
title: z.string().optional(),
description: z.string().optional(),
subtitle: z.string().optional(),
background: z.string().optional(),
items: z.array(z.object({
value: z.string(),
label: z.string(),
icon: z.string().optional(),
})).optional(),
});
export type StatsSection = z.infer<typeof statsSectionSchema>;
// ============================================
// Horizontal Bars Section (chart component)
// ============================================
export const horizontalBarsSectionSchema = z.object({
type: z.literal("horizontal_bars"),
version: z.string().optional(),
title: z.string().optional(),
subtitle: z.string().optional(),
background: z.string().optional(),
use_card: z.boolean().optional(),
items: z.array(z.object({
label: z.string(),
value: z.number(),
displayValue: z.string().optional(),
color: z.string().optional(),
})),
});
export type HorizontalBarsSection = z.infer<typeof horizontalBarsSectionSchema>;
// ============================================
// Vertical Bars Cards Section (chart component)
// ============================================
export const verticalBarsYearValueSchema = z.object({
year: z.string(),
value: z.number(),
displayValue: z.string(),
});
export const verticalBarsMetricCardSchema = z.object({
title: z.string(),
unit: z.string().optional(),
icon: z.string().optional(),
description: z.string().optional(),
years: z.array(verticalBarsYearValueSchema),
});
export const verticalBarsCardsSectionSchema = z.object({
type: z.literal("vertical_bars_cards"),
version: z.string().optional(),
title: z.string().optional(),
subtitle: z.string().optional(),
background: z.string().optional(),
footer_description: z.string().optional(),
metrics: z.array(verticalBarsMetricCardSchema),
});
export type VerticalBarsYearValue = z.infer<typeof verticalBarsYearValueSchema>;
export type VerticalBarsMetricCard = z.infer<typeof verticalBarsMetricCardSchema>;
export type VerticalBarsCardsSection = z.infer<typeof verticalBarsCardsSectionSchema>;
// ============================================
// Pie Charts Section (chart component)
// ============================================
export const pieChartItemSchema = z.object({
label: z.string(),
value: z.number(),
displayValue: z.string().optional(),
color: z.string().optional(),
});
export const pieChartDataSchema = z.object({
title: z.string(),
items: z.array(pieChartItemSchema),
});
export const pieChartsSectionSchema = z.object({
type: z.literal("pie_charts"),
version: z.string().optional(),
title: z.string().optional(),
subtitle: z.string().optional(),
background: z.string().optional(),
use_card: z.boolean().optional(),
charts: z.array(pieChartDataSchema),
});
export type PieChartItem = z.infer<typeof pieChartItemSchema>;
export type PieChartData = z.infer<typeof pieChartDataSchema>;
export type PieChartsSection = z.infer<typeof pieChartsSectionSchema>;
// ============================================
// Human and AI Duo Section
// ============================================
export const humanAndAIDuoBulletSchema = z.object({
text: z.string(),
icon: z.string().optional(),
});
export const humanAndAIDuoBulletGroupSchema = z.object({
title: z.string(),
description: z.string().optional(),
image: z.string().optional(),
icon: z.string().optional(),
bullets: z.array(humanAndAIDuoBulletSchema).optional(),
});
// Image with CSS styling properties - reuse from common schema
export { imageWithStyleSchema } from "./component-registry/_common/schema";
export type ImageWithStyle = import("./component-registry/_common/schema").ImageWithStyle;
export const humanAndAIDuoSectionSchema = z.object({
type: z.literal("human_and_ai_duo"),
version: z.string().optional(),
heading: z.string(),
description: z.string(),
bullet_groups: z.array(humanAndAIDuoBulletGroupSchema).optional(),
cta: commonCtaButtonSchema.optional(),
footer_description: z.string().optional(),
// New: array of images with CSS styling
images: z.array(z.object({
src: z.string(),
alt: z.string().optional(),
object_fit: z.enum(["cover", "contain", "fill", "none", "scale-down"]).optional(),
object_position: z.string().optional(),
width: z.string().optional(),
height: z.string().optional(),
max_width: z.string().optional(),
max_height: z.string().optional(),
border_radius: z.string().optional(),
opacity: z.number().min(0).max(1).optional(),
filter: z.string().optional(),
})).optional(),
// Legacy: single image (backward compatible)
image: z.string().optional(),
image_alt: z.string().optional(),
background: z.string().optional(),
// Video option - when provided, replaces images with video
// Accepts either string URL (legacy) or full config object
video: z.union([
z.string(),
z.object({
url: z.string(),
ratio: z.string().optional(),
mobile_ratio: z.string().optional(),
width: z.string().optional(),
muted: z.boolean().optional(),
autoplay: z.boolean().optional(),
loop: z.boolean().optional(),
preview_image_url: z.string().optional(),
with_shadow_border: z.boolean().optional(),
}),
]).optional(),
// Legacy fields for backward compatibility (used when video is a string)
video_ratio: z.string().optional(),
video_preview_image: z.string().optional(),
});
export type HumanAndAIDuoBullet = z.infer<typeof humanAndAIDuoBulletSchema>;
export type HumanAndAIDuoBulletGroup = z.infer<typeof humanAndAIDuoBulletGroupSchema>;
export type HumanAndAIDuoSection = z.infer<typeof humanAndAIDuoSectionSchema>;
// ============================================
// Community Support Section (split from support_duo grid variant)
// ============================================
export const communitySupportBulletSchema = z.object({
text: z.string(),
icon: z.string().optional(),
});
export const communitySupportGroupSchema = z.object({
title: z.string(),
description: z.string().optional(),
image: z.string().optional(),
icon: z.string().optional(),
badge: z.string().optional(),
accent_color: z.string().optional(),
bullets: z.array(communitySupportBulletSchema).optional(),
button: z.object({
text: z.string(),
url: z.string(),
variant: z.string().optional(),
}).optional(),
});
export const communitySupportSectionSchema = z.object({
type: z.literal("community_support"),
version: z.string().optional(),
eyebrow: z.string().optional(),
heading: z.string(),
description: z.string(),
bullet_groups: z.array(communitySupportGroupSchema),
footer_description: z.string().optional(),
image: z.string().optional(),
image_alt: z.string().optional(),
background: z.string().optional(),
});
export type CommunitySupportBullet = z.infer<typeof communitySupportBulletSchema>;
export type CommunitySupportGroup = z.infer<typeof communitySupportGroupSchema>;
export type CommunitySupportSection = z.infer<typeof communitySupportSectionSchema>;
// ============================================
// Two Column Accordion Card Section Schema
// ============================================
import { twoColumnAccordionCardSectionSchema, twoColumnAccordionCardBulletSchema, type TwoColumnAccordionCardSection, type TwoColumnAccordionCardBullet } from "./site-component-schemas";
export { twoColumnAccordionCardSectionSchema, twoColumnAccordionCardBulletSchema, type TwoColumnAccordionCardSection, type TwoColumnAccordionCardBullet };
// ============================================
// Section Schema Union
// Import unified section schemas for use in union
// ============================================
import { heroSectionSchema as heroSchema } from "./component-registry/hero/v1.0/schema";
import { aiLearningSectionSchema } from "./site-component-schemas";
import { mentorshipSectionSchema } from "./site-component-schemas";
import { certificateSectionSchema } from "./site-component-schemas";
import { whyLearnAISectionSchema } from "./site-component-schemas";
import { pricingSectionSchema } from "./site-component-schemas";
import { faqSectionSchema } from "./component-registry/faq/v1.0/schema";
import { breadcrumbSectionSchema } from "./component-registry/breadcrumb/v1.0/schema";
import { spacerSectionSchema } from "./component-registry/spacer/v1.0/schema";
import { geekchartSectionSchema } from "./component-registry/geekchart/v1.0/schema";
import { schemaOrgSectionSchema } from "./component-registry/schema_org/v1.0/schema";
export { schemaOrgSectionSchema, type SchemaOrgSection } from "./component-registry/schema_org/v1.0/schema";
import { testimonialsSectionSchema } from "./site-component-schemas";
import { whosHiringSectionSchema } from "./site-component-schemas";
import { footerSectionSchema } from "./site-component-schemas";
import { twoColumnSectionSchema } from "./site-component-schemas";
import { numberedStepsSectionSchema } from "./site-component-schemas";
import { syllabusSectionSchema } from "./site-component-schemas";
import { projectsSectionSchema } from "./site-component-schemas";
import { featuresGridSectionSchema as featuresGridSchema } from "./site-component-schemas";
import { testimonialsSlideSectionSchema } from "./site-component-schemas";
import { testimonialsGridSectionSchema } from "./site-component-schemas";
import { ctaBannerSectionSchema } from "./site-component-schemas";
import { projectShowcaseSectionSchema, projectsShowcaseSectionSchema } from "./site-component-schemas";
import { comparisonTableSectionSchema } from "./site-component-schemas";
import { geeksVsOthersComparisonSectionSchema } from "./site-component-schemas";
import { bulletTabsShowcaseSectionSchema, type BulletTabsShowcaseSection, type BulletTab } from "./site-component-schemas";
export { bulletTabsShowcaseSectionSchema, type BulletTabsShowcaseSection, type BulletTab };
import { graduatesStatsSectionSchema, graduatesFeaturedImageSchema, type GraduatesStatsSection, type GraduatesStatItem, type GraduatesCollageImage, type GraduatesFeaturedImage, type GraduatesStatsAsymmetric } from "./site-component-schemas";
import { splitCardsSectionSchema } from "./site-component-schemas";
export { graduatesStatsSectionSchema, graduatesFeaturedImageSchema, type GraduatesStatsSection, type GraduatesStatItem, type GraduatesCollageImage, type GraduatesFeaturedImage, type GraduatesStatsAsymmetric };
import { applyFormSectionSchema } from "./site-component-schemas";
import { awardBadgesSectionSchema } from "./site-component-schemas";
import { awardsMarqueeSectionSchema, type AwardsMarqueeSection, type AwardsMarqueeItem } from "./component-registry/awards_marquee/v1.0/schema";
export { awardsMarqueeSectionSchema, type AwardsMarqueeSection, type AwardsMarqueeItem };
import { listPressMentionsSectionSchema, type ListPressMentionsSection, type PressMentionItem, pressMentionsSectionSchema, type PressMentionsSection } from "./site-component-schemas";
export { listPressMentionsSectionSchema, type ListPressMentionsSection, type PressMentionItem };
export { pressMentionsSectionSchema, type PressMentionsSection };
import {
listWorkshopsCarouselSectionSchema,
workshopCarouselItemSchema,
type ListWorkshopsCarouselSection,
type WorkshopCarouselItem,
} from "./site-component-schemas";
export {
listWorkshopsCarouselSectionSchema,
workshopCarouselItemSchema,
type ListWorkshopsCarouselSection,
type WorkshopCarouselItem,
};
export { listSinglePressMentionSectionSchema, type ListSinglePressMentionSection } from "./site-component-schemas";
import { valueProofPanelSectionSchema } from "./site-component-schemas";
import { stickyCtaSectionSchema } from "./site-component-schemas";
export { stickyCtaSectionSchema, type StickyCtaSection } from "./site-component-schemas";
import { modalSectionSchema } from "./site-component-schemas";
export { modalSectionSchema, type ModalSection } from "./site-component-schemas";
import { bentoCardsSectionSchema } from "./site-component-schemas";
import { bannerSchema, bannerSectionSchema, bannerMarqueeBadgesSchema, type BannerSection, type BannerMarqueeBadges } from "./site-component-schemas";
export { bannerSectionSchema, bannerMarqueeBadgesSchema, type BannerSection, type BannerMarqueeBadges };
import { imageRowSectionSchema, type ImageRowSection, type ImageRowSlide } from "./site-component-schemas";
export { imageRowSectionSchema, type ImageRowSection, type ImageRowSlide };
import { courseSelectorSectionSchema, type CourseSelectorSection, type CourseItem, type CourseBadge, type CourseTag } from "./site-component-schemas";
export { courseSelectorSectionSchema, type CourseSelectorSection, type CourseItem, type CourseBadge, type CourseTag };
import {
enrollmentSelectorDefaultSchema,
enrollmentProgramSchema,
enrollmentPlanSchema,
enrollmentSummarySchema,
enrollmentSelectorSectionSchema,
type EnrollmentSelectorDefault,
type EnrollmentSelectorSection,
type EnrollmentSelectorProgram,
type EnrollmentSelectorPlan,
type EnrollmentSummary,
type EnrollmentQueryComponentItem,
} from "./site-component-schemas";
export {
enrollmentSelectorDefaultSchema,
enrollmentProgramSchema,
enrollmentPlanSchema,
enrollmentSummarySchema,
enrollmentSelectorSectionSchema,
type EnrollmentSelectorDefault,
type EnrollmentSelectorSection,
type EnrollmentSelectorProgram,
type EnrollmentSelectorPlan,
type EnrollmentSummary,
type EnrollmentQueryComponentItem,
};
import { articleSectionSchema, type ArticleSection } from "../shared/component-registry/article/v1.0/schema";
export { articleSectionSchema, type ArticleSection };
import { partnershipCarouselSectionSchema, type PartnershipCarouselSection, type PartnershipSlide } from "./site-component-schemas";
export { partnershipCarouselSectionSchema, type PartnershipCarouselSection, type PartnershipSlide };
import { careerSupportExplainSectionSchema, type CareerSupportExplainSection, type CareerSupportTab, type CareerSupportBox, type CareerSupportBullet, type CareerSupportStat, type CareerSupportLogo, type CareerSupportTestimonial, type CareerSupportTestimonialLogo } from "./site-component-schemas";
export { careerSupportExplainSectionSchema, type CareerSupportExplainSection, type CareerSupportTab, type CareerSupportBox, type CareerSupportBullet, type CareerSupportStat, type CareerSupportLogo, type CareerSupportTestimonial, type CareerSupportTestimonialLogo };
import { profilesCarouselSectionSchema, type ProfilesCarouselSection, type ProfileCard } from "./site-component-schemas";
export { profilesCarouselSectionSchema, type ProfilesCarouselSection, type ProfileCard };
import { dynamicTableSectionSchema, type DynamicTableSection, type DynamicTableColumn, type DynamicTableAction } from "./site-component-schemas";
export { dynamicTableSectionSchema, type DynamicTableSection, type DynamicTableColumn, type DynamicTableAction };
import { doubleCTASectionSchema, type DoubleCTASection, type DoubleCTABox, type DoubleCTABullet } from "./site-component-schemas";
export { doubleCTASectionSchema, type DoubleCTASection, type DoubleCTABox, type DoubleCTABullet };
import { contactUsInfoSectionSchema, type ContactUsInfoSection, type ContactLocation } from "./site-component-schemas";
export { contactUsInfoSectionSchema, type ContactUsInfoSection, type ContactLocation };
import { trustCardsSectionSchema, type TrustCardsSection, type TrustCardItem } from "./site-component-schemas";
export { trustCardsSectionSchema, type TrustCardsSection, type TrustCardItem };
import { programsShowcaseSectionSchema, type ProgramsShowcaseSection, type ProgramItem } from "./site-component-schemas";