canopycms-next 0.0.43 → 0.0.45
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/dist/client.d.ts.map +1 -1
- package/dist/client.js +9 -1
- package/dist/client.js.map +1 -1
- package/package.json +5 -5
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAE1D;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,oBAAoB,GAAI,QAAQ,kBAAkB,kDAuB9D,CAAA"}
|
package/dist/client.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Suspense } from 'react';
|
|
3
4
|
import { useSearchParams } from 'next/navigation';
|
|
4
5
|
import { CanopyEditorPage } from 'canopycms/client';
|
|
5
6
|
/**
|
|
@@ -22,13 +23,20 @@ import { CanopyEditorPage } from 'canopycms/client';
|
|
|
22
23
|
*/
|
|
23
24
|
export const NextCanopyEditorPage = (config) => {
|
|
24
25
|
const CorePage = CanopyEditorPage(config);
|
|
25
|
-
|
|
26
|
+
// Reads URL search params. Next.js 15 requires useSearchParams() consumers to
|
|
27
|
+
// sit under a <Suspense> boundary, otherwise static rendering errors with
|
|
28
|
+
// "useSearchParams() should be wrapped in a suspense boundary". We provide the
|
|
29
|
+
// boundary here so adopters don't have to wrap their /edit page themselves.
|
|
30
|
+
function EditorWithSearchParams() {
|
|
26
31
|
const urlSearchParams = useSearchParams();
|
|
27
32
|
const searchParams = {
|
|
28
33
|
branch: urlSearchParams.get('branch') ?? undefined,
|
|
29
34
|
entry: urlSearchParams.get('entry') ?? undefined,
|
|
30
35
|
};
|
|
31
36
|
return _jsx(CorePage, { searchParams: searchParams });
|
|
37
|
+
}
|
|
38
|
+
return function NextEditorPage() {
|
|
39
|
+
return (_jsx(Suspense, { fallback: null, children: _jsx(EditorWithSearchParams, {}) }));
|
|
32
40
|
};
|
|
33
41
|
};
|
|
34
42
|
//# sourceMappingURL=client.js.map
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAGnD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAA0B,EAAE,EAAE;IACjE,MAAM,QAAQ,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAA;IAEzC,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAGnD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAA0B,EAAE,EAAE;IACjE,MAAM,QAAQ,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAA;IAEzC,8EAA8E;IAC9E,0EAA0E;IAC1E,+EAA+E;IAC/E,4EAA4E;IAC5E,SAAS,sBAAsB;QAC7B,MAAM,eAAe,GAAG,eAAe,EAAE,CAAA;QACzC,MAAM,YAAY,GAAG;YACnB,MAAM,EAAE,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,SAAS;YAClD,KAAK,EAAE,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,SAAS;SACjD,CAAA;QACD,OAAO,KAAC,QAAQ,IAAC,YAAY,EAAE,YAAY,GAAI,CAAA;IACjD,CAAC;IAED,OAAO,SAAS,cAAc;QAC5B,OAAO,CACL,KAAC,QAAQ,IAAC,QAAQ,EAAE,IAAI,YACtB,KAAC,sBAAsB,KAAG,GACjB,CACZ,CAAA;IACH,CAAC,CAAA;AACH,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "canopycms-next",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.45",
|
|
4
4
|
"description": "Next.js adapter for CanopyCMS",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"next": "^13.5.7 || ^14.2.25 || ^15.2.3 || ^16",
|
|
38
38
|
"react": "^18.0.0 || ^19.0.0",
|
|
39
|
-
"canopycms": "0.0.
|
|
39
|
+
"canopycms": "0.0.45"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "^22.9.0",
|
|
43
43
|
"esbuild": "^0.25.0",
|
|
44
44
|
"@types/react": "^18.3.12",
|
|
45
|
-
"next": "^
|
|
45
|
+
"next": "^15.5.19",
|
|
46
46
|
"react": "^18.3.1",
|
|
47
47
|
"typescript": "^5.6.3",
|
|
48
|
-
"vitest": "^1.
|
|
49
|
-
"canopycms": "0.0.
|
|
48
|
+
"vitest": "^4.1.0",
|
|
49
|
+
"canopycms": "0.0.45"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "tsc -p tsconfig.build.json && esbuild src/config.ts --bundle --platform=node --packages=external --external:next --format=cjs --outfile=dist/config.cjs && esbuild src/config.ts --bundle --platform=node --packages=external --external:next --format=esm --outfile=dist/config.mjs",
|