first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
"use strict";
'use client';
Object.defineProperty(exports, "__esModule", { value: true });
exports.PreviewRouteContext = void 0;
exports.usePreviewInfo = usePreviewInfo;
exports.useIsPreview = useIsPreview;
const react_1 = require("react");
exports.PreviewRouteContext = (0, react_1.createContext)(undefined);
/**
* Returns information about the current route if it is displayed in preview mode.
*/
function usePreviewInfo() {
const paramsContext = (0, react_1.use)(exports.PreviewRouteContext);
return {
isPreview: !!paramsContext,
...paramsContext,
};
}
/**
* Hook to determine if the current route is rendered inside a preview.
*
* @returns {boolean} - True if the current route is rendered inside a preview, false otherwise.
*/
function useIsPreview() {
const { isPreview } = usePreviewInfo();
return isPreview;
}
//# sourceMappingURL=PreviewRouteContext.js.map