@webstudio-is/sdk 0.216.0 → 0.217.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/core-templates.js +0 -1
- package/lib/index.js +30 -153
- package/lib/types/core-metas.d.ts +3 -1
- package/lib/types/index.d.ts +0 -1
- package/lib/types/schema/component-meta.d.ts +27 -215
- package/lib/types/schema/instances.d.ts +8 -226
- package/lib/types/schema/pages.d.ts +8 -8
- package/lib/types/schema/webstudio.d.ts +30 -30
- package/package.json +6 -6
- package/lib/types/schema/embed-template.d.ts +0 -5254
package/lib/core-templates.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -177,31 +177,6 @@ var Instance = z3.object({
|
|
|
177
177
|
children: z3.array(InstanceChild)
|
|
178
178
|
});
|
|
179
179
|
var Instances = z3.map(InstanceId, Instance);
|
|
180
|
-
var MatcherRelation = z3.union([
|
|
181
|
-
z3.literal("ancestor"),
|
|
182
|
-
z3.literal("parent"),
|
|
183
|
-
z3.literal("self"),
|
|
184
|
-
z3.literal("child"),
|
|
185
|
-
z3.literal("descendant")
|
|
186
|
-
]);
|
|
187
|
-
var MatcherOperation = z3.object({
|
|
188
|
-
$eq: z3.string().optional(),
|
|
189
|
-
$neq: z3.string().optional(),
|
|
190
|
-
$in: z3.array(z3.string()).optional(),
|
|
191
|
-
$nin: z3.array(z3.string()).optional()
|
|
192
|
-
});
|
|
193
|
-
var Matcher = z3.object({
|
|
194
|
-
relation: MatcherRelation,
|
|
195
|
-
component: MatcherOperation.optional(),
|
|
196
|
-
tag: MatcherOperation.optional(),
|
|
197
|
-
text: z3.literal(false).describe(
|
|
198
|
-
`
|
|
199
|
-
To disallow text editing on a container instance,
|
|
200
|
-
use: { relation: 'child', text: false }
|
|
201
|
-
`
|
|
202
|
-
).optional()
|
|
203
|
-
});
|
|
204
|
-
var Matchers = z3.union([Matcher, z3.array(Matcher)]);
|
|
205
180
|
|
|
206
181
|
// src/schema/data-sources.ts
|
|
207
182
|
import { z as z4 } from "zod";
|
|
@@ -852,108 +827,19 @@ var PropMeta = z14.union([
|
|
|
852
827
|
AnimationAction
|
|
853
828
|
]);
|
|
854
829
|
|
|
855
|
-
// src/schema/
|
|
830
|
+
// src/schema/component-meta.ts
|
|
856
831
|
import { z as z15 } from "zod";
|
|
857
832
|
import { StyleValue as StyleValue3 } from "@webstudio-is/css-engine";
|
|
858
|
-
var
|
|
859
|
-
type: z15.literal("text"),
|
|
860
|
-
value: z15.string(),
|
|
861
|
-
placeholder: z15.boolean().optional()
|
|
862
|
-
});
|
|
863
|
-
var EmbedTemplateExpression = z15.object({
|
|
864
|
-
type: z15.literal("expression"),
|
|
865
|
-
value: z15.string()
|
|
866
|
-
});
|
|
867
|
-
var EmbedTemplateVariable = z15.object({
|
|
868
|
-
alias: z15.optional(z15.string()),
|
|
869
|
-
initialValue: z15.unknown()
|
|
870
|
-
});
|
|
871
|
-
var EmbedTemplateProp = z15.union([
|
|
872
|
-
z15.object({
|
|
873
|
-
type: z15.literal("number"),
|
|
874
|
-
name: z15.string(),
|
|
875
|
-
value: z15.number()
|
|
876
|
-
}),
|
|
877
|
-
z15.object({
|
|
878
|
-
type: z15.literal("string"),
|
|
879
|
-
name: z15.string(),
|
|
880
|
-
value: z15.string()
|
|
881
|
-
}),
|
|
882
|
-
z15.object({
|
|
883
|
-
type: z15.literal("boolean"),
|
|
884
|
-
name: z15.string(),
|
|
885
|
-
value: z15.boolean()
|
|
886
|
-
}),
|
|
887
|
-
z15.object({
|
|
888
|
-
type: z15.literal("string[]"),
|
|
889
|
-
name: z15.string(),
|
|
890
|
-
value: z15.array(z15.string())
|
|
891
|
-
}),
|
|
892
|
-
z15.object({
|
|
893
|
-
type: z15.literal("json"),
|
|
894
|
-
name: z15.string(),
|
|
895
|
-
value: z15.unknown()
|
|
896
|
-
}),
|
|
897
|
-
z15.object({
|
|
898
|
-
type: z15.literal("expression"),
|
|
899
|
-
name: z15.string(),
|
|
900
|
-
code: z15.string()
|
|
901
|
-
}),
|
|
902
|
-
z15.object({
|
|
903
|
-
type: z15.literal("parameter"),
|
|
904
|
-
name: z15.string(),
|
|
905
|
-
variableName: z15.string(),
|
|
906
|
-
variableAlias: z15.optional(z15.string())
|
|
907
|
-
}),
|
|
908
|
-
z15.object({
|
|
909
|
-
type: z15.literal("action"),
|
|
910
|
-
name: z15.string(),
|
|
911
|
-
value: z15.array(
|
|
912
|
-
z15.object({
|
|
913
|
-
type: z15.literal("execute"),
|
|
914
|
-
args: z15.optional(z15.array(z15.string())),
|
|
915
|
-
code: z15.string()
|
|
916
|
-
})
|
|
917
|
-
)
|
|
918
|
-
})
|
|
919
|
-
]);
|
|
920
|
-
var EmbedTemplateStyleDeclRaw = z15.object({
|
|
833
|
+
var PresetStyleDecl = z15.object({
|
|
921
834
|
// State selector, e.g. :hover
|
|
922
835
|
state: z15.optional(z15.string()),
|
|
923
836
|
property: z15.string(),
|
|
924
837
|
value: StyleValue3
|
|
925
838
|
});
|
|
926
|
-
var
|
|
927
|
-
|
|
928
|
-
() => z15.object({
|
|
929
|
-
type: z15.literal("instance"),
|
|
930
|
-
component: z15.string(),
|
|
931
|
-
label: z15.optional(z15.string()),
|
|
932
|
-
variables: z15.optional(z15.record(z15.string(), EmbedTemplateVariable)),
|
|
933
|
-
props: z15.optional(z15.array(EmbedTemplateProp)),
|
|
934
|
-
styles: z15.optional(z15.array(EmbedTemplateStyleDecl)),
|
|
935
|
-
children: WsEmbedTemplate
|
|
936
|
-
})
|
|
937
|
-
);
|
|
938
|
-
var WsEmbedTemplate = z15.lazy(
|
|
939
|
-
() => z15.array(
|
|
940
|
-
z15.union([EmbedTemplateInstance, EmbedTemplateText, EmbedTemplateExpression])
|
|
941
|
-
)
|
|
942
|
-
);
|
|
943
|
-
|
|
944
|
-
// src/schema/component-meta.ts
|
|
945
|
-
import { z as z16 } from "zod";
|
|
946
|
-
import { StyleValue as StyleValue4 } from "@webstudio-is/css-engine";
|
|
947
|
-
var PresetStyleDecl = z16.object({
|
|
948
|
-
// State selector, e.g. :hover
|
|
949
|
-
state: z16.optional(z16.string()),
|
|
950
|
-
property: z16.string(),
|
|
951
|
-
value: StyleValue4
|
|
952
|
-
});
|
|
953
|
-
var WsComponentPropsMeta = z16.object({
|
|
954
|
-
props: z16.record(PropMeta),
|
|
839
|
+
var WsComponentPropsMeta = z15.object({
|
|
840
|
+
props: z15.record(PropMeta),
|
|
955
841
|
// Props that will be always visible in properties panel.
|
|
956
|
-
initialProps:
|
|
842
|
+
initialProps: z15.array(z15.string()).optional()
|
|
957
843
|
});
|
|
958
844
|
var componentCategories = [
|
|
959
845
|
"general",
|
|
@@ -969,10 +855,10 @@ var componentCategories = [
|
|
|
969
855
|
"internal"
|
|
970
856
|
];
|
|
971
857
|
var stateCategories = ["states", "component-states"];
|
|
972
|
-
var ComponentState =
|
|
973
|
-
category:
|
|
974
|
-
selector:
|
|
975
|
-
label:
|
|
858
|
+
var ComponentState = z15.object({
|
|
859
|
+
category: z15.enum(stateCategories).optional(),
|
|
860
|
+
selector: z15.string(),
|
|
861
|
+
label: z15.string()
|
|
976
862
|
});
|
|
977
863
|
var defaultStates = [
|
|
978
864
|
{ selector: ":hover", label: "Hover" },
|
|
@@ -981,42 +867,41 @@ var defaultStates = [
|
|
|
981
867
|
{ selector: ":focus-visible", label: "Focus Visible" },
|
|
982
868
|
{ selector: ":focus-within", label: "Focus Within" }
|
|
983
869
|
];
|
|
984
|
-
var
|
|
870
|
+
var ComponentContent = z15.string();
|
|
871
|
+
var ContentModel = z15.object({
|
|
985
872
|
/*
|
|
986
873
|
* instance - accepted by any parent with "instance" in children categories
|
|
987
874
|
* none - accepted by parents with this component name in children categories
|
|
988
875
|
*/
|
|
989
|
-
category:
|
|
876
|
+
category: z15.union([z15.literal("instance"), z15.literal("none")]),
|
|
877
|
+
/**
|
|
878
|
+
* enforce direct children of category or components
|
|
879
|
+
*/
|
|
880
|
+
children: z15.array(ComponentContent),
|
|
990
881
|
/**
|
|
991
|
-
*
|
|
992
|
-
* rich-text - can be edited as rich text
|
|
993
|
-
* instance - other instances accepted
|
|
994
|
-
* ComponentName - accept specific components with none category
|
|
882
|
+
* enforce descendants of category or components
|
|
995
883
|
*/
|
|
996
|
-
|
|
884
|
+
descendants: z15.array(ComponentContent).optional()
|
|
997
885
|
});
|
|
998
|
-
var WsComponentMeta =
|
|
999
|
-
category:
|
|
1000
|
-
// container - can accept other components with dnd or be edited as text ..
|
|
1001
|
-
type: z16.enum(["container"]).optional(),
|
|
886
|
+
var WsComponentMeta = z15.object({
|
|
887
|
+
category: z15.enum(componentCategories).optional(),
|
|
1002
888
|
/**
|
|
1003
889
|
* a property used as textual placeholder when no content specified while in builder
|
|
1004
890
|
* also signals to not insert components inside unless dropped explicitly
|
|
1005
891
|
*/
|
|
1006
|
-
placeholder:
|
|
1007
|
-
constraints: Matchers.optional(),
|
|
892
|
+
placeholder: z15.string().optional(),
|
|
1008
893
|
contentModel: ContentModel.optional(),
|
|
1009
894
|
// when this field is specified component receives
|
|
1010
895
|
// prop with index of same components withiin specified ancestor
|
|
1011
896
|
// important to automatically enumerate collections without
|
|
1012
897
|
// naming every item manually
|
|
1013
|
-
indexWithinAncestor:
|
|
1014
|
-
label:
|
|
1015
|
-
description:
|
|
1016
|
-
icon:
|
|
1017
|
-
presetStyle:
|
|
1018
|
-
states:
|
|
1019
|
-
order:
|
|
898
|
+
indexWithinAncestor: z15.optional(z15.string()),
|
|
899
|
+
label: z15.optional(z15.string()),
|
|
900
|
+
description: z15.string().optional(),
|
|
901
|
+
icon: z15.string(),
|
|
902
|
+
presetStyle: z15.optional(z15.record(z15.string(), z15.array(PresetStyleDecl))),
|
|
903
|
+
states: z15.optional(z15.array(ComponentState)),
|
|
904
|
+
order: z15.number().optional()
|
|
1020
905
|
});
|
|
1021
906
|
|
|
1022
907
|
// src/core-metas.ts
|
|
@@ -1145,7 +1030,6 @@ var blockMeta = {
|
|
|
1145
1030
|
contentModel: {
|
|
1146
1031
|
category: "instance",
|
|
1147
1032
|
children: [blockTemplateComponent, "instance"]
|
|
1148
|
-
// @todo prevent deleting block template
|
|
1149
1033
|
}
|
|
1150
1034
|
};
|
|
1151
1035
|
var blockPropsMeta = {
|
|
@@ -1168,6 +1052,7 @@ var corePropsMetas = {
|
|
|
1168
1052
|
[blockTemplateComponent]: blockTemplatePropsMeta
|
|
1169
1053
|
};
|
|
1170
1054
|
var isCoreComponent = (component) => component === rootComponent || component === elementComponent || component === collectionComponent || component === descendantComponent || component === blockComponent || component === blockTemplateComponent;
|
|
1055
|
+
var isComponentDetachable = (component) => component !== rootComponent && component !== blockTemplateComponent && component !== descendantComponent;
|
|
1171
1056
|
|
|
1172
1057
|
// src/instances-utils.ts
|
|
1173
1058
|
var ROOT_INSTANCE_ID = ":root";
|
|
@@ -2211,10 +2096,6 @@ export {
|
|
|
2211
2096
|
DataSourceVariableValue,
|
|
2212
2097
|
DataSources,
|
|
2213
2098
|
Deployment,
|
|
2214
|
-
EmbedTemplateInstance,
|
|
2215
|
-
EmbedTemplateProp,
|
|
2216
|
-
EmbedTemplateStyleDecl,
|
|
2217
|
-
EmbedTemplateVariable,
|
|
2218
2099
|
ExpressionChild,
|
|
2219
2100
|
Folder,
|
|
2220
2101
|
FolderName,
|
|
@@ -2226,10 +2107,6 @@ export {
|
|
|
2226
2107
|
Instance,
|
|
2227
2108
|
InstanceChild,
|
|
2228
2109
|
Instances,
|
|
2229
|
-
Matcher,
|
|
2230
|
-
MatcherOperation,
|
|
2231
|
-
MatcherRelation,
|
|
2232
|
-
Matchers,
|
|
2233
2110
|
OldPagePath,
|
|
2234
2111
|
PageName,
|
|
2235
2112
|
PagePath,
|
|
@@ -2258,7 +2135,6 @@ export {
|
|
|
2258
2135
|
TextChild,
|
|
2259
2136
|
WebstudioFragment,
|
|
2260
2137
|
WsComponentMeta,
|
|
2261
|
-
WsEmbedTemplate,
|
|
2262
2138
|
addFontRules,
|
|
2263
2139
|
animationActionSchema,
|
|
2264
2140
|
animationKeyframeSchema,
|
|
@@ -2297,6 +2173,7 @@ export {
|
|
|
2297
2173
|
getStyleDeclKey,
|
|
2298
2174
|
initialBreakpoints,
|
|
2299
2175
|
insetUnitValueSchema,
|
|
2176
|
+
isComponentDetachable,
|
|
2300
2177
|
isCoreComponent,
|
|
2301
2178
|
isLiteralExpression,
|
|
2302
2179
|
isPathnamePattern,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { WsComponentMeta } from "./schema/component-meta";
|
|
2
|
+
import type { Instance } from "./schema/instances";
|
|
2
3
|
export declare const rootComponent = "ws:root";
|
|
3
4
|
export declare const elementComponent = "ws:element";
|
|
4
5
|
export declare const portalComponent = "Slot";
|
|
@@ -1025,4 +1026,5 @@ export declare const corePropsMetas: {
|
|
|
1025
1026
|
initialProps?: string[] | undefined;
|
|
1026
1027
|
};
|
|
1027
1028
|
};
|
|
1028
|
-
export declare const isCoreComponent: (component:
|
|
1029
|
+
export declare const isCoreComponent: (component: Instance["component"]) => component is "ws:root" | "ws:element" | "ws:collection" | "ws:descendant" | "ws:block" | "ws:block-template";
|
|
1030
|
+
export declare const isComponentDetachable: (component: Instance["component"]) => boolean;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export * from "./schema/styles";
|
|
|
11
11
|
export * from "./schema/deployment";
|
|
12
12
|
export * from "./schema/webstudio";
|
|
13
13
|
export * from "./schema/prop-meta";
|
|
14
|
-
export * from "./schema/embed-template";
|
|
15
14
|
export * from "./schema/component-meta";
|
|
16
15
|
export * from "./core-metas";
|
|
17
16
|
export * from "./instances-utils";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { HtmlTags } from "html-tags";
|
|
3
|
-
import { StyleValue, type CssProperty } from "@webstudio-is/css-engine";
|
|
4
3
|
import type { Simplify } from "type-fest";
|
|
4
|
+
import { StyleValue, type CssProperty } from "@webstudio-is/css-engine";
|
|
5
5
|
export declare const PresetStyleDecl: z.ZodObject<{
|
|
6
6
|
state: z.ZodOptional<z.ZodString>;
|
|
7
7
|
property: z.ZodString;
|
|
@@ -5913,174 +5913,48 @@ export declare const defaultStates: ComponentState[];
|
|
|
5913
5913
|
export declare const ContentModel: z.ZodObject<{
|
|
5914
5914
|
category: z.ZodUnion<[z.ZodLiteral<"instance">, z.ZodLiteral<"none">]>;
|
|
5915
5915
|
/**
|
|
5916
|
-
*
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5916
|
+
* enforce direct children of category or components
|
|
5917
|
+
*/
|
|
5918
|
+
children: z.ZodArray<z.ZodType<"instance" | "rich-text" | (string & {}), z.ZodTypeDef, "instance" | "rich-text" | (string & {})>, "many">;
|
|
5919
|
+
/**
|
|
5920
|
+
* enforce descendants of category or components
|
|
5920
5921
|
*/
|
|
5921
|
-
|
|
5922
|
+
descendants: z.ZodOptional<z.ZodArray<z.ZodType<"instance" | "rich-text" | (string & {}), z.ZodTypeDef, "instance" | "rich-text" | (string & {})>, "many">>;
|
|
5922
5923
|
}, "strip", z.ZodTypeAny, {
|
|
5923
|
-
children: ("instance" | "transparent" | "rich-text" | (string & {}))[];
|
|
5924
5924
|
category: "none" | "instance";
|
|
5925
|
+
children: ("instance" | "rich-text" | (string & {}))[];
|
|
5926
|
+
descendants?: ("instance" | "rich-text" | (string & {}))[] | undefined;
|
|
5925
5927
|
}, {
|
|
5926
|
-
children: ("instance" | "transparent" | "rich-text" | (string & {}))[];
|
|
5927
5928
|
category: "none" | "instance";
|
|
5929
|
+
children: ("instance" | "rich-text" | (string & {}))[];
|
|
5930
|
+
descendants?: ("instance" | "rich-text" | (string & {}))[] | undefined;
|
|
5928
5931
|
}>;
|
|
5929
5932
|
export type ContentModel = z.infer<typeof ContentModel>;
|
|
5930
5933
|
export declare const WsComponentMeta: z.ZodObject<{
|
|
5931
5934
|
category: z.ZodOptional<z.ZodEnum<["general", "typography", "media", "animations", "data", "forms", "localization", "radix", "xml", "hidden", "internal"]>>;
|
|
5932
|
-
type: z.ZodOptional<z.ZodEnum<["container"]>>;
|
|
5933
5935
|
/**
|
|
5934
5936
|
* a property used as textual placeholder when no content specified while in builder
|
|
5935
5937
|
* also signals to not insert components inside unless dropped explicitly
|
|
5936
5938
|
*/
|
|
5937
5939
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
5938
|
-
constraints: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
5939
|
-
relation: z.ZodUnion<[z.ZodLiteral<"ancestor">, z.ZodLiteral<"parent">, z.ZodLiteral<"self">, z.ZodLiteral<"child">, z.ZodLiteral<"descendant">]>;
|
|
5940
|
-
component: z.ZodOptional<z.ZodObject<{
|
|
5941
|
-
$eq: z.ZodOptional<z.ZodString>;
|
|
5942
|
-
$neq: z.ZodOptional<z.ZodString>;
|
|
5943
|
-
$in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5944
|
-
$nin: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5945
|
-
}, "strip", z.ZodTypeAny, {
|
|
5946
|
-
$eq?: string | undefined;
|
|
5947
|
-
$neq?: string | undefined;
|
|
5948
|
-
$in?: string[] | undefined;
|
|
5949
|
-
$nin?: string[] | undefined;
|
|
5950
|
-
}, {
|
|
5951
|
-
$eq?: string | undefined;
|
|
5952
|
-
$neq?: string | undefined;
|
|
5953
|
-
$in?: string[] | undefined;
|
|
5954
|
-
$nin?: string[] | undefined;
|
|
5955
|
-
}>>;
|
|
5956
|
-
tag: z.ZodOptional<z.ZodObject<{
|
|
5957
|
-
$eq: z.ZodOptional<z.ZodString>;
|
|
5958
|
-
$neq: z.ZodOptional<z.ZodString>;
|
|
5959
|
-
$in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5960
|
-
$nin: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5961
|
-
}, "strip", z.ZodTypeAny, {
|
|
5962
|
-
$eq?: string | undefined;
|
|
5963
|
-
$neq?: string | undefined;
|
|
5964
|
-
$in?: string[] | undefined;
|
|
5965
|
-
$nin?: string[] | undefined;
|
|
5966
|
-
}, {
|
|
5967
|
-
$eq?: string | undefined;
|
|
5968
|
-
$neq?: string | undefined;
|
|
5969
|
-
$in?: string[] | undefined;
|
|
5970
|
-
$nin?: string[] | undefined;
|
|
5971
|
-
}>>;
|
|
5972
|
-
text: z.ZodOptional<z.ZodLiteral<false>>;
|
|
5973
|
-
}, "strip", z.ZodTypeAny, {
|
|
5974
|
-
relation: "ancestor" | "parent" | "self" | "child" | "descendant";
|
|
5975
|
-
tag?: {
|
|
5976
|
-
$eq?: string | undefined;
|
|
5977
|
-
$neq?: string | undefined;
|
|
5978
|
-
$in?: string[] | undefined;
|
|
5979
|
-
$nin?: string[] | undefined;
|
|
5980
|
-
} | undefined;
|
|
5981
|
-
text?: false | undefined;
|
|
5982
|
-
component?: {
|
|
5983
|
-
$eq?: string | undefined;
|
|
5984
|
-
$neq?: string | undefined;
|
|
5985
|
-
$in?: string[] | undefined;
|
|
5986
|
-
$nin?: string[] | undefined;
|
|
5987
|
-
} | undefined;
|
|
5988
|
-
}, {
|
|
5989
|
-
relation: "ancestor" | "parent" | "self" | "child" | "descendant";
|
|
5990
|
-
tag?: {
|
|
5991
|
-
$eq?: string | undefined;
|
|
5992
|
-
$neq?: string | undefined;
|
|
5993
|
-
$in?: string[] | undefined;
|
|
5994
|
-
$nin?: string[] | undefined;
|
|
5995
|
-
} | undefined;
|
|
5996
|
-
text?: false | undefined;
|
|
5997
|
-
component?: {
|
|
5998
|
-
$eq?: string | undefined;
|
|
5999
|
-
$neq?: string | undefined;
|
|
6000
|
-
$in?: string[] | undefined;
|
|
6001
|
-
$nin?: string[] | undefined;
|
|
6002
|
-
} | undefined;
|
|
6003
|
-
}>, z.ZodArray<z.ZodObject<{
|
|
6004
|
-
relation: z.ZodUnion<[z.ZodLiteral<"ancestor">, z.ZodLiteral<"parent">, z.ZodLiteral<"self">, z.ZodLiteral<"child">, z.ZodLiteral<"descendant">]>;
|
|
6005
|
-
component: z.ZodOptional<z.ZodObject<{
|
|
6006
|
-
$eq: z.ZodOptional<z.ZodString>;
|
|
6007
|
-
$neq: z.ZodOptional<z.ZodString>;
|
|
6008
|
-
$in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6009
|
-
$nin: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6010
|
-
}, "strip", z.ZodTypeAny, {
|
|
6011
|
-
$eq?: string | undefined;
|
|
6012
|
-
$neq?: string | undefined;
|
|
6013
|
-
$in?: string[] | undefined;
|
|
6014
|
-
$nin?: string[] | undefined;
|
|
6015
|
-
}, {
|
|
6016
|
-
$eq?: string | undefined;
|
|
6017
|
-
$neq?: string | undefined;
|
|
6018
|
-
$in?: string[] | undefined;
|
|
6019
|
-
$nin?: string[] | undefined;
|
|
6020
|
-
}>>;
|
|
6021
|
-
tag: z.ZodOptional<z.ZodObject<{
|
|
6022
|
-
$eq: z.ZodOptional<z.ZodString>;
|
|
6023
|
-
$neq: z.ZodOptional<z.ZodString>;
|
|
6024
|
-
$in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6025
|
-
$nin: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6026
|
-
}, "strip", z.ZodTypeAny, {
|
|
6027
|
-
$eq?: string | undefined;
|
|
6028
|
-
$neq?: string | undefined;
|
|
6029
|
-
$in?: string[] | undefined;
|
|
6030
|
-
$nin?: string[] | undefined;
|
|
6031
|
-
}, {
|
|
6032
|
-
$eq?: string | undefined;
|
|
6033
|
-
$neq?: string | undefined;
|
|
6034
|
-
$in?: string[] | undefined;
|
|
6035
|
-
$nin?: string[] | undefined;
|
|
6036
|
-
}>>;
|
|
6037
|
-
text: z.ZodOptional<z.ZodLiteral<false>>;
|
|
6038
|
-
}, "strip", z.ZodTypeAny, {
|
|
6039
|
-
relation: "ancestor" | "parent" | "self" | "child" | "descendant";
|
|
6040
|
-
tag?: {
|
|
6041
|
-
$eq?: string | undefined;
|
|
6042
|
-
$neq?: string | undefined;
|
|
6043
|
-
$in?: string[] | undefined;
|
|
6044
|
-
$nin?: string[] | undefined;
|
|
6045
|
-
} | undefined;
|
|
6046
|
-
text?: false | undefined;
|
|
6047
|
-
component?: {
|
|
6048
|
-
$eq?: string | undefined;
|
|
6049
|
-
$neq?: string | undefined;
|
|
6050
|
-
$in?: string[] | undefined;
|
|
6051
|
-
$nin?: string[] | undefined;
|
|
6052
|
-
} | undefined;
|
|
6053
|
-
}, {
|
|
6054
|
-
relation: "ancestor" | "parent" | "self" | "child" | "descendant";
|
|
6055
|
-
tag?: {
|
|
6056
|
-
$eq?: string | undefined;
|
|
6057
|
-
$neq?: string | undefined;
|
|
6058
|
-
$in?: string[] | undefined;
|
|
6059
|
-
$nin?: string[] | undefined;
|
|
6060
|
-
} | undefined;
|
|
6061
|
-
text?: false | undefined;
|
|
6062
|
-
component?: {
|
|
6063
|
-
$eq?: string | undefined;
|
|
6064
|
-
$neq?: string | undefined;
|
|
6065
|
-
$in?: string[] | undefined;
|
|
6066
|
-
$nin?: string[] | undefined;
|
|
6067
|
-
} | undefined;
|
|
6068
|
-
}>, "many">]>>;
|
|
6069
5940
|
contentModel: z.ZodOptional<z.ZodObject<{
|
|
6070
5941
|
category: z.ZodUnion<[z.ZodLiteral<"instance">, z.ZodLiteral<"none">]>;
|
|
6071
5942
|
/**
|
|
6072
|
-
*
|
|
6073
|
-
* rich-text - can be edited as rich text
|
|
6074
|
-
* instance - other instances accepted
|
|
6075
|
-
* ComponentName - accept specific components with none category
|
|
5943
|
+
* enforce direct children of category or components
|
|
6076
5944
|
*/
|
|
6077
|
-
children: z.ZodType<
|
|
5945
|
+
children: z.ZodArray<z.ZodType<"instance" | "rich-text" | (string & {}), z.ZodTypeDef, "instance" | "rich-text" | (string & {})>, "many">;
|
|
5946
|
+
/**
|
|
5947
|
+
* enforce descendants of category or components
|
|
5948
|
+
*/
|
|
5949
|
+
descendants: z.ZodOptional<z.ZodArray<z.ZodType<"instance" | "rich-text" | (string & {}), z.ZodTypeDef, "instance" | "rich-text" | (string & {})>, "many">>;
|
|
6078
5950
|
}, "strip", z.ZodTypeAny, {
|
|
6079
|
-
children: ("instance" | "transparent" | "rich-text" | (string & {}))[];
|
|
6080
5951
|
category: "none" | "instance";
|
|
5952
|
+
children: ("instance" | "rich-text" | (string & {}))[];
|
|
5953
|
+
descendants?: ("instance" | "rich-text" | (string & {}))[] | undefined;
|
|
6081
5954
|
}, {
|
|
6082
|
-
children: ("instance" | "transparent" | "rich-text" | (string & {}))[];
|
|
6083
5955
|
category: "none" | "instance";
|
|
5956
|
+
children: ("instance" | "rich-text" | (string & {}))[];
|
|
5957
|
+
descendants?: ("instance" | "rich-text" | (string & {}))[] | undefined;
|
|
6084
5958
|
}>>;
|
|
6085
5959
|
indexWithinAncestor: z.ZodOptional<z.ZodString>;
|
|
6086
5960
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -11159,50 +11033,19 @@ export declare const WsComponentMeta: z.ZodObject<{
|
|
|
11159
11033
|
}, "strip", z.ZodTypeAny, {
|
|
11160
11034
|
icon: string;
|
|
11161
11035
|
order?: number | undefined;
|
|
11162
|
-
type?: "container" | undefined;
|
|
11163
11036
|
label?: string | undefined;
|
|
11164
11037
|
description?: string | undefined;
|
|
11165
|
-
placeholder?: string | undefined;
|
|
11166
11038
|
states?: {
|
|
11167
11039
|
selector: string;
|
|
11168
11040
|
label: string;
|
|
11169
11041
|
category?: "states" | "component-states" | undefined;
|
|
11170
11042
|
}[] | undefined;
|
|
11171
11043
|
category?: "hidden" | "data" | "media" | "general" | "typography" | "animations" | "forms" | "localization" | "radix" | "xml" | "internal" | undefined;
|
|
11172
|
-
|
|
11173
|
-
relation: "ancestor" | "parent" | "self" | "child" | "descendant";
|
|
11174
|
-
tag?: {
|
|
11175
|
-
$eq?: string | undefined;
|
|
11176
|
-
$neq?: string | undefined;
|
|
11177
|
-
$in?: string[] | undefined;
|
|
11178
|
-
$nin?: string[] | undefined;
|
|
11179
|
-
} | undefined;
|
|
11180
|
-
text?: false | undefined;
|
|
11181
|
-
component?: {
|
|
11182
|
-
$eq?: string | undefined;
|
|
11183
|
-
$neq?: string | undefined;
|
|
11184
|
-
$in?: string[] | undefined;
|
|
11185
|
-
$nin?: string[] | undefined;
|
|
11186
|
-
} | undefined;
|
|
11187
|
-
} | {
|
|
11188
|
-
relation: "ancestor" | "parent" | "self" | "child" | "descendant";
|
|
11189
|
-
tag?: {
|
|
11190
|
-
$eq?: string | undefined;
|
|
11191
|
-
$neq?: string | undefined;
|
|
11192
|
-
$in?: string[] | undefined;
|
|
11193
|
-
$nin?: string[] | undefined;
|
|
11194
|
-
} | undefined;
|
|
11195
|
-
text?: false | undefined;
|
|
11196
|
-
component?: {
|
|
11197
|
-
$eq?: string | undefined;
|
|
11198
|
-
$neq?: string | undefined;
|
|
11199
|
-
$in?: string[] | undefined;
|
|
11200
|
-
$nin?: string[] | undefined;
|
|
11201
|
-
} | undefined;
|
|
11202
|
-
}[] | undefined;
|
|
11044
|
+
placeholder?: string | undefined;
|
|
11203
11045
|
contentModel?: {
|
|
11204
|
-
children: ("instance" | "transparent" | "rich-text" | (string & {}))[];
|
|
11205
11046
|
category: "none" | "instance";
|
|
11047
|
+
children: ("instance" | "rich-text" | (string & {}))[];
|
|
11048
|
+
descendants?: ("instance" | "rich-text" | (string & {}))[] | undefined;
|
|
11206
11049
|
} | undefined;
|
|
11207
11050
|
indexWithinAncestor?: string | undefined;
|
|
11208
11051
|
presetStyle?: Record<string, {
|
|
@@ -11814,50 +11657,19 @@ export declare const WsComponentMeta: z.ZodObject<{
|
|
|
11814
11657
|
}, {
|
|
11815
11658
|
icon: string;
|
|
11816
11659
|
order?: number | undefined;
|
|
11817
|
-
type?: "container" | undefined;
|
|
11818
11660
|
label?: string | undefined;
|
|
11819
11661
|
description?: string | undefined;
|
|
11820
|
-
placeholder?: string | undefined;
|
|
11821
11662
|
states?: {
|
|
11822
11663
|
selector: string;
|
|
11823
11664
|
label: string;
|
|
11824
11665
|
category?: "states" | "component-states" | undefined;
|
|
11825
11666
|
}[] | undefined;
|
|
11826
11667
|
category?: "hidden" | "data" | "media" | "general" | "typography" | "animations" | "forms" | "localization" | "radix" | "xml" | "internal" | undefined;
|
|
11827
|
-
|
|
11828
|
-
relation: "ancestor" | "parent" | "self" | "child" | "descendant";
|
|
11829
|
-
tag?: {
|
|
11830
|
-
$eq?: string | undefined;
|
|
11831
|
-
$neq?: string | undefined;
|
|
11832
|
-
$in?: string[] | undefined;
|
|
11833
|
-
$nin?: string[] | undefined;
|
|
11834
|
-
} | undefined;
|
|
11835
|
-
text?: false | undefined;
|
|
11836
|
-
component?: {
|
|
11837
|
-
$eq?: string | undefined;
|
|
11838
|
-
$neq?: string | undefined;
|
|
11839
|
-
$in?: string[] | undefined;
|
|
11840
|
-
$nin?: string[] | undefined;
|
|
11841
|
-
} | undefined;
|
|
11842
|
-
} | {
|
|
11843
|
-
relation: "ancestor" | "parent" | "self" | "child" | "descendant";
|
|
11844
|
-
tag?: {
|
|
11845
|
-
$eq?: string | undefined;
|
|
11846
|
-
$neq?: string | undefined;
|
|
11847
|
-
$in?: string[] | undefined;
|
|
11848
|
-
$nin?: string[] | undefined;
|
|
11849
|
-
} | undefined;
|
|
11850
|
-
text?: false | undefined;
|
|
11851
|
-
component?: {
|
|
11852
|
-
$eq?: string | undefined;
|
|
11853
|
-
$neq?: string | undefined;
|
|
11854
|
-
$in?: string[] | undefined;
|
|
11855
|
-
$nin?: string[] | undefined;
|
|
11856
|
-
} | undefined;
|
|
11857
|
-
}[] | undefined;
|
|
11668
|
+
placeholder?: string | undefined;
|
|
11858
11669
|
contentModel?: {
|
|
11859
|
-
children: ("instance" | "transparent" | "rich-text" | (string & {}))[];
|
|
11860
11670
|
category: "none" | "instance";
|
|
11671
|
+
children: ("instance" | "rich-text" | (string & {}))[];
|
|
11672
|
+
descendants?: ("instance" | "rich-text" | (string & {}))[] | undefined;
|
|
11861
11673
|
} | undefined;
|
|
11862
11674
|
indexWithinAncestor?: string | undefined;
|
|
11863
11675
|
presetStyle?: Record<string, {
|