@djangocfg/ui-nextjs 2.1.180 → 2.1.182

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/ui-nextjs",
3
- "version": "2.1.180",
3
+ "version": "2.1.182",
4
4
  "description": "Next.js UI component library with Radix UI primitives, Tailwind CSS styling, charts, and form components",
5
5
  "keywords": [
6
6
  "ui-components",
@@ -80,9 +80,10 @@
80
80
  "check": "tsc --noEmit"
81
81
  },
82
82
  "peerDependencies": {
83
- "@djangocfg/api": "^2.1.180",
84
- "@djangocfg/ui-core": "^2.1.180",
85
- "@djangocfg/ui-tools": "^2.1.180",
83
+ "@djangocfg/api": "^2.1.182",
84
+ "@djangocfg/nextjs": "^2.1.182",
85
+ "@djangocfg/ui-core": "^2.1.182",
86
+ "@djangocfg/ui-tools": "^2.1.182",
86
87
  "@types/react": "^19.1.0",
87
88
  "@types/react-dom": "^19.1.0",
88
89
  "consola": "^3.4.2",
@@ -105,7 +106,7 @@
105
106
  "react-chartjs-2": "^5.3.0"
106
107
  },
107
108
  "devDependencies": {
108
- "@djangocfg/typescript-config": "^2.1.180",
109
+ "@djangocfg/typescript-config": "^2.1.182",
109
110
  "@radix-ui/react-dropdown-menu": "^2.1.16",
110
111
  "@radix-ui/react-slot": "^1.2.4",
111
112
  "@types/node": "^24.7.2",
@@ -8,6 +8,9 @@
8
8
  // Re-export all base components from ui-core
9
9
  export * from '@djangocfg/ui-core/components';
10
10
 
11
+ // Locale-aware Link (re-export from next-intl navigation)
12
+ export { Link } from '../lib/navigation';
13
+
11
14
  // Link Components (Next.js)
12
15
  export { NextLink, NextButtonLink } from './next-link';
13
16
  export type { NextLinkProps, NextButtonLinkProps } from './next-link';
@@ -1,17 +1,21 @@
1
1
  /**
2
2
  * Internal navigation utilities for ui-nextjs
3
3
  *
4
- * Uses next-intl's createNavigation() to produce locale-aware
5
- * Link, usePathname, useRouter, etc.
4
+ * Uses next-intl's createNavigation() with routing from @djangocfg/nextjs to produce
5
+ * locale-aware Link, usePathname, useRouter, etc.
6
6
  *
7
7
  * These are used internally by ui-nextjs components (breadcrumb, pagination, sidebar, etc.)
8
8
  * so that all links automatically include the locale prefix.
9
+ *
10
+ * IMPORTANT: routing config must be passed to createNavigation() for SSR context resolution.
11
+ * Without it, next-intl falls back to `[locale]` pattern which Next.js rejects as dynamic href.
9
12
  */
10
13
  import { createNavigation } from 'next-intl/navigation';
14
+ import { routing } from '@djangocfg/nextjs/i18n/routing';
11
15
 
12
16
  export const {
13
17
  Link,
14
18
  usePathname,
15
19
  useRouter,
16
20
  redirect,
17
- } = createNavigation();
21
+ } = createNavigation(routing);