@sitecore-content-sdk/nextjs 1.3.0-canary.9 → 1.4.0-canary.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.
Files changed (234) hide show
  1. package/README.md +11 -11
  2. package/dist/cjs/client/index.js +10 -10
  3. package/dist/cjs/client/models.js +2 -2
  4. package/dist/cjs/client/sitecore-nextjs-client.js +160 -156
  5. package/dist/cjs/components/BYOCWrapper.js +31 -30
  6. package/dist/cjs/components/ComponentPropsContext.js +66 -59
  7. package/dist/cjs/components/FEaaSWrapper.js +33 -32
  8. package/dist/cjs/components/Link.js +117 -90
  9. package/dist/cjs/components/NextImage.js +66 -62
  10. package/dist/cjs/components/Placeholder.js +55 -50
  11. package/dist/cjs/components/RichText.js +133 -128
  12. package/dist/cjs/config/define-config.js +26 -25
  13. package/dist/cjs/config/index.js +5 -5
  14. package/dist/cjs/config-cli/define-cli-config.js +40 -39
  15. package/dist/cjs/config-cli/index.js +5 -5
  16. package/dist/cjs/editing/codegen/import-map.js +129 -118
  17. package/dist/cjs/editing/codegen/index.js +6 -6
  18. package/dist/cjs/editing/constants.js +10 -10
  19. package/dist/cjs/editing/editing-config-middleware.js +70 -69
  20. package/dist/cjs/editing/editing-render-middleware.js +145 -144
  21. package/dist/cjs/editing/feaas-render-middleware.js +102 -101
  22. package/dist/cjs/editing/index.js +19 -19
  23. package/dist/cjs/editing/render-middleware.js +46 -46
  24. package/dist/cjs/editing/utils.js +260 -257
  25. package/dist/cjs/index.js +132 -131
  26. package/dist/cjs/middleware/app-router-multisite-middleware.js +41 -20
  27. package/dist/cjs/middleware/index.js +30 -30
  28. package/dist/cjs/middleware/locale-middleware.js +85 -84
  29. package/dist/cjs/middleware/middleware.js +195 -192
  30. package/dist/cjs/middleware/multisite-middleware.js +141 -118
  31. package/dist/cjs/middleware/personalize-middleware.js +240 -236
  32. package/dist/cjs/middleware/redirects-middleware.js +323 -297
  33. package/dist/cjs/middleware/robots-middleware.js +45 -44
  34. package/dist/cjs/middleware/sitemap-middleware.js +50 -49
  35. package/dist/cjs/monitoring/healthcheck-middleware.js +31 -30
  36. package/dist/cjs/monitoring/index.js +5 -5
  37. package/dist/cjs/route-handler/editing-config-route-handler.js +110 -106
  38. package/dist/cjs/route-handler/editing-render-route-handler.js +270 -165
  39. package/dist/cjs/route-handler/index.js +11 -11
  40. package/dist/cjs/route-handler/robots-route-handler.js +69 -68
  41. package/dist/cjs/route-handler/sitemap-route-handler.js +66 -65
  42. package/dist/cjs/search/index.js +17 -0
  43. package/dist/cjs/services/component-props-service.js +142 -138
  44. package/dist/cjs/sharedTypes/component-props.js +2 -2
  45. package/dist/cjs/sharedTypes/sitecore-page-props.js +2 -2
  46. package/dist/cjs/site/index.js +5 -5
  47. package/dist/cjs/tools/codegen/import-map.js +15 -0
  48. package/dist/cjs/tools/component-props.loader.js +95 -95
  49. package/dist/cjs/tools/generate-map.js +317 -317
  50. package/dist/cjs/tools/index.js +14 -13
  51. package/dist/cjs/tools/templating/byoc-component.js +36 -36
  52. package/dist/cjs/tools/templating/constants.js +7 -7
  53. package/dist/cjs/tools/templating/default-component.js +35 -35
  54. package/dist/cjs/tools/templating/utils.js +200 -0
  55. package/dist/cjs/utils/index.js +14 -14
  56. package/dist/cjs/utils/utils.js +82 -73
  57. package/dist/esm/client/index.js +2 -2
  58. package/dist/esm/client/models.js +1 -1
  59. package/dist/esm/client/sitecore-nextjs-client.js +156 -152
  60. package/dist/esm/components/BYOCWrapper.js +27 -26
  61. package/dist/esm/components/ComponentPropsContext.js +28 -21
  62. package/dist/esm/components/FEaaSWrapper.js +29 -28
  63. package/dist/esm/components/Link.js +78 -51
  64. package/dist/esm/components/NextImage.js +60 -56
  65. package/dist/esm/components/Placeholder.js +18 -13
  66. package/dist/esm/components/RichText.js +96 -91
  67. package/dist/esm/config/define-config.js +21 -20
  68. package/dist/esm/config/index.js +1 -1
  69. package/dist/esm/config-cli/define-cli-config.js +36 -35
  70. package/dist/esm/config-cli/index.js +1 -1
  71. package/dist/esm/editing/codegen/import-map.js +92 -81
  72. package/dist/esm/editing/codegen/index.js +1 -1
  73. package/dist/esm/editing/constants.js +7 -7
  74. package/dist/esm/editing/editing-config-middleware.js +66 -65
  75. package/dist/esm/editing/editing-render-middleware.js +141 -140
  76. package/dist/esm/editing/feaas-render-middleware.js +98 -97
  77. package/dist/esm/editing/index.js +6 -6
  78. package/dist/esm/editing/render-middleware.js +42 -42
  79. package/dist/esm/editing/utils.js +246 -243
  80. package/dist/esm/index.js +25 -25
  81. package/dist/esm/middleware/app-router-multisite-middleware.js +37 -16
  82. package/dist/esm/middleware/index.js +11 -11
  83. package/dist/esm/middleware/locale-middleware.js +81 -80
  84. package/dist/esm/middleware/middleware.js +189 -186
  85. package/dist/esm/middleware/multisite-middleware.js +137 -114
  86. package/dist/esm/middleware/personalize-middleware.js +236 -232
  87. package/dist/esm/middleware/redirects-middleware.js +316 -290
  88. package/dist/esm/middleware/robots-middleware.js +41 -40
  89. package/dist/esm/middleware/sitemap-middleware.js +46 -45
  90. package/dist/esm/monitoring/healthcheck-middleware.js +27 -26
  91. package/dist/esm/monitoring/index.js +1 -1
  92. package/dist/esm/route-handler/editing-config-route-handler.js +106 -102
  93. package/dist/esm/route-handler/editing-render-route-handler.js +265 -160
  94. package/dist/esm/route-handler/index.js +4 -4
  95. package/dist/esm/route-handler/robots-route-handler.js +65 -64
  96. package/dist/esm/route-handler/sitemap-route-handler.js +63 -62
  97. package/dist/esm/search/index.js +1 -0
  98. package/dist/esm/services/component-props-service.js +135 -131
  99. package/dist/esm/sharedTypes/component-props.js +1 -1
  100. package/dist/esm/sharedTypes/sitecore-page-props.js +1 -1
  101. package/dist/esm/site/index.js +1 -1
  102. package/dist/esm/tools/codegen/import-map.js +11 -0
  103. package/dist/esm/tools/component-props.loader.js +59 -59
  104. package/dist/esm/tools/generate-map.js +279 -279
  105. package/dist/esm/tools/index.js +3 -2
  106. package/dist/esm/tools/templating/byoc-component.js +30 -30
  107. package/dist/esm/tools/templating/constants.js +4 -4
  108. package/dist/esm/tools/templating/default-component.js +29 -29
  109. package/dist/esm/tools/templating/utils.js +190 -0
  110. package/dist/esm/utils/index.js +3 -3
  111. package/dist/esm/utils/utils.js +74 -65
  112. package/package.json +87 -13
  113. package/search.d.ts +1 -0
  114. package/types/client/index.d.ts +3 -2
  115. package/types/client/index.d.ts.map +1 -0
  116. package/types/client/models.d.ts +9 -8
  117. package/types/client/models.d.ts.map +1 -0
  118. package/types/client/sitecore-nextjs-client.d.ts +68 -63
  119. package/types/client/sitecore-nextjs-client.d.ts.map +1 -0
  120. package/types/components/BYOCWrapper.d.ts +16 -14
  121. package/types/components/BYOCWrapper.d.ts.map +1 -0
  122. package/types/components/ComponentPropsContext.d.ts +30 -18
  123. package/types/components/ComponentPropsContext.d.ts.map +1 -0
  124. package/types/components/FEaaSWrapper.d.ts +17 -15
  125. package/types/components/FEaaSWrapper.d.ts.map +1 -0
  126. package/types/components/Link.d.ts +25 -15
  127. package/types/components/Link.d.ts.map +1 -0
  128. package/types/components/NextImage.d.ts +11 -6
  129. package/types/components/NextImage.d.ts.map +1 -0
  130. package/types/components/Placeholder.d.ts +14 -8
  131. package/types/components/Placeholder.d.ts.map +1 -0
  132. package/types/components/RichText.d.ts +35 -25
  133. package/types/components/RichText.d.ts.map +1 -0
  134. package/types/config/define-config.d.ts +42 -38
  135. package/types/config/define-config.d.ts.map +1 -0
  136. package/types/config/index.d.ts +2 -1
  137. package/types/config/index.d.ts.map +1 -0
  138. package/types/config-cli/define-cli-config.d.ts +10 -8
  139. package/types/config-cli/define-cli-config.d.ts.map +1 -0
  140. package/types/config-cli/index.d.ts +2 -1
  141. package/types/config-cli/index.d.ts.map +1 -0
  142. package/types/editing/codegen/import-map.d.ts +15 -3
  143. package/types/editing/codegen/import-map.d.ts.map +1 -0
  144. package/types/editing/codegen/index.d.ts +3 -2
  145. package/types/editing/codegen/index.d.ts.map +1 -0
  146. package/types/editing/constants.d.ts +8 -7
  147. package/types/editing/constants.d.ts.map +1 -0
  148. package/types/editing/editing-config-middleware.d.ts +37 -31
  149. package/types/editing/editing-config-middleware.d.ts.map +1 -0
  150. package/types/editing/editing-render-middleware.d.ts +47 -44
  151. package/types/editing/editing-render-middleware.d.ts.map +1 -0
  152. package/types/editing/feaas-render-middleware.d.ts +35 -32
  153. package/types/editing/feaas-render-middleware.d.ts.map +1 -0
  154. package/types/editing/index.d.ts +7 -6
  155. package/types/editing/index.d.ts.map +1 -0
  156. package/types/editing/render-middleware.d.ts +26 -25
  157. package/types/editing/render-middleware.d.ts.map +1 -0
  158. package/types/editing/utils.d.ts +110 -106
  159. package/types/editing/utils.d.ts.map +1 -0
  160. package/types/index.d.ts +25 -24
  161. package/types/index.d.ts.map +1 -0
  162. package/types/middleware/app-router-multisite-middleware.d.ts +28 -13
  163. package/types/middleware/app-router-multisite-middleware.d.ts.map +1 -0
  164. package/types/middleware/index.d.ts +12 -11
  165. package/types/middleware/index.d.ts.map +1 -0
  166. package/types/middleware/locale-middleware.d.ts +35 -32
  167. package/types/middleware/locale-middleware.d.ts.map +1 -0
  168. package/types/middleware/middleware.d.ts +135 -127
  169. package/types/middleware/middleware.d.ts.map +1 -0
  170. package/types/middleware/multisite-middleware.d.ts +54 -37
  171. package/types/middleware/multisite-middleware.d.ts.map +1 -0
  172. package/types/middleware/personalize-middleware.d.ts +81 -65
  173. package/types/middleware/personalize-middleware.d.ts.map +1 -0
  174. package/types/middleware/redirects-middleware.d.ts +68 -65
  175. package/types/middleware/redirects-middleware.d.ts.map +1 -0
  176. package/types/middleware/robots-middleware.d.ts +15 -13
  177. package/types/middleware/robots-middleware.d.ts.map +1 -0
  178. package/types/middleware/sitemap-middleware.d.ts +16 -14
  179. package/types/middleware/sitemap-middleware.d.ts.map +1 -0
  180. package/types/monitoring/healthcheck-middleware.d.ts +14 -12
  181. package/types/monitoring/healthcheck-middleware.d.ts.map +1 -0
  182. package/types/monitoring/index.d.ts +2 -1
  183. package/types/monitoring/index.d.ts.map +1 -0
  184. package/types/route-handler/editing-config-route-handler.d.ts +30 -24
  185. package/types/route-handler/editing-config-route-handler.d.ts.map +1 -0
  186. package/types/route-handler/editing-render-route-handler.d.ts +33 -25
  187. package/types/route-handler/editing-render-route-handler.d.ts.map +1 -0
  188. package/types/route-handler/index.d.ts +5 -4
  189. package/types/route-handler/index.d.ts.map +1 -0
  190. package/types/route-handler/robots-route-handler.d.ts +30 -28
  191. package/types/route-handler/robots-route-handler.d.ts.map +1 -0
  192. package/types/route-handler/sitemap-route-handler.d.ts +30 -28
  193. package/types/route-handler/sitemap-route-handler.d.ts.map +1 -0
  194. package/types/search/index.d.ts +2 -0
  195. package/types/search/index.d.ts.map +1 -0
  196. package/types/services/component-props-service.d.ts +62 -57
  197. package/types/services/component-props-service.d.ts.map +1 -0
  198. package/types/sharedTypes/component-props.d.ts +62 -47
  199. package/types/sharedTypes/component-props.d.ts.map +1 -0
  200. package/types/sharedTypes/sitecore-page-props.d.ts +14 -9
  201. package/types/sharedTypes/sitecore-page-props.d.ts.map +1 -0
  202. package/types/site/index.d.ts +2 -1
  203. package/types/site/index.d.ts.map +1 -0
  204. package/types/tools/codegen/import-map.d.ts +10 -0
  205. package/types/tools/codegen/import-map.d.ts.map +1 -0
  206. package/types/tools/component-props.loader.d.ts +8 -7
  207. package/types/tools/component-props.loader.d.ts.map +1 -0
  208. package/types/tools/generate-map.d.ts +26 -24
  209. package/types/tools/generate-map.d.ts.map +1 -0
  210. package/types/tools/index.d.ts +4 -2
  211. package/types/tools/index.d.ts.map +1 -0
  212. package/types/tools/templating/byoc-component.d.ts +3 -2
  213. package/types/tools/templating/byoc-component.d.ts.map +1 -0
  214. package/types/tools/templating/constants.d.ts +5 -4
  215. package/types/tools/templating/constants.d.ts.map +1 -0
  216. package/types/tools/templating/default-component.d.ts +3 -2
  217. package/types/tools/templating/default-component.d.ts.map +1 -0
  218. package/types/tools/templating/utils.d.ts +44 -0
  219. package/types/tools/templating/utils.d.ts.map +1 -0
  220. package/types/utils/index.d.ts +4 -3
  221. package/types/utils/index.d.ts.map +1 -0
  222. package/types/utils/utils.d.ts +34 -24
  223. package/types/utils/utils.d.ts.map +1 -0
  224. package/client.js +0 -1
  225. package/codegen.js +0 -1
  226. package/config-cli.js +0 -1
  227. package/config.js +0 -1
  228. package/editing.js +0 -1
  229. package/middleware.js +0 -1
  230. package/monitoring.js +0 -1
  231. package/route-handler.js +0 -1
  232. package/site.js +0 -1
  233. package/tools.js +0 -1
  234. package/utils.js +0 -1
@@ -1,8 +1,9 @@
1
- /**
2
- * Static params shape for the Next.js App Router `generateStaticParams`.
3
- */
4
- export type StaticParams = {
5
- site: string;
6
- locale: string;
7
- path: string[];
8
- };
1
+ /**
2
+ * Static params shape for the Next.js App Router `generateStaticParams`.
3
+ */
4
+ export type StaticParams = {
5
+ site: string;
6
+ locale: string;
7
+ path: string[];
8
+ };
9
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/client/models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC"}
@@ -1,63 +1,68 @@
1
- import { FetchOptions, Page, PageOptions, SitecoreClient, SitecoreClientInit } from '@sitecore-content-sdk/core/client';
2
- import { ComponentPropsCollection, NextjsContentSdkComponent } from '../sharedTypes/component-props';
3
- import { GetServerSidePropsContext, GetStaticPropsContext, PreviewData } from 'next';
4
- import { LayoutServiceData } from '@sitecore-content-sdk/core/layout';
5
- import { ComponentPropsService } from '../services/component-props-service';
6
- import { ComponentMap } from '@sitecore-content-sdk/react';
7
- import { StaticParams } from './models';
8
- export declare class SitecoreNextjsClient extends SitecoreClient {
9
- protected initOptions: SitecoreClientInit;
10
- protected componentPropsService: ComponentPropsService;
11
- constructor(initOptions: SitecoreClientInit);
12
- /**
13
- * Gets site name based on the provided path
14
- * @param {string | string[]} path path to get site name from
15
- * @returns site name, or default site info if not found
16
- */
17
- getSiteNameFromPath(path: string | string[]): string;
18
- /**
19
- * Normalizes a nextjs path that could have been rewritten
20
- * @param {string | string[]} path nextjs path
21
- * @returns path string without nextjs prefixes
22
- */
23
- parsePath(path: string | string[]): string;
24
- getPage(path: string | string[], pageOptions: PageOptions, options?: FetchOptions): Promise<Page | null>;
25
- /**
26
- * Get design library page details for Design Library mode of your app
27
- * @param {PreviewData} designLibData preview data set in 'library' mode of the app
28
- * @param {FetchOptions} [fetchOptions] Additional fetch fetch options to override GraphQL requests
29
- * @returns {Page} preview page for Design Library
30
- */
31
- getDesignLibraryData(designLibData: PreviewData, fetchOptions?: FetchOptions): Promise<Page>;
32
- /**
33
- * Retrieves preview page and layout details
34
- * @param {PreviewData} previewData - The editing preview data for metadata mode.
35
- * @param {FetchOptions} [fetchOptions] Additional fetch fetch options to override GraphQL requests (like retries and fetch)
36
- */
37
- getPreview(previewData: PreviewData, fetchOptions?: FetchOptions): Promise<Page | null>;
38
- /**
39
- * Generates static params for the Next.js App Router from Sitecore routes.
40
- *
41
- * Fetches routes for the specified `sites` and `languages`, then converts them into
42
- * objects consumable by `generateStaticParams`. Internal multisite segments are removed.
43
- * The `site` name is resolved from the path. If a route lacks a locale, the
44
- * client's `defaultLanguage` is used.
45
- *
46
- * **NOTE**: App Router only. For the Pages Router, use `getPagePaths`.
47
- * @param {string[]} sites - An array of site names to fetch routes for.
48
- * @param {string[]} [languages] - Language codes to generate params for.
49
- * @param {FetchOptions} [fetchOptions] - Additional fetch options.
50
- * @returns {Promise<StaticParams[]>} Array of `{ site, locale, path }` entries for `generateStaticParams`.
51
- */
52
- getAppRouterStaticParams(sites: string[], languages?: string[], fetchOptions?: FetchOptions): Promise<StaticParams[]>;
53
- /**
54
- * Parses components from nextjs component map and layoutData, executes getServerProps/getStaticProps methods
55
- * and returns resulting props from components
56
- * @param {LayoutServiceData} layoutData layout data to parse compnents from
57
- * @param {PreviewData} context Nextjs preview data
58
- * @param {ComponentMap<NextjsContentSdkComponent>} components component map to get props for
59
- * @returns {ComponentPropsCollection} component props
60
- */
61
- getComponentData(layoutData: LayoutServiceData, context: GetServerSidePropsContext | GetStaticPropsContext, components: ComponentMap<NextjsContentSdkComponent>): Promise<ComponentPropsCollection>;
62
- protected getComponentPropsService(): ComponentPropsService;
63
- }
1
+ import { FetchOptions, Page, PageOptions, SitecoreClient, SitecoreClientInit } from '@sitecore-content-sdk/core/client';
2
+ import { ComponentPropsCollection, NextjsContentSdkComponent } from '../sharedTypes/component-props';
3
+ import { GetServerSidePropsContext, GetStaticPropsContext, PreviewData } from 'next';
4
+ import { LayoutServiceData } from '@sitecore-content-sdk/core/layout';
5
+ import { ComponentPropsService } from '../services/component-props-service';
6
+ import { ComponentMap } from '@sitecore-content-sdk/react';
7
+ import { StaticParams } from './models';
8
+ /**
9
+ * The SitecoreNextjsClient class extends the SitecoreClient class to provide additional functionality for Next.js.
10
+ * @public
11
+ */
12
+ export declare class SitecoreNextjsClient extends SitecoreClient {
13
+ protected initOptions: SitecoreClientInit;
14
+ protected componentPropsService: ComponentPropsService;
15
+ constructor(initOptions: SitecoreClientInit);
16
+ /**
17
+ * Gets site name based on the provided path
18
+ * @param {string | string[]} path path to get site name from
19
+ * @returns site name, or default site info if not found
20
+ */
21
+ getSiteNameFromPath(path: string | string[]): string;
22
+ /**
23
+ * Normalizes a nextjs path that could have been rewritten
24
+ * @param {string | string[]} path nextjs path
25
+ * @returns path string without nextjs prefixes
26
+ */
27
+ parsePath(path: string | string[]): string;
28
+ getPage(path: string | string[], pageOptions: PageOptions, options?: FetchOptions): Promise<Page | null>;
29
+ /**
30
+ * Get design library page details for Design Library mode of your app
31
+ * @param {PreviewData} designLibData preview data set in 'library' mode of the app
32
+ * @param {FetchOptions} [fetchOptions] Additional fetch fetch options to override GraphQL requests
33
+ * @returns {Page} preview page for Design Library
34
+ */
35
+ getDesignLibraryData(designLibData: PreviewData, fetchOptions?: FetchOptions): Promise<Page>;
36
+ /**
37
+ * Retrieves preview page and layout details
38
+ * @param {PreviewData} previewData - The editing preview data for metadata mode.
39
+ * @param {FetchOptions} [fetchOptions] Additional fetch fetch options to override GraphQL requests (like retries and fetch)
40
+ */
41
+ getPreview(previewData: PreviewData, fetchOptions?: FetchOptions): Promise<Page | null>;
42
+ /**
43
+ * Generates static params for the Next.js App Router from Sitecore routes.
44
+ *
45
+ * Fetches routes for the specified `sites` and `languages`, then converts them into
46
+ * objects consumable by `generateStaticParams`. Internal multisite segments are removed.
47
+ * The `site` name is resolved from the path. If a route lacks a locale, the
48
+ * client's `defaultLanguage` is used.
49
+ *
50
+ * **NOTE**: App Router only. For the Pages Router, use `getPagePaths`.
51
+ * @param {string[]} sites - An array of site names to fetch routes for.
52
+ * @param {string[]} [languages] - Language codes to generate params for.
53
+ * @param {FetchOptions} [fetchOptions] - Additional fetch options.
54
+ * @returns {Promise<StaticParams[]>} Array of `{ site, locale, path }` entries for `generateStaticParams`.
55
+ */
56
+ getAppRouterStaticParams(sites: string[], languages?: string[], fetchOptions?: FetchOptions): Promise<StaticParams[]>;
57
+ /**
58
+ * Parses components from nextjs component map and layoutData, executes getServerProps/getStaticProps methods
59
+ * and returns resulting props from components
60
+ * @param {LayoutServiceData} layoutData layout data to parse compnents from
61
+ * @param {PreviewData} context Nextjs preview data
62
+ * @param {ComponentMap<NextjsContentSdkComponent>} components component map to get props for
63
+ * @returns {ComponentPropsCollection} component props
64
+ */
65
+ getComponentData(layoutData: LayoutServiceData, context: GetServerSidePropsContext | GetStaticPropsContext, components: ComponentMap<NextjsContentSdkComponent>): Promise<ComponentPropsCollection>;
66
+ protected getComponentPropsService(): ComponentPropsService;
67
+ }
68
+ //# sourceMappingURL=sitecore-nextjs-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sitecore-nextjs-client.d.ts","sourceRoot":"","sources":["../../src/client/sitecore-nextjs-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,WAAW,EACX,cAAc,EACd,kBAAkB,EACnB,MAAM,mCAAmC,CAAC;AAC3C,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,mCAAmC,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAU5E,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,cAAc;IAE1C,SAAS,CAAC,WAAW,EAAE,kBAAkB;IADrD,SAAS,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;gBACjC,WAAW,EAAE,kBAAkB;IAKrD;;;;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,WAAW,EACxB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAmBvB;;;;;OAKG;IACG,oBAAoB,CACxB,aAAa,EAAE,WAAW,EAC1B,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,IAAI,CAAC;IAOhB;;;;OAIG;IACG,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE,YAAY,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAI7F;;;;;;;;;;;;;OAaG;IACG,wBAAwB,CAC5B,KAAK,EAAE,MAAM,EAAE,EACf,SAAS,CAAC,EAAE,MAAM,EAAE,EACpB,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,YAAY,EAAE,CAAC;IAmB1B;;;;;;;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,SAAS,CAAC,wBAAwB,IAAI,qBAAqB;CAG5D"}
@@ -1,14 +1,16 @@
1
- import { BYOCWrapper } from '@sitecore-content-sdk/react';
2
- import { GetComponentServerProps } from '../sharedTypes/component-props';
3
- /**
4
- * TODO: remove when framework agnostic forms implemented
5
- * This is a repackaged version of the React BYOCWrapper component with support for
6
- * server rendering in Next.js (using component-level data-fetching feature of Content SDK).
7
- */
8
- /**
9
- * Will be called during SSG or SSR
10
- * @param {ComponentRendering} rendering
11
- * @returns {GetStaticPropsContext | GetStaticPropsContext} context with type depending on SSR or SSG mode
12
- */
13
- export declare const getComponentServerProps: GetComponentServerProps;
14
- export default BYOCWrapper;
1
+ import { BYOCWrapper } from '@sitecore-content-sdk/react';
2
+ import { GetComponentServerProps } from '../sharedTypes/component-props';
3
+ /**
4
+ * TODO: remove when framework agnostic forms implemented
5
+ * This is a repackaged version of the React BYOCWrapper component with support for
6
+ * server rendering in Next.js (using component-level data-fetching feature of Content SDK).
7
+ */
8
+ /**
9
+ * Will be called during SSG or SSR
10
+ * @param {ComponentRendering} rendering
11
+ * @returns {GetStaticPropsContext | GetStaticPropsContext} context with type depending on SSR or SSG mode
12
+ * @internal
13
+ */
14
+ export declare const getComponentServerProps: GetComponentServerProps;
15
+ export default BYOCWrapper;
16
+ //# sourceMappingURL=BYOCWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BYOCWrapper.d.ts","sourceRoot":"","sources":["../../src/components/BYOCWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAGZ,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE;;;;GAIG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,uBAIrC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,18 +1,30 @@
1
- import React, { ReactNode, JSX } from 'react';
2
- import { ComponentPropsCollection } from '../sharedTypes/component-props';
3
- /**
4
- * Component props context which we are using in order to store data fetched on components level (getComponentServerProps)
5
- */
6
- export declare const ComponentPropsReactContext: React.Context<ComponentPropsCollection>;
7
- /**
8
- * Hook in order to get access to props related to specific component. Data comes from ComponentPropsContext.
9
- * @see ComponentPropsContext
10
- * @param {string | undefined} componentUid component uId
11
- * @returns {ComponentData | undefined} component props
12
- */
13
- export declare function useComponentProps<ComponentData>(componentUid: string | undefined): ComponentData | undefined;
14
- export type ComponentPropsContextProps = {
15
- children: ReactNode;
16
- value: ComponentPropsCollection;
17
- };
18
- export declare const ComponentPropsContext: ({ children, value, }: ComponentPropsContextProps) => JSX.Element;
1
+ import React, { ReactNode, JSX } from 'react';
2
+ import { ComponentPropsCollection } from '../sharedTypes/component-props';
3
+ /**
4
+ * Component props context which we are using in order to store data fetched on components level (getComponentServerProps)
5
+ * @public
6
+ */
7
+ export declare const ComponentPropsReactContext: React.Context<ComponentPropsCollection>;
8
+ /**
9
+ * Hook in order to get access to props related to specific component. Data comes from ComponentPropsContext.
10
+ * @see ComponentPropsContext
11
+ * @param {string | undefined} componentUid component uId
12
+ * @returns {ComponentData | undefined} component props
13
+ * @public
14
+ */
15
+ export declare function useComponentProps<ComponentData>(componentUid: string | undefined): ComponentData | undefined;
16
+ /**
17
+ * The interface for the ComponentPropsContext component props.
18
+ * @public
19
+ */
20
+ export type ComponentPropsContextProps = {
21
+ children: ReactNode;
22
+ value: ComponentPropsCollection;
23
+ };
24
+ /**
25
+ * The ComponentPropsContext component. Stores component props in a context.
26
+ * @param {ComponentPropsContextProps} props component props
27
+ * @public
28
+ */
29
+ export declare const ComponentPropsContext: ({ children, value, }: ComponentPropsContextProps) => JSX.Element;
30
+ //# sourceMappingURL=ComponentPropsContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComponentPropsContext.d.ts","sourceRoot":"","sources":["../../src/components/ComponentPropsContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,0BAA0B,yCAA8C,CAAC;AAEtF;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,EAC7C,YAAY,EAAE,MAAM,GAAG,SAAS,GAC/B,aAAa,GAAG,SAAS,CAQ3B;AAED;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,wBAAwB,CAAC;CACjC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,sBAGnC,0BAA0B,KAAG,GAAG,CAAC,OAInC,CAAC"}
@@ -1,15 +1,17 @@
1
- import { FEaaSWrapper } from '@sitecore-content-sdk/react';
2
- import { GetComponentServerProps } from '../sharedTypes/component-props';
3
- /**
4
- * TODO: remove when framework agnostic forms implemented
5
- * This is a repackaged version of the React FEaaSWrapper component with support for
6
- * server rendering in Next.js (using component-level data-fetching feature of Content SDK).
7
- */
8
- /**
9
- * Will be called during SSG or SSR
10
- * @param {ComponentRendering} rendering
11
- * @param {LayoutServiceData} layoutData
12
- * @returns {GetStaticPropsContext | GetServerSideProps} context
13
- */
14
- export declare const getComponentServerProps: GetComponentServerProps;
15
- export default FEaaSWrapper;
1
+ import { FEaaSWrapper } from '@sitecore-content-sdk/react';
2
+ import { GetComponentServerProps } from '../sharedTypes/component-props';
3
+ /**
4
+ * TODO: remove when framework agnostic forms implemented
5
+ * This is a repackaged version of the React FEaaSWrapper component with support for
6
+ * server rendering in Next.js (using component-level data-fetching feature of Content SDK).
7
+ */
8
+ /**
9
+ * Will be called during SSG or SSR
10
+ * @param {ComponentRendering} rendering
11
+ * @param {LayoutServiceData} layoutData
12
+ * @returns {GetStaticPropsContext | GetServerSideProps} context
13
+ * @internal
14
+ */
15
+ export declare const getComponentServerProps: GetComponentServerProps;
16
+ export default FEaaSWrapper;
17
+ //# sourceMappingURL=FEaaSWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FEaaSWrapper.d.ts","sourceRoot":"","sources":["../../src/components/FEaaSWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAIb,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE;;;;GAIG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,EAAE,uBAMrC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,15 +1,25 @@
1
- import React from 'react';
2
- import { LinkProps as NextLinkProps } from 'next/link';
3
- import { LinkProps as ReactLinkProps } from '@sitecore-content-sdk/react';
4
- export type LinkProps = ReactLinkProps & {
5
- /**
6
- * If `href` match with `internalLinkMatcher` regexp, then it's internal link and NextLink will be rendered
7
- * @default /^\//g
8
- */
9
- internalLinkMatcher?: RegExp;
10
- /**
11
- * Next.js Link prefetch.
12
- */
13
- prefetch?: NextLinkProps['prefetch'];
14
- };
15
- export declare const Link: React.ForwardRefExoticComponent<Omit<LinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
1
+ import React from 'react';
2
+ import { LinkProps as NextLinkProps } from 'next/link';
3
+ import { LinkProps as ReactLinkProps } from '@sitecore-content-sdk/react';
4
+ /**
5
+ * The list of NextLink props to be supported by the Link component.
6
+ */
7
+ declare const supportedNextLinkProps: readonly ["as", "onNavigate", "passHref", "prefetch", "replace", "scroll", "shallow"];
8
+ /**
9
+ * The interface for the Link component props.
10
+ * @public
11
+ */
12
+ export type LinkProps = ReactLinkProps & {
13
+ /**
14
+ * If `href` match with `internalLinkMatcher` regexp, then it's internal link and NextLink will be rendered
15
+ * @default /^\//g
16
+ */
17
+ internalLinkMatcher?: RegExp;
18
+ } & Pick<NextLinkProps, (typeof supportedNextLinkProps)[number]>;
19
+ /**
20
+ * Next.js specific Link component implementation.
21
+ * @public
22
+ */
23
+ export declare const Link: React.ForwardRefExoticComponent<Omit<LinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
24
+ export {};
25
+ //# sourceMappingURL=Link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/components/Link.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAC/C,OAAiB,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,EAIL,SAAS,IAAI,cAAc,EAC5B,MAAM,6BAA6B,CAAC;AAErC;;GAEG;AACH,QAAA,MAAM,sBAAsB,uFAQlB,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,cAAc,GAAG;IACvC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAOjE;;;GAGG;AACH,eAAO,MAAM,IAAI,kGAiEhB,CAAC"}
@@ -1,6 +1,11 @@
1
- import React from 'react';
2
- import { ImageProps } from '@sitecore-content-sdk/react';
3
- import { ImageProps as NextImageProperties } from 'next/image';
4
- type NextImageProps = ImageProps & Partial<NextImageProperties>;
5
- export declare const NextImage: React.FC<NextImageProps>;
6
- export {};
1
+ import React from 'react';
2
+ import { ImageProps } from '@sitecore-content-sdk/react';
3
+ import { ImageProps as NextImageProperties } from 'next/image';
4
+ type NextImageProps = ImageProps & Partial<NextImageProperties>;
5
+ /**
6
+ * Next.js specific Image component implementation.
7
+ * @public
8
+ */
9
+ export declare const NextImage: React.FC<NextImageProps>;
10
+ export {};
11
+ //# sourceMappingURL=NextImage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NextImage.d.ts","sourceRoot":"","sources":["../../src/components/NextImage.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,UAAU,EAOX,MAAM,6BAA6B,CAAC;AACrC,OAAc,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAGtE,KAAK,cAAc,GAAG,UAAU,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAmE9C,CAAC"}
@@ -1,8 +1,14 @@
1
- import React from 'react';
2
- import { PlaceholderComponentProps, WithSitecoreProps, EnhancedOmit } from '@sitecore-content-sdk/react';
3
- /**
4
- * React Placeholder component wrapped by withSitecore, so these properties shouldn't be passed to the Next.js Placeholder.
5
- */
6
- type PlaceholderProps = EnhancedOmit<PlaceholderComponentProps, keyof WithSitecoreProps>;
7
- export declare const Placeholder: (props: PlaceholderProps) => React.JSX.Element;
8
- export {};
1
+ import React from 'react';
2
+ import { PlaceholderComponentProps, WithSitecoreProps, EnhancedOmit } from '@sitecore-content-sdk/react';
3
+ /**
4
+ * React Placeholder component wrapped by withSitecore, so these properties shouldn't be passed to the Next.js Placeholder.
5
+ */
6
+ type PlaceholderProps = EnhancedOmit<PlaceholderComponentProps, keyof WithSitecoreProps>;
7
+ /**
8
+ * The Placeholder component.
9
+ * @param {PlaceholderProps} props component props
10
+ * @public
11
+ */
12
+ export declare const Placeholder: (props: PlaceholderProps) => React.JSX.Element;
13
+ export {};
14
+ //# sourceMappingURL=Placeholder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Placeholder.d.ts","sourceRoot":"","sources":["../../src/components/Placeholder.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAEL,yBAAyB,EACzB,iBAAiB,EACjB,YAAY,EACb,MAAM,6BAA6B,CAAC;AAGrC;;GAEG;AACH,KAAK,gBAAgB,GAAG,YAAY,CAAC,yBAAyB,EAAE,MAAM,iBAAiB,CAAC,CAAC;AAEzF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,sBAiBlD,CAAC"}
@@ -1,25 +1,35 @@
1
- import { JSX } from 'react';
2
- import { RichTextProps as ReactRichTextProps } from '@sitecore-content-sdk/react';
3
- export type RichTextProps = ReactRichTextProps & {
4
- /**
5
- * Selector which should be used in order to prefetch it and attach event listeners
6
- * @default 'a[href^="/"]'
7
- */
8
- internalLinksSelector?: string;
9
- /**
10
- * Controls the prefetch of internal links. This can be beneficial if you have RichText fields
11
- * with large numbers of internal links in them.
12
- * - `true` (default): The full route & its data will be prefetched.
13
- * - `hover`: Prefetching will happen on hover.
14
- * - `false`: Prefetching will not happen.
15
- * @default true
16
- */
17
- prefetchLinks?: boolean | 'hover';
18
- };
19
- export declare const prefetched: {
20
- [cacheKey: string]: boolean;
21
- };
22
- export declare const RichText: {
23
- (props: RichTextProps): JSX.Element;
24
- displayName: string;
25
- };
1
+ import { JSX } from 'react';
2
+ import { RichTextProps as ReactRichTextProps } from '@sitecore-content-sdk/react';
3
+ /**
4
+ * The interface for the RichText component props.
5
+ * @public
6
+ */
7
+ export type RichTextProps = ReactRichTextProps & {
8
+ /**
9
+ * Selector which should be used in order to prefetch it and attach event listeners
10
+ * @default 'a[href^="/"]'
11
+ */
12
+ internalLinksSelector?: string;
13
+ /**
14
+ * Controls the prefetch of internal links. This can be beneficial if you have RichText fields
15
+ * with large numbers of internal links in them.
16
+ * - `true` (default): The full route & its data will be prefetched.
17
+ * - `hover`: Prefetching will happen on hover.
18
+ * - `false`: Prefetching will not happen.
19
+ * @default true
20
+ */
21
+ prefetchLinks?: boolean | 'hover';
22
+ };
23
+ export declare const prefetched: {
24
+ [cacheKey: string]: boolean;
25
+ };
26
+ /**
27
+ * The RichText component.
28
+ * @param {RichTextProps} props - The props for the RichText component.
29
+ * @public
30
+ */
31
+ export declare const RichText: {
32
+ (props: RichTextProps): JSX.Element;
33
+ displayName: string;
34
+ };
35
+ //# sourceMappingURL=RichText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RichText.d.ts","sourceRoot":"","sources":["../../src/components/RichText.tsx"],"names":[],"mappings":"AACA,OAAc,EAAqB,GAAG,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAEL,aAAa,IAAI,kBAAkB,EACpC,MAAM,6BAA6B,CAAC;AAErC;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG;IAC/C;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;CAAO,CAAC;AAiB9D;;;;GAIG;AACH,eAAO,MAAM,QAAQ;YAAW,aAAa,GAAG,GAAG,CAAC,OAAO;;CA6E1D,CAAC"}
@@ -1,38 +1,42 @@
1
- import { DeepRequired, SitecoreConfigInput as SitecoreConfigInputCore } from '@sitecore-content-sdk/core/config';
2
- /**
3
- * Provides default NextJs initial values from env variables for SitecoreConfig
4
- * @param {SitecoreConfigInput} config optional override values to be written over default config settings
5
- * @returns default nextjs input config
6
- */
7
- export declare const getNextFallbackConfig: (config?: SitecoreConfigInput) => SitecoreConfigInput;
8
- /**
9
- * Type to be used as config input in sitecore.config
10
- */
11
- export type SitecoreConfigInput = SitecoreConfigInputCore & {
12
- /**
13
- * Indicates whether SSG `getStaticPaths` pre-render any pages.
14
- *
15
- * Set the environment variable `GENERATE_STATIC_PATHS=true`
16
- * to enable static paths generation.
17
- *
18
- * By default, this is set to `true`.
19
- *
20
- * This is set to `false` when the application is deployed and used as editing host in Sitecore.
21
- */
22
- generateStaticPaths?: boolean;
23
- /**
24
- * The internal host URL for the Next.js application, used for server-side requests for page rendering during editing.
25
- * This should be the base URL where the Next.js app is accessible from the server side (e.g., "http://localhost:3000").
26
- */
27
- sitecoreInternalEditingHostUrl?: string;
28
- };
29
- /**
30
- * Final sitecore config type used at runtime Every property should be populated, either from sitecore.config or built-in fallback values
31
- */
32
- export type SitecoreConfig = DeepRequired<SitecoreConfigInput>;
33
- /**
34
- * Accepts a SitecoreConfigInput object and returns full sitecore configuration
35
- * @param {SitecoreConfigInput} config override values to be written over default config settings
36
- * @returns {SitecoreConfig} full sitecore configuration to use in application
37
- */
38
- export declare const defineConfig: (config?: SitecoreConfigInput) => SitecoreConfig;
1
+ import { DeepRequired, SitecoreConfigInput as SitecoreConfigInputCore } from '@sitecore-content-sdk/core/config';
2
+ /**
3
+ * Provides default NextJs initial values from env variables for SitecoreConfig
4
+ * @param {SitecoreConfigInput} config optional override values to be written over default config settings
5
+ * @returns default nextjs input config
6
+ */
7
+ export declare const getNextFallbackConfig: (config?: SitecoreConfigInput) => SitecoreConfigInput;
8
+ /**
9
+ * Type to be used as config input in sitecore.config
10
+ * @public
11
+ */
12
+ export type SitecoreConfigInput = SitecoreConfigInputCore & {
13
+ /**
14
+ * Indicates whether SSG `getStaticPaths` pre-render any pages.
15
+ *
16
+ * Set the environment variable `GENERATE_STATIC_PATHS=true`
17
+ * to enable static paths generation.
18
+ *
19
+ * By default, this is set to `true`.
20
+ *
21
+ * This is set to `false` when the application is deployed and used as editing host in Sitecore.
22
+ */
23
+ generateStaticPaths?: boolean;
24
+ /**
25
+ * The internal host URL for the Next.js application, used for server-side requests for page rendering during editing.
26
+ * This should be the base URL where the Next.js app is accessible from the server side (e.g., "http://localhost:3000").
27
+ */
28
+ sitecoreInternalEditingHostUrl?: string;
29
+ };
30
+ /**
31
+ * Final sitecore config type used at runtime Every property should be populated, either from sitecore.config or built-in fallback values
32
+ * @public
33
+ */
34
+ export type SitecoreConfig = DeepRequired<SitecoreConfigInput>;
35
+ /**
36
+ * Accepts a SitecoreConfigInput object and returns full sitecore configuration
37
+ * @param {SitecoreConfigInput} config override values to be written over default config settings
38
+ * @returns {SitecoreConfig} full sitecore configuration to use in application
39
+ * @public
40
+ */
41
+ export declare const defineConfig: (config?: SitecoreConfigInput) => SitecoreConfig;
42
+ //# sourceMappingURL=define-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define-config.d.ts","sourceRoot":"","sources":["../../src/config/define-config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,mBAAmB,IAAI,uBAAuB,EAC/C,MAAM,mCAAmC,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,SAAS,mBAAmB,KAAG,mBAoCpE,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,GAAG;IAC1D;;;;;;;;;OASG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;OAGG;IACH,8BAA8B,CAAC,EAAE,MAAM,CAAC;CACzC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,mBAAmB,CAAC,CAAC;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,SAAS,mBAAmB,KAAG,cAE3D,CAAC"}
@@ -1 +1,2 @@
1
- export { SitecoreConfig, SitecoreConfigInput, defineConfig } from './define-config';
1
+ export { SitecoreConfig, SitecoreConfigInput, defineConfig } from './define-config';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,8 +1,10 @@
1
- import { SitecoreCliConfigInput, SitecoreCliConfig } from '@sitecore-content-sdk/core/config';
2
- /**
3
- * Accepts a `SitecoreCliConfigInput` object and returns the Sitecore Content SDK CLI configuration from the specified file,
4
- * updated with the required default values.
5
- * @param {SitecoreCliConfigInput} cliConfig the cli configuration provided by the application
6
- * @returns {SitecoreCliConfig} full sitecore cli configuration to use with cli
7
- */
8
- export declare const defineCliConfig: (cliConfig: SitecoreCliConfigInput) => SitecoreCliConfig;
1
+ import { SitecoreCliConfigInput, SitecoreCliConfig } from '@sitecore-content-sdk/core/config';
2
+ /**
3
+ * Accepts a `SitecoreCliConfigInput` object and returns the Sitecore Content SDK CLI configuration from the specified file,
4
+ * updated with the required default values.
5
+ * @param {SitecoreCliConfigInput} cliConfig the cli configuration provided by the application
6
+ * @returns {SitecoreCliConfig} full sitecore cli configuration to use with cli
7
+ * @public
8
+ */
9
+ export declare const defineCliConfig: (cliConfig: SitecoreCliConfigInput) => SitecoreCliConfig;
10
+ //# sourceMappingURL=define-cli-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define-cli-config.d.ts","sourceRoot":"","sources":["../../src/config-cli/define-cli-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAM9F;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,WAAW,sBAAsB,KAAG,iBAInE,CAAC"}
@@ -1 +1,2 @@
1
- export { defineCliConfig } from './define-cli-config';
1
+ export { defineCliConfig } from './define-cli-config';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config-cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,3 +1,15 @@
1
- import { ImportEntry } from '@sitecore-content-sdk/core/codegen';
2
- export declare const defaultImportEntries: ImportEntry[];
3
- export declare const combineImportEntries: (defaultImportEntries: ImportEntry[], generatedImportEntries: ImportEntry[]) => ImportEntry[];
1
+ import { ImportEntry } from '@sitecore-content-sdk/core/codegen';
2
+ /**
3
+ * The default import entries for the import map.
4
+ * @public
5
+ */
6
+ export declare const defaultImportEntries: ImportEntry[];
7
+ /**
8
+ * Combines the default import entries with the generated import entries.
9
+ * @param {ImportEntry[]} defaultImportEntries - The default import entries.
10
+ * @param {ImportEntry[]} generatedImportEntries - The generated import entries.
11
+ * @returns {ImportEntry[]} The combined import entries.
12
+ * @public
13
+ */
14
+ export declare const combineImportEntries: (defaultImportEntries: ImportEntry[], generatedImportEntries: ImportEntry[]) => ImportEntry[];
15
+ //# sourceMappingURL=import-map.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import-map.d.ts","sourceRoot":"","sources":["../../../src/editing/codegen/import-map.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAgBjE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAAW,EAmD7C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAC/B,sBAAsB,WAAW,EAAE,EACnC,wBAAwB,WAAW,EAAE,KACpC,WAAW,EA6Bb,CAAC"}