Files
klz-cables.com/.pnpm-store/v10/files/d4/4f9f819faac873d61ba81471f6839c7261a8878fde626fecb2e3a94137b302d679cf1bba20c51cc0491c614caa8bbd0ad98260fe645f5b0da386d22a562f8d
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

62 lines
1.4 KiB
Plaintext

'use client';
import { createContext, use } from 'react';
export const LivePreviewContext = createContext({
appIsReady: false,
breakpoint: undefined,
breakpoints: undefined,
iframeRef: undefined,
isLivePreviewEnabled: undefined,
isLivePreviewing: false,
isPopupOpen: false,
isPreviewEnabled: undefined,
measuredDeviceSize: {
height: 0,
width: 0
},
openPopupWindow: () => {},
popupRef: undefined,
previewURL: undefined,
previewWindowType: 'iframe',
setAppIsReady: () => {},
setBreakpoint: () => {},
setHeight: () => {},
setIsLivePreviewing: () => {},
setLoadedURL: () => {},
setMeasuredDeviceSize: () => {},
setPreviewURL: () => {},
setPreviewWindowType: () => {},
setSize: () => {},
setToolbarPosition: () => {},
setURL: () => {},
setWidth: () => {},
setZoom: () => {},
size: {
height: 0,
width: 0
},
toolbarPosition: {
x: 0,
y: 0
},
typeofLivePreviewURL: undefined,
url: undefined,
zoom: 1
});
export const useLivePreviewContext = () => use(LivePreviewContext);
/**
* Hook to access live preview context values. Separated to prevent breaking changes. In the future this hook can be removed in favour of just using the LivePreview one.
*/
export const usePreviewURL = () => {
const {
isPreviewEnabled,
previewURL,
setPreviewURL
} = use(LivePreviewContext);
return {
isPreviewEnabled,
previewURL,
setPreviewURL
};
};
//# sourceMappingURL=context.js.map