@webstudio-is/sdk-components-react 0.195.0 → 0.196.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/blockquote.ws.js +2 -8
- package/lib/button.template.js +11 -0
- package/lib/button.ws.js +1 -17
- package/lib/code-text.ws.js +5 -5
- package/lib/heading.ws.js +7 -13
- package/lib/link.ws.js +1 -11
- package/lib/list-item.ws.js +7 -13
- package/lib/list.template.js +15 -0
- package/lib/list.ws.js +10 -54
- package/lib/paragraph.ws.js +10 -16
- package/lib/separator.ws.js +1 -1
- package/lib/templates.js +8 -0
- package/lib/text.ws.js +5 -5
- package/lib/time.ws.js +4 -5
- package/lib/types/button.template.d.ts +2 -0
- package/lib/types/list.template.d.ts +2 -0
- package/lib/types/templates.d.ts +3 -0
- package/lib/types/vimeo.template.d.ts +2 -0
- package/lib/vimeo.template.js +92 -0
- package/lib/vimeo.ws.js +15 -304
- package/package.json +12 -6
package/lib/blockquote.ws.js
CHANGED
|
@@ -49,7 +49,7 @@ const r = {
|
|
|
49
49
|
}
|
|
50
50
|
]
|
|
51
51
|
}, i = {
|
|
52
|
-
category: "
|
|
52
|
+
category: "typography",
|
|
53
53
|
type: "container",
|
|
54
54
|
description: "Use to style a quote from an external source like an article or book.",
|
|
55
55
|
icon: e,
|
|
@@ -60,13 +60,7 @@ const r = {
|
|
|
60
60
|
{
|
|
61
61
|
type: "instance",
|
|
62
62
|
component: "Blockquote",
|
|
63
|
-
children: [
|
|
64
|
-
{
|
|
65
|
-
type: "text",
|
|
66
|
-
value: "Blockquote text you can edit",
|
|
67
|
-
placeholder: !0
|
|
68
|
-
}
|
|
69
|
-
]
|
|
63
|
+
children: []
|
|
70
64
|
}
|
|
71
65
|
]
|
|
72
66
|
}, n = {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { $ as o, PlaceholderValue as e } from "@webstudio-is/template";
|
|
3
|
+
const n = {
|
|
4
|
+
category: "forms",
|
|
5
|
+
order: 2,
|
|
6
|
+
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’s what a link is used for.",
|
|
7
|
+
template: /* @__PURE__ */ t(o.Button, { children: new e("Button text you can edit") })
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
n as meta
|
|
11
|
+
};
|
package/lib/button.ws.js
CHANGED
|
@@ -5,33 +5,17 @@ import { props as n } from "./__generated__/button.props.js";
|
|
|
5
5
|
const a = {
|
|
6
6
|
button: o
|
|
7
7
|
}, p = {
|
|
8
|
-
|
|
8
|
+
icon: t,
|
|
9
9
|
type: "container",
|
|
10
10
|
constraints: {
|
|
11
11
|
relation: "ancestor",
|
|
12
12
|
component: { $nin: ["Button", "Link"] }
|
|
13
13
|
},
|
|
14
|
-
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’s what a link is used for.",
|
|
15
|
-
icon: t,
|
|
16
14
|
presetStyle: a,
|
|
17
15
|
states: [
|
|
18
16
|
...e,
|
|
19
17
|
{ selector: ":disabled", label: "Disabled" },
|
|
20
18
|
{ selector: ":enabled", label: "Enabled" }
|
|
21
|
-
],
|
|
22
|
-
order: 2,
|
|
23
|
-
template: [
|
|
24
|
-
{
|
|
25
|
-
type: "instance",
|
|
26
|
-
component: "Button",
|
|
27
|
-
children: [
|
|
28
|
-
{
|
|
29
|
-
type: "text",
|
|
30
|
-
value: "Button text you can edit",
|
|
31
|
-
placeholder: !0
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
19
|
]
|
|
36
20
|
}, c = {
|
|
37
21
|
props: n,
|
package/lib/code-text.ws.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BracesIcon as e } from "@webstudio-is/icons/svg";
|
|
2
2
|
import { defaultStates as t } from "@webstudio-is/react-sdk";
|
|
3
3
|
import { code as o } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as r } from "./__generated__/code-text.props.js";
|
|
@@ -30,7 +30,7 @@ const p = {
|
|
|
30
30
|
value: { type: "rgb", r: 238, g: 238, b: 238, alpha: 1 }
|
|
31
31
|
}
|
|
32
32
|
]
|
|
33
|
-
},
|
|
33
|
+
}, s = {
|
|
34
34
|
category: "general",
|
|
35
35
|
type: "embed",
|
|
36
36
|
description: "Use this component when you want to display code as text on the page.",
|
|
@@ -42,7 +42,7 @@ const p = {
|
|
|
42
42
|
states: t,
|
|
43
43
|
presetStyle: p,
|
|
44
44
|
order: 9
|
|
45
|
-
},
|
|
45
|
+
}, d = {
|
|
46
46
|
props: {
|
|
47
47
|
...r,
|
|
48
48
|
code: {
|
|
@@ -54,6 +54,6 @@ const p = {
|
|
|
54
54
|
initialProps: ["id", "className", "lang", "code"]
|
|
55
55
|
};
|
|
56
56
|
export {
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
s as meta,
|
|
58
|
+
d as propsMeta
|
|
59
59
|
};
|
package/lib/heading.ws.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { HeadingIcon as t } from "@webstudio-is/icons/svg";
|
|
2
2
|
import { defaultStates as e } from "@webstudio-is/react-sdk";
|
|
3
|
-
import { h1 as
|
|
3
|
+
import { h1 as o, h2 as n, h3 as r, h4 as a, h5 as i, h6 as s } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as p } from "./__generated__/heading.props.js";
|
|
5
5
|
const c = {
|
|
6
|
-
h1:
|
|
7
|
-
h2:
|
|
8
|
-
h3:
|
|
9
|
-
h4:
|
|
6
|
+
h1: o,
|
|
7
|
+
h2: n,
|
|
8
|
+
h3: r,
|
|
9
|
+
h4: a,
|
|
10
10
|
h5: i,
|
|
11
11
|
h6: s
|
|
12
12
|
}, l = {
|
|
13
|
-
category: "
|
|
13
|
+
category: "typography",
|
|
14
14
|
type: "container",
|
|
15
15
|
description: "Use HTML headings to structure and organize content. Use the Tag property in settings to change the heading level (h1-h6).",
|
|
16
16
|
icon: t,
|
|
@@ -25,13 +25,7 @@ const c = {
|
|
|
25
25
|
{
|
|
26
26
|
type: "instance",
|
|
27
27
|
component: "Heading",
|
|
28
|
-
children: [
|
|
29
|
-
{
|
|
30
|
-
type: "text",
|
|
31
|
-
value: "Heading text you can edit",
|
|
32
|
-
placeholder: !0
|
|
33
|
-
}
|
|
34
|
-
]
|
|
28
|
+
children: []
|
|
35
29
|
}
|
|
36
30
|
]
|
|
37
31
|
}, y = {
|
package/lib/link.ws.js
CHANGED
|
@@ -5,10 +5,6 @@ import { props as o } from "./__generated__/link.props.js";
|
|
|
5
5
|
const n = {
|
|
6
6
|
a: [
|
|
7
7
|
...r,
|
|
8
|
-
{
|
|
9
|
-
property: "minHeight",
|
|
10
|
-
value: { type: "unit", unit: "em", value: 1 }
|
|
11
|
-
},
|
|
12
8
|
{
|
|
13
9
|
property: "display",
|
|
14
10
|
value: { type: "keyword", value: "inline-block" }
|
|
@@ -41,13 +37,7 @@ const n = {
|
|
|
41
37
|
{
|
|
42
38
|
type: "instance",
|
|
43
39
|
component: "Link",
|
|
44
|
-
children: [
|
|
45
|
-
{
|
|
46
|
-
type: "text",
|
|
47
|
-
value: "Link text you can edit",
|
|
48
|
-
placeholder: !0
|
|
49
|
-
}
|
|
50
|
-
]
|
|
40
|
+
children: []
|
|
51
41
|
}
|
|
52
42
|
]
|
|
53
43
|
}, c = {
|
package/lib/list-item.ws.js
CHANGED
|
@@ -4,8 +4,8 @@ import { li as o } from "@webstudio-is/sdk/normalize.css";
|
|
|
4
4
|
import { props as i } from "./__generated__/list-item.props.js";
|
|
5
5
|
const n = {
|
|
6
6
|
li: o
|
|
7
|
-
},
|
|
8
|
-
category: "
|
|
7
|
+
}, m = {
|
|
8
|
+
category: "typography",
|
|
9
9
|
type: "container",
|
|
10
10
|
constraints: {
|
|
11
11
|
// cannot use parent relation here
|
|
@@ -18,25 +18,19 @@ const n = {
|
|
|
18
18
|
icon: t,
|
|
19
19
|
states: e,
|
|
20
20
|
presetStyle: n,
|
|
21
|
-
order:
|
|
21
|
+
order: 5,
|
|
22
22
|
template: [
|
|
23
23
|
{
|
|
24
24
|
type: "instance",
|
|
25
25
|
component: "ListItem",
|
|
26
|
-
children: [
|
|
27
|
-
{
|
|
28
|
-
type: "text",
|
|
29
|
-
value: "List Item text you can edit",
|
|
30
|
-
placeholder: !0
|
|
31
|
-
}
|
|
32
|
-
]
|
|
26
|
+
children: []
|
|
33
27
|
}
|
|
34
28
|
]
|
|
35
|
-
},
|
|
29
|
+
}, c = {
|
|
36
30
|
props: i,
|
|
37
31
|
initialProps: ["id", "className"]
|
|
38
32
|
};
|
|
39
33
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
m as meta,
|
|
35
|
+
c as propsMeta
|
|
42
36
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { $ as e, PlaceholderValue as i } from "@webstudio-is/template";
|
|
3
|
+
const s = {
|
|
4
|
+
category: "typography",
|
|
5
|
+
description: "Groups content, like links in a menu or steps in a recipe.",
|
|
6
|
+
order: 4,
|
|
7
|
+
template: /* @__PURE__ */ n(e.List, { children: [
|
|
8
|
+
/* @__PURE__ */ t(e.ListItem, { children: new i("List Item text you can edit") }),
|
|
9
|
+
/* @__PURE__ */ t(e.ListItem, { children: new i("List Item text you can edit") }),
|
|
10
|
+
/* @__PURE__ */ t(e.ListItem, { children: new i("List Item text you can edit") })
|
|
11
|
+
] })
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
s as meta
|
|
15
|
+
};
|
package/lib/list.ws.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ListIcon as e } from "@webstudio-is/icons/svg";
|
|
2
|
-
import { defaultStates as
|
|
3
|
-
import { ol as
|
|
2
|
+
import { defaultStates as r } from "@webstudio-is/react-sdk";
|
|
3
|
+
import { ol as t, ul as o } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as p } from "./__generated__/list.props.js";
|
|
5
5
|
const a = {
|
|
6
6
|
ol: [
|
|
7
|
-
...
|
|
7
|
+
...t,
|
|
8
8
|
{
|
|
9
9
|
property: "marginTop",
|
|
10
10
|
value: { type: "keyword", value: "0" }
|
|
@@ -19,7 +19,7 @@ const a = {
|
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
ul: [
|
|
22
|
-
...
|
|
22
|
+
...o,
|
|
23
23
|
{
|
|
24
24
|
property: "marginTop",
|
|
25
25
|
value: { type: "keyword", value: "0" }
|
|
@@ -33,60 +33,16 @@ const a = {
|
|
|
33
33
|
value: { type: "keyword", value: "40px" }
|
|
34
34
|
}
|
|
35
35
|
]
|
|
36
|
-
},
|
|
37
|
-
category: "general",
|
|
36
|
+
}, d = {
|
|
38
37
|
type: "container",
|
|
39
|
-
description: "Groups content, like links in a menu or steps in a recipe.",
|
|
40
38
|
icon: e,
|
|
41
|
-
states:
|
|
42
|
-
presetStyle: a
|
|
43
|
-
|
|
44
|
-
template: [
|
|
45
|
-
{
|
|
46
|
-
type: "instance",
|
|
47
|
-
component: "List",
|
|
48
|
-
children: [
|
|
49
|
-
{
|
|
50
|
-
type: "instance",
|
|
51
|
-
component: "ListItem",
|
|
52
|
-
children: [
|
|
53
|
-
{
|
|
54
|
-
type: "text",
|
|
55
|
-
value: "List Item text you can edit",
|
|
56
|
-
placeholder: !0
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
type: "instance",
|
|
62
|
-
component: "ListItem",
|
|
63
|
-
children: [
|
|
64
|
-
{
|
|
65
|
-
type: "text",
|
|
66
|
-
value: "List Item text you can edit",
|
|
67
|
-
placeholder: !0
|
|
68
|
-
}
|
|
69
|
-
]
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
type: "instance",
|
|
73
|
-
component: "ListItem",
|
|
74
|
-
children: [
|
|
75
|
-
{
|
|
76
|
-
type: "text",
|
|
77
|
-
value: "List Item text you can edit",
|
|
78
|
-
placeholder: !0
|
|
79
|
-
}
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
]
|
|
85
|
-
}, c = {
|
|
39
|
+
states: r,
|
|
40
|
+
presetStyle: a
|
|
41
|
+
}, s = {
|
|
86
42
|
props: p,
|
|
87
43
|
initialProps: ["id", "className", "ordered", "start", "reversed"]
|
|
88
44
|
};
|
|
89
45
|
export {
|
|
90
|
-
|
|
91
|
-
|
|
46
|
+
d as meta,
|
|
47
|
+
s as propsMeta
|
|
92
48
|
};
|
package/lib/paragraph.ws.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { TextAlignLeftIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
-
import { defaultStates as
|
|
3
|
-
import { p as
|
|
2
|
+
import { defaultStates as o } from "@webstudio-is/react-sdk";
|
|
3
|
+
import { p as e } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as r } from "./__generated__/paragraph.props.js";
|
|
5
|
-
const
|
|
6
|
-
p:
|
|
7
|
-
},
|
|
8
|
-
category: "
|
|
5
|
+
const n = {
|
|
6
|
+
p: e
|
|
7
|
+
}, c = {
|
|
8
|
+
category: "typography",
|
|
9
9
|
type: "container",
|
|
10
10
|
description: "A container for multi-line text.",
|
|
11
11
|
icon: t,
|
|
@@ -13,20 +13,14 @@ const a = {
|
|
|
13
13
|
relation: "ancestor",
|
|
14
14
|
component: { $neq: "Paragraph" }
|
|
15
15
|
},
|
|
16
|
-
states:
|
|
17
|
-
presetStyle:
|
|
16
|
+
states: o,
|
|
17
|
+
presetStyle: n,
|
|
18
18
|
order: 2,
|
|
19
19
|
template: [
|
|
20
20
|
{
|
|
21
21
|
type: "instance",
|
|
22
22
|
component: "Paragraph",
|
|
23
|
-
children: [
|
|
24
|
-
{
|
|
25
|
-
type: "text",
|
|
26
|
-
value: "Paragraph text you can edit",
|
|
27
|
-
placeholder: !0
|
|
28
|
-
}
|
|
29
|
-
]
|
|
23
|
+
children: []
|
|
30
24
|
}
|
|
31
25
|
]
|
|
32
26
|
}, m = {
|
|
@@ -34,6 +28,6 @@ const a = {
|
|
|
34
28
|
initialProps: ["id", "className"]
|
|
35
29
|
};
|
|
36
30
|
export {
|
|
37
|
-
|
|
31
|
+
c as meta,
|
|
38
32
|
m as propsMeta
|
|
39
33
|
};
|
package/lib/separator.ws.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MinusIcon as e } from "@webstudio-is/icons/svg";
|
|
2
2
|
import { defaultStates as o } from "@webstudio-is/react-sdk";
|
|
3
3
|
import { hr as r } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as t } from "./__generated__/separator.props.js";
|
package/lib/templates.js
ADDED
package/lib/text.ws.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TextIcon as t } from "@webstudio-is/icons/svg";
|
|
2
2
|
import { defaultStates as e } from "@webstudio-is/react-sdk";
|
|
3
3
|
import { div as o } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
-
import { props as
|
|
5
|
-
const
|
|
4
|
+
import { props as r } from "./__generated__/text.props.js";
|
|
5
|
+
const n = {
|
|
6
6
|
div: [
|
|
7
7
|
...o,
|
|
8
8
|
{
|
|
@@ -11,12 +11,12 @@ const r = {
|
|
|
11
11
|
}
|
|
12
12
|
]
|
|
13
13
|
}, s = {
|
|
14
|
-
category: "
|
|
14
|
+
category: "typography",
|
|
15
15
|
type: "container",
|
|
16
16
|
description: "A generic container for any text content that is not a heading or a link.",
|
|
17
17
|
icon: t,
|
|
18
18
|
states: e,
|
|
19
|
-
presetStyle:
|
|
19
|
+
presetStyle: n,
|
|
20
20
|
order: 0,
|
|
21
21
|
template: [
|
|
22
22
|
{
|
|
@@ -32,7 +32,7 @@ const r = {
|
|
|
32
32
|
}
|
|
33
33
|
]
|
|
34
34
|
}, m = {
|
|
35
|
-
props:
|
|
35
|
+
props: r,
|
|
36
36
|
initialProps: ["id", "className", "tag"]
|
|
37
37
|
};
|
|
38
38
|
export {
|
package/lib/time.ws.js
CHANGED
|
@@ -5,18 +5,17 @@ import { props as o } from "./__generated__/time.props.js";
|
|
|
5
5
|
const r = {
|
|
6
6
|
time: a
|
|
7
7
|
}, s = {
|
|
8
|
-
category: "
|
|
8
|
+
category: "localization",
|
|
9
9
|
type: "container",
|
|
10
10
|
description: "Converts machine-readable date and time to a human-readable format.",
|
|
11
11
|
icon: t,
|
|
12
12
|
states: e,
|
|
13
|
-
presetStyle: r
|
|
14
|
-
|
|
15
|
-
}, d = {
|
|
13
|
+
presetStyle: r
|
|
14
|
+
}, c = {
|
|
16
15
|
props: o,
|
|
17
16
|
initialProps: ["datetime", "language", "country", "dateStyle", "timeStyle"]
|
|
18
17
|
};
|
|
19
18
|
export {
|
|
20
19
|
s as meta,
|
|
21
|
-
|
|
20
|
+
c as propsMeta
|
|
22
21
|
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { SpinnerIcon as r, PlayIcon as a } from "@webstudio-is/icons/svg";
|
|
3
|
+
import { $ as e, css as t } from "@webstudio-is/template";
|
|
4
|
+
const p = {
|
|
5
|
+
category: "media",
|
|
6
|
+
order: 1,
|
|
7
|
+
description: "Add a video to your page that is hosted on Vimeo. Paste a Vimeo URL and configure the video in the Settings tab.",
|
|
8
|
+
template: /* @__PURE__ */ i(
|
|
9
|
+
e.Vimeo,
|
|
10
|
+
{
|
|
11
|
+
"ws:style": t`
|
|
12
|
+
position: relative;
|
|
13
|
+
aspect-ratio: 640/360;
|
|
14
|
+
width: 100%;
|
|
15
|
+
`,
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ o(
|
|
18
|
+
e.VimeoPreviewImage,
|
|
19
|
+
{
|
|
20
|
+
"ws:style": t`
|
|
21
|
+
position: absolute;
|
|
22
|
+
object-fit: cover;
|
|
23
|
+
object-position: cover;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
border-radius: 20px;
|
|
27
|
+
`,
|
|
28
|
+
alt: "Vimeo video preview image",
|
|
29
|
+
sizes: "100vw"
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ o(
|
|
33
|
+
e.VimeoSpinner,
|
|
34
|
+
{
|
|
35
|
+
"ws:label": "Spinner",
|
|
36
|
+
"ws:style": t`
|
|
37
|
+
position: absolute;
|
|
38
|
+
top: 50%;
|
|
39
|
+
left: 50%;
|
|
40
|
+
width: 70px;
|
|
41
|
+
height: 70px;
|
|
42
|
+
margin-top: -35px;
|
|
43
|
+
margin-left: -35px;
|
|
44
|
+
`,
|
|
45
|
+
children: /* @__PURE__ */ o(e.HtmlEmbed, { "ws:label": "Spinner SVG", code: r })
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ o(
|
|
49
|
+
e.VimeoPlayButton,
|
|
50
|
+
{
|
|
51
|
+
"ws:style": t`
|
|
52
|
+
position: absolute;
|
|
53
|
+
width: 140px;
|
|
54
|
+
height: 80px;
|
|
55
|
+
top: 50%;
|
|
56
|
+
left: 50%;
|
|
57
|
+
margin-top: -40px;
|
|
58
|
+
margin-left: -70px;
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
border-style: none;
|
|
63
|
+
border-radius: 5px;
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
background-color: rgb(18, 18, 18);
|
|
66
|
+
color: rgb(255, 255, 255);
|
|
67
|
+
&:hover {
|
|
68
|
+
background-color: rgb(0, 173, 239);
|
|
69
|
+
}
|
|
70
|
+
`,
|
|
71
|
+
"aria-label": "Play button",
|
|
72
|
+
children: /* @__PURE__ */ o(
|
|
73
|
+
e.Box,
|
|
74
|
+
{
|
|
75
|
+
"ws:label": "Play Icon",
|
|
76
|
+
"ws:style": t`
|
|
77
|
+
width: 60px;
|
|
78
|
+
height: 60px;
|
|
79
|
+
`,
|
|
80
|
+
"aria-hidden": !0,
|
|
81
|
+
children: /* @__PURE__ */ o(e.HtmlEmbed, { "ws:label": "Play SVG", code: a })
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
};
|
|
90
|
+
export {
|
|
91
|
+
p as meta
|
|
92
|
+
};
|
package/lib/vimeo.ws.js
CHANGED
|
@@ -1,308 +1,19 @@
|
|
|
1
|
-
import { VimeoIcon as
|
|
2
|
-
import { defaultStates as
|
|
1
|
+
import { VimeoIcon as o } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { defaultStates as t } from "@webstudio-is/react-sdk";
|
|
3
3
|
import { div as r } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
-
import { props as
|
|
5
|
-
const
|
|
4
|
+
import { props as n } from "./__generated__/vimeo.props.js";
|
|
5
|
+
const i = {
|
|
6
6
|
div: r
|
|
7
|
-
},
|
|
8
|
-
category: "media",
|
|
7
|
+
}, c = {
|
|
9
8
|
type: "container",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
states: o,
|
|
14
|
-
presetStyle: n,
|
|
9
|
+
icon: o,
|
|
10
|
+
states: t,
|
|
11
|
+
presetStyle: i,
|
|
15
12
|
constraints: {
|
|
16
13
|
relation: "ancestor",
|
|
17
14
|
component: { $nin: ["Button", "Link", "Heading"] }
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
{
|
|
21
|
-
type: "instance",
|
|
22
|
-
component: "Vimeo",
|
|
23
|
-
styles: [
|
|
24
|
-
{
|
|
25
|
-
property: "position",
|
|
26
|
-
value: { type: "keyword", value: "relative" }
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
property: "aspectRatio",
|
|
30
|
-
value: { type: "keyword", value: "640/360" }
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
property: "width",
|
|
34
|
-
value: { type: "unit", value: 100, unit: "%" }
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
children: [
|
|
38
|
-
{
|
|
39
|
-
type: "instance",
|
|
40
|
-
component: "VimeoPreviewImage",
|
|
41
|
-
styles: [
|
|
42
|
-
{
|
|
43
|
-
property: "position",
|
|
44
|
-
value: { type: "keyword", value: "absolute" }
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
property: "objectFit",
|
|
48
|
-
value: { type: "keyword", value: "cover" }
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
property: "width",
|
|
52
|
-
value: { type: "unit", value: 100, unit: "%" }
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
property: "height",
|
|
56
|
-
value: { type: "unit", value: 100, unit: "%" }
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
property: "borderTopLeftRadius",
|
|
60
|
-
value: { type: "unit", value: 20, unit: "px" }
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
property: "borderTopRightRadius",
|
|
64
|
-
value: { type: "unit", value: 20, unit: "px" }
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
property: "borderBottomLeftRadius",
|
|
68
|
-
value: { type: "unit", value: 20, unit: "px" }
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
property: "borderBottomRightRadius",
|
|
72
|
-
value: { type: "unit", value: 20, unit: "px" }
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
property: "objectPosition",
|
|
76
|
-
value: { type: "keyword", value: "cover" }
|
|
77
|
-
}
|
|
78
|
-
],
|
|
79
|
-
children: [],
|
|
80
|
-
props: [
|
|
81
|
-
{
|
|
82
|
-
type: "string",
|
|
83
|
-
name: "alt",
|
|
84
|
-
value: "Vimeo video preview image"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
type: "string",
|
|
88
|
-
name: "sizes",
|
|
89
|
-
value: "100vw"
|
|
90
|
-
}
|
|
91
|
-
]
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
type: "instance",
|
|
95
|
-
component: "VimeoSpinner",
|
|
96
|
-
label: "Spinner",
|
|
97
|
-
styles: [
|
|
98
|
-
{
|
|
99
|
-
property: "position",
|
|
100
|
-
value: { type: "keyword", value: "absolute" }
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
property: "top",
|
|
104
|
-
value: { type: "unit", value: 50, unit: "%" }
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
property: "left",
|
|
108
|
-
value: { type: "unit", value: 50, unit: "%" }
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
property: "width",
|
|
112
|
-
value: { type: "unit", value: 70, unit: "px" }
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
property: "height",
|
|
116
|
-
value: { type: "unit", value: 70, unit: "px" }
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
property: "marginTop",
|
|
120
|
-
value: { type: "unit", value: -35, unit: "px" }
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
property: "marginLeft",
|
|
124
|
-
value: { type: "unit", value: -35, unit: "px" }
|
|
125
|
-
}
|
|
126
|
-
],
|
|
127
|
-
children: [
|
|
128
|
-
{
|
|
129
|
-
type: "instance",
|
|
130
|
-
component: "HtmlEmbed",
|
|
131
|
-
label: "Spinner SVG",
|
|
132
|
-
props: [
|
|
133
|
-
{
|
|
134
|
-
type: "string",
|
|
135
|
-
name: "code",
|
|
136
|
-
value: t
|
|
137
|
-
}
|
|
138
|
-
],
|
|
139
|
-
children: []
|
|
140
|
-
}
|
|
141
|
-
]
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
type: "instance",
|
|
145
|
-
component: "VimeoPlayButton",
|
|
146
|
-
props: [
|
|
147
|
-
{
|
|
148
|
-
type: "string",
|
|
149
|
-
name: "aria-label",
|
|
150
|
-
value: "Play button"
|
|
151
|
-
}
|
|
152
|
-
],
|
|
153
|
-
styles: [
|
|
154
|
-
{
|
|
155
|
-
property: "position",
|
|
156
|
-
value: { type: "keyword", value: "absolute" }
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
property: "width",
|
|
160
|
-
value: { type: "unit", value: 140, unit: "px" }
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
property: "height",
|
|
164
|
-
value: { type: "unit", value: 80, unit: "px" }
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
property: "top",
|
|
168
|
-
value: { type: "unit", value: 50, unit: "%" }
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
property: "left",
|
|
172
|
-
value: { type: "unit", value: 50, unit: "%" }
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
property: "marginTop",
|
|
176
|
-
value: { type: "unit", value: -40, unit: "px" }
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
property: "marginLeft",
|
|
180
|
-
value: { type: "unit", value: -70, unit: "px" }
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
property: "display",
|
|
184
|
-
value: { type: "keyword", value: "flex" }
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
property: "alignItems",
|
|
188
|
-
value: { type: "keyword", value: "center" }
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
property: "justifyContent",
|
|
192
|
-
value: { type: "keyword", value: "center" }
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
property: "borderTopStyle",
|
|
196
|
-
value: { type: "keyword", value: "none" }
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
property: "borderRightStyle",
|
|
200
|
-
value: { type: "keyword", value: "none" }
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
property: "borderBottomStyle",
|
|
204
|
-
value: { type: "keyword", value: "none" }
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
property: "borderLeftStyle",
|
|
208
|
-
value: { type: "keyword", value: "none" }
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
property: "borderTopLeftRadius",
|
|
212
|
-
value: { type: "unit", value: 5, unit: "px" }
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
property: "borderTopRightRadius",
|
|
216
|
-
value: { type: "unit", value: 5, unit: "px" }
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
property: "borderBottomLeftRadius",
|
|
220
|
-
value: { type: "unit", value: 5, unit: "px" }
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
property: "borderBottomRightRadius",
|
|
224
|
-
value: { type: "unit", value: 5, unit: "px" }
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
property: "cursor",
|
|
228
|
-
value: { type: "keyword", value: "pointer" }
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
property: "backgroundColor",
|
|
232
|
-
value: {
|
|
233
|
-
type: "rgb",
|
|
234
|
-
r: 18,
|
|
235
|
-
g: 18,
|
|
236
|
-
b: 18,
|
|
237
|
-
alpha: 1
|
|
238
|
-
}
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
property: "color",
|
|
242
|
-
value: {
|
|
243
|
-
type: "rgb",
|
|
244
|
-
r: 255,
|
|
245
|
-
g: 255,
|
|
246
|
-
b: 255,
|
|
247
|
-
alpha: 1
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
state: ":hover",
|
|
252
|
-
property: "backgroundColor",
|
|
253
|
-
value: {
|
|
254
|
-
type: "rgb",
|
|
255
|
-
r: 0,
|
|
256
|
-
g: 173,
|
|
257
|
-
b: 239,
|
|
258
|
-
alpha: 1
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
],
|
|
262
|
-
children: [
|
|
263
|
-
{
|
|
264
|
-
type: "instance",
|
|
265
|
-
component: "Box",
|
|
266
|
-
label: "Play Icon",
|
|
267
|
-
styles: [
|
|
268
|
-
{
|
|
269
|
-
property: "width",
|
|
270
|
-
value: { type: "unit", value: 60, unit: "px" }
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
property: "height",
|
|
274
|
-
value: { type: "unit", value: 60, unit: "px" }
|
|
275
|
-
}
|
|
276
|
-
],
|
|
277
|
-
props: [
|
|
278
|
-
{
|
|
279
|
-
type: "string",
|
|
280
|
-
name: "aria-hidden",
|
|
281
|
-
value: "true"
|
|
282
|
-
}
|
|
283
|
-
],
|
|
284
|
-
children: [
|
|
285
|
-
{
|
|
286
|
-
type: "instance",
|
|
287
|
-
component: "HtmlEmbed",
|
|
288
|
-
label: "Play SVG",
|
|
289
|
-
props: [
|
|
290
|
-
{
|
|
291
|
-
type: "string",
|
|
292
|
-
name: "code",
|
|
293
|
-
value: p
|
|
294
|
-
}
|
|
295
|
-
],
|
|
296
|
-
children: []
|
|
297
|
-
}
|
|
298
|
-
]
|
|
299
|
-
}
|
|
300
|
-
]
|
|
301
|
-
}
|
|
302
|
-
]
|
|
303
|
-
}
|
|
304
|
-
]
|
|
305
|
-
}, u = [
|
|
15
|
+
}
|
|
16
|
+
}, s = [
|
|
306
17
|
"id",
|
|
307
18
|
"className",
|
|
308
19
|
"url",
|
|
@@ -318,11 +29,11 @@ const n = {
|
|
|
318
29
|
"showTitle",
|
|
319
30
|
"showControls",
|
|
320
31
|
"controlsColor"
|
|
321
|
-
],
|
|
322
|
-
props:
|
|
323
|
-
initialProps:
|
|
32
|
+
], m = {
|
|
33
|
+
props: n,
|
|
34
|
+
initialProps: s
|
|
324
35
|
};
|
|
325
36
|
export {
|
|
326
|
-
|
|
327
|
-
|
|
37
|
+
c as meta,
|
|
38
|
+
m as propsMeta
|
|
328
39
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/sdk-components-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.196.0",
|
|
4
4
|
"description": "Webstudio default library for react",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -32,6 +32,11 @@
|
|
|
32
32
|
"webstudio": "./src/hooks.ts",
|
|
33
33
|
"types": "./lib/types/hooks.d.ts",
|
|
34
34
|
"import": "./lib/hooks.js"
|
|
35
|
+
},
|
|
36
|
+
"./templates": {
|
|
37
|
+
"webstudio": "./src/templates.ts",
|
|
38
|
+
"types": "./lib/types/templates.d.ts",
|
|
39
|
+
"import": "./lib/templates.js"
|
|
35
40
|
}
|
|
36
41
|
},
|
|
37
42
|
"peerDependencies": {
|
|
@@ -43,10 +48,10 @@
|
|
|
43
48
|
"colord": "^2.9.3",
|
|
44
49
|
"micromark": "^4.0.0",
|
|
45
50
|
"await-interaction-response": "^0.0.2",
|
|
46
|
-
"@webstudio-is/
|
|
47
|
-
"@webstudio-is/
|
|
48
|
-
"@webstudio-is/sdk": "0.
|
|
49
|
-
"@webstudio-is/
|
|
51
|
+
"@webstudio-is/icons": "0.196.0",
|
|
52
|
+
"@webstudio-is/image": "0.196.0",
|
|
53
|
+
"@webstudio-is/react-sdk": "0.196.0",
|
|
54
|
+
"@webstudio-is/sdk": "0.196.0"
|
|
50
55
|
},
|
|
51
56
|
"devDependencies": {
|
|
52
57
|
"@testing-library/react": "^14.2.2",
|
|
@@ -55,8 +60,9 @@
|
|
|
55
60
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
56
61
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
57
62
|
"vitest": "^2.1.8",
|
|
63
|
+
"@webstudio-is/tsconfig": "1.0.7",
|
|
58
64
|
"@webstudio-is/generate-arg-types": "0.0.0",
|
|
59
|
-
"@webstudio-is/
|
|
65
|
+
"@webstudio-is/template": "0.196.0"
|
|
60
66
|
},
|
|
61
67
|
"scripts": {
|
|
62
68
|
"build": "vite build --config ../../vite.sdk-components.config.ts",
|