@webstudio-is/sdk 0.219.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 +340 -76
- package/lib/index.js +25 -76
- package/lib/types/core-metas.d.ts +0 -1010
- package/lib/types/core-templates.d.ts +2 -0
- package/lib/types/schema/component-meta.d.ts +892 -915
- package/lib/types/schema/webstudio.d.ts +22 -22
- package/package.json +5 -5
|
@@ -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 {
|
|
@@ -19,8 +25,7 @@ import {
|
|
|
19
25
|
ListViewIcon,
|
|
20
26
|
PaintBrushIcon,
|
|
21
27
|
SettingsIcon,
|
|
22
|
-
AddTemplateInstanceIcon
|
|
23
|
-
BoxIcon
|
|
28
|
+
AddTemplateInstanceIcon
|
|
24
29
|
} from "@webstudio-is/icons/svg";
|
|
25
30
|
|
|
26
31
|
// src/__generated__/normalize.css.ts
|
|
@@ -170,29 +175,20 @@ var body = [
|
|
|
170
175
|
{
|
|
171
176
|
property: "border-left-width",
|
|
172
177
|
value: { type: "unit", unit: "px", value: 1 }
|
|
173
|
-
}
|
|
174
|
-
];
|
|
175
|
-
var hr = [
|
|
176
|
-
{ property: "height", value: { type: "unit", unit: "number", value: 0 } },
|
|
177
|
-
{ property: "color", value: { type: "keyword", value: "inherit" } },
|
|
178
|
-
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } },
|
|
179
|
-
{
|
|
180
|
-
property: "border-top-width",
|
|
181
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
property: "border-right-width",
|
|
185
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
186
178
|
},
|
|
187
179
|
{
|
|
188
|
-
property: "
|
|
189
|
-
value: { type: "
|
|
180
|
+
property: "-webkit-font-smoothing",
|
|
181
|
+
value: { type: "keyword", value: "antialiased" }
|
|
190
182
|
},
|
|
191
183
|
{
|
|
192
|
-
property: "
|
|
193
|
-
value: { type: "
|
|
184
|
+
property: "-moz-osx-font-smoothing",
|
|
185
|
+
value: { type: "keyword", value: "grayscale" }
|
|
194
186
|
}
|
|
195
187
|
];
|
|
188
|
+
var hr = [
|
|
189
|
+
{ property: "height", value: { type: "unit", unit: "number", value: 0 } },
|
|
190
|
+
{ property: "color", value: { type: "keyword", value: "inherit" } }
|
|
191
|
+
];
|
|
196
192
|
var b = [
|
|
197
193
|
{
|
|
198
194
|
property: "font-weight",
|
|
@@ -631,6 +627,8 @@ var tagProperty = "data-ws-tag";
|
|
|
631
627
|
|
|
632
628
|
// src/__generated__/tags.ts
|
|
633
629
|
var tags = [
|
|
630
|
+
"div",
|
|
631
|
+
"span",
|
|
634
632
|
"a",
|
|
635
633
|
"abbr",
|
|
636
634
|
"address",
|
|
@@ -658,7 +656,6 @@ var tags = [
|
|
|
658
656
|
"details",
|
|
659
657
|
"dfn",
|
|
660
658
|
"dialog",
|
|
661
|
-
"div",
|
|
662
659
|
"dl",
|
|
663
660
|
"dt",
|
|
664
661
|
"em",
|
|
@@ -715,7 +712,6 @@ var tags = [
|
|
|
715
712
|
"slot",
|
|
716
713
|
"small",
|
|
717
714
|
"source",
|
|
718
|
-
"span",
|
|
719
715
|
"strong",
|
|
720
716
|
"sub",
|
|
721
717
|
"summary",
|
|
@@ -746,17 +742,12 @@ var rootMeta = {
|
|
|
746
742
|
html
|
|
747
743
|
}
|
|
748
744
|
};
|
|
749
|
-
var rootPropsMeta = {
|
|
750
|
-
props: {}
|
|
751
|
-
};
|
|
752
745
|
var elementComponent = "ws:element";
|
|
753
746
|
var elementMeta = {
|
|
754
747
|
label: "Element",
|
|
755
|
-
icon: BoxIcon,
|
|
756
748
|
// convert [object Module] to [object Object] to enable structured cloning
|
|
757
|
-
presetStyle: { ...normalize_css_exports }
|
|
758
|
-
|
|
759
|
-
var elementPropsMeta = {
|
|
749
|
+
presetStyle: { ...normalize_css_exports },
|
|
750
|
+
initialProps: [tagProperty, "id", "class"],
|
|
760
751
|
props: {
|
|
761
752
|
[tagProperty]: {
|
|
762
753
|
type: "string",
|
|
@@ -773,17 +764,15 @@ var collectionMeta = {
|
|
|
773
764
|
contentModel: {
|
|
774
765
|
category: "instance",
|
|
775
766
|
children: ["instance"]
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
var collectionPropsMeta = {
|
|
767
|
+
},
|
|
768
|
+
initialProps: ["data"],
|
|
779
769
|
props: {
|
|
780
770
|
data: {
|
|
781
771
|
required: true,
|
|
782
772
|
control: "json",
|
|
783
773
|
type: "json"
|
|
784
774
|
}
|
|
785
|
-
}
|
|
786
|
-
initialProps: ["data"]
|
|
775
|
+
}
|
|
787
776
|
};
|
|
788
777
|
var descendantComponent = "ws:descendant";
|
|
789
778
|
var descendantMeta = {
|
|
@@ -794,9 +783,8 @@ var descendantMeta = {
|
|
|
794
783
|
children: []
|
|
795
784
|
},
|
|
796
785
|
// @todo infer possible presets
|
|
797
|
-
presetStyle: {}
|
|
798
|
-
|
|
799
|
-
var descendantPropsMeta = {
|
|
786
|
+
presetStyle: {},
|
|
787
|
+
initialProps: ["selector"],
|
|
800
788
|
props: {
|
|
801
789
|
selector: {
|
|
802
790
|
required: true,
|
|
@@ -821,8 +809,7 @@ var descendantPropsMeta = {
|
|
|
821
809
|
" hr"
|
|
822
810
|
]
|
|
823
811
|
}
|
|
824
|
-
}
|
|
825
|
-
initialProps: ["selector"]
|
|
812
|
+
}
|
|
826
813
|
};
|
|
827
814
|
var blockComponent = "ws:block";
|
|
828
815
|
var blockTemplateComponent = "ws:block-template";
|
|
@@ -833,9 +820,6 @@ var blockTemplateMeta = {
|
|
|
833
820
|
children: ["instance"]
|
|
834
821
|
}
|
|
835
822
|
};
|
|
836
|
-
var blockTemplatePropsMeta = {
|
|
837
|
-
props: {}
|
|
838
|
-
};
|
|
839
823
|
var blockMeta = {
|
|
840
824
|
label: "Content Block",
|
|
841
825
|
icon: ContentBlockIcon,
|
|
@@ -844,9 +828,6 @@ var blockMeta = {
|
|
|
844
828
|
children: [blockTemplateComponent, "instance"]
|
|
845
829
|
}
|
|
846
830
|
};
|
|
847
|
-
var blockPropsMeta = {
|
|
848
|
-
props: {}
|
|
849
|
-
};
|
|
850
831
|
var coreMetas = {
|
|
851
832
|
[rootComponent]: rootMeta,
|
|
852
833
|
[elementComponent]: elementMeta,
|
|
@@ -855,22 +836,28 @@ var coreMetas = {
|
|
|
855
836
|
[blockComponent]: blockMeta,
|
|
856
837
|
[blockTemplateComponent]: blockTemplateMeta
|
|
857
838
|
};
|
|
858
|
-
var corePropsMetas = {
|
|
859
|
-
[rootComponent]: rootPropsMeta,
|
|
860
|
-
[elementComponent]: elementPropsMeta,
|
|
861
|
-
[collectionComponent]: collectionPropsMeta,
|
|
862
|
-
[descendantComponent]: descendantPropsMeta,
|
|
863
|
-
[blockComponent]: blockPropsMeta,
|
|
864
|
-
[blockTemplateComponent]: blockTemplatePropsMeta
|
|
865
|
-
};
|
|
866
839
|
|
|
867
840
|
// src/core-templates.tsx
|
|
868
841
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
869
842
|
var elementMeta2 = {
|
|
870
843
|
category: "general",
|
|
871
|
-
order:
|
|
844
|
+
order: 1,
|
|
872
845
|
description: "An HTML element is a core building block for web pages, structuring and displaying content like text, images, and links.",
|
|
873
|
-
template: /* @__PURE__ */ jsx(ws.element, {
|
|
846
|
+
template: /* @__PURE__ */ jsx(ws.element, {})
|
|
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
|
+
)
|
|
874
861
|
};
|
|
875
862
|
var collectionItem = new Parameter("collectionItem");
|
|
876
863
|
var collectionMeta2 = {
|
|
@@ -881,7 +868,7 @@ var collectionMeta2 = {
|
|
|
881
868
|
{
|
|
882
869
|
data: ["Collection Item 1", "Collection Item 2", "Collection Item 3"],
|
|
883
870
|
item: collectionItem,
|
|
884
|
-
children: /* @__PURE__ */ jsx(
|
|
871
|
+
children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "div", children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "div", children: expression`${collectionItem}` }) })
|
|
885
872
|
}
|
|
886
873
|
)
|
|
887
874
|
};
|
|
@@ -891,19 +878,19 @@ var descendantMeta2 = {
|
|
|
891
878
|
};
|
|
892
879
|
var BlockTemplate = ws["block-template"];
|
|
893
880
|
var blockMeta2 = {
|
|
894
|
-
category: "
|
|
881
|
+
category: "general",
|
|
895
882
|
template: /* @__PURE__ */ jsxs(ws.block, { children: [
|
|
896
883
|
/* @__PURE__ */ jsxs(BlockTemplate, { "ws:label": "Templates", children: [
|
|
897
|
-
/* @__PURE__ */ jsx(
|
|
898
|
-
/* @__PURE__ */ jsx(
|
|
899
|
-
/* @__PURE__ */ jsx(
|
|
900
|
-
/* @__PURE__ */ jsx(
|
|
901
|
-
/* @__PURE__ */ jsx(
|
|
902
|
-
/* @__PURE__ */ jsx(
|
|
903
|
-
/* @__PURE__ */ jsx(
|
|
904
|
-
/* @__PURE__ */ jsx(
|
|
905
|
-
/* @__PURE__ */ jsx(
|
|
906
|
-
/* @__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" }),
|
|
907
894
|
/* @__PURE__ */ jsx(
|
|
908
895
|
$.Image,
|
|
909
896
|
{
|
|
@@ -915,29 +902,306 @@ var blockMeta2 = {
|
|
|
915
902
|
`
|
|
916
903
|
}
|
|
917
904
|
),
|
|
918
|
-
/* @__PURE__ */ jsx(
|
|
919
|
-
/* @__PURE__ */ jsx(
|
|
905
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "hr" }),
|
|
906
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "blockquote" }),
|
|
920
907
|
/* @__PURE__ */ jsx($.HtmlEmbed, {}),
|
|
921
|
-
/* @__PURE__ */ jsx(
|
|
908
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "code" })
|
|
922
909
|
] }),
|
|
923
|
-
/* @__PURE__ */ jsxs(
|
|
910
|
+
/* @__PURE__ */ jsxs(ws.element, { "ws:tag": "p", children: [
|
|
924
911
|
"The Content Block component designates regions on the page where pre-styled instances can be inserted in",
|
|
925
912
|
" ",
|
|
926
|
-
/* @__PURE__ */ jsx(
|
|
913
|
+
/* @__PURE__ */ jsx(ws.element, { "ws:tag": "a", href: "https://wstd.us/content-block", children: "Content mode" }),
|
|
927
914
|
"."
|
|
928
915
|
] }),
|
|
929
|
-
/* @__PURE__ */ jsxs(
|
|
930
|
-
/* @__PURE__ */ jsx(
|
|
931
|
-
/* @__PURE__ */ jsx(
|
|
932
|
-
/* @__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." })
|
|
933
920
|
] })
|
|
934
921
|
] })
|
|
935
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
|
+
};
|
|
936
1196
|
var coreTemplates = {
|
|
937
1197
|
[elementComponent]: elementMeta2,
|
|
1198
|
+
link: linkMeta,
|
|
938
1199
|
[collectionComponent]: collectionMeta2,
|
|
939
1200
|
[descendantComponent]: descendantMeta2,
|
|
940
|
-
[blockComponent]: blockMeta2
|
|
1201
|
+
[blockComponent]: blockMeta2,
|
|
1202
|
+
...typography,
|
|
1203
|
+
...forms,
|
|
1204
|
+
builtWithWebstudio: builtWithWebstudioMeta
|
|
941
1205
|
};
|
|
942
1206
|
export {
|
|
943
1207
|
coreTemplates
|