@caartzee/theme-sdk 0.0.0-stage → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/README.md +222 -2
  2. package/dist/bin/caartzee-theme.js +9223 -0
  3. package/dist/lib/index.js +11614 -0
  4. package/dist/types/src/auth/credentials-store.d.ts +18 -0
  5. package/dist/types/src/auth/index.d.ts +2 -0
  6. package/dist/types/src/auth/oauth-client.d.ts +39 -0
  7. package/dist/types/src/blocks/block-contract.d.ts +242 -0
  8. package/dist/types/src/candy/compatibility-matrix.d.ts +10 -0
  9. package/dist/types/src/candy/context-builder.d.ts +31 -0
  10. package/dist/types/src/candy/engine.d.ts +69 -0
  11. package/dist/types/src/candy/filters.d.ts +32 -0
  12. package/dist/types/src/candy/ide-support.d.ts +20 -0
  13. package/dist/types/src/candy/index.d.ts +9 -0
  14. package/dist/types/src/candy/schema-parser.d.ts +13 -0
  15. package/dist/types/src/candy/security.d.ts +54 -0
  16. package/dist/types/src/candy/tags.d.ts +11 -0
  17. package/dist/types/src/candy/types.d.ts +185 -0
  18. package/dist/types/src/cli/caartzee-cli.d.ts +9 -0
  19. package/dist/types/src/cli/candy-mcp.d.ts +2 -0
  20. package/dist/types/src/cli/candy-tool-server.d.ts +39 -0
  21. package/dist/types/src/cli/index.d.ts +1 -0
  22. package/dist/types/src/cli/mcp/component-tools.d.ts +2 -0
  23. package/dist/types/src/cli/mcp/docs-tools.d.ts +89 -0
  24. package/dist/types/src/cli/mcp/editor-tools.d.ts +22 -0
  25. package/dist/types/src/cli/mcp/resources-and-prompts.d.ts +2 -0
  26. package/dist/types/src/cli/mcp/testing-tools.d.ts +54 -0
  27. package/dist/types/src/cli/sdk-client.d.ts +12 -0
  28. package/dist/types/src/contracts/category-selection.d.ts +15 -0
  29. package/dist/types/src/contracts/commerce.d.ts +282 -0
  30. package/dist/types/src/contracts/footer-builder.d.ts +125 -0
  31. package/dist/types/src/contracts/hooks.d.ts +37 -0
  32. package/dist/types/src/contracts/manifest.d.ts +3127 -0
  33. package/dist/types/src/contracts/navigation.d.ts +39 -0
  34. package/dist/types/src/contracts/order-tracking.d.ts +40 -0
  35. package/dist/types/src/contracts/page.d.ts +262 -0
  36. package/dist/types/src/contracts/storefront-content.d.ts +60 -0
  37. package/dist/types/src/contracts/style-document.d.ts +2 -0
  38. package/dist/types/src/contracts/styles.d.ts +2002 -0
  39. package/dist/types/src/contracts/theme.d.ts +35 -0
  40. package/dist/types/src/dev-server/catalog-preview.d.ts +25 -0
  41. package/dist/types/src/dev-server/dev-server.d.ts +25 -0
  42. package/dist/types/src/dev-server/index.d.ts +1 -0
  43. package/dist/types/src/dev-server/local-commerce-runtime.d.ts +76 -0
  44. package/dist/types/src/dev-server/local-editor-server.d.ts +22 -0
  45. package/dist/types/src/dev-server/theme-preview.d.ts +8 -0
  46. package/dist/types/src/index.d.ts +27 -0
  47. package/dist/types/src/mock/index.d.ts +10 -0
  48. package/dist/types/src/mock/mock-categories.d.ts +2 -0
  49. package/dist/types/src/mock/mock-commerce.d.ts +55 -0
  50. package/dist/types/src/mock/mock-customer.d.ts +47 -0
  51. package/dist/types/src/mock/mock-hooks.d.ts +2 -0
  52. package/dist/types/src/mock/mock-products.d.ts +3 -0
  53. package/dist/types/src/rendering/commerce-pages.d.ts +16 -0
  54. package/dist/types/src/rendering/raw-html.d.ts +12 -0
  55. package/dist/types/src/rendering/section-wrapper.d.ts +30 -0
  56. package/dist/types/src/scaffold/candy-starter-assets.d.ts +2 -0
  57. package/dist/types/src/scaffold/commerce-generator.d.ts +3 -0
  58. package/dist/types/src/scaffold/index.d.ts +2 -0
  59. package/dist/types/src/scaffold/template-generator.d.ts +21 -0
  60. package/dist/types/src/sections/section-contract.d.ts +350 -0
  61. package/dist/types/src/settings/global-settings.d.ts +25 -0
  62. package/dist/types/src/templates/json-template.d.ts +991 -0
  63. package/dist/types/src/validation/package-validator.d.ts +53 -0
  64. package/dist/types/src/validation/rich-text.d.ts +24 -0
  65. package/package.json +29 -3
  66. package/templates/commerce/README.md +165 -0
  67. package/templates/commerce/assets/theme.css +1 -0
  68. package/templates/commerce/manifest.json +1 -0
  69. package/templates/commerce/src/blocks/index.ts +184 -0
  70. package/templates/commerce/src/config/settings-defaults.ts +25 -0
  71. package/templates/commerce/src/config/settings-schema.ts +102 -0
  72. package/templates/commerce/src/index.ts +90 -0
  73. package/templates/commerce/src/layouts/default.ts +275 -0
  74. package/templates/commerce/src/manifest.ts +976 -0
  75. package/templates/commerce/src/pages/account/components.ts +369 -0
  76. package/templates/commerce/src/pages/account/tabs.ts +792 -0
  77. package/templates/commerce/src/pages/account.ts +55 -0
  78. package/templates/commerce/src/pages/campaign.ts +423 -0
  79. package/templates/commerce/src/pages/cart.ts +261 -0
  80. package/templates/commerce/src/pages/category-detail.ts +124 -0
  81. package/templates/commerce/src/pages/category-list.ts +87 -0
  82. package/templates/commerce/src/pages/checkout.ts +712 -0
  83. package/templates/commerce/src/pages/commerce.ts +45 -0
  84. package/templates/commerce/src/pages/home.ts +160 -0
  85. package/templates/commerce/src/pages/index.ts +99 -0
  86. package/templates/commerce/src/pages/login.ts +204 -0
  87. package/templates/commerce/src/pages/order-success.ts +80 -0
  88. package/templates/commerce/src/pages/product-detail.ts +489 -0
  89. package/templates/commerce/src/pages/product-list.ts +125 -0
  90. package/templates/commerce/src/pages/search.ts +88 -0
  91. package/templates/commerce/src/pages/signup.ts +253 -0
  92. package/templates/commerce/src/pages/status.ts +7 -0
  93. package/templates/commerce/src/pages/theme-layout.ts +491 -0
  94. package/templates/commerce/src/pages/track-order.ts +196 -0
  95. package/templates/commerce/src/pages/wishlist.ts +83 -0
  96. package/templates/commerce/src/sections/about-story.ts +117 -0
  97. package/templates/commerce/src/sections/announcement-bar.ts +101 -0
  98. package/templates/commerce/src/sections/banner-grid.ts +319 -0
  99. package/templates/commerce/src/sections/campaign-banners.ts +158 -0
  100. package/templates/commerce/src/sections/category-slider.ts +144 -0
  101. package/templates/commerce/src/sections/content-builder.ts +123 -0
  102. package/templates/commerce/src/sections/content-controls.ts +45 -0
  103. package/templates/commerce/src/sections/custom-form.ts +59 -0
  104. package/templates/commerce/src/sections/faq-accordion.ts +123 -0
  105. package/templates/commerce/src/sections/footer.ts +728 -0
  106. package/templates/commerce/src/sections/header.ts +439 -0
  107. package/templates/commerce/src/sections/hero-slider.ts +492 -0
  108. package/templates/commerce/src/sections/hero.ts +137 -0
  109. package/templates/commerce/src/sections/index.ts +102 -0
  110. package/templates/commerce/src/sections/mobile-slider.ts +102 -0
  111. package/templates/commerce/src/sections/newsletter.ts +43 -0
  112. package/templates/commerce/src/sections/product-grid.ts +191 -0
  113. package/templates/commerce/src/sections/raw-html.ts +1 -0
  114. package/templates/commerce/src/sections/rich-text.ts +26 -0
  115. package/templates/commerce/src/sections/services-features.ts +211 -0
  116. package/templates/commerce/src/sections/testimonials.ts +194 -0
  117. package/templates/commerce/src/snippets/product-card.ts +178 -0
  118. package/templates/commerce/src/snippets/product-price.ts +46 -0
  119. package/templates/commerce/src/snippets/responsive-image.ts +29 -0
  120. package/templates/commerce/src/styles.ts +477 -0
  121. package/templates/commerce/src/templates/404.json +26 -0
  122. package/templates/commerce/src/templates/account.json +17 -0
  123. package/templates/commerce/src/templates/cart.json +17 -0
  124. package/templates/commerce/src/templates/category.json +16 -0
  125. package/templates/commerce/src/templates/checkout.json +15 -0
  126. package/templates/commerce/src/templates/collection.json +16 -0
  127. package/templates/commerce/src/templates/index.json +180 -0
  128. package/templates/commerce/src/templates/login.json +17 -0
  129. package/templates/commerce/src/templates/order-success.json +17 -0
  130. package/templates/commerce/src/templates/page.json +17 -0
  131. package/templates/commerce/src/templates/product.json +17 -0
  132. package/templates/commerce/src/templates/search.json +18 -0
  133. package/templates/commerce/src/templates/signup.json +17 -0
  134. package/templates/commerce/src/templates/track-order.json +17 -0
  135. package/templates/commerce/src/templates/wishlist.json +17 -0
  136. package/templates/commerce/src/templates.ts +510 -0
  137. package/templates/commerce/src/tokens.ts +22 -0
  138. package/templates/theme-candy-boilerplate/.editorconfig +14 -0
  139. package/templates/theme-candy-boilerplate/.gitattributes +1 -0
  140. package/templates/theme-candy-boilerplate/.vscode/extensions.json +7 -0
  141. package/templates/theme-candy-boilerplate/.vscode/settings.json +17 -0
  142. package/templates/theme-candy-boilerplate/assets/theme.css +78 -0
  143. package/templates/theme-candy-boilerplate/assets/theme.js +7 -0
  144. package/templates/theme-candy-boilerplate/candy.config.json +40 -0
  145. package/templates/theme-candy-boilerplate/index.ts +39 -0
  146. package/templates/theme-candy-boilerplate/layout/theme.candy +25 -0
  147. package/templates/theme-candy-boilerplate/locales/en.default.json +37 -0
  148. package/templates/theme-candy-boilerplate/manifest.json +123 -0
  149. package/templates/theme-candy-boilerplate/package.json +16 -0
  150. package/templates/theme-candy-boilerplate/schemas/settings_schema.json +36 -0
  151. package/templates/theme-candy-boilerplate/sections/featured-products.candy +89 -0
  152. package/templates/theme-candy-boilerplate/sections/footer.candy +50 -0
  153. package/templates/theme-candy-boilerplate/sections/header.candy +116 -0
  154. package/templates/theme-candy-boilerplate/sections/hero-banner.candy +135 -0
  155. package/templates/theme-candy-boilerplate/sections/image-with-text.candy +85 -0
  156. package/templates/theme-candy-boilerplate/snippets/price.candy +19 -0
  157. package/templates/theme-candy-boilerplate/snippets/product-card.candy +43 -0
  158. package/templates/theme-candy-boilerplate/templates/404.candy +12 -0
  159. package/templates/theme-candy-boilerplate/templates/cart.candy +51 -0
  160. package/templates/theme-candy-boilerplate/templates/collection.candy +51 -0
  161. package/templates/theme-candy-boilerplate/templates/index.candy +7 -0
  162. package/templates/theme-candy-boilerplate/templates/page.candy +10 -0
  163. package/templates/theme-candy-boilerplate/templates/product.candy +59 -0
  164. package/templates/theme-candy-boilerplate/templates/search.candy +40 -0
  165. package/templates/vscode-candy/LICENSE +21 -0
  166. package/templates/vscode-candy/README.md +22 -0
  167. package/templates/vscode-candy/extension.js +689 -0
  168. package/templates/vscode-candy/icons/candy-dark.svg +23 -0
  169. package/templates/vscode-candy/icons/candy-light.svg +23 -0
  170. package/templates/vscode-candy/icons/candy-logo.png +0 -0
  171. package/templates/vscode-candy/icons/candy-sweet-dark.svg +23 -0
  172. package/templates/vscode-candy/icons/candy-sweet-light.svg +23 -0
  173. package/templates/vscode-candy/language-configuration.json +47 -0
  174. package/templates/vscode-candy/package.json +118 -0
  175. package/templates/vscode-candy/schemas/candy-config.schema.json +56 -0
  176. package/templates/vscode-candy/schemas/candy-settings.schema.json +70 -0
  177. package/templates/vscode-candy/snippets/candy.code-snippets +270 -0
  178. package/templates/vscode-candy/syntaxes/candy.tmLanguage.json +296 -0
  179. package/templates/vscode-candy/vim/ftdetect/candy.vim +5 -0
@@ -0,0 +1,40 @@
1
+ {
2
+ "engine": "candy",
3
+ "candyVersion": "1.0.0",
4
+ "slug": "candy-starter",
5
+ "name": "Candy Starter Theme",
6
+ "version": "1.0.0",
7
+ "author": "Caartzee",
8
+ "description": "Official Caartzee starter theme built with the .candy Liquid-compatible template language.",
9
+ "defaultLayout": "theme",
10
+ "directories": {
11
+ "layout": "layout",
12
+ "templates": "templates",
13
+ "sections": "sections",
14
+ "snippets": "snippets",
15
+ "schemas": "schemas",
16
+ "assets": "assets",
17
+ "locales": "locales"
18
+ },
19
+ "tokens": {
20
+ "colors": {
21
+ "primary": "#0f172a",
22
+ "accent": "#4f46e5",
23
+ "background": "#ffffff",
24
+ "surface": "#f8fafc",
25
+ "text": "#0f172a",
26
+ "muted": "#64748b",
27
+ "border": "#e2e8f0"
28
+ },
29
+ "typography": {
30
+ "headingFont": "'Plus Jakarta Sans', system-ui, -apple-system, sans-serif",
31
+ "bodyFont": "'Inter', system-ui, -apple-system, sans-serif"
32
+ },
33
+ "borderRadius": {
34
+ "sm": "6px",
35
+ "md": "10px",
36
+ "lg": "16px",
37
+ "full": "9999px"
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,39 @@
1
+ import { existsSync } from 'node:fs';
2
+ import { dirname, join, resolve } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ import {
5
+ createCandyStorefrontTheme,
6
+ loadCandyThemeFromDirectory,
7
+ type CandyThemeBundle,
8
+ type StorefrontThemeDefinition,
9
+ } from '@caartzee/theme-sdk';
10
+
11
+ function resolveBoilerplateDir(): string {
12
+ try {
13
+ const fileDir = dirname(fileURLToPath(import.meta.url));
14
+ if (existsSync(join(fileDir, 'candy.config.json'))) {
15
+ return resolve(fileDir);
16
+ }
17
+ } catch {
18
+ // Fallback below
19
+ }
20
+ const cwdCandidate = resolve(process.cwd(), 'packages/theme-candy-boilerplate');
21
+ if (existsSync(join(cwdCandidate, 'candy.config.json'))) {
22
+ return cwdCandidate;
23
+ }
24
+ const parentCandidate = resolve(process.cwd(), '../theme-candy-boilerplate');
25
+ if (existsSync(join(parentCandidate, 'candy.config.json'))) {
26
+ return parentCandidate;
27
+ }
28
+ return cwdCandidate;
29
+ }
30
+
31
+ export const CANDY_BOILERPLATE_DIR = resolveBoilerplateDir();
32
+
33
+ const loaded = loadCandyThemeFromDirectory(CANDY_BOILERPLATE_DIR);
34
+
35
+ export const candyStarterBundle: CandyThemeBundle = loaded.bundle;
36
+ export const candyStarterManifest = loaded.bundle.manifest;
37
+ export const candyStarterTheme: StorefrontThemeDefinition = createCandyStorefrontTheme(loaded.bundle);
38
+
39
+ export default candyStarterTheme;
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html lang="{{ request.locale.iso_code | default: 'en' }}">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>{{ page_title | escape }}{% if shop.name and page_title != shop.name %} &ndash; {{ shop.name | escape }}{% endif %}</title>
7
+ {{ 'theme.css' | asset_url | stylesheet_tag }}
8
+ {{ content_for_header }}
9
+ </head>
10
+ <body class="candy-theme-body template-{{ template.name | handleize }}" data-theme-engine="candy">
11
+ <a class="skip-to-content-link" href="#MainContent" style="position: absolute; left: -9999px;">
12
+ {{ 'general.accessibility.skip_to_text' | t }}
13
+ </a>
14
+
15
+ {% section 'header' %}
16
+
17
+ <main id="MainContent" class="candy-main-content" role="main" tabindex="-1">
18
+ {{ content_for_layout }}
19
+ </main>
20
+
21
+ {% section 'footer' %}
22
+
23
+ {{ 'theme.js' | asset_url | script_tag }}
24
+ </body>
25
+ </html>
@@ -0,0 +1,37 @@
1
+ {
2
+ "general": {
3
+ "search": {
4
+ "title": "Search our store",
5
+ "placeholder": "Search products, collections...",
6
+ "submit": "Search",
7
+ "no_results": "No results found for \"{{ terms }}\".",
8
+ "results_with_count": {
9
+ "zero": "No results found for \"{{ terms }}\"",
10
+ "one": "1 result found for \"{{ terms }}\"",
11
+ "other": "{{ count }} results found for \"{{ terms }}\""
12
+ }
13
+ },
14
+ "accessibility": {
15
+ "skip_to_text": "Skip to content"
16
+ }
17
+ },
18
+ "products": {
19
+ "product": {
20
+ "add_to_cart": "Add to Cart",
21
+ "sold_out": "Sold Out",
22
+ "on_sale": "Sale",
23
+ "view_details": "View Product",
24
+ "quantity": "Quantity",
25
+ "sku": "SKU"
26
+ }
27
+ },
28
+ "sections": {
29
+ "cart": {
30
+ "title": "Your Shopping Bag",
31
+ "empty": "Your shopping bag is currently empty.",
32
+ "continue_shopping": "Continue Shopping",
33
+ "subtotal": "Subtotal",
34
+ "checkout": "Proceed to Checkout"
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,123 @@
1
+ {
2
+ "slug": "candy-starter",
3
+ "name": "Candy Starter Theme",
4
+ "version": "1.0.0",
5
+ "engine": "candy",
6
+ "engineVersion": "^1.0.0",
7
+ "description": "Official Caartzee starter theme built with the .candy Liquid-compatible template language.",
8
+ "author": "Caartzee",
9
+ "previewImage": "assets/preview.jpg",
10
+ "regions": ["header", "body", "footer"],
11
+ "supportedPageTypes": [
12
+ "home",
13
+ "product-list",
14
+ "product-detail",
15
+ "category-list",
16
+ "category-detail",
17
+ "search",
18
+ "cart",
19
+ "custom-page",
20
+ "not-found"
21
+ ],
22
+ "sections": [
23
+ {
24
+ "type": "header",
25
+ "label": "Header Navigation",
26
+ "category": "Header",
27
+ "allowedRegions": ["header"],
28
+ "maxBlocks": 12,
29
+ "settings": [
30
+ { "id": "sticky", "type": "checkbox", "label": "Enable Sticky Header", "default": true },
31
+ { "id": "announcement_text", "type": "text", "label": "Top Announcement Text", "default": "Free express shipping on all orders over $150." },
32
+ { "id": "menuId", "type": "select", "label": "Navigation Menu", "default": null, "options": [] }
33
+ ],
34
+ "blocks": [
35
+ {
36
+ "type": "nav-item",
37
+ "label": "Navigation Link",
38
+ "max": 12,
39
+ "settings": [
40
+ { "id": "label", "type": "text", "label": "Link Label", "default": "Shop" },
41
+ { "id": "url", "type": "url", "label": "Link URL", "default": "/products" },
42
+ { "id": "highlight", "type": "checkbox", "label": "Highlight Link", "default": false }
43
+ ]
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "type": "hero-banner",
49
+ "label": "Hero Banner",
50
+ "category": "Hero & Banners",
51
+ "allowedRegions": ["body"],
52
+ "maxBlocks": 6,
53
+ "settings": [
54
+ { "id": "eyebrow", "type": "text", "label": "Eyebrow Kicker", "default": "New Season Collection" },
55
+ { "id": "heading", "type": "text", "label": "Heading", "default": "Curated Elegance for Modern Living." },
56
+ { "id": "subheading", "type": "textarea", "label": "Subheading", "default": "Handcrafted essentials designed to endure across seasons." },
57
+ { "id": "button_label", "type": "text", "label": "Button Label", "default": "Explore Collection" },
58
+ { "id": "button_url", "type": "url", "label": "Button URL", "default": "/products" },
59
+ {
60
+ "id": "text_alignment",
61
+ "type": "select",
62
+ "label": "Text Alignment",
63
+ "default": "center",
64
+ "options": [
65
+ { "label": "Left", "value": "left" },
66
+ { "label": "Center", "value": "center" },
67
+ { "label": "Right", "value": "right" }
68
+ ]
69
+ },
70
+ { "id": "background_color", "type": "color", "label": "Background Color", "default": "#f8fafc" }
71
+ ],
72
+ "blocks": [
73
+ {
74
+ "type": "trust-badge",
75
+ "label": "Trust Pill",
76
+ "max": 6,
77
+ "settings": [
78
+ { "id": "text", "type": "text", "label": "Badge Text", "default": "Free 30-Day Returns" }
79
+ ]
80
+ }
81
+ ]
82
+ },
83
+ {
84
+ "type": "featured-products",
85
+ "label": "Featured Products",
86
+ "category": "Products",
87
+ "allowedRegions": ["body"],
88
+ "settings": [
89
+ { "id": "heading", "type": "text", "label": "Heading", "default": "Featured Arrivals" },
90
+ { "id": "subheading", "type": "text", "label": "Subheading", "default": "Explore our most sought-after seasonal pieces." },
91
+ { "id": "products_to_show", "type": "range", "label": "Maximum Products to Show", "min": 2, "max": 24, "step": 2, "default": 8 },
92
+ { "id": "show_vendor", "type": "checkbox", "label": "Show Product Vendor", "default": false },
93
+ { "id": "show_view_all", "type": "checkbox", "label": "Show View All Link", "default": true }
94
+ ],
95
+ "blocks": []
96
+ },
97
+ {
98
+ "type": "image-with-text",
99
+ "label": "Image with Text",
100
+ "category": "Content",
101
+ "allowedRegions": ["body"],
102
+ "settings": [
103
+ { "id": "image", "type": "image_picker", "label": "Feature Image", "default": "/assets/story-craft.jpg" },
104
+ { "id": "heading", "type": "text", "label": "Heading", "default": "Crafted with Purpose and Precision" },
105
+ { "id": "text", "type": "textarea", "label": "Body Text", "default": "Every piece in our collection is thoughtfully sourced and tested to meet everyday demands without compromising refined aesthetics." },
106
+ { "id": "button_label", "type": "text", "label": "Button Label", "default": "Discover Our Story" },
107
+ { "id": "button_link", "type": "url", "label": "Button Link", "default": "/products" }
108
+ ],
109
+ "blocks": []
110
+ },
111
+ {
112
+ "type": "footer",
113
+ "label": "Storefront Footer",
114
+ "category": "Footer",
115
+ "allowedRegions": ["footer"],
116
+ "settings": [
117
+ { "id": "tagline", "type": "text", "label": "Footer Tagline", "default": "Thoughtfully curated modern commerce." },
118
+ { "id": "copyright_text", "type": "text", "label": "Copyright Notice", "default": "© Caartzee Storefront. Powered by Candy." }
119
+ ],
120
+ "blocks": []
121
+ }
122
+ ]
123
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "@caartzee/theme-candy-boilerplate",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "main": "index.ts",
7
+ "scripts": {
8
+ "dev": "caartzee-theme dev",
9
+ "validate": "caartzee-theme validate",
10
+ "build": "caartzee-theme build",
11
+ "push": "caartzee-theme push"
12
+ },
13
+ "dependencies": {
14
+ "@caartzee/theme-sdk": "workspace:*"
15
+ }
16
+ }
@@ -0,0 +1,36 @@
1
+ [
2
+ {
3
+ "name": "Brand Colors",
4
+ "settings": [
5
+ {
6
+ "id": "primary_color",
7
+ "type": "color",
8
+ "label": "Primary Color",
9
+ "default": "#0f172a"
10
+ },
11
+ {
12
+ "id": "accent_color",
13
+ "type": "color",
14
+ "label": "Accent Color",
15
+ "default": "#4f46e5"
16
+ }
17
+ ]
18
+ },
19
+ {
20
+ "name": "Typography",
21
+ "settings": [
22
+ {
23
+ "id": "heading_font",
24
+ "type": "text",
25
+ "label": "Heading Font Family",
26
+ "default": "'Plus Jakarta Sans', system-ui, sans-serif"
27
+ },
28
+ {
29
+ "id": "body_font",
30
+ "type": "text",
31
+ "label": "Body Font Family",
32
+ "default": "'Inter', system-ui, sans-serif"
33
+ }
34
+ ]
35
+ }
36
+ ]
@@ -0,0 +1,89 @@
1
+ {% assign max_items = section.settings.products_to_show | default: 8 %}
2
+ {% assign catalog_items = featured_products | default: products %}
3
+
4
+ <section class="cz-candy-featured-products candy-container" style="padding-top: 64px; padding-bottom: 64px;">
5
+ <div style="display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 32px; gap: 16px;">
6
+ <div>
7
+ <h2 style="font-size: 28px; font-weight: 800; color: #0f172a; margin: 0;">
8
+ {{ section.settings.heading | default: 'Featured Products' | escape }}
9
+ </h2>
10
+ {% if section.settings.subheading != blank %}
11
+ <p style="font-size: 15px; color: #64748b; margin: 6px 0 0;">
12
+ {{ section.settings.subheading | escape }}
13
+ </p>
14
+ {% endif %}
15
+ </div>
16
+ {% if section.settings.show_view_all %}
17
+ <a href="{{ routes.all_products_collection_url }}" style="font-size: 14px; font-weight: 600; color: #4f46e5; text-decoration: none;">
18
+ View all &rarr;
19
+ </a>
20
+ {% endif %}
21
+ </div>
22
+
23
+ <div class="candy-product-grid">
24
+ {% for product in catalog_items limit: max_items %}
25
+ {% render 'product-card', product: product, show_vendor: section.settings.show_vendor %}
26
+ {% else %}
27
+ <p class="cz-candy-empty-products" style="color: #64748b; grid-column: 1 / -1; text-align: center; padding: 32px 0;">
28
+ No products found.
29
+ </p>
30
+ {% endfor %}
31
+ </div>
32
+ </section>
33
+
34
+ {% schema %}
35
+ {
36
+ "name": "Featured Products",
37
+ "type": "featured-products",
38
+ "category": "Products",
39
+ "allowedRegions": ["body"],
40
+ "settings": [
41
+ {
42
+ "id": "heading",
43
+ "type": "text",
44
+ "label": "Heading",
45
+ "default": "Featured Arrivals"
46
+ },
47
+ {
48
+ "id": "subheading",
49
+ "type": "text",
50
+ "label": "Subheading",
51
+ "default": "Explore our most sought-after seasonal pieces."
52
+ },
53
+ {
54
+ "id": "products_to_show",
55
+ "type": "range",
56
+ "label": "Maximum Products to Show",
57
+ "min": 2,
58
+ "max": 24,
59
+ "step": 2,
60
+ "default": 8
61
+ },
62
+ {
63
+ "id": "show_vendor",
64
+ "type": "checkbox",
65
+ "label": "Show Product Vendor",
66
+ "default": false
67
+ },
68
+ {
69
+ "id": "show_view_all",
70
+ "type": "checkbox",
71
+ "label": "Show View All Link",
72
+ "default": true
73
+ }
74
+ ],
75
+ "blocks": [],
76
+ "presets": [
77
+ {
78
+ "name": "Featured Products Grid",
79
+ "isDefault": true,
80
+ "settings": {
81
+ "heading": "Featured Arrivals",
82
+ "products_to_show": 8,
83
+ "show_vendor": false,
84
+ "show_view_all": true
85
+ }
86
+ }
87
+ ]
88
+ }
89
+ {% endschema %}
@@ -0,0 +1,50 @@
1
+ <footer class="cz-candy-footer" style="background: #0f172a; color: #94a3b8; padding: 56px 24px; border-top: 1px solid #1e293b; margin-top: 64px;">
2
+ <div class="candy-container" style="display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;">
3
+ <div>
4
+ <strong style="color: #ffffff; font-size: 18px; font-weight: 800;">{{ shop.name | escape }}</strong>
5
+ {% if section.settings.tagline != blank %}
6
+ <p style="margin: 6px 0 0; font-size: 14px; color: #94a3b8;">
7
+ {{ section.settings.tagline | escape }}
8
+ </p>
9
+ {% endif %}
10
+ </div>
11
+
12
+ <div style="font-size: 14px;">
13
+ {{ section.settings.copyright_text | default: 'Powered by Caartzee Candy Engine.' | escape }}
14
+ </div>
15
+ </div>
16
+ </footer>
17
+
18
+ {% schema %}
19
+ {
20
+ "name": "Storefront Footer",
21
+ "type": "footer",
22
+ "category": "Footer",
23
+ "allowedRegions": ["footer"],
24
+ "settings": [
25
+ {
26
+ "id": "tagline",
27
+ "type": "text",
28
+ "label": "Footer Tagline",
29
+ "default": "Thoughtfully curated modern commerce."
30
+ },
31
+ {
32
+ "id": "copyright_text",
33
+ "type": "text",
34
+ "label": "Copyright Notice",
35
+ "default": "© Caartzee Storefront. Powered by Candy."
36
+ }
37
+ ],
38
+ "blocks": [],
39
+ "presets": [
40
+ {
41
+ "name": "Default Footer",
42
+ "isDefault": true,
43
+ "settings": {
44
+ "tagline": "Thoughtfully curated modern commerce.",
45
+ "copyright_text": "© Caartzee Storefront. Powered by Candy."
46
+ }
47
+ }
48
+ ]
49
+ }
50
+ {% endschema %}
@@ -0,0 +1,116 @@
1
+ <header class="cz-candy-header" style="{% if section.settings.sticky %}position: sticky; top: 0; z-index: 50;{% endif %} background: #ffffff; border-bottom: 1px solid #e2e8f0;">
2
+ {% if section.settings.announcement_text != blank %}
3
+ <div class="cz-candy-header__announcement" style="background: #0f172a; color: #f8fafc; font-size: 13px; font-weight: 500; text-align: center; padding: 8px 16px;">
4
+ {{ section.settings.announcement_text | escape }}
5
+ </div>
6
+ {% endif %}
7
+
8
+ <div class="candy-container" style="padding-top: 16px; padding-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 24px;">
9
+ <a href="{{ routes.root_url }}" class="cz-candy-header__brand" style="display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; color: #0f172a; text-decoration: none; letter-spacing: -0.02em;">
10
+ {% if shop.logo_url %}
11
+ <img src="{{ shop.logo_url }}" alt="{{ shop.name | escape }}" style="height: 36px; width: auto; object-fit: contain; border-radius: 4px;" />
12
+ {% endif %}
13
+ <span>{{ shop.name | escape }}</span>
14
+ </a>
15
+
16
+ <nav class="cz-candy-header__nav" aria-label="Main Navigation" style="display: flex; align-items: center; gap: 24px; font-size: 14px; font-weight: 600;">
17
+ {% if section.blocks.size > 0 %}
18
+ {% for block in section.blocks %}
19
+ <a
20
+ href="{{ block.settings.url | default: '/products' }}"
21
+ style="color: {% if block.settings.highlight %}#4f46e5{% else %}#475569{% endif %}; text-decoration: none;"
22
+ {{ block.candy_attributes }}
23
+ >
24
+ {{ block.settings.label | escape }}
25
+ </a>
26
+ {% endfor %}
27
+ {% else %}
28
+ {% for link in linklists['main-menu'].links %}
29
+ <a href="{{ link.url }}" style="color: #475569; text-decoration: none;">
30
+ {{ link.title | escape }}
31
+ </a>
32
+ {% endfor %}
33
+ {% endif %}
34
+ </nav>
35
+
36
+ <div class="cz-candy-header__actions" style="display: flex; align-items: center; gap: 16px; font-size: 14px; font-weight: 600;">
37
+ <a href="{{ routes.search_url }}" style="color: #475569; text-decoration: none;">Search</a>
38
+ <a href="{{ routes.cart_url }}" style="color: #0f172a; text-decoration: none;">
39
+ Bag ({{ cart.item_count | default: 0 }})
40
+ </a>
41
+ </div>
42
+ </div>
43
+ </header>
44
+
45
+ {% schema %}
46
+ {
47
+ "name": "Header Navigation",
48
+ "type": "header",
49
+ "category": "Header",
50
+ "allowedRegions": ["header"],
51
+ "max_blocks": 12,
52
+ "settings": [
53
+ {
54
+ "id": "sticky",
55
+ "type": "checkbox",
56
+ "label": "Enable Sticky Header",
57
+ "default": true
58
+ },
59
+ {
60
+ "id": "announcement_text",
61
+ "type": "text",
62
+ "label": "Top Announcement Text",
63
+ "default": "Free express shipping on all orders over $150."
64
+ },
65
+ {
66
+ "id": "menuId",
67
+ "type": "select",
68
+ "label": "Navigation Menu",
69
+ "default": null,
70
+ "options": []
71
+ }
72
+ ],
73
+ "blocks": [
74
+ {
75
+ "type": "nav-item",
76
+ "name": "Navigation Link",
77
+ "limit": 12,
78
+ "settings": [
79
+ {
80
+ "id": "label",
81
+ "type": "text",
82
+ "label": "Link Label",
83
+ "default": "Shop"
84
+ },
85
+ {
86
+ "id": "url",
87
+ "type": "url",
88
+ "label": "Link URL",
89
+ "default": "/products"
90
+ },
91
+ {
92
+ "id": "highlight",
93
+ "type": "checkbox",
94
+ "label": "Highlight Link",
95
+ "default": false
96
+ }
97
+ ]
98
+ }
99
+ ],
100
+ "presets": [
101
+ {
102
+ "name": "Default Header",
103
+ "isDefault": true,
104
+ "settings": {
105
+ "sticky": true,
106
+ "announcement_text": "Free express shipping on all orders over $150."
107
+ },
108
+ "blocks": [
109
+ { "type": "nav-item", "settings": { "label": "Catalog", "url": "/products", "highlight": false } },
110
+ { "type": "nav-item", "settings": { "label": "Collections", "url": "/collections", "highlight": false } },
111
+ { "type": "nav-item", "settings": { "label": "Search", "url": "/search", "highlight": false } }
112
+ ]
113
+ }
114
+ ]
115
+ }
116
+ {% endschema %}