@webstudio-is/react-sdk 0.191.5 → 0.193.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/lib/index.js
CHANGED
|
@@ -215,7 +215,7 @@ var blockMeta = {
|
|
|
215
215
|
icon: EditIcon,
|
|
216
216
|
constraints: {
|
|
217
217
|
relation: "ancestor",
|
|
218
|
-
component: { $
|
|
218
|
+
component: { $nin: [collectionComponent, blockComponent] }
|
|
219
219
|
},
|
|
220
220
|
stylable: false,
|
|
221
221
|
template: [
|
|
@@ -1176,16 +1176,6 @@ var namespaceMatcher = (namespace, matcher) => {
|
|
|
1176
1176
|
};
|
|
1177
1177
|
var namespaceMeta = (meta, namespace, components) => {
|
|
1178
1178
|
const newMeta = { ...meta };
|
|
1179
|
-
if (newMeta.requiredAncestors) {
|
|
1180
|
-
newMeta.requiredAncestors = newMeta.requiredAncestors.map(
|
|
1181
|
-
(component) => components.has(component) ? `${namespace}:${component}` : component
|
|
1182
|
-
);
|
|
1183
|
-
}
|
|
1184
|
-
if (newMeta.invalidAncestors) {
|
|
1185
|
-
newMeta.invalidAncestors = newMeta.invalidAncestors.map(
|
|
1186
|
-
(component) => components.has(component) ? `${namespace}:${component}` : component
|
|
1187
|
-
);
|
|
1188
|
-
}
|
|
1189
1179
|
if (newMeta.constraints) {
|
|
1190
1180
|
if (Array.isArray(newMeta.constraints)) {
|
|
1191
1181
|
newMeta.constraints = newMeta.constraints.map(
|
|
@@ -1249,8 +1239,6 @@ var WsComponentMeta = z3.object({
|
|
|
1249
1239
|
// embed - images, videos or other embeddable components, without children
|
|
1250
1240
|
// rich-text-child - formatted text fragment, not listed in components list
|
|
1251
1241
|
type: z3.enum(["container", "control", "embed", "rich-text-child"]),
|
|
1252
|
-
requiredAncestors: z3.optional(z3.array(z3.string())),
|
|
1253
|
-
invalidAncestors: z3.optional(z3.array(z3.string())),
|
|
1254
1242
|
constraints: Matchers.optional(),
|
|
1255
1243
|
// when this field is specified component receives
|
|
1256
1244
|
// prop with index of same components withiin specified ancestor
|
|
@@ -743,8 +743,6 @@ export declare const defaultStates: ComponentState[];
|
|
|
743
743
|
export declare const WsComponentMeta: z.ZodObject<{
|
|
744
744
|
category: z.ZodOptional<z.ZodEnum<["general", "text", "data", "media", "forms", "radix", "xml", "hidden", "internal"]>>;
|
|
745
745
|
type: z.ZodEnum<["container", "control", "embed", "rich-text-child"]>;
|
|
746
|
-
requiredAncestors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
747
|
-
invalidAncestors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
748
746
|
constraints: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
749
747
|
relation: z.ZodUnion<[z.ZodLiteral<"ancestor">, z.ZodLiteral<"parent">, z.ZodLiteral<"self">, z.ZodLiteral<"child">, z.ZodLiteral<"descendant">]>;
|
|
750
748
|
component: z.ZodOptional<z.ZodObject<{
|
|
@@ -2577,8 +2575,6 @@ export declare const WsComponentMeta: z.ZodObject<{
|
|
|
2577
2575
|
type: "control" | "embed" | "container" | "rich-text-child";
|
|
2578
2576
|
icon: string;
|
|
2579
2577
|
category?: "data" | "xml" | "text" | "hidden" | "media" | "general" | "forms" | "radix" | "internal" | undefined;
|
|
2580
|
-
requiredAncestors?: string[] | undefined;
|
|
2581
|
-
invalidAncestors?: string[] | undefined;
|
|
2582
2578
|
constraints?: {
|
|
2583
2579
|
relation: "ancestor" | "parent" | "self" | "child" | "descendant";
|
|
2584
2580
|
component?: {
|
|
@@ -3186,8 +3182,6 @@ export declare const WsComponentMeta: z.ZodObject<{
|
|
|
3186
3182
|
type: "control" | "embed" | "container" | "rich-text-child";
|
|
3187
3183
|
icon: string;
|
|
3188
3184
|
category?: "data" | "xml" | "text" | "hidden" | "media" | "general" | "forms" | "radix" | "internal" | undefined;
|
|
3189
|
-
requiredAncestors?: string[] | undefined;
|
|
3190
|
-
invalidAncestors?: string[] | undefined;
|
|
3191
3185
|
constraints?: {
|
|
3192
3186
|
relation: "ancestor" | "parent" | "self" | "child" | "descendant";
|
|
3193
3187
|
component?: {
|
|
@@ -2265,8 +2265,6 @@ export declare const namespaceMeta: (meta: WsComponentMeta, namespace: string, c
|
|
|
2265
2265
|
value: string;
|
|
2266
2266
|
type: "expression";
|
|
2267
2267
|
} | EmbedTemplateInstance)[] | undefined;
|
|
2268
|
-
requiredAncestors?: string[] | undefined;
|
|
2269
|
-
invalidAncestors?: string[] | undefined;
|
|
2270
2268
|
constraints?: {
|
|
2271
2269
|
relation: "ancestor" | "parent" | "self" | "child" | "descendant";
|
|
2272
2270
|
component?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/react-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.193.0",
|
|
4
4
|
"description": "Webstudio JavaScript / TypeScript API",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"html-tags": "^4.0.0",
|
|
27
27
|
"nanoid": "^5.0.8",
|
|
28
28
|
"title-case": "^4.3.2",
|
|
29
|
-
"@webstudio-is/
|
|
30
|
-
"@webstudio-is/
|
|
31
|
-
"@webstudio-is/
|
|
32
|
-
"@webstudio-is/
|
|
33
|
-
"@webstudio-is/
|
|
29
|
+
"@webstudio-is/css-engine": "0.193.0",
|
|
30
|
+
"@webstudio-is/fonts": "0.193.0",
|
|
31
|
+
"@webstudio-is/icons": "^0.193.0",
|
|
32
|
+
"@webstudio-is/image": "0.193.0",
|
|
33
|
+
"@webstudio-is/sdk": "0.193.0"
|
|
34
34
|
},
|
|
35
35
|
"exports": {
|
|
36
36
|
".": {
|