@nuvio/overlay 1.1.0 → 2.0.0
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/dist/NuvioNextShell.d.ts +12 -0
- package/dist/NuvioNextShell.js +26 -0
- package/dist/chunk-52TVZXIP.js +8976 -0
- package/dist/index.css +16 -0
- package/dist/index.js +5 -8949
- package/dist/style.css +21 -0
- package/package.json +17 -5
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Dev-only overlay shell for Next.js App/Pages Router.
|
|
5
|
+
* Use in root layout or `_app` — file is a Client Component (`"use client"`).
|
|
6
|
+
*
|
|
7
|
+
* Light-DOM chrome: Next webpack bundles overlay CSS (see `@nuvio/overlay/style.css` in layout).
|
|
8
|
+
* Client-only mount avoids SSR hydration mismatches on WS status / localStorage.
|
|
9
|
+
*/
|
|
10
|
+
declare function NuvioNextShell(): ReactElement | null;
|
|
11
|
+
|
|
12
|
+
export { NuvioNextShell };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
NuvioDevShellInner
|
|
4
|
+
} from "./chunk-52TVZXIP.js";
|
|
5
|
+
|
|
6
|
+
// src/NuvioNextShell.tsx
|
|
7
|
+
import { usePathname } from "next/navigation";
|
|
8
|
+
import { useEffect, useState } from "react";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
function NuvioNextShell() {
|
|
11
|
+
const [mounted, setMounted] = useState(false);
|
|
12
|
+
const pathname = usePathname();
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
setMounted(true);
|
|
15
|
+
}, []);
|
|
16
|
+
if (process.env.NODE_ENV === "production") {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
if (!mounted) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return /* @__PURE__ */ jsx(NuvioDevShellInner, { chromeMount: "light", routePathname: pathname ?? "/" });
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
NuvioNextShell
|
|
26
|
+
};
|