@thefittingroom/shop-ui 5.0.35 → 5.0.37

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 (2) hide show
  1. package/dist/index.js +53 -18
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -19423,6 +19423,17 @@ void instance.use(initReactI18next).init({
19423
19423
  fr: {
19424
19424
  translation: fr
19425
19425
  }
19426
+ },
19427
+ interpolation: {
19428
+ // React already escapes children as text at render time — leaving
19429
+ // i18next's default HTML-entity escaping on double-encodes any
19430
+ // interpolated value that happens to contain '<', '>', '/', '&',
19431
+ // '"' or "'". Manifested as e.g. "Recommended Size: S&#x2F;32" for
19432
+ // container parent-size labels like "S/32". Turning i18next's
19433
+ // escape off is safe because every consumer (LinkT, TextT,
19434
+ // ButtonT) drops the translated string into a React children
19435
+ // slot, not innerHTML.
19436
+ escapeValue: false
19426
19437
  }
19427
19438
  });
19428
19439
  var jsx2 = function jsx3(type, props) {
@@ -46063,18 +46074,31 @@ function QuickViewOverlay() {
46063
46074
  }
46064
46075
  return entry;
46065
46076
  }, [storeProductData]);
46066
- const containerHasTuckableChild = reactExports.useMemo(() => {
46077
+ const [containerHasTuckableChild, setContainerHasTuckableChild] = reactExports.useState(false);
46078
+ reactExports.useEffect(() => {
46067
46079
  if (!loadedProduct?.container) {
46068
- return false;
46069
- }
46070
- const index = peekStyleCategoryIndex();
46071
- if (!index) {
46072
- return false;
46080
+ setContainerHasTuckableChild(false);
46081
+ return;
46073
46082
  }
46074
- return loadedProduct.container.children.some((c) => {
46075
- const cat = index.byName(String(c.style_category_name));
46076
- return !!cat?.tuckable;
46083
+ const container = loadedProduct.container;
46084
+ let cancelled = false;
46085
+ loadStyleCategoryIndex().then((index) => {
46086
+ if (cancelled) {
46087
+ return;
46088
+ }
46089
+ const hasTuckable = container.children.some((c) => {
46090
+ const cat = index.byName(String(c.style_category_name));
46091
+ return !!cat?.tuckable;
46092
+ });
46093
+ setContainerHasTuckableChild(hasTuckable);
46094
+ }).catch((error) => {
46095
+ logger$5.logError("failed to load style category index for container tuck check", {
46096
+ error
46097
+ });
46077
46098
  });
46099
+ return () => {
46100
+ cancelled = true;
46101
+ };
46078
46102
  }, [loadedProduct]);
46079
46103
  const handleToggleContainerUntucked = reactExports.useCallback(() => {
46080
46104
  setContainerUntucked((prev2) => !prev2);
@@ -46318,7 +46342,10 @@ function MobileLayout({
46318
46342
  onChangeColor,
46319
46343
  onChangeSize,
46320
46344
  onAddToCart,
46321
- onSignOut
46345
+ onSignOut,
46346
+ containerTuckable,
46347
+ containerUntucked,
46348
+ onToggleUntuck
46322
46349
  }) {
46323
46350
  const {
46324
46351
  snap: contentView,
@@ -46451,7 +46478,7 @@ function MobileLayout({
46451
46478
  /* @__PURE__ */ jsx$1("div", { css: css2.recommendedSizeContainer, children: /* @__PURE__ */ jsx$1(RecommendedSizeText, { loadedProductData, textCss: css2.recommendedSizeText }) })
46452
46479
  ] }),
46453
46480
  aboveContentNode,
46454
- /* @__PURE__ */ jsx$1("div", { css: css2.contentContainer, children: /* @__PURE__ */ jsx$1(Content, { loadedProductData, selectedColorSizeRecord, availableColorLabels, selectedColorLabel, selectedSizeLabel, onChangeContentView: setContentView, onChangeColor, onChangeSize, onAddToCart, onSignOut }) })
46481
+ /* @__PURE__ */ jsx$1("div", { css: css2.contentContainer, children: /* @__PURE__ */ jsx$1(Content, { loadedProductData, selectedColorSizeRecord, availableColorLabels, selectedColorLabel, selectedSizeLabel, onChangeContentView: setContentView, onChangeColor, onChangeSize, onAddToCart, onSignOut, containerTuckable, containerUntucked, onToggleUntuck }) })
46455
46482
  ] }) })
46456
46483
  ] });
46457
46484
  }
@@ -46489,7 +46516,10 @@ function MobileContentExpanded({
46489
46516
  onChangeContentView,
46490
46517
  onChangeColor,
46491
46518
  onChangeSize,
46492
- onAddToCart
46519
+ onAddToCart,
46520
+ containerTuckable,
46521
+ containerUntucked,
46522
+ onToggleUntuck
46493
46523
  }) {
46494
46524
  const css2 = useCss((_theme) => ({
46495
46525
  selectSizeLabelContainer: {
@@ -46536,7 +46566,8 @@ function MobileContentExpanded({
46536
46566
  /* @__PURE__ */ jsx$1("div", { css: css2.itemFitDetailsContainer, children: /* @__PURE__ */ jsx$1(ItemFitDetails, { loadedProductData, selectedSizeLabel }) }),
46537
46567
  /* @__PURE__ */ jsxs("div", { css: css2.buttonContainer, children: [
46538
46568
  /* @__PURE__ */ jsx$1(AddToCartButton, { onClick: onAddToCart }),
46539
- /* @__PURE__ */ jsx$1(FittingRoomToggleButton, {})
46569
+ /* @__PURE__ */ jsx$1(FittingRoomToggleButton, {}),
46570
+ containerTuckable ? /* @__PURE__ */ jsx$1(ContainerTuckToggleButton, { untucked: containerUntucked, onToggle: onToggleUntuck }) : null
46540
46571
  ] }),
46541
46572
  /* @__PURE__ */ jsx$1("div", { css: css2.productDetailsContainer, children: /* @__PURE__ */ jsx$1(LinkT, { variant: "base", css: css2.productDetailsText, t: "quick-view.view_product_details", onClick: handleProductDetailsClick }) })
46542
46573
  ] });
@@ -46551,7 +46582,10 @@ function MobileContentFull({
46551
46582
  onChangeColor,
46552
46583
  onChangeSize,
46553
46584
  onAddToCart,
46554
- onSignOut
46585
+ onSignOut,
46586
+ containerTuckable,
46587
+ containerUntucked,
46588
+ onToggleUntuck
46555
46589
  }) {
46556
46590
  const [fitChartOpen, setFitChartOpen] = reactExports.useState(false);
46557
46591
  const css2 = useCss((_theme) => ({
@@ -46635,7 +46669,8 @@ function MobileContentFull({
46635
46669
  /* @__PURE__ */ jsx$1("div", { css: css2.colorSelectorContainer, children: /* @__PURE__ */ jsx$1(ColorSelector, { availableColorLabels, selectedColorLabel, onChangeColor }) }),
46636
46670
  /* @__PURE__ */ jsxs("div", { css: css2.buttonContainer, children: [
46637
46671
  /* @__PURE__ */ jsx$1(AddToCartButton, { onClick: onAddToCart }),
46638
- /* @__PURE__ */ jsx$1(FittingRoomToggleButton, {})
46672
+ /* @__PURE__ */ jsx$1(FittingRoomToggleButton, {}),
46673
+ containerTuckable ? /* @__PURE__ */ jsx$1(ContainerTuckToggleButton, { untucked: containerUntucked, onToggle: onToggleUntuck }) : null
46639
46674
  ] }),
46640
46675
  /* @__PURE__ */ jsx$1("div", { css: css2.productDetailsContainer, children: /* @__PURE__ */ jsx$1(LinkT, { variant: "base", css: css2.productDetailsText, t: "quick-view.hide_product_details", onClick: handleProductDetailsClick }) }),
46641
46676
  /* @__PURE__ */ jsx$1("div", { css: css2.priceContainer, children: /* @__PURE__ */ jsx$1(Text, { variant: "base", css: css2.priceText, children: selectedColorSizeRecord.priceFormatted }) }),
@@ -48062,9 +48097,9 @@ const SHARED_CONFIG = {
48062
48097
  appGooglePlayUrl: "https://play.google.com/store/apps/details?id=com.thefittingroom.marketplace"
48063
48098
  },
48064
48099
  build: {
48065
- version: `${"5.0.35"}`,
48066
- commitHash: `${"1640850"}`,
48067
- date: `${"2026-07-18T07:33:00.590Z"}`
48100
+ version: `${"5.0.37"}`,
48101
+ commitHash: `${"ddb6050"}`,
48102
+ date: `${"2026-07-18T08:43:24.829Z"}`
48068
48103
  }
48069
48104
  };
48070
48105
  const CONFIGS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thefittingroom/shop-ui",
3
- "version": "5.0.35",
3
+ "version": "5.0.37",
4
4
  "description": "the fitting room UI library",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",