create-brainerce-store 1.68.0 → 1.71.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.
Files changed (32) hide show
  1. package/dist/index.js +22 -2
  2. package/messages/en.json +52 -2
  3. package/messages/he.json +52 -2
  4. package/package.json +1 -1
  5. package/templates/nextjs/base/src/app/checkout/page.tsx +1018 -1017
  6. package/templates/nextjs/base/src/app/products/[slug]/page.tsx +1 -1
  7. package/templates/nextjs/base/src/app/register/page.tsx +67 -64
  8. package/templates/nextjs/base/src/components/account/profile-section.tsx +303 -226
  9. package/templates/nextjs/base/src/components/auth/register-form.tsx +326 -245
  10. package/templates/nextjs/base/src/components/checkout/custom-fields-step.tsx +306 -294
  11. package/templates/nextjs/base/src/components/checkout/date-picker.tsx +13 -1
  12. package/templates/nextjs/base/src/components/checkout/datetime-picker.tsx +61 -21
  13. package/templates/nextjs/base/src/components/shared/birthday-picker.tsx +258 -0
  14. package/templates/nextjs/base/src/core/lib/auth.ts +162 -154
  15. package/templates/nextjs/base/src/core/lib/birthday.ts +74 -0
  16. package/templates/nextjs/base/src/core/lib/store-info.ts +10 -0
  17. package/templates/nextjs/base/src/ui/layout/newsletter-signup.tsx +143 -0
  18. package/templates/nextjs/base/src/ui/layout/site-footer.tsx.ejs +18 -2
  19. package/templates/nextjs/base/src/ui/product/back-in-stock-form.tsx +173 -0
  20. package/templates/nextjs/base/src/ui/product/product-client-section.tsx +484 -455
  21. package/templates/nextjs/base/src/ui/product/review-form.tsx +136 -12
  22. package/templates/nextjs/base/src/ui/product/reviews-section.tsx.ejs +139 -108
  23. package/templates/nextjs/designs/atelier/ui/layout/site-footer.tsx.ejs +155 -142
  24. package/templates/nextjs/designs/atelier/ui/product/product-client-section.tsx +500 -477
  25. package/templates/nextjs/designs/atelier/ui/product/review-form.tsx +135 -11
  26. package/templates/nextjs/designs/atelier/ui/product/reviews-section.tsx.ejs +179 -148
  27. package/templates/nextjs/ui-canvas/layout/newsletter-signup.tsx +122 -0
  28. package/templates/nextjs/ui-canvas/layout/site-footer.tsx.ejs +87 -83
  29. package/templates/nextjs/ui-canvas/product/back-in-stock-form.tsx +151 -0
  30. package/templates/nextjs/ui-canvas/product/product-client-section.tsx +373 -352
  31. package/templates/nextjs/ui-canvas/product/review-form.tsx +129 -11
  32. package/templates/nextjs/ui-canvas/product/reviews-section.tsx.ejs +127 -96
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.68.0",
34
+ version: "1.71.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"
@@ -206,7 +206,27 @@ var BRAINERCE_RUNTIME_DEPS = Object.freeze({
206
206
  // dashboard's "orders from ChatGPT/Google/…" reporting. No template code
207
207
  // depends on it (fully automatic), but scaffolds should ship the SDK that
208
208
  // actually reports attribution.
209
- brainerce: "^1.58.0",
209
+ // 1.60 adds marketing.subscribe() — confirmed opt-in for a storefront
210
+ // newsletter signup. The scaffolded footer's signup form calls it, so an
211
+ // older SDK fails type-check at scaffold time.
212
+ // 1.61 adds stockAlerts.subscribe() plus two fields the scaffolded product
213
+ // page reads to decide whether to offer it at all —
214
+ // StoreInfo.stockAlertsEnabled (the merchant's switch) and
215
+ // InventoryInfo.backorderMode (an alert on a backorderable item is a
216
+ // no-op). All three are referenced by the generated back-in-stock form, so
217
+ // an older SDK fails type-check at scaffold time.
218
+ // 1.62 adds the availability clock. The scaffolded DATE/DATETIME checkout
219
+ // pickers pass `{ timezone }` as a third argument to isCalendarDateAllowed()/
220
+ // computeAvailableSlots()/getBusinessHoursForDate() — without it the
221
+ // leadTimeMinutes/cutoffTime/maxDaysAhead bounds are skipped and the picker
222
+ // offers days the API then rejects — and an older SDK types those helpers
223
+ // with two parameters, so the scaffold fails type-check outright.
224
+ // 1.63 adds customer photos on reviews. The scaffolded review form calls
225
+ // uploadReviewPhoto() and passes `imageKeys` on submit, reads `photos` off
226
+ // getMyProductReview() to decide whether to render a picker at all, and the
227
+ // reviews list renders `review.images`. None of those exist on an older SDK,
228
+ // so the scaffold fails type-check outright.
229
+ brainerce: "^1.63.0",
210
230
  "isomorphic-dompurify": "^3.8.0"
211
231
  });
212
232
 
package/messages/en.json CHANGED
@@ -38,7 +38,28 @@
38
38
  "allRightsReserved": "All rights reserved.",
39
39
  "store": "Store",
40
40
  "save": "Save",
41
- "cancel": "Cancel"
41
+ "cancel": "Cancel",
42
+ "birthday": "Birthday",
43
+ "birthdayMonth": "Month",
44
+ "birthdayDay": "Day",
45
+ "birthdayGiftNote": "Add your birthday and a gift arrives by email on the day.",
46
+ "birthdayIncomplete": "Choose both a month and a day, or leave both empty.",
47
+ "birthdayRequired": "Choose your birthday month and day to continue.",
48
+ "birthdayPlaceholder": "Choose your birthday",
49
+ "birthdayClear": "Clear",
50
+ "birthdayDisplay": "{month} {day}",
51
+ "monthJanuary": "January",
52
+ "monthFebruary": "February",
53
+ "monthMarch": "March",
54
+ "monthApril": "April",
55
+ "monthMay": "May",
56
+ "monthJune": "June",
57
+ "monthJuly": "July",
58
+ "monthAugust": "August",
59
+ "monthSeptember": "September",
60
+ "monthOctober": "October",
61
+ "monthNovember": "November",
62
+ "monthDecember": "December"
42
63
  },
43
64
  "nav": {
44
65
  "products": "Products",
@@ -130,7 +151,13 @@
130
151
  "saving": "Saving…",
131
152
  "submittingBtn": "Submitting…",
132
153
  "saveChanges": "Save changes",
133
- "submitReview": "Submit review"
154
+ "submitReview": "Submit review",
155
+ "addPhotos": "Add photos",
156
+ "removePhoto": "Remove photo",
157
+ "photoUploading": "Uploading…",
158
+ "photoTooLarge": "That photo is too large. Please pick a smaller one.",
159
+ "photoUploadFailed": "Could not upload that photo. Please try another.",
160
+ "photosNeedApproval": "Photos are checked before they appear, so yours may not show right away."
134
161
  },
135
162
  "customization": {
136
163
  "title": "Personalize this product",
@@ -258,6 +285,8 @@
258
285
  "customFieldsDateNextMonth": "Next month",
259
286
  "customFieldsTimeLabel": "Time",
260
287
  "customFieldsTimeClosed": "No delivery times are available on this date.",
288
+ "customFieldsTimeNoneLeft": "Every time on this date has already passed. Please pick a later date.",
289
+ "customFieldsTimeTo": "to",
261
290
  "changeOptions": "Change options",
262
291
  "surcharges": "Additional charges"
263
292
  },
@@ -496,6 +525,27 @@
496
525
  "genericError": "Something went wrong. Please try again.",
497
526
  "fieldRequired": "{label} is required"
498
527
  },
528
+ "backInStock": {
529
+ "title": "Email me when it's back",
530
+ "subtitle": "One message about this item, nothing else. You can stop it any time.",
531
+ "placeholder": "your@email.com",
532
+ "submit": "Notify me",
533
+ "submitting": "Sending...",
534
+ "doneTitle": "We'll email you when it's back",
535
+ "doneBody": "Stock is limited, so it may go quickly once it returns.",
536
+ "genericError": "Something went wrong. Please try again."
537
+ },
538
+ "newsletter": {
539
+ "title": "Join our newsletter",
540
+ "subtitle": "Offers and new arrivals, straight to your inbox.",
541
+ "placeholder": "your@email.com",
542
+ "submit": "Subscribe",
543
+ "submitting": "Sending...",
544
+ "checkEmailTitle": "Almost there — check your email",
545
+ "checkEmailBody": "We've sent you a link to confirm. Look in your spam folder too; you won't get another copy for 24 hours.",
546
+ "discountCode": "Your code: {code}",
547
+ "genericError": "Something went wrong. Please try again."
548
+ },
499
549
  "content": {
500
550
  "faqTitle": "Frequently Asked Questions",
501
551
  "faqEmptyTitle": "FAQ coming soon",
package/messages/he.json CHANGED
@@ -38,7 +38,28 @@
38
38
  "allRightsReserved": "כל הזכויות שמורות.",
39
39
  "store": "חנות",
40
40
  "save": "שמירה",
41
- "cancel": "ביטול"
41
+ "cancel": "ביטול",
42
+ "birthday": "יום הולדת",
43
+ "birthdayMonth": "חודש",
44
+ "birthdayDay": "יום",
45
+ "birthdayGiftNote": "הוסיפו את יום ההולדת ותקבלו מתנה במייל ביום עצמו.",
46
+ "birthdayIncomplete": "בחרו גם חודש וגם יום, או השאירו את שניהם ריקים.",
47
+ "birthdayRequired": "בחרו את חודש ויום ההולדת כדי להמשיך.",
48
+ "birthdayPlaceholder": "בחרו את יום ההולדת",
49
+ "birthdayClear": "ניקוי",
50
+ "birthdayDisplay": "{day} ב{month}",
51
+ "monthJanuary": "ינואר",
52
+ "monthFebruary": "פברואר",
53
+ "monthMarch": "מרץ",
54
+ "monthApril": "אפריל",
55
+ "monthMay": "מאי",
56
+ "monthJune": "יוני",
57
+ "monthJuly": "יולי",
58
+ "monthAugust": "אוגוסט",
59
+ "monthSeptember": "ספטמבר",
60
+ "monthOctober": "אוקטובר",
61
+ "monthNovember": "נובמבר",
62
+ "monthDecember": "דצמבר"
42
63
  },
43
64
  "nav": {
44
65
  "products": "מוצרים",
@@ -130,7 +151,13 @@
130
151
  "saving": "שומר…",
131
152
  "submittingBtn": "שולח…",
132
153
  "saveChanges": "שמירת שינויים",
133
- "submitReview": "שליחת ביקורת"
154
+ "submitReview": "שליחת ביקורת",
155
+ "addPhotos": "הוספת תמונות",
156
+ "removePhoto": "הסרת תמונה",
157
+ "photoUploading": "מעלה...",
158
+ "photoTooLarge": "התמונה הזו גדולה מדי. בחרו תמונה קטנה יותר.",
159
+ "photoUploadFailed": "לא הצלחנו להעלות את התמונה. נסו תמונה אחרת.",
160
+ "photosNeedApproval": "התמונות נבדקות לפני שהן מופיעות, כך שייתכן שהתמונה שלכם לא תוצג מיד."
134
161
  },
135
162
  "customization": {
136
163
  "title": "התאמה אישית של המוצר",
@@ -258,6 +285,8 @@
258
285
  "customFieldsDateNextMonth": "חודש הבא",
259
286
  "customFieldsTimeLabel": "שעה",
260
287
  "customFieldsTimeClosed": "אין שעות משלוח זמינות בתאריך הזה.",
288
+ "customFieldsTimeNoneLeft": "כל השעות בתאריך הזה כבר עברו. בחרו תאריך מאוחר יותר.",
289
+ "customFieldsTimeTo": "עד",
261
290
  "changeOptions": "שנה אפשרויות",
262
291
  "surcharges": "תוספות"
263
292
  },
@@ -496,6 +525,27 @@
496
525
  "genericError": "משהו השתבש. אנא נסה שוב.",
497
526
  "fieldRequired": "השדה {label} הוא חובה"
498
527
  },
528
+ "backInStock": {
529
+ "title": "עדכנו אותי כשחוזר למלאי",
530
+ "subtitle": "הודעה אחת על הפריט הזה, ותו לא. אפשר לבטל בכל רגע.",
531
+ "placeholder": "your@email.com",
532
+ "submit": "עדכנו אותי",
533
+ "submitting": "שולח...",
534
+ "doneTitle": "נעדכן אותך כשהפריט יחזור",
535
+ "doneBody": "הכמות מוגבלת, אז ייתכן שהפריט ייגמר מהר.",
536
+ "genericError": "משהו השתבש. אפשר לנסות שוב."
537
+ },
538
+ "newsletter": {
539
+ "title": "הצטרפו לניוזלטר",
540
+ "subtitle": "מבצעים ומוצרים חדשים, ישירות למייל.",
541
+ "placeholder": "your@email.com",
542
+ "submit": "הרשמה",
543
+ "submitting": "שולח...",
544
+ "checkEmailTitle": "כמעט סיימנו — בדקו את המייל",
545
+ "checkEmailBody": "שלחנו לכם קישור לאישור. בדקו גם בתיקיית הספאם; עותק נוסף לא יישלח ב-24 השעות הקרובות.",
546
+ "discountCode": "הקוד שלכם: {code}",
547
+ "genericError": "משהו השתבש. נסו שוב."
548
+ },
499
549
  "content": {
500
550
  "faqTitle": "שאלות נפוצות",
501
551
  "faqEmptyTitle": "השאלות הנפוצות בדרך",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-brainerce-store",
3
- "version": "1.68.0",
3
+ "version": "1.71.0",
4
4
  "description": "Scaffold a production-ready e-commerce storefront connected to Brainerce",
5
5
  "bin": {
6
6
  "create-brainerce-store": "dist/index.js"