@webstudio-is/sdk 0.218.0 → 0.220.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 +726 -33
- package/lib/index.js +730 -51
- package/lib/runtime.js +2 -0
- package/lib/types/__generated__/tags.d.ts +1 -0
- package/lib/types/core-metas.d.ts +0 -1010
- package/lib/types/core-templates.d.ts +1 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/runtime.d.ts +2 -1
- package/lib/types/schema/component-meta.d.ts +889 -902
- package/lib/types/schema/webstudio.d.ts +22 -22
- package/package.json +7 -7
package/lib/index.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __export = (target, all) => {
|
|
3
|
+
for (var name in all)
|
|
4
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
+
};
|
|
6
|
+
|
|
1
7
|
// src/schema/assets.ts
|
|
2
8
|
import { z } from "zod";
|
|
3
9
|
import { FontFormat, FontMeta } from "@webstudio-is/fonts";
|
|
@@ -836,11 +842,6 @@ var PresetStyleDecl = z15.object({
|
|
|
836
842
|
property: z15.string(),
|
|
837
843
|
value: StyleValue3
|
|
838
844
|
});
|
|
839
|
-
var WsComponentPropsMeta = z15.object({
|
|
840
|
-
props: z15.record(PropMeta),
|
|
841
|
-
// Props that will be always visible in properties panel.
|
|
842
|
-
initialProps: z15.array(z15.string()).optional()
|
|
843
|
-
});
|
|
844
845
|
var componentCategories = [
|
|
845
846
|
"general",
|
|
846
847
|
"typography",
|
|
@@ -885,11 +886,6 @@ var ContentModel = z15.object({
|
|
|
885
886
|
});
|
|
886
887
|
var WsComponentMeta = z15.object({
|
|
887
888
|
category: z15.enum(componentCategories).optional(),
|
|
888
|
-
/**
|
|
889
|
-
* a property used as textual placeholder when no content specified while in builder
|
|
890
|
-
* also signals to not insert components inside unless dropped explicitly
|
|
891
|
-
*/
|
|
892
|
-
placeholder: z15.string().optional(),
|
|
893
889
|
contentModel: ContentModel.optional(),
|
|
894
890
|
// when this field is specified component receives
|
|
895
891
|
// prop with index of same components withiin specified ancestor
|
|
@@ -898,10 +894,13 @@ var WsComponentMeta = z15.object({
|
|
|
898
894
|
indexWithinAncestor: z15.optional(z15.string()),
|
|
899
895
|
label: z15.optional(z15.string()),
|
|
900
896
|
description: z15.string().optional(),
|
|
901
|
-
icon: z15.string(),
|
|
897
|
+
icon: z15.string().optional(),
|
|
902
898
|
presetStyle: z15.optional(z15.record(z15.string(), z15.array(PresetStyleDecl))),
|
|
903
899
|
states: z15.optional(z15.array(ComponentState)),
|
|
904
|
-
order: z15.number().optional()
|
|
900
|
+
order: z15.number().optional(),
|
|
901
|
+
// properties and html attributes that will be always visible in properties panel
|
|
902
|
+
initialProps: z15.array(z15.string()).optional(),
|
|
903
|
+
props: z15.record(PropMeta).optional()
|
|
905
904
|
});
|
|
906
905
|
|
|
907
906
|
// src/core-metas.ts
|
|
@@ -910,11 +909,109 @@ import {
|
|
|
910
909
|
ListViewIcon,
|
|
911
910
|
PaintBrushIcon,
|
|
912
911
|
SettingsIcon,
|
|
913
|
-
AddTemplateInstanceIcon
|
|
914
|
-
HtmlElementIcon
|
|
912
|
+
AddTemplateInstanceIcon
|
|
915
913
|
} from "@webstudio-is/icons/svg";
|
|
916
914
|
|
|
917
915
|
// src/__generated__/normalize.css.ts
|
|
916
|
+
var normalize_css_exports = {};
|
|
917
|
+
__export(normalize_css_exports, {
|
|
918
|
+
a: () => a,
|
|
919
|
+
address: () => address,
|
|
920
|
+
article: () => article,
|
|
921
|
+
aside: () => aside,
|
|
922
|
+
b: () => b,
|
|
923
|
+
body: () => body,
|
|
924
|
+
button: () => button,
|
|
925
|
+
checkbox: () => checkbox,
|
|
926
|
+
code: () => code,
|
|
927
|
+
div: () => div,
|
|
928
|
+
figure: () => figure,
|
|
929
|
+
footer: () => footer,
|
|
930
|
+
form: () => form,
|
|
931
|
+
h1: () => h1,
|
|
932
|
+
h2: () => h2,
|
|
933
|
+
h3: () => h3,
|
|
934
|
+
h4: () => h4,
|
|
935
|
+
h5: () => h5,
|
|
936
|
+
h6: () => h6,
|
|
937
|
+
header: () => header,
|
|
938
|
+
hr: () => hr,
|
|
939
|
+
html: () => html,
|
|
940
|
+
i: () => i,
|
|
941
|
+
img: () => img,
|
|
942
|
+
input: () => input,
|
|
943
|
+
kbd: () => kbd,
|
|
944
|
+
label: () => label,
|
|
945
|
+
legend: () => legend,
|
|
946
|
+
li: () => li,
|
|
947
|
+
main: () => main,
|
|
948
|
+
nav: () => nav,
|
|
949
|
+
ol: () => ol,
|
|
950
|
+
optgroup: () => optgroup,
|
|
951
|
+
p: () => p,
|
|
952
|
+
pre: () => pre,
|
|
953
|
+
progress: () => progress,
|
|
954
|
+
radio: () => radio,
|
|
955
|
+
samp: () => samp,
|
|
956
|
+
section: () => section,
|
|
957
|
+
select: () => select,
|
|
958
|
+
small: () => small,
|
|
959
|
+
span: () => span,
|
|
960
|
+
strong: () => strong,
|
|
961
|
+
sub: () => sub,
|
|
962
|
+
summary: () => summary,
|
|
963
|
+
sup: () => sup,
|
|
964
|
+
table: () => table,
|
|
965
|
+
textarea: () => textarea,
|
|
966
|
+
time: () => time,
|
|
967
|
+
ul: () => ul
|
|
968
|
+
});
|
|
969
|
+
var div = [
|
|
970
|
+
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } },
|
|
971
|
+
{
|
|
972
|
+
property: "border-top-width",
|
|
973
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
property: "border-right-width",
|
|
977
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
property: "border-bottom-width",
|
|
981
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
property: "border-left-width",
|
|
985
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
986
|
+
},
|
|
987
|
+
{ property: "outline-width", value: { type: "unit", unit: "px", value: 1 } }
|
|
988
|
+
];
|
|
989
|
+
var address = div;
|
|
990
|
+
var article = div;
|
|
991
|
+
var aside = div;
|
|
992
|
+
var figure = div;
|
|
993
|
+
var footer = div;
|
|
994
|
+
var header = div;
|
|
995
|
+
var main = div;
|
|
996
|
+
var nav = div;
|
|
997
|
+
var section = div;
|
|
998
|
+
var form = div;
|
|
999
|
+
var label = div;
|
|
1000
|
+
var time = div;
|
|
1001
|
+
var h1 = div;
|
|
1002
|
+
var h2 = div;
|
|
1003
|
+
var h3 = div;
|
|
1004
|
+
var h4 = div;
|
|
1005
|
+
var h5 = div;
|
|
1006
|
+
var h6 = div;
|
|
1007
|
+
var i = div;
|
|
1008
|
+
var img = div;
|
|
1009
|
+
var a = div;
|
|
1010
|
+
var li = div;
|
|
1011
|
+
var ul = div;
|
|
1012
|
+
var ol = div;
|
|
1013
|
+
var p = div;
|
|
1014
|
+
var span = div;
|
|
918
1015
|
var html = [
|
|
919
1016
|
{ property: "display", value: { type: "keyword", value: "grid" } },
|
|
920
1017
|
{ property: "min-height", value: { type: "unit", unit: "%", value: 100 } },
|
|
@@ -932,6 +1029,602 @@ var html = [
|
|
|
932
1029
|
value: { type: "keyword", value: "preserve" }
|
|
933
1030
|
}
|
|
934
1031
|
];
|
|
1032
|
+
var body = [
|
|
1033
|
+
{ property: "margin-top", value: { type: "unit", unit: "number", value: 0 } },
|
|
1034
|
+
{
|
|
1035
|
+
property: "margin-right",
|
|
1036
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
property: "margin-bottom",
|
|
1040
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1041
|
+
},
|
|
1042
|
+
{
|
|
1043
|
+
property: "margin-left",
|
|
1044
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1045
|
+
},
|
|
1046
|
+
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } },
|
|
1047
|
+
{
|
|
1048
|
+
property: "border-top-width",
|
|
1049
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
property: "border-right-width",
|
|
1053
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
property: "border-bottom-width",
|
|
1057
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1058
|
+
},
|
|
1059
|
+
{
|
|
1060
|
+
property: "border-left-width",
|
|
1061
|
+
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
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
property: "border-bottom-width",
|
|
1078
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
property: "border-left-width",
|
|
1082
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1083
|
+
}
|
|
1084
|
+
];
|
|
1085
|
+
var b = [
|
|
1086
|
+
{
|
|
1087
|
+
property: "font-weight",
|
|
1088
|
+
value: { type: "unit", unit: "number", value: 700 }
|
|
1089
|
+
},
|
|
1090
|
+
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } },
|
|
1091
|
+
{
|
|
1092
|
+
property: "border-top-width",
|
|
1093
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1094
|
+
},
|
|
1095
|
+
{
|
|
1096
|
+
property: "border-right-width",
|
|
1097
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1098
|
+
},
|
|
1099
|
+
{
|
|
1100
|
+
property: "border-bottom-width",
|
|
1101
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1102
|
+
},
|
|
1103
|
+
{
|
|
1104
|
+
property: "border-left-width",
|
|
1105
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1106
|
+
}
|
|
1107
|
+
];
|
|
1108
|
+
var strong = b;
|
|
1109
|
+
var code = [
|
|
1110
|
+
{
|
|
1111
|
+
property: "font-family",
|
|
1112
|
+
value: {
|
|
1113
|
+
type: "fontFamily",
|
|
1114
|
+
value: [
|
|
1115
|
+
"ui-monospace",
|
|
1116
|
+
"SFMono-Regular",
|
|
1117
|
+
"Consolas",
|
|
1118
|
+
"Liberation Mono",
|
|
1119
|
+
"Menlo",
|
|
1120
|
+
"monospace"
|
|
1121
|
+
]
|
|
1122
|
+
}
|
|
1123
|
+
},
|
|
1124
|
+
{ property: "font-size", value: { type: "unit", unit: "em", value: 1 } },
|
|
1125
|
+
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } },
|
|
1126
|
+
{
|
|
1127
|
+
property: "border-top-width",
|
|
1128
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
property: "border-right-width",
|
|
1132
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
property: "border-bottom-width",
|
|
1136
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
property: "border-left-width",
|
|
1140
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1141
|
+
}
|
|
1142
|
+
];
|
|
1143
|
+
var kbd = code;
|
|
1144
|
+
var samp = code;
|
|
1145
|
+
var pre = code;
|
|
1146
|
+
var small = [
|
|
1147
|
+
{ property: "font-size", value: { type: "unit", unit: "%", value: 80 } },
|
|
1148
|
+
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } },
|
|
1149
|
+
{
|
|
1150
|
+
property: "border-top-width",
|
|
1151
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1154
|
+
property: "border-right-width",
|
|
1155
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
property: "border-bottom-width",
|
|
1159
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
property: "border-left-width",
|
|
1163
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1164
|
+
}
|
|
1165
|
+
];
|
|
1166
|
+
var sub = [
|
|
1167
|
+
{ property: "font-size", value: { type: "unit", unit: "%", value: 75 } },
|
|
1168
|
+
{
|
|
1169
|
+
property: "line-height",
|
|
1170
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1171
|
+
},
|
|
1172
|
+
{ property: "position", value: { type: "keyword", value: "relative" } },
|
|
1173
|
+
{ property: "vertical-align", value: { type: "keyword", value: "baseline" } },
|
|
1174
|
+
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } },
|
|
1175
|
+
{
|
|
1176
|
+
property: "border-top-width",
|
|
1177
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
property: "border-right-width",
|
|
1181
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1182
|
+
},
|
|
1183
|
+
{
|
|
1184
|
+
property: "border-bottom-width",
|
|
1185
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
property: "border-left-width",
|
|
1189
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1190
|
+
},
|
|
1191
|
+
{ property: "bottom", value: { type: "unit", unit: "em", value: -0.25 } }
|
|
1192
|
+
];
|
|
1193
|
+
var sup = [
|
|
1194
|
+
{ property: "font-size", value: { type: "unit", unit: "%", value: 75 } },
|
|
1195
|
+
{
|
|
1196
|
+
property: "line-height",
|
|
1197
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1198
|
+
},
|
|
1199
|
+
{ property: "position", value: { type: "keyword", value: "relative" } },
|
|
1200
|
+
{ property: "vertical-align", value: { type: "keyword", value: "baseline" } },
|
|
1201
|
+
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } },
|
|
1202
|
+
{
|
|
1203
|
+
property: "border-top-width",
|
|
1204
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
property: "border-right-width",
|
|
1208
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1209
|
+
},
|
|
1210
|
+
{
|
|
1211
|
+
property: "border-bottom-width",
|
|
1212
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
property: "border-left-width",
|
|
1216
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1217
|
+
},
|
|
1218
|
+
{ property: "top", value: { type: "unit", unit: "em", value: -0.5 } }
|
|
1219
|
+
];
|
|
1220
|
+
var table = [
|
|
1221
|
+
{
|
|
1222
|
+
property: "text-indent",
|
|
1223
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
property: "border-top-width",
|
|
1227
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1228
|
+
},
|
|
1229
|
+
{
|
|
1230
|
+
property: "border-right-width",
|
|
1231
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1232
|
+
},
|
|
1233
|
+
{
|
|
1234
|
+
property: "border-bottom-width",
|
|
1235
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
property: "border-left-width",
|
|
1239
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
property: "border-top-color",
|
|
1243
|
+
value: { type: "keyword", value: "inherit" }
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
property: "border-right-color",
|
|
1247
|
+
value: { type: "keyword", value: "inherit" }
|
|
1248
|
+
},
|
|
1249
|
+
{
|
|
1250
|
+
property: "border-bottom-color",
|
|
1251
|
+
value: { type: "keyword", value: "inherit" }
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
property: "border-left-color",
|
|
1255
|
+
value: { type: "keyword", value: "inherit" }
|
|
1256
|
+
},
|
|
1257
|
+
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } }
|
|
1258
|
+
];
|
|
1259
|
+
var input = [
|
|
1260
|
+
{ property: "font-family", value: { type: "keyword", value: "inherit" } },
|
|
1261
|
+
{ property: "font-size", value: { type: "unit", unit: "%", value: 100 } },
|
|
1262
|
+
{
|
|
1263
|
+
property: "line-height",
|
|
1264
|
+
value: { type: "unit", unit: "number", value: 1.15 }
|
|
1265
|
+
},
|
|
1266
|
+
{ property: "margin-top", value: { type: "unit", unit: "number", value: 0 } },
|
|
1267
|
+
{
|
|
1268
|
+
property: "margin-right",
|
|
1269
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1270
|
+
},
|
|
1271
|
+
{
|
|
1272
|
+
property: "margin-bottom",
|
|
1273
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1274
|
+
},
|
|
1275
|
+
{
|
|
1276
|
+
property: "margin-left",
|
|
1277
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1278
|
+
},
|
|
1279
|
+
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } },
|
|
1280
|
+
{
|
|
1281
|
+
property: "border-top-width",
|
|
1282
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
property: "border-right-width",
|
|
1286
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1287
|
+
},
|
|
1288
|
+
{
|
|
1289
|
+
property: "border-bottom-width",
|
|
1290
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1291
|
+
},
|
|
1292
|
+
{
|
|
1293
|
+
property: "border-left-width",
|
|
1294
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1295
|
+
},
|
|
1296
|
+
{ property: "border-top-style", value: { type: "keyword", value: "solid" } },
|
|
1297
|
+
{
|
|
1298
|
+
property: "border-right-style",
|
|
1299
|
+
value: { type: "keyword", value: "solid" }
|
|
1300
|
+
},
|
|
1301
|
+
{
|
|
1302
|
+
property: "border-bottom-style",
|
|
1303
|
+
value: { type: "keyword", value: "solid" }
|
|
1304
|
+
},
|
|
1305
|
+
{ property: "border-left-style", value: { type: "keyword", value: "solid" } }
|
|
1306
|
+
];
|
|
1307
|
+
var textarea = input;
|
|
1308
|
+
var optgroup = [
|
|
1309
|
+
{ property: "font-family", value: { type: "keyword", value: "inherit" } },
|
|
1310
|
+
{ property: "font-size", value: { type: "unit", unit: "%", value: 100 } },
|
|
1311
|
+
{
|
|
1312
|
+
property: "line-height",
|
|
1313
|
+
value: { type: "unit", unit: "number", value: 1.15 }
|
|
1314
|
+
},
|
|
1315
|
+
{ property: "margin-top", value: { type: "unit", unit: "number", value: 0 } },
|
|
1316
|
+
{
|
|
1317
|
+
property: "margin-right",
|
|
1318
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1319
|
+
},
|
|
1320
|
+
{
|
|
1321
|
+
property: "margin-bottom",
|
|
1322
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
property: "margin-left",
|
|
1326
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1327
|
+
},
|
|
1328
|
+
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } },
|
|
1329
|
+
{
|
|
1330
|
+
property: "border-top-width",
|
|
1331
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
property: "border-right-width",
|
|
1335
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
property: "border-bottom-width",
|
|
1339
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
property: "border-left-width",
|
|
1343
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1344
|
+
}
|
|
1345
|
+
];
|
|
1346
|
+
var radio = [
|
|
1347
|
+
{ property: "font-family", value: { type: "keyword", value: "inherit" } },
|
|
1348
|
+
{ property: "font-size", value: { type: "unit", unit: "%", value: 100 } },
|
|
1349
|
+
{
|
|
1350
|
+
property: "line-height",
|
|
1351
|
+
value: { type: "unit", unit: "number", value: 1.15 }
|
|
1352
|
+
},
|
|
1353
|
+
{ property: "margin-top", value: { type: "unit", unit: "number", value: 0 } },
|
|
1354
|
+
{
|
|
1355
|
+
property: "margin-right",
|
|
1356
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1357
|
+
},
|
|
1358
|
+
{
|
|
1359
|
+
property: "margin-bottom",
|
|
1360
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
property: "margin-left",
|
|
1364
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1365
|
+
},
|
|
1366
|
+
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } },
|
|
1367
|
+
{
|
|
1368
|
+
property: "border-top-width",
|
|
1369
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
property: "border-right-width",
|
|
1373
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
property: "border-bottom-width",
|
|
1377
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1378
|
+
},
|
|
1379
|
+
{
|
|
1380
|
+
property: "border-left-width",
|
|
1381
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1382
|
+
},
|
|
1383
|
+
{ property: "border-top-style", value: { type: "keyword", value: "none" } },
|
|
1384
|
+
{ property: "border-right-style", value: { type: "keyword", value: "none" } },
|
|
1385
|
+
{
|
|
1386
|
+
property: "border-bottom-style",
|
|
1387
|
+
value: { type: "keyword", value: "none" }
|
|
1388
|
+
},
|
|
1389
|
+
{ property: "border-left-style", value: { type: "keyword", value: "none" } }
|
|
1390
|
+
];
|
|
1391
|
+
var checkbox = radio;
|
|
1392
|
+
var button = [
|
|
1393
|
+
{ property: "font-family", value: { type: "keyword", value: "inherit" } },
|
|
1394
|
+
{ property: "font-size", value: { type: "unit", unit: "%", value: 100 } },
|
|
1395
|
+
{
|
|
1396
|
+
property: "line-height",
|
|
1397
|
+
value: { type: "unit", unit: "number", value: 1.15 }
|
|
1398
|
+
},
|
|
1399
|
+
{ property: "margin-top", value: { type: "unit", unit: "number", value: 0 } },
|
|
1400
|
+
{
|
|
1401
|
+
property: "margin-right",
|
|
1402
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1403
|
+
},
|
|
1404
|
+
{
|
|
1405
|
+
property: "margin-bottom",
|
|
1406
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
1409
|
+
property: "margin-left",
|
|
1410
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1411
|
+
},
|
|
1412
|
+
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } },
|
|
1413
|
+
{
|
|
1414
|
+
property: "border-top-width",
|
|
1415
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
property: "border-right-width",
|
|
1419
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1420
|
+
},
|
|
1421
|
+
{
|
|
1422
|
+
property: "border-bottom-width",
|
|
1423
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1424
|
+
},
|
|
1425
|
+
{
|
|
1426
|
+
property: "border-left-width",
|
|
1427
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1428
|
+
},
|
|
1429
|
+
{ property: "border-top-style", value: { type: "keyword", value: "solid" } },
|
|
1430
|
+
{
|
|
1431
|
+
property: "border-right-style",
|
|
1432
|
+
value: { type: "keyword", value: "solid" }
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
property: "border-bottom-style",
|
|
1436
|
+
value: { type: "keyword", value: "solid" }
|
|
1437
|
+
},
|
|
1438
|
+
{ property: "border-left-style", value: { type: "keyword", value: "solid" } },
|
|
1439
|
+
{ property: "text-transform", value: { type: "keyword", value: "none" } }
|
|
1440
|
+
];
|
|
1441
|
+
var select = button;
|
|
1442
|
+
var legend = [
|
|
1443
|
+
{
|
|
1444
|
+
property: "padding-top",
|
|
1445
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1446
|
+
},
|
|
1447
|
+
{
|
|
1448
|
+
property: "padding-right",
|
|
1449
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1450
|
+
},
|
|
1451
|
+
{
|
|
1452
|
+
property: "padding-bottom",
|
|
1453
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
property: "padding-left",
|
|
1457
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
1458
|
+
},
|
|
1459
|
+
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } },
|
|
1460
|
+
{
|
|
1461
|
+
property: "border-top-width",
|
|
1462
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
property: "border-right-width",
|
|
1466
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
property: "border-bottom-width",
|
|
1470
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
property: "border-left-width",
|
|
1474
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1475
|
+
}
|
|
1476
|
+
];
|
|
1477
|
+
var progress = [
|
|
1478
|
+
{ property: "vertical-align", value: { type: "keyword", value: "baseline" } },
|
|
1479
|
+
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } },
|
|
1480
|
+
{
|
|
1481
|
+
property: "border-top-width",
|
|
1482
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1483
|
+
},
|
|
1484
|
+
{
|
|
1485
|
+
property: "border-right-width",
|
|
1486
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1487
|
+
},
|
|
1488
|
+
{
|
|
1489
|
+
property: "border-bottom-width",
|
|
1490
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1491
|
+
},
|
|
1492
|
+
{
|
|
1493
|
+
property: "border-left-width",
|
|
1494
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1495
|
+
}
|
|
1496
|
+
];
|
|
1497
|
+
var summary = [
|
|
1498
|
+
{ property: "display", value: { type: "keyword", value: "list-item" } },
|
|
1499
|
+
{ property: "box-sizing", value: { type: "keyword", value: "border-box" } },
|
|
1500
|
+
{
|
|
1501
|
+
property: "border-top-width",
|
|
1502
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1503
|
+
},
|
|
1504
|
+
{
|
|
1505
|
+
property: "border-right-width",
|
|
1506
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1507
|
+
},
|
|
1508
|
+
{
|
|
1509
|
+
property: "border-bottom-width",
|
|
1510
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1511
|
+
},
|
|
1512
|
+
{
|
|
1513
|
+
property: "border-left-width",
|
|
1514
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1515
|
+
}
|
|
1516
|
+
];
|
|
1517
|
+
|
|
1518
|
+
// src/runtime.ts
|
|
1519
|
+
var tagProperty = "data-ws-tag";
|
|
1520
|
+
|
|
1521
|
+
// src/__generated__/tags.ts
|
|
1522
|
+
var tags = [
|
|
1523
|
+
"div",
|
|
1524
|
+
"span",
|
|
1525
|
+
"a",
|
|
1526
|
+
"abbr",
|
|
1527
|
+
"address",
|
|
1528
|
+
"area",
|
|
1529
|
+
"article",
|
|
1530
|
+
"aside",
|
|
1531
|
+
"audio",
|
|
1532
|
+
"b",
|
|
1533
|
+
"bdi",
|
|
1534
|
+
"bdo",
|
|
1535
|
+
"blockquote",
|
|
1536
|
+
"body",
|
|
1537
|
+
"br",
|
|
1538
|
+
"button",
|
|
1539
|
+
"canvas",
|
|
1540
|
+
"caption",
|
|
1541
|
+
"cite",
|
|
1542
|
+
"code",
|
|
1543
|
+
"col",
|
|
1544
|
+
"colgroup",
|
|
1545
|
+
"data",
|
|
1546
|
+
"datalist",
|
|
1547
|
+
"dd",
|
|
1548
|
+
"del",
|
|
1549
|
+
"details",
|
|
1550
|
+
"dfn",
|
|
1551
|
+
"dialog",
|
|
1552
|
+
"dl",
|
|
1553
|
+
"dt",
|
|
1554
|
+
"em",
|
|
1555
|
+
"embed",
|
|
1556
|
+
"fieldset",
|
|
1557
|
+
"figcaption",
|
|
1558
|
+
"figure",
|
|
1559
|
+
"footer",
|
|
1560
|
+
"form",
|
|
1561
|
+
"h1",
|
|
1562
|
+
"h2",
|
|
1563
|
+
"h3",
|
|
1564
|
+
"h4",
|
|
1565
|
+
"h5",
|
|
1566
|
+
"h6",
|
|
1567
|
+
"head",
|
|
1568
|
+
"header",
|
|
1569
|
+
"hgroup",
|
|
1570
|
+
"hr",
|
|
1571
|
+
"html",
|
|
1572
|
+
"i",
|
|
1573
|
+
"iframe",
|
|
1574
|
+
"img",
|
|
1575
|
+
"input",
|
|
1576
|
+
"ins",
|
|
1577
|
+
"kbd",
|
|
1578
|
+
"label",
|
|
1579
|
+
"legend",
|
|
1580
|
+
"li",
|
|
1581
|
+
"main",
|
|
1582
|
+
"map",
|
|
1583
|
+
"mark",
|
|
1584
|
+
"menu",
|
|
1585
|
+
"meter",
|
|
1586
|
+
"nav",
|
|
1587
|
+
"object",
|
|
1588
|
+
"ol",
|
|
1589
|
+
"optgroup",
|
|
1590
|
+
"option",
|
|
1591
|
+
"output",
|
|
1592
|
+
"p",
|
|
1593
|
+
"picture",
|
|
1594
|
+
"pre",
|
|
1595
|
+
"progress",
|
|
1596
|
+
"q",
|
|
1597
|
+
"rp",
|
|
1598
|
+
"rt",
|
|
1599
|
+
"ruby",
|
|
1600
|
+
"s",
|
|
1601
|
+
"samp",
|
|
1602
|
+
"search",
|
|
1603
|
+
"section",
|
|
1604
|
+
"select",
|
|
1605
|
+
"slot",
|
|
1606
|
+
"small",
|
|
1607
|
+
"source",
|
|
1608
|
+
"strong",
|
|
1609
|
+
"sub",
|
|
1610
|
+
"summary",
|
|
1611
|
+
"sup",
|
|
1612
|
+
"table",
|
|
1613
|
+
"tbody",
|
|
1614
|
+
"td",
|
|
1615
|
+
"textarea",
|
|
1616
|
+
"tfoot",
|
|
1617
|
+
"th",
|
|
1618
|
+
"thead",
|
|
1619
|
+
"time",
|
|
1620
|
+
"tr",
|
|
1621
|
+
"track",
|
|
1622
|
+
"u",
|
|
1623
|
+
"ul",
|
|
1624
|
+
"var",
|
|
1625
|
+
"video",
|
|
1626
|
+
"wbr"
|
|
1627
|
+
];
|
|
935
1628
|
|
|
936
1629
|
// src/core-metas.ts
|
|
937
1630
|
var rootComponent = "ws:root";
|
|
@@ -942,16 +1635,20 @@ var rootMeta = {
|
|
|
942
1635
|
html
|
|
943
1636
|
}
|
|
944
1637
|
};
|
|
945
|
-
var rootPropsMeta = {
|
|
946
|
-
props: {}
|
|
947
|
-
};
|
|
948
1638
|
var elementComponent = "ws:element";
|
|
949
1639
|
var elementMeta = {
|
|
950
1640
|
label: "Element",
|
|
951
|
-
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
props: {
|
|
1641
|
+
// convert [object Module] to [object Object] to enable structured cloning
|
|
1642
|
+
presetStyle: { ...normalize_css_exports },
|
|
1643
|
+
initialProps: [tagProperty, "id", "class"],
|
|
1644
|
+
props: {
|
|
1645
|
+
[tagProperty]: {
|
|
1646
|
+
type: "string",
|
|
1647
|
+
control: "tag",
|
|
1648
|
+
required: true,
|
|
1649
|
+
options: tags
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
955
1652
|
};
|
|
956
1653
|
var portalComponent = "Slot";
|
|
957
1654
|
var collectionComponent = "ws:collection";
|
|
@@ -961,17 +1658,15 @@ var collectionMeta = {
|
|
|
961
1658
|
contentModel: {
|
|
962
1659
|
category: "instance",
|
|
963
1660
|
children: ["instance"]
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
var collectionPropsMeta = {
|
|
1661
|
+
},
|
|
1662
|
+
initialProps: ["data"],
|
|
967
1663
|
props: {
|
|
968
1664
|
data: {
|
|
969
1665
|
required: true,
|
|
970
1666
|
control: "json",
|
|
971
1667
|
type: "json"
|
|
972
1668
|
}
|
|
973
|
-
}
|
|
974
|
-
initialProps: ["data"]
|
|
1669
|
+
}
|
|
975
1670
|
};
|
|
976
1671
|
var descendantComponent = "ws:descendant";
|
|
977
1672
|
var descendantMeta = {
|
|
@@ -982,9 +1677,8 @@ var descendantMeta = {
|
|
|
982
1677
|
children: []
|
|
983
1678
|
},
|
|
984
1679
|
// @todo infer possible presets
|
|
985
|
-
presetStyle: {}
|
|
986
|
-
|
|
987
|
-
var descendantPropsMeta = {
|
|
1680
|
+
presetStyle: {},
|
|
1681
|
+
initialProps: ["selector"],
|
|
988
1682
|
props: {
|
|
989
1683
|
selector: {
|
|
990
1684
|
required: true,
|
|
@@ -1009,8 +1703,7 @@ var descendantPropsMeta = {
|
|
|
1009
1703
|
" hr"
|
|
1010
1704
|
]
|
|
1011
1705
|
}
|
|
1012
|
-
}
|
|
1013
|
-
initialProps: ["selector"]
|
|
1706
|
+
}
|
|
1014
1707
|
};
|
|
1015
1708
|
var blockComponent = "ws:block";
|
|
1016
1709
|
var blockTemplateComponent = "ws:block-template";
|
|
@@ -1021,9 +1714,6 @@ var blockTemplateMeta = {
|
|
|
1021
1714
|
children: ["instance"]
|
|
1022
1715
|
}
|
|
1023
1716
|
};
|
|
1024
|
-
var blockTemplatePropsMeta = {
|
|
1025
|
-
props: {}
|
|
1026
|
-
};
|
|
1027
1717
|
var blockMeta = {
|
|
1028
1718
|
label: "Content Block",
|
|
1029
1719
|
icon: ContentBlockIcon,
|
|
@@ -1032,9 +1722,6 @@ var blockMeta = {
|
|
|
1032
1722
|
children: [blockTemplateComponent, "instance"]
|
|
1033
1723
|
}
|
|
1034
1724
|
};
|
|
1035
|
-
var blockPropsMeta = {
|
|
1036
|
-
props: {}
|
|
1037
|
-
};
|
|
1038
1725
|
var coreMetas = {
|
|
1039
1726
|
[rootComponent]: rootMeta,
|
|
1040
1727
|
[elementComponent]: elementMeta,
|
|
@@ -1043,14 +1730,6 @@ var coreMetas = {
|
|
|
1043
1730
|
[blockComponent]: blockMeta,
|
|
1044
1731
|
[blockTemplateComponent]: blockTemplateMeta
|
|
1045
1732
|
};
|
|
1046
|
-
var corePropsMetas = {
|
|
1047
|
-
[rootComponent]: rootPropsMeta,
|
|
1048
|
-
[elementComponent]: elementPropsMeta,
|
|
1049
|
-
[collectionComponent]: collectionPropsMeta,
|
|
1050
|
-
[descendantComponent]: descendantPropsMeta,
|
|
1051
|
-
[blockComponent]: blockPropsMeta,
|
|
1052
|
-
[blockTemplateComponent]: blockTemplatePropsMeta
|
|
1053
|
-
};
|
|
1054
1733
|
var isCoreComponent = (component) => component === rootComponent || component === elementComponent || component === collectionComponent || component === descendantComponent || component === blockComponent || component === blockTemplateComponent;
|
|
1055
1734
|
var isComponentDetachable = (component) => component !== rootComponent && component !== blockTemplateComponent && component !== descendantComponent;
|
|
1056
1735
|
|
|
@@ -1600,26 +2279,26 @@ var generateResources = ({
|
|
|
1600
2279
|
`;
|
|
1601
2280
|
generatedRequest += ` headers: [
|
|
1602
2281
|
`;
|
|
1603
|
-
for (const
|
|
2282
|
+
for (const header2 of resource.headers) {
|
|
1604
2283
|
const value = generateExpression({
|
|
1605
|
-
expression:
|
|
2284
|
+
expression: header2.value,
|
|
1606
2285
|
dataSources,
|
|
1607
2286
|
usedDataSources,
|
|
1608
2287
|
scope
|
|
1609
2288
|
});
|
|
1610
|
-
generatedRequest += ` { name: "${
|
|
2289
|
+
generatedRequest += ` { name: "${header2.name}", value: ${value} },
|
|
1611
2290
|
`;
|
|
1612
2291
|
}
|
|
1613
2292
|
generatedRequest += ` ],
|
|
1614
2293
|
`;
|
|
1615
2294
|
if (resource.body !== void 0 && resource.body.length > 0) {
|
|
1616
|
-
const
|
|
2295
|
+
const body2 = generateExpression({
|
|
1617
2296
|
expression: resource.body,
|
|
1618
2297
|
dataSources,
|
|
1619
2298
|
usedDataSources,
|
|
1620
2299
|
scope
|
|
1621
2300
|
});
|
|
1622
|
-
generatedRequest += ` body: ${
|
|
2301
|
+
generatedRequest += ` body: ${body2},
|
|
1623
2302
|
`;
|
|
1624
2303
|
}
|
|
1625
2304
|
generatedRequest += ` }
|
|
@@ -2144,7 +2823,6 @@ export {
|
|
|
2144
2823
|
collectionComponent,
|
|
2145
2824
|
componentCategories,
|
|
2146
2825
|
coreMetas,
|
|
2147
|
-
corePropsMetas,
|
|
2148
2826
|
createImageValueTransformer,
|
|
2149
2827
|
createScope,
|
|
2150
2828
|
decodeDataVariableId as decodeDataSourceVariable,
|
|
@@ -2189,6 +2867,7 @@ export {
|
|
|
2189
2867
|
scrollAnimationSchema,
|
|
2190
2868
|
stateCategories,
|
|
2191
2869
|
systemParameter,
|
|
2870
|
+
tags,
|
|
2192
2871
|
transpileExpression,
|
|
2193
2872
|
viewAnimationSchema
|
|
2194
2873
|
};
|