@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.
- package/README.md +222 -2
- package/dist/bin/caartzee-theme.js +9223 -0
- package/dist/lib/index.js +11614 -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/candy-mcp.d.ts +2 -0
- package/dist/types/src/cli/candy-tool-server.d.ts +39 -0
- package/dist/types/src/cli/index.d.ts +1 -0
- package/dist/types/src/cli/mcp/component-tools.d.ts +2 -0
- package/dist/types/src/cli/mcp/docs-tools.d.ts +89 -0
- package/dist/types/src/cli/mcp/editor-tools.d.ts +22 -0
- package/dist/types/src/cli/mcp/resources-and-prompts.d.ts +2 -0
- package/dist/types/src/cli/mcp/testing-tools.d.ts +54 -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 +25 -0
- package/dist/types/src/dev-server/index.d.ts +1 -0
- package/dist/types/src/dev-server/local-commerce-runtime.d.ts +76 -0
- package/dist/types/src/dev-server/local-editor-server.d.ts +22 -0
- package/dist/types/src/dev-server/theme-preview.d.ts +8 -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 +29 -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/theme-candy-boilerplate/.editorconfig +14 -0
- package/templates/theme-candy-boilerplate/.gitattributes +1 -0
- package/templates/theme-candy-boilerplate/.vscode/extensions.json +7 -0
- package/templates/theme-candy-boilerplate/.vscode/settings.json +17 -0
- package/templates/theme-candy-boilerplate/assets/theme.css +78 -0
- package/templates/theme-candy-boilerplate/assets/theme.js +7 -0
- package/templates/theme-candy-boilerplate/candy.config.json +40 -0
- package/templates/theme-candy-boilerplate/index.ts +39 -0
- package/templates/theme-candy-boilerplate/layout/theme.candy +25 -0
- package/templates/theme-candy-boilerplate/locales/en.default.json +37 -0
- package/templates/theme-candy-boilerplate/manifest.json +123 -0
- package/templates/theme-candy-boilerplate/package.json +16 -0
- package/templates/theme-candy-boilerplate/schemas/settings_schema.json +36 -0
- package/templates/theme-candy-boilerplate/sections/featured-products.candy +89 -0
- package/templates/theme-candy-boilerplate/sections/footer.candy +50 -0
- package/templates/theme-candy-boilerplate/sections/header.candy +116 -0
- package/templates/theme-candy-boilerplate/sections/hero-banner.candy +135 -0
- package/templates/theme-candy-boilerplate/sections/image-with-text.candy +85 -0
- package/templates/theme-candy-boilerplate/snippets/price.candy +19 -0
- package/templates/theme-candy-boilerplate/snippets/product-card.candy +43 -0
- package/templates/theme-candy-boilerplate/templates/404.candy +12 -0
- package/templates/theme-candy-boilerplate/templates/cart.candy +51 -0
- package/templates/theme-candy-boilerplate/templates/collection.candy +51 -0
- package/templates/theme-candy-boilerplate/templates/index.candy +7 -0
- package/templates/theme-candy-boilerplate/templates/page.candy +10 -0
- package/templates/theme-candy-boilerplate/templates/product.candy +59 -0
- package/templates/theme-candy-boilerplate/templates/search.candy +40 -0
- package/templates/vscode-candy/LICENSE +21 -0
- package/templates/vscode-candy/README.md +22 -0
- package/templates/vscode-candy/extension.js +689 -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 +118 -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 +270 -0
- package/templates/vscode-candy/syntaxes/candy.tmLanguage.json +296 -0
- package/templates/vscode-candy/vim/ftdetect/candy.vim +5 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import type { BlockManifest } from '@caartzee/theme-sdk';
|
|
2
|
+
|
|
3
|
+
export const headingBlock: BlockManifest = {
|
|
4
|
+
type: 'heading',
|
|
5
|
+
label: 'Heading',
|
|
6
|
+
settings: [
|
|
7
|
+
{ id: 'text', type: 'text', label: 'Heading Text', default: 'Section Heading' },
|
|
8
|
+
{
|
|
9
|
+
id: 'level',
|
|
10
|
+
type: 'select',
|
|
11
|
+
label: 'HTML Tag Level',
|
|
12
|
+
default: 'h2',
|
|
13
|
+
options: [
|
|
14
|
+
{ label: 'H1', value: 'h1' },
|
|
15
|
+
{ label: 'H2', value: 'h2' },
|
|
16
|
+
{ label: 'H3', value: 'h3' },
|
|
17
|
+
{ label: 'H4', value: 'h4' },
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: 'alignment',
|
|
22
|
+
type: 'select',
|
|
23
|
+
label: 'Alignment',
|
|
24
|
+
default: 'left',
|
|
25
|
+
options: [
|
|
26
|
+
{ label: 'Left', value: 'left' },
|
|
27
|
+
{ label: 'Center', value: 'center' },
|
|
28
|
+
{ label: 'Right', value: 'right' },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const textBlock: BlockManifest = {
|
|
35
|
+
type: 'text',
|
|
36
|
+
label: 'Text Paragraph',
|
|
37
|
+
settings: [
|
|
38
|
+
{ id: 'content', type: 'textarea', label: 'Paragraph Content', default: 'Add your text here...' },
|
|
39
|
+
{
|
|
40
|
+
id: 'fontSize',
|
|
41
|
+
type: 'select',
|
|
42
|
+
label: 'Font Size',
|
|
43
|
+
default: 'base',
|
|
44
|
+
options: [
|
|
45
|
+
{ label: 'Small', value: 'sm' },
|
|
46
|
+
{ label: 'Regular', value: 'base' },
|
|
47
|
+
{ label: 'Large', value: 'lg' },
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const imageBlock: BlockManifest = {
|
|
54
|
+
type: 'image',
|
|
55
|
+
label: 'Image',
|
|
56
|
+
settings: [
|
|
57
|
+
{ id: 'imageUrl', type: 'image', label: 'Image Asset' },
|
|
58
|
+
{ id: 'altText', type: 'text', label: 'Alternative Text', default: 'Image' },
|
|
59
|
+
{ id: 'linkUrl', type: 'url', label: 'Target Link' },
|
|
60
|
+
],
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const buttonBlock: BlockManifest = {
|
|
64
|
+
type: 'button',
|
|
65
|
+
label: 'Button / CTA',
|
|
66
|
+
settings: [
|
|
67
|
+
{ id: 'label', type: 'text', label: 'Button Label', default: 'Explore Now' },
|
|
68
|
+
{ id: 'url', type: 'url', label: 'Target Link', default: '/products' },
|
|
69
|
+
{
|
|
70
|
+
id: 'style',
|
|
71
|
+
type: 'select',
|
|
72
|
+
label: 'Button Style',
|
|
73
|
+
default: 'primary',
|
|
74
|
+
options: [
|
|
75
|
+
{ label: 'Primary (Dark)', value: 'primary' },
|
|
76
|
+
{ label: 'Secondary (Light)', value: 'secondary' },
|
|
77
|
+
{ label: 'Outline', value: 'outline' },
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export const slideBlock: BlockManifest = {
|
|
84
|
+
type: 'slide',
|
|
85
|
+
label: 'Slide',
|
|
86
|
+
max: 6,
|
|
87
|
+
settings: [
|
|
88
|
+
{ id: 'heading', type: 'text', label: 'Slide Title', required: true, default: 'Autumn Collection 2026' },
|
|
89
|
+
{ id: 'subheading', type: 'text', label: 'Subtitle', default: 'Discover the latest seasonal trends' },
|
|
90
|
+
{ id: 'buttonText', type: 'text', label: 'Button Label', default: 'Shop Now' },
|
|
91
|
+
{ id: 'buttonLink', type: 'url', label: 'Button URL', default: '/collection/autumn' },
|
|
92
|
+
{ id: 'imageUrl', type: 'image', label: 'Background Image' },
|
|
93
|
+
],
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export const navItemBlock: BlockManifest = {
|
|
97
|
+
type: 'nav-item',
|
|
98
|
+
label: 'Navigation Link',
|
|
99
|
+
max: 16,
|
|
100
|
+
settings: [
|
|
101
|
+
{ id: 'label', type: 'text', label: 'Link Title', default: 'Shop' },
|
|
102
|
+
{ id: 'url', type: 'url', label: 'Target URL', default: '/products' },
|
|
103
|
+
{ id: 'highlight', type: 'boolean', label: 'Highlight Link', default: false },
|
|
104
|
+
],
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export const cardItemBlock: BlockManifest = {
|
|
108
|
+
type: 'card-item',
|
|
109
|
+
label: 'Card Item',
|
|
110
|
+
max: 4,
|
|
111
|
+
settings: [
|
|
112
|
+
{ id: 'title', type: 'text', label: 'Banner Headline', required: true, default: 'Promotion' },
|
|
113
|
+
{ id: 'subtitle', type: 'text', label: 'Offer Text', default: 'Special Offer' },
|
|
114
|
+
{ id: 'linkUrl', type: 'url', label: 'Target Link', default: '/products' },
|
|
115
|
+
{ id: 'imageUrl', type: 'image', label: 'Banner Image' },
|
|
116
|
+
],
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export const productCardBlock: BlockManifest = {
|
|
120
|
+
type: 'product-card',
|
|
121
|
+
label: 'Product Card',
|
|
122
|
+
settings: [
|
|
123
|
+
{ id: 'productId', type: 'product_picker', label: 'Select Product' },
|
|
124
|
+
{ id: 'showPrice', type: 'boolean', label: 'Show Price', default: true },
|
|
125
|
+
{ id: 'showQuickAdd', type: 'boolean', label: 'Show Quick Add Button', default: true },
|
|
126
|
+
],
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export const iconBlock: BlockManifest = {
|
|
130
|
+
type: 'icon',
|
|
131
|
+
label: 'Icon',
|
|
132
|
+
settings: [
|
|
133
|
+
{
|
|
134
|
+
id: 'name',
|
|
135
|
+
type: 'select',
|
|
136
|
+
label: 'Icon Name',
|
|
137
|
+
default: 'star',
|
|
138
|
+
options: [
|
|
139
|
+
{ label: 'Star', value: 'star' },
|
|
140
|
+
{ label: 'Heart', value: 'heart' },
|
|
141
|
+
{ label: 'Shield', value: 'shield' },
|
|
142
|
+
{ label: 'Truck', value: 'truck' },
|
|
143
|
+
{ label: 'Clock', value: 'clock' },
|
|
144
|
+
{ label: 'Arrow Right', value: 'arrow-right' },
|
|
145
|
+
],
|
|
146
|
+
},
|
|
147
|
+
{ id: 'size', type: 'number', label: 'Icon Size (px)', default: 24, min: 12, max: 96 },
|
|
148
|
+
{ id: 'linkUrl', type: 'url', label: 'Target Link' },
|
|
149
|
+
],
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
export const videoBlock: BlockManifest = {
|
|
153
|
+
type: 'video',
|
|
154
|
+
label: 'Video',
|
|
155
|
+
settings: [
|
|
156
|
+
{ id: 'videoUrl', type: 'url', label: 'Video URL' },
|
|
157
|
+
{ id: 'autoplay', type: 'boolean', label: 'Autoplay Video (Muted)', default: false },
|
|
158
|
+
{ id: 'loop', type: 'boolean', label: 'Loop Video', default: false },
|
|
159
|
+
],
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
export const spacerBlock: BlockManifest = {
|
|
163
|
+
type: 'spacer',
|
|
164
|
+
label: 'Spacer / Divider',
|
|
165
|
+
settings: [
|
|
166
|
+
{ id: 'height', type: 'range', label: 'Height (px)', default: 32, min: 8, max: 128, step: 4 },
|
|
167
|
+
{ id: 'showDivider', type: 'boolean', label: 'Show Divider Line', default: false },
|
|
168
|
+
],
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
export const starterBlocks: BlockManifest[] = [
|
|
172
|
+
headingBlock,
|
|
173
|
+
textBlock,
|
|
174
|
+
imageBlock,
|
|
175
|
+
buttonBlock,
|
|
176
|
+
productCardBlock,
|
|
177
|
+
iconBlock,
|
|
178
|
+
videoBlock,
|
|
179
|
+
spacerBlock,
|
|
180
|
+
slideBlock,
|
|
181
|
+
navItemBlock,
|
|
182
|
+
cardItemBlock,
|
|
183
|
+
];
|
|
184
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { resolveSettingDefaults } from '@caartzee/theme-sdk';
|
|
2
|
+
import { starterSettingsSchema } from './settings-schema';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Starter Theme Default Global Settings
|
|
6
|
+
* Resolved deterministically from the global settings schema.
|
|
7
|
+
*/
|
|
8
|
+
export const starterSettingsDefaults: Record<string, unknown> = {
|
|
9
|
+
...resolveSettingDefaults(starterSettingsSchema.categories || []),
|
|
10
|
+
primaryColor: '#c99335',
|
|
11
|
+
accentColor: '#7e192b',
|
|
12
|
+
backgroundColor: '#fbf7f2',
|
|
13
|
+
textColor: '#1c1613',
|
|
14
|
+
headingFont: "'Playfair Display', Georgia, serif",
|
|
15
|
+
bodyFont: "'Plus Jakarta Sans', 'Inter', sans-serif",
|
|
16
|
+
baseFontSize: '16px',
|
|
17
|
+
storeName: 'My Store',
|
|
18
|
+
logoWidth: 140,
|
|
19
|
+
containerWidth: '1280px',
|
|
20
|
+
borderRadius: 12,
|
|
21
|
+
stickyHeader: true,
|
|
22
|
+
showAnnouncement: true,
|
|
23
|
+
announcementText: 'Free Shipping on Orders Over ₹799 | Easy Returns | 100% Secure Payment',
|
|
24
|
+
copyrightText: '© 2026 My Store. All Rights Reserved.',
|
|
25
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { GlobalThemeSettings } from '@caartzee/theme-sdk';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Global Theme Settings Schema
|
|
5
|
+
*
|
|
6
|
+
* Declares merchant-customizable settings organized into logical categories.
|
|
7
|
+
* Follows Shopify's settings_schema.json design principle.
|
|
8
|
+
*/
|
|
9
|
+
export const starterSettingsSchema: GlobalThemeSettings = {
|
|
10
|
+
categories: [
|
|
11
|
+
{
|
|
12
|
+
name: 'colors',
|
|
13
|
+
label: 'Colors & Branding',
|
|
14
|
+
description: 'Brand color palette applied globally across all storefront templates',
|
|
15
|
+
settings: [
|
|
16
|
+
{ id: 'primaryColor', type: 'color', label: 'Primary Brand Color', default: '#c99335' },
|
|
17
|
+
{ id: 'accentColor', type: 'color', label: 'Accent / Highlight Color', default: '#7e192b' },
|
|
18
|
+
{ id: 'backgroundColor', type: 'color', label: 'Page Background Color', default: '#fbf7f2' },
|
|
19
|
+
{ id: 'textColor', type: 'color', label: 'Body Text Color', default: '#1c1613' },
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'typography',
|
|
24
|
+
label: 'Typography',
|
|
25
|
+
description: 'Font families and scale options',
|
|
26
|
+
settings: [
|
|
27
|
+
{
|
|
28
|
+
id: 'headingFont',
|
|
29
|
+
type: 'font',
|
|
30
|
+
label: 'Heading Font Family',
|
|
31
|
+
default: "'Playfair Display', Georgia, serif",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: 'bodyFont',
|
|
35
|
+
type: 'font',
|
|
36
|
+
label: 'Body Font Family',
|
|
37
|
+
default: "'Plus Jakarta Sans', 'Inter', sans-serif",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: 'baseFontSize',
|
|
41
|
+
type: 'select',
|
|
42
|
+
label: 'Base Font Size',
|
|
43
|
+
default: '16px',
|
|
44
|
+
options: [
|
|
45
|
+
{ label: '14px - Compact', value: '14px' },
|
|
46
|
+
{ label: '16px - Standard', value: '16px' },
|
|
47
|
+
{ label: '18px - Large', value: '18px' },
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'branding',
|
|
54
|
+
label: 'Store Identity',
|
|
55
|
+
description: 'Logo, store name, and favicon assets',
|
|
56
|
+
settings: [
|
|
57
|
+
{ id: 'storeName', type: 'text', label: 'Store Display Name', default: 'My Store' },
|
|
58
|
+
{ id: 'logoUrl', type: 'image', label: 'Logo Image' },
|
|
59
|
+
{ id: 'logoWidth', type: 'number', label: 'Logo Max Width (px)', default: 140, min: 40, max: 350 },
|
|
60
|
+
{ id: 'faviconUrl', type: 'image', label: 'Favicon Image' },
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'layout',
|
|
65
|
+
label: 'Layout & Spacing',
|
|
66
|
+
description: 'Container widths and border curvature',
|
|
67
|
+
settings: [
|
|
68
|
+
{
|
|
69
|
+
id: 'containerWidth',
|
|
70
|
+
type: 'select',
|
|
71
|
+
label: 'Container Max Width',
|
|
72
|
+
default: '1280px',
|
|
73
|
+
options: [
|
|
74
|
+
{ label: 'Standard (1280px)', value: '1280px' },
|
|
75
|
+
{ label: 'Wide (1440px)', value: '1440px' },
|
|
76
|
+
{ label: 'Full Width', value: '100%' },
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: 'borderRadius',
|
|
81
|
+
type: 'range',
|
|
82
|
+
label: 'Corner Border Radius (px)',
|
|
83
|
+
default: 12,
|
|
84
|
+
min: 0,
|
|
85
|
+
max: 24,
|
|
86
|
+
step: 2,
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'header_footer',
|
|
92
|
+
label: 'Header & Footer',
|
|
93
|
+
description: 'Persistent navigation and colophon controls',
|
|
94
|
+
settings: [
|
|
95
|
+
{ id: 'stickyHeader', type: 'boolean', label: 'Sticky Header on Scroll', default: true },
|
|
96
|
+
{ id: 'showAnnouncement', type: 'boolean', label: 'Show Announcement Bar', default: true },
|
|
97
|
+
{ id: 'announcementText', type: 'text', label: 'Announcement Bar Text', default: 'Free Shipping on Orders Over ₹799 | Easy Returns | 100% Secure Payment' },
|
|
98
|
+
{ id: 'copyrightText', type: 'text', label: 'Footer Copyright Notice', default: '© 2026 My Store. All Rights Reserved.' },
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { StorefrontThemeDefinition, StorefrontPageContext } from '@caartzee/theme-sdk';
|
|
2
|
+
import { starterManifest } from './manifest';
|
|
3
|
+
import { defaultTokens } from './tokens';
|
|
4
|
+
import {
|
|
5
|
+
defaultLayout,
|
|
6
|
+
defaultHomePage,
|
|
7
|
+
defaultProductsPage,
|
|
8
|
+
defaultCollectionsPage,
|
|
9
|
+
defaultProductDetailPage,
|
|
10
|
+
defaultPagesPage,
|
|
11
|
+
defaultBlogPage,
|
|
12
|
+
defaultPasswordPage,
|
|
13
|
+
defaultCartPage,
|
|
14
|
+
defaultPages,
|
|
15
|
+
starterJsonTemplates,
|
|
16
|
+
defaultJsonLayout,
|
|
17
|
+
} from './templates';
|
|
18
|
+
import { starterSections } from './sections';
|
|
19
|
+
import { dispatchBoilerplatePage } from './pages';
|
|
20
|
+
import { starterBlocks } from './blocks';
|
|
21
|
+
import { starterSettingsSchema } from './config/settings-schema';
|
|
22
|
+
import { starterSettingsDefaults } from './config/settings-defaults';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Starter Theme Definition
|
|
26
|
+
*
|
|
27
|
+
* Production-ready developer template conforming strictly
|
|
28
|
+
* to the Caartzee Theme SDK (`@caartzee/theme-sdk`).
|
|
29
|
+
*/
|
|
30
|
+
export const starterTheme: StorefrontThemeDefinition = {
|
|
31
|
+
slug: 'starter-theme',
|
|
32
|
+
name: 'Starter Theme',
|
|
33
|
+
version: '1.0.0',
|
|
34
|
+
manifest: starterManifest,
|
|
35
|
+
tokens: defaultTokens,
|
|
36
|
+
defaultTemplates: {
|
|
37
|
+
layout: defaultLayout,
|
|
38
|
+
pages: defaultPages,
|
|
39
|
+
},
|
|
40
|
+
jsonTemplates: starterJsonTemplates,
|
|
41
|
+
layouts: {
|
|
42
|
+
default: defaultJsonLayout,
|
|
43
|
+
},
|
|
44
|
+
sections: starterSections,
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Complete E-Commerce Page Interceptor (Level 3 Customization)
|
|
48
|
+
*
|
|
49
|
+
* Dispatches to bespoke theme implementations for:
|
|
50
|
+
* login, signup, account, cart, checkout, order-success, track-order,
|
|
51
|
+
* wishlist, product-detail, product-list, category-list, and search.
|
|
52
|
+
*/
|
|
53
|
+
renderPage(context: StorefrontPageContext): string {
|
|
54
|
+
return dispatchBoilerplatePage(context);
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export {
|
|
59
|
+
starterManifest,
|
|
60
|
+
defaultTokens,
|
|
61
|
+
defaultLayout,
|
|
62
|
+
defaultHomePage,
|
|
63
|
+
defaultProductsPage,
|
|
64
|
+
defaultCollectionsPage,
|
|
65
|
+
defaultProductDetailPage,
|
|
66
|
+
defaultPagesPage,
|
|
67
|
+
defaultBlogPage,
|
|
68
|
+
defaultPasswordPage,
|
|
69
|
+
defaultCartPage,
|
|
70
|
+
defaultPages,
|
|
71
|
+
starterJsonTemplates,
|
|
72
|
+
defaultJsonLayout,
|
|
73
|
+
starterBlocks,
|
|
74
|
+
starterSettingsSchema,
|
|
75
|
+
starterSettingsDefaults,
|
|
76
|
+
starterSections,
|
|
77
|
+
dispatchBoilerplatePage,
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export * from './pages';
|
|
81
|
+
export * from './sections';
|
|
82
|
+
export * from './blocks';
|
|
83
|
+
export * from './styles';
|
|
84
|
+
export * from './snippets/product-price';
|
|
85
|
+
export * from './snippets/product-card';
|
|
86
|
+
export * from './snippets/responsive-image';
|
|
87
|
+
export * from './config/settings-schema';
|
|
88
|
+
export * from './config/settings-defaults';
|
|
89
|
+
export * from './layouts/default';
|
|
90
|
+
export default starterTheme;
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import type { LayoutDocument, JsonLayoutTemplate, GlobalFooterConfig } from '@caartzee/theme-sdk';
|
|
2
|
+
|
|
3
|
+
export const starterDefaultFooterConfig: GlobalFooterConfig = {
|
|
4
|
+
schemaVersion: 1,
|
|
5
|
+
enabled: true,
|
|
6
|
+
styling: {
|
|
7
|
+
backgroundColor: '#0e0c0b',
|
|
8
|
+
headingColor: '#ffffff',
|
|
9
|
+
textColor: '#a8a29e',
|
|
10
|
+
linkColor: '#d6d3d1',
|
|
11
|
+
linkHoverColor: '#e5b95c',
|
|
12
|
+
fontFamily: 'inherit',
|
|
13
|
+
paddingTop: 56,
|
|
14
|
+
paddingBottom: 36,
|
|
15
|
+
borderTopWidth: 1,
|
|
16
|
+
borderTopColor: '#1f1a17',
|
|
17
|
+
dividerColor: 'rgba(255,255,255,0.1)',
|
|
18
|
+
},
|
|
19
|
+
responsive: {
|
|
20
|
+
stackOnMobile: true,
|
|
21
|
+
hideOnMobile: false,
|
|
22
|
+
hideOnTablet: false,
|
|
23
|
+
hideOnDesktop: false,
|
|
24
|
+
},
|
|
25
|
+
rows: [
|
|
26
|
+
{
|
|
27
|
+
id: 'row_main',
|
|
28
|
+
columns: [
|
|
29
|
+
{
|
|
30
|
+
id: 'col_brand',
|
|
31
|
+
width: '3',
|
|
32
|
+
components: [
|
|
33
|
+
{
|
|
34
|
+
id: 'comp_brand_logo',
|
|
35
|
+
type: 'logo',
|
|
36
|
+
settings: {
|
|
37
|
+
brandName: 'My Store',
|
|
38
|
+
showBrandIcon: true,
|
|
39
|
+
description:
|
|
40
|
+
'Your premier destination for high quality toys, apparel and lifestyle products for kids and families.',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 'comp_social_links',
|
|
45
|
+
type: 'social',
|
|
46
|
+
settings: {
|
|
47
|
+
facebookUrl: '#facebook',
|
|
48
|
+
instagramUrl: '#instagram',
|
|
49
|
+
youtubeUrl: '#youtube',
|
|
50
|
+
twitterUrl: '#twitter',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 'col_quick_links',
|
|
57
|
+
width: '2',
|
|
58
|
+
components: [
|
|
59
|
+
{
|
|
60
|
+
id: 'comp_quick_links',
|
|
61
|
+
type: 'menu',
|
|
62
|
+
settings: {
|
|
63
|
+
title: 'Quick Links',
|
|
64
|
+
heading: 'Quick Links',
|
|
65
|
+
items: [
|
|
66
|
+
{ id: 'ql1', label: 'Home', url: '/' },
|
|
67
|
+
{ id: 'ql2', label: 'All Products', url: '/products' },
|
|
68
|
+
{ id: 'ql3', label: 'Categories', url: '/categories' },
|
|
69
|
+
{ id: 'ql4', label: 'New Arrivals', url: '/products?sort_by=new' },
|
|
70
|
+
{ id: 'ql5', label: 'Deals', url: '/offers' },
|
|
71
|
+
{ id: 'ql6', label: 'About Us', url: '/pages/about' },
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: 'col_customer_care',
|
|
79
|
+
width: '2',
|
|
80
|
+
components: [
|
|
81
|
+
{
|
|
82
|
+
id: 'comp_customer_care',
|
|
83
|
+
type: 'menu',
|
|
84
|
+
settings: {
|
|
85
|
+
title: 'Customer Care',
|
|
86
|
+
heading: 'Customer Care',
|
|
87
|
+
items: [
|
|
88
|
+
{ id: 'cc1', label: 'Contact Us', url: '/pages/contact' },
|
|
89
|
+
{ id: 'cc2', label: 'Track Order', url: '/track-order' },
|
|
90
|
+
{ id: 'cc3', label: 'Returns & Refunds', url: '/pages/returns' },
|
|
91
|
+
{ id: 'cc4', label: 'FAQ', url: '/pages/faq' },
|
|
92
|
+
{ id: 'cc5', label: 'Help & Support', url: '/pages/contact' },
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: 'col_contact_info',
|
|
100
|
+
width: '3',
|
|
101
|
+
components: [
|
|
102
|
+
{
|
|
103
|
+
id: 'comp_contact_info',
|
|
104
|
+
type: 'contact',
|
|
105
|
+
settings: {
|
|
106
|
+
title: 'Get in Touch',
|
|
107
|
+
heading: 'Get in Touch',
|
|
108
|
+
address: '100 Market Street, Suite 400, San Francisco, CA',
|
|
109
|
+
email: 'support@example.com',
|
|
110
|
+
phone: '+1 (555) 234-5678',
|
|
111
|
+
businessHours: 'Mon - Fri: 9am - 6pm EST',
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: 'col_payments',
|
|
118
|
+
width: '2',
|
|
119
|
+
components: [
|
|
120
|
+
{
|
|
121
|
+
id: 'comp_payments',
|
|
122
|
+
type: 'payment-methods',
|
|
123
|
+
settings: {
|
|
124
|
+
heading: 'Secure Payments',
|
|
125
|
+
methods: ['VISA', 'Mastercard', 'UPI', 'Paytm'],
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
bottomBar: {
|
|
134
|
+
enabled: true,
|
|
135
|
+
copyrightText: '© 2026 My Store. All Rights Reserved.',
|
|
136
|
+
showSocialLinks: false,
|
|
137
|
+
showPaymentIcons: false,
|
|
138
|
+
backgroundColor: '#090706',
|
|
139
|
+
textColor: '#78716c',
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
const defaultHeaderNavBlocks = {
|
|
144
|
+
nav_home: { type: 'nav-item', settings: { label: 'Home', url: '/' } },
|
|
145
|
+
nav_products: { type: 'nav-item', settings: { label: 'All Products', url: '/products' } },
|
|
146
|
+
nav_categories: { type: 'nav-item', settings: { label: 'Categories', url: '/categories' } },
|
|
147
|
+
nav_new: { type: 'nav-item', settings: { label: 'New Arrivals', url: '/products?sort_by=new' } },
|
|
148
|
+
nav_deals: { type: 'nav-item', settings: { label: 'Deals', url: '/offers' } },
|
|
149
|
+
nav_about: { type: 'nav-item', settings: { label: 'About Us', url: '/pages/about' } },
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const defaultHeaderSettings = {
|
|
153
|
+
logoText: 'My Store',
|
|
154
|
+
logoWidth: 140,
|
|
155
|
+
showMonogram: true,
|
|
156
|
+
showAnnouncement: true,
|
|
157
|
+
announcementText: 'Free Shipping on Orders Over ₹799 | Easy Returns | 100% Secure Payment',
|
|
158
|
+
announcementLink: '/products',
|
|
159
|
+
utilityLinks: [
|
|
160
|
+
{ label: 'Track Order', url: '/track-order' },
|
|
161
|
+
{ label: 'Help & Support', url: '/pages/contact' },
|
|
162
|
+
],
|
|
163
|
+
cartCount: 0,
|
|
164
|
+
menuId: null,
|
|
165
|
+
menuAlignment: 'left',
|
|
166
|
+
topLevelSize: '14px',
|
|
167
|
+
case: 'default',
|
|
168
|
+
sticky: true,
|
|
169
|
+
showSearch: true,
|
|
170
|
+
showSearchBar: true,
|
|
171
|
+
showWishlist: true,
|
|
172
|
+
showAccount: true,
|
|
173
|
+
showCart: true,
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Shopify-style JSON Layout Definition
|
|
178
|
+
* Defines shared layout regions (header, footer) and allowed sections.
|
|
179
|
+
*/
|
|
180
|
+
export const defaultJsonLayout: JsonLayoutTemplate = {
|
|
181
|
+
schemaVersion: 1,
|
|
182
|
+
name: 'Default Storefront Layout',
|
|
183
|
+
regions: {
|
|
184
|
+
header: {
|
|
185
|
+
sections: {
|
|
186
|
+
header_main: {
|
|
187
|
+
type: 'starter-header',
|
|
188
|
+
settings: defaultHeaderSettings,
|
|
189
|
+
blocks: defaultHeaderNavBlocks,
|
|
190
|
+
block_order: ['nav_home', 'nav_products', 'nav_categories', 'nav_new', 'nav_deals', 'nav_about'],
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
order: ['header_main'],
|
|
194
|
+
},
|
|
195
|
+
footer: {
|
|
196
|
+
sections: {
|
|
197
|
+
footer_builder: {
|
|
198
|
+
type: 'footer-builder',
|
|
199
|
+
settings: {
|
|
200
|
+
enabled: true,
|
|
201
|
+
backgroundColor: '#0e0c0b',
|
|
202
|
+
textColor: '#a8a29e',
|
|
203
|
+
headingColor: '#ffffff',
|
|
204
|
+
linkColor: '#d6d3d1',
|
|
205
|
+
linkHoverColor: '#e5b95c',
|
|
206
|
+
paddingTop: 56,
|
|
207
|
+
paddingBottom: 36,
|
|
208
|
+
borderTopWidth: 1,
|
|
209
|
+
borderTopColor: '#1f1a17',
|
|
210
|
+
dividerColor: 'rgba(255,255,255,0.1)',
|
|
211
|
+
stackOnMobile: true,
|
|
212
|
+
legalLinks: [
|
|
213
|
+
{ label: 'Privacy Policy', url: '/privacy-policy' },
|
|
214
|
+
{ label: 'Terms & Conditions', url: '/terms-and-conditions' },
|
|
215
|
+
],
|
|
216
|
+
footerConfig: JSON.stringify(starterDefaultFooterConfig),
|
|
217
|
+
},
|
|
218
|
+
blocks: {},
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
order: ['footer_builder'],
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Standard legacy LayoutDocument representation for backward compatibility.
|
|
228
|
+
*/
|
|
229
|
+
export const defaultLayout: LayoutDocument = {
|
|
230
|
+
regions: {
|
|
231
|
+
header: [
|
|
232
|
+
{
|
|
233
|
+
id: 'starter-hdr-main',
|
|
234
|
+
type: 'starter-header',
|
|
235
|
+
settings: {
|
|
236
|
+
...defaultHeaderSettings,
|
|
237
|
+
menu: 'primary-menu',
|
|
238
|
+
},
|
|
239
|
+
blocks: [
|
|
240
|
+
{ id: 'link-1', type: 'nav-item', settings: { label: 'Home', url: '/' } },
|
|
241
|
+
{ id: 'link-2', type: 'nav-item', settings: { label: 'All Products', url: '/products' } },
|
|
242
|
+
{ id: 'link-3', type: 'nav-item', settings: { label: 'Categories', url: '/categories' } },
|
|
243
|
+
{ id: 'link-4', type: 'nav-item', settings: { label: 'New Arrivals', url: '/products?sort_by=new' } },
|
|
244
|
+
{ id: 'link-5', type: 'nav-item', settings: { label: 'Deals', url: '/offers' } },
|
|
245
|
+
{ id: 'link-6', type: 'nav-item', settings: { label: 'About Us', url: '/pages/about' } },
|
|
246
|
+
],
|
|
247
|
+
},
|
|
248
|
+
],
|
|
249
|
+
footer: [
|
|
250
|
+
{
|
|
251
|
+
id: 'starter-ftr-builder',
|
|
252
|
+
type: 'footer-builder',
|
|
253
|
+
settings: {
|
|
254
|
+
enabled: true,
|
|
255
|
+
backgroundColor: '#0e0c0b',
|
|
256
|
+
textColor: '#a8a29e',
|
|
257
|
+
headingColor: '#ffffff',
|
|
258
|
+
linkColor: '#d6d3d1',
|
|
259
|
+
linkHoverColor: '#e5b95c',
|
|
260
|
+
paddingTop: 56,
|
|
261
|
+
paddingBottom: 36,
|
|
262
|
+
borderTopWidth: 1,
|
|
263
|
+
borderTopColor: '#1f1a17',
|
|
264
|
+
dividerColor: 'rgba(255,255,255,0.1)',
|
|
265
|
+
stackOnMobile: true,
|
|
266
|
+
legalLinks: [
|
|
267
|
+
{ label: 'Privacy Policy', url: '/privacy-policy' },
|
|
268
|
+
{ label: 'Terms & Conditions', url: '/terms-and-conditions' },
|
|
269
|
+
],
|
|
270
|
+
footerConfig: JSON.stringify(starterDefaultFooterConfig),
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
],
|
|
274
|
+
},
|
|
275
|
+
};
|