@okam/next-component 2.0.3 → 2.1.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ ## 2.1.0 (2026-03-26)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **next-component:** deprecate onPathnameChange in favor of onNavigate ([#445](https://github.com/OKAMca/stack/pull/445))
6
+ * fix(next-component): keep deprecated onPathnameChange bridge
7
+ * fix(next-component): prevent prop leakage and align locale docs
8
+
9
+ ### 🩹 Fixes
10
+
11
+ - resolve dependabot security alerts and clean up published package dependencies ([#441](https://github.com/OKAMca/stack/pull/441))
12
+ - replace use server by server-only in server chunks ([#437](https://github.com/OKAMca/stack/pull/437))
13
+
14
+ ### ❤️ Thank You
15
+
16
+ - Claude Opus 4.6 (1M context)
17
+ - GabrielAuclair7
18
+ - Marie-Maxime Tanguay @marie-maxime
19
+ - Pierre-Olivier Clerson @poclerson
20
+
1
21
  ## 2.0.3 (2026-03-17)
2
22
 
3
23
  ### 🩹 Fixes
@@ -0,0 +1,3 @@
1
+ import { TToken } from '@okam/stack-ui';
2
+ import { TAdminBarProps } from './interface';
3
+ export declare function AdminBarContent<T extends TToken>({ children, themeName, tokens, customTheme, }: TAdminBarProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ "use strict";
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
+ const jsxRuntime = require("react/jsx-runtime");
5
+ const stackUi = require("@okam/stack-ui");
6
+ function AdminBarContent({
7
+ children,
8
+ themeName = "adminBar",
9
+ tokens,
10
+ customTheme
11
+ }) {
12
+ return /* @__PURE__ */ jsxRuntime.jsx(stackUi.Box, { themeName: `${themeName}.container`, tokens, customTheme, children: /* @__PURE__ */ jsxRuntime.jsx(stackUi.Box, { themeName: `${themeName}.content`, tokens, children }) });
13
+ }
14
+ exports.AdminBarContent = AdminBarContent;
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { Box } from "@okam/stack-ui";
4
+ function AdminBarContent({
5
+ children,
6
+ themeName = "adminBar",
7
+ tokens,
8
+ customTheme
9
+ }) {
10
+ return /* @__PURE__ */ jsx(Box, { themeName: `${themeName}.container`, tokens, customTheme, children: /* @__PURE__ */ jsx(Box, { themeName: `${themeName}.content`, tokens, children }) });
11
+ }
12
+ export {
13
+ AdminBarContent
14
+ };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
- const stackUi = require("@okam/stack-ui");
4
3
  const headers = require("next/headers");
4
+ const AdminBarContent = require("./AdminBarContent.js");
5
5
  async function AdminBar({
6
6
  children,
7
7
  themeName = "adminBar",
@@ -9,6 +9,6 @@ async function AdminBar({
9
9
  customTheme
10
10
  }) {
11
11
  const { isEnabled } = await headers.draftMode();
12
- return isEnabled && /* @__PURE__ */ jsxRuntime.jsx(stackUi.Box, { themeName: `${themeName}.container`, tokens, customTheme, children: /* @__PURE__ */ jsxRuntime.jsx(stackUi.Box, { themeName: `${themeName}.content`, tokens, children }) });
12
+ return isEnabled && /* @__PURE__ */ jsxRuntime.jsx(AdminBarContent.AdminBarContent, { themeName, tokens, customTheme, children });
13
13
  }
14
14
  module.exports = AdminBar;
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { Box } from "@okam/stack-ui";
3
2
  import { draftMode } from "next/headers";
3
+ import { AdminBarContent } from "./AdminBarContent.mjs";
4
4
  async function AdminBar({
5
5
  children,
6
6
  themeName = "adminBar",
@@ -8,7 +8,7 @@ async function AdminBar({
8
8
  customTheme
9
9
  }) {
10
10
  const { isEnabled } = await draftMode();
11
- return isEnabled && /* @__PURE__ */ jsx(Box, { themeName: `${themeName}.container`, tokens, customTheme, children: /* @__PURE__ */ jsx(Box, { themeName: `${themeName}.content`, tokens, children }) });
11
+ return isEnabled && /* @__PURE__ */ jsx(AdminBarContent, { themeName, tokens, customTheme, children });
12
12
  }
13
13
  export {
14
14
  AdminBar as default
@@ -11,6 +11,7 @@ function Link({ ref, ...props }) {
11
11
  customTheme,
12
12
  as = NextLink,
13
13
  children,
14
+ locale,
14
15
  scroll,
15
16
  onPathnameChange,
16
17
  onSearchParamsChange,
@@ -10,6 +10,7 @@ function Link({ ref, ...props }) {
10
10
  customTheme,
11
11
  as = NextLink,
12
12
  children,
13
+ locale,
13
14
  scroll,
14
15
  onPathnameChange,
15
16
  onSearchParamsChange,
@@ -39,7 +39,7 @@ function useFilterState(props) {
39
39
  onSelectionChange: onSelectedKeysChange
40
40
  });
41
41
  reactUse.useUpdateEffect(() => {
42
- const next = [...state.selectionManager.selectedKeys].map(String);
42
+ const next = Array.from(state.selectionManager.selectedKeys, String);
43
43
  if (radashi.isEqual(next, selectedKeys)) {
44
44
  return;
45
45
  }
@@ -37,7 +37,7 @@ function useFilterState(props) {
37
37
  onSelectionChange: onSelectedKeysChange
38
38
  });
39
39
  useUpdateEffect(() => {
40
- const next = [...state.selectionManager.selectedKeys].map(String);
40
+ const next = Array.from(state.selectionManager.selectedKeys, String);
41
41
  if (isEqual(next, selectedKeys)) {
42
42
  return;
43
43
  }
@@ -5,6 +5,8 @@ const navigation = require("next/navigation");
5
5
  const react = require("react");
6
6
  const reactAria = require("react-aria");
7
7
  const index = require("../useHash/index.js");
8
+ const _interface = require("./interface.js");
9
+ const EXTERNAL_URL_RE = /^[a-z]+:\/\//i;
8
10
  function scrollToTop(behavior) {
9
11
  window?.scrollTo?.({ top: 0, behavior });
10
12
  }
@@ -15,22 +17,31 @@ function getParamsLocale(params) {
15
17
  return locale;
16
18
  }
17
19
  function useLinkLocale(props) {
18
- const { locale } = props;
20
+ const { locale, i18n } = props;
21
+ const { defaultLocale, localePrefix = "always" } = i18n ?? {};
19
22
  const params = navigation.useParams();
20
23
  const paramsLocale = getParamsLocale(params);
21
24
  const { locale: ctxLocale } = reactAria.useLocale();
22
- return locale ?? ctxLocale ?? paramsLocale ?? false;
25
+ const finalLocale = locale ?? ctxLocale ?? paramsLocale ?? false;
26
+ const shouldDisplayLocale = {
27
+ [_interface.LocalePrefix.Always]: true,
28
+ [_interface.LocalePrefix.AsNeeded]: finalLocale !== defaultLocale
29
+ }[localePrefix];
30
+ const displayLocale = shouldDisplayLocale ? finalLocale : false;
31
+ return displayLocale;
23
32
  }
24
33
  function localizeHref(href, locale) {
25
34
  const hrefString = href.toString();
35
+ const hasTrailingSlash = hrefString.endsWith("/");
26
36
  const isAnchor = hrefString.startsWith("#");
27
- const isExternal = /^[a-z]+:\/\//i.test(hrefString) || hrefString.startsWith("//");
28
- if (isExternal || isAnchor)
29
- return hrefString;
30
- if (locale != null && locale !== false) {
31
- return `/${locale}${hrefString}`;
37
+ const isExternal = EXTERNAL_URL_RE.test(hrefString) || hrefString.startsWith("//");
38
+ let finalHref;
39
+ if (locale != null && locale !== false && !isExternal && !isAnchor) {
40
+ finalHref = `/${locale}${hrefString}`;
41
+ } else {
42
+ finalHref = hrefString;
32
43
  }
33
- return hrefString;
44
+ return hasTrailingSlash || isAnchor ? finalHref : `${finalHref}/`;
34
45
  }
35
46
  function useLink(props) {
36
47
  const {
@@ -38,6 +49,7 @@ function useLink(props) {
38
49
  onMouseEnter,
39
50
  onTouchStart,
40
51
  onClick,
52
+ onNavigate,
41
53
  onPathnameChange,
42
54
  onHashChange,
43
55
  onSearchParamsChange,
@@ -55,6 +67,7 @@ function useLink(props) {
55
67
  const pathname = navigation.usePathname();
56
68
  const searchParams = navigation.useSearchParams();
57
69
  const hash = index.useHash();
70
+ const hasWarnedOnPathnameChangeRef = react.useRef(false);
58
71
  const isNextScroll = typeof scroll === "boolean";
59
72
  const nextScroll = isNextScroll ? scroll : false;
60
73
  const handleScroll = react.useCallback(() => {
@@ -70,6 +83,12 @@ function useLink(props) {
70
83
  onTouchStart?.(event);
71
84
  handleScroll();
72
85
  };
86
+ react.useEffect(() => {
87
+ if (process.env.NODE_ENV === "production" || onPathnameChange == null || hasWarnedOnPathnameChangeRef.current)
88
+ return;
89
+ console.warn("[next-component/Link] `onPathnameChange` is deprecated and will be removed in the next major version. Use `onNavigate` from next/link instead.");
90
+ hasWarnedOnPathnameChangeRef.current = true;
91
+ }, [onPathnameChange]);
73
92
  react.useEffect(() => {
74
93
  onPathnameChange?.(pathname);
75
94
  }, [onPathnameChange, pathname]);
@@ -83,10 +102,10 @@ function useLink(props) {
83
102
  href: localizedHref.toString(),
84
103
  as: urlDecorator,
85
104
  replace,
86
- locale,
87
105
  prefetch,
88
106
  shallow,
89
107
  onClick: handleClick,
108
+ onNavigate,
90
109
  onTouchStart: handleTouchStart,
91
110
  onMouseEnter,
92
111
  scroll: nextScroll,
@@ -1,8 +1,10 @@
1
1
  "use client";
2
2
  import { usePathname, useSearchParams, useParams } from "next/navigation";
3
- import { useCallback, useEffect } from "react";
3
+ import { useRef, useCallback, useEffect } from "react";
4
4
  import { useLocale } from "react-aria";
5
5
  import { useHash } from "../useHash/index.mjs";
6
+ import { LocalePrefix } from "./interface.mjs";
7
+ const EXTERNAL_URL_RE = /^[a-z]+:\/\//i;
6
8
  function scrollToTop(behavior) {
7
9
  window?.scrollTo?.({ top: 0, behavior });
8
10
  }
@@ -13,22 +15,31 @@ function getParamsLocale(params) {
13
15
  return locale;
14
16
  }
15
17
  function useLinkLocale(props) {
16
- const { locale } = props;
18
+ const { locale, i18n } = props;
19
+ const { defaultLocale, localePrefix = "always" } = i18n ?? {};
17
20
  const params = useParams();
18
21
  const paramsLocale = getParamsLocale(params);
19
22
  const { locale: ctxLocale } = useLocale();
20
- return locale ?? ctxLocale ?? paramsLocale ?? false;
23
+ const finalLocale = locale ?? ctxLocale ?? paramsLocale ?? false;
24
+ const shouldDisplayLocale = {
25
+ [LocalePrefix.Always]: true,
26
+ [LocalePrefix.AsNeeded]: finalLocale !== defaultLocale
27
+ }[localePrefix];
28
+ const displayLocale = shouldDisplayLocale ? finalLocale : false;
29
+ return displayLocale;
21
30
  }
22
31
  function localizeHref(href, locale) {
23
32
  const hrefString = href.toString();
33
+ const hasTrailingSlash = hrefString.endsWith("/");
24
34
  const isAnchor = hrefString.startsWith("#");
25
- const isExternal = /^[a-z]+:\/\//i.test(hrefString) || hrefString.startsWith("//");
26
- if (isExternal || isAnchor)
27
- return hrefString;
28
- if (locale != null && locale !== false) {
29
- return `/${locale}${hrefString}`;
35
+ const isExternal = EXTERNAL_URL_RE.test(hrefString) || hrefString.startsWith("//");
36
+ let finalHref;
37
+ if (locale != null && locale !== false && !isExternal && !isAnchor) {
38
+ finalHref = `/${locale}${hrefString}`;
39
+ } else {
40
+ finalHref = hrefString;
30
41
  }
31
- return hrefString;
42
+ return hasTrailingSlash || isAnchor ? finalHref : `${finalHref}/`;
32
43
  }
33
44
  function useLink(props) {
34
45
  const {
@@ -36,6 +47,7 @@ function useLink(props) {
36
47
  onMouseEnter,
37
48
  onTouchStart,
38
49
  onClick,
50
+ onNavigate,
39
51
  onPathnameChange,
40
52
  onHashChange,
41
53
  onSearchParamsChange,
@@ -53,6 +65,7 @@ function useLink(props) {
53
65
  const pathname = usePathname();
54
66
  const searchParams = useSearchParams();
55
67
  const hash = useHash();
68
+ const hasWarnedOnPathnameChangeRef = useRef(false);
56
69
  const isNextScroll = typeof scroll === "boolean";
57
70
  const nextScroll = isNextScroll ? scroll : false;
58
71
  const handleScroll = useCallback(() => {
@@ -68,6 +81,12 @@ function useLink(props) {
68
81
  onTouchStart?.(event);
69
82
  handleScroll();
70
83
  };
84
+ useEffect(() => {
85
+ if (process.env.NODE_ENV === "production" || onPathnameChange == null || hasWarnedOnPathnameChangeRef.current)
86
+ return;
87
+ console.warn("[next-component/Link] `onPathnameChange` is deprecated and will be removed in the next major version. Use `onNavigate` from next/link instead.");
88
+ hasWarnedOnPathnameChangeRef.current = true;
89
+ }, [onPathnameChange]);
71
90
  useEffect(() => {
72
91
  onPathnameChange?.(pathname);
73
92
  }, [onPathnameChange, pathname]);
@@ -81,10 +100,10 @@ function useLink(props) {
81
100
  href: localizedHref.toString(),
82
101
  as: urlDecorator,
83
102
  replace,
84
- locale,
85
103
  prefetch,
86
104
  shallow,
87
105
  onClick: handleClick,
106
+ onNavigate,
88
107
  onTouchStart: handleTouchStart,
89
108
  onMouseEnter,
90
109
  scroll: nextScroll,
@@ -1,6 +1,65 @@
1
1
  import { LinkProps as NextLinkProps } from 'next/link';
2
2
  import { ReadonlyURLSearchParams } from 'next/navigation';
3
- export interface TLink extends Omit<NextLinkProps, 'scroll' | 'as'> {
3
+ import { UrlObject } from 'node:url';
4
+ export declare enum LocalePrefix {
5
+ /**
6
+ * The pathname will be prefixed with the locale only when it is not the default locale
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * const linkI18nConfig = {
11
+ * localePrefix: 'as-needed',
12
+ * defaultLocale: 'en',
13
+ * }
14
+ *
15
+ * // <Link locale="en" href="/products/1" />
16
+ * // output: /products/1
17
+ *
18
+ * // <Link href="/products/1" />
19
+ * // output: /products/1
20
+ *
21
+ * // <Link locale="fr" href="/produits/1" />
22
+ * // output: /fr/produits/1
23
+ * ```
24
+ */
25
+ AsNeeded = "as-needed",
26
+ /**
27
+ * The pathname will always be prefixed by the locale
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const linkI18nConfig = {
32
+ * localePrefix: 'always',
33
+ * defaultLocale: 'en',
34
+ * }
35
+ *
36
+ * // <Link locale="en" href="/products/1" />
37
+ * // output: /en/products/1
38
+ *
39
+ * // <Link href="/products/1" />
40
+ * // output: /en/products/1
41
+ *
42
+ * // <Link locale="fr" href="/produits/1" />
43
+ * // output: /fr/produits/1
44
+ * ```
45
+ */
46
+ Always = "always"
47
+ }
48
+ export type TLinkI18nConfig = ({
49
+ defaultLocale: string;
50
+ /**
51
+ * {@link LocalePrefix}
52
+ */
53
+ localePrefix: `${LocalePrefix.AsNeeded}`;
54
+ } | {
55
+ defaultLocale?: string;
56
+ /**
57
+ * {@link LocalePrefix}
58
+ */
59
+ localePrefix?: `${LocalePrefix.Always}` | undefined;
60
+ });
61
+ export interface TLink extends Omit<NextLinkProps, 'scroll' | 'as' | 'hre'> {
62
+ href: string | UrlObject;
4
63
  /**
5
64
  * @default true
6
65
  * - `true`: Scrolls to the top of the clicked anchor (default Next.js behavior)
@@ -14,10 +73,14 @@ export interface TLink extends Omit<NextLinkProps, 'scroll' | 'as'> {
14
73
  * @default instant
15
74
  */
16
75
  behavior?: ScrollBehavior;
76
+ /**
77
+ * @deprecated Use `onNavigate` from next/link instead.
78
+ */
17
79
  onPathnameChange?: (_pathname: string) => void;
18
80
  onSearchParamsChange?: (_searchParams: ReadonlyURLSearchParams) => void;
19
81
  onHashChange?: (_hash: string) => void;
82
+ i18n?: TLinkI18nConfig;
20
83
  }
21
- export interface TUseLinkReturn extends Omit<NextLinkProps, 'href'> {
84
+ export interface TUseLinkReturn extends Omit<NextLinkProps, 'href' | 'locale'> {
22
85
  href: string;
23
86
  }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ var LocalePrefix = /* @__PURE__ */ ((LocalePrefix2) => {
4
+ LocalePrefix2["AsNeeded"] = "as-needed";
5
+ LocalePrefix2["Always"] = "always";
6
+ return LocalePrefix2;
7
+ })(LocalePrefix || {});
8
+ exports.LocalePrefix = LocalePrefix;
@@ -0,0 +1,8 @@
1
+ var LocalePrefix = /* @__PURE__ */ ((LocalePrefix2) => {
2
+ LocalePrefix2["AsNeeded"] = "as-needed";
3
+ LocalePrefix2["Always"] = "always";
4
+ return LocalePrefix2;
5
+ })(LocalePrefix || {});
6
+ export {
7
+ LocalePrefix
8
+ };
package/index.d.ts CHANGED
@@ -8,7 +8,8 @@ export { useFilterState } from './hooks/useFilterState';
8
8
  export type { TFilter } from './hooks/useFilterState/interface';
9
9
  export { useHash } from './hooks/useHash';
10
10
  export { useLink } from './hooks/useLink';
11
- export type { TLink } from './hooks/useLink/interface';
11
+ export type { TLink, TLinkI18nConfig, TUseLinkReturn } from './hooks/useLink/interface';
12
+ export { LocalePrefix } from './hooks/useLink/interface';
12
13
  export { AdminBarContextProvider, useAdminBar } from './providers/AdminBar';
13
14
  export { DraftModeContextProvider, useDraftMode } from './providers/DraftMode';
14
15
  export { default as ThemeProvider } from './theme';
package/index.js CHANGED
@@ -6,6 +6,7 @@ const index$4 = require("./components/Link/index.js");
6
6
  const index$6 = require("./hooks/useFilterState/index.js");
7
7
  const index$7 = require("./hooks/useHash/index.js");
8
8
  const index$8 = require("./hooks/useLink/index.js");
9
+ const _interface = require("./hooks/useLink/interface.js");
9
10
  const index = require("./providers/AdminBar/index.js");
10
11
  const index$1 = require("./providers/DraftMode/index.js");
11
12
  const index$5 = require("./theme/index.js");
@@ -15,6 +16,7 @@ exports.Link = index$4;
15
16
  exports.useFilterState = index$6.useFilterState;
16
17
  exports.useHash = index$7.useHash;
17
18
  exports.useLink = index$8.useLink;
19
+ exports.LocalePrefix = _interface.LocalePrefix;
18
20
  exports.AdminBarContextProvider = index.AdminBarContextProvider;
19
21
  exports.useAdminBar = index.useAdminBar;
20
22
  exports.DraftModeContextProvider = index$1.DraftModeContextProvider;
package/index.mjs CHANGED
@@ -4,6 +4,7 @@ import { default as default4 } from "./components/Link/index.mjs";
4
4
  import { useFilterState } from "./hooks/useFilterState/index.mjs";
5
5
  import { useHash } from "./hooks/useHash/index.mjs";
6
6
  import { useLink } from "./hooks/useLink/index.mjs";
7
+ import { LocalePrefix } from "./hooks/useLink/interface.mjs";
7
8
  import { AdminBarContextProvider, useAdminBar } from "./providers/AdminBar/index.mjs";
8
9
  import { DraftModeContextProvider, useDraftMode } from "./providers/DraftMode/index.mjs";
9
10
  import { default as default5 } from "./theme/index.mjs";
@@ -13,6 +14,7 @@ export {
13
14
  default2 as Filter,
14
15
  default3 as Img,
15
16
  default4 as Link,
17
+ LocalePrefix,
16
18
  default5 as ThemeProvider,
17
19
  useAdminBar,
18
20
  useDraftMode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okam/next-component",
3
- "version": "2.0.3",
3
+ "version": "2.1.1",
4
4
  "repository": {
5
5
  "url": "https://github.com/OKAMca/stack.git"
6
6
  },
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "require": {
20
20
  "types": "./index.d.ts",
21
- "default": "./index.mjs"
21
+ "default": "./index.js"
22
22
  }
23
23
  },
24
24
  "./server": {
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "require": {
30
30
  "types": "./server.d.ts",
31
- "default": "./server.mjs"
31
+ "default": "./server.js"
32
32
  }
33
33
  }
34
34
  },
@@ -37,15 +37,14 @@
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@react-stately/selection": "^3.20.0",
40
- "next": "^15.1.0 || ^16.0.0",
40
+ "next": ">=15.5.13 <16.0.0 || ^16.1.7",
41
41
  "nuqs": "^2.4.0",
42
42
  "react": "^18.0.0 || ^19.0.0",
43
43
  "react-stately": "^3.43.0"
44
44
  },
45
45
  "dependencies": {
46
- "@okam/react-utils": "0.0.1",
47
- "@okam/stack-ui": "2.0.3",
48
- "next": "^15.1.0 || ^16.0.0",
46
+ "@okam/react-utils": "1.0.0",
47
+ "@okam/stack-ui": "2.1.1",
49
48
  "nuqs": "^2.4.3",
50
49
  "radashi": "^12.3.0",
51
50
  "react-aria": "^3.39.0",
package/server.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { default as AdminBar } from './components/AdminBar';
2
+ export { LocalePrefix } from './hooks/useLink/interface';
2
3
  export { createServerContext } from './lib/createServerContext';
3
4
  export { default as DraftModeServerContextProvider } from './providers/DraftMode/server';
package/server.js CHANGED
@@ -1,9 +1,11 @@
1
- "use server";
1
+ require("server-only");
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const index = require("./components/AdminBar/index.js");
5
+ const _interface = require("./hooks/useLink/interface.js");
5
6
  const index$1 = require("./lib/createServerContext/index.js");
6
7
  const server = require("./providers/DraftMode/server.js");
7
8
  exports.AdminBar = index;
9
+ exports.LocalePrefix = _interface.LocalePrefix;
8
10
  exports.createServerContext = index$1.createServerContext;
9
11
  exports.DraftModeServerContextProvider = server;
package/server.mjs CHANGED
@@ -1,9 +1,11 @@
1
- "use server";
1
+ import "server-only";
2
2
  import { default as default2 } from "./components/AdminBar/index.mjs";
3
+ import { LocalePrefix } from "./hooks/useLink/interface.mjs";
3
4
  import { createServerContext } from "./lib/createServerContext/index.mjs";
4
5
  import { default as default3 } from "./providers/DraftMode/server.mjs";
5
6
  export {
6
7
  default2 as AdminBar,
7
8
  default3 as DraftModeServerContextProvider,
9
+ LocalePrefix,
8
10
  createServerContext
9
11
  };