@djangocfg/ui-nextjs 2.1.179 → 2.1.181

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.179",
3
+ "version": "2.1.181",
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,9 @@
80
80
  "check": "tsc --noEmit"
81
81
  },
82
82
  "peerDependencies": {
83
- "@djangocfg/api": "^2.1.179",
84
- "@djangocfg/ui-core": "^2.1.179",
85
- "@djangocfg/ui-tools": "^2.1.179",
83
+ "@djangocfg/api": "^2.1.181",
84
+ "@djangocfg/ui-core": "^2.1.181",
85
+ "@djangocfg/ui-tools": "^2.1.181",
86
86
  "@types/react": "^19.1.0",
87
87
  "@types/react-dom": "^19.1.0",
88
88
  "consola": "^3.4.2",
@@ -105,7 +105,7 @@
105
105
  "react-chartjs-2": "^5.3.0"
106
106
  },
107
107
  "devDependencies": {
108
- "@djangocfg/typescript-config": "^2.1.179",
108
+ "@djangocfg/typescript-config": "^2.1.181",
109
109
  "@radix-ui/react-dropdown-menu": "^2.1.16",
110
110
  "@radix-ui/react-slot": "^1.2.4",
111
111
  "@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,27 @@
1
1
  /**
2
2
  * Internal navigation utilities for ui-nextjs
3
3
  *
4
- * Uses next-intl's createNavigation() to produce locale-aware
4
+ * Uses next-intl's createNavigation() with routing config to produce locale-aware
5
5
  * 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 { defineRouting } from 'next-intl/routing';
15
+
16
+ const routing = defineRouting({
17
+ locales: ['en', 'ru', 'ko', 'ja', 'de', 'fr', 'zh', 'it', 'es', 'nl', 'ar', 'tr', 'pt-BR', 'pl', 'sv', 'no', 'da'],
18
+ defaultLocale: 'en',
19
+ localePrefix: 'as-needed',
20
+ });
11
21
 
12
22
  export const {
13
23
  Link,
14
24
  usePathname,
15
25
  useRouter,
16
26
  redirect,
17
- } = createNavigation();
27
+ } = createNavigation(routing);