@vitrine-kit/contracts 1.2.0 → 1.2.2
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/dist/index.cjs +383 -0
- package/dist/index.d.cts +711 -0
- package/dist/index.d.ts +1 -1
- package/package.json +10 -4
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
BACKENDS: () => BACKENDS,
|
|
24
|
+
BLUEPRINT_COLLECTIONS: () => BLUEPRINT_COLLECTIONS,
|
|
25
|
+
BLUEPRINT_FIELD_TYPES: () => BLUEPRINT_FIELD_TYPES,
|
|
26
|
+
COLOR_TOKENS: () => COLOR_TOKENS,
|
|
27
|
+
CONTRACTS_VERSION: () => CONTRACTS_VERSION,
|
|
28
|
+
FONT_TOKENS: () => FONT_TOKENS,
|
|
29
|
+
FONT_WEIGHT_TOKENS: () => FONT_WEIGHT_TOKENS,
|
|
30
|
+
LEADING_TOKENS: () => LEADING_TOKENS,
|
|
31
|
+
MOTION_TOKENS: () => MOTION_TOKENS,
|
|
32
|
+
RADIUS_TOKENS: () => RADIUS_TOKENS,
|
|
33
|
+
SHADOW_TOKENS: () => SHADOW_TOKENS,
|
|
34
|
+
SINGLETON_TOKENS: () => SINGLETON_TOKENS,
|
|
35
|
+
SLOT_IDS: () => SLOT_IDS,
|
|
36
|
+
SPACE_TOKENS: () => SPACE_TOKENS,
|
|
37
|
+
TIERS: () => TIERS,
|
|
38
|
+
TOKEN_CSS_VARS: () => TOKEN_CSS_VARS,
|
|
39
|
+
TRACKING_TOKENS: () => TRACKING_TOKENS,
|
|
40
|
+
backendSchema: () => backendSchema,
|
|
41
|
+
blueprintCollectionSchema: () => blueprintCollectionSchema,
|
|
42
|
+
blueprintFieldDefSchema: () => blueprintFieldDefSchema,
|
|
43
|
+
blueprintManifestSchema: () => blueprintManifestSchema,
|
|
44
|
+
cssVar: () => cssVar,
|
|
45
|
+
featureEnvSchema: () => featureEnvSchema,
|
|
46
|
+
featureFileMapSchema: () => featureFileMapSchema,
|
|
47
|
+
featureManifestSchema: () => featureManifestSchema,
|
|
48
|
+
i18nSchema: () => i18nSchema,
|
|
49
|
+
integrationsSchema: () => integrationsSchema,
|
|
50
|
+
layoutSectionSchema: () => layoutSectionSchema,
|
|
51
|
+
registryIndexSchema: () => registryIndexSchema,
|
|
52
|
+
siteConfigSchema: () => siteConfigSchema,
|
|
53
|
+
slotIdSchema: () => slotIdSchema,
|
|
54
|
+
slotRegistrationSchema: () => slotRegistrationSchema,
|
|
55
|
+
themeSchema: () => themeSchema,
|
|
56
|
+
tierSchema: () => tierSchema,
|
|
57
|
+
vitrineLockSchema: () => vitrineLockSchema,
|
|
58
|
+
vitrinePreset: () => vitrinePreset
|
|
59
|
+
});
|
|
60
|
+
module.exports = __toCommonJS(index_exports);
|
|
61
|
+
|
|
62
|
+
// src/common.ts
|
|
63
|
+
var import_zod = require("zod");
|
|
64
|
+
var TIERS = ["catalog", "simple-store", "full-store"];
|
|
65
|
+
var tierSchema = import_zod.z.enum(TIERS);
|
|
66
|
+
var BACKENDS = ["payload", "vendure"];
|
|
67
|
+
var backendSchema = import_zod.z.enum(BACKENDS);
|
|
68
|
+
|
|
69
|
+
// src/tokens.ts
|
|
70
|
+
var COLOR_TOKENS = [
|
|
71
|
+
"bg",
|
|
72
|
+
"fg",
|
|
73
|
+
"muted",
|
|
74
|
+
"muted-fg",
|
|
75
|
+
"surface",
|
|
76
|
+
"surface-fg",
|
|
77
|
+
"border",
|
|
78
|
+
"input",
|
|
79
|
+
"ring",
|
|
80
|
+
"primary",
|
|
81
|
+
"primary-fg",
|
|
82
|
+
"secondary",
|
|
83
|
+
"secondary-fg",
|
|
84
|
+
"accent",
|
|
85
|
+
"accent-fg",
|
|
86
|
+
"success",
|
|
87
|
+
"warning",
|
|
88
|
+
"danger",
|
|
89
|
+
"danger-fg",
|
|
90
|
+
"price",
|
|
91
|
+
"sale"
|
|
92
|
+
];
|
|
93
|
+
var FONT_TOKENS = ["sans", "heading", "mono"];
|
|
94
|
+
var FONT_WEIGHT_TOKENS = ["normal", "medium", "bold", "heading"];
|
|
95
|
+
var LEADING_TOKENS = ["tight", "normal", "relaxed"];
|
|
96
|
+
var TRACKING_TOKENS = ["tight", "normal", "wide"];
|
|
97
|
+
var RADIUS_TOKENS = ["base", "sm", "md", "lg", "full"];
|
|
98
|
+
var SHADOW_TOKENS = ["sm", "md", "lg", "color"];
|
|
99
|
+
var SPACE_TOKENS = ["unit", "container-max", "container-padding", "section-gap"];
|
|
100
|
+
var MOTION_TOKENS = ["duration-fast", "duration-normal", "ease-default"];
|
|
101
|
+
var SINGLETON_TOKENS = ["density", "border-width"];
|
|
102
|
+
function cssVar(group, name) {
|
|
103
|
+
return name ? `--vt-${group}-${name}` : `--vt-${group}`;
|
|
104
|
+
}
|
|
105
|
+
var TOKEN_CSS_VARS = [
|
|
106
|
+
...COLOR_TOKENS.map((t) => cssVar("color", t)),
|
|
107
|
+
...FONT_TOKENS.map((t) => cssVar("font", t)),
|
|
108
|
+
...FONT_WEIGHT_TOKENS.map((t) => cssVar("weight", t)),
|
|
109
|
+
...LEADING_TOKENS.map((t) => cssVar("leading", t)),
|
|
110
|
+
...TRACKING_TOKENS.map((t) => cssVar("tracking", t)),
|
|
111
|
+
...RADIUS_TOKENS.map((t) => cssVar("radius", t)),
|
|
112
|
+
...SHADOW_TOKENS.map((t) => cssVar("shadow", t)),
|
|
113
|
+
...SPACE_TOKENS.map((t) => cssVar("space", t)),
|
|
114
|
+
...MOTION_TOKENS.map((t) => cssVar("motion", t)),
|
|
115
|
+
...SINGLETON_TOKENS.map((t) => cssVar(t))
|
|
116
|
+
];
|
|
117
|
+
var ref = (group, name) => `var(${cssVar(group, name)})`;
|
|
118
|
+
var vitrinePreset = {
|
|
119
|
+
theme: {
|
|
120
|
+
extend: {
|
|
121
|
+
colors: Object.fromEntries(
|
|
122
|
+
COLOR_TOKENS.map((t) => [t, ref("color", t)])
|
|
123
|
+
),
|
|
124
|
+
fontFamily: {
|
|
125
|
+
sans: ref("font", "sans"),
|
|
126
|
+
heading: ref("font", "heading"),
|
|
127
|
+
mono: ref("font", "mono")
|
|
128
|
+
},
|
|
129
|
+
fontWeight: Object.fromEntries(
|
|
130
|
+
FONT_WEIGHT_TOKENS.map((t) => [t, ref("weight", t)])
|
|
131
|
+
),
|
|
132
|
+
lineHeight: Object.fromEntries(
|
|
133
|
+
LEADING_TOKENS.map((t) => [t, ref("leading", t)])
|
|
134
|
+
),
|
|
135
|
+
letterSpacing: Object.fromEntries(
|
|
136
|
+
TRACKING_TOKENS.map((t) => [t, ref("tracking", t)])
|
|
137
|
+
),
|
|
138
|
+
borderRadius: Object.fromEntries(
|
|
139
|
+
RADIUS_TOKENS.map((t) => [t, ref("radius", t)])
|
|
140
|
+
),
|
|
141
|
+
boxShadow: {
|
|
142
|
+
sm: ref("shadow", "sm"),
|
|
143
|
+
md: ref("shadow", "md"),
|
|
144
|
+
lg: ref("shadow", "lg")
|
|
145
|
+
},
|
|
146
|
+
borderWidth: { DEFAULT: ref("border-width") },
|
|
147
|
+
maxWidth: { container: ref("space", "container-max") },
|
|
148
|
+
spacing: {
|
|
149
|
+
unit: ref("space", "unit"),
|
|
150
|
+
gutter: ref("space", "container-padding"),
|
|
151
|
+
section: ref("space", "section-gap")
|
|
152
|
+
},
|
|
153
|
+
transitionDuration: {
|
|
154
|
+
fast: ref("motion", "duration-fast"),
|
|
155
|
+
normal: ref("motion", "duration-normal")
|
|
156
|
+
},
|
|
157
|
+
transitionTimingFunction: { DEFAULT: ref("motion", "ease-default") }
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
// src/slots.ts
|
|
163
|
+
var import_zod2 = require("zod");
|
|
164
|
+
var SLOT_IDS = [
|
|
165
|
+
// global — on every page
|
|
166
|
+
"global.banner-top",
|
|
167
|
+
"global.header-start",
|
|
168
|
+
"global.header-nav",
|
|
169
|
+
"global.header-actions",
|
|
170
|
+
"global.footer",
|
|
171
|
+
"global.body-end",
|
|
172
|
+
// home
|
|
173
|
+
"home.hero",
|
|
174
|
+
"home.below-hero",
|
|
175
|
+
"home.sections",
|
|
176
|
+
"home.bottom",
|
|
177
|
+
// catalog — listing/grid
|
|
178
|
+
"catalog.toolbar",
|
|
179
|
+
"catalog.sidebar",
|
|
180
|
+
"catalog.grid-top",
|
|
181
|
+
"catalog.grid-bottom",
|
|
182
|
+
// category
|
|
183
|
+
"category.header",
|
|
184
|
+
"category.below-products",
|
|
185
|
+
// product
|
|
186
|
+
"product.gallery",
|
|
187
|
+
"product.below-title",
|
|
188
|
+
"product.below-price",
|
|
189
|
+
"product.purchase",
|
|
190
|
+
"product.below-description",
|
|
191
|
+
"product.tabs",
|
|
192
|
+
"product.related",
|
|
193
|
+
// cart
|
|
194
|
+
"cart.items-bottom",
|
|
195
|
+
"cart.summary",
|
|
196
|
+
"cart.below",
|
|
197
|
+
// checkout
|
|
198
|
+
"checkout.top",
|
|
199
|
+
"checkout.below",
|
|
200
|
+
// order
|
|
201
|
+
"order.top",
|
|
202
|
+
"order.below",
|
|
203
|
+
// search
|
|
204
|
+
"search.results-top",
|
|
205
|
+
"search.empty"
|
|
206
|
+
];
|
|
207
|
+
var slotIdSchema = import_zod2.z.enum(SLOT_IDS);
|
|
208
|
+
var slotRegistrationSchema = import_zod2.z.object({
|
|
209
|
+
slot: slotIdSchema,
|
|
210
|
+
component: import_zod2.z.string().min(1),
|
|
211
|
+
order: import_zod2.z.number().int().optional()
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
// src/config.ts
|
|
215
|
+
var import_zod3 = require("zod");
|
|
216
|
+
var layoutSectionSchema = import_zod3.z.object({
|
|
217
|
+
slot: slotIdSchema,
|
|
218
|
+
enabled: import_zod3.z.boolean().default(true),
|
|
219
|
+
/** Path to the override component in the client repo (unique — as an override, §13). */
|
|
220
|
+
override: import_zod3.z.string().optional()
|
|
221
|
+
});
|
|
222
|
+
var integrationsSchema = import_zod3.z.object({
|
|
223
|
+
payments: import_zod3.z.enum(["stripe", "paddle", "yookassa"]).optional(),
|
|
224
|
+
email: import_zod3.z.string().optional(),
|
|
225
|
+
analytics: import_zod3.z.string().optional(),
|
|
226
|
+
media: import_zod3.z.string().optional(),
|
|
227
|
+
shipping: import_zod3.z.string().optional()
|
|
228
|
+
}).default({});
|
|
229
|
+
var i18nSchema = import_zod3.z.object({
|
|
230
|
+
defaultLocale: import_zod3.z.string().default("en"),
|
|
231
|
+
locales: import_zod3.z.array(import_zod3.z.string()).default(["en"]),
|
|
232
|
+
currency: import_zod3.z.string().default("USD"),
|
|
233
|
+
priceFormat: import_zod3.z.string().optional()
|
|
234
|
+
}).default({ defaultLocale: "en", locales: ["en"], currency: "USD" });
|
|
235
|
+
var themeSchema = import_zod3.z.object({
|
|
236
|
+
name: import_zod3.z.string().default("default"),
|
|
237
|
+
/** File with token values (filled by the design step). */
|
|
238
|
+
cssFile: import_zod3.z.string().default("theme/client.css")
|
|
239
|
+
}).default({ name: "default", cssFile: "theme/client.css" });
|
|
240
|
+
var siteConfigSchema = import_zod3.z.object({
|
|
241
|
+
backend: backendSchema,
|
|
242
|
+
tier: tierSchema,
|
|
243
|
+
/** Feature flags: { 'reviews': true }. Set by the install primitive. */
|
|
244
|
+
features: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.boolean()).default({}),
|
|
245
|
+
layout: import_zod3.z.object({ sections: import_zod3.z.array(layoutSectionSchema).default([]) }).default({ sections: [] }),
|
|
246
|
+
theme: themeSchema,
|
|
247
|
+
integrations: integrationsSchema,
|
|
248
|
+
i18n: i18nSchema
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
// src/blueprint.ts
|
|
252
|
+
var import_zod4 = require("zod");
|
|
253
|
+
var BLUEPRINT_COLLECTIONS = [
|
|
254
|
+
"product",
|
|
255
|
+
"variant",
|
|
256
|
+
"category",
|
|
257
|
+
"media",
|
|
258
|
+
"order",
|
|
259
|
+
"user"
|
|
260
|
+
];
|
|
261
|
+
var blueprintCollectionSchema = import_zod4.z.enum(BLUEPRINT_COLLECTIONS);
|
|
262
|
+
var BLUEPRINT_FIELD_TYPES = [
|
|
263
|
+
"text",
|
|
264
|
+
"textarea",
|
|
265
|
+
"richText",
|
|
266
|
+
"number",
|
|
267
|
+
"checkbox",
|
|
268
|
+
"select",
|
|
269
|
+
"relationship",
|
|
270
|
+
"date",
|
|
271
|
+
"json",
|
|
272
|
+
"array",
|
|
273
|
+
"group"
|
|
274
|
+
];
|
|
275
|
+
var blueprintFieldDefSchema = import_zod4.z.object({
|
|
276
|
+
name: import_zod4.z.string().min(1),
|
|
277
|
+
type: import_zod4.z.enum(BLUEPRINT_FIELD_TYPES),
|
|
278
|
+
required: import_zod4.z.boolean().optional(),
|
|
279
|
+
label: import_zod4.z.string().optional()
|
|
280
|
+
}).passthrough();
|
|
281
|
+
var blueprintManifestSchema = import_zod4.z.object({
|
|
282
|
+
extend: blueprintCollectionSchema,
|
|
283
|
+
addFields: import_zod4.z.array(import_zod4.z.string().min(1))
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
// src/manifest.ts
|
|
287
|
+
var import_zod5 = require("zod");
|
|
288
|
+
var featureFileMapSchema = import_zod5.z.object({
|
|
289
|
+
from: import_zod5.z.string().min(1),
|
|
290
|
+
to: import_zod5.z.string().min(1)
|
|
291
|
+
});
|
|
292
|
+
var featureEnvSchema = import_zod5.z.object({
|
|
293
|
+
key: import_zod5.z.string().min(1),
|
|
294
|
+
required: import_zod5.z.boolean().default(false)
|
|
295
|
+
});
|
|
296
|
+
var featureManifestSchema = import_zod5.z.object({
|
|
297
|
+
name: import_zod5.z.string().min(1),
|
|
298
|
+
title: import_zod5.z.string().min(1),
|
|
299
|
+
kitVersion: import_zod5.z.string().min(1),
|
|
300
|
+
/** semver range of required contracts, e.g. ">=1.0.0 <2.0.0". */
|
|
301
|
+
requiresContracts: import_zod5.z.string().min(1),
|
|
302
|
+
tier: import_zod5.z.array(tierSchema).nonempty(),
|
|
303
|
+
registryDependencies: import_zod5.z.array(import_zod5.z.string()).default([]),
|
|
304
|
+
/** Versioned packages: { "@vitrine-kit/core": ">=1.0.0" }. */
|
|
305
|
+
corePackages: import_zod5.z.record(import_zod5.z.string(), import_zod5.z.string()).default({}),
|
|
306
|
+
npm: import_zod5.z.array(import_zod5.z.string()).default([]),
|
|
307
|
+
files: import_zod5.z.array(featureFileMapSchema).default([]),
|
|
308
|
+
config: import_zod5.z.object({ set: import_zod5.z.record(import_zod5.z.string(), import_zod5.z.boolean()) }).optional(),
|
|
309
|
+
/**
|
|
310
|
+
* The payment provider of a checkout-<provider> feature. From it the CLI: (1) generates
|
|
311
|
+
* the provider registration in lib/payments.ts, (2) sets integrations.payments
|
|
312
|
+
* in site.config. register<Pascal>Provider() is exported from lib/<name>/register.ts.
|
|
313
|
+
*/
|
|
314
|
+
payment: import_zod5.z.object({ provider: import_zod5.z.enum(["stripe", "paddle", "yookassa"]) }).optional(),
|
|
315
|
+
slots: import_zod5.z.array(slotRegistrationSchema).default([]),
|
|
316
|
+
blueprint: blueprintManifestSchema.optional(),
|
|
317
|
+
env: import_zod5.z.array(featureEnvSchema).default([]),
|
|
318
|
+
/** Doc appended to the client's CLAUDE.md. */
|
|
319
|
+
claudeDoc: import_zod5.z.string().optional(),
|
|
320
|
+
conflicts: import_zod5.z.array(import_zod5.z.string()).default([]),
|
|
321
|
+
removable: import_zod5.z.boolean().default(true)
|
|
322
|
+
});
|
|
323
|
+
var vitrineLockSchema = import_zod5.z.object({
|
|
324
|
+
kitVersion: import_zod5.z.string().min(1),
|
|
325
|
+
contracts: import_zod5.z.string().min(1),
|
|
326
|
+
backend: backendSchema,
|
|
327
|
+
tier: tierSchema,
|
|
328
|
+
features: import_zod5.z.record(import_zod5.z.string(), import_zod5.z.object({ version: import_zod5.z.string().min(1) })).default({})
|
|
329
|
+
});
|
|
330
|
+
var registryIndexSchema = import_zod5.z.object({
|
|
331
|
+
kitVersion: import_zod5.z.string().min(1),
|
|
332
|
+
contracts: import_zod5.z.string().min(1),
|
|
333
|
+
features: import_zod5.z.record(
|
|
334
|
+
import_zod5.z.string(),
|
|
335
|
+
import_zod5.z.object({
|
|
336
|
+
title: import_zod5.z.string(),
|
|
337
|
+
kitVersion: import_zod5.z.string(),
|
|
338
|
+
tier: import_zod5.z.array(tierSchema)
|
|
339
|
+
})
|
|
340
|
+
).default({})
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
// src/index.ts
|
|
344
|
+
var CONTRACTS_VERSION = "1.0.0";
|
|
345
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
346
|
+
0 && (module.exports = {
|
|
347
|
+
BACKENDS,
|
|
348
|
+
BLUEPRINT_COLLECTIONS,
|
|
349
|
+
BLUEPRINT_FIELD_TYPES,
|
|
350
|
+
COLOR_TOKENS,
|
|
351
|
+
CONTRACTS_VERSION,
|
|
352
|
+
FONT_TOKENS,
|
|
353
|
+
FONT_WEIGHT_TOKENS,
|
|
354
|
+
LEADING_TOKENS,
|
|
355
|
+
MOTION_TOKENS,
|
|
356
|
+
RADIUS_TOKENS,
|
|
357
|
+
SHADOW_TOKENS,
|
|
358
|
+
SINGLETON_TOKENS,
|
|
359
|
+
SLOT_IDS,
|
|
360
|
+
SPACE_TOKENS,
|
|
361
|
+
TIERS,
|
|
362
|
+
TOKEN_CSS_VARS,
|
|
363
|
+
TRACKING_TOKENS,
|
|
364
|
+
backendSchema,
|
|
365
|
+
blueprintCollectionSchema,
|
|
366
|
+
blueprintFieldDefSchema,
|
|
367
|
+
blueprintManifestSchema,
|
|
368
|
+
cssVar,
|
|
369
|
+
featureEnvSchema,
|
|
370
|
+
featureFileMapSchema,
|
|
371
|
+
featureManifestSchema,
|
|
372
|
+
i18nSchema,
|
|
373
|
+
integrationsSchema,
|
|
374
|
+
layoutSectionSchema,
|
|
375
|
+
registryIndexSchema,
|
|
376
|
+
siteConfigSchema,
|
|
377
|
+
slotIdSchema,
|
|
378
|
+
slotRegistrationSchema,
|
|
379
|
+
themeSchema,
|
|
380
|
+
tierSchema,
|
|
381
|
+
vitrineLockSchema,
|
|
382
|
+
vitrinePreset
|
|
383
|
+
});
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,711 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const TIERS: readonly ["catalog", "simple-store", "full-store"];
|
|
4
|
+
type Tier = (typeof TIERS)[number];
|
|
5
|
+
declare const tierSchema: z.ZodEnum<["catalog", "simple-store", "full-store"]>;
|
|
6
|
+
declare const BACKENDS: readonly ["payload", "vendure"];
|
|
7
|
+
type Backend = (typeof BACKENDS)[number];
|
|
8
|
+
declare const backendSchema: z.ZodEnum<["payload", "vendure"]>;
|
|
9
|
+
|
|
10
|
+
declare const COLOR_TOKENS: readonly ["bg", "fg", "muted", "muted-fg", "surface", "surface-fg", "border", "input", "ring", "primary", "primary-fg", "secondary", "secondary-fg", "accent", "accent-fg", "success", "warning", "danger", "danger-fg", "price", "sale"];
|
|
11
|
+
type ColorToken = (typeof COLOR_TOKENS)[number];
|
|
12
|
+
declare const FONT_TOKENS: readonly ["sans", "heading", "mono"];
|
|
13
|
+
type FontToken = (typeof FONT_TOKENS)[number];
|
|
14
|
+
declare const FONT_WEIGHT_TOKENS: readonly ["normal", "medium", "bold", "heading"];
|
|
15
|
+
type FontWeightToken = (typeof FONT_WEIGHT_TOKENS)[number];
|
|
16
|
+
declare const LEADING_TOKENS: readonly ["tight", "normal", "relaxed"];
|
|
17
|
+
type LeadingToken = (typeof LEADING_TOKENS)[number];
|
|
18
|
+
declare const TRACKING_TOKENS: readonly ["tight", "normal", "wide"];
|
|
19
|
+
type TrackingToken = (typeof TRACKING_TOKENS)[number];
|
|
20
|
+
declare const RADIUS_TOKENS: readonly ["base", "sm", "md", "lg", "full"];
|
|
21
|
+
type RadiusToken = (typeof RADIUS_TOKENS)[number];
|
|
22
|
+
declare const SHADOW_TOKENS: readonly ["sm", "md", "lg", "color"];
|
|
23
|
+
type ShadowToken = (typeof SHADOW_TOKENS)[number];
|
|
24
|
+
declare const SPACE_TOKENS: readonly ["unit", "container-max", "container-padding", "section-gap"];
|
|
25
|
+
type SpaceToken = (typeof SPACE_TOKENS)[number];
|
|
26
|
+
declare const MOTION_TOKENS: readonly ["duration-fast", "duration-normal", "ease-default"];
|
|
27
|
+
type MotionToken = (typeof MOTION_TOKENS)[number];
|
|
28
|
+
/** Single "knobs" without a group. */
|
|
29
|
+
declare const SINGLETON_TOKENS: readonly ["density", "border-width"];
|
|
30
|
+
type SingletonToken = (typeof SINGLETON_TOKENS)[number];
|
|
31
|
+
/** CSS variable name for a token: cssVar('color','primary') → '--vt-color-primary'. */
|
|
32
|
+
declare function cssVar(group: string, name?: string): `--vt-${string}`;
|
|
33
|
+
/** Full list of the contract's CSS variable names — for theme scaffolding and docs. */
|
|
34
|
+
declare const TOKEN_CSS_VARS: string[];
|
|
35
|
+
/**
|
|
36
|
+
* The Vitrine Tailwind preset: maps Tailwind keys to the contract's CSS variables.
|
|
37
|
+
* Used in the client's tailwind.config: `presets: [vitrinePreset]`.
|
|
38
|
+
* Loosely typed so contracts don't take a dependency on tailwindcss.
|
|
39
|
+
*/
|
|
40
|
+
declare const vitrinePreset: {
|
|
41
|
+
theme: {
|
|
42
|
+
extend: Record<string, unknown>;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Money — an integer in the currency's minor units (cents).
|
|
48
|
+
* 2490 = 24.90. Decision is fixed (see the demo seed, spec §18.2).
|
|
49
|
+
*/
|
|
50
|
+
type Money = number;
|
|
51
|
+
/** ISO 4217, e.g. 'USD', 'EUR', 'GBP'. */
|
|
52
|
+
type CurrencyCode = string;
|
|
53
|
+
interface Category {
|
|
54
|
+
id: string;
|
|
55
|
+
slug: string;
|
|
56
|
+
title: string;
|
|
57
|
+
parentId?: string | null;
|
|
58
|
+
description?: string;
|
|
59
|
+
}
|
|
60
|
+
interface ProductImage {
|
|
61
|
+
url: string;
|
|
62
|
+
alt?: string;
|
|
63
|
+
width?: number;
|
|
64
|
+
height?: number;
|
|
65
|
+
}
|
|
66
|
+
interface Variant {
|
|
67
|
+
id: string;
|
|
68
|
+
sku: string;
|
|
69
|
+
title?: string;
|
|
70
|
+
price: Money;
|
|
71
|
+
currency: CurrencyCode;
|
|
72
|
+
/** null/undefined = stock not tracked. */
|
|
73
|
+
stock?: number | null;
|
|
74
|
+
/** Variant options, e.g. { size: 'M', color: 'red' }. */
|
|
75
|
+
options?: Record<string, string>;
|
|
76
|
+
}
|
|
77
|
+
interface Seo {
|
|
78
|
+
title?: string;
|
|
79
|
+
description?: string;
|
|
80
|
+
image?: string;
|
|
81
|
+
}
|
|
82
|
+
interface Product {
|
|
83
|
+
id: string;
|
|
84
|
+
slug: string;
|
|
85
|
+
title: string;
|
|
86
|
+
description?: string;
|
|
87
|
+
categoryIds: string[];
|
|
88
|
+
images: ProductImage[];
|
|
89
|
+
variants: Variant[];
|
|
90
|
+
priceRange?: {
|
|
91
|
+
min: Money;
|
|
92
|
+
max: Money;
|
|
93
|
+
currency: CurrencyCode;
|
|
94
|
+
};
|
|
95
|
+
seo?: Seo;
|
|
96
|
+
/**
|
|
97
|
+
* Fields added by features via blueprint extend() (contract 5),
|
|
98
|
+
* mapped here by the adapter. The contract stays stable — features read their own keys.
|
|
99
|
+
*/
|
|
100
|
+
extensions?: Record<string, unknown>;
|
|
101
|
+
}
|
|
102
|
+
type ProductSort = 'newest' | 'price-asc' | 'price-desc' | 'relevance';
|
|
103
|
+
interface ProductQuery {
|
|
104
|
+
/** Category slug. */
|
|
105
|
+
category?: string;
|
|
106
|
+
search?: string;
|
|
107
|
+
sort?: ProductSort;
|
|
108
|
+
page?: number;
|
|
109
|
+
perPage?: number;
|
|
110
|
+
/** Filter facets: { color: ['red','blue'], size: ['M'] }. */
|
|
111
|
+
filters?: Record<string, string[]>;
|
|
112
|
+
}
|
|
113
|
+
interface CartLine {
|
|
114
|
+
id: string;
|
|
115
|
+
variantId: string;
|
|
116
|
+
productId: string;
|
|
117
|
+
title: string;
|
|
118
|
+
quantity: number;
|
|
119
|
+
unitPrice: Money;
|
|
120
|
+
lineTotal: Money;
|
|
121
|
+
image?: string;
|
|
122
|
+
}
|
|
123
|
+
interface Cart {
|
|
124
|
+
id: string;
|
|
125
|
+
lines: CartLine[];
|
|
126
|
+
currency: CurrencyCode;
|
|
127
|
+
subtotal: Money;
|
|
128
|
+
discountTotal?: Money;
|
|
129
|
+
total: Money;
|
|
130
|
+
}
|
|
131
|
+
type OrderStatus = 'pending' | 'paid' | 'fulfilled' | 'cancelled' | 'refunded';
|
|
132
|
+
interface OrderLine {
|
|
133
|
+
variantId: string;
|
|
134
|
+
productId: string;
|
|
135
|
+
title: string;
|
|
136
|
+
quantity: number;
|
|
137
|
+
unitPrice: Money;
|
|
138
|
+
lineTotal: Money;
|
|
139
|
+
}
|
|
140
|
+
interface Order {
|
|
141
|
+
id: string;
|
|
142
|
+
number?: string;
|
|
143
|
+
status: OrderStatus;
|
|
144
|
+
lines: OrderLine[];
|
|
145
|
+
currency: CurrencyCode;
|
|
146
|
+
subtotal: Money;
|
|
147
|
+
discountTotal?: Money;
|
|
148
|
+
total: Money;
|
|
149
|
+
email?: string;
|
|
150
|
+
/** ISO-8601. */
|
|
151
|
+
createdAt: string;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Catalog source. Implemented by the PayloadCatalog* / VendureCatalog* adapters.
|
|
155
|
+
* Needed at every tier (catalog and above).
|
|
156
|
+
*/
|
|
157
|
+
interface CatalogSource {
|
|
158
|
+
listProducts(query: ProductQuery): Promise<Product[]>;
|
|
159
|
+
getProduct(slug: string): Promise<Product | null>;
|
|
160
|
+
listCategories(): Promise<Category[]>;
|
|
161
|
+
search(term: string): Promise<Product[]>;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Commerce backend. Only simple-store / full-store.
|
|
165
|
+
* Implemented by PayloadCommerce* / VendureCommerce*.
|
|
166
|
+
* The full cart surface is fixed in v1 (adding methods to the interface
|
|
167
|
+
* later = a breaking change for implementations).
|
|
168
|
+
*/
|
|
169
|
+
interface CommerceBackend {
|
|
170
|
+
createCart(): Promise<Cart>;
|
|
171
|
+
getCart(cartId: string): Promise<Cart | null>;
|
|
172
|
+
addItem(cartId: string, variantId: string, qty: number): Promise<Cart>;
|
|
173
|
+
updateItem(cartId: string, lineId: string, qty: number): Promise<Cart>;
|
|
174
|
+
removeItem(cartId: string, lineId: string): Promise<Cart>;
|
|
175
|
+
/** Hosted checkout of the active payment provider → redirectUrl. */
|
|
176
|
+
startCheckout(cartId: string): Promise<{
|
|
177
|
+
redirectUrl: string;
|
|
178
|
+
}>;
|
|
179
|
+
getOrder(id: string): Promise<Order | null>;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/** 32 v1 slots. Order and grouping match the approved proposal. */
|
|
183
|
+
declare const SLOT_IDS: readonly ["global.banner-top", "global.header-start", "global.header-nav", "global.header-actions", "global.footer", "global.body-end", "home.hero", "home.below-hero", "home.sections", "home.bottom", "catalog.toolbar", "catalog.sidebar", "catalog.grid-top", "catalog.grid-bottom", "category.header", "category.below-products", "product.gallery", "product.below-title", "product.below-price", "product.purchase", "product.below-description", "product.tabs", "product.related", "cart.items-bottom", "cart.summary", "cart.below", "checkout.top", "checkout.below", "order.top", "order.below", "search.results-top", "search.empty"];
|
|
184
|
+
type SlotId = (typeof SLOT_IDS)[number];
|
|
185
|
+
/** Zod enum of slots (for validating feature.json / site.config). */
|
|
186
|
+
declare const slotIdSchema: z.ZodEnum<["global.banner-top", "global.header-start", "global.header-nav", "global.header-actions", "global.footer", "global.body-end", "home.hero", "home.below-hero", "home.sections", "home.bottom", "catalog.toolbar", "catalog.sidebar", "catalog.grid-top", "catalog.grid-bottom", "category.header", "category.below-products", "product.gallery", "product.below-title", "product.below-price", "product.purchase", "product.below-description", "product.tabs", "product.related", "cart.items-bottom", "cart.summary", "cart.below", "checkout.top", "checkout.below", "order.top", "order.below", "search.results-top", "search.empty"]>;
|
|
187
|
+
/**
|
|
188
|
+
* Declarative slot registration in the feature manifest (feature.json, spec §8):
|
|
189
|
+
* component is the component NAME, resolved in the client repository.
|
|
190
|
+
*/
|
|
191
|
+
declare const slotRegistrationSchema: z.ZodObject<{
|
|
192
|
+
slot: z.ZodEnum<["global.banner-top", "global.header-start", "global.header-nav", "global.header-actions", "global.footer", "global.body-end", "home.hero", "home.below-hero", "home.sections", "home.bottom", "catalog.toolbar", "catalog.sidebar", "catalog.grid-top", "catalog.grid-bottom", "category.header", "category.below-products", "product.gallery", "product.below-title", "product.below-price", "product.purchase", "product.below-description", "product.tabs", "product.related", "cart.items-bottom", "cart.summary", "cart.below", "checkout.top", "checkout.below", "order.top", "order.below", "search.results-top", "search.empty"]>;
|
|
193
|
+
component: z.ZodString;
|
|
194
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
}, "strip", z.ZodTypeAny, {
|
|
196
|
+
slot: "global.banner-top" | "global.header-start" | "global.header-nav" | "global.header-actions" | "global.footer" | "global.body-end" | "home.hero" | "home.below-hero" | "home.sections" | "home.bottom" | "catalog.toolbar" | "catalog.sidebar" | "catalog.grid-top" | "catalog.grid-bottom" | "category.header" | "category.below-products" | "product.gallery" | "product.below-title" | "product.below-price" | "product.purchase" | "product.below-description" | "product.tabs" | "product.related" | "cart.items-bottom" | "cart.summary" | "cart.below" | "checkout.top" | "checkout.below" | "order.top" | "order.below" | "search.results-top" | "search.empty";
|
|
197
|
+
component: string;
|
|
198
|
+
order?: number | undefined;
|
|
199
|
+
}, {
|
|
200
|
+
slot: "global.banner-top" | "global.header-start" | "global.header-nav" | "global.header-actions" | "global.footer" | "global.body-end" | "home.hero" | "home.below-hero" | "home.sections" | "home.bottom" | "catalog.toolbar" | "catalog.sidebar" | "catalog.grid-top" | "catalog.grid-bottom" | "category.header" | "category.below-products" | "product.gallery" | "product.below-title" | "product.below-price" | "product.purchase" | "product.below-description" | "product.tabs" | "product.related" | "cart.items-bottom" | "cart.summary" | "cart.below" | "checkout.top" | "checkout.below" | "order.top" | "order.below" | "search.results-top" | "search.empty";
|
|
201
|
+
component: string;
|
|
202
|
+
order?: number | undefined;
|
|
203
|
+
}>;
|
|
204
|
+
type SlotRegistration = z.infer<typeof slotRegistrationSchema>;
|
|
205
|
+
/**
|
|
206
|
+
* Runtime binding of a name to an actual component (used by @vitrine-kit/core
|
|
207
|
+
* in the client's lib/slots.ts). Generic over the component type so the contract
|
|
208
|
+
* doesn't depend on React.
|
|
209
|
+
*/
|
|
210
|
+
interface SlotMount<TComponent = unknown> {
|
|
211
|
+
slot: SlotId;
|
|
212
|
+
component: TComponent;
|
|
213
|
+
order?: number;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/** Override/ordering of a page section (composition over the wireframe). */
|
|
217
|
+
declare const layoutSectionSchema: z.ZodObject<{
|
|
218
|
+
slot: z.ZodEnum<["global.banner-top", "global.header-start", "global.header-nav", "global.header-actions", "global.footer", "global.body-end", "home.hero", "home.below-hero", "home.sections", "home.bottom", "catalog.toolbar", "catalog.sidebar", "catalog.grid-top", "catalog.grid-bottom", "category.header", "category.below-products", "product.gallery", "product.below-title", "product.below-price", "product.purchase", "product.below-description", "product.tabs", "product.related", "cart.items-bottom", "cart.summary", "cart.below", "checkout.top", "checkout.below", "order.top", "order.below", "search.results-top", "search.empty"]>;
|
|
219
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
220
|
+
/** Path to the override component in the client repo (unique — as an override, §13). */
|
|
221
|
+
override: z.ZodOptional<z.ZodString>;
|
|
222
|
+
}, "strip", z.ZodTypeAny, {
|
|
223
|
+
slot: "global.banner-top" | "global.header-start" | "global.header-nav" | "global.header-actions" | "global.footer" | "global.body-end" | "home.hero" | "home.below-hero" | "home.sections" | "home.bottom" | "catalog.toolbar" | "catalog.sidebar" | "catalog.grid-top" | "catalog.grid-bottom" | "category.header" | "category.below-products" | "product.gallery" | "product.below-title" | "product.below-price" | "product.purchase" | "product.below-description" | "product.tabs" | "product.related" | "cart.items-bottom" | "cart.summary" | "cart.below" | "checkout.top" | "checkout.below" | "order.top" | "order.below" | "search.results-top" | "search.empty";
|
|
224
|
+
enabled: boolean;
|
|
225
|
+
override?: string | undefined;
|
|
226
|
+
}, {
|
|
227
|
+
slot: "global.banner-top" | "global.header-start" | "global.header-nav" | "global.header-actions" | "global.footer" | "global.body-end" | "home.hero" | "home.below-hero" | "home.sections" | "home.bottom" | "catalog.toolbar" | "catalog.sidebar" | "catalog.grid-top" | "catalog.grid-bottom" | "category.header" | "category.below-products" | "product.gallery" | "product.below-title" | "product.below-price" | "product.purchase" | "product.below-description" | "product.tabs" | "product.related" | "cart.items-bottom" | "cart.summary" | "cart.below" | "checkout.top" | "checkout.below" | "order.top" | "order.below" | "search.results-top" | "search.empty";
|
|
228
|
+
enabled?: boolean | undefined;
|
|
229
|
+
override?: string | undefined;
|
|
230
|
+
}>;
|
|
231
|
+
type LayoutSection = z.infer<typeof layoutSectionSchema>;
|
|
232
|
+
declare const integrationsSchema: z.ZodDefault<z.ZodObject<{
|
|
233
|
+
payments: z.ZodOptional<z.ZodEnum<["stripe", "paddle", "yookassa"]>>;
|
|
234
|
+
email: z.ZodOptional<z.ZodString>;
|
|
235
|
+
analytics: z.ZodOptional<z.ZodString>;
|
|
236
|
+
media: z.ZodOptional<z.ZodString>;
|
|
237
|
+
shipping: z.ZodOptional<z.ZodString>;
|
|
238
|
+
}, "strip", z.ZodTypeAny, {
|
|
239
|
+
payments?: "stripe" | "paddle" | "yookassa" | undefined;
|
|
240
|
+
email?: string | undefined;
|
|
241
|
+
analytics?: string | undefined;
|
|
242
|
+
media?: string | undefined;
|
|
243
|
+
shipping?: string | undefined;
|
|
244
|
+
}, {
|
|
245
|
+
payments?: "stripe" | "paddle" | "yookassa" | undefined;
|
|
246
|
+
email?: string | undefined;
|
|
247
|
+
analytics?: string | undefined;
|
|
248
|
+
media?: string | undefined;
|
|
249
|
+
shipping?: string | undefined;
|
|
250
|
+
}>>;
|
|
251
|
+
declare const i18nSchema: z.ZodDefault<z.ZodObject<{
|
|
252
|
+
defaultLocale: z.ZodDefault<z.ZodString>;
|
|
253
|
+
locales: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
254
|
+
currency: z.ZodDefault<z.ZodString>;
|
|
255
|
+
priceFormat: z.ZodOptional<z.ZodString>;
|
|
256
|
+
}, "strip", z.ZodTypeAny, {
|
|
257
|
+
defaultLocale: string;
|
|
258
|
+
locales: string[];
|
|
259
|
+
currency: string;
|
|
260
|
+
priceFormat?: string | undefined;
|
|
261
|
+
}, {
|
|
262
|
+
defaultLocale?: string | undefined;
|
|
263
|
+
locales?: string[] | undefined;
|
|
264
|
+
currency?: string | undefined;
|
|
265
|
+
priceFormat?: string | undefined;
|
|
266
|
+
}>>;
|
|
267
|
+
declare const themeSchema: z.ZodDefault<z.ZodObject<{
|
|
268
|
+
name: z.ZodDefault<z.ZodString>;
|
|
269
|
+
/** File with token values (filled by the design step). */
|
|
270
|
+
cssFile: z.ZodDefault<z.ZodString>;
|
|
271
|
+
}, "strip", z.ZodTypeAny, {
|
|
272
|
+
name: string;
|
|
273
|
+
cssFile: string;
|
|
274
|
+
}, {
|
|
275
|
+
name?: string | undefined;
|
|
276
|
+
cssFile?: string | undefined;
|
|
277
|
+
}>>;
|
|
278
|
+
declare const siteConfigSchema: z.ZodObject<{
|
|
279
|
+
backend: z.ZodEnum<["payload", "vendure"]>;
|
|
280
|
+
tier: z.ZodEnum<["catalog", "simple-store", "full-store"]>;
|
|
281
|
+
/** Feature flags: { 'reviews': true }. Set by the install primitive. */
|
|
282
|
+
features: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
283
|
+
layout: z.ZodDefault<z.ZodObject<{
|
|
284
|
+
sections: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
285
|
+
slot: z.ZodEnum<["global.banner-top", "global.header-start", "global.header-nav", "global.header-actions", "global.footer", "global.body-end", "home.hero", "home.below-hero", "home.sections", "home.bottom", "catalog.toolbar", "catalog.sidebar", "catalog.grid-top", "catalog.grid-bottom", "category.header", "category.below-products", "product.gallery", "product.below-title", "product.below-price", "product.purchase", "product.below-description", "product.tabs", "product.related", "cart.items-bottom", "cart.summary", "cart.below", "checkout.top", "checkout.below", "order.top", "order.below", "search.results-top", "search.empty"]>;
|
|
286
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
287
|
+
/** Path to the override component in the client repo (unique — as an override, §13). */
|
|
288
|
+
override: z.ZodOptional<z.ZodString>;
|
|
289
|
+
}, "strip", z.ZodTypeAny, {
|
|
290
|
+
slot: "global.banner-top" | "global.header-start" | "global.header-nav" | "global.header-actions" | "global.footer" | "global.body-end" | "home.hero" | "home.below-hero" | "home.sections" | "home.bottom" | "catalog.toolbar" | "catalog.sidebar" | "catalog.grid-top" | "catalog.grid-bottom" | "category.header" | "category.below-products" | "product.gallery" | "product.below-title" | "product.below-price" | "product.purchase" | "product.below-description" | "product.tabs" | "product.related" | "cart.items-bottom" | "cart.summary" | "cart.below" | "checkout.top" | "checkout.below" | "order.top" | "order.below" | "search.results-top" | "search.empty";
|
|
291
|
+
enabled: boolean;
|
|
292
|
+
override?: string | undefined;
|
|
293
|
+
}, {
|
|
294
|
+
slot: "global.banner-top" | "global.header-start" | "global.header-nav" | "global.header-actions" | "global.footer" | "global.body-end" | "home.hero" | "home.below-hero" | "home.sections" | "home.bottom" | "catalog.toolbar" | "catalog.sidebar" | "catalog.grid-top" | "catalog.grid-bottom" | "category.header" | "category.below-products" | "product.gallery" | "product.below-title" | "product.below-price" | "product.purchase" | "product.below-description" | "product.tabs" | "product.related" | "cart.items-bottom" | "cart.summary" | "cart.below" | "checkout.top" | "checkout.below" | "order.top" | "order.below" | "search.results-top" | "search.empty";
|
|
295
|
+
enabled?: boolean | undefined;
|
|
296
|
+
override?: string | undefined;
|
|
297
|
+
}>, "many">>;
|
|
298
|
+
}, "strip", z.ZodTypeAny, {
|
|
299
|
+
sections: {
|
|
300
|
+
slot: "global.banner-top" | "global.header-start" | "global.header-nav" | "global.header-actions" | "global.footer" | "global.body-end" | "home.hero" | "home.below-hero" | "home.sections" | "home.bottom" | "catalog.toolbar" | "catalog.sidebar" | "catalog.grid-top" | "catalog.grid-bottom" | "category.header" | "category.below-products" | "product.gallery" | "product.below-title" | "product.below-price" | "product.purchase" | "product.below-description" | "product.tabs" | "product.related" | "cart.items-bottom" | "cart.summary" | "cart.below" | "checkout.top" | "checkout.below" | "order.top" | "order.below" | "search.results-top" | "search.empty";
|
|
301
|
+
enabled: boolean;
|
|
302
|
+
override?: string | undefined;
|
|
303
|
+
}[];
|
|
304
|
+
}, {
|
|
305
|
+
sections?: {
|
|
306
|
+
slot: "global.banner-top" | "global.header-start" | "global.header-nav" | "global.header-actions" | "global.footer" | "global.body-end" | "home.hero" | "home.below-hero" | "home.sections" | "home.bottom" | "catalog.toolbar" | "catalog.sidebar" | "catalog.grid-top" | "catalog.grid-bottom" | "category.header" | "category.below-products" | "product.gallery" | "product.below-title" | "product.below-price" | "product.purchase" | "product.below-description" | "product.tabs" | "product.related" | "cart.items-bottom" | "cart.summary" | "cart.below" | "checkout.top" | "checkout.below" | "order.top" | "order.below" | "search.results-top" | "search.empty";
|
|
307
|
+
enabled?: boolean | undefined;
|
|
308
|
+
override?: string | undefined;
|
|
309
|
+
}[] | undefined;
|
|
310
|
+
}>>;
|
|
311
|
+
theme: z.ZodDefault<z.ZodObject<{
|
|
312
|
+
name: z.ZodDefault<z.ZodString>;
|
|
313
|
+
/** File with token values (filled by the design step). */
|
|
314
|
+
cssFile: z.ZodDefault<z.ZodString>;
|
|
315
|
+
}, "strip", z.ZodTypeAny, {
|
|
316
|
+
name: string;
|
|
317
|
+
cssFile: string;
|
|
318
|
+
}, {
|
|
319
|
+
name?: string | undefined;
|
|
320
|
+
cssFile?: string | undefined;
|
|
321
|
+
}>>;
|
|
322
|
+
integrations: z.ZodDefault<z.ZodObject<{
|
|
323
|
+
payments: z.ZodOptional<z.ZodEnum<["stripe", "paddle", "yookassa"]>>;
|
|
324
|
+
email: z.ZodOptional<z.ZodString>;
|
|
325
|
+
analytics: z.ZodOptional<z.ZodString>;
|
|
326
|
+
media: z.ZodOptional<z.ZodString>;
|
|
327
|
+
shipping: z.ZodOptional<z.ZodString>;
|
|
328
|
+
}, "strip", z.ZodTypeAny, {
|
|
329
|
+
payments?: "stripe" | "paddle" | "yookassa" | undefined;
|
|
330
|
+
email?: string | undefined;
|
|
331
|
+
analytics?: string | undefined;
|
|
332
|
+
media?: string | undefined;
|
|
333
|
+
shipping?: string | undefined;
|
|
334
|
+
}, {
|
|
335
|
+
payments?: "stripe" | "paddle" | "yookassa" | undefined;
|
|
336
|
+
email?: string | undefined;
|
|
337
|
+
analytics?: string | undefined;
|
|
338
|
+
media?: string | undefined;
|
|
339
|
+
shipping?: string | undefined;
|
|
340
|
+
}>>;
|
|
341
|
+
i18n: z.ZodDefault<z.ZodObject<{
|
|
342
|
+
defaultLocale: z.ZodDefault<z.ZodString>;
|
|
343
|
+
locales: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
344
|
+
currency: z.ZodDefault<z.ZodString>;
|
|
345
|
+
priceFormat: z.ZodOptional<z.ZodString>;
|
|
346
|
+
}, "strip", z.ZodTypeAny, {
|
|
347
|
+
defaultLocale: string;
|
|
348
|
+
locales: string[];
|
|
349
|
+
currency: string;
|
|
350
|
+
priceFormat?: string | undefined;
|
|
351
|
+
}, {
|
|
352
|
+
defaultLocale?: string | undefined;
|
|
353
|
+
locales?: string[] | undefined;
|
|
354
|
+
currency?: string | undefined;
|
|
355
|
+
priceFormat?: string | undefined;
|
|
356
|
+
}>>;
|
|
357
|
+
}, "strip", z.ZodTypeAny, {
|
|
358
|
+
backend: "payload" | "vendure";
|
|
359
|
+
tier: "catalog" | "simple-store" | "full-store";
|
|
360
|
+
features: Record<string, boolean>;
|
|
361
|
+
layout: {
|
|
362
|
+
sections: {
|
|
363
|
+
slot: "global.banner-top" | "global.header-start" | "global.header-nav" | "global.header-actions" | "global.footer" | "global.body-end" | "home.hero" | "home.below-hero" | "home.sections" | "home.bottom" | "catalog.toolbar" | "catalog.sidebar" | "catalog.grid-top" | "catalog.grid-bottom" | "category.header" | "category.below-products" | "product.gallery" | "product.below-title" | "product.below-price" | "product.purchase" | "product.below-description" | "product.tabs" | "product.related" | "cart.items-bottom" | "cart.summary" | "cart.below" | "checkout.top" | "checkout.below" | "order.top" | "order.below" | "search.results-top" | "search.empty";
|
|
364
|
+
enabled: boolean;
|
|
365
|
+
override?: string | undefined;
|
|
366
|
+
}[];
|
|
367
|
+
};
|
|
368
|
+
theme: {
|
|
369
|
+
name: string;
|
|
370
|
+
cssFile: string;
|
|
371
|
+
};
|
|
372
|
+
integrations: {
|
|
373
|
+
payments?: "stripe" | "paddle" | "yookassa" | undefined;
|
|
374
|
+
email?: string | undefined;
|
|
375
|
+
analytics?: string | undefined;
|
|
376
|
+
media?: string | undefined;
|
|
377
|
+
shipping?: string | undefined;
|
|
378
|
+
};
|
|
379
|
+
i18n: {
|
|
380
|
+
defaultLocale: string;
|
|
381
|
+
locales: string[];
|
|
382
|
+
currency: string;
|
|
383
|
+
priceFormat?: string | undefined;
|
|
384
|
+
};
|
|
385
|
+
}, {
|
|
386
|
+
backend: "payload" | "vendure";
|
|
387
|
+
tier: "catalog" | "simple-store" | "full-store";
|
|
388
|
+
features?: Record<string, boolean> | undefined;
|
|
389
|
+
layout?: {
|
|
390
|
+
sections?: {
|
|
391
|
+
slot: "global.banner-top" | "global.header-start" | "global.header-nav" | "global.header-actions" | "global.footer" | "global.body-end" | "home.hero" | "home.below-hero" | "home.sections" | "home.bottom" | "catalog.toolbar" | "catalog.sidebar" | "catalog.grid-top" | "catalog.grid-bottom" | "category.header" | "category.below-products" | "product.gallery" | "product.below-title" | "product.below-price" | "product.purchase" | "product.below-description" | "product.tabs" | "product.related" | "cart.items-bottom" | "cart.summary" | "cart.below" | "checkout.top" | "checkout.below" | "order.top" | "order.below" | "search.results-top" | "search.empty";
|
|
392
|
+
enabled?: boolean | undefined;
|
|
393
|
+
override?: string | undefined;
|
|
394
|
+
}[] | undefined;
|
|
395
|
+
} | undefined;
|
|
396
|
+
theme?: {
|
|
397
|
+
name?: string | undefined;
|
|
398
|
+
cssFile?: string | undefined;
|
|
399
|
+
} | undefined;
|
|
400
|
+
integrations?: {
|
|
401
|
+
payments?: "stripe" | "paddle" | "yookassa" | undefined;
|
|
402
|
+
email?: string | undefined;
|
|
403
|
+
analytics?: string | undefined;
|
|
404
|
+
media?: string | undefined;
|
|
405
|
+
shipping?: string | undefined;
|
|
406
|
+
} | undefined;
|
|
407
|
+
i18n?: {
|
|
408
|
+
defaultLocale?: string | undefined;
|
|
409
|
+
locales?: string[] | undefined;
|
|
410
|
+
currency?: string | undefined;
|
|
411
|
+
priceFormat?: string | undefined;
|
|
412
|
+
} | undefined;
|
|
413
|
+
}>;
|
|
414
|
+
type SiteConfig = z.infer<typeof siteConfigSchema>;
|
|
415
|
+
|
|
416
|
+
/** Base blueprint collections a feature can extend. */
|
|
417
|
+
declare const BLUEPRINT_COLLECTIONS: readonly ["product", "variant", "category", "media", "order", "user"];
|
|
418
|
+
type BlueprintCollection = (typeof BLUEPRINT_COLLECTIONS)[number];
|
|
419
|
+
declare const blueprintCollectionSchema: z.ZodEnum<["product", "variant", "category", "media", "order", "user"]>;
|
|
420
|
+
/** Supported types for added fields (minimal v1 set). */
|
|
421
|
+
declare const BLUEPRINT_FIELD_TYPES: readonly ["text", "textarea", "richText", "number", "checkbox", "select", "relationship", "date", "json", "array", "group"];
|
|
422
|
+
type BlueprintFieldType = (typeof BLUEPRINT_FIELD_TYPES)[number];
|
|
423
|
+
/**
|
|
424
|
+
* Definition of an added field (runtime form for @vitrine-kit/payload-blueprint).
|
|
425
|
+
* Allows extra Payload field keys (options, relationTo, …) via passthrough.
|
|
426
|
+
*/
|
|
427
|
+
declare const blueprintFieldDefSchema: z.ZodObject<{
|
|
428
|
+
name: z.ZodString;
|
|
429
|
+
type: z.ZodEnum<["text", "textarea", "richText", "number", "checkbox", "select", "relationship", "date", "json", "array", "group"]>;
|
|
430
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
431
|
+
label: z.ZodOptional<z.ZodString>;
|
|
432
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
433
|
+
name: z.ZodString;
|
|
434
|
+
type: z.ZodEnum<["text", "textarea", "richText", "number", "checkbox", "select", "relationship", "date", "json", "array", "group"]>;
|
|
435
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
436
|
+
label: z.ZodOptional<z.ZodString>;
|
|
437
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
438
|
+
name: z.ZodString;
|
|
439
|
+
type: z.ZodEnum<["text", "textarea", "richText", "number", "checkbox", "select", "relationship", "date", "json", "array", "group"]>;
|
|
440
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
441
|
+
label: z.ZodOptional<z.ZodString>;
|
|
442
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
443
|
+
type BlueprintFieldDef = z.infer<typeof blueprintFieldDefSchema>;
|
|
444
|
+
/** Runtime extension applied by extend(). */
|
|
445
|
+
interface BlueprintExtension {
|
|
446
|
+
extend: BlueprintCollection;
|
|
447
|
+
addFields: BlueprintFieldDef[];
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* The extend() signature, implemented in @vitrine-kit/payload-blueprint.
|
|
451
|
+
* Additive by contract: it adds fields to a collection.
|
|
452
|
+
*/
|
|
453
|
+
type Extend = (collection: BlueprintCollection, patch: {
|
|
454
|
+
addFields: BlueprintFieldDef[];
|
|
455
|
+
}) => void;
|
|
456
|
+
/**
|
|
457
|
+
* The blueprint shape in the feature manifest (feature.json, §8): addFields are field NAMES
|
|
458
|
+
* (strings); the actual definitions live in the feature code / payload-blueprint.
|
|
459
|
+
*/
|
|
460
|
+
declare const blueprintManifestSchema: z.ZodObject<{
|
|
461
|
+
extend: z.ZodEnum<["product", "variant", "category", "media", "order", "user"]>;
|
|
462
|
+
addFields: z.ZodArray<z.ZodString, "many">;
|
|
463
|
+
}, "strip", z.ZodTypeAny, {
|
|
464
|
+
extend: "order" | "media" | "product" | "variant" | "category" | "user";
|
|
465
|
+
addFields: string[];
|
|
466
|
+
}, {
|
|
467
|
+
extend: "order" | "media" | "product" | "variant" | "category" | "user";
|
|
468
|
+
addFields: string[];
|
|
469
|
+
}>;
|
|
470
|
+
type BlueprintManifest = z.infer<typeof blueprintManifestSchema>;
|
|
471
|
+
|
|
472
|
+
declare const featureFileMapSchema: z.ZodObject<{
|
|
473
|
+
from: z.ZodString;
|
|
474
|
+
to: z.ZodString;
|
|
475
|
+
}, "strip", z.ZodTypeAny, {
|
|
476
|
+
from: string;
|
|
477
|
+
to: string;
|
|
478
|
+
}, {
|
|
479
|
+
from: string;
|
|
480
|
+
to: string;
|
|
481
|
+
}>;
|
|
482
|
+
declare const featureEnvSchema: z.ZodObject<{
|
|
483
|
+
key: z.ZodString;
|
|
484
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
485
|
+
}, "strip", z.ZodTypeAny, {
|
|
486
|
+
required: boolean;
|
|
487
|
+
key: string;
|
|
488
|
+
}, {
|
|
489
|
+
key: string;
|
|
490
|
+
required?: boolean | undefined;
|
|
491
|
+
}>;
|
|
492
|
+
/** registry/<feature>/feature.json — the declarative feature manifest (§8). */
|
|
493
|
+
declare const featureManifestSchema: z.ZodObject<{
|
|
494
|
+
name: z.ZodString;
|
|
495
|
+
title: z.ZodString;
|
|
496
|
+
kitVersion: z.ZodString;
|
|
497
|
+
/** semver range of required contracts, e.g. ">=1.0.0 <2.0.0". */
|
|
498
|
+
requiresContracts: z.ZodString;
|
|
499
|
+
tier: z.ZodArray<z.ZodEnum<["catalog", "simple-store", "full-store"]>, "atleastone">;
|
|
500
|
+
registryDependencies: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
501
|
+
/** Versioned packages: { "@vitrine-kit/core": ">=1.0.0" }. */
|
|
502
|
+
corePackages: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
503
|
+
npm: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
504
|
+
files: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
505
|
+
from: z.ZodString;
|
|
506
|
+
to: z.ZodString;
|
|
507
|
+
}, "strip", z.ZodTypeAny, {
|
|
508
|
+
from: string;
|
|
509
|
+
to: string;
|
|
510
|
+
}, {
|
|
511
|
+
from: string;
|
|
512
|
+
to: string;
|
|
513
|
+
}>, "many">>;
|
|
514
|
+
config: z.ZodOptional<z.ZodObject<{
|
|
515
|
+
set: z.ZodRecord<z.ZodString, z.ZodBoolean>;
|
|
516
|
+
}, "strip", z.ZodTypeAny, {
|
|
517
|
+
set: Record<string, boolean>;
|
|
518
|
+
}, {
|
|
519
|
+
set: Record<string, boolean>;
|
|
520
|
+
}>>;
|
|
521
|
+
/**
|
|
522
|
+
* The payment provider of a checkout-<provider> feature. From it the CLI: (1) generates
|
|
523
|
+
* the provider registration in lib/payments.ts, (2) sets integrations.payments
|
|
524
|
+
* in site.config. register<Pascal>Provider() is exported from lib/<name>/register.ts.
|
|
525
|
+
*/
|
|
526
|
+
payment: z.ZodOptional<z.ZodObject<{
|
|
527
|
+
provider: z.ZodEnum<["stripe", "paddle", "yookassa"]>;
|
|
528
|
+
}, "strip", z.ZodTypeAny, {
|
|
529
|
+
provider: "stripe" | "paddle" | "yookassa";
|
|
530
|
+
}, {
|
|
531
|
+
provider: "stripe" | "paddle" | "yookassa";
|
|
532
|
+
}>>;
|
|
533
|
+
slots: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
534
|
+
slot: z.ZodEnum<["global.banner-top", "global.header-start", "global.header-nav", "global.header-actions", "global.footer", "global.body-end", "home.hero", "home.below-hero", "home.sections", "home.bottom", "catalog.toolbar", "catalog.sidebar", "catalog.grid-top", "catalog.grid-bottom", "category.header", "category.below-products", "product.gallery", "product.below-title", "product.below-price", "product.purchase", "product.below-description", "product.tabs", "product.related", "cart.items-bottom", "cart.summary", "cart.below", "checkout.top", "checkout.below", "order.top", "order.below", "search.results-top", "search.empty"]>;
|
|
535
|
+
component: z.ZodString;
|
|
536
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
537
|
+
}, "strip", z.ZodTypeAny, {
|
|
538
|
+
slot: "global.banner-top" | "global.header-start" | "global.header-nav" | "global.header-actions" | "global.footer" | "global.body-end" | "home.hero" | "home.below-hero" | "home.sections" | "home.bottom" | "catalog.toolbar" | "catalog.sidebar" | "catalog.grid-top" | "catalog.grid-bottom" | "category.header" | "category.below-products" | "product.gallery" | "product.below-title" | "product.below-price" | "product.purchase" | "product.below-description" | "product.tabs" | "product.related" | "cart.items-bottom" | "cart.summary" | "cart.below" | "checkout.top" | "checkout.below" | "order.top" | "order.below" | "search.results-top" | "search.empty";
|
|
539
|
+
component: string;
|
|
540
|
+
order?: number | undefined;
|
|
541
|
+
}, {
|
|
542
|
+
slot: "global.banner-top" | "global.header-start" | "global.header-nav" | "global.header-actions" | "global.footer" | "global.body-end" | "home.hero" | "home.below-hero" | "home.sections" | "home.bottom" | "catalog.toolbar" | "catalog.sidebar" | "catalog.grid-top" | "catalog.grid-bottom" | "category.header" | "category.below-products" | "product.gallery" | "product.below-title" | "product.below-price" | "product.purchase" | "product.below-description" | "product.tabs" | "product.related" | "cart.items-bottom" | "cart.summary" | "cart.below" | "checkout.top" | "checkout.below" | "order.top" | "order.below" | "search.results-top" | "search.empty";
|
|
543
|
+
component: string;
|
|
544
|
+
order?: number | undefined;
|
|
545
|
+
}>, "many">>;
|
|
546
|
+
blueprint: z.ZodOptional<z.ZodObject<{
|
|
547
|
+
extend: z.ZodEnum<["product", "variant", "category", "media", "order", "user"]>;
|
|
548
|
+
addFields: z.ZodArray<z.ZodString, "many">;
|
|
549
|
+
}, "strip", z.ZodTypeAny, {
|
|
550
|
+
extend: "order" | "media" | "product" | "variant" | "category" | "user";
|
|
551
|
+
addFields: string[];
|
|
552
|
+
}, {
|
|
553
|
+
extend: "order" | "media" | "product" | "variant" | "category" | "user";
|
|
554
|
+
addFields: string[];
|
|
555
|
+
}>>;
|
|
556
|
+
env: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
557
|
+
key: z.ZodString;
|
|
558
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
559
|
+
}, "strip", z.ZodTypeAny, {
|
|
560
|
+
required: boolean;
|
|
561
|
+
key: string;
|
|
562
|
+
}, {
|
|
563
|
+
key: string;
|
|
564
|
+
required?: boolean | undefined;
|
|
565
|
+
}>, "many">>;
|
|
566
|
+
/** Doc appended to the client's CLAUDE.md. */
|
|
567
|
+
claudeDoc: z.ZodOptional<z.ZodString>;
|
|
568
|
+
conflicts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
569
|
+
removable: z.ZodDefault<z.ZodBoolean>;
|
|
570
|
+
}, "strip", z.ZodTypeAny, {
|
|
571
|
+
name: string;
|
|
572
|
+
tier: ["catalog" | "simple-store" | "full-store", ...("catalog" | "simple-store" | "full-store")[]];
|
|
573
|
+
title: string;
|
|
574
|
+
kitVersion: string;
|
|
575
|
+
requiresContracts: string;
|
|
576
|
+
registryDependencies: string[];
|
|
577
|
+
corePackages: Record<string, string>;
|
|
578
|
+
npm: string[];
|
|
579
|
+
files: {
|
|
580
|
+
from: string;
|
|
581
|
+
to: string;
|
|
582
|
+
}[];
|
|
583
|
+
slots: {
|
|
584
|
+
slot: "global.banner-top" | "global.header-start" | "global.header-nav" | "global.header-actions" | "global.footer" | "global.body-end" | "home.hero" | "home.below-hero" | "home.sections" | "home.bottom" | "catalog.toolbar" | "catalog.sidebar" | "catalog.grid-top" | "catalog.grid-bottom" | "category.header" | "category.below-products" | "product.gallery" | "product.below-title" | "product.below-price" | "product.purchase" | "product.below-description" | "product.tabs" | "product.related" | "cart.items-bottom" | "cart.summary" | "cart.below" | "checkout.top" | "checkout.below" | "order.top" | "order.below" | "search.results-top" | "search.empty";
|
|
585
|
+
component: string;
|
|
586
|
+
order?: number | undefined;
|
|
587
|
+
}[];
|
|
588
|
+
env: {
|
|
589
|
+
required: boolean;
|
|
590
|
+
key: string;
|
|
591
|
+
}[];
|
|
592
|
+
conflicts: string[];
|
|
593
|
+
removable: boolean;
|
|
594
|
+
config?: {
|
|
595
|
+
set: Record<string, boolean>;
|
|
596
|
+
} | undefined;
|
|
597
|
+
payment?: {
|
|
598
|
+
provider: "stripe" | "paddle" | "yookassa";
|
|
599
|
+
} | undefined;
|
|
600
|
+
blueprint?: {
|
|
601
|
+
extend: "order" | "media" | "product" | "variant" | "category" | "user";
|
|
602
|
+
addFields: string[];
|
|
603
|
+
} | undefined;
|
|
604
|
+
claudeDoc?: string | undefined;
|
|
605
|
+
}, {
|
|
606
|
+
name: string;
|
|
607
|
+
tier: ["catalog" | "simple-store" | "full-store", ...("catalog" | "simple-store" | "full-store")[]];
|
|
608
|
+
title: string;
|
|
609
|
+
kitVersion: string;
|
|
610
|
+
requiresContracts: string;
|
|
611
|
+
registryDependencies?: string[] | undefined;
|
|
612
|
+
corePackages?: Record<string, string> | undefined;
|
|
613
|
+
npm?: string[] | undefined;
|
|
614
|
+
files?: {
|
|
615
|
+
from: string;
|
|
616
|
+
to: string;
|
|
617
|
+
}[] | undefined;
|
|
618
|
+
config?: {
|
|
619
|
+
set: Record<string, boolean>;
|
|
620
|
+
} | undefined;
|
|
621
|
+
payment?: {
|
|
622
|
+
provider: "stripe" | "paddle" | "yookassa";
|
|
623
|
+
} | undefined;
|
|
624
|
+
slots?: {
|
|
625
|
+
slot: "global.banner-top" | "global.header-start" | "global.header-nav" | "global.header-actions" | "global.footer" | "global.body-end" | "home.hero" | "home.below-hero" | "home.sections" | "home.bottom" | "catalog.toolbar" | "catalog.sidebar" | "catalog.grid-top" | "catalog.grid-bottom" | "category.header" | "category.below-products" | "product.gallery" | "product.below-title" | "product.below-price" | "product.purchase" | "product.below-description" | "product.tabs" | "product.related" | "cart.items-bottom" | "cart.summary" | "cart.below" | "checkout.top" | "checkout.below" | "order.top" | "order.below" | "search.results-top" | "search.empty";
|
|
626
|
+
component: string;
|
|
627
|
+
order?: number | undefined;
|
|
628
|
+
}[] | undefined;
|
|
629
|
+
blueprint?: {
|
|
630
|
+
extend: "order" | "media" | "product" | "variant" | "category" | "user";
|
|
631
|
+
addFields: string[];
|
|
632
|
+
} | undefined;
|
|
633
|
+
env?: {
|
|
634
|
+
key: string;
|
|
635
|
+
required?: boolean | undefined;
|
|
636
|
+
}[] | undefined;
|
|
637
|
+
claudeDoc?: string | undefined;
|
|
638
|
+
conflicts?: string[] | undefined;
|
|
639
|
+
removable?: boolean | undefined;
|
|
640
|
+
}>;
|
|
641
|
+
type FeatureManifest = z.infer<typeof featureManifestSchema>;
|
|
642
|
+
/** vitrine.json — the client repo's lock file (§6). */
|
|
643
|
+
declare const vitrineLockSchema: z.ZodObject<{
|
|
644
|
+
kitVersion: z.ZodString;
|
|
645
|
+
contracts: z.ZodString;
|
|
646
|
+
backend: z.ZodEnum<["payload", "vendure"]>;
|
|
647
|
+
tier: z.ZodEnum<["catalog", "simple-store", "full-store"]>;
|
|
648
|
+
features: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
649
|
+
version: z.ZodString;
|
|
650
|
+
}, "strip", z.ZodTypeAny, {
|
|
651
|
+
version: string;
|
|
652
|
+
}, {
|
|
653
|
+
version: string;
|
|
654
|
+
}>>>;
|
|
655
|
+
}, "strip", z.ZodTypeAny, {
|
|
656
|
+
backend: "payload" | "vendure";
|
|
657
|
+
tier: "catalog" | "simple-store" | "full-store";
|
|
658
|
+
features: Record<string, {
|
|
659
|
+
version: string;
|
|
660
|
+
}>;
|
|
661
|
+
kitVersion: string;
|
|
662
|
+
contracts: string;
|
|
663
|
+
}, {
|
|
664
|
+
backend: "payload" | "vendure";
|
|
665
|
+
tier: "catalog" | "simple-store" | "full-store";
|
|
666
|
+
kitVersion: string;
|
|
667
|
+
contracts: string;
|
|
668
|
+
features?: Record<string, {
|
|
669
|
+
version: string;
|
|
670
|
+
}> | undefined;
|
|
671
|
+
}>;
|
|
672
|
+
type VitrineLock = z.infer<typeof vitrineLockSchema>;
|
|
673
|
+
/** registry/_index.json — the registry manifest: all features + the kit version. */
|
|
674
|
+
declare const registryIndexSchema: z.ZodObject<{
|
|
675
|
+
kitVersion: z.ZodString;
|
|
676
|
+
contracts: z.ZodString;
|
|
677
|
+
features: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
678
|
+
title: z.ZodString;
|
|
679
|
+
kitVersion: z.ZodString;
|
|
680
|
+
tier: z.ZodArray<z.ZodEnum<["catalog", "simple-store", "full-store"]>, "many">;
|
|
681
|
+
}, "strip", z.ZodTypeAny, {
|
|
682
|
+
tier: ("catalog" | "simple-store" | "full-store")[];
|
|
683
|
+
title: string;
|
|
684
|
+
kitVersion: string;
|
|
685
|
+
}, {
|
|
686
|
+
tier: ("catalog" | "simple-store" | "full-store")[];
|
|
687
|
+
title: string;
|
|
688
|
+
kitVersion: string;
|
|
689
|
+
}>>>;
|
|
690
|
+
}, "strip", z.ZodTypeAny, {
|
|
691
|
+
features: Record<string, {
|
|
692
|
+
tier: ("catalog" | "simple-store" | "full-store")[];
|
|
693
|
+
title: string;
|
|
694
|
+
kitVersion: string;
|
|
695
|
+
}>;
|
|
696
|
+
kitVersion: string;
|
|
697
|
+
contracts: string;
|
|
698
|
+
}, {
|
|
699
|
+
kitVersion: string;
|
|
700
|
+
contracts: string;
|
|
701
|
+
features?: Record<string, {
|
|
702
|
+
tier: ("catalog" | "simple-store" | "full-store")[];
|
|
703
|
+
title: string;
|
|
704
|
+
kitVersion: string;
|
|
705
|
+
}> | undefined;
|
|
706
|
+
}>;
|
|
707
|
+
type RegistryIndex = z.infer<typeof registryIndexSchema>;
|
|
708
|
+
|
|
709
|
+
declare const CONTRACTS_VERSION: "1.0.0";
|
|
710
|
+
|
|
711
|
+
export { BACKENDS, BLUEPRINT_COLLECTIONS, BLUEPRINT_FIELD_TYPES, type Backend, type BlueprintCollection, type BlueprintExtension, type BlueprintFieldDef, type BlueprintFieldType, type BlueprintManifest, COLOR_TOKENS, CONTRACTS_VERSION, type Cart, type CartLine, type CatalogSource, type Category, type ColorToken, type CommerceBackend, type CurrencyCode, type Extend, FONT_TOKENS, FONT_WEIGHT_TOKENS, type FeatureManifest, type FontToken, type FontWeightToken, LEADING_TOKENS, type LayoutSection, type LeadingToken, MOTION_TOKENS, type Money, type MotionToken, type Order, type OrderLine, type OrderStatus, type Product, type ProductImage, type ProductQuery, type ProductSort, RADIUS_TOKENS, type RadiusToken, type RegistryIndex, SHADOW_TOKENS, SINGLETON_TOKENS, SLOT_IDS, SPACE_TOKENS, type Seo, type ShadowToken, type SingletonToken, type SiteConfig, type SlotId, type SlotMount, type SlotRegistration, type SpaceToken, TIERS, TOKEN_CSS_VARS, TRACKING_TOKENS, type Tier, type TrackingToken, type Variant, type VitrineLock, backendSchema, blueprintCollectionSchema, blueprintFieldDefSchema, blueprintManifestSchema, cssVar, featureEnvSchema, featureFileMapSchema, featureManifestSchema, i18nSchema, integrationsSchema, layoutSectionSchema, registryIndexSchema, siteConfigSchema, slotIdSchema, slotRegistrationSchema, themeSchema, tierSchema, vitrineLockSchema, vitrinePreset };
|
package/dist/index.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ declare const vitrinePreset: {
|
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* Money — an integer in the currency's minor units (cents).
|
|
48
|
-
*
|
|
48
|
+
* 2490 = 24.90. Decision is fixed (see the demo seed, spec §18.2).
|
|
49
49
|
*/
|
|
50
50
|
type Money = number;
|
|
51
51
|
/** ISO 4217, e.g. 'USD', 'EUR', 'GBP'. */
|
package/package.json
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitrine-kit/contracts",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Vitrine — the five stable contracts: Tokens, Data, Slots, Config, Blueprint.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=20"
|
|
10
|
+
},
|
|
7
11
|
"types": "./dist/index.d.ts",
|
|
8
|
-
"main": "./dist/index.
|
|
12
|
+
"main": "./dist/index.cjs",
|
|
9
13
|
"module": "./dist/index.js",
|
|
10
14
|
"exports": {
|
|
11
15
|
".": {
|
|
12
16
|
"types": "./dist/index.d.ts",
|
|
13
|
-
"import": "./dist/index.js"
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"require": "./dist/index.cjs",
|
|
19
|
+
"default": "./dist/index.js"
|
|
14
20
|
}
|
|
15
21
|
},
|
|
16
22
|
"files": [
|
|
@@ -32,7 +38,7 @@
|
|
|
32
38
|
"zod-to-json-schema": "^3.24.1"
|
|
33
39
|
},
|
|
34
40
|
"scripts": {
|
|
35
|
-
"build": "tsup src/index.ts --format esm --dts --clean",
|
|
41
|
+
"build": "tsup src/index.ts --format esm,cjs --dts --clean",
|
|
36
42
|
"typecheck": "tsc --noEmit",
|
|
37
43
|
"test": "vitest run --passWithNoTests",
|
|
38
44
|
"schemas": "tsx scripts/generate-schemas.ts"
|