@clarify-labs/renderer 0.8.2 → 0.9.1
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.
- package/output/{ClarifyShell-BPv2bxI4.js → ClarifyShell-291_IXxJ.js} +240 -133
- package/output/ClarifyShell-291_IXxJ.js.map +1 -0
- package/output/{ClarifyShell-B74Fq4UU.cjs → ClarifyShell-DJ4fOVOd.cjs} +239 -132
- package/output/ClarifyShell-DJ4fOVOd.cjs.map +1 -0
- package/output/{OpenApiOperation-BMXfV15v.cjs → OpenApiOperation-3DUVruIO.cjs} +4 -4
- package/output/OpenApiOperation-3DUVruIO.cjs.map +1 -0
- package/output/{OpenApiOperation-fJ3QQOJX.js → OpenApiOperation-E8lSLsSK.js} +4 -4
- package/output/OpenApiOperation-E8lSLsSK.js.map +1 -0
- package/output/{PageActions-BwY7ierv.js → PageActions-DaXQgMYP.js} +14 -6
- package/output/PageActions-DaXQgMYP.js.map +1 -0
- package/output/{PageActions-DOKkt2zo.cjs → PageActions-GI1t-JrR.cjs} +14 -6
- package/output/PageActions-GI1t-JrR.cjs.map +1 -0
- package/output/app/SectionProvider.d.ts +1 -0
- package/output/client.cjs +3 -3
- package/output/client.js +3 -3
- package/output/index.cjs +4 -4
- package/output/index.js +4 -4
- package/output/preview.cjs +2 -2
- package/output/preview.js +2 -2
- package/output/{render-ZSckbg74.cjs → render-r9DclX3Y.cjs} +2 -2
- package/output/{render-ZSckbg74.cjs.map → render-r9DclX3Y.cjs.map} +1 -1
- package/output/{render-Cghgq1AQ.js → render-yBo2SUlA.js} +2 -2
- package/output/{render-Cghgq1AQ.js.map → render-yBo2SUlA.js.map} +1 -1
- package/output/server.cjs +2 -2
- package/output/server.js +2 -2
- package/package.json +1 -1
- package/output/ClarifyShell-B74Fq4UU.cjs.map +0 -1
- package/output/ClarifyShell-BPv2bxI4.js.map +0 -1
- package/output/OpenApiOperation-BMXfV15v.cjs.map +0 -1
- package/output/OpenApiOperation-fJ3QQOJX.js.map +0 -1
- package/output/PageActions-BwY7ierv.js.map +0 -1
- package/output/PageActions-DOKkt2zo.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as LocaleContext, C as themeCookieName, D as copyTextToClipboard, M as useConfig, N as useLocale, O as useBuiltInText, T as localizeHref, _ as getStoredLocalePreference, a as safeDecodeURIComponent, d as isSameRoutePath, f as normalizeRoutePath, g as useTheme, h as ThemeProvider, i as Navigation, j as OpenApisContext, k as ConfigContext, o as SectionProvider, p as resolveLocalizedText, r as Header, t as PageActionsProvider, w as isExternalHref, x as storeLocalePreference } from "./PageActions-
|
|
1
|
+
import { A as LocaleContext, C as themeCookieName, D as copyTextToClipboard, M as useConfig, N as useLocale, O as useBuiltInText, T as localizeHref, _ as getStoredLocalePreference, a as safeDecodeURIComponent, d as isSameRoutePath, f as normalizeRoutePath, g as useTheme, h as ThemeProvider, i as Navigation, j as OpenApisContext, k as ConfigContext, o as SectionProvider, p as resolveLocalizedText, r as Header, t as PageActionsProvider, w as isExternalHref, x as storeLocalePreference } from "./PageActions-DaXQgMYP.js";
|
|
2
2
|
import clsx from "clsx";
|
|
3
|
-
import { Component, Suspense, createContext, lazy, useContext, useEffect, useMemo, useState } from "react";
|
|
3
|
+
import { Component, Suspense, createContext, lazy, useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
4
4
|
import { Link, Route, Routes, useLocation, useNavigate } from "react-router-dom";
|
|
5
5
|
import { ChevronDown, ChevronLeft, ChevronRight, Settings, WandSparkles, X } from "lucide-react";
|
|
6
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -580,9 +580,9 @@ function PageSkeleton() {
|
|
|
580
580
|
//#endregion
|
|
581
581
|
//#region source/app/AppShell.tsx
|
|
582
582
|
function BannerSlot(props) {
|
|
583
|
-
const { activeBannerKey, dismissedBannerKey, onDismiss, config, locale } = props;
|
|
583
|
+
const { activeBannerKey, dismissedBannerKey, bannerResolved, onDismiss, config, locale } = props;
|
|
584
584
|
function DefaultBannerComponent() {
|
|
585
|
-
if (!(Boolean(config.banner) && dismissedBannerKey !== activeBannerKey)) return null;
|
|
585
|
+
if (!(bannerResolved && Boolean(config.banner) && dismissedBannerKey !== activeBannerKey)) return null;
|
|
586
586
|
return /* @__PURE__ */ jsx(PageBanner, {
|
|
587
587
|
currentLocale: locale,
|
|
588
588
|
onDismiss
|
|
@@ -683,6 +683,126 @@ function applyDocumentMetadata(config, route) {
|
|
|
683
683
|
setNamedMeta("description", route?.description ?? config.description);
|
|
684
684
|
setNamedMeta("keywords", route?.keywords?.join(", "));
|
|
685
685
|
}
|
|
686
|
+
function useRouteState(config, routes, navigation, pathname) {
|
|
687
|
+
const currentRoute = routeForPath(routes, pathname);
|
|
688
|
+
const explicitLocale = explicitLocaleForPath(config, pathname);
|
|
689
|
+
const storedLocale = storedLocaleForConfig(config);
|
|
690
|
+
const currentLocale = explicitLocale ?? storedLocale ?? fallbackLocale(config);
|
|
691
|
+
return {
|
|
692
|
+
currentRoute,
|
|
693
|
+
explicitLocale,
|
|
694
|
+
storedLocale,
|
|
695
|
+
currentLocale,
|
|
696
|
+
currentLocaleConfig: config.i18n?.locales.find((locale) => locale.code === currentLocale),
|
|
697
|
+
notFoundRoute: currentRoute ? void 0 : notFoundRouteForPath(routes, pathname, currentLocale),
|
|
698
|
+
currentNavigation: navigationForLocale(navigation, currentLocale, pathname),
|
|
699
|
+
sections: sectionsForRoute(currentRoute)
|
|
700
|
+
};
|
|
701
|
+
}
|
|
702
|
+
function useRenderedRoutes(routes, notFoundRoute) {
|
|
703
|
+
const renderRoutes = useMemo(() => routes.map((route) => ({
|
|
704
|
+
...route,
|
|
705
|
+
component: resolveRouteComponent(route)
|
|
706
|
+
})), [routes]);
|
|
707
|
+
return {
|
|
708
|
+
renderRoutes,
|
|
709
|
+
NotFoundRouteComponent: notFoundRoute ? renderRoutes.find((route) => isSameRoutePath(route.path, notFoundRoute.path))?.component : void 0
|
|
710
|
+
};
|
|
711
|
+
}
|
|
712
|
+
function emptySubscribe() {
|
|
713
|
+
return () => {};
|
|
714
|
+
}
|
|
715
|
+
function useStoredBannerDismissed(storageKey) {
|
|
716
|
+
return useSyncExternalStore(emptySubscribe, () => Boolean(storageKey && window.localStorage.getItem(storageKey) === "1"), () => false);
|
|
717
|
+
}
|
|
718
|
+
function useBannerState(config, currentLocale) {
|
|
719
|
+
const banner = config.banner;
|
|
720
|
+
const bannerContent = banner ? resolveLocalizedText(banner.content, currentLocale, config.i18n?.defaultLocale) : "";
|
|
721
|
+
const bannerStorageKey = banner && bannerContent ? `clarify:banner:dismissed:${config.title}:${bannerContent}` : void 0;
|
|
722
|
+
const storedBannerDismissed = useStoredBannerDismissed(banner?.dismissible ? bannerStorageKey : void 0);
|
|
723
|
+
const [dismissedBannerKey, setDismissedBannerKey] = useState();
|
|
724
|
+
const activeBannerKey = banner ? JSON.stringify(banner) : void 0;
|
|
725
|
+
return {
|
|
726
|
+
activeBannerKey,
|
|
727
|
+
bannerResolved: !banner?.dismissible || !storedBannerDismissed,
|
|
728
|
+
dismissedBannerKey,
|
|
729
|
+
hasBanner: Boolean(banner && bannerContent) && !storedBannerDismissed && dismissedBannerKey !== activeBannerKey,
|
|
730
|
+
dismissBanner: () => setDismissedBannerKey(activeBannerKey)
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
function useStoredLocalePreference(explicitLocale) {
|
|
734
|
+
useEffect(() => {
|
|
735
|
+
if (explicitLocale) storeLocalePreference(explicitLocale);
|
|
736
|
+
}, [explicitLocale]);
|
|
737
|
+
}
|
|
738
|
+
function useStoredLocaleRedirect(arg0) {
|
|
739
|
+
const { config, currentRoute, explicitLocale, location, navigate, pathname, storedLocale } = arg0;
|
|
740
|
+
useEffect(() => {
|
|
741
|
+
if (explicitLocale || !storedLocale || isDefaultLocale(config, storedLocale)) return;
|
|
742
|
+
const localizedPath = currentRoute?.alternates?.[storedLocale];
|
|
743
|
+
if (!localizedPath || isSameRoutePath(localizedPath, pathname)) return;
|
|
744
|
+
navigate(`${localizedPath}${location.search}${location.hash}`, { replace: true });
|
|
745
|
+
}, [
|
|
746
|
+
config,
|
|
747
|
+
currentRoute,
|
|
748
|
+
explicitLocale,
|
|
749
|
+
location.hash,
|
|
750
|
+
location.search,
|
|
751
|
+
navigate,
|
|
752
|
+
pathname,
|
|
753
|
+
storedLocale
|
|
754
|
+
]);
|
|
755
|
+
}
|
|
756
|
+
function useRouteScroll(location) {
|
|
757
|
+
useEffect(() => {
|
|
758
|
+
if (location.hash) {
|
|
759
|
+
scrollToHash(location.hash);
|
|
760
|
+
return;
|
|
761
|
+
}
|
|
762
|
+
window.scrollTo({
|
|
763
|
+
top: 0,
|
|
764
|
+
left: 0
|
|
765
|
+
});
|
|
766
|
+
window.requestAnimationFrame(() => {
|
|
767
|
+
window.dispatchEvent(new Event("scroll"));
|
|
768
|
+
});
|
|
769
|
+
}, [location.hash, location.pathname]);
|
|
770
|
+
}
|
|
771
|
+
function useDocumentLanguage(currentLocale, currentLocaleConfig) {
|
|
772
|
+
useEffect(() => {
|
|
773
|
+
if (!currentLocale) return;
|
|
774
|
+
document.documentElement.lang = currentLocale;
|
|
775
|
+
if (currentLocaleConfig?.dir) document.documentElement.dir = currentLocaleConfig.dir;
|
|
776
|
+
else document.documentElement.removeAttribute("dir");
|
|
777
|
+
}, [currentLocale, currentLocaleConfig?.dir]);
|
|
778
|
+
}
|
|
779
|
+
function useDocumentMetadata(config, route) {
|
|
780
|
+
useEffect(() => {
|
|
781
|
+
applyDocumentMetadata(config, route);
|
|
782
|
+
}, [config, route]);
|
|
783
|
+
}
|
|
784
|
+
function headerOffsetForLayout(hasTabs, hasBanner) {
|
|
785
|
+
if (hasTabs && hasBanner) return "10rem";
|
|
786
|
+
if (hasTabs) return "7rem";
|
|
787
|
+
if (hasBanner) return "6.5rem";
|
|
788
|
+
return "3.5rem";
|
|
789
|
+
}
|
|
790
|
+
function sidebarScrollClassName(hasTabs, hasBanner) {
|
|
791
|
+
const classNames = ["clarify-sidebar-scroll lg:sticky lg:z-30 lg:overflow-y-auto lg:pb-8"];
|
|
792
|
+
if (hasTabs && hasBanner) classNames.push("lg:top-40 lg:h-(--clarify-sidebar-height-with-tabs-and-banner) lg:pt-10");
|
|
793
|
+
else if (hasTabs) classNames.push("lg:top-28 lg:h-(--clarify-sidebar-height-with-tabs) lg:pt-10");
|
|
794
|
+
else if (hasBanner) classNames.push("lg:top-26 lg:h-(--clarify-sidebar-height-with-banner) lg:pt-10");
|
|
795
|
+
else classNames.push("lg:top-14 lg:h-(--clarify-sidebar-height) lg:pt-10");
|
|
796
|
+
return clsx(classNames);
|
|
797
|
+
}
|
|
798
|
+
function contentClassName(hasTabs, hasBanner) {
|
|
799
|
+
const classNames = ["clarify-content @container relative flex min-h-screen min-w-0 flex-col px-4 pb-12 sm:px-6 lg:px-8 xl:px-10"];
|
|
800
|
+
if (hasTabs && hasBanner) classNames.push("pt-26 lg:pt-40");
|
|
801
|
+
else if (hasTabs) classNames.push("pt-14 lg:pt-28");
|
|
802
|
+
else if (hasBanner) classNames.push("pt-26");
|
|
803
|
+
else classNames.push("pt-14");
|
|
804
|
+
return clsx(classNames);
|
|
805
|
+
}
|
|
686
806
|
function BuiltInNotFoundPage() {
|
|
687
807
|
const text = useBuiltInText();
|
|
688
808
|
return /* @__PURE__ */ jsxs("section", {
|
|
@@ -723,68 +843,129 @@ function AppShell(arg0) {
|
|
|
723
843
|
const location = useLocation();
|
|
724
844
|
const navigate = useNavigate();
|
|
725
845
|
const pathname = normalizeRoutePath(location.pathname);
|
|
726
|
-
const
|
|
727
|
-
const explicitLocale =
|
|
728
|
-
const storedLocale = storedLocaleForConfig(config);
|
|
729
|
-
const currentLocale = explicitLocale ?? storedLocale ?? fallbackLocale(config);
|
|
730
|
-
const currentLocaleConfig = config.i18n?.locales.find((locale) => locale.code === currentLocale);
|
|
731
|
-
const notFoundRoute = currentRoute ? void 0 : notFoundRouteForPath(routes, pathname, currentLocale);
|
|
846
|
+
const headerRef = useRef(null);
|
|
847
|
+
const { currentRoute, explicitLocale, storedLocale, currentLocale, currentLocaleConfig, notFoundRoute, currentNavigation, sections } = useRouteState(config, routes, navigation, pathname);
|
|
732
848
|
const text = useBuiltInText(currentLocale);
|
|
733
|
-
const
|
|
734
|
-
const sections = sectionsForRoute(currentRoute);
|
|
735
|
-
const [dismissedBannerKey, setDismissedBannerKey] = useState();
|
|
736
|
-
const activeBannerKey = config.banner ? JSON.stringify(config.banner) : void 0;
|
|
737
|
-
const hasBanner = Boolean(config.banner) && dismissedBannerKey !== activeBannerKey;
|
|
849
|
+
const { activeBannerKey, bannerResolved, dismissedBannerKey, hasBanner, dismissBanner } = useBannerState(config, currentLocale);
|
|
738
850
|
const hasTabs = Boolean(currentNavigation.tabs?.length);
|
|
739
|
-
const renderRoutes =
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
})), [routes]);
|
|
743
|
-
const NotFoundRouteComponent = notFoundRoute ? renderRoutes.find((route) => isSameRoutePath(route.path, notFoundRoute.path))?.component : void 0;
|
|
744
|
-
useEffect(() => {
|
|
745
|
-
if (explicitLocale) storeLocalePreference(explicitLocale);
|
|
746
|
-
}, [explicitLocale]);
|
|
747
|
-
useEffect(() => {
|
|
748
|
-
if (explicitLocale || !storedLocale || isDefaultLocale(config, storedLocale)) return;
|
|
749
|
-
const localizedPath = currentRoute?.alternates?.[storedLocale];
|
|
750
|
-
if (!localizedPath || isSameRoutePath(localizedPath, pathname)) return;
|
|
751
|
-
navigate(`${localizedPath}${location.search}${location.hash}`, { replace: true });
|
|
752
|
-
}, [
|
|
851
|
+
const { renderRoutes, NotFoundRouteComponent } = useRenderedRoutes(routes, notFoundRoute);
|
|
852
|
+
useStoredLocalePreference(explicitLocale);
|
|
853
|
+
useStoredLocaleRedirect({
|
|
753
854
|
config,
|
|
754
855
|
currentRoute,
|
|
755
856
|
explicitLocale,
|
|
756
|
-
location
|
|
757
|
-
location.search,
|
|
857
|
+
location,
|
|
758
858
|
navigate,
|
|
759
859
|
pathname,
|
|
760
860
|
storedLocale
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
861
|
+
});
|
|
862
|
+
useRouteScroll(location);
|
|
863
|
+
useDocumentLanguage(currentLocale, currentLocaleConfig);
|
|
864
|
+
useDocumentMetadata(config, currentRoute ?? notFoundRoute);
|
|
865
|
+
const layoutStyle = { "--clarify-header-offset": headerOffsetForLayout(hasTabs, hasBanner) };
|
|
866
|
+
function renderBannerSlot() {
|
|
867
|
+
return /* @__PURE__ */ jsx(BannerSlot, {
|
|
868
|
+
activeBannerKey,
|
|
869
|
+
dismissedBannerKey,
|
|
870
|
+
bannerResolved,
|
|
871
|
+
onDismiss: dismissBanner,
|
|
872
|
+
config,
|
|
873
|
+
locale: currentLocale
|
|
770
874
|
});
|
|
771
|
-
|
|
772
|
-
|
|
875
|
+
}
|
|
876
|
+
function renderHeader() {
|
|
877
|
+
return /* @__PURE__ */ jsx(Header, {
|
|
878
|
+
ref: headerRef,
|
|
879
|
+
config,
|
|
880
|
+
navigation: currentNavigation.items,
|
|
881
|
+
tabs: currentNavigation.tabs,
|
|
882
|
+
routes,
|
|
883
|
+
currentLocale,
|
|
884
|
+
currentRoute,
|
|
885
|
+
banner: renderBannerSlot()
|
|
773
886
|
});
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
887
|
+
}
|
|
888
|
+
function renderSidebar() {
|
|
889
|
+
return /* @__PURE__ */ jsx("aside", {
|
|
890
|
+
"data-pagefind-ignore": true,
|
|
891
|
+
className: "clarify-sidebar hidden lg:block lg:self-stretch lg:bg-(--clarify-theme-tokens-colors-background) lg:px-5 xl:px-6",
|
|
892
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
893
|
+
className: sidebarScrollClassName(hasTabs, hasBanner),
|
|
894
|
+
children: /* @__PURE__ */ jsx(Navigation, { navigation: currentNavigation.items })
|
|
895
|
+
})
|
|
896
|
+
});
|
|
897
|
+
}
|
|
898
|
+
function renderRouteElements() {
|
|
899
|
+
return /* @__PURE__ */ jsxs(Routes, { children: [renderRoutes.map((route) => /* @__PURE__ */ jsx(Route, {
|
|
900
|
+
path: route.path,
|
|
901
|
+
element: /* @__PURE__ */ jsx(route.component, {})
|
|
902
|
+
}, route.path)), /* @__PURE__ */ jsx(Route, {
|
|
903
|
+
path: "*",
|
|
904
|
+
element: /* @__PURE__ */ jsx(NotFoundRouteElement, { component: NotFoundRouteComponent })
|
|
905
|
+
})] });
|
|
906
|
+
}
|
|
907
|
+
function renderMain() {
|
|
908
|
+
return /* @__PURE__ */ jsx("main", {
|
|
909
|
+
className: "clarify-main min-w-0 flex-auto",
|
|
910
|
+
"data-pagefind-body": true,
|
|
911
|
+
children: /* @__PURE__ */ jsx(PageErrorBoundary, {
|
|
912
|
+
title: text("renderError.title"),
|
|
913
|
+
description: text("renderError.description"),
|
|
914
|
+
reloadLabel: text("renderError.reload"),
|
|
915
|
+
detailsLabel: text("renderError.details"),
|
|
916
|
+
pathLabel: text("renderError.path"),
|
|
917
|
+
typeLabel: text("renderError.type"),
|
|
918
|
+
messageLabel: text("renderError.message"),
|
|
919
|
+
stackLabel: text("renderError.stack"),
|
|
920
|
+
componentStackLabel: text("renderError.componentStack"),
|
|
921
|
+
timestampLabel: text("renderError.timestamp"),
|
|
922
|
+
copyLabel: text("actions.copy"),
|
|
923
|
+
copiedLabel: text("actions.copied"),
|
|
924
|
+
path: pathname,
|
|
925
|
+
children: /* @__PURE__ */ jsx(Suspense, {
|
|
926
|
+
fallback: /* @__PURE__ */ jsx(PageSkeleton, {}),
|
|
927
|
+
children: renderRouteElements()
|
|
928
|
+
})
|
|
929
|
+
}, pathname)
|
|
930
|
+
});
|
|
931
|
+
}
|
|
932
|
+
function renderFooter() {
|
|
933
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
934
|
+
/* @__PURE__ */ jsx(RuntimeSlot, { name: "page.footer.before" }),
|
|
935
|
+
/* @__PURE__ */ jsx(RuntimeSlot, {
|
|
936
|
+
name: "page.footer.replace",
|
|
937
|
+
default: DefaultFooterComponent
|
|
938
|
+
}),
|
|
939
|
+
/* @__PURE__ */ jsx("div", {
|
|
940
|
+
className: "flex justify-end",
|
|
941
|
+
children: /* @__PURE__ */ jsx(BuiltWithClarify, {})
|
|
942
|
+
})
|
|
943
|
+
] });
|
|
944
|
+
}
|
|
945
|
+
function renderContent() {
|
|
946
|
+
return /* @__PURE__ */ jsx("div", {
|
|
947
|
+
className: contentClassName(hasTabs, hasBanner),
|
|
948
|
+
children: /* @__PURE__ */ jsxs(PageActionsProvider, {
|
|
949
|
+
route: currentRoute,
|
|
950
|
+
routePrefix: config.routePrefix,
|
|
951
|
+
children: [
|
|
952
|
+
renderMain(),
|
|
953
|
+
/* @__PURE__ */ jsx(PageNavigation, {
|
|
954
|
+
navigation: currentNavigation.items,
|
|
955
|
+
currentRoute
|
|
956
|
+
}),
|
|
957
|
+
renderFooter()
|
|
958
|
+
]
|
|
959
|
+
})
|
|
960
|
+
});
|
|
961
|
+
}
|
|
962
|
+
function renderLayout() {
|
|
963
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
964
|
+
className: "clarify-layout mx-auto grid w-full max-w-(--clarify-theme-layout-max-width) grid-cols-1 lg:grid-cols-(--clarify-layout-sidebar-grid) xl:grid-cols-(--clarify-layout-sidebar-grid-wide)",
|
|
965
|
+
style: layoutStyle,
|
|
966
|
+
children: [renderSidebar(), renderContent()]
|
|
967
|
+
});
|
|
968
|
+
}
|
|
788
969
|
return /* @__PURE__ */ jsx(LocaleContext.Provider, {
|
|
789
970
|
value: currentLocale,
|
|
790
971
|
children: /* @__PURE__ */ jsx(RuntimeSlotsProvider, {
|
|
@@ -792,82 +973,8 @@ function AppShell(arg0) {
|
|
|
792
973
|
route: currentRoute,
|
|
793
974
|
children: /* @__PURE__ */ jsxs(SectionProvider, {
|
|
794
975
|
sections,
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
navigation: currentNavigation.items,
|
|
798
|
-
tabs: currentNavigation.tabs,
|
|
799
|
-
routes,
|
|
800
|
-
currentLocale,
|
|
801
|
-
currentRoute,
|
|
802
|
-
banner: /* @__PURE__ */ jsx(BannerSlot, {
|
|
803
|
-
activeBannerKey,
|
|
804
|
-
dismissedBannerKey,
|
|
805
|
-
onDismiss: () => setDismissedBannerKey(activeBannerKey),
|
|
806
|
-
config,
|
|
807
|
-
locale: currentLocale
|
|
808
|
-
})
|
|
809
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
810
|
-
className: "clarify-layout mx-auto grid w-full max-w-(--clarify-theme-layout-max-width) grid-cols-1 lg:grid-cols-(--clarify-layout-sidebar-grid) xl:grid-cols-(--clarify-layout-sidebar-grid-wide)",
|
|
811
|
-
style: { "--clarify-header-offset": hasTabs && hasBanner ? "10rem" : hasTabs && !hasBanner ? "7rem" : !hasTabs && hasBanner ? "6.5rem" : "3.5rem" },
|
|
812
|
-
children: [/* @__PURE__ */ jsx("aside", {
|
|
813
|
-
"data-pagefind-ignore": true,
|
|
814
|
-
className: "clarify-sidebar hidden lg:block lg:self-stretch lg:bg-(--clarify-theme-tokens-colors-background) lg:px-5 xl:px-6",
|
|
815
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
816
|
-
className: clsx("clarify-sidebar-scroll lg:sticky lg:z-30 lg:overflow-y-auto lg:pb-8", hasTabs && hasBanner && "lg:top-40 lg:h-(--clarify-sidebar-height-with-tabs-and-banner) lg:pt-10", hasTabs && !hasBanner && "lg:top-28 lg:h-(--clarify-sidebar-height-with-tabs) lg:pt-10", !hasTabs && hasBanner && "lg:top-26 lg:h-(--clarify-sidebar-height-with-banner) lg:pt-10", !hasTabs && !hasBanner && "lg:top-14 lg:h-(--clarify-sidebar-height) lg:pt-10"),
|
|
817
|
-
children: /* @__PURE__ */ jsx(Navigation, { navigation: currentNavigation.items })
|
|
818
|
-
})
|
|
819
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
820
|
-
className: clsx("clarify-content @container relative flex min-h-screen min-w-0 flex-col px-4 pb-12 sm:px-6 lg:px-8 xl:px-10", hasTabs && hasBanner && "pt-26 lg:pt-40", hasTabs && !hasBanner && "pt-14 lg:pt-28", !hasTabs && hasBanner && "pt-26", !hasTabs && !hasBanner && "pt-14"),
|
|
821
|
-
children: /* @__PURE__ */ jsxs(PageActionsProvider, {
|
|
822
|
-
route: currentRoute,
|
|
823
|
-
routePrefix: config.routePrefix,
|
|
824
|
-
children: [
|
|
825
|
-
/* @__PURE__ */ jsx("main", {
|
|
826
|
-
className: "clarify-main min-w-0 flex-auto",
|
|
827
|
-
"data-pagefind-body": true,
|
|
828
|
-
children: /* @__PURE__ */ jsx(PageErrorBoundary, {
|
|
829
|
-
title: text("renderError.title"),
|
|
830
|
-
description: text("renderError.description"),
|
|
831
|
-
reloadLabel: text("renderError.reload"),
|
|
832
|
-
detailsLabel: text("renderError.details"),
|
|
833
|
-
pathLabel: text("renderError.path"),
|
|
834
|
-
typeLabel: text("renderError.type"),
|
|
835
|
-
messageLabel: text("renderError.message"),
|
|
836
|
-
stackLabel: text("renderError.stack"),
|
|
837
|
-
componentStackLabel: text("renderError.componentStack"),
|
|
838
|
-
timestampLabel: text("renderError.timestamp"),
|
|
839
|
-
copyLabel: text("actions.copy"),
|
|
840
|
-
copiedLabel: text("actions.copied"),
|
|
841
|
-
path: pathname,
|
|
842
|
-
children: /* @__PURE__ */ jsx(Suspense, {
|
|
843
|
-
fallback: /* @__PURE__ */ jsx(PageSkeleton, {}),
|
|
844
|
-
children: /* @__PURE__ */ jsxs(Routes, { children: [renderRoutes.map((route) => /* @__PURE__ */ jsx(Route, {
|
|
845
|
-
path: route.path,
|
|
846
|
-
element: /* @__PURE__ */ jsx(route.component, {})
|
|
847
|
-
}, route.path)), /* @__PURE__ */ jsx(Route, {
|
|
848
|
-
path: "*",
|
|
849
|
-
element: /* @__PURE__ */ jsx(NotFoundRouteElement, { component: NotFoundRouteComponent })
|
|
850
|
-
})] })
|
|
851
|
-
})
|
|
852
|
-
}, pathname)
|
|
853
|
-
}),
|
|
854
|
-
/* @__PURE__ */ jsx(PageNavigation, {
|
|
855
|
-
navigation: currentNavigation.items,
|
|
856
|
-
currentRoute
|
|
857
|
-
}),
|
|
858
|
-
/* @__PURE__ */ jsx(RuntimeSlot, { name: "page.footer.before" }),
|
|
859
|
-
/* @__PURE__ */ jsx(RuntimeSlot, {
|
|
860
|
-
name: "page.footer.replace",
|
|
861
|
-
default: DefaultFooterComponent
|
|
862
|
-
}),
|
|
863
|
-
/* @__PURE__ */ jsx("div", {
|
|
864
|
-
className: "flex justify-end",
|
|
865
|
-
children: /* @__PURE__ */ jsx(BuiltWithClarify, {})
|
|
866
|
-
})
|
|
867
|
-
]
|
|
868
|
-
})
|
|
869
|
-
})]
|
|
870
|
-
})]
|
|
976
|
+
headerRef,
|
|
977
|
+
children: [renderHeader(), renderLayout()]
|
|
871
978
|
})
|
|
872
979
|
})
|
|
873
980
|
});
|
|
@@ -2155,4 +2262,4 @@ function ClarifyShell(props) {
|
|
|
2155
2262
|
//#endregion
|
|
2156
2263
|
export { themeBootstrapScript as a, AppShell as c, BuiltWithClarify as d, RuntimeSlot as f, useSlot as h, themeEditorPresets as i, PageFooter as l, SlotProvider as m, ThemeEditor as n, themePresets as o, RuntimeSlotsProvider as p, applyThemeVariables as r, themeStorageKey as s, ClarifyShell as t, PageBanner as u };
|
|
2157
2264
|
|
|
2158
|
-
//# sourceMappingURL=ClarifyShell-
|
|
2265
|
+
//# sourceMappingURL=ClarifyShell-291_IXxJ.js.map
|