@webstudio-is/sdk 0.254.0 → 0.257.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 +5 -0
- package/lib/core-templates.js +6 -1
- package/lib/index.js +17 -20
- package/lib/types/schema/animation-schema.d.ts +3753 -14553
- package/lib/types/schema/component-meta.d.ts +693 -3093
- package/lib/types/schema/props.d.ts +2272 -9472
- package/lib/types/schema/styles.d.ts +384 -1704
- package/lib/types/schema/webstudio.d.ts +1404 -5964
- package/package.json +9 -6
|
@@ -31,6 +31,11 @@ var span = div;
|
|
|
31
31
|
var html = [
|
|
32
32
|
{ property: "display", value: { type: "keyword", value: "grid" } },
|
|
33
33
|
{ property: "min-height", value: { type: "unit", unit: "%", value: 100 } },
|
|
34
|
+
{ property: "grid-template-rows", value: { type: "keyword", value: "auto" } },
|
|
35
|
+
{
|
|
36
|
+
property: "grid-template-columns",
|
|
37
|
+
value: { type: "unit", unit: "fr", value: 1 }
|
|
38
|
+
},
|
|
34
39
|
{
|
|
35
40
|
property: "font-family",
|
|
36
41
|
value: { type: "fontFamily", value: ["Arial", "Roboto", "sans-serif"] }
|
package/lib/core-templates.js
CHANGED
|
@@ -114,6 +114,11 @@ var span = div;
|
|
|
114
114
|
var html = [
|
|
115
115
|
{ property: "display", value: { type: "keyword", value: "grid" } },
|
|
116
116
|
{ property: "min-height", value: { type: "unit", unit: "%", value: 100 } },
|
|
117
|
+
{ property: "grid-template-rows", value: { type: "keyword", value: "auto" } },
|
|
118
|
+
{
|
|
119
|
+
property: "grid-template-columns",
|
|
120
|
+
value: { type: "unit", unit: "fr", value: 1 }
|
|
121
|
+
},
|
|
117
122
|
{
|
|
118
123
|
property: "font-family",
|
|
119
124
|
value: { type: "fontFamily", value: ["Arial", "Roboto", "sans-serif"] }
|
|
@@ -554,7 +559,7 @@ var tags = [
|
|
|
554
559
|
// src/core-metas.ts
|
|
555
560
|
var rootComponent = "ws:root";
|
|
556
561
|
var rootMeta = {
|
|
557
|
-
label: "Global
|
|
562
|
+
label: "Global root",
|
|
558
563
|
icon: SettingsIcon,
|
|
559
564
|
presetStyle: {
|
|
560
565
|
html
|
package/lib/index.js
CHANGED
|
@@ -117,11 +117,10 @@ var DefaultPagePage = z2.string().refine((path) => path !== "", "Can't be empty"
|
|
|
117
117
|
var OldPagePath = z2.string().refine((path) => path !== "", "Can't be empty").refine((path) => path !== "/", "Can't be just a /").refine(
|
|
118
118
|
(path) => path === "" || path.startsWith("/"),
|
|
119
119
|
"Must start with a / or a full URL e.g. https://website.org"
|
|
120
|
-
).refine((path) => path.endsWith("/") === false, "Can't end with a /").refine((path) => path.includes("//") === false, "Can't contain repeating /").refine(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
).refine(
|
|
120
|
+
).refine((path) => path.endsWith("/") === false, "Can't end with a /").refine((path) => path.includes("//") === false, "Can't contain repeating /").refine((path) => {
|
|
121
|
+
const disallowedChars = /[\s<>"{}|\\^`[\]\u0000-\u001f\u007f]/;
|
|
122
|
+
return !disallowedChars.test(path);
|
|
123
|
+
}, "Path contains invalid characters (spaces or URL-unsafe characters are not allowed)").refine(
|
|
125
124
|
(path) => path !== "/s" && path.startsWith("/s/") === false,
|
|
126
125
|
"/s prefix is reserved for the system"
|
|
127
126
|
).refine(
|
|
@@ -143,7 +142,7 @@ var ProjectMeta = z2.object({
|
|
|
143
142
|
faviconAssetId: z2.string().optional(),
|
|
144
143
|
code: z2.string().optional()
|
|
145
144
|
});
|
|
146
|
-
var ProjectNewRedirectPath = z2.string().refine((data) => {
|
|
145
|
+
var ProjectNewRedirectPath = z2.string().min(1, "Path is required").refine((data) => {
|
|
147
146
|
try {
|
|
148
147
|
new URL(data, "http://url.com");
|
|
149
148
|
return true;
|
|
@@ -594,12 +593,11 @@ var Breakpoint = z8.object({
|
|
|
594
593
|
if (condition !== void 0) {
|
|
595
594
|
return minWidth === void 0 && maxWidth === void 0;
|
|
596
595
|
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
}, "Either minWidth, maxWidth, or condition should be defined, but not both");
|
|
596
|
+
if (minWidth !== void 0 && maxWidth !== void 0) {
|
|
597
|
+
return minWidth < maxWidth;
|
|
598
|
+
}
|
|
599
|
+
return true;
|
|
600
|
+
}, "Width-based (minWidth/maxWidth) and condition are mutually exclusive, and minWidth must be less than maxWidth");
|
|
603
601
|
var Breakpoints = z8.map(BreakpointId, Breakpoint);
|
|
604
602
|
var initialBreakpoints = [
|
|
605
603
|
{ id: "placeholder", label: "Base" },
|
|
@@ -1338,6 +1336,11 @@ var span = div;
|
|
|
1338
1336
|
var html = [
|
|
1339
1337
|
{ property: "display", value: { type: "keyword", value: "grid" } },
|
|
1340
1338
|
{ property: "min-height", value: { type: "unit", unit: "%", value: 100 } },
|
|
1339
|
+
{ property: "grid-template-rows", value: { type: "keyword", value: "auto" } },
|
|
1340
|
+
{
|
|
1341
|
+
property: "grid-template-columns",
|
|
1342
|
+
value: { type: "unit", unit: "fr", value: 1 }
|
|
1343
|
+
},
|
|
1341
1344
|
{
|
|
1342
1345
|
property: "font-family",
|
|
1343
1346
|
value: { type: "fontFamily", value: ["Arial", "Roboto", "sans-serif"] }
|
|
@@ -1778,7 +1781,7 @@ var tags = [
|
|
|
1778
1781
|
// src/core-metas.ts
|
|
1779
1782
|
var rootComponent = "ws:root";
|
|
1780
1783
|
var rootMeta = {
|
|
1781
|
-
label: "Global
|
|
1784
|
+
label: "Global root",
|
|
1782
1785
|
icon: SettingsIcon,
|
|
1783
1786
|
presetStyle: {
|
|
1784
1787
|
html
|
|
@@ -2009,13 +2012,7 @@ var allowedStringMethods = /* @__PURE__ */ new Set([
|
|
|
2009
2012
|
"toLocaleLowerCase",
|
|
2010
2013
|
"toLocaleUpperCase"
|
|
2011
2014
|
]);
|
|
2012
|
-
var allowedArrayMethods = /* @__PURE__ */ new Set([
|
|
2013
|
-
"at",
|
|
2014
|
-
"includes",
|
|
2015
|
-
"join",
|
|
2016
|
-
"slice",
|
|
2017
|
-
"filter"
|
|
2018
|
-
]);
|
|
2015
|
+
var allowedArrayMethods = /* @__PURE__ */ new Set(["at", "includes", "join", "slice"]);
|
|
2019
2016
|
var lintExpression = ({
|
|
2020
2017
|
expression,
|
|
2021
2018
|
availableVariables = /* @__PURE__ */ new Set(),
|