@caartzee/theme-sdk 0.0.0-stage → 1.0.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.
- package/README.md +34 -2
- package/dist/bin/caartzee-theme.js +7449 -0
- package/dist/lib/index.js +9838 -0
- package/dist/types/src/auth/credentials-store.d.ts +18 -0
- package/dist/types/src/auth/index.d.ts +2 -0
- package/dist/types/src/auth/oauth-client.d.ts +39 -0
- package/dist/types/src/blocks/block-contract.d.ts +242 -0
- package/dist/types/src/candy/compatibility-matrix.d.ts +10 -0
- package/dist/types/src/candy/context-builder.d.ts +31 -0
- package/dist/types/src/candy/engine.d.ts +69 -0
- package/dist/types/src/candy/filters.d.ts +32 -0
- package/dist/types/src/candy/ide-support.d.ts +20 -0
- package/dist/types/src/candy/index.d.ts +9 -0
- package/dist/types/src/candy/schema-parser.d.ts +13 -0
- package/dist/types/src/candy/security.d.ts +54 -0
- package/dist/types/src/candy/tags.d.ts +11 -0
- package/dist/types/src/candy/types.d.ts +185 -0
- package/dist/types/src/cli/caartzee-cli.d.ts +9 -0
- package/dist/types/src/cli/index.d.ts +1 -0
- package/dist/types/src/cli/sdk-client.d.ts +12 -0
- package/dist/types/src/contracts/category-selection.d.ts +15 -0
- package/dist/types/src/contracts/commerce.d.ts +282 -0
- package/dist/types/src/contracts/footer-builder.d.ts +125 -0
- package/dist/types/src/contracts/hooks.d.ts +37 -0
- package/dist/types/src/contracts/manifest.d.ts +3127 -0
- package/dist/types/src/contracts/navigation.d.ts +39 -0
- package/dist/types/src/contracts/order-tracking.d.ts +40 -0
- package/dist/types/src/contracts/page.d.ts +262 -0
- package/dist/types/src/contracts/storefront-content.d.ts +60 -0
- package/dist/types/src/contracts/style-document.d.ts +2 -0
- package/dist/types/src/contracts/styles.d.ts +2002 -0
- package/dist/types/src/contracts/theme.d.ts +35 -0
- package/dist/types/src/dev-server/catalog-preview.d.ts +25 -0
- package/dist/types/src/dev-server/dev-server.d.ts +22 -0
- package/dist/types/src/dev-server/index.d.ts +1 -0
- package/dist/types/src/dev-server/theme-preview.d.ts +4 -0
- package/dist/types/src/index.d.ts +27 -0
- package/dist/types/src/mock/index.d.ts +10 -0
- package/dist/types/src/mock/mock-categories.d.ts +2 -0
- package/dist/types/src/mock/mock-commerce.d.ts +55 -0
- package/dist/types/src/mock/mock-customer.d.ts +47 -0
- package/dist/types/src/mock/mock-hooks.d.ts +2 -0
- package/dist/types/src/mock/mock-products.d.ts +3 -0
- package/dist/types/src/rendering/commerce-pages.d.ts +16 -0
- package/dist/types/src/rendering/raw-html.d.ts +12 -0
- package/dist/types/src/rendering/section-wrapper.d.ts +30 -0
- package/dist/types/src/scaffold/candy-starter-assets.d.ts +2 -0
- package/dist/types/src/scaffold/commerce-generator.d.ts +3 -0
- package/dist/types/src/scaffold/index.d.ts +2 -0
- package/dist/types/src/scaffold/template-generator.d.ts +21 -0
- package/dist/types/src/sections/section-contract.d.ts +350 -0
- package/dist/types/src/settings/global-settings.d.ts +25 -0
- package/dist/types/src/templates/json-template.d.ts +991 -0
- package/dist/types/src/validation/package-validator.d.ts +53 -0
- package/dist/types/src/validation/rich-text.d.ts +24 -0
- package/package.json +28 -3
- package/templates/commerce/README.md +165 -0
- package/templates/commerce/assets/theme.css +1 -0
- package/templates/commerce/manifest.json +1 -0
- package/templates/commerce/src/blocks/index.ts +184 -0
- package/templates/commerce/src/config/settings-defaults.ts +25 -0
- package/templates/commerce/src/config/settings-schema.ts +102 -0
- package/templates/commerce/src/index.ts +90 -0
- package/templates/commerce/src/layouts/default.ts +275 -0
- package/templates/commerce/src/manifest.ts +976 -0
- package/templates/commerce/src/pages/account/components.ts +369 -0
- package/templates/commerce/src/pages/account/tabs.ts +792 -0
- package/templates/commerce/src/pages/account.ts +55 -0
- package/templates/commerce/src/pages/campaign.ts +423 -0
- package/templates/commerce/src/pages/cart.ts +261 -0
- package/templates/commerce/src/pages/category-detail.ts +124 -0
- package/templates/commerce/src/pages/category-list.ts +87 -0
- package/templates/commerce/src/pages/checkout.ts +712 -0
- package/templates/commerce/src/pages/commerce.ts +45 -0
- package/templates/commerce/src/pages/home.ts +160 -0
- package/templates/commerce/src/pages/index.ts +99 -0
- package/templates/commerce/src/pages/login.ts +204 -0
- package/templates/commerce/src/pages/order-success.ts +80 -0
- package/templates/commerce/src/pages/product-detail.ts +489 -0
- package/templates/commerce/src/pages/product-list.ts +125 -0
- package/templates/commerce/src/pages/search.ts +88 -0
- package/templates/commerce/src/pages/signup.ts +253 -0
- package/templates/commerce/src/pages/status.ts +7 -0
- package/templates/commerce/src/pages/theme-layout.ts +491 -0
- package/templates/commerce/src/pages/track-order.ts +196 -0
- package/templates/commerce/src/pages/wishlist.ts +83 -0
- package/templates/commerce/src/sections/about-story.ts +117 -0
- package/templates/commerce/src/sections/announcement-bar.ts +101 -0
- package/templates/commerce/src/sections/banner-grid.ts +319 -0
- package/templates/commerce/src/sections/campaign-banners.ts +158 -0
- package/templates/commerce/src/sections/category-slider.ts +144 -0
- package/templates/commerce/src/sections/content-builder.ts +123 -0
- package/templates/commerce/src/sections/content-controls.ts +45 -0
- package/templates/commerce/src/sections/custom-form.ts +59 -0
- package/templates/commerce/src/sections/faq-accordion.ts +123 -0
- package/templates/commerce/src/sections/footer.ts +728 -0
- package/templates/commerce/src/sections/header.ts +439 -0
- package/templates/commerce/src/sections/hero-slider.ts +492 -0
- package/templates/commerce/src/sections/hero.ts +137 -0
- package/templates/commerce/src/sections/index.ts +102 -0
- package/templates/commerce/src/sections/mobile-slider.ts +102 -0
- package/templates/commerce/src/sections/newsletter.ts +43 -0
- package/templates/commerce/src/sections/product-grid.ts +191 -0
- package/templates/commerce/src/sections/raw-html.ts +1 -0
- package/templates/commerce/src/sections/rich-text.ts +26 -0
- package/templates/commerce/src/sections/services-features.ts +211 -0
- package/templates/commerce/src/sections/testimonials.ts +194 -0
- package/templates/commerce/src/snippets/product-card.ts +178 -0
- package/templates/commerce/src/snippets/product-price.ts +46 -0
- package/templates/commerce/src/snippets/responsive-image.ts +29 -0
- package/templates/commerce/src/styles.ts +477 -0
- package/templates/commerce/src/templates/404.json +26 -0
- package/templates/commerce/src/templates/account.json +17 -0
- package/templates/commerce/src/templates/cart.json +17 -0
- package/templates/commerce/src/templates/category.json +16 -0
- package/templates/commerce/src/templates/checkout.json +15 -0
- package/templates/commerce/src/templates/collection.json +16 -0
- package/templates/commerce/src/templates/index.json +180 -0
- package/templates/commerce/src/templates/login.json +17 -0
- package/templates/commerce/src/templates/order-success.json +17 -0
- package/templates/commerce/src/templates/page.json +17 -0
- package/templates/commerce/src/templates/product.json +17 -0
- package/templates/commerce/src/templates/search.json +18 -0
- package/templates/commerce/src/templates/signup.json +17 -0
- package/templates/commerce/src/templates/track-order.json +17 -0
- package/templates/commerce/src/templates/wishlist.json +17 -0
- package/templates/commerce/src/templates.ts +510 -0
- package/templates/commerce/src/tokens.ts +22 -0
- package/templates/vscode-candy/README.md +22 -0
- package/templates/vscode-candy/extension.js +338 -0
- package/templates/vscode-candy/icons/candy-dark.svg +23 -0
- package/templates/vscode-candy/icons/candy-light.svg +23 -0
- package/templates/vscode-candy/icons/candy-logo.png +0 -0
- package/templates/vscode-candy/icons/candy-sweet-dark.svg +23 -0
- package/templates/vscode-candy/icons/candy-sweet-light.svg +23 -0
- package/templates/vscode-candy/language-configuration.json +47 -0
- package/templates/vscode-candy/package.json +103 -0
- package/templates/vscode-candy/schemas/candy-config.schema.json +56 -0
- package/templates/vscode-candy/schemas/candy-settings.schema.json +70 -0
- package/templates/vscode-candy/snippets/candy.code-snippets +179 -0
- package/templates/vscode-candy/syntaxes/candy.tmLanguage.json +296 -0
- package/templates/vscode-candy/vim/ftdetect/candy.vim +5 -0
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
import type { LayoutDocument, PageDocument } from '@caartzee/theme-sdk';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Default Layout Template
|
|
5
|
+
* Defines the persistent global header and footer regions.
|
|
6
|
+
*/
|
|
7
|
+
export const defaultLayout: LayoutDocument = {
|
|
8
|
+
regions: {
|
|
9
|
+
header: [
|
|
10
|
+
{
|
|
11
|
+
id: 'starter-hdr-main',
|
|
12
|
+
type: 'starter-header',
|
|
13
|
+
settings: {
|
|
14
|
+
logoText: 'My Store',
|
|
15
|
+
logoWidth: 140,
|
|
16
|
+
showMonogram: true,
|
|
17
|
+
showAnnouncement: true,
|
|
18
|
+
announcementText: 'Free Shipping on Orders Over ₹799 | Easy Returns | 100% Secure Payment',
|
|
19
|
+
announcementLink: '/products',
|
|
20
|
+
utilityLinks: [
|
|
21
|
+
{ label: 'Track Order', url: '/track-order' },
|
|
22
|
+
{ label: 'Help & Support', url: '/pages/contact' },
|
|
23
|
+
],
|
|
24
|
+
cartCount: 0,
|
|
25
|
+
menuId: null,
|
|
26
|
+
menuAlignment: 'left',
|
|
27
|
+
topLevelSize: '14px',
|
|
28
|
+
case: 'default',
|
|
29
|
+
sticky: true,
|
|
30
|
+
showSearch: true,
|
|
31
|
+
showSearchBar: true,
|
|
32
|
+
showWishlist: true,
|
|
33
|
+
showAccount: true,
|
|
34
|
+
showCart: true,
|
|
35
|
+
},
|
|
36
|
+
blocks: [
|
|
37
|
+
{ id: 'nav-home', type: 'nav-item', settings: { label: 'Home', url: '/' } },
|
|
38
|
+
{ id: 'nav-products', type: 'nav-item', settings: { label: 'All Products', url: '/products' } },
|
|
39
|
+
{ id: 'nav-categories', type: 'nav-item', settings: { label: 'Categories', url: '/categories' } },
|
|
40
|
+
{ id: 'nav-new', type: 'nav-item', settings: { label: 'New Arrivals', url: '/products?sort_by=new' } },
|
|
41
|
+
{ id: 'nav-deals', type: 'nav-item', settings: { label: 'Deals', url: '/offers' } },
|
|
42
|
+
{ id: 'nav-about', type: 'nav-item', settings: { label: 'About Us', url: '/pages/about' } },
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
footer: [
|
|
47
|
+
{
|
|
48
|
+
id: 'starter-ftr-main',
|
|
49
|
+
type: 'starter-footer',
|
|
50
|
+
settings: {
|
|
51
|
+
logoText: 'My Store',
|
|
52
|
+
tagline:
|
|
53
|
+
'Your premier destination for high quality toys, apparel and lifestyle products for kids and families.',
|
|
54
|
+
copyright: '© 2026 My Store. All Rights Reserved.',
|
|
55
|
+
address: '100 Market Street, Suite 400, San Francisco, CA',
|
|
56
|
+
email: 'support@example.com',
|
|
57
|
+
phone: '+1 (555) 234-5678',
|
|
58
|
+
hours: 'Mon - Fri: 9am - 6pm EST',
|
|
59
|
+
socialLinks: {
|
|
60
|
+
facebook: '#facebook',
|
|
61
|
+
instagram: '#instagram',
|
|
62
|
+
youtube: '#youtube',
|
|
63
|
+
twitter: '#twitter',
|
|
64
|
+
},
|
|
65
|
+
customerCareLinks: [
|
|
66
|
+
{ label: 'Contact Us', url: '/pages/contact' },
|
|
67
|
+
{ label: 'Track Order', url: '/track-order' },
|
|
68
|
+
{ label: 'Returns & Refunds', url: '/pages/returns' },
|
|
69
|
+
{ label: 'FAQ', url: '/pages/faq' },
|
|
70
|
+
{ label: 'Help & Support', url: '/pages/contact' },
|
|
71
|
+
],
|
|
72
|
+
legalLinks: [
|
|
73
|
+
{ label: 'Privacy Policy', url: '/privacy-policy' },
|
|
74
|
+
{ label: 'Terms & Conditions', url: '/terms-and-conditions' },
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
blocks: [
|
|
78
|
+
{ id: 'ftr-home', type: 'link-item', settings: { label: 'Home', url: '/' } },
|
|
79
|
+
{ id: 'ftr-products', type: 'link-item', settings: { label: 'All Products', url: '/products' } },
|
|
80
|
+
{ id: 'ftr-categories', type: 'link-item', settings: { label: 'Categories', url: '/categories' } },
|
|
81
|
+
{ id: 'ftr-new', type: 'link-item', settings: { label: 'New Arrivals', url: '/products?sort_by=new' } },
|
|
82
|
+
{ id: 'ftr-deals', type: 'link-item', settings: { label: 'Deals', url: '/offers' } },
|
|
83
|
+
{ id: 'ftr-about', type: 'link-item', settings: { label: 'About Us', url: '/pages/about' } },
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Default Home Page Template
|
|
92
|
+
* Defines the initial sections rendered on the storefront root ('/').
|
|
93
|
+
* Matches the Joybee luxury editorial storefront UI:
|
|
94
|
+
* 1. Dark Burgundy/Gold Hero Carousel (Autumn Collection 2026)
|
|
95
|
+
* 2. Warm Cream 4-Column Trust Strip (Free Shipping, Secure Payment, Easy Returns, Support)
|
|
96
|
+
* 3. Explore Our Collections (6 Pastel Category Cards)
|
|
97
|
+
* 4. Dual Promotional Banners (Plush & Soft Toys / Remote Control & Vehicle Toys)
|
|
98
|
+
* 5. Trending This Week (5-Column Product Grid with Ratings & Quick Add)
|
|
99
|
+
* 6. Join the Joybee Club (VIP Plum & Gold Ribbon Banner)
|
|
100
|
+
*/
|
|
101
|
+
export const defaultHomePage: PageDocument = {
|
|
102
|
+
title: 'Home',
|
|
103
|
+
slug: '/',
|
|
104
|
+
regions: {
|
|
105
|
+
body: [
|
|
106
|
+
{
|
|
107
|
+
id: 'starter-hero-carousel',
|
|
108
|
+
type: 'hero-slider',
|
|
109
|
+
settings: {
|
|
110
|
+
height: 'standard',
|
|
111
|
+
autoplay: true,
|
|
112
|
+
intervalSeconds: 6,
|
|
113
|
+
showArrows: true,
|
|
114
|
+
showDots: true,
|
|
115
|
+
},
|
|
116
|
+
blocks: [
|
|
117
|
+
{
|
|
118
|
+
id: 'slide-1',
|
|
119
|
+
type: 'slide',
|
|
120
|
+
settings: {
|
|
121
|
+
badge: 'NEW SEASON LAUNCH',
|
|
122
|
+
heading: 'Autumn\nCollection 2026',
|
|
123
|
+
highlightText: '2026',
|
|
124
|
+
subheading: 'Discover the latest seasonal trends in toys, fashion and more for every age.',
|
|
125
|
+
buttonText: 'Shop Collection',
|
|
126
|
+
buttonLink: '/products',
|
|
127
|
+
imageUrl: 'https://images.unsplash.com/photo-1584917865442-de89df76afd3?w=1200&auto=format&fit=crop&q=85',
|
|
128
|
+
textAlignment: 'left',
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
id: 'slide-2',
|
|
133
|
+
type: 'slide',
|
|
134
|
+
settings: {
|
|
135
|
+
badge: 'LIMITED DROP',
|
|
136
|
+
heading: 'Playful\nWonders 2026',
|
|
137
|
+
highlightText: '2026',
|
|
138
|
+
subheading: 'Thoughtfully crafted toys, apparel, and seasonal favorites built for everyday joy.',
|
|
139
|
+
buttonText: 'Explore Collection',
|
|
140
|
+
buttonLink: '/products',
|
|
141
|
+
imageUrl: 'https://images.unsplash.com/photo-1548036328-c9fa89d128fa?w=1200&auto=format&fit=crop&q=85',
|
|
142
|
+
textAlignment: 'left',
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
id: 'starter-trust-strip',
|
|
149
|
+
type: 'services-features',
|
|
150
|
+
settings: {
|
|
151
|
+
columns: 4,
|
|
152
|
+
bordered: false,
|
|
153
|
+
variant: 'strip',
|
|
154
|
+
},
|
|
155
|
+
blocks: [
|
|
156
|
+
{
|
|
157
|
+
id: 'trust-shipping',
|
|
158
|
+
type: 'feature-item',
|
|
159
|
+
settings: { title: 'Free Shipping', description: 'Above ₹799', icon: 'truck' },
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: 'trust-payment',
|
|
163
|
+
type: 'feature-item',
|
|
164
|
+
settings: { title: 'Secure Payment', description: '100% Safe & Secure', icon: 'shield' },
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
id: 'trust-returns',
|
|
168
|
+
type: 'feature-item',
|
|
169
|
+
settings: { title: 'Easy Returns', description: '7 Days Return', icon: 'refresh' },
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
id: 'trust-support',
|
|
173
|
+
type: 'feature-item',
|
|
174
|
+
settings: { title: 'Customer Support', description: 'Always Here for You', icon: 'headphones' },
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: 'starter-categories-row',
|
|
180
|
+
type: 'category-slider',
|
|
181
|
+
settings: {
|
|
182
|
+
eyebrow: 'SHOP BY CATEGORY',
|
|
183
|
+
title: 'Explore Our Collections',
|
|
184
|
+
viewAllText: '',
|
|
185
|
+
viewAllUrl: '/categories',
|
|
186
|
+
limit: 6,
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
id: 'starter-dual-promo-banners',
|
|
191
|
+
type: 'banner-grid',
|
|
192
|
+
settings: {
|
|
193
|
+
columns: 2,
|
|
194
|
+
},
|
|
195
|
+
blocks: [
|
|
196
|
+
{
|
|
197
|
+
id: 'banner-plush',
|
|
198
|
+
type: 'card-item',
|
|
199
|
+
settings: {
|
|
200
|
+
title: 'Plush &\nSoft Toys',
|
|
201
|
+
accentText: 'Soft Toys',
|
|
202
|
+
subtitle: 'Cuddly friends for all ages!',
|
|
203
|
+
buttonText: 'Shop Now',
|
|
204
|
+
linkUrl: '/categories/plush-soft-toys',
|
|
205
|
+
themeVariant: 'warm-blush',
|
|
206
|
+
imageUrl: 'https://images.unsplash.com/photo-1559454403-b8fb88521f11?w=800&auto=format&fit=crop&q=85',
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
id: 'banner-rc',
|
|
211
|
+
type: 'card-item',
|
|
212
|
+
settings: {
|
|
213
|
+
title: 'Remote Control &\nVehicle Toys',
|
|
214
|
+
accentText: 'Vehicle Toys',
|
|
215
|
+
subtitle: 'High-speed fun for little explorers!',
|
|
216
|
+
buttonText: 'Shop Now',
|
|
217
|
+
linkUrl: '/categories/remote-control-toys',
|
|
218
|
+
themeVariant: 'cool-mist',
|
|
219
|
+
imageUrl: 'https://images.unsplash.com/photo-1594787318286-3d835c1d207f?w=800&auto=format&fit=crop&q=85',
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
],
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
id: 'starter-featured-products',
|
|
226
|
+
type: 'featured-products',
|
|
227
|
+
settings: {
|
|
228
|
+
title: 'Trending This Week',
|
|
229
|
+
viewAllText: 'View All',
|
|
230
|
+
viewAllUrl: '/products',
|
|
231
|
+
columns: 5,
|
|
232
|
+
limit: 5,
|
|
233
|
+
productLimit: 5,
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
id: 'starter-vip-club-banner',
|
|
238
|
+
type: 'banner-grid',
|
|
239
|
+
settings: {
|
|
240
|
+
columns: 1,
|
|
241
|
+
variant: 'vip-club',
|
|
242
|
+
title: 'Join the VIP Club',
|
|
243
|
+
accentText: 'VIP Club',
|
|
244
|
+
subtitle: 'Get exclusive offers, early access to new arrivals and special deals just for members!',
|
|
245
|
+
buttonText: 'Sign Up Now',
|
|
246
|
+
linkUrl: '/signup',
|
|
247
|
+
perks: 'Member-Only Deals | Early Access to Launches | Special Birthday Offers',
|
|
248
|
+
},
|
|
249
|
+
blocks: [
|
|
250
|
+
{
|
|
251
|
+
id: 'vip-club-card',
|
|
252
|
+
type: 'card-item',
|
|
253
|
+
settings: {
|
|
254
|
+
title: 'Join the VIP Club',
|
|
255
|
+
accentText: 'VIP Club',
|
|
256
|
+
subtitle: 'Get exclusive offers, early access to new arrivals and special deals just for members!',
|
|
257
|
+
buttonText: 'Sign Up Now',
|
|
258
|
+
linkUrl: '/signup',
|
|
259
|
+
perks: 'Member-Only Deals | Early Access to Launches | Special Birthday Offers',
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
],
|
|
263
|
+
},
|
|
264
|
+
],
|
|
265
|
+
},
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Default Products / Catalog Page Template
|
|
270
|
+
*/
|
|
271
|
+
export const defaultProductsPage: PageDocument = {
|
|
272
|
+
title: 'Products',
|
|
273
|
+
slug: '/products',
|
|
274
|
+
regions: {
|
|
275
|
+
body: [
|
|
276
|
+
{
|
|
277
|
+
id: 'starter-products-collection',
|
|
278
|
+
type: 'featured-products',
|
|
279
|
+
settings: {
|
|
280
|
+
title: 'All Products',
|
|
281
|
+
subtitle: 'Explore our complete catalogue of premium essentials.',
|
|
282
|
+
limit: 12,
|
|
283
|
+
productLimit: 12,
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
],
|
|
287
|
+
},
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Default Collections / Categories Showcase Template
|
|
292
|
+
*/
|
|
293
|
+
export const defaultCollectionsPage: PageDocument = {
|
|
294
|
+
title: 'Collections',
|
|
295
|
+
slug: '/collections',
|
|
296
|
+
regions: {
|
|
297
|
+
body: [
|
|
298
|
+
{
|
|
299
|
+
id: 'starter-collections-slider',
|
|
300
|
+
type: 'category-slider',
|
|
301
|
+
settings: {
|
|
302
|
+
title: 'Browse Collections',
|
|
303
|
+
showItemCount: true,
|
|
304
|
+
},
|
|
305
|
+
blocks: [],
|
|
306
|
+
},
|
|
307
|
+
],
|
|
308
|
+
},
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Default Product Detail Related Showcase Template
|
|
313
|
+
*/
|
|
314
|
+
export const defaultProductDetailPage: PageDocument = {
|
|
315
|
+
title: 'Product Details',
|
|
316
|
+
slug: '/product',
|
|
317
|
+
regions: {
|
|
318
|
+
body: [
|
|
319
|
+
{
|
|
320
|
+
id: 'starter-related-products',
|
|
321
|
+
type: 'featured-products',
|
|
322
|
+
settings: {
|
|
323
|
+
title: 'Related Products',
|
|
324
|
+
columns: 4,
|
|
325
|
+
productLimit: 4,
|
|
326
|
+
},
|
|
327
|
+
blocks: [],
|
|
328
|
+
},
|
|
329
|
+
],
|
|
330
|
+
},
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Default Brand Narrative / About Us Content Template
|
|
335
|
+
*/
|
|
336
|
+
export const defaultPagesPage: PageDocument = {
|
|
337
|
+
title: 'About Us',
|
|
338
|
+
slug: '/pages/about',
|
|
339
|
+
regions: {
|
|
340
|
+
body: [
|
|
341
|
+
{
|
|
342
|
+
id: 'starter-about-brand',
|
|
343
|
+
type: 'rich-text',
|
|
344
|
+
settings: {
|
|
345
|
+
title: 'About Our Brand',
|
|
346
|
+
heading: 'About Our Brand',
|
|
347
|
+
content: 'Crafted with passion for everyday elegance and modern living.',
|
|
348
|
+
alignment: 'center',
|
|
349
|
+
},
|
|
350
|
+
blocks: [],
|
|
351
|
+
},
|
|
352
|
+
],
|
|
353
|
+
},
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Default Blog Journal / Editorial Stories Template
|
|
358
|
+
*/
|
|
359
|
+
export const defaultBlogPage: PageDocument = {
|
|
360
|
+
title: 'Blogs',
|
|
361
|
+
slug: '/blogs',
|
|
362
|
+
regions: {
|
|
363
|
+
body: [
|
|
364
|
+
{
|
|
365
|
+
id: 'starter-blog-content',
|
|
366
|
+
type: 'rich-text',
|
|
367
|
+
settings: {
|
|
368
|
+
title: 'Journal & Stories',
|
|
369
|
+
heading: 'Journal & Stories',
|
|
370
|
+
content: 'Stories, craftsmanship, and style notes.',
|
|
371
|
+
alignment: 'left',
|
|
372
|
+
},
|
|
373
|
+
blocks: [],
|
|
374
|
+
},
|
|
375
|
+
],
|
|
376
|
+
},
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Default Password / Coming Soon Landing Template
|
|
381
|
+
*/
|
|
382
|
+
export const defaultPasswordPage: PageDocument = {
|
|
383
|
+
title: 'Password',
|
|
384
|
+
slug: '/password',
|
|
385
|
+
regions: {
|
|
386
|
+
body: [
|
|
387
|
+
{
|
|
388
|
+
id: 'starter-opening-soon',
|
|
389
|
+
type: 'newsletter-subscribe',
|
|
390
|
+
settings: {
|
|
391
|
+
heading: 'Opening Soon',
|
|
392
|
+
subheading: 'Be the first to know when we launch our new collection.',
|
|
393
|
+
buttonLabel: 'Notify Me',
|
|
394
|
+
},
|
|
395
|
+
blocks: [],
|
|
396
|
+
},
|
|
397
|
+
],
|
|
398
|
+
},
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Default Cart Recommendations Showcase Template
|
|
403
|
+
*/
|
|
404
|
+
export const defaultCartPage: PageDocument = {
|
|
405
|
+
title: 'Cart',
|
|
406
|
+
slug: '/cart',
|
|
407
|
+
regions: {
|
|
408
|
+
body: [
|
|
409
|
+
{
|
|
410
|
+
id: 'starter-cart-recommendations',
|
|
411
|
+
type: 'featured-products',
|
|
412
|
+
settings: {
|
|
413
|
+
title: 'You May Also Like',
|
|
414
|
+
columns: 4,
|
|
415
|
+
productLimit: 4,
|
|
416
|
+
},
|
|
417
|
+
blocks: [],
|
|
418
|
+
},
|
|
419
|
+
],
|
|
420
|
+
},
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Canonical System Pages Template Map
|
|
425
|
+
* Supplies defaults across all platform system page types.
|
|
426
|
+
*/
|
|
427
|
+
export const defaultPages: Record<string, PageDocument> = {
|
|
428
|
+
home: defaultHomePage,
|
|
429
|
+
products: defaultProductsPage,
|
|
430
|
+
'product-list': defaultProductsPage,
|
|
431
|
+
collections: defaultCollectionsPage,
|
|
432
|
+
collection: defaultCollectionsPage,
|
|
433
|
+
'category-list': defaultCollectionsPage,
|
|
434
|
+
product: defaultProductDetailPage,
|
|
435
|
+
'product-detail': defaultProductDetailPage,
|
|
436
|
+
pages: defaultPagesPage,
|
|
437
|
+
page: defaultPagesPage,
|
|
438
|
+
blogs: defaultBlogPage,
|
|
439
|
+
blog: defaultBlogPage,
|
|
440
|
+
password: defaultPasswordPage,
|
|
441
|
+
cart: defaultCartPage,
|
|
442
|
+
};
|
|
443
|
+
|
|
444
|
+
import { pageDocumentToJsonTemplate, type JsonTemplate } from '@caartzee/theme-sdk';
|
|
445
|
+
import { defaultJsonLayout } from './layouts/default';
|
|
446
|
+
import indexTemplate from './templates/index.json';
|
|
447
|
+
import productTemplate from './templates/product.json';
|
|
448
|
+
import collectionTemplate from './templates/collection.json';
|
|
449
|
+
import categoryTemplate from './templates/category.json';
|
|
450
|
+
import pageTemplate from './templates/page.json';
|
|
451
|
+
import searchTemplate from './templates/search.json';
|
|
452
|
+
import cartTemplate from './templates/cart.json';
|
|
453
|
+
import checkoutTemplate from './templates/checkout.json';
|
|
454
|
+
import orderSuccessTemplate from './templates/order-success.json';
|
|
455
|
+
import trackOrderTemplate from './templates/track-order.json';
|
|
456
|
+
import loginTemplate from './templates/login.json';
|
|
457
|
+
import signupTemplate from './templates/signup.json';
|
|
458
|
+
import accountTemplate from './templates/account.json';
|
|
459
|
+
import wishlistTemplate from './templates/wishlist.json';
|
|
460
|
+
import notFoundTemplate from './templates/404.json';
|
|
461
|
+
|
|
462
|
+
export const starterJsonTemplates: Record<string, JsonTemplate> = {
|
|
463
|
+
index: indexTemplate as unknown as JsonTemplate,
|
|
464
|
+
home: indexTemplate as unknown as JsonTemplate,
|
|
465
|
+
product: productTemplate as unknown as JsonTemplate,
|
|
466
|
+
'product-detail': productTemplate as unknown as JsonTemplate,
|
|
467
|
+
'product-list': searchTemplate as unknown as JsonTemplate,
|
|
468
|
+
products: searchTemplate as unknown as JsonTemplate,
|
|
469
|
+
collection: collectionTemplate as unknown as JsonTemplate,
|
|
470
|
+
collections: collectionTemplate as unknown as JsonTemplate,
|
|
471
|
+
category: categoryTemplate as unknown as JsonTemplate,
|
|
472
|
+
categories: categoryTemplate as unknown as JsonTemplate,
|
|
473
|
+
page: pageTemplate as unknown as JsonTemplate,
|
|
474
|
+
pages: pageTemplate as unknown as JsonTemplate,
|
|
475
|
+
search: searchTemplate as unknown as JsonTemplate,
|
|
476
|
+
cart: cartTemplate as unknown as JsonTemplate,
|
|
477
|
+
checkout: checkoutTemplate as unknown as JsonTemplate,
|
|
478
|
+
'order-success': orderSuccessTemplate as unknown as JsonTemplate,
|
|
479
|
+
'track-order': trackOrderTemplate as unknown as JsonTemplate,
|
|
480
|
+
login: loginTemplate as unknown as JsonTemplate,
|
|
481
|
+
signup: signupTemplate as unknown as JsonTemplate,
|
|
482
|
+
account: accountTemplate as unknown as JsonTemplate,
|
|
483
|
+
wishlist: wishlistTemplate as unknown as JsonTemplate,
|
|
484
|
+
'404': notFoundTemplate as unknown as JsonTemplate,
|
|
485
|
+
'not-found': notFoundTemplate as unknown as JsonTemplate,
|
|
486
|
+
blog: pageDocumentToJsonTemplate(defaultBlogPage, { name: 'Blog' }),
|
|
487
|
+
password: pageDocumentToJsonTemplate(defaultPasswordPage, { name: 'Opening Soon' }),
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
export {
|
|
491
|
+
defaultJsonLayout,
|
|
492
|
+
indexTemplate,
|
|
493
|
+
productTemplate,
|
|
494
|
+
collectionTemplate,
|
|
495
|
+
categoryTemplate,
|
|
496
|
+
pageTemplate,
|
|
497
|
+
searchTemplate,
|
|
498
|
+
cartTemplate,
|
|
499
|
+
checkoutTemplate,
|
|
500
|
+
orderSuccessTemplate,
|
|
501
|
+
trackOrderTemplate,
|
|
502
|
+
loginTemplate,
|
|
503
|
+
signupTemplate,
|
|
504
|
+
accountTemplate,
|
|
505
|
+
wishlistTemplate,
|
|
506
|
+
notFoundTemplate,
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ThemeDesignTokens } from '@caartzee/theme-sdk';
|
|
2
|
+
import { storefrontStyles } from './styles';
|
|
3
|
+
|
|
4
|
+
/** Defaults for new stores; tenant settings and inline editor styles remain editable. */
|
|
5
|
+
export const defaultTokens: ThemeDesignTokens = {
|
|
6
|
+
colors: {
|
|
7
|
+
primary: '#c99335',
|
|
8
|
+
secondary: '#7e192b',
|
|
9
|
+
background: '#fbf7f2',
|
|
10
|
+
surface: '#ffffff',
|
|
11
|
+
text: '#1c1613',
|
|
12
|
+
muted: '#73655b',
|
|
13
|
+
border: '#eae0d5',
|
|
14
|
+
accent: '#e5b95c',
|
|
15
|
+
},
|
|
16
|
+
typography: {
|
|
17
|
+
headingFont: "'Playfair Display', Georgia, serif",
|
|
18
|
+
bodyFont: "'Plus Jakarta Sans', 'Inter', sans-serif",
|
|
19
|
+
},
|
|
20
|
+
borderRadius: { sm: '8px', md: '12px', lg: '16px' },
|
|
21
|
+
customCss: storefrontStyles,
|
|
22
|
+
};
|
|
@@ -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`.
|