@gfed-medusa/sf-lib-common 3.6.0 → 3.7.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 (69) hide show
  1. package/dist/components/breadcrumbs/index.d.ts +2 -2
  2. package/dist/components/breadcrumbs/index.d.ts.map +1 -1
  3. package/dist/components/cart-mismatch-banner/index.d.ts +2 -2
  4. package/dist/components/cart-mismatch-banner/index.d.ts.map +1 -1
  5. package/dist/components/delete-button/index.d.ts +2 -2
  6. package/dist/components/delete-button/index.d.ts.map +1 -1
  7. package/dist/components/error-message/index.d.ts +2 -2
  8. package/dist/components/error-message/index.d.ts.map +1 -1
  9. package/dist/components/free-shipping-price-nudge/index.d.ts +2 -2
  10. package/dist/components/free-shipping-price-nudge/index.d.ts.map +1 -1
  11. package/dist/components/interactive-link/index.d.ts +2 -2
  12. package/dist/components/line-item-options/index.d.ts +2 -2
  13. package/dist/components/line-item-price/index.d.ts +2 -2
  14. package/dist/components/line-item-price/index.d.ts.map +1 -1
  15. package/dist/components/localized-client-link/index.d.ts +2 -2
  16. package/dist/components/localized-client-link/index.d.ts.map +1 -1
  17. package/dist/components/modal/index.d.ts +2 -2
  18. package/dist/components/modal/index.d.ts.map +1 -1
  19. package/dist/components/preview-price/index.d.ts +2 -2
  20. package/dist/components/product-card/index.d.ts +2 -2
  21. package/dist/components/product-preview/index.d.ts +2 -2
  22. package/dist/components/product-preview/index.d.ts.map +1 -1
  23. package/dist/components/submit-button/index.d.ts +2 -2
  24. package/dist/components/submit-button/index.d.ts.map +1 -1
  25. package/dist/lib/context/apollo-context.d.ts +2 -2
  26. package/dist/lib/context/modal-context.d.ts +2 -2
  27. package/dist/lib/context/modal-context.d.ts.map +1 -1
  28. package/dist/lib/data/context.d.ts +2 -2
  29. package/dist/lib/data/context.d.ts.map +1 -1
  30. package/dist/lib/data/contextual-banner.d.ts +15 -0
  31. package/dist/lib/data/contextual-banner.d.ts.map +1 -0
  32. package/dist/lib/data/contextual-banner.js +19 -0
  33. package/dist/lib/data/contextual-banner.js.map +1 -0
  34. package/dist/lib/gql/fragments/cart.d.ts +9 -9
  35. package/dist/lib/gql/fragments/cart.d.ts.map +1 -1
  36. package/dist/lib/gql/fragments/customer.d.ts +3 -3
  37. package/dist/lib/gql/fragments/product.d.ts +8 -8
  38. package/dist/lib/gql/queries/cart-summary.d.ts +2 -2
  39. package/dist/lib/gql/queries/cart.d.ts +2 -2
  40. package/dist/lib/gql/queries/collections.d.ts +3 -3
  41. package/dist/lib/gql/queries/collections.d.ts.map +1 -1
  42. package/dist/lib/gql/queries/contextual-banner.d.ts +7 -0
  43. package/dist/lib/gql/queries/contextual-banner.d.ts.map +1 -0
  44. package/dist/lib/gql/queries/contextual-banner.js +21 -0
  45. package/dist/lib/gql/queries/contextual-banner.js.map +1 -0
  46. package/dist/lib/gql/queries/customer.d.ts +2 -2
  47. package/dist/lib/gql/queries/customer.d.ts.map +1 -1
  48. package/dist/lib/gql/queries/footer.d.ts +3 -3
  49. package/dist/lib/gql/queries/footer.d.ts.map +1 -1
  50. package/dist/lib/gql/queries/home-banner.d.ts +2 -2
  51. package/dist/lib/gql/queries/home-banner.d.ts.map +1 -1
  52. package/dist/lib/gql/queries/order.d.ts +4 -4
  53. package/dist/lib/gql/queries/product.d.ts +2 -2
  54. package/dist/lib/gql/queries/regions.d.ts +3 -3
  55. package/dist/lib/gql/queries/shipping.d.ts +3 -3
  56. package/dist/lib/gql/queries/shipping.d.ts.map +1 -1
  57. package/dist/lib/personalization/behavior-tracker.d.ts +15 -0
  58. package/dist/lib/personalization/behavior-tracker.d.ts.map +1 -0
  59. package/dist/lib/personalization/behavior-tracker.js +47 -0
  60. package/dist/lib/personalization/behavior-tracker.js.map +1 -0
  61. package/dist/lib/personalization/config.d.ts +31 -0
  62. package/dist/lib/personalization/config.d.ts.map +1 -0
  63. package/dist/lib/personalization/config.js +77 -0
  64. package/dist/lib/personalization/config.js.map +1 -0
  65. package/dist/lib/personalization/user-profile.d.ts +15 -0
  66. package/dist/lib/personalization/user-profile.d.ts.map +1 -0
  67. package/dist/lib/personalization/user-profile.js +47 -0
  68. package/dist/lib/personalization/user-profile.js.map +1 -0
  69. package/package.json +6 -4
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime11 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/components/breadcrumbs/index.d.ts
4
4
  declare const SEPARATOR_ICONS: Record<string, React.ComponentType<{
@@ -14,7 +14,7 @@ declare function Breadcrumbs({
14
14
  iconClassName,
15
15
  iconSize,
16
16
  separatorIcon
17
- }: BreadcrumbsProps): react_jsx_runtime0.JSX.Element;
17
+ }: BreadcrumbsProps): react_jsx_runtime11.JSX.Element;
18
18
  //#endregion
19
19
  export { Breadcrumbs };
20
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/breadcrumbs/index.tsx"],"sourcesContent":[],"mappings":";;;cAiBM,iBAAiB,eAErB,KAAA,CAAM;;;AAyCW,CAAA,CAAA,CAAA;AA3CU,UAQnB,gBAAA,CAAgB;EA+BjB,aAAA,CAAW,EAAA,MAAA,OA9BW,eA8BX;EAClB,QAAA,CAAA,EAAA,MAAA;EACA,aAAA,CAAA,EAAA,MAAA;;iBAFO,WAAA,CAIN;EAAA,aAAA;EAAA,QAAA;EAAA;AAAA,CAAA,EAAA,gBAAA,CAAA,EAAgB,kBAAA,CAAA,GAAA,CAAA,OAAhB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/breadcrumbs/index.tsx"],"sourcesContent":[],"mappings":";;;cAiBM,iBAAiB,eAErB,KAAA,CAAM;;;AAyCW,CAAA,CAAA,CAAA;AA3CU,UAQnB,gBAAA,CAAgB;EA+BjB,aAAA,CAAW,EAAA,MAAA,OA9BW,eA8BX;EAClB,QAAA,CAAA,EAAA,MAAA;EACA,aAAA,CAAA,EAAA,MAAA;;iBAFO,WAAA,CAIN;EAAA,aAAA;EAAA,QAAA;EAAA;AAAA,CAAA,EAAA,gBAAA,CAAA,EAAgB,mBAAA,CAAA,GAAA,CAAA,OAAhB"}
@@ -1,11 +1,11 @@
1
1
  import { Cart, Customer } from "../../types/graphql.js";
2
- import * as react_jsx_runtime6 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime12 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/cart-mismatch-banner/index.d.ts
5
5
  declare function CartMismatchBanner(props: {
6
6
  customer: Customer;
7
7
  cart: Cart;
8
- }): react_jsx_runtime6.JSX.Element | undefined;
8
+ }): react_jsx_runtime12.JSX.Element | undefined;
9
9
  //#endregion
10
10
  export { CartMismatchBanner };
11
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/cart-mismatch-banner/index.tsx"],"sourcesContent":[],"mappings":";;;;iBAYS,kBAAA;YAAsC;EAAtC,IAAA,EAAsD,IAAtD;CAAsC,CAAA,EAAsB,kBAAA,CAAA,GAAA,CAAA,OAAA,GAAtB,SAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/cart-mismatch-banner/index.tsx"],"sourcesContent":[],"mappings":";;;;iBAYS,kBAAA;YAAsC;EAAtC,IAAA,EAAsD,IAAtD;CAAsC,CAAA,EAAsB,mBAAA,CAAA,GAAA,CAAA,OAAA,GAAtB,SAAA"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime14 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/components/delete-button/index.d.ts
4
4
  declare const DeleteButton: ({
@@ -9,7 +9,7 @@ declare const DeleteButton: ({
9
9
  id: string;
10
10
  children?: React.ReactNode;
11
11
  className?: string;
12
- }) => react_jsx_runtime0.JSX.Element;
12
+ }) => react_jsx_runtime14.JSX.Element;
13
13
  //#endregion
14
14
  export { DeleteButton };
15
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/delete-button/index.tsx"],"sourcesContent":[],"mappings":";;;cASM;;;;;;aAMO,KAAA,CAAM;EANb,SAAA,CAAA,EAAA,MAuCL;CAvCqB,EAAA,GAQrB,kBAAA,CAAA,GAAA,CAAA,OARqB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/delete-button/index.tsx"],"sourcesContent":[],"mappings":";;;cASM;;;;;;aAMO,KAAA,CAAM;EANb,SAAA,CAAA,EAAA,MAuCL;CAvCqB,EAAA,GAQrB,mBAAA,CAAA,GAAA,CAAA,OARqB"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime1 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime13 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/components/error-message/index.d.ts
4
4
  declare const ErrorMessage: ({
@@ -7,7 +7,7 @@ declare const ErrorMessage: ({
7
7
  }: {
8
8
  error?: string | null;
9
9
  "data-testid"?: string;
10
- }) => react_jsx_runtime1.JSX.Element | null;
10
+ }) => react_jsx_runtime13.JSX.Element | null;
11
11
  //#endregion
12
12
  export { ErrorMessage };
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/error-message/index.tsx"],"sourcesContent":[],"mappings":";;;cAAM;;iBAAgB;AAMrB;;;AAAA,CAAA,EAAA,GAAA,kBAAA,CAAA,GAAA,CAAA,OAAA,GAaA,IAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/error-message/index.tsx"],"sourcesContent":[],"mappings":";;;cAAM;;iBAAgB;AAMrB;;;AAAA,CAAA,EAAA,GAAA,mBAAA,CAAA,GAAA,CAAA,OAAA,GAaA,IAAA"}
@@ -1,5 +1,5 @@
1
1
  import { Cart, ShippingOption } from "../../types/graphql.js";
2
- import * as react_jsx_runtime2 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime15 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/free-shipping-price-nudge/index.d.ts
5
5
  declare function ShippingPriceNudge({
@@ -10,7 +10,7 @@ declare function ShippingPriceNudge({
10
10
  variant?: 'popup' | 'inline';
11
11
  cart: Cart;
12
12
  shippingOptions: ShippingOption[];
13
- }): react_jsx_runtime2.JSX.Element | undefined;
13
+ }): react_jsx_runtime15.JSX.Element | undefined;
14
14
  //#endregion
15
15
  export { ShippingPriceNudge };
16
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/free-shipping-price-nudge/index.tsx"],"sourcesContent":[],"mappings":";;;;iBAqES,kBAAA;;;;;;QAMD;EANC,eAAA,EAOU,cAPQ,EAAA;CACzB,CAAA,EAOD,kBAAA,CAAA,GAAA,CAAA,OAAA,GAPC,SAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/free-shipping-price-nudge/index.tsx"],"sourcesContent":[],"mappings":";;;;iBAqES,kBAAA;;;;;;QAMD;EANC,eAAA,EAOU,cAPQ,EAAA;CACzB,CAAA,EAOD,mBAAA,CAAA,GAAA,CAAA,OAAA,GAPC,SAAA"}
@@ -1,5 +1,5 @@
1
1
  import { LocalizedClientLink } from "../localized-client-link/index.js";
2
- import * as react_jsx_runtime3 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/interactive-link/index.d.ts
5
5
  type InteractiveLinkProps = React.ComponentPropsWithoutRef<typeof LocalizedClientLink> & {
@@ -14,7 +14,7 @@ declare const InteractiveLink: ({
14
14
  textClassName,
15
15
  iconClassName,
16
16
  ...props
17
- }: InteractiveLinkProps) => react_jsx_runtime3.JSX.Element;
17
+ }: InteractiveLinkProps) => react_jsx_runtime0.JSX.Element;
18
18
  //#endregion
19
19
  export { InteractiveLink };
20
20
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { Maybe, ProductVariant } from "../../types/graphql.js";
2
- import * as react_jsx_runtime5 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/line-item-options/index.d.ts
5
5
  type LineItemOptionsProps = {
@@ -11,7 +11,7 @@ declare const LineItemOptions: ({
11
11
  variant,
12
12
  "data-testid": dataTestid,
13
13
  "data-value": dataValue
14
- }: LineItemOptionsProps) => react_jsx_runtime5.JSX.Element;
14
+ }: LineItemOptionsProps) => react_jsx_runtime0.JSX.Element;
15
15
  //#endregion
16
16
  export { LineItemOptions };
17
17
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { LineItem } from "../../types/graphql.js";
2
- import * as react_jsx_runtime14 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/line-item-price/index.d.ts
5
5
  type LineItemPriceProps = {
@@ -11,7 +11,7 @@ declare const LineItemPrice: ({
11
11
  item,
12
12
  style,
13
13
  currencyCode
14
- }: LineItemPriceProps) => react_jsx_runtime14.JSX.Element;
14
+ }: LineItemPriceProps) => react_jsx_runtime1.JSX.Element;
15
15
  //#endregion
16
16
  export { LineItemPrice };
17
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/line-item-price/index.tsx"],"sourcesContent":[],"mappings":";;;;KAMK,kBAAA;QACG;;EADH,YAAA,EAAA,MAAA;AACW,CAAA;cAKV,aAAiB,EAAA,CAAA;EAAA,IAAA;EAAA,KAAA;EAAA;AAAA,CAAA,EAIpB,kBAJoB,EAAA,GAIF,mBAAA,CAAA,GAAA,CAAA,OAJE"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/line-item-price/index.tsx"],"sourcesContent":[],"mappings":";;;;KAMK,kBAAA;QACG;;EADH,YAAA,EAAA,MAAA;AACW,CAAA;cAKV,aAAiB,EAAA,CAAA;EAAA,IAAA;EAAA,KAAA;EAAA;AAAA,CAAA,EAIpB,kBAJoB,EAAA,GAIF,kBAAA,CAAA,GAAA,CAAA,OAJE"}
@@ -1,5 +1,5 @@
1
1
  import { AnchorHTMLAttributes, DetailedHTMLProps } from "react";
2
- import * as react_jsx_runtime10 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime9 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/localized-client-link/index.d.ts
5
5
  type LocalizedClientLinkProps = DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> & {
@@ -10,7 +10,7 @@ declare const LocalizedClientLink: ({
10
10
  href,
11
11
  locale,
12
12
  ...props
13
- }: LocalizedClientLinkProps) => react_jsx_runtime10.JSX.Element;
13
+ }: LocalizedClientLinkProps) => react_jsx_runtime9.JSX.Element;
14
14
  //#endregion
15
15
  export { LocalizedClientLink };
16
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/localized-client-link/index.tsx"],"sourcesContent":[],"mappings":";;;;KAWK,wBAAA,GAA2B,kBAC9B,qBAAqB,oBACrB;;;AANa,cAWT,mBAPuB,EAAA,CAAA;EAAA,QAAA;EAAA,IAAA;EAAA,MAAA;EAAA,GAAA;AAAA,CAAA,EAY1B,wBAZ0B,EAAA,GAYF,mBAAA,CAAA,GAAA,CAAA,OAZE"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/localized-client-link/index.tsx"],"sourcesContent":[],"mappings":";;;;KAWK,wBAAA,GAA2B,kBAC9B,qBAAqB,oBACrB;;;AANa,cAWT,mBAPuB,EAAA,CAAA;EAAA,QAAA;EAAA,IAAA;EAAA,MAAA;EAAA,GAAA;AAAA,CAAA,EAY1B,wBAZ0B,EAAA,GAYF,kBAAA,CAAA,GAAA,CAAA,OAZE"}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime7 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime10 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/modal/index.d.ts
5
5
  type ModalProps = {
@@ -20,7 +20,7 @@ declare const Modal: {
20
20
  children,
21
21
  "data-testid": dataTestId,
22
22
  "aria-label": ariaLabel
23
- }: ModalProps): react_jsx_runtime7.JSX.Element;
23
+ }: ModalProps): react_jsx_runtime10.JSX.Element;
24
24
  Title: React.FC<{
25
25
  children: React.ReactNode;
26
26
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/modal/index.tsx"],"sourcesContent":[],"mappings":";;;;KAQK,UAAA;;;EAAA,IAAA,CAAA,EAAA,OAAU,GAAA,QAAA,GAKH,OAAM;EAKZ,MAAA,CAAA,EAmEL,OAAA;YAxEW,KAAA,CAAM;;;;cAKZ;;;;;;;;;KAQH,aAAU,kBAAA,CAAA,GAAA,CAAA;;IAAV,QAAA,EA6D+B,KAAA,CAAM,SA7DrC;EAAU,CAAA,CAAA;EA6DqB,WAAM,UAAA,CAAA;cAeA,KAAA,CAAM;EAAN,CAAA,CAAA;;IAQD,QAAA,EAAN,KAAA,CAAM,SAAA;;EAIJ,MAAM,UAAA,CAAA;cAAN,KAAA,CAAM"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/modal/index.tsx"],"sourcesContent":[],"mappings":";;;;KAQK,UAAA;;;EAAA,IAAA,CAAA,EAAA,OAAU,GAAA,QAAA,GAKH,OAAM;EAKZ,MAAA,CAAA,EAmEL,OAAA;YAxEW,KAAA,CAAM;;;;cAKZ;;;;;;;;;KAQH,aAAU,mBAAA,CAAA,GAAA,CAAA;;IAAV,QAAA,EA6D+B,KAAA,CAAM,SA7DrC;EAAU,CAAA,CAAA;EA6DqB,WAAM,UAAA,CAAA;cAeA,KAAA,CAAM;EAAN,CAAA,CAAA;;IAQD,QAAA,EAAN,KAAA,CAAM,SAAA;;EAIJ,MAAM,UAAA,CAAA;cAAN,KAAA,CAAM"}
@@ -1,12 +1,12 @@
1
1
  import { VariantPrice } from "../../types/prices.js";
2
- import * as react_jsx_runtime8 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/preview-price/index.d.ts
5
5
  declare function PreviewPrice({
6
6
  price
7
7
  }: {
8
8
  price: VariantPrice;
9
- }): react_jsx_runtime8.JSX.Element | null;
9
+ }): react_jsx_runtime2.JSX.Element | null;
10
10
  //#endregion
11
11
  export { PreviewPrice };
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime9 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
2
2
  import { VariantProps } from "class-variance-authority";
3
3
  import * as class_variance_authority_types0 from "class-variance-authority/types";
4
4
 
@@ -59,7 +59,7 @@ declare function ProductCard({
59
59
  variant,
60
60
  size,
61
61
  className
62
- }: ProductCardProps): react_jsx_runtime9.JSX.Element;
62
+ }: ProductCardProps): react_jsx_runtime3.JSX.Element;
63
63
  //#endregion
64
64
  export { ProductCard };
65
65
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { Product } from "../../types/graphql.js";
2
- import * as react_jsx_runtime11 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime4 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/product-preview/index.d.ts
5
5
  type ProductPreviewProduct = Pick<Product, 'id' | 'title' | 'handle' | 'thumbnail' | 'images' | 'variants'>;
@@ -14,7 +14,7 @@ declare function ProductPreview({
14
14
  isFeatured,
15
15
  imagePriority,
16
16
  imageFetchPriority
17
- }: ProductPreviewProps): react_jsx_runtime11.JSX.Element;
17
+ }: ProductPreviewProps): react_jsx_runtime4.JSX.Element;
18
18
  //#endregion
19
19
  export { ProductPreview, ProductPreviewProduct, ProductPreviewProps };
20
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/product-preview/index.tsx"],"sourcesContent":[],"mappings":";;;;KASY,qBAAA,GAAwB,KAClC;KAIU,mBAAA;WACD;EANC,UAAA,CAAA,EAAA,OAAA;EAKA,aAAA,CAAA,EAAA,OAAmB;EAOtB,kBAAc,CAAA,EAAA,MAAA,GAAA,MAAA,GAAA,KAAA;CACrB;iBADO,cAAA,CAEP;EAAA,OAAA;EAAA,UAAA;EAAA,aAAA;EAAA;AAAA,CAAA,EAGC,mBAHD,CAAA,EAGoB,mBAAA,CAAA,GAAA,CAAA,OAHpB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/product-preview/index.tsx"],"sourcesContent":[],"mappings":";;;;KASY,qBAAA,GAAwB,KAClC;KAIU,mBAAA;WACD;EANC,UAAA,CAAA,EAAA,OAAA;EAKA,aAAA,CAAA,EAAA,OAAmB;EAOtB,kBAAc,CAAA,EAAA,MAAA,GAAA,MAAA,GAAA,KAAA;CACrB;iBADO,cAAA,CAEP;EAAA,OAAA;EAAA,UAAA;EAAA,aAAA;EAAA;AAAA,CAAA,EAGC,mBAHD,CAAA,EAGoB,kBAAA,CAAA,GAAA,CAAA,OAHpB"}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime12 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/submit-button/index.d.ts
5
5
  declare function SubmitButton({
@@ -14,7 +14,7 @@ declare function SubmitButton({
14
14
  className?: string;
15
15
  'data-testid'?: string;
16
16
  isLoading?: boolean;
17
- }): react_jsx_runtime12.JSX.Element;
17
+ }): react_jsx_runtime5.JSX.Element;
18
18
  //#endregion
19
19
  export { SubmitButton };
20
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/submit-button/index.tsx"],"sourcesContent":[],"mappings":";;;;iBAQS,YAAA;;;;iBAIQ;;;YAGL,KAAA,CAAM;;EAPT,SAAA,CAAA,EAAA,MAAY;EACnB,aAAA,CAAA,EAAA,MAAA;EACA,SAAA,CAAA,EAAA,OAAA;CACA,CAAA,EASD,mBAAA,CAAA,GAAA,CAAA,OATC"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/submit-button/index.tsx"],"sourcesContent":[],"mappings":";;;;iBAQS,YAAA;;;;iBAIQ;;;YAGL,KAAA,CAAM;;EAPT,SAAA,CAAA,EAAA,MAAY;EACnB,aAAA,CAAA,EAAA,MAAA;EACA,SAAA,CAAA,EAAA,OAAA;CACA,CAAA,EASD,kBAAA,CAAA,GAAA,CAAA,OATC"}
@@ -1,10 +1,10 @@
1
1
  import { PropsWithChildren } from "react";
2
- import * as react_jsx_runtime4 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime6 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/lib/context/apollo-context.d.ts
5
5
  declare function ApolloClientProvider({
6
6
  children
7
- }: PropsWithChildren): react_jsx_runtime4.JSX.Element;
7
+ }: PropsWithChildren): react_jsx_runtime6.JSX.Element;
8
8
  //#endregion
9
9
  export { ApolloClientProvider };
10
10
  //# sourceMappingURL=apollo-context.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime13 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime7 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/lib/context/modal-context.d.ts
5
5
  interface ModalContext {
@@ -13,7 +13,7 @@ interface ModalProviderProps {
13
13
  declare const ModalProvider: ({
14
14
  children,
15
15
  close
16
- }: ModalProviderProps) => react_jsx_runtime13.JSX.Element;
16
+ }: ModalProviderProps) => react_jsx_runtime7.JSX.Element;
17
17
  declare const useModal: () => ModalContext;
18
18
  //#endregion
19
19
  export { ModalProvider, useModal };
@@ -1 +1 @@
1
- {"version":3,"file":"modal-context.d.ts","names":[],"sources":["../../../src/lib/context/modal-context.tsx"],"sourcesContent":[],"mappings":";;;;UAIU,YAAA;;;AAF+C,cAMnD,YAJgB,EAIJ,KAAA,CAAA,OAJI,CAIJ,YAJI,GAAA,IAAA,CAAA;AAAA,UAMZ,kBAAA,CAFmD;EAEnD,QAAA,CAAA,EACG,KAAA,CAAM,SADS;EAKtB,KAAA,EAAA,GAAA,GAAA,IAUL;;cAVK,aAAiB,EAAA,CAAA;EAAA,QAAA;EAAA;AAAA,CAAA,EAAqB,kBAArB,EAAA,GAAuC,mBAAA,CAAA,GAAA,CAAA,OAAvC;cAYjB,QAZsC,EAAA,GAAA,GAY9B,YAZ8B"}
1
+ {"version":3,"file":"modal-context.d.ts","names":[],"sources":["../../../src/lib/context/modal-context.tsx"],"sourcesContent":[],"mappings":";;;;UAIU,YAAA;;;AAF+C,cAMnD,YAJgB,EAIJ,KAAA,CAAA,OAJI,CAIJ,YAJI,GAAA,IAAA,CAAA;AAAA,UAMZ,kBAAA,CAFmD;EAEnD,QAAA,CAAA,EACG,KAAA,CAAM,SADS;EAKtB,KAAA,EAAA,GAAA,GAAA,IAUL;;cAVK,aAAiB,EAAA,CAAA;EAAA,QAAA;EAAA;AAAA,CAAA,EAAqB,kBAArB,EAAA,GAAuC,kBAAA,CAAA,GAAA,CAAA,OAAvC;cAYjB,QAZsC,EAAA,GAAA,GAY9B,YAZ8B"}
@@ -1,6 +1,6 @@
1
1
  import { useStorefrontActions } from "./client-actions.js";
2
2
  import { ReactNode } from "react";
3
- import * as react_jsx_runtime15 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime8 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/lib/data/context.d.ts
6
6
  interface StorefrontContext {
@@ -15,7 +15,7 @@ interface StorefrontProviderProps {
15
15
  declare const StorefrontProvider: ({
16
16
  children,
17
17
  value
18
- }: StorefrontProviderProps) => react_jsx_runtime15.JSX.Element;
18
+ }: StorefrontProviderProps) => react_jsx_runtime8.JSX.Element;
19
19
  declare const useStorefrontContext: () => StorefrontContext;
20
20
  //#endregion
21
21
  export { StorefrontContext, StorefrontProvider, useStorefrontActions, useStorefrontContext };
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","names":[],"sources":["../../../src/lib/data/context.tsx"],"sourcesContent":[],"mappings":";;;;;UAMiB,iBAAA;;;;AAAjB;AAIC,UAwBS,uBAAA,CAAuB;EAKpB,QAAA,EAJD,SAIC;EAAsB,KAAA,CAAA,EAHzB,iBAGyB;;AAGhC,cAHU,kBAGV,EAAA,CAAA;EAAA,QAAA;EAAA;AAAA,CAAA,EAAA,uBAAA,EAAA,GAAuB,mBAAA,CAAA,GAAA,CAAA,OAAvB;AAAuB,cAwBb,oBAxBa,EAAA,GAAA,GAwBO,iBAxBP"}
1
+ {"version":3,"file":"context.d.ts","names":[],"sources":["../../../src/lib/data/context.tsx"],"sourcesContent":[],"mappings":";;;;;UAMiB,iBAAA;;;;AAAjB;AAIC,UAwBS,uBAAA,CAAuB;EAKpB,QAAA,EAJD,SAIC;EAAsB,KAAA,CAAA,EAHzB,iBAGyB;;AAGhC,cAHU,kBAGV,EAAA,CAAA;EAAA,QAAA;EAAA;AAAA,CAAA,EAAA,uBAAA,EAAA,GAAuB,kBAAA,CAAA,GAAA,CAAA,OAAvB;AAAuB,cAwBb,oBAxBa,EAAA,GAAA,GAwBO,iBAxBP"}
@@ -0,0 +1,15 @@
1
+ //#region src/lib/data/contextual-banner.d.ts
2
+ interface ContextualBannerContent {
3
+ title: string;
4
+ description: string;
5
+ ctaLabel: string;
6
+ ctaHref: string;
7
+ trigger: string;
8
+ minPrice?: number;
9
+ isActive: boolean;
10
+ priority: number;
11
+ }
12
+ declare function getAllContextualBanners(): Promise<ContextualBannerContent[]>;
13
+ //#endregion
14
+ export { ContextualBannerContent, getAllContextualBanners };
15
+ //# sourceMappingURL=contextual-banner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contextual-banner.d.ts","names":[],"sources":["../../../src/lib/data/contextual-banner.ts"],"sourcesContent":[],"mappings":";UAGiB,uBAAA;EAAA,KAAA,EAAA,MAAA;EAeK,WAAA,EAAA,MAAA;;;;;;;;iBAAA,uBAAA,CAAA,GAA2B,QAAQ"}
@@ -0,0 +1,19 @@
1
+ import { graphqlFetch } from "../gql/apollo-client.js";
2
+ import { GET_CONTEXTUAL_BANNERS_QUERY } from "../gql/queries/contextual-banner.js";
3
+
4
+ //#region src/lib/data/contextual-banner.ts
5
+ async function getAllContextualBanners() {
6
+ try {
7
+ return ((await graphqlFetch({
8
+ query: GET_CONTEXTUAL_BANNERS_QUERY,
9
+ variables: {}
10
+ }))?.contextualBanners ?? []).filter((b) => b.isActive);
11
+ } catch (error) {
12
+ console.error("Error fetching contextual banners:", error);
13
+ return [];
14
+ }
15
+ }
16
+
17
+ //#endregion
18
+ export { getAllContextualBanners };
19
+ //# sourceMappingURL=contextual-banner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contextual-banner.js","names":[],"sources":["../../../src/lib/data/contextual-banner.ts"],"sourcesContent":["import { graphqlFetch } from '@/lib/gql/apollo-client';\nimport { GET_CONTEXTUAL_BANNERS_QUERY } from '@/lib/gql/queries/contextual-banner';\n\nexport interface ContextualBannerContent {\n title: string;\n description: string;\n ctaLabel: string;\n ctaHref: string;\n trigger: string;\n minPrice?: number;\n isActive: boolean;\n priority: number;\n}\n\ntype ContextualBannersQueryResult = {\n contextualBanners: ContextualBannerContent[];\n};\n\nexport async function getAllContextualBanners(): Promise<ContextualBannerContent[]> {\n try {\n const data = await graphqlFetch<\n ContextualBannersQueryResult,\n Record<string, never>\n >({\n query: GET_CONTEXTUAL_BANNERS_QUERY,\n variables: {},\n });\n\n const banners = data?.contextualBanners ?? [];\n return banners.filter((b) => b.isActive);\n } catch (error) {\n console.error('Error fetching contextual banners:', error);\n return [];\n }\n}"],"mappings":";;;;AAkBA,eAAsB,0BAA8D;AAClF,KAAI;AAUF,WATa,MAAM,aAGjB;GACA,OAAO;GACP,WAAW,EAAE;GACd,CAAC,GAEoB,qBAAqB,EAAE,EAC9B,QAAQ,MAAM,EAAE,SAAS;UACjC,OAAO;AACd,UAAQ,MAAM,sCAAsC,MAAM;AAC1D,SAAO,EAAE"}
@@ -1,14 +1,14 @@
1
- import * as _apollo_client0 from "@apollo/client";
1
+ import * as _apollo_client22 from "@apollo/client";
2
2
 
3
3
  //#region src/lib/gql/fragments/cart.d.ts
4
- declare const LINE_ITEM_FRAGMENT: _apollo_client0.DocumentNode;
5
- declare const COUNTRY_FRAGMENT: _apollo_client0.DocumentNode;
6
- declare const REGION_FRAGMENT: _apollo_client0.DocumentNode;
7
- declare const SHIPPING_METHODS_FRAGMENT: _apollo_client0.DocumentNode;
8
- declare const PAYMENT_COLLECTION_FRAGMENT: _apollo_client0.DocumentNode;
9
- declare const ADDRESS_FRAGMENT: _apollo_client0.DocumentNode;
10
- declare const PROMOTION_FRAGMENT: _apollo_client0.DocumentNode;
11
- declare const CART_FRAGMENT: _apollo_client0.DocumentNode;
4
+ declare const LINE_ITEM_FRAGMENT: _apollo_client22.DocumentNode;
5
+ declare const COUNTRY_FRAGMENT: _apollo_client22.DocumentNode;
6
+ declare const REGION_FRAGMENT: _apollo_client22.DocumentNode;
7
+ declare const SHIPPING_METHODS_FRAGMENT: _apollo_client22.DocumentNode;
8
+ declare const PAYMENT_COLLECTION_FRAGMENT: _apollo_client22.DocumentNode;
9
+ declare const ADDRESS_FRAGMENT: _apollo_client22.DocumentNode;
10
+ declare const PROMOTION_FRAGMENT: _apollo_client22.DocumentNode;
11
+ declare const CART_FRAGMENT: _apollo_client22.DocumentNode;
12
12
  //#endregion
13
13
  export { ADDRESS_FRAGMENT, CART_FRAGMENT, COUNTRY_FRAGMENT, LINE_ITEM_FRAGMENT, PAYMENT_COLLECTION_FRAGMENT, PROMOTION_FRAGMENT, REGION_FRAGMENT, SHIPPING_METHODS_FRAGMENT };
14
14
  //# sourceMappingURL=cart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cart.d.ts","names":[],"sources":["../../../../src/lib/gql/fragments/cart.ts"],"sourcesContent":[],"mappings":";;;cAIa,oBAiBZ,eAAA,CAjB8B;cAmBlB,kBAOZ,eAAA,CAP4B;cAShB,iBAWZ,eAAA,CAX2B;AA5Bf,cAyCA,yBAxBZ,EAkCA,eAAA,CAVqC,YAxBrC;AAEY,cAkCA,2BA3BZ,EA6CA,eAAA,CAlBuC,YA3BvC;AAEY,cA6CA,gBAlCZ,EA4CA,eAAA,CAV4B,YAlC5B;AAEY,cA4CA,kBAlCZ,EA4CA,eAAA,CAV8B,YAlC9B;AAEY,cA4CA,aA1BZ,EAqEA,eAAA,CA3CyB,YA5Cc"}
1
+ {"version":3,"file":"cart.d.ts","names":[],"sources":["../../../../src/lib/gql/fragments/cart.ts"],"sourcesContent":[],"mappings":";;;cAIa,oBAiBZ,gBAAA,CAjB8B;cAmBlB,kBAOZ,gBAAA,CAP4B;cAShB,iBAWZ,gBAAA,CAX2B;AA5Bf,cAyCA,yBAxBZ,EAkCA,gBAAA,CAVqC,YAxBrC;AAEY,cAkCA,2BA3BZ,EA6CA,gBAAA,CAlBuC,YA3BvC;AAEY,cA6CA,gBAlCZ,EA4CA,gBAAA,CAV4B,YAlC5B;AAEY,cA4CA,kBAlCZ,EA4CA,gBAAA,CAV8B,YAlC9B;AAEY,cA4CA,aA1BZ,EAqEA,gBAAA,CA3CyB,YA5Cc"}
@@ -1,8 +1,8 @@
1
- import * as _apollo_client8 from "@apollo/client";
1
+ import * as _apollo_client7 from "@apollo/client";
2
2
 
3
3
  //#region src/lib/gql/fragments/customer.d.ts
4
- declare const CUSTOMER_ADDRESS_FRAGMENT: _apollo_client8.DocumentNode;
5
- declare const CUSTOMER_FRAGMENT: _apollo_client8.DocumentNode;
4
+ declare const CUSTOMER_ADDRESS_FRAGMENT: _apollo_client7.DocumentNode;
5
+ declare const CUSTOMER_FRAGMENT: _apollo_client7.DocumentNode;
6
6
  //#endregion
7
7
  export { CUSTOMER_ADDRESS_FRAGMENT, CUSTOMER_FRAGMENT };
8
8
  //# sourceMappingURL=customer.d.ts.map
@@ -1,13 +1,13 @@
1
- import * as _apollo_client10 from "@apollo/client";
1
+ import * as _apollo_client32 from "@apollo/client";
2
2
 
3
3
  //#region src/lib/gql/fragments/product.d.ts
4
- declare const PRICE_FRAGMENT: _apollo_client10.DocumentNode;
5
- declare const PRODUCT_VARIANT_FRAGMENT: _apollo_client10.DocumentNode;
6
- declare const PRODUCT_CATEGORY_FRAGMENT: _apollo_client10.DocumentNode;
7
- declare const PRODUCT_COLLECTION_FRAGMENT: _apollo_client10.DocumentNode;
8
- declare const PRODUCT_IMAGE_FRAGMENT: _apollo_client10.DocumentNode;
9
- declare const COLLECTION_PRODUCTS_FRAGMENT: _apollo_client10.DocumentNode;
10
- declare const COLLECTION_PRODUCTS_HOME_FRAGMENT: _apollo_client10.DocumentNode;
4
+ declare const PRICE_FRAGMENT: _apollo_client32.DocumentNode;
5
+ declare const PRODUCT_VARIANT_FRAGMENT: _apollo_client32.DocumentNode;
6
+ declare const PRODUCT_CATEGORY_FRAGMENT: _apollo_client32.DocumentNode;
7
+ declare const PRODUCT_COLLECTION_FRAGMENT: _apollo_client32.DocumentNode;
8
+ declare const PRODUCT_IMAGE_FRAGMENT: _apollo_client32.DocumentNode;
9
+ declare const COLLECTION_PRODUCTS_FRAGMENT: _apollo_client32.DocumentNode;
10
+ declare const COLLECTION_PRODUCTS_HOME_FRAGMENT: _apollo_client32.DocumentNode;
11
11
  //#endregion
12
12
  export { COLLECTION_PRODUCTS_FRAGMENT, COLLECTION_PRODUCTS_HOME_FRAGMENT, PRICE_FRAGMENT, PRODUCT_CATEGORY_FRAGMENT, PRODUCT_COLLECTION_FRAGMENT, PRODUCT_IMAGE_FRAGMENT, PRODUCT_VARIANT_FRAGMENT };
13
13
  //# sourceMappingURL=product.d.ts.map
@@ -1,7 +1,7 @@
1
- import * as _apollo_client22 from "@apollo/client";
1
+ import * as _apollo_client30 from "@apollo/client";
2
2
 
3
3
  //#region src/lib/gql/queries/cart-summary.d.ts
4
- declare const GET_CART_ITEM_COUNT_QUERY: _apollo_client22.DocumentNode;
4
+ declare const GET_CART_ITEM_COUNT_QUERY: _apollo_client30.DocumentNode;
5
5
  //#endregion
6
6
  export { GET_CART_ITEM_COUNT_QUERY };
7
7
  //# sourceMappingURL=cart-summary.d.ts.map
@@ -1,7 +1,7 @@
1
- import * as _apollo_client35 from "@apollo/client";
1
+ import * as _apollo_client31 from "@apollo/client";
2
2
 
3
3
  //#region src/lib/gql/queries/cart.d.ts
4
- declare const GET_CART_QUERY: _apollo_client35.DocumentNode;
4
+ declare const GET_CART_QUERY: _apollo_client31.DocumentNode;
5
5
  //#endregion
6
6
  export { GET_CART_QUERY };
7
7
  //# sourceMappingURL=cart.d.ts.map
@@ -1,8 +1,8 @@
1
- import * as _apollo_client24 from "@apollo/client";
1
+ import * as _apollo_client0 from "@apollo/client";
2
2
 
3
3
  //#region src/lib/gql/queries/collections.d.ts
4
- declare const GET_COLLECTIONS_QUERY: _apollo_client24.DocumentNode;
5
- declare const GET_COLLECTIONS_HOME_QUERY: _apollo_client24.DocumentNode;
4
+ declare const GET_COLLECTIONS_QUERY: _apollo_client0.DocumentNode;
5
+ declare const GET_COLLECTIONS_HOME_QUERY: _apollo_client0.DocumentNode;
6
6
  //#endregion
7
7
  export { GET_COLLECTIONS_HOME_QUERY, GET_COLLECTIONS_QUERY };
8
8
  //# sourceMappingURL=collections.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"collections.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/collections.ts"],"sourcesContent":[],"mappings":";;;cAQa,uBAWZ,gBAAA,CAXiC;cAarB,4BAWZ,gBAAA,CAXsC"}
1
+ {"version":3,"file":"collections.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/collections.ts"],"sourcesContent":[],"mappings":";;;cAQa,uBAWZ,eAAA,CAXiC;cAarB,4BAWZ,eAAA,CAXsC"}
@@ -0,0 +1,7 @@
1
+ import * as _apollo_client3 from "@apollo/client";
2
+
3
+ //#region src/lib/gql/queries/contextual-banner.d.ts
4
+ declare const GET_CONTEXTUAL_BANNERS_QUERY: _apollo_client3.DocumentNode;
5
+ //#endregion
6
+ export { GET_CONTEXTUAL_BANNERS_QUERY };
7
+ //# sourceMappingURL=contextual-banner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contextual-banner.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/contextual-banner.ts"],"sourcesContent":[],"mappings":";;;cAEa,8BAaZ,eAAA,CAbwC"}
@@ -0,0 +1,21 @@
1
+ import { gql } from "@apollo/client";
2
+
3
+ //#region src/lib/gql/queries/contextual-banner.ts
4
+ const GET_CONTEXTUAL_BANNERS_QUERY = gql`
5
+ query GetContextualBanners {
6
+ contextualBanners {
7
+ title
8
+ description
9
+ ctaLabel
10
+ ctaHref
11
+ trigger
12
+ minPrice
13
+ isActive
14
+ priority
15
+ }
16
+ }
17
+ `;
18
+
19
+ //#endregion
20
+ export { GET_CONTEXTUAL_BANNERS_QUERY };
21
+ //# sourceMappingURL=contextual-banner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contextual-banner.js","names":[],"sources":["../../../../src/lib/gql/queries/contextual-banner.ts"],"sourcesContent":["import { gql } from '@apollo/client';\n\nexport const GET_CONTEXTUAL_BANNERS_QUERY = gql`\n query GetContextualBanners {\n contextualBanners {\n title\n description\n ctaLabel\n ctaHref\n trigger\n minPrice\n isActive\n priority\n }\n }\n`;"],"mappings":";;;AAEA,MAAa,+BAA+B,GAAG"}
@@ -1,7 +1,7 @@
1
- import * as _apollo_client26 from "@apollo/client";
1
+ import * as _apollo_client4 from "@apollo/client";
2
2
 
3
3
  //#region src/lib/gql/queries/customer.d.ts
4
- declare const GET_CUSTOMER_QUERY: _apollo_client26.DocumentNode;
4
+ declare const GET_CUSTOMER_QUERY: _apollo_client4.DocumentNode;
5
5
  //#endregion
6
6
  export { GET_CUSTOMER_QUERY };
7
7
  //# sourceMappingURL=customer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"customer.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/customer.ts"],"sourcesContent":[],"mappings":";;;cAIa,oBAOZ,gBAAA,CAP8B"}
1
+ {"version":3,"file":"customer.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/customer.ts"],"sourcesContent":[],"mappings":";;;cAIa,oBAOZ,eAAA,CAP8B"}
@@ -1,8 +1,8 @@
1
- import * as _apollo_client27 from "@apollo/client";
1
+ import * as _apollo_client9 from "@apollo/client";
2
2
 
3
3
  //#region src/lib/gql/queries/footer.d.ts
4
- declare const GET_FOOTER_QUERY: _apollo_client27.DocumentNode;
5
- declare const GET_FOOTER_DATA_QUERY: _apollo_client27.DocumentNode;
4
+ declare const GET_FOOTER_QUERY: _apollo_client9.DocumentNode;
5
+ declare const GET_FOOTER_DATA_QUERY: _apollo_client9.DocumentNode;
6
6
  //#endregion
7
7
  export { GET_FOOTER_DATA_QUERY, GET_FOOTER_QUERY };
8
8
  //# sourceMappingURL=footer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"footer.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/footer.ts"],"sourcesContent":[],"mappings":";;;cAEa,kBAcZ,gBAAA,CAd4B;cAgBhB,uBAwBZ,gBAAA,CAxBiC"}
1
+ {"version":3,"file":"footer.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/footer.ts"],"sourcesContent":[],"mappings":";;;cAEa,kBAcZ,eAAA,CAd4B;cAgBhB,uBAwBZ,eAAA,CAxBiC"}
@@ -1,7 +1,7 @@
1
- import * as _apollo_client23 from "@apollo/client";
1
+ import * as _apollo_client2 from "@apollo/client";
2
2
 
3
3
  //#region src/lib/gql/queries/home-banner.d.ts
4
- declare const GET_HOME_BANNER_QUERY: _apollo_client23.DocumentNode;
4
+ declare const GET_HOME_BANNER_QUERY: _apollo_client2.DocumentNode;
5
5
  //#endregion
6
6
  export { GET_HOME_BANNER_QUERY };
7
7
  //# sourceMappingURL=home-banner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"home-banner.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/home-banner.ts"],"sourcesContent":[],"mappings":";;;cAEa,uBAsCZ,gBAAA,CAtCiC"}
1
+ {"version":3,"file":"home-banner.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/home-banner.ts"],"sourcesContent":[],"mappings":";;;cAEa,uBAsCZ,eAAA,CAtCiC"}
@@ -1,9 +1,9 @@
1
- import * as _apollo_client30 from "@apollo/client";
1
+ import * as _apollo_client11 from "@apollo/client";
2
2
 
3
3
  //#region src/lib/gql/queries/order.d.ts
4
- declare const ORDER_FRAGMENT: _apollo_client30.DocumentNode;
5
- declare const GET_ORDER_QUERY: _apollo_client30.DocumentNode;
6
- declare const GET_ORDERS_QUERY: _apollo_client30.DocumentNode;
4
+ declare const ORDER_FRAGMENT: _apollo_client11.DocumentNode;
5
+ declare const GET_ORDER_QUERY: _apollo_client11.DocumentNode;
6
+ declare const GET_ORDERS_QUERY: _apollo_client11.DocumentNode;
7
7
  //#endregion
8
8
  export { GET_ORDERS_QUERY, GET_ORDER_QUERY, ORDER_FRAGMENT };
9
9
  //# sourceMappingURL=order.d.ts.map
@@ -1,7 +1,7 @@
1
- import * as _apollo_client29 from "@apollo/client";
1
+ import * as _apollo_client14 from "@apollo/client";
2
2
 
3
3
  //#region src/lib/gql/queries/product.d.ts
4
- declare const GET_PRODUCT_CATEGORIES_QUERY: _apollo_client29.DocumentNode;
4
+ declare const GET_PRODUCT_CATEGORIES_QUERY: _apollo_client14.DocumentNode;
5
5
  //#endregion
6
6
  export { GET_PRODUCT_CATEGORIES_QUERY };
7
7
  //# sourceMappingURL=product.d.ts.map
@@ -1,8 +1,8 @@
1
- import * as _apollo_client33 from "@apollo/client";
1
+ import * as _apollo_client15 from "@apollo/client";
2
2
 
3
3
  //#region src/lib/gql/queries/regions.d.ts
4
- declare const LIST_REGIONS_QUERY: _apollo_client33.DocumentNode;
5
- declare const GET_REGION_QUERY: _apollo_client33.DocumentNode;
4
+ declare const LIST_REGIONS_QUERY: _apollo_client15.DocumentNode;
5
+ declare const GET_REGION_QUERY: _apollo_client15.DocumentNode;
6
6
  //#endregion
7
7
  export { GET_REGION_QUERY, LIST_REGIONS_QUERY };
8
8
  //# sourceMappingURL=regions.d.ts.map
@@ -1,8 +1,8 @@
1
- import * as _apollo_client36 from "@apollo/client";
1
+ import * as _apollo_client5 from "@apollo/client";
2
2
 
3
3
  //#region src/lib/gql/queries/shipping.d.ts
4
- declare const SHIPPING_OPTION_FRAGMENT: _apollo_client36.DocumentNode;
5
- declare const GET_SHIPPING_OPTIONS_QUERY: _apollo_client36.DocumentNode;
4
+ declare const SHIPPING_OPTION_FRAGMENT: _apollo_client5.DocumentNode;
5
+ declare const GET_SHIPPING_OPTIONS_QUERY: _apollo_client5.DocumentNode;
6
6
  //#endregion
7
7
  export { GET_SHIPPING_OPTIONS_QUERY, SHIPPING_OPTION_FRAGMENT };
8
8
  //# sourceMappingURL=shipping.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shipping.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/shipping.ts"],"sourcesContent":[],"mappings":";;;cAEa,0BAgCZ,gBAAA,CAhCoC;cAkCxB,4BAOZ,gBAAA,CAPsC"}
1
+ {"version":3,"file":"shipping.d.ts","names":[],"sources":["../../../../src/lib/gql/queries/shipping.ts"],"sourcesContent":[],"mappings":";;;cAEa,0BAgCZ,eAAA,CAhCoC;cAkCxB,4BAOZ,eAAA,CAPsC"}
@@ -0,0 +1,15 @@
1
+ //#region src/lib/personalization/behavior-tracker.d.ts
2
+ interface SegmentData {
3
+ interest?: string;
4
+ history?: string[];
5
+ signals?: Record<string, unknown>;
6
+ }
7
+ declare function getSegmentCookie(): SegmentData;
8
+ declare function setSegmentCookie(data: SegmentData): void;
9
+ declare function emitSignal(type: string, payload?: unknown): void;
10
+ declare function getSignal(type: string): unknown;
11
+ declare function getAllSignals(): Record<string, unknown>;
12
+ declare function clearSignals(): void;
13
+ //#endregion
14
+ export { SegmentData, clearSignals, emitSignal, getAllSignals, getSegmentCookie, getSignal, setSegmentCookie };
15
+ //# sourceMappingURL=behavior-tracker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"behavior-tracker.d.ts","names":[],"sources":["../../../src/lib/personalization/behavior-tracker.ts"],"sourcesContent":[],"mappings":";UAEiB,WAAA;EAAA,QAAA,CAAA,EAAA,MAAW;EAcZ,OAAA,CAAA,EAAA,MAAA,EAAA;EAUA,OAAA,CAAA,EArBJ,MAqBI,CAAA,MAAgB,EAAA,OAAO,CAAA;AASvC;AASgB,iBA5BA,gBAAA,CAAA,CA4BS,EA5BW,WA4BX;AAKT,iBAvBA,gBAAA,CAuBuB,IAAA,EAvBA,WAuBA,CAAA,EAAA,IAAA;AAKvB,iBAnBA,UAAA,CAmBY,IAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAAA,OAAA,CAAA,EAAA,IAAA;iBAVZ,SAAA;iBAKA,aAAA,CAAA,GAAiB;iBAKjB,YAAA,CAAA"}
@@ -0,0 +1,47 @@
1
+ import Cookies from "js-cookie";
2
+
3
+ //#region src/lib/personalization/behavior-tracker.ts
4
+ const SIGNAL_COOKIE = "_jg_segment";
5
+ const cookieOptions = {
6
+ path: "/",
7
+ sameSite: "none",
8
+ secure: true,
9
+ domain: ".justgood.win"
10
+ };
11
+ function getSegmentCookie() {
12
+ const value = Cookies.get(SIGNAL_COOKIE);
13
+ if (!value) return {};
14
+ try {
15
+ return JSON.parse(decodeURIComponent(value));
16
+ } catch {
17
+ return {};
18
+ }
19
+ }
20
+ function setSegmentCookie(data) {
21
+ const expires = 7;
22
+ Cookies.set(SIGNAL_COOKIE, encodeURIComponent(JSON.stringify(data)), {
23
+ ...cookieOptions,
24
+ expires
25
+ });
26
+ }
27
+ function emitSignal(type, payload) {
28
+ const data = getSegmentCookie();
29
+ if (!data.signals) data.signals = {};
30
+ data.signals[type] = payload ?? true;
31
+ setSegmentCookie(data);
32
+ }
33
+ function getSignal(type) {
34
+ return getSegmentCookie().signals?.[type];
35
+ }
36
+ function getAllSignals() {
37
+ return getSegmentCookie().signals ?? {};
38
+ }
39
+ function clearSignals() {
40
+ const data = getSegmentCookie();
41
+ data.signals = {};
42
+ setSegmentCookie(data);
43
+ }
44
+
45
+ //#endregion
46
+ export { clearSignals, emitSignal, getAllSignals, getSegmentCookie, getSignal, setSegmentCookie };
47
+ //# sourceMappingURL=behavior-tracker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"behavior-tracker.js","names":["cookieOptions: Cookies.CookieAttributes"],"sources":["../../../src/lib/personalization/behavior-tracker.ts"],"sourcesContent":["import Cookies from 'js-cookie';\n\nexport interface SegmentData {\n interest?: string;\n history?: string[];\n signals?: Record<string, unknown>;\n}\n\nconst SIGNAL_COOKIE = '_jg_segment';\n\nconst isProd = process.env.NODE_ENV === 'production';\n\nconst cookieOptions: Cookies.CookieAttributes = isProd\n ? { path: '/', sameSite: 'none', secure: true, domain: '.justgood.win' }\n : { path: '/', sameSite: 'lax' };\n\nexport function getSegmentCookie(): SegmentData {\n const value = Cookies.get(SIGNAL_COOKIE);\n if (!value) return {};\n try {\n return JSON.parse(decodeURIComponent(value));\n } catch {\n return {};\n }\n}\n\nexport function setSegmentCookie(data: SegmentData) {\n const expires = 7;\n Cookies.set(\n SIGNAL_COOKIE,\n encodeURIComponent(JSON.stringify(data)),\n { ...cookieOptions, expires }\n );\n}\n\nexport function emitSignal(type: string, payload?: unknown) {\n const data = getSegmentCookie();\n if (!data.signals) {\n data.signals = {};\n }\n data.signals[type] = payload ?? true;\n setSegmentCookie(data);\n}\n\nexport function getSignal(type: string): unknown {\n const data = getSegmentCookie();\n return data.signals?.[type];\n}\n\nexport function getAllSignals(): Record<string, unknown> {\n const data = getSegmentCookie();\n return data.signals ?? {};\n}\n\nexport function clearSignals() {\n const data = getSegmentCookie();\n data.signals = {};\n setSegmentCookie(data);\n}"],"mappings":";;;AAQA,MAAM,gBAAgB;AAItB,MAAMA,gBACF;CAAE,MAAM;CAAK,UAAU;CAAQ,QAAQ;CAAM,QAAQ;CAAiB;AAG1E,SAAgB,mBAAgC;CAC9C,MAAM,QAAQ,QAAQ,IAAI,cAAc;AACxC,KAAI,CAAC,MAAO,QAAO,EAAE;AACrB,KAAI;AACF,SAAO,KAAK,MAAM,mBAAmB,MAAM,CAAC;SACtC;AACN,SAAO,EAAE;;;AAIb,SAAgB,iBAAiB,MAAmB;CAClD,MAAM,UAAU;AAChB,SAAQ,IACN,eACA,mBAAmB,KAAK,UAAU,KAAK,CAAC,EACxC;EAAE,GAAG;EAAe;EAAS,CAC9B;;AAGH,SAAgB,WAAW,MAAc,SAAmB;CAC1D,MAAM,OAAO,kBAAkB;AAC/B,KAAI,CAAC,KAAK,QACR,MAAK,UAAU,EAAE;AAEnB,MAAK,QAAQ,QAAQ,WAAW;AAChC,kBAAiB,KAAK;;AAGxB,SAAgB,UAAU,MAAuB;AAE/C,QADa,kBAAkB,CACnB,UAAU;;AAGxB,SAAgB,gBAAyC;AAEvD,QADa,kBAAkB,CACnB,WAAW,EAAE;;AAG3B,SAAgB,eAAe;CAC7B,MAAM,OAAO,kBAAkB;AAC/B,MAAK,UAAU,EAAE;AACjB,kBAAiB,KAAK"}
@@ -0,0 +1,31 @@
1
+ //#region src/lib/personalization/config.d.ts
2
+ interface SegmentDefinition {
3
+ id: string;
4
+ label: string;
5
+ categoryHandles: string[];
6
+ collectionHandles: string[];
7
+ }
8
+ interface SignalDefinition {
9
+ id: string;
10
+ description: string;
11
+ bannerTrigger: string;
12
+ }
13
+ interface PersonalizationConfig {
14
+ segments: SegmentDefinition[];
15
+ signals: SignalDefinition[];
16
+ dismissCooldownMs: number;
17
+ bannerAutoDismissMs: number;
18
+ historyMaxLength: number;
19
+ priceThresholdUsd: number;
20
+ pdpHesitationMs: number;
21
+ highScrollThreshold: number;
22
+ }
23
+ declare const PERSONALIZATION_CONFIG: PersonalizationConfig;
24
+ declare function getSegmentIdFromCategory(categoryHandle: string): string | null;
25
+ declare function getSegmentIdFromCollection(collectionHandle: string | undefined): string | null;
26
+ declare function getAllSegmentIds(): string[];
27
+ declare function getSignalDefinition(signalId: string): SignalDefinition | undefined;
28
+ declare function getAllSignalIds(): string[];
29
+ //#endregion
30
+ export { PERSONALIZATION_CONFIG, PersonalizationConfig, SegmentDefinition, SignalDefinition, getAllSegmentIds, getAllSignalIds, getSegmentIdFromCategory, getSegmentIdFromCollection, getSignalDefinition };
31
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","names":[],"sources":["../../../src/lib/personalization/config.ts"],"sourcesContent":[],"mappings":";UAAiB,iBAAA;EAAA,EAAA,EAAA,MAAA;EAOA,KAAA,EAAA,MAAA;EAMA,eAAA,EAAA,MAAA,EAAqB;EAWzB,iBAAA,EAAA,MAiCZ,EAAA;AAED;AAUgB,UA9DC,gBAAA,CA8DyB;EAW1B,EAAA,EAAA,MAAA;EAIA,WAAA,EAAA,MAAA;EAIA,aAAA,EAAA,MAAe;;UA3Ed,qBAAA;YACL;WACD;;;;;;;;cASE,wBAAwB;iBAmCrB,wBAAA;iBAUA,0BAAA;iBAWA,gBAAA,CAAA;iBAIA,mBAAA,oBAAuC;iBAIvC,eAAA,CAAA"}
@@ -0,0 +1,77 @@
1
+ //#region src/lib/personalization/config.ts
2
+ const PERSONALIZATION_CONFIG = {
3
+ segments: [{
4
+ id: "mens",
5
+ label: "Men's",
6
+ categoryHandles: [
7
+ "mens",
8
+ "men",
9
+ "mens-collection",
10
+ "menswear",
11
+ "menstwo"
12
+ ],
13
+ collectionHandles: [
14
+ "mens",
15
+ "men",
16
+ "mens-collection",
17
+ "menswear",
18
+ "menstwo"
19
+ ]
20
+ }, {
21
+ id: "womens",
22
+ label: "Women's",
23
+ categoryHandles: [
24
+ "womens",
25
+ "women",
26
+ "womens-collection",
27
+ "womenswear",
28
+ "womenstwo"
29
+ ],
30
+ collectionHandles: [
31
+ "womens",
32
+ "women",
33
+ "womens-collection",
34
+ "womenswear",
35
+ "womenstwo"
36
+ ]
37
+ }],
38
+ signals: [{
39
+ id: "pdp-hesitation",
40
+ description: "User on PDP > 30s with expensive product",
41
+ bannerTrigger: "pdp-hesitation"
42
+ }, {
43
+ id: "high-scroll-no-action",
44
+ description: "User scrolled 80% without adding to cart",
45
+ bannerTrigger: "high-scroll-no-action"
46
+ }],
47
+ dismissCooldownMs: 3600 * 1e3,
48
+ bannerAutoDismissMs: 3e4,
49
+ historyMaxLength: 20,
50
+ priceThresholdUsd: 200,
51
+ pdpHesitationMs: 3e4,
52
+ highScrollThreshold: .8
53
+ };
54
+ function getSegmentIdFromCategory(categoryHandle) {
55
+ const normalized = categoryHandle.toLowerCase().replace(/[-_\s]/g, "");
56
+ for (const segment of PERSONALIZATION_CONFIG.segments) if (segment.categoryHandles.includes(normalized)) return segment.id;
57
+ return null;
58
+ }
59
+ function getSegmentIdFromCollection(collectionHandle) {
60
+ if (!collectionHandle) return null;
61
+ const normalized = collectionHandle.toLowerCase().replace(/[-_\s]/g, "");
62
+ for (const segment of PERSONALIZATION_CONFIG.segments) if (segment.collectionHandles.includes(normalized)) return segment.id;
63
+ return null;
64
+ }
65
+ function getAllSegmentIds() {
66
+ return PERSONALIZATION_CONFIG.segments.map((s) => s.id);
67
+ }
68
+ function getSignalDefinition(signalId) {
69
+ return PERSONALIZATION_CONFIG.signals.find((s) => s.id === signalId);
70
+ }
71
+ function getAllSignalIds() {
72
+ return PERSONALIZATION_CONFIG.signals.map((s) => s.id);
73
+ }
74
+
75
+ //#endregion
76
+ export { PERSONALIZATION_CONFIG, getAllSegmentIds, getAllSignalIds, getSegmentIdFromCategory, getSegmentIdFromCollection, getSignalDefinition };
77
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","names":["PERSONALIZATION_CONFIG: PersonalizationConfig"],"sources":["../../../src/lib/personalization/config.ts"],"sourcesContent":["export interface SegmentDefinition {\n id: string;\n label: string;\n categoryHandles: string[];\n collectionHandles: string[];\n}\n\nexport interface SignalDefinition {\n id: string;\n description: string;\n bannerTrigger: string;\n}\n\nexport interface PersonalizationConfig {\n segments: SegmentDefinition[];\n signals: SignalDefinition[];\n dismissCooldownMs: number;\n bannerAutoDismissMs: number;\n historyMaxLength: number;\n priceThresholdUsd: number;\n pdpHesitationMs: number;\n highScrollThreshold: number;\n}\n\nexport const PERSONALIZATION_CONFIG: PersonalizationConfig = {\n segments: [\n {\n id: 'mens',\n label: \"Men's\",\n categoryHandles: ['mens', 'men', 'mens-collection', 'menswear', 'menstwo'],\n collectionHandles: ['mens', 'men', 'mens-collection', 'menswear', 'menstwo'],\n },\n {\n id: 'womens',\n label: \"Women's\",\n categoryHandles: ['womens', 'women', 'womens-collection', 'womenswear', 'womenstwo'],\n collectionHandles: ['womens', 'women', 'womens-collection', 'womenswear', 'womenstwo'],\n },\n ],\n signals: [\n {\n id: 'pdp-hesitation',\n description: 'User on PDP > 30s with expensive product',\n bannerTrigger: 'pdp-hesitation',\n },\n {\n id: 'high-scroll-no-action',\n description: 'User scrolled 80% without adding to cart',\n bannerTrigger: 'high-scroll-no-action',\n },\n ],\n dismissCooldownMs: 60 * 60 * 1000,\n bannerAutoDismissMs: 30_000,\n historyMaxLength: 20,\n priceThresholdUsd: 200,\n pdpHesitationMs: 30_000,\n highScrollThreshold: 0.8,\n};\n\nexport function getSegmentIdFromCategory(categoryHandle: string): string | null {\n const normalized = categoryHandle.toLowerCase().replace(/[-_\\s]/g, '');\n for (const segment of PERSONALIZATION_CONFIG.segments) {\n if (segment.categoryHandles.includes(normalized)) {\n return segment.id;\n }\n }\n return null;\n}\n\nexport function getSegmentIdFromCollection(collectionHandle: string | undefined): string | null {\n if (!collectionHandle) return null;\n const normalized = collectionHandle.toLowerCase().replace(/[-_\\s]/g, '');\n for (const segment of PERSONALIZATION_CONFIG.segments) {\n if (segment.collectionHandles.includes(normalized)) {\n return segment.id;\n }\n }\n return null;\n}\n\nexport function getAllSegmentIds(): string[] {\n return PERSONALIZATION_CONFIG.segments.map((s) => s.id);\n}\n\nexport function getSignalDefinition(signalId: string): SignalDefinition | undefined {\n return PERSONALIZATION_CONFIG.signals.find((s) => s.id === signalId);\n}\n\nexport function getAllSignalIds(): string[] {\n return PERSONALIZATION_CONFIG.signals.map((s) => s.id);\n}"],"mappings":";AAwBA,MAAaA,yBAAgD;CAC3D,UAAU,CACR;EACE,IAAI;EACJ,OAAO;EACP,iBAAiB;GAAC;GAAQ;GAAO;GAAmB;GAAY;GAAU;EAC1E,mBAAmB;GAAC;GAAQ;GAAO;GAAmB;GAAY;GAAU;EAC7E,EACD;EACE,IAAI;EACJ,OAAO;EACP,iBAAiB;GAAC;GAAU;GAAS;GAAqB;GAAc;GAAY;EACpF,mBAAmB;GAAC;GAAU;GAAS;GAAqB;GAAc;GAAY;EACvF,CACF;CACD,SAAS,CACP;EACE,IAAI;EACJ,aAAa;EACb,eAAe;EAChB,EACD;EACE,IAAI;EACJ,aAAa;EACb,eAAe;EAChB,CACF;CACD,mBAAmB,OAAU;CAC7B,qBAAqB;CACrB,kBAAkB;CAClB,mBAAmB;CACnB,iBAAiB;CACjB,qBAAqB;CACtB;AAED,SAAgB,yBAAyB,gBAAuC;CAC9E,MAAM,aAAa,eAAe,aAAa,CAAC,QAAQ,WAAW,GAAG;AACtE,MAAK,MAAM,WAAW,uBAAuB,SAC3C,KAAI,QAAQ,gBAAgB,SAAS,WAAW,CAC9C,QAAO,QAAQ;AAGnB,QAAO;;AAGT,SAAgB,2BAA2B,kBAAqD;AAC9F,KAAI,CAAC,iBAAkB,QAAO;CAC9B,MAAM,aAAa,iBAAiB,aAAa,CAAC,QAAQ,WAAW,GAAG;AACxE,MAAK,MAAM,WAAW,uBAAuB,SAC3C,KAAI,QAAQ,kBAAkB,SAAS,WAAW,CAChD,QAAO,QAAQ;AAGnB,QAAO;;AAGT,SAAgB,mBAA6B;AAC3C,QAAO,uBAAuB,SAAS,KAAK,MAAM,EAAE,GAAG;;AAGzD,SAAgB,oBAAoB,UAAgD;AAClF,QAAO,uBAAuB,QAAQ,MAAM,MAAM,EAAE,OAAO,SAAS;;AAGtE,SAAgB,kBAA4B;AAC1C,QAAO,uBAAuB,QAAQ,KAAK,MAAM,EAAE,GAAG"}
@@ -0,0 +1,15 @@
1
+ //#region src/lib/personalization/user-profile.d.ts
2
+ interface UserProfile {
3
+ interest: string;
4
+ primaryInterest: string;
5
+ confidence: number;
6
+ history: string[];
7
+ signals: Record<string, unknown>;
8
+ lastUpdated: number;
9
+ }
10
+ declare function getUserProfile(): UserProfile;
11
+ declare function updateUserProfile(updates: Partial<UserProfile>): void;
12
+ declare function addToHistory(category: string): void;
13
+ //#endregion
14
+ export { UserProfile, addToHistory, getUserProfile, updateUserProfile };
15
+ //# sourceMappingURL=user-profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-profile.d.ts","names":[],"sources":["../../../src/lib/personalization/user-profile.ts"],"sourcesContent":[],"mappings":";UAEiB,WAAA;EAAA,QAAA,EAAA,MAAW;EAkCZ,eAAA,EAAc,MAAA;EAad,UAAA,EAAA,MAAA;EAQA,OAAA,EAAA,MAAY,EAAA;WAlDjB;;;iBA6BK,cAAA,CAAA,GAAkB;iBAalB,iBAAA,UAA2B,QAAQ;iBAQnC,YAAA"}
@@ -0,0 +1,47 @@
1
+ //#region src/lib/personalization/user-profile.ts
2
+ const PROFILE_KEY = "jg_user_profile";
3
+ function defaultProfile() {
4
+ return {
5
+ interest: "",
6
+ primaryInterest: "",
7
+ confidence: 0,
8
+ history: [],
9
+ signals: {},
10
+ lastUpdated: Date.now()
11
+ };
12
+ }
13
+ function isValidUserProfile(value) {
14
+ if (typeof value !== "object" || value === null) return false;
15
+ const obj = value;
16
+ return typeof obj.interest === "string" && typeof obj.primaryInterest === "string" && typeof obj.confidence === "number" && Array.isArray(obj.history) && obj.history.every((h) => typeof h === "string") && typeof obj.signals === "object" && typeof obj.lastUpdated === "number";
17
+ }
18
+ function getUserProfile() {
19
+ if (typeof window === "undefined") return defaultProfile();
20
+ try {
21
+ const stored = localStorage.getItem(PROFILE_KEY);
22
+ if (!stored) return defaultProfile();
23
+ const parsed = JSON.parse(stored);
24
+ return isValidUserProfile(parsed) ? parsed : defaultProfile();
25
+ } catch {
26
+ return defaultProfile();
27
+ }
28
+ }
29
+ function updateUserProfile(updates) {
30
+ if (typeof window === "undefined") return;
31
+ const updated = {
32
+ ...getUserProfile(),
33
+ ...updates,
34
+ lastUpdated: Date.now()
35
+ };
36
+ localStorage.setItem(PROFILE_KEY, JSON.stringify(updated));
37
+ }
38
+ function addToHistory(category) {
39
+ const profile = getUserProfile();
40
+ const normalizedCategory = String(category).trim();
41
+ if (!normalizedCategory) return;
42
+ updateUserProfile({ history: [...profile.history || [], normalizedCategory].slice(-20) });
43
+ }
44
+
45
+ //#endregion
46
+ export { addToHistory, getUserProfile, updateUserProfile };
47
+ //# sourceMappingURL=user-profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-profile.js","names":[],"sources":["../../../src/lib/personalization/user-profile.ts"],"sourcesContent":["const PROFILE_KEY = 'jg_user_profile';\n\nexport interface UserProfile {\n interest: string;\n primaryInterest: string;\n confidence: number;\n history: string[];\n signals: Record<string, unknown>;\n lastUpdated: number;\n}\n\nfunction defaultProfile(): UserProfile {\n return {\n interest: '',\n primaryInterest: '',\n confidence: 0,\n history: [],\n signals: {},\n lastUpdated: Date.now(),\n };\n}\n\nfunction isValidUserProfile(value: unknown): value is UserProfile {\n if (typeof value !== 'object' || value === null) return false;\n const obj = value as Record<string, unknown>;\n return (\n typeof obj.interest === 'string' &&\n typeof obj.primaryInterest === 'string' &&\n typeof obj.confidence === 'number' &&\n Array.isArray(obj.history) &&\n obj.history.every((h) => typeof h === 'string') &&\n typeof obj.signals === 'object' &&\n typeof obj.lastUpdated === 'number'\n );\n}\n\nexport function getUserProfile(): UserProfile {\n if (typeof window === 'undefined') return defaultProfile();\n\n try {\n const stored = localStorage.getItem(PROFILE_KEY);\n if (!stored) return defaultProfile();\n const parsed = JSON.parse(stored);\n return isValidUserProfile(parsed) ? parsed : defaultProfile();\n } catch {\n return defaultProfile();\n }\n}\n\nexport function updateUserProfile(updates: Partial<UserProfile>): void {\n if (typeof window === 'undefined') return;\n\n const profile = getUserProfile();\n const updated = { ...profile, ...updates, lastUpdated: Date.now() };\n localStorage.setItem(PROFILE_KEY, JSON.stringify(updated));\n}\n\nexport function addToHistory(category: string): void {\n const profile = getUserProfile();\n const normalizedCategory = String(category).trim();\n if (!normalizedCategory) return;\n const history = [...(profile.history || []), normalizedCategory].slice(-20);\n updateUserProfile({ history });\n}\n"],"mappings":";AAAA,MAAM,cAAc;AAWpB,SAAS,iBAA8B;AACrC,QAAO;EACL,UAAU;EACV,iBAAiB;EACjB,YAAY;EACZ,SAAS,EAAE;EACX,SAAS,EAAE;EACX,aAAa,KAAK,KAAK;EACxB;;AAGH,SAAS,mBAAmB,OAAsC;AAChE,KAAI,OAAO,UAAU,YAAY,UAAU,KAAM,QAAO;CACxD,MAAM,MAAM;AACZ,QACE,OAAO,IAAI,aAAa,YACxB,OAAO,IAAI,oBAAoB,YAC/B,OAAO,IAAI,eAAe,YAC1B,MAAM,QAAQ,IAAI,QAAQ,IAC1B,IAAI,QAAQ,OAAO,MAAM,OAAO,MAAM,SAAS,IAC/C,OAAO,IAAI,YAAY,YACvB,OAAO,IAAI,gBAAgB;;AAI/B,SAAgB,iBAA8B;AAC5C,KAAI,OAAO,WAAW,YAAa,QAAO,gBAAgB;AAE1D,KAAI;EACF,MAAM,SAAS,aAAa,QAAQ,YAAY;AAChD,MAAI,CAAC,OAAQ,QAAO,gBAAgB;EACpC,MAAM,SAAS,KAAK,MAAM,OAAO;AACjC,SAAO,mBAAmB,OAAO,GAAG,SAAS,gBAAgB;SACvD;AACN,SAAO,gBAAgB;;;AAI3B,SAAgB,kBAAkB,SAAqC;AACrE,KAAI,OAAO,WAAW,YAAa;CAGnC,MAAM,UAAU;EAAE,GADF,gBAAgB;EACF,GAAG;EAAS,aAAa,KAAK,KAAK;EAAE;AACnE,cAAa,QAAQ,aAAa,KAAK,UAAU,QAAQ,CAAC;;AAG5D,SAAgB,aAAa,UAAwB;CACnD,MAAM,UAAU,gBAAgB;CAChC,MAAM,qBAAqB,OAAO,SAAS,CAAC,MAAM;AAClD,KAAI,CAAC,mBAAoB;AAEzB,mBAAkB,EAAE,SADJ,CAAC,GAAI,QAAQ,WAAW,EAAE,EAAG,mBAAmB,CAAC,MAAM,IAAI,EAC9C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gfed-medusa/sf-lib-common",
3
- "version": "3.6.0",
3
+ "version": "3.7.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -47,6 +47,7 @@
47
47
  "@medusajs/ui": "^4.0.29",
48
48
  "class-variance-authority": "^0.7.1",
49
49
  "isomorphic-dompurify": "^2.34.0",
50
+ "js-cookie": "^3.0.5",
50
51
  "lucide-react": "^0.556.0",
51
52
  "react-country-flag": "^3.1.0",
52
53
  "server-only": "^0.0.1",
@@ -62,6 +63,7 @@
62
63
  "@testing-library/jest-dom": "6.8.0",
63
64
  "@testing-library/react": "^16.3.0",
64
65
  "@types/jest": "^29.5.2",
66
+ "@types/js-cookie": "^3.0.6",
65
67
  "@types/node": "^20",
66
68
  "@types/react": "^19",
67
69
  "@types/react-dom": "^19",
@@ -73,10 +75,10 @@
73
75
  "madge": "^8.0.0",
74
76
  "tsdown": "^0.17.3",
75
77
  "typescript": "^5",
76
- "@packages/eslint-config": "0.0.0",
77
78
  "@packages/jest-config": "0.0.0",
78
- "@packages/typescript-config": "0.0.0",
79
- "@packages/prettier-config": "0.0.0"
79
+ "@packages/prettier-config": "0.0.0",
80
+ "@packages/eslint-config": "0.0.0",
81
+ "@packages/typescript-config": "0.0.0"
80
82
  },
81
83
  "peerDependencies": {
82
84
  "@medusajs/ui": "^4.0.29",