create-brainerce-store 1.20.1 → 1.22.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/dist/index.js +29 -6
- package/messages/he.json +366 -366
- package/package.json +1 -1
- package/templates/nextjs/base/next.config.ts +31 -31
- package/templates/nextjs/base/src/components/checkout/payment-step.tsx +39 -12
- package/templates/nextjs/themes/luxury/globals.css +399 -0
- package/templates/nextjs/themes/luxury/theme.json +23 -0
- package/templates/nextjs/themes/playful/globals.css +400 -0
- package/templates/nextjs/themes/playful/theme.json +23 -0
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ var require_package = __commonJS({
|
|
|
31
31
|
"package.json"(exports2, module2) {
|
|
32
32
|
module2.exports = {
|
|
33
33
|
name: "create-brainerce-store",
|
|
34
|
-
version: "1.
|
|
34
|
+
version: "1.22.0",
|
|
35
35
|
description: "Scaffold a production-ready e-commerce storefront connected to Brainerce",
|
|
36
36
|
bin: {
|
|
37
37
|
"create-brainerce-store": "dist/index.js"
|
|
@@ -220,8 +220,16 @@ async function runInteractive(defaults) {
|
|
|
220
220
|
description: "Clean, neutral design with Inter font",
|
|
221
221
|
value: "minimal"
|
|
222
222
|
},
|
|
223
|
-
{
|
|
224
|
-
|
|
223
|
+
{
|
|
224
|
+
title: "Luxury",
|
|
225
|
+
description: "Dark, sophisticated design with Cormorant Garamond serif font",
|
|
226
|
+
value: "luxury"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
title: "Playful",
|
|
230
|
+
description: "Warm, vibrant design with Nunito rounded font",
|
|
231
|
+
value: "playful"
|
|
232
|
+
}
|
|
225
233
|
],
|
|
226
234
|
initial: 0
|
|
227
235
|
},
|
|
@@ -260,8 +268,23 @@ var import_ejs = __toESM(require("ejs"));
|
|
|
260
268
|
function getDirection(language) {
|
|
261
269
|
return language === "he" ? "rtl" : "ltr";
|
|
262
270
|
}
|
|
263
|
-
function getFontConfig(language) {
|
|
264
|
-
|
|
271
|
+
function getFontConfig(language, theme) {
|
|
272
|
+
const isHebrew = language === "he";
|
|
273
|
+
if (theme === "luxury") {
|
|
274
|
+
const subsets = isHebrew ? "['latin']" : "['latin']";
|
|
275
|
+
return {
|
|
276
|
+
fontImport: "import { Cormorant_Garamond } from 'next/font/google';",
|
|
277
|
+
fontVariable: `const font = Cormorant_Garamond({ weight: ['400', '500', '600', '700'], subsets: ${subsets} });`
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
if (theme === "playful") {
|
|
281
|
+
const subsets = isHebrew ? "['latin']" : "['latin']";
|
|
282
|
+
return {
|
|
283
|
+
fontImport: "import { Nunito } from 'next/font/google';",
|
|
284
|
+
fontVariable: `const font = Nunito({ subsets: ${subsets} });`
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
if (isHebrew) {
|
|
265
288
|
return {
|
|
266
289
|
fontImport: "import { Rubik } from 'next/font/google';",
|
|
267
290
|
fontVariable: "const font = Rubik({ subsets: ['hebrew', 'latin'] });"
|
|
@@ -288,7 +311,7 @@ async function scaffold(options) {
|
|
|
288
311
|
throw new Error(`Template "${framework}" not found at ${baseDir}`);
|
|
289
312
|
}
|
|
290
313
|
const direction = getDirection(options.language);
|
|
291
|
-
const fontConfig = getFontConfig(options.language);
|
|
314
|
+
const fontConfig = getFontConfig(options.language, theme);
|
|
292
315
|
const ogLocale = options.language === "he" ? "he_IL" : "en_US";
|
|
293
316
|
const isMultiLocale = options.i18n?.enabled === true && options.i18n.supportedLocales.length > 1;
|
|
294
317
|
const supportedLocales = options.i18n?.supportedLocales || [options.language];
|