@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,185 @@
|
|
|
1
|
+
import type { SectionManifest, SettingField, ThemeDesignTokens, ThemeManifest } from '../contracts/manifest';
|
|
2
|
+
import type { LayoutDocument, PageDocument } from '../contracts/page';
|
|
3
|
+
export declare const CANDY_LANGUAGE_VERSION = "1.0.0";
|
|
4
|
+
export type CompatibilityClassification = 'core' | 'shopify_compat' | 'candy_extension' | 'shopify_platform_unsupported';
|
|
5
|
+
export type ConformanceStatus = 'implemented_and_tested' | 'implemented_with_caartzee_semantics' | 'implemented_with_differences' | 'unsupported_platform_specific' | 'deferred';
|
|
6
|
+
export interface CompatibilityMatrixEntry {
|
|
7
|
+
name: string;
|
|
8
|
+
category: 'core_language' | 'tag' | 'filter' | 'object' | 'architecture' | 'caartzee_extension';
|
|
9
|
+
classification: CompatibilityClassification;
|
|
10
|
+
status: ConformanceStatus;
|
|
11
|
+
description: string;
|
|
12
|
+
notes?: string | undefined;
|
|
13
|
+
}
|
|
14
|
+
export interface CandyDiagnostic {
|
|
15
|
+
severity: 'error' | 'warning' | 'info';
|
|
16
|
+
code: string;
|
|
17
|
+
message: string;
|
|
18
|
+
file?: string | undefined;
|
|
19
|
+
line?: number | undefined;
|
|
20
|
+
column?: number | undefined;
|
|
21
|
+
}
|
|
22
|
+
export interface CandyEngineOptions {
|
|
23
|
+
rootDir?: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Virtual file system map where keys are relative paths like
|
|
26
|
+
* `layout/theme.candy`, `templates/index.candy`, `sections/hero-banner.candy`, `snippets/product-card.candy`
|
|
27
|
+
*/
|
|
28
|
+
files?: Record<string, string> | undefined;
|
|
29
|
+
locales?: Record<string, Record<string, unknown>> | undefined;
|
|
30
|
+
defaultLocale?: string | undefined;
|
|
31
|
+
assetsBaseUrl?: string | undefined;
|
|
32
|
+
themeSlug?: string | undefined;
|
|
33
|
+
currencySymbol?: string | undefined;
|
|
34
|
+
currencyCode?: string | undefined;
|
|
35
|
+
currencyPosition?: 'left' | 'right' | undefined;
|
|
36
|
+
maxRenderDepth?: number | undefined;
|
|
37
|
+
maxLoopIterations?: number | undefined;
|
|
38
|
+
maxTemplateSizeBytes?: number | undefined;
|
|
39
|
+
maxOutputSizeBytes?: number | undefined;
|
|
40
|
+
parseTimeoutMs?: number | undefined;
|
|
41
|
+
renderTimeoutMs?: number | undefined;
|
|
42
|
+
memoryLimitBytes?: number | undefined;
|
|
43
|
+
strictVariables?: boolean | undefined;
|
|
44
|
+
strictFilters?: boolean | undefined;
|
|
45
|
+
sectionManifests?: Record<string, SectionManifest> | undefined;
|
|
46
|
+
}
|
|
47
|
+
export interface CandyRawSettingField {
|
|
48
|
+
id?: string | undefined;
|
|
49
|
+
type: string;
|
|
50
|
+
label?: string | undefined;
|
|
51
|
+
name?: string | undefined;
|
|
52
|
+
content?: string | undefined;
|
|
53
|
+
info?: string | undefined;
|
|
54
|
+
default?: unknown;
|
|
55
|
+
options?: Array<{
|
|
56
|
+
label: string;
|
|
57
|
+
value: string | number | boolean;
|
|
58
|
+
group?: string;
|
|
59
|
+
}> | undefined;
|
|
60
|
+
min?: number | undefined;
|
|
61
|
+
max?: number | undefined;
|
|
62
|
+
step?: number | undefined;
|
|
63
|
+
unit?: string | undefined;
|
|
64
|
+
required?: boolean | undefined;
|
|
65
|
+
placeholder?: string | undefined;
|
|
66
|
+
}
|
|
67
|
+
export interface CandyRawBlockSchema {
|
|
68
|
+
type: string;
|
|
69
|
+
name?: string | undefined;
|
|
70
|
+
label?: string | undefined;
|
|
71
|
+
limit?: number | undefined;
|
|
72
|
+
max?: number | undefined;
|
|
73
|
+
settings?: CandyRawSettingField[] | undefined;
|
|
74
|
+
}
|
|
75
|
+
export interface CandyRawPresetSchema {
|
|
76
|
+
name: string;
|
|
77
|
+
label?: string | undefined;
|
|
78
|
+
category?: string | undefined;
|
|
79
|
+
isDefault?: boolean | undefined;
|
|
80
|
+
settings?: Record<string, unknown> | undefined;
|
|
81
|
+
blocks?: Array<{
|
|
82
|
+
type: string;
|
|
83
|
+
settings?: Record<string, unknown> | undefined;
|
|
84
|
+
}> | undefined;
|
|
85
|
+
}
|
|
86
|
+
export interface CandyRawSectionSchema {
|
|
87
|
+
type?: string | undefined;
|
|
88
|
+
name?: string | undefined;
|
|
89
|
+
label?: string | undefined;
|
|
90
|
+
tag?: string | undefined;
|
|
91
|
+
class?: string | undefined;
|
|
92
|
+
category?: string | undefined;
|
|
93
|
+
limit?: number | undefined;
|
|
94
|
+
max_blocks?: number | undefined;
|
|
95
|
+
maxBlocks?: number | undefined;
|
|
96
|
+
allowedBlocks?: string[] | undefined;
|
|
97
|
+
allowedRegions?: Array<'header' | 'body' | 'footer'> | undefined;
|
|
98
|
+
enabled_on?: {
|
|
99
|
+
templates?: string[] | undefined;
|
|
100
|
+
groups?: string[] | undefined;
|
|
101
|
+
} | undefined;
|
|
102
|
+
disabled_on?: {
|
|
103
|
+
templates?: string[] | undefined;
|
|
104
|
+
groups?: string[] | undefined;
|
|
105
|
+
} | undefined;
|
|
106
|
+
settings?: CandyRawSettingField[] | undefined;
|
|
107
|
+
blocks?: CandyRawBlockSchema[] | undefined;
|
|
108
|
+
presets?: CandyRawPresetSchema[] | undefined;
|
|
109
|
+
default?: {
|
|
110
|
+
settings?: Record<string, unknown> | undefined;
|
|
111
|
+
blocks?: Array<{
|
|
112
|
+
type: string;
|
|
113
|
+
settings?: Record<string, unknown> | undefined;
|
|
114
|
+
}> | undefined;
|
|
115
|
+
} | undefined;
|
|
116
|
+
[key: string]: unknown;
|
|
117
|
+
}
|
|
118
|
+
export interface ExtractedCandySectionSchema {
|
|
119
|
+
sectionType: string;
|
|
120
|
+
rawSchema: CandyRawSectionSchema | null;
|
|
121
|
+
manifest: SectionManifest;
|
|
122
|
+
templateWithoutSchema: string;
|
|
123
|
+
diagnostics: CandyDiagnostic[];
|
|
124
|
+
schemaStartLine?: number | undefined;
|
|
125
|
+
schemaEndLine?: number | undefined;
|
|
126
|
+
}
|
|
127
|
+
export interface CandyConfig {
|
|
128
|
+
engine: 'candy';
|
|
129
|
+
candyVersion: string;
|
|
130
|
+
slug: string;
|
|
131
|
+
name: string;
|
|
132
|
+
version: string;
|
|
133
|
+
description?: string | undefined;
|
|
134
|
+
author?: string | undefined;
|
|
135
|
+
defaultLayout?: string | undefined;
|
|
136
|
+
directories?: {
|
|
137
|
+
layout?: string | undefined;
|
|
138
|
+
templates?: string | undefined;
|
|
139
|
+
sections?: string | undefined;
|
|
140
|
+
snippets?: string | undefined;
|
|
141
|
+
schemas?: string | undefined;
|
|
142
|
+
assets?: string | undefined;
|
|
143
|
+
locales?: string | undefined;
|
|
144
|
+
} | undefined;
|
|
145
|
+
tokens?: ThemeDesignTokens | undefined;
|
|
146
|
+
settingsSchema?: SettingField[] | undefined;
|
|
147
|
+
}
|
|
148
|
+
export interface CandyThemeBundle {
|
|
149
|
+
formatVersion: '1.0.0';
|
|
150
|
+
engine: 'candy';
|
|
151
|
+
candyVersion: string;
|
|
152
|
+
slug: string;
|
|
153
|
+
name: string;
|
|
154
|
+
version: string;
|
|
155
|
+
manifest: ThemeManifest;
|
|
156
|
+
tokens: ThemeDesignTokens;
|
|
157
|
+
config: CandyConfig;
|
|
158
|
+
/**
|
|
159
|
+
* Relative template path -> `.candy` source content
|
|
160
|
+
*/
|
|
161
|
+
files: Record<string, string>;
|
|
162
|
+
/**
|
|
163
|
+
* Section type -> compiled Caartzee SectionManifest
|
|
164
|
+
*/
|
|
165
|
+
sectionSchemas: Record<string, SectionManifest>;
|
|
166
|
+
/**
|
|
167
|
+
* Asset relative path (e.g., `theme.css`) -> asset content
|
|
168
|
+
*/
|
|
169
|
+
assets: Record<string, string>;
|
|
170
|
+
/**
|
|
171
|
+
* Locale code (e.g., `en.default`) -> locale dictionary
|
|
172
|
+
*/
|
|
173
|
+
locales: Record<string, Record<string, unknown>>;
|
|
174
|
+
defaultTemplates: {
|
|
175
|
+
layout: LayoutDocument;
|
|
176
|
+
pages: Record<string, PageDocument>;
|
|
177
|
+
};
|
|
178
|
+
builtAt: string;
|
|
179
|
+
}
|
|
180
|
+
export interface CandyValidationResult {
|
|
181
|
+
valid: boolean;
|
|
182
|
+
diagnostics: CandyDiagnostic[];
|
|
183
|
+
manifest?: ThemeManifest | undefined;
|
|
184
|
+
sectionSchemas?: Record<string, SectionManifest> | undefined;
|
|
185
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface CliOptions {
|
|
2
|
+
args: string[];
|
|
3
|
+
stdout?: (msg: string) => void;
|
|
4
|
+
stderr?: (msg: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function runCli(rawArgs: string[], io?: {
|
|
7
|
+
stdout?: (msg: string) => void;
|
|
8
|
+
stderr?: (msg: string) => void;
|
|
9
|
+
}): Promise<number>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { type TestingOperations } from './mcp/testing-tools';
|
|
3
|
+
export type StoreRequest = {
|
|
4
|
+
store: string;
|
|
5
|
+
note?: string | undefined;
|
|
6
|
+
scopes?: string[] | undefined;
|
|
7
|
+
};
|
|
8
|
+
export type CatalogRequest = {
|
|
9
|
+
store: string;
|
|
10
|
+
page?: number | undefined;
|
|
11
|
+
category?: string | undefined;
|
|
12
|
+
product?: string | undefined;
|
|
13
|
+
search?: string | undefined;
|
|
14
|
+
sort?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
export interface CandyToolServerOperations extends TestingOperations {
|
|
17
|
+
request(args: StoreRequest): Promise<unknown>;
|
|
18
|
+
list(): Promise<unknown>;
|
|
19
|
+
catalog(args: CatalogRequest): Promise<unknown>;
|
|
20
|
+
storeAccessStatus?: (args: {
|
|
21
|
+
store: string;
|
|
22
|
+
}) => Promise<unknown>;
|
|
23
|
+
storePermissionScopes?: () => Promise<unknown>;
|
|
24
|
+
storeTestCapabilities?: (args: {
|
|
25
|
+
store: string;
|
|
26
|
+
}) => Promise<unknown>;
|
|
27
|
+
storeData?: (args: {
|
|
28
|
+
store: string;
|
|
29
|
+
resource: string;
|
|
30
|
+
page?: number;
|
|
31
|
+
category?: string;
|
|
32
|
+
product?: string;
|
|
33
|
+
search?: string;
|
|
34
|
+
sort?: string;
|
|
35
|
+
}) => Promise<unknown>;
|
|
36
|
+
workspace?: () => Promise<unknown>;
|
|
37
|
+
themeVersions?: () => Promise<unknown>;
|
|
38
|
+
}
|
|
39
|
+
export declare function candyToolServer(operations: CandyToolServerOperations): McpServer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './caartzee-cli';
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
export declare const PLUGIN_HOOK_CATALOG: {
|
|
3
|
+
name: string;
|
|
4
|
+
group: string;
|
|
5
|
+
description: string;
|
|
6
|
+
}[];
|
|
7
|
+
export declare const RUNTIME_HOOKS_REFERENCE: {
|
|
8
|
+
cartAndWishlist: ({
|
|
9
|
+
selector: string;
|
|
10
|
+
dataAttributes: string[];
|
|
11
|
+
endpoint: string;
|
|
12
|
+
notes: string;
|
|
13
|
+
} | {
|
|
14
|
+
selector: string;
|
|
15
|
+
notes: string;
|
|
16
|
+
dataAttributes?: never;
|
|
17
|
+
endpoint?: never;
|
|
18
|
+
} | {
|
|
19
|
+
selector: string;
|
|
20
|
+
dataAttributes: string[];
|
|
21
|
+
endpoint: string;
|
|
22
|
+
notes?: never;
|
|
23
|
+
} | {
|
|
24
|
+
selector: string;
|
|
25
|
+
endpoint: string;
|
|
26
|
+
dataAttributes?: never;
|
|
27
|
+
notes?: never;
|
|
28
|
+
})[];
|
|
29
|
+
authentication: ({
|
|
30
|
+
selector: string;
|
|
31
|
+
method: string;
|
|
32
|
+
fields: string[];
|
|
33
|
+
notes: string;
|
|
34
|
+
} | {
|
|
35
|
+
selector: string;
|
|
36
|
+
method: string;
|
|
37
|
+
fields: string[];
|
|
38
|
+
notes?: never;
|
|
39
|
+
})[];
|
|
40
|
+
themeEditorEvents: ({
|
|
41
|
+
attribute: string;
|
|
42
|
+
description: string;
|
|
43
|
+
pattern?: never;
|
|
44
|
+
} | {
|
|
45
|
+
pattern: string;
|
|
46
|
+
description: string;
|
|
47
|
+
attribute?: never;
|
|
48
|
+
})[];
|
|
49
|
+
};
|
|
50
|
+
export declare const STOREFRONT_ROUTES: {
|
|
51
|
+
route: string;
|
|
52
|
+
pageType: string;
|
|
53
|
+
template: string;
|
|
54
|
+
description: string;
|
|
55
|
+
}[];
|
|
56
|
+
export declare const STOREFRONT_VARIABLES: {
|
|
57
|
+
global: ({
|
|
58
|
+
name: string;
|
|
59
|
+
fields: string[];
|
|
60
|
+
description?: never;
|
|
61
|
+
} | {
|
|
62
|
+
name: string;
|
|
63
|
+
description: string;
|
|
64
|
+
fields?: never;
|
|
65
|
+
})[];
|
|
66
|
+
sectionContext: {
|
|
67
|
+
name: string;
|
|
68
|
+
fields: string[];
|
|
69
|
+
}[];
|
|
70
|
+
commerceObjects: ({
|
|
71
|
+
name: string;
|
|
72
|
+
fields: string[];
|
|
73
|
+
description?: never;
|
|
74
|
+
} | {
|
|
75
|
+
name: string;
|
|
76
|
+
description: string;
|
|
77
|
+
fields?: never;
|
|
78
|
+
})[];
|
|
79
|
+
};
|
|
80
|
+
export declare const COMMON_ERRORS_REFERENCE: {
|
|
81
|
+
code: string;
|
|
82
|
+
cause: string;
|
|
83
|
+
fix: string;
|
|
84
|
+
}[];
|
|
85
|
+
export declare const SDK_COMMANDS_REFERENCE: {
|
|
86
|
+
command: string;
|
|
87
|
+
description: string;
|
|
88
|
+
}[];
|
|
89
|
+
export declare function registerDocsTools(server: McpServer): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
export interface EditorCompatibilityCheck {
|
|
3
|
+
name: string;
|
|
4
|
+
status: 'passed' | 'failed' | 'warning';
|
|
5
|
+
message: string;
|
|
6
|
+
file?: string | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare function validateThemeEditorDirectory(themeDir: string): {
|
|
9
|
+
valid: boolean;
|
|
10
|
+
themeDir: string;
|
|
11
|
+
slug?: string;
|
|
12
|
+
version?: string;
|
|
13
|
+
sectionCount?: number;
|
|
14
|
+
sections?: string[];
|
|
15
|
+
checks: EditorCompatibilityCheck[];
|
|
16
|
+
summary: {
|
|
17
|
+
passed: number;
|
|
18
|
+
failed: number;
|
|
19
|
+
warnings: number;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export declare function registerEditorTools(server: McpServer): void;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
export interface StorefrontTestCheck {
|
|
3
|
+
id: string;
|
|
4
|
+
category: 'validation' | 'editor' | 'commerce' | 'responsive' | 'accessibility' | 'security' | 'plugins';
|
|
5
|
+
status: 'passed' | 'failed' | 'warning' | 'skipped' | 'blocked';
|
|
6
|
+
message: string;
|
|
7
|
+
file?: string | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface ThemeReadinessReport {
|
|
10
|
+
generatedAt: string;
|
|
11
|
+
themeDir: string;
|
|
12
|
+
slug: string;
|
|
13
|
+
version: string;
|
|
14
|
+
packageHash: string;
|
|
15
|
+
sdkVersion: string;
|
|
16
|
+
runtimeVersion: string;
|
|
17
|
+
status: 'passed' | 'failed' | 'partial';
|
|
18
|
+
summary: {
|
|
19
|
+
passed: number;
|
|
20
|
+
failed: number;
|
|
21
|
+
warnings: number;
|
|
22
|
+
skipped: number;
|
|
23
|
+
blocked: number;
|
|
24
|
+
};
|
|
25
|
+
checks: StorefrontTestCheck[];
|
|
26
|
+
}
|
|
27
|
+
export declare function runThemeReadinessAudit(themeDir: string): Promise<ThemeReadinessReport>;
|
|
28
|
+
export interface TestingOperations {
|
|
29
|
+
createTestSession?: (args: {
|
|
30
|
+
store: string;
|
|
31
|
+
themeVersion?: string | undefined;
|
|
32
|
+
ttlMinutes?: number | undefined;
|
|
33
|
+
}) => Promise<unknown>;
|
|
34
|
+
getTestSession?: (args: {
|
|
35
|
+
sessionId: string;
|
|
36
|
+
}) => Promise<unknown>;
|
|
37
|
+
getTestFixtures?: (args: {
|
|
38
|
+
sessionId: string;
|
|
39
|
+
}) => Promise<unknown>;
|
|
40
|
+
resetTestSession?: (args: {
|
|
41
|
+
sessionId: string;
|
|
42
|
+
}) => Promise<unknown>;
|
|
43
|
+
closeTestSession?: (args: {
|
|
44
|
+
sessionId: string;
|
|
45
|
+
}) => Promise<unknown>;
|
|
46
|
+
runTestAction?: (args: {
|
|
47
|
+
sessionId: string;
|
|
48
|
+
action: string;
|
|
49
|
+
payload?: Record<string, unknown> | undefined;
|
|
50
|
+
}) => Promise<unknown>;
|
|
51
|
+
saveTestReport?: (report: ThemeReadinessReport) => Promise<unknown>;
|
|
52
|
+
getLatestTestReport?: () => Promise<unknown>;
|
|
53
|
+
}
|
|
54
|
+
export declare function registerTestingTools(server: McpServer, ops: TestingOperations): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type DeveloperCredentials } from '../auth/credentials-store';
|
|
2
|
+
export declare function sdkEndpoint(value: string): string;
|
|
3
|
+
export declare function parseSdkConnection(input: string): {
|
|
4
|
+
api: string;
|
|
5
|
+
token: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function sdkRequest<T>(endpoint: string, token: string, query: string, variables?: {}): Promise<T>;
|
|
8
|
+
export declare function connectSdk(endpoint: string, token: string): Promise<DeveloperCredentials>;
|
|
9
|
+
export declare function collectThemeSources(root: string): {
|
|
10
|
+
path: string;
|
|
11
|
+
content: string;
|
|
12
|
+
}[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StorefrontCategory } from './commerce';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves a selected list of category identifiers against a tenant's authorized categories.
|
|
4
|
+
*
|
|
5
|
+
* Guarantees:
|
|
6
|
+
* 1. Tenant Isolation: Categories are matched ONLY against the provided `tenantCategories`
|
|
7
|
+
* belonging to the verified tenant. Cross-tenant IDs or foreign identifiers are discarded.
|
|
8
|
+
* 2. Order Preservation: Results follow the exact selection order specified by the merchant.
|
|
9
|
+
* 3. Empty Selection: An empty selection (`[]`, `undefined`, `null`) safely returns all
|
|
10
|
+
* tenant categories to preserve default theme section behavior.
|
|
11
|
+
* 4. Resilient & Non-Crashing: Unknown, deleted, or duplicate category IDs are safely handled.
|
|
12
|
+
* 5. Backward Compatibility: Transparently accepts arrays of strings/numbers, legacy single
|
|
13
|
+
* IDs, or comma-separated string formats.
|
|
14
|
+
*/
|
|
15
|
+
export declare function resolveSelectedCategories(tenantCategories: StorefrontCategory[], selectedCategoryIds?: unknown): StorefrontCategory[];
|