storefront-layouts 1.0.17 → 1.0.19

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.
Files changed (101) hide show
  1. package/dist/components/ui/category-tree.d.ts +5 -1
  2. package/dist/components/ui/category-tree.d.ts.map +1 -1
  3. package/dist/components/ui/category-tree.js +36 -12
  4. package/dist/components/ui/product-card.d.ts +1 -1
  5. package/dist/components/ui/product-card.d.ts.map +1 -1
  6. package/dist/components/ui/product-card.js +15 -15
  7. package/dist/editor/alignment-schemas/booking.d.ts.map +1 -1
  8. package/dist/editor/alignment-schemas/booking.js +104 -61
  9. package/dist/editor/alignment-schemas/clothing-minimal.d.ts.map +1 -1
  10. package/dist/editor/alignment-schemas/clothing-minimal.js +74 -30
  11. package/dist/editor/alignment-schemas/clothing.d.ts.map +1 -1
  12. package/dist/editor/alignment-schemas/clothing.js +87 -32
  13. package/dist/editor/alignment-schemas/food.d.ts.map +1 -1
  14. package/dist/editor/alignment-schemas/food.js +103 -48
  15. package/dist/editor/payaza-form/PayazaFormEditor.d.ts.map +1 -1
  16. package/dist/editor/payaza-form/PayazaFormEditor.js +13 -1
  17. package/dist/editor/payaza-form/components/ImageField.d.ts.map +1 -1
  18. package/dist/editor/payaza-form/components/ImageField.js +1 -1
  19. package/dist/editor/payaza-form/components/ToggleField.d.ts.map +1 -1
  20. package/dist/editor/payaza-form/components/ToggleField.js +2 -1
  21. package/dist/editor/payaza-form/data-merger.d.ts.map +1 -1
  22. package/dist/editor/payaza-form/data-merger.js +61 -9
  23. package/dist/editor/shared/EditorHeader.d.ts.map +1 -1
  24. package/dist/editor/shared/EditorHeader.js +20 -25
  25. package/dist/editor/shared/IframePreview.d.ts.map +1 -1
  26. package/dist/editor/shared/IframePreview.js +46 -22
  27. package/dist/hooks/use-payaza-checkout.d.ts.map +1 -1
  28. package/dist/hooks/use-payaza-checkout.js +0 -2
  29. package/dist/layouts/booking/components/booking-about-defaults.d.ts +16 -0
  30. package/dist/layouts/booking/components/booking-about-defaults.d.ts.map +1 -1
  31. package/dist/layouts/booking/components/booking-about-defaults.js +171 -1
  32. package/dist/layouts/booking/components/booking-footer-defaults.d.ts +2 -2
  33. package/dist/layouts/booking/components/booking-footer-defaults.d.ts.map +1 -1
  34. package/dist/layouts/booking/components/booking-footer-defaults.js +5 -8
  35. package/dist/layouts/booking/pages/AboutPage.d.ts.map +1 -1
  36. package/dist/layouts/booking/pages/AboutPage.js +51 -35
  37. package/dist/layouts/booking/pages/ContactPage.d.ts.map +1 -1
  38. package/dist/layouts/booking/pages/ContactPage.js +2 -2
  39. package/dist/layouts/booking-agenda/pages/AboutPage.d.ts.map +1 -1
  40. package/dist/layouts/booking-agenda/pages/AboutPage.js +22 -30
  41. package/dist/layouts/booking-agenda/pages/ContactPage.d.ts.map +1 -1
  42. package/dist/layouts/booking-agenda/pages/ContactPage.js +2 -2
  43. package/dist/layouts/clothing/pages/AboutPage.d.ts.map +1 -1
  44. package/dist/layouts/clothing/pages/AboutPage.js +40 -17
  45. package/dist/layouts/clothing/pages/ContactPage.d.ts.map +1 -1
  46. package/dist/layouts/clothing/pages/ContactPage.js +3 -3
  47. package/dist/layouts/clothing/pages/ProductsPage.d.ts.map +1 -1
  48. package/dist/layouts/clothing/pages/ProductsPage.js +18 -4
  49. package/dist/layouts/clothing/styles/clothing.css +28 -1
  50. package/dist/layouts/clothing-minimal/pages/AboutPage.d.ts.map +1 -1
  51. package/dist/layouts/clothing-minimal/pages/AboutPage.js +41 -34
  52. package/dist/layouts/clothing-minimal/pages/ContactPage.d.ts.map +1 -1
  53. package/dist/layouts/clothing-minimal/pages/ContactPage.js +2 -2
  54. package/dist/layouts/electronics/components/ElectronicsStoreFooter.d.ts.map +1 -1
  55. package/dist/layouts/electronics/components/ElectronicsStoreFooter.js +1 -1
  56. package/dist/layouts/electronics/pages/AboutPage.d.ts.map +1 -1
  57. package/dist/layouts/electronics/pages/AboutPage.js +13 -25
  58. package/dist/layouts/electronics/pages/ContactPage.d.ts.map +1 -1
  59. package/dist/layouts/electronics/pages/ContactPage.js +2 -2
  60. package/dist/layouts/electronics-grid/components/ElectronicsHomePageGrid.d.ts.map +1 -1
  61. package/dist/layouts/electronics-grid/components/ElectronicsHomePageGrid.js +1 -1
  62. package/dist/layouts/electronics-grid/pages/AboutPage.d.ts.map +1 -1
  63. package/dist/layouts/electronics-grid/pages/AboutPage.js +13 -25
  64. package/dist/layouts/electronics-grid/pages/ContactPage.d.ts.map +1 -1
  65. package/dist/layouts/electronics-grid/pages/ContactPage.js +2 -2
  66. package/dist/layouts/food/pages/AboutPage.d.ts.map +1 -1
  67. package/dist/layouts/food/pages/AboutPage.js +48 -52
  68. package/dist/layouts/food/pages/ContactPage.d.ts.map +1 -1
  69. package/dist/layouts/food/pages/ContactPage.js +2 -2
  70. package/dist/layouts/food-modern/pages/AboutPage.d.ts.map +1 -1
  71. package/dist/layouts/food-modern/pages/AboutPage.js +16 -26
  72. package/dist/layouts/food-modern/pages/ContactPage.d.ts.map +1 -1
  73. package/dist/layouts/food-modern/pages/ContactPage.js +2 -2
  74. package/dist/layouts/motivational-speaker/pages/AboutPage.d.ts.map +1 -1
  75. package/dist/layouts/motivational-speaker/pages/AboutPage.js +15 -25
  76. package/dist/layouts/motivational-speaker/pages/ContactPage.d.ts.map +1 -1
  77. package/dist/layouts/motivational-speaker/pages/ContactPage.js +2 -2
  78. package/dist/layouts/shared/about-story-media.d.ts +27 -0
  79. package/dist/layouts/shared/about-story-media.d.ts.map +1 -0
  80. package/dist/layouts/shared/about-story-media.js +46 -0
  81. package/dist/layouts/shared/components/StoreFooter.d.ts.map +1 -1
  82. package/dist/layouts/shared/components/StoreFooter.js +4 -6
  83. package/dist/layouts/shared/components/StoreHeader.d.ts.map +1 -1
  84. package/dist/layouts/shared/components/StoreHeader.js +60 -6
  85. package/dist/layouts/shared/pages/CheckoutPage.d.ts.map +1 -1
  86. package/dist/layouts/shared/pages/CheckoutPage.js +0 -78
  87. package/dist/layouts/shared/wrappers/ClothingLayout.d.ts.map +1 -1
  88. package/dist/layouts/shared/wrappers/ClothingLayout.js +17 -0
  89. package/dist/lib/mock-stores.js +1 -1
  90. package/dist/lib/payaza-checkout.d.ts.map +1 -1
  91. package/dist/lib/payaza-checkout.js +0 -33
  92. package/dist/lib/preview-data.d.ts.map +1 -1
  93. package/dist/lib/preview-data.js +3 -2
  94. package/dist/lib/utils/category-tree.d.ts +2 -0
  95. package/dist/lib/utils/category-tree.d.ts.map +1 -1
  96. package/dist/lib/utils/category-tree.js +15 -0
  97. package/dist/lib/utils/footer-nav-defaults.d.ts +11 -2
  98. package/dist/lib/utils/footer-nav-defaults.d.ts.map +1 -1
  99. package/dist/lib/utils/footer-nav-defaults.js +29 -22
  100. package/dist/styles/index.css +203 -212
  101. package/package.json +1 -1
@@ -11,6 +11,10 @@ export interface CategoryTreeProps {
11
11
  isAllSelected?: boolean;
12
12
  storeSlug?: string;
13
13
  linkBasePath?: string;
14
+ /** When set, shows "(n)" after each category name (includes products in descendants). */
15
+ categoryProductCounts?: Record<string, number>;
16
+ /** With counts: sort by count (desc) and show only this many root categories until "See more". */
17
+ featuredRootCategoryLimit?: number;
14
18
  }
15
- export declare function CategoryTree({ categories, selectedCategoryIds, onCategoryToggle, mode, onCategorySelect, className, showAllOption, onAllSelect, isAllSelected, storeSlug, linkBasePath, }: CategoryTreeProps): import("react").JSX.Element;
19
+ export declare function CategoryTree({ categories, selectedCategoryIds, onCategoryToggle, mode, onCategorySelect, className, showAllOption, onAllSelect, isAllSelected, storeSlug, linkBasePath, categoryProductCounts, featuredRootCategoryLimit, }: CategoryTreeProps): import("react").JSX.Element;
16
20
  //# sourceMappingURL=category-tree.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"category-tree.d.ts","sourceRoot":"","sources":["../../../src/components/ui/category-tree.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAKlD,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IACrE,IAAI,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;IACtC,gBAAgB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAwLD,wBAAgB,YAAY,CAAC,EAC3B,UAAU,EACV,mBAAwB,EACxB,gBAAgB,EAChB,IAAiB,EACjB,gBAAgB,EAChB,SAAS,EACT,aAAqB,EACrB,WAAW,EACX,aAAqB,EACrB,SAAS,EACT,YAAY,GACb,EAAE,iBAAiB,+BAoFnB"}
1
+ {"version":3,"file":"category-tree.d.ts","sourceRoot":"","sources":["../../../src/components/ui/category-tree.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAKlD,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IACrE,IAAI,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;IACtC,gBAAgB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yFAAyF;IACzF,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/C,kGAAkG;IAClG,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC;AA+LD,wBAAgB,YAAY,CAAC,EAC3B,UAAU,EACV,mBAAwB,EACxB,gBAAgB,EAChB,IAAiB,EACjB,gBAAgB,EAChB,SAAS,EACT,aAAqB,EACrB,WAAW,EACX,aAAqB,EACrB,SAAS,EACT,YAAY,EACZ,qBAAqB,EACrB,yBAAyB,GAC1B,EAAE,iBAAiB,+BAiJnB"}
@@ -1,14 +1,15 @@
1
1
  'use client';
2
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useState, useMemo } from 'react';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useState, useMemo, useEffect } from 'react';
4
4
  import Link from 'next/link';
5
- import { buildCategoryTree } from '../../lib/utils/category-tree.js';
6
- import { ChevronDown, ChevronRight, Check } from 'lucide-react';
5
+ import { buildCategoryTree, getAllCategoryIds, sortCategoryTreeByProductCount } from '../../lib/utils/category-tree.js';
6
+ import { ChevronDown, ChevronRight, ChevronUp, Check } from 'lucide-react';
7
7
  import { cn, formatDisplayLabel } from '../../lib/utils/index.js';
8
- function CategoryItem({ category, level, selectedCategoryIds, onCategoryToggle, mode, onCategorySelect, expandedCategories, onToggleExpand, storeSlug, linkBasePath, }) {
8
+ function CategoryItem({ category, level, selectedCategoryIds, onCategoryToggle, mode, onCategorySelect, expandedCategories, onToggleExpand, storeSlug, linkBasePath, categoryProductCounts, }) {
9
9
  const hasChildren = category.children && category.children.length > 0;
10
10
  const isExpanded = expandedCategories.has(category.id);
11
11
  const isSelected = selectedCategoryIds.includes(category.id);
12
+ const productCount = categoryProductCounts?.[category.id];
12
13
  const handleClick = () => {
13
14
  if (mode === 'button' && onCategorySelect) {
14
15
  onCategorySelect(category.slug);
@@ -34,18 +35,40 @@ function CategoryItem({ category, level, selectedCategoryIds, onCategoryToggle,
34
35
  : 'px-3 py-2 cursor-pointer group hover:bg-slate-100 hover:text-slate-900', isSelected && mode === 'checkbox' && 'bg-blue-50 text-blue-600', isSelected && mode === 'button' && 'bg-blue-50 text-blue-600');
35
36
  const content = (_jsxs(_Fragment, { children: [mode !== 'link' && (_jsx("button", { type: "button", onClick: handleExpandToggle, className: cn('flex items-center justify-center w-5 h-5 rounded transition-colors', hasChildren ? 'cursor-pointer hover:bg-gray-200' : 'cursor-default opacity-0', level > 0 && 'ml-2'), "aria-label": isExpanded ? 'Collapse' : 'Expand', children: hasChildren && (isExpanded ? (_jsx(ChevronDown, { className: "h-3.5 w-3.5 text-gray-500" })) : (_jsx(ChevronRight, { className: "h-3.5 w-3.5 text-gray-500" }))) })), mode === 'link' && hasChildren && (_jsx("button", { type: "button", onClick: handleExpandToggle, className: cn('flex items-center justify-center w-5 h-5 rounded transition-colors cursor-pointer hover:bg-gray-200', level > 0 && 'ml-2'), "aria-label": isExpanded ? 'Collapse' : 'Expand', children: isExpanded ? (_jsx(ChevronDown, { className: "h-3.5 w-3.5 text-gray-500" })) : (_jsx(ChevronRight, { className: "h-3.5 w-3.5 text-gray-500" })) })), mode === 'checkbox' && (_jsx("div", { className: cn('w-4 h-4 rounded border flex items-center justify-center transition-colors', isSelected
36
37
  ? 'bg-blue-600 border-blue-600'
37
- : 'border-gray-300 group-hover:border-blue-400'), children: isSelected && _jsx(Check, { className: "h-3 w-3 text-white" }) })), _jsx("span", { className: cn('text-sm font-medium flex-1', level === 0 ? 'text-gray-900' : 'text-gray-700', isSelected && 'text-blue-600'), children: formatDisplayLabel(category.name) }), mode === 'button' && isSelected && (_jsx(Check, { className: "h-4 w-4 text-blue-600" })), mode === 'link' && !hasChildren && (_jsx(ChevronRight, { className: "h-3 w-3 text-gray-300 group-hover:text-gray-500" }))] }));
38
+ : 'border-gray-300 group-hover:border-blue-400'), children: isSelected && _jsx(Check, { className: "h-3 w-3 text-white" }) })), _jsxs("span", { className: cn('text-sm font-medium flex-1', level === 0 ? 'text-gray-900' : 'text-gray-700', isSelected && 'text-blue-600'), children: [formatDisplayLabel(category.name), typeof productCount === 'number' ? (_jsxs("span", { className: "text-gray-400 font-normal", children: [" (", productCount, ")"] })) : null] }), mode === 'button' && isSelected && (_jsx(Check, { className: "h-4 w-4 text-blue-600" })), mode === 'link' && !hasChildren && (_jsx(ChevronRight, { className: "h-3 w-3 text-gray-300 group-hover:text-gray-500" }))] }));
38
39
  return (_jsxs("div", { className: "space-y-1", children: [mode === 'link' && href ? (hasChildren ? (_jsx("div", { className: baseClasses, onClick: (e) => {
39
40
  e.preventDefault();
40
41
  onToggleExpand(category.id);
41
- }, children: content })) : (_jsx(Link, { href: href, className: baseClasses, children: content }))) : (_jsx("div", { className: baseClasses, onClick: handleClick, children: content })), hasChildren && isExpanded && (_jsx("div", { className: cn('space-y-1', level === 0 ? 'ml-4' : 'ml-6'), style: level > 1 ? { marginLeft: `${(level + 1) * 0.75}rem` } : undefined, children: category.children.map((child) => (_jsx(CategoryItem, { category: child, level: level + 1, selectedCategoryIds: selectedCategoryIds, onCategoryToggle: onCategoryToggle, mode: mode, onCategorySelect: onCategorySelect, expandedCategories: expandedCategories, onToggleExpand: onToggleExpand, storeSlug: storeSlug, linkBasePath: linkBasePath }, child.id))) }))] }));
42
+ }, children: content })) : (_jsx(Link, { href: href, className: baseClasses, children: content }))) : (_jsx("div", { className: baseClasses, onClick: handleClick, children: content })), hasChildren && isExpanded && (_jsx("div", { className: cn('space-y-1', level === 0 ? 'ml-4' : 'ml-6'), style: level > 1 ? { marginLeft: `${(level + 1) * 0.75}rem` } : undefined, children: category.children.map((child) => (_jsx(CategoryItem, { category: child, level: level + 1, selectedCategoryIds: selectedCategoryIds, onCategoryToggle: onCategoryToggle, mode: mode, onCategorySelect: onCategorySelect, expandedCategories: expandedCategories, onToggleExpand: onToggleExpand, storeSlug: storeSlug, linkBasePath: linkBasePath, categoryProductCounts: categoryProductCounts }, child.id))) }))] }));
42
43
  }
43
- export function CategoryTree({ categories, selectedCategoryIds = [], onCategoryToggle, mode = 'checkbox', onCategorySelect, className, showAllOption = false, onAllSelect, isAllSelected = false, storeSlug, linkBasePath, }) {
44
+ export function CategoryTree({ categories, selectedCategoryIds = [], onCategoryToggle, mode = 'checkbox', onCategorySelect, className, showAllOption = false, onAllSelect, isAllSelected = false, storeSlug, linkBasePath, categoryProductCounts, featuredRootCategoryLimit, }) {
44
45
  const [expandedCategories, setExpandedCategories] = useState(new Set());
45
- // Build category tree from flat array
46
+ const [showMoreRootCategories, setShowMoreRootCategories] = useState(false);
46
47
  const categoryTree = useMemo(() => {
47
- return buildCategoryTree(categories);
48
- }, [categories]);
48
+ let tree = buildCategoryTree(categories);
49
+ if (categoryProductCounts) {
50
+ tree = sortCategoryTreeByProductCount(tree, categoryProductCounts);
51
+ }
52
+ return tree;
53
+ }, [categories, categoryProductCounts]);
54
+ const { featuredRootCategories, overflowRootCategories } = useMemo(() => {
55
+ const limit = featuredRootCategoryLimit;
56
+ if (!limit || limit < 1 || categoryTree.length <= limit) {
57
+ return { featuredRootCategories: categoryTree, overflowRootCategories: [] };
58
+ }
59
+ return {
60
+ featuredRootCategories: categoryTree.slice(0, limit),
61
+ overflowRootCategories: categoryTree.slice(limit),
62
+ };
63
+ }, [categoryTree, featuredRootCategoryLimit]);
64
+ useEffect(() => {
65
+ if (overflowRootCategories.length === 0)
66
+ return;
67
+ const selectedInOverflow = selectedCategoryIds.some((id) => overflowRootCategories.some((root) => getAllCategoryIds(root).includes(id)));
68
+ if (selectedInOverflow) {
69
+ setShowMoreRootCategories(true);
70
+ }
71
+ }, [selectedCategoryIds, overflowRootCategories]);
49
72
  const handleToggleExpand = (categoryId) => {
50
73
  setExpandedCategories(prev => {
51
74
  const next = new Set(prev);
@@ -70,5 +93,6 @@ export function CategoryTree({ categories, selectedCategoryIds = [], onCategoryT
70
93
  ? 'p-2 -ml-2 -mr-2 cursor-pointer group hover:bg-blue-50 hover:text-blue-600'
71
94
  : 'cursor-pointer group hover:bg-slate-100 hover:text-slate-900', isAllSelected && 'bg-blue-50 text-blue-600'), children: [mode === 'checkbox' && (_jsx("div", { className: cn('w-4 h-4 rounded border flex items-center justify-center transition-colors', isAllSelected
72
95
  ? 'bg-blue-600 border-blue-600'
73
- : 'border-gray-300 group-hover:border-blue-400'), children: isAllSelected && _jsx(Check, { className: "h-3 w-3 text-white" }) })), _jsx("span", { className: "flex-1", children: "All Products" }), mode === 'button' && isAllSelected && (_jsx(Check, { className: "h-4 w-4 text-blue-600" }))] })), categoryTree.map((category) => (_jsx(CategoryItem, { category: category, level: 0, selectedCategoryIds: selectedCategoryIds, onCategoryToggle: handleCategoryToggle, mode: mode, onCategorySelect: onCategorySelect, expandedCategories: expandedCategories, onToggleExpand: handleToggleExpand, storeSlug: storeSlug, linkBasePath: linkBasePath }, category.id)))] }));
96
+ : 'border-gray-300 group-hover:border-blue-400'), children: isAllSelected && _jsx(Check, { className: "h-3 w-3 text-white" }) })), _jsx("span", { className: "flex-1", children: "All Products" }), mode === 'button' && isAllSelected && (_jsx(Check, { className: "h-4 w-4 text-blue-600" }))] })), featuredRootCategories.map((category) => (_jsx(CategoryItem, { category: category, level: 0, selectedCategoryIds: selectedCategoryIds, onCategoryToggle: handleCategoryToggle, mode: mode, onCategorySelect: onCategorySelect, expandedCategories: expandedCategories, onToggleExpand: handleToggleExpand, storeSlug: storeSlug, linkBasePath: linkBasePath, categoryProductCounts: categoryProductCounts }, category.id))), showMoreRootCategories &&
97
+ overflowRootCategories.map((category) => (_jsx(CategoryItem, { category: category, level: 0, selectedCategoryIds: selectedCategoryIds, onCategoryToggle: handleCategoryToggle, mode: mode, onCategorySelect: onCategorySelect, expandedCategories: expandedCategories, onToggleExpand: handleToggleExpand, storeSlug: storeSlug, linkBasePath: linkBasePath, categoryProductCounts: categoryProductCounts }, category.id))), overflowRootCategories.length > 0 && (_jsx("button", { type: "button", onClick: () => setShowMoreRootCategories((open) => !open), className: "text-sm text-gray-600 hover:text-blue-600 font-medium mt-2 flex items-center gap-1 transition-colors", children: showMoreRootCategories ? (_jsxs(_Fragment, { children: ["Show less ", _jsx(ChevronUp, { className: "h-4 w-4" })] })) : (_jsxs(_Fragment, { children: ["See more ", _jsx(ChevronDown, { className: "h-4 w-4" })] })) }))] }));
74
98
  }
@@ -6,6 +6,6 @@ interface ProductCardProps {
6
6
  onQuickView: (product: StoreProduct) => void;
7
7
  className?: string;
8
8
  }
9
- export declare function ProductCard({ product, storeSlug, onAddToCart, onQuickView, className }: ProductCardProps): import("react").JSX.Element;
9
+ export declare function ProductCard({ product, storeSlug, onAddToCart, onQuickView: _onQuickView, className }: ProductCardProps): import("react").JSX.Element;
10
10
  export {};
11
11
  //# sourceMappingURL=product-card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"product-card.d.ts","sourceRoot":"","sources":["../../../src/components/ui/product-card.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAqBjD,UAAU,gBAAgB;IACxB,OAAO,EAAE,YAAY,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IAC7C,WAAW,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,gBAAgB,+BAsRxG"}
1
+ {"version":3,"file":"product-card.d.ts","sourceRoot":"","sources":["../../../src/components/ui/product-card.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAqBjD,UAAU,gBAAgB;IACxB,OAAO,EAAE,YAAY,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IAC7C,WAAW,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,gBAAgB,+BA8QtH"}
@@ -5,7 +5,7 @@ import { useState } from 'react';
5
5
  import { Button } from './button.js';
6
6
  import { ImageWithFallback } from './image-with-fallback.js';
7
7
  import { ProductRating } from './product-rating.js';
8
- import { ShoppingCart, Heart, Eye, Share2 } from 'lucide-react';
8
+ import { ShoppingCart, Heart, Share2 } from 'lucide-react';
9
9
  import { shareProductLink } from '../../lib/utils/product-share.js';
10
10
  import Link from 'next/link';
11
11
  import { useRouter } from 'next/navigation';
@@ -21,7 +21,7 @@ import { isActiveLimitedTimeOffer } from '../../lib/limited-time-offer.js';
21
21
  import { getProductStockInfo } from '../../lib/inventory-utils.js';
22
22
  import { richFieldHasContent, richFieldPlainTextForDisplay } from '../../lib/rich-html.js';
23
23
  import { trackStorefrontEvent } from '../../lib/mixpanel.js';
24
- export function ProductCard({ product, storeSlug, onAddToCart, onQuickView, className }) {
24
+ export function ProductCard({ product, storeSlug, onAddToCart, onQuickView: _onQuickView, className }) {
25
25
  const router = useRouter();
26
26
  const [isHovered, setIsHovered] = useState(false);
27
27
  const hasVariationOptions = (product.variants?.length ?? 0) > 0;
@@ -132,19 +132,19 @@ export function ProductCard({ product, storeSlug, onAddToCart, onQuickView, clas
132
132
  });
133
133
  }
134
134
  }
135
- return (_jsxs("div", { "data-product-card": true, className: cn("group relative flex flex-col h-full bg-white rounded-lg overflow-hidden border border-gray-100 hover:border-gray-300 transition-all duration-300 hover:shadow-md", className), onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [_jsxs("div", { className: "relative aspect-[3/4] bg-gray-50 overflow-hidden", children: [_jsx(Link, { href: `/${storeSlug}/products/${product.slug}`, onClick: handleProductClick, className: "block w-full h-full", children: _jsx(ImageWithFallback, { src: currentImage, alt: product.name, className: cn("w-full h-full object-cover transition-all duration-700 ease-in-out", isHovered && !hasSecondImage ? "scale-110" : "scale-100", isOutOfStock && "grayscale"), skeletonAspectRatio: "3/4", lazy: true }) }), isOutOfStock && (_jsx(OutOfStockOverlay, { badgePosition: "center" })), (isActiveLimitedTimeOffer(product) || (hasValidCompareAtPrice(product.price, product.compareAtPrice)) || (product.rating && product.rating >= 4.8)) && (_jsxs("div", { className: "absolute top-3 left-3 flex flex-col gap-2 z-10", children: [_jsx(LimitedTimeOfferBadge, { product: product, compact: true }), hasValidCompareAtPrice(product.price, product.compareAtPrice) && (_jsx("span", { className: "bg-red-500 text-white text-[10px] font-bold px-2.5 py-1 rounded-full uppercase tracking-wider shadow-sm", children: "Sale" })), !isActiveLimitedTimeOffer(product) && !(hasValidCompareAtPrice(product.price, product.compareAtPrice)) && product.rating && product.rating >= 4.8 && (_jsx("span", { className: "bg-white/90 backdrop-blur-sm text-slate-900 text-[10px] font-bold px-2.5 py-1 rounded-full uppercase tracking-wider shadow-sm border border-gray-100", children: "Top Rated" }))] })), _jsxs("div", { className: "absolute top-3 right-3 z-30 flex flex-col gap-2 opacity-0 group-hover:opacity-100 transform translate-x-2 group-hover:translate-x-0 transition-all duration-300", children: [_jsx("button", { type: "button", onClick: handleShareClick, className: "p-2 rounded-full bg-white/80 backdrop-blur-sm hover:bg-white transition-all duration-300 shadow-sm text-slate-600 hover:text-slate-900", title: "Share product", "aria-label": "Share product", children: _jsx(Share2, { className: "h-4 w-4" }) }), _jsx("button", { type: "button", onClick: handleWishlistClick, disabled: isLoading, className: cn("p-2 rounded-full bg-white/80 backdrop-blur-sm hover:bg-white transition-all duration-300 shadow-sm disabled:opacity-50 disabled:cursor-not-allowed", inWishlist ? "text-red-500" : "text-slate-600 hover:text-red-500"), title: inWishlist ? "Remove from wishlist" : "Add to wishlist", children: isLoading ? (_jsx(ButtonLoader, { className: "text-red-500" })) : (_jsx(Heart, { className: cn("h-4 w-4", inWishlist && "fill-current") })) })] }), _jsxs("div", { className: "absolute bottom-4 inset-x-4 grid grid-cols-[2.5rem_1fr] gap-2 opacity-0 translate-y-4 group-hover:opacity-100 group-hover:translate-y-0 transition-all duration-300 ease-out z-20", children: [_jsx(Link, { href: `/${storeSlug}/products/${product.slug}`, className: "h-10 w-10 flex items-center justify-center rounded-full bg-white text-slate-900 hover:bg-slate-900 hover:text-white border border-transparent shadow-lg transition-colors duration-200", title: "View Details", onClick: trackProductClick, children: _jsx(Eye, { className: "h-4 w-4" }) }), _jsxs(Button, { type: "button", variant: "outline", onClick: async (e) => {
136
- e.preventDefault();
137
- e.stopPropagation();
138
- if (isOutOfStock)
139
- return;
140
- if (hasVariationOptions) {
141
- trackProductClick();
142
- startPageLoading(productHref);
143
- router.push(productHref);
144
- return;
145
- }
146
- await onAddToCart(product);
147
- }, disabled: isOutOfStock, className: cn('h-10 w-full min-w-0 justify-center gap-2 rounded-full border-0 bg-white px-4 text-slate-900 shadow-lg hover:bg-slate-900 hover:text-white font-semibold transition-colors duration-200 [&_svg]:text-current hover:[&_svg]:text-current', isOutOfStock && 'opacity-50 cursor-not-allowed'), children: [_jsx(ShoppingCart, { className: "h-4 w-4 shrink-0", "aria-hidden": true }), "Add to cart"] })] })] }), _jsxs("div", { className: "p-4 flex flex-col flex-1 space-y-2", children: [_jsx(Link, { href: `/${storeSlug}/products/${product.slug}`, className: "group-hover:text-blue-600 transition-colors duration-300", onClick: () => {
135
+ return (_jsxs("div", { "data-product-card": true, className: cn("group relative flex flex-col h-full bg-white rounded-lg overflow-hidden border border-gray-100 hover:border-gray-300 transition-all duration-300 hover:shadow-md", className), onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), children: [_jsxs("div", { className: "relative aspect-[3/4] bg-gray-50 overflow-hidden", children: [_jsx(Link, { href: `/${storeSlug}/products/${product.slug}`, onClick: handleProductClick, className: "block w-full h-full", children: _jsx(ImageWithFallback, { src: currentImage, alt: product.name, className: cn("w-full h-full object-cover transition-all duration-700 ease-in-out", isHovered && !hasSecondImage ? "scale-110" : "scale-100", isOutOfStock && "grayscale"), skeletonAspectRatio: "3/4", lazy: true }) }), isOutOfStock && (_jsx(OutOfStockOverlay, { badgePosition: "center" })), (isActiveLimitedTimeOffer(product) || (hasValidCompareAtPrice(product.price, product.compareAtPrice)) || (product.rating && product.rating >= 4.8)) && (_jsxs("div", { className: "absolute top-3 left-3 flex flex-col gap-2 z-10", children: [_jsx(LimitedTimeOfferBadge, { product: product, compact: true }), hasValidCompareAtPrice(product.price, product.compareAtPrice) && (_jsx("span", { className: "bg-red-500 text-white text-[10px] font-bold px-2.5 py-1 rounded-full uppercase tracking-wider shadow-sm", children: "Sale" })), !isActiveLimitedTimeOffer(product) && !(hasValidCompareAtPrice(product.price, product.compareAtPrice)) && product.rating && product.rating >= 4.8 && (_jsx("span", { className: "bg-white/90 backdrop-blur-sm text-slate-900 text-[10px] font-bold px-2.5 py-1 rounded-full uppercase tracking-wider shadow-sm border border-gray-100", children: "Top Rated" }))] })), _jsxs("div", { className: "absolute top-3 right-3 z-30 flex flex-col gap-2 opacity-0 group-hover:opacity-100 transform translate-x-2 group-hover:translate-x-0 transition-all duration-300", children: [_jsx("button", { type: "button", onClick: handleShareClick, className: "p-2 rounded-full bg-white/80 backdrop-blur-sm hover:bg-white transition-all duration-300 shadow-sm text-slate-600 hover:text-slate-900", title: "Share product", "aria-label": "Share product", children: _jsx(Share2, { className: "h-4 w-4" }) }), _jsx("button", { type: "button", onClick: handleWishlistClick, disabled: isLoading, className: cn("p-2 rounded-full bg-white/80 backdrop-blur-sm hover:bg-white transition-all duration-300 shadow-sm disabled:opacity-50 disabled:cursor-not-allowed", inWishlist ? "text-red-500" : "text-slate-600 hover:text-red-500"), title: inWishlist ? "Remove from wishlist" : "Add to wishlist", children: isLoading ? (_jsx(ButtonLoader, { className: "text-red-500" })) : (_jsx(Heart, { className: cn("h-4 w-4", inWishlist && "fill-current") })) })] }), _jsx("div", { className: "absolute bottom-4 inset-x-4 flex justify-center opacity-0 translate-y-4 group-hover:opacity-100 group-hover:translate-y-0 transition-all duration-300 ease-out z-20", children: _jsxs(Button, { type: "button", variant: "outline", onClick: async (e) => {
136
+ e.preventDefault();
137
+ e.stopPropagation();
138
+ if (isOutOfStock)
139
+ return;
140
+ if (hasVariationOptions) {
141
+ trackProductClick();
142
+ startPageLoading(productHref);
143
+ router.push(productHref);
144
+ return;
145
+ }
146
+ await onAddToCart(product);
147
+ }, disabled: isOutOfStock, className: cn('h-10 min-w-[10.5rem] justify-center gap-2 rounded-full border-0 bg-white px-5 text-slate-900 shadow-lg hover:bg-slate-900 hover:text-white font-semibold transition-colors duration-200 [&_svg]:text-current hover:[&_svg]:text-current', isOutOfStock && 'opacity-50 cursor-not-allowed'), children: [_jsx(ShoppingCart, { className: "h-4 w-4 shrink-0", "aria-hidden": true }), "Add to cart"] }) })] }), _jsxs("div", { className: "p-4 flex flex-col flex-1 space-y-2", children: [_jsx(Link, { href: `/${storeSlug}/products/${product.slug}`, className: "group-hover:text-blue-600 transition-colors duration-300", onClick: () => {
148
148
  trackProductClick();
149
149
  startPageLoading(`/${storeSlug}/products/${product.slug}`);
150
150
  }, children: _jsx("h3", { className: "font-bold text-slate-900 text-base leading-tight line-clamp-1", children: product.name }) }), richFieldHasContent(product.description) && (_jsx("p", { className: "text-xs text-slate-500 line-clamp-1", children: richFieldPlainTextForDisplay(product.description) })), _jsxs("div", { className: "mt-auto pt-2 flex items-center justify-between", children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-lg font-bold text-slate-900", children: formatCurrency(product.price, product.currency || 'USD') }), hasValidCompareAtPrice(product.price, product.compareAtPrice) && (_jsx("span", { className: "text-sm text-slate-400 line-through font-medium", children: formatCurrency(product.compareAtPrice, product.currency || 'USD') }))] }), _jsx(ProductRating, { rating: product.rating, reviewCount: product.reviewCount, size: "sm", showReviewCount: false, className: "shrink-0" })] })] })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"booking.d.ts","sourceRoot":"","sources":["../../../src/editor/alignment-schemas/booking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAuB,MAAM,SAAS,CAAC;AAUrE,eAAO,MAAM,aAAa,EAAE,qBAwd3B,CAAC"}
1
+ {"version":3,"file":"booking.d.ts","sourceRoot":"","sources":["../../../src/editor/alignment-schemas/booking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAuB,MAAM,SAAS,CAAC;AAiBrE,eAAO,MAAM,aAAa,EAAE,qBA8f3B,CAAC"}
@@ -5,6 +5,12 @@ const sectionStyleSupports = {
5
5
  border: true,
6
6
  typography: true,
7
7
  };
8
+ const aboutSectionStyleSupports = {
9
+ spacing: false,
10
+ colors: false,
11
+ border: false,
12
+ typography: false,
13
+ };
8
14
  export const BookingSchema = {
9
15
  home: {
10
16
  hero: {
@@ -169,52 +175,66 @@ export const BookingSchema = {
169
175
  about: {
170
176
  hero: {
171
177
  type: 'section',
172
- label: 'About Hero',
173
- description: 'Full-bleed hero section at the top of the about page.',
174
- _styleSupports: sectionStyleSupports,
178
+ label: 'Mission Banner',
179
+ description: 'Full-bleed hero at the top of the about page.',
180
+ _styleSupports: aboutSectionStyleSupports,
175
181
  _sourcePath: 'layoutConfig.pages.about.hero',
176
182
  fields: {
177
- show: { type: 'toggle', label: 'Show Section', defaultValue: true },
178
- heroImage: { type: 'image', label: 'Hero Background Image' },
179
- title: { type: 'text', label: 'Page Title', defaultValue: 'Crafting Experiences, Delivering Joy.' },
180
- missionStatement: { type: 'multiline_text', label: 'Mission Statement / Tagline' },
181
- establishedYear: { type: 'text', label: 'Established Year Badge', description: 'Short badge text, e.g. "Est. 2024".', defaultValue: 'Est. 2024' }
182
- }
183
+ show: { type: 'toggle', label: 'Display header', defaultValue: true },
184
+ badgeText: {
185
+ type: 'text',
186
+ label: 'Badge text',
187
+ description: 'Short label above the headline',
188
+ defaultValue: 'Est. 2024',
189
+ },
190
+ badgeTextColor: { type: 'color', label: 'Badge text colour', defaultValue: '#ffffff' },
191
+ heroImage: { type: 'image', label: 'Mission image' },
192
+ imageOverlayColor: {
193
+ type: 'color',
194
+ label: 'Image overlay',
195
+ description: 'Dark tint over the hero image behind the text.',
196
+ defaultValue: '#000000',
197
+ },
198
+ title: { type: 'text', label: 'Mission headline', defaultValue: 'Crafting Experiences, Delivering Joy.' },
199
+ titleColor: { type: 'color', label: 'Headline colour', defaultValue: '#ffffff' },
200
+ missionStatement: { type: 'multiline_text', label: 'Core mission' },
201
+ missionStatementColor: { type: 'color', label: 'Mission text colour', defaultValue: '#e5e7eb' },
202
+ },
183
203
  },
184
204
  story: {
185
205
  type: 'section',
186
- label: 'Our Story',
187
- description: 'Brand narrative and gallery section.',
188
- _styleSupports: sectionStyleSupports,
206
+ label: 'Brand journey',
207
+ description: 'Brand narrative with a single story image.',
208
+ _styleSupports: aboutSectionStyleSupports,
189
209
  _sourcePath: 'layoutConfig.pages.about.story',
190
210
  fields: {
191
- show: { type: 'toggle', label: 'Show Section', defaultValue: true },
192
- sectionLabel: { type: 'text', label: 'Section Label', description: 'Small uppercase label above the heading (e.g. "Who We Are").', defaultValue: 'Who We Are' },
193
- sectionHeading: { type: 'text', label: 'Section Heading', defaultValue: 'Our Journey' },
194
- content: { type: 'multiline_text', label: 'Story Content' },
211
+ show: { type: 'toggle', label: 'Display story', defaultValue: true },
212
+ sectionLabel: {
213
+ type: 'text',
214
+ label: 'Section label',
215
+ description: 'Small label above the title (e.g. "Who We Are").',
216
+ defaultValue: 'Who We Are',
217
+ },
218
+ sectionHeading: { type: 'text', label: 'Section title', defaultValue: 'Our Journey' },
219
+ content: { type: 'multiline_text', label: 'The narrative' },
195
220
  storyImage: {
196
221
  type: 'image',
197
- label: 'Story / Team Image',
198
- description: 'Main image beside the story when no gallery images are set.',
222
+ label: 'Story / team image',
199
223
  defaultValue: 'https://images.unsplash.com/photo-1522202176988-66273c2fd55f?q=80&w=2071&auto=format&fit=crop',
200
224
  },
201
- galleryOverlayTitle: { type: 'text', label: 'Fallback Gallery Card Title', defaultValue: 'The Dream Team' },
202
- galleryOverlaySubtitle: { type: 'text', label: 'Fallback Gallery Card Subtitle', defaultValue: 'Working together to serve you better' },
203
- gallerySection: {
204
- type: 'array',
205
- label: 'Gallery Images',
206
- itemSchema: {
207
- image: { type: 'image', label: 'Gallery Image' },
208
- caption: { type: 'text', label: 'Image Caption' }
209
- }
210
- }
211
- }
225
+ galleryOverlayTitle: { type: 'text', label: 'Image caption title', defaultValue: 'The Dream Team' },
226
+ galleryOverlaySubtitle: {
227
+ type: 'text',
228
+ label: 'Image caption subtitle',
229
+ defaultValue: 'Working together to serve you better',
230
+ },
231
+ },
212
232
  },
213
233
  values: {
214
234
  type: 'section',
215
- label: 'Our Values',
216
- description: 'Four value/feature cards shown in the story section.',
217
- _styleSupports: sectionStyleSupports,
235
+ label: 'Brand pillars',
236
+ description: 'Value cards shown beside your story.',
237
+ _styleSupports: aboutSectionStyleSupports,
218
238
  _sourcePath: 'layoutConfig.pages.about.values',
219
239
  fields: {
220
240
  show: { type: 'toggle', label: 'Show Section', defaultValue: true },
@@ -237,15 +257,16 @@ export const BookingSchema = {
237
257
  },
238
258
  stats: {
239
259
  type: 'section',
240
- label: 'Key Metrics',
241
- description: 'Numeric highlights like bookings completed, staff, years of experience.',
242
- _styleSupports: sectionStyleSupports,
260
+ label: 'Milestones & impact',
261
+ description: 'Numeric highlights of your business.',
262
+ _styleSupports: aboutSectionStyleSupports,
243
263
  _sourcePath: 'layoutConfig.pages.about.stats',
244
264
  fields: {
245
- show: { type: 'toggle', label: 'Show Section', defaultValue: true },
265
+ show: { type: 'toggle', label: 'Display metrics', defaultValue: true },
246
266
  items: {
247
267
  type: 'array',
248
- label: 'Stat Items',
268
+ label: 'Milestone items',
269
+ maxSlides: 4,
249
270
  defaultValue: [
250
271
  { id: 'about-s1', value: '8k+', label: 'Bookings Completed' },
251
272
  { id: 'about-s2', value: '15+', label: 'Expert Staff' },
@@ -261,35 +282,57 @@ export const BookingSchema = {
261
282
  },
262
283
  'contact-info': {
263
284
  type: 'section',
264
- label: 'Quick Contact',
265
- description: 'Contact reference cards on the about page.',
266
- _styleSupports: sectionStyleSupports,
285
+ label: 'Location & availability',
286
+ description: 'Quick reference cards for location, email, and hours.',
287
+ _styleSupports: aboutSectionStyleSupports,
267
288
  _sourcePath: 'layoutConfig.pages.about.contact-info',
268
289
  fields: {
269
- show: { type: 'toggle', label: 'Show Section', defaultValue: true },
270
- sectionTitle: { type: 'text', label: 'Section Heading', defaultValue: 'Get in Touch' },
271
- sectionSubtitle: { type: 'multiline_text', label: 'Section Supporting Text', defaultValue: "Have questions? We'd love to hear from you. Reach out to our team via email, phone, or visit us at our store." },
272
- visitTitle: { type: 'text', label: '"Visit Us" Card Title', defaultValue: 'Visit Us' },
273
- visitIcon: { type: 'icon', label: 'Visit Card Icon', defaultValue: 'MapPin' },
274
- emailTitle: { type: 'text', label: '"Email Us" Card Title', defaultValue: 'Email Us' },
275
- emailIcon: { type: 'icon', label: 'Email Card Icon', defaultValue: 'Mail' },
276
- hoursTitle: { type: 'text', label: '"Opening Hours" Card Title', defaultValue: 'Opening Hours' },
277
- hoursIcon: { type: 'icon', label: 'Hours Card Icon', defaultValue: 'Clock' },
278
- address: {
290
+ show: { type: 'toggle', label: 'Display section', defaultValue: true },
291
+ title: { type: 'text', label: 'Section headline', defaultValue: 'Get in Touch' },
292
+ description: {
279
293
  type: 'multiline_text',
280
- label: 'Visit Card Address',
281
- defaultValue: '123 Store Street\nCommerce City, ST 12345',
294
+ label: 'Section introduction',
295
+ defaultValue: "Have questions? We'd love to hear from you. Reach out to our team via email, phone, or visit us at our store.",
282
296
  },
283
- email: { type: 'text', label: 'Email Card — Primary Email' },
284
- phone: { type: 'text', label: 'Email Card — Phone Number', defaultValue: '+1 (555) 123-4567' },
285
- hours: {
286
- type: 'multiline_text',
287
- label: 'Hours Card — Business Hours',
288
- defaultValue: 'Mon - Fri: 9am - 6pm\nSat - Sun: 10am - 4pm',
297
+ visitCard: {
298
+ type: 'object',
299
+ label: 'Visit card',
300
+ fields: {
301
+ title: { type: 'text', label: 'Card title', defaultValue: 'Visit Us' },
302
+ icon: { type: 'icon', label: 'Icon', defaultValue: 'MapPin' },
303
+ address: {
304
+ type: 'multiline_text',
305
+ label: 'Address',
306
+ defaultValue: '123 Store Street\nCommerce City, ST 12345',
307
+ },
308
+ },
289
309
  },
290
- emailCTALabel: { type: 'text', label: 'Email Card CTA Text', defaultValue: 'Send a message' },
291
- emailLink: { type: 'text', label: 'Email Card CTA Link', defaultValue: '/contact' },
292
- }
310
+ emailCard: {
311
+ type: 'object',
312
+ label: 'Email card',
313
+ fields: {
314
+ title: { type: 'text', label: 'Card title', defaultValue: 'Email Us' },
315
+ icon: { type: 'icon', label: 'Icon', defaultValue: 'Mail' },
316
+ email: { type: 'text', label: 'Primary email' },
317
+ phone: { type: 'text', label: 'Phone number', defaultValue: '+1 (555) 123-4567' },
318
+ ctaLabel: { type: 'text', label: 'Button text', defaultValue: 'Send a message' },
319
+ ctaLink: { type: 'text', label: 'Button link', defaultValue: '/contact' },
320
+ },
321
+ },
322
+ hoursCard: {
323
+ type: 'object',
324
+ label: 'Hours card',
325
+ fields: {
326
+ title: { type: 'text', label: 'Card title', defaultValue: 'Opening Hours' },
327
+ icon: { type: 'icon', label: 'Icon', defaultValue: 'Clock' },
328
+ hours: {
329
+ type: 'multiline_text',
330
+ label: 'Opening hours',
331
+ defaultValue: 'Mon - Fri: 9am - 6pm\nSat - Sun: 10am - 4pm',
332
+ },
333
+ },
334
+ },
335
+ },
293
336
  },
294
337
  ...bookingFooterSection,
295
338
  },
@@ -1 +1 @@
1
- {"version":3,"file":"clothing-minimal.d.ts","sourceRoot":"","sources":["../../../src/editor/alignment-schemas/clothing-minimal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAuB,MAAM,SAAS,CAAC;AAUrE,eAAO,MAAM,qBAAqB,EAAE,qBAmWnC,CAAC"}
1
+ {"version":3,"file":"clothing-minimal.d.ts","sourceRoot":"","sources":["../../../src/editor/alignment-schemas/clothing-minimal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAuB,MAAM,SAAS,CAAC;AAiBrE,eAAO,MAAM,qBAAqB,EAAE,qBA0YnC,CAAC"}
@@ -5,6 +5,12 @@ const sectionStyleSupports = {
5
5
  border: true,
6
6
  typography: true,
7
7
  };
8
+ const aboutSectionStyleSupports = {
9
+ spacing: false,
10
+ colors: false,
11
+ border: false,
12
+ typography: false,
13
+ };
8
14
  export const ClothingMinimalSchema = {
9
15
  home: {
10
16
  header: {
@@ -199,12 +205,18 @@ export const ClothingMinimalSchema = {
199
205
  about: {
200
206
  aboutHeader: {
201
207
  type: 'section',
202
- label: 'Identity Banner',
203
- description: 'The minimalist hero section for the brand story page.',
204
- _styleSupports: sectionStyleSupports,
208
+ label: 'Identity banner',
209
+ description: 'Minimal hero for the about page.',
210
+ _styleSupports: aboutSectionStyleSupports,
205
211
  _sourcePath: 'layoutConfig.pages.about.aboutHeader',
206
212
  fields: {
207
213
  show: { type: 'toggle', label: 'Display Header', defaultValue: true },
214
+ badgeText: {
215
+ type: 'text',
216
+ label: 'Badge Text',
217
+ description: 'Short label above the headline',
218
+ defaultValue: 'Est. 2024',
219
+ },
208
220
  title: { type: 'text', label: 'Brand Headline' },
209
221
  missionStatement: { type: 'multiline_text', label: 'Mission Focus' },
210
222
  heroImage: { type: 'image', label: 'Brand Image' }
@@ -212,9 +224,9 @@ export const ClothingMinimalSchema = {
212
224
  },
213
225
  aboutContent: {
214
226
  type: 'section',
215
- label: 'Heritage Text',
216
- description: 'Brand story, team image, and core values.',
217
- _styleSupports: sectionStyleSupports,
227
+ label: 'Brand journey',
228
+ description: 'Story, team image, and value cards.',
229
+ _styleSupports: aboutSectionStyleSupports,
218
230
  _sourcePath: 'layoutConfig.pages.about.aboutContent',
219
231
  fields: {
220
232
  show: { type: 'toggle', label: 'Display Content', defaultValue: true },
@@ -243,15 +255,16 @@ export const ClothingMinimalSchema = {
243
255
  },
244
256
  statsSection: {
245
257
  type: 'section',
246
- label: 'By The Numbers',
247
- description: 'Numeric proof points shown as large stats.',
248
- _styleSupports: sectionStyleSupports,
258
+ label: 'Milestones & impact',
259
+ description: 'Large numeric proof points.',
260
+ _styleSupports: aboutSectionStyleSupports,
249
261
  _sourcePath: 'layoutConfig.pages.about.statsSection',
250
262
  fields: {
251
- show: { type: 'toggle', label: 'Display Section', defaultValue: true },
263
+ show: { type: 'toggle', label: 'Display section', defaultValue: true },
252
264
  items: {
253
265
  type: 'array',
254
- label: 'Statistics',
266
+ label: 'Milestone items',
267
+ maxSlides: 4,
255
268
  defaultValue: [
256
269
  { value: '12k+', label: 'Happy Shoppers' },
257
270
  { value: '60+', label: 'Active Designs' },
@@ -267,27 +280,58 @@ export const ClothingMinimalSchema = {
267
280
  },
268
281
  contactSection: {
269
282
  type: 'section',
270
- label: 'Quick Contact',
271
- description: 'Contact cards shown at the bottom of the about page.',
272
- _styleSupports: sectionStyleSupports,
283
+ label: 'Location & availability',
284
+ description: 'Contact cards at the bottom of the about page.',
285
+ _styleSupports: aboutSectionStyleSupports,
273
286
  _sourcePath: 'layoutConfig.pages.about.contactSection',
274
287
  fields: {
275
- show: { type: 'toggle', label: 'Display Section', defaultValue: true },
276
- title: { type: 'text', label: 'Section Heading', defaultValue: 'Get in Touch' },
277
- description: { type: 'multiline_text', label: 'Supporting Text', defaultValue: "Have questions? We'd love to hear from you. Reach out to our team via email, phone, or visit us at our store." },
278
- visitIcon: { type: 'icon', label: 'Visit Card Icon', defaultValue: 'MapPin' },
279
- visitLabel: { type: 'text', label: 'Visit Card Heading', defaultValue: 'Visit Us' },
280
- visitAddress: { type: 'multiline_text', label: 'Address', defaultValue: '123 Store Street\nCommerce City, ST 12345' },
281
- emailIcon: { type: 'icon', label: 'Email Card Icon', defaultValue: 'Mail' },
282
- emailLabel: { type: 'text', label: 'Email Card Heading', defaultValue: 'Email Us' },
283
- email1: { type: 'text', label: 'Primary Email' },
284
- email2: { type: 'text', label: 'Support Email' },
285
- hoursIcon: { type: 'icon', label: 'Hours Card Icon', defaultValue: 'Clock' },
286
- hoursLabel: { type: 'text', label: 'Hours Card Heading', defaultValue: 'Opening Hours' },
287
- hoursLine1: { type: 'text', label: 'Weekday Hours', defaultValue: 'Mon - Fri: 9am - 6pm' },
288
- hoursLine2: { type: 'text', label: 'Weekend Hours', defaultValue: 'Sat - Sun: 10am - 4pm' },
289
- }
290
- }
288
+ show: { type: 'toggle', label: 'Display section', defaultValue: true },
289
+ title: { type: 'text', label: 'Section headline', defaultValue: 'Get in Touch' },
290
+ description: {
291
+ type: 'multiline_text',
292
+ label: 'Section introduction',
293
+ defaultValue: "Have questions? We'd love to hear from you. Reach out to our team via email, phone, or visit us at our store.",
294
+ },
295
+ visitCard: {
296
+ type: 'object',
297
+ label: 'Visit card',
298
+ fields: {
299
+ title: { type: 'text', label: 'Card title', defaultValue: 'Visit Us' },
300
+ icon: { type: 'icon', label: 'Icon', defaultValue: 'MapPin' },
301
+ address: {
302
+ type: 'multiline_text',
303
+ label: 'Address',
304
+ defaultValue: '123 Store Street\nCommerce City, ST 12345',
305
+ },
306
+ },
307
+ },
308
+ emailCard: {
309
+ type: 'object',
310
+ label: 'Email card',
311
+ fields: {
312
+ title: { type: 'text', label: 'Card title', defaultValue: 'Email Us' },
313
+ icon: { type: 'icon', label: 'Icon', defaultValue: 'Mail' },
314
+ email: { type: 'text', label: 'Primary email' },
315
+ emailSecondary: { type: 'text', label: 'Support email' },
316
+ ctaLabel: { type: 'text', label: 'Button text', defaultValue: 'Send a message' },
317
+ ctaLink: { type: 'text', label: 'Button link', defaultValue: '/contact' },
318
+ },
319
+ },
320
+ hoursCard: {
321
+ type: 'object',
322
+ label: 'Hours card',
323
+ fields: {
324
+ title: { type: 'text', label: 'Card title', defaultValue: 'Opening Hours' },
325
+ icon: { type: 'icon', label: 'Icon', defaultValue: 'Clock' },
326
+ hours: {
327
+ type: 'multiline_text',
328
+ label: 'Opening hours',
329
+ defaultValue: 'Mon - Fri: 9am - 6pm\nSat - Sun: 10am - 4pm',
330
+ },
331
+ },
332
+ },
333
+ },
334
+ },
291
335
  },
292
336
  contact: {
293
337
  contactHeader: {
@@ -1 +1 @@
1
- {"version":3,"file":"clothing.d.ts","sourceRoot":"","sources":["../../../src/editor/alignment-schemas/clothing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAuB,MAAM,SAAS,CAAC;AASrE,eAAO,MAAM,cAAc,EAAE,qBAqd5B,CAAC"}
1
+ {"version":3,"file":"clothing.d.ts","sourceRoot":"","sources":["../../../src/editor/alignment-schemas/clothing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAuB,MAAM,SAAS,CAAC;AAiBrE,eAAO,MAAM,cAAc,EAAE,qBAsgB5B,CAAC"}