@mohasinac/appkit 4.3.2 → 4.4.1
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/_internal/client/features/maintenance/views/AnalysisRunnerView.js +1 -1
- package/dist/_internal/client/features/maintenance/views/CloudLogsListView.js +1 -1
- package/dist/_internal/client/features/maintenance/views/MaintenanceDashboardView.js +1 -1
- package/dist/_internal/client/features/maintenance/views/ServerErrorDetailView.js +1 -1
- package/dist/_internal/client/features/maintenance/views/ServerErrorsListView.js +1 -1
- package/dist/_internal/server/jobs/core/assignSpinPrize.d.ts +14 -3
- package/dist/_internal/server/jobs/core/assignSpinPrize.js +95 -56
- package/dist/_internal/server/jobs/handlers/assignSpinPrize.js +8 -2
- package/dist/_internal/shared/actions/action-registry.js +15 -0
- package/dist/_internal/shared/features/brands/schema.d.ts +4 -4
- package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +4 -4
- package/dist/_internal/shared/features/orders/schema.d.ts +8 -8
- package/dist/_internal/shared/features/reviews/schema.d.ts +2 -2
- package/dist/client.d.ts +36 -0
- package/dist/client.js +30 -0
- package/dist/constants/api-endpoints.d.ts +6 -0
- package/dist/constants/api-endpoints.js +2 -0
- package/dist/constants/field-names.d.ts +7 -0
- package/dist/constants/field-names.js +8 -0
- package/dist/features/about/components/DeveloperView.d.ts +16 -0
- package/dist/features/about/components/DeveloperView.js +29 -0
- package/dist/features/about/index.d.ts +2 -0
- package/dist/features/about/index.js +1 -0
- package/dist/features/account/schemas/index.d.ts +16 -16
- package/dist/features/addresses/schemas/index.d.ts +8 -8
- package/dist/features/admin/components/AdminAddressesView.js +1 -1
- package/dist/features/admin/components/AdminAllEventEntriesView.js +2 -2
- package/dist/features/admin/components/AdminArtView.js +1 -1
- package/dist/features/admin/components/AdminBidsView.js +2 -2
- package/dist/features/admin/components/AdminBlogView.js +2 -2
- package/dist/features/admin/components/AdminBrandsView.js +2 -2
- package/dist/features/admin/components/AdminBundlesView.js +2 -2
- package/dist/features/admin/components/AdminCartsView.js +2 -2
- package/dist/features/admin/components/AdminCategoriesView.js +2 -2
- package/dist/features/admin/components/AdminClassifiedView.js +1 -1
- package/dist/features/admin/components/AdminContactView.js +2 -2
- package/dist/features/admin/components/AdminCouponsView.js +2 -2
- package/dist/features/admin/components/AdminDigitalCodesView.js +1 -1
- package/dist/features/admin/components/AdminFaqsView.js +2 -2
- package/dist/features/admin/components/AdminFeaturesView.js +1 -1
- package/dist/features/admin/components/AdminGroupedListingsView.js +1 -1
- package/dist/features/admin/components/AdminHistoryView.js +1 -1
- package/dist/features/admin/components/AdminLiveView.js +1 -1
- package/dist/features/admin/components/AdminNewsletterView.js +2 -2
- package/dist/features/admin/components/AdminNotificationsView.js +2 -2
- package/dist/features/admin/components/AdminOrdersView.js +2 -2
- package/dist/features/admin/components/AdminPaymentMethodsView.js +1 -1
- package/dist/features/admin/components/AdminPayoutsView.js +2 -2
- package/dist/features/admin/components/AdminPrizeDrawsView.js +2 -2
- package/dist/features/admin/components/AdminProductsView.js +2 -2
- package/dist/features/admin/components/AdminReturnRequestsView.js +1 -1
- package/dist/features/admin/components/AdminReviewsView.js +2 -2
- package/dist/features/admin/components/AdminScammersView.js +2 -2
- package/dist/features/admin/components/AdminSessionsView.js +2 -2
- package/dist/features/admin/components/AdminStickersView.js +1 -1
- package/dist/features/admin/components/AdminStoreAddressesView.js +1 -1
- package/dist/features/admin/components/AdminStoresView.js +2 -2
- package/dist/features/admin/components/AdminSublistingCategoriesView.js +1 -1
- package/dist/features/admin/components/AdminSupportTicketsView.js +2 -2
- package/dist/features/admin/components/AdminTeamView.js +2 -2
- package/dist/features/admin/components/AdminTesterChecklistView.js +2 -2
- package/dist/features/admin/components/AdminUsersView.js +2 -2
- package/dist/features/admin/components/AdminWishlistsView.js +1 -1
- package/dist/features/admin/hooks/useAdminListing.d.ts +1 -1
- package/dist/features/auth/hooks/useAuth.d.ts +1 -1
- package/dist/features/blog/actions/blog-actions.d.ts +14 -14
- package/dist/features/blog/schemas/index.d.ts +14 -14
- package/dist/features/cart/hooks/useAddToCart.d.ts +6 -2
- package/dist/features/cart/hooks/useAddToCart.js +20 -3
- package/dist/features/cart/schemas/index.d.ts +3 -3
- package/dist/features/cart/utils/pending-ops.d.ts +20 -0
- package/dist/features/cart/utils/pending-ops.js +22 -0
- package/dist/features/catalogue/components/AdminCatalogueApprovalsView.js +1 -1
- package/dist/features/categories/components/CategoryBundlesListing.js +1 -1
- package/dist/features/categories/components/CategoryFilters.js +1 -1
- package/dist/features/categories/components/CategoryTree.js +1 -1
- package/dist/features/categories/schemas/index.d.ts +16 -16
- package/dist/features/events/actions/event-actions.d.ts +21 -1
- package/dist/features/events/actions/event-actions.js +85 -3
- package/dist/features/events/components/AdminEventEditorView.js +11 -2
- package/dist/features/events/components/AdminEventEntriesView.js +37 -4
- package/dist/features/events/components/AdminEventsView.js +2 -2
- package/dist/features/events/components/EventLeaderboard.d.ts +12 -2
- package/dist/features/events/components/EventLeaderboard.js +4 -1
- package/dist/features/events/components/EventRafflesSection.js +2 -2
- package/dist/features/events/repository/event-entry.repository.d.ts +39 -0
- package/dist/features/events/repository/event-entry.repository.js +153 -0
- package/dist/features/events/schemas/firestore.d.ts +28 -1
- package/dist/features/events/schemas/firestore.js +9 -0
- package/dist/features/events/schemas/index.d.ts +13 -13
- package/dist/features/events/types/index.d.ts +26 -0
- package/dist/features/faq/actions/faq-actions.d.ts +8 -8
- package/dist/features/faq/schemas/index.d.ts +22 -22
- package/dist/features/grouped/schemas/index.d.ts +2 -2
- package/dist/features/homepage/components/AnnouncementBar.d.ts +9 -1
- package/dist/features/homepage/components/AnnouncementBar.js +6 -3
- package/dist/features/homepage/components/MarketplaceHomepageView.js +2 -2
- package/dist/features/homepage/components/SectionCarousel.js +5 -1
- package/dist/features/homepage/components/WelcomeSection.js +2 -2
- package/dist/features/homepage/schemas/index.d.ts +2 -2
- package/dist/features/layout/BottomNavbar.js +8 -6
- package/dist/features/lottery/schemas/zod.d.ts +10 -10
- package/dist/features/media/MediaVideo.js +11 -3
- package/dist/features/orders/schemas/index.d.ts +52 -52
- package/dist/features/products/components/CompareOverlay.d.ts +9 -0
- package/dist/features/products/components/CompareOverlay.js +28 -3
- package/dist/features/products/components/InteractiveProductCard.js +9 -3
- package/dist/features/products/components/MakeOfferForm.js +1 -1
- package/dist/features/products/components/PlaceBidForm.js +1 -1
- package/dist/features/products/components/PrizeDrawCollage.js +1 -1
- package/dist/features/products/components/PrizeDrawsSection.js +2 -2
- package/dist/features/products/components/ProductDetailActions.js +3 -1
- package/dist/features/products/components/ProductGrid.js +1 -1
- package/dist/features/products/components/ProductInfo.js +1 -1
- package/dist/features/products/components/ProductsIndexListing.js +12 -2
- package/dist/features/products/hooks/useRelatedProducts.js +1 -1
- package/dist/features/products/schemas/index.d.ts +10 -10
- package/dist/features/promotions/schemas/index.d.ts +8 -8
- package/dist/features/reviews/schemas/index.d.ts +12 -12
- package/dist/features/scams/schemas/index.d.ts +6 -6
- package/dist/features/seller/components/CouponInlineSelect.js +1 -1
- package/dist/features/seller/components/SellerArtView.js +2 -2
- package/dist/features/seller/components/SellerAuctionsView.js +2 -2
- package/dist/features/seller/components/SellerBidsView.js +2 -2
- package/dist/features/seller/components/SellerBundlesView.js +1 -1
- package/dist/features/seller/components/SellerClassifiedView.js +2 -2
- package/dist/features/seller/components/SellerCouponsView.js +2 -2
- package/dist/features/seller/components/SellerDigitalCodesView.js +2 -2
- package/dist/features/seller/components/SellerGroupedListingsView.js +1 -1
- package/dist/features/seller/components/SellerLiveView.js +2 -2
- package/dist/features/seller/components/SellerOffersView.js +2 -2
- package/dist/features/seller/components/SellerOrdersView.js +2 -2
- package/dist/features/seller/components/SellerPayoutMethodsView.js +2 -2
- package/dist/features/seller/components/SellerPayoutsView.js +2 -2
- package/dist/features/seller/components/SellerPreOrdersView.js +2 -2
- package/dist/features/seller/components/SellerPrizeDrawsView.js +2 -2
- package/dist/features/seller/components/SellerProductsView.js +2 -2
- package/dist/features/seller/components/SellerShippingConfigsView.js +2 -2
- package/dist/features/seller/components/SellerStickersView.js +2 -2
- package/dist/features/seller/components/SellerStoreCategoriesView.js +1 -1
- package/dist/features/seller/components/SublistingInlineSelect.js +1 -1
- package/dist/features/seller/hooks/useSellerListingData.d.ts +1 -1
- package/dist/features/seller/schemas/index.d.ts +16 -16
- package/dist/features/server-errors/schemas/index.d.ts +4 -4
- package/dist/features/shell/StepForm.d.ts +1 -1
- package/dist/features/shipments/components/AdminShipmentsView.js +2 -2
- package/dist/features/stores/components/StoreProductsView.js +1 -1
- package/dist/features/stores/components/StoresIndexListing.js +1 -1
- package/dist/features/stores/schemas/index.d.ts +32 -32
- package/dist/features/support/schemas/index.d.ts +2 -2
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +68 -1
- package/dist/features/whatsapp-bot/helpers/payment-proof-message.d.ts +14 -0
- package/dist/features/whatsapp-bot/helpers/payment-proof-message.js +17 -0
- package/dist/features/whatsapp-bot/helpers/whatsapp.d.ts +2 -8
- package/dist/features/whatsapp-bot/helpers/whatsapp.js +4 -11
- package/dist/features/wishlist/repository/user-wishlist.repository.d.ts +11 -0
- package/dist/features/wishlist/repository/user-wishlist.repository.js +33 -0
- package/dist/index.d.ts +7 -12
- package/dist/index.js +16 -28
- package/dist/next/components/ErrorView.js +1 -1
- package/dist/next/components/NotFoundView.js +1 -1
- package/dist/next/components/UnauthorizedView.js +1 -1
- package/dist/next/routing/route-map.d.ts +4 -0
- package/dist/next/routing/route-map.js +2 -0
- package/dist/react/contexts/SessionContext.d.ts +1 -1
- package/dist/react/hooks/use-action-dispatch.d.ts +1 -1
- package/dist/react/hooks/useFormStatePreservation.d.ts +1 -1
- package/dist/schemas/registry.d.ts +238 -238
- package/dist/schemas/webhooks/razorpay.d.ts +100 -100
- package/dist/security/index.d.ts +1 -1
- package/dist/security/index.js +1 -1
- package/dist/security/rate-limit.d.ts +10 -0
- package/dist/security/rate-limit.js +13 -1
- package/dist/seed/events-seed-data.js +52 -1
- package/dist/server.d.ts +6 -0
- package/dist/server.js +8 -0
- package/dist/styles.css +25 -1
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/components/HorizontalScroller.d.ts +7 -1
- package/dist/ui/components/HorizontalScroller.js +2 -2
- package/dist/ui/components/HorizontalScroller.style.css +24 -0
- package/dist/validation/schemas.d.ts +12 -12
- package/package.json +1 -1
|
@@ -47,6 +47,16 @@ export interface EventDocument extends BaseDocument {
|
|
|
47
47
|
spinMaxPerUser?: number;
|
|
48
48
|
spinWindowStart?: Date;
|
|
49
49
|
spinWindowEnd?: Date;
|
|
50
|
+
/**
|
|
51
|
+
* Per-event admin toggle — when true, `enterEvent()` (and the spin-prize
|
|
52
|
+
* find-or-create step) allow an unauthenticated caller to participate,
|
|
53
|
+
* identified by a hashed IP instead of a `userId`. Default/undefined
|
|
54
|
+
* preserves the prior per-type login rules (poll/survey require login;
|
|
55
|
+
* non-anonymous feedback requires login; raffle/spin_wheel now also
|
|
56
|
+
* require login unless this flag is set — see Root Cause callout in
|
|
57
|
+
* CLAUDE.md "SSR Architecture" era docs / event-actions.ts `enterEvent`).
|
|
58
|
+
*/
|
|
59
|
+
allowGuestParticipation?: boolean;
|
|
50
60
|
/** Full lottery config including server-only price/weight fields. */
|
|
51
61
|
lotteryConfig?: LotteryConfig;
|
|
52
62
|
stats: {
|
|
@@ -74,14 +84,24 @@ export type EventEntryDocument = {
|
|
|
74
84
|
points?: number;
|
|
75
85
|
raffleEligible?: boolean;
|
|
76
86
|
spinUsed?: boolean;
|
|
87
|
+
/** Count of spins consumed by this identity, enforced against `EventDocument.spinMaxPerUser`. `spinUsed` is kept as a cheap boolean mirror (count > 0) for existing readers. */
|
|
88
|
+
spinCount?: number;
|
|
77
89
|
spinPrizeId?: string;
|
|
78
90
|
spinPrizeCouponCode?: string | null;
|
|
79
91
|
spinWonAt?: Date;
|
|
80
92
|
ipAddress?: string;
|
|
93
|
+
/**
|
|
94
|
+
* HMAC-SHA256 blind index of a guest (non-logged-in) participant's IP,
|
|
95
|
+
* scoped per event — `hmacBlindIndex(eventId + ":" + rawIp)`. Set only
|
|
96
|
+
* when `userId` is absent and the event's `allowGuestParticipation` is
|
|
97
|
+
* true. Never the raw IP — see `ipAddress` above, which is a separate,
|
|
98
|
+
* currently-unused field; do not repurpose it for this hash.
|
|
99
|
+
*/
|
|
100
|
+
guestIpHash?: string;
|
|
81
101
|
submittedAt: Date;
|
|
82
102
|
};
|
|
83
103
|
export declare const EVENT_INDEXED_FIELDS: readonly ["type", "status", "startsAt", "endsAt", "createdAt"];
|
|
84
|
-
export declare const EVENT_ENTRY_INDEXED_FIELDS: readonly ["eventId", "userId", "reviewStatus", "status", "submittedAt", "points"];
|
|
104
|
+
export declare const EVENT_ENTRY_INDEXED_FIELDS: readonly ["eventId", "userId", "guestIpHash", "reviewStatus", "status", "submittedAt", "points", "spinWonAt"];
|
|
85
105
|
export declare const EVENT_FIELDS: {
|
|
86
106
|
readonly ID: "id";
|
|
87
107
|
readonly SLUG: "slug";
|
|
@@ -97,6 +117,7 @@ export declare const EVENT_FIELDS: {
|
|
|
97
117
|
readonly WINNER_IMAGES: "winnerImages";
|
|
98
118
|
readonly ADDITIONAL_IMAGES: "additionalImages";
|
|
99
119
|
readonly TAGS: "tags";
|
|
120
|
+
readonly ALLOW_GUEST_PARTICIPATION: "allowGuestParticipation";
|
|
100
121
|
readonly CREATED_BY: "createdBy";
|
|
101
122
|
readonly CREATED_AT: "createdAt";
|
|
102
123
|
readonly UPDATED_AT: "updatedAt";
|
|
@@ -131,6 +152,12 @@ export declare const EVENT_ENTRY_FIELDS: {
|
|
|
131
152
|
readonly REVIEWED_AT: "reviewedAt";
|
|
132
153
|
readonly SUBMITTED_AT: "submittedAt";
|
|
133
154
|
readonly POINTS: "points";
|
|
155
|
+
readonly GUEST_IP_HASH: "guestIpHash";
|
|
156
|
+
readonly SPIN_USED: "spinUsed";
|
|
157
|
+
readonly SPIN_COUNT: "spinCount";
|
|
158
|
+
readonly SPIN_PRIZE_ID: "spinPrizeId";
|
|
159
|
+
readonly SPIN_PRIZE_COUPON_CODE: "spinPrizeCouponCode";
|
|
160
|
+
readonly SPIN_WON_AT: "spinWonAt";
|
|
134
161
|
readonly REVIEW_STATUS_VALUES: {
|
|
135
162
|
readonly PENDING: EntryReviewStatus;
|
|
136
163
|
readonly APPROVED: EntryReviewStatus;
|
|
@@ -13,10 +13,12 @@ export const EVENT_INDEXED_FIELDS = [
|
|
|
13
13
|
export const EVENT_ENTRY_INDEXED_FIELDS = [
|
|
14
14
|
"eventId",
|
|
15
15
|
"userId",
|
|
16
|
+
"guestIpHash",
|
|
16
17
|
"reviewStatus",
|
|
17
18
|
"status",
|
|
18
19
|
"submittedAt",
|
|
19
20
|
"points",
|
|
21
|
+
"spinWonAt",
|
|
20
22
|
];
|
|
21
23
|
export const EVENT_FIELDS = {
|
|
22
24
|
ID: "id",
|
|
@@ -33,6 +35,7 @@ export const EVENT_FIELDS = {
|
|
|
33
35
|
WINNER_IMAGES: "winnerImages",
|
|
34
36
|
ADDITIONAL_IMAGES: "additionalImages",
|
|
35
37
|
TAGS: "tags",
|
|
38
|
+
ALLOW_GUEST_PARTICIPATION: "allowGuestParticipation",
|
|
36
39
|
CREATED_BY: "createdBy",
|
|
37
40
|
CREATED_AT: "createdAt",
|
|
38
41
|
UPDATED_AT: "updatedAt",
|
|
@@ -67,6 +70,12 @@ export const EVENT_ENTRY_FIELDS = {
|
|
|
67
70
|
REVIEWED_AT: "reviewedAt",
|
|
68
71
|
SUBMITTED_AT: "submittedAt",
|
|
69
72
|
POINTS: "points",
|
|
73
|
+
GUEST_IP_HASH: "guestIpHash",
|
|
74
|
+
SPIN_USED: "spinUsed",
|
|
75
|
+
SPIN_COUNT: "spinCount",
|
|
76
|
+
SPIN_PRIZE_ID: "spinPrizeId",
|
|
77
|
+
SPIN_PRIZE_COUPON_CODE: "spinPrizeCouponCode",
|
|
78
|
+
SPIN_WON_AT: "spinWonAt",
|
|
70
79
|
REVIEW_STATUS_VALUES: {
|
|
71
80
|
PENDING: "pending",
|
|
72
81
|
APPROVED: "approved",
|
|
@@ -923,7 +923,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
923
923
|
createdAt: z.ZodString;
|
|
924
924
|
updatedAt: z.ZodString;
|
|
925
925
|
}, "strip", z.ZodTypeAny, {
|
|
926
|
-
type: "lottery" | "
|
|
926
|
+
type: "lottery" | "sale" | "offer" | "poll" | "survey" | "feedback" | "raffle" | "spin_wheel";
|
|
927
927
|
status: "ended" | "cancelled" | "draft" | "active" | "paused";
|
|
928
928
|
id: string;
|
|
929
929
|
title: string;
|
|
@@ -949,7 +949,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
949
949
|
url: string;
|
|
950
950
|
type: "image";
|
|
951
951
|
} | null;
|
|
952
|
-
|
|
952
|
+
eventImages: {
|
|
953
953
|
type: "video" | "image" | "file";
|
|
954
954
|
url: string;
|
|
955
955
|
source?: "upload" | "youtube" | "external" | undefined;
|
|
@@ -957,7 +957,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
957
957
|
thumbnailUrl?: string | undefined;
|
|
958
958
|
youtubeId?: string | undefined;
|
|
959
959
|
}[];
|
|
960
|
-
|
|
960
|
+
winnerImages: {
|
|
961
961
|
type: "video" | "image" | "file";
|
|
962
962
|
url: string;
|
|
963
963
|
source?: "upload" | "youtube" | "external" | undefined;
|
|
@@ -965,7 +965,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
965
965
|
thumbnailUrl?: string | undefined;
|
|
966
966
|
youtubeId?: string | undefined;
|
|
967
967
|
}[];
|
|
968
|
-
|
|
968
|
+
additionalImages: {
|
|
969
969
|
type: "video" | "image" | "file";
|
|
970
970
|
url: string;
|
|
971
971
|
source?: "upload" | "youtube" | "external" | undefined;
|
|
@@ -989,7 +989,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
989
989
|
maxPullsPerUser: number;
|
|
990
990
|
} | undefined;
|
|
991
991
|
hasRaffle?: boolean | undefined;
|
|
992
|
-
raffleType?: "spin_wheel" | "
|
|
992
|
+
raffleType?: "spin_wheel" | "top_n_scorers" | "top_n_participants" | "open_raffle" | undefined;
|
|
993
993
|
raffleTopN?: number | undefined;
|
|
994
994
|
rafflePrize?: string | undefined;
|
|
995
995
|
rafflePrizeCouponId?: string | undefined;
|
|
@@ -1074,7 +1074,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
1074
1074
|
} | undefined;
|
|
1075
1075
|
rafflePrizeProductIds?: string[] | undefined;
|
|
1076
1076
|
}, {
|
|
1077
|
-
type: "lottery" | "
|
|
1077
|
+
type: "lottery" | "sale" | "offer" | "poll" | "survey" | "feedback" | "raffle" | "spin_wheel";
|
|
1078
1078
|
status: "ended" | "cancelled" | "draft" | "active" | "paused";
|
|
1079
1079
|
id: string;
|
|
1080
1080
|
title: string;
|
|
@@ -1105,7 +1105,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
1105
1105
|
maxPullsPerUser: number;
|
|
1106
1106
|
} | undefined;
|
|
1107
1107
|
hasRaffle?: boolean | undefined;
|
|
1108
|
-
raffleType?: "spin_wheel" | "
|
|
1108
|
+
raffleType?: "spin_wheel" | "top_n_scorers" | "top_n_participants" | "open_raffle" | undefined;
|
|
1109
1109
|
raffleTopN?: number | undefined;
|
|
1110
1110
|
rafflePrize?: string | undefined;
|
|
1111
1111
|
rafflePrizeCouponId?: string | undefined;
|
|
@@ -1132,7 +1132,8 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
1132
1132
|
thumbnailUrl?: string | undefined;
|
|
1133
1133
|
youtubeId?: string | undefined;
|
|
1134
1134
|
} | null | undefined;
|
|
1135
|
-
|
|
1135
|
+
coverImageUrl?: string | undefined;
|
|
1136
|
+
eventImages?: {
|
|
1136
1137
|
type: "video" | "image" | "file";
|
|
1137
1138
|
url: string;
|
|
1138
1139
|
source?: "upload" | "youtube" | "external" | undefined;
|
|
@@ -1140,8 +1141,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
1140
1141
|
thumbnailUrl?: string | undefined;
|
|
1141
1142
|
youtubeId?: string | undefined;
|
|
1142
1143
|
}[] | undefined;
|
|
1143
|
-
|
|
1144
|
-
eventImages?: {
|
|
1144
|
+
winnerImages?: {
|
|
1145
1145
|
type: "video" | "image" | "file";
|
|
1146
1146
|
url: string;
|
|
1147
1147
|
source?: "upload" | "youtube" | "external" | undefined;
|
|
@@ -1149,7 +1149,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
1149
1149
|
thumbnailUrl?: string | undefined;
|
|
1150
1150
|
youtubeId?: string | undefined;
|
|
1151
1151
|
}[] | undefined;
|
|
1152
|
-
|
|
1152
|
+
additionalImages?: {
|
|
1153
1153
|
type: "video" | "image" | "file";
|
|
1154
1154
|
url: string;
|
|
1155
1155
|
source?: "upload" | "youtube" | "external" | undefined;
|
|
@@ -1231,14 +1231,14 @@ export declare const eventListParamsSchema: z.ZodObject<{
|
|
|
1231
1231
|
perPage: z.ZodOptional<z.ZodNumber>;
|
|
1232
1232
|
sort: z.ZodOptional<z.ZodString>;
|
|
1233
1233
|
}, "strip", z.ZodTypeAny, {
|
|
1234
|
-
type?: "lottery" | "
|
|
1234
|
+
type?: "lottery" | "sale" | "offer" | "poll" | "survey" | "feedback" | "raffle" | "spin_wheel" | undefined;
|
|
1235
1235
|
sort?: string | undefined;
|
|
1236
1236
|
status?: "ended" | "cancelled" | "draft" | "active" | "paused" | undefined;
|
|
1237
1237
|
page?: number | undefined;
|
|
1238
1238
|
q?: string | undefined;
|
|
1239
1239
|
perPage?: number | undefined;
|
|
1240
1240
|
}, {
|
|
1241
|
-
type?: "lottery" | "
|
|
1241
|
+
type?: "lottery" | "sale" | "offer" | "poll" | "survey" | "feedback" | "raffle" | "spin_wheel" | undefined;
|
|
1242
1242
|
sort?: string | undefined;
|
|
1243
1243
|
status?: "ended" | "cancelled" | "draft" | "active" | "paused" | undefined;
|
|
1244
1244
|
page?: number | undefined;
|
|
@@ -97,6 +97,8 @@ export interface EventItem {
|
|
|
97
97
|
spinMaxPerUser?: number;
|
|
98
98
|
spinWindowStart?: string;
|
|
99
99
|
spinWindowEnd?: string;
|
|
100
|
+
/** Per-event admin toggle — unauthenticated visitors may participate when true. */
|
|
101
|
+
allowGuestParticipation?: boolean;
|
|
100
102
|
/** Lottery config — slots have price/weight stripped for client consumption. */
|
|
101
103
|
lotteryConfig?: ClientLotteryConfig;
|
|
102
104
|
stats: {
|
|
@@ -136,6 +138,30 @@ export interface LeaderboardEntry {
|
|
|
136
138
|
totalPoints: number;
|
|
137
139
|
entryCount: number;
|
|
138
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* Tallied vote count for a single poll option — used in place of
|
|
143
|
+
* LeaderboardEntry for event.type === "poll" (a voter-ranked leaderboard is
|
|
144
|
+
* meaningless for a poll; this is a per-option result instead).
|
|
145
|
+
*/
|
|
146
|
+
export interface PollResultEntry {
|
|
147
|
+
optionId: string;
|
|
148
|
+
label: string;
|
|
149
|
+
count: number;
|
|
150
|
+
percent: number;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* One row of the public "Last 10 Spin Results" feed for a spin_wheel event.
|
|
154
|
+
* `userDisplayName` is undefined for guest spins (`isGuest: true`) — callers
|
|
155
|
+
* should render a generic "Guest" label in that case, never a raw hash.
|
|
156
|
+
*/
|
|
157
|
+
export interface SpinResultEntry {
|
|
158
|
+
id: string;
|
|
159
|
+
userDisplayName?: string;
|
|
160
|
+
isGuest: boolean;
|
|
161
|
+
spinPrizeId?: string;
|
|
162
|
+
spinPrizeTitle?: string;
|
|
163
|
+
spinWonAt?: string;
|
|
164
|
+
}
|
|
139
165
|
export interface EventListResponse {
|
|
140
166
|
items: EventItem[];
|
|
141
167
|
total: number;
|
|
@@ -30,8 +30,8 @@ export declare const faqCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
30
30
|
priority: number;
|
|
31
31
|
order: number;
|
|
32
32
|
isActive: boolean;
|
|
33
|
-
question: string;
|
|
34
33
|
showOnHomepage: boolean;
|
|
34
|
+
question: string;
|
|
35
35
|
answer: {
|
|
36
36
|
text: string;
|
|
37
37
|
format: "html" | "plain" | "markdown";
|
|
@@ -54,8 +54,8 @@ export declare const faqCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
54
54
|
tags?: string[] | undefined;
|
|
55
55
|
priority?: number | undefined;
|
|
56
56
|
order?: number | undefined;
|
|
57
|
-
isActive?: boolean | undefined;
|
|
58
57
|
variables?: Record<string, string> | undefined;
|
|
58
|
+
isActive?: boolean | undefined;
|
|
59
59
|
showOnHomepage?: boolean | undefined;
|
|
60
60
|
showInFooter?: boolean | undefined;
|
|
61
61
|
isPinned?: boolean | undefined;
|
|
@@ -66,8 +66,8 @@ export declare const faqCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
66
66
|
priority: number;
|
|
67
67
|
order: number;
|
|
68
68
|
isActive: boolean;
|
|
69
|
-
question: string;
|
|
70
69
|
showOnHomepage: boolean;
|
|
70
|
+
question: string;
|
|
71
71
|
answer: {
|
|
72
72
|
text: string;
|
|
73
73
|
format: "html" | "plain" | "markdown";
|
|
@@ -90,8 +90,8 @@ export declare const faqCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
90
90
|
tags?: string[] | undefined;
|
|
91
91
|
priority?: number | undefined;
|
|
92
92
|
order?: number | undefined;
|
|
93
|
-
isActive?: boolean | undefined;
|
|
94
93
|
variables?: Record<string, string> | undefined;
|
|
94
|
+
isActive?: boolean | undefined;
|
|
95
95
|
showOnHomepage?: boolean | undefined;
|
|
96
96
|
showInFooter?: boolean | undefined;
|
|
97
97
|
isPinned?: boolean | undefined;
|
|
@@ -128,10 +128,10 @@ export declare const faqUpdateSchema: z.ZodObject<{
|
|
|
128
128
|
tags?: string[] | undefined;
|
|
129
129
|
priority?: number | undefined;
|
|
130
130
|
order?: number | undefined;
|
|
131
|
-
isActive?: boolean | undefined;
|
|
132
131
|
variables?: Record<string, string> | undefined;
|
|
133
|
-
|
|
132
|
+
isActive?: boolean | undefined;
|
|
134
133
|
showOnHomepage?: boolean | undefined;
|
|
134
|
+
question?: string | undefined;
|
|
135
135
|
answer?: {
|
|
136
136
|
text: string;
|
|
137
137
|
format: "html" | "plain" | "markdown";
|
|
@@ -146,10 +146,10 @@ export declare const faqUpdateSchema: z.ZodObject<{
|
|
|
146
146
|
tags?: string[] | undefined;
|
|
147
147
|
priority?: number | undefined;
|
|
148
148
|
order?: number | undefined;
|
|
149
|
-
isActive?: boolean | undefined;
|
|
150
149
|
variables?: Record<string, string> | undefined;
|
|
151
|
-
|
|
150
|
+
isActive?: boolean | undefined;
|
|
152
151
|
showOnHomepage?: boolean | undefined;
|
|
152
|
+
question?: string | undefined;
|
|
153
153
|
answer?: {
|
|
154
154
|
text: string;
|
|
155
155
|
format?: "html" | "plain" | "markdown" | undefined;
|
|
@@ -94,19 +94,19 @@ export declare const faqSchema: z.ZodObject<{
|
|
|
94
94
|
tags?: string[] | undefined;
|
|
95
95
|
priority?: number | undefined;
|
|
96
96
|
order?: number | undefined;
|
|
97
|
+
isActive?: boolean | undefined;
|
|
97
98
|
stats?: {
|
|
98
99
|
views?: number | undefined;
|
|
99
100
|
helpful?: number | undefined;
|
|
100
101
|
notHelpful?: number | undefined;
|
|
101
102
|
} | undefined;
|
|
102
|
-
isActive?: boolean | undefined;
|
|
103
|
-
seo?: {
|
|
104
|
-
slug?: string | undefined;
|
|
105
|
-
} | undefined;
|
|
106
103
|
showOnHomepage?: boolean | undefined;
|
|
107
104
|
showInFooter?: boolean | undefined;
|
|
108
105
|
isPinned?: boolean | undefined;
|
|
109
106
|
relatedFAQs?: string[] | undefined;
|
|
107
|
+
seo?: {
|
|
108
|
+
slug?: string | undefined;
|
|
109
|
+
} | undefined;
|
|
110
110
|
}, {
|
|
111
111
|
id: string;
|
|
112
112
|
category: "orders_payment" | "shipping_delivery" | "returns_refunds" | "product_information" | "account_security" | "technical_support" | "general";
|
|
@@ -120,19 +120,19 @@ export declare const faqSchema: z.ZodObject<{
|
|
|
120
120
|
tags?: string[] | undefined;
|
|
121
121
|
priority?: number | undefined;
|
|
122
122
|
order?: number | undefined;
|
|
123
|
+
isActive?: boolean | undefined;
|
|
123
124
|
stats?: {
|
|
124
125
|
views?: number | undefined;
|
|
125
126
|
helpful?: number | undefined;
|
|
126
127
|
notHelpful?: number | undefined;
|
|
127
128
|
} | undefined;
|
|
128
|
-
isActive?: boolean | undefined;
|
|
129
|
-
seo?: {
|
|
130
|
-
slug?: string | undefined;
|
|
131
|
-
} | undefined;
|
|
132
129
|
showOnHomepage?: boolean | undefined;
|
|
133
130
|
showInFooter?: boolean | undefined;
|
|
134
131
|
isPinned?: boolean | undefined;
|
|
135
132
|
relatedFAQs?: string[] | undefined;
|
|
133
|
+
seo?: {
|
|
134
|
+
slug?: string | undefined;
|
|
135
|
+
} | undefined;
|
|
136
136
|
}>;
|
|
137
137
|
/** Base schema for list-query parameters. */
|
|
138
138
|
export declare const faqListParamsSchema: z.ZodObject<{
|
|
@@ -285,6 +285,7 @@ export declare const faqFirestoreSchema: z.ZodObject<{
|
|
|
285
285
|
tags: string[];
|
|
286
286
|
priority: number;
|
|
287
287
|
order: number;
|
|
288
|
+
isActive: boolean;
|
|
288
289
|
stats: {
|
|
289
290
|
views: number;
|
|
290
291
|
helpful: number;
|
|
@@ -293,15 +294,9 @@ export declare const faqFirestoreSchema: z.ZodObject<{
|
|
|
293
294
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
294
295
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
295
296
|
};
|
|
296
|
-
isActive: boolean;
|
|
297
|
-
question: string;
|
|
298
|
-
seo: {
|
|
299
|
-
slug: string;
|
|
300
|
-
metaTitle?: string | undefined;
|
|
301
|
-
metaDescription?: string | undefined;
|
|
302
|
-
};
|
|
303
297
|
createdBy: string;
|
|
304
298
|
showOnHomepage: boolean;
|
|
299
|
+
question: string;
|
|
305
300
|
answer: {
|
|
306
301
|
text: string;
|
|
307
302
|
format: "html" | "plain" | "markdown";
|
|
@@ -310,6 +305,11 @@ export declare const faqFirestoreSchema: z.ZodObject<{
|
|
|
310
305
|
isPinned: boolean;
|
|
311
306
|
relatedFAQs: string[];
|
|
312
307
|
useSiteSettings: boolean;
|
|
308
|
+
seo: {
|
|
309
|
+
slug: string;
|
|
310
|
+
metaTitle?: string | undefined;
|
|
311
|
+
metaDescription?: string | undefined;
|
|
312
|
+
};
|
|
313
313
|
searchTokens?: string[] | undefined;
|
|
314
314
|
variables?: Record<string, string> | undefined;
|
|
315
315
|
}, {
|
|
@@ -324,6 +324,7 @@ export declare const faqFirestoreSchema: z.ZodObject<{
|
|
|
324
324
|
tags: string[];
|
|
325
325
|
priority: number;
|
|
326
326
|
order: number;
|
|
327
|
+
isActive: boolean;
|
|
327
328
|
stats: {
|
|
328
329
|
views: number;
|
|
329
330
|
helpful: number;
|
|
@@ -332,15 +333,9 @@ export declare const faqFirestoreSchema: z.ZodObject<{
|
|
|
332
333
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
333
334
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
334
335
|
};
|
|
335
|
-
isActive: boolean;
|
|
336
|
-
question: string;
|
|
337
|
-
seo: {
|
|
338
|
-
slug: string;
|
|
339
|
-
metaTitle?: string | undefined;
|
|
340
|
-
metaDescription?: string | undefined;
|
|
341
|
-
};
|
|
342
336
|
createdBy: string;
|
|
343
337
|
showOnHomepage: boolean;
|
|
338
|
+
question: string;
|
|
344
339
|
answer: {
|
|
345
340
|
text: string;
|
|
346
341
|
format: "html" | "plain" | "markdown";
|
|
@@ -349,6 +344,11 @@ export declare const faqFirestoreSchema: z.ZodObject<{
|
|
|
349
344
|
isPinned: boolean;
|
|
350
345
|
relatedFAQs: string[];
|
|
351
346
|
useSiteSettings: boolean;
|
|
347
|
+
seo: {
|
|
348
|
+
slug: string;
|
|
349
|
+
metaTitle?: string | undefined;
|
|
350
|
+
metaDescription?: string | undefined;
|
|
351
|
+
};
|
|
352
352
|
searchTokens?: string[] | undefined;
|
|
353
353
|
variables?: Record<string, string> | undefined;
|
|
354
354
|
}>;
|
|
@@ -43,8 +43,8 @@ export declare const groupedListingFirestoreSchema: z.ZodObject<{
|
|
|
43
43
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
44
44
|
}, z.ZodTypeAny, "passthrough">;
|
|
45
45
|
slug: string;
|
|
46
|
-
isActive: boolean;
|
|
47
46
|
isFeatured: boolean;
|
|
47
|
+
isActive: boolean;
|
|
48
48
|
createdBy: string;
|
|
49
49
|
productIds: string[];
|
|
50
50
|
groupTheme: "set" | "related" | "character" | "lineage" | "generic";
|
|
@@ -66,8 +66,8 @@ export declare const groupedListingFirestoreSchema: z.ZodObject<{
|
|
|
66
66
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
67
67
|
}, z.ZodTypeAny, "passthrough">;
|
|
68
68
|
slug: string;
|
|
69
|
-
isActive: boolean;
|
|
70
69
|
isFeatured: boolean;
|
|
70
|
+
isActive: boolean;
|
|
71
71
|
createdBy: string;
|
|
72
72
|
productIds: string[];
|
|
73
73
|
groupTheme: "set" | "related" | "character" | "lineage" | "generic";
|
|
@@ -5,5 +5,13 @@ export interface AnnouncementBarProps {
|
|
|
5
5
|
className?: string;
|
|
6
6
|
/** Called when the user dismisses — consumer wires this to a server action to persist. */
|
|
7
7
|
onDismiss?: (hash: string) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Renders as a translucent, backdrop-blurred strip pinned to the top edge
|
|
10
|
+
* of the nearest positioned ancestor, instead of the default full-bleed
|
|
11
|
+
* in-flow bar. Used on the homepage to overlay the banner over the first
|
|
12
|
+
* section (e.g. the Welcome hero) rather than pushing it down with extra
|
|
13
|
+
* vertical space.
|
|
14
|
+
*/
|
|
15
|
+
overlay?: boolean;
|
|
8
16
|
}
|
|
9
|
-
export declare function AnnouncementBar({ message, className, onDismiss }: AnnouncementBarProps): React.JSX.Element | null;
|
|
17
|
+
export declare function AnnouncementBar({ message, className, onDismiss, overlay }: AnnouncementBarProps): React.JSX.Element | null;
|
|
@@ -5,7 +5,7 @@ import { useState, useEffect } from "react";
|
|
|
5
5
|
import { X } from "lucide-react";
|
|
6
6
|
import { useAuth } from "../../../react/contexts/SessionContext";
|
|
7
7
|
import { Div } from "../../../ui/components/Div";
|
|
8
|
-
import { IconButton, Row, Span } from "@mohasinac/appkit";
|
|
8
|
+
import { IconButton, Row, Span } from "@mohasinac/appkit/client";
|
|
9
9
|
const STORAGE_KEY = "letitrip:announcement-dismissed";
|
|
10
10
|
const ONE_WEEK_MS = 7 * 24 * 60 * 60 * 1000;
|
|
11
11
|
export function hashBannerMessage(msg) {
|
|
@@ -38,7 +38,7 @@ function saveLocalDismissal(message) {
|
|
|
38
38
|
void normalizeError(_err); /* quota exceeded — ignore */
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
export function AnnouncementBar({ message, className = "", onDismiss }) {
|
|
41
|
+
export function AnnouncementBar({ message, className = "", onDismiss, overlay = false }) {
|
|
42
42
|
const { user } = useAuth();
|
|
43
43
|
const bannerHash = hashBannerMessage(message);
|
|
44
44
|
const userAlreadyDismissed = !!user?.dismissedBannerHash && user.dismissedBannerHash === bannerHash;
|
|
@@ -55,7 +55,10 @@ export function AnnouncementBar({ message, className = "", onDismiss }) {
|
|
|
55
55
|
}, [message, userAlreadyDismissed]);
|
|
56
56
|
if (dismissed)
|
|
57
57
|
return null;
|
|
58
|
-
|
|
58
|
+
const positionCls = overlay
|
|
59
|
+
? "absolute inset-x-0 top-0 z-20 bg-primary-700/85 backdrop-blur-sm"
|
|
60
|
+
: "relative left-1/2 right-1/2 w-screen -translate-x-1/2 bg-primary-700";
|
|
61
|
+
return (_jsx(Div, { className: `${positionCls} transition-opacity duration-200 ${mounted ? "opacity-100" : "opacity-0"} ${className}`, role: "banner", children: _jsx(Div, { paddingX: "x-page", className: "container mx-auto max-w-[1920px]", children: _jsxs(Row, { textWeight: "medium", textSize: "sm", className: "relative text-left text-white", padding: "y-xs", align: "center", justify: "start", children: [_jsx(Span, { children: message }), _jsx(IconButton, { type: "button", onClick: () => {
|
|
59
62
|
saveLocalDismissal(message);
|
|
60
63
|
onDismiss?.(bannerHash);
|
|
61
64
|
setDismissed(true);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { sieveFilter, SIEVE_OP } from "@mohasinac/appkit";
|
|
3
3
|
import { sortBy } from "@mohasinac/appkit";
|
|
4
|
-
import { Main } from "../../../ui";
|
|
4
|
+
import { Div, Main } from "../../../ui";
|
|
5
5
|
import { carouselRepository, faqsRepository, siteSettingsRepository } from "../../../repositories";
|
|
6
6
|
import { fetchLiveStats } from "../lib/live-stats";
|
|
7
7
|
import { renderSection, AnnouncementBar } from "../lib/section-renderer";
|
|
@@ -115,5 +115,5 @@ export async function MarketplaceHomepageView({ adSlots, newsletterFormSlot, onB
|
|
|
115
115
|
: undefined,
|
|
116
116
|
};
|
|
117
117
|
const carouselSlides = toCarouselSlides(slides);
|
|
118
|
-
return (
|
|
118
|
+
return (_jsx(Main, { children: _jsxs(Div, { className: "relative", children: [showAnnouncement ? (_jsx(AnnouncementBar, { overlay: true, message: announcementMessage, onDismiss: onBannerDismiss })) : null, orderedSections.map((section) => renderSection(section, adSlots, newsletterFormSlot ?? null, faqItems, carouselSlides, liveStats, sectionData))] }) }));
|
|
119
119
|
}
|
|
@@ -41,5 +41,9 @@ export function SectionCarousel({ title, description, headingVariant = "editoria
|
|
|
41
41
|
headingClass,
|
|
42
42
|
]
|
|
43
43
|
.filter(Boolean)
|
|
44
|
-
.join(" "), children: title }), headingVariant === "editorial" && (_jsxs(Row, { align: "center", justify: "center", gap: "sm", textSize: "xs", color: "faint", className: "mt-1 select-none", "aria-hidden": "true", children: [_jsx(Span, { className: "h-px w-6 bg-current" }), _jsx(Span, { size: "xs", children: "\u2736" }), _jsx(Span, { className: "h-px w-6 bg-current" })] })), description && (_jsx(Text, { className: `${descVariant} mt-2`, size: "base", children: description }))] }), isLoading ? (_jsx(CarouselSkeleton, { count: skeletonCount })) : (_jsx(HorizontalScroller, { items: items, renderItem: renderItem, perView: perView, gap: gap, autoScroll: autoScroll, autoScrollInterval: autoScrollInterval, loop: loop, keyExtractor: keyExtractor, rows: rows, minItemWidth: minItemWidth, showArrows: true,
|
|
44
|
+
.join(" "), children: title }), headingVariant === "editorial" && (_jsxs(Row, { align: "center", justify: "center", gap: "sm", textSize: "xs", color: "faint", className: "mt-1 select-none", "aria-hidden": "true", children: [_jsx(Span, { className: "h-px w-6 bg-current" }), _jsx(Span, { size: "xs", children: "\u2736" }), _jsx(Span, { className: "h-px w-6 bg-current" })] })), description && (_jsx(Text, { className: `${descVariant} mt-2`, size: "base", children: description }))] }), isLoading ? (_jsx(CarouselSkeleton, { count: skeletonCount })) : (_jsx(HorizontalScroller, { items: items, renderItem: renderItem, perView: perView, gap: gap, autoScroll: autoScroll, autoScrollInterval: autoScrollInterval, loop: loop, keyExtractor: keyExtractor, rows: rows, minItemWidth: minItemWidth, showArrows: true,
|
|
45
|
+
// Double-row grids (e.g. the homepage Auctions section's
|
|
46
|
+
// rows:2 config) get the full-height sliver arrows — much
|
|
47
|
+
// easier to hit than a small circle when the track is tall.
|
|
48
|
+
arrowStyle: rows > 1 ? "full-height" : "circle", snapToItems: true, showFadeEdges: true, showScrollbar: false, pauseOnHover: true })), viewMoreHref && !isLoading && (_jsx(Row, { className: "mt-6", justify: "start", children: _jsx(TextLink, { rounded: "lg", paddingX: "xl", paddingY: "sm", href: viewMoreHref, shadow: useLightText ? "lg" : "none", className: "inline-flex items-[center] gap-[0.375rem] transition-colors bg-primary text-white hover:bg-primary-600", size: "sm", weight: "semibold", children: viewMoreLabel }) }))] })] }));
|
|
45
49
|
}
|
|
@@ -7,7 +7,7 @@ export function WelcomeSection({ title, subtitle, pillLabel, showCTA = true, cta
|
|
|
7
7
|
const themed = { textSecondary: THEMED_TEXT_SECONDARY };
|
|
8
8
|
const flex = { center: FLEX_CENTER };
|
|
9
9
|
if (isLoading) {
|
|
10
|
-
return (_jsx(Section, { className: `relative overflow-hidden md:
|
|
10
|
+
return (_jsx(Section, { className: `relative overflow-hidden pt-[0px] pb-[var(--appkit-space-16)] md:pt-[0px] md:pb-[6rem] ${className}`, paddingX: "x-md", children: _jsxs(Div, { className: "animate-pulse max-w-4xl mx-auto text-left", children: [_jsx(Div, { className: "h-6 w-52 mb-6", surface: "subtle", rounded: "full" }), _jsx(Div, { className: "h-20 mb-4 max-w-2xl", surface: "subtle", rounded: "lg" }), _jsx(Div, { className: "h-6 mb-8 max-w-lg", surface: "subtle", rounded: "lg" }), _jsxs(Row, { justify: "start", gap: "md", children: [_jsx(Div, { className: "h-12 w-36", surface: "subtle", rounded: "xl" }), _jsx(Div, { className: "h-12 w-36", surface: "subtle", rounded: "xl" })] })] }) }));
|
|
11
11
|
}
|
|
12
|
-
return (_jsxs(Section, { className: `relative overflow-hidden md:
|
|
12
|
+
return (_jsxs(Section, { className: `relative overflow-hidden pt-[0px] pb-[var(--appkit-space-20)] md:pt-[0px] md:pb-[7rem] ${className}`, paddingX: "x-md", children: [_jsx(Div, { className: "pointer-events-none absolute -top-32 -left-32 w-[28rem] h-[28rem] bg-primary/10 blur-3xl", rounded: "full", "aria-hidden": "true" }), _jsx(Div, { className: "pointer-events-none absolute -bottom-40 -right-40 w-[36rem] h-[36rem] bg-secondary/10 dark:bg-secondary/15 blur-3xl", rounded: "full", "aria-hidden": "true" }), _jsx(Div, { className: "relative z-10 max-w-7xl mx-auto", children: _jsxs(Grid, { align: "center", gap: "2xl", className: "grid-cols-1 lg:grid-cols-2 xl:grid-cols-2 2xl:grid-cols-2", children: [_jsxs(Div, { className: "text-left", children: [pillLabel && (_jsx(Div, { children: _jsxs(Span, { layout: "inline-flex", gap: "md", size: "xs", weight: "medium", className: "border border-primary-[500]/30 bg-primary-500/10 px-[1.25rem] py-[0.375rem] tracking-[0.2em] text-primary-700 dark:text-primary-400 backdrop-blur-sm", rounded: "full", transform: "uppercase", children: [_jsx(Span, { className: "w-1.5 h-1.5 bg-primary-500 inline-block", rounded: "full", "aria-hidden": "true" }), pillLabel, _jsx(Span, { className: "w-1.5 h-1.5 bg-primary-500 inline-block", rounded: "full", "aria-hidden": "true" })] }) })), _jsx(Heading, { level: 1, variant: "none", gradient: "brand-tri", className: "mt-4 font-display leading-[1.1] tracking-tight break-words", size: "5xl", mdSize: "6xl", lgSize: "7xl", xlSize: "7xl", children: title }), subtitle && (_jsx(Text, { className: `mt-4 ${themed.textSecondary} max-w-xl leading-relaxed`, size: "xl", children: subtitle })), showCTA && (_jsxs(Row, { wrap: true, gap: "md", className: "mt-8", justify: "start", children: [ctaHref ? (_jsx(TextLink, { rounded: "xl", href: ctaHref, className: "inline-flex items-[center] justify-[center] px-[2rem] py-[0.875rem] !bg-primary hover:!bg-primary-600 text-white dark:!bg-primary dark:hover:!bg-primary-600 dark:text-white btn-glow transition-all hover:scale-[1.02]", size: "base", weight: "bold", children: ctaLabel })) : (_jsx(Button, { variant: "primary", size: "lg", onClick: onCtaClick, children: ctaLabel })), secondaryCtaHref ? (_jsx(TextLink, { rounded: "xl", href: secondaryCtaHref, className: "inline-flex items-[center] justify-[center] border-2 border-cobalt/40 dark:border-cobalt-400/40 px-[2rem] py-[0.875rem] text-cobalt-700 dark:text-cobalt-300 hover:bg-cobalt-50 dark:hover:bg-cobalt-900/20 transition-all hover:scale-[1.02]", size: "base", weight: "semibold", children: secondaryCtaLabel })) : (_jsx(Button, { variant: "outline", size: "lg", onClick: onSecondaryCtaClick, children: secondaryCtaLabel }))] })), trustChips.length > 0 && (_jsx(Row, { wrap: true, gap: "sm", className: "mt-6", justify: "start", children: trustChips.map((chip) => (_jsxs(Span, { layout: "inline-flex", gap: "xs", size: "xs", weight: "medium", className: "border border-zinc-[200] dark:border-slate-[700] px-[0.875rem] py-[0.375rem]", rounded: "full", surface: "subtle", color: "muted", children: [chip.emoji, " ", chip.label] }, chip.key))) }))] }), _jsx(Div, { className: "hidden lg:block", children: _jsxs(Div, { className: `relative overflow-hidden aspect-[4/3] bg-[image:var(--appkit-gradient-section-mesh)]`, shadow: "2xl", border: "default", rounded: "3xl", children: [_jsx(Div, { className: "absolute inset-0 bg-[image:var(--appkit-gradient-glass)]" }), _jsxs(Stack, { centered: true, gap: "sm", className: `absolute inset-0 ${flex.center} p-[2.5rem]`, children: [_jsx(SiteMark, { title: brandLogoText || "LetItRip.in", size: "xl" }), _jsx(SiteLogo, { title: brandLogoText || "LetItRip.in", size: "xl" })] })] }) })] }) })] }));
|
|
13
13
|
}
|
|
@@ -23,7 +23,7 @@ export declare const homepageSectionFirestoreSchema: z.ZodObject<{
|
|
|
23
23
|
enabled: z.ZodBoolean;
|
|
24
24
|
config: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>;
|
|
25
25
|
}, "strip", z.ZodTypeAny, {
|
|
26
|
-
type: "banner" | "products" | "features" | "
|
|
26
|
+
type: "banner" | "products" | "features" | "categories" | "reviews" | "events" | "auctions" | "stores" | "brands" | "carousel" | "newsletter" | "stats" | "welcome" | "trust-indicators" | "whatsapp-community" | "faq" | "blog-articles" | "pre-orders" | "social-feed" | "custom-cards" | "google-reviews" | "featured-bundles" | "prize-draws" | "event-raffles" | "collection-cards";
|
|
27
27
|
id: string;
|
|
28
28
|
createdAt: string | Date | z.objectOutputType<{
|
|
29
29
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
@@ -35,7 +35,7 @@ export declare const homepageSectionFirestoreSchema: z.ZodObject<{
|
|
|
35
35
|
order: number;
|
|
36
36
|
config: Record<string, JsonValue>;
|
|
37
37
|
}, {
|
|
38
|
-
type: "banner" | "products" | "features" | "
|
|
38
|
+
type: "banner" | "products" | "features" | "categories" | "reviews" | "events" | "auctions" | "stores" | "brands" | "carousel" | "newsletter" | "stats" | "welcome" | "trust-indicators" | "whatsapp-community" | "faq" | "blog-articles" | "pre-orders" | "social-feed" | "custom-cards" | "google-reviews" | "featured-bundles" | "prize-draws" | "event-raffles" | "collection-cards";
|
|
39
39
|
id: string;
|
|
40
40
|
createdAt: string | Date | z.objectInputType<{
|
|
41
41
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|