Files
klz-cables.com/.pnpm-store/v10/files/07/d17395addbb710d439084a3cff0d25e084032eb8befcd86d49f2ed65b64aae96260a0ef2b356193b1c61b1d97e6d0122faf6eedc35d2c0f18d6255a5b365e7
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

55 lines
1.7 KiB
Plaintext

'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import { useLivePreviewContext } from '../../../providers/LivePreview/context.js';
export const DeviceContainer = props => {
const $ = _c(6);
const {
children
} = props;
const {
breakpoint,
breakpoints,
size,
zoom
} = useLivePreviewContext();
const foundBreakpoint = breakpoint && breakpoints?.find(bp => bp.name === breakpoint);
let x = "0";
let margin = "0";
if (foundBreakpoint && breakpoint !== "responsive") {
x = "-50%";
if (typeof zoom === "number" && typeof size.width === "number" && typeof size.height === "number") {
const scaledWidth = size.width / zoom;
const difference = scaledWidth - size.width;
x = `${difference / 2}px`;
margin = "0 auto";
}
}
const t0 = foundBreakpoint && foundBreakpoint?.name !== "responsive" ? `${size?.height / (typeof zoom === "number" ? zoom : 1)}px` : typeof zoom === "number" ? `${100 / zoom}%` : "100%";
const t1 = `translate3d(${x}, 0, 0)`;
const t2 = foundBreakpoint && foundBreakpoint?.name !== "responsive" ? `${size?.width / (typeof zoom === "number" ? zoom : 1)}px` : typeof zoom === "number" ? `${100 / zoom}%` : "100%";
let t3;
if ($[0] !== children || $[1] !== margin || $[2] !== t0 || $[3] !== t1 || $[4] !== t2) {
t3 = _jsx("div", {
style: {
height: t0,
margin,
transform: t1,
width: t2
},
children
});
$[0] = children;
$[1] = margin;
$[2] = t0;
$[3] = t1;
$[4] = t2;
$[5] = t3;
} else {
t3 = $[5];
}
return t3;
};
//# sourceMappingURL=index.js.map