@sitecore-content-sdk/core 1.5.0 → 1.5.1-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.
package/LICENSE.txt CHANGED
@@ -1,202 +1,202 @@
1
-
2
- Apache License
3
- Version 2.0, January 2004
4
- http://www.apache.org/licenses/
5
-
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
178
-
179
- APPENDIX: How to apply the Apache License to your work.
180
-
181
- To apply the Apache License to your work, attach the following
182
- boilerplate notice, with the fields enclosed by brackets "[]"
183
- replaced with your own identifying information. (Don't include
184
- the brackets!) The text should be enclosed in the appropriate
185
- comment syntax for the file format. We also recommend that a
186
- file or class name and description of purpose be included on the
187
- same "printed page" as the copyright notice for easier
188
- identification within third-party archives.
189
-
190
- Copyright [yyyy] [name of copyright owner]
191
-
192
- Licensed under the Apache License, Version 2.0 (the "License");
193
- you may not use this file except in compliance with the License.
194
- You may obtain a copy of the License at
195
-
196
- http://www.apache.org/licenses/LICENSE-2.0
197
-
198
- Unless required by applicable law or agreed to in writing, software
199
- distributed under the License is distributed on an "AS IS" BASIS,
200
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
- See the License for the specific language governing permissions and
202
- limitations under the License.
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchGeneratedComponentFromCache = exports.DesignLibraryPreviewError = exports.sendErrorEvent = exports.createComponentInstance = exports.addStyleElement = exports.getImportMapInfo = exports.getDesignLibraryImportMapEvent = exports.getDesignLibraryComponentPropsEvent = exports.getDesignLibraryComponentPreviewErrorEvent = exports.addServerComponentPreviewHandler = exports.addComponentPreviewHandler = void 0;
3
+ exports.fetchGeneratedComponentFromCache = exports.DesignLibraryPreviewError = exports.sendErrorEvent = exports.createComponentInstance = exports.addStyleElement = exports.getImportMapInfo = exports.getDesignLibraryImportMapEvent = exports.getDesignLibraryComponentPropsEvent = exports.getDesignLibraryErrorEvent = exports.addServerComponentPreviewHandler = exports.addComponentPreviewHandler = void 0;
4
4
  var preview_1 = require("./preview");
5
5
  Object.defineProperty(exports, "addComponentPreviewHandler", { enumerable: true, get: function () { return preview_1.addComponentPreviewHandler; } });
6
6
  Object.defineProperty(exports, "addServerComponentPreviewHandler", { enumerable: true, get: function () { return preview_1.addServerComponentPreviewHandler; } });
7
- Object.defineProperty(exports, "getDesignLibraryComponentPreviewErrorEvent", { enumerable: true, get: function () { return preview_1.getDesignLibraryComponentPreviewErrorEvent; } });
7
+ Object.defineProperty(exports, "getDesignLibraryErrorEvent", { enumerable: true, get: function () { return preview_1.getDesignLibraryErrorEvent; } });
8
8
  Object.defineProperty(exports, "getDesignLibraryComponentPropsEvent", { enumerable: true, get: function () { return preview_1.getDesignLibraryComponentPropsEvent; } });
9
9
  Object.defineProperty(exports, "getDesignLibraryImportMapEvent", { enumerable: true, get: function () { return preview_1.getDesignLibraryImportMapEvent; } });
10
10
  Object.defineProperty(exports, "getImportMapInfo", { enumerable: true, get: function () { return preview_1.getImportMapInfo; } });
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.sendErrorEvent = exports.createComponentInstance = exports.addServerComponentPreviewHandler = exports.addComponentPreviewHandler = exports.DesignLibraryPreviewError = void 0;
7
7
  exports.buildComponentDependencies = buildComponentDependencies;
8
8
  exports.addStyleElement = addStyleElement;
9
- exports.getDesignLibraryComponentPreviewErrorEvent = getDesignLibraryComponentPreviewErrorEvent;
9
+ exports.getDesignLibraryErrorEvent = getDesignLibraryErrorEvent;
10
10
  exports.getDesignLibraryComponentPropsEvent = getDesignLibraryComponentPropsEvent;
11
11
  exports.getDesignLibraryImportMapEvent = getDesignLibraryImportMapEvent;
12
12
  exports.getImportMapInfo = getImportMapInfo;
@@ -29,9 +29,13 @@ const DESIGN_LIBRARY_COMPONENT_PROPS_EVENT_NAME = 'component:generation:componen
29
29
  */
30
30
  const DESIGN_LIBRARY_COMPONENT_PREVIEW_EVENT_NAME = 'component:generation:component-preview';
31
31
  /**
32
- * Event to send component error to design library
32
+ * Event to send component preview error to design library
33
33
  */
34
34
  const DESIGN_LIBRARY_COMPONENT_PREVIEW_ERROR_EVENT_NAME = 'component:generation:component-preview-error';
35
+ /**
36
+ * Event to send general component preview error to design library
37
+ */
38
+ const DESIGN_LIBRARY_ERROR_EVENT_NAME = 'component:generation:error';
35
39
  /**
36
40
  * Enumeration of error types for the design library preview.
37
41
  * @internal
@@ -46,6 +50,18 @@ var DesignLibraryPreviewError;
46
50
  * Error occurred during component and event handlers initialization.
47
51
  */
48
52
  DesignLibraryPreviewError["RenderInit"] = "render-init";
53
+ /**
54
+ * The import map is missing
55
+ */
56
+ DesignLibraryPreviewError["ImportMapMissing"] = "import-map-missing";
57
+ /**
58
+ * Error during loading of the import map
59
+ */
60
+ DesignLibraryPreviewError["ImportMapLoad"] = "import-map-load-error";
61
+ /**
62
+ * Error during fetching the generated component data from secured endpoint
63
+ */
64
+ DesignLibraryPreviewError["GeneratedComponentFetch"] = "generated-component-fetch-error";
49
65
  })(DesignLibraryPreviewError || (exports.DesignLibraryPreviewError = DesignLibraryPreviewError = {}));
50
66
  /**
51
67
  * Builds the component dependencies from the component imports and the import map.
@@ -192,18 +208,27 @@ const createComponentInstance = (importMap, generatedComponentData) => {
192
208
  };
193
209
  exports.createComponentInstance = createComponentInstance;
194
210
  /**
195
- * Generates a DesignLibraryComponentPreviewErrorEvent with the given uid and error.
211
+ * Generates a DesignLibraryErrorEvent depending on the type of error with the given uid and error.
196
212
  * @param {string} uid - The unique identifier for the event.
197
213
  * @param {unknown} error - The error to be sent.
198
214
  * @param {DesignLibraryPreviewError} type - The type of error.
199
- * @returns An object representing the DesignLibraryComponentPreviewErrorEvent.
215
+ * @returns An object representing the DesignLibraryErrorEvent.
200
216
  * @internal
201
217
  */
202
- function getDesignLibraryComponentPreviewErrorEvent(uid, error, type) {
203
- return {
204
- name: DESIGN_LIBRARY_COMPONENT_PREVIEW_ERROR_EVENT_NAME,
205
- message: { uid, error, type },
206
- };
218
+ function getDesignLibraryErrorEvent(uid, error, type) {
219
+ switch (type) {
220
+ case DesignLibraryPreviewError.Render:
221
+ case DesignLibraryPreviewError.RenderInit:
222
+ return {
223
+ name: DESIGN_LIBRARY_COMPONENT_PREVIEW_ERROR_EVENT_NAME,
224
+ message: { uid, error, type },
225
+ };
226
+ default:
227
+ return {
228
+ name: DESIGN_LIBRARY_ERROR_EVENT_NAME,
229
+ message: { uid, error, type },
230
+ };
231
+ }
207
232
  }
208
233
  /**
209
234
  * Generates a DesignLibraryComponentPropsEvent with the given uid, fields and parameters.
@@ -266,14 +291,14 @@ function isImportEntryInfoArray(data) {
266
291
  typeof data[0].exports[0] === 'string');
267
292
  }
268
293
  /**
269
- * Sends a component preview error event to the design library
294
+ * Sends a design library error event to the design library
270
295
  * @param {string} uid - The unique identifier of the component that's being edited.
271
296
  * @param {unknown} error - The error object or message to be sent.
272
297
  * @param {DesignLibraryPreviewError} type - The type of error, as defined in DesignLibraryPreviewError.
273
298
  * @internal
274
299
  */
275
300
  const sendErrorEvent = (uid, error, type) => {
276
- const errorEvent = getDesignLibraryComponentPreviewErrorEvent(uid, error, type);
301
+ const errorEvent = getDesignLibraryErrorEvent(uid, error, type);
277
302
  console.error('Component Library: sending error event', errorEvent);
278
303
  if (typeof window !== 'undefined') {
279
304
  const target = window.parent && window.parent !== window ? window.parent : window;
@@ -263,19 +263,11 @@ const prepImportMaps = async (paths, separateMaps) => {
263
263
  ? componentPath
264
264
  : path_1.default.resolve(appPath, componentPath);
265
265
  // read the start of the file that may be 'use client'
266
- const firstLine = await new Promise((resolve) => {
267
- let readBuffer = '';
268
- const stream = fs_1.default.createReadStream(fullPath, { end: 12 });
269
- stream
270
- .on('data', async (chunk) => {
271
- readBuffer += chunk.toString();
272
- })
273
- .on('close', () => resolve(readBuffer))
274
- .on('error', () => resolve(''));
275
- });
276
- if (!firstLine)
266
+ const fileContent = await fs_1.default.promises.readFile(fullPath, 'utf8');
267
+ if (!fileContent)
277
268
  continue;
278
- if (firstLine.match(/['"]use client['"]/)) {
269
+ // check if 'use client' directive is present, ignoring any comments or whitespace before it
270
+ if (fileContent.match(/^(?:\s|\/\/[^\n]*\n|\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\/)*['"]use client['"]/)) {
279
271
  clientPaths.push(fullPath);
280
272
  }
281
273
  else {
@@ -1 +1 @@
1
- export { addComponentPreviewHandler, addServerComponentPreviewHandler, getDesignLibraryComponentPreviewErrorEvent, getDesignLibraryComponentPropsEvent, getDesignLibraryImportMapEvent, getImportMapInfo, addStyleElement, createComponentInstance, sendErrorEvent, DesignLibraryPreviewError, fetchGeneratedComponentFromCache, } from './preview';
1
+ export { addComponentPreviewHandler, addServerComponentPreviewHandler, getDesignLibraryErrorEvent, getDesignLibraryComponentPropsEvent, getDesignLibraryImportMapEvent, getImportMapInfo, addStyleElement, createComponentInstance, sendErrorEvent, DesignLibraryPreviewError, fetchGeneratedComponentFromCache, } from './preview';
@@ -15,9 +15,13 @@ const DESIGN_LIBRARY_COMPONENT_PROPS_EVENT_NAME = 'component:generation:componen
15
15
  */
16
16
  const DESIGN_LIBRARY_COMPONENT_PREVIEW_EVENT_NAME = 'component:generation:component-preview';
17
17
  /**
18
- * Event to send component error to design library
18
+ * Event to send component preview error to design library
19
19
  */
20
20
  const DESIGN_LIBRARY_COMPONENT_PREVIEW_ERROR_EVENT_NAME = 'component:generation:component-preview-error';
21
+ /**
22
+ * Event to send general component preview error to design library
23
+ */
24
+ const DESIGN_LIBRARY_ERROR_EVENT_NAME = 'component:generation:error';
21
25
  /**
22
26
  * Enumeration of error types for the design library preview.
23
27
  * @internal
@@ -32,6 +36,18 @@ export var DesignLibraryPreviewError;
32
36
  * Error occurred during component and event handlers initialization.
33
37
  */
34
38
  DesignLibraryPreviewError["RenderInit"] = "render-init";
39
+ /**
40
+ * The import map is missing
41
+ */
42
+ DesignLibraryPreviewError["ImportMapMissing"] = "import-map-missing";
43
+ /**
44
+ * Error during loading of the import map
45
+ */
46
+ DesignLibraryPreviewError["ImportMapLoad"] = "import-map-load-error";
47
+ /**
48
+ * Error during fetching the generated component data from secured endpoint
49
+ */
50
+ DesignLibraryPreviewError["GeneratedComponentFetch"] = "generated-component-fetch-error";
35
51
  })(DesignLibraryPreviewError || (DesignLibraryPreviewError = {}));
36
52
  /**
37
53
  * Builds the component dependencies from the component imports and the import map.
@@ -175,18 +191,27 @@ export const createComponentInstance = (importMap, generatedComponentData) => {
175
191
  return exports.Component;
176
192
  };
177
193
  /**
178
- * Generates a DesignLibraryComponentPreviewErrorEvent with the given uid and error.
194
+ * Generates a DesignLibraryErrorEvent depending on the type of error with the given uid and error.
179
195
  * @param {string} uid - The unique identifier for the event.
180
196
  * @param {unknown} error - The error to be sent.
181
197
  * @param {DesignLibraryPreviewError} type - The type of error.
182
- * @returns An object representing the DesignLibraryComponentPreviewErrorEvent.
198
+ * @returns An object representing the DesignLibraryErrorEvent.
183
199
  * @internal
184
200
  */
185
- export function getDesignLibraryComponentPreviewErrorEvent(uid, error, type) {
186
- return {
187
- name: DESIGN_LIBRARY_COMPONENT_PREVIEW_ERROR_EVENT_NAME,
188
- message: { uid, error, type },
189
- };
201
+ export function getDesignLibraryErrorEvent(uid, error, type) {
202
+ switch (type) {
203
+ case DesignLibraryPreviewError.Render:
204
+ case DesignLibraryPreviewError.RenderInit:
205
+ return {
206
+ name: DESIGN_LIBRARY_COMPONENT_PREVIEW_ERROR_EVENT_NAME,
207
+ message: { uid, error, type },
208
+ };
209
+ default:
210
+ return {
211
+ name: DESIGN_LIBRARY_ERROR_EVENT_NAME,
212
+ message: { uid, error, type },
213
+ };
214
+ }
190
215
  }
191
216
  /**
192
217
  * Generates a DesignLibraryComponentPropsEvent with the given uid, fields and parameters.
@@ -249,14 +274,14 @@ export function isImportEntryInfoArray(data) {
249
274
  typeof data[0].exports[0] === 'string');
250
275
  }
251
276
  /**
252
- * Sends a component preview error event to the design library
277
+ * Sends a design library error event to the design library
253
278
  * @param {string} uid - The unique identifier of the component that's being edited.
254
279
  * @param {unknown} error - The error object or message to be sent.
255
280
  * @param {DesignLibraryPreviewError} type - The type of error, as defined in DesignLibraryPreviewError.
256
281
  * @internal
257
282
  */
258
283
  export const sendErrorEvent = (uid, error, type) => {
259
- const errorEvent = getDesignLibraryComponentPreviewErrorEvent(uid, error, type);
284
+ const errorEvent = getDesignLibraryErrorEvent(uid, error, type);
260
285
  console.error('Component Library: sending error event', errorEvent);
261
286
  if (typeof window !== 'undefined') {
262
287
  const target = window.parent && window.parent !== window ? window.parent : window;
@@ -221,19 +221,11 @@ const prepImportMaps = async (paths, separateMaps) => {
221
221
  ? componentPath
222
222
  : path.resolve(appPath, componentPath);
223
223
  // read the start of the file that may be 'use client'
224
- const firstLine = await new Promise((resolve) => {
225
- let readBuffer = '';
226
- const stream = fs.createReadStream(fullPath, { end: 12 });
227
- stream
228
- .on('data', async (chunk) => {
229
- readBuffer += chunk.toString();
230
- })
231
- .on('close', () => resolve(readBuffer))
232
- .on('error', () => resolve(''));
233
- });
234
- if (!firstLine)
224
+ const fileContent = await fs.promises.readFile(fullPath, 'utf8');
225
+ if (!fileContent)
235
226
  continue;
236
- if (firstLine.match(/['"]use client['"]/)) {
227
+ // check if 'use client' directive is present, ignoring any comments or whitespace before it
228
+ if (fileContent.match(/^(?:\s|\/\/[^\n]*\n|\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\/)*['"]use client['"]/)) {
237
229
  clientPaths.push(fullPath);
238
230
  }
239
231
  else {
package/package.json CHANGED
@@ -1,163 +1,163 @@
1
- {
2
- "name": "@sitecore-content-sdk/core",
3
- "version": "1.5.0",
4
- "main": "dist/cjs/index.js",
5
- "module": "dist/esm/index.js",
6
- "sideEffects": false,
7
- "publishConfig": {
8
- "access": "public",
9
- "registry": "https://registry.npmjs.org/"
10
- },
11
- "scripts": {
12
- "build": "npm run clean && tsc -p tsconfig.json && tsc -p tsconfig-esm.json",
13
- "clean": "del-cli dist types",
14
- "lint": "eslint \"./src/**/*.ts\"",
15
- "test": "mocha \"./src/**/*.test.ts\"",
16
- "prepublishOnly": "npm run build",
17
- "coverage": "nyc npm test",
18
- "generate-docs": "npx typedoc --plugin typedoc-plugin-markdown --outputFileStrategy Members --parametersFormat table --readme none --out ../../ref-docs/core --entryPoints src/index.ts --entryPoints src/config/index.ts --entryPoints src/client/index.ts --entryPoints src/i18n/index.ts --entryPoints src/layout/index.ts --entryPoints src/media/index.ts --entryPoints src/personalize/index.ts --entryPoints src/site/index.ts --entryPoints src/tracking/index.ts --entryPoints src/utils/index.ts --entryPoints src/editing/index.ts --entryPoints src/tools/index.ts --entryPoints src/codegen/index.ts --githubPages false",
19
- "api-extractor": "npm run build && api-extractor run --local --verbose",
20
- "api-extractor:verify": "api-extractor run"
21
- },
22
- "engines": {
23
- "node": ">=22"
24
- },
25
- "author": {
26
- "name": "Sitecore Corporation",
27
- "url": "https://doc.sitecore.com/xmc/en/developers/content-sdk/index.html"
28
- },
29
- "repository": {
30
- "type": "git",
31
- "url": "https://github.com/Sitecore/content-sdk"
32
- },
33
- "license": "Apache-2.0",
34
- "homepage": "https://doc.sitecore.com/xmc/en/developers/content-sdk/index.html",
35
- "bugs": {
36
- "url": "https://github.com/sitecore/content-sdk/issues"
37
- },
38
- "devDependencies": {
39
- "@sitecore-cloudsdk/events": "^0.5.1",
40
- "@stylistic/eslint-plugin": "^5.2.2",
41
- "@types/chai": "^5.2.2",
42
- "@types/chai-spies": "^1.0.6",
43
- "@types/chai-string": "^1.4.5",
44
- "@types/debug": "^4.1.12",
45
- "@types/jsdom": "^21.1.7",
46
- "@types/memory-cache": "^0.2.6",
47
- "@types/mocha": "^10.0.10",
48
- "@types/node": "^22.15.14",
49
- "@types/proxyquire": "^1.3.31",
50
- "@types/sinon": "^17.0.4",
51
- "@types/sinon-chai": "^4.0.0",
52
- "@types/url-parse": "1.4.11",
53
- "@typescript-eslint/eslint-plugin": "8.39.0",
54
- "@typescript-eslint/parser": "8.39.0",
55
- "chai": "^4.4.1",
56
- "chai-spies": "^1.1.0",
57
- "chai-string": "^1.6.0",
58
- "del-cli": "^6.0.0",
59
- "eslint": "^9.32.0",
60
- "eslint-config-prettier": "^10.1.8",
61
- "eslint-plugin-import": "2.32.0",
62
- "eslint-plugin-jsdoc": "52.0.3",
63
- "eslint-plugin-prettier": "^4.0.0",
64
- "jsdom": "^26.1.0",
65
- "mocha": "^11.2.2",
66
- "nock": "14.0.0-beta.7",
67
- "nyc": "^17.1.0",
68
- "prettier": "^2.8.0",
69
- "proxyquire": "^2.1.3",
70
- "sinon": "^20.0.0",
71
- "tslib": "^2.8.1",
72
- "tsx": "^4.19.4",
73
- "typescript": "~5.8.3"
74
- },
75
- "peerDependencies": {
76
- "@sitecore-cloudsdk/events": "^0.5.1"
77
- },
78
- "dependencies": {
79
- "chalk": "^4.1.2",
80
- "debug": "^4.4.0",
81
- "glob": "^11.0.2",
82
- "graphql": "^16.11.0",
83
- "graphql-request": "^6.1.0",
84
- "memory-cache": "^0.2.0",
85
- "sinon-chai": "^4.0.0",
86
- "url-parse": "^1.5.10"
87
- },
88
- "description": "",
89
- "types": "types/index.d.ts",
90
- "gitHead": "ea5d751f45a07b8ae5359f92a4234fcfe4b166b2",
91
- "files": [
92
- "dist",
93
- "types",
94
- "/*.d.ts"
95
- ],
96
- "exports": {
97
- ".": {
98
- "import": "./dist/esm/index.js",
99
- "require": "./dist/cjs/index.js",
100
- "types": "./types/index.d.ts"
101
- },
102
- "./client": {
103
- "import": "./dist/esm/client/index.js",
104
- "require": "./dist/cjs/client/index.js",
105
- "types": "./types/client/index.d.ts"
106
- },
107
- "./config": {
108
- "import": "./dist/esm/config/index.js",
109
- "require": "./dist/cjs/config/index.js",
110
- "types": "./types/config/index.d.ts"
111
- },
112
- "./config-cli": {
113
- "import": "./dist/esm/config-cli/index.js",
114
- "require": "./dist/cjs/config-cli/index.js",
115
- "types": "./types/config-cli/index.d.ts"
116
- },
117
- "./codegen": {
118
- "import": "./dist/esm/editing/codegen/index.js",
119
- "require": "./dist/cjs/editing/codegen/index.js",
120
- "types": "./types/editing/codegen/index.d.ts"
121
- },
122
- "./editing": {
123
- "import": "./dist/esm/editing/index.js",
124
- "require": "./dist/cjs/editing/index.js",
125
- "types": "./types/editing/index.d.ts"
126
- },
127
- "./i18n": {
128
- "import": "./dist/esm/i18n/index.js",
129
- "require": "./dist/cjs/i18n/index.js",
130
- "types": "./types/i18n/index.d.ts"
131
- },
132
- "./layout": {
133
- "import": "./dist/esm/layout/index.js",
134
- "require": "./dist/cjs/layout/index.js",
135
- "types": "./types/layout/index.d.ts"
136
- },
137
- "./media": {
138
- "import": "./dist/esm/media/index.js",
139
- "require": "./dist/cjs/media/index.js",
140
- "types": "./types/media/index.d.ts"
141
- },
142
- "./personalize": {
143
- "import": "./dist/esm/personalize/index.js",
144
- "require": "./dist/cjs/personalize/index.js",
145
- "types": "./types/personalize/index.d.ts"
146
- },
147
- "./site": {
148
- "import": "./dist/esm/site/index.js",
149
- "require": "./dist/cjs/site/index.js",
150
- "types": "./types/site/index.d.ts"
151
- },
152
- "./tools": {
153
- "import": "./dist/esm/tools/index.js",
154
- "require": "./dist/cjs/tools/index.js",
155
- "types": "./types/tools/index.d.ts"
156
- },
157
- "./utils": {
158
- "import": "./dist/esm/utils/index.js",
159
- "require": "./dist/cjs/utils/index.js",
160
- "types": "./types/utils/index.d.ts"
161
- }
162
- }
163
- }
1
+ {
2
+ "name": "@sitecore-content-sdk/core",
3
+ "version": "1.5.1-canary.2",
4
+ "main": "dist/cjs/index.js",
5
+ "module": "dist/esm/index.js",
6
+ "sideEffects": false,
7
+ "publishConfig": {
8
+ "access": "public",
9
+ "registry": "https://registry.npmjs.org/"
10
+ },
11
+ "scripts": {
12
+ "build": "npm run clean && tsc -p tsconfig.json && tsc -p tsconfig-esm.json",
13
+ "clean": "del-cli dist types",
14
+ "lint": "eslint \"./src/**/*.ts\"",
15
+ "test": "mocha \"./src/**/*.test.ts\"",
16
+ "prepublishOnly": "npm run build",
17
+ "coverage": "nyc npm test",
18
+ "generate-docs": "npx typedoc --plugin typedoc-plugin-markdown --outputFileStrategy Members --parametersFormat table --readme none --out ../../ref-docs/core --entryPoints src/index.ts --entryPoints src/config/index.ts --entryPoints src/client/index.ts --entryPoints src/i18n/index.ts --entryPoints src/layout/index.ts --entryPoints src/media/index.ts --entryPoints src/personalize/index.ts --entryPoints src/site/index.ts --entryPoints src/tracking/index.ts --entryPoints src/utils/index.ts --entryPoints src/editing/index.ts --entryPoints src/tools/index.ts --entryPoints src/codegen/index.ts --githubPages false",
19
+ "api-extractor": "npm run build && api-extractor run --local --verbose",
20
+ "api-extractor:verify": "api-extractor run"
21
+ },
22
+ "engines": {
23
+ "node": ">=22"
24
+ },
25
+ "author": {
26
+ "name": "Sitecore Corporation",
27
+ "url": "https://doc.sitecore.com/xmc/en/developers/content-sdk/index.html"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "https://github.com/Sitecore/content-sdk"
32
+ },
33
+ "license": "Apache-2.0",
34
+ "homepage": "https://doc.sitecore.com/xmc/en/developers/content-sdk/index.html",
35
+ "bugs": {
36
+ "url": "https://github.com/sitecore/content-sdk/issues"
37
+ },
38
+ "devDependencies": {
39
+ "@sitecore-cloudsdk/events": "^0.5.1",
40
+ "@stylistic/eslint-plugin": "^5.2.2",
41
+ "@types/chai": "^5.2.2",
42
+ "@types/chai-spies": "^1.0.6",
43
+ "@types/chai-string": "^1.4.5",
44
+ "@types/debug": "^4.1.12",
45
+ "@types/jsdom": "^21.1.7",
46
+ "@types/memory-cache": "^0.2.6",
47
+ "@types/mocha": "^10.0.10",
48
+ "@types/node": "^22.15.14",
49
+ "@types/proxyquire": "^1.3.31",
50
+ "@types/sinon": "^17.0.4",
51
+ "@types/sinon-chai": "^4.0.0",
52
+ "@types/url-parse": "1.4.11",
53
+ "@typescript-eslint/eslint-plugin": "8.39.0",
54
+ "@typescript-eslint/parser": "8.39.0",
55
+ "chai": "^4.4.1",
56
+ "chai-spies": "^1.1.0",
57
+ "chai-string": "^1.6.0",
58
+ "del-cli": "^6.0.0",
59
+ "eslint": "^9.32.0",
60
+ "eslint-config-prettier": "^10.1.8",
61
+ "eslint-plugin-import": "2.32.0",
62
+ "eslint-plugin-jsdoc": "52.0.3",
63
+ "eslint-plugin-prettier": "^4.0.0",
64
+ "jsdom": "^26.1.0",
65
+ "mocha": "^11.2.2",
66
+ "nock": "14.0.0-beta.7",
67
+ "nyc": "^17.1.0",
68
+ "prettier": "^2.8.0",
69
+ "proxyquire": "^2.1.3",
70
+ "sinon": "^20.0.0",
71
+ "tslib": "^2.8.1",
72
+ "tsx": "^4.19.4",
73
+ "typescript": "~5.8.3"
74
+ },
75
+ "peerDependencies": {
76
+ "@sitecore-cloudsdk/events": "^0.5.1"
77
+ },
78
+ "dependencies": {
79
+ "chalk": "^4.1.2",
80
+ "debug": "^4.4.0",
81
+ "glob": "^11.0.2",
82
+ "graphql": "^16.11.0",
83
+ "graphql-request": "^6.1.0",
84
+ "memory-cache": "^0.2.0",
85
+ "sinon-chai": "^4.0.0",
86
+ "url-parse": "^1.5.10"
87
+ },
88
+ "description": "",
89
+ "types": "types/index.d.ts",
90
+ "gitHead": "df15bde8597f581f9b9ac020d90bcd26fec744f3",
91
+ "files": [
92
+ "dist",
93
+ "types",
94
+ "/*.d.ts"
95
+ ],
96
+ "exports": {
97
+ ".": {
98
+ "import": "./dist/esm/index.js",
99
+ "require": "./dist/cjs/index.js",
100
+ "types": "./types/index.d.ts"
101
+ },
102
+ "./client": {
103
+ "import": "./dist/esm/client/index.js",
104
+ "require": "./dist/cjs/client/index.js",
105
+ "types": "./types/client/index.d.ts"
106
+ },
107
+ "./config": {
108
+ "import": "./dist/esm/config/index.js",
109
+ "require": "./dist/cjs/config/index.js",
110
+ "types": "./types/config/index.d.ts"
111
+ },
112
+ "./config-cli": {
113
+ "import": "./dist/esm/config-cli/index.js",
114
+ "require": "./dist/cjs/config-cli/index.js",
115
+ "types": "./types/config-cli/index.d.ts"
116
+ },
117
+ "./codegen": {
118
+ "import": "./dist/esm/editing/codegen/index.js",
119
+ "require": "./dist/cjs/editing/codegen/index.js",
120
+ "types": "./types/editing/codegen/index.d.ts"
121
+ },
122
+ "./editing": {
123
+ "import": "./dist/esm/editing/index.js",
124
+ "require": "./dist/cjs/editing/index.js",
125
+ "types": "./types/editing/index.d.ts"
126
+ },
127
+ "./i18n": {
128
+ "import": "./dist/esm/i18n/index.js",
129
+ "require": "./dist/cjs/i18n/index.js",
130
+ "types": "./types/i18n/index.d.ts"
131
+ },
132
+ "./layout": {
133
+ "import": "./dist/esm/layout/index.js",
134
+ "require": "./dist/cjs/layout/index.js",
135
+ "types": "./types/layout/index.d.ts"
136
+ },
137
+ "./media": {
138
+ "import": "./dist/esm/media/index.js",
139
+ "require": "./dist/cjs/media/index.js",
140
+ "types": "./types/media/index.d.ts"
141
+ },
142
+ "./personalize": {
143
+ "import": "./dist/esm/personalize/index.js",
144
+ "require": "./dist/cjs/personalize/index.js",
145
+ "types": "./types/personalize/index.d.ts"
146
+ },
147
+ "./site": {
148
+ "import": "./dist/esm/site/index.js",
149
+ "require": "./dist/cjs/site/index.js",
150
+ "types": "./types/site/index.d.ts"
151
+ },
152
+ "./tools": {
153
+ "import": "./dist/esm/tools/index.js",
154
+ "require": "./dist/cjs/tools/index.js",
155
+ "types": "./types/tools/index.d.ts"
156
+ },
157
+ "./utils": {
158
+ "import": "./dist/esm/utils/index.js",
159
+ "require": "./dist/cjs/utils/index.js",
160
+ "types": "./types/utils/index.d.ts"
161
+ }
162
+ }
163
+ }
@@ -1,2 +1,2 @@
1
- export { addComponentPreviewHandler, addServerComponentPreviewHandler, getDesignLibraryComponentPreviewErrorEvent, getDesignLibraryComponentPropsEvent, getDesignLibraryImportMapEvent, getImportMapInfo, addStyleElement, createComponentInstance, sendErrorEvent, DesignLibraryPreviewError, ImportEntry, ImportEntryInfo, GeneratedComponentData, ComponentPreviewEventArgs, ServerComponentPreviewEventArgs, fetchGeneratedComponentFromCache, } from './preview';
1
+ export { addComponentPreviewHandler, addServerComponentPreviewHandler, getDesignLibraryErrorEvent, getDesignLibraryComponentPropsEvent, getDesignLibraryImportMapEvent, getImportMapInfo, addStyleElement, createComponentInstance, sendErrorEvent, DesignLibraryPreviewError, ImportEntry, ImportEntryInfo, GeneratedComponentData, ComponentPreviewEventArgs, ServerComponentPreviewEventArgs, fetchGeneratedComponentFromCache, } from './preview';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editing/codegen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,0CAA0C,EAC1C,mCAAmC,EACnC,8BAA8B,EAC9B,gBAAgB,EAChB,eAAe,EACf,uBAAuB,EACvB,cAAc,EACd,yBAAyB,EACzB,WAAW,EACX,eAAe,EACf,sBAAsB,EACtB,yBAAyB,EACzB,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editing/codegen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,0BAA0B,EAC1B,mCAAmC,EACnC,8BAA8B,EAC9B,gBAAgB,EAChB,eAAe,EACf,uBAAuB,EACvB,cAAc,EACd,yBAAyB,EACzB,WAAW,EACX,eAAe,EACf,sBAAsB,EACtB,yBAAyB,EACzB,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,WAAW,CAAC"}
@@ -13,9 +13,13 @@ declare const DESIGN_LIBRARY_COMPONENT_PROPS_EVENT_NAME = "component:generation:
13
13
  */
14
14
  declare const DESIGN_LIBRARY_COMPONENT_PREVIEW_EVENT_NAME = "component:generation:component-preview";
15
15
  /**
16
- * Event to send component error to design library
16
+ * Event to send component preview error to design library
17
17
  */
18
18
  declare const DESIGN_LIBRARY_COMPONENT_PREVIEW_ERROR_EVENT_NAME = "component:generation:component-preview-error";
19
+ /**
20
+ * Event to send general component preview error to design library
21
+ */
22
+ declare const DESIGN_LIBRARY_ERROR_EVENT_NAME = "component:generation:error";
19
23
  /**
20
24
  * Represents an import map entry.
21
25
  * @public
@@ -127,6 +131,7 @@ export interface ServerComponentPreviewEventArgs extends DesignLibraryEvent {
127
131
  }
128
132
  /**
129
133
  * Represents an event indicating the import map to be sent to design library
134
+ * @internal
130
135
  */
131
136
  export interface DesignLibraryImportMapEvent extends DesignLibraryEvent {
132
137
  name: typeof DESIGN_LIBRARY_IMPORT_MAP_EVENT_NAME;
@@ -140,6 +145,7 @@ export interface DesignLibraryImportMapEvent extends DesignLibraryEvent {
140
145
  }
141
146
  /**
142
147
  * Represents an event indicating the component props to be sent to design library
148
+ * @internal
143
149
  */
144
150
  export interface DesignLibraryComponentPropsEvent extends DesignLibraryEvent {
145
151
  name: typeof DESIGN_LIBRARY_COMPONENT_PROPS_EVENT_NAME;
@@ -151,13 +157,27 @@ export interface DesignLibraryComponentPropsEvent extends DesignLibraryEvent {
151
157
  }
152
158
  /**
153
159
  * Represents an event indicating the preview error to be sent to design library.
160
+ * Sending this type of event will trigger attempt regenerate the component by design library and resend the preview event.
161
+ * @internal
154
162
  */
155
163
  export interface DesignLibraryComponentPreviewErrorEvent extends DesignLibraryEvent {
156
164
  name: typeof DESIGN_LIBRARY_COMPONENT_PREVIEW_ERROR_EVENT_NAME;
157
165
  message: {
158
166
  uid: string;
159
167
  error: unknown;
160
- type: DesignLibraryPreviewError;
168
+ type: DesignLibraryPreviewError.Render | DesignLibraryPreviewError.RenderInit;
169
+ };
170
+ }
171
+ /**
172
+ * Represents an event indicating a general error to be sent to design library.
173
+ * @internal
174
+ */
175
+ export interface DesignLibraryErrorEvent extends DesignLibraryEvent {
176
+ name: typeof DESIGN_LIBRARY_ERROR_EVENT_NAME;
177
+ message: {
178
+ uid: string;
179
+ error: unknown;
180
+ type: Omit<DesignLibraryPreviewError, DesignLibraryPreviewError.Render | DesignLibraryPreviewError.RenderInit>;
161
181
  };
162
182
  }
163
183
  /**
@@ -172,7 +192,19 @@ export declare enum DesignLibraryPreviewError {
172
192
  /**
173
193
  * Error occurred during component and event handlers initialization.
174
194
  */
175
- RenderInit = "render-init"
195
+ RenderInit = "render-init",
196
+ /**
197
+ * The import map is missing
198
+ */
199
+ ImportMapMissing = "import-map-missing",
200
+ /**
201
+ * Error during loading of the import map
202
+ */
203
+ ImportMapLoad = "import-map-load-error",
204
+ /**
205
+ * Error during fetching the generated component data from secured endpoint
206
+ */
207
+ GeneratedComponentFetch = "generated-component-fetch-error"
176
208
  }
177
209
  /**
178
210
  * Builds the component dependencies from the component imports and the import map.
@@ -230,14 +262,14 @@ export declare function addStyleElement(stylesContent: string): void;
230
262
  */
231
263
  export declare const createComponentInstance: (importMap: ImportEntry[], generatedComponentData: GeneratedComponentData) => unknown;
232
264
  /**
233
- * Generates a DesignLibraryComponentPreviewErrorEvent with the given uid and error.
265
+ * Generates a DesignLibraryErrorEvent depending on the type of error with the given uid and error.
234
266
  * @param {string} uid - The unique identifier for the event.
235
267
  * @param {unknown} error - The error to be sent.
236
268
  * @param {DesignLibraryPreviewError} type - The type of error.
237
- * @returns An object representing the DesignLibraryComponentPreviewErrorEvent.
269
+ * @returns An object representing the DesignLibraryErrorEvent.
238
270
  * @internal
239
271
  */
240
- export declare function getDesignLibraryComponentPreviewErrorEvent(uid: string, error: unknown, type: DesignLibraryPreviewError): DesignLibraryComponentPreviewErrorEvent;
272
+ export declare function getDesignLibraryErrorEvent(uid: string, error: unknown, type: DesignLibraryPreviewError): DesignLibraryErrorEvent | DesignLibraryComponentPreviewErrorEvent;
241
273
  /**
242
274
  * Generates a DesignLibraryComponentPropsEvent with the given uid, fields and parameters.
243
275
  * @param {string} uid - The unique identifier for the event.
@@ -268,7 +300,7 @@ export declare function getImportMapInfo(importMap: ImportEntry[]): ImportEntryI
268
300
  */
269
301
  export declare function isImportEntryInfoArray(data: unknown): data is ImportEntryInfo[];
270
302
  /**
271
- * Sends a component preview error event to the design library
303
+ * Sends a design library error event to the design library
272
304
  * @param {string} uid - The unique identifier of the component that's being edited.
273
305
  * @param {unknown} error - The error object or message to be sent.
274
306
  * @param {DesignLibraryPreviewError} type - The type of error, as defined in DesignLibraryPreviewError.
@@ -1 +1 @@
1
- {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../src/editing/codegen/preview.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAiB,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGtE;;GAEG;AACH,QAAA,MAAM,oCAAoC,oCAAoC,CAAC;AAE/E;;GAEG;AACH,QAAA,MAAM,yCAAyC,yCAAyC,CAAC;AAEzF;;GAEG;AACH,QAAA,MAAM,2CAA2C,2CAA2C,CAAC;AAE7F;;GAEG;AACH,QAAA,MAAM,iDAAiD,iDACP,CAAC;AAEjD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,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