@webstudio-is/sdk-components-react 0.219.0 → 0.221.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.
Files changed (141) hide show
  1. package/lib/__generated__/checkbox.props.js +1 -1
  2. package/lib/__generated__/markdown-embed.props.js +2 -8
  3. package/lib/__generated__/radio-button.props.js +1 -1
  4. package/lib/__generated__/time.props.js +0 -7
  5. package/lib/blockquote.ws.js +7 -14
  6. package/lib/body.ws.js +6 -24
  7. package/lib/bold.ws.js +7 -15
  8. package/lib/box.ws.js +16 -25
  9. package/lib/button.ws.js +7 -19
  10. package/lib/checkbox.ws.js +8 -21
  11. package/lib/code-text.ws.js +10 -17
  12. package/lib/form.ws.js +7 -16
  13. package/lib/fragment.ws.js +2 -7
  14. package/lib/head-link.ws.js +6 -9
  15. package/lib/head-meta.ws.js +5 -8
  16. package/lib/head-slot.template.js +1 -1
  17. package/lib/head-slot.ws.js +3 -7
  18. package/lib/head-title.ws.js +2 -4
  19. package/lib/heading.ws.js +14 -21
  20. package/lib/html-embed.ws.js +6 -8
  21. package/lib/image.ws.js +20 -26
  22. package/lib/input.js +18 -14
  23. package/lib/input.ws.js +10 -31
  24. package/lib/italic.ws.js +7 -21
  25. package/lib/label.ws.js +6 -12
  26. package/lib/link.ws.js +11 -28
  27. package/lib/list-item.ws.js +6 -15
  28. package/lib/list.ws.js +9 -15
  29. package/lib/markdown-embed.ws.js +6 -8
  30. package/lib/option.js +3 -1
  31. package/lib/option.ws.js +6 -10
  32. package/lib/paragraph.ws.js +7 -16
  33. package/lib/radio-button.ws.js +9 -23
  34. package/lib/rich-text-link.ws.js +3 -4
  35. package/lib/select.js +27 -14
  36. package/lib/select.ws.js +10 -23
  37. package/lib/separator.ws.js +9 -18
  38. package/lib/slot.ws.js +5 -8
  39. package/lib/span.ws.js +7 -13
  40. package/lib/subscript.ws.js +7 -15
  41. package/lib/superscript.ws.js +7 -15
  42. package/lib/templates.js +12 -36
  43. package/lib/text.ws.js +8 -12
  44. package/lib/textarea.js +16 -5
  45. package/lib/textarea.ws.js +11 -32
  46. package/lib/time.js +2 -1
  47. package/lib/time.ws.js +12 -14
  48. package/lib/types/blockquote.ws.d.ts +1 -2
  49. package/lib/types/body.ws.d.ts +1 -2
  50. package/lib/types/bold.ws.d.ts +1 -2
  51. package/lib/types/box.ws.d.ts +1 -2
  52. package/lib/types/button.ws.d.ts +1 -2
  53. package/lib/types/checkbox.d.ts +1 -1
  54. package/lib/types/checkbox.ws.d.ts +1 -2
  55. package/lib/types/code-text.ws.d.ts +1 -2
  56. package/lib/types/form.ws.d.ts +1 -2
  57. package/lib/types/fragment.ws.d.ts +1 -2
  58. package/lib/types/head-link.ws.d.ts +1 -2
  59. package/lib/types/head-meta.ws.d.ts +1 -2
  60. package/lib/types/head-slot.ws.d.ts +1 -2
  61. package/lib/types/head-title.ws.d.ts +1 -2
  62. package/lib/types/heading.ws.d.ts +1 -2
  63. package/lib/types/html-embed.ws.d.ts +1 -2
  64. package/lib/types/image.ws.d.ts +1 -2
  65. package/lib/types/input.d.ts +1 -4
  66. package/lib/types/input.ws.d.ts +1 -2
  67. package/lib/types/italic.ws.d.ts +1 -2
  68. package/lib/types/label.ws.d.ts +1 -2
  69. package/lib/types/link.ws.d.ts +1 -2
  70. package/lib/types/list-item.ws.d.ts +1 -2
  71. package/lib/types/list.ws.d.ts +1 -2
  72. package/lib/types/markdown-embed.d.ts +3 -3
  73. package/lib/types/markdown-embed.ws.d.ts +1 -2
  74. package/lib/types/option.d.ts +0 -1
  75. package/lib/types/option.ws.d.ts +1 -2
  76. package/lib/types/paragraph.ws.d.ts +1 -2
  77. package/lib/types/radio-button.d.ts +1 -1
  78. package/lib/types/radio-button.ws.d.ts +1 -2
  79. package/lib/types/rich-text-link.ws.d.ts +1 -2
  80. package/lib/types/select.d.ts +0 -1
  81. package/lib/types/select.ws.d.ts +1 -2
  82. package/lib/types/separator.ws.d.ts +1 -2
  83. package/lib/types/slot.ws.d.ts +1 -2
  84. package/lib/types/span.ws.d.ts +1 -2
  85. package/lib/types/subscript.ws.d.ts +1 -2
  86. package/lib/types/superscript.ws.d.ts +1 -2
  87. package/lib/types/templates.d.ts +0 -12
  88. package/lib/types/text.ws.d.ts +1 -2
  89. package/lib/types/textarea.d.ts +0 -1
  90. package/lib/types/textarea.ws.d.ts +1 -2
  91. package/lib/types/time.d.ts +2 -4
  92. package/lib/types/time.ws.d.ts +1 -2
  93. package/lib/types/video.ws.d.ts +1 -2
  94. package/lib/types/vimeo-play-button.ws.d.ts +1 -2
  95. package/lib/types/vimeo-preview-image.d.ts +21 -21
  96. package/lib/types/vimeo-preview-image.ws.d.ts +1 -2
  97. package/lib/types/vimeo-spinner.ws.d.ts +1 -2
  98. package/lib/types/vimeo.ws.d.ts +1 -2
  99. package/lib/types/webhook-form.ws.d.ts +1 -2
  100. package/lib/types/xml-node.ws.d.ts +1 -2
  101. package/lib/types/xml-time.ws.d.ts +1 -2
  102. package/lib/types/youtube.ws.d.ts +1 -2
  103. package/lib/video.ws.js +14 -17
  104. package/lib/vimeo-play-button.ws.js +9 -15
  105. package/lib/vimeo-preview-image.ws.js +6 -8
  106. package/lib/vimeo-spinner.ws.js +7 -13
  107. package/lib/vimeo.template.js +22 -21
  108. package/lib/vimeo.ws.js +13 -19
  109. package/lib/webhook-form.template.js +61 -22
  110. package/lib/webhook-form.ws.js +4 -6
  111. package/lib/xml-node.ws.js +5 -7
  112. package/lib/xml-time.ws.js +5 -7
  113. package/lib/youtube.template.js +16 -15
  114. package/lib/youtube.ws.js +13 -19
  115. package/package.json +8 -13
  116. package/lib/blockquote.template.js +0 -11
  117. package/lib/button.template.js +0 -11
  118. package/lib/checkbox.template.js +0 -14
  119. package/lib/heading.template.js +0 -11
  120. package/lib/label.template.js +0 -10
  121. package/lib/link.template.js +0 -11
  122. package/lib/list-item.template.js +0 -11
  123. package/lib/list.template.js +0 -15
  124. package/lib/paragraph.template.js +0 -11
  125. package/lib/props.js +0 -92
  126. package/lib/radio-button.template.js +0 -14
  127. package/lib/select.template.js +0 -16
  128. package/lib/text.template.js +0 -11
  129. package/lib/types/blockquote.template.d.ts +0 -2
  130. package/lib/types/button.template.d.ts +0 -2
  131. package/lib/types/checkbox.template.d.ts +0 -2
  132. package/lib/types/heading.template.d.ts +0 -2
  133. package/lib/types/label.template.d.ts +0 -2
  134. package/lib/types/link.template.d.ts +0 -2
  135. package/lib/types/list-item.template.d.ts +0 -2
  136. package/lib/types/list.template.d.ts +0 -2
  137. package/lib/types/paragraph.template.d.ts +0 -2
  138. package/lib/types/props.d.ts +0 -45
  139. package/lib/types/radio-button.template.d.ts +0 -2
  140. package/lib/types/select.template.d.ts +0 -2
  141. package/lib/types/text.template.d.ts +0 -2
@@ -3,7 +3,7 @@ const e = {
3
3
  required: !1,
4
4
  control: "text",
5
5
  type: "string",
6
- description: "Current value of the element"
6
+ description: "Value of the form control"
7
7
  }
8
8
  };
9
9
  export {
@@ -1,12 +1,6 @@
1
- const e = {
2
- className: {
3
- required: !1,
4
- control: "text",
5
- type: "string",
6
- description: "Classes to which the element belongs"
7
- },
1
+ const t = {
8
2
  code: { required: !0, control: "text", type: "string" }
9
3
  };
10
4
  export {
11
- e as props
5
+ t as props
12
6
  };
@@ -3,7 +3,7 @@ const e = {
3
3
  required: !1,
4
4
  control: "text",
5
5
  type: "string",
6
- description: "Current value of the element"
6
+ description: "Value of the form control"
7
7
  }
8
8
  };
9
9
  export {
@@ -213,13 +213,6 @@ const e = {
213
213
  defaultValue: "medium",
214
214
  options: ["full", "long", "medium", "short", "none"]
215
215
  },
216
- datetime: {
217
- required: !1,
218
- control: "text",
219
- type: "string",
220
- defaultValue: "dateTime attribute is not set",
221
- description: "Machine-readable value"
222
- },
223
216
  language: {
224
217
  required: !1,
225
218
  control: "select",
@@ -1,7 +1,5 @@
1
- import { BlockquoteIcon as t } from "@webstudio-is/icons/svg";
2
- import { defaultStates as e } from "@webstudio-is/sdk";
3
- import { props as p } from "./__generated__/blockquote.props.js";
4
- const r = {
1
+ import { props as t } from "./__generated__/blockquote.props.js";
2
+ const e = {
5
3
  blockquote: [
6
4
  {
7
5
  property: "margin-top",
@@ -48,16 +46,11 @@ const r = {
48
46
  value: { type: "rgb", r: 226, g: 226, b: 226, alpha: 1 }
49
47
  }
50
48
  ]
51
- }, i = {
52
- placeholder: "Blockquote",
53
- icon: t,
54
- states: e,
55
- presetStyle: r
56
- }, l = {
57
- props: p,
58
- initialProps: ["id", "className", "cite"]
49
+ }, r = {
50
+ presetStyle: e,
51
+ initialProps: ["id", "class", "cite"],
52
+ props: t
59
53
  };
60
54
  export {
61
- i as meta,
62
- l as propsMeta
55
+ r as meta
63
56
  };
package/lib/body.ws.js CHANGED
@@ -1,28 +1,10 @@
1
- import { BodyIcon as o } from "@webstudio-is/icons/svg";
2
- import { defaultStates as t } from "@webstudio-is/sdk";
3
- import { body as e } from "@webstudio-is/sdk/normalize.css";
1
+ import { body as o } from "@webstudio-is/sdk/normalize.css";
4
2
  import { props as r } from "./__generated__/body.props.js";
5
- const a = {
6
- body: [
7
- ...e,
8
- {
9
- property: "-webkit-font-smoothing",
10
- value: { type: "keyword", value: "antialiased" }
11
- },
12
- {
13
- property: "-moz-osx-font-smoothing",
14
- value: { type: "keyword", value: "grayscale" }
15
- }
16
- ]
17
- }, n = {
18
- icon: o,
19
- states: t,
20
- presetStyle: a
21
- }, y = {
22
- props: r,
23
- initialProps: ["id", "className"]
3
+ const i = {
4
+ presetStyle: { body: o },
5
+ initialProps: ["id", "class"],
6
+ props: r
24
7
  };
25
8
  export {
26
- n as meta,
27
- y as propsMeta
9
+ i as meta
28
10
  };
package/lib/bold.ws.js CHANGED
@@ -1,19 +1,11 @@
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
- }, l = {
1
+ import { b as o } from "@webstudio-is/sdk/normalize.css";
2
+ import { props as t } from "./__generated__/bold.props.js";
3
+ const p = {
8
4
  label: "Bold Text",
9
- icon: o,
10
- states: t,
11
- presetStyle: s
12
- }, c = {
13
- props: e,
14
- initialProps: ["id", "className"]
5
+ presetStyle: { b: o },
6
+ initialProps: ["id", "class"],
7
+ props: t
15
8
  };
16
9
  export {
17
- l as meta,
18
- c as propsMeta
10
+ p as meta
19
11
  };
package/lib/box.ws.js CHANGED
@@ -1,28 +1,21 @@
1
- import { BoxIcon as t } from "@webstudio-is/icons/svg";
2
- import { defaultStates as e } from "@webstudio-is/sdk";
3
- import { section as r, nav as o, main as a, header as i, footer as s, figure as n, aside as d, article as p, address as c, div as m } from "@webstudio-is/sdk/normalize.css";
4
- import { props as f } from "./__generated__/box.props.js";
5
- const v = {
6
- category: "general",
7
- description: "A container for content. By default this is a Div, but the tag can be changed in settings.",
8
- icon: t,
9
- states: e,
1
+ import { section as e, nav as r, main as t, header as i, footer as a, figure as o, aside as s, article as d, address as n, div as p } from "@webstudio-is/sdk/normalize.css";
2
+ import { props as c } from "./__generated__/box.props.js";
3
+ const g = {
10
4
  presetStyle: {
11
- div: m,
12
- address: c,
13
- article: p,
14
- aside: d,
15
- figure: n,
16
- footer: s,
5
+ div: p,
6
+ address: n,
7
+ article: d,
8
+ aside: s,
9
+ figure: o,
10
+ footer: a,
17
11
  header: i,
18
- main: a,
19
- nav: o,
20
- section: r
12
+ main: t,
13
+ nav: r,
14
+ section: e
21
15
  },
22
- order: 0
23
- }, y = {
16
+ initialProps: ["tag", "id", "class"],
24
17
  props: {
25
- ...f,
18
+ ...c,
26
19
  tag: {
27
20
  required: !0,
28
21
  control: "tag",
@@ -41,10 +34,8 @@ const v = {
41
34
  "span"
42
35
  ]
43
36
  }
44
- },
45
- initialProps: ["tag", "id", "className"]
37
+ }
46
38
  };
47
39
  export {
48
- v as meta,
49
- y as propsMeta
40
+ g as meta
50
41
  };
package/lib/button.ws.js CHANGED
@@ -1,22 +1,10 @@
1
- import { ButtonElementIcon as t } from "@webstudio-is/icons/svg";
2
- import { defaultStates as e } from "@webstudio-is/sdk";
3
- import { button as o } from "@webstudio-is/sdk/normalize.css";
4
- import { props as a } from "./__generated__/button.props.js";
5
- const l = {
6
- button: o
7
- }, m = {
8
- icon: t,
9
- presetStyle: l,
10
- states: [
11
- ...e,
12
- { selector: ":disabled", label: "Disabled" },
13
- { selector: ":enabled", label: "Enabled" }
14
- ]
15
- }, n = {
16
- props: a,
17
- initialProps: ["id", "className", "type", "aria-label"]
1
+ import { button as t } from "@webstudio-is/sdk/normalize.css";
2
+ import { props as o } from "./__generated__/button.props.js";
3
+ const e = {
4
+ presetStyle: { button: t },
5
+ initialProps: ["id", "class", "type", "aria-label"],
6
+ props: o
18
7
  };
19
8
  export {
20
- m as meta,
21
- n as propsMeta
9
+ e as meta
22
10
  };
@@ -1,33 +1,20 @@
1
1
  import { CheckboxCheckedIcon as e } from "@webstudio-is/icons/svg";
2
- import { defaultStates as l } from "@webstudio-is/sdk";
3
- import { checkbox as t } from "@webstudio-is/sdk/normalize.css";
2
+ import { checkbox as o } from "@webstudio-is/sdk/normalize.css";
4
3
  import { props as r } from "./__generated__/checkbox.props.js";
5
- const o = {
4
+ const t = {
6
5
  input: [
7
- ...t,
6
+ ...o,
8
7
  {
9
8
  property: "margin-right",
10
9
  value: { type: "unit", unit: "em", value: 0.5 }
11
10
  }
12
11
  ]
13
- }, d = {
12
+ }, m = {
14
13
  icon: e,
15
- presetStyle: o,
16
- states: [
17
- ...l,
18
- { selector: ":checked", label: "Checked" },
19
- { selector: ":required", label: "Required" },
20
- { selector: ":optional", label: "Optional" },
21
- { selector: ":disabled", label: "Disabled" },
22
- { selector: ":enabled", label: "Enabled" },
23
- { selector: ":read-only", label: "Read Only" },
24
- { selector: ":read-write", label: "Read Write" }
25
- ]
26
- }, n = {
27
- props: r,
28
- initialProps: ["id", "className", "name", "value", "required", "checked"]
14
+ presetStyle: t,
15
+ initialProps: ["id", "class", "name", "value", "required", "checked"],
16
+ props: r
29
17
  };
30
18
  export {
31
- d as meta,
32
- n as propsMeta
19
+ m as meta
33
20
  };
@@ -1,10 +1,9 @@
1
1
  import { BracesIcon as e } from "@webstudio-is/icons/svg";
2
- import { defaultStates as t } from "@webstudio-is/sdk";
3
- import { code as o } from "@webstudio-is/sdk/normalize.css";
4
- import { props as r } from "./__generated__/code-text.props.js";
5
- const p = {
2
+ import { code as r } from "@webstudio-is/sdk/normalize.css";
3
+ import { props as t } from "./__generated__/code-text.props.js";
4
+ const o = {
6
5
  code: [
7
- ...o,
6
+ ...r,
8
7
  {
9
8
  property: "display",
10
9
  value: { type: "keyword", value: "block" }
@@ -30,29 +29,23 @@ const p = {
30
29
  value: { type: "rgb", r: 238, g: 238, b: 238, alpha: 1 }
31
30
  }
32
31
  ]
33
- }, i = {
34
- category: "general",
35
- description: "Use this component when you want to display code as text on the page.",
32
+ }, c = {
36
33
  icon: e,
37
34
  contentModel: {
38
35
  category: "instance",
39
36
  children: []
40
37
  },
41
- states: t,
42
- presetStyle: p,
43
- order: 5
44
- }, s = {
38
+ presetStyle: o,
39
+ initialProps: ["id", "class", "lang", "code"],
45
40
  props: {
46
- ...r,
41
+ ...t,
47
42
  code: {
48
43
  required: !0,
49
44
  control: "codetext",
50
45
  type: "string"
51
46
  }
52
- },
53
- initialProps: ["id", "className", "lang", "code"]
47
+ }
54
48
  };
55
49
  export {
56
- i as meta,
57
- s as propsMeta
50
+ c as meta
58
51
  };
package/lib/form.ws.js CHANGED
@@ -1,25 +1,16 @@
1
- import { FormIcon as r } from "@webstudio-is/icons/svg";
2
- import { defaultStates as o } from "@webstudio-is/sdk";
3
1
  import { form as t } from "@webstudio-is/sdk/normalize.css";
4
- import { props as e } from "./__generated__/form.props.js";
5
- const s = {
2
+ import { props as o } from "./__generated__/form.props.js";
3
+ const r = {
6
4
  form: [
7
5
  ...t,
8
6
  { property: "min-height", value: { type: "unit", unit: "px", value: 20 } }
9
7
  ]
10
- }, n = {
11
- category: "forms",
8
+ }, p = {
12
9
  label: "Form",
13
- description: "Create filters, surveys, searches and more.",
14
- icon: r,
15
- states: o,
16
- presetStyle: s,
17
- order: 0
18
- }, c = {
19
- props: e,
20
- initialProps: ["id", "className", "action"]
10
+ presetStyle: r,
11
+ initialProps: ["id", "class", "action"],
12
+ props: o
21
13
  };
22
14
  export {
23
- n as meta,
24
- c as propsMeta
15
+ p as meta
25
16
  };
@@ -1,9 +1,4 @@
1
- const o = {
2
- icon: ""
3
- }, p = {
4
- props: {}
5
- };
1
+ const t = {};
6
2
  export {
7
- o as meta,
8
- p as propsMeta
3
+ t as meta
9
4
  };
@@ -1,17 +1,14 @@
1
1
  import { ResourceIcon as o } from "@webstudio-is/icons/svg";
2
- import "@webstudio-is/sdk";
3
- import { props as r } from "./__generated__/head-link.props.js";
4
- const p = {
2
+ import { props as e } from "./__generated__/head-link.props.js";
3
+ const t = {
5
4
  icon: o,
6
5
  contentModel: {
7
6
  category: "none",
8
7
  children: []
9
- }
10
- }, c = {
11
- props: r,
12
- initialProps: ["rel", "hrefLang", "href", "type", "as"]
8
+ },
9
+ initialProps: ["rel", "hrefLang", "href", "type", "as"],
10
+ props: e
13
11
  };
14
12
  export {
15
- p as meta,
16
- c as propsMeta
13
+ t as meta
17
14
  };
@@ -1,17 +1,14 @@
1
1
  import { WindowInfoIcon as o } from "@webstudio-is/icons/svg";
2
- import "@webstudio-is/sdk";
3
2
  import { props as n } from "./__generated__/head-meta.props.js";
4
- const p = {
3
+ const e = {
5
4
  icon: o,
6
5
  contentModel: {
7
6
  category: "none",
8
7
  children: []
9
- }
10
- }, i = {
11
- props: n,
12
- initialProps: ["name", "property", "content"]
8
+ },
9
+ initialProps: ["name", "property", "content"],
10
+ props: n
13
11
  };
14
12
  export {
15
- p as meta,
16
- i as propsMeta
13
+ e as meta
17
14
  };
@@ -3,7 +3,7 @@ import { $ as e } from "@webstudio-is/template";
3
3
  const l = {
4
4
  category: "general",
5
5
  description: "The Head Slot component lets you customize page-specific head elements (like canonical URLs), which merge with your site's global head settings, with Head Slot definitions taking priority over Page Settings. For site-wide head changes, use Project Settings instead.",
6
- order: 6,
6
+ order: 5,
7
7
  template: /* @__PURE__ */ i(e.HeadSlot, { children: [
8
8
  /* @__PURE__ */ t(e.HeadTitle, { "ws:label": "Title", children: "Title" }),
9
9
  /* @__PURE__ */ t(e.HeadLink, { "ws:label": "Link", rel: "help", href: "/help" }),
@@ -1,5 +1,4 @@
1
1
  import { HeaderIcon as e } from "@webstudio-is/icons/svg";
2
- import "@webstudio-is/sdk";
3
2
  import { props as t } from "./__generated__/head-slot.props.js";
4
3
  const r = {
5
4
  icon: e,
@@ -7,12 +6,9 @@ const r = {
7
6
  contentModel: {
8
7
  category: "instance",
9
8
  children: ["HeadLink", "HeadMeta", "HeadTitle"]
10
- }
11
- }, a = {
12
- props: t,
13
- initialProps: []
9
+ },
10
+ props: t
14
11
  };
15
12
  export {
16
- r as meta,
17
- a as propsMeta
13
+ r as meta
18
14
  };
@@ -5,11 +5,9 @@ const r = {
5
5
  contentModel: {
6
6
  category: "none",
7
7
  children: ["text"]
8
- }
9
- }, c = {
8
+ },
10
9
  props: t
11
10
  };
12
11
  export {
13
- r as meta,
14
- c as propsMeta
12
+ r as meta
15
13
  };
package/lib/heading.ws.js CHANGED
@@ -1,32 +1,25 @@
1
- import { HeadingIcon as t } from "@webstudio-is/icons/svg";
2
- import { defaultStates as o } from "@webstudio-is/sdk";
3
- import { h6 as r, h5 as e, h4 as p, h3 as a, h2 as i, h1 as s } from "@webstudio-is/sdk/normalize.css";
4
- import { props as h } from "./__generated__/heading.props.js";
5
- const d = {
6
- placeholder: "Heading",
7
- icon: t,
8
- states: o,
1
+ import { h6 as t, h5 as r, h4 as o, h3 as h, h2 as p, h1 as e } from "@webstudio-is/sdk/normalize.css";
2
+ import { props as i } from "./__generated__/heading.props.js";
3
+ const m = {
9
4
  presetStyle: {
10
- h1: s,
11
- h2: i,
12
- h3: a,
13
- h4: p,
14
- h5: e,
15
- h6: r
16
- }
17
- }, g = {
5
+ h1: e,
6
+ h2: p,
7
+ h3: h,
8
+ h4: o,
9
+ h5: r,
10
+ h6: t
11
+ },
12
+ initialProps: ["tag", "id", "class"],
18
13
  props: {
19
- ...h,
14
+ ...i,
20
15
  tag: {
21
16
  required: !0,
22
17
  control: "tag",
23
18
  type: "string",
24
19
  options: ["h1", "h2", "h3", "h4", "h5", "h6"]
25
20
  }
26
- },
27
- initialProps: ["tag", "id", "className"]
21
+ }
28
22
  };
29
23
  export {
30
- d as meta,
31
- g as propsMeta
24
+ m as meta
32
25
  };
@@ -1,12 +1,12 @@
1
1
  import { EmbedIcon as t } from "@webstudio-is/icons/svg";
2
2
  import { descendantComponent as n } from "@webstudio-is/sdk";
3
3
  import { props as e } from "./__generated__/html-embed.props.js";
4
- const r = {
4
+ const a = {
5
5
  category: "general",
6
6
  label: "HTML Embed",
7
7
  description: "Used to add HTML code to the page, such as an SVG or script.",
8
8
  icon: t,
9
- order: 2,
9
+ order: 3,
10
10
  contentModel: {
11
11
  category: "instance",
12
12
  children: [n]
@@ -22,8 +22,8 @@ const r = {
22
22
  value: { type: "keyword", value: "collapse" }
23
23
  }
24
24
  ]
25
- }
26
- }, c = {
25
+ },
26
+ initialProps: ["class", "clientOnly", "executeScriptOnCanvas"],
27
27
  props: {
28
28
  ...e,
29
29
  clientOnly: {
@@ -41,10 +41,8 @@ const r = {
41
41
  language: "html",
42
42
  type: "string"
43
43
  }
44
- },
45
- initialProps: ["className", "clientOnly", "executeScriptOnCanvas"]
44
+ }
46
45
  };
47
46
  export {
48
- r as meta,
49
- c as propsMeta
47
+ a as meta
50
48
  };
package/lib/image.ws.js CHANGED
@@ -1,10 +1,8 @@
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
- const a = {
1
+ import { img as e } from "@webstudio-is/sdk/normalize.css";
2
+ import { props as t } from "./__generated__/image.props.js";
3
+ const o = {
6
4
  img: [
7
- ...o,
5
+ ...e,
8
6
  // Otherwise on new image insert onto canvas it can overfit screen size multiple times
9
7
  {
10
8
  property: "max-width",
@@ -24,36 +22,32 @@ const a = {
24
22
  value: { type: "keyword", value: "auto" }
25
23
  }
26
24
  ]
27
- }, l = {
25
+ }, i = {
28
26
  category: "media",
29
27
  description: "Add an image asset to the page. Webstudio automatically converts images to WebP or AVIF format and makes them responsive for best performance.",
30
- icon: e,
31
- states: t,
32
- presetStyle: a,
33
- order: 0
34
- }, n = {
35
- props: {
36
- ...r,
37
- // Automatically generated props don't have the right control.
38
- src: {
39
- type: "string",
40
- control: "file",
41
- label: "Source",
42
- required: !1
43
- }
44
- },
28
+ presetStyle: o,
29
+ order: 0,
45
30
  initialProps: [
46
31
  "id",
47
- "className",
32
+ "class",
48
33
  "src",
49
34
  "width",
50
35
  "height",
51
36
  "alt",
52
37
  "loading",
53
38
  "optimize"
54
- ]
39
+ ],
40
+ props: {
41
+ ...t,
42
+ // Automatically generated props don't have the right control.
43
+ src: {
44
+ type: "string",
45
+ control: "file",
46
+ label: "Source",
47
+ required: !1
48
+ }
49
+ }
55
50
  };
56
51
  export {
57
- l as meta,
58
- n as propsMeta
52
+ i as meta
59
53
  };
package/lib/input.js CHANGED
@@ -1,17 +1,21 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { forwardRef as n } from "react";
3
- const a = n(
4
- ({ children: d, type: t = "text", value: r, defaultValue: e, ...o }, p) => /* @__PURE__ */ i(
5
- "input",
6
- {
7
- ...o,
8
- defaultValue: r ?? e,
9
- type: t,
10
- ref: p
11
- }
12
- )
1
+ import { forwardRef as m, useContext as s, createElement as c } from "react";
2
+ import { ReactSdkContext as d } from "@webstudio-is/react-sdk/runtime";
3
+ const f = m(
4
+ ({ value: t, defaultValue: r, checked: n, defaultChecked: e, ...o }, i) => {
5
+ const { renderer: p } = s(d), a = p === "canvas" ? String(t ?? r) + String(n ?? e) : void 0;
6
+ return /* @__PURE__ */ c(
7
+ "input",
8
+ {
9
+ ...o,
10
+ key: a,
11
+ defaultValue: t ?? r,
12
+ defaultChecked: n ?? e,
13
+ ref: i
14
+ }
15
+ );
16
+ }
13
17
  );
14
- a.displayName = "Input";
18
+ f.displayName = "Input";
15
19
  export {
16
- a as Input
20
+ f as Input
17
21
  };