@burdenoff/microfe-coolandlovely 2026.1101.8 → 2026.1102.2

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 (108) hide show
  1. package/README.md +15 -0
  2. package/dist/coolandlovely/CoolAndLovelyRoot.d.ts.map +1 -1
  3. package/dist/coolandlovely/CoolAndLovelyRoot.js +8 -0
  4. package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
  5. package/dist/coolandlovely/CoolAndLovelyRoutes.d.ts.map +1 -1
  6. package/dist/coolandlovely/CoolAndLovelyRoutes.js +20 -16
  7. package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
  8. package/dist/coolandlovely/components/WardrobeItemCard.d.ts +2 -1
  9. package/dist/coolandlovely/components/WardrobeItemCard.d.ts.map +1 -1
  10. package/dist/coolandlovely/components/WardrobeItemCard.js +4 -3
  11. package/dist/coolandlovely/components/WardrobeItemCard.js.map +1 -1
  12. package/dist/coolandlovely/components/prices/BestPriceBadge.d.ts +7 -0
  13. package/dist/coolandlovely/components/prices/BestPriceBadge.d.ts.map +1 -0
  14. package/dist/coolandlovely/components/prices/BestPriceBadge.js +22 -0
  15. package/dist/coolandlovely/components/prices/BestPriceBadge.js.map +1 -0
  16. package/dist/coolandlovely/components/prices/LookbookPriceBoard.d.ts +10 -0
  17. package/dist/coolandlovely/components/prices/LookbookPriceBoard.d.ts.map +1 -0
  18. package/dist/coolandlovely/components/prices/LookbookPriceBoard.js +120 -0
  19. package/dist/coolandlovely/components/prices/LookbookPriceBoard.js.map +1 -0
  20. package/dist/coolandlovely/components/prices/PriceComparison.d.ts +5 -0
  21. package/dist/coolandlovely/components/prices/PriceComparison.d.ts.map +1 -0
  22. package/dist/coolandlovely/components/prices/PriceComparison.js +95 -0
  23. package/dist/coolandlovely/components/prices/PriceComparison.js.map +1 -0
  24. package/dist/coolandlovely/components/prices/PriceCurrencySelect.d.ts +6 -0
  25. package/dist/coolandlovely/components/prices/PriceCurrencySelect.d.ts.map +1 -0
  26. package/dist/coolandlovely/components/prices/PriceCurrencySelect.js +38 -0
  27. package/dist/coolandlovely/components/prices/PriceCurrencySelect.js.map +1 -0
  28. package/dist/coolandlovely/components/prices/PricePanel.d.ts +6 -0
  29. package/dist/coolandlovely/components/prices/PricePanel.d.ts.map +1 -0
  30. package/dist/coolandlovely/components/prices/PricePanel.js +105 -0
  31. package/dist/coolandlovely/components/prices/PricePanel.js.map +1 -0
  32. package/dist/coolandlovely/components/prices/PriceWatchDisclosure.d.ts +2 -0
  33. package/dist/coolandlovely/components/prices/PriceWatchDisclosure.d.ts.map +1 -0
  34. package/dist/coolandlovely/components/prices/PriceWatchDisclosure.js +28 -0
  35. package/dist/coolandlovely/components/prices/PriceWatchDisclosure.js.map +1 -0
  36. package/dist/coolandlovely/components/prices/PriceWatchForm.d.ts +5 -0
  37. package/dist/coolandlovely/components/prices/PriceWatchForm.d.ts.map +1 -0
  38. package/dist/coolandlovely/components/prices/PriceWatchForm.js +89 -0
  39. package/dist/coolandlovely/components/prices/PriceWatchForm.js.map +1 -0
  40. package/dist/coolandlovely/components/prices/PriceWatches.d.ts +3 -0
  41. package/dist/coolandlovely/components/prices/PriceWatches.d.ts.map +1 -0
  42. package/dist/coolandlovely/components/prices/PriceWatches.js +189 -0
  43. package/dist/coolandlovely/components/prices/PriceWatches.js.map +1 -0
  44. package/dist/coolandlovely/components/prices/RetailerOfferLink.d.ts +6 -0
  45. package/dist/coolandlovely/components/prices/RetailerOfferLink.d.ts.map +1 -0
  46. package/dist/coolandlovely/components/prices/RetailerOfferLink.js +28 -0
  47. package/dist/coolandlovely/components/prices/RetailerOfferLink.js.map +1 -0
  48. package/dist/coolandlovely/components/prices/money.d.ts +6 -0
  49. package/dist/coolandlovely/components/prices/money.d.ts.map +1 -0
  50. package/dist/coolandlovely/components/prices/money.js +42 -0
  51. package/dist/coolandlovely/components/prices/money.js.map +1 -0
  52. package/dist/coolandlovely/hooks/useContextNavigation.d.ts +3 -0
  53. package/dist/coolandlovely/hooks/useContextNavigation.d.ts.map +1 -0
  54. package/dist/coolandlovely/hooks/useContextNavigation.js +31 -0
  55. package/dist/coolandlovely/hooks/useContextNavigation.js.map +1 -0
  56. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts.map +1 -1
  57. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +1 -1
  58. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
  59. package/dist/coolandlovely/hooks/useCreatorMarketplace.d.ts +118 -0
  60. package/dist/coolandlovely/hooks/useCreatorMarketplace.d.ts.map +1 -0
  61. package/dist/coolandlovely/hooks/useCreatorMarketplace.js +120 -0
  62. package/dist/coolandlovely/hooks/useCreatorMarketplace.js.map +1 -0
  63. package/dist/coolandlovely/hooks/usePriceApi.d.ts +57 -0
  64. package/dist/coolandlovely/hooks/usePriceApi.d.ts.map +1 -0
  65. package/dist/coolandlovely/hooks/usePriceApi.js +111 -0
  66. package/dist/coolandlovely/hooks/usePriceApi.js.map +1 -0
  67. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.d.ts.map +1 -1
  68. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +139 -121
  69. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -1
  70. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.d.ts.map +1 -1
  71. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +140 -137
  72. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js.map +1 -1
  73. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.d.ts.map +1 -1
  74. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js +104 -95
  75. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js.map +1 -1
  76. package/dist/coolandlovely/pages/commerce/CreatorEarningsPage.d.ts.map +1 -1
  77. package/dist/coolandlovely/pages/commerce/CreatorEarningsPage.js +49 -40
  78. package/dist/coolandlovely/pages/commerce/CreatorEarningsPage.js.map +1 -1
  79. package/dist/coolandlovely/pages/items/StoreListedPieceView.d.ts.map +1 -1
  80. package/dist/coolandlovely/pages/items/StoreListedPieceView.js +130 -123
  81. package/dist/coolandlovely/pages/items/StoreListedPieceView.js.map +1 -1
  82. package/dist/coolandlovely/pages/items/StyleItemDetailPage.d.ts.map +1 -1
  83. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +241 -230
  84. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -1
  85. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.d.ts.map +1 -1
  86. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +64 -119
  87. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -1
  88. package/dist/coolandlovely/pages/marketplace/CreatorMarketplacePage.d.ts +2 -0
  89. package/dist/coolandlovely/pages/marketplace/CreatorMarketplacePage.d.ts.map +1 -0
  90. package/dist/coolandlovely/pages/marketplace/CreatorMarketplacePage.js +714 -0
  91. package/dist/coolandlovely/pages/marketplace/CreatorMarketplacePage.js.map +1 -0
  92. package/dist/coolandlovely/pages/profile/StyleProfilePage.d.ts.map +1 -1
  93. package/dist/coolandlovely/pages/profile/StyleProfilePage.js +214 -209
  94. package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -1
  95. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.d.ts.map +1 -1
  96. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +83 -49
  97. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -1
  98. package/dist/coolandlovely/types/index.d.ts +5 -0
  99. package/dist/coolandlovely/types/index.d.ts.map +1 -1
  100. package/dist/generated/wspace-operations.d.ts +931 -2
  101. package/dist/generated/wspace-operations.d.ts.map +1 -1
  102. package/dist/generated/wspace-operations.js +221 -1
  103. package/dist/generated/wspace-operations.js.map +1 -1
  104. package/dist/generated/wspace-types.d.ts +539 -1
  105. package/dist/generated/wspace-types.d.ts.map +1 -1
  106. package/dist/generated/wspace-types.js +14 -0
  107. package/dist/generated/wspace-types.js.map +1 -0
  108. package/package.json +4 -3
@@ -12,115 +12,116 @@ import { TagList as f } from "../../components/TagList.js";
12
12
  import { ColourSwatchRow as p } from "../../components/ColourSwatchRow.js";
13
13
  import { useBuyStoreListedPiece as m, useStoreListedPiece as h, useSyncOrderPayment as g } from "../../hooks/useCommerceApi.js";
14
14
  import { PayForOrder as _ } from "../../components/PayForOrder.js";
15
- import { useState as v } from "react";
16
- import { ArrowLeft as y, Loader2 as b, ShoppingBag as x, Store as S } from "lucide-react";
17
- import { jsx as C, jsxs as w } from "react/jsx-runtime";
18
- import { GlassCard as T } from "@burdenoff/fe-libs/ui";
15
+ import { PricePanel as v } from "../../components/prices/PricePanel.js";
16
+ import { useState as y } from "react";
17
+ import { ArrowLeft as b, Loader2 as x, ShoppingBag as S, Store as C } from "lucide-react";
18
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
19
+ import { GlassCard as E } from "@burdenoff/fe-libs/ui";
19
20
  //#region src/coolandlovely/pages/items/StoreListedPieceView.tsx
20
- var E = 10, D = 5, O = (e) => t("inline-flex min-w-9 items-center justify-center rounded-full border px-3 py-1 text-sm font-medium transition-colors disabled:opacity-40 disabled:line-through", e ? "border-action-primary-bg bg-action-primary-bg text-action-primary-text" : "border-border-seam text-text-primary hover:bg-bg-sunken"), k = "inline-flex w-full items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2.5 text-sm font-semibold text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-50";
21
- function A(e, t, n) {
21
+ var D = 10, O = 5, k = (e) => t("inline-flex min-w-9 items-center justify-center rounded-full border px-3 py-1 text-sm font-medium transition-colors disabled:opacity-40 disabled:line-through", e ? "border-action-primary-bg bg-action-primary-bg text-action-primary-text" : "border-border-seam text-text-primary hover:bg-bg-sunken"), A = "inline-flex w-full items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2.5 text-sm font-semibold text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-50";
22
+ function j(e, t, n) {
22
23
  return e.trackInventory ? e.variants.filter((e) => (t === null || (e.size ?? "") === t) && (n === null || (e.colour ?? "") === n)).reduce((e, t) => e + t.available, 0) : null;
23
24
  }
24
- var j = ({ piece: e, onCheckout: n }) => {
25
- let i = r(), a = m(), [o, c] = v(e.sizes.length === 1 ? e.sizes[0] ?? null : null), [l, f] = v(e.colours.length === 1 ? e.colours[0] ?? null : null), [p, h] = v(1), [g, _] = v(""), [y, S] = v(""), [T, j] = v("");
26
- if (!e.inStock) return /* @__PURE__ */ C("p", {
25
+ var M = ({ piece: e, onCheckout: n }) => {
26
+ let i = r(), a = m(), [o, c] = y(e.sizes.length === 1 ? e.sizes[0] ?? null : null), [l, f] = y(e.colours.length === 1 ? e.colours[0] ?? null : null), [p, h] = y(1), [g, _] = y(""), [v, b] = y(""), [C, E] = y("");
27
+ if (!e.inStock) return /* @__PURE__ */ w("p", {
27
28
  className: "rounded-lg border border-border-seam bg-bg-sunken p-3 text-sm text-text-secondary",
28
29
  children: i("coolandlovely.storePiece.soldOut", "This piece is sold out right now.")
29
30
  });
30
- let M = e.sizes.length > 0 && !o, N = e.colours.length > 0 && !l, P = M || N ? null : A(e, o ?? "", l ?? ""), F = P !== null && P <= 0, I = P === null ? E : Math.max(1, Math.min(E, P)), L = !M && !N && !F && g.trim() !== "" && y.trim() !== "";
31
- return /* @__PURE__ */ w("div", {
31
+ let M = e.sizes.length > 0 && !o, N = e.colours.length > 0 && !l, P = M || N ? null : j(e, o ?? "", l ?? ""), F = P !== null && P <= 0, I = P === null ? D : Math.max(1, Math.min(D, P)), L = !M && !N && !F && g.trim() !== "" && v.trim() !== "";
32
+ return /* @__PURE__ */ T("div", {
32
33
  className: "space-y-4",
33
34
  "data-testid": "store-buy-panel",
34
35
  children: [
35
- e.sizes.length > 0 && /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
36
+ e.sizes.length > 0 && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
36
37
  className: "mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary",
37
38
  children: i("coolandlovely.cart.chooseSize", "Choose a size")
38
- }), /* @__PURE__ */ C("div", {
39
+ }), /* @__PURE__ */ w("div", {
39
40
  className: "flex flex-wrap gap-2",
40
- children: e.sizes.map((t) => /* @__PURE__ */ C("button", {
41
+ children: e.sizes.map((t) => /* @__PURE__ */ w("button", {
41
42
  type: "button",
42
43
  "aria-pressed": o === t,
43
- disabled: A(e, t, l) === 0,
44
+ disabled: j(e, t, l) === 0,
44
45
  onClick: () => {
45
46
  c(t), h(1);
46
47
  },
47
- className: O(o === t),
48
+ className: k(o === t),
48
49
  children: t
49
50
  }, t))
50
51
  })] }),
51
- e.colours.length > 0 && /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
52
+ e.colours.length > 0 && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
52
53
  className: "mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary",
53
54
  children: i("coolandlovely.cart.chooseColour", "Choose a colour")
54
- }), /* @__PURE__ */ C("div", {
55
+ }), /* @__PURE__ */ w("div", {
55
56
  className: "flex flex-wrap gap-2",
56
- children: e.colours.map((t) => /* @__PURE__ */ C("button", {
57
+ children: e.colours.map((t) => /* @__PURE__ */ w("button", {
57
58
  type: "button",
58
59
  "aria-pressed": l === t,
59
- disabled: A(e, o, t) === 0,
60
+ disabled: j(e, o, t) === 0,
60
61
  onClick: () => {
61
62
  f(t), h(1);
62
63
  },
63
- className: O(l === t),
64
+ className: k(l === t),
64
65
  children: t
65
66
  }, t))
66
67
  })] }),
67
- /* @__PURE__ */ w("div", {
68
+ /* @__PURE__ */ T("div", {
68
69
  className: "flex items-center gap-3",
69
- children: [/* @__PURE__ */ C("label", {
70
+ children: [/* @__PURE__ */ w("label", {
70
71
  htmlFor: "coo-store-quantity",
71
72
  className: "text-sm text-text-secondary",
72
73
  children: i("coolandlovely.cart.quantity", "Quantity")
73
- }), /* @__PURE__ */ C("select", {
74
+ }), /* @__PURE__ */ w("select", {
74
75
  id: "coo-store-quantity",
75
76
  value: p,
76
77
  onChange: (e) => h(Number(e.target.value)),
77
78
  className: "rounded-lg border border-border-seam bg-bg-surface px-2 py-1.5 text-sm text-text-primary",
78
- children: Array.from({ length: I }, (e, t) => t + 1).map((e) => /* @__PURE__ */ C("option", {
79
+ children: Array.from({ length: I }, (e, t) => t + 1).map((e) => /* @__PURE__ */ w("option", {
79
80
  value: e,
80
81
  children: e
81
82
  }, e))
82
83
  })]
83
84
  }),
84
- P !== null && /* @__PURE__ */ C("p", {
85
+ P !== null && /* @__PURE__ */ w("p", {
85
86
  "data-testid": "store-stock-left",
86
- className: t("text-sm font-medium", F || P <= D ? "text-status-warning-text" : "text-text-secondary"),
87
- children: F ? i("coolandlovely.cart.soldOut", "Sold out in this size and colour") : P <= D ? i("coolandlovely.cart.onlyLeft", "Only {{count}} left", { count: P }) : i("coolandlovely.cart.inStock", "In stock")
87
+ className: t("text-sm font-medium", F || P <= O ? "text-status-warning-text" : "text-text-secondary"),
88
+ children: F ? i("coolandlovely.cart.soldOut", "Sold out in this size and colour") : P <= O ? i("coolandlovely.cart.onlyLeft", "Only {{count}} left", { count: P }) : i("coolandlovely.cart.inStock", "In stock")
88
89
  }),
89
- /* @__PURE__ */ w("div", {
90
+ /* @__PURE__ */ T("div", {
90
91
  className: "space-y-3 border-t border-border-seam pt-4",
91
92
  children: [
92
- /* @__PURE__ */ C(d, {
93
+ /* @__PURE__ */ w(d, {
93
94
  id: "coo-store-shipping-name",
94
95
  label: i("coolandlovely.checkout.shippingName", "Full name"),
95
96
  value: g,
96
97
  onChange: _,
97
98
  required: !0
98
99
  }),
99
- /* @__PURE__ */ C(u, {
100
+ /* @__PURE__ */ w(u, {
100
101
  id: "coo-store-shipping-address",
101
102
  label: i("coolandlovely.checkout.shippingAddress", "Shipping address"),
102
- value: y,
103
- onChange: S,
103
+ value: v,
104
+ onChange: b,
104
105
  rows: 3,
105
106
  required: !0
106
107
  }),
107
- /* @__PURE__ */ C(d, {
108
+ /* @__PURE__ */ w(d, {
108
109
  id: "coo-store-buyer-note",
109
110
  label: i("coolandlovely.checkout.note", "Note for the brand (optional)"),
110
- value: T,
111
- onChange: j
111
+ value: C,
112
+ onChange: E
112
113
  })
113
114
  ]
114
115
  }),
115
- /* @__PURE__ */ C("p", {
116
+ /* @__PURE__ */ w("p", {
116
117
  className: "text-xs text-text-secondary",
117
118
  children: i("coolandlovely.cart.taxNote", "Tax is calculated when you place the order.")
118
119
  }),
119
- a.error && /* @__PURE__ */ C("p", {
120
+ a.error && /* @__PURE__ */ w("p", {
120
121
  className: "text-sm text-status-error-text",
121
122
  children: a.error.message
122
123
  }),
123
- /* @__PURE__ */ w("button", {
124
+ /* @__PURE__ */ T("button", {
124
125
  type: "button",
125
126
  disabled: !L || a.isPending,
126
127
  onClick: () => {
@@ -130,55 +131,55 @@ var j = ({ piece: e, onCheckout: n }) => {
130
131
  size: o,
131
132
  colour: l,
132
133
  shippingName: g.trim(),
133
- shippingAddress: y.trim(),
134
- buyerNote: T.trim() || null
134
+ shippingAddress: v.trim(),
135
+ buyerNote: C.trim() || null
135
136
  }, { onSuccess: n });
136
137
  },
137
- className: k,
138
- children: [a.isPending ? /* @__PURE__ */ C(b, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ C(x, { className: "h-4 w-4" }), i("coolandlovely.storePiece.buyNow", "Buy now · {{amount}}", { amount: s(e.price * p, e.currency) })]
138
+ className: A,
139
+ children: [a.isPending ? /* @__PURE__ */ w(x, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ w(S, { className: "h-4 w-4" }), i("coolandlovely.storePiece.buyNow", "Buy now · {{amount}}", { amount: s(e.price * p, e.currency) })]
139
140
  })
140
141
  ]
141
142
  });
142
- }, M = ({ session: t }) => {
143
+ }, N = ({ session: t }) => {
143
144
  let i = r(), { navigateTo: a } = e(), o = g();
144
- return /* @__PURE__ */ C(n, {
145
+ return /* @__PURE__ */ w(n, {
145
146
  title: i("coolandlovely.checkout.payTitle", "Pay for your order"),
146
147
  description: t.order.orderNumber,
147
- children: /* @__PURE__ */ C("div", {
148
+ children: /* @__PURE__ */ w("div", {
148
149
  className: "mx-auto max-w-lg space-y-4",
149
- children: /* @__PURE__ */ w(T, {
150
+ children: /* @__PURE__ */ T(E, {
150
151
  treatment: "glass",
151
152
  className: "space-y-4 p-6",
152
153
  children: [
153
- /* @__PURE__ */ w("dl", {
154
+ /* @__PURE__ */ T("dl", {
154
155
  className: "space-y-2 text-sm",
155
156
  children: [
156
- /* @__PURE__ */ w("div", {
157
+ /* @__PURE__ */ T("div", {
157
158
  className: "flex justify-between",
158
- children: [/* @__PURE__ */ C("dt", {
159
+ children: [/* @__PURE__ */ w("dt", {
159
160
  className: "text-text-secondary",
160
161
  children: i("coolandlovely.checkout.subtotal", "Subtotal")
161
- }), /* @__PURE__ */ C("dd", {
162
+ }), /* @__PURE__ */ w("dd", {
162
163
  className: "tabular-nums text-text-primary",
163
164
  children: s(t.subtotal, t.currency)
164
165
  })]
165
166
  }),
166
- /* @__PURE__ */ w("div", {
167
+ /* @__PURE__ */ T("div", {
167
168
  className: "flex justify-between",
168
- children: [/* @__PURE__ */ C("dt", {
169
+ children: [/* @__PURE__ */ w("dt", {
169
170
  className: "text-text-secondary",
170
171
  children: i("coolandlovely.checkout.tax", "Tax")
171
- }), /* @__PURE__ */ C("dd", {
172
+ }), /* @__PURE__ */ w("dd", {
172
173
  className: "tabular-nums text-text-primary",
173
174
  children: s(t.taxAmount, t.currency)
174
175
  })]
175
176
  }),
176
- /* @__PURE__ */ w("div", {
177
+ /* @__PURE__ */ T("div", {
177
178
  className: "flex justify-between border-t border-border-seam pt-2 text-base font-semibold",
178
- children: [/* @__PURE__ */ C("dt", {
179
+ children: [/* @__PURE__ */ w("dt", {
179
180
  className: "text-text-primary",
180
181
  children: i("coolandlovely.checkout.total", "Total")
181
- }), /* @__PURE__ */ C("dd", {
182
+ }), /* @__PURE__ */ w("dd", {
182
183
  className: "tabular-nums text-text-primary",
183
184
  "data-testid": "store-checkout-total",
184
185
  children: s(t.total, t.currency)
@@ -186,13 +187,13 @@ var j = ({ piece: e, onCheckout: n }) => {
186
187
  })
187
188
  ]
188
189
  }),
189
- /* @__PURE__ */ C(_, {
190
+ /* @__PURE__ */ w(_, {
190
191
  checkout: t,
191
192
  onSettle: async () => {
192
193
  await o.mutateAsync(t.order.id).catch(() => void 0), a(`/orders/${t.order.id}`);
193
194
  }
194
195
  }),
195
- /* @__PURE__ */ C("button", {
196
+ /* @__PURE__ */ w("button", {
196
197
  type: "button",
197
198
  onClick: () => a(`/orders/${t.order.id}`),
198
199
  className: "w-full text-center text-sm font-medium text-text-secondary hover:underline",
@@ -202,151 +203,157 @@ var j = ({ piece: e, onCheckout: n }) => {
202
203
  })
203
204
  })
204
205
  });
205
- }, N = ({ itemId: t, onRetry: u }) => {
206
- let d = r(), { navigateTo: m } = e(), g = h(t, !0), [_, b] = v(null), x = d("coolandlovely.storePiece.pageTitle", "Style item");
207
- if (_) return /* @__PURE__ */ C(M, { session: _ });
208
- if (g.isLoading) return /* @__PURE__ */ C(n, {
209
- title: x,
210
- children: /* @__PURE__ */ C(a, { label: d("coolandlovely.storePiece.loading", "Loading item…") })
206
+ }, P = ({ itemId: t, onRetry: u }) => {
207
+ let d = r(), { navigateTo: m } = e(), g = h(t, !0), [_, x] = y(null), S = d("coolandlovely.storePiece.pageTitle", "Style item");
208
+ if (_) return /* @__PURE__ */ w(N, { session: _ });
209
+ if (g.isLoading) return /* @__PURE__ */ w(n, {
210
+ title: S,
211
+ children: /* @__PURE__ */ w(a, { label: d("coolandlovely.storePiece.loading", "Loading item…") })
211
212
  });
212
- let E = g.data;
213
- return g.isError || !E ? /* @__PURE__ */ C(n, {
214
- title: x,
215
- children: /* @__PURE__ */ C(i, {
213
+ let D = g.data;
214
+ return g.isError || !D ? /* @__PURE__ */ w(n, {
215
+ title: S,
216
+ children: /* @__PURE__ */ w(i, {
216
217
  title: d("coolandlovely.storePiece.notFound", "Item not found"),
217
218
  onRetry: () => {
218
219
  u(), g.refetch();
219
220
  }
220
221
  })
221
- }) : /* @__PURE__ */ C(n, {
222
- title: E.name,
223
- description: E.brandName,
224
- actions: /* @__PURE__ */ w("button", {
222
+ }) : /* @__PURE__ */ T(n, {
223
+ title: D.name,
224
+ description: D.brandName,
225
+ actions: /* @__PURE__ */ T("button", {
225
226
  type: "button",
226
227
  onClick: () => m("/discover"),
227
228
  className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
228
229
  children: [
229
- /* @__PURE__ */ C(y, { className: "h-4 w-4" }),
230
+ /* @__PURE__ */ w(b, { className: "h-4 w-4" }),
230
231
  " ",
231
232
  d("coolandlovely.storePiece.back", "Discover")
232
233
  ]
233
234
  }),
234
- children: /* @__PURE__ */ w("div", {
235
+ children: [/* @__PURE__ */ T("div", {
235
236
  className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
236
237
  "data-testid": "store-listed-piece",
237
- children: [/* @__PURE__ */ C("div", {
238
+ children: [/* @__PURE__ */ w("div", {
238
239
  className: "lg:col-span-2",
239
- children: /* @__PURE__ */ w(T, {
240
+ children: /* @__PURE__ */ T(E, {
240
241
  treatment: "glass",
241
242
  className: "overflow-hidden p-0",
242
- children: [/* @__PURE__ */ C(o, {
243
- icon: l(E.category, 48),
244
- seed: E.id,
245
- alt: E.name,
243
+ children: [/* @__PURE__ */ w(o, {
244
+ icon: l(D.category, 48),
245
+ seed: D.id,
246
+ alt: D.name,
246
247
  className: "aspect-[4/5] w-full"
247
- }), E.description && /* @__PURE__ */ C("div", {
248
+ }), D.description && /* @__PURE__ */ w("div", {
248
249
  className: "p-6",
249
- children: /* @__PURE__ */ C("p", {
250
+ children: /* @__PURE__ */ w("p", {
250
251
  className: "text-sm leading-relaxed text-text-secondary",
251
- children: E.description
252
+ children: D.description
252
253
  })
253
254
  })]
254
255
  })
255
- }), /* @__PURE__ */ w("div", {
256
+ }), /* @__PURE__ */ T("div", {
256
257
  className: "space-y-4",
257
- children: [/* @__PURE__ */ w(T, {
258
+ children: [/* @__PURE__ */ T(E, {
258
259
  treatment: "glass",
259
260
  className: "space-y-5 p-6",
260
261
  children: [
261
- /* @__PURE__ */ w("div", { children: [
262
- /* @__PURE__ */ w("p", {
262
+ /* @__PURE__ */ T("div", { children: [
263
+ /* @__PURE__ */ T("p", {
263
264
  className: "inline-flex items-center gap-1.5 text-xs font-medium text-accent-primary",
264
- children: [/* @__PURE__ */ C(S, { className: "h-3.5 w-3.5" }), d("coolandlovely.storePiece.fromStore", "Listed in the Burdenoff store")]
265
+ children: [/* @__PURE__ */ w(C, { className: "h-3.5 w-3.5" }), d("coolandlovely.storePiece.fromStore", "Listed in the Burdenoff store")]
265
266
  }),
266
- /* @__PURE__ */ C("h2", {
267
+ /* @__PURE__ */ w("h2", {
267
268
  className: "mt-2 text-2xl font-semibold leading-tight text-text-primary",
268
- children: E.name
269
+ children: D.name
269
270
  }),
270
- /* @__PURE__ */ w("p", {
271
+ /* @__PURE__ */ T("p", {
271
272
  className: "mt-1 text-sm font-medium text-text-secondary",
272
- children: [E.brandName, /* @__PURE__ */ w("span", {
273
+ children: [D.brandName, /* @__PURE__ */ T("span", {
273
274
  className: "ml-1 text-text-tertiary",
274
- children: ["@", E.brandHandle]
275
+ children: ["@", D.brandHandle]
275
276
  })]
276
277
  }),
277
- /* @__PURE__ */ w("p", {
278
+ /* @__PURE__ */ T("p", {
278
279
  className: "mt-3 text-3xl font-bold text-text-primary tabular-nums",
279
- children: [s(E.price, E.currency), /* @__PURE__ */ C("span", {
280
+ children: [s(D.price, D.currency), /* @__PURE__ */ w("span", {
280
281
  className: "ml-2 text-base font-medium text-text-secondary",
281
- children: E.currency
282
+ children: D.currency
282
283
  })]
283
284
  })
284
285
  ] }),
285
- E.colours.length > 0 && /* @__PURE__ */ C(p, {
286
- colours: E.colours,
286
+ D.colours.length > 0 && /* @__PURE__ */ w(p, {
287
+ colours: D.colours,
287
288
  max: 12
288
289
  }),
289
- /* @__PURE__ */ C("div", {
290
+ /* @__PURE__ */ w("div", {
290
291
  className: "border-t border-border-seam pt-5",
291
- children: /* @__PURE__ */ C(j, {
292
- piece: E,
293
- onCheckout: b
292
+ children: /* @__PURE__ */ w(M, {
293
+ piece: D,
294
+ onCheckout: x
294
295
  })
295
296
  }),
296
- E.materials.length > 0 && /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
297
+ D.materials.length > 0 && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
297
298
  className: "mb-1 text-xs font-medium uppercase tracking-wide text-text-secondary",
298
299
  children: d("coolandlovely.storePiece.materials", "Materials")
299
- }), /* @__PURE__ */ C("p", {
300
+ }), /* @__PURE__ */ w("p", {
300
301
  className: "text-sm text-text-primary",
301
- children: E.materials.join(", ")
302
+ children: D.materials.join(", ")
302
303
  })] }),
303
- E.tags.length > 0 && /* @__PURE__ */ C(f, {
304
- tags: E.tags,
304
+ D.tags.length > 0 && /* @__PURE__ */ w(f, {
305
+ tags: D.tags,
305
306
  max: 12,
306
307
  tone: "accent"
307
308
  })
308
309
  ]
309
- }), /* @__PURE__ */ w(T, {
310
+ }), /* @__PURE__ */ T(E, {
310
311
  treatment: "plain",
311
312
  className: "p-5",
312
313
  children: [
313
- /* @__PURE__ */ C("h3", {
314
+ /* @__PURE__ */ w("h3", {
314
315
  className: "mb-3 text-sm font-semibold text-text-primary",
315
316
  children: d("coolandlovely.storePiece.details", "Details")
316
317
  }),
317
- /* @__PURE__ */ w("dl", {
318
+ /* @__PURE__ */ T("dl", {
318
319
  className: "space-y-2 text-sm",
319
- children: [/* @__PURE__ */ w("div", {
320
+ children: [/* @__PURE__ */ T("div", {
320
321
  className: "flex justify-between gap-2",
321
- children: [/* @__PURE__ */ C("dt", {
322
+ children: [/* @__PURE__ */ w("dt", {
322
323
  className: "text-text-secondary",
323
324
  children: d("coolandlovely.storePiece.category", "Category")
324
- }), /* @__PURE__ */ C("dd", {
325
+ }), /* @__PURE__ */ w("dd", {
325
326
  className: "text-text-primary",
326
- children: c(E.category)
327
+ children: c(D.category)
327
328
  })]
328
- }), /* @__PURE__ */ w("div", {
329
+ }), /* @__PURE__ */ T("div", {
329
330
  className: "flex justify-between gap-2",
330
- children: [/* @__PURE__ */ C("dt", {
331
+ children: [/* @__PURE__ */ w("dt", {
331
332
  className: "text-text-secondary",
332
333
  children: "SKU"
333
- }), /* @__PURE__ */ C("dd", {
334
+ }), /* @__PURE__ */ w("dd", {
334
335
  className: "text-text-primary",
335
- children: E.sku ?? "—"
336
+ children: D.sku ?? "—"
336
337
  })]
337
338
  })]
338
339
  }),
339
- /* @__PURE__ */ C("p", {
340
+ /* @__PURE__ */ w("p", {
340
341
  className: "mt-3 text-xs text-text-secondary",
341
- children: d("coolandlovely.storePiece.soldBy", "Sold and shipped by {{brand}}. Your order appears in My Orders.", { brand: E.brandName })
342
+ children: d("coolandlovely.storePiece.soldBy", "Sold and shipped by {{brand}}. Your order appears in My Orders.", { brand: D.brandName })
342
343
  })
343
344
  ]
344
345
  })]
345
346
  })]
346
- })
347
+ }), /* @__PURE__ */ w("div", {
348
+ className: "mt-6",
349
+ children: /* @__PURE__ */ w(v, {
350
+ styleItemId: D.id,
351
+ currency: D.currency
352
+ }, D.id)
353
+ })]
347
354
  });
348
355
  };
349
356
  //#endregion
350
- export { N as StoreListedPieceView };
357
+ export { P as StoreListedPieceView };
351
358
 
352
359
  //# sourceMappingURL=StoreListedPieceView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StoreListedPieceView.js","names":[],"sources":["../../../../src/coolandlovely/pages/items/StoreListedPieceView.tsx"],"sourcesContent":["/**\n * Store-listed piece view (BOFF-10017)\n * @module coolandlovely/pages/items\n *\n * What a shopper sees when they follow a Burdenoff store listing (\"View on CoolAndLovely\") to a\n * piece that belongs to a brand outside their workspace. The workspace catalogue has no such\n * piece, so the page falls back to `cooStoreListedPiece` (product facts only, readable from any\n * workspace) and lets the shopper buy it directly with `cooBuyStoreListedPiece`. The order is\n * held by the brand, paid through the provider global-billing chose, and settled only once the\n * backend re-reads billing's record; the shopper follows it from My Orders.\n */\n\nimport { type FC, useState } from 'react';\nimport { ArrowLeft, Loader2, ShoppingBag, Store } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\n\nimport { ColourSwatchRow } from '../../components/ColourSwatchRow';\nimport { TextAreaField, TextField } from '../../components/Field';\nimport { PageLayout } from '../../components/PageLayout';\nimport { PayForOrder } from '../../components/PayForOrder';\nimport { ErrorView, LoadingView } from '../../components/StateViews';\nimport { TagList } from '../../components/TagList';\nimport { Thumbnail } from '../../components/Thumbnail';\nimport { useCoolAndLovely } from '../../context/CoolAndLovelyContext';\nimport { useTr } from '../../hooks';\nimport {\n useBuyStoreListedPiece,\n useStoreListedPiece,\n useSyncOrderPayment,\n} from '../../hooks/useCommerceApi';\nimport type { CooOrderCheckout, CooStoreListedPiece } from '../../types';\nimport { cn } from '../../utils/cn';\nimport { formatPrice, titleCase } from '../../utils/formatters';\nimport { categoryIcon } from '../../utils/icons';\n\nconst MAX_QUANTITY = 10;\n/** Stock at or below this is shown to the shopper as \"Only N left\". */\nconst LOW_STOCK = 5;\n\nconst chip = (selected: boolean) =>\n cn(\n 'inline-flex min-w-9 items-center justify-center rounded-full border px-3 py-1 text-sm font-medium transition-colors disabled:opacity-40 disabled:line-through',\n selected\n ? 'border-action-primary-bg bg-action-primary-bg text-action-primary-text'\n : 'border-border-seam text-text-primary hover:bg-bg-sunken'\n );\n\nconst primaryButton =\n 'inline-flex w-full items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2.5 text-sm font-semibold text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-50';\n\n/**\n * Units left of a (possibly partial) size/colour choice while the piece tracks stock; null when\n * it does not. The service checks the stock again when the order is placed.\n */\nfunction unitsLeft(\n piece: CooStoreListedPiece,\n size: string | null,\n colour: string | null\n): number | null {\n if (!piece.trackInventory) return null;\n return piece.variants\n .filter(\n (variant) =>\n (size === null || (variant.size ?? '') === size) &&\n (colour === null || (variant.colour ?? '') === colour)\n )\n .reduce((sum, variant) => sum + variant.available, 0);\n}\n\n/** Size/colour/quantity, shipping details and \"Buy now\" for a store-listed piece. */\nconst BuyListedPiecePanel: FC<{\n piece: CooStoreListedPiece;\n onCheckout: (checkout: CooOrderCheckout) => void;\n}> = ({ piece, onCheckout }) => {\n const tr = useTr();\n const buy = useBuyStoreListedPiece();\n const [size, setSize] = useState<string | null>(\n piece.sizes.length === 1 ? (piece.sizes[0] ?? null) : null\n );\n const [colour, setColour] = useState<string | null>(\n piece.colours.length === 1 ? (piece.colours[0] ?? null) : null\n );\n const [quantity, setQuantity] = useState(1);\n const [shippingName, setShippingName] = useState('');\n const [shippingAddress, setShippingAddress] = useState('');\n const [buyerNote, setBuyerNote] = useState('');\n\n if (!piece.inStock) {\n return (\n <p className=\"rounded-lg border border-border-seam bg-bg-sunken p-3 text-sm text-text-secondary\">\n {tr('coolandlovely.storePiece.soldOut', 'This piece is sold out right now.')}\n </p>\n );\n }\n\n const needsSize = piece.sizes.length > 0 && !size;\n const needsColour = piece.colours.length > 0 && !colour;\n const left = needsSize || needsColour ? null : unitsLeft(piece, size ?? '', colour ?? '');\n const soldOut = left !== null && left <= 0;\n const maxQuantity = left === null ? MAX_QUANTITY : Math.max(1, Math.min(MAX_QUANTITY, left));\n const canSubmit =\n !needsSize &&\n !needsColour &&\n !soldOut &&\n shippingName.trim() !== '' &&\n shippingAddress.trim() !== '';\n\n const submit = () => {\n buy.mutate(\n {\n styleItemId: piece.id,\n quantity,\n size,\n colour,\n shippingName: shippingName.trim(),\n shippingAddress: shippingAddress.trim(),\n buyerNote: buyerNote.trim() || null,\n },\n { onSuccess: onCheckout }\n );\n };\n\n return (\n <div className=\"space-y-4\" data-testid=\"store-buy-panel\">\n {piece.sizes.length > 0 && (\n <div>\n <p className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {tr('coolandlovely.cart.chooseSize', 'Choose a size')}\n </p>\n <div className=\"flex flex-wrap gap-2\">\n {piece.sizes.map((option) => (\n <button\n key={option}\n type=\"button\"\n aria-pressed={size === option}\n disabled={unitsLeft(piece, option, colour) === 0}\n onClick={() => {\n setSize(option);\n setQuantity(1);\n }}\n className={chip(size === option)}\n >\n {option}\n </button>\n ))}\n </div>\n </div>\n )}\n {piece.colours.length > 0 && (\n <div>\n <p className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {tr('coolandlovely.cart.chooseColour', 'Choose a colour')}\n </p>\n <div className=\"flex flex-wrap gap-2\">\n {piece.colours.map((option) => (\n <button\n key={option}\n type=\"button\"\n aria-pressed={colour === option}\n disabled={unitsLeft(piece, size, option) === 0}\n onClick={() => {\n setColour(option);\n setQuantity(1);\n }}\n className={chip(colour === option)}\n >\n {option}\n </button>\n ))}\n </div>\n </div>\n )}\n <div className=\"flex items-center gap-3\">\n <label htmlFor=\"coo-store-quantity\" className=\"text-sm text-text-secondary\">\n {tr('coolandlovely.cart.quantity', 'Quantity')}\n </label>\n <select\n id=\"coo-store-quantity\"\n value={quantity}\n onChange={(event) => setQuantity(Number(event.target.value))}\n className=\"rounded-lg border border-border-seam bg-bg-surface px-2 py-1.5 text-sm text-text-primary\"\n >\n {Array.from({ length: maxQuantity }, (_, index) => index + 1).map((value) => (\n <option key={value} value={value}>\n {value}\n </option>\n ))}\n </select>\n </div>\n {left !== null && (\n <p\n data-testid=\"store-stock-left\"\n className={cn(\n 'text-sm font-medium',\n soldOut || left <= LOW_STOCK ? 'text-status-warning-text' : 'text-text-secondary'\n )}\n >\n {soldOut\n ? tr('coolandlovely.cart.soldOut', 'Sold out in this size and colour')\n : left <= LOW_STOCK\n ? tr('coolandlovely.cart.onlyLeft', 'Only {{count}} left', { count: left })\n : tr('coolandlovely.cart.inStock', 'In stock')}\n </p>\n )}\n <div className=\"space-y-3 border-t border-border-seam pt-4\">\n <TextField\n id=\"coo-store-shipping-name\"\n label={tr('coolandlovely.checkout.shippingName', 'Full name')}\n value={shippingName}\n onChange={setShippingName}\n required\n />\n <TextAreaField\n id=\"coo-store-shipping-address\"\n label={tr('coolandlovely.checkout.shippingAddress', 'Shipping address')}\n value={shippingAddress}\n onChange={setShippingAddress}\n rows={3}\n required\n />\n <TextField\n id=\"coo-store-buyer-note\"\n label={tr('coolandlovely.checkout.note', 'Note for the brand (optional)')}\n value={buyerNote}\n onChange={setBuyerNote}\n />\n </div>\n <p className=\"text-xs text-text-secondary\">\n {tr('coolandlovely.cart.taxNote', 'Tax is calculated when you place the order.')}\n </p>\n {buy.error && <p className=\"text-sm text-status-error-text\">{buy.error.message}</p>}\n <button\n type=\"button\"\n disabled={!canSubmit || buy.isPending}\n onClick={submit}\n className={primaryButton}\n >\n {buy.isPending ? (\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n ) : (\n <ShoppingBag className=\"h-4 w-4\" />\n )}\n {tr('coolandlovely.storePiece.buyNow', 'Buy now · {{amount}}', {\n amount: formatPrice(piece.price * quantity, piece.currency),\n })}\n </button>\n </div>\n );\n};\n\n/** Pay for the order the store purchase created. */\nconst PayForStorePurchase: FC<{ session: CooOrderCheckout }> = ({ session }) => {\n const tr = useTr();\n const { navigateTo } = useCoolAndLovely();\n const sync = useSyncOrderPayment();\n const settle = async () => {\n await sync.mutateAsync(session.order.id).catch(() => undefined);\n navigateTo(`/orders/${session.order.id}`);\n };\n return (\n <PageLayout\n title={tr('coolandlovely.checkout.payTitle', 'Pay for your order')}\n description={session.order.orderNumber}\n >\n <div className=\"mx-auto max-w-lg space-y-4\">\n <GlassCard treatment=\"glass\" className=\"space-y-4 p-6\">\n <dl className=\"space-y-2 text-sm\">\n <div className=\"flex justify-between\">\n <dt className=\"text-text-secondary\">\n {tr('coolandlovely.checkout.subtotal', 'Subtotal')}\n </dt>\n <dd className=\"tabular-nums text-text-primary\">\n {formatPrice(session.subtotal, session.currency)}\n </dd>\n </div>\n <div className=\"flex justify-between\">\n <dt className=\"text-text-secondary\">{tr('coolandlovely.checkout.tax', 'Tax')}</dt>\n <dd className=\"tabular-nums text-text-primary\">\n {formatPrice(session.taxAmount, session.currency)}\n </dd>\n </div>\n <div className=\"flex justify-between border-t border-border-seam pt-2 text-base font-semibold\">\n <dt className=\"text-text-primary\">{tr('coolandlovely.checkout.total', 'Total')}</dt>\n <dd className=\"tabular-nums text-text-primary\" data-testid=\"store-checkout-total\">\n {formatPrice(session.total, session.currency)}\n </dd>\n </div>\n </dl>\n <PayForOrder checkout={session} onSettle={settle} />\n <button\n type=\"button\"\n onClick={() => navigateTo(`/orders/${session.order.id}`)}\n className=\"w-full text-center text-sm font-medium text-text-secondary hover:underline\"\n >\n {tr('coolandlovely.checkout.payLater', 'Pay later from My Orders')}\n </button>\n </GlassCard>\n </div>\n </PageLayout>\n );\n};\n\n/**\n * The fallback piece page for a store shopper. Renders \"Item not found\" when the store does not\n * list the piece either (drafts, retired pieces, pieces of unpublished brands).\n */\nexport const StoreListedPieceView: FC<{ itemId: string | undefined; onRetry: () => void }> = ({\n itemId,\n onRetry,\n}) => {\n const tr = useTr();\n const { navigateTo } = useCoolAndLovely();\n const query = useStoreListedPiece(itemId, true);\n const [session, setSession] = useState<CooOrderCheckout | null>(null);\n const pageTitle = tr('coolandlovely.storePiece.pageTitle', 'Style item');\n\n if (session) return <PayForStorePurchase session={session} />;\n\n if (query.isLoading) {\n return (\n <PageLayout title={pageTitle}>\n <LoadingView label={tr('coolandlovely.storePiece.loading', 'Loading item…')} />\n </PageLayout>\n );\n }\n\n const piece = query.data;\n if (query.isError || !piece) {\n return (\n <PageLayout title={pageTitle}>\n <ErrorView\n title={tr('coolandlovely.storePiece.notFound', 'Item not found')}\n onRetry={() => {\n onRetry();\n void query.refetch();\n }}\n />\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title={piece.name}\n description={piece.brandName}\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/discover')}\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken\"\n >\n <ArrowLeft className=\"h-4 w-4\" /> {tr('coolandlovely.storePiece.back', 'Discover')}\n </button>\n }\n >\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\" data-testid=\"store-listed-piece\">\n <div className=\"lg:col-span-2\">\n <GlassCard treatment=\"glass\" className=\"overflow-hidden p-0\">\n <Thumbnail\n icon={categoryIcon(piece.category, 48)}\n seed={piece.id}\n alt={piece.name}\n className=\"aspect-[4/5] w-full\"\n />\n {piece.description && (\n <div className=\"p-6\">\n <p className=\"text-sm leading-relaxed text-text-secondary\">{piece.description}</p>\n </div>\n )}\n </GlassCard>\n </div>\n\n <div className=\"space-y-4\">\n <GlassCard treatment=\"glass\" className=\"space-y-5 p-6\">\n <div>\n <p className=\"inline-flex items-center gap-1.5 text-xs font-medium text-accent-primary\">\n <Store className=\"h-3.5 w-3.5\" />\n {tr('coolandlovely.storePiece.fromStore', 'Listed in the Burdenoff store')}\n </p>\n <h2 className=\"mt-2 text-2xl font-semibold leading-tight text-text-primary\">\n {piece.name}\n </h2>\n <p className=\"mt-1 text-sm font-medium text-text-secondary\">\n {piece.brandName}\n <span className=\"ml-1 text-text-tertiary\">@{piece.brandHandle}</span>\n </p>\n <p className=\"mt-3 text-3xl font-bold text-text-primary tabular-nums\">\n {formatPrice(piece.price, piece.currency)}\n <span className=\"ml-2 text-base font-medium text-text-secondary\">\n {piece.currency}\n </span>\n </p>\n </div>\n {piece.colours.length > 0 && <ColourSwatchRow colours={piece.colours} max={12} />}\n <div className=\"border-t border-border-seam pt-5\">\n <BuyListedPiecePanel piece={piece} onCheckout={setSession} />\n </div>\n {piece.materials.length > 0 && (\n <div>\n <p className=\"mb-1 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {tr('coolandlovely.storePiece.materials', 'Materials')}\n </p>\n <p className=\"text-sm text-text-primary\">{piece.materials.join(', ')}</p>\n </div>\n )}\n {piece.tags.length > 0 && <TagList tags={piece.tags} max={12} tone=\"accent\" />}\n </GlassCard>\n\n <GlassCard treatment=\"plain\" className=\"p-5\">\n <h3 className=\"mb-3 text-sm font-semibold text-text-primary\">\n {tr('coolandlovely.storePiece.details', 'Details')}\n </h3>\n <dl className=\"space-y-2 text-sm\">\n <div className=\"flex justify-between gap-2\">\n <dt className=\"text-text-secondary\">\n {tr('coolandlovely.storePiece.category', 'Category')}\n </dt>\n <dd className=\"text-text-primary\">{titleCase(piece.category)}</dd>\n </div>\n <div className=\"flex justify-between gap-2\">\n <dt className=\"text-text-secondary\">SKU</dt>\n <dd className=\"text-text-primary\">{piece.sku ?? '—'}</dd>\n </div>\n </dl>\n <p className=\"mt-3 text-xs text-text-secondary\">\n {tr(\n 'coolandlovely.storePiece.soldBy',\n 'Sold and shipped by {{brand}}. Your order appears in My Orders.',\n { brand: piece.brandName }\n )}\n </p>\n </GlassCard>\n </div>\n </div>\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAmCA,IAAM,IAAe,IAEf,IAAY,GAEZ,KAAQ,MACZ,EACE,iKACA,IACI,2EACA,yDACN,GAEI,IACJ;AAMF,SAAS,EACP,GACA,GACA,GACe;CAEf,OADK,EAAM,iBACJ,EAAM,SACV,QACE,OACE,MAAS,SAAS,EAAQ,QAAQ,QAAQ,OAC1C,MAAW,SAAS,EAAQ,UAAU,QAAQ,EACnD,CAAC,CACA,QAAQ,GAAK,MAAY,IAAM,EAAQ,WAAW,CAAC,IAPpB;AAQpC;AAGA,IAAM,KAGA,EAAE,UAAO,oBAAiB;CAC9B,IAAM,IAAK,EAAM,GACX,IAAM,EAAuB,GAC7B,CAAC,GAAM,KAAW,EACtB,EAAM,MAAM,WAAW,IAAK,EAAM,MAAM,MAAM,OAAQ,IACxD,GACM,CAAC,GAA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StoreListedPieceView.tsx"],"sourcesContent":["/**\n * Store-listed piece view (BOFF-10017)\n * @module coolandlovely/pages/items\n *\n * What a shopper sees when they follow a Burdenoff store listing (\"View on CoolAndLovely\") to a\n * piece that belongs to a brand outside their workspace. The workspace catalogue has no such\n * piece, so the page falls back to `cooStoreListedPiece` (product facts only, readable from any\n * workspace) and lets the shopper buy it directly with `cooBuyStoreListedPiece`. The order is\n * held by the brand, paid through the provider global-billing chose, and settled only once the\n * backend re-reads billing's record; the shopper follows it from My Orders.\n */\n\nimport { PricePanel } from '../../components/prices/PricePanel';\nimport { type FC, useState } from 'react';\nimport { ArrowLeft, Loader2, ShoppingBag, Store } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\n\nimport { ColourSwatchRow } from '../../components/ColourSwatchRow';\nimport { TextAreaField, TextField } from '../../components/Field';\nimport { PageLayout } from '../../components/PageLayout';\nimport { PayForOrder } from '../../components/PayForOrder';\nimport { ErrorView, LoadingView } from '../../components/StateViews';\nimport { TagList } from '../../components/TagList';\nimport { Thumbnail } from '../../components/Thumbnail';\nimport { useCoolAndLovely } from '../../context/CoolAndLovelyContext';\nimport { useTr } from '../../hooks';\nimport {\n useBuyStoreListedPiece,\n useStoreListedPiece,\n useSyncOrderPayment,\n} from '../../hooks/useCommerceApi';\nimport type { CooOrderCheckout, CooStoreListedPiece } from '../../types';\nimport { cn } from '../../utils/cn';\nimport { formatPrice, titleCase } from '../../utils/formatters';\nimport { categoryIcon } from '../../utils/icons';\n\nconst MAX_QUANTITY = 10;\n/** Stock at or below this is shown to the shopper as \"Only N left\". */\nconst LOW_STOCK = 5;\n\nconst chip = (selected: boolean) =>\n cn(\n 'inline-flex min-w-9 items-center justify-center rounded-full border px-3 py-1 text-sm font-medium transition-colors disabled:opacity-40 disabled:line-through',\n selected\n ? 'border-action-primary-bg bg-action-primary-bg text-action-primary-text'\n : 'border-border-seam text-text-primary hover:bg-bg-sunken'\n );\n\nconst primaryButton =\n 'inline-flex w-full items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2.5 text-sm font-semibold text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-50';\n\n/**\n * Units left of a (possibly partial) size/colour choice while the piece tracks stock; null when\n * it does not. The service checks the stock again when the order is placed.\n */\nfunction unitsLeft(\n piece: CooStoreListedPiece,\n size: string | null,\n colour: string | null\n): number | null {\n if (!piece.trackInventory) return null;\n return piece.variants\n .filter(\n (variant) =>\n (size === null || (variant.size ?? '') === size) &&\n (colour === null || (variant.colour ?? '') === colour)\n )\n .reduce((sum, variant) => sum + variant.available, 0);\n}\n\n/** Size/colour/quantity, shipping details and \"Buy now\" for a store-listed piece. */\nconst BuyListedPiecePanel: FC<{\n piece: CooStoreListedPiece;\n onCheckout: (checkout: CooOrderCheckout) => void;\n}> = ({ piece, onCheckout }) => {\n const tr = useTr();\n const buy = useBuyStoreListedPiece();\n const [size, setSize] = useState<string | null>(\n piece.sizes.length === 1 ? (piece.sizes[0] ?? null) : null\n );\n const [colour, setColour] = useState<string | null>(\n piece.colours.length === 1 ? (piece.colours[0] ?? null) : null\n );\n const [quantity, setQuantity] = useState(1);\n const [shippingName, setShippingName] = useState('');\n const [shippingAddress, setShippingAddress] = useState('');\n const [buyerNote, setBuyerNote] = useState('');\n\n if (!piece.inStock) {\n return (\n <p className=\"rounded-lg border border-border-seam bg-bg-sunken p-3 text-sm text-text-secondary\">\n {tr('coolandlovely.storePiece.soldOut', 'This piece is sold out right now.')}\n </p>\n );\n }\n\n const needsSize = piece.sizes.length > 0 && !size;\n const needsColour = piece.colours.length > 0 && !colour;\n const left = needsSize || needsColour ? null : unitsLeft(piece, size ?? '', colour ?? '');\n const soldOut = left !== null && left <= 0;\n const maxQuantity = left === null ? MAX_QUANTITY : Math.max(1, Math.min(MAX_QUANTITY, left));\n const canSubmit =\n !needsSize &&\n !needsColour &&\n !soldOut &&\n shippingName.trim() !== '' &&\n shippingAddress.trim() !== '';\n\n const submit = () => {\n buy.mutate(\n {\n styleItemId: piece.id,\n quantity,\n size,\n colour,\n shippingName: shippingName.trim(),\n shippingAddress: shippingAddress.trim(),\n buyerNote: buyerNote.trim() || null,\n },\n { onSuccess: onCheckout }\n );\n };\n\n return (\n <div className=\"space-y-4\" data-testid=\"store-buy-panel\">\n {piece.sizes.length > 0 && (\n <div>\n <p className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {tr('coolandlovely.cart.chooseSize', 'Choose a size')}\n </p>\n <div className=\"flex flex-wrap gap-2\">\n {piece.sizes.map((option) => (\n <button\n key={option}\n type=\"button\"\n aria-pressed={size === option}\n disabled={unitsLeft(piece, option, colour) === 0}\n onClick={() => {\n setSize(option);\n setQuantity(1);\n }}\n className={chip(size === option)}\n >\n {option}\n </button>\n ))}\n </div>\n </div>\n )}\n {piece.colours.length > 0 && (\n <div>\n <p className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {tr('coolandlovely.cart.chooseColour', 'Choose a colour')}\n </p>\n <div className=\"flex flex-wrap gap-2\">\n {piece.colours.map((option) => (\n <button\n key={option}\n type=\"button\"\n aria-pressed={colour === option}\n disabled={unitsLeft(piece, size, option) === 0}\n onClick={() => {\n setColour(option);\n setQuantity(1);\n }}\n className={chip(colour === option)}\n >\n {option}\n </button>\n ))}\n </div>\n </div>\n )}\n <div className=\"flex items-center gap-3\">\n <label htmlFor=\"coo-store-quantity\" className=\"text-sm text-text-secondary\">\n {tr('coolandlovely.cart.quantity', 'Quantity')}\n </label>\n <select\n id=\"coo-store-quantity\"\n value={quantity}\n onChange={(event) => setQuantity(Number(event.target.value))}\n className=\"rounded-lg border border-border-seam bg-bg-surface px-2 py-1.5 text-sm text-text-primary\"\n >\n {Array.from({ length: maxQuantity }, (_, index) => index + 1).map((value) => (\n <option key={value} value={value}>\n {value}\n </option>\n ))}\n </select>\n </div>\n {left !== null && (\n <p\n data-testid=\"store-stock-left\"\n className={cn(\n 'text-sm font-medium',\n soldOut || left <= LOW_STOCK ? 'text-status-warning-text' : 'text-text-secondary'\n )}\n >\n {soldOut\n ? tr('coolandlovely.cart.soldOut', 'Sold out in this size and colour')\n : left <= LOW_STOCK\n ? tr('coolandlovely.cart.onlyLeft', 'Only {{count}} left', { count: left })\n : tr('coolandlovely.cart.inStock', 'In stock')}\n </p>\n )}\n <div className=\"space-y-3 border-t border-border-seam pt-4\">\n <TextField\n id=\"coo-store-shipping-name\"\n label={tr('coolandlovely.checkout.shippingName', 'Full name')}\n value={shippingName}\n onChange={setShippingName}\n required\n />\n <TextAreaField\n id=\"coo-store-shipping-address\"\n label={tr('coolandlovely.checkout.shippingAddress', 'Shipping address')}\n value={shippingAddress}\n onChange={setShippingAddress}\n rows={3}\n required\n />\n <TextField\n id=\"coo-store-buyer-note\"\n label={tr('coolandlovely.checkout.note', 'Note for the brand (optional)')}\n value={buyerNote}\n onChange={setBuyerNote}\n />\n </div>\n <p className=\"text-xs text-text-secondary\">\n {tr('coolandlovely.cart.taxNote', 'Tax is calculated when you place the order.')}\n </p>\n {buy.error && <p className=\"text-sm text-status-error-text\">{buy.error.message}</p>}\n <button\n type=\"button\"\n disabled={!canSubmit || buy.isPending}\n onClick={submit}\n className={primaryButton}\n >\n {buy.isPending ? (\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n ) : (\n <ShoppingBag className=\"h-4 w-4\" />\n )}\n {tr('coolandlovely.storePiece.buyNow', 'Buy now · {{amount}}', {\n amount: formatPrice(piece.price * quantity, piece.currency),\n })}\n </button>\n </div>\n );\n};\n\n/** Pay for the order the store purchase created. */\nconst PayForStorePurchase: FC<{ session: CooOrderCheckout }> = ({ session }) => {\n const tr = useTr();\n const { navigateTo } = useCoolAndLovely();\n const sync = useSyncOrderPayment();\n const settle = async () => {\n await sync.mutateAsync(session.order.id).catch(() => undefined);\n navigateTo(`/orders/${session.order.id}`);\n };\n return (\n <PageLayout\n title={tr('coolandlovely.checkout.payTitle', 'Pay for your order')}\n description={session.order.orderNumber}\n >\n <div className=\"mx-auto max-w-lg space-y-4\">\n <GlassCard treatment=\"glass\" className=\"space-y-4 p-6\">\n <dl className=\"space-y-2 text-sm\">\n <div className=\"flex justify-between\">\n <dt className=\"text-text-secondary\">\n {tr('coolandlovely.checkout.subtotal', 'Subtotal')}\n </dt>\n <dd className=\"tabular-nums text-text-primary\">\n {formatPrice(session.subtotal, session.currency)}\n </dd>\n </div>\n <div className=\"flex justify-between\">\n <dt className=\"text-text-secondary\">{tr('coolandlovely.checkout.tax', 'Tax')}</dt>\n <dd className=\"tabular-nums text-text-primary\">\n {formatPrice(session.taxAmount, session.currency)}\n </dd>\n </div>\n <div className=\"flex justify-between border-t border-border-seam pt-2 text-base font-semibold\">\n <dt className=\"text-text-primary\">{tr('coolandlovely.checkout.total', 'Total')}</dt>\n <dd className=\"tabular-nums text-text-primary\" data-testid=\"store-checkout-total\">\n {formatPrice(session.total, session.currency)}\n </dd>\n </div>\n </dl>\n <PayForOrder checkout={session} onSettle={settle} />\n <button\n type=\"button\"\n onClick={() => navigateTo(`/orders/${session.order.id}`)}\n className=\"w-full text-center text-sm font-medium text-text-secondary hover:underline\"\n >\n {tr('coolandlovely.checkout.payLater', 'Pay later from My Orders')}\n </button>\n </GlassCard>\n </div>\n </PageLayout>\n );\n};\n\n/**\n * The fallback piece page for a store shopper. Renders \"Item not found\" when the store does not\n * list the piece either (drafts, retired pieces, pieces of unpublished brands).\n */\nexport const StoreListedPieceView: FC<{ itemId: string | undefined; onRetry: () => void }> = ({\n itemId,\n onRetry,\n}) => {\n const tr = useTr();\n const { navigateTo } = useCoolAndLovely();\n const query = useStoreListedPiece(itemId, true);\n const [session, setSession] = useState<CooOrderCheckout | null>(null);\n const pageTitle = tr('coolandlovely.storePiece.pageTitle', 'Style item');\n\n if (session) return <PayForStorePurchase session={session} />;\n\n if (query.isLoading) {\n return (\n <PageLayout title={pageTitle}>\n <LoadingView label={tr('coolandlovely.storePiece.loading', 'Loading item…')} />\n </PageLayout>\n );\n }\n\n const piece = query.data;\n if (query.isError || !piece) {\n return (\n <PageLayout title={pageTitle}>\n <ErrorView\n title={tr('coolandlovely.storePiece.notFound', 'Item not found')}\n onRetry={() => {\n onRetry();\n void query.refetch();\n }}\n />\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title={piece.name}\n description={piece.brandName}\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/discover')}\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken\"\n >\n <ArrowLeft className=\"h-4 w-4\" /> {tr('coolandlovely.storePiece.back', 'Discover')}\n </button>\n }\n >\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\" data-testid=\"store-listed-piece\">\n <div className=\"lg:col-span-2\">\n <GlassCard treatment=\"glass\" className=\"overflow-hidden p-0\">\n <Thumbnail\n icon={categoryIcon(piece.category, 48)}\n seed={piece.id}\n alt={piece.name}\n className=\"aspect-[4/5] w-full\"\n />\n {piece.description && (\n <div className=\"p-6\">\n <p className=\"text-sm leading-relaxed text-text-secondary\">{piece.description}</p>\n </div>\n )}\n </GlassCard>\n </div>\n\n <div className=\"space-y-4\">\n <GlassCard treatment=\"glass\" className=\"space-y-5 p-6\">\n <div>\n <p className=\"inline-flex items-center gap-1.5 text-xs font-medium text-accent-primary\">\n <Store className=\"h-3.5 w-3.5\" />\n {tr('coolandlovely.storePiece.fromStore', 'Listed in the Burdenoff store')}\n </p>\n <h2 className=\"mt-2 text-2xl font-semibold leading-tight text-text-primary\">\n {piece.name}\n </h2>\n <p className=\"mt-1 text-sm font-medium text-text-secondary\">\n {piece.brandName}\n <span className=\"ml-1 text-text-tertiary\">@{piece.brandHandle}</span>\n </p>\n <p className=\"mt-3 text-3xl font-bold text-text-primary tabular-nums\">\n {formatPrice(piece.price, piece.currency)}\n <span className=\"ml-2 text-base font-medium text-text-secondary\">\n {piece.currency}\n </span>\n </p>\n </div>\n {piece.colours.length > 0 && <ColourSwatchRow colours={piece.colours} max={12} />}\n <div className=\"border-t border-border-seam pt-5\">\n <BuyListedPiecePanel piece={piece} onCheckout={setSession} />\n </div>\n {piece.materials.length > 0 && (\n <div>\n <p className=\"mb-1 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {tr('coolandlovely.storePiece.materials', 'Materials')}\n </p>\n <p className=\"text-sm text-text-primary\">{piece.materials.join(', ')}</p>\n </div>\n )}\n {piece.tags.length > 0 && <TagList tags={piece.tags} max={12} tone=\"accent\" />}\n </GlassCard>\n\n <GlassCard treatment=\"plain\" className=\"p-5\">\n <h3 className=\"mb-3 text-sm font-semibold text-text-primary\">\n {tr('coolandlovely.storePiece.details', 'Details')}\n </h3>\n <dl className=\"space-y-2 text-sm\">\n <div className=\"flex justify-between gap-2\">\n <dt className=\"text-text-secondary\">\n {tr('coolandlovely.storePiece.category', 'Category')}\n </dt>\n <dd className=\"text-text-primary\">{titleCase(piece.category)}</dd>\n </div>\n <div className=\"flex justify-between gap-2\">\n <dt className=\"text-text-secondary\">SKU</dt>\n <dd className=\"text-text-primary\">{piece.sku ?? '—'}</dd>\n </div>\n </dl>\n <p className=\"mt-3 text-xs text-text-secondary\">\n {tr(\n 'coolandlovely.storePiece.soldBy',\n 'Sold and shipped by {{brand}}. Your order appears in My Orders.',\n { brand: piece.brandName }\n )}\n </p>\n </GlassCard>\n </div>\n </div>\n <div className=\"mt-6\">\n <PricePanel key={piece.id} styleItemId={piece.id} currency={piece.currency} />\n </div>\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoCA,IAAM,IAAe,IAEf,IAAY,GAEZ,KAAQ,MACZ,EACE,iKACA,IACI,2EACA,yDACN,GAEI,IACJ;AAMF,SAAS,EACP,GACA,GACA,GACe;CAEf,OADK,EAAM,iBACJ,EAAM,SACV,QACE,OACE,MAAS,SAAS,EAAQ,QAAQ,QAAQ,OAC1C,MAAW,SAAS,EAAQ,UAAU,QAAQ,EACnD,CAAC,CACA,QAAQ,GAAK,MAAY,I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,OAAO;QAAQ,CAAA,CACrD;SACH;;MACJ,kBAAC,KAAD;OAAG,WAAU;iBACV,EACC,mCACA,mEACA,EAAE,OAAO,EAAM,UAAU,CAC3B;MACC,CAAA;KACM;MACR;KACF;MACL,kBAAC,OAAD;GAAK,WAAU;aACb,kBAAC,GAAD;IAA2B,aAAa,EAAM;IAAI,UAAU,EAAM;GAAW,GAA5D,EAAM,EAAsD;EAC1E,CAAA,CACK;;AAEhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"StyleItemDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/coolandlovely/pages/items/StyleItemDetailPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA0BH,wBAAgB,mBAAmB,gCA2QlC"}
1
+ {"version":3,"file":"StyleItemDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/coolandlovely/pages/items/StyleItemDetailPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA2BH,wBAAgB,mBAAmB,gCAkRlC"}