@usethrottle/catalog 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +105 -9
  3. package/dist/admin.cjs +16 -16
  4. package/dist/admin.d.cts +14 -2
  5. package/dist/admin.d.ts +14 -2
  6. package/dist/admin.js +1 -1
  7. package/dist/{catalog-error-BOaSKgY3.d.cts → catalog-error-BKN5hNWP.d.cts} +1 -1
  8. package/dist/{catalog-error-CSoPS0-d.d.ts → catalog-error-BnabMMEy.d.ts} +1 -1
  9. package/dist/{chunk-CADIHOIR.js → chunk-3FX2HISB.js} +89 -2
  10. package/dist/{chunk-2YQNMBDI.cjs → chunk-J2GHGQY6.cjs} +274 -38
  11. package/dist/{chunk-GU63WFXI.cjs → chunk-OKWXS3FD.cjs} +102 -15
  12. package/dist/chunk-PZ3SFYH4.cjs +192 -0
  13. package/dist/chunk-SN6STYPW.js +192 -0
  14. package/dist/{chunk-3DLH56OX.js → chunk-VJHA7J7B.js} +258 -22
  15. package/dist/{client-B3mL2-xJ.d.ts → client-B6CsU_v9.d.ts} +1 -1
  16. package/dist/{client-6j1Iz-iJ.d.cts → client-terkEl6u.d.cts} +1 -1
  17. package/dist/{contract-types-BRyonOYH.d.cts → contract-types-D2-SSPM9.d.cts} +230 -2
  18. package/dist/{contract-types-BRyonOYH.d.ts → contract-types-D2-SSPM9.d.ts} +230 -2
  19. package/dist/index.cjs +12 -2
  20. package/dist/index.d.cts +53 -7
  21. package/dist/index.d.ts +53 -7
  22. package/dist/index.js +11 -1
  23. package/dist/next.cjs +180 -0
  24. package/dist/next.d.cts +60 -0
  25. package/dist/next.d.ts +60 -0
  26. package/dist/next.js +180 -0
  27. package/dist/react-extras.cjs +27 -9
  28. package/dist/react-extras.d.cts +6 -4
  29. package/dist/react-extras.d.ts +6 -4
  30. package/dist/react-extras.js +20 -2
  31. package/dist/react.cjs +18 -14
  32. package/dist/react.d.cts +22 -5
  33. package/dist/react.d.ts +22 -5
  34. package/dist/react.js +6 -2
  35. package/dist/server.cjs +58 -66
  36. package/dist/server.d.cts +57 -10
  37. package/dist/server.d.ts +57 -10
  38. package/dist/server.js +52 -60
  39. package/dist/{types-D0PywKnN.d.cts → types-jNpOwEUw.d.cts} +40 -3
  40. package/dist/{types-BfveENg1.d.ts → types-z57bkjjB.d.ts} +40 -3
  41. package/dist/url.d.cts +1 -1
  42. package/dist/url.d.ts +1 -1
  43. package/dist/{use-query-CR7r5tam.d.ts → use-query-COqRZJnC.d.ts} +1 -1
  44. package/dist/{use-query-UWf6Pi5g.d.cts → use-query-H1xgL3_e.d.cts} +1 -1
  45. package/package.json +15 -1
@@ -151,6 +151,15 @@ type StorefrontConfigAnswer = {
151
151
  extensionId: string;
152
152
  };
153
153
  generation: number;
154
+ settings: StorefrontSettings;
155
+ filters: StorefrontFilterDefinition[];
156
+ settingsVersion: number;
157
+ };
158
+ type StorefrontFilterDefinition = {
159
+ key: string;
160
+ label: string;
161
+ display: 'checkbox' | 'swatch' | 'range' | 'boolean' | 'dropdown';
162
+ source: string;
154
163
  };
155
164
  type StorefrontFilterValuesAnswer = {
156
165
  key: string;
@@ -392,6 +401,32 @@ type StorefrontListProduct = {
392
401
  supersededBy?: string[] | undefined;
393
402
  supersedes?: string[] | undefined;
394
403
  };
404
+ type StorefrontMenuItem = {
405
+ label: string;
406
+ target: {
407
+ kind: 'category' | 'collection' | 'page' | 'product' | 'search' | 'url';
408
+ handle?: string | undefined;
409
+ q?: string | undefined;
410
+ href?: string | undefined;
411
+ };
412
+ children?: StorefrontMenuItem[] | undefined;
413
+ };
414
+ type StorefrontPageAnswer = {
415
+ handle: string;
416
+ title: string;
417
+ bodyHtml: string;
418
+ seo: {
419
+ title: string;
420
+ description: string;
421
+ };
422
+ };
423
+ type StorefrontPagesAnswer = {
424
+ pages: {
425
+ handle: string;
426
+ title: string;
427
+ position: number;
428
+ }[];
429
+ };
395
430
  type StorefrontProductAnswer = {
396
431
  product: {
397
432
  handle: string;
@@ -549,6 +584,199 @@ type StorefrontReviewsAnswer = ({
549
584
  }) | ({
550
585
  redirectTo: string;
551
586
  });
587
+ type StorefrontSettings = {
588
+ storefrontId: 'default';
589
+ brand: {
590
+ storeName: string;
591
+ logo: {
592
+ light: {
593
+ id: string;
594
+ url: string;
595
+ } | null;
596
+ dark: {
597
+ id: string;
598
+ url: string;
599
+ } | null;
600
+ };
601
+ favicon: {
602
+ id: string;
603
+ url: string;
604
+ } | null;
605
+ };
606
+ theme: {
607
+ light: {
608
+ colorPrimary: string;
609
+ colorPrimaryForeground: string;
610
+ colorBackground: string;
611
+ colorSurface: string;
612
+ colorForeground: string;
613
+ colorMuted: string;
614
+ colorMutedForeground: string;
615
+ colorBorder: string;
616
+ colorBorderControl: string;
617
+ colorAccent: string;
618
+ colorSale: string;
619
+ colorSuccess: string;
620
+ colorWarning: string;
621
+ colorDanger: string;
622
+ };
623
+ dark: {
624
+ colorPrimary: string;
625
+ colorPrimaryForeground: string;
626
+ colorBackground: string;
627
+ colorSurface: string;
628
+ colorForeground: string;
629
+ colorMuted: string;
630
+ colorMutedForeground: string;
631
+ colorBorder: string;
632
+ colorBorderControl: string;
633
+ colorAccent: string;
634
+ colorSale: string;
635
+ colorSuccess: string;
636
+ colorWarning: string;
637
+ colorDanger: string;
638
+ };
639
+ fonts: {
640
+ heading: 'Instrument Serif' | 'Playfair Display' | 'Lora' | 'Merriweather' | 'Cormorant Garamond' | 'EB Garamond' | 'Libre Baskerville' | 'Source Serif 4' | 'Fraunces' | 'DM Serif Display' | 'Inter' | 'Schibsted Grotesk' | 'DM Sans' | 'Manrope' | 'Poppins' | 'Montserrat' | 'Work Sans' | 'Rubik' | 'Nunito Sans' | 'Open Sans' | 'Lato' | 'Raleway' | 'Outfit' | 'Plus Jakarta Sans' | 'Figtree' | 'Karla' | 'DM Mono' | 'JetBrains Mono' | 'IBM Plex Mono' | 'Space Mono' | 'Bebas Neue' | 'Oswald' | 'Archivo Black' | 'Space Grotesk' | 'Syne' | 'system-sans' | 'system-serif' | 'system-mono';
641
+ body: 'Instrument Serif' | 'Playfair Display' | 'Lora' | 'Merriweather' | 'Cormorant Garamond' | 'EB Garamond' | 'Libre Baskerville' | 'Source Serif 4' | 'Fraunces' | 'DM Serif Display' | 'Inter' | 'Schibsted Grotesk' | 'DM Sans' | 'Manrope' | 'Poppins' | 'Montserrat' | 'Work Sans' | 'Rubik' | 'Nunito Sans' | 'Open Sans' | 'Lato' | 'Raleway' | 'Outfit' | 'Plus Jakarta Sans' | 'Figtree' | 'Karla' | 'DM Mono' | 'JetBrains Mono' | 'IBM Plex Mono' | 'Space Mono' | 'Bebas Neue' | 'Oswald' | 'Archivo Black' | 'Space Grotesk' | 'Syne' | 'system-sans' | 'system-serif' | 'system-mono';
642
+ mono: 'Instrument Serif' | 'Playfair Display' | 'Lora' | 'Merriweather' | 'Cormorant Garamond' | 'EB Garamond' | 'Libre Baskerville' | 'Source Serif 4' | 'Fraunces' | 'DM Serif Display' | 'Inter' | 'Schibsted Grotesk' | 'DM Sans' | 'Manrope' | 'Poppins' | 'Montserrat' | 'Work Sans' | 'Rubik' | 'Nunito Sans' | 'Open Sans' | 'Lato' | 'Raleway' | 'Outfit' | 'Plus Jakarta Sans' | 'Figtree' | 'Karla' | 'DM Mono' | 'JetBrains Mono' | 'IBM Plex Mono' | 'Space Mono' | 'Bebas Neue' | 'Oswald' | 'Archivo Black' | 'Space Grotesk' | 'Syne' | 'system-sans' | 'system-serif' | 'system-mono';
643
+ };
644
+ radius: number;
645
+ spacingScale: 'compact' | 'comfortable' | 'roomy';
646
+ colorScheme: 'light' | 'dark' | 'auto';
647
+ };
648
+ navigation: {
649
+ header: StorefrontMenuItem[];
650
+ footer: StorefrontMenuItem[];
651
+ };
652
+ home: {
653
+ hero: {
654
+ image: {
655
+ id: string;
656
+ url: string;
657
+ } | null;
658
+ heading: string;
659
+ subheading: string;
660
+ ctaLabel: string;
661
+ ctaTarget: {
662
+ kind: 'category' | 'collection' | 'page' | 'product' | 'search' | 'url';
663
+ handle?: string | undefined;
664
+ q?: string | undefined;
665
+ href?: string | undefined;
666
+ } | null;
667
+ };
668
+ shelves: {
669
+ kind: 'collection' | 'featured' | 'newest' | 'best_rated' | 'categories';
670
+ handle?: string | undefined;
671
+ title?: string | undefined;
672
+ limit: number;
673
+ }[];
674
+ };
675
+ announcement: {
676
+ enabled: boolean;
677
+ message: string;
678
+ target: {
679
+ kind: 'category' | 'collection' | 'page' | 'product' | 'search' | 'url';
680
+ handle?: string | undefined;
681
+ q?: string | undefined;
682
+ href?: string | undefined;
683
+ } | null;
684
+ startsAt: string | null;
685
+ endsAt: string | null;
686
+ };
687
+ listing: {
688
+ pageSize: number;
689
+ pagination: 'numbered' | 'load_more' | 'infinite';
690
+ columns: {
691
+ desktop: number;
692
+ mobile: number;
693
+ };
694
+ defaultSort: 'relevance' | 'featured' | 'manual' | 'title_asc' | 'title_desc' | 'price_asc' | 'price_desc' | 'newest' | 'updated' | 'best_rated';
695
+ filterLayout: 'sidebar' | 'topbar' | 'drawer';
696
+ sorts: {
697
+ key: 'relevance' | 'featured' | 'manual' | 'title_asc' | 'title_desc' | 'price_asc' | 'price_desc' | 'newest' | 'updated' | 'best_rated';
698
+ enabled: boolean;
699
+ label: string;
700
+ }[];
701
+ };
702
+ card: {
703
+ style: 'standard' | 'minimal' | 'overlay' | 'row';
704
+ showRating: boolean;
705
+ showSwatches: boolean;
706
+ showBrand: boolean;
707
+ showCompareAt: boolean;
708
+ showBadges: boolean;
709
+ secondImageOnHover: boolean;
710
+ quickAdd: boolean;
711
+ };
712
+ badges: {
713
+ sale: {
714
+ enabled: boolean;
715
+ label: string;
716
+ colour: string;
717
+ };
718
+ new: {
719
+ enabled: boolean;
720
+ label: string;
721
+ colour: string;
722
+ days: number;
723
+ };
724
+ lowStock: {
725
+ enabled: boolean;
726
+ label: string;
727
+ };
728
+ custom: {
729
+ tag: string;
730
+ label: string;
731
+ colour: string;
732
+ }[];
733
+ };
734
+ stock: {
735
+ hideOutOfStock: boolean;
736
+ showExactCount: boolean;
737
+ words: {
738
+ inStock: string;
739
+ lowStock: string;
740
+ outOfStock: string;
741
+ backorder: string;
742
+ preorder: string;
743
+ };
744
+ lowStockThreshold: number | null;
745
+ };
746
+ product: {
747
+ layout: 'classic' | 'stacked' | 'editorial';
748
+ sectionsStyle: 'auto' | 'tabs' | 'accordion' | 'stacked';
749
+ sections: {
750
+ key: 'description' | 'specs' | 'shipping' | 'tags' | 'categories' | 'related' | 'reviews';
751
+ enabled: boolean;
752
+ title: string;
753
+ pageHandle: string | null;
754
+ }[];
755
+ relatedLimit: number;
756
+ relatedTitle: string;
757
+ };
758
+ seo: {
759
+ titleTemplate: string;
760
+ defaultDescription: string;
761
+ shareImage: {
762
+ id: string;
763
+ url: string;
764
+ } | null;
765
+ };
766
+ strings: Record<'shop.title' | 'shop.description' | 'search.title' | 'search.placeholder' | 'search.results' | 'empty.search' | 'empty.listing' | 'empty.category' | 'empty.collection' | 'empty.cart' | 'cart.title' | 'cart.checkout' | 'cart.continueShopping' | 'filters.title' | 'filters.clearAll' | 'filters.apply' | 'filters.showMore' | 'filters.showLess' | 'filters.priceMin' | 'filters.priceMax' | 'boolean.yes' | 'boolean.no' | 'sort.label' | 'listing.count' | 'listing.loadMore' | 'listing.loading' | 'listing.previous' | 'listing.next' | 'product.addToCart' | 'product.quantity' | 'product.selectOption' | 'product.sku' | 'product.description' | 'product.specs' | 'product.shipping' | 'product.tags' | 'product.categories' | 'product.related' | 'product.reviews' | 'product.noReviews' | 'product.writeReview' | 'home.shopAll' | 'home.featured' | 'home.newest' | 'home.bestRated' | 'home.categories' | 'footer.copyright' | 'nav.menu' | 'nav.account' | 'nav.cart' | 'error.notFound' | 'error.generic', string>;
767
+ routes: {
768
+ product: string;
769
+ category: string;
770
+ collection: string;
771
+ tag: string;
772
+ page: string;
773
+ search: string;
774
+ shop: string;
775
+ };
776
+ preview: {
777
+ storeUrl: string | null;
778
+ };
779
+ };
552
780
  type StorefrontSuggestAnswer = {
553
781
  products: {
554
782
  handle: string;
@@ -596,6 +824,6 @@ type StorefrontTagsAnswer = {
596
824
  productCount: number;
597
825
  }[];
598
826
  };
599
- type CatalogContractErrorCode = 'INVALID_REQUEST' | 'AUTHENTICATION_FAILED' | 'INFRASTRUCTURE_UNAVAILABLE' | 'PROVIDER_UNAVAILABLE' | 'INTERNAL_ERROR' | 'CUSTOMER_TOKEN_INVALID' | 'ORIGIN_NOT_ALLOWED' | 'SERVER_KEY_IN_BROWSER' | 'KEY_NOT_ALLOWED_IN_URL' | 'NOT_FOUND' | 'RATE_LIMITED' | 'STOREFRONT_UNAVAILABLE' | 'REQUEST_BODY_TOO_LARGE' | 'CART_CURRENCY_REQUIRED' | 'CART_CURRENCY_NOT_ENABLED' | 'CHECKOUT_NOT_CONFIGURED' | 'EXTENSION_UPGRADE_REQUIRED' | 'CART_ITEMS_INVALID' | 'CART_REJECTED' | 'CART_UNAVAILABLE' | 'CHECKOUT_UNAVAILABLE' | 'RETURN_URL_NOT_ALLOWED' | 'CHECKOUT_TOTAL_TOO_LARGE' | 'CHECKOUT_CART_MISMATCH' | 'CHECKOUT_ITEMS_INVALID' | 'CHECKOUT_REJECTED' | 'CURRENCY_NOT_ENABLED' | 'STOREFRONT_INDEXING' | 'EMAIL_NOT_VERIFIED' | 'NOT_VERIFIED_BUYER' | 'PURCHASE_REFUNDED' | 'ALREADY_REVIEWED' | 'REVIEW_QUEUE_FULL' | 'REVIEW_VERIFICATION_UNAVAILABLE';
827
+ type CatalogContractErrorCode = 'INVALID_REQUEST' | 'AUTHENTICATION_FAILED' | 'INFRASTRUCTURE_UNAVAILABLE' | 'PROVIDER_UNAVAILABLE' | 'INTERNAL_ERROR' | 'CUSTOMER_TOKEN_INVALID' | 'ORIGIN_NOT_ALLOWED' | 'SERVER_KEY_IN_BROWSER' | 'KEY_NOT_ALLOWED_IN_URL' | 'NOT_FOUND' | 'RATE_LIMITED' | 'STOREFRONT_UNAVAILABLE' | 'REQUEST_BODY_TOO_LARGE' | 'CART_CURRENCY_REQUIRED' | 'CART_CURRENCY_NOT_ENABLED' | 'CHECKOUT_NOT_CONFIGURED' | 'EXTENSION_UPGRADE_REQUIRED' | 'CART_ITEMS_INVALID' | 'CART_REJECTED' | 'CART_UNAVAILABLE' | 'CHECKOUT_UNAVAILABLE' | 'RETURN_URL_NOT_ALLOWED' | 'CHECKOUT_TOTAL_TOO_LARGE' | 'CHECKOUT_CART_MISMATCH' | 'CHECKOUT_ITEMS_INVALID' | 'CHECKOUT_REJECTED' | 'CURRENCY_NOT_ENABLED' | 'STOREFRONT_INDEXING' | 'EMAIL_NOT_VERIFIED' | 'NOT_VERIFIED_BUYER' | 'PURCHASE_REFUNDED' | 'ALREADY_REVIEWED' | 'REVIEW_QUEUE_FULL' | 'REVIEW_VERIFICATION_UNAVAILABLE' | 'PAGE_NOT_FOUND' | 'PREVIEW_EXPIRED';
600
828
 
601
- export type { CartCheckAnswer as C, ReviewSubmitAnswer as R, StorefrontCategoryNode as S, ReviewSubmitInput as a, StorefrontListAnswer as b, StorefrontListProduct as c, ReviewEligibilityAnswer as d, StorefrontProductAnswer as e, CartCheckRequest as f, CartCreateAnswer as g, CartCreateRequest as h, CatalogContractErrorCode as i, StorefrontCategoriesAnswer as j, StorefrontCategoryAnswer as k, StorefrontCollectionAnswer as l, StorefrontCollectionsAnswer as m, StorefrontConfigAnswer as n, StorefrontFilterValuesAnswer as o, StorefrontRelatedAnswer as p, StorefrontReviewsAnswer as q, StorefrontSuggestAnswer as r, StorefrontTagsAnswer as s };
829
+ export type { CartCheckAnswer as C, ReviewSubmitAnswer as R, StorefrontSettings as S, ReviewSubmitInput as a, StorefrontMenuItem as b, StorefrontCategoryNode as c, StorefrontListAnswer as d, StorefrontListProduct as e, ReviewEligibilityAnswer as f, StorefrontProductAnswer as g, CartCheckRequest as h, CartCreateAnswer as i, CartCreateRequest as j, CatalogContractErrorCode as k, StorefrontCategoriesAnswer as l, StorefrontCategoryAnswer as m, StorefrontCollectionAnswer as n, StorefrontCollectionsAnswer as o, StorefrontConfigAnswer as p, StorefrontFilterDefinition as q, StorefrontFilterValuesAnswer as r, StorefrontPageAnswer as s, StorefrontPagesAnswer as t, StorefrontRelatedAnswer as u, StorefrontReviewsAnswer as v, StorefrontSuggestAnswer as w, StorefrontTagsAnswer as x };
@@ -151,6 +151,15 @@ type StorefrontConfigAnswer = {
151
151
  extensionId: string;
152
152
  };
153
153
  generation: number;
154
+ settings: StorefrontSettings;
155
+ filters: StorefrontFilterDefinition[];
156
+ settingsVersion: number;
157
+ };
158
+ type StorefrontFilterDefinition = {
159
+ key: string;
160
+ label: string;
161
+ display: 'checkbox' | 'swatch' | 'range' | 'boolean' | 'dropdown';
162
+ source: string;
154
163
  };
155
164
  type StorefrontFilterValuesAnswer = {
156
165
  key: string;
@@ -392,6 +401,32 @@ type StorefrontListProduct = {
392
401
  supersededBy?: string[] | undefined;
393
402
  supersedes?: string[] | undefined;
394
403
  };
404
+ type StorefrontMenuItem = {
405
+ label: string;
406
+ target: {
407
+ kind: 'category' | 'collection' | 'page' | 'product' | 'search' | 'url';
408
+ handle?: string | undefined;
409
+ q?: string | undefined;
410
+ href?: string | undefined;
411
+ };
412
+ children?: StorefrontMenuItem[] | undefined;
413
+ };
414
+ type StorefrontPageAnswer = {
415
+ handle: string;
416
+ title: string;
417
+ bodyHtml: string;
418
+ seo: {
419
+ title: string;
420
+ description: string;
421
+ };
422
+ };
423
+ type StorefrontPagesAnswer = {
424
+ pages: {
425
+ handle: string;
426
+ title: string;
427
+ position: number;
428
+ }[];
429
+ };
395
430
  type StorefrontProductAnswer = {
396
431
  product: {
397
432
  handle: string;
@@ -549,6 +584,199 @@ type StorefrontReviewsAnswer = ({
549
584
  }) | ({
550
585
  redirectTo: string;
551
586
  });
587
+ type StorefrontSettings = {
588
+ storefrontId: 'default';
589
+ brand: {
590
+ storeName: string;
591
+ logo: {
592
+ light: {
593
+ id: string;
594
+ url: string;
595
+ } | null;
596
+ dark: {
597
+ id: string;
598
+ url: string;
599
+ } | null;
600
+ };
601
+ favicon: {
602
+ id: string;
603
+ url: string;
604
+ } | null;
605
+ };
606
+ theme: {
607
+ light: {
608
+ colorPrimary: string;
609
+ colorPrimaryForeground: string;
610
+ colorBackground: string;
611
+ colorSurface: string;
612
+ colorForeground: string;
613
+ colorMuted: string;
614
+ colorMutedForeground: string;
615
+ colorBorder: string;
616
+ colorBorderControl: string;
617
+ colorAccent: string;
618
+ colorSale: string;
619
+ colorSuccess: string;
620
+ colorWarning: string;
621
+ colorDanger: string;
622
+ };
623
+ dark: {
624
+ colorPrimary: string;
625
+ colorPrimaryForeground: string;
626
+ colorBackground: string;
627
+ colorSurface: string;
628
+ colorForeground: string;
629
+ colorMuted: string;
630
+ colorMutedForeground: string;
631
+ colorBorder: string;
632
+ colorBorderControl: string;
633
+ colorAccent: string;
634
+ colorSale: string;
635
+ colorSuccess: string;
636
+ colorWarning: string;
637
+ colorDanger: string;
638
+ };
639
+ fonts: {
640
+ heading: 'Instrument Serif' | 'Playfair Display' | 'Lora' | 'Merriweather' | 'Cormorant Garamond' | 'EB Garamond' | 'Libre Baskerville' | 'Source Serif 4' | 'Fraunces' | 'DM Serif Display' | 'Inter' | 'Schibsted Grotesk' | 'DM Sans' | 'Manrope' | 'Poppins' | 'Montserrat' | 'Work Sans' | 'Rubik' | 'Nunito Sans' | 'Open Sans' | 'Lato' | 'Raleway' | 'Outfit' | 'Plus Jakarta Sans' | 'Figtree' | 'Karla' | 'DM Mono' | 'JetBrains Mono' | 'IBM Plex Mono' | 'Space Mono' | 'Bebas Neue' | 'Oswald' | 'Archivo Black' | 'Space Grotesk' | 'Syne' | 'system-sans' | 'system-serif' | 'system-mono';
641
+ body: 'Instrument Serif' | 'Playfair Display' | 'Lora' | 'Merriweather' | 'Cormorant Garamond' | 'EB Garamond' | 'Libre Baskerville' | 'Source Serif 4' | 'Fraunces' | 'DM Serif Display' | 'Inter' | 'Schibsted Grotesk' | 'DM Sans' | 'Manrope' | 'Poppins' | 'Montserrat' | 'Work Sans' | 'Rubik' | 'Nunito Sans' | 'Open Sans' | 'Lato' | 'Raleway' | 'Outfit' | 'Plus Jakarta Sans' | 'Figtree' | 'Karla' | 'DM Mono' | 'JetBrains Mono' | 'IBM Plex Mono' | 'Space Mono' | 'Bebas Neue' | 'Oswald' | 'Archivo Black' | 'Space Grotesk' | 'Syne' | 'system-sans' | 'system-serif' | 'system-mono';
642
+ mono: 'Instrument Serif' | 'Playfair Display' | 'Lora' | 'Merriweather' | 'Cormorant Garamond' | 'EB Garamond' | 'Libre Baskerville' | 'Source Serif 4' | 'Fraunces' | 'DM Serif Display' | 'Inter' | 'Schibsted Grotesk' | 'DM Sans' | 'Manrope' | 'Poppins' | 'Montserrat' | 'Work Sans' | 'Rubik' | 'Nunito Sans' | 'Open Sans' | 'Lato' | 'Raleway' | 'Outfit' | 'Plus Jakarta Sans' | 'Figtree' | 'Karla' | 'DM Mono' | 'JetBrains Mono' | 'IBM Plex Mono' | 'Space Mono' | 'Bebas Neue' | 'Oswald' | 'Archivo Black' | 'Space Grotesk' | 'Syne' | 'system-sans' | 'system-serif' | 'system-mono';
643
+ };
644
+ radius: number;
645
+ spacingScale: 'compact' | 'comfortable' | 'roomy';
646
+ colorScheme: 'light' | 'dark' | 'auto';
647
+ };
648
+ navigation: {
649
+ header: StorefrontMenuItem[];
650
+ footer: StorefrontMenuItem[];
651
+ };
652
+ home: {
653
+ hero: {
654
+ image: {
655
+ id: string;
656
+ url: string;
657
+ } | null;
658
+ heading: string;
659
+ subheading: string;
660
+ ctaLabel: string;
661
+ ctaTarget: {
662
+ kind: 'category' | 'collection' | 'page' | 'product' | 'search' | 'url';
663
+ handle?: string | undefined;
664
+ q?: string | undefined;
665
+ href?: string | undefined;
666
+ } | null;
667
+ };
668
+ shelves: {
669
+ kind: 'collection' | 'featured' | 'newest' | 'best_rated' | 'categories';
670
+ handle?: string | undefined;
671
+ title?: string | undefined;
672
+ limit: number;
673
+ }[];
674
+ };
675
+ announcement: {
676
+ enabled: boolean;
677
+ message: string;
678
+ target: {
679
+ kind: 'category' | 'collection' | 'page' | 'product' | 'search' | 'url';
680
+ handle?: string | undefined;
681
+ q?: string | undefined;
682
+ href?: string | undefined;
683
+ } | null;
684
+ startsAt: string | null;
685
+ endsAt: string | null;
686
+ };
687
+ listing: {
688
+ pageSize: number;
689
+ pagination: 'numbered' | 'load_more' | 'infinite';
690
+ columns: {
691
+ desktop: number;
692
+ mobile: number;
693
+ };
694
+ defaultSort: 'relevance' | 'featured' | 'manual' | 'title_asc' | 'title_desc' | 'price_asc' | 'price_desc' | 'newest' | 'updated' | 'best_rated';
695
+ filterLayout: 'sidebar' | 'topbar' | 'drawer';
696
+ sorts: {
697
+ key: 'relevance' | 'featured' | 'manual' | 'title_asc' | 'title_desc' | 'price_asc' | 'price_desc' | 'newest' | 'updated' | 'best_rated';
698
+ enabled: boolean;
699
+ label: string;
700
+ }[];
701
+ };
702
+ card: {
703
+ style: 'standard' | 'minimal' | 'overlay' | 'row';
704
+ showRating: boolean;
705
+ showSwatches: boolean;
706
+ showBrand: boolean;
707
+ showCompareAt: boolean;
708
+ showBadges: boolean;
709
+ secondImageOnHover: boolean;
710
+ quickAdd: boolean;
711
+ };
712
+ badges: {
713
+ sale: {
714
+ enabled: boolean;
715
+ label: string;
716
+ colour: string;
717
+ };
718
+ new: {
719
+ enabled: boolean;
720
+ label: string;
721
+ colour: string;
722
+ days: number;
723
+ };
724
+ lowStock: {
725
+ enabled: boolean;
726
+ label: string;
727
+ };
728
+ custom: {
729
+ tag: string;
730
+ label: string;
731
+ colour: string;
732
+ }[];
733
+ };
734
+ stock: {
735
+ hideOutOfStock: boolean;
736
+ showExactCount: boolean;
737
+ words: {
738
+ inStock: string;
739
+ lowStock: string;
740
+ outOfStock: string;
741
+ backorder: string;
742
+ preorder: string;
743
+ };
744
+ lowStockThreshold: number | null;
745
+ };
746
+ product: {
747
+ layout: 'classic' | 'stacked' | 'editorial';
748
+ sectionsStyle: 'auto' | 'tabs' | 'accordion' | 'stacked';
749
+ sections: {
750
+ key: 'description' | 'specs' | 'shipping' | 'tags' | 'categories' | 'related' | 'reviews';
751
+ enabled: boolean;
752
+ title: string;
753
+ pageHandle: string | null;
754
+ }[];
755
+ relatedLimit: number;
756
+ relatedTitle: string;
757
+ };
758
+ seo: {
759
+ titleTemplate: string;
760
+ defaultDescription: string;
761
+ shareImage: {
762
+ id: string;
763
+ url: string;
764
+ } | null;
765
+ };
766
+ strings: Record<'shop.title' | 'shop.description' | 'search.title' | 'search.placeholder' | 'search.results' | 'empty.search' | 'empty.listing' | 'empty.category' | 'empty.collection' | 'empty.cart' | 'cart.title' | 'cart.checkout' | 'cart.continueShopping' | 'filters.title' | 'filters.clearAll' | 'filters.apply' | 'filters.showMore' | 'filters.showLess' | 'filters.priceMin' | 'filters.priceMax' | 'boolean.yes' | 'boolean.no' | 'sort.label' | 'listing.count' | 'listing.loadMore' | 'listing.loading' | 'listing.previous' | 'listing.next' | 'product.addToCart' | 'product.quantity' | 'product.selectOption' | 'product.sku' | 'product.description' | 'product.specs' | 'product.shipping' | 'product.tags' | 'product.categories' | 'product.related' | 'product.reviews' | 'product.noReviews' | 'product.writeReview' | 'home.shopAll' | 'home.featured' | 'home.newest' | 'home.bestRated' | 'home.categories' | 'footer.copyright' | 'nav.menu' | 'nav.account' | 'nav.cart' | 'error.notFound' | 'error.generic', string>;
767
+ routes: {
768
+ product: string;
769
+ category: string;
770
+ collection: string;
771
+ tag: string;
772
+ page: string;
773
+ search: string;
774
+ shop: string;
775
+ };
776
+ preview: {
777
+ storeUrl: string | null;
778
+ };
779
+ };
552
780
  type StorefrontSuggestAnswer = {
553
781
  products: {
554
782
  handle: string;
@@ -596,6 +824,6 @@ type StorefrontTagsAnswer = {
596
824
  productCount: number;
597
825
  }[];
598
826
  };
599
- type CatalogContractErrorCode = 'INVALID_REQUEST' | 'AUTHENTICATION_FAILED' | 'INFRASTRUCTURE_UNAVAILABLE' | 'PROVIDER_UNAVAILABLE' | 'INTERNAL_ERROR' | 'CUSTOMER_TOKEN_INVALID' | 'ORIGIN_NOT_ALLOWED' | 'SERVER_KEY_IN_BROWSER' | 'KEY_NOT_ALLOWED_IN_URL' | 'NOT_FOUND' | 'RATE_LIMITED' | 'STOREFRONT_UNAVAILABLE' | 'REQUEST_BODY_TOO_LARGE' | 'CART_CURRENCY_REQUIRED' | 'CART_CURRENCY_NOT_ENABLED' | 'CHECKOUT_NOT_CONFIGURED' | 'EXTENSION_UPGRADE_REQUIRED' | 'CART_ITEMS_INVALID' | 'CART_REJECTED' | 'CART_UNAVAILABLE' | 'CHECKOUT_UNAVAILABLE' | 'RETURN_URL_NOT_ALLOWED' | 'CHECKOUT_TOTAL_TOO_LARGE' | 'CHECKOUT_CART_MISMATCH' | 'CHECKOUT_ITEMS_INVALID' | 'CHECKOUT_REJECTED' | 'CURRENCY_NOT_ENABLED' | 'STOREFRONT_INDEXING' | 'EMAIL_NOT_VERIFIED' | 'NOT_VERIFIED_BUYER' | 'PURCHASE_REFUNDED' | 'ALREADY_REVIEWED' | 'REVIEW_QUEUE_FULL' | 'REVIEW_VERIFICATION_UNAVAILABLE';
827
+ type CatalogContractErrorCode = 'INVALID_REQUEST' | 'AUTHENTICATION_FAILED' | 'INFRASTRUCTURE_UNAVAILABLE' | 'PROVIDER_UNAVAILABLE' | 'INTERNAL_ERROR' | 'CUSTOMER_TOKEN_INVALID' | 'ORIGIN_NOT_ALLOWED' | 'SERVER_KEY_IN_BROWSER' | 'KEY_NOT_ALLOWED_IN_URL' | 'NOT_FOUND' | 'RATE_LIMITED' | 'STOREFRONT_UNAVAILABLE' | 'REQUEST_BODY_TOO_LARGE' | 'CART_CURRENCY_REQUIRED' | 'CART_CURRENCY_NOT_ENABLED' | 'CHECKOUT_NOT_CONFIGURED' | 'EXTENSION_UPGRADE_REQUIRED' | 'CART_ITEMS_INVALID' | 'CART_REJECTED' | 'CART_UNAVAILABLE' | 'CHECKOUT_UNAVAILABLE' | 'RETURN_URL_NOT_ALLOWED' | 'CHECKOUT_TOTAL_TOO_LARGE' | 'CHECKOUT_CART_MISMATCH' | 'CHECKOUT_ITEMS_INVALID' | 'CHECKOUT_REJECTED' | 'CURRENCY_NOT_ENABLED' | 'STOREFRONT_INDEXING' | 'EMAIL_NOT_VERIFIED' | 'NOT_VERIFIED_BUYER' | 'PURCHASE_REFUNDED' | 'ALREADY_REVIEWED' | 'REVIEW_QUEUE_FULL' | 'REVIEW_VERIFICATION_UNAVAILABLE' | 'PAGE_NOT_FOUND' | 'PREVIEW_EXPIRED';
600
828
 
601
- export type { CartCheckAnswer as C, ReviewSubmitAnswer as R, StorefrontCategoryNode as S, ReviewSubmitInput as a, StorefrontListAnswer as b, StorefrontListProduct as c, ReviewEligibilityAnswer as d, StorefrontProductAnswer as e, CartCheckRequest as f, CartCreateAnswer as g, CartCreateRequest as h, CatalogContractErrorCode as i, StorefrontCategoriesAnswer as j, StorefrontCategoryAnswer as k, StorefrontCollectionAnswer as l, StorefrontCollectionsAnswer as m, StorefrontConfigAnswer as n, StorefrontFilterValuesAnswer as o, StorefrontRelatedAnswer as p, StorefrontReviewsAnswer as q, StorefrontSuggestAnswer as r, StorefrontTagsAnswer as s };
829
+ export type { CartCheckAnswer as C, ReviewSubmitAnswer as R, StorefrontSettings as S, ReviewSubmitInput as a, StorefrontMenuItem as b, StorefrontCategoryNode as c, StorefrontListAnswer as d, StorefrontListProduct as e, ReviewEligibilityAnswer as f, StorefrontProductAnswer as g, CartCheckRequest as h, CartCreateAnswer as i, CartCreateRequest as j, CatalogContractErrorCode as k, StorefrontCategoriesAnswer as l, StorefrontCategoryAnswer as m, StorefrontCollectionAnswer as n, StorefrontCollectionsAnswer as o, StorefrontConfigAnswer as p, StorefrontFilterDefinition as q, StorefrontFilterValuesAnswer as r, StorefrontPageAnswer as s, StorefrontPagesAnswer as t, StorefrontRelatedAnswer as u, StorefrontReviewsAnswer as v, StorefrontSuggestAnswer as w, StorefrontTagsAnswer as x };
package/dist/index.cjs CHANGED
@@ -21,7 +21,12 @@
21
21
 
22
22
 
23
23
 
24
- var _chunk2YQNMBDIcjs = require('./chunk-2YQNMBDI.cjs');
24
+
25
+
26
+
27
+
28
+
29
+ var _chunkJ2GHGQY6cjs = require('./chunk-J2GHGQY6.cjs');
25
30
  require('./chunk-ETV4XYOV.cjs');
26
31
 
27
32
 
@@ -46,4 +51,9 @@ require('./chunk-ETV4XYOV.cjs');
46
51
 
47
52
 
48
53
 
49
- exports.CURRENCIES = _chunk2YQNMBDIcjs.CURRENCIES; exports.CartLineError = _chunk2YQNMBDIcjs.CartLineError; exports.CatalogError = _chunk2YQNMBDIcjs.CatalogError; exports.CustomerTokenInvalidError = _chunk2YQNMBDIcjs.CustomerTokenInvalidError; exports.FeatureUnavailableError = _chunk2YQNMBDIcjs.FeatureUnavailableError; exports.NetworkError = _chunk2YQNMBDIcjs.NetworkError; exports.OriginNotAllowedError = _chunk2YQNMBDIcjs.OriginNotAllowedError; exports.RateLimitedError = _chunk2YQNMBDIcjs.RateLimitedError; exports.SDK_VERSION = _chunk2YQNMBDIcjs.SDK_VERSION; exports.TimeoutError = _chunk2YQNMBDIcjs.TimeoutError; exports.UnknownCurrencyError = _chunk2YQNMBDIcjs.UnknownCurrencyError; exports.createCatalogClient = _chunk2YQNMBDIcjs.createCatalogClient; exports.currencySymbol = _chunk2YQNMBDIcjs.currencySymbol; exports.formatMoney = _chunk2YQNMBDIcjs.formatMoney; exports.isCatalogError = _chunk2YQNMBDIcjs.isCatalogError; exports.isKnownCurrency = _chunk2YQNMBDIcjs.isKnownCurrency; exports.minorUnitsOf = _chunk2YQNMBDIcjs.minorUnitsOf; exports.money = _chunk2YQNMBDIcjs.money; exports.moneyValue = _chunk2YQNMBDIcjs.moneyValue; exports.parseMoney = _chunk2YQNMBDIcjs.parseMoney; exports.toDecimalString = _chunk2YQNMBDIcjs.toDecimalString; exports.toMinor = _chunk2YQNMBDIcjs.toMinor;
54
+
55
+
56
+
57
+
58
+
59
+ exports.CURRENCIES = _chunkJ2GHGQY6cjs.CURRENCIES; exports.CartLineError = _chunkJ2GHGQY6cjs.CartLineError; exports.CatalogError = _chunkJ2GHGQY6cjs.CatalogError; exports.CustomerTokenInvalidError = _chunkJ2GHGQY6cjs.CustomerTokenInvalidError; exports.DEFAULT_STRINGS = _chunkJ2GHGQY6cjs.DEFAULT_STRINGS; exports.FeatureUnavailableError = _chunkJ2GHGQY6cjs.FeatureUnavailableError; exports.NetworkError = _chunkJ2GHGQY6cjs.NetworkError; exports.OriginNotAllowedError = _chunkJ2GHGQY6cjs.OriginNotAllowedError; exports.RateLimitedError = _chunkJ2GHGQY6cjs.RateLimitedError; exports.SDK_VERSION = _chunkJ2GHGQY6cjs.SDK_VERSION; exports.TimeoutError = _chunkJ2GHGQY6cjs.TimeoutError; exports.UnknownCurrencyError = _chunkJ2GHGQY6cjs.UnknownCurrencyError; exports.createCatalogClient = _chunkJ2GHGQY6cjs.createCatalogClient; exports.currencySymbol = _chunkJ2GHGQY6cjs.currencySymbol; exports.fontStylesheetHref = _chunkJ2GHGQY6cjs.fontStylesheetHref; exports.formatMoney = _chunkJ2GHGQY6cjs.formatMoney; exports.isCatalogError = _chunkJ2GHGQY6cjs.isCatalogError; exports.isKnownCurrency = _chunkJ2GHGQY6cjs.isKnownCurrency; exports.minorUnitsOf = _chunkJ2GHGQY6cjs.minorUnitsOf; exports.money = _chunkJ2GHGQY6cjs.money; exports.moneyValue = _chunkJ2GHGQY6cjs.moneyValue; exports.parseMoney = _chunkJ2GHGQY6cjs.parseMoney; exports.resolveMenuTarget = _chunkJ2GHGQY6cjs.resolveMenuTarget; exports.t = _chunkJ2GHGQY6cjs.t; exports.toAuthAppearance = _chunkJ2GHGQY6cjs.toAuthAppearance; exports.toDecimalString = _chunkJ2GHGQY6cjs.toDecimalString; exports.toMinor = _chunkJ2GHGQY6cjs.toMinor;
package/dist/index.d.cts CHANGED
@@ -1,12 +1,58 @@
1
- import { S as StorefrontCategoryNode, b as StorefrontListAnswer, c as StorefrontListProduct, d as ReviewEligibilityAnswer, e as StorefrontProductAnswer } from './contract-types-BRyonOYH.cjs';
2
- export { C as CartCheckAnswer, f as CartCheckRequest, g as CartCreateAnswer, h as CartCreateRequest, i as CatalogContractErrorCode, R as ReviewSubmitAnswer, a as ReviewSubmitInput, j as StorefrontCategoriesAnswer, k as StorefrontCategoryAnswer, l as StorefrontCollectionAnswer, m as StorefrontCollectionsAnswer, n as StorefrontConfigAnswer, o as StorefrontFilterValuesAnswer, p as StorefrontRelatedAnswer, q as StorefrontReviewsAnswer, r as StorefrontSuggestAnswer, s as StorefrontTagsAnswer } from './contract-types-BRyonOYH.cjs';
1
+ import { S as StorefrontSettings, b as StorefrontMenuItem, c as StorefrontCategoryNode, d as StorefrontListAnswer, e as StorefrontListProduct, f as ReviewEligibilityAnswer, g as StorefrontProductAnswer } from './contract-types-D2-SSPM9.cjs';
2
+ export { C as CartCheckAnswer, h as CartCheckRequest, i as CartCreateAnswer, j as CartCreateRequest, k as CatalogContractErrorCode, R as ReviewSubmitAnswer, a as ReviewSubmitInput, l as StorefrontCategoriesAnswer, m as StorefrontCategoryAnswer, n as StorefrontCollectionAnswer, o as StorefrontCollectionsAnswer, p as StorefrontConfigAnswer, q as StorefrontFilterDefinition, r as StorefrontFilterValuesAnswer, s as StorefrontPageAnswer, t as StorefrontPagesAnswer, u as StorefrontRelatedAnswer, v as StorefrontReviewsAnswer, w as StorefrontSuggestAnswer, x as StorefrontTagsAnswer } from './contract-types-D2-SSPM9.cjs';
3
3
  export { S as SDK_VERSION } from './version-ev3p03v2.cjs';
4
4
  import * as money from '@usethrottle/money';
5
5
  export { money };
6
6
  export { CURRENCIES, CurrencyCode, MoneyValue, UnknownCurrencyError, currencySymbol, formatMoney, isKnownCurrency, minorUnitsOf, moneyValue, parseMoney, toDecimalString, toMinor } from '@usethrottle/money';
7
- export { C as CatalogClient, c as createCatalogClient } from './client-6j1Iz-iJ.cjs';
8
- export { c as CallOptions, d as CartAbsorb, e as CartCheckout, f as CartCheckoutInput, g as CartSession, h as CartSessionBranding, i as CartSessionDetail, j as CartSessionSnapshot, b as CartWarning, k as CartsNamespace, l as CatalogClientOptions, m as CatalogHttpCache, n as CatalogHttpCacheEntry, o as CatalogNamespaces, p as CategoriesNamespace, a as CategoryTreeDepth, q as CollectionsNamespace, C as CustomerCartSource, r as CustomerTokenSource, F as FieldsOption, s as FiltersNamespace, N as NextFetchOptions, O as OpenCartRef, t as ProductsNamespace, P as ProductsQuery, R as Redirect, u as ReviewsNamespace, S as SessionCallOptions, v as StorefrontSort, w as TagsNamespace, T as ThrottleCart, x as ThrottleLine } from './types-D0PywKnN.cjs';
9
- export { C as CartLineError, a as CartLineProblem, b as CatalogError, c as CatalogErrorCode, d as CatalogErrorInit, e as CatalogErrorIssue, f as CatalogErrorSource, g as ClientErrorCode, h as CustomerTokenInvalidError, F as FeatureUnavailableError, N as NetworkError, O as OriginNotAllowedError, R as RateLimitedError, j as ThrottleCartCode, T as TimeoutError, i as isCatalogError } from './catalog-error-BOaSKgY3.cjs';
7
+ export { C as CatalogClient, c as createCatalogClient } from './client-terkEl6u.cjs';
8
+ export { c as CallOptions, d as CartAbsorb, e as CartCheckout, f as CartCheckoutInput, g as CartSession, h as CartSessionBranding, i as CartSessionDetail, j as CartSessionSnapshot, b as CartWarning, k as CartsNamespace, l as CatalogClientOptions, m as CatalogHttpCache, n as CatalogHttpCacheEntry, o as CatalogNamespaces, p as CategoriesNamespace, a as CategoryTreeDepth, q as CollectionsNamespace, C as CustomerCartSource, r as CustomerTokenSource, F as FieldsOption, s as FiltersNamespace, N as NextFetchOptions, O as OpenCartRef, t as PagesNamespace, u as ProductsNamespace, P as ProductsQuery, R as Redirect, v as ReviewsNamespace, S as SessionCallOptions, w as SettingsCallOptions, x as SettingsNamespace, y as StorefrontSettingsResult, z as StorefrontSort, A as TagsNamespace, T as ThrottleCart, B as ThrottleLine } from './types-jNpOwEUw.cjs';
9
+ export { C as CartLineError, a as CartLineProblem, b as CatalogError, c as CatalogErrorCode, d as CatalogErrorInit, e as CatalogErrorIssue, f as CatalogErrorSource, g as ClientErrorCode, h as CustomerTokenInvalidError, F as FeatureUnavailableError, N as NetworkError, O as OriginNotAllowedError, R as RateLimitedError, j as ThrottleCartCode, T as TimeoutError, i as isCatalogError } from './catalog-error-BKN5hNWP.cjs';
10
+
11
+ /** The settings document as `/config` answers it: text resolved, targets as handles. */
12
+ type ResolvedStorefrontSettings = StorefrontSettings;
13
+ /** Where a menu item, announcement or hero button points. */
14
+ type ResolvedMenuTarget = StorefrontMenuItem['target'];
15
+ /** A key of `settings.strings`. */
16
+ type StringKey = keyof StorefrontSettings['strings'];
17
+ /**
18
+ * The English text of every storefront string: what `t` falls back to. Kept
19
+ * in step with the contract's defaults, which the Worker resolves first.
20
+ */
21
+ declare const DEFAULT_STRINGS: Readonly<Record<StringKey, string>>;
22
+ /**
23
+ * One string of the store, in the locale the settings were read for, with
24
+ * `{name}` placeholders filled from `vars` (a name without a value stays as
25
+ * written). A missing or empty string falls back to the English default.
26
+ */
27
+ declare function t(settings: {
28
+ strings?: Partial<Record<StringKey, string>>;
29
+ } | null | undefined, key: StringKey, vars?: Record<string, string | number>): string;
30
+ /**
31
+ * The URL a menu target points to, from the store's route patterns
32
+ * (`settings.routes`); `null` when the target has nothing to point at (no
33
+ * handle, or a link that is not http(s) or a site path).
34
+ */
35
+ declare function resolveMenuTarget(settings: Pick<ResolvedStorefrontSettings, 'routes'>, target: ResolvedMenuTarget): string | null;
36
+ /** The style options `@usethrottle/auth` components take (the part this maps to). */
37
+ type ThrottleAppearance = {
38
+ theme?: 'light' | 'dark' | 'auto';
39
+ variables?: Partial<Record<'colorPrimary' | 'colorPrimaryForeground' | 'colorBackground' | 'colorSurface' | 'colorForeground' | 'colorMuted' | 'colorMutedForeground' | 'colorBorder' | 'colorBorderControl' | 'colorDanger' | 'colorSuccess' | 'colorWarning' | 'fontFamily' | 'borderRadius', string>>;
40
+ };
41
+ type Fonts = StorefrontSettings['theme']['fonts'];
42
+ /**
43
+ * One Google Fonts `css2` URL for the theme's fonts: each Google family once,
44
+ * with the weights the storefront uses (400 to 700, as far as the family has
45
+ * them) and `display=swap`. `null` when every font is a system stack.
46
+ */
47
+ declare function fontStylesheetHref(theme: {
48
+ fonts: Fonts;
49
+ }): string | null;
50
+ /**
51
+ * The appearance for `@usethrottle/auth` components under the store's theme:
52
+ * the `scheme` palette (its accent and sale colours have no auth variable),
53
+ * `fonts.body` as `fontFamily` and `radius` as `borderRadius`.
54
+ */
55
+ declare function toAuthAppearance(theme: Pick<StorefrontSettings['theme'], 'light' | 'dark' | 'fonts' | 'radius'>, scheme: 'light' | 'dark'): ThrottleAppearance;
10
56
 
11
57
  /** The answer of `reviews.eligibility`. */
12
58
  type ReviewEligibility = ReviewEligibilityAnswer;
@@ -19,5 +65,5 @@ type Filter = NonNullable<StorefrontListAnswer['filters']>[number];
19
65
  /** One node of the category tree. */
20
66
  type CategoryNode = StorefrontCategoryNode;
21
67
 
22
- export { ReviewEligibilityAnswer, StorefrontCategoryNode, StorefrontListAnswer, StorefrontListProduct, StorefrontProductAnswer };
23
- export type { CategoryNode, Filter, ListProduct, ReviewEligibility, StorefrontProduct };
68
+ export { DEFAULT_STRINGS, ReviewEligibilityAnswer, StorefrontCategoryNode, StorefrontListAnswer, StorefrontListProduct, StorefrontMenuItem, StorefrontProductAnswer, StorefrontSettings, fontStylesheetHref, resolveMenuTarget, t, toAuthAppearance };
69
+ export type { CategoryNode, Filter, ListProduct, ResolvedMenuTarget, ResolvedStorefrontSettings, ReviewEligibility, StorefrontProduct, StringKey, ThrottleAppearance };