@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,135 @@
1
+ <section
2
+ class="cz-candy-hero"
3
+ style="padding: 96px 24px; background: {{ section.settings.background_color | default: '#f8fafc' }}; text-align: {{ section.settings.text_alignment | default: 'center' }};"
4
+ >
5
+ <div style="max-width: 820px; margin: 0 auto;">
6
+ {% if section.settings.eyebrow != blank %}
7
+ <span style="display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #4f46e5; margin-bottom: 12px;">
8
+ {{ section.settings.eyebrow | escape }}
9
+ </span>
10
+ {% endif %}
11
+
12
+ <h1 style="font-size: 48px; font-weight: 800; color: #0f172a; line-height: 1.15; margin: 0 0 20px;">
13
+ {{ section.settings.heading | default: 'Curated Elegance for Modern Living.' | escape }}
14
+ </h1>
15
+
16
+ <p style="font-size: 18px; color: #64748b; margin: 0 0 32px; line-height: 1.6;">
17
+ {{ section.settings.subheading | default: 'Handcrafted essentials designed to endure across seasons.' | escape }}
18
+ </p>
19
+
20
+ {% if section.settings.button_label != blank %}
21
+ <a
22
+ href="{{ section.settings.button_url | default: '/products' }}"
23
+ class="candy-btn"
24
+ style="display: inline-block; padding: 14px 32px; background: #4f46e5; color: #ffffff; font-weight: 700; font-size: 15px; border-radius: 8px; text-decoration: none;"
25
+ >
26
+ {{ section.settings.button_label | escape }}
27
+ </a>
28
+ {% endif %}
29
+
30
+ {% if section.blocks.size > 0 %}
31
+ <div class="cz-candy-hero__badges" style="display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 36px;">
32
+ {% for block in section.blocks %}
33
+ <div
34
+ class="cz-candy-hero__badge"
35
+ style="padding: 8px 16px; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 999px; font-size: 13px; font-weight: 600; color: #334155;"
36
+ {{ block.candy_attributes }}
37
+ >
38
+ {{ block.settings.text | escape }}
39
+ </div>
40
+ {% endfor %}
41
+ </div>
42
+ {% endif %}
43
+ </div>
44
+ </section>
45
+
46
+ {% schema %}
47
+ {
48
+ "name": "Hero Banner",
49
+ "type": "hero-banner",
50
+ "category": "Hero & Banners",
51
+ "allowedRegions": ["body"],
52
+ "max_blocks": 6,
53
+ "settings": [
54
+ {
55
+ "id": "eyebrow",
56
+ "type": "text",
57
+ "label": "Eyebrow Kicker",
58
+ "default": "New Season Collection"
59
+ },
60
+ {
61
+ "id": "heading",
62
+ "type": "text",
63
+ "label": "Heading",
64
+ "default": "Curated Elegance for Modern Living."
65
+ },
66
+ {
67
+ "id": "subheading",
68
+ "type": "textarea",
69
+ "label": "Subheading",
70
+ "default": "Handcrafted essentials designed to endure across seasons."
71
+ },
72
+ {
73
+ "id": "button_label",
74
+ "type": "text",
75
+ "label": "Button Label",
76
+ "default": "Explore Collection"
77
+ },
78
+ {
79
+ "id": "button_url",
80
+ "type": "url",
81
+ "label": "Button URL",
82
+ "default": "/products"
83
+ },
84
+ {
85
+ "id": "text_alignment",
86
+ "type": "select",
87
+ "label": "Text Alignment",
88
+ "default": "center",
89
+ "options": [
90
+ { "label": "Left", "value": "left" },
91
+ { "label": "Center", "value": "center" },
92
+ { "label": "Right", "value": "right" }
93
+ ]
94
+ },
95
+ {
96
+ "id": "background_color",
97
+ "type": "color",
98
+ "label": "Background Color",
99
+ "default": "#f8fafc"
100
+ }
101
+ ],
102
+ "blocks": [
103
+ {
104
+ "type": "trust-badge",
105
+ "name": "Trust Pill",
106
+ "limit": 6,
107
+ "settings": [
108
+ {
109
+ "id": "text",
110
+ "type": "text",
111
+ "label": "Badge Text",
112
+ "default": "Free 30-Day Returns"
113
+ }
114
+ ]
115
+ }
116
+ ],
117
+ "presets": [
118
+ {
119
+ "name": "Hero Banner",
120
+ "isDefault": true,
121
+ "settings": {
122
+ "eyebrow": "New Season Collection",
123
+ "heading": "Curated Elegance for Modern Living.",
124
+ "subheading": "Handcrafted essentials designed to endure across seasons.",
125
+ "button_label": "Explore Collection",
126
+ "button_url": "/products"
127
+ },
128
+ "blocks": [
129
+ { "type": "trust-badge", "settings": { "text": "Free 30-Day Returns" } },
130
+ { "type": "trust-badge", "settings": { "text": "Sustainably Crafted" } }
131
+ ]
132
+ }
133
+ ]
134
+ }
135
+ {% endschema %}
@@ -0,0 +1,85 @@
1
+ <section class="cz-candy-image-with-text candy-container" style="padding-top: 64px; padding-bottom: 64px;">
2
+ <div
3
+ style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 48px; align-items: center; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 16px; padding: 40px;"
4
+ >
5
+ <div class="cz-candy-image-with-text__media">
6
+ <img
7
+ src="{{ section.settings.image | default: '/assets/story-craft.jpg' | image_url: width: 800 }}"
8
+ alt="{{ section.settings.heading | default: 'Brand Story' | escape }}"
9
+ loading="lazy"
10
+ style="width: 100%; border-radius: 12px; object-fit: cover; aspect-ratio: 4 / 3; background: #e2e8f0;"
11
+ />
12
+ </div>
13
+
14
+ <div class="cz-candy-image-with-text__content">
15
+ <h2 style="font-size: 32px; font-weight: 800; color: #0f172a; margin: 0 0 16px; line-height: 1.2;">
16
+ {{ section.settings.heading | default: 'Crafted with Purpose and Precision' | escape }}
17
+ </h2>
18
+ <div style="font-size: 16px; color: #475569; line-height: 1.7; margin-bottom: 24px;">
19
+ {{ section.settings.text | default: 'Every piece in our collection is thoughtfully sourced and tested to meet everyday demands without compromising refined aesthetics.' | escape }}
20
+ </div>
21
+ {% if section.settings.button_label != blank %}
22
+ <a
23
+ href="{{ section.settings.button_link | default: '/products' }}"
24
+ class="candy-btn"
25
+ style="display: inline-block; padding: 12px 24px; background: #0f172a; color: #ffffff; border-radius: 8px; font-weight: 600; text-decoration: none;"
26
+ >
27
+ {{ section.settings.button_label | escape }}
28
+ </a>
29
+ {% endif %}
30
+ </div>
31
+ </div>
32
+ </section>
33
+
34
+ {% schema %}
35
+ {
36
+ "name": "Image with Text",
37
+ "type": "image-with-text",
38
+ "category": "Content",
39
+ "allowedRegions": ["body"],
40
+ "settings": [
41
+ {
42
+ "id": "image",
43
+ "type": "image_picker",
44
+ "label": "Feature Image",
45
+ "default": "/assets/story-craft.jpg"
46
+ },
47
+ {
48
+ "id": "heading",
49
+ "type": "text",
50
+ "label": "Heading",
51
+ "default": "Crafted with Purpose and Precision"
52
+ },
53
+ {
54
+ "id": "text",
55
+ "type": "textarea",
56
+ "label": "Body Text",
57
+ "default": "Every piece in our collection is thoughtfully sourced and tested to meet everyday demands without compromising refined aesthetics."
58
+ },
59
+ {
60
+ "id": "button_label",
61
+ "type": "text",
62
+ "label": "Button Label",
63
+ "default": "Discover Our Story"
64
+ },
65
+ {
66
+ "id": "button_link",
67
+ "type": "url",
68
+ "label": "Button Link",
69
+ "default": "/products"
70
+ }
71
+ ],
72
+ "blocks": [],
73
+ "presets": [
74
+ {
75
+ "name": "Image with Text",
76
+ "isDefault": true,
77
+ "settings": {
78
+ "heading": "Crafted with Purpose and Precision",
79
+ "button_label": "Discover Our Story",
80
+ "button_link": "/products"
81
+ }
82
+ }
83
+ ]
84
+ }
85
+ {% endschema %}
@@ -0,0 +1,19 @@
1
+ {% doc %}
2
+ Renders formatted product price and optional compare-at price badge.
3
+ Accepts:
4
+ - product: {Object} Product drop
5
+ {% enddoc %}
6
+ {% assign target = product %}
7
+ <div class="candy-price">
8
+ <span class="candy-price__current" style="font-size: 16px; font-weight: 800; color: var(--color-accent, #4f46e5);">
9
+ {{ target.price | money }}
10
+ </span>
11
+ {% if target.compare_at_price and target.compare_at_price > target.price %}
12
+ <span class="candy-price__compare" style="font-size: 14px; color: #94a3b8; text-decoration: line-through;">
13
+ {{ target.compare_at_price | money }}
14
+ </span>
15
+ <span class="candy-price__badge" style="font-size: 11px; font-weight: 700; background: #fee2e2; color: #b91c1c; padding: 2px 8px; border-radius: 999px;">
16
+ {{ 'products.product.on_sale' | t }}
17
+ </span>
18
+ {% endif %}
19
+ </div>
@@ -0,0 +1,43 @@
1
+ {% doc %}
2
+ Renders a product card inside product grids and search results.
3
+ Accepts:
4
+ - product: {Object} Product drop
5
+ - show_vendor: {Boolean} Optional flag to show vendor name
6
+ {% enddoc %}
7
+ <article class="candy-product-card" data-product-id="{{ product.id }}" data-product-handle="{{ product.handle }}">
8
+ <a href="{{ product.url }}" class="candy-product-card__media" style="display: block; text-decoration: none; margin-bottom: 12px;">
9
+ <img
10
+ src="{{ product.featured_image | image_url: width: 600 }}"
11
+ alt="{{ product.title | escape }}"
12
+ loading="lazy"
13
+ style="width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; background: #f1f5f9;"
14
+ />
15
+ </a>
16
+
17
+ {% if show_vendor and product.vendor %}
18
+ <div class="candy-product-card__vendor" style="font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px;">
19
+ {{ product.vendor | escape }}
20
+ </div>
21
+ {% endif %}
22
+
23
+ <h3 class="candy-product-card__title" style="font-size: 16px; font-weight: 700; margin: 0 0 8px;">
24
+ <a href="{{ product.url }}" style="color: #0f172a; text-decoration: none;">
25
+ {{ product.title | escape }}
26
+ </a>
27
+ </h3>
28
+
29
+ <div style="margin-top: auto; padding-top: 8px;">
30
+ {% render 'price', product: product %}
31
+ <a
32
+ href="{{ product.url }}"
33
+ class="candy-btn"
34
+ style="display: block; width: 100%; text-align: center; margin-top: 12px; padding: 10px 16px; background: #0f172a; color: #ffffff; border-radius: 6px; font-size: 13px; font-weight: 600; text-decoration: none;"
35
+ >
36
+ {% if product.available %}
37
+ {{ 'products.product.view_details' | t }}
38
+ {% else %}
39
+ {{ 'products.product.sold_out' | t }}
40
+ {% endif %}
41
+ </a>
42
+ </div>
43
+ </article>
@@ -0,0 +1,12 @@
1
+ {% layout 'theme' %}
2
+
3
+ <section class="candy-section candy-not-found" style="text-align: center; padding: 80px 0;">
4
+ <div class="candy-container" style="max-width: 560px; margin: 0 auto;">
5
+ <p class="candy-eyebrow">404</p>
6
+ <h1 class="candy-section__title">{{ page_title | default: 'Page Not Found' | escape }}</h1>
7
+ <p class="candy-section__subtitle" style="margin-bottom: 24px;">
8
+ {{ page.content | default: 'The page you are looking for does not exist or has been moved.' | escape }}
9
+ </p>
10
+ <a href="{{ routes.root_url }}" class="candy-btn candy-btn--primary">Back to Home</a>
11
+ </div>
12
+ </section>
@@ -0,0 +1,51 @@
1
+ {% layout 'theme' %}
2
+
3
+ <section class="cz-candy-cart candy-container" style="padding-top: 48px; padding-bottom: 64px;">
4
+ <h1 style="font-size: 32px; font-weight: 800; color: #0f172a; margin: 0 0 32px;">
5
+ {{ 'sections.cart.title' | t }}
6
+ </h1>
7
+
8
+ {% if cart.item_count > 0 %}
9
+ <div class="cz-candy-cart__items" style="border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; margin-bottom: 24px;">
10
+ {% for item in cart.items %}
11
+ <div
12
+ class="cz-candy-cart__item"
13
+ style="display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid #e2e8f0;"
14
+ >
15
+ <div>
16
+ <a href="{{ item.url }}" style="font-size: 16px; font-weight: 700; color: #0f172a; text-decoration: none;">
17
+ {{ item.title | escape }}
18
+ </a>
19
+ <div style="font-size: 13px; color: #64748b;">
20
+ Qty: {{ item.quantity }} &times; {{ item.price | money }}
21
+ </div>
22
+ </div>
23
+ <div style="font-size: 16px; font-weight: 800; color: #0f172a;">
24
+ {{ item.line_price | money }}
25
+ </div>
26
+ </div>
27
+ {% endfor %}
28
+ </div>
29
+
30
+ <div style="display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; background: #f8fafc; border-radius: 12px;">
31
+ <div>
32
+ <span style="font-size: 14px; color: #64748b;">{{ 'sections.cart.subtotal' | t }}:</span>
33
+ <strong style="font-size: 20px; font-weight: 800; color: #0f172a; margin-left: 8px;">
34
+ {{ cart.total_price | money }}
35
+ </strong>
36
+ </div>
37
+ <a href="/checkout" class="candy-btn">
38
+ {{ 'sections.cart.checkout' | t }}
39
+ </a>
40
+ </div>
41
+ {% else %}
42
+ <div style="text-align: center; padding: 48px 24px; background: #f8fafc; border-radius: 12px; border: 1px solid #e2e8f0;">
43
+ <p style="font-size: 16px; color: #64748b; margin: 0 0 20px;">
44
+ {{ 'sections.cart.empty' | t }}
45
+ </p>
46
+ <a href="{{ routes.all_products_collection_url }}" class="candy-btn">
47
+ {{ 'sections.cart.continue_shopping' | t }}
48
+ </a>
49
+ </div>
50
+ {% endif %}
51
+ </section>
@@ -0,0 +1,51 @@
1
+ {% layout 'theme' %}
2
+
3
+ <section class="cz-candy-collection candy-container" style="padding-top: 48px; padding-bottom: 64px;">
4
+ <header style="margin-bottom: 36px; text-align: center;">
5
+ <h1 style="font-size: 36px; font-weight: 800; color: #0f172a; margin: 0 0 8px;">
6
+ {{ collection.title | default: 'All Products' | escape }}
7
+ </h1>
8
+ {% if collection.description != blank %}
9
+ <p style="font-size: 16px; color: #64748b; max-width: 640px; margin: 0 auto;">
10
+ {{ collection.description | escape }}
11
+ </p>
12
+ {% endif %}
13
+
14
+ {% if categories.size > 0 %}
15
+ <div style="display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px;">
16
+ <a
17
+ href="/collections/all"
18
+ style="padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; {% if collection.handle == 'all' %}background: #4f46e5; color: #ffffff;{% else %}background: #f1f5f9; color: #334155;{% endif %}"
19
+ >
20
+ All Products
21
+ </a>
22
+ {% for cat in categories limit: 10 %}
23
+ <a
24
+ href="/collections/{{ cat.handle }}"
25
+ style="padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; {% if collection.handle == cat.handle %}background: #4f46e5; color: #ffffff;{% else %}background: #f1f5f9; color: #334155;{% endif %}"
26
+ >
27
+ {{ cat.title | escape }} ({{ cat.products_count }})
28
+ </a>
29
+ {% endfor %}
30
+ </div>
31
+ {% endif %}
32
+ </header>
33
+
34
+ {% paginate collection.products by 12 %}
35
+ <div class="candy-product-grid">
36
+ {% for product in collection.products %}
37
+ {% render 'product-card', product: product %}
38
+ {% else %}
39
+ <p style="grid-column: 1 / -1; text-align: center; color: #64748b; padding: 40px 0;">
40
+ No products found.
41
+ </p>
42
+ {% endfor %}
43
+ </div>
44
+
45
+ {% if paginate.pages > 1 %}
46
+ <div style="margin-top: 40px; text-align: center;">
47
+ {{ paginate | default_pagination }}
48
+ </div>
49
+ {% endif %}
50
+ {% endpaginate %}
51
+ </section>
@@ -0,0 +1,7 @@
1
+ {% layout 'theme' %}
2
+
3
+ {% section 'hero-banner' %}
4
+
5
+ {% section 'featured-products' %}
6
+
7
+ {% section 'image-with-text' %}
@@ -0,0 +1,10 @@
1
+ {% layout 'theme' %}
2
+
3
+ <section class="candy-section candy-custom-page">
4
+ <div class="candy-container" style="max-width: 820px; margin: 0 auto;">
5
+ <h1 class="candy-section__title">{{ page.title | default: page_title | escape }}</h1>
6
+ <div class="candy-page__content">
7
+ {{ page.content }}
8
+ </div>
9
+ </div>
10
+ </section>
@@ -0,0 +1,59 @@
1
+ {% layout 'theme' %}
2
+
3
+ <section class="cz-candy-product-detail candy-container" style="padding-top: 48px; padding-bottom: 64px;" data-product-id="{{ product.id }}">
4
+ <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 48px; align-items: start;">
5
+ <div class="cz-candy-product-detail__gallery">
6
+ <img
7
+ src="{{ product.featured_image | image_url: width: 900 }}"
8
+ alt="{{ product.title | escape }}"
9
+ style="width: 100%; border-radius: 12px; object-fit: cover; aspect-ratio: 1 / 1; background: #f8fafc; border: 1px solid #e2e8f0;"
10
+ />
11
+ </div>
12
+
13
+ <div class="cz-candy-product-detail__info">
14
+ {% if product.vendor %}
15
+ <div style="font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; margin-bottom: 8px;">
16
+ {{ product.vendor | escape }}
17
+ </div>
18
+ {% endif %}
19
+
20
+ <h1 style="font-size: 32px; font-weight: 800; color: #0f172a; margin: 0 0 16px;">
21
+ {{ product.title | escape }}
22
+ </h1>
23
+
24
+ <div style="margin-bottom: 24px;">
25
+ {% render 'price', product: product %}
26
+ </div>
27
+
28
+ <div class="cz-candy-product-detail__availability" style="margin-bottom: 20px; font-size: 14px; font-weight: 600;">
29
+ {% if product.available %}
30
+ <span style="color: #16a34a;">Available</span>
31
+ {% elsif product.inventory_quantity > 0 %}
32
+ <span style="color: #d97706;">Limited stock</span>
33
+ {% else %}
34
+ <span style="color: #dc2626;">Unavailable</span>
35
+ {% endif %}
36
+ </div>
37
+
38
+ <div class="cz-candy-product-detail__description" style="font-size: 15px; color: #475569; line-height: 1.7; margin-bottom: 28px;">
39
+ {{ product.description | strip_html | escape }}
40
+ </div>
41
+
42
+ {% form 'product', product, class: 'cz-candy-product-form' %}
43
+ <input type="hidden" name="id" value="{{ product.selected_or_first_available_variant.id }}" />
44
+ <button
45
+ type="submit"
46
+ class="candy-btn"
47
+ {% unless product.available %}disabled{% endunless %}
48
+ style="width: 100%; padding: 14px 24px; background: #4f46e5; color: #ffffff; border-radius: 8px; font-size: 15px; font-weight: 700; border: none; cursor: pointer;"
49
+ >
50
+ {% if product.available %}
51
+ {{ 'products.product.add_to_cart' | t }}
52
+ {% else %}
53
+ {{ 'products.product.sold_out' | t }}
54
+ {% endif %}
55
+ </button>
56
+ {% endform %}
57
+ </div>
58
+ </div>
59
+ </section>
@@ -0,0 +1,40 @@
1
+ {% layout 'theme' %}
2
+
3
+ <section class="cz-candy-search candy-container" style="padding-top: 48px; padding-bottom: 64px;">
4
+ <header style="max-width: 640px; margin: 0 auto 40px; text-align: center;">
5
+ <h1 style="font-size: 32px; font-weight: 800; color: #0f172a; margin: 0 0 16px;">
6
+ {{ 'general.search.title' | t }}
7
+ </h1>
8
+
9
+ {% form 'search', class: 'cz-candy-search__form' %}
10
+ <div style="display: flex; gap: 12px;">
11
+ <input
12
+ type="search"
13
+ name="q"
14
+ value="{{ search.terms | escape }}"
15
+ placeholder="{{ 'general.search.placeholder' | t }}"
16
+ style="flex: 1; padding: 12px 16px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 15px;"
17
+ />
18
+ <button type="submit" class="candy-btn">
19
+ {{ 'general.search.submit' | t }}
20
+ </button>
21
+ </div>
22
+ {% endform %}
23
+ </header>
24
+
25
+ {% if search.performed %}
26
+ <p style="font-size: 14px; color: #64748b; margin-bottom: 24px;">
27
+ {{ 'general.search.results_with_count' | t: count: search.results_count, terms: search.terms }}
28
+ </p>
29
+
30
+ <div class="candy-product-grid">
31
+ {% for item in search.results %}
32
+ {% render 'product-card', product: item %}
33
+ {% else %}
34
+ <p style="grid-column: 1 / -1; text-align: center; color: #64748b; padding: 32px 0;">
35
+ {{ 'general.search.no_results' | t: terms: search.terms }}
36
+ </p>
37
+ {% endfor %}
38
+ </div>
39
+ {% endif %}
40
+ </section>
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Caartzee / Akhil Jinu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,22 @@
1
+ # Candy Language Support (`caartzee.candy-language-support`)
2
+
3
+ Official IDE and editor support for **Candy (`.candy`)** — Caartzee's Liquid-compatible storefront template language.
4
+
5
+ ## Features
6
+
7
+ 1. **Full Syntax Highlighting (`.candy`)**:
8
+ - Output expressions (`{{ ... }}`, `{{- ... -}}`) and filter pipelines (`| money`, `| escape`, `| image_url`, `| asset_url`).
9
+ - Control flow, iteration, variable, and layout/section tags (`{% if %}`, `{% for %}`, `{% render %}`, `{% section %}`, `{% paginate %}`, `{% form %}`).
10
+ - **Embedded JSON Highlighting** inside `{% schema %} ... {% endschema %}`.
11
+ - **Embedded CSS Highlighting** inside `{% style %} ... {% endstyle %}` and `{% stylesheet %} ... {% endstylesheet %}`.
12
+ - **Embedded JavaScript Highlighting** inside `{% javascript %} ... {% endjavascript %}`.
13
+ - **HTML Attribute Injection**: Highlights `{{ ... }}` and `{% ... %}` inside HTML tags and `style="..."` / `class="..."` attributes without breaking HTML syntax highlighting.
14
+ 2. **Dynamic IntelliSense & Autocompletion**:
15
+ - Autocompletes `section.settings.<id>` directly from the current file's `{% schema %}` JSON block.
16
+ - Autocompletes all Candy filters after `|` and tags after `{%`.
17
+ - Autocompletes Caartzee storefront objects (`product`, `collection`, `cart`, `shop`, `section`, `block`, `forloop`, `paginate`, `routes`, `request`).
18
+ 3. **Live Diagnostics (Linter)**:
19
+ - Flags unclosed block tags (`{% if %}`, `{% for %}`, `{% schema %}`, etc.).
20
+ - Validates JSON syntax inside `{% schema %} ... {% endschema %}`.
21
+ 4. **JSON Schema Validation**:
22
+ - Validates `candy.config.json` and `schemas/settings_schema.json`.