@contentstack/studio-registry 0.1.0 → 1.1.2-dev-20251104T1201-7f3ab62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/cjs/index.cjs +4 -4
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/component-registry/registry.js +3 -3
- package/dist/esm/data-binder/retrieve-data.util.js +1 -1
- package/dist/esm/data-binder/retrieve-data.util.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/package.json +6 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Contentstack
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -4204,7 +4204,7 @@ class ComponentRegistry {
|
|
|
4204
4204
|
getComponentByNode(node, suppressError = true) {
|
|
4205
4205
|
const name = this.getComponentName(node);
|
|
4206
4206
|
if (!this.componentRegistry.has(name) && !suppressError) {
|
|
4207
|
-
throw new Error(`Component with
|
|
4207
|
+
throw new Error(`Component with type '${name}' is not registered.`);
|
|
4208
4208
|
}
|
|
4209
4209
|
if (!this.componentRegistry.has(name)) {
|
|
4210
4210
|
return;
|
|
@@ -4218,11 +4218,11 @@ class ComponentRegistry {
|
|
|
4218
4218
|
unregisterComponent(node) {
|
|
4219
4219
|
const name = typeof node === "string" ? node : this.getComponentName(node);
|
|
4220
4220
|
if (!this.componentRegistry.has(name)) {
|
|
4221
|
-
console.error(`Component with
|
|
4221
|
+
console.error(`Component with type '${name}' is not registered.`);
|
|
4222
4222
|
return;
|
|
4223
4223
|
}
|
|
4224
4224
|
if (SYSTEM_COMPONENTS.has(name)) {
|
|
4225
|
-
console.error(`Component with
|
|
4225
|
+
console.error(`Component with type '${name}' is a system component and cannot be unregistered.`);
|
|
4226
4226
|
return;
|
|
4227
4227
|
}
|
|
4228
4228
|
this.componentRegistry.delete(name);
|
|
@@ -5374,7 +5374,7 @@ function isDataMatchingPropType(data, type) {
|
|
|
5374
5374
|
href: dataType === "string",
|
|
5375
5375
|
imageurl: dataType === "string",
|
|
5376
5376
|
datestring: dataType === "string",
|
|
5377
|
-
json_rte: dataType === "
|
|
5377
|
+
json_rte: dataType === "object",
|
|
5378
5378
|
};
|
|
5379
5379
|
return map[type];
|
|
5380
5380
|
}
|