@uniformdev/canvas-next-rsc 19.37.1-alpha.4 → 19.38.2
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.
|
@@ -3,7 +3,7 @@ import { CANVAS_DRAFT_STATE, CANVAS_PUBLISHED_STATE } from '@uniformdev/canvas';
|
|
|
3
3
|
import { notFound, redirect } from 'next/navigation';
|
|
4
4
|
import { Suspense } from 'react';
|
|
5
5
|
import { getManifestFromApi } from '../client/manifestClient';
|
|
6
|
-
import { isDevelopmentEnvironment, isDraftModeEnabled, isOnVercelPreviewEnvironment } from '../utils/draft';
|
|
6
|
+
import { isDevelopmentEnvironment, isDraftModeEnabled, isIncontextEditingEnabled, isOnVercelPreviewEnvironment, } from '../utils/draft';
|
|
7
7
|
import { evaluateComposition } from './evaluateComposition';
|
|
8
8
|
import { resolvePath } from './resolvePath';
|
|
9
9
|
import { resolveRedirectHref, retrieveRoute } from './retrieveRoute';
|
|
@@ -27,6 +27,9 @@ const UniformCompositionInner = async ({ params, searchParams, children }) => {
|
|
|
27
27
|
const draftMode = isDraftModeEnabled({ searchParams });
|
|
28
28
|
const previewEnvironment = isOnVercelPreviewEnvironment();
|
|
29
29
|
const isDevelopment = isDevelopmentEnvironment();
|
|
30
|
+
const isCanvasEditing = isIncontextEditingEnabled({
|
|
31
|
+
searchParams,
|
|
32
|
+
});
|
|
30
33
|
// resolve the path from provided params
|
|
31
34
|
const path = resolvePath({
|
|
32
35
|
params,
|
|
@@ -57,5 +60,5 @@ const UniformCompositionInner = async ({ params, searchParams, children }) => {
|
|
|
57
60
|
path,
|
|
58
61
|
searchParams,
|
|
59
62
|
};
|
|
60
|
-
return (_jsxs(UniformProvider, { cookieValue: cookieValue, seenComponents: seenComponents, children: [_jsx(UniformScript, { enabled:
|
|
63
|
+
return (_jsxs(UniformProvider, { cookieValue: cookieValue, seenComponents: seenComponents, children: [_jsx(UniformScript, { enabled: isCanvasEditing }), _jsx(UniformComponent, { data: evaluatedComposition, context: context }), Boolean(children) && children] }));
|
|
61
64
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-next-rsc",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.38.2",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "pnpm build --watch",
|
|
@@ -56,13 +56,13 @@
|
|
|
56
56
|
"typescript": "^5.0.4"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@uniformdev/canvas": "19.
|
|
60
|
-
"@uniformdev/canvas-react": "19.
|
|
61
|
-
"@uniformdev/context": "19.
|
|
62
|
-
"@uniformdev/project-map": "19.
|
|
63
|
-
"@uniformdev/redirect": "19.
|
|
64
|
-
"@uniformdev/richtext": "19.
|
|
65
|
-
"@uniformdev/webhooks": "19.
|
|
59
|
+
"@uniformdev/canvas": "19.38.2",
|
|
60
|
+
"@uniformdev/canvas-react": "19.38.2",
|
|
61
|
+
"@uniformdev/context": "19.38.2",
|
|
62
|
+
"@uniformdev/project-map": "19.38.2",
|
|
63
|
+
"@uniformdev/redirect": "19.38.2",
|
|
64
|
+
"@uniformdev/richtext": "19.38.2",
|
|
65
|
+
"@uniformdev/webhooks": "19.38.2",
|
|
66
66
|
"@vercel/edge-config": "^0.2.0",
|
|
67
67
|
"dequal": "^2.0.3",
|
|
68
68
|
"js-cookie": "^3.0.5",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "b97fd17fd44e0f5bd3806e942b516cb2bd218096"
|
|
80
80
|
}
|