@salla.sa/twilight-theme-engine 1.0.8 → 1.0.10
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/{AddToCartForm-RP5PHCHJ.js → AddToCartForm-4KYCJ2UZ.js} +3 -3
- package/dist/{AddToCartForm-RP5PHCHJ.js.map → AddToCartForm-4KYCJ2UZ.js.map} +1 -1
- package/dist/{BlogAuthorPage-TIYAAFGQ.js → BlogAuthorPage-LYM6TVXX.js} +6 -6
- package/dist/{BlogAuthorPage-TIYAAFGQ.js.map → BlogAuthorPage-LYM6TVXX.js.map} +1 -1
- package/dist/{BlogCategoryPage-TYHPN2X7.js → BlogCategoryPage-Q7DYUND5.js} +6 -6
- package/dist/{BlogCategoryPage-TYHPN2X7.js.map → BlogCategoryPage-Q7DYUND5.js.map} +1 -1
- package/dist/{BlogPage-KEGMXIJP.js → BlogPage-PGGJPPUB.js} +5 -5
- package/dist/{BlogPage-KEGMXIJP.js.map → BlogPage-PGGJPPUB.js.map} +1 -1
- package/dist/{BlogSinglePage-7MI27RSA.js → BlogSinglePage-ZWYO4JUJ.js} +5 -5
- package/dist/{BlogSinglePage-7MI27RSA.js.map → BlogSinglePage-ZWYO4JUJ.js.map} +1 -1
- package/dist/{BlogTagPage-W4XQN4BE.js → BlogTagPage-6ZAUZQEX.js} +6 -6
- package/dist/{BlogTagPage-W4XQN4BE.js.map → BlogTagPage-6ZAUZQEX.js.map} +1 -1
- package/dist/{BrandsPage-VN6WHDSV.js → BrandsPage-KIWMKWCX.js} +5 -5
- package/dist/{BrandsPage-VN6WHDSV.js.map → BrandsPage-KIWMKWCX.js.map} +1 -1
- package/dist/{Breadcrumb-YPQLV5BI.js → Breadcrumb-ZTDDSIJS.js} +5 -5
- package/dist/{Breadcrumb-YPQLV5BI.js.map → Breadcrumb-ZTDDSIJS.js.map} +1 -1
- package/dist/{CartItem-GZ6BQMMK.js → CartItem-GD2D3P4F.js} +5 -5
- package/dist/{CartItem-GZ6BQMMK.js.map → CartItem-GD2D3P4F.js.map} +1 -1
- package/dist/{CartSummary-DSALYN3D.js → CartSummary-B4J42D6C.js} +5 -5
- package/dist/{CartSummary-DSALYN3D.js.map → CartSummary-B4J42D6C.js.map} +1 -1
- package/dist/{Copyright-4HXV2C2T.js → Copyright-AFLQBB32.js} +3 -3
- package/dist/{Copyright-4HXV2C2T.js.map → Copyright-AFLQBB32.js.map} +1 -1
- package/dist/{CustomerLayout-3P46LSYK.js → CustomerLayout-V5Y6I7QT.js} +5 -5
- package/dist/{CustomerLayout-3P46LSYK.js.map → CustomerLayout-V5Y6I7QT.js.map} +1 -1
- package/dist/{Footer-YBFOTGWY.js → Footer-FT6ZOWK4.js} +5 -5
- package/dist/{Footer-YBFOTGWY.js.map → Footer-FT6ZOWK4.js.map} +1 -1
- package/dist/{Header-44B2BS7J.js → Header-EHXJSA2M.js} +4 -4
- package/dist/{Header-44B2BS7J.js.map → Header-EHXJSA2M.js.map} +1 -1
- package/dist/{LoyaltyPage-7KXWYAJF.js → LoyaltyPage-ZEPAJWBL.js} +5 -5
- package/dist/{LoyaltyPage-7KXWYAJF.js.map → LoyaltyPage-ZEPAJWBL.js.map} +1 -1
- package/dist/{MainMenu-6HUTG3RD.js → MainMenu-62DJ2TLV.js} +3 -3
- package/dist/{MainMenu-6HUTG3RD.js.map → MainMenu-62DJ2TLV.js.map} +1 -1
- package/dist/{MasterLayout-NJIQTLE2.js → MasterLayout-7MMMKDNO.js} +5 -5
- package/dist/{MasterLayout-NJIQTLE2.js.map → MasterLayout-7MMMKDNO.js.map} +1 -1
- package/dist/{MobileMenu-B7N6YDYR.js → MobileMenu-RR7QCX7D.js} +5 -5
- package/dist/{MobileMenu-B7N6YDYR.js.map → MobileMenu-RR7QCX7D.js.map} +1 -1
- package/dist/{NotificationsPage-EGMAY5YG.js → NotificationsPage-R46LMGTU.js} +5 -5
- package/dist/{NotificationsPage-EGMAY5YG.js.map → NotificationsPage-R46LMGTU.js.map} +1 -1
- package/dist/{OrderSinglePage-427DGSAE.js → OrderSinglePage-33ZLFV46.js} +5 -5
- package/dist/{OrderSinglePage-427DGSAE.js.map → OrderSinglePage-33ZLFV46.js.map} +1 -1
- package/dist/{OrdersPage-HBIJMT4A.js → OrdersPage-X6G6XF7R.js} +5 -5
- package/dist/{OrdersPage-HBIJMT4A.js.map → OrdersPage-X6G6XF7R.js.map} +1 -1
- package/dist/{PageSingle-A7GZ3P5D.js → PageSingle-2DAWIAF3.js} +3 -3
- package/dist/{PageSingle-A7GZ3P5D.js.map → PageSingle-2DAWIAF3.js.map} +1 -1
- package/dist/{ProductDetails-Z2BCT44E.js → ProductDetails-YCCGVGEN.js} +3 -3
- package/dist/{ProductDetails-Z2BCT44E.js.map → ProductDetails-YCCGVGEN.js.map} +1 -1
- package/dist/{ProfilePage-X6G6FN27.js → ProfilePage-QY3NG3QL.js} +5 -5
- package/dist/{ProfilePage-X6G6FN27.js.map → ProfilePage-QY3NG3QL.js.map} +1 -1
- package/dist/{SeoCartWidget-LTH57WOW.js → SeoCartWidget-ARXWFPJ7.js} +5 -5
- package/dist/{SeoCartWidget-LTH57WOW.js.map → SeoCartWidget-ARXWFPJ7.js.map} +1 -1
- package/dist/{SettingsPage-E2XCFHZR.js → SettingsPage-3VSOSHBS.js} +5 -5
- package/dist/{SettingsPage-E2XCFHZR.js.map → SettingsPage-3VSOSHBS.js.map} +1 -1
- package/dist/{StoreClosedNotification-Z5IDU62B.js → StoreClosedNotification-5MN5QRZW.js} +6 -6
- package/dist/{StoreClosedNotification-Z5IDU62B.js.map → StoreClosedNotification-5MN5QRZW.js.map} +1 -1
- package/dist/{TestimonialsPage-RRSFTAAX.js → TestimonialsPage-L2K33CLM.js} +3 -3
- package/dist/{TestimonialsPage-RRSFTAAX.js.map → TestimonialsPage-L2K33CLM.js.map} +1 -1
- package/dist/{ThankYouPage-ANHIH5DS.js → ThankYouPage-3R4KA3BG.js} +37 -32
- package/dist/ThankYouPage-3R4KA3BG.js.map +1 -0
- package/dist/{WalletPage-MSNEGK2G.js → WalletPage-VICZHQ4Z.js} +5 -5
- package/dist/{WalletPage-MSNEGK2G.js.map → WalletPage-VICZHQ4Z.js.map} +1 -1
- package/dist/{WishlistPage-SITS7J5U.js → WishlistPage-3ZS7RK3B.js} +5 -5
- package/dist/{WishlistPage-SITS7J5U.js.map → WishlistPage-3ZS7RK3B.js.map} +1 -1
- package/dist/{chunk-XDO5PHWB.js → chunk-4WPUOY43.js} +4 -4
- package/dist/{chunk-XDO5PHWB.js.map → chunk-4WPUOY43.js.map} +1 -1
- package/dist/{chunk-XOO53ERM.js → chunk-ABLOTMQW.js} +3 -3
- package/dist/{chunk-XOO53ERM.js.map → chunk-ABLOTMQW.js.map} +1 -1
- package/dist/{chunk-SBTJGOOG.js → chunk-ACILA7G4.js} +3 -3
- package/dist/{chunk-SBTJGOOG.js.map → chunk-ACILA7G4.js.map} +1 -1
- package/dist/{chunk-VKGWWOIN.js → chunk-AHW3CCWQ.js} +6 -6
- package/dist/{chunk-VKGWWOIN.js.map → chunk-AHW3CCWQ.js.map} +1 -1
- package/dist/{chunk-UXMTMOFL.js → chunk-CWCFBRUA.js} +4 -4
- package/dist/{chunk-UXMTMOFL.js.map → chunk-CWCFBRUA.js.map} +1 -1
- package/dist/chunk-G3DZLRE7.js +14 -0
- package/dist/{chunk-CXBNSFGJ.js.map → chunk-G3DZLRE7.js.map} +1 -1
- package/dist/{chunk-WKJUQQQI.js → chunk-GDYTDRQS.js} +5 -5
- package/dist/{chunk-WKJUQQQI.js.map → chunk-GDYTDRQS.js.map} +1 -1
- package/dist/{chunk-NECVWHKY.js → chunk-K7CYKUB4.js} +7 -7
- package/dist/{chunk-NECVWHKY.js.map → chunk-K7CYKUB4.js.map} +1 -1
- package/dist/{chunk-QCBVS4V6.js → chunk-O4AHRRHE.js} +4 -4
- package/dist/{chunk-QCBVS4V6.js.map → chunk-O4AHRRHE.js.map} +1 -1
- package/dist/{chunk-OBJ3DFLM.js → chunk-W6XHHZXP.js} +3 -3
- package/dist/{chunk-OBJ3DFLM.js.map → chunk-W6XHHZXP.js.map} +1 -1
- package/dist/{chunk-E7CWROFB.js → chunk-WFZB6WNU.js} +3 -3
- package/dist/{chunk-E7CWROFB.js.map → chunk-WFZB6WNU.js.map} +1 -1
- package/dist/components/cart/index.js +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/drawer/index.js +3 -3
- package/dist/components/home/index.js +5 -5
- package/dist/components/layout/index.js +5 -5
- package/dist/components/product/index.js +4 -4
- package/dist/components/store/index.js +5 -5
- package/dist/{document-class-75UY33EG.js → document-class-UVI3RVQT.js} +3 -3
- package/dist/{document-class-75UY33EG.js.map → document-class-UVI3RVQT.js.map} +1 -1
- package/dist/hooks/index.js +3 -3
- package/dist/hooks/useGtm.js +3 -3
- package/dist/hooks/useMoney.js +3 -3
- package/dist/hooks/useStore.js +3 -3
- package/dist/index.js +3 -3
- package/dist/{not-found-RH4LOYIJ.js → not-found-IKZRBSTP.js} +5 -5
- package/dist/{not-found-RH4LOYIJ.js.map → not-found-IKZRBSTP.js.map} +1 -1
- package/dist/providers/index.js +3 -3
- package/dist/routes/account/orders.js +1 -1
- package/dist/routes/account.js +6 -6
- package/dist/routes/blog.js +5 -5
- package/dist/routes/brands.js +1 -1
- package/dist/routes/cart.js +7 -7
- package/dist/routes/home.js +6 -6
- package/dist/routes/loyalty.js +1 -1
- package/dist/routes/page.js +1 -1
- package/dist/routes/product-listing.js +5 -5
- package/dist/routes/product.js +5 -5
- package/dist/routes/testimonials.js +1 -1
- package/dist/routes/thank-you/ThankYouPage.d.ts.map +1 -1
- package/dist/routes/thank-you/loader.d.ts.map +1 -1
- package/dist/routes/thank-you/types.d.ts +2 -1
- package/dist/routes/thank-you/types.d.ts.map +1 -1
- package/dist/routes/thank-you.js +9 -6
- package/dist/routes/thank-you.js.map +1 -1
- package/dist/skeleton.js +6 -6
- package/dist/tanstack.js +2 -2
- package/dist/vite/adapters/tanstack.adapter.d.ts.map +1 -1
- package/dist/vite/index.js +65 -2
- package/dist/vite/index.js.map +1 -1
- package/dist/vite/plugins/worker-config.d.ts +42 -0
- package/dist/vite/plugins/worker-config.d.ts.map +1 -0
- package/dist/vite/types.d.ts +16 -0
- package/dist/vite/types.d.ts.map +1 -1
- package/package.json +4 -2
- package/dist/ThankYouPage-ANHIH5DS.js.map +0 -1
- package/dist/chunk-CXBNSFGJ.js +0 -14
package/dist/routes/product.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { buildHreflangAlternates } from '../chunk-TZ3E5BN4.js';
|
|
2
|
-
import { ProductsSlider, LazyTestimonials } from '../chunk-
|
|
2
|
+
import { ProductsSlider, LazyTestimonials } from '../chunk-4WPUOY43.js';
|
|
3
3
|
import { product } from '../chunk-ZNOJPVX3.js';
|
|
4
|
-
import { ProductGallery, LazyProductDetails, LazyAddToCartForm } from '../chunk-
|
|
4
|
+
import { ProductGallery, LazyProductDetails, LazyAddToCartForm } from '../chunk-AHW3CCWQ.js';
|
|
5
5
|
import '../chunk-G7ALL4BC.js';
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-K7CYKUB4.js';
|
|
7
|
+
import '../chunk-GDYTDRQS.js';
|
|
8
8
|
import '../chunk-JKIRRMBU.js';
|
|
9
9
|
import '../chunk-2JV6WZ6O.js';
|
|
10
10
|
import '../chunk-VVZNW5CB.js';
|
|
@@ -31,7 +31,7 @@ import { useComments } from '../chunk-YMVLYYLU.js';
|
|
|
31
31
|
import '../chunk-RJPPO3ET.js';
|
|
32
32
|
import { HookSlot } from '../chunk-Q7VWURUR.js';
|
|
33
33
|
import '../chunk-GU2KUQVD.js';
|
|
34
|
-
import { LazyBreadcrumb, LazyRenderWhenVisible } from '../chunk-
|
|
34
|
+
import { LazyBreadcrumb, LazyRenderWhenVisible } from '../chunk-ABLOTMQW.js';
|
|
35
35
|
import '../chunk-AXW67SY7.js';
|
|
36
36
|
import '../chunk-BYMOPN2S.js';
|
|
37
37
|
import '../chunk-6BZ5TKEV.js';
|
|
@@ -18,7 +18,7 @@ async function testimonialsLoader(_ctx) {
|
|
|
18
18
|
|
|
19
19
|
// src/routes/testimonials/index.tsx
|
|
20
20
|
var LazyTestimonialsPage = lazy(
|
|
21
|
-
() => import('../TestimonialsPage-
|
|
21
|
+
() => import('../TestimonialsPage-L2K33CLM.js').then((m) => ({ default: m.TestimonialsPage }))
|
|
22
22
|
);
|
|
23
23
|
var TestimonialsPage = LazyTestimonialsPage;
|
|
24
24
|
async function loader(ctx, extend) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThankYouPage.d.ts","sourceRoot":"","sources":["../../../src/routes/thank-you/ThankYouPage.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAMjD,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,eAAe,EACf,QAAyB,GAC1B,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ThankYouPage.d.ts","sourceRoot":"","sources":["../../../src/routes/thank-you/ThankYouPage.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAMjD,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,eAAe,EACf,QAAyB,GAC1B,EAAE,iBAAiB,2CA+NnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/routes/thank-you/loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/routes/thank-you/loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAMvE,wBAAsB,cAAc,CAAC,EACnC,MAAM,GACP,EAAE;IACD,MAAM,EAAE,oBAAoB,CAAC;CAC9B,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA6B7B"}
|
|
@@ -5,7 +5,8 @@ export interface ThankYouLoaderParams {
|
|
|
5
5
|
}
|
|
6
6
|
export interface ThankYouPageProps {
|
|
7
7
|
page: Page;
|
|
8
|
-
|
|
8
|
+
/** Absent when the authenticated `orders/{id}` fetch fails (e.g. guest checkout / no token). */
|
|
9
|
+
order?: Order;
|
|
9
10
|
thank_you_title?: string;
|
|
10
11
|
share_message?: string;
|
|
11
12
|
short_share_message?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/routes/thank-you/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/routes/thank-you/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,IAAI,CAAC;IACX,gGAAgG;IAChG,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB"}
|
package/dist/routes/thank-you.js
CHANGED
|
@@ -14,18 +14,21 @@ import { lazy } from 'react';
|
|
|
14
14
|
async function thankYouLoader({
|
|
15
15
|
params
|
|
16
16
|
}) {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
order.
|
|
17
|
+
const orderId = params.orderId;
|
|
18
|
+
const [orderResult, thankYouResult] = await Promise.allSettled([
|
|
19
|
+
order.find(orderId),
|
|
20
|
+
order.thankYou(orderId)
|
|
20
21
|
]);
|
|
22
|
+
const orderData = orderResult.status === "fulfilled" ? orderResult.value.order : void 0;
|
|
23
|
+
const thankYouData = thankYouResult.status === "fulfilled" ? thankYouResult.value : void 0;
|
|
21
24
|
const i18n = getTwilightContext().i18n;
|
|
22
25
|
return {
|
|
23
26
|
page: {
|
|
24
27
|
slug: RouteId.THANK_YOU,
|
|
25
|
-
id: String(
|
|
28
|
+
id: orderData ? String(orderData.id) : orderId,
|
|
26
29
|
title: i18n.t("common.titles.thank_you") || "Thank You"
|
|
27
30
|
},
|
|
28
|
-
order:
|
|
31
|
+
order: orderData,
|
|
29
32
|
thank_you_title: thankYouData?.thank_you_title,
|
|
30
33
|
messages: thankYouData?.messages ?? [],
|
|
31
34
|
share_message: thankYouData?.share_message,
|
|
@@ -35,7 +38,7 @@ async function thankYouLoader({
|
|
|
35
38
|
|
|
36
39
|
// src/routes/thank-you/index.tsx
|
|
37
40
|
var LazyThankYouPage = lazy(
|
|
38
|
-
() => import('../ThankYouPage-
|
|
41
|
+
() => import('../ThankYouPage-3R4KA3BG.js').then((m) => ({ default: m.ThankYouPage }))
|
|
39
42
|
);
|
|
40
43
|
var ThankYouPage = LazyThankYouPage;
|
|
41
44
|
async function loader(ctx, extend) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/routes/thank-you/loader.ts","../../src/routes/thank-you/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../src/routes/thank-you/loader.ts","../../src/routes/thank-you/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAMA,eAAsB,cAAA,CAAe;AAAA,EACnC;AACF,CAAA,EAE+B;AAC7B,EAAA,MAAM,UAAU,MAAA,CAAO,OAAA;AAMvB,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAI,MAAM,QAAQ,UAAA,CAAW;AAAA,IAC7D,KAAA,CAAM,KAAK,OAAO,CAAA;AAAA,IAClB,KAAA,CAAM,SAAS,OAAO;AAAA,GACvB,CAAA;AAED,EAAA,MAAM,YACJ,WAAA,CAAY,MAAA,KAAW,WAAA,GAAc,WAAA,CAAY,MAAM,KAAA,GAAQ,MAAA;AACjE,EAAA,MAAM,YAAA,GAAe,cAAA,CAAe,MAAA,KAAW,WAAA,GAAc,eAAe,KAAA,GAAQ,MAAA;AAEpF,EAAA,MAAM,IAAA,GAAO,oBAAmB,CAAE,IAAA;AAClC,EAAA,OAAO;AAAA,IACL,IAAA,EAAM;AAAA,MACJ,MAAM,OAAA,CAAQ,SAAA;AAAA,MACd,EAAA,EAAI,SAAA,GAAY,MAAA,CAAO,SAAA,CAAU,EAAE,CAAA,GAAI,OAAA;AAAA,MACvC,KAAA,EAAO,IAAA,CAAK,CAAA,CAAE,yBAAyB,CAAA,IAAK;AAAA,KAC9C;AAAA,IACA,KAAA,EAAO,SAAA;AAAA,IACP,iBAAiB,YAAA,EAAc,eAAA;AAAA,IAC/B,QAAA,EAAU,YAAA,EAAc,QAAA,IAAY,EAAC;AAAA,IACrC,eAAe,YAAA,EAAc,aAAA;AAAA,IAC7B,qBAAqB,YAAA,EAAc;AAAA,GACrC;AACF;;;AC9BA,IAAM,gBAAA,GAAmB,IAAA;AAAA,EAAK,MAC5B,OAAO,6BAAgB,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,MAAO,EAAE,OAAA,EAAS,CAAA,CAAE,YAAA,EAAa,CAAE;AACpE,CAAA;AAEO,IAAM,YAAA,GAAe;AAI5B,eAAe,MAAA,CACb,KACA,MAAA,EAI4B;AAC5B,EAAA,MAAM,OAAO,MAAM,cAAA,CAAe,EAAE,MAAA,EAAQ,GAAA,CAAI,QAAQ,CAAA;AAExD,EAAA,IAAI,MAAA,EAAQ;AACV,IAAA,MAAM,KAAA,GAAQ,MAAM,MAAA,CAAO,IAAA,EAAM,GAAG,CAAA;AACpC,IAAA,OAAO,EAAE,GAAG,IAAA,EAAM,GAAG,KAAA,EAAM;AAAA,EAC7B;AACA,EAAA,OAAO,IAAA;AACT;AAEA,SAAS,IAAA,CAAK,KAAsB,IAAA,EAAyC;AAC3E,EAAA,MAAM,IAAA,GAAuB;AAAA,IAC3B,KAAA,EAAO,KAAK,IAAA,CAAK,KAAA;AAAA,IACjB,WAAA,EAAa,KAAK,IAAA,CAAK,WAAA;AAAA,IACvB,oBAAoB,uBAAA,CAAwB,GAAA,CAAI,QAAA,EAAU,GAAA,CAAI,SAAS,QAAQ;AAAA,GACjF;AAEA,EAAA,OAAO,IAAA;AACT;AAEO,IAAM,QAAA,GAAW;AAAA,EACtB,IAAI,OAAA,CAAQ,SAAA;AAAA,EACZ,MAAA;AAAA,EACA,IAAA;AAAA,EACA,SAAA,EAAW;AACb","file":"thank-you.js","sourcesContent":["import type { ThankYouPageProps, ThankYouLoaderParams } from './types';\nimport type { Order } from '../account/types';\nimport { order } from '../../api/order';\nimport { getTwilightContext } from '../../twilight/context';\nimport { RouteId } from '../../router/route-ids';\n\nexport async function thankYouLoader({\n params,\n}: {\n params: ThankYouLoaderParams;\n}): Promise<ThankYouPageProps> {\n const orderId = params.orderId;\n\n // orders/{id} needs a customer token that guest checkout / tokenless SSR lacks (400\n // token_not_provided). Don't let that 500 the page — render whatever resolves.\n // ponytail: guest order detail needs checkout/thank-you to return the order; source it\n // here once that payload is confirmed on a correctly store-bound worker.\n const [orderResult, thankYouResult] = await Promise.allSettled([\n order.find(orderId),\n order.thankYou(orderId),\n ]);\n\n const orderData: Order | undefined =\n orderResult.status === 'fulfilled' ? orderResult.value.order : undefined;\n const thankYouData = thankYouResult.status === 'fulfilled' ? thankYouResult.value : undefined;\n\n const i18n = getTwilightContext().i18n;\n return {\n page: {\n slug: RouteId.THANK_YOU,\n id: orderData ? String(orderData.id) : orderId,\n title: i18n.t('common.titles.thank_you') || 'Thank You',\n },\n order: orderData,\n thank_you_title: thankYouData?.thank_you_title,\n messages: thankYouData?.messages ?? [],\n share_message: thankYouData?.share_message,\n short_share_message: thankYouData?.short_share_message,\n };\n}\n","import type { HeadDescriptor } from '../../utils/head';\nimport { buildHreflangAlternates } from '../../utils/baseHead';\nimport { lazy } from 'react';\nimport { thankYouLoader } from './loader';\nimport type { ThankYouPageProps, ThankYouLoaderParams } from './types';\nimport type { TwilightContext } from '../../twilight/context';\nimport { RouteId } from '../../router/route-ids';\n\n// Lazy-load component for code-splitting\nconst LazyThankYouPage = lazy(() =>\n import('./ThankYouPage').then((m) => ({ default: m.ThankYouPage }))\n);\n\nexport const ThankYouPage = LazyThankYouPage;\nexport { thankYouLoader } from './loader';\nexport type { ThankYouLoaderParams, ThankYouPageProps } from './types';\n\nasync function loader(\n ctx: { params: ThankYouLoaderParams; locale?: string },\n extend?: (\n data: ThankYouPageProps,\n ctx: { params: ThankYouLoaderParams }\n ) => Promise<Record<string, unknown>> | Record<string, unknown>\n): Promise<ThankYouPageProps> {\n const data = await thankYouLoader({ params: ctx.params });\n\n if (extend) {\n const extra = await extend(data, ctx);\n return { ...data, ...extra } as ThankYouPageProps;\n }\n return data;\n}\n\nfunction head(ctx: TwilightContext, data: ThankYouPageProps): HeadDescriptor {\n const base: HeadDescriptor = {\n title: data.page.title,\n description: data.page.description,\n alternateLanguages: buildHreflangAlternates(ctx.settings, ctx.location.pathname),\n };\n\n return base;\n}\n\nexport const ThankYou = {\n id: RouteId.THANK_YOU,\n loader,\n head,\n Component: LazyThankYouPage,\n} as const;\n"]}
|
package/dist/skeleton.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export { BlogSkeleton, BreadcrumbSkeleton, CartSkeleton, CustomerLayoutSkeleton, CustomerPageSkeleton, PageSkeleton, ProductCardSkeleton, ProductDetailSkeleton, ProductGridSkeleton, SkeletonPulse } from './chunk-N7CCSGZF.js';
|
|
2
|
-
export { HomeSkeleton } from './chunk-
|
|
2
|
+
export { HomeSkeleton } from './chunk-W6XHHZXP.js';
|
|
3
3
|
import './chunk-KCKHA75V.js';
|
|
4
4
|
import './chunk-TZ3E5BN4.js';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-4WPUOY43.js';
|
|
6
6
|
import './chunk-ZNOJPVX3.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-AHW3CCWQ.js';
|
|
8
8
|
import './chunk-G7ALL4BC.js';
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
9
|
+
import './chunk-K7CYKUB4.js';
|
|
10
|
+
import './chunk-GDYTDRQS.js';
|
|
11
11
|
import './chunk-JKIRRMBU.js';
|
|
12
12
|
import './chunk-2JV6WZ6O.js';
|
|
13
13
|
import './chunk-VVZNW5CB.js';
|
|
@@ -34,7 +34,7 @@ import './chunk-YMVLYYLU.js';
|
|
|
34
34
|
import './chunk-RJPPO3ET.js';
|
|
35
35
|
import './chunk-Q7VWURUR.js';
|
|
36
36
|
import './chunk-GU2KUQVD.js';
|
|
37
|
-
import './chunk-
|
|
37
|
+
import './chunk-ABLOTMQW.js';
|
|
38
38
|
import './chunk-AXW67SY7.js';
|
|
39
39
|
import './chunk-BYMOPN2S.js';
|
|
40
40
|
import './chunk-6BZ5TKEV.js';
|
package/dist/tanstack.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { rootHead } from './chunk-
|
|
2
|
-
export { tanstackDocumentAdapter as attrs, createRouter, createTwilightRootRoute, useTanstackDocumentAttrs as useAttrs } from './chunk-
|
|
1
|
+
import { rootHead } from './chunk-ACILA7G4.js';
|
|
2
|
+
export { tanstackDocumentAdapter as attrs, createRouter, createTwilightRootRoute, useTanstackDocumentAttrs as useAttrs } from './chunk-ACILA7G4.js';
|
|
3
3
|
export { TanStackLinkAdapter, TanStackNavigationProvider, createTanStackLinkAdapter } from './chunk-HWVEOUG4.js';
|
|
4
4
|
import './chunk-Z4Y55HWX.js';
|
|
5
5
|
export { tanstackHeadAdapter as head, withHead } from './chunk-6Q5BFHFA.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tanstack.adapter.d.ts","sourceRoot":"","sources":["../../../src/vite/adapters/tanstack.adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;
|
|
1
|
+
{"version":3,"file":"tanstack.adapter.d.ts","sourceRoot":"","sources":["../../../src/vite/adapters/tanstack.adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AASH,OAAO,KAAK,EACV,gBAAgB,EAGhB,aAAa,EACd,MAAM,UAAU,CAAC;AAkBlB,eAAO,MAAM,mBAAmB,EAAE,aAAa,EA8L9C,CAAC;AAuvBF,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,aAAa,EAAE,EACvB,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,GAChB,OAAO,CAwCT;AAED,eAAO,MAAM,eAAe,EAAE,gBA6L7B,CAAC"}
|
package/dist/vite/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import '../chunk-KIPZQN3Y.js';
|
|
|
6
6
|
import '../chunk-T72DAX7R.js';
|
|
7
7
|
import '../chunk-DGUM43GV.js';
|
|
8
8
|
import { readFile, readdir } from 'fs/promises';
|
|
9
|
-
import { dirname, relative, resolve,
|
|
9
|
+
import { dirname, join, relative, resolve, basename, sep } from 'path';
|
|
10
10
|
import { parseSync } from 'oxc-parser';
|
|
11
11
|
import { existsSync, mkdirSync, writeFileSync, readFileSync, statSync } from 'fs';
|
|
12
12
|
import { createHash } from 'crypto';
|
|
@@ -1321,6 +1321,54 @@ function packageAliasesPlugin() {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
};
|
|
1323
1323
|
}
|
|
1324
|
+
var THEME_CONFIG_NAMES = ["wrangler.jsonc", "wrangler.json", "wrangler.toml"];
|
|
1325
|
+
var DEFAULT_COMPATIBILITY_DATE = "2026-03-03";
|
|
1326
|
+
var DEFAULT_COMPATIBILITY_FLAGS = ["nodejs_compat"];
|
|
1327
|
+
var SERVER_ENTRY = "@tanstack/react-start/server-entry";
|
|
1328
|
+
var GENERATED_DIR = join("node_modules", ".twilight");
|
|
1329
|
+
var GENERATED_NAME = "wrangler.json";
|
|
1330
|
+
function findThemeWorkerConfig(projectRoot) {
|
|
1331
|
+
for (const name of THEME_CONFIG_NAMES) {
|
|
1332
|
+
const candidate = join(projectRoot, name);
|
|
1333
|
+
if (existsSync(candidate)) return candidate;
|
|
1334
|
+
}
|
|
1335
|
+
return void 0;
|
|
1336
|
+
}
|
|
1337
|
+
function deriveWorkerName(projectRoot) {
|
|
1338
|
+
let base = "";
|
|
1339
|
+
try {
|
|
1340
|
+
const pkg = JSON.parse(readFileSync(join(projectRoot, "package.json"), "utf-8"));
|
|
1341
|
+
if (typeof pkg.name === "string") base = pkg.name.split("/").pop() ?? "";
|
|
1342
|
+
} catch {
|
|
1343
|
+
}
|
|
1344
|
+
const slug = base.toLowerCase().replace(/[^a-z0-9-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
1345
|
+
return `${slug || "twilight-theme"}-dev`;
|
|
1346
|
+
}
|
|
1347
|
+
function buildWorkerConfig(projectRoot, options = {}) {
|
|
1348
|
+
return {
|
|
1349
|
+
name: options.name ?? deriveWorkerName(projectRoot),
|
|
1350
|
+
compatibility_date: options.compatibilityDate ?? DEFAULT_COMPATIBILITY_DATE,
|
|
1351
|
+
compatibility_flags: options.compatibilityFlags ?? DEFAULT_COMPATIBILITY_FLAGS,
|
|
1352
|
+
main: SERVER_ENTRY
|
|
1353
|
+
};
|
|
1354
|
+
}
|
|
1355
|
+
function writeGeneratedWorkerConfig(projectRoot, options = {}) {
|
|
1356
|
+
const filePath = join(projectRoot, GENERATED_DIR, GENERATED_NAME);
|
|
1357
|
+
const contents = `${JSON.stringify(buildWorkerConfig(projectRoot, options), null, 2)}
|
|
1358
|
+
`;
|
|
1359
|
+
mkdirSync(join(projectRoot, GENERATED_DIR), { recursive: true });
|
|
1360
|
+
let current;
|
|
1361
|
+
try {
|
|
1362
|
+
current = readFileSync(filePath, "utf-8");
|
|
1363
|
+
} catch {
|
|
1364
|
+
}
|
|
1365
|
+
if (current !== contents) writeFileSync(filePath, contents);
|
|
1366
|
+
return filePath;
|
|
1367
|
+
}
|
|
1368
|
+
function resolveWorkerConfigPath(projectRoot, options = {}) {
|
|
1369
|
+
if (findThemeWorkerConfig(projectRoot)) return void 0;
|
|
1370
|
+
return writeGeneratedWorkerConfig(projectRoot, options);
|
|
1371
|
+
}
|
|
1324
1372
|
|
|
1325
1373
|
// src/tanstack/templates/locale-wrapper.ts
|
|
1326
1374
|
function getLocaleWrapperTemplate(baseRoutesImport) {
|
|
@@ -2190,6 +2238,19 @@ function resolveProjectPkg(projectRoot, pkg, subpath) {
|
|
|
2190
2238
|
throw new Error(`[twilight-react] Cannot resolve ${pkg}${subpath ? `/${subpath}` : ""}`);
|
|
2191
2239
|
return join(projectRoot, "node_modules", pkg, rel);
|
|
2192
2240
|
}
|
|
2241
|
+
async function createWorkerPlugins(projectRoot, worker) {
|
|
2242
|
+
if (worker === false) return [];
|
|
2243
|
+
const { cloudflare } = await import('@cloudflare/vite-plugin');
|
|
2244
|
+
const configPath = resolveWorkerConfigPath(projectRoot, worker === true ? {} : worker);
|
|
2245
|
+
return [
|
|
2246
|
+
cloudflare({
|
|
2247
|
+
viteEnvironment: { name: "ssr" },
|
|
2248
|
+
// Omitted when the theme ships its own config, which the plugin then
|
|
2249
|
+
// discovers exactly as it did before the engine took this over.
|
|
2250
|
+
...configPath ? { configPath } : {}
|
|
2251
|
+
})
|
|
2252
|
+
];
|
|
2253
|
+
}
|
|
2193
2254
|
function buildVirtualRouteConfig(routes, rootRouteFile, routesDir) {
|
|
2194
2255
|
try {
|
|
2195
2256
|
const projectRequire = createRequire(resolve(process.cwd(), "package.json"));
|
|
@@ -2300,7 +2361,8 @@ var tanstackAdapter = {
|
|
|
2300
2361
|
srcDirectory = "app",
|
|
2301
2362
|
baseRoutesImport = "@salla.sa/twilight-theme-engine/routes",
|
|
2302
2363
|
localesDir,
|
|
2303
|
-
twilightJson = "twilight.json"
|
|
2364
|
+
twilightJson = "twilight.json",
|
|
2365
|
+
worker = true
|
|
2304
2366
|
} = options;
|
|
2305
2367
|
const projectRoot = process.cwd();
|
|
2306
2368
|
const allRoutes = tanstackAdapter.generateRouteFiles({ projectRoot, baseRoutesImport });
|
|
@@ -2366,6 +2428,7 @@ var tanstackAdapter = {
|
|
|
2366
2428
|
const { tanstackStart } = await import(pathToFileURL(resolveProjectPkg(projectRoot, "@tanstack/react-start", "plugin/vite")).href);
|
|
2367
2429
|
const reactMod = await import(pathToFileURL(resolveProjectPkg(projectRoot, "@vitejs/plugin-react")).href);
|
|
2368
2430
|
return [
|
|
2431
|
+
...await createWorkerPlugins(projectRoot, worker),
|
|
2369
2432
|
tanstackStart({ srcDirectory, router: { virtualRouteConfig } }),
|
|
2370
2433
|
reactMod.default(),
|
|
2371
2434
|
packageAliasesPlugin(),
|