@cmssy/next 9.10.0 → 10.1.0

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": "@cmssy/next",
3
- "version": "9.10.0",
3
+ "version": "10.1.0",
4
4
  "description": "Next.js App Router bindings for cmssy headless sites (createCmssyPage + draft preview)",
5
5
  "keywords": [
6
6
  "cmssy",
@@ -38,11 +38,6 @@
38
38
  "import": "./dist/middleware.js",
39
39
  "require": "./dist/middleware.cjs"
40
40
  },
41
- "./client": {
42
- "types": "./dist/client.d.ts",
43
- "import": "./dist/client.js",
44
- "require": "./dist/client.cjs"
45
- },
46
41
  "./testing": {
47
42
  "types": "./dist/testing.d.ts",
48
43
  "import": "./dist/testing.js",
@@ -70,12 +65,12 @@
70
65
  "tsup": "^8.3.0",
71
66
  "typescript": "^5.6.0",
72
67
  "vitest": "^2.1.0",
73
- "@cmssy/react": "9.10.0"
68
+ "@cmssy/react": "10.1.0"
74
69
  },
75
70
  "dependencies": {
76
71
  "@cmssy/types": "0.29.0",
77
72
  "server-only": "^0.0.1",
78
- "@cmssy/core": "9.10.0"
73
+ "@cmssy/core": "10.1.0"
79
74
  },
80
75
  "scripts": {
81
76
  "build": "tsup",
package/dist/client.cjs DELETED
@@ -1,29 +0,0 @@
1
- "use client";
2
- 'use strict';
3
-
4
- var Link = require('next/link');
5
- var react = require('@cmssy/react');
6
- var client = require('@cmssy/react/client');
7
- var jsxRuntime = require('react/jsx-runtime');
8
-
9
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
-
11
- var Link__default = /*#__PURE__*/_interopDefault(Link);
12
-
13
- // src/cmssy-link.tsx
14
- function CmssyLink({ href, locale, ...rest }) {
15
- const fromContext = client.useCmssyLocale();
16
- const active = locale ?? fromContext;
17
- const resolved = active ? react.localizeHref(href, active) : href;
18
- return /* @__PURE__ */ jsxRuntime.jsx(Link__default.default, { href: resolved, ...rest });
19
- }
20
-
21
- Object.defineProperty(exports, "CmssyLocaleProvider", {
22
- enumerable: true,
23
- get: function () { return client.CmssyLocaleProvider; }
24
- });
25
- Object.defineProperty(exports, "useCmssyLocale", {
26
- enumerable: true,
27
- get: function () { return client.useCmssyLocale; }
28
- });
29
- exports.CmssyLink = CmssyLink;
package/dist/client.d.cts DELETED
@@ -1,19 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import Link from 'next/link';
3
- import { ComponentProps } from 'react';
4
- import { CmssyLocaleContext } from '@cmssy/react';
5
- export { CmssyLocaleProvider, CmssyLocaleProviderProps, useCmssyLocale } from '@cmssy/react/client';
6
-
7
- interface CmssyLinkProps extends Omit<ComponentProps<typeof Link>, "href" | "locale"> {
8
- href: string;
9
- /** Override the active locale (defaults to the nearest CmssyLocaleProvider). */
10
- locale?: CmssyLocaleContext;
11
- }
12
- /**
13
- * `next/link` that prefixes internal hrefs with the active locale, so navigation
14
- * preserves the language. Reads the locale from the nearest
15
- * `CmssyLocaleProvider`; falls back to the raw href when none is mounted.
16
- */
17
- declare function CmssyLink({ href, locale, ...rest }: CmssyLinkProps): react_jsx_runtime.JSX.Element;
18
-
19
- export { CmssyLink, type CmssyLinkProps };
package/dist/client.d.ts DELETED
@@ -1,19 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import Link from 'next/link';
3
- import { ComponentProps } from 'react';
4
- import { CmssyLocaleContext } from '@cmssy/react';
5
- export { CmssyLocaleProvider, CmssyLocaleProviderProps, useCmssyLocale } from '@cmssy/react/client';
6
-
7
- interface CmssyLinkProps extends Omit<ComponentProps<typeof Link>, "href" | "locale"> {
8
- href: string;
9
- /** Override the active locale (defaults to the nearest CmssyLocaleProvider). */
10
- locale?: CmssyLocaleContext;
11
- }
12
- /**
13
- * `next/link` that prefixes internal hrefs with the active locale, so navigation
14
- * preserves the language. Reads the locale from the nearest
15
- * `CmssyLocaleProvider`; falls back to the raw href when none is mounted.
16
- */
17
- declare function CmssyLink({ href, locale, ...rest }: CmssyLinkProps): react_jsx_runtime.JSX.Element;
18
-
19
- export { CmssyLink, type CmssyLinkProps };
package/dist/client.js DELETED
@@ -1,16 +0,0 @@
1
- "use client";
2
- import Link from 'next/link';
3
- import { localizeHref } from '@cmssy/react';
4
- import { useCmssyLocale } from '@cmssy/react/client';
5
- export { CmssyLocaleProvider, useCmssyLocale } from '@cmssy/react/client';
6
- import { jsx } from 'react/jsx-runtime';
7
-
8
- // src/cmssy-link.tsx
9
- function CmssyLink({ href, locale, ...rest }) {
10
- const fromContext = useCmssyLocale();
11
- const active = locale ?? fromContext;
12
- const resolved = active ? localizeHref(href, active) : href;
13
- return /* @__PURE__ */ jsx(Link, { href: resolved, ...rest });
14
- }
15
-
16
- export { CmssyLink };