@webstudio-is/sdk 0.220.0 → 0.221.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/__generated__/normalize.css.js +8 -17
- package/lib/core-templates.js +328 -40
- package/lib/index.js +9 -28
- package/lib/types/core-templates.d.ts +2 -0
- package/lib/types/schema/component-meta.d.ts +12 -22
- package/package.json +6 -6
|
@@ -92,29 +92,20 @@ 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
95
|
},
|
|
105
96
|
{
|
|
106
|
-
property: "
|
|
107
|
-
value: { type: "
|
|
97
|
+
property: "-webkit-font-smoothing",
|
|
98
|
+
value: { type: "keyword", value: "antialiased" }
|
|
108
99
|
},
|
|
109
100
|
{
|
|
110
|
-
property: "
|
|
111
|
-
value: { type: "
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
property: "border-left-width",
|
|
115
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
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
|
+
];
|
|
118
109
|
var b = [
|
|
119
110
|
{
|
|
120
111
|
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,20 @@ 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
|
+
];
|
|
195
192
|
var b = [
|
|
196
193
|
{
|
|
197
194
|
property: "font-weight",
|
|
@@ -844,10 +841,24 @@ var coreMetas = {
|
|
|
844
841
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
845
842
|
var elementMeta2 = {
|
|
846
843
|
category: "general",
|
|
847
|
-
order:
|
|
844
|
+
order: 1,
|
|
848
845
|
description: "An HTML element is a core building block for web pages, structuring and displaying content like text, images, and links.",
|
|
849
846
|
template: /* @__PURE__ */ jsx(ws.element, {})
|
|
850
847
|
};
|
|
848
|
+
var linkMeta = {
|
|
849
|
+
category: "general",
|
|
850
|
+
description: "Use a link to send your users to another page, section, or resource. Configure links in the Settings panel.",
|
|
851
|
+
order: 2,
|
|
852
|
+
template: /* @__PURE__ */ jsx(
|
|
853
|
+
ws.element,
|
|
854
|
+
{
|
|
855
|
+
"ws:tag": "a",
|
|
856
|
+
"ws:style": css`
|
|
857
|
+
display: inline-block;
|
|
858
|
+
`
|
|
859
|
+
}
|
|
860
|
+
)
|
|
861
|
+
};
|
|
851
862
|
var collectionItem = new Parameter("collectionItem");
|
|
852
863
|
var collectionMeta2 = {
|
|
853
864
|
category: "data",
|
|
@@ -857,7 +868,7 @@ var collectionMeta2 = {
|
|
|
857
868
|
{
|
|
858
869
|
data: ["Collection Item 1", "Collection Item 2", "Collection Item 3"],
|
|
859
870
|
item: collectionItem,
|
|
860
|
-
children: /* @__PURE__ */ jsx(
|
|
871
|
+
children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "div", children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "div", children: expression`${collectionItem}` }) })
|
|
861
872
|
}
|
|
862
873
|
)
|
|
863
874
|
};
|
|
@@ -867,19 +878,19 @@ var descendantMeta2 = {
|
|
|
867
878
|
};
|
|
868
879
|
var BlockTemplate = ws["block-template"];
|
|
869
880
|
var blockMeta2 = {
|
|
870
|
-
category: "
|
|
881
|
+
category: "general",
|
|
871
882
|
template: /* @__PURE__ */ jsxs(ws.block, { children: [
|
|
872
883
|
/* @__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(
|
|
884
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "p" }),
|
|
885
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 1", "ws:tag": "h1" }),
|
|
886
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 2", "ws:tag": "h2" }),
|
|
887
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 3", "ws:tag": "h3" }),
|
|
888
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 4", "ws:tag": "h4" }),
|
|
889
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 5", "ws:tag": "h5" }),
|
|
890
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 6", "ws:tag": "h6" }),
|
|
891
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "ul", children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" }) }),
|
|
892
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "ol", children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" }) }),
|
|
893
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "a" }),
|
|
883
894
|
/* @__PURE__ */ jsx(
|
|
884
895
|
$.Image,
|
|
885
896
|
{
|
|
@@ -891,29 +902,306 @@ var blockMeta2 = {
|
|
|
891
902
|
`
|
|
892
903
|
}
|
|
893
904
|
),
|
|
894
|
-
/* @__PURE__ */ jsx(
|
|
895
|
-
/* @__PURE__ */ jsx(
|
|
905
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "hr" }),
|
|
906
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "blockquote" }),
|
|
896
907
|
/* @__PURE__ */ jsx($.HtmlEmbed, {}),
|
|
897
|
-
/* @__PURE__ */ jsx(
|
|
908
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "code" })
|
|
898
909
|
] }),
|
|
899
|
-
/* @__PURE__ */ jsxs(
|
|
910
|
+
/* @__PURE__ */ jsxs(ws.element, { "ws:tag": "p", children: [
|
|
900
911
|
"The Content Block component designates regions on the page where pre-styled instances can be inserted in",
|
|
901
912
|
" ",
|
|
902
|
-
/* @__PURE__ */ jsx(
|
|
913
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "a", href: "https://wstd.us/content-block", children: "Content mode" }),
|
|
903
914
|
"."
|
|
904
915
|
] }),
|
|
905
|
-
/* @__PURE__ */ jsxs(
|
|
906
|
-
/* @__PURE__ */ jsx(
|
|
907
|
-
/* @__PURE__ */ jsx(
|
|
908
|
-
/* @__PURE__ */ jsx(
|
|
916
|
+
/* @__PURE__ */ jsxs(ws.element, { "ws:tag": "ul", children: [
|
|
917
|
+
/* @__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." }),
|
|
918
|
+
/* @__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." }),
|
|
919
|
+
/* @__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
920
|
] })
|
|
910
921
|
] })
|
|
911
922
|
};
|
|
923
|
+
var typography = {
|
|
924
|
+
heading: {
|
|
925
|
+
category: "typography",
|
|
926
|
+
description: "Use HTML headings to structure and organize content. Use the Tag property in settings to change the heading level (h1-h6).",
|
|
927
|
+
template: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "h1" })
|
|
928
|
+
},
|
|
929
|
+
paragraph: {
|
|
930
|
+
category: "typography",
|
|
931
|
+
description: "A container for multi-line text.",
|
|
932
|
+
template: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "p" })
|
|
933
|
+
},
|
|
934
|
+
blockquote: {
|
|
935
|
+
category: "typography",
|
|
936
|
+
description: "Use to style a quote from an external source like an article or book.",
|
|
937
|
+
template: /* @__PURE__ */ jsx(
|
|
938
|
+
ws.element,
|
|
939
|
+
{
|
|
940
|
+
"ws:tag": "blockquote",
|
|
941
|
+
"ws:style": css`
|
|
942
|
+
margin-left: 0;
|
|
943
|
+
margin-right: 0;
|
|
944
|
+
padding: 10px 20px;
|
|
945
|
+
border-left: 5px solid rgb(226 226 226 / 1);
|
|
946
|
+
`
|
|
947
|
+
}
|
|
948
|
+
)
|
|
949
|
+
},
|
|
950
|
+
list: {
|
|
951
|
+
category: "typography",
|
|
952
|
+
description: "Groups content, like links in a menu or steps in a recipe.",
|
|
953
|
+
template: /* @__PURE__ */ jsxs(ws.element, { "ws:tag": "ul", children: [
|
|
954
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" }),
|
|
955
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" }),
|
|
956
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" })
|
|
957
|
+
] })
|
|
958
|
+
},
|
|
959
|
+
list_item: {
|
|
960
|
+
category: "typography",
|
|
961
|
+
description: "Adds a new item to an existing list.",
|
|
962
|
+
template: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" })
|
|
963
|
+
},
|
|
964
|
+
code_text: {
|
|
965
|
+
category: "typography",
|
|
966
|
+
template: /* @__PURE__ */ jsx(
|
|
967
|
+
ws.element,
|
|
968
|
+
{
|
|
969
|
+
"ws:tag": "code",
|
|
970
|
+
"ws:style": css`
|
|
971
|
+
display: block;
|
|
972
|
+
white-space-collapse: preserve;
|
|
973
|
+
text-wrap-mode: wrap;
|
|
974
|
+
padding-left: 0.2em;
|
|
975
|
+
padding-right: 0.2em;
|
|
976
|
+
background-color: rgb(238 238 238);
|
|
977
|
+
`
|
|
978
|
+
}
|
|
979
|
+
)
|
|
980
|
+
},
|
|
981
|
+
thematic_break: {
|
|
982
|
+
category: "typography",
|
|
983
|
+
description: "Used to visually divide sections of content, helping to improve readability and organization within a webpage.",
|
|
984
|
+
template: /* @__PURE__ */ jsx(
|
|
985
|
+
ws.element,
|
|
986
|
+
{
|
|
987
|
+
"ws:tag": "hr",
|
|
988
|
+
"ws:style": css`
|
|
989
|
+
color: gray;
|
|
990
|
+
border-style: none none solid;
|
|
991
|
+
`
|
|
992
|
+
}
|
|
993
|
+
)
|
|
994
|
+
}
|
|
995
|
+
};
|
|
996
|
+
var forms = {
|
|
997
|
+
form: {
|
|
998
|
+
category: "forms",
|
|
999
|
+
description: "Create filters, surveys, searches and more.",
|
|
1000
|
+
template: /* @__PURE__ */ jsxs(ws.element, { "ws:tag": "form", children: [
|
|
1001
|
+
/* @__PURE__ */ jsx(
|
|
1002
|
+
ws.element,
|
|
1003
|
+
{
|
|
1004
|
+
"ws:tag": "input",
|
|
1005
|
+
"ws:style": css`
|
|
1006
|
+
display: block;
|
|
1007
|
+
`
|
|
1008
|
+
}
|
|
1009
|
+
),
|
|
1010
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "button", children: new PlaceholderValue("Submit") })
|
|
1011
|
+
] })
|
|
1012
|
+
},
|
|
1013
|
+
button: {
|
|
1014
|
+
category: "forms",
|
|
1015
|
+
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.",
|
|
1016
|
+
template: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "button", children: new PlaceholderValue("Button") })
|
|
1017
|
+
},
|
|
1018
|
+
input_label: {
|
|
1019
|
+
category: "forms",
|
|
1020
|
+
template: /* @__PURE__ */ jsx(
|
|
1021
|
+
ws.element,
|
|
1022
|
+
{
|
|
1023
|
+
"ws:tag": "label",
|
|
1024
|
+
"ws:style": css`
|
|
1025
|
+
display: block;
|
|
1026
|
+
`,
|
|
1027
|
+
children: new PlaceholderValue("Label")
|
|
1028
|
+
}
|
|
1029
|
+
)
|
|
1030
|
+
},
|
|
1031
|
+
text_input: {
|
|
1032
|
+
category: "forms",
|
|
1033
|
+
description: "A single-line text input for collecting string data from your users.",
|
|
1034
|
+
template: /* @__PURE__ */ jsx(
|
|
1035
|
+
ws.element,
|
|
1036
|
+
{
|
|
1037
|
+
"ws:tag": "input",
|
|
1038
|
+
"ws:style": css`
|
|
1039
|
+
display: block;
|
|
1040
|
+
`
|
|
1041
|
+
}
|
|
1042
|
+
)
|
|
1043
|
+
},
|
|
1044
|
+
text_area: {
|
|
1045
|
+
category: "forms",
|
|
1046
|
+
description: "A multi-line text input for collecting longer string data from your users.",
|
|
1047
|
+
template: /* @__PURE__ */ jsx(
|
|
1048
|
+
ws.element,
|
|
1049
|
+
{
|
|
1050
|
+
"ws:tag": "textarea",
|
|
1051
|
+
"ws:style": css`
|
|
1052
|
+
display: block;
|
|
1053
|
+
`
|
|
1054
|
+
}
|
|
1055
|
+
)
|
|
1056
|
+
},
|
|
1057
|
+
select: {
|
|
1058
|
+
category: "forms",
|
|
1059
|
+
description: "A drop-down menu for users to select a single option from a predefined list.",
|
|
1060
|
+
template: /* @__PURE__ */ jsxs(
|
|
1061
|
+
ws.element,
|
|
1062
|
+
{
|
|
1063
|
+
"ws:tag": "select",
|
|
1064
|
+
"ws:style": css`
|
|
1065
|
+
display: block;
|
|
1066
|
+
`,
|
|
1067
|
+
children: [
|
|
1068
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "option", label: "Please choose an option", value: "" }),
|
|
1069
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "option", label: "Option A", value: "a" }),
|
|
1070
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "option", label: "Option B", value: "b" }),
|
|
1071
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "option", label: "Option C", value: "c" })
|
|
1072
|
+
]
|
|
1073
|
+
}
|
|
1074
|
+
)
|
|
1075
|
+
},
|
|
1076
|
+
radio: {
|
|
1077
|
+
category: "forms",
|
|
1078
|
+
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.",
|
|
1079
|
+
icon: RadioCheckedIcon,
|
|
1080
|
+
template: /* @__PURE__ */ jsxs(
|
|
1081
|
+
ws.element,
|
|
1082
|
+
{
|
|
1083
|
+
"ws:tag": "label",
|
|
1084
|
+
"ws:label": "Radio Field",
|
|
1085
|
+
"ws:style": css`
|
|
1086
|
+
display: block;
|
|
1087
|
+
`,
|
|
1088
|
+
children: [
|
|
1089
|
+
/* @__PURE__ */ jsx(
|
|
1090
|
+
ws.element,
|
|
1091
|
+
{
|
|
1092
|
+
"ws:tag": "input",
|
|
1093
|
+
"ws:style": css`
|
|
1094
|
+
border-style: none;
|
|
1095
|
+
margin-right: 0.5em;
|
|
1096
|
+
`,
|
|
1097
|
+
type: "radio"
|
|
1098
|
+
}
|
|
1099
|
+
),
|
|
1100
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "span", "ws:label": "Radio Label", children: new PlaceholderValue("Radio") })
|
|
1101
|
+
]
|
|
1102
|
+
}
|
|
1103
|
+
)
|
|
1104
|
+
},
|
|
1105
|
+
checkbox: {
|
|
1106
|
+
category: "forms",
|
|
1107
|
+
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.",
|
|
1108
|
+
icon: CheckboxCheckedIcon,
|
|
1109
|
+
template: /* @__PURE__ */ jsxs(
|
|
1110
|
+
ws.element,
|
|
1111
|
+
{
|
|
1112
|
+
"ws:tag": "label",
|
|
1113
|
+
"ws:label": "Checkbox Field",
|
|
1114
|
+
"ws:style": css`
|
|
1115
|
+
display: block;
|
|
1116
|
+
`,
|
|
1117
|
+
children: [
|
|
1118
|
+
/* @__PURE__ */ jsx(
|
|
1119
|
+
ws.element,
|
|
1120
|
+
{
|
|
1121
|
+
"ws:tag": "input",
|
|
1122
|
+
"ws:style": css`
|
|
1123
|
+
border-style: none;
|
|
1124
|
+
margin-right: 0.5em;
|
|
1125
|
+
`,
|
|
1126
|
+
type: "checkbox"
|
|
1127
|
+
}
|
|
1128
|
+
),
|
|
1129
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "span", "ws:label": "Checkbox Label", children: new PlaceholderValue("Checkbox") })
|
|
1130
|
+
]
|
|
1131
|
+
}
|
|
1132
|
+
)
|
|
1133
|
+
}
|
|
1134
|
+
};
|
|
1135
|
+
var builtWithWebstudioMeta = {
|
|
1136
|
+
category: "other",
|
|
1137
|
+
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.",
|
|
1138
|
+
icon: Webstudio1cIcon,
|
|
1139
|
+
template: /* @__PURE__ */ jsxs(
|
|
1140
|
+
ws.element,
|
|
1141
|
+
{
|
|
1142
|
+
"ws:tag": "a",
|
|
1143
|
+
"ws:label": "Built with Webstudio",
|
|
1144
|
+
href: "https://webstudio.is/?via=badge",
|
|
1145
|
+
target: "_blank",
|
|
1146
|
+
"ws:style": css`
|
|
1147
|
+
display: inline-flex;
|
|
1148
|
+
gap: 6px;
|
|
1149
|
+
align-items: center;
|
|
1150
|
+
justify-content: center;
|
|
1151
|
+
position: fixed;
|
|
1152
|
+
z-index: 1000;
|
|
1153
|
+
padding: 6px 10px;
|
|
1154
|
+
right: 16px;
|
|
1155
|
+
bottom: 16px;
|
|
1156
|
+
color: rgba(251, 252, 253, 1);
|
|
1157
|
+
font-family: system-ui, sans-serif;
|
|
1158
|
+
font-size: 12px;
|
|
1159
|
+
font-weight: 500;
|
|
1160
|
+
line-height: 1;
|
|
1161
|
+
border: 1px solid transparent;
|
|
1162
|
+
border-radius: 9px;
|
|
1163
|
+
text-decoration-line: none;
|
|
1164
|
+
text-wrap-mode: nowrap;
|
|
1165
|
+
background-clip: padding-box, border-box;
|
|
1166
|
+
background-origin: padding-box, border-box;
|
|
1167
|
+
background-image:
|
|
1168
|
+
linear-gradient(135deg, #4a4efa 0%, #bd2fdb 66%, #ec59ce 100%),
|
|
1169
|
+
linear-gradient(
|
|
1170
|
+
135deg,
|
|
1171
|
+
#92fddc 0%,
|
|
1172
|
+
#7d7ffb 31.94%,
|
|
1173
|
+
#ed72fe 64.24%,
|
|
1174
|
+
#fdd791 100%
|
|
1175
|
+
);
|
|
1176
|
+
`,
|
|
1177
|
+
children: [
|
|
1178
|
+
/* @__PURE__ */ jsx(
|
|
1179
|
+
$.HtmlEmbed,
|
|
1180
|
+
{
|
|
1181
|
+
"ws:label": "Logo",
|
|
1182
|
+
code: Webstudio1cIcon,
|
|
1183
|
+
"ws:style": css`
|
|
1184
|
+
display: block;
|
|
1185
|
+
width: 16px;
|
|
1186
|
+
height: 16px;
|
|
1187
|
+
flex-shrink: 0;
|
|
1188
|
+
`
|
|
1189
|
+
}
|
|
1190
|
+
),
|
|
1191
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "div", "ws:label": "Text", children: "Built with Webstudio" })
|
|
1192
|
+
]
|
|
1193
|
+
}
|
|
1194
|
+
)
|
|
1195
|
+
};
|
|
912
1196
|
var coreTemplates = {
|
|
913
1197
|
[elementComponent]: elementMeta2,
|
|
1198
|
+
link: linkMeta,
|
|
914
1199
|
[collectionComponent]: collectionMeta2,
|
|
915
1200
|
[descendantComponent]: descendantMeta2,
|
|
916
|
-
[blockComponent]: blockMeta2
|
|
1201
|
+
[blockComponent]: blockMeta2,
|
|
1202
|
+
...typography,
|
|
1203
|
+
...forms,
|
|
1204
|
+
builtWithWebstudio: builtWithWebstudioMeta
|
|
917
1205
|
};
|
|
918
1206
|
export {
|
|
919
1207
|
coreTemplates
|
package/lib/index.js
CHANGED
|
@@ -852,22 +852,14 @@ var componentCategories = [
|
|
|
852
852
|
"localization",
|
|
853
853
|
"radix",
|
|
854
854
|
"xml",
|
|
855
|
+
"other",
|
|
855
856
|
"hidden",
|
|
856
857
|
"internal"
|
|
857
858
|
];
|
|
858
|
-
var stateCategories = ["states", "component-states"];
|
|
859
859
|
var ComponentState = z15.object({
|
|
860
|
-
category: z15.enum(stateCategories).optional(),
|
|
861
860
|
selector: z15.string(),
|
|
862
861
|
label: z15.string()
|
|
863
862
|
});
|
|
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
863
|
var ComponentContent = z15.string();
|
|
872
864
|
var ContentModel = z15.object({
|
|
873
865
|
/*
|
|
@@ -1059,29 +1051,20 @@ var body = [
|
|
|
1059
1051
|
{
|
|
1060
1052
|
property: "border-left-width",
|
|
1061
1053
|
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
1054
|
},
|
|
1076
1055
|
{
|
|
1077
|
-
property: "
|
|
1078
|
-
value: { type: "
|
|
1056
|
+
property: "-webkit-font-smoothing",
|
|
1057
|
+
value: { type: "keyword", value: "antialiased" }
|
|
1079
1058
|
},
|
|
1080
1059
|
{
|
|
1081
|
-
property: "
|
|
1082
|
-
value: { type: "
|
|
1060
|
+
property: "-moz-osx-font-smoothing",
|
|
1061
|
+
value: { type: "keyword", value: "grayscale" }
|
|
1083
1062
|
}
|
|
1084
1063
|
];
|
|
1064
|
+
var hr = [
|
|
1065
|
+
{ property: "height", value: { type: "unit", unit: "number", value: 0 } },
|
|
1066
|
+
{ property: "color", value: { type: "keyword", value: "inherit" } }
|
|
1067
|
+
];
|
|
1085
1068
|
var b = [
|
|
1086
1069
|
{
|
|
1087
1070
|
property: "font-weight",
|
|
@@ -2827,7 +2810,6 @@ export {
|
|
|
2827
2810
|
createScope,
|
|
2828
2811
|
decodeDataVariableId as decodeDataSourceVariable,
|
|
2829
2812
|
decodeDataVariableId,
|
|
2830
|
-
defaultStates,
|
|
2831
2813
|
descendantComponent,
|
|
2832
2814
|
documentTypes,
|
|
2833
2815
|
durationUnitValueSchema,
|
|
@@ -2865,7 +2847,6 @@ export {
|
|
|
2865
2847
|
replaceFormActionsWithResources,
|
|
2866
2848
|
rootComponent,
|
|
2867
2849
|
scrollAnimationSchema,
|
|
2868
|
-
stateCategories,
|
|
2869
2850
|
systemParameter,
|
|
2870
2851
|
tags,
|
|
2871
2852
|
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[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.221.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/icons": "0.
|
|
43
|
+
"@webstudio-is/css-engine": "0.221.0",
|
|
44
|
+
"@webstudio-is/fonts": "0.221.0",
|
|
45
|
+
"@webstudio-is/icons": "0.221.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.221.0",
|
|
52
|
+
"@webstudio-is/tsconfig": "1.0.7"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"typecheck": "tsc",
|