@povio/ui 3.4.0-rc.28 → 3.4.0-rc.29
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.
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { n as DrawerProps } from "../Drawer-DnSLe85M.js";
|
|
2
2
|
//#region src/components/overlays/Drawer/Drawer.lazy.d.ts
|
|
3
|
+
/** Starts loading the Drawer renderer before the Drawer is opened. */
|
|
4
|
+
declare const preloadDrawer: () => Promise<void>;
|
|
3
5
|
declare const Drawer: ({ isOpen, onOpenChange, trigger, ...props }: DrawerProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
6
|
//#endregion
|
|
5
|
-
export { Drawer, type DrawerProps };
|
|
7
|
+
export { Drawer, type DrawerProps, preloadDrawer };
|
|
@@ -3,7 +3,12 @@ import { Suspense, lazy, useEffect, useState } from "react";
|
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/overlays/Drawer/Drawer.lazy.tsx
|
|
6
|
-
|
|
6
|
+
let drawerModulePromise;
|
|
7
|
+
let drawerPreloadPromise;
|
|
8
|
+
const loadDrawer = () => drawerModulePromise ??= import("../Drawer-BkPPB5DQ.js").then((n) => n.n);
|
|
9
|
+
const DrawerRenderer = lazy(() => loadDrawer().then(({ Drawer }) => ({ default: Drawer })));
|
|
10
|
+
/** Starts loading the Drawer renderer before the Drawer is opened. */
|
|
11
|
+
const preloadDrawer = () => drawerPreloadPromise ??= loadDrawer().then(() => void 0);
|
|
7
12
|
const Drawer = (t0) => {
|
|
8
13
|
const $ = c(22);
|
|
9
14
|
let isOpen;
|
|
@@ -86,4 +91,4 @@ const Drawer = (t0) => {
|
|
|
86
91
|
return t5;
|
|
87
92
|
};
|
|
88
93
|
//#endregion
|
|
89
|
-
export { Drawer };
|
|
94
|
+
export { Drawer, preloadDrawer };
|