@sitecore-content-sdk/nextjs 2.2.1 → 2.3.0-beta.atoms.20260721120640

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/atoms.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './types/atoms/index';
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defineAtomsRegistry = exports.defineAtomsCatalog = exports.fileFieldSchema = exports.imageFieldSchema = exports.linkFieldSchema = exports.dateFieldSchema = exports.richTextFieldSchema = exports.textFieldSchema = exports.withPropMeta = exports.useBoundProp = void 0;
4
+ var react_1 = require("@sitecore-content-sdk/react");
5
+ Object.defineProperty(exports, "useBoundProp", { enumerable: true, get: function () { return react_1.useBoundProp; } });
6
+ Object.defineProperty(exports, "withPropMeta", { enumerable: true, get: function () { return react_1.withPropMeta; } });
7
+ Object.defineProperty(exports, "textFieldSchema", { enumerable: true, get: function () { return react_1.textFieldSchema; } });
8
+ Object.defineProperty(exports, "richTextFieldSchema", { enumerable: true, get: function () { return react_1.richTextFieldSchema; } });
9
+ Object.defineProperty(exports, "dateFieldSchema", { enumerable: true, get: function () { return react_1.dateFieldSchema; } });
10
+ Object.defineProperty(exports, "linkFieldSchema", { enumerable: true, get: function () { return react_1.linkFieldSchema; } });
11
+ Object.defineProperty(exports, "imageFieldSchema", { enumerable: true, get: function () { return react_1.imageFieldSchema; } });
12
+ Object.defineProperty(exports, "fileFieldSchema", { enumerable: true, get: function () { return react_1.fileFieldSchema; } });
13
+ var re_exports_1 = require("./re-exports");
14
+ Object.defineProperty(exports, "defineAtomsCatalog", { enumerable: true, get: function () { return re_exports_1.defineAtomsCatalog; } });
15
+ Object.defineProperty(exports, "defineAtomsRegistry", { enumerable: true, get: function () { return re_exports_1.defineAtomsRegistry; } });
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defineAtomsRegistry = exports.defineAtomsCatalog = void 0;
4
+ const react_1 = require("@sitecore-content-sdk/react");
5
+ /**
6
+ * Define an atoms catalog from component and action definitions.
7
+ *
8
+ * Pass component/action definitions exactly as json-render expects them.
9
+ * The returned catalog carries full type information so `defineAtomsRegistry`
10
+ * can infer props per component.
11
+ * @param {T} input - Catalog input with `components` and optionally `actions`
12
+ * @returns A typed json-render Catalog
13
+ * @example
14
+ * ```ts
15
+ * import { z } from 'zod';
16
+ * import { defineAtomsCatalog } from '@sitecore-content-sdk/nextjs/atoms';
17
+ *
18
+ * const catalog = defineAtomsCatalog({
19
+ * components: {
20
+ * Button: {
21
+ * props: z.object({ label: z.string(), variant: z.enum(['primary', 'secondary']) }),
22
+ * description: 'A clickable button',
23
+ * slots: ['default'],
24
+ * },
25
+ * Card: {
26
+ * props: z.object({ title: z.string() }),
27
+ * description: 'A content card',
28
+ * slots: ['default'],
29
+ * },
30
+ * },
31
+ * actions: {
32
+ * submit: {
33
+ * params: z.object({ formId: z.string() }),
34
+ * description: 'Submit a form',
35
+ * },
36
+ * },
37
+ * });
38
+ * ```
39
+ * @public
40
+ */
41
+ exports.defineAtomsCatalog = react_1.defineAtomsCatalog;
42
+ /**
43
+ * Define an atoms registry that maps catalog definitions to Nextjs implementations.
44
+ *
45
+ * Each component receives `{ props, children, emit, on, bindings, loading }`
46
+ * @param catalog - The catalog created by defineAtomsCatalog
47
+ * @param options - Component and action implementations
48
+ * @returns Registry result with component registry and action handlers
49
+ * @example
50
+ *
51
+ * ```tsx
52
+ * import { defineAtomsRegistry } from '@sitecore-content-sdk/nextjs/atoms';
53
+ *
54
+ * const { registry, handlers, executeAction } = defineAtomsRegistry(catalog, {
55
+ * components: {
56
+ * Button: ({ props, children, emit }) => (
57
+ * <button onClick={() => emit('press')}>{props.label}{children}</button>
58
+ * ),
59
+ * Card: ({ props, children }) => (
60
+ * <div className="card"><h2>{props.title}</h2>{children}</div>
61
+ * ),
62
+ * },
63
+ * actions: {
64
+ * submit: async (params) => {
65
+ * await fetch('/api/submit', { method: 'POST', body: JSON.stringify(params) });
66
+ * },
67
+ * },
68
+ * });
69
+ * ```
70
+ * @public
71
+ */
72
+ exports.defineAtomsRegistry = react_1.defineAtomsRegistry;
@@ -22,10 +22,7 @@ exports.SITECORE_CONTENT_CACHE_TAG_PREFIX = 'sc';
22
22
  * @internal
23
23
  */
24
24
  function sanitizeSitecoreCacheTagSegment(value) {
25
- return value
26
- .trim()
27
- .toLowerCase()
28
- .replace(/[/:\s]+/g, '_');
25
+ return value.trim().toLowerCase().replace(/[/:\s]+/g, '_');
29
26
  }
30
27
  /**
31
28
  * Normalizes a Sitecore item GUID for use in cache tags (lowercase, no braces).
@@ -15,6 +15,7 @@ const react_2 = require("@sitecore-content-sdk/react");
15
15
  * delegates to the appropriate rendering implementation:
16
16
  * - Client components are rendered using the `DesignLibrary` component
17
17
  * - Server components are rendered using the `DesignLibraryServer` component
18
+ * - Low code components are rendered using the `DesignLibraryLowCodeComponent` component
18
19
  * @param {DesingLibraryAppProps} props - The properties for the Design Library App.
19
20
  * @public
20
21
  */
@@ -23,9 +24,10 @@ const DesignLibraryApp = ({ page, componentMap, loadServerImportMap = react_2.no
23
24
  const { route } = page.layout.sitecore;
24
25
  if (!route)
25
26
  return null;
27
+ const isLowCode = page.mode.designLibrary.isLowCode;
26
28
  const rendering = (_a = route === null || route === void 0 ? void 0 : route.placeholders[layout_1.EDITING_COMPONENT_PLACEHOLDER]) === null || _a === void 0 ? void 0 : _a[0];
27
29
  const component = componentMap.get((rendering === null || rendering === void 0 ? void 0 : rendering.componentName) || '');
28
30
  const isClient = component && component.componentType === 'client';
29
- return (react_1.default.createElement(react_1.default.Fragment, null, isClient ? (react_1.default.createElement(react_2.DesignLibrary, null)) : (react_1.default.createElement(DesignLibraryServer_1.DesignLibraryServer, { page: page, componentMap: componentMap, loadServerImportMap: loadServerImportMap, rendering: route }))));
31
+ return (react_1.default.createElement(react_1.default.Fragment, null, isLowCode ? (react_1.default.createElement(react_2.DesignLibraryLowCodeComponent, null)) : isClient ? (react_1.default.createElement(react_2.DesignLibrary, null)) : (react_1.default.createElement(DesignLibraryServer_1.DesignLibraryServer, { page: page, componentMap: componentMap, loadServerImportMap: loadServerImportMap, rendering: route }))));
30
32
  };
31
33
  exports.DesignLibraryApp = DesignLibraryApp;
@@ -32,7 +32,7 @@ function addDefaultScaffoldTemplates(cliConfig) {
32
32
  cliConfig.scaffold.templates.unshift(default_component_1.defaultTemplate, byoc_component_1.byocTemplate);
33
33
  }
34
34
  /**
35
- * Add the framework-specific implementaion of the component map generator to the CLI configuration.
35
+ * Add the framework-specific implementation of the component map generator to the CLI configuration.
36
36
  * @param {SitecoreCliConfigInput} cliConfig - The CLI configuration object
37
37
  */
38
38
  function addDefaultComponentMapGenerator(cliConfig) {
@@ -21,6 +21,37 @@ const isRedirectStatus = (status) => status >= REDIRECT_STATUS_MIN && status <=
21
21
  class ProxyHandler {
22
22
  }
23
23
  exports.ProxyHandler = ProxyHandler;
24
+ /**
25
+ * Hostname from a `Host` or `x-forwarded-host` value, without port.
26
+ * - `[::1]:3000` → `::1`
27
+ * - `127.0.0.1:3000` → `127.0.0.1`
28
+ * - `example.com:443` → `example.com`
29
+ * - `::1` → `::1` (does not treat `:1` as a port)
30
+ * @param {string} host - Raw header value
31
+ */
32
+ function getHostnameFromHostHeader(host) {
33
+ const trimmed = host.trim();
34
+ // Bracketed IPv6: "[...]:port" or "[...]"
35
+ if (trimmed.startsWith('[')) {
36
+ const end = trimmed.indexOf(']');
37
+ if (end !== -1) {
38
+ return trimmed.slice(1, end).toLowerCase();
39
+ }
40
+ }
41
+ // Unbracketed IPv6 (e.g. ::1, 2001:db8::1) — never strip on last ":digits"
42
+ if (trimmed.includes('::')) {
43
+ return trimmed.toLowerCase();
44
+ }
45
+ // IPv4 or DNS name with ":port" (port = decimal digits only)
46
+ const lastColon = trimmed.lastIndexOf(':');
47
+ if (lastColon > 0) {
48
+ const after = trimmed.slice(lastColon + 1);
49
+ if (/^\d+$/.test(after)) {
50
+ return trimmed.slice(0, lastColon).toLowerCase();
51
+ }
52
+ }
53
+ return trimmed.toLowerCase();
54
+ }
24
55
  /**
25
56
  * Base proxy class with common methods
26
57
  * @public
@@ -123,7 +154,7 @@ class ProxyBase extends ProxyHandler {
123
154
  * @param {NextRequest} req request
124
155
  */
125
156
  getHostHeader(req) {
126
- return (0, site_1.getHostnameFromHostHeader)(req.headers.get('x-forwarded-host') || req.headers.get('host') || '');
157
+ return getHostnameFromHostHeader(req.headers.get('x-forwarded-host') || req.headers.get('host') || '');
127
158
  }
128
159
  /**
129
160
  * Get site information. If site name is stored in cookie, use it, otherwise resolve by hostname
@@ -38,8 +38,9 @@ const tools_1 = require("@sitecore-content-sdk/content/tools");
38
38
  const path = __importStar(require("path"));
39
39
  const fs = __importStar(require("fs"));
40
40
  const utils_1 = require("./templating/utils");
41
+ const DEFAULT_HEADER_COMMENT = "Below are built-in components that are available in the app, it's recommended to keep them as is";
41
42
  const APP_ROUTER_BUILTIN_IMPORTS = `
42
- import { BYOCServerWrapper, FEaaSServerWrapper } from '@sitecore-content-sdk/nextjs';
43
+ import { BYOCServerWrapper, NextjsContentSdkComponent, FEaaSServerWrapper } from '@sitecore-content-sdk/nextjs';
43
44
  import { Form } from '@sitecore-content-sdk/nextjs';
44
45
  `;
45
46
  const APP_ROUTER_BUILTIN_ENTRIES = [
@@ -48,7 +49,7 @@ const APP_ROUTER_BUILTIN_ENTRIES = [
48
49
  `['Form', { ...Form, componentType: 'client' }]`,
49
50
  ];
50
51
  const PAGES_ROUTER_BUILTIN_IMPORTS = `
51
- import { BYOCWrapper, FEaaSWrapper } from '@sitecore-content-sdk/nextjs';
52
+ import { BYOCWrapper, NextjsContentSdkComponent, FEaaSWrapper } from '@sitecore-content-sdk/nextjs';
52
53
  import { Form } from '@sitecore-content-sdk/nextjs';
53
54
  `;
54
55
  const PAGES_ROUTER_BUILTIN_ENTRIES = [
@@ -57,7 +58,7 @@ const PAGES_ROUTER_BUILTIN_ENTRIES = [
57
58
  `['Form', Form]`,
58
59
  ];
59
60
  const CLIENT_MAP_BUILTIN_IMPORTS = `
60
- import { BYOCClientWrapper, FEaaSClientWrapper } from '@sitecore-content-sdk/nextjs';
61
+ import { BYOCClientWrapper, NextjsContentSdkComponent, FEaaSClientWrapper } from '@sitecore-content-sdk/nextjs';
61
62
  import { Form } from '@sitecore-content-sdk/nextjs';
62
63
  `;
63
64
  const CLIENT_MAP_BUILTIN_ENTRIES = [
@@ -65,20 +66,150 @@ const CLIENT_MAP_BUILTIN_ENTRIES = [
65
66
  `['FEaaSWrapper', FEaaSClientWrapper]`,
66
67
  `['Form', Form]`,
67
68
  ];
69
+ // Common builder for Next.js component map content
70
+ const prepareComponentsForMap = (components, opts) => {
71
+ const groups = new Map();
72
+ const getPrefix = (name) => {
73
+ const index = name.indexOf('.');
74
+ return index === -1 ? name : name.slice(0, index);
75
+ };
76
+ for (const file of components) {
77
+ const dir = path.dirname(file.filePath).replace(/\\/g, '/');
78
+ const prefix = getPrefix(file.componentName);
79
+ const key = `${dir}::${prefix}`;
80
+ let group = groups.get(key);
81
+ if (!group) {
82
+ group = { dir, prefix, neighbors: [] };
83
+ groups.set(key, group);
84
+ }
85
+ if (file.componentName === prefix)
86
+ group.base = file;
87
+ else
88
+ group.neighbors.push(file);
89
+ }
90
+ const entries = [];
91
+ for (const group of groups.values()) {
92
+ const imports = [];
93
+ if (opts.includeVariants) {
94
+ const spreads = [];
95
+ for (const neighbor of group.neighbors) {
96
+ imports.push(`import * as ${neighbor.moduleName} from '${neighbor.importPath}';`);
97
+ spreads.push(`...${neighbor.moduleName}`);
98
+ }
99
+ if (group.base) {
100
+ imports.push(`import * as ${group.base.moduleName} from '${group.base.importPath}';`);
101
+ spreads.push(`...${group.base.moduleName}`);
102
+ }
103
+ const annotateClient = !!group.base && 'componentType' in group.base && group.base.componentType === 'client';
104
+ let valueExpr;
105
+ if (spreads.length) {
106
+ valueExpr = spreads.join(', ');
107
+ }
108
+ else {
109
+ valueExpr = group.base ? group.base.moduleName : group.neighbors[0].moduleName;
110
+ }
111
+ entries.push({
112
+ key: group.prefix,
113
+ imports,
114
+ valueExpr,
115
+ annotateClient,
116
+ });
117
+ }
118
+ else {
119
+ // Variants disabled: single entry per group
120
+ if (group.base) {
121
+ imports.push(`import * as ${group.base.moduleName} from '${group.base.importPath}';`);
122
+ const annotateClient = 'componentType' in group.base && group.base.componentType === 'client';
123
+ entries.push({
124
+ key: group.prefix,
125
+ imports,
126
+ valueExpr: group.base.moduleName,
127
+ annotateClient,
128
+ });
129
+ }
130
+ else if (group.neighbors.length) {
131
+ const first = group.neighbors[0];
132
+ imports.push(`import * as ${first.moduleName} from '${first.importPath}';`);
133
+ entries.push({
134
+ key: group.prefix,
135
+ imports,
136
+ valueExpr: first.moduleName,
137
+ annotateClient: false,
138
+ });
139
+ }
140
+ }
141
+ }
142
+ return entries;
143
+ };
68
144
  /**
69
145
  * Distinguishes the simple 2-arity ComponentMapTemplate from the 3-arity EnhancedComponentMapTemplate.
70
146
  * @param {ComponentMapTemplate | EnhancedComponentMapTemplate} fn The template function to check.
71
147
  * @internal
72
148
  */
73
149
  const isComponentMapTemplate = (fn) => fn.length === 2;
150
+ const buildNextjsMapContent = (entries, componentImports, options) => {
151
+ const { headerComment = DEFAULT_HEADER_COMMENT, isClientMap = false, builtInImports, builtInMapEntries, } = options;
152
+ const wildcardImports = [];
153
+ const namedImports = [];
154
+ // Add per-entry imports
155
+ entries.forEach((e) => wildcardImports.push(...e.imports));
156
+ // Handle package imports
157
+ componentImports === null || componentImports === void 0 ? void 0 : componentImports.forEach((pkg) => {
158
+ if (pkg.importInfo.namedImports) {
159
+ namedImports.push(`import { ${pkg.importInfo.namedImports.join(', ')} } from '${pkg.importInfo.importFrom}';`);
160
+ }
161
+ else {
162
+ wildcardImports.push(`import * as ${pkg.importName} from '${pkg.importInfo.importFrom}';`);
163
+ }
164
+ });
165
+ const importLines = [
166
+ headerComment.includes('built-in') ? '// end of built-in components' : null,
167
+ ...wildcardImports,
168
+ ...namedImports,
169
+ ].filter(Boolean);
170
+ const importsSection = importLines.length ? `\n${importLines.join('\n')}` : '';
171
+ // Clone to avoid mutating the caller's array
172
+ const componentMapEntries = structuredClone(builtInMapEntries);
173
+ for (const e of entries) {
174
+ const value = !isClientMap && e.annotateClient
175
+ ? `{ ${e.valueExpr}, componentType: 'client' }`
176
+ : e.valueExpr.includes('...')
177
+ ? `{ ${e.valueExpr} }`
178
+ : e.valueExpr;
179
+ componentMapEntries.push(`['${e.key}', ${value}]`);
180
+ }
181
+ // Add package-based entries
182
+ componentImports === null || componentImports === void 0 ? void 0 : componentImports.forEach((pkg) => {
183
+ if (pkg.importInfo.namedImports) {
184
+ pkg.importInfo.namedImports.forEach((name) => {
185
+ componentMapEntries.push(`['${name}', ${name}]`);
186
+ });
187
+ }
188
+ else {
189
+ componentMapEntries.push(`['${pkg.importName}', ${pkg.importName}]`);
190
+ }
191
+ });
192
+ return `// ${headerComment}
193
+ ${builtInImports}${importsSection}
194
+
195
+ export const componentMap = new Map<string, NextjsContentSdkComponent>([
196
+ ${componentMapEntries
197
+ .map((component) => {
198
+ return ` ${component},\n`;
199
+ })
200
+ .join('')}]);
201
+
202
+ export default componentMap;
203
+ `;
204
+ };
74
205
  // Default App Router (server) component map template
75
206
  const defaultServerMapTemplate = (components, componentImports, ctx) => {
76
207
  var _a, _b;
77
- const entries = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.entries) !== null && _a !== void 0 ? _a : (0, tools_1.prepareComponentsForMap)(components, {
208
+ const entries = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.entries) !== null && _a !== void 0 ? _a : prepareComponentsForMap(components, {
78
209
  includeVariants: (_b = ctx === null || ctx === void 0 ? void 0 : ctx.includeVariants) !== null && _b !== void 0 ? _b : true,
79
210
  });
80
- return (0, tools_1.buildComponentMapContent)(entries, componentImports, {
81
- framework: 'nextjs',
211
+ return buildNextjsMapContent(entries, componentImports, {
212
+ headerComment: DEFAULT_HEADER_COMMENT,
82
213
  isClientMap: false,
83
214
  builtInImports: APP_ROUTER_BUILTIN_IMPORTS,
84
215
  builtInMapEntries: APP_ROUTER_BUILTIN_ENTRIES,
@@ -88,12 +219,10 @@ exports.defaultServerMapTemplate = defaultServerMapTemplate;
88
219
  // Default client-safe component map template for App Router
89
220
  const defaultClientMapTemplate = (components, componentImports, ctx) => {
90
221
  var _a, _b;
91
- const entries = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.entries) !== null && _a !== void 0 ? _a : (0, tools_1.prepareComponentsForMap)(components, {
222
+ const entries = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.entries) !== null && _a !== void 0 ? _a : prepareComponentsForMap(components, {
92
223
  includeVariants: (_b = ctx === null || ctx === void 0 ? void 0 : ctx.includeVariants) !== null && _b !== void 0 ? _b : true,
93
- shouldAnnotateClient: true,
94
224
  });
95
- return (0, tools_1.buildComponentMapContent)(entries, componentImports, {
96
- framework: 'nextjs',
225
+ return buildNextjsMapContent(entries, componentImports, {
97
226
  headerComment: 'Client-safe component map for App Router',
98
227
  isClientMap: true,
99
228
  builtInImports: CLIENT_MAP_BUILTIN_IMPORTS,
@@ -112,10 +241,7 @@ const collectComponents = (opts) => {
112
241
  }
113
242
  return {
114
243
  raw: filtered,
115
- entries: (0, tools_1.prepareComponentsForMap)(filtered, {
116
- includeVariants: opts.includeVariants,
117
- shouldAnnotateClient: true,
118
- }),
244
+ entries: prepareComponentsForMap(filtered, { includeVariants: opts.includeVariants }),
119
245
  };
120
246
  };
121
247
  /**
@@ -153,8 +279,7 @@ const generateMap = ({ paths, destination = '.sitecore', exclude, componentImpor
153
279
  includeVariants,
154
280
  isClientMap: false,
155
281
  })
156
- : (0, tools_1.buildComponentMapContent)(allComponents.entries, componentImports, {
157
- framework: 'nextjs',
282
+ : buildNextjsMapContent(allComponents.entries, componentImports, {
158
283
  isClientMap: false,
159
284
  builtInImports: PAGES_ROUTER_BUILTIN_IMPORTS,
160
285
  builtInMapEntries: PAGES_ROUTER_BUILTIN_ENTRIES,
@@ -0,0 +1,2 @@
1
+ export { useBoundProp, withPropMeta, textFieldSchema, richTextFieldSchema, dateFieldSchema, linkFieldSchema, imageFieldSchema, fileFieldSchema, } from '@sitecore-content-sdk/react';
2
+ export { defineAtomsCatalog, defineAtomsRegistry } from './re-exports';
@@ -0,0 +1,69 @@
1
+ import { defineAtomsCatalog as defineAtomsCatalogReact, defineAtomsRegistry as defineAtomsRegistryReact, } from '@sitecore-content-sdk/react';
2
+ /**
3
+ * Define an atoms catalog from component and action definitions.
4
+ *
5
+ * Pass component/action definitions exactly as json-render expects them.
6
+ * The returned catalog carries full type information so `defineAtomsRegistry`
7
+ * can infer props per component.
8
+ * @param {T} input - Catalog input with `components` and optionally `actions`
9
+ * @returns A typed json-render Catalog
10
+ * @example
11
+ * ```ts
12
+ * import { z } from 'zod';
13
+ * import { defineAtomsCatalog } from '@sitecore-content-sdk/nextjs/atoms';
14
+ *
15
+ * const catalog = defineAtomsCatalog({
16
+ * components: {
17
+ * Button: {
18
+ * props: z.object({ label: z.string(), variant: z.enum(['primary', 'secondary']) }),
19
+ * description: 'A clickable button',
20
+ * slots: ['default'],
21
+ * },
22
+ * Card: {
23
+ * props: z.object({ title: z.string() }),
24
+ * description: 'A content card',
25
+ * slots: ['default'],
26
+ * },
27
+ * },
28
+ * actions: {
29
+ * submit: {
30
+ * params: z.object({ formId: z.string() }),
31
+ * description: 'Submit a form',
32
+ * },
33
+ * },
34
+ * });
35
+ * ```
36
+ * @public
37
+ */
38
+ export const defineAtomsCatalog = defineAtomsCatalogReact;
39
+ /**
40
+ * Define an atoms registry that maps catalog definitions to Nextjs implementations.
41
+ *
42
+ * Each component receives `{ props, children, emit, on, bindings, loading }`
43
+ * @param catalog - The catalog created by defineAtomsCatalog
44
+ * @param options - Component and action implementations
45
+ * @returns Registry result with component registry and action handlers
46
+ * @example
47
+ *
48
+ * ```tsx
49
+ * import { defineAtomsRegistry } from '@sitecore-content-sdk/nextjs/atoms';
50
+ *
51
+ * const { registry, handlers, executeAction } = defineAtomsRegistry(catalog, {
52
+ * components: {
53
+ * Button: ({ props, children, emit }) => (
54
+ * <button onClick={() => emit('press')}>{props.label}{children}</button>
55
+ * ),
56
+ * Card: ({ props, children }) => (
57
+ * <div className="card"><h2>{props.title}</h2>{children}</div>
58
+ * ),
59
+ * },
60
+ * actions: {
61
+ * submit: async (params) => {
62
+ * await fetch('/api/submit', { method: 'POST', body: JSON.stringify(params) });
63
+ * },
64
+ * },
65
+ * });
66
+ * ```
67
+ * @public
68
+ */
69
+ export const defineAtomsRegistry = defineAtomsRegistryReact;
@@ -11,10 +11,7 @@ export const SITECORE_CONTENT_CACHE_TAG_PREFIX = 'sc';
11
11
  * @internal
12
12
  */
13
13
  export function sanitizeSitecoreCacheTagSegment(value) {
14
- return value
15
- .trim()
16
- .toLowerCase()
17
- .replace(/[/:\s]+/g, '_');
14
+ return value.trim().toLowerCase().replace(/[/:\s]+/g, '_');
18
15
  }
19
16
  /**
20
17
  * Normalizes a Sitecore item GUID for use in cache tags (lowercase, no braces).
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { EDITING_COMPONENT_PLACEHOLDER } from '@sitecore-content-sdk/content/layout';
3
3
  import { DesignLibraryServer } from './DesignLibraryServer';
4
- import { DesignLibrary, noopLoadImportMap } from '@sitecore-content-sdk/react';
4
+ import { DesignLibrary, noopLoadImportMap, DesignLibraryLowCodeComponent, } from '@sitecore-content-sdk/react';
5
5
  /**
6
6
  * Design Library component intended to be used by the NextJs app router application
7
7
  * This component serves as a router between client and server component rendering modes for the Design Library.
@@ -9,6 +9,7 @@ import { DesignLibrary, noopLoadImportMap } from '@sitecore-content-sdk/react';
9
9
  * delegates to the appropriate rendering implementation:
10
10
  * - Client components are rendered using the `DesignLibrary` component
11
11
  * - Server components are rendered using the `DesignLibraryServer` component
12
+ * - Low code components are rendered using the `DesignLibraryLowCodeComponent` component
12
13
  * @param {DesingLibraryAppProps} props - The properties for the Design Library App.
13
14
  * @public
14
15
  */
@@ -17,8 +18,9 @@ export const DesignLibraryApp = ({ page, componentMap, loadServerImportMap = noo
17
18
  const { route } = page.layout.sitecore;
18
19
  if (!route)
19
20
  return null;
21
+ const isLowCode = page.mode.designLibrary.isLowCode;
20
22
  const rendering = (_a = route === null || route === void 0 ? void 0 : route.placeholders[EDITING_COMPONENT_PLACEHOLDER]) === null || _a === void 0 ? void 0 : _a[0];
21
23
  const component = componentMap.get((rendering === null || rendering === void 0 ? void 0 : rendering.componentName) || '');
22
24
  const isClient = component && component.componentType === 'client';
23
- return (React.createElement(React.Fragment, null, isClient ? (React.createElement(DesignLibrary, null)) : (React.createElement(DesignLibraryServer, { page: page, componentMap: componentMap, loadServerImportMap: loadServerImportMap, rendering: route }))));
25
+ return (React.createElement(React.Fragment, null, isLowCode ? (React.createElement(DesignLibraryLowCodeComponent, null)) : isClient ? (React.createElement(DesignLibrary, null)) : (React.createElement(DesignLibraryServer, { page: page, componentMap: componentMap, loadServerImportMap: loadServerImportMap, rendering: route }))));
24
26
  };
@@ -28,7 +28,7 @@ function addDefaultScaffoldTemplates(cliConfig) {
28
28
  cliConfig.scaffold.templates.unshift(defaultTemplate, byocTemplate);
29
29
  }
30
30
  /**
31
- * Add the framework-specific implementaion of the component map generator to the CLI configuration.
31
+ * Add the framework-specific implementation of the component map generator to the CLI configuration.
32
32
  * @param {SitecoreCliConfigInput} cliConfig - The CLI configuration object
33
33
  */
34
34
  function addDefaultComponentMapGenerator(cliConfig) {
@@ -1,4 +1,4 @@
1
- import { SITE_KEY, SiteResolver, getHostnameFromHostHeader, } from '@sitecore-content-sdk/content/site';
1
+ import { SITE_KEY, SiteResolver } from '@sitecore-content-sdk/content/site';
2
2
  import { NextResponse } from 'next/server';
3
3
  import { createGraphQLClientFactory, } from '@sitecore-content-sdk/content/client';
4
4
  import { PREVIEW_COOKIES } from '../editing/utils';
@@ -14,6 +14,37 @@ const isRedirectStatus = (status) => status >= REDIRECT_STATUS_MIN && status <=
14
14
  */
15
15
  export class ProxyHandler {
16
16
  }
17
+ /**
18
+ * Hostname from a `Host` or `x-forwarded-host` value, without port.
19
+ * - `[::1]:3000` → `::1`
20
+ * - `127.0.0.1:3000` → `127.0.0.1`
21
+ * - `example.com:443` → `example.com`
22
+ * - `::1` → `::1` (does not treat `:1` as a port)
23
+ * @param {string} host - Raw header value
24
+ */
25
+ function getHostnameFromHostHeader(host) {
26
+ const trimmed = host.trim();
27
+ // Bracketed IPv6: "[...]:port" or "[...]"
28
+ if (trimmed.startsWith('[')) {
29
+ const end = trimmed.indexOf(']');
30
+ if (end !== -1) {
31
+ return trimmed.slice(1, end).toLowerCase();
32
+ }
33
+ }
34
+ // Unbracketed IPv6 (e.g. ::1, 2001:db8::1) — never strip on last ":digits"
35
+ if (trimmed.includes('::')) {
36
+ return trimmed.toLowerCase();
37
+ }
38
+ // IPv4 or DNS name with ":port" (port = decimal digits only)
39
+ const lastColon = trimmed.lastIndexOf(':');
40
+ if (lastColon > 0) {
41
+ const after = trimmed.slice(lastColon + 1);
42
+ if (/^\d+$/.test(after)) {
43
+ return trimmed.slice(0, lastColon).toLowerCase();
44
+ }
45
+ }
46
+ return trimmed.toLowerCase();
47
+ }
17
48
  /**
18
49
  * Base proxy class with common methods
19
50
  * @public
@@ -1,9 +1,10 @@
1
- import { filterComponentsByType, prepareComponentsForMap, buildComponentMapContent, } from '@sitecore-content-sdk/content/tools';
1
+ import { filterComponentsByType, } from '@sitecore-content-sdk/content/tools';
2
2
  import * as path from 'path';
3
3
  import * as fs from 'fs';
4
4
  import { detectRouterType, getComponentListWithTypes, ROUTER_TYPE } from './templating/utils';
5
+ const DEFAULT_HEADER_COMMENT = "Below are built-in components that are available in the app, it's recommended to keep them as is";
5
6
  const APP_ROUTER_BUILTIN_IMPORTS = `
6
- import { BYOCServerWrapper, FEaaSServerWrapper } from '@sitecore-content-sdk/nextjs';
7
+ import { BYOCServerWrapper, NextjsContentSdkComponent, FEaaSServerWrapper } from '@sitecore-content-sdk/nextjs';
7
8
  import { Form } from '@sitecore-content-sdk/nextjs';
8
9
  `;
9
10
  const APP_ROUTER_BUILTIN_ENTRIES = [
@@ -12,7 +13,7 @@ const APP_ROUTER_BUILTIN_ENTRIES = [
12
13
  `['Form', { ...Form, componentType: 'client' }]`,
13
14
  ];
14
15
  const PAGES_ROUTER_BUILTIN_IMPORTS = `
15
- import { BYOCWrapper, FEaaSWrapper } from '@sitecore-content-sdk/nextjs';
16
+ import { BYOCWrapper, NextjsContentSdkComponent, FEaaSWrapper } from '@sitecore-content-sdk/nextjs';
16
17
  import { Form } from '@sitecore-content-sdk/nextjs';
17
18
  `;
18
19
  const PAGES_ROUTER_BUILTIN_ENTRIES = [
@@ -21,7 +22,7 @@ const PAGES_ROUTER_BUILTIN_ENTRIES = [
21
22
  `['Form', Form]`,
22
23
  ];
23
24
  const CLIENT_MAP_BUILTIN_IMPORTS = `
24
- import { BYOCClientWrapper, FEaaSClientWrapper } from '@sitecore-content-sdk/nextjs';
25
+ import { BYOCClientWrapper, NextjsContentSdkComponent, FEaaSClientWrapper } from '@sitecore-content-sdk/nextjs';
25
26
  import { Form } from '@sitecore-content-sdk/nextjs';
26
27
  `;
27
28
  const CLIENT_MAP_BUILTIN_ENTRIES = [
@@ -29,20 +30,150 @@ const CLIENT_MAP_BUILTIN_ENTRIES = [
29
30
  `['FEaaSWrapper', FEaaSClientWrapper]`,
30
31
  `['Form', Form]`,
31
32
  ];
33
+ // Common builder for Next.js component map content
34
+ const prepareComponentsForMap = (components, opts) => {
35
+ const groups = new Map();
36
+ const getPrefix = (name) => {
37
+ const index = name.indexOf('.');
38
+ return index === -1 ? name : name.slice(0, index);
39
+ };
40
+ for (const file of components) {
41
+ const dir = path.dirname(file.filePath).replace(/\\/g, '/');
42
+ const prefix = getPrefix(file.componentName);
43
+ const key = `${dir}::${prefix}`;
44
+ let group = groups.get(key);
45
+ if (!group) {
46
+ group = { dir, prefix, neighbors: [] };
47
+ groups.set(key, group);
48
+ }
49
+ if (file.componentName === prefix)
50
+ group.base = file;
51
+ else
52
+ group.neighbors.push(file);
53
+ }
54
+ const entries = [];
55
+ for (const group of groups.values()) {
56
+ const imports = [];
57
+ if (opts.includeVariants) {
58
+ const spreads = [];
59
+ for (const neighbor of group.neighbors) {
60
+ imports.push(`import * as ${neighbor.moduleName} from '${neighbor.importPath}';`);
61
+ spreads.push(`...${neighbor.moduleName}`);
62
+ }
63
+ if (group.base) {
64
+ imports.push(`import * as ${group.base.moduleName} from '${group.base.importPath}';`);
65
+ spreads.push(`...${group.base.moduleName}`);
66
+ }
67
+ const annotateClient = !!group.base && 'componentType' in group.base && group.base.componentType === 'client';
68
+ let valueExpr;
69
+ if (spreads.length) {
70
+ valueExpr = spreads.join(', ');
71
+ }
72
+ else {
73
+ valueExpr = group.base ? group.base.moduleName : group.neighbors[0].moduleName;
74
+ }
75
+ entries.push({
76
+ key: group.prefix,
77
+ imports,
78
+ valueExpr,
79
+ annotateClient,
80
+ });
81
+ }
82
+ else {
83
+ // Variants disabled: single entry per group
84
+ if (group.base) {
85
+ imports.push(`import * as ${group.base.moduleName} from '${group.base.importPath}';`);
86
+ const annotateClient = 'componentType' in group.base && group.base.componentType === 'client';
87
+ entries.push({
88
+ key: group.prefix,
89
+ imports,
90
+ valueExpr: group.base.moduleName,
91
+ annotateClient,
92
+ });
93
+ }
94
+ else if (group.neighbors.length) {
95
+ const first = group.neighbors[0];
96
+ imports.push(`import * as ${first.moduleName} from '${first.importPath}';`);
97
+ entries.push({
98
+ key: group.prefix,
99
+ imports,
100
+ valueExpr: first.moduleName,
101
+ annotateClient: false,
102
+ });
103
+ }
104
+ }
105
+ }
106
+ return entries;
107
+ };
32
108
  /**
33
109
  * Distinguishes the simple 2-arity ComponentMapTemplate from the 3-arity EnhancedComponentMapTemplate.
34
110
  * @param {ComponentMapTemplate | EnhancedComponentMapTemplate} fn The template function to check.
35
111
  * @internal
36
112
  */
37
113
  const isComponentMapTemplate = (fn) => fn.length === 2;
114
+ const buildNextjsMapContent = (entries, componentImports, options) => {
115
+ const { headerComment = DEFAULT_HEADER_COMMENT, isClientMap = false, builtInImports, builtInMapEntries, } = options;
116
+ const wildcardImports = [];
117
+ const namedImports = [];
118
+ // Add per-entry imports
119
+ entries.forEach((e) => wildcardImports.push(...e.imports));
120
+ // Handle package imports
121
+ componentImports === null || componentImports === void 0 ? void 0 : componentImports.forEach((pkg) => {
122
+ if (pkg.importInfo.namedImports) {
123
+ namedImports.push(`import { ${pkg.importInfo.namedImports.join(', ')} } from '${pkg.importInfo.importFrom}';`);
124
+ }
125
+ else {
126
+ wildcardImports.push(`import * as ${pkg.importName} from '${pkg.importInfo.importFrom}';`);
127
+ }
128
+ });
129
+ const importLines = [
130
+ headerComment.includes('built-in') ? '// end of built-in components' : null,
131
+ ...wildcardImports,
132
+ ...namedImports,
133
+ ].filter(Boolean);
134
+ const importsSection = importLines.length ? `\n${importLines.join('\n')}` : '';
135
+ // Clone to avoid mutating the caller's array
136
+ const componentMapEntries = structuredClone(builtInMapEntries);
137
+ for (const e of entries) {
138
+ const value = !isClientMap && e.annotateClient
139
+ ? `{ ${e.valueExpr}, componentType: 'client' }`
140
+ : e.valueExpr.includes('...')
141
+ ? `{ ${e.valueExpr} }`
142
+ : e.valueExpr;
143
+ componentMapEntries.push(`['${e.key}', ${value}]`);
144
+ }
145
+ // Add package-based entries
146
+ componentImports === null || componentImports === void 0 ? void 0 : componentImports.forEach((pkg) => {
147
+ if (pkg.importInfo.namedImports) {
148
+ pkg.importInfo.namedImports.forEach((name) => {
149
+ componentMapEntries.push(`['${name}', ${name}]`);
150
+ });
151
+ }
152
+ else {
153
+ componentMapEntries.push(`['${pkg.importName}', ${pkg.importName}]`);
154
+ }
155
+ });
156
+ return `// ${headerComment}
157
+ ${builtInImports}${importsSection}
158
+
159
+ export const componentMap = new Map<string, NextjsContentSdkComponent>([
160
+ ${componentMapEntries
161
+ .map((component) => {
162
+ return ` ${component},\n`;
163
+ })
164
+ .join('')}]);
165
+
166
+ export default componentMap;
167
+ `;
168
+ };
38
169
  // Default App Router (server) component map template
39
170
  export const defaultServerMapTemplate = (components, componentImports, ctx) => {
40
171
  var _a, _b;
41
172
  const entries = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.entries) !== null && _a !== void 0 ? _a : prepareComponentsForMap(components, {
42
173
  includeVariants: (_b = ctx === null || ctx === void 0 ? void 0 : ctx.includeVariants) !== null && _b !== void 0 ? _b : true,
43
174
  });
44
- return buildComponentMapContent(entries, componentImports, {
45
- framework: 'nextjs',
175
+ return buildNextjsMapContent(entries, componentImports, {
176
+ headerComment: DEFAULT_HEADER_COMMENT,
46
177
  isClientMap: false,
47
178
  builtInImports: APP_ROUTER_BUILTIN_IMPORTS,
48
179
  builtInMapEntries: APP_ROUTER_BUILTIN_ENTRIES,
@@ -53,10 +184,8 @@ export const defaultClientMapTemplate = (components, componentImports, ctx) => {
53
184
  var _a, _b;
54
185
  const entries = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.entries) !== null && _a !== void 0 ? _a : prepareComponentsForMap(components, {
55
186
  includeVariants: (_b = ctx === null || ctx === void 0 ? void 0 : ctx.includeVariants) !== null && _b !== void 0 ? _b : true,
56
- shouldAnnotateClient: true,
57
187
  });
58
- return buildComponentMapContent(entries, componentImports, {
59
- framework: 'nextjs',
188
+ return buildNextjsMapContent(entries, componentImports, {
60
189
  headerComment: 'Client-safe component map for App Router',
61
190
  isClientMap: true,
62
191
  builtInImports: CLIENT_MAP_BUILTIN_IMPORTS,
@@ -74,10 +203,7 @@ const collectComponents = (opts) => {
74
203
  }
75
204
  return {
76
205
  raw: filtered,
77
- entries: prepareComponentsForMap(filtered, {
78
- includeVariants: opts.includeVariants,
79
- shouldAnnotateClient: true,
80
- }),
206
+ entries: prepareComponentsForMap(filtered, { includeVariants: opts.includeVariants }),
81
207
  };
82
208
  };
83
209
  /**
@@ -115,8 +241,7 @@ export const generateMap = ({ paths, destination = '.sitecore', exclude, compone
115
241
  includeVariants,
116
242
  isClientMap: false,
117
243
  })
118
- : buildComponentMapContent(allComponents.entries, componentImports, {
119
- framework: 'nextjs',
244
+ : buildNextjsMapContent(allComponents.entries, componentImports, {
120
245
  isClientMap: false,
121
246
  builtInImports: PAGES_ROUTER_BUILTIN_IMPORTS,
122
247
  builtInMapEntries: PAGES_ROUTER_BUILTIN_ENTRIES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-content-sdk/nextjs",
3
- "version": "2.2.1",
3
+ "version": "2.3.0-beta.atoms.20260721120640",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "sideEffects": false,
@@ -15,7 +15,7 @@
15
15
  "test": "mocha --require ./test/setup.js \"./src/**/*.test.ts\" \"./src/**/*.test.tsx\" --exit",
16
16
  "prepublishOnly": "npm run build",
17
17
  "coverage": "nyc npm test",
18
- "generate-docs": "npx typedoc --plugin typedoc-plugin-markdown --outputFileStrategy Members --parametersFormat table --readme none --out ../../ref-docs/nextjs --entryPoints src/index.ts --entryPoints src/monitoring/index.ts --entryPoints src/editing/index.ts --entryPoints src/proxy/index.ts --entryPoints src/middleware/index.ts --entryPoints src/context/index.ts --entryPoints src/utils/index.ts --entryPoints src/site/index.ts --entryPoints src/client/index.ts --entryPoints src/tools/index.ts --entryPoints src/editing/codegen/index.ts --entryPoints src/route-handler/index.ts --githubPages false",
18
+ "generate-docs": "npx typedoc --plugin typedoc-plugin-markdown --outputFileStrategy Members --parametersFormat table --readme none --out ../../ref-docs/nextjs --entryPoints src/index.ts --entryPoints src/monitoring/index.ts --entryPoints src/editing/index.ts --entryPoints src/proxy/index.ts --entryPoints src/middleware/index.ts --entryPoints src/context/index.ts --entryPoints src/utils/index.ts --entryPoints src/site/index.ts --entryPoints src/client/index.ts --entryPoints src/tools/index.ts --entryPoints src/editing/codegen/index.ts --entryPoints src/route-handler/index.ts --entryPoints src/atoms/index.ts --githubPages false",
19
19
  "api-extractor": "npm run build && api-extractor run --local --verbose",
20
20
  "api-extractor:verify": "api-extractor run"
21
21
  },
@@ -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.1",
36
- "@sitecore-content-sdk/personalize": "^2.1.0",
35
+ "@sitecore-content-sdk/analytics-core": "2.1.1-beta.atoms.20260721120640",
36
+ "@sitecore-content-sdk/personalize": "2.1.1-beta.atoms.20260721120640",
37
37
  "@stylistic/eslint-plugin": "^5.2.2",
38
38
  "@testing-library/dom": "^10.4.0",
39
39
  "@testing-library/react": "^16.3.0",
@@ -75,9 +75,9 @@
75
75
  "typescript": "~5.8.3"
76
76
  },
77
77
  "peerDependencies": {
78
- "@sitecore-content-sdk/analytics-core": "^2.1.1",
79
- "@sitecore-content-sdk/events": "^2.1.1",
80
- "@sitecore-content-sdk/personalize": "^2.1.0",
78
+ "@sitecore-content-sdk/analytics-core": "2.1.1-beta.atoms.20260721120640",
79
+ "@sitecore-content-sdk/events": "2.1.1-beta.atoms.20260721120640",
80
+ "@sitecore-content-sdk/personalize": "2.1.1-beta.atoms.20260721120640",
81
81
  "next": "^16.2.0",
82
82
  "react": "^19.2.1",
83
83
  "react-dom": "^19.2.1",
@@ -90,10 +90,10 @@
90
90
  },
91
91
  "dependencies": {
92
92
  "@babel/parser": "^7.27.2",
93
- "@sitecore-content-sdk/content": "^2.2.1",
94
- "@sitecore-content-sdk/core": "^2.1.2",
95
- "@sitecore-content-sdk/events": "^2.1.1",
96
- "@sitecore-content-sdk/react": "^2.2.1",
93
+ "@sitecore-content-sdk/content": "2.3.0-beta.atoms.20260721120640",
94
+ "@sitecore-content-sdk/core": "2.1.2-beta.atoms.20260721120640",
95
+ "@sitecore-content-sdk/events": "2.1.1-beta.atoms.20260721120640",
96
+ "@sitecore-content-sdk/react": "2.3.0-beta.atoms.20260721120640",
97
97
  "recast": "^0.23.11",
98
98
  "regex-parser": "^2.3.1"
99
99
  },
@@ -103,6 +103,11 @@
103
103
  "require": "./dist/cjs/index.js",
104
104
  "types": "./types/index.d.ts"
105
105
  },
106
+ "./atoms": {
107
+ "import": "./dist/esm/atoms/index.js",
108
+ "require": "./dist/cjs/atoms/index.js",
109
+ "types": "./types/atoms/index.d.ts"
110
+ },
106
111
  "./client": {
107
112
  "import": "./dist/esm/client/index.js",
108
113
  "require": "./dist/cjs/client/index.js",
@@ -0,0 +1,3 @@
1
+ export { useBoundProp, withPropMeta, type AtomComponentDefinition, type AtomActionDefinition, type AtomsCatalogInput, type AtomsComponentsMap, type AtomActionHandler, type AtomsActionsMap, type AtomsConfig, type PropMeta, textFieldSchema, richTextFieldSchema, dateFieldSchema, linkFieldSchema, imageFieldSchema, fileFieldSchema, type TextFieldSchema, type RichTextFieldSchema, type DateFieldSchema, type LinkFieldSchema, type ImageFieldSchema, type FileFieldSchema, } from '@sitecore-content-sdk/react';
2
+ export { defineAtomsCatalog, defineAtomsRegistry } from './re-exports';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/atoms/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,70 @@
1
+ import { defineAtomsCatalog as defineAtomsCatalogReact, defineAtomsRegistry as defineAtomsRegistryReact } from '@sitecore-content-sdk/react';
2
+ /**
3
+ * Define an atoms catalog from component and action definitions.
4
+ *
5
+ * Pass component/action definitions exactly as json-render expects them.
6
+ * The returned catalog carries full type information so `defineAtomsRegistry`
7
+ * can infer props per component.
8
+ * @param {T} input - Catalog input with `components` and optionally `actions`
9
+ * @returns A typed json-render Catalog
10
+ * @example
11
+ * ```ts
12
+ * import { z } from 'zod';
13
+ * import { defineAtomsCatalog } from '@sitecore-content-sdk/nextjs/atoms';
14
+ *
15
+ * const catalog = defineAtomsCatalog({
16
+ * components: {
17
+ * Button: {
18
+ * props: z.object({ label: z.string(), variant: z.enum(['primary', 'secondary']) }),
19
+ * description: 'A clickable button',
20
+ * slots: ['default'],
21
+ * },
22
+ * Card: {
23
+ * props: z.object({ title: z.string() }),
24
+ * description: 'A content card',
25
+ * slots: ['default'],
26
+ * },
27
+ * },
28
+ * actions: {
29
+ * submit: {
30
+ * params: z.object({ formId: z.string() }),
31
+ * description: 'Submit a form',
32
+ * },
33
+ * },
34
+ * });
35
+ * ```
36
+ * @public
37
+ */
38
+ export declare const defineAtomsCatalog: typeof defineAtomsCatalogReact;
39
+ /**
40
+ * Define an atoms registry that maps catalog definitions to Nextjs implementations.
41
+ *
42
+ * Each component receives `{ props, children, emit, on, bindings, loading }`
43
+ * @param catalog - The catalog created by defineAtomsCatalog
44
+ * @param options - Component and action implementations
45
+ * @returns Registry result with component registry and action handlers
46
+ * @example
47
+ *
48
+ * ```tsx
49
+ * import { defineAtomsRegistry } from '@sitecore-content-sdk/nextjs/atoms';
50
+ *
51
+ * const { registry, handlers, executeAction } = defineAtomsRegistry(catalog, {
52
+ * components: {
53
+ * Button: ({ props, children, emit }) => (
54
+ * <button onClick={() => emit('press')}>{props.label}{children}</button>
55
+ * ),
56
+ * Card: ({ props, children }) => (
57
+ * <div className="card"><h2>{props.title}</h2>{children}</div>
58
+ * ),
59
+ * },
60
+ * actions: {
61
+ * submit: async (params) => {
62
+ * await fetch('/api/submit', { method: 'POST', body: JSON.stringify(params) });
63
+ * },
64
+ * },
65
+ * });
66
+ * ```
67
+ * @public
68
+ */
69
+ export declare const defineAtomsRegistry: typeof defineAtomsRegistryReact;
70
+ //# sourceMappingURL=re-exports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"re-exports.d.ts","sourceRoot":"","sources":["../../src/atoms/re-exports.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,IAAI,uBAAuB,EAC7C,mBAAmB,IAAI,wBAAwB,EAChD,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,kBAAkB,gCAA0B,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,mBAAmB,EAAE,OAAO,wBAAmD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sitecore-cache-tags.d.ts","sourceRoot":"","sources":["../../src/cache/sitecore-cache-tags.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAEtE;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,OAAO,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKrE;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEzE;AAED;;;GAGG;AACH,MAAM,MAAM,gCAAgC,GAAG;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,gCAAgC,GAAG,MAAM,CAM3F;AAED;;;GAGG;AACH,MAAM,M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rB,MAAM,GAAG,IAAI,CAaf;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAUhE"}
@@ -7,6 +7,7 @@ import { DesingLibraryAppProps } from './models';
7
7
  * delegates to the appropriate rendering implementation:
8
8
  * - Client components are rendered using the `DesignLibrary` component
9
9
  * - Server components are rendered using the `DesignLibraryServer` component
10
+ * - Low code components are rendered using the `DesignLibraryLowCodeComponent` component
10
11
  * @param {DesingLibraryAppProps} props - The properties for the Design Library App.
11
12
  * @public
12
13
  */
@@ -1 +1 @@
1
- {"version":3,"file":"DesignLibraryApp.d.ts","sourceRoot":"","sources":["../../../src/components/DesignLibrary/DesignLibraryApp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAIjD;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,GAAI,8CAI9B,qBAAqB,6BAsBvB,CAAC"}
1
+ {"version":3,"file":"DesignLibraryApp.d.ts","sourceRoot":"","sources":["../../../src/components/DesignLibrary/DesignLibraryApp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAQjD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,GAAI,8CAI9B,qBAAqB,6BAyBvB,CAAC"}
package/types/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { default as debug } from './debug';
2
2
  export { constants, NativeDataFetcher, NativeDataFetcherConfig, NativeDataFetcherResponse, NativeDataFetcherError, enableDebug, CacheClient, CacheOptions, MemoryCacheClient, } from '@sitecore-content-sdk/core';
3
3
  export { HTMLLink } from '@sitecore-content-sdk/content';
4
- export { LayoutServiceData, LayoutServicePageState, LayoutServiceContext, LayoutServiceContextData, LayoutService, LayoutServiceConfig, PlaceholderData, PlaceholdersData, RouteData, Field, FieldMetadata, Item, getChildPlaceholder, getFieldValue, ComponentRendering, ComponentFields, ComponentParams, getContentStylesheetLink, EditMode, RenderingType, } from '@sitecore-content-sdk/content/layout';
4
+ export { LayoutServiceData, LayoutServicePageState, LayoutServiceContext, LayoutServiceContextData, LayoutService, LayoutServiceConfig, PlaceholderData, PlaceholdersData, RouteData, Field, Item, getChildPlaceholder, getFieldValue, ComponentRendering, ComponentFields, ComponentParams, getContentStylesheetLink, EditMode, RenderingType, } from '@sitecore-content-sdk/content/layout';
5
5
  export { PageMode, ErrorPage, Page } from '@sitecore-content-sdk/content/client';
6
6
  export { ComponentLayoutService } from '@sitecore-content-sdk/content/editing';
7
7
  export { mediaApi } from '@sitecore-content-sdk/content/media';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EACL,SAAS,EAET,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,EACzB,sBAAsB,EACtB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,iBAAiB,GAClB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EACxB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,aAAa,EACb,IAAI,EACJ,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,wBAAwB,EACxB,QAAQ,EACR,aAAa,GACd,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCA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,wBAAwB,EAAE,4BAmBtC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;AAgCtE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,WAAW,EAAE,mBAkGzB,CAAC"}
1
+ {"version":3,"file":"generate-map.d.ts","sourceRoot":"","sources":["../../src/tools/generate-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,mBAAmB,EAInB,4BAA4B,EAG7B,MAAM,qCAAqC,CAAC;AAyO7C,eAAO,MAAM,wBAAwB,EAAE,4BAiBtC,CAAC;AAGF,eAAO,MAAM,wBAAwB,EAAE,4BAiBtC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;AA6BtE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,WAAW,EAAE,mBAiGzB,CAAC"}