nexus-shared 1.0.6 → 1.0.8
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/USER-GUIDE.md +11 -2
- package/dist/index.cjs +1 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/USER-GUIDE.md
CHANGED
|
@@ -96,13 +96,22 @@ await HideLoader();
|
|
|
96
96
|
|
|
97
97
|
### Global layout (Next.js)
|
|
98
98
|
|
|
99
|
+
`next/font` must run in your app (not inside the pre-built package). Define the font in `app/layout.tsx` and pass `className` to `GlobalLayout`:
|
|
100
|
+
|
|
99
101
|
```tsx
|
|
100
|
-
import {
|
|
102
|
+
import { Inter } from "next/font/google";
|
|
103
|
+
import { DEFAULT_FONT_WEIGHTS, GlobalLayout, GetGlobalLayout } from "nexus.core";
|
|
104
|
+
|
|
105
|
+
const inter = Inter({ weight: DEFAULT_FONT_WEIGHTS, subsets: ["latin"] });
|
|
101
106
|
|
|
102
107
|
const globalLayout = GetGlobalLayout(/* … */);
|
|
103
108
|
|
|
104
109
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
105
|
-
return
|
|
110
|
+
return (
|
|
111
|
+
<GlobalLayout globalLayout={globalLayout} bodyClassName={inter.className}>
|
|
112
|
+
{children}
|
|
113
|
+
</GlobalLayout>
|
|
114
|
+
);
|
|
106
115
|
}
|
|
107
116
|
```
|
|
108
117
|
|
package/dist/index.cjs
CHANGED
|
@@ -2609,7 +2609,6 @@ var LayoutHelpers = ({ globalLayout }) => {
|
|
|
2609
2609
|
}, []);
|
|
2610
2610
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nexus-popup-container" });
|
|
2611
2611
|
};
|
|
2612
|
-
var inter = google.Inter({ weight: ["300", "400", "500", "600", "700", "800"], subsets: ["latin"] });
|
|
2613
2612
|
var GlobalLayout = async ({ children, globalLayout }) => {
|
|
2614
2613
|
return /* @__PURE__ */ jsxRuntime.jsxs("html", { lang: "en", children: [
|
|
2615
2614
|
/* @__PURE__ */ jsxRuntime.jsxs("head", { children: [
|
|
@@ -2620,7 +2619,7 @@ var GlobalLayout = async ({ children, globalLayout }) => {
|
|
|
2620
2619
|
/* @__PURE__ */ jsxRuntime.jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1.0" }),
|
|
2621
2620
|
/* @__PURE__ */ jsxRuntime.jsx("style", { id: "nexus-styles" })
|
|
2622
2621
|
] }),
|
|
2623
|
-
/* @__PURE__ */ jsxRuntime.jsxs("body", { className:
|
|
2622
|
+
/* @__PURE__ */ jsxRuntime.jsxs("body", { className: google.Inter({ weight: ["300", "400", "500", "600", "700", "800"], subsets: ["latin"] }).className, children: [
|
|
2624
2623
|
/* @__PURE__ */ jsxRuntime.jsx(LayoutHelpers, { globalLayout }),
|
|
2625
2624
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2626
2625
|
"div",
|