@creativecreate/react-footnotes 1.0.14 → 1.0.17

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.
Files changed (2) hide show
  1. package/README.md +13 -2
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -11,7 +11,7 @@ Maintaining footnotes with proper numbering across different components and page
11
11
  - 🔁 Smart duplicate detection: multiple references to the same footnote automatically share the same number, preventing duplicate entries
12
12
  - 🔗 Smart bidirectional navigation: navigate between footnote references and content, with intelligent tracking that traces back to the current reference location even when duplicate references exist
13
13
  - 🎯 Flexible content sources: provide footnote content via messages file, callback function (`getContent`), or inline children — choose the approach that fits your needs
14
- - 🌐 Framework-agnostic: Compatible with Next.js App Router, Remix, Vite, and other React frameworks
14
+ - 🌐 Framework-agnostic: Compatible with Next.js App Router ([see integration guide](./NEXTJS_INTEGRATION.md)), Remix, Vite, and other React frameworks
15
15
  - ♿ Web accessibility compatible: built with ARIA attributes, semantic HTML, keyboard navigation support, and screen reader compatibility following WAI-ARIA best practices
16
16
  - 🎨 Fully customizable with custom CSS to match your design style, with built-in responsive design support for all device sizes
17
17
  - 📦 TypeScript support
@@ -23,6 +23,17 @@ Maintaining footnotes with proper numbering across different components and page
23
23
  npm install @creativecreate/react-footnotes
24
24
  ```
25
25
 
26
+ ## Next.js App Router
27
+
28
+ > **⚠️ Important for Next.js Users:** This package uses React Context and requires a `pathname` prop, which means it requires client components. If you're using Next.js App Router, you may encounter server/client boundary errors. See our **[Next.js Integration Guide](./NEXTJS_INTEGRATION.md)** for detailed instructions on:
29
+ > - Setting up `FootnoteProvider` in layouts with automatic pathname handling
30
+ > - Handling server/client component boundaries
31
+ > - Managing the required `pathname` prop with Next.js hooks
32
+ > - Common errors and solutions (like `createContext is not a function`, `usePathname() can only be used in Client Components`)
33
+ > - Best practices for preserving server-side rendering
34
+
35
+ **Quick Fix:** If you see `createContext is not a function` errors, mark components using `Footnote` with `'use client'` or extract the UI into a separate client component. For the `pathname` prop, use Next.js `usePathname()` and `useSearchParams()` hooks in a client component. See the [Next.js guide](./NEXTJS_INTEGRATION.md) for complete examples.
36
+
26
37
  ## Basic Usage
27
38
 
28
39
  ### 1. Create your messages file
@@ -165,7 +176,7 @@ You can also use the `className` props on components to apply your own custom cl
165
176
 
166
177
  **Example output:**
167
178
 
168
- ![Footnotes rendered in footer](https://raw.githubusercontent.com/CreativeCreate/react-footnotes/main/packages/react-footnotes/example.png)
179
+ ![Footnotes rendered in footer](https://raw.githubusercontent.com/CreativeCreate/npm-packages/main/packages/react-footnotes/example.png)
169
180
 
170
181
  ## Advanced Usage
171
182
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@creativecreate/react-footnotes",
3
- "version": "1.0.14",
3
+ "version": "1.0.17",
4
4
  "description": "A React component library for managing footnotes with citation and special symbol support",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -30,7 +30,7 @@
30
30
  "license": "MIT",
31
31
  "repository": {
32
32
  "type": "git",
33
- "url": "https://github.com/CreativeCreate/react-footnotes.git"
33
+ "url": "https://github.com/CreativeCreate/npm-packages.git"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "react": "^18.0.0 || ^19.0.0",