@webstudio-is/sdk 0.220.0 → 0.222.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.
|
@@ -92,29 +92,21 @@ var body = [
|
|
|
92
92
|
{
|
|
93
93
|
property: "border-left-width",
|
|
94
94
|
value: { type: "unit", unit: "px", value: 1 }
|
|
95
|
-
}
|
|
96
|
-
];
|
|
97
|
-
var hr = [
|
|
98
|
-
{ property: "height", value: { type: "unit", unit: "number", value: 0 } },
|
|
99
|
-
{ property: "color", value: { type: "keyword", value: "inherit" } },
|
|
100
|
-
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } },
|
|
101
|
-
{
|
|
102
|
-
property: "border-top-width",
|
|
103
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
property: "border-right-width",
|
|
107
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
108
95
|
},
|
|
109
96
|
{
|
|
110
|
-
property: "
|
|
111
|
-
value: { type: "
|
|
97
|
+
property: "-webkit-font-smoothing",
|
|
98
|
+
value: { type: "keyword", value: "antialiased" }
|
|
112
99
|
},
|
|
113
100
|
{
|
|
114
|
-
property: "
|
|
115
|
-
value: { type: "
|
|
101
|
+
property: "-moz-osx-font-smoothing",
|
|
102
|
+
value: { type: "keyword", value: "grayscale" }
|
|
116
103
|
}
|
|
117
104
|
];
|
|
105
|
+
var hr = [
|
|
106
|
+
{ property: "height", value: { type: "unit", unit: "number", value: 0 } },
|
|
107
|
+
{ property: "color", value: { type: "keyword", value: "inherit" } },
|
|
108
|
+
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } }
|
|
109
|
+
];
|
|
118
110
|
var b = [
|
|
119
111
|
{
|
|
120
112
|
property: "font-weight",
|
package/lib/core-templates.js
CHANGED
|
@@ -10,8 +10,14 @@ import {
|
|
|
10
10
|
css,
|
|
11
11
|
expression,
|
|
12
12
|
Parameter,
|
|
13
|
+
PlaceholderValue,
|
|
13
14
|
ws
|
|
14
15
|
} from "@webstudio-is/template";
|
|
16
|
+
import {
|
|
17
|
+
CheckboxCheckedIcon,
|
|
18
|
+
RadioCheckedIcon,
|
|
19
|
+
Webstudio1cIcon
|
|
20
|
+
} from "@webstudio-is/icons/svg";
|
|
15
21
|
|
|
16
22
|
// src/core-metas.ts
|
|
17
23
|
import {
|
|
@@ -169,29 +175,21 @@ var body = [
|
|
|
169
175
|
{
|
|
170
176
|
property: "border-left-width",
|
|
171
177
|
value: { type: "unit", unit: "px", value: 1 }
|
|
172
|
-
}
|
|
173
|
-
];
|
|
174
|
-
var hr = [
|
|
175
|
-
{ property: "height", value: { type: "unit", unit: "number", value: 0 } },
|
|
176
|
-
{ property: "color", value: { type: "keyword", value: "inherit" } },
|
|
177
|
-
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } },
|
|
178
|
-
{
|
|
179
|
-
property: "border-top-width",
|
|
180
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
property: "border-right-width",
|
|
184
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
185
178
|
},
|
|
186
179
|
{
|
|
187
|
-
property: "
|
|
188
|
-
value: { type: "
|
|
180
|
+
property: "-webkit-font-smoothing",
|
|
181
|
+
value: { type: "keyword", value: "antialiased" }
|
|
189
182
|
},
|
|
190
183
|
{
|
|
191
|
-
property: "
|
|
192
|
-
value: { type: "
|
|
184
|
+
property: "-moz-osx-font-smoothing",
|
|
185
|
+
value: { type: "keyword", value: "grayscale" }
|
|
193
186
|
}
|
|
194
187
|
];
|
|
188
|
+
var hr = [
|
|
189
|
+
{ property: "height", value: { type: "unit", unit: "number", value: 0 } },
|
|
190
|
+
{ property: "color", value: { type: "keyword", value: "inherit" } },
|
|
191
|
+
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } }
|
|
192
|
+
];
|
|
195
193
|
var b = [
|
|
196
194
|
{
|
|
197
195
|
property: "font-weight",
|
|
@@ -844,10 +842,24 @@ var coreMetas = {
|
|
|
844
842
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
845
843
|
var elementMeta2 = {
|
|
846
844
|
category: "general",
|
|
847
|
-
order:
|
|
845
|
+
order: 1,
|
|
848
846
|
description: "An HTML element is a core building block for web pages, structuring and displaying content like text, images, and links.",
|
|
849
847
|
template: /* @__PURE__ */ jsx(ws.element, {})
|
|
850
848
|
};
|
|
849
|
+
var linkMeta = {
|
|
850
|
+
category: "general",
|
|
851
|
+
description: "Use a link to send your users to another page, section, or resource. Configure links in the Settings panel.",
|
|
852
|
+
order: 2,
|
|
853
|
+
template: /* @__PURE__ */ jsx(
|
|
854
|
+
ws.element,
|
|
855
|
+
{
|
|
856
|
+
"ws:tag": "a",
|
|
857
|
+
"ws:style": css`
|
|
858
|
+
display: inline-block;
|
|
859
|
+
`
|
|
860
|
+
}
|
|
861
|
+
)
|
|
862
|
+
};
|
|
851
863
|
var collectionItem = new Parameter("collectionItem");
|
|
852
864
|
var collectionMeta2 = {
|
|
853
865
|
category: "data",
|
|
@@ -857,7 +869,7 @@ var collectionMeta2 = {
|
|
|
857
869
|
{
|
|
858
870
|
data: ["Collection Item 1", "Collection Item 2", "Collection Item 3"],
|
|
859
871
|
item: collectionItem,
|
|
860
|
-
children: /* @__PURE__ */ jsx(
|
|
872
|
+
children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "div", children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "div", children: expression`${collectionItem}` }) })
|
|
861
873
|
}
|
|
862
874
|
)
|
|
863
875
|
};
|
|
@@ -867,19 +879,19 @@ var descendantMeta2 = {
|
|
|
867
879
|
};
|
|
868
880
|
var BlockTemplate = ws["block-template"];
|
|
869
881
|
var blockMeta2 = {
|
|
870
|
-
category: "
|
|
882
|
+
category: "general",
|
|
871
883
|
template: /* @__PURE__ */ jsxs(ws.block, { children: [
|
|
872
884
|
/* @__PURE__ */ jsxs(BlockTemplate, { "ws:label": "Templates", children: [
|
|
873
|
-
/* @__PURE__ */ jsx(
|
|
874
|
-
/* @__PURE__ */ jsx(
|
|
875
|
-
/* @__PURE__ */ jsx(
|
|
876
|
-
/* @__PURE__ */ jsx(
|
|
877
|
-
/* @__PURE__ */ jsx(
|
|
878
|
-
/* @__PURE__ */ jsx(
|
|
879
|
-
/* @__PURE__ */ jsx(
|
|
880
|
-
/* @__PURE__ */ jsx(
|
|
881
|
-
/* @__PURE__ */ jsx(
|
|
882
|
-
/* @__PURE__ */ jsx(
|
|
885
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "p" }),
|
|
886
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 1", "ws:tag": "h1" }),
|
|
887
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 2", "ws:tag": "h2" }),
|
|
888
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 3", "ws:tag": "h3" }),
|
|
889
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 4", "ws:tag": "h4" }),
|
|
890
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 5", "ws:tag": "h5" }),
|
|
891
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 6", "ws:tag": "h6" }),
|
|
892
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "ul", children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" }) }),
|
|
893
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "ol", children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" }) }),
|
|
894
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "a" }),
|
|
883
895
|
/* @__PURE__ */ jsx(
|
|
884
896
|
$.Image,
|
|
885
897
|
{
|
|
@@ -891,29 +903,306 @@ var blockMeta2 = {
|
|
|
891
903
|
`
|
|
892
904
|
}
|
|
893
905
|
),
|
|
894
|
-
/* @__PURE__ */ jsx(
|
|
895
|
-
/* @__PURE__ */ jsx(
|
|
906
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "hr" }),
|
|
907
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "blockquote" }),
|
|
896
908
|
/* @__PURE__ */ jsx($.HtmlEmbed, {}),
|
|
897
|
-
/* @__PURE__ */ jsx(
|
|
909
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "code" })
|
|
898
910
|
] }),
|
|
899
|
-
/* @__PURE__ */ jsxs(
|
|
911
|
+
/* @__PURE__ */ jsxs(ws.element, { "ws:tag": "p", children: [
|
|
900
912
|
"The Content Block component designates regions on the page where pre-styled instances can be inserted in",
|
|
901
913
|
" ",
|
|
902
|
-
/* @__PURE__ */ jsx(
|
|
914
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "a", href: "https://wstd.us/content-block", children: "Content mode" }),
|
|
903
915
|
"."
|
|
904
916
|
] }),
|
|
905
|
-
/* @__PURE__ */ jsxs(
|
|
906
|
-
/* @__PURE__ */ jsx(
|
|
907
|
-
/* @__PURE__ */ jsx(
|
|
908
|
-
/* @__PURE__ */ jsx(
|
|
917
|
+
/* @__PURE__ */ jsxs(ws.element, { "ws:tag": "ul", children: [
|
|
918
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "li", children: "In Content mode, you can edit any direct child instances that were pre-added to the Content Block, as well as add new instances predefined in Templates." }),
|
|
919
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "li", children: "To predefine instances for insertion in Content mode, switch to Design mode and add them to the Templates container." }),
|
|
920
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "li", children: "To insert predefined instances in Content mode, click the + button while hovering over the Content Block on the canvas and choose an instance from the list." })
|
|
909
921
|
] })
|
|
910
922
|
] })
|
|
911
923
|
};
|
|
924
|
+
var typography = {
|
|
925
|
+
heading: {
|
|
926
|
+
category: "typography",
|
|
927
|
+
description: "Use HTML headings to structure and organize content. Use the Tag property in settings to change the heading level (h1-h6).",
|
|
928
|
+
template: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "h1" })
|
|
929
|
+
},
|
|
930
|
+
paragraph: {
|
|
931
|
+
category: "typography",
|
|
932
|
+
description: "A container for multi-line text.",
|
|
933
|
+
template: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "p" })
|
|
934
|
+
},
|
|
935
|
+
blockquote: {
|
|
936
|
+
category: "typography",
|
|
937
|
+
description: "Use to style a quote from an external source like an article or book.",
|
|
938
|
+
template: /* @__PURE__ */ jsx(
|
|
939
|
+
ws.element,
|
|
940
|
+
{
|
|
941
|
+
"ws:tag": "blockquote",
|
|
942
|
+
"ws:style": css`
|
|
943
|
+
margin-left: 0;
|
|
944
|
+
margin-right: 0;
|
|
945
|
+
padding: 10px 20px;
|
|
946
|
+
border-left: 5px solid rgb(226 226 226 / 1);
|
|
947
|
+
`
|
|
948
|
+
}
|
|
949
|
+
)
|
|
950
|
+
},
|
|
951
|
+
list: {
|
|
952
|
+
category: "typography",
|
|
953
|
+
description: "Groups content, like links in a menu or steps in a recipe.",
|
|
954
|
+
template: /* @__PURE__ */ jsxs(ws.element, { "ws:tag": "ul", children: [
|
|
955
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" }),
|
|
956
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" }),
|
|
957
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" })
|
|
958
|
+
] })
|
|
959
|
+
},
|
|
960
|
+
list_item: {
|
|
961
|
+
category: "typography",
|
|
962
|
+
description: "Adds a new item to an existing list.",
|
|
963
|
+
template: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" })
|
|
964
|
+
},
|
|
965
|
+
code_text: {
|
|
966
|
+
category: "typography",
|
|
967
|
+
template: /* @__PURE__ */ jsx(
|
|
968
|
+
ws.element,
|
|
969
|
+
{
|
|
970
|
+
"ws:tag": "code",
|
|
971
|
+
"ws:style": css`
|
|
972
|
+
display: block;
|
|
973
|
+
white-space-collapse: preserve;
|
|
974
|
+
text-wrap-mode: wrap;
|
|
975
|
+
padding-left: 0.2em;
|
|
976
|
+
padding-right: 0.2em;
|
|
977
|
+
background-color: rgb(238 238 238);
|
|
978
|
+
`
|
|
979
|
+
}
|
|
980
|
+
)
|
|
981
|
+
},
|
|
982
|
+
thematic_break: {
|
|
983
|
+
category: "typography",
|
|
984
|
+
description: "Used to visually divide sections of content, helping to improve readability and organization within a webpage.",
|
|
985
|
+
template: /* @__PURE__ */ jsx(
|
|
986
|
+
ws.element,
|
|
987
|
+
{
|
|
988
|
+
"ws:tag": "hr",
|
|
989
|
+
"ws:style": css`
|
|
990
|
+
color: gray;
|
|
991
|
+
border-style: none none solid;
|
|
992
|
+
`
|
|
993
|
+
}
|
|
994
|
+
)
|
|
995
|
+
}
|
|
996
|
+
};
|
|
997
|
+
var forms = {
|
|
998
|
+
form: {
|
|
999
|
+
category: "forms",
|
|
1000
|
+
description: "Create filters, surveys, searches and more.",
|
|
1001
|
+
template: /* @__PURE__ */ jsxs(ws.element, { "ws:tag": "form", children: [
|
|
1002
|
+
/* @__PURE__ */ jsx(
|
|
1003
|
+
ws.element,
|
|
1004
|
+
{
|
|
1005
|
+
"ws:tag": "input",
|
|
1006
|
+
"ws:style": css`
|
|
1007
|
+
display: block;
|
|
1008
|
+
`
|
|
1009
|
+
}
|
|
1010
|
+
),
|
|
1011
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "button", children: new PlaceholderValue("Submit") })
|
|
1012
|
+
] })
|
|
1013
|
+
},
|
|
1014
|
+
button: {
|
|
1015
|
+
category: "forms",
|
|
1016
|
+
description: "Use a button to submit forms or trigger actions within a page. Do not use a button to navigate users to another resource or another page - that\u2019s what a link is used for.",
|
|
1017
|
+
template: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "button", children: new PlaceholderValue("Button") })
|
|
1018
|
+
},
|
|
1019
|
+
input_label: {
|
|
1020
|
+
category: "forms",
|
|
1021
|
+
template: /* @__PURE__ */ jsx(
|
|
1022
|
+
ws.element,
|
|
1023
|
+
{
|
|
1024
|
+
"ws:tag": "label",
|
|
1025
|
+
"ws:style": css`
|
|
1026
|
+
display: block;
|
|
1027
|
+
`,
|
|
1028
|
+
children: new PlaceholderValue("Label")
|
|
1029
|
+
}
|
|
1030
|
+
)
|
|
1031
|
+
},
|
|
1032
|
+
text_input: {
|
|
1033
|
+
category: "forms",
|
|
1034
|
+
description: "A single-line text input for collecting string data from your users.",
|
|
1035
|
+
template: /* @__PURE__ */ jsx(
|
|
1036
|
+
ws.element,
|
|
1037
|
+
{
|
|
1038
|
+
"ws:tag": "input",
|
|
1039
|
+
"ws:style": css`
|
|
1040
|
+
display: block;
|
|
1041
|
+
`
|
|
1042
|
+
}
|
|
1043
|
+
)
|
|
1044
|
+
},
|
|
1045
|
+
text_area: {
|
|
1046
|
+
category: "forms",
|
|
1047
|
+
description: "A multi-line text input for collecting longer string data from your users.",
|
|
1048
|
+
template: /* @__PURE__ */ jsx(
|
|
1049
|
+
ws.element,
|
|
1050
|
+
{
|
|
1051
|
+
"ws:tag": "textarea",
|
|
1052
|
+
"ws:style": css`
|
|
1053
|
+
display: block;
|
|
1054
|
+
`
|
|
1055
|
+
}
|
|
1056
|
+
)
|
|
1057
|
+
},
|
|
1058
|
+
select: {
|
|
1059
|
+
category: "forms",
|
|
1060
|
+
description: "A drop-down menu for users to select a single option from a predefined list.",
|
|
1061
|
+
template: /* @__PURE__ */ jsxs(
|
|
1062
|
+
ws.element,
|
|
1063
|
+
{
|
|
1064
|
+
"ws:tag": "select",
|
|
1065
|
+
"ws:style": css`
|
|
1066
|
+
display: block;
|
|
1067
|
+
`,
|
|
1068
|
+
children: [
|
|
1069
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "option", label: "Please choose an option", value: "" }),
|
|
1070
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "option", label: "Option A", value: "a" }),
|
|
1071
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "option", label: "Option B", value: "b" }),
|
|
1072
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "option", label: "Option C", value: "c" })
|
|
1073
|
+
]
|
|
1074
|
+
}
|
|
1075
|
+
)
|
|
1076
|
+
},
|
|
1077
|
+
radio: {
|
|
1078
|
+
category: "forms",
|
|
1079
|
+
description: "Use within a form to allow your users to select a single option from a set of mutually exclusive choices. Group multiple radios by matching their \u201CName\u201D properties.",
|
|
1080
|
+
icon: RadioCheckedIcon,
|
|
1081
|
+
template: /* @__PURE__ */ jsxs(
|
|
1082
|
+
ws.element,
|
|
1083
|
+
{
|
|
1084
|
+
"ws:tag": "label",
|
|
1085
|
+
"ws:label": "Radio Field",
|
|
1086
|
+
"ws:style": css`
|
|
1087
|
+
display: block;
|
|
1088
|
+
`,
|
|
1089
|
+
children: [
|
|
1090
|
+
/* @__PURE__ */ jsx(
|
|
1091
|
+
ws.element,
|
|
1092
|
+
{
|
|
1093
|
+
"ws:tag": "input",
|
|
1094
|
+
"ws:style": css`
|
|
1095
|
+
border-style: none;
|
|
1096
|
+
margin-right: 0.5em;
|
|
1097
|
+
`,
|
|
1098
|
+
type: "radio"
|
|
1099
|
+
}
|
|
1100
|
+
),
|
|
1101
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "span", "ws:label": "Radio Label", children: new PlaceholderValue("Radio") })
|
|
1102
|
+
]
|
|
1103
|
+
}
|
|
1104
|
+
)
|
|
1105
|
+
},
|
|
1106
|
+
checkbox: {
|
|
1107
|
+
category: "forms",
|
|
1108
|
+
description: "Use within a form to allow your users to toggle between checked and not checked. Group checkboxes by matching their \u201CName\u201D properties. Unlike radios, any number of checkboxes in a group can be checked.",
|
|
1109
|
+
icon: CheckboxCheckedIcon,
|
|
1110
|
+
template: /* @__PURE__ */ jsxs(
|
|
1111
|
+
ws.element,
|
|
1112
|
+
{
|
|
1113
|
+
"ws:tag": "label",
|
|
1114
|
+
"ws:label": "Checkbox Field",
|
|
1115
|
+
"ws:style": css`
|
|
1116
|
+
display: block;
|
|
1117
|
+
`,
|
|
1118
|
+
children: [
|
|
1119
|
+
/* @__PURE__ */ jsx(
|
|
1120
|
+
ws.element,
|
|
1121
|
+
{
|
|
1122
|
+
"ws:tag": "input",
|
|
1123
|
+
"ws:style": css`
|
|
1124
|
+
border-style: none;
|
|
1125
|
+
margin-right: 0.5em;
|
|
1126
|
+
`,
|
|
1127
|
+
type: "checkbox"
|
|
1128
|
+
}
|
|
1129
|
+
),
|
|
1130
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "span", "ws:label": "Checkbox Label", children: new PlaceholderValue("Checkbox") })
|
|
1131
|
+
]
|
|
1132
|
+
}
|
|
1133
|
+
)
|
|
1134
|
+
}
|
|
1135
|
+
};
|
|
1136
|
+
var builtWithWebstudioMeta = {
|
|
1137
|
+
category: "other",
|
|
1138
|
+
description: "A \u201CBuilt with Webstudio\u201D badge should be added to every project page on the free plan. This helps Webstudio spread awareness as a platform.",
|
|
1139
|
+
icon: Webstudio1cIcon,
|
|
1140
|
+
template: /* @__PURE__ */ jsxs(
|
|
1141
|
+
ws.element,
|
|
1142
|
+
{
|
|
1143
|
+
"ws:tag": "a",
|
|
1144
|
+
"ws:label": "Built with Webstudio",
|
|
1145
|
+
href: "https://webstudio.is/?via=badge",
|
|
1146
|
+
target: "_blank",
|
|
1147
|
+
"ws:style": css`
|
|
1148
|
+
display: inline-flex;
|
|
1149
|
+
gap: 6px;
|
|
1150
|
+
align-items: center;
|
|
1151
|
+
justify-content: center;
|
|
1152
|
+
position: fixed;
|
|
1153
|
+
z-index: 1000;
|
|
1154
|
+
padding: 6px 10px;
|
|
1155
|
+
right: 16px;
|
|
1156
|
+
bottom: 16px;
|
|
1157
|
+
color: rgba(251, 252, 253, 1);
|
|
1158
|
+
font-family: system-ui, sans-serif;
|
|
1159
|
+
font-size: 12px;
|
|
1160
|
+
font-weight: 500;
|
|
1161
|
+
line-height: 1;
|
|
1162
|
+
border: 1px solid transparent;
|
|
1163
|
+
border-radius: 9px;
|
|
1164
|
+
text-decoration-line: none;
|
|
1165
|
+
text-wrap-mode: nowrap;
|
|
1166
|
+
background-clip: padding-box, border-box;
|
|
1167
|
+
background-origin: padding-box, border-box;
|
|
1168
|
+
background-image:
|
|
1169
|
+
linear-gradient(135deg, #4a4efa 0%, #bd2fdb 66%, #ec59ce 100%),
|
|
1170
|
+
linear-gradient(
|
|
1171
|
+
135deg,
|
|
1172
|
+
#92fddc 0%,
|
|
1173
|
+
#7d7ffb 31.94%,
|
|
1174
|
+
#ed72fe 64.24%,
|
|
1175
|
+
#fdd791 100%
|
|
1176
|
+
);
|
|
1177
|
+
`,
|
|
1178
|
+
children: [
|
|
1179
|
+
/* @__PURE__ */ jsx(
|
|
1180
|
+
$.HtmlEmbed,
|
|
1181
|
+
{
|
|
1182
|
+
"ws:label": "Logo",
|
|
1183
|
+
code: Webstudio1cIcon,
|
|
1184
|
+
"ws:style": css`
|
|
1185
|
+
display: block;
|
|
1186
|
+
width: 16px;
|
|
1187
|
+
height: 16px;
|
|
1188
|
+
flex-shrink: 0;
|
|
1189
|
+
`
|
|
1190
|
+
}
|
|
1191
|
+
),
|
|
1192
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "div", "ws:label": "Text", children: "Built with Webstudio" })
|
|
1193
|
+
]
|
|
1194
|
+
}
|
|
1195
|
+
)
|
|
1196
|
+
};
|
|
912
1197
|
var coreTemplates = {
|
|
913
1198
|
[elementComponent]: elementMeta2,
|
|
1199
|
+
link: linkMeta,
|
|
914
1200
|
[collectionComponent]: collectionMeta2,
|
|
915
1201
|
[descendantComponent]: descendantMeta2,
|
|
916
|
-
[blockComponent]: blockMeta2
|
|
1202
|
+
[blockComponent]: blockMeta2,
|
|
1203
|
+
...typography,
|
|
1204
|
+
...forms,
|
|
1205
|
+
builtWithWebstudio: builtWithWebstudioMeta
|
|
917
1206
|
};
|
|
918
1207
|
export {
|
|
919
1208
|
coreTemplates
|
package/lib/index.js
CHANGED
|
@@ -107,13 +107,23 @@ var DefaultPagePage = z2.string().refine((path) => path !== "", "Can't be empty"
|
|
|
107
107
|
(path) => path !== "/build" && path.startsWith("/build/") === false,
|
|
108
108
|
"/build prefix is reserved for the system"
|
|
109
109
|
);
|
|
110
|
-
var
|
|
110
|
+
var OldPagePath = z2.string().refine((path) => path !== "", "Can't be empty").refine((path) => path !== "/", "Can't be just a /").refine(
|
|
111
111
|
(path) => path === "" || path.startsWith("/"),
|
|
112
112
|
"Must start with a / or a full URL e.g. https://website.org"
|
|
113
|
+
).refine((path) => path.endsWith("/") === false, "Can't end with a /").refine((path) => path.includes("//") === false, "Can't contain repeating /").refine(
|
|
114
|
+
(path) => /^[-_a-zA-Z0-9*:?\\/.]*$/.test(path),
|
|
115
|
+
// Allow uppercase letters (A-Z)
|
|
116
|
+
"Only a-z, A-Z, 0-9, -, _, /, :, ?, . and * are allowed"
|
|
117
|
+
).refine(
|
|
118
|
+
(path) => path !== "/s" && path.startsWith("/s/") === false,
|
|
119
|
+
"/s prefix is reserved for the system"
|
|
120
|
+
).refine(
|
|
121
|
+
(path) => path !== "/build" && path.startsWith("/build/") === false,
|
|
122
|
+
"/build prefix is reserved for the system"
|
|
113
123
|
);
|
|
114
|
-
var
|
|
124
|
+
var PagePath = DefaultPagePage.refine(
|
|
115
125
|
(path) => path === "" || path.startsWith("/"),
|
|
116
|
-
"Must start with a /
|
|
126
|
+
"Must start with a / or a full URL e.g. https://website.org"
|
|
117
127
|
);
|
|
118
128
|
var Page = z2.object({
|
|
119
129
|
...commonPageFields,
|
|
@@ -140,7 +150,7 @@ var ProjectNewRedirectPath = PagePath.or(
|
|
|
140
150
|
}, "Must be a valid URL")
|
|
141
151
|
);
|
|
142
152
|
var PageRedirect = z2.object({
|
|
143
|
-
old:
|
|
153
|
+
old: OldPagePath,
|
|
144
154
|
new: ProjectNewRedirectPath,
|
|
145
155
|
status: z2.enum(["301", "302"]).optional()
|
|
146
156
|
});
|
|
@@ -852,22 +862,14 @@ var componentCategories = [
|
|
|
852
862
|
"localization",
|
|
853
863
|
"radix",
|
|
854
864
|
"xml",
|
|
865
|
+
"other",
|
|
855
866
|
"hidden",
|
|
856
867
|
"internal"
|
|
857
868
|
];
|
|
858
|
-
var stateCategories = ["states", "component-states"];
|
|
859
869
|
var ComponentState = z15.object({
|
|
860
|
-
category: z15.enum(stateCategories).optional(),
|
|
861
870
|
selector: z15.string(),
|
|
862
871
|
label: z15.string()
|
|
863
872
|
});
|
|
864
|
-
var defaultStates = [
|
|
865
|
-
{ selector: ":hover", label: "Hover" },
|
|
866
|
-
{ selector: ":active", label: "Active" },
|
|
867
|
-
{ selector: ":focus", label: "Focus" },
|
|
868
|
-
{ selector: ":focus-visible", label: "Focus Visible" },
|
|
869
|
-
{ selector: ":focus-within", label: "Focus Within" }
|
|
870
|
-
];
|
|
871
873
|
var ComponentContent = z15.string();
|
|
872
874
|
var ContentModel = z15.object({
|
|
873
875
|
/*
|
|
@@ -1059,29 +1061,21 @@ var body = [
|
|
|
1059
1061
|
{
|
|
1060
1062
|
property: "border-left-width",
|
|
1061
1063
|
value: { type: "unit", unit: "px", value: 1 }
|
|
1062
|
-
}
|
|
1063
|
-
];
|
|
1064
|
-
var hr = [
|
|
1065
|
-
{ property: "height", value: { type: "unit", unit: "number", value: 0 } },
|
|
1066
|
-
{ property: "color", value: { type: "keyword", value: "inherit" } },
|
|
1067
|
-
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } },
|
|
1068
|
-
{
|
|
1069
|
-
property: "border-top-width",
|
|
1070
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
1071
|
-
},
|
|
1072
|
-
{
|
|
1073
|
-
property: "border-right-width",
|
|
1074
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
1075
1064
|
},
|
|
1076
1065
|
{
|
|
1077
|
-
property: "
|
|
1078
|
-
value: { type: "
|
|
1066
|
+
property: "-webkit-font-smoothing",
|
|
1067
|
+
value: { type: "keyword", value: "antialiased" }
|
|
1079
1068
|
},
|
|
1080
1069
|
{
|
|
1081
|
-
property: "
|
|
1082
|
-
value: { type: "
|
|
1070
|
+
property: "-moz-osx-font-smoothing",
|
|
1071
|
+
value: { type: "keyword", value: "grayscale" }
|
|
1083
1072
|
}
|
|
1084
1073
|
];
|
|
1074
|
+
var hr = [
|
|
1075
|
+
{ property: "height", value: { type: "unit", unit: "number", value: 0 } },
|
|
1076
|
+
{ property: "color", value: { type: "keyword", value: "inherit" } },
|
|
1077
|
+
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } }
|
|
1078
|
+
];
|
|
1085
1079
|
var b = [
|
|
1086
1080
|
{
|
|
1087
1081
|
property: "font-weight",
|
|
@@ -2827,7 +2821,6 @@ export {
|
|
|
2827
2821
|
createScope,
|
|
2828
2822
|
decodeDataVariableId as decodeDataSourceVariable,
|
|
2829
2823
|
decodeDataVariableId,
|
|
2830
|
-
defaultStates,
|
|
2831
2824
|
descendantComponent,
|
|
2832
2825
|
documentTypes,
|
|
2833
2826
|
durationUnitValueSchema,
|
|
@@ -2865,7 +2858,6 @@ export {
|
|
|
2865
2858
|
replaceFormActionsWithResources,
|
|
2866
2859
|
rootComponent,
|
|
2867
2860
|
scrollAnimationSchema,
|
|
2868
|
-
stateCategories,
|
|
2869
2861
|
systemParameter,
|
|
2870
2862
|
tags,
|
|
2871
2863
|
transpileExpression,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type TemplateMeta } from "@webstudio-is/template";
|
|
2
2
|
export declare const coreTemplates: {
|
|
3
|
+
builtWithWebstudio: TemplateMeta;
|
|
3
4
|
"ws:element": TemplateMeta;
|
|
5
|
+
link: TemplateMeta;
|
|
4
6
|
"ws:collection": TemplateMeta;
|
|
5
7
|
"ws:descendant": TemplateMeta;
|
|
6
8
|
"ws:block": TemplateMeta;
|
|
@@ -5062,23 +5062,18 @@ export type PresetStyleDecl = Simplify<Omit<z.infer<typeof PresetStyleDecl>, "pr
|
|
|
5062
5062
|
property: CssProperty;
|
|
5063
5063
|
}>;
|
|
5064
5064
|
export type PresetStyle<Tag extends HtmlTags = HtmlTags> = Partial<Record<Tag, PresetStyleDecl[]>>;
|
|
5065
|
-
export declare const componentCategories: readonly ["general", "typography", "media", "animations", "data", "forms", "localization", "radix", "xml", "hidden", "internal"];
|
|
5066
|
-
export declare const stateCategories: readonly ["states", "component-states"];
|
|
5065
|
+
export declare const componentCategories: readonly ["general", "typography", "media", "animations", "data", "forms", "localization", "radix", "xml", "other", "hidden", "internal"];
|
|
5067
5066
|
export declare const ComponentState: z.ZodObject<{
|
|
5068
|
-
category: z.ZodOptional<z.ZodEnum<["states", "component-states"]>>;
|
|
5069
5067
|
selector: z.ZodString;
|
|
5070
5068
|
label: z.ZodString;
|
|
5071
5069
|
}, "strip", z.ZodTypeAny, {
|
|
5072
5070
|
selector: string;
|
|
5073
5071
|
label: string;
|
|
5074
|
-
category?: "states" | "component-states" | undefined;
|
|
5075
5072
|
}, {
|
|
5076
5073
|
selector: string;
|
|
5077
5074
|
label: string;
|
|
5078
|
-
category?: "states" | "component-states" | undefined;
|
|
5079
5075
|
}>;
|
|
5080
5076
|
export type ComponentState = z.infer<typeof ComponentState>;
|
|
5081
|
-
export declare const defaultStates: ComponentState[];
|
|
5082
5077
|
export declare const ContentModel: z.ZodObject<{
|
|
5083
5078
|
category: z.ZodUnion<[z.ZodLiteral<"instance">, z.ZodLiteral<"none">]>;
|
|
5084
5079
|
/**
|
|
@@ -5100,7 +5095,7 @@ export declare const ContentModel: z.ZodObject<{
|
|
|
5100
5095
|
}>;
|
|
5101
5096
|
export type ContentModel = z.infer<typeof ContentModel>;
|
|
5102
5097
|
export declare const WsComponentMeta: z.ZodObject<{
|
|
5103
|
-
category: z.ZodOptional<z.ZodEnum<["general", "typography", "media", "animations", "data", "forms", "localization", "radix", "xml", "hidden", "internal"]>>;
|
|
5098
|
+
category: z.ZodOptional<z.ZodEnum<["general", "typography", "media", "animations", "data", "forms", "localization", "radix", "xml", "other", "hidden", "internal"]>>;
|
|
5104
5099
|
contentModel: z.ZodOptional<z.ZodObject<{
|
|
5105
5100
|
category: z.ZodUnion<[z.ZodLiteral<"instance">, z.ZodLiteral<"none">]>;
|
|
5106
5101
|
/**
|
|
@@ -10181,17 +10176,14 @@ export declare const WsComponentMeta: z.ZodObject<{
|
|
|
10181
10176
|
state?: string | undefined;
|
|
10182
10177
|
}>, "many">>>;
|
|
10183
10178
|
states: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10184
|
-
category: z.ZodOptional<z.ZodEnum<["states", "component-states"]>>;
|
|
10185
10179
|
selector: z.ZodString;
|
|
10186
10180
|
label: z.ZodString;
|
|
10187
10181
|
}, "strip", z.ZodTypeAny, {
|
|
10188
10182
|
selector: string;
|
|
10189
10183
|
label: string;
|
|
10190
|
-
category?: "states" | "component-states" | undefined;
|
|
10191
10184
|
}, {
|
|
10192
10185
|
selector: string;
|
|
10193
10186
|
label: string;
|
|
10194
|
-
category?: "states" | "component-states" | undefined;
|
|
10195
10187
|
}>, "many">>;
|
|
10196
10188
|
order: z.ZodOptional<z.ZodNumber>;
|
|
10197
10189
|
initialProps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -10692,12 +10684,7 @@ export declare const WsComponentMeta: z.ZodObject<{
|
|
|
10692
10684
|
order?: number | undefined;
|
|
10693
10685
|
label?: string | undefined;
|
|
10694
10686
|
description?: string | undefined;
|
|
10695
|
-
|
|
10696
|
-
selector: string;
|
|
10697
|
-
label: string;
|
|
10698
|
-
category?: "states" | "component-states" | undefined;
|
|
10699
|
-
}[] | undefined;
|
|
10700
|
-
category?: "hidden" | "data" | "media" | "general" | "typography" | "animations" | "forms" | "localization" | "radix" | "xml" | "internal" | undefined;
|
|
10687
|
+
category?: "hidden" | "data" | "media" | "general" | "typography" | "animations" | "forms" | "localization" | "radix" | "xml" | "other" | "internal" | undefined;
|
|
10701
10688
|
contentModel?: {
|
|
10702
10689
|
category: "none" | "instance";
|
|
10703
10690
|
children: ("instance" | "rich-text" | (string & {}))[];
|
|
@@ -11311,6 +11298,10 @@ export declare const WsComponentMeta: z.ZodObject<{
|
|
|
11311
11298
|
property: string;
|
|
11312
11299
|
state?: string | undefined;
|
|
11313
11300
|
}[]> | undefined;
|
|
11301
|
+
states?: {
|
|
11302
|
+
selector: string;
|
|
11303
|
+
label: string;
|
|
11304
|
+
}[] | undefined;
|
|
11314
11305
|
initialProps?: string[] | undefined;
|
|
11315
11306
|
props?: Record<string, {
|
|
11316
11307
|
options: string[];
|
|
@@ -11481,12 +11472,7 @@ export declare const WsComponentMeta: z.ZodObject<{
|
|
|
11481
11472
|
order?: number | undefined;
|
|
11482
11473
|
label?: string | undefined;
|
|
11483
11474
|
description?: string | undefined;
|
|
11484
|
-
|
|
11485
|
-
selector: string;
|
|
11486
|
-
label: string;
|
|
11487
|
-
category?: "states" | "component-states" | undefined;
|
|
11488
|
-
}[] | undefined;
|
|
11489
|
-
category?: "hidden" | "data" | "media" | "general" | "typography" | "animations" | "forms" | "localization" | "radix" | "xml" | "internal" | undefined;
|
|
11475
|
+
category?: "hidden" | "data" | "media" | "general" | "typography" | "animations" | "forms" | "localization" | "radix" | "xml" | "other" | "internal" | undefined;
|
|
11490
11476
|
contentModel?: {
|
|
11491
11477
|
category: "none" | "instance";
|
|
11492
11478
|
children: ("instance" | "rich-text" | (string & {}))[];
|
|
@@ -12100,6 +12086,10 @@ export declare const WsComponentMeta: z.ZodObject<{
|
|
|
12100
12086
|
property: string;
|
|
12101
12087
|
state?: string | undefined;
|
|
12102
12088
|
}[]> | undefined;
|
|
12089
|
+
states?: {
|
|
12090
|
+
selector: string;
|
|
12091
|
+
label: string;
|
|
12092
|
+
}[] | undefined;
|
|
12103
12093
|
initialProps?: string[] | undefined;
|
|
12104
12094
|
props?: Record<string, {
|
|
12105
12095
|
options: string[];
|
|
@@ -26,8 +26,8 @@ export declare const PageName: z.ZodEffects<z.ZodString, string, string>;
|
|
|
26
26
|
export declare const PageTitle: z.ZodEffects<z.ZodString, string, string>;
|
|
27
27
|
export declare const documentTypes: readonly ["html", "xml"];
|
|
28
28
|
export declare const HomePagePath: z.ZodEffects<z.ZodString, "", string>;
|
|
29
|
-
export declare const PagePath: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>;
|
|
30
29
|
export declare const OldPagePath: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>;
|
|
30
|
+
export declare const PagePath: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>;
|
|
31
31
|
declare const Page: z.ZodObject<{
|
|
32
32
|
path: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>;
|
|
33
33
|
id: z.ZodString;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.222.0",
|
|
4
4
|
"description": "Webstudio project data schema",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -40,16 +40,16 @@
|
|
|
40
40
|
"reserved-identifiers": "^1.0.0",
|
|
41
41
|
"type-fest": "^4.37.0",
|
|
42
42
|
"zod": "^3.24.2",
|
|
43
|
-
"@webstudio-is/
|
|
44
|
-
"@webstudio-is/
|
|
45
|
-
"@webstudio-is/
|
|
43
|
+
"@webstudio-is/css-engine": "0.222.0",
|
|
44
|
+
"@webstudio-is/icons": "0.222.0",
|
|
45
|
+
"@webstudio-is/fonts": "0.222.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"html-tags": "^4.0.0",
|
|
49
49
|
"vitest": "^3.1.2",
|
|
50
50
|
"@webstudio-is/css-data": "0.0.0",
|
|
51
|
-
"@webstudio-is/
|
|
52
|
-
"@webstudio-is/
|
|
51
|
+
"@webstudio-is/template": "0.222.0",
|
|
52
|
+
"@webstudio-is/tsconfig": "1.0.7"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"typecheck": "tsc",
|