@webstudio-is/sdk-components-react 0.216.0 → 0.218.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__/blockquote.props.js +0 -334
- package/lib/__generated__/body.props.js +0 -334
- package/lib/__generated__/bold.props.js +0 -334
- package/lib/__generated__/box.props.js +0 -334
- package/lib/__generated__/button.props.js +0 -334
- package/lib/__generated__/checkbox.props.js +0 -334
- package/lib/__generated__/code-text.props.js +0 -334
- package/lib/__generated__/form.props.js +0 -334
- package/lib/__generated__/head-link.props.js +0 -334
- package/lib/__generated__/head-meta.props.js +0 -334
- package/lib/__generated__/head-slot.props.js +4 -0
- package/lib/__generated__/head-title.props.js +0 -334
- package/lib/__generated__/heading.props.js +0 -334
- package/lib/__generated__/image.props.js +0 -334
- package/lib/__generated__/input.props.js +0 -334
- package/lib/__generated__/italic.props.js +0 -334
- package/lib/__generated__/label.props.js +0 -334
- package/lib/__generated__/link.props.js +0 -334
- package/lib/__generated__/list-item.props.js +0 -334
- package/lib/__generated__/list.props.js +0 -334
- package/lib/__generated__/option.props.js +0 -334
- package/lib/__generated__/paragraph.props.js +0 -334
- package/lib/__generated__/radio-button.props.js +0 -334
- package/lib/__generated__/select.props.js +0 -334
- package/lib/__generated__/separator.props.js +0 -334
- package/lib/__generated__/span.props.js +0 -334
- package/lib/__generated__/subscript.props.js +0 -334
- package/lib/__generated__/superscript.props.js +0 -334
- package/lib/__generated__/text.props.js +0 -334
- package/lib/__generated__/textarea.props.js +0 -334
- package/lib/__generated__/video.props.js +0 -334
- package/lib/__generated__/vimeo-play-button.props.js +0 -334
- package/lib/__generated__/vimeo-preview-image.props.js +0 -334
- package/lib/__generated__/vimeo-spinner.props.js +0 -334
- package/lib/__generated__/vimeo.props.js +262 -518
- package/lib/__generated__/webhook-form.props.js +0 -334
- package/lib/__generated__/youtube.props.js +0 -334
- package/lib/blockquote.ws.js +0 -1
- package/lib/body.ws.js +0 -1
- package/lib/bold.ws.js +12 -13
- package/lib/box.ws.js +4 -5
- package/lib/button.ws.js +4 -5
- package/lib/form.ws.js +4 -5
- package/lib/fragment.ws.js +2 -3
- package/lib/head-slot.ws.js +1 -2
- package/lib/head-title.ws.js +2 -4
- package/lib/heading.ws.js +0 -1
- package/lib/html-embed.ws.js +0 -1
- package/lib/italic.ws.js +8 -9
- package/lib/label.ws.js +12 -13
- package/lib/link.ws.js +0 -1
- package/lib/list-item.ws.js +2 -3
- package/lib/list.ws.js +0 -1
- package/lib/markdown-embed.ws.js +0 -1
- package/lib/paragraph.ws.js +4 -5
- package/lib/rich-text-link.ws.js +3 -6
- package/lib/select.ws.js +4 -5
- package/lib/slot.ws.js +2 -3
- package/lib/span.ws.js +4 -5
- package/lib/subscript.ws.js +4 -5
- package/lib/superscript.ws.js +4 -5
- package/lib/text.ws.js +6 -7
- package/lib/time.ws.js +2 -3
- package/lib/types/head-title.ws.d.ts +1 -1
- package/lib/types/video.d.ts +2 -0
- package/lib/video.js +48 -37
- package/lib/video.ws.js +18 -8
- package/lib/vimeo-play-button.ws.js +4 -5
- package/lib/vimeo-spinner.ws.js +4 -5
- package/lib/vimeo.ws.js +2 -7
- package/lib/webhook-form.ws.js +4 -5
- package/lib/xml-node.ws.js +4 -5
- package/lib/xml-time.ws.js +2 -3
- package/lib/youtube.ws.js +2 -7
- package/package.json +8 -8
- package/lib/__generated__/head.props.js +0 -508
- package/lib/types/__generated__/head.props.d.ts +0 -2
package/lib/bold.ws.js
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { BoldIcon as
|
|
2
|
-
import { defaultStates as
|
|
3
|
-
import { b as
|
|
4
|
-
import { props as
|
|
5
|
-
const
|
|
6
|
-
b:
|
|
1
|
+
import { BoldIcon as o } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { defaultStates as t } from "@webstudio-is/sdk";
|
|
3
|
+
import { b as r } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
+
import { props as e } from "./__generated__/bold.props.js";
|
|
5
|
+
const s = {
|
|
6
|
+
b: r
|
|
7
7
|
}, l = {
|
|
8
|
-
type: "container",
|
|
9
8
|
label: "Bold Text",
|
|
10
|
-
icon:
|
|
11
|
-
states:
|
|
12
|
-
presetStyle:
|
|
13
|
-
},
|
|
14
|
-
props:
|
|
9
|
+
icon: o,
|
|
10
|
+
states: t,
|
|
11
|
+
presetStyle: s
|
|
12
|
+
}, c = {
|
|
13
|
+
props: e,
|
|
15
14
|
initialProps: ["id", "className"]
|
|
16
15
|
};
|
|
17
16
|
export {
|
|
18
17
|
l as meta,
|
|
19
|
-
|
|
18
|
+
c as propsMeta
|
|
20
19
|
};
|
package/lib/box.ws.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { BoxIcon as t } from "@webstudio-is/icons/svg";
|
|
2
2
|
import { defaultStates as e } from "@webstudio-is/sdk";
|
|
3
|
-
import { div as r, address as o, article as a, aside as i, figure as s, footer as n, header as
|
|
3
|
+
import { div as r, address as o, article as a, aside as i, figure as s, footer as n, header as d, main as p, nav as c, section as m } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as f } from "./__generated__/box.props.js";
|
|
5
5
|
const v = {
|
|
6
6
|
category: "general",
|
|
7
|
-
type: "container",
|
|
8
7
|
description: "A container for content. By default this is a Div, but the tag can be changed in settings.",
|
|
9
8
|
icon: t,
|
|
10
9
|
states: e,
|
|
@@ -15,9 +14,9 @@ const v = {
|
|
|
15
14
|
aside: i,
|
|
16
15
|
figure: s,
|
|
17
16
|
footer: n,
|
|
18
|
-
header:
|
|
19
|
-
main:
|
|
20
|
-
nav:
|
|
17
|
+
header: d,
|
|
18
|
+
main: p,
|
|
19
|
+
nav: c,
|
|
21
20
|
section: m
|
|
22
21
|
},
|
|
23
22
|
order: 0
|
package/lib/button.ws.js
CHANGED
|
@@ -4,20 +4,19 @@ import { button as o } from "@webstudio-is/sdk/normalize.css";
|
|
|
4
4
|
import { props as a } from "./__generated__/button.props.js";
|
|
5
5
|
const l = {
|
|
6
6
|
button: o
|
|
7
|
-
},
|
|
7
|
+
}, m = {
|
|
8
8
|
icon: t,
|
|
9
|
-
type: "container",
|
|
10
9
|
presetStyle: l,
|
|
11
10
|
states: [
|
|
12
11
|
...e,
|
|
13
12
|
{ selector: ":disabled", label: "Disabled" },
|
|
14
13
|
{ selector: ":enabled", label: "Enabled" }
|
|
15
14
|
]
|
|
16
|
-
},
|
|
15
|
+
}, n = {
|
|
17
16
|
props: a,
|
|
18
17
|
initialProps: ["id", "className", "type", "aria-label"]
|
|
19
18
|
};
|
|
20
19
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
m as meta,
|
|
21
|
+
n as propsMeta
|
|
23
22
|
};
|
package/lib/form.ws.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { FormIcon as r } from "@webstudio-is/icons/svg";
|
|
2
|
-
import { defaultStates as
|
|
3
|
-
import { form as
|
|
2
|
+
import { defaultStates as o } from "@webstudio-is/sdk";
|
|
3
|
+
import { form as t } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as e } from "./__generated__/form.props.js";
|
|
5
5
|
const s = {
|
|
6
6
|
form: [
|
|
7
|
-
...
|
|
7
|
+
...t,
|
|
8
8
|
{ property: "min-height", value: { type: "unit", unit: "px", value: 20 } }
|
|
9
9
|
]
|
|
10
10
|
}, n = {
|
|
11
11
|
category: "forms",
|
|
12
|
-
type: "container",
|
|
13
12
|
label: "Form",
|
|
14
13
|
description: "Create filters, surveys, searches and more.",
|
|
15
14
|
icon: r,
|
|
16
|
-
states:
|
|
15
|
+
states: o,
|
|
17
16
|
presetStyle: s,
|
|
18
17
|
order: 0
|
|
19
18
|
}, c = {
|
package/lib/fragment.ws.js
CHANGED
package/lib/head-slot.ws.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { HeaderIcon as e } from "@webstudio-is/icons/svg";
|
|
2
2
|
import "@webstudio-is/sdk";
|
|
3
|
-
import { props as t } from "./__generated__/head.props.js";
|
|
3
|
+
import { props as t } from "./__generated__/head-slot.props.js";
|
|
4
4
|
const r = {
|
|
5
5
|
icon: e,
|
|
6
|
-
type: "container",
|
|
7
6
|
description: "Inserts children into the head of the document",
|
|
8
7
|
contentModel: {
|
|
9
8
|
category: "instance",
|
package/lib/head-title.ws.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { WindowTitleIcon as o } from "@webstudio-is/icons/svg";
|
|
2
|
-
import "@webstudio-is/sdk";
|
|
3
2
|
import { props as t } from "./__generated__/head-title.props.js";
|
|
4
|
-
const
|
|
3
|
+
const r = {
|
|
5
4
|
icon: o,
|
|
6
|
-
type: "container",
|
|
7
5
|
contentModel: {
|
|
8
6
|
category: "none",
|
|
9
7
|
children: ["text"]
|
|
@@ -12,6 +10,6 @@ const p = {
|
|
|
12
10
|
props: t
|
|
13
11
|
};
|
|
14
12
|
export {
|
|
15
|
-
|
|
13
|
+
r as meta,
|
|
16
14
|
c as propsMeta
|
|
17
15
|
};
|
package/lib/heading.ws.js
CHANGED
|
@@ -3,7 +3,6 @@ import { defaultStates as o } from "@webstudio-is/sdk";
|
|
|
3
3
|
import { h1 as r, h2 as e, h3 as p, h4 as a, h5 as i, h6 as s } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as h } from "./__generated__/heading.props.js";
|
|
5
5
|
const d = {
|
|
6
|
-
type: "container",
|
|
7
6
|
placeholder: "Heading",
|
|
8
7
|
icon: t,
|
|
9
8
|
states: o,
|
package/lib/html-embed.ws.js
CHANGED
|
@@ -3,7 +3,6 @@ import { descendantComponent as n } from "@webstudio-is/sdk";
|
|
|
3
3
|
import { props as e } from "./__generated__/html-embed.props.js";
|
|
4
4
|
const r = {
|
|
5
5
|
category: "general",
|
|
6
|
-
type: "container",
|
|
7
6
|
label: "HTML Embed",
|
|
8
7
|
description: "Used to add HTML code to the page, such as an SVG or script.",
|
|
9
8
|
icon: t,
|
package/lib/italic.ws.js
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
import { TextItalicIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
-
import { defaultStates as
|
|
3
|
-
import { i as
|
|
2
|
+
import { defaultStates as o } from "@webstudio-is/sdk";
|
|
3
|
+
import { i as e } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as r } from "./__generated__/italic.props.js";
|
|
5
5
|
const i = {
|
|
6
6
|
i: [
|
|
7
|
-
...
|
|
7
|
+
...e,
|
|
8
8
|
{
|
|
9
9
|
property: "font-style",
|
|
10
10
|
value: { type: "keyword", value: "italic" }
|
|
11
11
|
}
|
|
12
12
|
]
|
|
13
|
-
},
|
|
14
|
-
type: "container",
|
|
13
|
+
}, m = {
|
|
15
14
|
label: "Italic Text",
|
|
16
15
|
icon: t,
|
|
17
|
-
states:
|
|
16
|
+
states: o,
|
|
18
17
|
presetStyle: i
|
|
19
|
-
},
|
|
18
|
+
}, c = {
|
|
20
19
|
props: r,
|
|
21
20
|
initialProps: ["id", "className"]
|
|
22
21
|
};
|
|
23
22
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
m as meta,
|
|
24
|
+
c as propsMeta
|
|
26
25
|
};
|
package/lib/label.ws.js
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { LabelIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
-
import { defaultStates as
|
|
3
|
-
import { label as
|
|
4
|
-
import { props as
|
|
5
|
-
const
|
|
2
|
+
import { defaultStates as o } from "@webstudio-is/sdk";
|
|
3
|
+
import { label as e } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
+
import { props as l } from "./__generated__/label.props.js";
|
|
5
|
+
const r = {
|
|
6
6
|
label: [
|
|
7
|
-
...
|
|
7
|
+
...e,
|
|
8
8
|
{ property: "display", value: { type: "keyword", value: "block" } }
|
|
9
9
|
]
|
|
10
|
-
},
|
|
11
|
-
type: "container",
|
|
10
|
+
}, i = {
|
|
12
11
|
label: "Input Label",
|
|
13
12
|
icon: t,
|
|
14
|
-
states:
|
|
15
|
-
presetStyle:
|
|
16
|
-
},
|
|
17
|
-
props:
|
|
13
|
+
states: o,
|
|
14
|
+
presetStyle: r
|
|
15
|
+
}, c = {
|
|
16
|
+
props: l,
|
|
18
17
|
initialProps: ["id", "className", "htmlFor"]
|
|
19
18
|
};
|
|
20
19
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
i as meta,
|
|
21
|
+
c as propsMeta
|
|
23
22
|
};
|
package/lib/link.ws.js
CHANGED
package/lib/list-item.ws.js
CHANGED
|
@@ -3,18 +3,17 @@ import { defaultStates as o } from "@webstudio-is/sdk";
|
|
|
3
3
|
import { li as e } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as r } from "./__generated__/list-item.props.js";
|
|
5
5
|
const a = {
|
|
6
|
-
type: "container",
|
|
7
6
|
placeholder: "List item",
|
|
8
7
|
icon: t,
|
|
9
8
|
states: o,
|
|
10
9
|
presetStyle: {
|
|
11
10
|
li: e
|
|
12
11
|
}
|
|
13
|
-
},
|
|
12
|
+
}, l = {
|
|
14
13
|
props: r,
|
|
15
14
|
initialProps: ["id", "className"]
|
|
16
15
|
};
|
|
17
16
|
export {
|
|
18
17
|
a as meta,
|
|
19
|
-
|
|
18
|
+
l as propsMeta
|
|
20
19
|
};
|
package/lib/list.ws.js
CHANGED
package/lib/markdown-embed.ws.js
CHANGED
|
@@ -2,7 +2,6 @@ import { MarkdownEmbedIcon as e } from "@webstudio-is/icons/svg";
|
|
|
2
2
|
import { descendantComponent as o } from "@webstudio-is/sdk";
|
|
3
3
|
import { props as t } from "./__generated__/markdown-embed.props.js";
|
|
4
4
|
const a = {
|
|
5
|
-
type: "container",
|
|
6
5
|
icon: e,
|
|
7
6
|
contentModel: {
|
|
8
7
|
category: "instance",
|
package/lib/paragraph.ws.js
CHANGED
|
@@ -4,17 +4,16 @@ import { p as r } from "@webstudio-is/sdk/normalize.css";
|
|
|
4
4
|
import { props as e } from "./__generated__/paragraph.props.js";
|
|
5
5
|
const p = {
|
|
6
6
|
p: r
|
|
7
|
-
},
|
|
8
|
-
type: "container",
|
|
7
|
+
}, c = {
|
|
9
8
|
placeholder: "Paragraph",
|
|
10
9
|
icon: t,
|
|
11
10
|
states: o,
|
|
12
11
|
presetStyle: p
|
|
13
|
-
},
|
|
12
|
+
}, l = {
|
|
14
13
|
props: e,
|
|
15
14
|
initialProps: ["id", "className"]
|
|
16
15
|
};
|
|
17
16
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
c as meta,
|
|
18
|
+
l as propsMeta
|
|
20
19
|
};
|
package/lib/rich-text-link.ws.js
CHANGED
package/lib/select.ws.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { SelectIcon as e } from "@webstudio-is/icons/svg";
|
|
2
2
|
import { defaultStates as l } from "@webstudio-is/sdk";
|
|
3
|
-
import { select as
|
|
4
|
-
import { props as
|
|
3
|
+
import { select as o } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
+
import { props as t } from "./__generated__/select.props.js";
|
|
5
5
|
const r = {
|
|
6
6
|
select: [
|
|
7
|
-
...
|
|
7
|
+
...o,
|
|
8
8
|
{
|
|
9
9
|
property: "display",
|
|
10
10
|
value: { type: "keyword", value: "block" }
|
|
11
11
|
}
|
|
12
12
|
]
|
|
13
13
|
}, c = {
|
|
14
|
-
type: "container",
|
|
15
14
|
icon: e,
|
|
16
15
|
presetStyle: r,
|
|
17
16
|
states: [
|
|
@@ -23,7 +22,7 @@ const r = {
|
|
|
23
22
|
{ selector: ":optional", label: "Optional" }
|
|
24
23
|
]
|
|
25
24
|
}, d = {
|
|
26
|
-
props:
|
|
25
|
+
props: t,
|
|
27
26
|
initialProps: [
|
|
28
27
|
"id",
|
|
29
28
|
"className",
|
package/lib/slot.ws.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { SlotComponentIcon as
|
|
1
|
+
import { SlotComponentIcon as o } from "@webstudio-is/icons/svg";
|
|
2
2
|
const e = {
|
|
3
3
|
category: "general",
|
|
4
|
-
type: "container",
|
|
5
4
|
description: "Slot is a container for content that you want to reference across the project. Changes made to a Slot's children will be reflected in all other instances of that Slot.",
|
|
6
|
-
icon:
|
|
5
|
+
icon: o,
|
|
7
6
|
order: 5
|
|
8
7
|
}, n = {
|
|
9
8
|
props: {}
|
package/lib/span.ws.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { PaintBrushIcon as t } from "@webstudio-is/icons/svg";
|
|
2
2
|
import { defaultStates as o } from "@webstudio-is/sdk";
|
|
3
3
|
import { span as r } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
-
import { props as
|
|
5
|
-
const
|
|
4
|
+
import { props as s } from "./__generated__/span.props.js";
|
|
5
|
+
const e = {
|
|
6
6
|
span: r
|
|
7
7
|
}, n = {
|
|
8
|
-
type: "container",
|
|
9
8
|
label: "Text",
|
|
10
9
|
icon: t,
|
|
11
10
|
states: o,
|
|
12
|
-
presetStyle:
|
|
11
|
+
presetStyle: e
|
|
13
12
|
}, c = {
|
|
14
|
-
props:
|
|
13
|
+
props: s,
|
|
15
14
|
initialProps: ["id", "className"]
|
|
16
15
|
};
|
|
17
16
|
export {
|
package/lib/subscript.ws.js
CHANGED
|
@@ -2,19 +2,18 @@ import { SubscriptIcon as t } from "@webstudio-is/icons/svg";
|
|
|
2
2
|
import { defaultStates as o } from "@webstudio-is/sdk";
|
|
3
3
|
import { sub as r } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as s } from "./__generated__/subscript.props.js";
|
|
5
|
-
const
|
|
5
|
+
const p = {
|
|
6
6
|
sub: r
|
|
7
7
|
}, c = {
|
|
8
|
-
type: "container",
|
|
9
8
|
label: "Subscript Text",
|
|
10
9
|
icon: t,
|
|
11
10
|
states: o,
|
|
12
|
-
presetStyle:
|
|
13
|
-
},
|
|
11
|
+
presetStyle: p
|
|
12
|
+
}, l = {
|
|
14
13
|
props: s,
|
|
15
14
|
initialProps: ["id", "className"]
|
|
16
15
|
};
|
|
17
16
|
export {
|
|
18
17
|
c as meta,
|
|
19
|
-
|
|
18
|
+
l as propsMeta
|
|
20
19
|
};
|
package/lib/superscript.ws.js
CHANGED
|
@@ -2,19 +2,18 @@ import { SuperscriptIcon as t } from "@webstudio-is/icons/svg";
|
|
|
2
2
|
import { defaultStates as o } from "@webstudio-is/sdk";
|
|
3
3
|
import { sup as r } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as p } from "./__generated__/superscript.props.js";
|
|
5
|
-
const
|
|
5
|
+
const s = {
|
|
6
6
|
sup: r
|
|
7
7
|
}, c = {
|
|
8
|
-
type: "container",
|
|
9
8
|
label: "Superscript Text",
|
|
10
9
|
icon: t,
|
|
11
10
|
states: o,
|
|
12
|
-
presetStyle:
|
|
13
|
-
},
|
|
11
|
+
presetStyle: s
|
|
12
|
+
}, l = {
|
|
14
13
|
props: p,
|
|
15
14
|
initialProps: ["id", "className"]
|
|
16
15
|
};
|
|
17
16
|
export {
|
|
18
17
|
c as meta,
|
|
19
|
-
|
|
18
|
+
l as propsMeta
|
|
20
19
|
};
|
package/lib/text.ws.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { TextIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
-
import { defaultStates as
|
|
3
|
-
import { div as
|
|
2
|
+
import { defaultStates as o } from "@webstudio-is/sdk";
|
|
3
|
+
import { div as e } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as i } from "./__generated__/text.props.js";
|
|
5
|
-
const
|
|
6
|
-
type: "container",
|
|
5
|
+
const n = {
|
|
7
6
|
icon: t,
|
|
8
|
-
states:
|
|
7
|
+
states: o,
|
|
9
8
|
presetStyle: {
|
|
10
9
|
div: [
|
|
11
|
-
...
|
|
10
|
+
...e,
|
|
12
11
|
{
|
|
13
12
|
property: "min-height",
|
|
14
13
|
value: { type: "unit", unit: "em", value: 1 }
|
|
@@ -28,6 +27,6 @@ const s = {
|
|
|
28
27
|
initialProps: ["tag", "id", "className"]
|
|
29
28
|
};
|
|
30
29
|
export {
|
|
31
|
-
|
|
30
|
+
n as meta,
|
|
32
31
|
m as propsMeta
|
|
33
32
|
};
|
package/lib/time.ws.js
CHANGED
|
@@ -6,16 +6,15 @@ const r = {
|
|
|
6
6
|
time: a
|
|
7
7
|
}, s = {
|
|
8
8
|
category: "localization",
|
|
9
|
-
type: "container",
|
|
10
9
|
description: "Converts machine-readable date and time to a human-readable format.",
|
|
11
10
|
icon: t,
|
|
12
11
|
states: e,
|
|
13
12
|
presetStyle: r
|
|
14
|
-
},
|
|
13
|
+
}, l = {
|
|
15
14
|
props: o,
|
|
16
15
|
initialProps: ["datetime", "language", "country", "dateStyle", "timeStyle"]
|
|
17
16
|
};
|
|
18
17
|
export {
|
|
19
18
|
s as meta,
|
|
20
|
-
|
|
19
|
+
l as propsMeta
|
|
21
20
|
};
|
package/lib/types/video.d.ts
CHANGED
|
@@ -4,4 +4,6 @@ export declare const Video: import("react").ForwardRefExoticComponent<Omit<impor
|
|
|
4
4
|
$progress?: Atom<number | undefined>;
|
|
5
5
|
$visible?: Atom<boolean>;
|
|
6
6
|
$timeline?: boolean;
|
|
7
|
+
} & {
|
|
8
|
+
$webstudio$canvasOnly$assetId?: string | undefined;
|
|
7
9
|
}, "ref"> & import("react").RefAttributes<HTMLVideoElement>>;
|
package/lib/video.js
CHANGED
|
@@ -1,46 +1,57 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
|
|
1
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as H, useId as N, useContext as v, useEffect as y } from "react";
|
|
3
|
+
import { ReactSdkContext as D } from "@webstudio-is/react-sdk/runtime";
|
|
4
|
+
const c = "data-ws-video-id", R = {
|
|
4
5
|
HAVE_NOTHING: 0,
|
|
5
6
|
HAVE_METADATA: 1,
|
|
6
7
|
HAVE_CURRENT_DATA: 2,
|
|
7
8
|
HAVE_FUTURE_DATA: 3,
|
|
8
9
|
HAVE_ENOUGH_DATA: 4
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
10
|
+
}, I = H(
|
|
11
|
+
({
|
|
12
|
+
$progress: n,
|
|
13
|
+
$visible: r,
|
|
14
|
+
$timeline: f,
|
|
15
|
+
$webstudio$canvasOnly$assetId: U,
|
|
16
|
+
children: l,
|
|
17
|
+
src: s,
|
|
18
|
+
...A
|
|
19
|
+
}, T) => {
|
|
20
|
+
const a = N(), E = {
|
|
21
|
+
[c]: a
|
|
22
|
+
}, { assetBaseUrl: d } = v(D), b = s != null && s.startsWith(d) ? `/cgi/video/${s.slice(d.length)}` : s;
|
|
23
|
+
return y(() => {
|
|
24
|
+
if (n === void 0 || r === void 0)
|
|
25
|
+
return;
|
|
26
|
+
const e = document.querySelector(`[${c}="${a}"]`);
|
|
27
|
+
if (e === null || !(e instanceof HTMLVideoElement))
|
|
28
|
+
return;
|
|
29
|
+
if (e.play().catch(() => {
|
|
30
|
+
}), e.pause(), f)
|
|
31
|
+
return n.subscribe((t) => {
|
|
32
|
+
if (e.readyState < R.HAVE_METADATA || (e.paused || e.pause(), e.seeking))
|
|
33
|
+
return;
|
|
34
|
+
let u = e.duration;
|
|
35
|
+
Number.isNaN(u) || (Number.isFinite(u) || (u = 60), e.currentTime = (t ?? 0) * u);
|
|
36
|
+
});
|
|
37
|
+
let i = !1, o = !1;
|
|
38
|
+
const m = r.subscribe((t) => {
|
|
39
|
+
o = t, o === !1 && i === !1 && !e.loop && (e.currentTime = 0);
|
|
40
|
+
}), V = n.subscribe((t) => {
|
|
41
|
+
if (i && (t === void 0 || t === 0 || t === 1)) {
|
|
42
|
+
i = !1, e.pause(), o === !1 && i === !1 && !e.loop && (e.currentTime = 0);
|
|
23
43
|
return;
|
|
24
|
-
|
|
25
|
-
|
|
44
|
+
}
|
|
45
|
+
i || (i = !0, e.ended || e.play().catch(() => {
|
|
46
|
+
}));
|
|
26
47
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
t || (t = !0, e.ended || e.play().catch(() => {
|
|
36
|
-
}));
|
|
37
|
-
});
|
|
38
|
-
return () => {
|
|
39
|
-
E(), T();
|
|
40
|
-
};
|
|
41
|
-
}, [r, f, n, s]), /* @__PURE__ */ b("video", { ...c, ...l, ref: A, children: d });
|
|
42
|
-
});
|
|
43
|
-
N.displayName = "Video";
|
|
48
|
+
return () => {
|
|
49
|
+
V(), m();
|
|
50
|
+
};
|
|
51
|
+
}, [n, f, r, a]), /* @__PURE__ */ _("video", { src: b, ...A, ...E, ref: T, children: l });
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
I.displayName = "Video";
|
|
44
55
|
export {
|
|
45
|
-
|
|
56
|
+
I as Video
|
|
46
57
|
};
|
package/lib/video.ws.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { VideoIcon as
|
|
1
|
+
import { VideoIcon as e } from "@webstudio-is/icons/svg";
|
|
2
2
|
import "@webstudio-is/sdk";
|
|
3
|
-
import { props as
|
|
4
|
-
const
|
|
5
|
-
icon:
|
|
3
|
+
import { props as o } from "./__generated__/video.props.js";
|
|
4
|
+
const i = {
|
|
5
|
+
icon: e,
|
|
6
6
|
contentModel: {
|
|
7
7
|
category: "instance",
|
|
8
8
|
children: []
|
|
@@ -15,8 +15,18 @@ const p = {
|
|
|
15
15
|
}
|
|
16
16
|
]
|
|
17
17
|
}
|
|
18
|
-
},
|
|
19
|
-
props:
|
|
18
|
+
}, l = {
|
|
19
|
+
props: {
|
|
20
|
+
...o,
|
|
21
|
+
// Automatically generated props don't have the right control.
|
|
22
|
+
src: {
|
|
23
|
+
type: "string",
|
|
24
|
+
control: "file",
|
|
25
|
+
label: "Source",
|
|
26
|
+
required: !1,
|
|
27
|
+
accept: ".mp4,.webm,.mpg,.mpeg,.mov"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
20
30
|
initialProps: [
|
|
21
31
|
"id",
|
|
22
32
|
"className",
|
|
@@ -32,6 +42,6 @@ const p = {
|
|
|
32
42
|
]
|
|
33
43
|
};
|
|
34
44
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
45
|
+
i as meta,
|
|
46
|
+
l as propsMeta
|
|
37
47
|
};
|