@webstudio-is/sdk-components-react 0.195.0 → 0.197.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__/image.props.js +1 -0
- package/lib/__generated__/vimeo-preview-image.props.js +6 -1
- package/lib/__generated__/vimeo.props.js +4 -5
- package/lib/__generated__/youtube.props.js +665 -0
- package/lib/blockquote.template.js +11 -0
- package/lib/blockquote.ws.js +5 -21
- package/lib/body.ws.js +1 -1
- package/lib/bold.ws.js +1 -1
- package/lib/box.ws.js +1 -1
- package/lib/button.template.js +11 -0
- package/lib/button.ws.js +2 -18
- package/lib/checkbox.template.js +14 -0
- package/lib/checkbox.ws.js +5 -25
- package/lib/code-text.ws.js +6 -6
- package/lib/components.js +35 -33
- package/lib/content-embed.template.js +83 -0
- package/lib/form.ws.js +1 -1
- package/lib/heading.template.js +11 -0
- package/lib/heading.ws.js +15 -31
- package/lib/image.ws.js +17 -22
- package/lib/input.ws.js +1 -1
- package/lib/italic.ws.js +1 -1
- package/lib/label.template.js +10 -0
- package/lib/label.ws.js +13 -28
- package/lib/link.template.js +11 -0
- package/lib/link.ws.js +3 -23
- package/lib/list-item.template.js +11 -0
- package/lib/list-item.ws.js +12 -28
- package/lib/list.template.js +15 -0
- package/lib/list.ws.js +10 -54
- package/lib/markdown-embed.js +10 -5
- package/lib/markdown-embed.template.js +75 -0
- package/lib/markdown-embed.ws.js +9 -87
- package/lib/metas.js +59 -59
- package/lib/option.ws.js +4 -5
- package/lib/paragraph.template.js +11 -0
- package/lib/paragraph.ws.js +12 -28
- package/lib/props.js +32 -30
- package/lib/radio-button.template.js +14 -0
- package/lib/radio-button.ws.js +7 -27
- package/lib/rich-text-link.ws.js +3 -5
- package/lib/select.template.js +16 -0
- package/lib/select.ws.js +11 -63
- package/lib/separator.ws.js +2 -2
- package/lib/span.ws.js +1 -1
- package/lib/subscript.ws.js +1 -1
- package/lib/superscript.ws.js +1 -1
- package/lib/templates.js +36 -0
- package/lib/text.template.js +11 -0
- package/lib/text.ws.js +8 -24
- package/lib/textarea.ws.js +1 -1
- package/lib/time.ws.js +5 -6
- package/lib/types/__generated__/blockquote.props.d.ts +1 -1
- package/lib/types/__generated__/body.props.d.ts +1 -1
- package/lib/types/__generated__/bold.props.d.ts +1 -1
- package/lib/types/__generated__/box.props.d.ts +1 -1
- package/lib/types/__generated__/button.props.d.ts +1 -1
- package/lib/types/__generated__/checkbox.props.d.ts +1 -1
- package/lib/types/__generated__/code-text.props.d.ts +1 -1
- package/lib/types/__generated__/form.props.d.ts +1 -1
- package/lib/types/__generated__/fragment.props.d.ts +1 -1
- package/lib/types/__generated__/heading.props.d.ts +1 -1
- package/lib/types/__generated__/html-embed.props.d.ts +1 -1
- package/lib/types/__generated__/image.props.d.ts +1 -1
- package/lib/types/__generated__/input.props.d.ts +1 -1
- package/lib/types/__generated__/italic.props.d.ts +1 -1
- package/lib/types/__generated__/label.props.d.ts +1 -1
- package/lib/types/__generated__/link.props.d.ts +1 -1
- package/lib/types/__generated__/list-item.props.d.ts +1 -1
- package/lib/types/__generated__/list.props.d.ts +1 -1
- package/lib/types/__generated__/markdown-embed.props.d.ts +1 -1
- package/lib/types/__generated__/option.props.d.ts +1 -1
- package/lib/types/__generated__/paragraph.props.d.ts +1 -1
- package/lib/types/__generated__/radio-button.props.d.ts +1 -1
- package/lib/types/__generated__/rich-text-link.props.d.ts +1 -1
- package/lib/types/__generated__/select.props.d.ts +1 -1
- package/lib/types/__generated__/separator.props.d.ts +1 -1
- package/lib/types/__generated__/slot.props.d.ts +1 -1
- package/lib/types/__generated__/span.props.d.ts +1 -1
- package/lib/types/__generated__/subscript.props.d.ts +1 -1
- package/lib/types/__generated__/superscript.props.d.ts +1 -1
- package/lib/types/__generated__/text.props.d.ts +1 -1
- package/lib/types/__generated__/textarea.props.d.ts +1 -1
- package/lib/types/__generated__/time.props.d.ts +1 -1
- package/lib/types/__generated__/vimeo-play-button.props.d.ts +1 -1
- package/lib/types/__generated__/vimeo-preview-image.props.d.ts +1 -1
- package/lib/types/__generated__/vimeo-spinner.props.d.ts +1 -1
- package/lib/types/__generated__/vimeo.props.d.ts +1 -1
- package/lib/types/__generated__/webhook-form.props.d.ts +1 -1
- package/lib/types/__generated__/xml-node.props.d.ts +1 -1
- package/lib/types/__generated__/xml-time.props.d.ts +1 -1
- package/lib/types/__generated__/youtube.props.d.ts +2 -0
- package/lib/types/blockquote.template.d.ts +2 -0
- package/lib/types/blockquote.ws.d.ts +1 -1
- package/lib/types/body.ws.d.ts +1 -1
- package/lib/types/bold.ws.d.ts +1 -1
- package/lib/types/box.ws.d.ts +1 -1
- package/lib/types/button.template.d.ts +2 -0
- package/lib/types/button.ws.d.ts +1 -1
- package/lib/types/checkbox.d.ts +1 -1
- package/lib/types/checkbox.template.d.ts +2 -0
- package/lib/types/checkbox.ws.d.ts +1 -1
- package/lib/types/code-text.ws.d.ts +1 -1
- package/lib/types/components.d.ts +1 -0
- package/lib/types/content-embed.template.d.ts +2 -0
- package/lib/types/form.ws.d.ts +1 -1
- package/lib/types/fragment.ws.d.ts +1 -1
- package/lib/types/heading.template.d.ts +2 -0
- package/lib/types/heading.ws.d.ts +1 -1
- package/lib/types/html-embed.ws.d.ts +1 -1
- package/lib/types/image.ws.d.ts +1 -9
- package/lib/types/input.ws.d.ts +1 -1
- package/lib/types/italic.ws.d.ts +1 -1
- package/lib/types/label.template.d.ts +2 -0
- package/lib/types/label.ws.d.ts +1 -1
- package/lib/types/link.template.d.ts +2 -0
- package/lib/types/link.ws.d.ts +1 -1
- package/lib/types/list-item.template.d.ts +2 -0
- package/lib/types/list-item.ws.d.ts +1 -1
- package/lib/types/list.template.d.ts +2 -0
- package/lib/types/list.ws.d.ts +1 -1
- package/lib/types/markdown-embed.template.d.ts +2 -0
- package/lib/types/markdown-embed.ws.d.ts +1 -1
- package/lib/types/metas.d.ts +1 -1
- package/lib/types/option.ws.d.ts +1 -1
- package/lib/types/paragraph.template.d.ts +2 -0
- package/lib/types/paragraph.ws.d.ts +1 -1
- package/lib/types/props.d.ts +1 -0
- package/lib/types/radio-button.d.ts +1 -1
- package/lib/types/radio-button.template.d.ts +2 -0
- package/lib/types/radio-button.ws.d.ts +1 -1
- package/lib/types/rich-text-link.ws.d.ts +1 -1
- package/lib/types/select.template.d.ts +2 -0
- package/lib/types/select.ws.d.ts +1 -1
- package/lib/types/separator.ws.d.ts +1 -1
- package/lib/types/slot.ws.d.ts +1 -1
- package/lib/types/span.ws.d.ts +1 -1
- package/lib/types/subscript.ws.d.ts +1 -1
- package/lib/types/superscript.ws.d.ts +1 -1
- package/lib/types/templates.d.ts +17 -0
- package/lib/types/text.template.d.ts +2 -0
- package/lib/types/text.ws.d.ts +1 -1
- package/lib/types/textarea.ws.d.ts +1 -1
- package/lib/types/time.ws.d.ts +1 -1
- package/lib/types/vimeo-play-button.ws.d.ts +1 -1
- package/lib/types/vimeo-preview-image.d.ts +21 -21
- package/lib/types/vimeo-preview-image.ws.d.ts +1 -1
- package/lib/types/vimeo-spinner.ws.d.ts +1 -1
- package/lib/types/vimeo.d.ts +12 -2
- package/lib/types/vimeo.template.d.ts +2 -0
- package/lib/types/vimeo.ws.d.ts +1 -1
- package/lib/types/webhook-form.template.d.ts +2 -0
- package/lib/types/webhook-form.ws.d.ts +1 -1
- package/lib/types/xml-node.ws.d.ts +1 -1
- package/lib/types/xml-time.ws.d.ts +1 -1
- package/lib/types/youtube.d.ts +143 -0
- package/lib/types/youtube.template.d.ts +2 -0
- package/lib/types/youtube.ws.d.ts +3 -0
- package/lib/vimeo-play-button.ws.js +8 -8
- package/lib/vimeo-preview-image.ws.js +17 -9
- package/lib/vimeo-spinner.ws.js +8 -8
- package/lib/vimeo.js +88 -87
- package/lib/vimeo.template.js +93 -0
- package/lib/vimeo.ws.js +14 -302
- package/lib/webhook-form.template.js +49 -0
- package/lib/webhook-form.ws.js +17 -118
- package/lib/xml-node.js +18 -14
- package/lib/xml-node.ws.js +4 -5
- package/lib/xml-time.ws.js +4 -5
- package/lib/youtube.js +200 -0
- package/lib/youtube.template.js +97 -0
- package/lib/youtube.ws.js +51 -0
- package/package.json +16 -9
- package/lib/content-embed.ws.js +0 -77
- package/lib/types/__generated__/local-date.props.d.ts +0 -2
- package/lib/types/content-embed.ws.d.ts +0 -2
package/lib/blockquote.ws.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BlockquoteIcon as
|
|
2
|
-
import { defaultStates as
|
|
1
|
+
import { BlockquoteIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { defaultStates as e } from "@webstudio-is/sdk";
|
|
3
3
|
import { props as p } from "./__generated__/blockquote.props.js";
|
|
4
4
|
const r = {
|
|
5
5
|
blockquote: [
|
|
@@ -49,26 +49,10 @@ const r = {
|
|
|
49
49
|
}
|
|
50
50
|
]
|
|
51
51
|
}, i = {
|
|
52
|
-
category: "text",
|
|
53
52
|
type: "container",
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
presetStyle: r,
|
|
58
|
-
order: 3,
|
|
59
|
-
template: [
|
|
60
|
-
{
|
|
61
|
-
type: "instance",
|
|
62
|
-
component: "Blockquote",
|
|
63
|
-
children: [
|
|
64
|
-
{
|
|
65
|
-
type: "text",
|
|
66
|
-
value: "Blockquote text you can edit",
|
|
67
|
-
placeholder: !0
|
|
68
|
-
}
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
]
|
|
53
|
+
icon: t,
|
|
54
|
+
states: e,
|
|
55
|
+
presetStyle: r
|
|
72
56
|
}, n = {
|
|
73
57
|
props: p,
|
|
74
58
|
initialProps: ["id", "className", "cite"]
|
package/lib/body.ws.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BodyIcon as o } from "@webstudio-is/icons/svg";
|
|
2
|
-
import { defaultStates as t } from "@webstudio-is/
|
|
2
|
+
import { defaultStates as t } from "@webstudio-is/sdk";
|
|
3
3
|
import { body as e } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as r } from "./__generated__/body.props.js";
|
|
5
5
|
const a = {
|
package/lib/bold.ws.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BoldIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
-
import { defaultStates as o } from "@webstudio-is/
|
|
2
|
+
import { defaultStates as o } from "@webstudio-is/sdk";
|
|
3
3
|
import { b as e } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as r } from "./__generated__/bold.props.js";
|
|
5
5
|
const p = {
|
package/lib/box.ws.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BoxIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
-
import { defaultStates as e } from "@webstudio-is/
|
|
2
|
+
import { defaultStates as e } from "@webstudio-is/sdk";
|
|
3
3
|
import { div as o, address as r, article as a, aside as i, figure as n, footer as s, header as c, main as p, nav as d, section as m } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as f } from "./__generated__/box.props.js";
|
|
5
5
|
const g = {
|
|
@@ -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
|
@@ -1,37 +1,21 @@
|
|
|
1
1
|
import { ButtonElementIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
-
import { defaultStates as e } from "@webstudio-is/
|
|
2
|
+
import { defaultStates as e } from "@webstudio-is/sdk";
|
|
3
3
|
import { button as o } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
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,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsxs as r, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { $ as e, PlaceholderValue as c } from "@webstudio-is/template";
|
|
3
|
+
const l = {
|
|
4
|
+
category: "forms",
|
|
5
|
+
description: "Use within a form to allow your users to toggle between checked and not checked. Group checkboxes by matching their “Name” properties. Unlike radios, any number of checkboxes in a group can be checked.",
|
|
6
|
+
order: 6,
|
|
7
|
+
template: /* @__PURE__ */ r(e.Label, { "ws:label": "Checkbox Field", children: [
|
|
8
|
+
/* @__PURE__ */ o(e.Checkbox, {}),
|
|
9
|
+
/* @__PURE__ */ o(e.Text, { "ws:label": "Checkbox Label", tag: "span", children: new c("Checkbox") })
|
|
10
|
+
] })
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
l as meta
|
|
14
|
+
};
|
package/lib/checkbox.ws.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CheckboxCheckedIcon as e } from "@webstudio-is/icons/svg";
|
|
2
|
-
import { defaultStates as t } from "@webstudio-is/
|
|
2
|
+
import { defaultStates as t } from "@webstudio-is/sdk";
|
|
3
3
|
import { checkbox as o } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
-
import { props as
|
|
5
|
-
const
|
|
4
|
+
import { props as l } from "./__generated__/checkbox.props.js";
|
|
5
|
+
const r = {
|
|
6
6
|
input: [
|
|
7
7
|
...o,
|
|
8
8
|
{
|
|
@@ -11,16 +11,13 @@ const a = {
|
|
|
11
11
|
}
|
|
12
12
|
]
|
|
13
13
|
}, s = {
|
|
14
|
-
category: "forms",
|
|
15
14
|
constraints: {
|
|
16
15
|
relation: "ancestor",
|
|
17
16
|
component: { $nin: ["Button", "Link"] }
|
|
18
17
|
},
|
|
19
18
|
type: "control",
|
|
20
|
-
description: "Use within a form to allow your users to toggle between checked and not checked. Group checkboxes by matching their “Name” properties. Unlike radios, any number of checkboxes in a group can be checked.",
|
|
21
19
|
icon: e,
|
|
22
|
-
presetStyle:
|
|
23
|
-
order: 6,
|
|
20
|
+
presetStyle: r,
|
|
24
21
|
states: [
|
|
25
22
|
...t,
|
|
26
23
|
{ selector: ":checked", label: "Checked" },
|
|
@@ -30,26 +27,9 @@ const a = {
|
|
|
30
27
|
{ selector: ":enabled", label: "Enabled" },
|
|
31
28
|
{ selector: ":read-only", label: "Read Only" },
|
|
32
29
|
{ selector: ":read-write", label: "Read Write" }
|
|
33
|
-
],
|
|
34
|
-
template: [
|
|
35
|
-
{
|
|
36
|
-
type: "instance",
|
|
37
|
-
component: "Label",
|
|
38
|
-
label: "Checkbox Field",
|
|
39
|
-
children: [
|
|
40
|
-
{ type: "instance", component: "Checkbox", children: [] },
|
|
41
|
-
{
|
|
42
|
-
type: "instance",
|
|
43
|
-
component: "Text",
|
|
44
|
-
label: "Checkbox Label",
|
|
45
|
-
props: [{ type: "string", name: "tag", value: "span" }],
|
|
46
|
-
children: [{ type: "text", value: "Checkbox", placeholder: !0 }]
|
|
47
|
-
}
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
30
|
]
|
|
51
31
|
}, p = {
|
|
52
|
-
props:
|
|
32
|
+
props: l,
|
|
53
33
|
initialProps: ["id", "className", "name", "value", "required", "checked"]
|
|
54
34
|
};
|
|
55
35
|
export {
|
package/lib/code-text.ws.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { defaultStates as t } from "@webstudio-is/
|
|
1
|
+
import { BracesIcon as e } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { defaultStates as t } from "@webstudio-is/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";
|
|
5
5
|
const p = {
|
|
@@ -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/components.js
CHANGED
|
@@ -4,10 +4,10 @@ import { HtmlEmbed as x } from "./html-embed.js";
|
|
|
4
4
|
import { MarkdownEmbed as i } from "./markdown-embed.js";
|
|
5
5
|
import { Body as n } from "./body.js";
|
|
6
6
|
import { Box as d } from "./box.js";
|
|
7
|
-
import { Text as
|
|
8
|
-
import { Heading as
|
|
9
|
-
import { Paragraph as
|
|
10
|
-
import { Link as
|
|
7
|
+
import { Text as b } from "./text.js";
|
|
8
|
+
import { Heading as k } from "./heading.js";
|
|
9
|
+
import { Paragraph as B } from "./paragraph.js";
|
|
10
|
+
import { Link as T, Link as L } from "./link.js";
|
|
11
11
|
import { Span as F } from "./span.js";
|
|
12
12
|
import { Bold as h } from "./bold.js";
|
|
13
13
|
import { Italic as P } from "./italic.js";
|
|
@@ -17,27 +17,28 @@ import { Button as H } from "./button.js";
|
|
|
17
17
|
import { Input as q } from "./input.js";
|
|
18
18
|
import { WebhookForm as M } from "./webhook-form.js";
|
|
19
19
|
import { Form as O } from "./form.js";
|
|
20
|
-
import { Image as
|
|
21
|
-
import { Blockquote as
|
|
22
|
-
import { List as
|
|
23
|
-
import { ListItem as
|
|
24
|
-
import { Separator as
|
|
20
|
+
import { Image as Y } from "./image.js";
|
|
21
|
+
import { Blockquote as z } from "./blockquote.js";
|
|
22
|
+
import { List as D } from "./list.js";
|
|
23
|
+
import { ListItem as J } from "./list-item.js";
|
|
24
|
+
import { Separator as Q } from "./separator.js";
|
|
25
25
|
import { CodeText as Z } from "./code-text.js";
|
|
26
26
|
import { Label as $ } from "./label.js";
|
|
27
27
|
import { Textarea as ro } from "./textarea.js";
|
|
28
28
|
import { RadioButton as to } from "./radio-button.js";
|
|
29
29
|
import { Checkbox as po } from "./checkbox.js";
|
|
30
30
|
import { Vimeo as fo } from "./vimeo.js";
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
31
|
+
import { YouTube as ao } from "./youtube.js";
|
|
32
|
+
import { VimeoPreviewImage as lo } from "./vimeo-preview-image.js";
|
|
33
|
+
import { VimeoPlayButton as bo } from "./vimeo-play-button.js";
|
|
33
34
|
import { VimeoSpinner as ko } from "./vimeo-spinner.js";
|
|
34
|
-
import { XmlNode as
|
|
35
|
-
import { XmlTime as
|
|
36
|
-
import { Time as
|
|
37
|
-
import { Select as
|
|
38
|
-
import { Option as
|
|
35
|
+
import { XmlNode as Bo } from "./xml-node.js";
|
|
36
|
+
import { XmlTime as To } from "./xml-time.js";
|
|
37
|
+
import { Time as go } from "./time.js";
|
|
38
|
+
import { Select as Io } from "./select.js";
|
|
39
|
+
import { Option as Vo } from "./option.js";
|
|
39
40
|
export {
|
|
40
|
-
|
|
41
|
+
z as Blockquote,
|
|
41
42
|
n as Body,
|
|
42
43
|
h as Bold,
|
|
43
44
|
d as Box,
|
|
@@ -46,34 +47,35 @@ export {
|
|
|
46
47
|
Z as CodeText,
|
|
47
48
|
M as Form,
|
|
48
49
|
m as Fragment,
|
|
49
|
-
|
|
50
|
+
k as Heading,
|
|
50
51
|
x as HtmlEmbed,
|
|
51
|
-
|
|
52
|
+
Y as Image,
|
|
52
53
|
q as Input,
|
|
53
54
|
P as Italic,
|
|
54
55
|
$ as Label,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
T as Link,
|
|
57
|
+
D as List,
|
|
58
|
+
J as ListItem,
|
|
58
59
|
i as MarkdownEmbed,
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
Vo as Option,
|
|
61
|
+
B as Paragraph,
|
|
61
62
|
to as RadioButton,
|
|
62
63
|
O as RemixForm,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
L as RichTextLink,
|
|
65
|
+
Io as Select,
|
|
66
|
+
Q as Separator,
|
|
66
67
|
e as Slot,
|
|
67
68
|
F as Span,
|
|
68
69
|
C as Subscript,
|
|
69
70
|
w as Superscript,
|
|
70
|
-
|
|
71
|
+
b as Text,
|
|
71
72
|
ro as Textarea,
|
|
72
|
-
|
|
73
|
+
go as Time,
|
|
73
74
|
fo as Vimeo,
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
bo as VimeoPlayButton,
|
|
76
|
+
lo as VimeoPreviewImage,
|
|
76
77
|
ko as VimeoSpinner,
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
Bo as XmlNode,
|
|
79
|
+
To as XmlTime,
|
|
80
|
+
ao as YouTube
|
|
79
81
|
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { $ as a, ws as t } from "@webstudio-is/template";
|
|
3
|
+
import { imagePlaceholderDataUrl as o } from "@webstudio-is/image";
|
|
4
|
+
import { ContentEmbedIcon as n } from "@webstudio-is/icons/svg";
|
|
5
|
+
const s = `
|
|
6
|
+
<h1>Styling HTML with Content Embed</h1>
|
|
7
|
+
<p>Content Embed allows styling of HTML, which primarily comes from external data.</p>
|
|
8
|
+
<h2>How to Use Content Embed</h2>
|
|
9
|
+
<ul>
|
|
10
|
+
<li>Every element is shown in the Navigator.</li>
|
|
11
|
+
<li>Apply styles and Tokens to each element.</li>
|
|
12
|
+
<li>Adjustments to elements apply universally within this embed, ensuring consistency across your content.</li>
|
|
13
|
+
</ul>
|
|
14
|
+
<hr>
|
|
15
|
+
<h2>This sample text contains all the elements that can be styled.</h2>
|
|
16
|
+
<p>Any elements that were not used above are used below.</p>
|
|
17
|
+
<h3>Heading 3</h3>
|
|
18
|
+
<h4>Heading 4</h4>
|
|
19
|
+
<h5>Heading 5</h5>
|
|
20
|
+
<h6>Heading 6</h6>
|
|
21
|
+
<p><a href="#">Links</a> connect your content to relevant resources.</p>
|
|
22
|
+
<p><strong>Bold text</strong> makes your important points stand out.</p>
|
|
23
|
+
<p><em>Italic text</em> is great for emphasizing terms.</p>
|
|
24
|
+
<ol>
|
|
25
|
+
<li>First Step</li>
|
|
26
|
+
<li>Second Step</li>
|
|
27
|
+
</ol>
|
|
28
|
+
<img src="${o}">
|
|
29
|
+
<blockquote>Capture attention with a powerful quote.</blockquote>
|
|
30
|
+
<p>Using <code>console.log("Hello World");</code> will log to the console.</p>
|
|
31
|
+
<table>
|
|
32
|
+
<tr>
|
|
33
|
+
<th>Header 1</th>
|
|
34
|
+
<th>Header 2</th>
|
|
35
|
+
<th>Header 3</th>
|
|
36
|
+
</tr>
|
|
37
|
+
<tr>
|
|
38
|
+
<td>Cell 1.1</td>
|
|
39
|
+
<td>Cell 1.2</td>
|
|
40
|
+
<td>Cell 1.3</td>
|
|
41
|
+
</tr>
|
|
42
|
+
<tr>
|
|
43
|
+
<td>Cell 2.1</td>
|
|
44
|
+
<td>Cell 2.2</td>
|
|
45
|
+
<td>Cell 2.3</td>
|
|
46
|
+
</tr>
|
|
47
|
+
<tr>
|
|
48
|
+
<td>Cell 3.1</td>
|
|
49
|
+
<td>Cell 3.2</td>
|
|
50
|
+
<td>Cell 3.3</td>
|
|
51
|
+
</tr>
|
|
52
|
+
</table>
|
|
53
|
+
`.trim(), h = {
|
|
54
|
+
category: "data",
|
|
55
|
+
icon: n,
|
|
56
|
+
description: "Content Embed allows styling of HTML, which can be provided via the Code property statically or loaded dynamically from any Resource, for example, from a CMS.",
|
|
57
|
+
order: 3,
|
|
58
|
+
template: /* @__PURE__ */ l(a.HtmlEmbed, { "ws:label": "Content Embed", code: s, children: [
|
|
59
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "Paragraph", selector: " p" }),
|
|
60
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "Heading 1", selector: " h1" }),
|
|
61
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "Heading 2", selector: " h2" }),
|
|
62
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "Heading 3", selector: " h3" }),
|
|
63
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "Heading 4", selector: " h4" }),
|
|
64
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "Heading 5", selector: " h5" }),
|
|
65
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "Heading 6", selector: " h6" }),
|
|
66
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "Bold", selector: " :where(strong, b)" }),
|
|
67
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "Italic", selector: " :where(em, i)" }),
|
|
68
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "Link", selector: " a" }),
|
|
69
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "Image", selector: " img" }),
|
|
70
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "Blockquote", selector: " blockquote" }),
|
|
71
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "Code Text", selector: " code" }),
|
|
72
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "List", selector: " :where(ul, ol)" }),
|
|
73
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "List Item", selector: " li" }),
|
|
74
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "Separator", selector: " hr" }),
|
|
75
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "Table", selector: " table" }),
|
|
76
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "Table Row", selector: " tr" }),
|
|
77
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "Table Header Cell", selector: " th" }),
|
|
78
|
+
/* @__PURE__ */ e(t.descendant, { "ws:label": "Table Cell", selector: " td" })
|
|
79
|
+
] })
|
|
80
|
+
};
|
|
81
|
+
export {
|
|
82
|
+
h as meta
|
|
83
|
+
};
|
package/lib/form.ws.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
-
import { defaultStates as o } from "@webstudio-is/
|
|
2
|
+
import { defaultStates as o } from "@webstudio-is/sdk";
|
|
3
3
|
import { form as r } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as e } from "./__generated__/form.props.js";
|
|
5
5
|
const n = {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { $ as t } from "@webstudio-is/template";
|
|
3
|
+
const n = {
|
|
4
|
+
category: "typography",
|
|
5
|
+
description: "Use HTML headings to structure and organize content. Use the Tag property in settings to change the heading level (h1-h6).",
|
|
6
|
+
order: 1,
|
|
7
|
+
template: /* @__PURE__ */ e(t.Heading, {})
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
n as meta
|
|
11
|
+
};
|
package/lib/heading.ws.js
CHANGED
|
@@ -1,44 +1,28 @@
|
|
|
1
1
|
import { HeadingIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
-
import { defaultStates as
|
|
3
|
-
import { h1 as
|
|
2
|
+
import { defaultStates as o } from "@webstudio-is/sdk";
|
|
3
|
+
import { h1 as e, h2 as n, h3 as r, h4 as a, h5 as s, h6 as i } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as p } from "./__generated__/heading.props.js";
|
|
5
|
-
const
|
|
6
|
-
h1:
|
|
7
|
-
h2:
|
|
8
|
-
h3:
|
|
9
|
-
h4:
|
|
10
|
-
h5:
|
|
11
|
-
h6:
|
|
12
|
-
},
|
|
13
|
-
category: "text",
|
|
5
|
+
const m = {
|
|
6
|
+
h1: e,
|
|
7
|
+
h2: n,
|
|
8
|
+
h3: r,
|
|
9
|
+
h4: a,
|
|
10
|
+
h5: s,
|
|
11
|
+
h6: i
|
|
12
|
+
}, d = {
|
|
14
13
|
type: "container",
|
|
15
|
-
description: "Use HTML headings to structure and organize content. Use the Tag property in settings to change the heading level (h1-h6).",
|
|
16
14
|
icon: t,
|
|
17
15
|
constraints: {
|
|
18
16
|
relation: "ancestor",
|
|
19
17
|
component: { $neq: "Heading" }
|
|
20
18
|
},
|
|
21
|
-
states:
|
|
22
|
-
presetStyle:
|
|
23
|
-
|
|
24
|
-
template: [
|
|
25
|
-
{
|
|
26
|
-
type: "instance",
|
|
27
|
-
component: "Heading",
|
|
28
|
-
children: [
|
|
29
|
-
{
|
|
30
|
-
type: "text",
|
|
31
|
-
value: "Heading text you can edit",
|
|
32
|
-
placeholder: !0
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
}, y = {
|
|
19
|
+
states: o,
|
|
20
|
+
presetStyle: m
|
|
21
|
+
}, g = {
|
|
38
22
|
props: p,
|
|
39
23
|
initialProps: ["id", "className", "tag"]
|
|
40
24
|
};
|
|
41
25
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
26
|
+
d as meta,
|
|
27
|
+
g as propsMeta
|
|
44
28
|
};
|
package/lib/image.ws.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ImageIcon as
|
|
2
|
-
import { defaultStates as
|
|
3
|
-
import { img as
|
|
4
|
-
import { props as
|
|
1
|
+
import { ImageIcon as e } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { defaultStates as t } from "@webstudio-is/sdk";
|
|
3
|
+
import { img as o } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
+
import { props as r } from "./__generated__/image.props.js";
|
|
5
5
|
const a = {
|
|
6
6
|
img: [
|
|
7
|
-
...
|
|
7
|
+
...o,
|
|
8
8
|
// Otherwise on new image insert onto canvas it can overfit screen size multiple times
|
|
9
9
|
{
|
|
10
10
|
property: "maxWidth",
|
|
@@ -28,24 +28,20 @@ const a = {
|
|
|
28
28
|
category: "media",
|
|
29
29
|
type: "embed",
|
|
30
30
|
description: "Add an image asset to the page. Webstudio automatically converts images to WebP or AVIF format and makes them responsive for best performance.",
|
|
31
|
-
icon:
|
|
32
|
-
states:
|
|
31
|
+
icon: e,
|
|
32
|
+
states: t,
|
|
33
33
|
presetStyle: a,
|
|
34
34
|
order: 0
|
|
35
|
-
},
|
|
36
|
-
src: {
|
|
37
|
-
type: "string",
|
|
38
|
-
control: "file",
|
|
39
|
-
label: "Source",
|
|
40
|
-
required: !1
|
|
41
|
-
}
|
|
42
|
-
}, t = e.optimize;
|
|
43
|
-
t.description = "Optimize the image for enhanced performance.";
|
|
44
|
-
const d = {
|
|
35
|
+
}, d = {
|
|
45
36
|
props: {
|
|
46
|
-
...
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
...r,
|
|
38
|
+
// Automatically generated props don't have the right control.
|
|
39
|
+
src: {
|
|
40
|
+
type: "string",
|
|
41
|
+
control: "file",
|
|
42
|
+
label: "Source",
|
|
43
|
+
required: !1
|
|
44
|
+
}
|
|
49
45
|
},
|
|
50
46
|
initialProps: [
|
|
51
47
|
"id",
|
|
@@ -60,6 +56,5 @@ const d = {
|
|
|
60
56
|
};
|
|
61
57
|
export {
|
|
62
58
|
l as meta,
|
|
63
|
-
d as propsMeta
|
|
64
|
-
p as propsOverrides
|
|
59
|
+
d as propsMeta
|
|
65
60
|
};
|
package/lib/input.ws.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormTextFieldIcon as e } from "@webstudio-is/icons/svg";
|
|
2
|
-
import { defaultStates as t } from "@webstudio-is/
|
|
2
|
+
import { defaultStates as t } from "@webstudio-is/sdk";
|
|
3
3
|
import { input as o } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as l } from "./__generated__/input.props.js";
|
|
5
5
|
const r = {
|
package/lib/italic.ws.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TextItalicIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
-
import { defaultStates as e } from "@webstudio-is/
|
|
2
|
+
import { defaultStates as e } from "@webstudio-is/sdk";
|
|
3
3
|
import { i as o } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { props as i } from "./__generated__/italic.props.js";
|
|
5
5
|
const r = {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { $ as r, PlaceholderValue as o } from "@webstudio-is/template";
|
|
3
|
+
const a = {
|
|
4
|
+
category: "forms",
|
|
5
|
+
order: 2,
|
|
6
|
+
template: /* @__PURE__ */ e(r.Label, { children: new o("Form Label") })
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
a as meta
|
|
10
|
+
};
|
package/lib/label.ws.js
CHANGED
|
@@ -1,42 +1,27 @@
|
|
|
1
|
-
import { LabelIcon as
|
|
2
|
-
import { defaultStates as o } from "@webstudio-is/
|
|
3
|
-
import { label as
|
|
4
|
-
import { props as
|
|
5
|
-
const
|
|
1
|
+
import { LabelIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { defaultStates as o } from "@webstudio-is/sdk";
|
|
3
|
+
import { label as e } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
+
import { props as r } from "./__generated__/label.props.js";
|
|
5
|
+
const a = {
|
|
6
6
|
label: [
|
|
7
|
-
...
|
|
7
|
+
...e,
|
|
8
8
|
{ property: "display", value: { type: "keyword", value: "block" } }
|
|
9
9
|
]
|
|
10
|
-
},
|
|
11
|
-
category: "forms",
|
|
10
|
+
}, i = {
|
|
12
11
|
constraints: {
|
|
13
12
|
relation: "ancestor",
|
|
14
13
|
component: { $nin: ["Button", "Link"] }
|
|
15
14
|
},
|
|
16
15
|
type: "container",
|
|
17
16
|
label: "Input Label",
|
|
18
|
-
icon:
|
|
17
|
+
icon: t,
|
|
19
18
|
states: o,
|
|
20
|
-
presetStyle:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
{
|
|
24
|
-
type: "instance",
|
|
25
|
-
component: "Label",
|
|
26
|
-
children: [{ type: "text", value: "Form Label", placeholder: !0 }]
|
|
27
|
-
}
|
|
28
|
-
]
|
|
29
|
-
}, i = {
|
|
30
|
-
props: {
|
|
31
|
-
...t,
|
|
32
|
-
htmlFor: {
|
|
33
|
-
...t.htmlFor,
|
|
34
|
-
label: "For"
|
|
35
|
-
}
|
|
36
|
-
},
|
|
19
|
+
presetStyle: a
|
|
20
|
+
}, m = {
|
|
21
|
+
props: r,
|
|
37
22
|
initialProps: ["id", "className", "htmlFor"]
|
|
38
23
|
};
|
|
39
24
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
25
|
+
i as meta,
|
|
26
|
+
m as propsMeta
|
|
42
27
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { $ as o } from "@webstudio-is/template";
|
|
3
|
+
const n = {
|
|
4
|
+
category: "general",
|
|
5
|
+
description: "Use a link to send your users to another page, section, or resource. Configure links in the Settings panel.",
|
|
6
|
+
order: 1,
|
|
7
|
+
template: /* @__PURE__ */ e(o.Link, {})
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
n as meta
|
|
11
|
+
};
|