@sitecore-content-sdk/nextjs 2.1.0-canary.9 → 2.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.
Files changed (38) hide show
  1. package/LICENSE.txt +202 -202
  2. package/dist/cjs/client/sitecore-nextjs-client.js +19 -0
  3. package/dist/cjs/editing/constants.js +6 -1
  4. package/dist/cjs/editing/editing-render-middleware.js +4 -2
  5. package/dist/cjs/editing/utils.js +5 -2
  6. package/dist/cjs/initialization/proxy/analytics-adapter.js +5 -3
  7. package/dist/cjs/proxy/bot-tracking-proxy.js +2 -1
  8. package/dist/cjs/proxy/index.js +3 -1
  9. package/dist/cjs/proxy/personalize-proxy.js +1 -1
  10. package/dist/cjs/proxy/preview-proxy.js +67 -0
  11. package/dist/cjs/proxy/proxy.js +7 -1
  12. package/dist/cjs/route-handler/editing-render-route-handler.js +18 -6
  13. package/dist/esm/client/sitecore-nextjs-client.js +19 -0
  14. package/dist/esm/editing/constants.js +5 -0
  15. package/dist/esm/editing/editing-render-middleware.js +4 -2
  16. package/dist/esm/editing/utils.js +5 -2
  17. package/dist/esm/initialization/proxy/analytics-adapter.js +4 -2
  18. package/dist/esm/proxy/bot-tracking-proxy.js +2 -1
  19. package/dist/esm/proxy/index.js +1 -0
  20. package/dist/esm/proxy/personalize-proxy.js +1 -1
  21. package/dist/esm/proxy/preview-proxy.js +60 -0
  22. package/dist/esm/proxy/proxy.js +7 -1
  23. package/dist/esm/route-handler/editing-render-route-handler.js +18 -6
  24. package/package.json +11 -11
  25. package/types/client/sitecore-nextjs-client.d.ts +7 -0
  26. package/types/client/sitecore-nextjs-client.d.ts.map +1 -1
  27. package/types/editing/constants.d.ts +5 -0
  28. package/types/editing/constants.d.ts.map +1 -1
  29. package/types/editing/editing-render-middleware.d.ts.map +1 -1
  30. package/types/editing/utils.d.ts.map +1 -1
  31. package/types/initialization/proxy/analytics-adapter.d.ts.map +1 -1
  32. package/types/proxy/bot-tracking-proxy.d.ts.map +1 -1
  33. package/types/proxy/index.d.ts +1 -0
  34. package/types/proxy/index.d.ts.map +1 -1
  35. package/types/proxy/preview-proxy.d.ts +21 -0
  36. package/types/proxy/preview-proxy.d.ts.map +1 -0
  37. package/types/proxy/proxy.d.ts.map +1 -1
  38. package/types/route-handler/editing-render-route-handler.d.ts.map +1 -1
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PreviewProxy = void 0;
7
+ const server_1 = require("next/server");
8
+ const proxy_1 = require("./proxy");
9
+ const constants_1 = require("../editing/constants");
10
+ const site_1 = require("@sitecore-content-sdk/content/site");
11
+ const debug_1 = __importDefault(require("../debug"));
12
+ /**
13
+ * Proxy for preview requests. Acts as a gateway for preview requests.
14
+ * Currently it only supports internal editing hosts deployed on Sitecore AI.
15
+ * @public
16
+ */
17
+ class PreviewProxy extends proxy_1.ProxyBase {
18
+ constructor(config) {
19
+ // PreviewProxy does not need site resolution
20
+ super(Object.assign(Object.assign({}, config), { sites: [] }));
21
+ this.handle = async (req, res) => {
22
+ var _a, _b;
23
+ // Run only in internal editing host
24
+ if (!process.env.SITECORE) {
25
+ return res;
26
+ }
27
+ const previewParams = req.headers.get(constants_1.EDITING_PARAMS_HEADER);
28
+ const authHeader = (_a = req.headers.get('Authorization')) !== null && _a !== void 0 ? _a : '';
29
+ let editingOptions = previewParams ? JSON.parse(previewParams) : null;
30
+ debug_1.default.editing('preview proxy start');
31
+ // Process only preview requests (e.g. non editing or design studio)
32
+ if (editingOptions && editingOptions.mode !== 'preview') {
33
+ debug_1.default.editing('preview proxy skipped (mode is not preview)');
34
+ return res;
35
+ }
36
+ let pageData = null;
37
+ // Scenario when the request is coming from /api/editing/render endpoint
38
+ if (editingOptions) {
39
+ pageData = await this.client.getPreview(editingOptions, {
40
+ headers: {
41
+ Authorization: authHeader,
42
+ },
43
+ });
44
+ }
45
+ else {
46
+ // Scenario when the page is requested using direct path or navigation is performed
47
+ pageData = await this.client.getPage(req.nextUrl.pathname, {
48
+ site: (_b = req.cookies.get(site_1.SITE_KEY)) === null || _b === void 0 ? void 0 : _b.value,
49
+ locale: this.getLanguage(req),
50
+ }, {
51
+ headers: {
52
+ Authorization: authHeader,
53
+ },
54
+ });
55
+ }
56
+ // Preview content is not found or access is denied
57
+ if (!pageData) {
58
+ debug_1.default.editing('preview content is not found or access is denied');
59
+ return server_1.NextResponse.json({ html: 'Preview content is not found or access is denied' }, { status: 403 });
60
+ }
61
+ debug_1.default.editing('preview proxy end');
62
+ return res;
63
+ };
64
+ this.client = config.client;
65
+ }
66
+ }
67
+ exports.PreviewProxy = PreviewProxy;
@@ -210,7 +210,13 @@ const defineProxy = (...proxies) => {
210
210
  const response = res || server_1.NextResponse.next();
211
211
  debug_1.default.common('proxy start');
212
212
  const start = Date.now();
213
- const proxyResponse = await proxies.reduce((p, proxy) => p.then((res) => proxy.handle(req, res)), Promise.resolve(response));
213
+ const proxyResponse = await proxies.reduce((p, proxy) => p.then((res) => {
214
+ // Short-circuit the remaining proxies once a previous one
215
+ // denied the request (e.g. PreviewProxy returning 403).
216
+ if (res.status === 403)
217
+ return res;
218
+ return proxy.handle(req, res);
219
+ }), Promise.resolve(response));
214
220
  debug_1.default.common('proxy end in %dms', Date.now() - start);
215
221
  return proxyResponse;
216
222
  },
@@ -12,6 +12,7 @@ const layout_1 = require("@sitecore-content-sdk/content/layout");
12
12
  const utils_1 = require("../utils/utils");
13
13
  const headers_1 = require("next/headers");
14
14
  const utils_2 = require("../editing/utils");
15
+ const constants_1 = require("../editing/constants");
15
16
  const site_1 = require("@sitecore-content-sdk/content/site");
16
17
  const debug_1 = __importDefault(require("../debug"));
17
18
  /**
@@ -150,11 +151,17 @@ const createEditingRenderRouteHandlers = (options) => {
150
151
  const convertedCookies = cookieStore.getAll().map((c) => `${c.name}=${c.value}`);
151
152
  try {
152
153
  debug_1.default.editing('fetching page route for %s', query.route);
153
- // Get query string parameters to propagate on subsequent requests (e.g. for deployment protection bypass)
154
- // Additionally ,in app router preview data is passed through query string instead of preview data cookie
155
- const propagatedQsParams = Object.assign(Object.assign(Object.assign({}, (0, utils_2.getQueryParamsForPropagation)(query)), (0, utils_2.mapEditingParams)(query)), allowedQueryParams);
156
- // Get headers to propagate on subsequent requests
157
- const propagatedHeaders = (0, utils_2.getHeadersForPropagation)(headers);
154
+ // Editing preview data, mapped from the incoming `sc_*` query parameters
155
+ // into the typed shape consumed by preview methods.
156
+ const editingPreviewData = Object.assign(Object.assign({}, (0, utils_2.mapEditingParams)(query)), allowedQueryParams);
157
+ // Query string parameters required by the runtime/platform itself
158
+ // (e.g. Vercel deployment protection bypass tokens). Editing preview
159
+ // data is also appended here for backward compatibility with apps that
160
+ // still read `searchParams` in the page; new code should consume the
161
+ // `EDITING_PARAMS_HEADER` instead via `client.getPreviewInputs`.
162
+ // TODO: Remove preview data from qs before next major release.
163
+ const propagatedQsParams = Object.assign(Object.assign({}, (0, utils_2.getQueryParamsForPropagation)(query)), editingPreviewData);
164
+ const propagatedHeaders = Object.assign(Object.assign({}, (0, utils_2.getHeadersForPropagation)(headers)), { [constants_1.EDITING_PARAMS_HEADER]: JSON.stringify(editingPreviewData) });
158
165
  const html = await (0, utils_2.getEditingRequestHtml)(requestUrl, propagatedQsParams, propagatedHeaders, convertedCookies, dataFetcher);
159
166
  // remove nextjs preview cookies to not leak them to the browser
160
167
  const filteredCookies = (0, utils_2.cleanupNextPreviewCookies)(convertedCookies);
@@ -211,7 +218,11 @@ const createEditingRenderRouteHandlers = (options) => {
211
218
  req.nextUrl.searchParams.forEach((value, key) => {
212
219
  query[key] = value;
213
220
  });
214
- const propagatedQsParams = Object.assign(Object.assign(Object.assign({}, (0, utils_2.getQueryParamsForPropagation)(query)), (0, utils_2.mapEditingParams)(query)), (0, utils_2.getAllowedQueryParams)(query, options.allowedQueryParams).allowedQueryParams);
221
+ const editingPreviewData = Object.assign(Object.assign({}, (0, utils_2.mapEditingParams)(query)), (0, utils_2.getAllowedQueryParams)(query, options.allowedQueryParams).allowedQueryParams);
222
+ /**
223
+ * TODO: Remove preview data from qs before next major release.
224
+ */
225
+ const propagatedQsParams = Object.assign(Object.assign({}, (0, utils_2.getQueryParamsForPropagation)(query)), editingPreviewData);
215
226
  const base = (0, utils_2.resolveServerUrl)(req);
216
227
  const targetUrl = new URL('/', base);
217
228
  for (const key in propagatedQsParams) {
@@ -232,6 +243,7 @@ const createEditingRenderRouteHandlers = (options) => {
232
243
  : prerenderBypassCookie;
233
244
  const forwardHeaders = new Headers(req.headers);
234
245
  forwardHeaders.set('cookie', forwardCookie);
246
+ forwardHeaders.set(constants_1.EDITING_PARAMS_HEADER, JSON.stringify(editingPreviewData));
235
247
  const forwardedResponse = await dataFetcher.fetch(targetUrl.toString(), {
236
248
  method: req.method,
237
249
  headers: forwardHeaders,
@@ -2,6 +2,7 @@ import { SitecoreClient, } from '@sitecore-content-sdk/content/client';
2
2
  import { ComponentPropsService } from '../services/component-props-service';
3
3
  import { getSiteRewriteData, normalizeSiteRewrite } from '@sitecore-content-sdk/content/site';
4
4
  import { getPersonalizedRewriteData, normalizePersonalizedRewrite, } from '@sitecore-content-sdk/content/personalize';
5
+ import { EDITING_PARAMS_HEADER } from '../editing/constants';
5
6
  /**
6
7
  * The SitecoreNextjsClient class extends the SitecoreClient class to provide additional functionality for Next.js.
7
8
  * @public
@@ -139,6 +140,24 @@ export class SitecoreNextjsClient extends SitecoreClient {
139
140
  }
140
141
  return componentProps;
141
142
  }
143
+ /**
144
+ * **NOTE**: App Router only.
145
+ * Retrieves preview data from the request headers
146
+ * @param {Headers} headers - The headers from the incoming request.
147
+ * @returns {PreviewData} The preview data.
148
+ */
149
+ getPreviewData(headers) {
150
+ var _a;
151
+ const packed = (_a = headers.get(EDITING_PARAMS_HEADER)) !== null && _a !== void 0 ? _a : '';
152
+ if (!packed)
153
+ return {};
154
+ try {
155
+ return JSON.parse(packed);
156
+ }
157
+ catch (_b) {
158
+ return {};
159
+ }
160
+ }
142
161
  getComponentPropsService() {
143
162
  return new ComponentPropsService();
144
163
  }
@@ -5,3 +5,8 @@ export const QUERY_PARAM_VERCEL_SET_BYPASS_COOKIE = 'x-vercel-set-bypass-cookie'
5
5
  * Note these are in lowercase format to match expected `IncomingHttpHeaders`.
6
6
  */
7
7
  export const EDITING_PASS_THROUGH_HEADERS = ['authorization', 'cookie'];
8
+ /**
9
+ * Header used to propagate editing preview parameters from the editing render
10
+ * route handler to the Next.js page when running in App Router.
11
+ */
12
+ export const EDITING_PARAMS_HEADER = 'x-sitecore-editing-params';
@@ -6,6 +6,7 @@ import { RenderMiddlewareBase } from './render-middleware';
6
6
  import { getEnforcedCorsHeaders } from '@sitecore-content-sdk/core/tools';
7
7
  import debug from '../debug';
8
8
  import { getPreviewCookies, getRequiredEditingParamsList, mapEditingParams, cleanupNextPreviewCookies, getQueryParamsForPropagation, getHeadersForPropagation, getEditingRequestHtml, getCSPHeader, resolveServerUrl, getAllowedQueryParams, } from './utils';
9
+ import { EDITING_PARAMS_HEADER } from './constants';
9
10
  /**
10
11
  * Middleware / handler for use in the editing render Next.js API route (e.g. '/api/editing/render')
11
12
  * which is required for Sitecore editing support.
@@ -81,7 +82,8 @@ export class EditingRenderMiddleware extends RenderMiddlewareBase {
81
82
  });
82
83
  }
83
84
  const previewDataParams = mapEditingParams(query);
84
- res.setPreviewData(Object.assign(Object.assign(Object.assign({}, previewDataParams), allowedQueryParams), { variantIds: (_c = previewDataParams.variantIds) === null || _c === void 0 ? void 0 : _c.split(',') }), {
85
+ const previewData = Object.assign(Object.assign(Object.assign({}, previewDataParams), allowedQueryParams), { variantIds: (_c = previewDataParams.variantIds) === null || _c === void 0 ? void 0 : _c.split(',') });
86
+ res.setPreviewData(previewData, {
85
87
  maxAge: 3,
86
88
  });
87
89
  // Set Preview mode identifier cookie, if the page is rendered in Sitecore Preview mode
@@ -104,7 +106,7 @@ export class EditingRenderMiddleware extends RenderMiddlewareBase {
104
106
  // Get query string parameters to propagate on subsequent requests (e.g. for deployment protection bypass)
105
107
  const propagatedQsParams = getQueryParamsForPropagation(query);
106
108
  // Get headers to propagate on subsequent requests
107
- const propagatedHeaders = getHeadersForPropagation(headers);
109
+ const propagatedHeaders = Object.assign(Object.assign({}, getHeadersForPropagation(headers)), { [EDITING_PARAMS_HEADER]: JSON.stringify(previewData) });
108
110
  const html = await getEditingRequestHtml(requestUrl, propagatedQsParams, propagatedHeaders, cookies, this.dataFetcher);
109
111
  // remove preview cookies to not leak them to the browser
110
112
  if (cookies && Array.isArray(cookies)) {
@@ -172,6 +172,7 @@ export const getHeadersForPropagation = (headers) => {
172
172
  * @returns {string} HTML with editing markup
173
173
  */
174
174
  export const getEditingRequestHtml = async (requestUrl, propagatedQsParams, propagatedHeaders, cookies, dataFetcher) => {
175
+ var _a;
175
176
  // Grab the Next.js preview cookies to send on to the render request
176
177
  propagatedHeaders.cookie = `${propagatedHeaders.cookie ? propagatedHeaders.cookie + ';' : ''}${cookies.join(';')}`;
177
178
  // enable content sdk preview
@@ -190,12 +191,14 @@ export const getEditingRequestHtml = async (requestUrl, propagatedQsParams, prop
190
191
  .catch((err) => {
191
192
  // We need to handle not found error provided by Vercel
192
193
  // for `fallback: false` pages
193
- if (err.response.status === 404) {
194
+ // Or preview content is not found or access is denied
195
+ if (err.response.status === 404 || err.response.status === 403) {
194
196
  return err.response;
195
197
  }
196
198
  throw err;
197
199
  });
198
- let html = pageRes.data;
200
+ // pageRes.data.html can be passed by middleware
201
+ let html = typeof pageRes.data === 'string' ? pageRes.data : ((_a = pageRes.data) === null || _a === void 0 ? void 0 : _a.html) || '';
199
202
  if (!html || html.length === 0) {
200
203
  throw new Error(`Failed to render html for ${requestUrl.toString()}`);
201
204
  }
@@ -1,5 +1,4 @@
1
- import { COOKIE_NAME_PREFIX, fetchClientIdFromEdgeProxy, getDefaultCookieAttributes, } from '@sitecore-content-sdk/analytics-core/internal';
2
- import { getAnalyticsPlugin, } from '@sitecore-content-sdk/analytics-core/internal';
1
+ import { COOKIE_NAME_PREFIX, fetchClientIdFromEdgeProxy, isBotServerSide, getDefaultCookieAttributes, getAnalyticsPlugin, } from '@sitecore-content-sdk/analytics-core/internal';
3
2
  import { getCoreContext } from '@sitecore-content-sdk/core';
4
3
  /**
5
4
  * Creates a proxy-based analytics adapter that reads and writes the visitor ID
@@ -13,6 +12,9 @@ import { getCoreContext } from '@sitecore-content-sdk/core';
13
12
  export function analyticsProxyAdapter(request, response) {
14
13
  return {
15
14
  type: 'proxy',
15
+ isBot: () => {
16
+ return isBotServerSide(request.cookies.toString(), request.headers.get('user-agent'));
17
+ },
16
18
  getClientId: () => {
17
19
  return getClientId(request);
18
20
  },
@@ -1,7 +1,7 @@
1
1
  import { initContentSdk } from '@sitecore-content-sdk/core';
2
2
  import { analyticsPlugin } from '@sitecore-content-sdk/analytics-core';
3
3
  import { eventsPlugin, botPageView } from '@sitecore-content-sdk/events';
4
- import { isBot, BOT_DETECTION_COOKIE } from '@sitecore-content-sdk/events/internal';
4
+ import { isBot, BOT_DETECTION_COOKIE } from '@sitecore-content-sdk/analytics-core/internal';
5
5
  import { ProxyBase } from './proxy';
6
6
  import debug from '../debug';
7
7
  import { analyticsProxyAdapter } from '../initialization/proxy/analytics-adapter';
@@ -76,6 +76,7 @@ export class BotTrackingProxy extends ProxyBase {
76
76
  sameSite: 'lax',
77
77
  path: '/',
78
78
  });
79
+ debug.common('bot tracking proxy (visitor is a bot)');
79
80
  if (this.config.fetchEvent) {
80
81
  this.config.fetchEvent.waitUntil(botTracking());
81
82
  }
@@ -6,5 +6,6 @@ export { AppRouterMultisiteProxy } from './app-router-multisite-proxy';
6
6
  export { LocaleProxy } from './locale-proxy';
7
7
  export { PersonalizeService, } from '@sitecore-content-sdk/content/personalize';
8
8
  export { BotTrackingProxy } from './bot-tracking-proxy';
9
+ export { PreviewProxy } from './preview-proxy';
9
10
  export { RedirectsService, REDIRECT_TYPE_301, REDIRECT_TYPE_302, REDIRECT_TYPE_SERVER_TRANSFER, } from '@sitecore-content-sdk/content/site';
10
11
  export { default as debug } from '../debug';
@@ -1,7 +1,7 @@
1
1
  import { PersonalizeService, getPersonalizedRewrite, CdpHelper, DEFAULT_VARIANT, } from '@sitecore-content-sdk/content/personalize';
2
+ import { BOT_DETECTION_COOKIE } from '@sitecore-content-sdk/analytics-core/internal';
2
3
  import { initContentSdk } from '@sitecore-content-sdk/core';
3
4
  import { personalize } from '@sitecore-content-sdk/personalize';
4
- import { BOT_DETECTION_COOKIE } from '@sitecore-content-sdk/events/internal';
5
5
  import { analyticsPlugin } from '@sitecore-content-sdk/analytics-core';
6
6
  import { personalizeServerPlugin } from '@sitecore-content-sdk/personalize';
7
7
  import { analyticsProxyAdapter } from '../initialization/proxy/analytics-adapter';
@@ -0,0 +1,60 @@
1
+ import { NextResponse } from 'next/server';
2
+ import { ProxyBase } from './proxy';
3
+ import { EDITING_PARAMS_HEADER } from '../editing/constants';
4
+ import { SITE_KEY } from '@sitecore-content-sdk/content/site';
5
+ import debug from '../debug';
6
+ /**
7
+ * Proxy for preview requests. Acts as a gateway for preview requests.
8
+ * Currently it only supports internal editing hosts deployed on Sitecore AI.
9
+ * @public
10
+ */
11
+ export class PreviewProxy extends ProxyBase {
12
+ constructor(config) {
13
+ // PreviewProxy does not need site resolution
14
+ super(Object.assign(Object.assign({}, config), { sites: [] }));
15
+ this.handle = async (req, res) => {
16
+ var _a, _b;
17
+ // Run only in internal editing host
18
+ if (!process.env.SITECORE) {
19
+ return res;
20
+ }
21
+ const previewParams = req.headers.get(EDITING_PARAMS_HEADER);
22
+ const authHeader = (_a = req.headers.get('Authorization')) !== null && _a !== void 0 ? _a : '';
23
+ let editingOptions = previewParams ? JSON.parse(previewParams) : null;
24
+ debug.editing('preview proxy start');
25
+ // Process only preview requests (e.g. non editing or design studio)
26
+ if (editingOptions && editingOptions.mode !== 'preview') {
27
+ debug.editing('preview proxy skipped (mode is not preview)');
28
+ return res;
29
+ }
30
+ let pageData = null;
31
+ // Scenario when the request is coming from /api/editing/render endpoint
32
+ if (editingOptions) {
33
+ pageData = await this.client.getPreview(editingOptions, {
34
+ headers: {
35
+ Authorization: authHeader,
36
+ },
37
+ });
38
+ }
39
+ else {
40
+ // Scenario when the page is requested using direct path or navigation is performed
41
+ pageData = await this.client.getPage(req.nextUrl.pathname, {
42
+ site: (_b = req.cookies.get(SITE_KEY)) === null || _b === void 0 ? void 0 : _b.value,
43
+ locale: this.getLanguage(req),
44
+ }, {
45
+ headers: {
46
+ Authorization: authHeader,
47
+ },
48
+ });
49
+ }
50
+ // Preview content is not found or access is denied
51
+ if (!pageData) {
52
+ debug.editing('preview content is not found or access is denied');
53
+ return NextResponse.json({ html: 'Preview content is not found or access is denied' }, { status: 403 });
54
+ }
55
+ debug.editing('preview proxy end');
56
+ return res;
57
+ };
58
+ this.client = config.client;
59
+ }
60
+ }
@@ -202,7 +202,13 @@ export const defineProxy = (...proxies) => {
202
202
  const response = res || NextResponse.next();
203
203
  debug.common('proxy start');
204
204
  const start = Date.now();
205
- const proxyResponse = await proxies.reduce((p, proxy) => p.then((res) => proxy.handle(req, res)), Promise.resolve(response));
205
+ const proxyResponse = await proxies.reduce((p, proxy) => p.then((res) => {
206
+ // Short-circuit the remaining proxies once a previous one
207
+ // denied the request (e.g. PreviewProxy returning 403).
208
+ if (res.status === 403)
209
+ return res;
210
+ return proxy.handle(req, res);
211
+ }), Promise.resolve(response));
206
212
  debug.common('proxy end in %dms', Date.now() - start);
207
213
  return proxyResponse;
208
214
  },
@@ -5,6 +5,7 @@ import { LayoutServicePageState } from '@sitecore-content-sdk/content/layout';
5
5
  import { getEditingSecret } from '../utils/utils';
6
6
  import { draftMode, cookies as nextCokies } from 'next/headers';
7
7
  import { mapEditingParams, getEditingRequestHtml, cleanupNextPreviewCookies, getHeadersForPropagation, getQueryParamsForPropagation, getRequiredEditingParamsList, getCSPHeader, resolveServerUrl, getAllowedQueryParams, } from '../editing/utils';
8
+ import { EDITING_PARAMS_HEADER } from '../editing/constants';
8
9
  import { SITE_KEY } from '@sitecore-content-sdk/content/site';
9
10
  import debug from '../debug';
10
11
  /**
@@ -143,11 +144,17 @@ export const createEditingRenderRouteHandlers = (options) => {
143
144
  const convertedCookies = cookieStore.getAll().map((c) => `${c.name}=${c.value}`);
144
145
  try {
145
146
  debug.editing('fetching page route for %s', query.route);
146
- // Get query string parameters to propagate on subsequent requests (e.g. for deployment protection bypass)
147
- // Additionally ,in app router preview data is passed through query string instead of preview data cookie
148
- const propagatedQsParams = Object.assign(Object.assign(Object.assign({}, getQueryParamsForPropagation(query)), mapEditingParams(query)), allowedQueryParams);
149
- // Get headers to propagate on subsequent requests
150
- const propagatedHeaders = getHeadersForPropagation(headers);
147
+ // Editing preview data, mapped from the incoming `sc_*` query parameters
148
+ // into the typed shape consumed by preview methods.
149
+ const editingPreviewData = Object.assign(Object.assign({}, mapEditingParams(query)), allowedQueryParams);
150
+ // Query string parameters required by the runtime/platform itself
151
+ // (e.g. Vercel deployment protection bypass tokens). Editing preview
152
+ // data is also appended here for backward compatibility with apps that
153
+ // still read `searchParams` in the page; new code should consume the
154
+ // `EDITING_PARAMS_HEADER` instead via `client.getPreviewInputs`.
155
+ // TODO: Remove preview data from qs before next major release.
156
+ const propagatedQsParams = Object.assign(Object.assign({}, getQueryParamsForPropagation(query)), editingPreviewData);
157
+ const propagatedHeaders = Object.assign(Object.assign({}, getHeadersForPropagation(headers)), { [EDITING_PARAMS_HEADER]: JSON.stringify(editingPreviewData) });
151
158
  const html = await getEditingRequestHtml(requestUrl, propagatedQsParams, propagatedHeaders, convertedCookies, dataFetcher);
152
159
  // remove nextjs preview cookies to not leak them to the browser
153
160
  const filteredCookies = cleanupNextPreviewCookies(convertedCookies);
@@ -204,7 +211,11 @@ export const createEditingRenderRouteHandlers = (options) => {
204
211
  req.nextUrl.searchParams.forEach((value, key) => {
205
212
  query[key] = value;
206
213
  });
207
- const propagatedQsParams = Object.assign(Object.assign(Object.assign({}, getQueryParamsForPropagation(query)), mapEditingParams(query)), getAllowedQueryParams(query, options.allowedQueryParams).allowedQueryParams);
214
+ const editingPreviewData = Object.assign(Object.assign({}, mapEditingParams(query)), getAllowedQueryParams(query, options.allowedQueryParams).allowedQueryParams);
215
+ /**
216
+ * TODO: Remove preview data from qs before next major release.
217
+ */
218
+ const propagatedQsParams = Object.assign(Object.assign({}, getQueryParamsForPropagation(query)), editingPreviewData);
208
219
  const base = resolveServerUrl(req);
209
220
  const targetUrl = new URL('/', base);
210
221
  for (const key in propagatedQsParams) {
@@ -225,6 +236,7 @@ export const createEditingRenderRouteHandlers = (options) => {
225
236
  : prerenderBypassCookie;
226
237
  const forwardHeaders = new Headers(req.headers);
227
238
  forwardHeaders.set('cookie', forwardCookie);
239
+ forwardHeaders.set(EDITING_PARAMS_HEADER, JSON.stringify(editingPreviewData));
228
240
  const forwardedResponse = await dataFetcher.fetch(targetUrl.toString(), {
229
241
  method: req.method,
230
242
  headers: forwardHeaders,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-content-sdk/nextjs",
3
- "version": "2.1.0-canary.9",
3
+ "version": "2.1.0",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "sideEffects": false,
@@ -32,8 +32,8 @@
32
32
  "url": "https://github.com/sitecore/content-sdk/issues"
33
33
  },
34
34
  "devDependencies": {
35
- "@sitecore-content-sdk/analytics-core": "2.1.0-canary.9",
36
- "@sitecore-content-sdk/personalize": "2.1.0-canary.9",
35
+ "@sitecore-content-sdk/analytics-core": "^2.1.0",
36
+ "@sitecore-content-sdk/personalize": "^2.1.0",
37
37
  "@stylistic/eslint-plugin": "^5.2.2",
38
38
  "@testing-library/dom": "^10.4.0",
39
39
  "@testing-library/react": "^16.3.0",
@@ -76,9 +76,9 @@
76
76
  "typescript": "~5.8.3"
77
77
  },
78
78
  "peerDependencies": {
79
- "@sitecore-content-sdk/analytics-core": "^2.1.0-canary.3",
80
- "@sitecore-content-sdk/events": "^2.1.0-canary.3",
81
- "@sitecore-content-sdk/personalize": "^2.1.0-canary.3",
79
+ "@sitecore-content-sdk/analytics-core": "^2.1.0",
80
+ "@sitecore-content-sdk/events": "^2.1.0",
81
+ "@sitecore-content-sdk/personalize": "^2.1.0",
82
82
  "next": "^16.2.0",
83
83
  "react": "^19.2.1",
84
84
  "react-dom": "^19.2.1",
@@ -91,10 +91,10 @@
91
91
  },
92
92
  "dependencies": {
93
93
  "@babel/parser": "^7.27.2",
94
- "@sitecore-content-sdk/content": "2.1.0-canary.9",
95
- "@sitecore-content-sdk/core": "2.1.0-canary.9",
96
- "@sitecore-content-sdk/events": "2.1.0-canary.9",
97
- "@sitecore-content-sdk/react": "2.1.0-canary.9",
94
+ "@sitecore-content-sdk/content": "^2.1.0",
95
+ "@sitecore-content-sdk/core": "^2.1.0",
96
+ "@sitecore-content-sdk/events": "^2.1.0",
97
+ "@sitecore-content-sdk/react": "^2.1.0",
98
98
  "recast": "^0.23.11",
99
99
  "regex-parser": "^2.3.1",
100
100
  "sync-disk-cache": "^2.1.0"
@@ -178,7 +178,7 @@
178
178
  },
179
179
  "description": "",
180
180
  "types": "types/index.d.ts",
181
- "gitHead": "a4c0a74b11b414ca47e054ae302756a25547b4e0",
181
+ "gitHead": "c505c331a61f4ebf65f1bd5fe514cb0ab9192c56",
182
182
  "files": [
183
183
  "dist",
184
184
  "types",
@@ -78,6 +78,13 @@ export declare class SitecoreNextjsClient extends SitecoreClient {
78
78
  * @returns {ComponentPropsCollection} component props
79
79
  */
80
80
  getComponentData(layoutData: LayoutServiceData, context: GetServerSidePropsContext | GetStaticPropsContext, components: ComponentMap<NextjsContentSdkComponent>): Promise<ComponentPropsCollection>;
81
+ /**
82
+ * **NOTE**: App Router only.
83
+ * Retrieves preview data from the request headers
84
+ * @param {Headers} headers - The headers from the incoming request.
85
+ * @returns {PreviewData} The preview data.
86
+ */
87
+ getPreviewData(headers: Headers): PreviewData;
81
88
  protected getComponentPropsService(): ComponentPropsService;
82
89
  }
83
90
  //# sourceMappingURL=sitecore-nextjs-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sitecore-nextjs-client.d.ts","sourceRoot":"","sources":["../../src/client/sitecore-nextjs-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,WAAW,EACX,cAAc,EACd,kBAAkB,EACnB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,wBAAwB,EAExB,yBAAyB,EAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAU5E,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,GAAG,IAAI,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;AAE9F;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,cAAc;IAE1C,SAAS,CAAC,WAAW,EAAE,wBAAwB;IAD3D,SAAS,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;gBACjC,WAAW,EAAE,wBAAwB;IAK3D;;;;OAIG;IACH,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE;IAO3C;;;;OAIG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE;IAK3B,OAAO,CACX,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EACvB,WAAW,EAAE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,EAAE,YAAY,GAC1B,OAAO,CAAC,YAAY,EAAE,CAAC;IAmB1B;;;;;;OAMG;IACG,YAAY,CAChB,KAAK,EAAE,MAAM,EAAE,EACf,SAAS,CAAC,EAAE,MAAM,EAAE,EACpB,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,UAAU,EAAE,CAAC;IAaxB;;;;;;;OAOG;IACG,gBAAgB,CACpB,UAAU,EAAE,iBAAiB,EAC7B,OAAO,EAAE,yBAAyB,GAAG,qBAAqB,EAC1D,UAAU,EAAE,YAAY,CAAC,yBAAyB,CAAC,GAClD,OAAO,CAAC,wBAAwB,CAAC;IA2BpC;;;;;OAKG;IACH,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW;IAY7C,SAAS,CAAC,wBAAwB,IAAI,qBAAqB;CAG5D"}
@@ -5,4 +5,9 @@ export declare const QUERY_PARAM_VERCEL_SET_BYPASS_COOKIE = "x-vercel-set-bypass
5
5
  * Note these are in lowercase format to match expected `IncomingHttpHeaders`.
6
6
  */
7
7
  export declare const EDITING_PASS_THROUGH_HEADERS: string[];
8
+ /**
9
+ * Header used to propagate editing preview parameters from the editing render
10
+ * route handler to the Next.js page when running in App Router.
11
+ */
12
+ export declare const EDITING_PARAMS_HEADER = "x-sitecore-editing-params";
8
13
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/editing/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,+BAA+B,CAAC;AACjF,eAAO,MAAM,oCAAoC,+BAA+B,CAAC;AAEjF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,UAA8B,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/editing/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,+BAA+B,CAAC;AACjF,eAAO,MAAM,oCAAoC,+BAA+B,CAAC;AAEjF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,UAA8B,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,qBAAqB,8BAA8B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"editing-render-middleware.d.ts","sourceRoot":"","sources":["../../src/editing/editing-render-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAEvD,OAAO,EAIL,wBAAwB,EACzB,MAAM,uCAAuC,CAAC;AAG/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAe3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9C;;OAEG;IACH,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,cAAc,GAAG;IACnD,KAAK,EAAE,wBAAwB,CAAC;CACjC,CAAC;AAEF;;;;GAIG;AACH,qBAAa,uBAAwB,SAAQ,oBAAoB;IAK5C,MAAM,CAAC,EAAE,6BAA6B;IAJzD,OAAO,CAAC,WAAW,CAAoB;IACvC;;OAEG;gBACgB,MAAM,CAAC,EAAE,6BAA6B,YAAA;IAKzD;;;OAGG;IACI,UAAU,IAAI,CAAC,GAAG,EAAE,qBAAqB,EAAE,GAAG,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC;IAIxF,OAAO,CAAC,OAAO,CA8Jb;CACH"}
1
+ {"version":3,"file":"editing-render-middleware.d.ts","sourceRoot":"","sources":["../../src/editing/editing-render-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,C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eAAO,MAAM,gBAAgB,GAAI,KAAK,cAAc,GAAG,WAAW,WAmBjE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,cAIxB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"analytics-adapter.d.ts","sourceRoot":"","sources":["../../../src/initialization/proxy/analytics-adapter.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,gBAAgB,EACjB,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,YAAY,GACrB,qBAAqB,CA2DvB;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,SAAS,WAAW,KAAG,MAAM,GAAG,IAI3D,CAAC"}
1
+ {"version":3,"file":"analytics-adapter.d.ts","sourceRoot":"","sources":["../../../src/initialization/proxy/analytics-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,gBAAgB,EACjB,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,YAAY,GACrB,qBAAqB,CA8DvB;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,SAAS,WAAW,KAAG,MAAM,GAAG,IAI3D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"bot-tracking-proxy.d.ts","sourceRoot":"","sources":["../../src/proxy/bot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,SAAS;IACjC,SAAS,CAAC,MAAM,EAAE,sBAAsB;gBAA9B,MAAM,EAAE,sBAAsB;IAIpD,MAAM,GAAU,KAAK,WAAW,EAAE,KAAK,YAAY,KAAG,OAAO,CAAC,YAAY,CAAC,CA4FzE;IAEF;;;;OAIG;IACH,SAAS,CAAC,6BAA6B,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO;CAwBnE"}
@@ -6,6 +6,7 @@ export { AppRouterMultisiteProxy } from './app-router-multisite-proxy';
6
6
  export { LocaleProxy, LocaleProxyConfig } from './locale-proxy';
7
7
  export { PersonalizeService, PersonalizeServiceConfig, } from '@sitecore-content-sdk/content/personalize';
8
8
  export { BotTrackingProxy, BotTrackingProxyConfig } from './bot-tracking-proxy';
9
+ export { PreviewProxy, PreviewProxyConfig } from './preview-proxy';
9
10
  export { RedirectsService, RedirectsServiceConfig, REDIRECT_TYPE_301, REDIRECT_TYPE_302, REDIRECT_TYPE_SERVER_TRANSFER, RedirectInfo, } from '@sitecore-content-sdk/content/site';
10
11
  export { default as debug } from '../debug';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/proxy/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EACL,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,6BAA6B,EAC7B,YAAY,GACb,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/proxy/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EACL,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,6BAA6B,EAC7B,YAAY,GACb,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { NextRequest, NextResponse } from 'next/server';
2
+ import { ProxyBase } from './proxy';
3
+ import { SitecoreClient } from '../client';
4
+ /**
5
+ * Configuration for PreviewProxy
6
+ * @public
7
+ */
8
+ export type PreviewProxyConfig = {
9
+ client: SitecoreClient;
10
+ };
11
+ /**
12
+ * Proxy for preview requests. Acts as a gateway for preview requests.
13
+ * Currently it only supports internal editing hosts deployed on Sitecore AI.
14
+ * @public
15
+ */
16
+ export declare class PreviewProxy extends ProxyBase {
17
+ protected client: SitecoreClient;
18
+ constructor(config: PreviewProxyConfig);
19
+ handle: (req: NextRequest, res: NextResponse) => Promise<NextResponse>;
20
+ }
21
+ //# sourceMappingURL=preview-proxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview-proxy.d.ts","sourceRoot":"","sources":["../../src/proxy/preview-proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAM3C;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAAE,MAAM,EAAE,cAAc,CAAA;CAAE,CAAC;AAE5D;;;;GAIG;AACH,qBAAa,YAAa,SAAQ,SAAS;IACzC,SAAS,CAAC,MAAM,EAAE,cAAc,CAAC;gBAErB,MAAM,EAAE,kBAAkB;IAMtC,MAAM,GAAU,KAAK,WAAW,EAAE,KAAK,YAAY,KAAG,OAAO,CAAC,YAAY,CAAC,CAuDzE;CACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/proxy/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,QAAQ,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAEL,oBAAoB,EACrB,MAAM,sCAAsC,CAAC;AAI9C,eAAO,M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;;;;;OAMG;IACH,SAAS,CAAC,OAAO,CACf,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,YAAY,EACjB,UAAU,CAAC,EAAE,OAAO,GACnB,YAAY;CAchB;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,GAAG,SAAS,YAAY,EAAE;IAElD;;;;OAIG;gBACe,WAAW,QAAQ,YAAY;CAwBpD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"editing-render-route-handler.d.ts","sourceRoot":"","sources":["../../src/route-handler/editing-render-route-handler.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAiB1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D;;;GAGG;AACH,wBAAsB,cAAc,iBAMnC;AAED,KAAK,qBAAqB,GAAG;IAC3B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9C;;OAEG;IACH,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,GAAI,SAAS,qBAAqB;eAwDrD,WAAW;gBAiKV,WAAW;mBAnLd,WAAW;CAgSlC,CAAC"}
1
+ {"version":3,"file":"editing-render-route-handler.d.ts","sourceRoot":"","sources":["../../src/route-handler/editing-render-route-handler.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAkB1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D;;;GAGG;AACH,wBAAsB,cAAc,iBAMnC;AAED,KAAK,qBAAqB,GAAG;IAC3B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9C;;OAEG;IACH,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,GAAI,SAAS,qBAAqB;eAwDrD,WAAW;gBA4KV,WAAW;mBA9Ld,WAAW;CAmTlC,CAAC"}