@robindoc/next 0.0.0-experimental-518bfd4 → 0.0.0-experimental-a217ca0
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,3 +1,18 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Next.js navigation provider for Robindoc.
|
|
4
|
+
* Wraps the app to provide Next.js-specific navigation context (usePathname, Link).
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { NavigationProvider } from "@robindoc/next";
|
|
9
|
+
*
|
|
10
|
+
* export default function Layout({ children }) {
|
|
11
|
+
* return <NavigationProvider>{children}</NavigationProvider>;
|
|
12
|
+
* }
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @see {@link https://robindoc.com/docs/getting-started/nextjs-integration Next.js integration}
|
|
16
|
+
*/
|
|
2
17
|
export declare const NavigationProvider: React.FC<React.PropsWithChildren>;
|
|
3
18
|
//# sourceMappingURL=navigation-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-provider.d.ts","sourceRoot":"","sources":["../src/navigation-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAEhE,CAAC"}
|
|
1
|
+
{"version":3,"file":"navigation-provider.d.ts","sourceRoot":"","sources":["../src/navigation-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAEhE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-provider.js","sources":["../src/navigation-provider.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { usePathname } from \"next/navigation\";\nimport Link from \"next/link\";\n\nimport { NavigationContext } from \"robindoc/lib/client\";\n\nexport const NavigationProvider: React.FC<React.PropsWithChildren> = ({ children }) => {\n return <NavigationContext.Provider value={{ usePathname, link: Link }}>{children}</NavigationContext.Provider>;\n};\n"],"names":["NavigationProvider","children","React","NavigationContext","Provider","value","usePathname","link","Link"],"mappings":";
|
|
1
|
+
{"version":3,"file":"navigation-provider.js","sources":["../src/navigation-provider.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { usePathname } from \"next/navigation\";\nimport Link from \"next/link\";\n\nimport { NavigationContext } from \"robindoc/lib/client\";\n\n/**\n * Next.js navigation provider for Robindoc.\n * Wraps the app to provide Next.js-specific navigation context (usePathname, Link).\n *\n * @example\n * ```tsx\n * import { NavigationProvider } from \"@robindoc/next\";\n *\n * export default function Layout({ children }) {\n * return <NavigationProvider>{children}</NavigationProvider>;\n * }\n * ```\n *\n * @see {@link https://robindoc.com/docs/getting-started/nextjs-integration Next.js integration}\n */\nexport const NavigationProvider: React.FC<React.PropsWithChildren> = ({ children }) => {\n return <NavigationContext.Provider value={{ usePathname, link: Link }}>{children}</NavigationContext.Provider>;\n};\n"],"names":["NavigationProvider","children","React","NavigationContext","Provider","value","usePathname","link","Link"],"mappings":";0JAuBaA,CAAAA,CAAwD,CAAA,CAAGC,cAC7DC,CAAAA,eAACC,EAAkBC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQ,CAACC,MAAO,CAAEC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAaC,CAAAA,CAAAA,CAAAA,CAAAA,CAAMC,CAAAA,CAAAA,CAAAA,CAASP,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA"}
|
package/package.json
CHANGED