@mohasinac/appkit 4.53.0 → 4.53.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/.build-stamp.json +3 -3
- package/dist/_internal/client/scaffolds/AppShell.js +1 -1
- package/dist/_internal/server/features/auctions/og.d.ts +3 -1
- package/dist/_internal/server/features/auctions/og.js +3 -1
- package/dist/_internal/server/features/bundles/actions.js +1 -1
- package/dist/_internal/server/features/business-documents/download.d.ts +41 -0
- package/dist/_internal/server/features/business-documents/download.js +91 -0
- package/dist/_internal/server/features/categories/adapters.d.ts +1 -1
- package/dist/_internal/server/features/categories/adapters.js +10 -0
- package/dist/_internal/server/features/checkout/actions.d.ts +14 -0
- package/dist/_internal/server/features/checkout/actions.js +106 -12
- package/dist/_internal/server/features/checkout/bundle-expansion.js +17 -0
- package/dist/_internal/server/features/checkout/data.d.ts +22 -0
- package/dist/_internal/server/features/checkout/group-rule-revalidation.d.ts +34 -0
- package/dist/_internal/server/features/checkout/group-rule-revalidation.js +124 -0
- package/dist/_internal/server/features/checkout/supplier-identity.d.ts +55 -0
- package/dist/_internal/server/features/checkout/supplier-identity.js +81 -0
- package/dist/_internal/server/features/classified/metadata.js +1 -1
- package/dist/_internal/server/features/classified/og.d.ts +3 -1
- package/dist/_internal/server/features/classified/og.js +3 -1
- package/dist/_internal/server/features/digital-code/metadata.js +1 -1
- package/dist/_internal/server/features/digital-code/og.d.ts +3 -1
- package/dist/_internal/server/features/digital-code/og.js +3 -1
- package/dist/_internal/server/features/digital-code/pool.d.ts +19 -4
- package/dist/_internal/server/features/digital-code/pool.js +19 -4
- package/dist/_internal/server/features/live/metadata.js +1 -1
- package/dist/_internal/server/features/live/og.d.ts +3 -1
- package/dist/_internal/server/features/live/og.js +3 -1
- package/dist/_internal/server/features/messages/actions.js +1 -1
- package/dist/_internal/server/features/parts/og.js +1 -1
- package/dist/_internal/server/features/pre-orders/og.d.ts +3 -1
- package/dist/_internal/server/features/pre-orders/og.js +3 -1
- package/dist/_internal/server/features/price-index/search.d.ts +18 -0
- package/dist/_internal/server/features/price-index/search.js +47 -7
- package/dist/_internal/server/features/prize-draws/og.d.ts +3 -1
- package/dist/_internal/server/features/prize-draws/og.js +3 -1
- package/dist/_internal/server/features/products/group-members.d.ts +26 -0
- package/dist/_internal/server/features/products/group-members.js +7 -1
- package/dist/_internal/server/features/products/og.d.ts +3 -1
- package/dist/_internal/server/features/products/og.js +3 -1
- package/dist/_internal/server/features/search/scoped-sources.d.ts +26 -0
- package/dist/_internal/server/features/search/scoped-sources.js +252 -0
- package/dist/_internal/server/features/search/search-everything.d.ts +57 -0
- package/dist/_internal/server/features/search/search-everything.js +70 -20
- package/dist/_internal/server/features/seo/sitemap.js +6 -0
- package/dist/_internal/server/features/shared/listing-adapters.js +4 -2
- package/dist/_internal/server/features/sticker-trace/adapters.d.ts +11 -0
- package/dist/_internal/server/features/sticker-trace/adapters.js +1 -0
- package/dist/_internal/server/features/sticker-trace/promote-to-listings.d.ts +26 -0
- package/dist/_internal/server/features/sticker-trace/promote-to-listings.js +264 -0
- package/dist/_internal/server/features/sticker-trace/sheet-actions.d.ts +3 -1
- package/dist/_internal/server/features/sticker-trace/sheet-actions.js +32 -0
- package/dist/_internal/server/features/sticker-trace/storage.d.ts +20 -1
- package/dist/_internal/server/features/sticker-trace/storage.js +20 -1
- package/dist/_internal/server/features/stores/adapters.d.ts +1 -1
- package/dist/_internal/server/features/stores/adapters.js +16 -0
- package/dist/_internal/server/features/stores/index.d.ts +1 -0
- package/dist/_internal/server/features/stores/index.js +1 -0
- package/dist/_internal/server/features/stores/tabs.d.ts +25 -0
- package/dist/_internal/server/features/stores/tabs.js +122 -0
- package/dist/_internal/shared/checkout/rules/_defaults.js +0 -2
- package/dist/_internal/shared/checkout/rules/_limits.d.ts +14 -1
- package/dist/_internal/shared/checkout/rules/_limits.js +14 -1
- package/dist/_internal/shared/checkout/rules/_registry.js +2 -0
- package/dist/_internal/shared/checkout/rules/auction.rule.js +9 -1
- package/dist/_internal/shared/checkout/rules/bundle.rule.js +13 -0
- package/dist/_internal/shared/checkout/rules/index.d.ts +2 -0
- package/dist/_internal/shared/checkout/rules/index.js +9 -0
- package/dist/_internal/shared/checkout/rules/offer.rule.js +0 -1
- package/dist/_internal/shared/checkout/rules/payment-gate.d.ts +26 -0
- package/dist/_internal/shared/checkout/rules/payment-gate.js +133 -0
- package/dist/_internal/shared/checkout/rules/prize-draw.rule.js +29 -8
- package/dist/_internal/shared/checkout/rules/spares.rule.d.ts +16 -0
- package/dist/_internal/shared/checkout/rules/spares.rule.js +5 -0
- package/dist/_internal/shared/checkout/rules/types.d.ts +26 -2
- package/dist/_internal/shared/config/schema.d.ts +122 -0
- package/dist/_internal/shared/features/cart/schema.js +3 -2
- package/dist/_internal/shared/features/products/group-rules.d.ts +75 -0
- package/dist/_internal/shared/features/products/group-rules.js +142 -0
- package/dist/_internal/shared/listing-types/_registry.d.ts +24 -0
- package/dist/_internal/shared/listing-types/_registry.js +39 -1
- package/dist/_internal/shared/listing-types/art/config.d.ts +1 -0
- package/dist/_internal/shared/listing-types/art/config.js +2 -0
- package/dist/_internal/shared/listing-types/auction/config.d.ts +1 -0
- package/dist/_internal/shared/listing-types/auction/config.js +2 -0
- package/dist/_internal/shared/listing-types/availability.js +48 -0
- package/dist/_internal/shared/listing-types/capabilities.js +19 -0
- package/dist/_internal/shared/listing-types/classified/config.d.ts +1 -0
- package/dist/_internal/shared/listing-types/classified/config.js +2 -0
- package/dist/_internal/shared/listing-types/digital-code/config.d.ts +1 -0
- package/dist/_internal/shared/listing-types/digital-code/config.js +2 -0
- package/dist/_internal/shared/listing-types/feature-flags.js +1 -0
- package/dist/_internal/shared/listing-types/live/config.d.ts +1 -0
- package/dist/_internal/shared/listing-types/live/config.js +2 -0
- package/dist/_internal/shared/listing-types/pre-order/config.d.ts +1 -0
- package/dist/_internal/shared/listing-types/pre-order/config.js +2 -0
- package/dist/_internal/shared/listing-types/prize-draw/config.d.ts +1 -0
- package/dist/_internal/shared/listing-types/prize-draw/config.js +2 -0
- package/dist/_internal/shared/listing-types/spares/config.d.ts +74 -0
- package/dist/_internal/shared/listing-types/spares/config.js +60 -0
- package/dist/_internal/shared/listing-types/spares/ctas.d.ts +1 -0
- package/dist/_internal/shared/listing-types/spares/ctas.js +4 -0
- package/dist/_internal/shared/listing-types/spares/og.js +1 -0
- package/dist/_internal/shared/listing-types/spares/schema.d.ts +2 -0
- package/dist/_internal/shared/listing-types/spares/schema.js +3 -0
- package/dist/_internal/shared/listing-types/spares/seed-factory.d.ts +1 -0
- package/dist/_internal/shared/listing-types/spares/seed-factory.js +1 -0
- package/dist/_internal/shared/listing-types/standard/config.d.ts +1 -0
- package/dist/_internal/shared/listing-types/standard/config.js +2 -0
- package/dist/_internal/shared/listing-types/stickers/config.d.ts +1 -0
- package/dist/_internal/shared/listing-types/stickers/config.js +2 -0
- package/dist/_internal/shared/search/match.d.ts +11 -0
- package/dist/_internal/shared/search/match.js +2 -1
- package/dist/_internal/shared/search/to-groups.d.ts +52 -0
- package/dist/_internal/shared/search/to-groups.js +141 -0
- package/dist/client.d.ts +8 -2
- package/dist/client.js +4 -1
- package/dist/constants/api-endpoints.d.ts +39 -15
- package/dist/constants/api-endpoints.js +28 -5
- package/dist/constants/cache-invalidation.js +3 -1
- package/dist/constants/field-names.d.ts +6 -0
- package/dist/constants/field-names.js +6 -0
- package/dist/features/about/components/PolicyPageView.d.ts +22 -2
- package/dist/features/about/components/PolicyPageView.js +14 -2
- package/dist/features/about/components/PublicProfileView.js +2 -1
- package/dist/features/about/components/ShippingPolicyView.js +42 -2
- package/dist/features/account/components/NotificationBell.js +1 -1
- package/dist/features/account/hooks/useProfileStats.js +5 -1
- package/dist/features/addresses/repository/addresses.repository.d.ts +16 -0
- package/dist/features/addresses/repository/addresses.repository.js +21 -0
- package/dist/features/admin/actions/admin-actions.js +16 -1
- package/dist/features/admin/components/AdminCategoryEditorView.js +19 -2
- package/dist/features/admin/components/AdminNavigationView.js +1 -1
- package/dist/features/admin/components/AdminPageHeader.js +1 -1
- package/dist/features/admin/components/AdminProductEditorView.js +17 -2
- package/dist/features/admin/components/AdminSidebar.js +1 -1
- package/dist/features/admin/components/AdminSiteSettingsView.js +39 -8
- package/dist/features/admin/components/AdminSparesView.d.ts +12 -0
- package/dist/features/admin/components/AdminSparesView.js +30 -0
- package/dist/features/admin/components/AdminUsersView.js +9 -7
- package/dist/features/admin/components/index.d.ts +2 -0
- package/dist/features/admin/components/index.js +1 -0
- package/dist/features/admin/components/sections/adminSectionsTypes.js +7 -0
- package/dist/features/admin/constants/filter-tabs.d.ts +3 -0
- package/dist/features/admin/constants/filter-tabs.js +1 -0
- package/dist/features/admin/schemas/firestore.d.ts +26 -2
- package/dist/features/auctions/components/AuctionDetailPageView.js +4 -11
- package/dist/features/auth/repository/user.repository.d.ts +13 -0
- package/dist/features/auth/repository/user.repository.js +28 -0
- package/dist/features/auth/schemas/firestore.d.ts +2 -0
- package/dist/features/auth/schemas/firestore.js +2 -0
- package/dist/features/business-documents/repository/business-documents.repository.d.ts +58 -0
- package/dist/features/business-documents/repository/business-documents.repository.js +54 -0
- package/dist/features/business-documents/schemas/firestore.d.ts +105 -0
- package/dist/features/business-documents/schemas/firestore.js +75 -0
- package/dist/features/cart/actions/cart-actions.js +83 -6
- package/dist/features/cart/repository/cart.repository.js +32 -4
- package/dist/features/cart/schemas/firestore.d.ts +20 -0
- package/dist/features/cart/schemas/index.d.ts +2 -2
- package/dist/features/catalogue/components/PublicCatalogueItemDetailView.js +1 -1
- package/dist/features/categories/api/[id]/price-guidance/route.d.ts +42 -0
- package/dist/features/categories/api/[id]/price-guidance/route.js +113 -0
- package/dist/features/categories/components/BrandDetailPageView.js +19 -3
- package/dist/features/categories/components/BrandDetailTabs.js +10 -0
- package/dist/features/categories/components/CategoriesIndexListing.js +23 -8
- package/dist/features/categories/components/CategoryDetailPageView.js +141 -14
- package/dist/features/categories/components/CategoryDetailTabs.js +12 -0
- package/dist/features/categories/components/CategoryGrid.js +10 -1
- package/dist/features/categories/components/PriceGuidanceHint.d.ts +29 -0
- package/dist/features/categories/components/PriceGuidanceHint.js +61 -0
- package/dist/features/categories/components/SubcategoryCardRow.d.ts +27 -0
- package/dist/features/categories/components/SubcategoryCardRow.js +98 -0
- package/dist/features/categories/constants/category-tabs.d.ts +20 -25
- package/dist/features/categories/constants/category-tabs.js +22 -39
- package/dist/features/categories/repository/categories.repository.d.ts +12 -0
- package/dist/features/categories/repository/categories.repository.js +20 -0
- package/dist/features/categories/schemas/firestore.d.ts +22 -1
- package/dist/features/categories/schemas/firestore.js +10 -0
- package/dist/features/categories/schemas/index.d.ts +6 -0
- package/dist/features/categories/schemas/index.js +2 -0
- package/dist/features/categories/types/index.d.ts +8 -0
- package/dist/features/categories/utils/taxonomy-visual.d.ts +16 -3
- package/dist/features/categories/utils/taxonomy-visual.js +26 -10
- package/dist/features/classified/components/ClassifiedDetailPageView.js +4 -9
- package/dist/features/contact/components/ContactPageView.d.ts +33 -1
- package/dist/features/contact/components/ContactPageView.js +58 -28
- package/dist/features/digital-codes/components/DigitalCodeDetailPageView.js +4 -9
- package/dist/features/grouped/components/GroupedListingDetailView.js +9 -1
- package/dist/features/grouped/schemas/firestore.d.ts +5 -0
- package/dist/features/homepage/actions/homepage-section-actions.d.ts +3 -3
- package/dist/features/homepage/components/CollectionCardsSection.d.ts +28 -6
- package/dist/features/homepage/components/CollectionCardsSection.js +43 -8
- package/dist/features/homepage/components/HowItWorksSection.d.ts +23 -6
- package/dist/features/homepage/components/HowItWorksSection.js +4 -4
- package/dist/features/homepage/components/PromoGrid.d.ts +31 -2
- package/dist/features/homepage/components/PromoGrid.js +12 -3
- package/dist/features/homepage/components/TestimonialsCarousel.d.ts +34 -2
- package/dist/features/homepage/components/TestimonialsCarousel.js +1 -1
- package/dist/features/homepage/components/index.d.ts +0 -20
- package/dist/features/homepage/components/index.js +0 -11
- package/dist/features/homepage/index.d.ts +0 -2
- package/dist/features/homepage/index.js +0 -2
- package/dist/features/homepage/lib/section-renderer.d.ts +9 -0
- package/dist/features/homepage/lib/section-renderer.js +202 -58
- package/dist/features/homepage/repository/homepage-sections.repository.d.ts +35 -3
- package/dist/features/homepage/repository/homepage-sections.repository.js +58 -8
- package/dist/features/homepage/schemas/firestore.d.ts +106 -3
- package/dist/features/homepage/schemas/firestore.js +32 -2
- package/dist/features/homepage/schemas/index.d.ts +36 -7
- package/dist/features/homepage/schemas/index.js +39 -27
- package/dist/features/homepage/server.d.ts +0 -3
- package/dist/features/homepage/server.js +0 -3
- package/dist/features/homepage/types/index.d.ts +0 -47
- package/dist/features/homepage/types/index.js +49 -0
- package/dist/features/layout/AppLayoutShell.js +1 -1
- package/dist/features/layout/BottomNavItem.js +1 -1
- package/dist/features/layout/BottomSheet.js +1 -1
- package/dist/features/layout/TitleBarLayout.js +1 -1
- package/dist/features/live/components/LiveItemDetailPageView.js +4 -9
- package/dist/features/media/hooks/useMedia.js +17 -0
- package/dist/features/media/repository/media-assets.repository.d.ts +46 -0
- package/dist/features/media/repository/media-assets.repository.js +31 -0
- package/dist/features/media/trust-signals.d.ts +85 -0
- package/dist/features/media/trust-signals.js +126 -0
- package/dist/features/parts/components/PartDetailPageView.d.ts +14 -1
- package/dist/features/parts/components/PartDetailPageView.js +2 -2
- package/dist/features/parts/components/PartsIndexPageView.d.ts +11 -2
- package/dist/features/parts/components/PartsIndexPageView.js +2 -2
- package/dist/features/parts/components/PartsSearchBox.d.ts +9 -0
- package/dist/features/parts/components/PartsSearchBox.js +57 -0
- package/dist/features/parts/schemas/firestore.d.ts +149 -3
- package/dist/features/parts/schemas/firestore.js +184 -0
- package/dist/features/payments/repository/payout.repository.d.ts +15 -0
- package/dist/features/payments/repository/payout.repository.js +21 -0
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +4 -11
- package/dist/features/pre-orders/components/PreOrdersIndexListing.js +1 -1
- package/dist/features/price-index/components/PriceIndexToolView.d.ts +3 -1
- package/dist/features/price-index/components/PriceIndexToolView.js +92 -13
- package/dist/features/products/components/CompareOverlay.d.ts +18 -1
- package/dist/features/products/components/CompareOverlay.js +21 -2
- package/dist/features/products/components/CustomSectionTabContent.d.ts +31 -0
- package/dist/features/products/components/CustomSectionTabContent.js +29 -3
- package/dist/features/products/components/GroupMemberPicker.d.ts +19 -1
- package/dist/features/products/components/GroupMemberPicker.js +46 -8
- package/dist/features/products/components/GroupSettingsPanel.d.ts +11 -1
- package/dist/features/products/components/GroupSettingsPanel.js +91 -3
- package/dist/features/products/components/PrizeDrawDetailPageView.js +1 -1
- package/dist/features/products/components/PrizeDrawEntryActions.d.ts +15 -1
- package/dist/features/products/components/PrizeDrawEntryActions.js +70 -8
- package/dist/features/products/components/ProductDetailPageView.js +74 -15
- package/dist/features/products/components/ProductForm.d.ts +13 -1
- package/dist/features/products/components/ProductForm.js +16 -2
- package/dist/features/products/components/ProductsIndexListing.d.ts +16 -1
- package/dist/features/products/components/ProductsIndexListing.js +3 -3
- package/dist/features/products/components/ShowGroupSection.js +15 -2
- package/dist/features/products/components/SparesListView.d.ts +7 -0
- package/dist/features/products/components/SparesListView.js +39 -0
- package/dist/features/products/constants/action-defs.d.ts +1 -0
- package/dist/features/products/constants/action-defs.js +1 -0
- package/dist/features/products/repository/products.repository.d.ts +98 -0
- package/dist/features/products/repository/products.repository.js +235 -17
- package/dist/features/products/schemas/firestore.d.ts +97 -4
- package/dist/features/products/schemas/firestore.js +104 -0
- package/dist/features/products/schemas/index.d.ts +10 -19
- package/dist/features/products/schemas/index.js +23 -6
- package/dist/features/products/types/index.d.ts +45 -1
- package/dist/features/products/utils/group-member-image.d.ts +39 -0
- package/dist/features/products/utils/group-member-image.js +3 -0
- package/dist/features/products/utils/listing-badge-variant.js +4 -0
- package/dist/features/reviews/components/ReviewsList.js +1 -1
- package/dist/features/scams/components/ScamProfileView.js +1 -1
- package/dist/features/search/components/EntityTypeahead.d.ts +44 -0
- package/dist/features/search/components/EntityTypeahead.js +92 -0
- package/dist/features/search/components/Search.d.ts +12 -1
- package/dist/features/search/components/Search.js +47 -3
- package/dist/features/search/components/SearchFacetRail.d.ts +11 -0
- package/dist/features/search/components/SearchFacetRail.js +92 -0
- package/dist/features/search/components/SearchResultsClient.d.ts +33 -0
- package/dist/features/search/components/SearchResultsClient.js +103 -0
- package/dist/features/search/components/SearchResultsPageView.d.ts +15 -1
- package/dist/features/search/components/SearchResultsPageView.js +2 -2
- package/dist/features/search/components/index.d.ts +0 -6
- package/dist/features/search/components/index.js +0 -3
- package/dist/features/search/hooks/useNavSuggestions.d.ts +13 -0
- package/dist/features/search/hooks/useScopedSearch.d.ts +34 -0
- package/dist/features/search/hooks/useScopedSearch.js +114 -0
- package/dist/features/search/hooks/useSiteSearch.d.ts +26 -0
- package/dist/features/search/hooks/useSiteSearch.js +149 -0
- package/dist/features/search/index.d.ts +0 -4
- package/dist/features/search/index.js +0 -4
- package/dist/features/search/manifest.d.ts +12 -0
- package/dist/features/search/manifest.js +17 -2
- package/dist/features/search/server.d.ts +0 -3
- package/dist/features/search/server.js +0 -3
- package/dist/features/seller/components/SellerListingTypeView.d.ts +1 -1
- package/dist/features/seller/components/SellerListingTypeView.js +20 -0
- package/dist/features/seller/components/SellerPayoutSettingsView.js +35 -14
- package/dist/features/seller/components/SellerProductShell.d.ts +1 -1
- package/dist/features/seller/components/SellerProductShell.js +2 -1
- package/dist/features/seller/components/SellerSidebar.js +1 -1
- package/dist/features/seller/components/SellerSparesView.d.ts +17 -0
- package/dist/features/seller/components/SellerSparesView.js +6 -0
- package/dist/features/seller/components/index.d.ts +2 -0
- package/dist/features/seller/components/index.js +1 -0
- package/dist/features/shell/CommandPalette.js +1 -1
- package/dist/features/sticker-trace/schemas/firestore.d.ts +19 -0
- package/dist/features/stores/components/StoreDetailLayoutView.d.ts +1 -1
- package/dist/features/stores/components/StoreDetailLayoutView.js +7 -82
- package/dist/features/stores/components/StoreHeader.js +1 -2
- package/dist/features/stores/components/StoreSparesPageView.d.ts +27 -0
- package/dist/features/stores/components/StoreSparesPageView.js +48 -0
- package/dist/features/stores/schemas/firestore.d.ts +19 -0
- package/dist/features/tester/seed-data/authored/buying__spares-and-groups.d.ts +2 -0
- package/dist/features/tester/seed-data/authored/buying__spares-and-groups.js +96 -0
- package/dist/features/tester/seed-data/authored/content-discovery__authenticity-checker.d.ts +2 -0
- package/dist/features/tester/seed-data/authored/content-discovery__authenticity-checker.js +280 -45
- package/dist/features/tester/seed-data/authored/content-discovery__category-tabs-franchise-bundles.js +54 -32
- package/dist/features/tester/seed-data/authored/content-discovery__parts-database.js +3 -2
- package/dist/features/tester/seed-data/authored/content-discovery__price-index-and-compare.d.ts +2 -0
- package/dist/features/tester/seed-data/authored/content-discovery__price-index-and-compare.js +73 -0
- package/dist/features/tester/seed-data/authored/content-discovery__site-wide-index.d.ts +2 -0
- package/dist/features/tester/seed-data/authored/content-discovery__site-wide-index.js +340 -0
- package/dist/features/tester/seed-data/authored/index.js +16 -0
- package/dist/features/tester/seed-data/authored/search-and-nav__header-search.d.ts +1 -0
- package/dist/features/tester/seed-data/authored/search-and-nav__header-search.js +57 -0
- package/dist/features/tester/seed-data/authored/selling__spares-and-group-editing.d.ts +2 -0
- package/dist/features/tester/seed-data/authored/selling__spares-and-group-editing.js +77 -0
- package/dist/features/tester/seed-data/authored/tools__sticker-promote-to-listings.d.ts +2 -0
- package/dist/features/tester/seed-data/authored/tools__sticker-promote-to-listings.js +58 -0
- package/dist/features/tester/seed-data/authored/tools__sticker-tracer.js +5 -4
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +372 -18
- package/dist/index.d.ts +17 -57
- package/dist/index.js +35 -96
- package/dist/next/routing/route-map.d.ts +42 -1
- package/dist/next/routing/route-map.js +45 -0
- package/dist/providers/db-firebase/base.repository.d.ts +22 -0
- package/dist/providers/db-firebase/base.repository.js +36 -0
- package/dist/schemas/registry.d.ts +15 -6
- package/dist/security/blind-index-tokens.d.ts +54 -0
- package/dist/security/blind-index-tokens.js +152 -0
- package/dist/security/index.d.ts +1 -1
- package/dist/security/index.js +1 -1
- package/dist/security/settings-encryption.d.ts +35 -0
- package/dist/security/settings-encryption.js +91 -0
- package/dist/seed/_helpers/brand-rows.js +38 -14
- package/dist/seed/_helpers/category-forest.js +73 -7
- package/dist/seed/_helpers/category-images-generated.d.ts +25 -6
- package/dist/seed/_helpers/category-images-generated.js +81 -6
- package/dist/seed/_helpers/category-models.d.ts +1 -1
- package/dist/seed/_helpers/category-models.js +7 -1
- package/dist/seed/_helpers/category-parts-glossary-map.js +8 -0
- package/dist/seed/_helpers/category-parts.d.ts +1 -1
- package/dist/seed/_helpers/category-parts.js +50 -2
- package/dist/seed/_helpers/character-features.d.ts +1 -1
- package/dist/seed/_helpers/character-features.js +2 -1
- package/dist/seed/_helpers/franchise-rows.js +10 -2
- package/dist/seed/_helpers/media.d.ts +47 -0
- package/dist/seed/_helpers/media.js +34 -0
- package/dist/seed/authenticity-knowledge-seed-data.d.ts +49 -5
- package/dist/seed/authenticity-knowledge-seed-data.js +10001 -549
- package/dist/seed/categories-seed-data.js +124 -20
- package/dist/seed/grouped-listings-seed-data.js +16 -0
- package/dist/seed/homepage-sections-seed-data.js +94 -5
- package/dist/seed/index.d.ts +2 -3
- package/dist/seed/index.js +2 -2
- package/dist/seed/manifest.js +3 -0
- package/dist/seed/media-assets-seed-data.d.ts +1 -1
- package/dist/seed/media-assets-seed-data.js +746 -196
- package/dist/seed/model-composition-seed-data.js +122 -6
- package/dist/seed/part-glossary-seed-data.d.ts +1 -1
- package/dist/seed/part-glossary-seed-data.js +37219 -463
- package/dist/seed/products-art-seed-data.js +7 -18
- package/dist/seed/products-auctions-seed-data.js +56 -47
- package/dist/seed/products-beyblade-x-seed-data.d.ts +2 -0
- package/dist/seed/products-beyblade-x-seed-data.js +441 -0
- package/dist/seed/products-catalogue-seed-data.d.ts +5 -5
- package/dist/seed/products-catalogue-seed-data.js +1500 -1240
- package/dist/seed/products-classifieds-seed-data.js +9 -27
- package/dist/seed/products-digital-codes-seed-data.js +9 -18
- package/dist/seed/products-live-items-seed-data.js +5 -13
- package/dist/seed/products-preorders-seed-data.js +67 -33
- package/dist/seed/products-prize-draws-seed-data.js +8 -17
- package/dist/seed/products-spares-seed-data.d.ts +2 -0
- package/dist/seed/products-spares-seed-data.js +368 -0
- package/dist/seed/products-standard-seed-data.js +39 -126
- package/dist/seed/products-stickers-seed-data.js +59 -15
- package/dist/seed/site-settings-seed-data.js +8 -0
- package/dist/seo/json-ld.d.ts +25 -0
- package/dist/seo/json-ld.js +28 -0
- package/dist/server-entry.d.ts +3 -1
- package/dist/server-entry.js +2 -2
- package/dist/server.d.ts +9 -9
- package/dist/server.js +27 -25
- package/dist/styles.css +202 -1
- package/dist/tailwind-input.css +31 -17
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/components/Accordion.js +1 -1
- package/dist/ui/components/Breadcrumb.js +1 -1
- package/dist/ui/components/DetailPageGallery.js +0 -2
- package/dist/ui/components/DetailPageHero.js +0 -1
- package/dist/ui/components/DetailPageTabs.js +1 -1
- package/dist/ui/components/Divider.js +3 -3
- package/dist/ui/components/GatedPrice.js +5 -1
- package/dist/ui/components/HorizontalScroller.js +1 -1
- package/dist/ui/components/ListingLayout.js +3 -3
- package/dist/ui/components/MediaTabs.style.css +81 -0
- package/dist/ui/components/Pagination.js +1 -1
- package/dist/ui/components/PendingValue.d.ts +45 -0
- package/dist/ui/components/PendingValue.js +7 -0
- package/dist/ui/components/Radio.style.css +119 -0
- package/dist/ui/components/RatingDisplay.js +2 -2
- package/dist/ui/components/SettingsSection.js +0 -2
- package/dist/ui/components/SiteLogo.js +3 -0
- package/dist/ui/components/SiteMark.js +3 -0
- package/dist/ui/components/SortDropdown.js +1 -1
- package/dist/ui/components/SpecTable.d.ts +58 -0
- package/dist/ui/components/SpecTable.js +8 -0
- package/dist/ui/components/StarRating.js +1 -3
- package/dist/ui/components/SummaryCard.js +1 -1
- package/dist/ui/components/index.style.css +1 -0
- package/dist/ui/icons/icon-registry.d.ts +1 -0
- package/dist/ui/icons/icon-registry.js +9 -1
- package/dist/ui/index.d.ts +4 -0
- package/dist/ui/index.js +2 -0
- package/dist/utils/search-txt-query.d.ts +12 -0
- package/dist/utils/search-txt-query.js +12 -0
- package/package.json +1 -1
- package/scripts/dedupe-peer-deps.mjs +18 -0
- package/scripts/seed-cli.mjs +135 -26
- package/scripts/verify-css-build.mjs +118 -37
- package/dist/_internal/server/features/search/actions.d.ts +0 -7
- package/dist/_internal/server/features/search/actions.js +0 -21
- package/dist/_internal/server/features/search/data.d.ts +0 -15
- package/dist/_internal/server/features/search/data.js +0 -18
- package/dist/_internal/server/features/search/index.d.ts +0 -3
- package/dist/_internal/server/features/search/index.js +0 -2
- package/dist/features/homepage/api/[id]/route.d.ts +0 -23
- package/dist/features/homepage/api/[id]/route.js +0 -103
- package/dist/features/homepage/api/route.d.ts +0 -14
- package/dist/features/homepage/api/route.js +0 -140
- package/dist/features/homepage/api/sections/[id]/route.d.ts +0 -26
- package/dist/features/homepage/api/sections/[id]/route.js +0 -95
- package/dist/features/homepage/api/sections/route.d.ts +0 -13
- package/dist/features/homepage/api/sections/route.js +0 -82
- package/dist/features/homepage/components/AdvertisementBanner.d.ts +0 -14
- package/dist/features/homepage/components/AdvertisementBanner.js +0 -35
- package/dist/features/homepage/components/BeforeAfterCard.d.ts +0 -9
- package/dist/features/homepage/components/BeforeAfterCard.js +0 -73
- package/dist/features/homepage/components/FeaturedResultsSection.d.ts +0 -17
- package/dist/features/homepage/components/FeaturedResultsSection.js +0 -17
- package/dist/features/homepage/components/HeroBanner.d.ts +0 -7
- package/dist/features/homepage/components/HeroBanner.js +0 -43
- package/dist/features/homepage/components/HeroSection.d.ts +0 -7
- package/dist/features/homepage/components/HeroSection.js +0 -6
- package/dist/features/homepage/components/HomepageSkeleton.d.ts +0 -2
- package/dist/features/homepage/components/HomepageSkeleton.js +0 -21
- package/dist/features/homepage/components/HomepageView.d.ts +0 -25
- package/dist/features/homepage/components/HomepageView.js +0 -5
- package/dist/features/homepage/components/NewsletterBanner.d.ts +0 -23
- package/dist/features/homepage/components/NewsletterBanner.js +0 -37
- package/dist/features/homepage/components/SiteFeaturesSection.d.ts +0 -14
- package/dist/features/homepage/components/SiteFeaturesSection.js +0 -11
- package/dist/features/homepage/components/TrustBadges.d.ts +0 -6
- package/dist/features/homepage/components/TrustBadges.js +0 -46
- package/dist/features/homepage/components/TrustIndicatorsSection.d.ts +0 -12
- package/dist/features/homepage/components/TrustIndicatorsSection.js +0 -11
- package/dist/features/homepage/hooks/useHomepage.d.ts +0 -11
- package/dist/features/homepage/hooks/useHomepage.js +0 -17
- package/dist/features/homepage/hooks/useHomepageSections.d.ts +0 -2
- package/dist/features/homepage/hooks/useHomepageSections.js +0 -10
- package/dist/features/homepage/repository/homepage.repository.d.ts +0 -11
- package/dist/features/homepage/repository/homepage.repository.js +0 -25
- package/dist/features/search/actions/index.d.ts +0 -1
- package/dist/features/search/actions/index.js +0 -1
- package/dist/features/search/actions/search-actions.d.ts +0 -18
- package/dist/features/search/actions/search-actions.js +0 -43
- package/dist/features/search/api/route.d.ts +0 -22
- package/dist/features/search/api/route.js +0 -128
- package/dist/features/search/columns/index.d.ts +0 -17
- package/dist/features/search/columns/index.js +0 -49
- package/dist/features/search/components/SearchFiltersRow.d.ts +0 -22
- package/dist/features/search/components/SearchFiltersRow.js +0 -21
- package/dist/features/search/components/SearchResultsSection.d.ts +0 -53
- package/dist/features/search/components/SearchResultsSection.js +0 -35
- package/dist/features/search/components/SearchView.d.ts +0 -27
- package/dist/features/search/components/SearchView.js +0 -8
- package/dist/features/search/hooks/useSearch.d.ts +0 -21
- package/dist/features/search/hooks/useSearch.js +0 -33
- package/dist/features/search/repository/search.repository.d.ts +0 -14
- package/dist/features/search/repository/search.repository.js +0 -59
- package/dist/features/search/schemas/index.d.ts +0 -70
- package/dist/features/search/schemas/index.js +0 -36
- package/dist/features/search/types/index.d.ts +0 -48
- package/dist/features/stores/components/StoreScopedSearch.d.ts +0 -17
- package/dist/features/stores/components/StoreScopedSearch.js +0 -27
- package/dist/seed/defaults/homepage-sections.d.ts +0 -2
- package/dist/seed/defaults/homepage-sections.js +0 -60
- package/dist/seed/factories/homepage-section.factory.d.ts +0 -10
- package/dist/seed/factories/homepage-section.factory.js +0 -13
- /package/dist/{features/search/types/index.js → _internal/shared/listing-types/spares/og.d.ts} +0 -0
package/dist/ui/index.js
CHANGED
|
@@ -30,6 +30,7 @@ export { FormErrorSummary } from "./forms/index.js";
|
|
|
30
30
|
export { buildColumns, createColumnBuilder, renderBoolean, renderCurrency, renderCurrencyCompact, renderCount, renderNullable, renderRating, getStatusTone, getResourceIcon, } from "./columns/index.js";
|
|
31
31
|
export { Section, sectionBackgroundStyle, Article, Main, Aside, Nav, BlockHeader, BlockFooter, Ul, Ol, Li, Table, Thead, Tbody, Tr, Th, Td, Code, Pre, Blockquote, Figure, Figcaption, Dl, Dt, Dd, } from "./components/Semantic.js";
|
|
32
32
|
export { Div } from "./components/Div.js";
|
|
33
|
+
export { SpecTable } from "./components/SpecTable.js";
|
|
33
34
|
export { Heading, Text, Label, Caption, Span } from "./components/Typography.js";
|
|
34
35
|
// --- Filter chip group (SB10-C completion, S8 2026-05-13) --------------------
|
|
35
36
|
export { FilterChipGroup } from "./components/FilterChipGroup.js";
|
|
@@ -156,6 +157,7 @@ export { HorizontalRule } from "./components/HorizontalRule.js";
|
|
|
156
157
|
export { Anchor } from "./components/Anchor.js";
|
|
157
158
|
export { Scrim } from "./components/Scrim.js";
|
|
158
159
|
export { Kbd } from "./components/Kbd.js";
|
|
160
|
+
export { PendingValue } from "./components/PendingValue.js";
|
|
159
161
|
export { StickyToolbar } from "./components/StickyToolbar.js";
|
|
160
162
|
export { Show, Hide } from "./components/Responsive.js";
|
|
161
163
|
export { CollapsibleSection } from "./components/CollapsibleSection.js";
|
|
@@ -87,6 +87,18 @@ export interface SearchWindowModel {
|
|
|
87
87
|
*
|
|
88
88
|
* `refineSearchTxt` grew a real-pagination mode, and `products` was the only
|
|
89
89
|
* caller converted — deliberately, so the other eleven stayed byte-identical.
|
|
90
|
+
*
|
|
91
|
+
* 🛑 That sentence is now HISTORY, not status. Measured 2026-10-19: ELEVEN
|
|
92
|
+
* repositories use `beginSearchWindow`, and `audit-listing-search-intact`
|
|
93
|
+
* (C6) enforces all three parts of the conversion on each of them — doing
|
|
94
|
+
* parts 1 and 3 without 2 "reads exactly like a working conversion and is
|
|
95
|
+
* the half that no-ops", which is why the audit checks the triple rather
|
|
96
|
+
* than the presence of the call.
|
|
97
|
+
*
|
|
98
|
+
* `faqs` is the deliberate holdout: it hand-rolls the refine and returns the
|
|
99
|
+
* legacy page-only shape, which this file's own docstring describes as
|
|
100
|
+
* "preserved verbatim for unconverted callers". That is a known limitation,
|
|
101
|
+
* not a defect — do not "fix" it as a bug (Rule #4).
|
|
90
102
|
* The conversion is mechanical and has THREE parts that must all happen:
|
|
91
103
|
*
|
|
92
104
|
* 1. fetch a bounded WINDOW instead of the requested page;
|
|
@@ -56,6 +56,18 @@ export const SEARCH_REFINE_WINDOW = 250;
|
|
|
56
56
|
*
|
|
57
57
|
* `refineSearchTxt` grew a real-pagination mode, and `products` was the only
|
|
58
58
|
* caller converted — deliberately, so the other eleven stayed byte-identical.
|
|
59
|
+
*
|
|
60
|
+
* 🛑 That sentence is now HISTORY, not status. Measured 2026-10-19: ELEVEN
|
|
61
|
+
* repositories use `beginSearchWindow`, and `audit-listing-search-intact`
|
|
62
|
+
* (C6) enforces all three parts of the conversion on each of them — doing
|
|
63
|
+
* parts 1 and 3 without 2 "reads exactly like a working conversion and is
|
|
64
|
+
* the half that no-ops", which is why the audit checks the triple rather
|
|
65
|
+
* than the presence of the call.
|
|
66
|
+
*
|
|
67
|
+
* `faqs` is the deliberate holdout: it hand-rolls the refine and returns the
|
|
68
|
+
* legacy page-only shape, which this file's own docstring describes as
|
|
69
|
+
* "preserved verbatim for unconverted callers". That is a known limitation,
|
|
70
|
+
* not a defect — do not "fix" it as a bug (Rule #4).
|
|
59
71
|
* The conversion is mechanical and has THREE parts that must all happen:
|
|
60
72
|
*
|
|
61
73
|
* 1. fetch a bounded WINDOW instead of the requested page;
|
package/package.json
CHANGED
|
@@ -44,6 +44,24 @@ const TRANSITIVE_RUNTIME_DUPS = [
|
|
|
44
44
|
// query-core and a parallel QueryClientContext instance ships in the SSR
|
|
45
45
|
// bundle, producing the "No QueryClient set" crash on every page (2026-06-11).
|
|
46
46
|
"@tanstack/query-core",
|
|
47
|
+
/*
|
|
48
|
+
* firebase-admin (peer) bundles @google-cloud/storage, which does NOT own a
|
|
49
|
+
* React context — so the 2026-06-11 runtime crash class does not apply here.
|
|
50
|
+
* It still has to be pruned, for a different reason: TYPE IDENTITY.
|
|
51
|
+
*
|
|
52
|
+
* `Bucket` carries a private member, so TypeScript compares the two copies
|
|
53
|
+
* nominally and refuses to pass a root-resolved Bucket into a function typed
|
|
54
|
+
* against appkit's copy. Any appkit module that accepts a Bucket from a
|
|
55
|
+
* caller is then uncompilable from the consumer, which includes appkit/src
|
|
56
|
+
* under the file: pin.
|
|
57
|
+
*
|
|
58
|
+
* MEASURED rather than assumed: removing the directory fixes it and
|
|
59
|
+
* restoring it brings the error straight back, with the tsbuildinfo cleared
|
|
60
|
+
* both times — the first attempt cleared a stale cache in the same step and
|
|
61
|
+
* could not tell which change was responsible.
|
|
62
|
+
*/
|
|
63
|
+
"@google-cloud/storage",
|
|
64
|
+
"@google-cloud/firestore",
|
|
47
65
|
];
|
|
48
66
|
|
|
49
67
|
// Peer deps that have NO React context / module-scope singleton and that the
|
package/scripts/seed-cli.mjs
CHANGED
|
@@ -181,7 +181,8 @@ const appkit = await import("@mohasinac/appkit");
|
|
|
181
181
|
// client-safe barrel, only from "@mohasinac/appkit/server". The *_PII_FIELDS
|
|
182
182
|
// / *_PII_INDEX_MAP constants are plain data and stay in the main barrel.
|
|
183
183
|
const appkitServer = await import("@mohasinac/appkit/server");
|
|
184
|
-
const { encryptPiiFields, piiIndicesFor, encryptPayoutDetails, encryptPayoutBankAccount, encryptShippingConfig
|
|
184
|
+
const { encryptPiiFields, piiIndicesFor, encryptPayoutDetails, encryptPayoutBankAccount, encryptShippingConfig,
|
|
185
|
+
buildTokensIndex, BLIND_INDEX_KEY_VERSION_FIELD, CURRENT_BLIND_INDEX_KEY_VERSION } = appkitServer;
|
|
185
186
|
|
|
186
187
|
const {
|
|
187
188
|
// seed data
|
|
@@ -191,9 +192,9 @@ const {
|
|
|
191
192
|
storeCategoriesSeedData, listingTemplatesSeedData, moderationQueueSeedData, reportsSeedData,
|
|
192
193
|
itemRequestsSeedData, storeGoogleConfigSeedData,
|
|
193
194
|
categoriesSeedData, storesSeedData, sessionsSeedData,
|
|
194
|
-
productsStandardSeedData, productsAuctionsSeedData, productsPreordersSeedData,
|
|
195
|
+
productsStandardSeedData, productsBeybladeXSeedData, productsAuctionsSeedData, productsPreordersSeedData,
|
|
195
196
|
productsPrizeDrawsSeedData, productsClassifiedsSeedData, productsDigitalCodesSeedData, productsLiveItemsSeedData,
|
|
196
|
-
productsArtSeedData, productsStickersSeedData,
|
|
197
|
+
productsArtSeedData, productsStickersSeedData, productsSparesSeedData,
|
|
197
198
|
productsCatalogueSeedData,
|
|
198
199
|
FRANCHISE_BY_CATEGORY_ROOT,
|
|
199
200
|
ordersSeedData, reviewsSeedData, cartsSeedData, bidsSeedData,
|
|
@@ -494,18 +495,47 @@ const SEED_DATA_MAP = {
|
|
|
494
495
|
categories: categoriesSeedData,
|
|
495
496
|
stores: storesSeedData,
|
|
496
497
|
products: withFranchise(withDerivedCategoryFields([
|
|
497
|
-
...(productsStandardSeedData || []),
|
|
498
|
+
...(productsStandardSeedData || []),
|
|
499
|
+
// Real, wiki-verified Beyblade X listings under store-letitrip-official —
|
|
500
|
+
// added 2026-10-19 for PhonePe merchant registration, which requires at
|
|
501
|
+
// least one genuinely purchasable product. See the file's own header.
|
|
502
|
+
...(productsBeybladeXSeedData || []),
|
|
503
|
+
...(productsAuctionsSeedData || []), ...(productsPreordersSeedData || []),
|
|
498
504
|
...(productsPrizeDrawsSeedData || []), ...(productsClassifiedsSeedData || []), ...(productsDigitalCodesSeedData || []), ...(productsLiveItemsSeedData || []),
|
|
499
505
|
// art + stickers were written, exported from the seed barrel, and then never
|
|
500
506
|
// spread here — so 13 fixtures had NEVER reached the database, /art and
|
|
501
507
|
// /stickers were permanently empty, and listingType=art|stickers returned 0.
|
|
502
508
|
// Root Cause #58's family one layer down: added everywhere except the runner.
|
|
503
509
|
...(productsArtSeedData || []), ...(productsStickersSeedData || []),
|
|
504
|
-
//
|
|
505
|
-
//
|
|
506
|
-
//
|
|
507
|
-
//
|
|
508
|
-
...(
|
|
510
|
+
// 🛑 BOTH sites, every time. This file's own header records 13 art/sticker
|
|
511
|
+
// fixtures that never reached the database because only the import was
|
|
512
|
+
// edited and this spread was not — the loader then wrote every OTHER
|
|
513
|
+
// product and reported success.
|
|
514
|
+
...(productsSparesSeedData || []),
|
|
515
|
+
/*
|
|
516
|
+
* 🛑 DEREGISTERED 2026-10-19 — productsCatalogueSeedData (1,237 rows, one
|
|
517
|
+
* per taxonomy leaf) is NOT spread here, on purpose.
|
|
518
|
+
*
|
|
519
|
+
* This is a reversal of the comment that used to be here, which said the
|
|
520
|
+
* opposite: that this spread was "what makes `products` reproducible
|
|
521
|
+
* after a full wipe." That was true when the catalogue was the only
|
|
522
|
+
* content under its leaf categories. It stopped being true the moment
|
|
523
|
+
* real curated listings exist for the SAME leaves — four of them,
|
|
524
|
+
* confirmed by grep: `category-aeropegasus-3-70a`, `category-
|
|
525
|
+
* valkyrievolt-s4-70v`, `category-wizardarrow-4-80b`, `category-
|
|
526
|
+
* knightshield-3-80n` each already carry one generated row. Re-enabling
|
|
527
|
+
* this spread would not just add filler back — it would put a
|
|
528
|
+
* hash-priced synthetic duplicate (one measured as a NEGATIVE price,
|
|
529
|
+
* `-61`) into the exact categories the real BX-53 fixture now occupies,
|
|
530
|
+
* silently resurrecting the thing a full `appkit-seed purge` was just run
|
|
531
|
+
* to remove.
|
|
532
|
+
*
|
|
533
|
+
* The generator (`scripts/gen-catalogue-listings.mjs`) and the committed
|
|
534
|
+
* file itself are both left untouched — this is deliberately a one-line
|
|
535
|
+
* "stop loading it" change, not a deletion. Re-enable only after deciding
|
|
536
|
+
* what should happen to a leaf that now has BOTH a real listing and a
|
|
537
|
+
* generated one.
|
|
538
|
+
*/
|
|
509
539
|
])),
|
|
510
540
|
orders: ordersSeedData,
|
|
511
541
|
reviews: reviewsSeedData,
|
|
@@ -596,6 +626,33 @@ async function purgeCollection(path) {
|
|
|
596
626
|
return removed;
|
|
597
627
|
}
|
|
598
628
|
|
|
629
|
+
/*
|
|
630
|
+
* 🛑 `TOKENS_INDEX_MAP` holds ONLY `payouts`, and that is a measured fact
|
|
631
|
+
* about this file, not an oversight.
|
|
632
|
+
*
|
|
633
|
+
* `encryptSeedPii` is called from exactly one place — `loadGeneric`'s
|
|
634
|
+
* per-doc loop. `users` and `addresses` are seeded by their OWN dedicated
|
|
635
|
+
* loaders (`loadUsers`, the addresses block near line 1029) that write
|
|
636
|
+
* straight to Firestore and never call this function — so a `users`/
|
|
637
|
+
* `addresses` entry here would be dead code, silently unreachable, which is
|
|
638
|
+
* worse than no entry: it would read as "handled" to the next person who
|
|
639
|
+
* greps for it.
|
|
640
|
+
*
|
|
641
|
+
* It is also the right scope rather than a gap, because `users` and
|
|
642
|
+
* `addresses` are PRESERVE-tier in the tester harness — never wiped, never
|
|
643
|
+
* reseeded — so the only two things that can write their `*TokensIndex`
|
|
644
|
+
* are a REAL write (covered by `UserRepository`/`AddressesRepository`'s
|
|
645
|
+
* `buildTokensIndexFor`, wired separately) and the one-time bootstrap seed
|
|
646
|
+
* load `appkit-seed load --collections users` documented in CLAUDE.md's
|
|
647
|
+
* § "Claude Tester" — which `backfill-blind-index.mjs` exists to catch up
|
|
648
|
+
* after. `payouts` has no such safety net: it is SEED_TRANSACTIONAL, so it
|
|
649
|
+
* cascades and RESEEDS on every tester run that touches its store, through
|
|
650
|
+
* exactly this function — which is why it is the one entry that matters.
|
|
651
|
+
*/
|
|
652
|
+
const TOKENS_INDEX_MAP = {
|
|
653
|
+
payouts: { field: "sellerTokensIndex", from: ["sellerName", "sellerEmail"] },
|
|
654
|
+
};
|
|
655
|
+
|
|
599
656
|
function encryptSeedPii(collection, data) {
|
|
600
657
|
const PII_MAP = {
|
|
601
658
|
orders: ORDER_PII_FIELDS,
|
|
@@ -607,11 +664,28 @@ function encryptSeedPii(collection, data) {
|
|
|
607
664
|
eventEntries: EVENT_ENTRY_PII_FIELDS,
|
|
608
665
|
};
|
|
609
666
|
const fields = PII_MAP[collection];
|
|
610
|
-
|
|
611
|
-
let result = encryptPiiFields(data, [...fields]);
|
|
667
|
+
let result = fields ? encryptPiiFields(data, [...fields]) : { ...data };
|
|
612
668
|
if (collection === "payouts" && result.bankAccount) {
|
|
613
669
|
result.bankAccount = encryptPayoutBankAccount(result.bankAccount);
|
|
614
670
|
}
|
|
671
|
+
|
|
672
|
+
/*
|
|
673
|
+
* 🛑 THIS IS WHAT MAKES `payouts` SURVIVE A TESTER WIPE WITH A WORKING
|
|
674
|
+
* SEARCH INDEX. `payouts` is SEED_TRANSACTIONAL in the tester harness —
|
|
675
|
+
* it cascades on `storeId` whenever its store is wiped, then gets
|
|
676
|
+
* RE-SEEDED by exactly this function. Without this block, the reseeded
|
|
677
|
+
* documents would carry ciphertext and no `sellerTokensIndex` at all,
|
|
678
|
+
* silently undoing a one-shot backfill on the very next tester run.
|
|
679
|
+
*/
|
|
680
|
+
const tokensIndex = TOKENS_INDEX_MAP[collection];
|
|
681
|
+
if (tokensIndex) {
|
|
682
|
+
const values = tokensIndex.from.map((f) => data[f]).filter((v) => typeof v === "string");
|
|
683
|
+
if (values.length > 0) {
|
|
684
|
+
result[tokensIndex.field] = buildTokensIndex(...values);
|
|
685
|
+
result[BLIND_INDEX_KEY_VERSION_FIELD] = CURRENT_BLIND_INDEX_KEY_VERSION;
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
|
|
615
689
|
return result;
|
|
616
690
|
}
|
|
617
691
|
|
|
@@ -1229,9 +1303,23 @@ async function cmdPurge() {
|
|
|
1229
1303
|
const sub = SUBCOLLECTIONS.find((s) => s.key === colName);
|
|
1230
1304
|
try {
|
|
1231
1305
|
if (sub) {
|
|
1232
|
-
/*
|
|
1233
|
-
|
|
1234
|
-
|
|
1306
|
+
/*
|
|
1307
|
+
* 🛑 Unfiltered collection-group read, filtered in memory — NOT
|
|
1308
|
+
* `.where("seedPurpose", "==", "test")` on the group.
|
|
1309
|
+
*
|
|
1310
|
+
* A single-field equality is auto-indexed per COLLECTION, but a
|
|
1311
|
+
* COLLECTION-GROUP query needs an explicit composite/group index that
|
|
1312
|
+
* this project has never deployed, and `purge` must not require a
|
|
1313
|
+
* Firebase deploy just to run (it is a read-then-delete script, not an
|
|
1314
|
+
* infra change). Measured live: `3 FAILED_PRECONDITION: ... requires a
|
|
1315
|
+
* COLLECTION_GROUP_ASC index`. `couponUsage` is small (single digits
|
|
1316
|
+
* per store), so reading the whole group and filtering client-side
|
|
1317
|
+
* costs nothing here — this is not a pattern to reuse on a large
|
|
1318
|
+
* subcollection.
|
|
1319
|
+
*/
|
|
1320
|
+
const snap = await db.collectionGroup(sub.name).get();
|
|
1321
|
+
const docs = snap.docs.filter((d) => d.data()?.seedPurpose === "test");
|
|
1322
|
+
if (docs.length > 0) plan.push({ colName, docs, isSub: true });
|
|
1235
1323
|
} else {
|
|
1236
1324
|
const snap = await db.collection(path).where("seedPurpose", "==", "test").get();
|
|
1237
1325
|
if (snap.size > 0) plan.push({ colName, docs: snap.docs, isSub: false });
|
|
@@ -1286,19 +1374,40 @@ async function cmdPurge() {
|
|
|
1286
1374
|
}
|
|
1287
1375
|
}
|
|
1288
1376
|
}
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1377
|
+
/*
|
|
1378
|
+
* 🛑 BulkWriter, never a manually-chunked `db.batch()`.
|
|
1379
|
+
*
|
|
1380
|
+
* A 450-document chunk stays under Firestore's 500-OPERATION limit but
|
|
1381
|
+
* says nothing about the 10 MiB per-request PAYLOAD limit — and a rich
|
|
1382
|
+
* document (a product's `searchTxt` array, `customFields`,
|
|
1383
|
+
* `customSections`, `images[]`) can blow that well before 450 count.
|
|
1384
|
+
* Measured live purging this exact `products` collection: `3
|
|
1385
|
+
* INVALID_ARGUMENT: Transaction too big` partway through, which aborted
|
|
1386
|
+
* the whole chunk's commit and silently left every doc in it undeleted —
|
|
1387
|
+
* `stats.deleted` kept counting the chunk as done regardless, so the
|
|
1388
|
+
* printed total was wrong by exactly the size of the failed chunk.
|
|
1389
|
+
*
|
|
1390
|
+
* `db.bulkWriter()` sizes and retries its own requests, so it is correct
|
|
1391
|
+
* regardless of document size — CLAUDE.md documents the identical failure
|
|
1392
|
+
* for a `categories` wipe (1,177 rows, ~100-entry `searchTxt` each) dying
|
|
1393
|
+
* at a 400-doc batch for the same reason.
|
|
1394
|
+
*/
|
|
1395
|
+
const writer = db.bulkWriter();
|
|
1396
|
+
let chunkErrors = 0;
|
|
1397
|
+
writer.onWriteError((err) => {
|
|
1398
|
+
chunkErrors += 1;
|
|
1399
|
+
console.error(`✗ ${p.colName}/${err.documentRef.id}: ${err.message}`);
|
|
1400
|
+
// Retry up to the default limit; beyond that, give up on this one doc
|
|
1401
|
+
// rather than retrying forever.
|
|
1402
|
+
return err.failedAttempts < 3;
|
|
1403
|
+
});
|
|
1404
|
+
for (const d of p.docs) {
|
|
1405
|
+
writer.delete(d.ref);
|
|
1406
|
+
if (VERBOSE) console.log(` - ${p.colName}/${d.id}`);
|
|
1301
1407
|
}
|
|
1408
|
+
await writer.close();
|
|
1409
|
+
stats.deleted += p.docs.length - chunkErrors;
|
|
1410
|
+
stats.errors += chunkErrors;
|
|
1302
1411
|
}
|
|
1303
1412
|
|
|
1304
1413
|
console.log(
|
|
@@ -1,53 +1,134 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* in the compiled dist/tailwind-utilities.css. Fails the build if any are missing,
|
|
4
|
-
* catching cases where a stale or incomplete CSS bundle was published.
|
|
2
|
+
* verify-css-build — the BUILD-TIME guard on appkit's compiled stylesheets.
|
|
5
3
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Runs at the end of `npm run build`, before `npm publish` can ship the tarball.
|
|
5
|
+
*
|
|
6
|
+
* ── What this is for, and what it is NOT ───────────────────────────────────
|
|
7
|
+
* This answers "did the build produce a plausible, complete stylesheet?" — a
|
|
8
|
+
* question about the ARTEFACT. It deliberately does not try to answer "does
|
|
9
|
+
* every authored class resolve to a rule?", which is a question about the
|
|
10
|
+
* CODE: `scripts/audit-dead-css-classes.mjs` owns that, reads all three
|
|
11
|
+
* stylesheets, and runs in `npm run check` and the Stop hook.
|
|
12
|
+
*
|
|
13
|
+
* 🛑 It used to be a list of EIGHT hardcoded strings — `{md,lg}:{block,flex,
|
|
14
|
+
* hidden}` plus two breakpoints — chosen in 2026-08 for one specific nav bug.
|
|
15
|
+
* That is what it could see, and nothing added since was covered: not a hover,
|
|
16
|
+
* not a dropdown, not one of the ~980 hand-written `appkit-*` classes. Asked
|
|
17
|
+
* in 2026-10 whether the CSS was checked "or just a few", the honest answer
|
|
18
|
+
* was: just those eight.
|
|
19
|
+
*
|
|
20
|
+
* The replacement checks properties that hold for ANY correct build, so it
|
|
21
|
+
* cannot go stale as the class surface grows:
|
|
22
|
+
*
|
|
23
|
+
* 1. Each artefact EXISTS and is non-trivially large.
|
|
24
|
+
* 2. Each carries a floor of rules — catching a half-written `dist/`.
|
|
25
|
+
* 3. `styles.css` has no unresolved `@import` left in it.
|
|
26
|
+
* 4. The responsive machinery is present (media queries at the real
|
|
27
|
+
* breakpoints), without naming individual classes.
|
|
28
|
+
*
|
|
29
|
+
* ── Why (2) exists: the half-written dist is a REAL failure here ───────────
|
|
30
|
+
* CLAUDE.md records a publish that died inside its own build step and left
|
|
31
|
+
* `dist/` with `client-entry.js` present and `tailwind-utilities.css` gone.
|
|
32
|
+
* A guard that only checked for a few class names in a file that existed
|
|
33
|
+
* would have passed a stylesheet missing most of itself. The floors are set
|
|
34
|
+
* well below current size so ordinary authoring never trips them; they exist
|
|
35
|
+
* to catch an order-of-magnitude loss, not a diff.
|
|
8
36
|
*/
|
|
9
|
-
import { readFileSync } from "fs";
|
|
37
|
+
import { readFileSync, statSync, existsSync } from "fs";
|
|
10
38
|
import { resolve, dirname } from "path";
|
|
11
39
|
import { fileURLToPath } from "url";
|
|
12
40
|
|
|
13
41
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
42
|
+
const DIST = resolve(__dirname, "../dist");
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Floors, not targets. Measured 2026-10-19 at 205 KB / 2,400 rules for the
|
|
46
|
+
* utilities and 495 KB / 7,900 rules for the components; these sit at roughly
|
|
47
|
+
* a third of that, so deleting a feature is fine and losing the file is not.
|
|
48
|
+
*/
|
|
49
|
+
const ARTEFACTS = [
|
|
50
|
+
{
|
|
51
|
+
file: "tailwind-utilities.css",
|
|
52
|
+
minBytes: 60_000,
|
|
53
|
+
minRules: 800,
|
|
54
|
+
what: "Tailwind utilities generated from appkit/src",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
file: "styles.css",
|
|
58
|
+
minBytes: 150_000,
|
|
59
|
+
minRules: 2_500,
|
|
60
|
+
what: "hand-written appkit-* component CSS, flattened from *.style.css",
|
|
61
|
+
},
|
|
31
62
|
];
|
|
32
63
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
64
|
+
/**
|
|
65
|
+
* The breakpoints the layout primitives actually switch on. Expressed as
|
|
66
|
+
* MEDIA QUERIES rather than class names: a class list has to be maintained
|
|
67
|
+
* and silently narrows over time, while "the build emitted rules at these
|
|
68
|
+
* widths" stays true however the classes are spelled.
|
|
69
|
+
*
|
|
70
|
+
* rem, not px — Tailwind v4 emits `min-width: 64rem`, the same viewport width
|
|
71
|
+
* v3's `1024px` meant at the browser default root font-size (this project does
|
|
72
|
+
* not override `html { font-size }`).
|
|
73
|
+
*/
|
|
74
|
+
const BREAKPOINTS = ["40rem", "48rem", "64rem", "80rem"];
|
|
75
|
+
|
|
76
|
+
const problems = [];
|
|
77
|
+
|
|
78
|
+
for (const { file, minBytes, minRules, what } of ARTEFACTS) {
|
|
79
|
+
const p = resolve(DIST, file);
|
|
80
|
+
if (!existsSync(p)) {
|
|
81
|
+
problems.push(`${file} — MISSING (${what})`);
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
const bytes = statSync(p).size;
|
|
85
|
+
const css = readFileSync(p, "utf8");
|
|
86
|
+
// Rule count ≈ declaration blocks. Minified output is one line, so counting
|
|
87
|
+
// `{` is the only size-independent measure available.
|
|
88
|
+
const rules = (css.match(/\{/g) ?? []).length;
|
|
89
|
+
|
|
90
|
+
if (bytes < minBytes) {
|
|
91
|
+
problems.push(`${file} — ${bytes} bytes, below the ${minBytes} floor (${what})`);
|
|
92
|
+
}
|
|
93
|
+
if (rules < minRules) {
|
|
94
|
+
problems.push(`${file} — ${rules} rules, below the ${minRules} floor (${what})`);
|
|
95
|
+
}
|
|
96
|
+
// An unresolved @import means bundle-css.mjs did not run, or ran against an
|
|
97
|
+
// already-flattened file. Turbopack does not reliably resolve nested CSS
|
|
98
|
+
// imports, so one left here ships as missing styles.
|
|
99
|
+
if (file === "styles.css" && /@import\s+["']\./.test(css)) {
|
|
100
|
+
problems.push(`${file} — contains an unresolved relative @import; run bundle-css.mjs`);
|
|
101
|
+
}
|
|
40
102
|
}
|
|
41
103
|
|
|
42
|
-
const
|
|
104
|
+
const utilitiesPath = resolve(DIST, "tailwind-utilities.css");
|
|
105
|
+
if (existsSync(utilitiesPath)) {
|
|
106
|
+
const css = readFileSync(utilitiesPath, "utf8");
|
|
107
|
+
const missingBps = BREAKPOINTS.filter((bp) => !css.includes(`min-width:${bp}`) && !css.includes(`min-width: ${bp}`));
|
|
108
|
+
if (missingBps.length) {
|
|
109
|
+
problems.push(
|
|
110
|
+
`tailwind-utilities.css — no @media rule at ${missingBps.join(", ")}; ` +
|
|
111
|
+
`the responsive layer did not build`,
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
43
115
|
|
|
44
|
-
if (
|
|
45
|
-
console.error("[verify-css-build] FAIL:
|
|
46
|
-
|
|
116
|
+
if (problems.length) {
|
|
117
|
+
console.error("[verify-css-build] FAIL:");
|
|
118
|
+
for (const p of problems) console.error(` - ${p}`);
|
|
119
|
+
console.error("");
|
|
120
|
+
console.error(" The build did not produce a complete stylesheet. Most likely causes:");
|
|
121
|
+
console.error(" - a concurrent `npm run build` wrote dist/ at the same time");
|
|
122
|
+
console.error(" (never run two builds at once — see CLAUDE.md's publish rules)");
|
|
123
|
+
console.error(" - copy-assets.mjs or bundle-css.mjs did not run");
|
|
124
|
+
console.error(" - the tailwindcss CLI failed without a non-zero exit");
|
|
47
125
|
console.error("");
|
|
48
|
-
console.error("
|
|
49
|
-
console.error("
|
|
126
|
+
console.error(" For per-class completeness run `npm run audit dead-css-classes`,");
|
|
127
|
+
console.error(" which compares every authored class against the compiled CSS.");
|
|
50
128
|
process.exit(1);
|
|
51
129
|
}
|
|
52
130
|
|
|
53
|
-
console.log(
|
|
131
|
+
console.log(
|
|
132
|
+
`[verify-css-build] OK — ${ARTEFACTS.length} artefact(s) present, above their size/rule floors, ` +
|
|
133
|
+
`responsive layer built at ${BREAKPOINTS.join(" / ")}.`,
|
|
134
|
+
);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type ActionResult } from "@mohasinac/appkit/server";
|
|
2
|
-
import type { SearchQuery } from "../../../../features/search/types";
|
|
3
|
-
/**
|
|
4
|
-
* Server action for client-initiated search (debounced as-you-type).
|
|
5
|
-
* Bypasses React.cache() so each call returns fresh results.
|
|
6
|
-
*/
|
|
7
|
-
export declare function searchAction(query: SearchQuery): Promise<ActionResult<unknown>>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use server";
|
|
2
|
-
import { wrapAction } from "@mohasinac/appkit/server";
|
|
3
|
-
import { searchProducts } from "../../../../features/search/actions/search-actions.js";
|
|
4
|
-
/**
|
|
5
|
-
* Server action for client-initiated search (debounced as-you-type).
|
|
6
|
-
* Bypasses React.cache() so each call returns fresh results.
|
|
7
|
-
*/
|
|
8
|
-
export async function searchAction(query) {
|
|
9
|
-
return wrapAction(async () => {
|
|
10
|
-
return searchProducts(query).catch(() => ({
|
|
11
|
-
items: [],
|
|
12
|
-
q: query.q ?? "",
|
|
13
|
-
total: 0,
|
|
14
|
-
page: 1,
|
|
15
|
-
pageSize: query.pageSize ?? 20,
|
|
16
|
-
totalPages: 0,
|
|
17
|
-
hasMore: false,
|
|
18
|
-
backend: "in-memory",
|
|
19
|
-
}));
|
|
20
|
-
});
|
|
21
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { SearchQuery } from "../../../../features/search/types";
|
|
2
|
-
/**
|
|
3
|
-
* SSR-compatible search read — deduplicated per request via React.cache().
|
|
4
|
-
* Used by the /search page to pre-render results without a client fetch.
|
|
5
|
-
*/
|
|
6
|
-
export declare const getSearchResults: (query: SearchQuery) => Promise<import("../../../..").SearchProductsResult | {
|
|
7
|
-
items: never[];
|
|
8
|
-
q: string;
|
|
9
|
-
total: number;
|
|
10
|
-
page: number;
|
|
11
|
-
pageSize: number;
|
|
12
|
-
totalPages: number;
|
|
13
|
-
hasMore: boolean;
|
|
14
|
-
backend: "in-memory";
|
|
15
|
-
}>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { cache } from "react";
|
|
2
|
-
import { searchProducts } from "../../../../features/search/actions/search-actions.js";
|
|
3
|
-
/**
|
|
4
|
-
* SSR-compatible search read — deduplicated per request via React.cache().
|
|
5
|
-
* Used by the /search page to pre-render results without a client fetch.
|
|
6
|
-
*/
|
|
7
|
-
export const getSearchResults = cache(async (query) => {
|
|
8
|
-
return searchProducts(query).catch(() => ({
|
|
9
|
-
items: [],
|
|
10
|
-
q: query.q ?? "",
|
|
11
|
-
total: 0,
|
|
12
|
-
page: 1,
|
|
13
|
-
pageSize: query.pageSize ?? 20,
|
|
14
|
-
totalPages: 0,
|
|
15
|
-
hasMore: false,
|
|
16
|
-
backend: "in-memory",
|
|
17
|
-
}));
|
|
18
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* feat-homepage — GET / PATCH / DELETE /api/homepage-sections/[id]
|
|
3
|
-
*
|
|
4
|
-
* Pure stub:
|
|
5
|
-
* ```ts
|
|
6
|
-
* // app/api/homepage-sections/[id]/route.ts
|
|
7
|
-
* export { homepageSectionItemGET as GET, homepageSectionItemPATCH as PATCH, homepageSectionItemDELETE as DELETE }
|
|
8
|
-
* from "@mohasinac/feat-homepage";
|
|
9
|
-
* ```
|
|
10
|
-
*/
|
|
11
|
-
import { NextResponse } from "next/server.js";
|
|
12
|
-
export declare function GET(_request: Request, context: {
|
|
13
|
-
params: Promise<{
|
|
14
|
-
id: string;
|
|
15
|
-
}>;
|
|
16
|
-
}): Promise<NextResponse>;
|
|
17
|
-
export { GET as homepageSectionItemGET };
|
|
18
|
-
export declare const homepageSectionItemPATCH: (request: Request, context?: {
|
|
19
|
-
params: Promise<Record<string, string>>;
|
|
20
|
-
} | undefined) => Promise<Response>;
|
|
21
|
-
export declare const homepageSectionItemDELETE: (request: Request, context?: {
|
|
22
|
-
params: Promise<Record<string, string>>;
|
|
23
|
-
} | undefined) => Promise<Response>;
|