@webstudio-is/sdk-components-react 0.0.0-588fe22 → 0.0.0-73cd6ea

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 (204) hide show
  1. package/lib/__generated__/blockquote.props.js +2 -512
  2. package/lib/__generated__/body.props.js +2 -506
  3. package/lib/__generated__/bold.props.js +2 -506
  4. package/lib/__generated__/box.props.js +3 -524
  5. package/lib/__generated__/button.props.js +2 -568
  6. package/lib/__generated__/checkbox.props.js +1 -662
  7. package/lib/__generated__/code-text.props.js +1 -504
  8. package/lib/__generated__/form.props.js +2 -554
  9. package/lib/__generated__/head-link.props.js +2 -618
  10. package/lib/__generated__/head-meta.props.js +2 -530
  11. package/lib/__generated__/head-slot.props.js +4 -0
  12. package/lib/__generated__/head-title.props.js +2 -506
  13. package/lib/__generated__/heading.props.js +3 -513
  14. package/lib/__generated__/html-embed.props.js +6 -1
  15. package/lib/__generated__/image.props.js +1 -581
  16. package/lib/__generated__/input.props.js +2 -694
  17. package/lib/__generated__/italic.props.js +2 -506
  18. package/lib/__generated__/label.props.js +2 -518
  19. package/lib/__generated__/link.props.js +4 -555
  20. package/lib/__generated__/list-item.props.js +2 -512
  21. package/lib/__generated__/list.props.js +1 -523
  22. package/lib/__generated__/markdown-embed.props.js +2 -3
  23. package/lib/__generated__/option.props.js +2 -530
  24. package/lib/__generated__/paragraph.props.js +2 -506
  25. package/lib/__generated__/radio-button.props.js +1 -662
  26. package/lib/__generated__/select.props.js +2 -554
  27. package/lib/__generated__/separator.props.js +2 -506
  28. package/lib/__generated__/span.props.js +2 -506
  29. package/lib/__generated__/subscript.props.js +2 -506
  30. package/lib/__generated__/superscript.props.js +2 -506
  31. package/lib/__generated__/text.props.js +3 -513
  32. package/lib/__generated__/textarea.props.js +2 -585
  33. package/lib/__generated__/time.props.js +1 -8
  34. package/lib/__generated__/video.props.js +4 -0
  35. package/lib/__generated__/vimeo-play-button.props.js +2 -567
  36. package/lib/__generated__/vimeo-preview-image.props.js +1 -580
  37. package/lib/__generated__/vimeo-spinner.props.js +2 -506
  38. package/lib/__generated__/vimeo.props.js +2 -505
  39. package/lib/__generated__/webhook-form.props.js +1 -557
  40. package/lib/__generated__/xml-node.props.js +8 -3
  41. package/lib/__generated__/xml-time.props.js +4 -3
  42. package/lib/__generated__/youtube.props.js +1 -498
  43. package/lib/blockquote.ws.js +18 -25
  44. package/lib/body.ws.js +6 -25
  45. package/lib/bold.ws.js +6 -15
  46. package/lib/box.js +9 -6
  47. package/lib/box.ws.js +37 -27
  48. package/lib/button.ws.js +7 -24
  49. package/lib/checkbox.ws.js +8 -26
  50. package/lib/code-text.ws.js +18 -26
  51. package/lib/components.js +6 -4
  52. package/lib/form.ws.js +9 -23
  53. package/lib/fragment.ws.js +2 -8
  54. package/lib/head-link.ws.js +9 -14
  55. package/lib/head-meta.ws.js +9 -14
  56. package/lib/head-slot.js +4 -5
  57. package/lib/head-slot.template.js +1 -1
  58. package/lib/head-slot.ws.js +9 -20
  59. package/lib/head-title.ws.js +6 -11
  60. package/lib/heading.js +9 -6
  61. package/lib/heading.ws.js +20 -23
  62. package/lib/html-embed.ws.js +22 -20
  63. package/lib/image.ws.js +21 -28
  64. package/lib/input.js +18 -14
  65. package/lib/input.ws.js +11 -37
  66. package/lib/italic.ws.js +6 -21
  67. package/lib/label.ws.js +7 -18
  68. package/lib/link.ws.js +11 -32
  69. package/lib/list-item.ws.js +6 -22
  70. package/lib/list.ws.js +15 -22
  71. package/lib/markdown-embed.js +3 -3
  72. package/lib/markdown-embed.ws.js +13 -11
  73. package/lib/metas.js +6 -4
  74. package/lib/option.js +3 -1
  75. package/lib/option.ws.js +9 -18
  76. package/lib/paragraph.ws.js +7 -20
  77. package/lib/radio-button.ws.js +10 -29
  78. package/lib/rich-text-link.ws.js +3 -7
  79. package/lib/select.js +27 -14
  80. package/lib/select.ws.js +10 -28
  81. package/lib/separator.ws.js +14 -24
  82. package/lib/shared/video.js +13 -0
  83. package/lib/slot.ws.js +3 -7
  84. package/lib/span.ws.js +8 -15
  85. package/lib/subscript.ws.js +7 -16
  86. package/lib/superscript.ws.js +7 -16
  87. package/lib/templates.js +12 -36
  88. package/lib/text.js +9 -7
  89. package/lib/text.ws.js +22 -19
  90. package/lib/textarea.js +16 -5
  91. package/lib/textarea.ws.js +13 -35
  92. package/lib/time.js +2 -1
  93. package/lib/time.ws.js +12 -15
  94. package/lib/types/blockquote.ws.d.ts +1 -2
  95. package/lib/types/body.ws.d.ts +1 -2
  96. package/lib/types/bold.ws.d.ts +1 -2
  97. package/lib/types/box.d.ts +2 -3
  98. package/lib/types/box.ws.d.ts +1 -2
  99. package/lib/types/button.ws.d.ts +1 -2
  100. package/lib/types/checkbox.d.ts +1 -1
  101. package/lib/types/checkbox.ws.d.ts +1 -2
  102. package/lib/types/code-text.ws.d.ts +1 -2
  103. package/lib/types/components.d.ts +1 -0
  104. package/lib/types/form.ws.d.ts +1 -2
  105. package/lib/types/fragment.ws.d.ts +1 -2
  106. package/lib/types/head-link.ws.d.ts +1 -2
  107. package/lib/types/head-meta.ws.d.ts +1 -2
  108. package/lib/types/head-slot.ws.d.ts +1 -2
  109. package/lib/types/head-title.ws.d.ts +1 -2
  110. package/lib/types/heading.d.ts +1 -2
  111. package/lib/types/heading.ws.d.ts +1 -2
  112. package/lib/types/html-embed.ws.d.ts +1 -2
  113. package/lib/types/image.ws.d.ts +1 -2
  114. package/lib/types/input.d.ts +1 -4
  115. package/lib/types/input.ws.d.ts +1 -2
  116. package/lib/types/italic.ws.d.ts +1 -2
  117. package/lib/types/label.ws.d.ts +1 -2
  118. package/lib/types/link.ws.d.ts +1 -2
  119. package/lib/types/list-item.ws.d.ts +1 -2
  120. package/lib/types/list.ws.d.ts +1 -2
  121. package/lib/types/markdown-embed.d.ts +3 -3
  122. package/lib/types/markdown-embed.ws.d.ts +1 -2
  123. package/lib/types/metas.d.ts +1 -0
  124. package/lib/types/option.d.ts +0 -1
  125. package/lib/types/option.ws.d.ts +1 -2
  126. package/lib/types/paragraph.ws.d.ts +1 -2
  127. package/lib/types/radio-button.d.ts +1 -1
  128. package/lib/types/radio-button.ws.d.ts +1 -2
  129. package/lib/types/rich-text-link.ws.d.ts +1 -2
  130. package/lib/types/select.d.ts +0 -1
  131. package/lib/types/select.ws.d.ts +1 -2
  132. package/lib/types/separator.ws.d.ts +1 -2
  133. package/lib/types/shared/video.d.ts +7 -0
  134. package/lib/types/slot.ws.d.ts +1 -2
  135. package/lib/types/span.ws.d.ts +1 -2
  136. package/lib/types/subscript.ws.d.ts +1 -2
  137. package/lib/types/superscript.ws.d.ts +1 -2
  138. package/lib/types/templates.d.ts +0 -12
  139. package/lib/types/text.d.ts +2 -3
  140. package/lib/types/text.ws.d.ts +1 -2
  141. package/lib/types/textarea.d.ts +0 -1
  142. package/lib/types/textarea.ws.d.ts +1 -2
  143. package/lib/types/time.d.ts +2 -4
  144. package/lib/types/time.ws.d.ts +1 -2
  145. package/lib/types/video.d.ts +9 -0
  146. package/lib/types/video.ws.d.ts +2 -0
  147. package/lib/types/vimeo-play-button.ws.d.ts +1 -2
  148. package/lib/types/vimeo-preview-image.d.ts +21 -21
  149. package/lib/types/vimeo-preview-image.ws.d.ts +1 -2
  150. package/lib/types/vimeo-spinner.ws.d.ts +1 -2
  151. package/lib/types/vimeo.d.ts +0 -6
  152. package/lib/types/vimeo.ws.d.ts +1 -2
  153. package/lib/types/webhook-form.ws.d.ts +1 -2
  154. package/lib/types/xml-node.ws.d.ts +1 -2
  155. package/lib/types/xml-time.ws.d.ts +1 -2
  156. package/lib/types/youtube.ws.d.ts +1 -2
  157. package/lib/video.js +53 -0
  158. package/lib/video.ws.js +44 -0
  159. package/lib/vimeo-play-button.js +4 -4
  160. package/lib/vimeo-play-button.ws.js +13 -26
  161. package/lib/vimeo-preview-image.js +5 -5
  162. package/lib/vimeo-preview-image.ws.js +8 -10
  163. package/lib/vimeo-spinner.js +1 -1
  164. package/lib/vimeo-spinner.ws.js +12 -19
  165. package/lib/vimeo.js +98 -99
  166. package/lib/vimeo.template.js +22 -21
  167. package/lib/vimeo.ws.js +16 -21
  168. package/lib/webhook-form.template.js +59 -20
  169. package/lib/webhook-form.ws.js +16 -15
  170. package/lib/xml-node.js +17 -16
  171. package/lib/xml-node.ws.js +5 -8
  172. package/lib/xml-time.ws.js +4 -7
  173. package/lib/youtube.js +152 -131
  174. package/lib/youtube.template.js +16 -15
  175. package/lib/youtube.ws.js +15 -21
  176. package/package.json +13 -16
  177. package/lib/__generated__/head.props.js +0 -508
  178. package/lib/blockquote.template.js +0 -11
  179. package/lib/button.template.js +0 -11
  180. package/lib/checkbox.template.js +0 -14
  181. package/lib/heading.template.js +0 -11
  182. package/lib/label.template.js +0 -10
  183. package/lib/link.template.js +0 -11
  184. package/lib/list-item.template.js +0 -11
  185. package/lib/list.template.js +0 -15
  186. package/lib/paragraph.template.js +0 -11
  187. package/lib/props.js +0 -90
  188. package/lib/radio-button.template.js +0 -14
  189. package/lib/select.template.js +0 -16
  190. package/lib/text.template.js +0 -11
  191. package/lib/types/blockquote.template.d.ts +0 -2
  192. package/lib/types/button.template.d.ts +0 -2
  193. package/lib/types/checkbox.template.d.ts +0 -2
  194. package/lib/types/heading.template.d.ts +0 -2
  195. package/lib/types/label.template.d.ts +0 -2
  196. package/lib/types/link.template.d.ts +0 -2
  197. package/lib/types/list-item.template.d.ts +0 -2
  198. package/lib/types/list.template.d.ts +0 -2
  199. package/lib/types/paragraph.template.d.ts +0 -2
  200. package/lib/types/props.d.ts +0 -44
  201. package/lib/types/radio-button.template.d.ts +0 -2
  202. package/lib/types/select.template.d.ts +0 -2
  203. package/lib/types/text.template.d.ts +0 -2
  204. /package/lib/types/__generated__/{head.props.d.ts → video.props.d.ts} +0 -0
package/lib/body.ws.js CHANGED
@@ -1,29 +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: "WebkitFontSmoothing",
10
- value: { type: "keyword", value: "antialiased" }
11
- },
12
- {
13
- property: "MozOsxFontSmoothing",
14
- value: { type: "keyword", value: "grayscale" }
15
- }
16
- ]
17
- }, m = {
18
- type: "container",
19
- icon: o,
20
- states: t,
21
- presetStyle: a
22
- }, y = {
23
- props: r,
24
- initialProps: ["id", "className"]
3
+ const i = {
4
+ presetStyle: { body: o },
5
+ initialProps: ["id", "class"],
6
+ props: r
25
7
  };
26
8
  export {
27
- m as meta,
28
- y as propsMeta
9
+ i as meta
29
10
  };
package/lib/bold.ws.js CHANGED
@@ -1,20 +1,11 @@
1
- import { BoldIcon as t } from "@webstudio-is/icons/svg";
2
- import { defaultStates as o } from "@webstudio-is/sdk";
3
- import { b as e } from "@webstudio-is/sdk/normalize.css";
4
- import { props as r } from "./__generated__/bold.props.js";
1
+ import { b as o } from "@webstudio-is/sdk/normalize.css";
2
+ import { props as t } from "./__generated__/bold.props.js";
5
3
  const p = {
6
- b: e
7
- }, l = {
8
- type: "rich-text-child",
9
4
  label: "Bold Text",
10
- icon: t,
11
- states: o,
12
- presetStyle: p
13
- }, c = {
14
- props: r,
15
- initialProps: ["id", "className"]
5
+ presetStyle: { b: o },
6
+ initialProps: ["id", "class"],
7
+ props: t
16
8
  };
17
9
  export {
18
- l as meta,
19
- c as propsMeta
10
+ p as meta
20
11
  };
package/lib/box.js CHANGED
@@ -1,9 +1,12 @@
1
- import { forwardRef as t, createElement as a } from "react";
2
- const d = "div", f = t(
3
- ({ tag: e = d, ...o }, r) => a(e, { ...o, ref: r })
1
+ import { forwardRef as a, createElement as m } from "react";
2
+ import { getTagFromProps as f } from "@webstudio-is/sdk/runtime";
3
+ const g = "div", n = a(
4
+ ({ tag: o, ...t }, r) => {
5
+ const e = f(t) ?? o ?? g;
6
+ return m(e, { ...t, ref: r });
7
+ }
4
8
  );
5
- f.displayName = "Box";
9
+ n.displayName = "Box";
6
10
  export {
7
- f as Box,
8
- d as defaultTag
11
+ n as Box
9
12
  };
package/lib/box.ws.js CHANGED
@@ -1,31 +1,41 @@
1
- import { BoxIcon as t } from "@webstudio-is/icons/svg";
2
- import { defaultStates as e } from "@webstudio-is/sdk";
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
- import { props as f } from "./__generated__/box.props.js";
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";
5
3
  const g = {
6
- div: o,
7
- address: r,
8
- article: a,
9
- aside: i,
10
- figure: n,
11
- footer: s,
12
- header: c,
13
- main: p,
14
- nav: d,
15
- section: m
16
- }, v = {
17
- category: "general",
18
- type: "container",
19
- description: "A container for content. By default this is a Div, but the tag can be changed in settings.",
20
- icon: t,
21
- states: e,
22
- presetStyle: g,
23
- order: 0
24
- }, b = {
25
- props: f,
26
- initialProps: ["id", "className", "tag"]
4
+ presetStyle: {
5
+ div: p,
6
+ address: n,
7
+ article: d,
8
+ aside: s,
9
+ figure: o,
10
+ footer: a,
11
+ header: i,
12
+ main: t,
13
+ nav: r,
14
+ section: e
15
+ },
16
+ initialProps: ["tag", "id", "class"],
17
+ props: {
18
+ ...c,
19
+ tag: {
20
+ required: !0,
21
+ control: "tag",
22
+ type: "string",
23
+ options: [
24
+ "div",
25
+ "header",
26
+ "footer",
27
+ "nav",
28
+ "main",
29
+ "section",
30
+ "article",
31
+ "aside",
32
+ "address",
33
+ "figure",
34
+ "span"
35
+ ]
36
+ }
37
+ }
27
38
  };
28
39
  export {
29
- v as meta,
30
- b as propsMeta
40
+ g as meta
31
41
  };
package/lib/button.ws.js CHANGED
@@ -1,27 +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 n } from "./__generated__/button.props.js";
5
- const a = {
6
- button: o
7
- }, p = {
8
- icon: t,
9
- type: "container",
10
- constraints: {
11
- relation: "ancestor",
12
- component: { $nin: ["Button", "Link"] }
13
- },
14
- presetStyle: a,
15
- states: [
16
- ...e,
17
- { selector: ":disabled", label: "Disabled" },
18
- { selector: ":enabled", label: "Enabled" }
19
- ]
20
- }, c = {
21
- props: n,
22
- 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
23
7
  };
24
8
  export {
25
- p as meta,
26
- c as propsMeta
9
+ e as meta
27
10
  };
@@ -1,38 +1,20 @@
1
1
  import { CheckboxCheckedIcon as e } from "@webstudio-is/icons/svg";
2
- import { defaultStates as t } from "@webstudio-is/sdk";
3
2
  import { checkbox as o } from "@webstudio-is/sdk/normalize.css";
4
- import { props as l } from "./__generated__/checkbox.props.js";
5
- const r = {
3
+ import { props as r } from "./__generated__/checkbox.props.js";
4
+ const t = {
6
5
  input: [
7
6
  ...o,
8
7
  {
9
- property: "marginRight",
8
+ property: "margin-right",
10
9
  value: { type: "unit", unit: "em", value: 0.5 }
11
10
  }
12
11
  ]
13
- }, s = {
14
- constraints: {
15
- relation: "ancestor",
16
- component: { $nin: ["Button", "Link"] }
17
- },
18
- type: "control",
12
+ }, m = {
19
13
  icon: e,
20
- presetStyle: r,
21
- states: [
22
- ...t,
23
- { selector: ":checked", label: "Checked" },
24
- { selector: ":required", label: "Required" },
25
- { selector: ":optional", label: "Optional" },
26
- { selector: ":disabled", label: "Disabled" },
27
- { selector: ":enabled", label: "Enabled" },
28
- { selector: ":read-only", label: "Read Only" },
29
- { selector: ":read-write", label: "Read Write" }
30
- ]
31
- }, p = {
32
- props: l,
33
- initialProps: ["id", "className", "name", "value", "required", "checked"]
14
+ presetStyle: t,
15
+ initialProps: ["id", "class", "name", "value", "required", "checked"],
16
+ props: r
34
17
  };
35
18
  export {
36
- s as meta,
37
- p as propsMeta
19
+ m as meta
38
20
  };
@@ -1,59 +1,51 @@
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" }
11
10
  },
12
11
  {
13
- property: "whiteSpaceCollapse",
12
+ property: "white-space-collapse",
14
13
  value: { type: "keyword", value: "preserve" }
15
14
  },
16
15
  {
17
- property: "textWrapMode",
16
+ property: "text-wrap-mode",
18
17
  value: { type: "keyword", value: "wrap" }
19
18
  },
20
19
  {
21
- property: "paddingLeft",
20
+ property: "padding-left",
22
21
  value: { type: "unit", value: 0.2, unit: "em" }
23
22
  },
24
23
  {
25
- property: "paddingRight",
24
+ property: "padding-right",
26
25
  value: { type: "unit", value: 0.2, unit: "em" }
27
26
  },
28
27
  {
29
- property: "backgroundColor",
28
+ property: "background-color",
30
29
  value: { type: "rgb", r: 238, g: 238, b: 238, alpha: 1 }
31
30
  }
32
31
  ]
33
- }, s = {
34
- category: "general",
35
- type: "embed",
36
- description: "Use this component when you want to display code as text on the page.",
32
+ }, c = {
37
33
  icon: e,
38
- constraints: {
39
- relation: "ancestor",
40
- component: { $neq: "CodeText" }
34
+ contentModel: {
35
+ category: "instance",
36
+ children: []
41
37
  },
42
- states: t,
43
- presetStyle: p,
44
- order: 5
45
- }, d = {
38
+ presetStyle: o,
39
+ initialProps: ["id", "class", "lang", "code"],
46
40
  props: {
47
- ...r,
41
+ ...t,
48
42
  code: {
49
43
  required: !0,
50
44
  control: "codetext",
51
45
  type: "string"
52
46
  }
53
- },
54
- initialProps: ["id", "className", "lang", "code"]
47
+ }
55
48
  };
56
49
  export {
57
- s as meta,
58
- d as propsMeta
50
+ c as meta
59
51
  };
package/lib/components.js CHANGED
@@ -10,7 +10,7 @@ import { Paragraph as c } from "./paragraph.js";
10
10
  import { Link as B, Link as L } from "./link.js";
11
11
  import { Span as g } from "./span.js";
12
12
  import { Bold as I } from "./bold.js";
13
- import { Italic as V } from "./italic.js";
13
+ import { Italic as h } from "./italic.js";
14
14
  import { Superscript as R } from "./superscript.js";
15
15
  import { Subscript as y } from "./subscript.js";
16
16
  import { Button as E } from "./button.js";
@@ -36,11 +36,12 @@ import { XmlNode as co } from "./xml-node.js";
36
36
  import { XmlTime as Bo } from "./xml-time.js";
37
37
  import { Time as Ho } from "./time.js";
38
38
  import { Select as Fo } from "./select.js";
39
- import { Option as ho } from "./option.js";
39
+ import { Option as Vo } from "./option.js";
40
40
  import { HeadSlot as Po } from "./head-slot.js";
41
41
  import { HeadLink as wo } from "./head-link.js";
42
42
  import { HeadMeta as Co } from "./head-meta.js";
43
43
  import { HeadTitle as Mo } from "./head-title.js";
44
+ import { Video as qo } from "./video.js";
44
45
  export {
45
46
  z as Blockquote,
46
47
  n as Body,
@@ -59,13 +60,13 @@ export {
59
60
  x as HtmlEmbed,
60
61
  Y as Image,
61
62
  X as Input,
62
- V as Italic,
63
+ h as Italic,
63
64
  $ as Label,
64
65
  B as Link,
65
66
  D as List,
66
67
  J as ListItem,
67
68
  a as MarkdownEmbed,
68
- ho as Option,
69
+ Vo as Option,
69
70
  c as Paragraph,
70
71
  to as RadioButton,
71
72
  O as RemixForm,
@@ -79,6 +80,7 @@ export {
79
80
  k as Text,
80
81
  ro as Textarea,
81
82
  Ho as Time,
83
+ qo as Video,
82
84
  fo as Vimeo,
83
85
  ko as VimeoPlayButton,
84
86
  lo as VimeoPreviewImage,
package/lib/form.ws.js CHANGED
@@ -1,30 +1,16 @@
1
- import { FormIcon as t } from "@webstudio-is/icons/svg";
2
- import { defaultStates as o } from "@webstudio-is/sdk";
3
- import { form as r } from "@webstudio-is/sdk/normalize.css";
4
- import { props as e } from "./__generated__/form.props.js";
5
- const n = {
1
+ import { form as t } from "@webstudio-is/sdk/normalize.css";
2
+ import { props as o } from "./__generated__/form.props.js";
3
+ const r = {
6
4
  form: [
7
- ...r,
8
- { property: "minHeight", value: { type: "unit", unit: "px", value: 20 } }
5
+ ...t,
6
+ { property: "min-height", value: { type: "unit", unit: "px", value: 20 } }
9
7
  ]
10
8
  }, p = {
11
- category: "forms",
12
- type: "container",
13
9
  label: "Form",
14
- constraints: {
15
- relation: "ancestor",
16
- component: { $nin: ["Form", "Button", "Link"] }
17
- },
18
- description: "Create filters, surveys, searches and more.",
19
- icon: t,
20
- states: o,
21
- presetStyle: n,
22
- order: 0
23
- }, c = {
24
- props: e,
25
- initialProps: ["id", "className", "action"]
10
+ presetStyle: r,
11
+ initialProps: ["id", "class", "action"],
12
+ props: o
26
13
  };
27
14
  export {
28
- p as meta,
29
- c as propsMeta
15
+ p as meta
30
16
  };
@@ -1,10 +1,4 @@
1
- const o = {
2
- type: "container",
3
- icon: ""
4
- }, t = {
5
- props: {}
6
- };
1
+ const t = {};
7
2
  export {
8
- o as meta,
9
- t as propsMeta
3
+ t as meta
10
4
  };
@@ -1,19 +1,14 @@
1
1
  import { ResourceIcon as o } from "@webstudio-is/icons/svg";
2
- import "@webstudio-is/sdk";
3
- import { props as t } from "./__generated__/head-link.props.js";
4
- const p = {
5
- category: "hidden",
2
+ import { props as e } from "./__generated__/head-link.props.js";
3
+ const t = {
6
4
  icon: o,
7
- type: "container",
8
- constraints: {
9
- relation: "parent",
10
- component: { $eq: "HeadSlot" }
11
- }
12
- }, a = {
13
- props: t,
14
- initialProps: ["rel", "hrefLang", "href", "type", "as"]
5
+ contentModel: {
6
+ category: "none",
7
+ children: []
8
+ },
9
+ initialProps: ["rel", "hrefLang", "href", "type", "as"],
10
+ props: e
15
11
  };
16
12
  export {
17
- p as meta,
18
- a as propsMeta
13
+ t as meta
19
14
  };
@@ -1,19 +1,14 @@
1
1
  import { WindowInfoIcon as o } from "@webstudio-is/icons/svg";
2
- import "@webstudio-is/sdk";
3
- import { props as t } from "./__generated__/head-meta.props.js";
4
- const p = {
5
- category: "hidden",
2
+ import { props as n } from "./__generated__/head-meta.props.js";
3
+ const e = {
6
4
  icon: o,
7
- type: "container",
8
- constraints: {
9
- relation: "parent",
10
- component: { $eq: "HeadSlot" }
11
- }
12
- }, i = {
13
- props: t,
14
- initialProps: ["name", "property", "content"]
5
+ contentModel: {
6
+ category: "none",
7
+ children: []
8
+ },
9
+ initialProps: ["name", "property", "content"],
10
+ props: n
15
11
  };
16
12
  export {
17
- p as meta,
18
- i as propsMeta
13
+ e as meta
19
14
  };
package/lib/head-slot.js CHANGED
@@ -1,15 +1,14 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { ReactSdkContext as d, getClosestInstance as r } from "@webstudio-is/react-sdk/runtime";
3
- import { forwardRef as s, useContext as i } from "react";
2
+ import { ReactSdkContext as s, getClosestInstance as r } from "@webstudio-is/react-sdk/runtime";
3
+ import { forwardRef as d, useContext as i } from "react";
4
4
  import { XmlNode as c } from "./xml-node.js";
5
- const f = "head", p = s(({ children: a, ...t }, o) => {
6
- const { renderer: e } = i(d);
5
+ const f = "head", p = d(({ children: a, ...t }, o) => {
6
+ const { renderer: e } = i(s);
7
7
  return e === void 0 ? a : t["data-ws-expand"] !== !0 ? null : /* @__PURE__ */ n(
8
8
  "div",
9
9
  {
10
10
  ref: o,
11
11
  style: {
12
- backgroundColor: "rgba(255,255,255,1)",
13
12
  padding: "8px",
14
13
  position: "fixed",
15
14
  top: 0,
@@ -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,25 +1,14 @@
1
- import { HeaderIcon as o } from "@webstudio-is/icons/svg";
2
- import "@webstudio-is/sdk";
3
- import { props as t } from "./__generated__/head.props.js";
1
+ import { HeaderIcon as e } from "@webstudio-is/icons/svg";
2
+ import { props as t } from "./__generated__/head-slot.props.js";
4
3
  const r = {
5
- icon: o,
6
- type: "container",
4
+ icon: e,
7
5
  description: "Inserts children into the head of the document",
8
- constraints: [
9
- {
10
- relation: "ancestor",
11
- component: { $nin: ["HeadSlot"] }
12
- },
13
- {
14
- relation: "child",
15
- component: { $in: ["HeadLink", "HeadMeta", "HeadTitle"] }
16
- }
17
- ]
18
- }, a = {
19
- props: t,
20
- initialProps: []
6
+ contentModel: {
7
+ category: "instance",
8
+ children: ["HeadLink", "HeadMeta", "HeadTitle"]
9
+ },
10
+ props: t
21
11
  };
22
12
  export {
23
- r as meta,
24
- a as propsMeta
13
+ r as meta
25
14
  };
@@ -1,18 +1,13 @@
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 p = {
5
- category: "hidden",
3
+ const r = {
6
4
  icon: o,
7
- type: "container",
8
- constraints: {
9
- relation: "parent",
10
- component: { $eq: "HeadSlot" }
11
- }
12
- }, i = {
5
+ contentModel: {
6
+ category: "none",
7
+ children: ["text"]
8
+ },
13
9
  props: t
14
10
  };
15
11
  export {
16
- p as meta,
17
- i as propsMeta
12
+ r as meta
18
13
  };
package/lib/heading.js CHANGED
@@ -1,9 +1,12 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as n } from "react";
3
- const d = "h1", f = n(
4
- ({ tag: a = d, children: o, ...r }, t) => /* @__PURE__ */ e(a, { ...r, ref: t, children: o })
1
+ import { forwardRef as o, createElement as g } from "react";
2
+ import { getTagFromProps as m } from "@webstudio-is/sdk/runtime";
3
+ const n = "h1", d = o(
4
+ ({ tag: e, ...t }, a) => {
5
+ const r = m(t) ?? e ?? n;
6
+ return g(r, { ...t, ref: a });
7
+ }
5
8
  );
6
- f.displayName = "Heading";
9
+ d.displayName = "Heading";
7
10
  export {
8
- f as Heading
11
+ d as Heading
9
12
  };
package/lib/heading.ws.js CHANGED
@@ -1,28 +1,25 @@
1
- import { HeadingIcon as t } from "@webstudio-is/icons/svg";
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
- import { props as p } from "./__generated__/heading.props.js";
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";
5
3
  const m = {
6
- h1: e,
7
- h2: n,
8
- h3: r,
9
- h4: a,
10
- h5: s,
11
- h6: i
12
- }, d = {
13
- type: "container",
14
- icon: t,
15
- constraints: {
16
- relation: "ancestor",
17
- component: { $neq: "Heading" }
4
+ presetStyle: {
5
+ h1: e,
6
+ h2: p,
7
+ h3: h,
8
+ h4: o,
9
+ h5: r,
10
+ h6: t
18
11
  },
19
- states: o,
20
- presetStyle: m
21
- }, g = {
22
- props: p,
23
- initialProps: ["id", "className", "tag"]
12
+ initialProps: ["tag", "id", "class"],
13
+ props: {
14
+ ...i,
15
+ tag: {
16
+ required: !0,
17
+ control: "tag",
18
+ type: "string",
19
+ options: ["h1", "h2", "h3", "h4", "h5", "h6"]
20
+ }
21
+ }
24
22
  };
25
23
  export {
26
- d as meta,
27
- g as propsMeta
24
+ m as meta
28
25
  };