@mohasinac/appkit 4.63.5 → 4.64.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.
Files changed (119) hide show
  1. package/dist/.build-stamp.json +3 -3
  2. package/dist/_internal/server/features/categories/adapters.d.ts +1 -1
  3. package/dist/_internal/server/features/categories/adapters.js +13 -0
  4. package/dist/_internal/server/features/events/like-actions.d.ts +25 -0
  5. package/dist/_internal/server/features/events/like-actions.js +67 -0
  6. package/dist/_internal/server/features/events/likes.d.ts +65 -0
  7. package/dist/_internal/server/features/events/likes.js +146 -0
  8. package/dist/_internal/server/features/seo/index.d.ts +3 -0
  9. package/dist/_internal/server/features/seo/index.js +2 -0
  10. package/dist/_internal/server/features/seo/product-detail-types.d.ts +1 -0
  11. package/dist/_internal/server/features/seo/product-detail-types.js +26 -0
  12. package/dist/_internal/server/features/seo/robots.js +20 -1
  13. package/dist/_internal/server/features/seo/sitemap.js +125 -27
  14. package/dist/_internal/server/features/seo/static-params.d.ts +107 -0
  15. package/dist/_internal/server/features/seo/static-params.js +228 -0
  16. package/dist/_internal/server/features/seo/taxonomy-links.d.ts +44 -0
  17. package/dist/_internal/server/features/seo/taxonomy-links.js +85 -0
  18. package/dist/_internal/server/features/stores/adapters.d.ts +2 -2
  19. package/dist/_internal/server/features/stores/adapters.js +87 -1
  20. package/dist/_internal/server/functions/scheduled.d.ts +16 -1
  21. package/dist/_internal/server/functions/scheduled.js +23 -1
  22. package/dist/_internal/server/jobs/core/sellerStandingRollup.d.ts +63 -0
  23. package/dist/_internal/server/jobs/core/sellerStandingRollup.js +412 -0
  24. package/dist/_internal/server/jobs/handlers/index.d.ts +1 -0
  25. package/dist/_internal/server/jobs/handlers/index.js +1 -0
  26. package/dist/_internal/server/jobs/handlers/sellerStandingRollup.d.ts +12 -0
  27. package/dist/_internal/server/jobs/handlers/sellerStandingRollup.js +14 -0
  28. package/dist/_internal/shared/actions/action-registry.js +61 -0
  29. package/dist/_internal/shared/features/seller-standing/config.d.ts +130 -0
  30. package/dist/_internal/shared/features/seller-standing/config.js +153 -0
  31. package/dist/constants/api-endpoints.d.ts +24 -0
  32. package/dist/constants/api-endpoints.js +8 -0
  33. package/dist/features/about/components/HelpPageView.js +9 -1
  34. package/dist/features/account/components/BecomeSellerView.d.ts +15 -3
  35. package/dist/features/account/components/BecomeSellerView.js +2 -2
  36. package/dist/features/admin/components/AdminStoreEditorView.d.ts +12 -1
  37. package/dist/features/admin/components/AdminStoreEditorView.js +30 -2
  38. package/dist/features/admin/components/AdminStoresGuideView.js +1 -1
  39. package/dist/features/admin/components/AdminStoresView.js +59 -2
  40. package/dist/features/admin/components/AdminTrustGuideView.js +10 -0
  41. package/dist/features/admin/schemas/admin-editor-forms.d.ts +10 -0
  42. package/dist/features/admin/schemas/admin-editor-forms.js +34 -0
  43. package/dist/features/blog/components/BlogIndexPageView.js +2 -2
  44. package/dist/features/blog/components/BlogListView.js +2 -1
  45. package/dist/features/blog/components/BlogPostView.js +2 -1
  46. package/dist/features/blog/constants/category-badge.d.ts +33 -0
  47. package/dist/features/blog/constants/category-badge.js +40 -0
  48. package/dist/features/categories/components/TaxonomyLinkIndex.d.ts +39 -0
  49. package/dist/features/categories/components/TaxonomyLinkIndex.js +11 -0
  50. package/dist/features/categories/schemas/firestore.d.ts +25 -0
  51. package/dist/features/categories/utils/load-category-options.d.ts +33 -0
  52. package/dist/features/categories/utils/load-category-options.js +50 -0
  53. package/dist/features/events/components/EventCard.js +4 -12
  54. package/dist/features/events/components/EventInsights.d.ts +27 -0
  55. package/dist/features/events/components/EventInsights.js +10 -0
  56. package/dist/features/events/components/EventLikeButton.d.ts +21 -0
  57. package/dist/features/events/components/EventLikeButton.js +59 -0
  58. package/dist/features/events/components/EventLikersRail.d.ts +23 -0
  59. package/dist/features/events/components/EventLikersRail.js +54 -0
  60. package/dist/features/events/components/EventTypeBadge.d.ts +26 -0
  61. package/dist/features/events/components/EventTypeBadge.js +7 -0
  62. package/dist/features/events/components/EventsListPageView.js +2 -2
  63. package/dist/features/events/components/SpinWheel.d.ts +41 -0
  64. package/dist/features/events/components/SpinWheel.js +128 -0
  65. package/dist/features/events/components/SpinWheelView.js +36 -15
  66. package/dist/features/events/constants/event-type-meta.d.ts +54 -0
  67. package/dist/features/events/constants/event-type-meta.js +109 -0
  68. package/dist/features/events/repository/event-likes.repository.d.ts +57 -0
  69. package/dist/features/events/repository/event-likes.repository.js +151 -0
  70. package/dist/features/events/schemas/firestore.d.ts +111 -0
  71. package/dist/features/events/schemas/likes.d.ts +81 -0
  72. package/dist/features/events/schemas/likes.js +59 -0
  73. package/dist/features/events/types/index.d.ts +7 -0
  74. package/dist/features/events/utils/carousel-slide.d.ts +42 -0
  75. package/dist/features/events/utils/carousel-slide.js +174 -0
  76. package/dist/features/events/utils/event-charts.d.ts +65 -0
  77. package/dist/features/events/utils/event-charts.js +172 -0
  78. package/dist/features/faq/constants/help-guides.js +9 -0
  79. package/dist/features/faq/schemas/firestore.js +1 -0
  80. package/dist/features/faq/types/index.d.ts +19 -0
  81. package/dist/features/homepage/components/BrandsSection.js +25 -1
  82. package/dist/features/homepage/components/HeroCarousel.js +47 -10
  83. package/dist/features/homepage/types/index.d.ts +7 -0
  84. package/dist/features/stores/components/InteractiveStoreCard.js +2 -1
  85. package/dist/features/stores/components/SellerStandingPanel.d.ts +31 -0
  86. package/dist/features/stores/components/SellerStandingPanel.js +25 -0
  87. package/dist/features/stores/components/SellerTierBadge.d.ts +57 -0
  88. package/dist/features/stores/components/SellerTierBadge.js +19 -0
  89. package/dist/features/stores/components/StoreCapabilitiesGuideView.js +32 -2
  90. package/dist/features/stores/components/StoreCreateForm.d.ts +46 -0
  91. package/dist/features/stores/components/StoreCreateForm.js +107 -0
  92. package/dist/features/stores/components/StoreGuideHubView.js +17 -4
  93. package/dist/features/stores/components/StoreHeader.js +2 -1
  94. package/dist/features/stores/repository/store.repository.js +23 -0
  95. package/dist/features/stores/schemas/firestore.d.ts +60 -1
  96. package/dist/features/stores/schemas/firestore.js +18 -0
  97. package/dist/features/stores/schemas/index.d.ts +2 -2
  98. package/dist/features/stores/schemas/store-create.d.ts +47 -0
  99. package/dist/features/stores/schemas/store-create.js +86 -0
  100. package/dist/features/stores/types/index.d.ts +42 -0
  101. package/dist/index.d.ts +2 -0
  102. package/dist/index.js +21 -0
  103. package/dist/next/routing/route-map.d.ts +3 -1
  104. package/dist/next/routing/route-map.js +13 -0
  105. package/dist/schemas/registry.d.ts +10 -0
  106. package/dist/server.d.ts +5 -0
  107. package/dist/server.js +10 -0
  108. package/dist/styles.css +36 -1
  109. package/dist/tailwind-utilities.css +1 -1
  110. package/dist/ui/components/HorizontalScroller.js +15 -2
  111. package/dist/ui/components/PageHeroHeading.d.ts +40 -0
  112. package/dist/ui/components/PageHeroHeading.js +15 -0
  113. package/dist/ui/components/Typography.d.ts +3 -3
  114. package/dist/ui/components/Typography.js +59 -31
  115. package/dist/ui/components/Typography.style.css +35 -0
  116. package/dist/ui/index.d.ts +2 -0
  117. package/dist/ui/index.js +1 -0
  118. package/package.json +1 -1
  119. package/scripts/seed-cli.mjs +4 -2
package/dist/index.js CHANGED
@@ -5140,6 +5140,27 @@ export { PRODUCT_FEATURES_COLLECTION, PRODUCT_FEATURE_PREFIX, MAX_STORE_CUSTOM_F
5140
5140
  // Tax codes feature schemas (B3) — HSN + GST rate as an entity.
5141
5141
  export { TAX_CODES_COLLECTION, TAX_CODE_PREFIX, TAX_CODE_FIELDS, TAX_CODE_SIEVE_FIELDS, TAX_CODE_UPDATABLE_FIELDS, GST_RATE_VALUES, createTaxCodeId, isValidHsnCode, } from "./features/tax-codes/schemas/firestore.js";
5142
5142
  export { taxCodeFormSchema, GST_RATE_OPTIONS, HSN_CHAPTER_OPTIONS } from "./features/tax-codes/schemas/tax-code-form.js";
5143
+ /*
5144
+ * 🛑 THE SEED LOADER DESTRUCTURES THESE TWO OFF THE BARREL, so an unexported
5145
+ * collection name is not a tidiness issue — it is a collection that can
5146
+ * never load.
5147
+ *
5148
+ * `seed-cli.mjs` reads `COLLECTION_MAP` from one big destructure of
5149
+ * `@mohasinac/appkit`. A name missing there is `undefined`, which Firestore
5150
+ * rejects as `Value for argument "collectionPath" is not a valid resource
5151
+ * path` — so `appkit-seed status` and `load` both error on that row alone
5152
+ * while every other collection succeeds. Measured 2026-10-24: eventLikes
5153
+ * (23 rows) and disputeReasons (11 rows) were both stuck at 0 in the
5154
+ * database for exactly this reason, and the error names the path, never the
5155
+ * missing export.
5156
+ *
5157
+ * Exported straight from the defining schema module rather than through a
5158
+ * feature index (Root Cause #18). Both files carry ONLY `import type`, which
5159
+ * the compiler erases, so neither drags a runtime chain into the client
5160
+ * bundle — the check that matters before adding anything here.
5161
+ */
5162
+ export { EVENT_LIKES_COLLECTION } from "./features/events/schemas/likes.js";
5163
+ export { DISPUTE_REASON_COLLECTION } from "./features/dispute-reasons/schemas/firestore.js";
5143
5164
  // Wire contracts for /api/admin/tax-codes. BOTH are .strict(): z.object()
5144
5165
  // strips unknown keys (a PATCH returning 200 having written nothing),
5145
5166
  // .passthrough() writes whatever arrives.
@@ -71,6 +71,7 @@ export declare const DEFAULT_ROUTE_MAP: {
71
71
  readonly HELP_AUCTIONS: "/help/auctions";
72
72
  readonly HELP_ORDERS: "/help/orders";
73
73
  readonly HELP_ACCOUNT: "/help/account";
74
+ readonly HELP_SELLER_BADGES: "/help/seller-badges";
74
75
  readonly CREDITS: "/credits";
75
76
  readonly TERMS: "/terms";
76
77
  readonly PRIVACY: "/privacy";
@@ -581,6 +582,7 @@ export declare const ROUTES: {
581
582
  readonly HELP_AUCTIONS: "/help/auctions";
582
583
  readonly HELP_ORDERS: "/help/orders";
583
584
  readonly HELP_ACCOUNT: "/help/account";
585
+ readonly HELP_SELLER_BADGES: "/help/seller-badges";
584
586
  readonly CREDITS: "/credits";
585
587
  readonly TERMS: "/terms";
586
588
  readonly PRIVACY: "/privacy";
@@ -1123,6 +1125,6 @@ export declare const SELLER_ROUTES: {
1123
1125
  readonly GUIDE_CAPABILITIES: "/store/guide/capabilities";
1124
1126
  readonly GUIDE_SETTINGS: "/store/guide/settings";
1125
1127
  };
1126
- export declare const PUBLIC_ROUTES: readonly ["/", string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, "/unauthorized", "/auth/login", "/auth/register", "/auth/forgot-password", "/auth/reset-password", "/auth/verify-email"];
1128
+ export declare const PUBLIC_ROUTES: readonly ["/", string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, "/unauthorized", "/auth/login", "/auth/register", "/auth/forgot-password", "/auth/reset-password", "/auth/verify-email"];
1127
1129
  export declare const PROTECTED_ROUTES: readonly [string, string, string, string, string, string, string];
1128
1130
  export declare const AUTH_ROUTES: readonly ["/auth/login", "/auth/register"];
@@ -85,6 +85,15 @@ export const DEFAULT_ROUTE_MAP = {
85
85
  HELP_AUCTIONS: "/help/auctions",
86
86
  HELP_ORDERS: "/help/orders",
87
87
  HELP_ACCOUNT: "/help/account",
88
+ /*
89
+ * What the Verified and Trusted Seller badges mean, for BUYERS.
90
+ *
91
+ * 🛑 A badge nobody can look up is decoration. Every `SellerTierBadge`
92
+ * links here, and until this page existed the two badges were explained
93
+ * only inside the seller dashboard — i.e. to the one audience that does
94
+ * not need to be reassured by them.
95
+ */
96
+ HELP_SELLER_BADGES: "/help/seller-badges",
88
97
  /*
89
98
  * 🛑 A LICENCE OBLIGATION, not a vanity page — which is why it is a route
90
99
  * key and sits in PUBLIC_ROUTES. The facts across ~5,500 rows (parts, beys,
@@ -792,6 +801,10 @@ export const PUBLIC_ROUTES = [
792
801
  ROUTES.PUBLIC.CONTACT,
793
802
  ROUTES.BLOG.LIST,
794
803
  ROUTES.PUBLIC.HELP,
804
+ /* Unauthenticated by necessity for the same reason as CREDITS below: the
805
+ * badges it explains are shown to signed-out visitors on every store card,
806
+ * so the explanation has to be reachable by one. */
807
+ ROUTES.PUBLIC.HELP_SELLER_BADGES,
795
808
  /* Unauthenticated BY NECESSITY: an attribution a reader must sign in to see
796
809
  * is not attribution. Same reasoning as the grievance-officer entry below. */
797
810
  ROUTES.PUBLIC.CREDITS,
@@ -5690,6 +5690,8 @@ export declare const SCHEMAS: {
5690
5690
  storeStatus: import("zod").ZodEnum<[import("../features/stores").StoreStatus, ...import("../features/stores").StoreStatus[]]>;
5691
5691
  isVerified: import("zod").ZodOptional<import("zod").ZodBoolean>;
5692
5692
  isFeatured: import("zod").ZodOptional<import("zod").ZodBoolean>;
5693
+ sellerTier: import("zod").ZodOptional<import("zod").ZodEnum<["seller", "trusted"]>>;
5694
+ trustedSeller: import("zod").ZodOptional<import("zod").ZodBoolean>;
5693
5695
  suspensionReason: import("zod").ZodOptional<import("zod").ZodString>;
5694
5696
  capabilities: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<[string, ...string[]]>, "many">>;
5695
5697
  adminNotes: import("zod").ZodOptional<import("zod").ZodString>;
@@ -5700,6 +5702,8 @@ export declare const SCHEMAS: {
5700
5702
  adminNotes?: string | undefined;
5701
5703
  suspensionReason?: string | undefined;
5702
5704
  capabilities?: string[] | undefined;
5705
+ sellerTier?: "seller" | "trusted" | undefined;
5706
+ trustedSeller?: boolean | undefined;
5703
5707
  }, {
5704
5708
  storeStatus: import("../features/stores").StoreStatus;
5705
5709
  isVerified?: boolean | undefined;
@@ -5707,6 +5711,8 @@ export declare const SCHEMAS: {
5707
5711
  adminNotes?: string | undefined;
5708
5712
  suspensionReason?: string | undefined;
5709
5713
  capabilities?: string[] | undefined;
5714
+ sellerTier?: "seller" | "trusted" | undefined;
5715
+ trustedSeller?: boolean | undefined;
5710
5716
  }>, {
5711
5717
  storeStatus: import("../features/stores").StoreStatus;
5712
5718
  isVerified?: boolean | undefined;
@@ -5714,6 +5720,8 @@ export declare const SCHEMAS: {
5714
5720
  adminNotes?: string | undefined;
5715
5721
  suspensionReason?: string | undefined;
5716
5722
  capabilities?: string[] | undefined;
5723
+ sellerTier?: "seller" | "trusted" | undefined;
5724
+ trustedSeller?: boolean | undefined;
5717
5725
  }, {
5718
5726
  storeStatus: import("../features/stores").StoreStatus;
5719
5727
  isVerified?: boolean | undefined;
@@ -5721,6 +5729,8 @@ export declare const SCHEMAS: {
5721
5729
  adminNotes?: string | undefined;
5722
5730
  suspensionReason?: string | undefined;
5723
5731
  capabilities?: string[] | undefined;
5732
+ sellerTier?: "seller" | "trusted" | undefined;
5733
+ trustedSeller?: boolean | undefined;
5724
5734
  }>;
5725
5735
  readonly adminOrder: import("zod").ZodObject<{
5726
5736
  status: import("zod").ZodEnum<[string, ...string[]]>;
package/dist/server.d.ts CHANGED
@@ -238,6 +238,8 @@ export { sendOrderConfirmationEmail } from "./features/contact/server";
238
238
  export type { OrderConfirmationEmailParams, SendEmailGuard } from "./features/contact/server";
239
239
  export { authMailCooldownRepository, messageBudgetRepository, } from "./features/messaging/repository/message-budget.repository";
240
240
  export type { MessageAudience, MessageChannel, SendDecision, SendGuardContext, } from "./_internal/shared/features/messaging/config";
241
+ export { getEventLikers, getEventLikersCached, viewerHasLiked, viewerHasLikedCached, getLikeTrend, getLikeTrendCached, } from "./_internal/server/features/events/likes";
242
+ export { toggleEventLikeAction, getEventLikersAction } from "./_internal/server/features/events/like-actions";
241
243
  export { adminGetEventById } from "./features/events/server";
242
244
  export { adminGetEventEntries } from "./features/events/server";
243
245
  export { adminGetEventStats } from "./features/events/server";
@@ -523,6 +525,9 @@ export type { UserSoftBan } from "./features/auth/schemas/firestore";
523
525
  export type { BannedAction } from "./features/auth/permissions/constants";
524
526
  export { buildSitemap, buildRobots, buildManifest, buildDefaultOgImage, DEFAULT_OG_SIZE, resolveOgImageUrl } from "./_internal/server/features/seo";
525
527
  export type { SitemapOptions, RobotsOptions, ManifestOptions, DefaultOgOptions } from "./_internal/server/features/seo";
528
+ export { productDetailSlugs, brandDetailSlugs, franchiseDetailSlugs, blogPostSlugs, beyDetailSlugs, partDetailParams, } from "./_internal/server/features/seo";
529
+ export { brandLinks, franchiseLinks, categoryRootLinks } from "./_internal/server/features/seo";
530
+ export type { TaxonomyLink } from "./_internal/server/features/seo";
526
531
  export { checkActionAllowed } from "./features/admin/utils/checkActionAllowed";
527
532
  export { getDisabledRoutes } from "./features/admin/utils/getDisabledRoutes";
528
533
  export { getSiteSettingsGlobal } from "./features/admin/utils/getSiteSettingsGlobal";
package/dist/server.js CHANGED
@@ -794,6 +794,8 @@ export { sendOrderConfirmationEmail } from "./features/contact/server.js";
794
794
  export { authMailCooldownRepository, messageBudgetRepository, } from "./features/messaging/repository/message-budget.repository.js";
795
795
  // [SERVER-ONLY]-Server-only — uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
796
796
  // adminGetEventById - Shared export for admin get event by id.
797
+ export { getEventLikers, getEventLikersCached, viewerHasLiked, viewerHasLikedCached, getLikeTrend, getLikeTrendCached, } from "./_internal/server/features/events/likes.js";
798
+ export { toggleEventLikeAction, getEventLikersAction } from "./_internal/server/features/events/like-actions.js";
797
799
  export { adminGetEventById } from "./features/events/server.js";
798
800
  // [SERVER-ONLY]-Server-only — uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
799
801
  // adminGetEventEntries - Shared export for admin get event entries.
@@ -1469,6 +1471,14 @@ export { getStoreCapabilities, storeHasCapability, } from "./_internal/server/fe
1469
1471
  export { isSoftBanned, getBanSummary } from "./features/auth/server/checkSoftBan.js";
1470
1472
  // -- SEO builders (sitemap / robots / manifest / og-image) --
1471
1473
  export { buildSitemap, buildRobots, buildManifest, buildDefaultOgImage, DEFAULT_OG_SIZE, resolveOgImageUrl } from "./_internal/server/features/seo/index.js";
1474
+ // -- generateStaticParams slug enumerators --
1475
+ // Prerendering a detail route is what puts its <title> in <head> instead of
1476
+ // streaming it into <body>; see static-params.ts for the measurement.
1477
+ export { productDetailSlugs, brandDetailSlugs, franchiseDetailSlugs, blogPostSlugs, beyDetailSlugs, partDetailParams, } from "./_internal/server/features/seo/index.js";
1478
+ // -- Taxonomy hub link indexes --
1479
+ // The hub pages filter client-side, so they rendered zero outbound entity
1480
+ // links in server HTML; these feed <TaxonomyLinkIndex>.
1481
+ export { brandLinks, franchiseLinks, categoryRootLinks } from "./_internal/server/features/seo/index.js";
1472
1482
  // -- Action gate + nav route helpers (server-side) --
1473
1483
  export { checkActionAllowed } from "./features/admin/utils/checkActionAllowed.js";
1474
1484
  export { getDisabledRoutes } from "./features/admin/utils/getDisabledRoutes.js";