@frontlit/page-builder 0.1.0-alpha.3 → 0.1.0-alpha.5

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,12 @@
1
+ import * as React from 'react';
2
+
3
+ /**
4
+ * Star count for the header's GitHub link. Fetched in the browser, like
5
+ * CourseLit, because unauthenticated GitHub API calls are limited per IP.
6
+ * Renders nothing until loaded, on error, or for 0 stars.
7
+ */
8
+ declare function GithubStars({ repo }: {
9
+ repo: string;
10
+ }): React.JSX.Element;
11
+
12
+ export { GithubStars };
@@ -0,0 +1,31 @@
1
+ "use client";
2
+ "use client";
3
+
4
+ // src/blocks/header/github-stars.tsx
5
+ import { useEffect, useState } from "react";
6
+
7
+ // src/blocks/header/github.ts
8
+ function formatStars(count) {
9
+ return new Intl.NumberFormat("en", {
10
+ notation: "compact",
11
+ maximumFractionDigits: 1
12
+ }).format(count).toLowerCase();
13
+ }
14
+
15
+ // src/blocks/header/github-stars.tsx
16
+ import { jsx } from "react/jsx-runtime";
17
+ function GithubStars({ repo }) {
18
+ const [stars, setStars] = useState();
19
+ useEffect(() => {
20
+ const controller = new AbortController();
21
+ fetch(`https://api.github.com/repos/${repo}`, { signal: controller.signal }).then((response) => response.ok ? response.json() : void 0).then((data) => setStars(data?.stargazers_count)).catch(() => {
22
+ });
23
+ return () => controller.abort();
24
+ }, [repo]);
25
+ if (!stars) return null;
26
+ return /* @__PURE__ */ jsx("span", { children: formatStars(stars) });
27
+ }
28
+ export {
29
+ GithubStars
30
+ };
31
+ //# sourceMappingURL=header-github-stars.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/blocks/header/github-stars.tsx","../../../src/blocks/header/github.ts"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { formatStars } from \"./github\";\n\n/**\n * Star count for the header's GitHub link. Fetched in the browser, like\n * CourseLit, because unauthenticated GitHub API calls are limited per IP.\n * Renders nothing until loaded, on error, or for 0 stars.\n */\nexport function GithubStars({ repo }: { repo: string }) {\n const [stars, setStars] = useState<number>();\n\n useEffect(() => {\n const controller = new AbortController();\n fetch(`https://api.github.com/repos/${repo}`, { signal: controller.signal })\n .then((response) => (response.ok ? response.json() : undefined))\n .then((data) => setStars(data?.stargazers_count))\n .catch(() => {});\n return () => controller.abort();\n }, [repo]);\n\n if (!stars) return null;\n return <span>{formatStars(stars)}</span>;\n}\n","/** `owner/repo` from `owner/repo` or a `https://github.com/owner/repo` URL. */\nexport function parseGithubRepo(value?: string): string | undefined {\n const match = value\n ?.trim()\n .match(/^(?:https?:\\/\\/(?:www\\.)?github\\.com\\/)?([\\w.-]+\\/[\\w.-]+?)(?:\\.git)?\\/?$/);\n return match?.[1];\n}\n\n/** 1234 → \"1.2k\", like GitHub's own star count. */\nexport function formatStars(count: number): string {\n return new Intl.NumberFormat(\"en\", {\n notation: \"compact\",\n maximumFractionDigits: 1,\n })\n .format(count)\n .toLowerCase();\n}\n"],"mappings":";;;;AAEA,SAAS,WAAW,gBAAgB;;;ACO7B,SAAS,YAAY,OAAuB;AACjD,SAAO,IAAI,KAAK,aAAa,MAAM;AAAA,IACjC,UAAU;AAAA,IACV,uBAAuB;AAAA,EACzB,CAAC,EACE,OAAO,KAAK,EACZ,YAAY;AACjB;;;ADOS;AAbF,SAAS,YAAY,EAAE,KAAK,GAAqB;AACtD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAiB;AAE3C,YAAU,MAAM;AACd,UAAM,aAAa,IAAI,gBAAgB;AACvC,UAAM,gCAAgC,IAAI,IAAI,EAAE,QAAQ,WAAW,OAAO,CAAC,EACxE,KAAK,CAAC,aAAc,SAAS,KAAK,SAAS,KAAK,IAAI,MAAU,EAC9D,KAAK,CAAC,SAAS,SAAS,MAAM,gBAAgB,CAAC,EAC/C,MAAM,MAAM;AAAA,IAAC,CAAC;AACjB,WAAO,MAAM,WAAW,MAAM;AAAA,EAChC,GAAG,CAAC,IAAI,CAAC;AAET,MAAI,CAAC,MAAO,QAAO;AACnB,SAAO,oBAAC,UAAM,sBAAY,KAAK,GAAE;AACnC;","names":[]}
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { T as ThemeStyle } from '../theme-style-5_AGy-4V.js';
4
+
5
+ type PricingPeriod = "monthly" | "yearly";
6
+
7
+ /**
8
+ * Monthly/Yearly switch for the pricing block. The plans are rendered on the
9
+ * server with both prices; this only flips `data-period` on the wrapper and
10
+ * CSS shows the matching one, so prices are in the HTML before hydration.
11
+ */
12
+ declare function PricingPeriodSwitch({ defaultPeriod, monthlyCaption, yearlyCaption, theme, children, }: {
13
+ defaultPeriod: PricingPeriod;
14
+ monthlyCaption: string;
15
+ yearlyCaption: string;
16
+ theme: ThemeStyle;
17
+ children: ReactNode;
18
+ }): React.JSX.Element;
19
+
20
+ export { PricingPeriodSwitch };
@@ -0,0 +1,151 @@
1
+ "use client";
2
+ "use client";
3
+
4
+ // src/blocks/pricing/period-switch.tsx
5
+ import { useId, useState } from "react";
6
+
7
+ // src/primitives/lib/utils.ts
8
+ import { clsx } from "clsx";
9
+ import { twMerge } from "tailwind-merge";
10
+ function cn(...inputs) {
11
+ return twMerge(clsx(inputs));
12
+ }
13
+
14
+ // src/primitives/label.tsx
15
+ import React2 from "react";
16
+
17
+ // src/primitives/components/ui/label.tsx
18
+ import * as LabelPrimitive from "@radix-ui/react-label";
19
+ import { cva } from "class-variance-authority";
20
+ import * as React from "react";
21
+ import { jsx } from "react/jsx-runtime";
22
+ var labelVariants = cva(
23
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
24
+ );
25
+ var Label = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
26
+ LabelPrimitive.Root,
27
+ {
28
+ ref,
29
+ className: cn(labelVariants(), className),
30
+ ...props
31
+ }
32
+ ));
33
+ Label.displayName = LabelPrimitive.Root.displayName;
34
+
35
+ // src/primitives/label.tsx
36
+ import { jsx as jsx2 } from "react/jsx-runtime";
37
+ var Label2 = React2.forwardRef(
38
+ ({ className = "", theme, error = false, ...props }, ref) => {
39
+ const typographyStyles = theme?.typography?.text2;
40
+ const classes = cn(
41
+ // Theme typography
42
+ typographyStyles?.fontFamily,
43
+ typographyStyles?.fontSize,
44
+ typographyStyles?.fontWeight,
45
+ typographyStyles?.lineHeight,
46
+ typographyStyles?.letterSpacing,
47
+ typographyStyles?.textTransform,
48
+ typographyStyles?.textDecoration,
49
+ typographyStyles?.textOverflow,
50
+ // Error state
51
+ error && "text-red-500",
52
+ className
53
+ );
54
+ return /* @__PURE__ */ jsx2(Label, { ref, className: classes, ...props });
55
+ }
56
+ );
57
+ Label2.displayName = "Label";
58
+
59
+ // src/primitives/switch.tsx
60
+ import React4 from "react";
61
+
62
+ // src/primitives/components/ui/switch.tsx
63
+ import * as SwitchPrimitives from "@radix-ui/react-switch";
64
+ import * as React3 from "react";
65
+ import { jsx as jsx3 } from "react/jsx-runtime";
66
+ var Switch = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
67
+ SwitchPrimitives.Root,
68
+ {
69
+ className: cn(
70
+ "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
71
+ className
72
+ ),
73
+ ...props,
74
+ ref,
75
+ children: /* @__PURE__ */ jsx3(
76
+ SwitchPrimitives.Thumb,
77
+ {
78
+ className: cn(
79
+ "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
80
+ )
81
+ }
82
+ )
83
+ }
84
+ ));
85
+ Switch.displayName = SwitchPrimitives.Root.displayName;
86
+
87
+ // src/primitives/switch.tsx
88
+ import { jsx as jsx4 } from "react/jsx-runtime";
89
+ var Switch2 = React4.forwardRef(({ className = "", theme, ...props }, ref) => {
90
+ const classes = cn(
91
+ // Base styles
92
+ "",
93
+ // User overrides
94
+ className
95
+ );
96
+ return /* @__PURE__ */ jsx4(Switch, { ref, className: classes, ...props });
97
+ });
98
+
99
+ // src/blocks/pricing/period-switch.tsx
100
+ import { jsx as jsx5, jsxs } from "react/jsx-runtime";
101
+ function PricingPeriodSwitch({
102
+ defaultPeriod,
103
+ monthlyCaption,
104
+ yearlyCaption,
105
+ theme,
106
+ children
107
+ }) {
108
+ const [period, setPeriod] = useState(defaultPeriod);
109
+ const id = useId();
110
+ const monthlyId = `${id}-monthly`;
111
+ const yearlyId = `${id}-yearly`;
112
+ return /* @__PURE__ */ jsxs("div", { "data-period": period, className: "group/pricing flex flex-col gap-8", children: [
113
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-3", children: [
114
+ /* @__PURE__ */ jsx5(
115
+ Label2,
116
+ {
117
+ id: monthlyId,
118
+ theme,
119
+ className: "cursor-pointer",
120
+ onClick: () => setPeriod("monthly"),
121
+ children: monthlyCaption
122
+ }
123
+ ),
124
+ /* @__PURE__ */ jsx5(
125
+ Switch2,
126
+ {
127
+ theme,
128
+ checked: period === "yearly",
129
+ onCheckedChange: (checked) => setPeriod(checked ? "yearly" : "monthly"),
130
+ "aria-labelledby": yearlyId,
131
+ "aria-describedby": monthlyId
132
+ }
133
+ ),
134
+ /* @__PURE__ */ jsx5(
135
+ Label2,
136
+ {
137
+ id: yearlyId,
138
+ theme,
139
+ className: "cursor-pointer",
140
+ onClick: () => setPeriod("yearly"),
141
+ children: yearlyCaption
142
+ }
143
+ )
144
+ ] }),
145
+ children
146
+ ] });
147
+ }
148
+ export {
149
+ PricingPeriodSwitch
150
+ };
151
+ //# sourceMappingURL=pricing-period-switch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/blocks/pricing/period-switch.tsx","../../../src/primitives/lib/utils.ts","../../../src/primitives/label.tsx","../../../src/primitives/components/ui/label.tsx","../../../src/primitives/switch.tsx","../../../src/primitives/components/ui/switch.tsx"],"sourcesContent":["\"use client\";\n\nimport { type ReactNode, useId, useState } from \"react\";\nimport type { ThemeStyle } from \"../../models\";\nimport type { PricingPeriod } from \"./settings\";\nimport { Label, Switch } from \"../../primitives\";\n\n/**\n * Monthly/Yearly switch for the pricing block. The plans are rendered on the\n * server with both prices; this only flips `data-period` on the wrapper and\n * CSS shows the matching one, so prices are in the HTML before hydration.\n */\nexport function PricingPeriodSwitch({\n defaultPeriod,\n monthlyCaption,\n yearlyCaption,\n theme,\n children,\n}: {\n defaultPeriod: PricingPeriod;\n monthlyCaption: string;\n yearlyCaption: string;\n theme: ThemeStyle;\n children: ReactNode;\n}) {\n const [period, setPeriod] = useState<PricingPeriod>(defaultPeriod);\n const id = useId();\n const monthlyId = `${id}-monthly`;\n const yearlyId = `${id}-yearly`;\n\n return (\n <div data-period={period} className=\"group/pricing flex flex-col gap-8\">\n <div className=\"flex items-center justify-center gap-3\">\n <Label\n id={monthlyId}\n theme={theme}\n className=\"cursor-pointer\"\n onClick={() => setPeriod(\"monthly\")}\n >\n {monthlyCaption}\n </Label>\n <Switch\n theme={theme}\n checked={period === \"yearly\"}\n onCheckedChange={(checked) => setPeriod(checked ? \"yearly\" : \"monthly\")}\n aria-labelledby={yearlyId}\n aria-describedby={monthlyId}\n />\n <Label\n id={yearlyId}\n theme={theme}\n className=\"cursor-pointer\"\n onClick={() => setPeriod(\"yearly\")}\n >\n {yearlyCaption}\n </Label>\n </div>\n {children}\n </div>\n );\n}\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import React from \"react\";\nimport type { ThemeStyle } from \"../models\";\nimport { Label as ShadcnLabel } from \"./components/ui/label\";\nimport { cn } from \"./lib/utils\";\n\nexport interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {\n theme?: ThemeStyle;\n error?: boolean;\n}\n\nexport const Label = React.forwardRef<HTMLLabelElement, LabelProps>(\n ({ className = \"\", theme, error = false, ...props }, ref) => {\n const typographyStyles = theme?.typography?.text2;\n\n const classes = cn(\n // Theme typography\n typographyStyles?.fontFamily,\n typographyStyles?.fontSize,\n typographyStyles?.fontWeight,\n typographyStyles?.lineHeight,\n typographyStyles?.letterSpacing,\n typographyStyles?.textTransform,\n typographyStyles?.textDecoration,\n typographyStyles?.textOverflow,\n // Error state\n error && \"text-red-500\",\n className,\n );\n\n return <ShadcnLabel ref={ref} className={classes} {...props} />;\n },\n);\n\nLabel.displayName = \"Label\";\n","import * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n);\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(labelVariants(), className)}\n {...props}\n />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n","import React from \"react\";\nimport type { ThemeStyle } from \"../models\";\nimport { Switch as ShadcnSwitch } from \"./components/ui/switch\";\nimport { cn } from \"./lib/utils\";\n\nexport interface SwitchProps\n extends React.ComponentPropsWithoutRef<typeof ShadcnSwitch> {\n theme?: ThemeStyle;\n}\n\nexport const Switch = React.forwardRef<\n React.ElementRef<typeof ShadcnSwitch>,\n SwitchProps\n>(({ className = \"\", theme, ...props }, ref) => {\n const classes = cn(\n // Base styles\n \"\",\n // User overrides\n className,\n );\n\n return <ShadcnSwitch ref={ref} className={classes} {...props} />;\n});\n","import * as SwitchPrimitives from \"@radix-ui/react-switch\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Switch = React.forwardRef<\n React.ElementRef<typeof SwitchPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>\n>(({ className, ...props }, ref) => (\n <SwitchPrimitives.Root\n className={cn(\n \"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input\",\n className,\n )}\n {...props}\n ref={ref}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n \"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0\",\n )}\n />\n </SwitchPrimitives.Root>\n));\nSwitch.displayName = SwitchPrimitives.Root.displayName;\n\nexport { Switch };\n"],"mappings":"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","names":["React","jsx","Label","React","React","React","jsx","jsx","Switch","React","jsx","Label","Switch"]}
@@ -5,7 +5,7 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
5
5
  import { VariantProps } from 'class-variance-authority';
6
6
 
7
7
  declare const buttonVariants: (props?: {
8
- variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
8
+ variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost";
9
9
  size?: "default" | "sm" | "lg" | "icon";
10
10
  } & class_variance_authority_types.ClassProp) => string;
11
11
  interface ButtonProps$1 extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
@@ -44,6 +44,8 @@ declare function blockSettingsSchemas(k: FieldKinds): {
44
44
  linkAlignment: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
45
45
  backdropBlur: z.ZodOptional<z.ZodBoolean>;
46
46
  logoCorners: z.ZodOptional<z.ZodNumber>;
47
+ githubRepo: z.ZodOptional<z.ZodString>;
48
+ showGithubStars: z.ZodOptional<z.ZodBoolean>;
47
49
  cssId: z.ZodOptional<z.ZodString>;
48
50
  verticalPadding: z.ZodOptional<z.ZodEnum<["py-0", "py-4", "py-6", "py-8", "py-10", "py-12", "py-16", "py-20", "py-24", "py-32", "py-40", "py-48", "py-56", "py-64"]>>;
49
51
  maxWidth: z.ZodOptional<z.ZodEnum<["max-w-2xl", "max-w-3xl", "max-w-4xl", "max-w-5xl", "max-w-6xl"]>>;
@@ -162,6 +164,8 @@ declare function blockSettingsSchemas(k: FieldKinds): {
162
164
  ctaHref?: string;
163
165
  linkAlignment?: "left" | "center" | "right";
164
166
  backdropBlur?: boolean;
167
+ githubRepo?: string;
168
+ showGithubStars?: boolean;
165
169
  }, {
166
170
  layout?: "fixed" | "centered" | "floating";
167
171
  cssId?: string;
@@ -197,6 +201,8 @@ declare function blockSettingsSchemas(k: FieldKinds): {
197
201
  ctaHref?: string;
198
202
  linkAlignment?: "left" | "center" | "right";
199
203
  backdropBlur?: boolean;
204
+ githubRepo?: string;
205
+ showGithubStars?: boolean;
200
206
  }>;
201
207
  hero: z.ZodObject<{
202
208
  description: z.ZodOptional<z.ZodTypeAny>;
@@ -1514,13 +1520,19 @@ declare function blockSettingsSchemas(k: FieldKinds): {
1514
1520
  pricing: z.ZodObject<{
1515
1521
  description: z.ZodOptional<z.ZodTypeAny>;
1516
1522
  headerAlignment: z.ZodOptional<z.ZodEnum<["left", "center", "right", "top", "bottom"]>>;
1523
+ pricingSwitcher: z.ZodOptional<z.ZodBoolean>;
1524
+ monthlyPriceCaption: z.ZodOptional<z.ZodString>;
1525
+ yearlyPriceCaption: z.ZodOptional<z.ZodString>;
1526
+ defaultPeriod: z.ZodOptional<z.ZodEnum<["monthly", "yearly"]>>;
1517
1527
  tiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
1518
1528
  name: z.ZodString;
1519
1529
  price: z.ZodString;
1530
+ priceYearly: z.ZodOptional<z.ZodString>;
1520
1531
  description: z.ZodOptional<z.ZodString>;
1521
1532
  features: z.ZodArray<z.ZodString, "many">;
1522
1533
  buttonCaption: z.ZodOptional<z.ZodString>;
1523
1534
  buttonAction: z.ZodOptional<z.ZodString>;
1535
+ buttonActionYearly: z.ZodOptional<z.ZodString>;
1524
1536
  highlighted: z.ZodOptional<z.ZodBoolean>;
1525
1537
  }, "strict", z.ZodTypeAny, {
1526
1538
  description?: string;
@@ -1529,7 +1541,9 @@ declare function blockSettingsSchemas(k: FieldKinds): {
1529
1541
  name?: string;
1530
1542
  highlighted?: boolean;
1531
1543
  price?: string;
1544
+ priceYearly?: string;
1532
1545
  features?: string[];
1546
+ buttonActionYearly?: string;
1533
1547
  }, {
1534
1548
  description?: string;
1535
1549
  buttonCaption?: string;
@@ -1537,7 +1551,9 @@ declare function blockSettingsSchemas(k: FieldKinds): {
1537
1551
  name?: string;
1538
1552
  highlighted?: boolean;
1539
1553
  price?: string;
1554
+ priceYearly?: string;
1540
1555
  features?: string[];
1556
+ buttonActionYearly?: string;
1541
1557
  }>, "many">>;
1542
1558
  titleLevel: z.ZodOptional<z.ZodEnum<["h1", "h2", "h3"]>>;
1543
1559
  titleSize: z.ZodOptional<z.ZodObject<{
@@ -1683,8 +1699,14 @@ declare function blockSettingsSchemas(k: FieldKinds): {
1683
1699
  name?: string;
1684
1700
  highlighted?: boolean;
1685
1701
  price?: string;
1702
+ priceYearly?: string;
1686
1703
  features?: string[];
1704
+ buttonActionYearly?: string;
1687
1705
  }[];
1706
+ pricingSwitcher?: boolean;
1707
+ monthlyPriceCaption?: string;
1708
+ yearlyPriceCaption?: string;
1709
+ defaultPeriod?: "monthly" | "yearly";
1688
1710
  }, {
1689
1711
  title?: string;
1690
1712
  description?: any;
@@ -1730,8 +1752,14 @@ declare function blockSettingsSchemas(k: FieldKinds): {
1730
1752
  name?: string;
1731
1753
  highlighted?: boolean;
1732
1754
  price?: string;
1755
+ priceYearly?: string;
1733
1756
  features?: string[];
1757
+ buttonActionYearly?: string;
1734
1758
  }[];
1759
+ pricingSwitcher?: boolean;
1760
+ monthlyPriceCaption?: string;
1761
+ yearlyPriceCaption?: string;
1762
+ defaultPeriod?: "monthly" | "yearly";
1735
1763
  }>;
1736
1764
  faq: z.ZodObject<{
1737
1765
  headerAlignment: z.ZodOptional<z.ZodEnum<["left", "center", "right", "top", "bottom"]>>;
@@ -6587,6 +6615,8 @@ declare const siteFileSchema: z.ZodObject<{
6587
6615
  linkAlignment: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
6588
6616
  backdropBlur: z.ZodOptional<z.ZodBoolean>;
6589
6617
  logoCorners: z.ZodOptional<z.ZodNumber>;
6618
+ githubRepo: z.ZodOptional<z.ZodString>;
6619
+ showGithubStars: z.ZodOptional<z.ZodBoolean>;
6590
6620
  cssId: z.ZodOptional<z.ZodString>;
6591
6621
  verticalPadding: z.ZodOptional<z.ZodEnum<["py-0", "py-4", "py-6", "py-8", "py-10", "py-12", "py-16", "py-20", "py-24", "py-32", "py-40", "py-48", "py-56", "py-64"]>>;
6592
6622
  maxWidth: z.ZodOptional<z.ZodEnum<["max-w-2xl", "max-w-3xl", "max-w-4xl", "max-w-5xl", "max-w-6xl"]>>;
@@ -6705,6 +6735,8 @@ declare const siteFileSchema: z.ZodObject<{
6705
6735
  ctaHref?: string;
6706
6736
  linkAlignment?: "left" | "center" | "right";
6707
6737
  backdropBlur?: boolean;
6738
+ githubRepo?: string;
6739
+ showGithubStars?: boolean;
6708
6740
  }, {
6709
6741
  layout?: "fixed" | "centered" | "floating";
6710
6742
  cssId?: string;
@@ -6740,6 +6772,8 @@ declare const siteFileSchema: z.ZodObject<{
6740
6772
  ctaHref?: string;
6741
6773
  linkAlignment?: "left" | "center" | "right";
6742
6774
  backdropBlur?: boolean;
6775
+ githubRepo?: string;
6776
+ showGithubStars?: boolean;
6743
6777
  }>>;
6744
6778
  footer: z.ZodOptional<z.ZodObject<{
6745
6779
  layout: z.ZodOptional<z.ZodEnum<["columns", "centered", "minimal"]>>;
@@ -6946,6 +6980,8 @@ declare const siteFileSchema: z.ZodObject<{
6946
6980
  ctaHref?: string;
6947
6981
  linkAlignment?: "left" | "center" | "right";
6948
6982
  backdropBlur?: boolean;
6983
+ githubRepo?: string;
6984
+ showGithubStars?: boolean;
6949
6985
  };
6950
6986
  footer?: {
6951
6987
  layout?: "columns" | "centered" | "minimal";
@@ -7472,6 +7508,8 @@ declare const siteFileSchema: z.ZodObject<{
7472
7508
  ctaHref?: string;
7473
7509
  linkAlignment?: "left" | "center" | "right";
7474
7510
  backdropBlur?: boolean;
7511
+ githubRepo?: string;
7512
+ showGithubStars?: boolean;
7475
7513
  };
7476
7514
  footer?: {
7477
7515
  layout?: "columns" | "centered" | "minimal";
@@ -5449,7 +5449,11 @@ function blockSettingsSchemas(k) {
5449
5449
  ctaHref: hrefSchema.optional(),
5450
5450
  linkAlignment: horizontalAlignmentSchema.optional(),
5451
5451
  backdropBlur: external_exports.boolean().optional(),
5452
- logoCorners: radius.optional()
5452
+ logoCorners: radius.optional(),
5453
+ githubRepo: external_exports.string().optional().describe(
5454
+ 'GitHub repository as "owner/repo" or a github.com URL. Shows a GitHub icon link; other values are ignored.'
5455
+ ),
5456
+ showGithubStars: external_exports.boolean().optional().describe("Show the repository's star count next to the GitHub icon.")
5453
5457
  }).strict(),
5454
5458
  hero: external_exports.object({
5455
5459
  ...common,
@@ -5559,14 +5563,25 @@ function blockSettingsSchemas(k) {
5559
5563
  ...titleSettingsShape,
5560
5564
  description: k.richText.optional(),
5561
5565
  headerAlignment: alignmentSchema.optional(),
5566
+ pricingSwitcher: external_exports.boolean().optional().describe("Show a Monthly/Yearly switch above the plans."),
5567
+ monthlyPriceCaption: external_exports.string().optional().describe('Defaults to "Monthly".'),
5568
+ yearlyPriceCaption: external_exports.string().optional().describe('Defaults to "Yearly", e.g. "Yearly (2 months free)".'),
5569
+ defaultPeriod: external_exports.enum(["monthly", "yearly"]).optional().describe("Period selected on load. Defaults to yearly."),
5562
5570
  tiers: external_exports.array(
5563
5571
  external_exports.object({
5564
5572
  name: external_exports.string(),
5565
- price: external_exports.string().describe('Display string, e.g. "$29/mo".'),
5573
+ price: external_exports.string().describe(
5574
+ 'Display string, e.g. "$29/month". The monthly price when pricingSwitcher is on.'
5575
+ ),
5576
+ priceYearly: external_exports.string().optional().describe(
5577
+ 'Shown when the switch is on Yearly, e.g. "$290/year". Falls back to price.'
5578
+ ),
5566
5579
  description: external_exports.string().optional(),
5567
5580
  features: external_exports.array(external_exports.string()),
5568
5581
  buttonCaption: external_exports.string().optional(),
5569
5582
  buttonAction: hrefSchema.optional(),
5583
+ // Yearly button link. Falls back to buttonAction.
5584
+ buttonActionYearly: hrefSchema.optional(),
5570
5585
  highlighted: external_exports.boolean().optional()
5571
5586
  }).strict()
5572
5587
  ).optional()